From cf87919657bcbc422ca599007f5b111dc7807919 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 22 Nov 2019 15:12:11 +0100 Subject: gnu: libseccomp: Fix build on AArch64. This is a followup to d100d5d5449eabd65e9c26081b7620a3d342c9eb. * gnu/packages/patches/libseccomp-open-aarch64.patch: New file. * gnu/packages/linux.scm (libseccomp)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7672295e69..ba86bf3224 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1078,6 +1078,7 @@ dist_patch_DATA = \ %D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch \ %D%/packages/patches/libreoffice-icu.patch \ %D%/packages/patches/libreoffice-glm.patch \ + %D%/packages/patches/libseccomp-open-aarch64.patch \ %D%/packages/patches/libsndfile-armhf-type-checks.patch \ %D%/packages/patches/libsndfile-CVE-2017-8361-8363-8365.patch \ %D%/packages/patches/libsndfile-CVE-2017-8362.patch \ -- cgit v1.2.3 From 61abb11481432b0349c193d85796036fb98244af Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 22 Nov 2019 22:15:38 +0100 Subject: gnu: Register xsane patches. This follows up on commit a608666d74f156819cecfabaf72290726d7964e6. * gnu/local.mk (dist_patch_DATA): Add missing patches. --- gnu/local.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ba86bf3224..ebb392494b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1463,7 +1463,11 @@ dist_patch_DATA = \ %D%/packages/patches/xfce4-panel-plugins.patch \ %D%/packages/patches/xfce4-settings-defaults.patch \ %D%/packages/patches/xinetd-fix-fd-leak.patch \ - %D%/packages/patches/xinetd-CVE-2013-4342.patch + %D%/packages/patches/xinetd-CVE-2013-4342.patch \ + %D%/packages/patches/xsane-fix-memory-leak.patch \ + %D%/packages/patches/xsane-fix-pdf-floats.patch \ + %D%/packages/patches/xsane-support-ipv6.patch \ + %D%/packages/patches/xsane-tighten-default-umask.patch MISC_DISTRO_FILES = \ %D%/packages/ld-wrapper.in -- cgit v1.2.3 From 99b106022c8db67ee9bde847e1677e2dd0a39923 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 22 Nov 2019 22:16:32 +0100 Subject: gnu: xsane: Fix snprintf buffer length. * gnu/packages/scanner.scm (xsane)[source]: Add patch. * gnu/packages/patches/xsane-fix-snprintf-buffer-length.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../patches/xsane-fix-snprintf-buffer-length.patch | 72 ++++++++++++++++++++++ gnu/packages/scanner.scm | 1 + 3 files changed, 74 insertions(+) create mode 100644 gnu/packages/patches/xsane-fix-snprintf-buffer-length.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ebb392494b..e6c6f57c3f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1466,6 +1466,7 @@ dist_patch_DATA = \ %D%/packages/patches/xinetd-CVE-2013-4342.patch \ %D%/packages/patches/xsane-fix-memory-leak.patch \ %D%/packages/patches/xsane-fix-pdf-floats.patch \ + %D%/packages/patches/xsane-fix-snprintf-buffer-length.patch \ %D%/packages/patches/xsane-support-ipv6.patch \ %D%/packages/patches/xsane-tighten-default-umask.patch diff --git a/gnu/packages/patches/xsane-fix-snprintf-buffer-length.patch b/gnu/packages/patches/xsane-fix-snprintf-buffer-length.patch new file mode 100644 index 0000000000..412e127f5a --- /dev/null +++ b/gnu/packages/patches/xsane-fix-snprintf-buffer-length.patch @@ -0,0 +1,72 @@ +From 893a5ce1f75e5eea7c8d383038ff92a150819c9c Mon Sep 17 00:00:00 2001 +From: Ralph Little +Date: Thu, 19 Sep 2019 22:02:33 -0700 +Subject: [PATCH] xsane-*-project.c - reduced snprintf format pad to silence + warning about too long constrant string for buffer. + +--- + src/xsane-email-project.c | 4 ++-- + src/xsane-fax-project.c | 4 ++-- + src/xsane-multipage-project.c | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/xsane-email-project.c b/src/xsane-email-project.c +index f20cb12..ac93fc2 100644 +--- a/src/xsane-email-project.c ++++ b/src/xsane-email-project.c +@@ -896,7 +896,7 @@ static void xsane_email_project_update_project_status() + snprintf(filename, sizeof(filename), "%s/xsane-mail-list", preferences.email_project); + projectfile = fopen(filename, "r+b"); /* r+ = read and write, position = start of file */ + +- snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.email_status); /* fill 32 characters status line */ ++ snprintf(buf, 33, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.email_status); /* fill 32 characters status line */ + fprintf(projectfile, "%s\n", buf); /* first line is status of email */ + + fclose(projectfile); +@@ -936,7 +936,7 @@ void xsane_email_project_save() + { + char buf[TEXTBUFSIZE]; + +- snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.email_status); /* fill 32 characters status line */ ++ snprintf(buf, 33, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.email_status); /* fill 32 characters status line */ + fprintf(projectfile, "%s\n", buf); /* first line is status of email */ + gtk_progress_set_format_string(GTK_PROGRESS(xsane.project_progress_bar), _(xsane.email_status)); + xsane_progress_bar_set_fraction(GTK_PROGRESS_BAR(xsane.project_progress_bar), 0.0); +diff --git a/src/xsane-fax-project.c b/src/xsane-fax-project.c +index f263313..0c60a97 100644 +--- a/src/xsane-fax-project.c ++++ b/src/xsane-fax-project.c +@@ -452,7 +452,7 @@ static void xsane_fax_project_update_project_status() + snprintf(filename, sizeof(filename), "%s/xsane-fax-list", preferences.fax_project); + projectfile = fopen(filename, "r+b"); /* r+ = read and write, position = start of file */ + +- snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.fax_status); /* fill 32 characters status line */ ++ snprintf(buf, 33, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.fax_status); /* fill 32 characters status line */ + fprintf(projectfile, "%s\n", buf); /* first line is status of mail */ + + fclose(projectfile); +@@ -498,7 +498,7 @@ void xsane_fax_project_save() + { + char buf[TEXTBUFSIZE]; + +- snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.fax_status); /* fill 32 characters status line */ ++ snprintf(buf, 33, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.fax_status); /* fill 32 characters status line */ + fprintf(projectfile, "%s\n", buf); /* first line is status of mail */ + gtk_progress_set_format_string(GTK_PROGRESS(xsane.project_progress_bar), _(xsane.fax_status)); + xsane_progress_bar_set_fraction(GTK_PROGRESS_BAR(xsane.project_progress_bar), 0.0); +diff --git a/src/xsane-multipage-project.c b/src/xsane-multipage-project.c +index f23e5f8..9392e00 100644 +--- a/src/xsane-multipage-project.c ++++ b/src/xsane-multipage-project.c +@@ -522,7 +522,7 @@ void xsane_multipage_project_save() + { + char buf[TEXTBUFSIZE]; + +- snprintf(buf, 32, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.multipage_status); /* fill 32 characters status line */ ++ snprintf(buf, 33, "%s@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", xsane.multipage_status); /* fill 32 characters status line */ + fprintf(projectfile, "%s\n", buf); /* first line is status of multipage */ + gtk_progress_set_format_string(GTK_PROGRESS(xsane.project_progress_bar), _(xsane.multipage_status)); + xsane_progress_bar_set_fraction(GTK_PROGRESS_BAR(xsane.project_progress_bar), 0.0); +-- +2.23.0 + diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index aa58b5aa50..98f7fd203a 100644 --- a/gnu/packages/scanner.scm +++ b/gnu/packages/scanner.scm @@ -171,6 +171,7 @@ package contains the library and drivers."))) ;; commits upstream. A 1.0 release is planned. (patches (search-patches "xsane-fix-memory-leak.patch" "xsane-fix-pdf-floats.patch" + "xsane-fix-snprintf-buffer-length.patch" "xsane-support-ipv6.patch" "xsane-tighten-default-umask.patch")) (modules '((guix build utils))) -- cgit v1.2.3 From cd2ce8abae37bc900286e5282ebaa08b88768a54 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Tue, 12 Nov 2019 19:05:18 +0100 Subject: gnu: Add pam-mount. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/admin.scm (pam-mount): New variable. * gnu/packages/patches/pam-mount-luks2-support.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/admin.scm | 68 ++++++++++++++++++++++ gnu/packages/patches/pam-mount-luks2-support.patch | 51 ++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 gnu/packages/patches/pam-mount-luks2-support.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e6c6f57c3f..0129e42944 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1216,6 +1216,7 @@ dist_patch_DATA = \ %D%/packages/patches/p7zip-CVE-2016-9296.patch \ %D%/packages/patches/p7zip-CVE-2017-17969.patch \ %D%/packages/patches/p7zip-remove-unused-code.patch \ + %D%/packages/patches/pam-mount-luks2-support.patch \ %D%/packages/patches/patchutils-test-perms.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/pcre2-fix-jit_match-crash.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 10caeac763..d838c81717 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2019 Jakob L. Kreuze ;;; Copyright © 2019 Hartmut Goebel ;;; Copyright © 2019 Alex Griffin +;;; Copyright © 2019 Guillaume Le Vaillant ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,8 +62,10 @@ #:use-module (gnu packages algebra) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages c) #:use-module (gnu packages check) #:use-module (gnu packages crypto) + #:use-module (gnu packages cryptsetup) #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages dns) #:use-module (gnu packages file) @@ -3513,3 +3516,68 @@ IGMP and Raw, across a wide variety of interface types, and understands BPF filter logic in the same fashion as more common packet sniffing tools, such as tcpdump and snoop.") (license license:bsd-3))) + +(define-public pam-mount + (package + (name "pam-mount") + (version "2.16") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/" + version "/pam_mount-" version ".tar.xz")) + (sha256 + (base32 + "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf")) + (patches + ;; Patch adding support for encrypted volumes in LUKS2 format. + ;; It comes from the Gentoo package definition for sys-auth/pam_mount. + (search-patches "pam-mount-luks2-support.patch")))) + (build-system gnu-build-system) + (native-inputs + `(("perl" ,perl) + ("pkg-config" ,pkg-config))) + (inputs + `(("cryptsetup" ,cryptsetup) + ("libhx" ,libhx) + ("libxml2" ,libxml2) + ("linux-pam" ,linux-pam) + ("lvm2" ,lvm2) + ("openssl" ,openssl) + ("pcre" ,pcre) + ("util-linux" ,util-linux))) + (arguments + `(#:configure-flags + (list (string-append "--with-slibdir=" %output "/lib") + (string-append "--with-ssbindir=" %output "/sbin")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-program-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((util-linux (assoc-ref inputs "util-linux")) + (out (assoc-ref outputs "out"))) + (substitute* "src/mtcrypt.c" + (("\"mount\";") + (string-append "\"" util-linux "/bin/mount\";")) + (("\"umount\";") + (string-append "\"" util-linux "/bin/umount\";")) + (("\"fsck\",") + (string-append "\"" util-linux "/sbin/fsck\","))) + (substitute* "src/rdconf1.c" + (("\"mount\", \"") + (string-append "\"" util-linux "/bin/mount\", \"")) + (("\"umount\", \"") + (string-append "\"" util-linux "/bin/umount\", \"")) + (("\"fsck\", \"") + (string-append "\"" util-linux "/sbin/fsck\", \"")) + (("\"pmvarrun\", \"") + (string-append "\"" out "/sbin/pmvarrun\", \"")))) + #t))))) + (home-page "http://pam-mount.sourceforge.net") + (synopsis "PAM module to mount volumes for a user session") + (description + "Pam-mount is a PAM module that can mount volumes when a user logs in. +It supports mounting local filesystems of any kind the normal mount utility +supports. It can also mount encrypted LUKS volumes using the password +supplied by the user when logging in.") + (license (list license:gpl2+ license:lgpl2.1+)))) diff --git a/gnu/packages/patches/pam-mount-luks2-support.patch b/gnu/packages/patches/pam-mount-luks2-support.patch new file mode 100644 index 0000000000..b59daf5ce1 --- /dev/null +++ b/gnu/packages/patches/pam-mount-luks2-support.patch @@ -0,0 +1,51 @@ +From d4434c05e7c0cf05d87089404cfa2deedc60811a Mon Sep 17 00:00:00 2001 +From: Ingo Franzki +Date: Mon, 29 Oct 2018 16:47:40 +0100 +Subject: [PATCH] crypto: Add support for LUKS2 + +Cryptsetup version 2.0 added support for LUKS2. +This patch adds support for mounting LUKS2 volumes with +pam_mount. + +Signed-off-by: Ingo Franzki +--- + src/crypto-dmc.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/crypto-dmc.c b/src/crypto-dmc.c +index d0ab6ca..abd0358 100644 +--- a/src/crypto-dmc.c ++++ b/src/crypto-dmc.c +@@ -21,6 +21,12 @@ + #include "libcryptmount.h" + #include "pam_mount.h" + ++#ifndef CRYPT_LUKS ++ #define CRYPT_LUKS NULL /* Passing NULL to crypt_load will ++ default to LUKS(1) on older ++ libcryptsetup versions. */ ++#endif ++ + /** + * dmc_is_luks - check if @path points to a LUKS volume (cf. normal dm-crypt) + * @path: path to the crypto container +@@ -48,7 +54,7 @@ EXPORT_SYMBOL int ehd_is_luks(const char *path, bool blkdev) + + ret = crypt_init(&cd, device); + if (ret == 0) { +- ret = crypt_load(cd, CRYPT_LUKS1, NULL); ++ ret = crypt_load(cd, CRYPT_LUKS, NULL); + if (ret == -EINVAL) + ret = false; + else if (ret == 0) +@@ -106,7 +112,7 @@ static bool dmc_run(const struct ehd_mount_request *req, + #endif + } + +- ret = crypt_load(cd, CRYPT_LUKS1, NULL); ++ ret = crypt_load(cd, CRYPT_LUKS, NULL); + if (ret == 0) { + ret = crypt_activate_by_passphrase(cd, mt->crypto_name, + CRYPT_ANY_SLOT, req->key_data, req->key_size, flags); +-- +2.21.0 -- cgit v1.2.3 From 9943d238e9f07dccae973b641eb7738637ce95fb Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Wed, 27 Nov 2019 10:40:56 +0000 Subject: gnu: feh: Adapt tests for imlib2 1.6. * gnu/packages/patches/feh-fix-tests-for-imlib2-1.6.patch: New file. * gnu/packages/image-viewers.scm (feh)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 + gnu/packages/image-viewers.scm | 5 ++- .../patches/feh-fix-tests-for-imlib2-1.6.patch | 51 ++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/feh-fix-tests-for-imlib2-1.6.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0129e42944..082465a24a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -826,6 +826,7 @@ dist_patch_DATA = \ %D%/packages/patches/fbreader-curl-7.62.patch \ %D%/packages/patches/fcgi-2.4.0-gcc44-fixes.patch \ %D%/packages/patches/fcgi-2.4.0-poll.patch \ + %D%/packages/patches/feh-fix-tests-for-imlib2-1.6.patch \ %D%/packages/patches/fifo-map-fix-flags-for-gcc.patch \ %D%/packages/patches/fifo-map-remove-catch.hpp.patch \ %D%/packages/patches/file-CVE-2018-10360.patch \ diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm index d237a27c4a..c0300f5087 100644 --- a/gnu/packages/image-viewers.scm +++ b/gnu/packages/image-viewers.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018, 2019 Ricardo Wurmus ;;; Copyright © 2019 Nicolas Goaziou ;;; Copyright © 2019 Guy Fleury Iteriteka +;;; Copyright © 2019 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -72,7 +73,9 @@ name "-" version ".tar.bz2")) (sha256 (base32 - "070axq8jpibcabmjfv4fmjmpk3k349vzvh4qhsi4n62bkcwl35wg")))) + "070axq8jpibcabmjfv4fmjmpk3k349vzvh4qhsi4n62bkcwl35wg")) + (patches + (search-patches "feh-fix-tests-for-imlib2-1.6.patch")))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases (delete 'configure)) diff --git a/gnu/packages/patches/feh-fix-tests-for-imlib2-1.6.patch b/gnu/packages/patches/feh-fix-tests-for-imlib2-1.6.patch new file mode 100644 index 0000000000..a91906dbe9 --- /dev/null +++ b/gnu/packages/patches/feh-fix-tests-for-imlib2-1.6.patch @@ -0,0 +1,51 @@ +commit 8048fb542d0c36f868760ba1590fbe14a3a85df7 +Author: Pierre Langlois +Date: Wed Nov 27 10:42:05 2019 +0000 + + Adapt tests for imlib2 1.6 + + Reported upstream on https://github.com/derf/feh/issues/497 + +diff --git a/test/list/custom b/test/list/custom +index dbe2074..40ac557 100644 +--- a/test/list/custom ++++ b/test/list/custom +@@ -1,4 +1,4 @@ + test/ok/gif; 16; 4; list; gif; 256; 953; gif; 1; 16 +-test/ok/jpg; 16; 4; list; jpg; 256; 354; jpeg; 2; 16 ++test/ok/jpg; 16; 4; list; jpg; 256; 354; jpg; 2; 16 + test/ok/png; 16; 4; list; png; 256; 403; png; 3; 16 + test/ok/pnm; 16; 4; list; pnm; 256; 269; pnm; 4; 16 +diff --git a/test/list/default b/test/list/default +index bc0ef52..e480db3 100644 +--- a/test/list/default ++++ b/test/list/default +@@ -1,5 +1,5 @@ + NUM FORMAT WIDTH HEIGHT PIXELS SIZE ALPHA FILENAME + 1 gif 16 16 256 953 - test/ok/gif +-2 jpeg 16 16 256 354 - test/ok/jpg ++2 jpg 16 16 256 354 - test/ok/jpg + 3 png 16 16 256 403 X test/ok/png + 4 pnm 16 16 256 269 - test/ok/pnm +diff --git a/test/list/format_reverse b/test/list/format_reverse +index 9216184..3301f78 100644 +--- a/test/list/format_reverse ++++ b/test/list/format_reverse +@@ -1,5 +1,5 @@ + NUM FORMAT WIDTH HEIGHT PIXELS SIZE ALPHA FILENAME + 1 pnm 16 16 256 269 - test/ok/pnm + 2 png 16 16 256 403 X test/ok/png +-3 jpeg 16 16 256 354 - test/ok/jpg ++3 jpg 16 16 256 354 - test/ok/jpg + 4 gif 16 16 256 953 - test/ok/gif +diff --git a/test/list/size b/test/list/size +index cad60b0..7716239 100644 +--- a/test/list/size ++++ b/test/list/size +@@ -1,5 +1,5 @@ + NUM FORMAT WIDTH HEIGHT PIXELS SIZE ALPHA FILENAME + 1 pnm 16 16 256 269 - test/ok/pnm +-2 jpeg 16 16 256 354 - test/ok/jpg ++2 jpg 16 16 256 354 - test/ok/jpg + 3 png 16 16 256 403 X test/ok/png + 4 gif 16 16 256 953 - test/ok/gif -- cgit v1.2.3