From 0181df537ffb4e4273b2ca005738fdb7bd3d73f5 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Sat, 24 Feb 2018 00:01:21 -0500 Subject: gnu: wxmaxima: Update to 18.02.0. * gnu/packages/maths.scm (wxmaxima): Update to 18.02.0. [source]: Add patch. [build-system]: Use the cmake-build-system. [native-inputs]: Remove autoconf and automake. [arguments]: Disable tests, remove 'autoconf' phase. * gnu/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index a10f3150e9..2f8f7b7e3a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -4,7 +4,7 @@ # Copyright © 2016 Mathieu Lirzin # Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Mark H Weaver # Copyright © 2016 Chris Marusich -# Copyright © 2016, 2017 Kei Kebreau +# Copyright © 2016, 2017, 2018 Kei Kebreau # Copyright © 2016, 2017 Rene Saavedra # Copyright © 2016 Adonay "adfeno" Felipe Nogueira # Copyright © 2016, 2017 Ricardo Wurmus @@ -1160,6 +1160,7 @@ dist_patch_DATA = \ %D%/packages/patches/wpa-supplicant-fix-zeroed-keys.patch \ %D%/packages/patches/wpa-supplicant-fix-nonce-reuse.patch \ %D%/packages/patches/wpa-supplicant-krack-followups.patch \ + %D%/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch \ %D%/packages/patches/xboing-CVE-2004-0149.patch \ %D%/packages/patches/xcb-proto-python3-print.patch \ %D%/packages/patches/xcb-proto-python3-whitespace.patch \ -- cgit 1.4.1 From f61682e7ea87db3eed7e67adacd1d3f8c1b7c119 Mon Sep 17 00:00:00 2001 From: Alex ter Weele Date: Tue, 20 Feb 2018 18:55:06 -0600 Subject: gnu: Add agda. * gnu/packages/agda.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add adga.scm. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 + gnu/packages/agda.scm | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 gnu/packages/agda.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2f8f7b7e3a..8acb3cea47 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -52,6 +52,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/acl.scm \ %D%/packages/admin.scm \ %D%/packages/adns.scm \ + %D%/packages/agda.scm \ %D%/packages/algebra.scm \ %D%/packages/aidc.scm \ %D%/packages/android.scm \ diff --git a/gnu/packages/agda.scm b/gnu/packages/agda.scm new file mode 100644 index 0000000000..6aa230116c --- /dev/null +++ b/gnu/packages/agda.scm @@ -0,0 +1,86 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2018 Alex ter Weele +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages agda) + #:use-module (gnu packages haskell) + #:use-module (gnu packages haskell-check) + #:use-module (gnu packages haskell-web) + #:use-module (guix build-system haskell) + #:use-module (guix build-system trivial) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages)) + +(define-public agda + (package + (name "agda") + (version "2.5.3") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/Agda/Agda-" + version ".tar.gz")) + (sha256 + (base32 + "0r80vw7vnvbgq47y50v050malv7zvv2p2kg6f47i04r0b2ix855a")))) + (build-system haskell-build-system) + (inputs + `(("cpphs" ,cpphs) + ("ghc-alex" ,ghc-alex) + ("ghc-async" ,ghc-async) + ("ghc-blaze-html" ,ghc-blaze-html) + ("ghc-boxes" ,ghc-boxes) + ("ghc-data-hash" ,ghc-data-hash) + ("ghc-edisoncore" ,ghc-edisoncore) + ("ghc-edit-distance" ,ghc-edit-distance) + ("ghc-equivalence" ,ghc-equivalence) + ("ghc-geniplate-mirror" ,ghc-geniplate-mirror) + ("ghc-gitrev" ,ghc-gitrev) + ("ghc-happy" ,ghc-happy) + ("ghc-hashable" ,ghc-hashable) + ("ghc-hashtables" ,ghc-hashtables) + ("ghc-ieee754" ,ghc-ieee754) + ("ghc-monadplus" ,ghc-monadplus) + ("ghc-mtl" ,ghc-mtl) + ("ghc-murmur-hash" ,ghc-murmur-hash) + ("ghc-uri-encode" ,ghc-uri-encode) + ("ghc-parallel" ,ghc-parallel) + ("ghc-regex-tdfa" ,ghc-regex-tdfa) + ("ghc-stm" ,ghc-stm) + ("ghc-strict" ,ghc-strict) + ("ghc-text" ,ghc-text) + ("ghc-unordered-containers" ,ghc-unordered-containers) + ("ghc-zlib" ,ghc-zlib))) + (home-page "http://wiki.portal.chalmers.se/agda/") + (synopsis + "Dependently typed functional programming language and proof assistant") + (description + "Agda is a dependently typed functional programming language: it has +inductive families, which are similar to Haskell's GADTs, but they can be +indexed by values and not just types. It also has parameterised modules, +mixfix operators, Unicode characters, and an interactive Emacs interface (the +type checker can assist in the development of your code). Agda is also a +proof assistant: it is an interactive system for writing and checking proofs. +Agda is based on intuitionistic type theory, a foundational system for +constructive mathematics developed by the Swedish logician Per Martin-Löf. It +has many similarities with other proof assistants based on dependent types, +such as Coq, Epigram and NuPRL.") + ;; Agda is distributed under the MIT license, and a couple of + ;; source files are BSD-3. See LICENSE for details. + (license (list license:expat license:bsd-3)))) -- cgit 1.4.1 From 2115bde3024b685087af70a20d7846498d6c9985 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 26 Feb 2018 02:39:15 +0100 Subject: gnu: python-parse: Update to 1.8.2. * gnu/packages/patches/python-parse-too-many-fields.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/python.scm (python-parse): Update to 1.8.2. [source](patches): Remove. [arguments]: Use INVOKE instead of SYSTEM*. --- gnu/local.mk | 1 - .../patches/python-parse-too-many-fields.patch | 52 ---------------------- gnu/packages/python.scm | 7 ++- 3 files changed, 3 insertions(+), 57 deletions(-) delete mode 100644 gnu/packages/patches/python-parse-too-many-fields.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8acb3cea47..72fbf90f83 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1031,7 +1031,6 @@ dist_patch_DATA = \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-networkx2-reproducible-build.patch \ %D%/packages/patches/python-nose-timer-drop-ordereddict.patch \ - %D%/packages/patches/python-parse-too-many-fields.patch \ %D%/packages/patches/python-pillow-fix-failing-tests.patch \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ %D%/packages/patches/python-statsmodels-fix-tests.patch \ diff --git a/gnu/packages/patches/python-parse-too-many-fields.patch b/gnu/packages/patches/python-parse-too-many-fields.patch deleted file mode 100644 index 9db6b91a7f..0000000000 --- a/gnu/packages/patches/python-parse-too-many-fields.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 32f15cfefb7c7b6476360ac65cba807aa3dfccfa Mon Sep 17 00:00:00 2001 -From: David King -Date: Mon, 14 Dec 2015 09:58:19 +0000 -Subject: [PATCH] Fix test_too_many_fields with Python 3.5 - -taken from https://github.com/r1chardj0n3s/parse/pull/34 - -Python versions before 3.5 had a limit of 100 groups in regular -expressions. This limit was removed during 3.5 development: - -http://bugs.python.org/issue22437 -https://hg.python.org/cpython/rev/0b85ea4bd1af - -The test_too_many_fields test asserts that the limit exists by -attempting to parse a string with 15 fields, which triggers the 100 -named groups limit. - -Adjust the test so that if first checks to see whether the limit of 100 -named groups exists, and only assert that parsing 15 fields fails if -that is the case. ---- - test_parse.py | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/test_parse.py b/test_parse.py -index c524349..1d50568 100755 ---- a/test_parse.py -+++ b/test_parse.py -@@ -6,6 +6,7 @@ - - import unittest - from datetime import datetime, time -+import re - - import parse - -@@ -624,8 +625,13 @@ def test_mixed_type_variant(self): - self.assertEqual(r.fixed[21], 'spam') - - def test_too_many_fields(self): -- p = parse.compile('{:ti}' * 15) -- self.assertRaises(parse.TooManyFields, p.parse, '') -+ # Python 3.5 removed the limit of 100 named groups in a regular expression, -+ # so only test for the exception if the limit exists. -+ try: -+ re.compile("".join("(?P{n}-)".format(n=i) for i in range(101))) -+ except AssertionError: -+ p = parse.compile('{:ti}' * 15) -+ self.assertRaises(parse.TooManyFields, p.parse, '') - - - class TestSearch(unittest.TestCase): diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 3c816cda53..14a79a9b22 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1431,21 +1431,20 @@ backported for previous versions of Python from 2.4 to 3.3.") (define-public python-parse (package (name "python-parse") - (version "1.6.6") + (version "1.8.2") (source (origin (method url-fetch) (uri (pypi-uri "parse" version)) (sha256 (base32 - "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi")) - (patches (search-patches "python-parse-too-many-fields.patch")))) + "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ (zero? (system* "python" "test_parse.py"))))))) + (lambda _ (invoke "python" "test_parse.py")))))) (home-page "https://github.com/r1chardj0n3s/parse") (synopsis "Parse strings") (description -- cgit 1.4.1 From d5d7d26df7c424a9cffee27f1210b59ef8682d5c Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 27 Feb 2018 01:21:27 +0100 Subject: gnu: perl-gd: Update to 2.68. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/gd.scm (perl-gd): Update to 2.68. [source]: Remove obsolete patch. [native-inputs]: Remove perl-module-build. [inputs]: Use canonical package names and order alphabetically. [arguments]: Replace #:module-build-flags with fewer #:make-maker-flags, enable #:tests?, and remove ‘clear-autogenerated-files’ phase. * gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/gd.scm | 43 ++++++------------ ...erl-gd-options-passthrough-and-fontconfig.patch | 53 ---------------------- 3 files changed, 13 insertions(+), 84 deletions(-) delete mode 100644 gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 72fbf90f83..bae3df5a6d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -972,7 +972,6 @@ dist_patch_DATA = \ %D%/packages/patches/perl-dbd-mysql-CVE-2017-10788.patch \ %D%/packages/patches/perl-deterministic-ordering.patch \ %D%/packages/patches/perl-finance-quote-unuse-mozilla-ca.patch \ - %D%/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch \ %D%/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch \ %D%/packages/patches/perl-net-amazon-s3-moose-warning.patch \ %D%/packages/patches/perl-net-dns-resolver-programmable-fix.patch \ diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm index 3b1def55e1..c815cdd7ea 100644 --- a/gnu/packages/gd.scm +++ b/gnu/packages/gd.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2017 Marius Bakke +;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -93,45 +94,27 @@ most common applications of GD involve website development.") (define-public perl-gd (package (name "perl-gd") - (version "2.56") + (version "2.68") (source (origin (method url-fetch) - (uri (string-append "mirror://cpan/authors/id/L/LD/LDS/" + (uri (string-append "mirror://cpan/authors/id/R/RU/RURBAN/" "GD-" version ".tar.gz")) (sha256 (base32 - "1ya8f9hpiax8j29vwaiwlvvgah0vkyvpzva28r8231nyk0f3s40z")) - (patches (search-patches - "perl-gd-options-passthrough-and-fontconfig.patch")))) + "0p2ya641nl5cvcqgw829xgabh835qijfd6vq2ba12862946xx8va")))) (build-system perl-build-system) - (native-inputs - `(("perl-module-build" ,perl-module-build))) ;needs Module::Build >= 0.42 (inputs - `(("gd" ,gd) - ("zlib" ,zlib) - ("png" ,libpng) - ("ft" ,freetype) - ("jpeg" ,libjpeg) - ("fontconfig" ,fontconfig))) + `(("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("gd" ,gd) + ("libpng" ,libpng) + ("libjpeg" ,libjpeg) + ("zlib" ,zlib))) (arguments - ;; We must use Build.PL for building because Makefile.PL fails to build - ;; the XS source. - `(#:module-build-flags (map (lambda (i) - (string-append "--lib_" i "_path=" - (assoc-ref %build-inputs i))) - '("zlib" "png" "ft" "jpeg" "fontconfig")) - #:tests? #f ;; Failed 1/2 test programs. 1/12 subtests failed. - #:phases - (modify-phases %standard-phases - (add-after 'configure 'clear-autogenerated-files - (lambda _ - ;; This file is autogenerated by its .PLS script at build - ;; time, but file creation fails because that file already - ;; exists in the distribution with non-writable - ;; permissions, so delete it first. - (delete-file "bdf_scripts/bdf2gdfont.pl") - #t))))) + `(#:make-maker-flags + (list (string-append "--lib_jpeg_path=" + (assoc-ref %build-inputs "libjpeg"))))) (home-page "http://search.cpan.org/dist/GD") (synopsis "Perl interface to the GD graphics library") (description "GD.pm is an autoloadable interface module for libgd, a diff --git a/gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch b/gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch deleted file mode 100644 index b2ff43c0d3..0000000000 --- a/gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch +++ /dev/null @@ -1,53 +0,0 @@ -This patch (adapted from nixpkgs for Build.PL) configures Getopt::Long to pass -options so they will be available at the second GetOptions call. - -Also an option to specify the search path for libfontconfig is added. - ---- GD-2.56/Build.PL 2014-10-27 20:34:54.000000000 -0500 -+++ GD-2.56/Build.PL 2015-02-22 10:08:12.569973657 -0600 -@@ -2,14 +2,14 @@ - - use strict; - use Module::Build; --use Getopt::Long; -+use Getopt::Long qw(:config pass_through); - use Config; - - # =====> PATHS: CHECK AND ADJUST <===== - my (@INC,@LIBPATH,@LIBS); - my $AUTOCONFIG = 0; # global set by try_to_autoconfigure() below - --my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path); -+my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path,$lib_fontconfig_path); - - unless (try_to_autoconfigure(\$options,\$lib_gd_path,\@INC,\@LIBPATH,\@LIBS)) { - die < \$lib_jpeg_path, - "lib_xpm_path=s" => \$lib_xpm_path, - "lib_zlib_path=s" => \$lib_zlib_path, -+ "lib_fontconfig_path=s" => \$lib_fontconfig_path, - ); - unless ($result) { - die < Date: Tue, 12 Dec 2017 02:13:55 +0300 Subject: services: cgit: Add more configuration fields. * gnu/services/version-control.scm (cgit-service-type): Move to separate file. * gnu/services/cgit.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add this. * gnu/tests/version-control.scm: Add this. * doc/guix.texi (Cgit Service): Document this. --- doc/guix.texi | 948 +++++++++++++++++++++++++++++++++++++-- gnu/local.mk | 1 + gnu/services/cgit.scm | 686 ++++++++++++++++++++++++++++ gnu/services/version-control.scm | 121 ----- gnu/tests/version-control.scm | 3 +- 5 files changed, 1601 insertions(+), 158 deletions(-) create mode 100644 gnu/services/cgit.scm (limited to 'gnu/local.mk') diff --git a/doc/guix.texi b/doc/guix.texi index f9d7e13e21..24db167618 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -45,7 +45,8 @@ Copyright @copyright{} 2017 George Clemmer@* Copyright @copyright{} 2017 Andy Wingo@* Copyright @copyright{} 2017, 2018 Arun Isaac@* Copyright @copyright{} 2017 nee@* -Copyright @copyright{} 2018 Rutger Helling +Copyright @copyright{} 2018 Rutger Helling@* +Copyright @copyright{} 2018 Oleg Pykhalov Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -18542,54 +18543,929 @@ By default, Cgit can be accessed on port 80 (@code{http://localhost:80}). (service cgit-service-type) @end example -@deftp {Data Type} cgit-configuration -Data type representing the configuration of Cgit. -This type has the following parameters: +@c %start of fragment + +Available @code{cgit-configuration} fields are: + +@deftypevr {@code{cgit-configuration} parameter} package package +The CGIT package. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} nginx-server-configuration-list nginx +NGINX configuration. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string about-filter +Specifies a command which will be invoked to format the content of about +pages (both top-level and for each repository). + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string agefile +Specifies a path, relative to each repository path, which can be used to +specify the date and time of the youngest commit in the repository. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string auth-filter +Specifies a command that will be invoked for authenticating repository +access. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string branch-sort +Flag which, when set to @samp{age}, enables date ordering in the branch +ref list, and when set @samp{name} enables ordering by branch name. + +Defaults to @samp{"name"}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string cache-root +Path used to store the cgit cache entries. + +Defaults to @samp{"/var/cache/cgit"}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer cache-static-ttl +Number which specifies the time-to-live, in minutes, for the cached +version of repository pages accessed with a fixed SHA1. + +Defaults to @samp{-1}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer cache-dynamic-ttl +Number which specifies the time-to-live, in minutes, for the cached +version of repository pages accessed without a fixed SHA1. + +Defaults to @samp{5}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer cache-repo-ttl +Number which specifies the time-to-live, in minutes, for the cached +version of the repository summary page. + +Defaults to @samp{5}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer cache-root-ttl +Number which specifies the time-to-live, in minutes, for the cached +version of the repository index page. + +Defaults to @samp{5}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer cache-scanrc-ttl +Number which specifies the time-to-live, in minutes, for the result of +scanning a path for Git repositories. + +Defaults to @samp{15}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer cache-about-ttl +Number which specifies the time-to-live, in minutes, for the cached +version of the repository about page. + +Defaults to @samp{15}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer cache-snapshot-ttl +Number which specifies the time-to-live, in minutes, for the cached +version of snapshots. + +Defaults to @samp{5}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer cache-size +The maximum number of entries in the cgit cache. When set to @samp{0}, +caching is disabled. + +Defaults to @samp{0}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean case-sensitive-sort? +Sort items in the repo list case sensitively. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} list clone-prefix +List of common prefixes which, when combined with a repository URL, +generates valid clone URLs for the repository. + +Defaults to @samp{()}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} list clone-url +List of @code{clone-url} templates. + +Defaults to @samp{()}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string commit-filter +Command which will be invoked to format commit messages. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string commit-sort +Flag which, when set to @samp{date}, enables strict date ordering in the +commit log, and when set to @samp{topo} enables strict topological +ordering. + +Defaults to @samp{"git log"}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string css +URL which specifies the css document to include in all cgit pages. + +Defaults to @samp{"/share/cgit/cgit.css"}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string email-filter +Specifies a command which will be invoked to format names and email +address of committers, authors, and taggers, as represented in various +places throughout the cgit interface. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean embedded? +Flag which, when set to @samp{#t}, will make cgit generate a HTML +fragment suitable for embedding in other HTML pages. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-commit-graph? +Flag which, when set to @samp{#t}, will make cgit print an ASCII-art +commit history graph to the left of the commit messages in the +repository log page. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-filter-overrides? +Flag which, when set to @samp{#t}, allows all filter settings to be +overridden in repository-specific cgitrc files. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-follow-links? +Flag which, when set to @samp{#t}, allows users to follow a file in the +log view. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-http-clone? +If set to @samp{#t}, cgit will act as an dumb HTTP endpoint for Git +clones. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-index-links? +Flag which, when set to @samp{#t}, will make cgit generate extra links +"summary", "commit", "tree" for each repo in the repository index. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-index-owner? +Flag which, when set to @samp{#t}, will make cgit display the owner of +each repo in the repository index. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-log-filecount? +Flag which, when set to @samp{#t}, will make cgit print the number of +modified files for each commit on the repository log page. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-log-linecount? +Flag which, when set to @samp{#t}, will make cgit print the number of +added and removed lines for each commit on the repository log page. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-remote-branches? +Flag which, when set to @code{#t}, will make cgit display remote +branches in the summary and refs views. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-subject-links? +Flag which, when set to @code{1}, will make cgit use the subject of the +parent commit as link text when generating links to parent commits in +commit view. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-html-serving? +Flag which, when set to @samp{#t}, will make cgit use the subject of the +parent commit as link text when generating links to parent commits in +commit view. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-tree-linenumbers? +Flag which, when set to @samp{#t}, will make cgit generate linenumber +links for plaintext blobs printed in the tree view. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean enable-git-config? +Flag which, when set to @samp{#f}, will allow cgit to use Git config to +set any repo specific settings. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string favicon +URL used as link to a shortcut icon for cgit. + +Defaults to @samp{"/favicon.ico"}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string footer +The content of the file specified with this option will be included +verbatim at the bottom of all pages (i.e. it replaces the standard +"generated by..." message). + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string head-include +The content of the file specified with this option will be included +verbatim in the HTML HEAD section on all pages. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string header +The content of the file specified with this option will be included +verbatim at the top of all pages. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string include +Name of a configfile to include before the rest of the current config- +file is parsed. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string index-header +The content of the file specified with this option will be included +verbatim above the repository index. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string index-info +The content of the file specified with this option will be included +verbatim below the heading on the repository index page. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean local-time? +Flag which, if set to @samp{#t}, makes cgit print commit and tag times +in the servers timezone. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string logo +URL which specifies the source of an image which will be used as a logo +on all cgit pages. + +Defaults to @samp{"/share/cgit/cgit.png"}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string logo-link +URL loaded when clicking on the cgit logo image. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string owner-filter +Command which will be invoked to format the Owner column of the main +page. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer max-atom-items +Number of items to display in atom feeds view. + +Defaults to @samp{10}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer max-commit-count +Number of entries to list per page in "log" view. + +Defaults to @samp{50}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer max-message-length +Number of commit message characters to display in "log" view. + +Defaults to @samp{80}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer max-repo-count +Specifies the number of entries to list per page on the repository index +page. + +Defaults to @samp{50}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer max-repodesc-length +Specifies the maximum number of repo description characters to display +on the repository index page. + +Defaults to @samp{80}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer max-blob-size +Specifies the maximum size of a blob to display HTML for in KBytes. + +Defaults to @samp{0}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string max-stats +Maximum statistics period. Valid values are @samp{week},@samp{month}, +@samp{quarter} and @samp{year}. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} mimetype-alist mimetype +Mimetype for the specified filename extension. + +Defaults to @samp{((gif "image/gif") (html "text/html") (jpg +"image/jpeg") (jpeg "image/jpeg") (pdf "application/pdf") (png +"image/png") (svg "image/svg+xml"))}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string mimetype-file +Specifies the file to use for automatic mimetype lookup. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string module-link +Text which will be used as the formatstring for a hyperlink when a +submodule is printed in a directory listing. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean nocache? +If set to the value @samp{#t} caching will be disabled. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean noplainemail? +If set to @samp{#t} showing full author email addresses will be +disabled. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean noheader? +Flag which, when set to @samp{#t}, will make cgit omit the standard +header on all pages. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string readme +Text which will be used as default value for @code{cgit-repo-readme}. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean remove-suffix? +If set to @code{#t} and @code{repository-directory} is enabled, if any +repositories are found with a suffix of @code{.git}, this suffix will be +removed for the URL and name. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer renamelimit +Maximum number of files to consider when detecting renames. + +Defaults to @samp{-1}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string repository-sort +The way in which repositories in each section are sorted. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} robots-list robots +Text used as content for the @code{robots} meta-tag. + +Defaults to @samp{("noindex" "nofollow")}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string root-desc +Text printed below the heading on the repository index page. + +Defaults to @samp{"a fast webinterface for the git dscm"}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string root-readme +The content of the file specified with this option will be included +verbatim below thef "about" link on the repository index page. -@table @asis -@item @code{config-file} (default: @code{(cgit-configuration-file)}) -The configuration file to use for Cgit. This can be set to a -@dfn{cgit-configuration-file} record value, or any gexp -(@pxref{G-Expressions}). +Defaults to @samp{""}. -For example, to instead use a local file, the @code{local-file} function -can be used: +@end deftypevr -@example -(service cgit-service-type - (cgit-configuration - (config-file (local-file "./my-cgitrc.conf")))) -@end example +@deftypevr {@code{cgit-configuration} parameter} string root-title +Text printed as heading on the repository index page. -@item @code{package} (default: @code{cgit}) -The Cgit package to use. +Defaults to @samp{""}. -@end table -@end deftp +@end deftypevr -@deftp {Data Type} cgit-configuration-file -Data type representing the configuration options for Cgit. -This type has the following parameters: +@deftypevr {@code{cgit-configuration} parameter} boolean scan-hidden-path +If set to @samp{#t} and repository-directory is enabled, +repository-directory will recurse into directories whose name starts +with a period. Otherwise, repository-directory will stay away from such +directories, considered as "hidden". Note that this does not apply to +the ".git" directory in non-bare repos. -@table @asis -@item @code{css} (default: @code{"/share/cgit/cgit.css"}) -URL which specifies the css document to include in all Cgit pages. +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} list snapshots +Text which specifies the default set of snapshot formats that cgit +generates links for. + +Defaults to @samp{()}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} repository-directory repository-directory +Name of the directory to scan for repositories (represents +@code{scan-path}). + +Defaults to @samp{"/srv/git"}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string section +The name of the current repository section - all repositories defined +after this option will inherit the current section name. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string section-sort +Flag which, when set to @samp{1}, will sort the sections on the +repository listing by name. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer section-from-path +A number which, if defined prior to repository-directory, specifies how +many path elements from each repo path to use as a default section name. + +Defaults to @samp{0}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} boolean side-by-side-diffs? +If set to @samp{#t} shows side-by-side diffs instead of unidiffs per +default. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string source-filter +Specifies a command which will be invoked to format plaintext blobs in +the tree view. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer summary-branches +Specifies the number of branches to display in the repository "summary" +view. + +Defaults to @samp{10}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer summary-log +Specifies the number of log entries to display in the repository +"summary" view. + +Defaults to @samp{10}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} integer summary-tags +Specifies the number of tags to display in the repository "summary" +view. + +Defaults to @samp{10}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string strict-export +Filename which, if specified, needs to be present within the repository +for cgit to allow access to that repository. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} string virtual-root +URL which, if specified, will be used as root for all cgit links. + +Defaults to @samp{"/"}. + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} repository-cgit-configuration-list repositories +A list of @dfn{cgit-repo} records to use with config. + +Defaults to @samp{()}. + +Available @code{repository-cgit-configuration} fields are: + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-list snapshots +A mask of snapshot formats for this repo that cgit generates links for, +restricted by the global @code{snapshots} setting. + +Defaults to @samp{()}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string source-filter +Override the default @code{source-filter}. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string url +The relative URL used to access the repository. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string about-filter +Override the default @code{about-filter}. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string branch-sort +Flag which, when set to @samp{age}, enables date ordering in the branch +ref list, and when set to @samp{name} enables ordering by branch name. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-list clone-url +A list of URLs which can be used to clone repo. + +Defaults to @samp{()}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string commit-filter +Override the default @code{commit-filter}. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string commit-sort +Flag which, when set to @samp{date}, enables strict date ordering in the +commit log, and when set to @samp{topo} enables strict topological +ordering. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string defbranch +The name of the default branch for this repository. If no such branch +exists in the repository, the first branch name (when sorted) is used as +default instead. By default branch pointed to by HEAD, or "master" if +there is no suitable HEAD. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string desc +The value to show as repository description. + +Defaults to @samp{""}. -@item @code{logo} (default: @code{"/share/cgit/cgit.png"}) +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string homepage +The value to show as repository homepage. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string email-filter +Override the default @code{email-filter}. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-boolean enable-commit-graph? +A flag which can be used to disable the global setting +@code{enable-commit-graph?}. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-boolean enable-log-filecount? +A flag which can be used to disable the global setting +@code{enable-log-filecount?}. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-boolean enable-log-linecount? +A flag which can be used to disable the global setting +@code{enable-log-linecount?}. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-boolean enable-remote-branches? +Flag which, when set to @code{#t}, will make cgit display remote +branches in the summary and refs views. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-boolean enable-subject-links? +A flag which can be used to override the global setting +@code{enable-subject-links?}. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-boolean enable-html-serving? +A flag which can be used to override the global setting +@code{enable-html-serving?}. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-boolean hide? +Flag which, when set to @code{#t}, hides the repository from the +repository index. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-boolean ignore? +Flag which, when set to @samp{#t}, ignores the repository. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string logo URL which specifies the source of an image which will be used as a logo -on all Cgit pages. +on this repo’s pages. -@item @code{virtual-root} (default: @code{"/"}) -URL which, if specified, will be used as root for all Cgit links. +Defaults to @samp{""}. -@item @code{repository-directory} (default: @code{"/srv/git"}) -Name of the directory to scan for repositories. +@end deftypevr -@item @code{robots} (default: @code{(list "noindex" "nofollow")}) -Text used as content for the ``robots'' meta-tag. +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string logo-link +URL loaded when clicking on the cgit logo image. -@end table -@end deftp +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string owner-filter +Override the default @code{owner-filter}. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string module-link +Text which will be used as the formatstring for a hyperlink when a +submodule is printed in a directory listing. The arguments for the +formatstring are the path and SHA1 of the submodule commit. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} module-link-path module-link-path +Text which will be used as the formatstring for a hyperlink when a +submodule with the specified subdirectory path is printed in a directory +listing. + +Defaults to @samp{()}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string max-stats +Override the default maximum statistics period. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string name +The value to show as repository name. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string owner +A value used to identify the owner of the repository. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string path +An absolute path to the repository directory. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string readme +A path (relative to repo) which specifies a file to include verbatim as +the "About" page for this repo. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-string section +The name of the current repository section - all repositories defined +after this option will inherit the current section name. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{repository-cgit-configuration} parameter} repo-list extra-options +Extra options will be appended to cgitrc file. + +Defaults to @samp{()}. + +@end deftypevr + +@end deftypevr + +@deftypevr {@code{cgit-configuration} parameter} list extra-options +Extra options will be appended to cgitrc file. + +Defaults to @samp{()}. + +@end deftypevr + +@c %end of fragment + +However, it could be that you just want to get a @code{cgitrc} up and +running. In that case, you can pass an @code{opaque-cgit-configuration} +as a record to @code{cgit-service-type}. As its name indicates, an +opaque configuration does not have easy reflective capabilities. + +Available @code{opaque-cgit-configuration} fields are: + +@deftypevr {@code{opaque-cgit-configuration} parameter} package cgit +The cgit package. +@end deftypevr + +@deftypevr {@code{opaque-cgit-configuration} parameter} string string +The contents of the @code{cgitrc}, as a string. +@end deftypevr + +For example, if your @code{cgitrc} is just the empty string, you +could instantiate a cgit service like this: + +@example +(service cgit-service-type + (opaque-cgit-configuration + (cgitrc ""))) +@end example @node Setuid Programs @subsection Setuid Programs diff --git a/gnu/local.mk b/gnu/local.mk index bae3df5a6d..94ffbe1b53 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -454,6 +454,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/avahi.scm \ %D%/services/base.scm \ %D%/services/certbot.scm \ + %D%/services/cgit.scm \ %D%/services/configuration.scm \ %D%/services/cuirass.scm \ %D%/services/cups.scm \ diff --git a/gnu/services/cgit.scm b/gnu/services/cgit.scm new file mode 100644 index 0000000000..a868d758a4 --- /dev/null +++ b/gnu/services/cgit.scm @@ -0,0 +1,686 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2018 Oleg Pykhalov +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services cgit) + #:use-module (gnu packages admin) + #:use-module (gnu packages version-control) + #:use-module (gnu services base) + #:use-module (gnu services configuration) + #:use-module (gnu services shepherd) + #:use-module (gnu services web) + #:use-module (gnu services) + #:use-module (gnu system shadow) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:use-module (guix store) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:export (repository-cgit-configuration + cgit-configuration + %cgit-configuration-nginx + cgit-configuration-nginx-config + opaque-cgit-configuration + cgit-service-type)) + +;;; Commentary: +;;; +;;; This module provides a service definition for the Cgit a web frontend for +;;; Git repositories written in C. +;;; +;;; Note: fields of and +;;; should be specified in the specific order. +;;; +;;; Code: + +(define %cgit-configuration-nginx + (nginx-server-configuration + (root cgit) + (locations + (list + (nginx-location-configuration + (uri "@cgit") + (body '("fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi;" + "fastcgi_param PATH_INFO $uri;" + "fastcgi_param QUERY_STRING $args;" + "fastcgi_param HTTP_HOST $server_name;" + "fastcgi_pass 127.0.0.1:9000;"))))) + (try-files (list "$uri" "@cgit")) + (listen '("80")) + (ssl-certificate #f) + (ssl-certificate-key #f))) + + +;;; +;;; Serialize +;;; + +(define (uglify-field-name field-name) + (let ((str (symbol->string field-name))) + (string-join (string-split (string-delete #\? str) #\-) "-"))) + +(define (serialize-field field-name val) + (format #t "~a=~a\n" (uglify-field-name field-name) val)) + +(define (serialize-string field-name val) + (if (string=? val "") "" (serialize-field field-name val))) + +(define (serialize-boolean field-name val) + (serialize-field field-name (if val 1 0))) + +(define (serialize-list field-name val) + (if (null? val) "" (serialize-field field-name (string-join val)))) + +(define robots-list? list?) + +(define (serialize-robots-list field-name val) + (if (null? val) "" (serialize-field field-name (string-join val ", ")))) + +(define (integer? val) + (exact-integer? val)) + +(define (serialize-integer field-name val) + (serialize-field field-name val)) + +(define (serialize-repository-cgit-configuration x) + (serialize-configuration x repository-cgit-configuration-fields)) + +(define (repository-cgit-configuration-list? val) + (list? val)) + +(define (serialize-repository-cgit-configuration-list field-name val) + (for-each serialize-repository-cgit-configuration val)) + + +;;; +;;; Serialize +;;; + +(define (nginx-server-configuration-list? val) + (and (list? val) (and-map nginx-server-configuration? val))) + +(define (serialize-nginx-server-configuration-list field-name val) + #f) + + +;;; +;;; Serialize +;;; + +(define (serialize-repo-field field-name val) + (format #t "repo.~a=~a\n" (uglify-field-name field-name) val)) + +(define (serialize-repo-list field-name val) + (if (null? val) "" (serialize-repo-field field-name (string-join val)))) + +(define repo-boolean? boolean?) + +(define (serialize-repo-boolean field-name val) + (serialize-repo-field field-name (if val 1 0))) + +(define (serialize-repo-integer field-name val) + (serialize-repo-field field-name val)) + +(define repo-list? list?) + +(define repo-string? string?) + +(define (serialize-repo-string field-name val) + (if (string=? val "") "" (serialize-repo-field field-name val))) + +(define module-link-path? list?) + +(define (serialize-module-link-path field-name val) + (if (null? val) "" + (match val + ((path text) + (format #t "repo.~a.~a=~a\n" + (string-drop-right (uglify-field-name 'module-link-path) + (string-length "-path")) + path text))))) + +(define repository-directory? string?) + +(define (serialize-repository-directory _ val) + (if (string=? val "") "" (format #t "scan-path=~a\n" val))) + +(define mimetype-alist? list?) + +(define (serialize-mimetype-alist field-name val) + (format #t "# Mimetypes\n~a" + (string-join + (map (match-lambda + ((extension mimetype) + (format #f "mimetype.~a=~a" + (symbol->string extension) mimetype))) + val) "\n"))) + +(define-configuration repository-cgit-configuration + (snapshots + (repo-list '()) + "A mask of snapshot formats for this repo that cgit generates links for, +restricted by the global @code{snapshots} setting.") + (source-filter + (repo-string "") + "Override the default @code{source-filter}.") + (url + (repo-string "") + "The relative URL used to access the repository.") + (about-filter + (repo-string "") + "Override the default @code{about-filter}.") + (branch-sort + (repo-string "") + "Flag which, when set to @samp{age}, enables date ordering in the branch +ref list, and when set to @samp{name} enables ordering by branch name.") + (clone-url + (repo-list '()) + "A list of URLs which can be used to clone repo.") + (commit-filter + (repo-string "") + "Override the default @code{commit-filter}.") + (commit-sort + (repo-string "") + "Flag which, when set to @samp{date}, enables strict date ordering in the +commit log, and when set to @samp{topo} enables strict topological ordering.") + (defbranch + (repo-string "") + "The name of the default branch for this repository. If no such branch +exists in the repository, the first branch name (when sorted) is used as +default instead. By default branch pointed to by HEAD, or \"master\" if there +is no suitable HEAD.") + (desc + (repo-string "") + "The value to show as repository description.") + (homepage + (repo-string "") + "The value to show as repository homepage.") + (email-filter + (repo-string "") + "Override the default @code{email-filter}.") + (enable-commit-graph? + (repo-boolean #f) + "A flag which can be used to disable the global setting +@code{enable-commit-graph?}.") + (enable-log-filecount? + (repo-boolean #f) + "A flag which can be used to disable the global setting +@code{enable-log-filecount?}.") + (enable-log-linecount? + (repo-boolean #f) + "A flag which can be used to disable the global setting +@code{enable-log-linecount?}.") + (enable-remote-branches? + (repo-boolean #f) + "Flag which, when set to @code{#t}, will make cgit display remote +branches in the summary and refs views.") + (enable-subject-links? + (repo-boolean #f) + "A flag which can be used to override the global setting +@code{enable-subject-links?}.") + (enable-html-serving? + (repo-boolean #f) + "A flag which can be used to override the global setting +@code{enable-html-serving?}.") + (hide? + (repo-boolean #f) + "Flag which, when set to @code{#t}, hides the repository from the +repository index.") + (ignore? + (repo-boolean #f) + "Flag which, when set to @samp{#t}, ignores the repository.") + (logo + (repo-string "") + "URL which specifies the source of an image which will be used as a +logo on this repo’s pages.") + (logo-link + (repo-string "") + "URL loaded when clicking on the cgit logo image.") + (owner-filter + (repo-string "") + "Override the default @code{owner-filter}.") + (module-link + (repo-string "") + "Text which will be used as the formatstring for a hyperlink when a +submodule is printed in a directory listing. The arguments for the +formatstring are the path and SHA1 of the submodule commit.") + (module-link-path + (module-link-path '()) + "Text which will be used as the formatstring for a hyperlink when a +submodule with the specified subdirectory path is printed in a directory +listing.") + (max-stats + (repo-string "") + "Override the default maximum statistics period.") + (name + (repo-string "") + "The value to show as repository name.") + (owner + (repo-string "") + "A value used to identify the owner of the repository.") + (path + (repo-string "") + "An absolute path to the repository directory.") + (readme + (repo-string "") + "A path (relative to repo) which specifies a file to include verbatim +as the \"About\" page for this repo.") + (section + (repo-string "") + "The name of the current repository section - all repositories defined +after this option will inherit the current section name.") + (extra-options + (repo-list '()) + "Extra options will be appended to cgitrc file.")) + +;; Generate a record, which may include a list of +;; , , . +(define-configuration cgit-configuration + (package + (package cgit) + "The CGIT package.") + (nginx + (nginx-server-configuration-list (list %cgit-configuration-nginx)) + "NGINX configuration.") + (about-filter + (string "") + "Specifies a command which will be invoked to format the content of about +pages (both top-level and for each repository).") + (agefile + (string "") + "Specifies a path, relative to each repository path, which can be used to +specify the date and time of the youngest commit in the repository.") + (auth-filter + (string "") + "Specifies a command that will be invoked for authenticating repository +access.") + (branch-sort + (string "name") + "Flag which, when set to @samp{age}, enables date ordering in the branch +ref list, and when set @samp{name} enables ordering by branch name.") + (cache-root + (string "/var/cache/cgit") + "Path used to store the cgit cache entries.") + (cache-static-ttl + (integer -1) + "Number which specifies the time-to-live, in minutes, for the cached +version of repository pages accessed with a fixed SHA1.") + (cache-dynamic-ttl + (integer 5) + "Number which specifies the time-to-live, in minutes, for the cached +version of repository pages accessed without a fixed SHA1.") + (cache-repo-ttl + (integer 5) + "Number which specifies the time-to-live, in minutes, for the cached +version of the repository summary page.") + (cache-root-ttl + (integer 5) + "Number which specifies the time-to-live, in minutes, for the cached +version of the repository index page.") + (cache-scanrc-ttl + (integer 15) + "Number which specifies the time-to-live, in minutes, for the result of +scanning a path for Git repositories.") + (cache-about-ttl + (integer 15) + "Number which specifies the time-to-live, in minutes, for the cached +version of the repository about page.") + (cache-snapshot-ttl + (integer 5) + "Number which specifies the time-to-live, in minutes, for the cached +version of snapshots.") + (cache-size + (integer 0) + "The maximum number of entries in the cgit cache. When set to +@samp{0}, caching is disabled.") + (case-sensitive-sort? + (boolean #t) + "Sort items in the repo list case sensitively.") + (clone-prefix + (list '()) + "List of common prefixes which, when combined with a repository URL, +generates valid clone URLs for the repository.") + (clone-url + (list '()) + "List of @code{clone-url} templates.") + (commit-filter + (string "") + "Command which will be invoked to format commit messages.") + (commit-sort + (string "git log") + "Flag which, when set to @samp{date}, enables strict date ordering in the +commit log, and when set to @samp{topo} enables strict topological +ordering.") + (css + (string "/share/cgit/cgit.css") + "URL which specifies the css document to include in all cgit pages.") + (email-filter + (string "") + "Specifies a command which will be invoked to format names and email +address of committers, authors, and taggers, as represented in various +places throughout the cgit interface.") + (embedded? + (boolean #f) + "Flag which, when set to @samp{#t}, will make cgit generate a HTML +fragment suitable for embedding in other HTML pages.") + (enable-commit-graph? + (boolean #f) + "Flag which, when set to @samp{#t}, will make cgit print an ASCII-art +commit history graph to the left of the commit messages in the +repository log page.") + (enable-filter-overrides? + (boolean #f) + "Flag which, when set to @samp{#t}, allows all filter settings to be +overridden in repository-specific cgitrc files.") + (enable-follow-links? + (boolean #f) + "Flag which, when set to @samp{#t}, allows users to follow a file in the +log view.") + (enable-http-clone? + (boolean #t) + "If set to @samp{#t}, cgit will act as an dumb HTTP endpoint for Git +clones.") + (enable-index-links? + (boolean #f) + "Flag which, when set to @samp{#t}, will make cgit generate extra links +\"summary\", \"commit\", \"tree\" for each repo in the repository index.") + (enable-index-owner? + (boolean #t) + "Flag which, when set to @samp{#t}, will make cgit display the owner of +each repo in the repository index.") + (enable-log-filecount? + (boolean #f) + "Flag which, when set to @samp{#t}, will make cgit print the number of +modified files for each commit on the repository log page.") + (enable-log-linecount? + (boolean #f) + "Flag which, when set to @samp{#t}, will make cgit print the number of +added and removed lines for each commit on the repository log page.") + (enable-remote-branches? + (boolean #f) + "Flag which, when set to @code{#t}, will make cgit display remote +branches in the summary and refs views.") + (enable-subject-links? + (boolean #f) + "Flag which, when set to @code{1}, will make cgit use the subject of +the parent commit as link text when generating links to parent commits +in commit view.") + (enable-html-serving? + (boolean #f) + "Flag which, when set to @samp{#t}, will make cgit use the subject of the +parent commit as link text when generating links to parent commits in +commit view.") + (enable-tree-linenumbers? + (boolean #t) + "Flag which, when set to @samp{#t}, will make cgit generate linenumber +links for plaintext blobs printed in the tree view.") + (enable-git-config? + (boolean #f) + "Flag which, when set to @samp{#f}, will allow cgit to use Git config to +set any repo specific settings.") + (favicon + (string "/favicon.ico") + "URL used as link to a shortcut icon for cgit.") + (footer + (string "") + "The content of the file specified with this option will be included +verbatim at the bottom of all pages (i.e. it replaces the standard +\"generated by...\" message).") + (head-include + (string "") + "The content of the file specified with this option will be included +verbatim in the HTML HEAD section on all pages.") + (header + (string "") + "The content of the file specified with this option will be included +verbatim at the top of all pages.") + (include + (string "") + "Name of a configfile to include before the rest of the current config- +file is parsed.") + (index-header + (string "") + "The content of the file specified with this option will be included +verbatim above the repository index.") + (index-info + (string "") + "The content of the file specified with this option will be included +verbatim below the heading on the repository index page.") + (local-time? + (boolean #f) + "Flag which, if set to @samp{#t}, makes cgit print commit and tag times +in the servers timezone.") + (logo + (string "/share/cgit/cgit.png") + "URL which specifies the source of an image which will be used as a logo +on all cgit pages.") + (logo-link + (string "") + "URL loaded when clicking on the cgit logo image.") + (owner-filter + (string "") + "Command which will be invoked to format the Owner column of the main +page.") + (max-atom-items + (integer 10) + "Number of items to display in atom feeds view.") + (max-commit-count + (integer 50) + "Number of entries to list per page in \"log\" view.") + (max-message-length + (integer 80) + "Number of commit message characters to display in \"log\" view.") + (max-repo-count + (integer 50) + "Specifies the number of entries to list per page on the repository index +page.") + (max-repodesc-length + (integer 80) + "Specifies the maximum number of repo description characters to display +on the repository index page.") + (max-blob-size + (integer 0) + "Specifies the maximum size of a blob to display HTML for in KBytes.") + (max-stats + (string "") + "Maximum statistics period. Valid values are @samp{week},@samp{month}, +@samp{quarter} and @samp{year}.") + (mimetype + (mimetype-alist '((gif "image/gif") + (html "text/html") + (jpg "image/jpeg") + (jpeg "image/jpeg") + (pdf "application/pdf") + (png "image/png") + (svg "image/svg+xml"))) + "Mimetype for the specified filename extension.") + (mimetype-file + (string "") + "Specifies the file to use for automatic mimetype lookup.") + (module-link + (string "") + "Text which will be used as the formatstring for a hyperlink when a +submodule is printed in a directory listing.") + (nocache? + (boolean #f) + "If set to the value @samp{#t} caching will be disabled.") + (noplainemail? + (boolean #f) + "If set to @samp{#t} showing full author email addresses will be +disabled.") + (noheader? + (boolean #f) + "Flag which, when set to @samp{#t}, will make cgit omit the standard +header on all pages.") + ;; TODO: cgit expects a file name + ;; that should be created from a list of strings provided by the user. + ;; + ;; (project-list + ;; (string "") + ;; "A list of subdirectories inside of @code{repository-directory}, + ;; relative to it, that should loaded as Git repositories.") + (readme + (string "") + "Text which will be used as default value for @code{cgit-repo-readme}.") + (remove-suffix? + (boolean #f) + "If set to @code{#t} and @code{repository-directory} is enabled, if any +repositories are found with a suffix of @code{.git}, this suffix will be +removed for the URL and name.") + (renamelimit + (integer -1) + "Maximum number of files to consider when detecting renames.") + (repository-sort + (string "") + "The way in which repositories in each section are sorted.") + (robots + (robots-list (list "noindex" "nofollow")) + "Text used as content for the @code{robots} meta-tag.") + (root-desc + (string "a fast webinterface for the git dscm") + "Text printed below the heading on the repository index page.") + (root-readme + (string "") + "The content of the file specified with this option will be included +verbatim below thef \"about\" link on the repository index page.") + (root-title + (string "") + "Text printed as heading on the repository index page.") + (scan-hidden-path + (boolean #f) + "If set to @samp{#t} and repository-directory is enabled, +repository-directory will recurse into directories whose name starts with a +period. Otherwise, repository-directory will stay away from such directories, +considered as \"hidden\". Note that this does not apply to the \".git\" +directory in non-bare repos.") + (snapshots + (list '()) + "Text which specifies the default set of snapshot formats that cgit +generates links for.") + (repository-directory + (repository-directory "/srv/git") + "Name of the directory to scan for repositories (represents +@code{scan-path}).") + (section + (string "") + "The name of the current repository section - all repositories defined +after this option will inherit the current section name.") + (section-sort + (string "") + "Flag which, when set to @samp{1}, will sort the sections on the repository +listing by name.") + (section-from-path + (integer 0) + "A number which, if defined prior to repository-directory, specifies how +many path elements from each repo path to use as a default section name.") + (side-by-side-diffs? + (boolean #f) + "If set to @samp{#t} shows side-by-side diffs instead of unidiffs per +default.") + (source-filter + (string "") + "Specifies a command which will be invoked to format plaintext blobs in the +tree view.") + (summary-branches + (integer 10) + "Specifies the number of branches to display in the repository \"summary\" +view.") + (summary-log + (integer 10) + "Specifies the number of log entries to display in the repository +\"summary\" view.") + (summary-tags + (integer 10) + "Specifies the number of tags to display in the repository \"summary\" +view.") + (strict-export + (string "") + "Filename which, if specified, needs to be present within the repository +for cgit to allow access to that repository.") + (virtual-root + (string "/") + "URL which, if specified, will be used as root for all cgit links.") + (repositories + (repository-cgit-configuration-list '()) + "A list of @dfn{cgit-repo} records to use with config.") + (extra-options + (list '()) + "Extra options will be appended to cgitrc file.")) + +(define-configuration opaque-cgit-configuration + (cgit + (package cgit) + "The cgit package.") + (cgitrc + (string (configuration-missing-field 'opaque-cgit-configuration 'cgitrc)) + "The contents of the @code{cgitrc} to use.") + (cache-root + (string "/var/cache/cgit") + "Path used to store the cgit cache entries.") + (nginx + (nginx-server-configuration-list (list %cgit-configuration-nginx)) + "NGINX configuration.")) + +(define (cgit-activation config) + "Return the activation gexp for CONFIG." + (let* ((opaque-config? (opaque-cgit-configuration? config)) + (config-str + (if opaque-config? + (opaque-cgit-configuration-cgitrc config) + (with-output-to-string + (lambda () + (serialize-configuration config + cgit-configuration-fields)))))) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$(if opaque-config? + (opaque-cgit-configuration-cache-root config) + (cgit-configuration-cache-root config))) + (copy-file #$(plain-file "cgitrc" config-str) "/etc/cgitrc")))) + +(define (cgit-configuration-nginx-config config) + (if (opaque-cgit-configuration? config) + (opaque-cgit-configuration-nginx config) + (cgit-configuration-nginx config))) + +(define cgit-service-type + (service-type + (name 'cgit) + (extensions + (list (service-extension activation-service-type + cgit-activation) + (service-extension nginx-service-type + cgit-configuration-nginx-config) + + ;; Make sure fcgiwrap is instantiated. + (service-extension fcgiwrap-service-type + (const #t)))) + (default-value (cgit-configuration)) + (description + "Run the cgit web interface, which allows users to browse Git +repositories."))) + +(define (generate-cgit-documentation) + (generate-documentation + `((cgit-configuration + ,cgit-configuration-fields + (repositories repository-cgit-configuration)) + (repository-cgit-configuration + ,repository-cgit-configuration-fields)) + 'cgit-configuration)) diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 7166ed3d4f..afead87ec7 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -38,26 +38,6 @@ git-daemon-configuration git-daemon-configuration? - - cgit-configuration-file - cgit-configuration-file? - cgit-configuration-file-css - cgit-configuration-file-logo - cgit-configuration-file-robots - cgit-configuration-file-virtual-root - cgit-configuration-file-repository-directory - - - cgit-configuration - cgit-configuration? - cgit-configuration-config-file - cgit-configuration-package - - %cgit-configuration-nginx - cgit-configuration-nginx-config - - cgit-service-type - git-http-configuration git-http-configuration? git-http-nginx-location-configuration)) @@ -172,107 +152,6 @@ The optional @var{config} argument should be a access to exported repositories under @file{/srv/git}." (service git-daemon-service-type config)) - -;;; -;;; Cgit -;;; - -(define-record-type* - cgit-configuration-file - make-cgit-configuration-file - cgit-configuration-file? - (css cgit-configuration-file-css ; string - (default "/share/cgit/cgit.css")) - (logo cgit-configuration-file-logo ; string - (default "/share/cgit/cgit.png")) - (robots cgit-configuration-file-robots ; list - (default '("noindex" "nofollow"))) - (virtual-root cgit-configuration-file-virtual-root ; string - (default "/")) - (repository-directory cgit-configuration-file-repository-directory ; string - (default "/srv/git"))) - -(define (cgit-configuration-robots-string robots) - (string-join robots ", ")) - -(define-gexp-compiler (cgit-configuration-file-compiler - (file ) system target) - (match file - (($ css logo - robots virtual-root repository-directory) - (apply text-file* "cgitrc" - (letrec-syntax ((option (syntax-rules () - ((_ key value) - (if value - `(,key "=" ,value "\n") - '())))) - (key/value (syntax-rules () - ((_ (key value) rest ...) - (append (option key value) - (key/value rest ...))) - ((_) - '())))) - (key/value ("css" css) - ("logo" logo) - ("robots" (cgit-configuration-robots-string robots)) - ("virtual-root" virtual-root) - ("scan-path" repository-directory))))))) - -(define %cgit-configuration-nginx - (list - (nginx-server-configuration - (root cgit) - (locations - (list - (nginx-location-configuration - (uri "@cgit") - (body '("fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi;" - "fastcgi_param PATH_INFO $uri;" - "fastcgi_param QUERY_STRING $args;" - "fastcgi_param HTTP_HOST $server_name;" - "fastcgi_pass 127.0.0.1:9000;"))))) - (try-files (list "$uri" "@cgit")) - (listen '("80")) - (ssl-certificate #f) - (ssl-certificate-key #f)))) - -(define-record-type* - cgit-configuration make-cgit-configuration - cgit-configuration? - (config-file cgit-configuration-config-file - (default (cgit-configuration-file))) - (package cgit-configuration-package - (default cgit)) - (nginx cgit-configuration-nginx - (default %cgit-configuration-nginx))) - -(define (cgit-activation config) - ;; Cgit compiled with default configuration path - #~(begin - (use-modules (guix build utils)) - (mkdir-p "/var/cache/cgit") - (copy-file #$(cgit-configuration-config-file config) "/etc/cgitrc"))) - -(define (cgit-configuration-nginx-config config) - (cgit-configuration-nginx config)) - -(define cgit-service-type - (service-type - (name 'cgit) - (extensions - (list (service-extension activation-service-type - cgit-activation) - (service-extension nginx-service-type - cgit-configuration-nginx-config) - - ;; Make sure fcgiwrap is instantiated. - (service-extension fcgiwrap-service-type - (const #t)))) - (default-value (cgit-configuration)) - (description - "Run the Cgit web interface, which allows users to browse Git -repositories."))) - ;;; ;;; HTTP access. Add the result of calling diff --git a/gnu/tests/version-control.scm b/gnu/tests/version-control.scm index 9882cdbe28..8024739734 100644 --- a/gnu/tests/version-control.scm +++ b/gnu/tests/version-control.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017 Oleg Pykhalov +;;; Copyright © 2017, 2018 Oleg Pykhalov ;;; Copyright © 2017, 2018 Ludovic Courtès ;;; Copyright © 2017 Clément Lassieur ;;; @@ -26,6 +26,7 @@ #:use-module (gnu system vm) #:use-module (gnu services) #:use-module (gnu services version-control) + #:use-module (gnu services cgit) #:use-module (gnu services web) #:use-module (gnu services networking) #:use-module (gnu packages version-control) -- cgit 1.4.1 From 1143450c14edfd91a27f73844d9e46eb376d1b64 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 12 Feb 2018 11:08:54 +0100 Subject: gnu: dblatex: Update to 0.3.10. * gnu/packages/docbook.scm (dblatex): Update to 0.3.10. [source]: Remove patch. * gnu/packages/patches/dblatex-remove-multirow.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/docbook.scm | 6 ++--- gnu/packages/patches/dblatex-remove-multirow.patch | 30 ---------------------- 3 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 gnu/packages/patches/dblatex-remove-multirow.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 94ffbe1b53..68f3a20f6d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -610,7 +610,6 @@ dist_patch_DATA = \ %D%/packages/patches/cursynth-wave-rand.patch \ %D%/packages/patches/cvs-2017-12836.patch \ %D%/packages/patches/cyrus-sasl-CVE-2013-4122.patch \ - %D%/packages/patches/dblatex-remove-multirow.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ %D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \ diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index ed1e60a7a3..d56dc49198 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 Ludovic Courtès ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Mathieu Lirzin +;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -176,7 +177,7 @@ by no means limited to these applications.) This package provides XML DTDs.") (define-public dblatex (package (name "dblatex") - (version "0.3.9") + (version "0.3.10") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/dblatex/dblatex/" @@ -184,8 +185,7 @@ by no means limited to these applications.) This package provides XML DTDs.") version ".tar.bz2")) (sha256 (base32 - "0pdizc5rjywwzxa1qqhdmba5zr35pbmdwbysalsid7xw87w3kq06")) - (patches (search-patches "dblatex-remove-multirow.patch")))) + "1yicd861rqz78i2khl35j7nvc0ccv4jx4hzqrbhll17082vrdmkg")))) (build-system python-build-system) ;; TODO: Add xfig/transfig for fig2dev utility (inputs diff --git a/gnu/packages/patches/dblatex-remove-multirow.patch b/gnu/packages/patches/dblatex-remove-multirow.patch deleted file mode 100644 index 62d1c64e08..0000000000 --- a/gnu/packages/patches/dblatex-remove-multirow.patch +++ /dev/null @@ -1,30 +0,0 @@ -This patch is needed to fix dblatex with newer versions of TeX Live. -It was taken from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840189 - ---- a/latex/style/dbk_table.sty Sun Oct 02 23:21:03 2016 +0200 -+++ b/latex/style/dbk_table.sty Mon Oct 10 21:31:00 2016 +0200 -@@ -9,7 +9,6 @@ - \usepackage{longtable} - \usepackage{lscape} - \usepackage{colortbl} --\usepackage{multirow} - \usepackage{calc} - \usepackage{hhline} - -@@ -21,16 +20,6 @@ - \expandafter[\expandafter3\expandafter]\expandafter{% - \multicolumn{#1}{#2}{#3}} - --% Make \@xmultirow long --\expandafter\long\expandafter\def% --\expandafter\@xmultirow% --\expandafter#\expandafter1% --\expandafter[\expandafter#\expandafter2\expandafter]% --\expandafter#\expandafter3% --\expandafter[\expandafter#\expandafter4\expandafter]% --\expandafter#\expandafter5% --\expandafter{\@xmultirow{#1}[#2]{#3}[#4]{#5}} -- - % For the newtbl code - \newdimen\newtblstarfactor% - \newdimen\newtblsparewidth% -- cgit 1.4.1 From b39667cdcb2cbcf98d9fa94101c47731ca7b6394 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 27 Feb 2018 22:19:31 +0100 Subject: gnu: python-mox3: Update to 0.24.0. * gnu/packages/openstack.scm (python-mox3): Update to 0.24.0. [source](patches): New field. [arguments]: Remove. [native-inputs]: Add PYTHON-OPENSTACKDOCSTHEME and PYTHON-SUBUNIT. Replace PYTHON-SPHINX with PYTHON-SPHINX-1.6. Move PYTHON-PBR and PYTHON-FIXTURES ... [propagated-inputs]: ... here. New field. [description]: Don't mention explicit Python versions. * gnu/packages/patches/python-mox3-python3.6-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/openstack.scm | 23 ++++++------ .../patches/python-mox3-python3.6-compat.patch | 43 ++++++++++++++++++++++ 3 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/python-mox3-python3.6-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 68f3a20f6d..24368727f2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1036,6 +1036,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-scikit-learn-fix-test-non-determinism.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ %D%/packages/patches/python-faker-fix-build-32bit.patch \ + %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-paste-remove-website-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pygit2-disable-network-tests.patch \ diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm index 0d1d69945e..be1927dbe8 100644 --- a/gnu/packages/openstack.scm +++ b/gnu/packages/openstack.scm @@ -21,6 +21,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages openstack) + #:use-module (gnu packages) #:use-module (gnu packages check) #:use-module (gnu packages gnupg) #:use-module (gnu packages python) @@ -156,31 +157,31 @@ guidelines}.") (define-public python-mox3 (package (name "python-mox3") - (version "0.14.0") + (version "0.24.0") (source (origin (method url-fetch) (uri (pypi-uri "mox3" version)) + (patches (search-patches "python-mox3-python3.6-compat.patch")) (sha256 (base32 - "0njmh40i1lg5mzn9hc2ax83adj6dli455j6xifilrw27c4wlkjzx")))) + "0w58adwv7q9wzvmq9mlrk2asfk73myq9fpwy7mjkzsz3baa95zf5")))) (build-system python-build-system) - (arguments - ;; TODO: Resolve dependency cycle and re-enable. - '(#:tests? #f)) + (propagated-inputs + `(("python-fixtures" ,python-fixtures) + ("python-pbr" ,python-pbr))) (native-inputs - `(("python-fixtures" ,python-fixtures) - ; TODO re-add ("python-oslosphinx" ,python-oslosphinx) - ("python-pbr" ,python-pbr) - ("python-sphinx" ,python-sphinx) + `(("python-openstackdocstheme" ,python-openstackdocstheme) + ("python-sphinx" ,python-sphinx-1.6) + ("python-subunit" ,python-subunit) + ("python-testrepository" ,python-testrepository) ("python-testtools" ,python-testtools))) (home-page "https://www.openstack.org/") (synopsis "Mock object framework for Python") (description "Mox3 is an unofficial port of the @uref{https://code.google.com/p/pymox/, Google mox framework} to Python 3. It was meant to be as compatible -with mox as possible, but small enhancements have been made. The library was -tested on Python versions 3.2, 2.7, and 2.6.") +with mox as possible, but small enhancements have been made.") (license asl2.0))) (define-public python2-mox3 diff --git a/gnu/packages/patches/python-mox3-python3.6-compat.patch b/gnu/packages/patches/python-mox3-python3.6-compat.patch new file mode 100644 index 0000000000..0426d07cf9 --- /dev/null +++ b/gnu/packages/patches/python-mox3-python3.6-compat.patch @@ -0,0 +1,43 @@ +Fix regex so that it works with Python 3.6. + +See . + +Copied from upstream bug report: +https://bugs.launchpad.net/python-mox3/+bug/1665266 + +From 05064cdb6ea7a16450c6beae2b6f7c6074212a69 Mon Sep 17 00:00:00 2001 +From: Zac Medico +Date: Thu, 16 Feb 2017 00:24:10 -0800 +Subject: [PATCH] RegexTest: python3.6 compatibility + +These fixes are backward-compatible with older python versions: + +* raw strings fix invalid escape sequences +* flags=8 fixes ValueError: cannot use LOCALE flag with a str pattern +--- + mox3/tests/test_mox.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/mox3/tests/test_mox.py b/mox3/tests/test_mox.py +index 15ac565..3a1af17 100644 +--- a/mox3/tests/test_mox.py ++++ b/mox3/tests/test_mox.py +@@ -312,12 +312,12 @@ class RegexTest(testtools.TestCase): + def testReprWithoutFlags(self): + """repr should return the regular expression pattern.""" + self.assertTrue( +- repr(mox.Regex(r"a\s+b")) == "") ++ repr(mox.Regex(r"a\s+b")) == r"") + + def testReprWithFlags(self): + """repr should return the regular expression pattern and flags.""" +- self.assertTrue(repr(mox.Regex(r"a\s+b", flags=4)) == +- "") ++ self.assertTrue(repr(mox.Regex(r"a\s+b", flags=8)) == ++ r"") + + + class IsTest(testtools.TestCase): +-- +2.10.2 + -- cgit 1.4.1 From 53453d7acc516fb806f81589e0fa3daf4a6349bf Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 28 Feb 2018 20:29:46 +0100 Subject: gnu: wavpack: Fix CVE-2018-6767. * gnu/packages/patches/wavpack-CVE-2018-6767.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/audio.scm (wavpack)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/audio.scm | 3 +- gnu/packages/patches/wavpack-CVE-2018-6767.patch | 119 +++++++++++++++++++++++ 3 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/wavpack-CVE-2018-6767.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 24368727f2..9cc00b844c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1142,6 +1142,7 @@ dist_patch_DATA = \ %D%/packages/patches/vsearch-unbundle-cityhash.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ + %D%/packages/patches/wavpack-CVE-2018-6767.patch \ %D%/packages/patches/wavpack-CVE-2018-7253.patch \ %D%/packages/patches/wavpack-CVE-2018-7254.patch \ %D%/packages/patches/weechat-python.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 369af141fa..1cf6441df0 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -2378,7 +2378,8 @@ stretching and pitch scaling of audio. This package contains the library.") (method url-fetch) (uri (string-append "http://www.wavpack.com/" name "-" version ".tar.bz2")) - (patches (search-patches "wavpack-CVE-2018-7253.patch" + (patches (search-patches "wavpack-CVE-2018-6767.patch" + "wavpack-CVE-2018-7253.patch" "wavpack-CVE-2018-7254.patch")) (sha256 (base32 diff --git a/gnu/packages/patches/wavpack-CVE-2018-6767.patch b/gnu/packages/patches/wavpack-CVE-2018-6767.patch new file mode 100644 index 0000000000..f49a8f0fd6 --- /dev/null +++ b/gnu/packages/patches/wavpack-CVE-2018-6767.patch @@ -0,0 +1,119 @@ +Fix CVE-2018-6767: +https://nvd.nist.gov/vuln/detail/CVE-2018-6767 +https://security-tracker.debian.org/tracker/CVE-2018-6767 + +Patch copied from upstream source repository: +https://github.com/dbry/WavPack/commit/d5bf76b5a88d044a1be1d5656698e3ba737167e5 + +From d5bf76b5a88d044a1be1d5656698e3ba737167e5 Mon Sep 17 00:00:00 2001 +From: David Bryant +Date: Sun, 4 Feb 2018 11:28:15 -0800 +Subject: [PATCH] issue #27, do not overwrite stack on corrupt RF64 file + +--- + cli/riff.c | 39 ++++++++++++++++++++++++++++++++------- + 1 file changed, 32 insertions(+), 7 deletions(-) + +diff --git a/cli/riff.c b/cli/riff.c +index 8b1af45..de98c1e 100644 +--- a/cli/riff.c ++++ b/cli/riff.c +@@ -42,6 +42,7 @@ typedef struct { + + #pragma pack(pop) + ++#define CS64ChunkFormat "4D" + #define DS64ChunkFormat "DDDL" + + #define WAVPACK_NO_ERROR 0 +@@ -101,13 +102,13 @@ int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack + + if (!strncmp (chunk_header.ckID, "ds64", 4)) { + if (chunk_header.ckSize < sizeof (DS64Chunk) || +- !DoReadFile (infile, &ds64_chunk, chunk_header.ckSize, &bcount) || +- bcount != chunk_header.ckSize) { ++ !DoReadFile (infile, &ds64_chunk, sizeof (DS64Chunk), &bcount) || ++ bcount != sizeof (DS64Chunk)) { + error_line ("%s is not a valid .WAV file!", infilename); + return WAVPACK_SOFT_ERROR; + } + else if (!(config->qmode & QMODE_NO_STORE_WRAPPER) && +- !WavpackAddWrapper (wpc, &ds64_chunk, chunk_header.ckSize)) { ++ !WavpackAddWrapper (wpc, &ds64_chunk, sizeof (DS64Chunk))) { + error_line ("%s", WavpackGetErrorMessage (wpc)); + return WAVPACK_SOFT_ERROR; + } +@@ -315,10 +316,11 @@ int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack + + int WriteRiffHeader (FILE *outfile, WavpackContext *wpc, int64_t total_samples, int qmode) + { +- int do_rf64 = 0, write_junk = 1; ++ int do_rf64 = 0, write_junk = 1, table_length = 0; + ChunkHeader ds64hdr, datahdr, fmthdr; + RiffChunkHeader riffhdr; + DS64Chunk ds64_chunk; ++ CS64Chunk cs64_chunk; + JunkChunk junkchunk; + WaveHeader wavhdr; + uint32_t bcount; +@@ -380,6 +382,7 @@ int WriteRiffHeader (FILE *outfile, WavpackContext *wpc, int64_t total_samples, + strncpy (riffhdr.formType, "WAVE", sizeof (riffhdr.formType)); + total_riff_bytes = sizeof (riffhdr) + wavhdrsize + sizeof (datahdr) + ((total_data_bytes + 1) & ~(int64_t)1); + if (do_rf64) total_riff_bytes += sizeof (ds64hdr) + sizeof (ds64_chunk); ++ total_riff_bytes += table_length * sizeof (CS64Chunk); + if (write_junk) total_riff_bytes += sizeof (junkchunk); + strncpy (fmthdr.ckID, "fmt ", sizeof (fmthdr.ckID)); + strncpy (datahdr.ckID, "data", sizeof (datahdr.ckID)); +@@ -394,11 +397,12 @@ int WriteRiffHeader (FILE *outfile, WavpackContext *wpc, int64_t total_samples, + + if (do_rf64) { + strncpy (ds64hdr.ckID, "ds64", sizeof (ds64hdr.ckID)); +- ds64hdr.ckSize = sizeof (ds64_chunk); ++ ds64hdr.ckSize = sizeof (ds64_chunk) + (table_length * sizeof (CS64Chunk)); + CLEAR (ds64_chunk); + ds64_chunk.riffSize64 = total_riff_bytes; + ds64_chunk.dataSize64 = total_data_bytes; + ds64_chunk.sampleCount64 = total_samples; ++ ds64_chunk.tableLength = table_length; + riffhdr.ckSize = (uint32_t) -1; + datahdr.ckSize = (uint32_t) -1; + WavpackNativeToLittleEndian (&ds64hdr, ChunkHeaderFormat); +@@ -409,6 +413,14 @@ int WriteRiffHeader (FILE *outfile, WavpackContext *wpc, int64_t total_samples, + datahdr.ckSize = (uint32_t) total_data_bytes; + } + ++ // this "table" is just a dummy placeholder for testing (normally not written) ++ ++ if (table_length) { ++ strncpy (cs64_chunk.ckID, "dmmy", sizeof (cs64_chunk.ckID)); ++ cs64_chunk.chunkSize64 = 12345678; ++ WavpackNativeToLittleEndian (&cs64_chunk, CS64ChunkFormat); ++ } ++ + // write the RIFF chunks up to just before the data starts + + WavpackNativeToLittleEndian (&riffhdr, ChunkHeaderFormat); +@@ -418,8 +430,21 @@ int WriteRiffHeader (FILE *outfile, WavpackContext *wpc, int64_t total_samples, + + if (!DoWriteFile (outfile, &riffhdr, sizeof (riffhdr), &bcount) || bcount != sizeof (riffhdr) || + (do_rf64 && (!DoWriteFile (outfile, &ds64hdr, sizeof (ds64hdr), &bcount) || bcount != sizeof (ds64hdr))) || +- (do_rf64 && (!DoWriteFile (outfile, &ds64_chunk, sizeof (ds64_chunk), &bcount) || bcount != sizeof (ds64_chunk))) || +- (write_junk && (!DoWriteFile (outfile, &junkchunk, sizeof (junkchunk), &bcount) || bcount != sizeof (junkchunk))) || ++ (do_rf64 && (!DoWriteFile (outfile, &ds64_chunk, sizeof (ds64_chunk), &bcount) || bcount != sizeof (ds64_chunk)))) { ++ error_line ("can't write .WAV data, disk probably full!"); ++ return FALSE; ++ } ++ ++ // again, this is normally not written except for testing ++ ++ while (table_length--) ++ if (!DoWriteFile (outfile, &cs64_chunk, sizeof (cs64_chunk), &bcount) || bcount != sizeof (cs64_chunk)) { ++ error_line ("can't write .WAV data, disk probably full!"); ++ return FALSE; ++ } ++ ++ ++ if ((write_junk && (!DoWriteFile (outfile, &junkchunk, sizeof (junkchunk), &bcount) || bcount != sizeof (junkchunk))) || + !DoWriteFile (outfile, &fmthdr, sizeof (fmthdr), &bcount) || bcount != sizeof (fmthdr) || + !DoWriteFile (outfile, &wavhdr, wavhdrsize, &bcount) || bcount != wavhdrsize || + !DoWriteFile (outfile, &datahdr, sizeof (datahdr), &bcount) || bcount != sizeof (datahdr)) { -- cgit 1.4.1 From 9d43579f2d7d517de3a67c41b2429b467c651514 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 28 Feb 2018 22:57:04 +0100 Subject: gnu: dovecot: Update to 2.3.0.1 [fixes CVE-2017-14461]. * gnu/packages/mail.scm (dovecot): Update to 2.3.0.1. [source]: Remove upstreamed patch. * gnu/packages/patches/dovecot-CVE-2017-15132.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/mail.scm | 5 ++-- gnu/packages/patches/dovecot-CVE-2017-15132.patch | 36 ----------------------- 3 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 gnu/packages/patches/dovecot-CVE-2017-15132.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9cc00b844c..3d0bd38e50 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -618,7 +618,6 @@ dist_patch_DATA = \ %D%/packages/patches/docbook-xsl-nonrecursive-string-subst.patch \ %D%/packages/patches/doc++-include-directives.patch \ %D%/packages/patches/doc++-segfault-fix.patch \ - %D%/packages/patches/dovecot-CVE-2017-15132.patch \ %D%/packages/patches/doxygen-test.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ %D%/packages/patches/eigen-arm-neon-fixes.patch \ diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 9fbfddbec1..8d3544f908 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1180,16 +1180,15 @@ facilities for checking incoming mail.") (define-public dovecot (package (name "dovecot") - (version "2.3.0") + (version "2.3.0.1") (source (origin (method url-fetch) (uri (string-append "https://www.dovecot.org/releases/" (version-major+minor version) "/" name "-" version ".tar.gz")) - (patches (search-patches "dovecot-CVE-2017-15132.patch")) (sha256 (base32 - "10c5myzgys866c3x6jdr1s9x9pqnjd5vpyz8z384sph21m3wnq6y")))) + "0lzisrdgrj5qqwjb7bv99mf2aljm568r6g108yisp0s644z2nxxb")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/patches/dovecot-CVE-2017-15132.patch b/gnu/packages/patches/dovecot-CVE-2017-15132.patch deleted file mode 100644 index 32666b8557..0000000000 --- a/gnu/packages/patches/dovecot-CVE-2017-15132.patch +++ /dev/null @@ -1,36 +0,0 @@ -Fix CVE-2017-15132: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-15132 - -Patch copied from upstream source repository: - -https://github.com/dovecot/core/commit/1a29ed2f96da1be22fa5a4d96c7583aa81b8b060 - -From 1a29ed2f96da1be22fa5a4d96c7583aa81b8b060 Mon Sep 17 00:00:00 2001 -From: Timo Sirainen -Date: Mon, 18 Dec 2017 16:50:51 +0200 -Subject: [PATCH] lib-auth: Fix memory leak in auth_client_request_abort() - -This caused memory leaks when authentication was aborted. For example -with IMAP: - -a AUTHENTICATE PLAIN -* - -Broken by 9137c55411aa39d41c1e705ddc34d5bd26c65021 ---- - src/lib-auth/auth-client-request.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/lib-auth/auth-client-request.c b/src/lib-auth/auth-client-request.c -index 480fb42b30..046f7c307d 100644 ---- a/src/lib-auth/auth-client-request.c -+++ b/src/lib-auth/auth-client-request.c -@@ -186,6 +186,7 @@ void auth_client_request_abort(struct auth_client_request **_request) - - auth_client_send_cancel(request->conn->client, request->id); - call_callback(request, AUTH_REQUEST_STATUS_ABORT, NULL, NULL); -+ pool_unref(&request->pool); - } - - unsigned int auth_client_request_get_id(struct auth_client_request *request) -- cgit 1.4.1