From 9574d42008143909b269836a0eadbdbac67a6293 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Mon, 21 Oct 2019 14:03:01 +0200 Subject: gnu: Add graph. * gnu/packages/lisp.scm (cl-graph, sbcl-graph): New variables. * gnu/packages/patches/sbcl-graph-asdf-definitions.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- .../patches/sbcl-graph-asdf-definitions.patch | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 gnu/packages/patches/sbcl-graph-asdf-definitions.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/sbcl-graph-asdf-definitions.patch b/gnu/packages/patches/sbcl-graph-asdf-definitions.patch new file mode 100644 index 0000000000..a528ccfcc6 --- /dev/null +++ b/gnu/packages/patches/sbcl-graph-asdf-definitions.patch @@ -0,0 +1,70 @@ +commit 52ebece1243ae6900e414b6248b5145a28348eef +Author: Guillaume Le Vaillant +Date: Fri Oct 18 15:41:23 2019 +0200 + + Use basic ASDF system definitions instead of package-inferred-system + +diff --git a/graph.asd b/graph.asd +index 193b6e3..56afc8f 100644 +--- a/graph.asd ++++ b/graph.asd +@@ -3,12 +3,10 @@ + :version "0.0.0" + :author ("Eric Schulte " "Thomas Dye") + :licence "GPL V3" +- :class :package-inferred-system +- :defsystem-depends-on (:asdf-package-system) ++ :in-order-to ((test-op (test-op graph-test))) + :depends-on (alexandria + metabang-bind + named-readtables + curry-compose-reader-macros +- graph/graph)) +- +-(register-system-packages "femlisp-matlisp" '(:fl.matlisp)) ++ cl-heap) ++ :components ((:file "graph"))) +diff --git a/graph.dot.asd b/graph.dot.asd +new file mode 100644 +index 0000000..12aec7e +--- /dev/null ++++ b/graph.dot.asd +@@ -0,0 +1,8 @@ ++(defsystem :graph-dot ++ :depends-on (alexandria ++ metabang-bind ++ named-readtables ++ curry-compose-reader-macros ++ cl-ppcre ++ graph) ++ :components ((:file "dot"))) +diff --git a/graph.json.asd b/graph.json.asd +new file mode 100644 +index 0000000..e7d091f +--- /dev/null ++++ b/graph.json.asd +@@ -0,0 +1,8 @@ ++(defsystem :graph-json ++ :depends-on (alexandria ++ metabang-bind ++ named-readtables ++ curry-compose-reader-macros ++ yason ++ graph) ++ :components ((:file "json"))) +diff --git a/graph.test.asd b/graph.test.asd +new file mode 100644 +index 0000000..1e811e1 +--- /dev/null ++++ b/graph.test.asd +@@ -0,0 +1,10 @@ ++(defsystem :graph-test ++ :depends-on (alexandria ++ metabang-bind ++ named-readtables ++ curry-compose-reader-macros ++ graph ++ stefil) ++ :perform (test-op (o s) ++ (uiop:symbol-call :graph/test 'test)) ++ :components ((:file "test"))) -- cgit v1.2.3 From af561664b8191e2a34570176422f4d500d5fd4fb Mon Sep 17 00:00:00 2001 From: Miguel Ángel Arruga Vivas Date: Mon, 21 Oct 2019 19:16:24 +0200 Subject: gnu: seahorse: Update to 3.30.1.1. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/gnome.scm (seahorse)[version]: Update version number. [origin]: Update hash. Add patch needed for compilation with our version of libsecret (0.19.1). [inputs]: Add avahi dependency. [native-inputs]: Add vala dependency. Use gettext-minimal instead of intltool, as only xgettext is used. * gnu/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 21 +++++++++++--- .../seahorse-gkr-use-0-on-empty-flags.patch | 32 ++++++++++++++++++++++ 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 2568d75c1a..79d0e934d4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1325,6 +1325,7 @@ dist_patch_DATA = \ %D%/packages/patches/scotch-build-parallelism.patch \ %D%/packages/patches/scotch-integer-declarations.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ + %D%/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 3a4494b2b5..6ce3b1cf37 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2223,7 +2223,7 @@ engineering.") (define-public seahorse (package (name "seahorse") - (version "3.30") + (version "3.30.1.1") (source (origin (method url-fetch) @@ -2232,8 +2232,19 @@ engineering.") version ".tar.xz")) (sha256 (base32 - "1sbj1czlx1fakm72dwgbn0bwm12j838yaky4mkf6hf8j8afnxmzp")))) - (build-system glib-or-gtk-build-system) + "12x7xmwh62yl0ax90v8nkx3jqzviaz9hz2g56yml78wzww20gawy")) + (patches (search-patches + "seahorse-gkr-use-0-on-empty-flags.patch")))) + (build-system meson-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'skip-gtk-update-icon-cache + ;; Don't create 'icon-theme.cache'. + (lambda _ + (substitute* "build-aux/meson_post_install.py" + (("gtk-update-icon-cache") "true")) + #t))))) (inputs `(("gtk+" ,gtk+) ("gcr" ,gcr) @@ -2241,13 +2252,15 @@ engineering.") ("gpgme" ,gpgme) ("openldap" ,openldap) ("openssh" ,openssh) + ("avahi" ,avahi) ("libsecret" ,libsecret) ("libsoup" ,libsoup))) (native-inputs - `(("intltool" ,intltool) + `(("gettext" ,gettext-minimal) ("glib:bin" ,glib "bin") ("itstool" ,itstool) ("pkg-config" ,pkg-config) + ("vala" ,vala) ("xmllint" ,libxml2))) (home-page "https://launchpad.net/gnome-themes-standard") (synopsis "Manage encryption keys and passwords in the GNOME keyring") diff --git a/gnu/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch b/gnu/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch new file mode 100644 index 0000000000..55866d2973 --- /dev/null +++ b/gnu/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch @@ -0,0 +1,32 @@ +Patch from . + +From d9db29db567012b7c72e85e1be1fbf55fcc9b667 Mon Sep 17 00:00:00 2001 +From: Niels De Graef +Date: Sat, 11 May 2019 09:02:34 +0200 +Subject: [PATCH] gkr: Use 0 on empty flags + +A Flags-type variable without any flag set can be replaced with 0, so +this is a safe thing to do. It also prevents us from having to deal with +the accidental API break in libsecret (see +https://gitlab.gnome.org/GNOME/libsecret/merge_requests/19) +--- + gkr/gkr-keyring-add.vala | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/gkr/gkr-keyring-add.vala b/gkr/gkr-keyring-add.vala +index 4e92a520..f60c9a22 100644 +--- a/gkr/gkr-keyring-add.vala ++++ b/gkr/gkr-keyring-add.vala +@@ -41,8 +41,7 @@ public class Seahorse.Gkr.KeyringAdd : Gtk.Dialog { + + var cancellable = Dialog.begin_request(this); + var service = Backend.instance().service; +- Secret.Collection.create.begin(service, this.name_entry.text, null, +- Secret.CollectionCreateFlags.COLLECTION_CREATE_NONE, ++ Secret.Collection.create.begin(service, this.name_entry.text, null, 0, + cancellable, (obj, res) => { + /* Clear the operation without cancelling it since it is complete */ + Dialog.complete_request(this, false); +-- +2.23.0 + -- cgit v1.2.3 From 77e0cebcadc8b96613832e1554e326d48e20f72f Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Mon, 30 Sep 2019 21:09:49 +0200 Subject: gnu: Add weasyprint. Now includs the patch file missed in 73f0ed8dbfde97341716fd8b156907e4ef800873. * gnu/packages/pdf.scm (weasyprint): New variable. * gnu/packages/patches/weasyprint-library-paths.patch: New file. * gnu/local.mk: Add it. --- gnu/local.mk | 1 + .../patches/weasyprint-library-paths.patch | 38 ++++++++++ gnu/packages/pdf.scm | 81 ++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 gnu/packages/patches/weasyprint-library-paths.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index d563ecc99e..a8138a945c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1420,6 +1420,7 @@ dist_patch_DATA = \ %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/weasyprint-library-paths.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ %D%/packages/patches/wicd-get-selected-profile-fix.patch \ %D%/packages/patches/wicd-urwid-1.3.patch \ diff --git a/gnu/packages/patches/weasyprint-library-paths.patch b/gnu/packages/patches/weasyprint-library-paths.patch new file mode 100644 index 0000000000..eabbdbdcd6 --- /dev/null +++ b/gnu/packages/patches/weasyprint-library-paths.patch @@ -0,0 +1,38 @@ +diff --git a/weasyprint/fonts.py b/weasyprint/fonts.py +index 377716c1..2016e01c 100644 +--- a/weasyprint/fonts.py ++++ b/weasyprint/fonts.py +@@ -48,11 +48,8 @@ else: + # with OSError: dlopen() failed to load a library: cairo / cairo-2 + # So let's hope we find the same file as cairo already did ;) + # Same applies to pangocairo requiring pangoft2 +- fontconfig = dlopen(ffi, 'fontconfig', 'libfontconfig', +- 'libfontconfig-1.dll', +- 'libfontconfig.so.1', 'libfontconfig-1.dylib') +- pangoft2 = dlopen(ffi, 'pangoft2-1.0', 'libpangoft2-1.0-0', +- 'libpangoft2-1.0.so', 'libpangoft2-1.0.dylib') ++ fontconfig = dlopen(ffi, '@fontconfig@') ++ pangoft2 = dlopen(ffi, '@pangoft2@') + + ffi.cdef(''' + // FontConfig +diff --git a/weasyprint/text.py b/weasyprint/text.py +index 035074e9..08e40395 100644 +--- a/weasyprint/text.py ++++ b/weasyprint/text.py +@@ -243,12 +243,9 @@ def dlopen(ffi, *names): + return ffi.dlopen(names[0]) # pragma: no cover + + +-gobject = dlopen(ffi, 'gobject-2.0', 'libgobject-2.0-0', 'libgobject-2.0.so', +- 'libgobject-2.0.dylib') +-pango = dlopen(ffi, 'pango-1.0', 'libpango-1.0-0', 'libpango-1.0.so', +- 'libpango-1.0.dylib') +-pangocairo = dlopen(ffi, 'pangocairo-1.0', 'libpangocairo-1.0-0', +- 'libpangocairo-1.0.so', 'libpangocairo-1.0.dylib') ++gobject = dlopen(ffi, '@gobject@') ++pango = dlopen(ffi, '@pango@') ++pangocairo = dlopen(ffi, '@pangocairo@') + + gobject.g_type_init() + diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 7118afce4d..0fd385d5d6 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Alex Griffin ;;; Copyright © 2019 Ben Sturmfels +;;; Copyright © 2019 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,6 +67,7 @@ #:use-module (gnu packages imagemagick) #:use-module (gnu packages javascript) #:use-module (gnu packages lesstif) + #:use-module (gnu packages libffi) #:use-module (gnu packages linux) #:use-module (gnu packages lua) #:use-module (gnu packages pcre) @@ -73,6 +75,8 @@ #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-check) + #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages sdl) @@ -1200,3 +1204,80 @@ manipulating PDF documents from the command line. It supports @item displaying the mapping between logical and physical page numbers @end itemize") (license license:bsd-3))) + +(define-public weasyprint + (package + (name "weasyprint") + (version "50") + (source + (origin + (method url-fetch) + (uri (pypi-uri "WeasyPrint" version)) + (sha256 + (base32 "0invs96zvmcr6wh5klj52jrcnr9qg150v9wpmbhcsf3vv1d1hbcw")) + (patches (search-patches "weasyprint-library-paths.patch")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-library-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((fontconfig (assoc-ref inputs "fontconfig")) + (glib (assoc-ref inputs "glib")) + (pango (assoc-ref inputs "pango")) + (pangoft2 (assoc-ref inputs "pangoft2"))) + (substitute* "weasyprint/fonts.py" + (("@fontconfig@") + (string-append fontconfig "/lib/libfontconfig.so")) + (("@pangoft2@") + (string-append pango "/lib/libpangoft2-1.0.so"))) + (substitute* "weasyprint/text.py" + (("@gobject@") + (string-append glib "/lib/libgobject-2.0.so")) + (("@pango@") + (string-append pango "/lib/libpango-1.0.so")) + (("@pangocairo@") + (string-append pango "/lib/libpangocairo-1.0.so")))))) + (add-after 'unpack 'remove-pytest-options + (lambda _ + (substitute* "setup.cfg" + ;; flake8 and isort syntax checks fail, which is not our + ;; business + (("addopts = --flake8 --isort") "")))) + (replace 'check + (lambda _ + ;; run pytest, excluding one failing test + (invoke "pytest" "-k" "not test_flex_column_wrap_reverse")))))) + (inputs + `(("fontconfig" ,fontconfig) + ("glib" ,glib) + ("pango" ,pango))) + (propagated-inputs + `(("gdk-pixbuf" ,gdk-pixbuf) + ("python-cairocffi" ,python-cairocffi) + ("python-cairosvg" ,python-cairosvg) + ("python-cffi" ,python-cffi) + ("python-cssselect2" ,python-cssselect2) + ("python-html5lib" ,python-html5lib) + ("python-pyphen" ,python-pyphen) + ("python-tinycss2" ,python-tinycss2))) + (native-inputs + `(("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-runner" ,python-pytest-runner))) + (home-page "https://weasyprint.org/") + (synopsis "Document factory for creating PDF files from HTML") + (description "WeasyPrint helps web developers to create PDF documents. It +turns simple HTML pages into gorgeous statistical reports, invoices, tickets, +etc. + +From a technical point of view, WeasyPrint is a visual rendering engine for +HTML and CSS that can export to PDF and PNG. It aims to support web standards +for printing. + +It is based on various libraries but not on a full rendering engine like +WebKit or Gecko. The CSS layout engine is written in Python, designed for +pagination, and meant to be easy to hack on. Weasyprint can also be used as a +python library. + +Keywords: html2pdf, htmltopdf") + (license license:bsd-3))) -- cgit v1.2.3 From 3f4ea9a62b5fa68d57724b2f83c35a191e33b7c8 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 23 Oct 2019 19:43:02 +0200 Subject: gnu: avahi: Fix CVE-2018-1000845 and duplicate CVE-2017-6519. * gnu/packages/avahi.scm (avahi/fixed): New variable. (avahi)[replacement]: Use it. * gnu/packages/patches/avahi-CVE-2018-1000845.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/avahi.scm | 11 ++++++ gnu/packages/patches/avahi-CVE-2018-1000845.patch | 42 +++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 gnu/packages/patches/avahi-CVE-2018-1000845.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a8138a945c..50bcab514a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -706,6 +706,7 @@ dist_patch_DATA = \ %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \ %D%/packages/patches/audacity-build-with-system-portaudio.patch \ %D%/packages/patches/automake-skip-amhello-tests.patch \ + %D%/packages/patches/avahi-CVE-2018-1000845.patch \ %D%/packages/patches/avahi-localstatedir.patch \ %D%/packages/patches/avogadro-boost148.patch \ %D%/packages/patches/avogadro-eigen3-update.patch \ diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm index e71ffc2982..408be8ed57 100644 --- a/gnu/packages/avahi.scm +++ b/gnu/packages/avahi.scm @@ -35,6 +35,7 @@ (package (name "avahi") (version "0.7") + (replacement avahi/fixed) (home-page "http://avahi.org") (source (origin (method url-fetch) @@ -74,6 +75,16 @@ network. It is an implementation of the mDNS (for \"Multicast DNS\") and DNS-SD (for \"DNS-Based Service Discovery\") protocols.") (license lgpl2.1+))) +(define avahi/fixed + (package/inherit avahi + (source (origin + (inherit (package-source avahi)) + (patches + (append (search-patches "avahi-CVE-2018-1000845.patch") + (origin-patches (package-source avahi)))))) + ;; Hide a duplicate of the CVE fixed above. + (properties `((lint-hidden-cve . ("CVE-2017-6519")))))) + (define-public nss-mdns (package (name "nss-mdns") diff --git a/gnu/packages/patches/avahi-CVE-2018-1000845.patch b/gnu/packages/patches/avahi-CVE-2018-1000845.patch new file mode 100644 index 0000000000..e5b13e0bee --- /dev/null +++ b/gnu/packages/patches/avahi-CVE-2018-1000845.patch @@ -0,0 +1,42 @@ +From e111def44a7df4624a4aa3f85fe98054bffb6b4f Mon Sep 17 00:00:00 2001 +From: Trent Lloyd +Date: Sat, 22 Dec 2018 09:06:07 +0800 +Subject: [PATCH] Drop legacy unicast queries from address not on local link + +When handling legacy unicast queries, ensure that the source IP is +inside a subnet on the local link, otherwise drop the packet. + +Fixes #145 +Fixes #203 +CVE-2017-6519 +CVE-2018-100084 +--- + avahi-core/server.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/avahi-core/server.c b/avahi-core/server.c +index a2cb19a8..a2580e38 100644 +--- a/avahi-core/server.c ++++ b/avahi-core/server.c +@@ -930,6 +930,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres + + if (avahi_dns_packet_is_query(p)) { + int legacy_unicast = 0; ++ char t[AVAHI_ADDRESS_STR_MAX]; + + /* For queries EDNS0 might allow ARCOUNT != 0. We ignore the + * AR section completely here, so far. Until the day we add +@@ -947,6 +948,13 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres + legacy_unicast = 1; + } + ++ if (!is_mdns_mcast_address(dst_address) && ++ !avahi_interface_address_on_link(i, src_address)) { ++ ++ avahi_log_debug("Received non-local unicast query from host %s on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), i->hardware->name, i->protocol); ++ return; ++ } ++ + if (legacy_unicast) + reflect_legacy_unicast_query_packet(s, p, i, src_address, port); + -- cgit v1.2.3