aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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 <http://www.gnu.org/licenses/>.

;;;
;;; Validate 'etc/news.scm'.
;;;

(use-modules (git)
             (guix git)
             (guix ui)
             (guix channels)
             (srfi srfi-26)
             (ice-9 match))

;; XXX: These two things are currently private.
(define read-channel-news (@@ (guix channels) read-channel-news))
(define channel-news-entries (cut struct-ref <> 0))

(define (all-the-news directory)
  "Return the <channel-news> read from DIRECTORY, a checkout of the 'guix'
channel."
  (call-with-input-file (string-append directory "/etc/news.scm")
    read-channel-news))

(define (validate-texinfo str type language)
  "Parse STR as a Texinfo fragment and raise an error if that fails."
  (catch #t
    (lambda ()
      (texi->plain-text str))
    (lambda (key . args)
      (print-exception (current-error-port) #f key args)
      (report-error (G_ "the Texinfo snippet below is invalid (~a, ~a):~%")
                    type language)
      (display str (current-error-port))
      (exit 1))))

(define (validate-news-entry repository entry)
  "Validate ENTRY, a <channel-news-entry>, making sure it refers to an
existent commit of REPOSITORY and contains only valid Texinfo."
  (catch 'git-error
    (lambda ()
      (let ((commit (commit-lookup repository
                                   (string->oid
                                    (channel-news-entry-commit entry)))))
        (for-each (match-lambda
                    ((language . title)
                     (validate-texinfo title 'title language)))
                  (channel-news-entry-title entry))
        (for-each (match-lambda
                    ((language . body)
                     (validate-texinfo body 'body language)))
                  (channel-news-entry-body entry))))
    (lambda (key error . rest)
      (if (= GIT_ENOTFOUND (git-error-code error))
          (leave (G_ "commit '~a' of entry '~a' does not exist~%")
                 (channel-news-entry-commit entry)
                 (channel-news-entry-title entry))
          (apply throw key error rest)))))

(let* ((this-directory (dirname (current-filename)))
       (top-directory  (string-append this-directory "/.."))
       (entries        (channel-news-entries (all-the-news top-directory))))
  (with-repository top-directory repository
    (for-each (cut validate-news-entry repository <>)
              entries)
    (info (G_ "All ~a channel news entries are valid.~%")
          (length entries))))
cm, gnu/packages/haskell-check.scm, gnu/packages/haskell-crypto.scm, gnu/packages/haskell.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/language.scm, gnu/packages/libcanberra.scm, gnu/packages/linux.scm, gnu/packages/lisp.scm, gnu/packages/lolcode.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/mc.scm, gnu/packages/messaging.scm, gnu/packages/music.scm, gnu/packages/ncurses.scm, gnu/packages/networking.scm, gnu/packages/nickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm, gnu/packages/perl-check.scm, gnu/packages/perl.scm, gnu/packages/python-compression.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm, gnu/packages/telephony.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm, gnu/services/desktop.scm, gnu/services/version-control.scm, gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm: Correct name and email address for ng0. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> 2019-03-07gnu: libmicrohttpd: Enable parallel tests.Efraim Flashner * gnu/packages/gnunet.scm (libmicrohttpd)[arguments]: Don't disable parallel tests. 2019-03-07gnu: libmicrohttpd: Update to 0.9.63.Efraim Flashner * gnu/packages/gnunet.scm (libmicrohttpd): Update to 0.9.63. [arguments]: Remove custom phase to add missing LDFLAGS. 2019-01-16gnu: gnurl: Add properties for updater.Efraim Flashner * gnu/packages/gnunet.scm (gnurl)[properties]: New field. 2019-01-16gnu: Move sqlite to separate module.Ricardo Wurmus * gnu/packages/databases.scm (sqlite, sqlite-3.26.0, sqlite-with-fts5, sqlite-with-column-metadata): Move variables from here... * gnu/packages/sqlite.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/apl.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/code.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/dc.scm, gnu/packages/disk.scm, gnu/packages/ebook.scm, gnu/packages/education.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/file-systems.scm, gnu/packages/freedesktop.scm, gnu/packages/ftp.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/gps.scm, gnu/packages/guile.scm, gnu/packages/ibus.scm, gnu/packages/kerberos.scm, gnu/packages/kodi.scm, gnu/packages/lisp.scm, gnu/packages/mail.scm, gnu/packages/messaging.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nfs.scm, gnu/packages/ocaml.scm, gnu/packages/package-management.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/php.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/scheme.scm, gnu/packages/sync.scm, gnu/packages/syndication.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/web-browsers.scm, gnu/packages/webkit.scm: Adjust module references. 2019-01-14gnu: gnurl: Update to 7.63.0.Efraim Flashner * gnu/packages/gnunet.scm (gnurl): Update to 7.63.0. 2019-01-04gnu: guile-gnunet: Update to 0.0-1.d12167a.Alex Vong * gnu/packages/gnunet.scm (guile-gnunet): Update to 0.0-1.d12167a. [version]: Use git-version. [source]: Use git-file-name. 2019-01-04gnu: libmicrohttpd: Update to 0.9.62.Alex Vong * gnu/packages/gnunet.scm (libmicrohttpd): Update to 0.9.62. 2019-01-04gnu: libextractor: Fix CVE-2018-{20430,20431}.Alex Vong * gnu/packages/patches/libextractor-CVE-2018-20430.patch, gnu/packages/patches/libextractor-CVE-2018-20431.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/gnunet.scm (libextractor)[source]: Use them. 2019-01-04gnu: libextractor: Update to 1.8.Alex Vong * gnu/packages/gnunet.scm (libextractor): Update to 1.8. 2018-11-29gnu: gnurl: Update to 7.62.0.ng0 * gnu/packages/gnunet.scm: Update to 7.62.0. Signed-off-by: ng0 <ng0@n0.is> Signed-off-by: Marius Bakke <mbakke@fastmail.com> 2018-09-12gnu: gnurl: Update to 7.61.1.Nils Gillmann * gnu/packages/gnunet.scm (gnurl): Update to 7.61.1. Signed-off-by: Leo Famulari <leo@famulari.name> 2018-08-06gnu: gnurl: Update to 7.61.0.Nils Gillmann * gnu/packages/gnunet.scm (gnurl): Update to 7.61.0. 2018-07-18gnu: libextractor: Update to 1.7.Marius Bakke * gnu/packages/gnunet.scm (libextractor): Update to 1.7. 2018-05-27Merge branch 'master' into core-updatesMark H Weaver 2018-05-24gnu: gnurl: Update to 7.60.0.Nils Gillmann * gnu/packages/gnunet.scm (gnurl): Update to 7.60.0. Signed-off-by: Leo Famulari <leo@famulari.name> 2018-04-30Merge branch 'master' into core-updatesMark H Weaver 2018-04-23gnu: ffmpeg: Update to 4.0.Rutger Helling * gnu/packages/video.scm (ffmpeg): Update to 4.0. * gnu/packages/video.scm (ffmpeg@3.4): New variable. * gnu/packages/video.scm (ffmpeg-git): Remove variable. * gnu/packages/video.scm (mpv)[inputs]: Build with ffmpeg instead of ffmpeg-git. * gnu/packages/gstreamer.scm (gst-libav)[inputs]: Build with ffmpeg@3.4 instead of ffmpeg. * gnu/packages/messaging.scm (qtox)[inputs]: Build with ffmpeg@3.4 instead of ffmpeg. * gnu/packages/emulators.scm (dolphin-emu)[inputs]: Build with ffmpeg@3.4 instead of ffmpeg. * gnu/packages/gnunet.scm (libextractor)[inputs]: Build with ffmpeg@3.4 instead of ffmpeg. 2018-04-10Merge branch 'master' into core-updatesMark H Weaver 2018-04-08gnu: gnurl: Update to version 7.59.0.Nils Gillmann * gnu/packages/gnunet.scm (gnurl): Update to version 7.59.0. [source]: Add temporary second source at ftp.n0.is. Signed-off-by: Nils Gillmann <ng0@n0.is> Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2018-03-20Merge branch 'master' into core-updatesMark H Weaver 2018-03-20Correct name and Email for ng0.ng0 * .mailmap: Correct name and Email for ng0. * Makefile.am, doc/guix.texi, etc/completion/fish/guix.fish gnu/packages/accessibility.scm, gnu/packages/admin.scm, gnu/packages/audio.scm, gnu/packages/autotools.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/cinnamon.scm, gnu/packages/compression.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/django.scm, gnu/packages/dns.scm, gnu/packages/emacs.scm, gnu/packages/enlightenment.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/forth.scm, gnu/packages/fvwm.scm, gnu/packages/games.scm, gnu/packages/gl.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/gtk.scm, gnu/packages/guile-wm.scm, gnu/packages/guile.scm, gnu/packages/haskell-check.scm, gnu/packages/haskell-crypto.scm, gnu/packages/haskell.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/language.scm, gnu/packages/libcanberra.scm, gnu/packages/linux.scm, gnu/packages/lisp.scm, gnu/packages/lolcode.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/mc.scm, gnu/packages/messaging.scm, gnu/packages/music.scm, gnu/packages/ncurses.scm, gnu/packages/networking.scm, gnu/packages/nickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm, gnu/packages/perl-check.scm, gnu/packages/perl.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm, gnu/packages/telephony.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm, gnu/services/desktop.scm, gnu/services/version-control.scm, gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm: Likewise. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> 2018-03-14Merge branch 'master' into core-updatesRicardo Wurmus 2018-03-11build-system/gnu: Add 'bootstrap' phase.Ludovic Courtès This factorizes what has become a widespread idiom. * guix/build/gnu-build-system.scm (%bootstrap-scripts): New variable. (bootstrap): New procedure. (%standard-phases): Add it after 'unpack'. * guix/build/ant-build-system.scm (%standard-phases): Delete 'bootstrap. * guix/build/asdf-build-system.scm (%standard-phases/source) (%standard-phases): Likewise. * guix/build/cargo-build-system.scm (%standard-phases): Likewise. * guix/build/cmake-build-system.scm (%standard-phases): Likewise. * guix/build/dub-build-system.scm (%standard-phases): Likewise. * guix/build/emacs-build-system.scm (%standard-phases): Likewise. * guix/build/font-build-system.scm (%standard-phases): Likewise. * guix/build/go-build-system.scm (%standard-phases): Likewise. * guix/build/haskell-build-system.scm (%standard-phases): Likewise. * guix/build/minify-build-system.scm (%standard-phases): Likewise. * guix/build/ocaml-build-system.scm (%standard-phases): Likewise. * guix/build/perl-build-system.scm (%standard-phases): Likewise. * guix/build/python-build-system.scm (%standard-phases): Likewise. * guix/build/r-build-system.scm (%standard-phases): Likewise. * guix/build/ruby-build-system.scm (%standard-phases): Likewise. * guix/build/scons-build-system.scm (%standard-phases): Likewise. * guix/build/texlive-build-system.scm (%standard-phases): Likewise. * guix/build/waf-build-system.scm (%standard-phases): Likewise. * gnu/packages/audio.scm (faad2)[arguments]: Replace 'bootstrap. (soundtouch, cuetools, bluez-alsa): Remove 'arguments'. (cava)[arguments]: Replace 'bootstrap. * gnu/packages/backup.scm (rdup): Remove 'bootstrap. * gnu/packages/bioinformatics.scm (seek)[arguments]: Replace 'bootstrap. * gnu/packages/bioinformatics.scm (htslib-for-sambamba): Remove 'arguments'. * gnu/packages/ci.scm (hydra, cuirass): Remove 'bootstrap'. * gnu/packages/crypto.scm (libb2): Remove #:phases. * gnu/packages/databases.scm (guile-wiredtiger): Likewise. * gnu/packages/debug.scm (stress-make): Remove 'bootstrap'. * gnu/packages/documentation.scm (asciidoc): Likewise. * gnu/packages/fontutils.scm (libuninameslist): Remove 'arguments'. * gnu/packages/ftp.scm (weex): Remove 'arguments'. * gnu/packages/game-development.scm (ois): Remove 'arguments'. * gnu/packages/games.scm (pioneer): Remove 'bootstrap. * gnu/packages/gnome.scm (vte-ng, byzanz): Replace 'bootstrap. (arc-theme): Remove 'arguments'. (faba-icon-theme): Remove 'bootstrap. (arc-icon-theme): Remove 'arguments'. * gnu/packages/gnunet.scm (guile-gnunet): Likewise. * gnu/packages/gtk.scm (guile-rsvg): Likewise. * gnu/packages/guile.scm (mcron2): Remove 'bootstrap. (guile-bash): Remove #:phases. (guile-git): Remove 'bootstrap. (guile-syntax-highlight): Remove 'arguments'. (guile-sjson): Likewise. * gnu/packages/java.scm (classpath-devel): Remove 'bootstrap. * gnu/packages/kodi.scm (libdvdnav/kodi) (libdvdread/kodi, libdvdcss/kodi): Likewise. * gnu/packages/libreoffice.scm (hunspell): Remove 'arguments'. * gnu/packages/libusb.scm (hidapi): Likewise. * gnu/packages/linux.scm (bridge-utils): Rename 'bootstrap' to 'patch-stuff'; move it before 'bootstrap', without autoreconf invocation. (eudev): Rename 'bootstrap' to 'patch-file-names', without 'autogen.sh' invocation; move it before 'bootstrap. (gpm): Replace 'bootstrap'. (f2fs-tools): Remove 'arguments'. (rng-tools): Remove #:phases. * gnu/packages/messaging.scm (hexchat): Rename 'bootstrap' to 'copy-intltool-makefile'; remove "autoreconf" invocation and move before 'bootstrap'. (libmesode): Remove 'arguments'. (libstrophe): Likewise. * gnu/packages/microcom.scm (microcom): Likewise. * gnu/packages/networking.scm (libnet): Remove 'bootstrap. * gnu/packages/onc-rpc.scm (libnsl): Remove 'arguments'. * gnu/packages/package-management.scm (guix): Replace 'bootstrap. * gnu/packages/sawfish.scm (librep): Remove 'arguments'. * gnu/packages/version-control.scm (findnewest): Likewise. * gnu/packages/video.scm (liba52, handbrake, motion): Replace 'bootstrap. * gnu/packages/web.scm (fcgiwrap): Remove #:phases. (tidy): Replace 'bootstrap. (gumbo-parser): Remove #:phases. * gnu/packages/wget.scm (wget2): Replace 'bootstrap. * gnu/packages/wm.scm (i3lock-color): Remove #:phases. * gnu/packages/xdisorg.scm (xclip): Likewise. * gnu/packages/xml.scm (libxls): Replace 'bootstrap'. * gnu/packages/xorg.scm (xf86-video-freedreno) (xf86-video-intel): Remove #:phases. * gnu/packages/zile.scm (zile-on-guile): Replace 'bootstrap. 2018-03-09gnu: 'autoconf-wrapper' is no longer a procedure.Ludovic Courtès Fixes <https://bugs.gnu.org/30710>. Suggested by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>. * gnu/packages/autotools.scm (autoconf-wrapper): Rename to... (make-autoconf-wrapper): ... this. Add 'properties' field. (autoconf-wrapper): New variable. * gnu/packages/gnunet.scm (guile-gnunet): Adjust accordingly. * gnu/packages/gnupg.scm (signing-party): Likewise. * gnu/packages/guile.scm (guile-ics, guile-bash): Likewise. * gnu/packages/libevent.scm (libuv): Likewise. * gnu/packages/logging.scm (glog): Likewise. * gnu/packages/mail.scm (libetpan): Likewise. * gnu/packages/mate.scm (mate-icon-theme-faenza) (mate-screensaver): Likewise. * gnu/packages/package-management.scm (guix): Likewise. * gnu/packages/sawfish.scm (librep): Likewise. * gnu/packages/video.scm (motion): Likewise. * gnu/packages/zile.scm (zile-on-guile): Likewise. 2018-02-26Revert "gnu: gnurl: Add HTTP/2 support."Tobias Geerinckx-Rice This reverts unintentional commit 3d2d5ebffae6979376d64a6441a44eb4369a6. See <https://lists.gnu.org/archive/html/guix-devel/2018-02/msg00486.html>. 2018-02-20gnu: gnurl: Add HTTP/2 support.Tobias Geerinckx-Rice * gnu/packages/gnunet.scm (gnurl)[inputs]: Add nghttp2:lib. 2018-02-04gnu: libmicrohttpd: Update to 0.9.59.Tobias Geerinckx-Rice * gnu/packages/gnunet.scm (libmicrohttpd): Update to 0.9.59. 2018-01-27gnu: gnurl: Update to 7.58.0.ng0 * gnu/packages/gnunet.scm (gnurl): Update to 7.58.0. Signed-off-by: Marius Bakke <mbakke@fastmail.com> 2018-01-27Revert "gnu: gnurl: Add '--with-ca-bundle' path to configure-flags."ng0 This reverts commit 8bf127d5ab5f95dc606fbec2b8de5c942dd79b9d. It broke building gnurl in non-reproducible ways. Signed-off-by: Marius Bakke <mbakke@fastmail.com> 2018-01-23gnu: gnunet: Use invoke.ng0 * gnu/packages/gnunet.scm (gnurl)[arguments]: Substitute invoke for system*. (guile-gnunet)[arguments]: Likewise. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> 2018-01-23gnu: gnurl: Add '--with-ca-bundle' path to configure-flags.ng0 As a fork of cURL, gnURL on Guix needs to be made aware of the certificate store to prevent the well-known issue we have. * gnu/packages/gnunet.scm (gnurl)[configure-flags]: Add '--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt'. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2017-12-09gnu: gnurl: Use new download URL.ng0 * gnu/packages/gnunet.scm (gnurl)[source]: Use mirror://gnu. Signed-off-by: Leo Famulari <leo@famulari.name> 2017-12-08gnu: libmicrohttpd: Update to 0.9.58.Tobias Geerinckx-Rice * gnu/packages/gnunet.scm (libmicrohttpd): Update to 0.9.58. 2017-12-06gnu: gnurl: Update to 7.57.0.ng0 * gnu/packages/gnunet.scm (gnurl): Update to 7.57.0. Signed-off-by: Leo Famulari <leo@famulari.name> 2017-11-28gnu: libmicrohttpd: Update to 0.9.57.Efraim Flashner * gnu/packages/gnunet.scm (libmicrohttpd): Update to 0.9.57. [description]: Fix line breaks. 2017-11-27gnu: gnurl: Update to 7.56.1-2.ng0 * gnu/packages/gnunet.scm (gnurl): Update to 7.56.1-2. [arguments]: Adjust the #:configure-flags. Signed-off-by: Leo Famulari <leo@famulari.name>