From 5ecd5fefd0e9fb0965662f2094c16363325ba614 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 1 May 2018 03:45:03 +0200 Subject: gnu: libgpg-error: Update to 1.29. * gnu/packages/gnupg.scm (libgpg-error): Update to 1.29. [source]: Remove upstreamed patch. * gnu/packages/patches/libgpg-error-aarch64-logging-fix.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- .../patches/libgpg-error-aarch64-logging-fix.patch | 58 ---------------------- 1 file changed, 58 deletions(-) delete mode 100644 gnu/packages/patches/libgpg-error-aarch64-logging-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/libgpg-error-aarch64-logging-fix.patch b/gnu/packages/patches/libgpg-error-aarch64-logging-fix.patch deleted file mode 100644 index d848d639b2..0000000000 --- a/gnu/packages/patches/libgpg-error-aarch64-logging-fix.patch +++ /dev/null @@ -1,58 +0,0 @@ -https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=patch;h=791177de023574223eddf7288eb7c5a0721ac623 - -From 791177de023574223eddf7288eb7c5a0721ac623 Mon Sep 17 00:00:00 2001 -From: Werner Koch -Date: Sun, 18 Mar 2018 17:39:43 +0100 -Subject: [PATCH] core: Fix regression on arm64 due to invalid use of va_list. - -* src/logging.c (_gpgrt_log_printhex): Provide a dummy arg instead of -NULL. --- - -Fix -Suggested-by: Jakub Wilk - -Signed-off-by: Werner Koch ---- - src/logging.c | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/src/logging.c b/src/logging.c -index 1a4f620..d01f974 100644 ---- a/src/logging.c -+++ b/src/logging.c -@@ -1090,9 +1090,10 @@ _gpgrt_log_flush (void) - - - /* Print a hexdump of (BUFFER,LENGTH). With FMT passed as NULL print -- * just the raw dump, with FMT being an empty string, print a trailing -- * linefeed, otherwise print an entire debug line with the expanded -- * FMT followed by a possible wrapped hexdump and a final LF. */ -+ * just the raw dump (in this case ARG_PTR is not used), with FMT -+ * being an empty string, print a trailing linefeed, otherwise print -+ * an entire debug line with the expanded FMT followed by a possible -+ * wrapped hexdump and a final LF. */ - void - _gpgrt_logv_printhex (const void *buffer, size_t length, - const char *fmt, va_list arg_ptr) -@@ -1150,7 +1151,16 @@ _gpgrt_log_printhex (const void *buffer, size_t length, - va_end (arg_ptr); - } - else -- _gpgrt_logv_printhex (buffer, length, NULL, NULL); -+ { -+ /* va_list is not necessary a pointer and thus we can't use NULL -+ * because that would conflict with platforms using a straight -+ * struct for it (e.g. arm64). We use a dummy variable instead; -+ * the static is a simple way zero it out so to not get -+ * complains about uninitialized use. */ -+ static va_list dummy_argptr; -+ -+ _gpgrt_logv_printhex (buffer, length, NULL, dummy_argptr); -+ } - } - - --- -2.8.0.rc3 - -- cgit v1.2.3 From b745e216e4e17272d2ccd8f92acd6a9065db9112 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 1 May 2018 06:12:59 +0200 Subject: gnu: cups-minimal, cups: Update to 2.2.7. * gnu/packages/cups.scm (cups-minimal): Update to 2.2.7. [source]: Add patch to build without LINUX-PAM. * gnu/packages/patches/cups-fix-builds-without-PAM.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/cups.scm | 7 +- .../patches/cups-fix-builds-without-PAM.patch | 201 +++++++++++++++++++++ 3 files changed, 207 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/cups-fix-builds-without-PAM.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 74e86d97a0..4fa88e300d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -616,6 +616,7 @@ dist_patch_DATA = \ %D%/packages/patches/crossmap-allow-system-pysam.patch \ %D%/packages/patches/clucene-contribs-lib.patch \ %D%/packages/patches/cube-nocheck.patch \ + %D%/packages/patches/cups-fix-builds-without-PAM.patch \ %D%/packages/patches/cursynth-wave-rand.patch \ %D%/packages/patches/cvs-2017-12836.patch \ %D%/packages/patches/cyrus-sasl-CVE-2013-4122.patch \ diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index a9cc3acba0..4ff79bdecb 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -173,7 +173,7 @@ (define-public cups-filters (define-public cups-minimal (package (name "cups-minimal") - (version "2.2.6") + (version "2.2.7") (source (origin (method url-fetch) @@ -181,7 +181,10 @@ (define-public cups-minimal version "/cups-" version "-source.tar.gz")) (sha256 (base32 - "16qn41b84xz6khrr2pa2wdwlqxr29rrrkjfi618gbgdkq9w5ff20")))) + "0spaqv943bzzq31gqdp73934jgyhhlbzdmgvrmf5cxvhfdxn6jrw")) + ;; “PAM will soon [in 2.3.x] be required for authentication, period.” + ;; + (patches (search-patches "cups-fix-builds-without-PAM.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags diff --git a/gnu/packages/patches/cups-fix-builds-without-PAM.patch b/gnu/packages/patches/cups-fix-builds-without-PAM.patch new file mode 100644 index 0000000000..cf51bfb0f7 --- /dev/null +++ b/gnu/packages/patches/cups-fix-builds-without-PAM.patch @@ -0,0 +1,201 @@ +From 570933a6a3597371bae1beeb754ee8711d6305ab Mon Sep 17 00:00:00 2001 +From: Michael R Sweet +Date: Mon, 2 Apr 2018 20:05:13 -0400 +Subject: [PATCH] Fix builds without PAM (Issue #5283) + +--- + CHANGES.md | 8 +++- + scheduler/auth.c | 134 ++----------------------------------------------------- + 2 files changed, 11 insertions(+), 131 deletions(-) + +diff --git a/CHANGES.md b/CHANGES.md +index f568f35af..e8fc1fbdd 100644 +--- a/CHANGES.md ++++ b/CHANGES.md +@@ -1,7 +1,13 @@ +-CHANGES - 2.2.7 - 2018-03-22 ++CHANGES - 2.2.8 - 2018-04-02 + ============================ + + ++Changes in CUPS v2.2.8 ++---------------------- ++ ++- Fixed builds without PAM (Issue #5283) ++ ++ + Changes in CUPS v2.2.7 + ---------------------- + +diff --git a/scheduler/auth.c b/scheduler/auth.c +index 8b134b5d7..fa4e2715d 100644 +--- a/scheduler/auth.c ++++ b/scheduler/auth.c +@@ -1,8 +1,8 @@ + /* + * Authorization routines for the CUPS scheduler. + * +- * Copyright 2007-2016 by Apple Inc. +- * Copyright 1997-2007 by Easy Software Products, all rights reserved. ++ * Copyright © 2007-2018 by Apple Inc. ++ * Copyright © 1997-2007 by Easy Software Products, all rights reserved. + * + * This file contains Kerberos support code, copyright 2006 by + * Jelmer Vernooij. +@@ -71,9 +71,6 @@ static int check_authref(cupsd_client_t *con, const char *right); + static int compare_locations(cupsd_location_t *a, + cupsd_location_t *b); + static cupsd_authmask_t *copy_authmask(cupsd_authmask_t *am, void *data); +-#if !HAVE_LIBPAM +-static char *cups_crypt(const char *pw, const char *salt); +-#endif /* !HAVE_LIBPAM */ + static void free_authmask(cupsd_authmask_t *am, void *data); + #if HAVE_LIBPAM + static int pam_func(int, const struct pam_message **, +@@ -694,14 +691,14 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */ + * client... + */ + +- pass = cups_crypt(password, pw->pw_passwd); ++ pass = crypt(password, pw->pw_passwd); + + if (!pass || strcmp(pw->pw_passwd, pass)) + { + # ifdef HAVE_SHADOW_H + if (spw) + { +- pass = cups_crypt(password, spw->sp_pwdp); ++ pass = crypt(password, spw->sp_pwdp); + + if (pass == NULL || strcmp(spw->sp_pwdp, pass)) + { +@@ -1995,129 +1992,6 @@ copy_authmask(cupsd_authmask_t *mask, /* I - Existing auth mask */ + } + + +-#if !HAVE_LIBPAM +-/* +- * 'cups_crypt()' - Encrypt the password using the DES or MD5 algorithms, +- * as needed. +- */ +- +-static char * /* O - Encrypted password */ +-cups_crypt(const char *pw, /* I - Password string */ +- const char *salt) /* I - Salt (key) string */ +-{ +- if (!strncmp(salt, "$1$", 3)) +- { +- /* +- * Use MD5 passwords without the benefit of PAM; this is for +- * Slackware Linux, and the algorithm was taken from the +- * old shadow-19990827/lib/md5crypt.c source code... :( +- */ +- +- int i; /* Looping var */ +- unsigned long n; /* Output number */ +- int pwlen; /* Length of password string */ +- const char *salt_end; /* End of "salt" data for MD5 */ +- char *ptr; /* Pointer into result string */ +- _cups_md5_state_t state; /* Primary MD5 state info */ +- _cups_md5_state_t state2; /* Secondary MD5 state info */ +- unsigned char digest[16]; /* MD5 digest result */ +- static char result[120]; /* Final password string */ +- +- +- /* +- * Get the salt data between dollar signs, e.g. $1$saltdata$md5. +- * Get a maximum of 8 characters of salt data after $1$... +- */ +- +- for (salt_end = salt + 3; *salt_end && (salt_end - salt) < 11; salt_end ++) +- if (*salt_end == '$') +- break; +- +- /* +- * Compute the MD5 sum we need... +- */ +- +- pwlen = strlen(pw); +- +- _cupsMD5Init(&state); +- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); +- _cupsMD5Append(&state, (unsigned char *)salt, salt_end - salt); +- +- _cupsMD5Init(&state2); +- _cupsMD5Append(&state2, (unsigned char *)pw, pwlen); +- _cupsMD5Append(&state2, (unsigned char *)salt + 3, salt_end - salt - 3); +- _cupsMD5Append(&state2, (unsigned char *)pw, pwlen); +- _cupsMD5Finish(&state2, digest); +- +- for (i = pwlen; i > 0; i -= 16) +- _cupsMD5Append(&state, digest, i > 16 ? 16 : i); +- +- for (i = pwlen; i > 0; i >>= 1) +- _cupsMD5Append(&state, (unsigned char *)((i & 1) ? "" : pw), 1); +- +- _cupsMD5Finish(&state, digest); +- +- for (i = 0; i < 1000; i ++) +- { +- _cupsMD5Init(&state); +- +- if (i & 1) +- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); +- else +- _cupsMD5Append(&state, digest, 16); +- +- if (i % 3) +- _cupsMD5Append(&state, (unsigned char *)salt + 3, salt_end - salt - 3); +- +- if (i % 7) +- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); +- +- if (i & 1) +- _cupsMD5Append(&state, digest, 16); +- else +- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); +- +- _cupsMD5Finish(&state, digest); +- } +- +- /* +- * Copy the final sum to the result string and return... +- */ +- +- memcpy(result, salt, (size_t)(salt_end - salt)); +- ptr = result + (salt_end - salt); +- *ptr++ = '$'; +- +- for (i = 0; i < 5; i ++, ptr += 4) +- { +- n = ((((unsigned)digest[i] << 8) | (unsigned)digest[i + 6]) << 8); +- +- if (i < 4) +- n |= (unsigned)digest[i + 12]; +- else +- n |= (unsigned)digest[5]; +- +- to64(ptr, n, 4); +- } +- +- to64(ptr, (unsigned)digest[11], 2); +- ptr += 2; +- *ptr = '\0'; +- +- return (result); +- } +- else +- { +- /* +- * Use the standard crypt() function... +- */ +- +- return (crypt(pw, salt)); +- } +-} +-#endif /* !HAVE_LIBPAM */ +- +- + /* + * 'free_authmask()' - Free function for auth masks. + */ -- cgit v1.2.3 From 475c11b1a7699e63467c0182da3602fbe6222378 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 9 May 2018 15:37:16 +0200 Subject: gnu: jemalloc: Update to 5.1.0. * gnu/packages/jemalloc.scm (jemalloc): Update to 5.1.0. [source](patches): Remove. * gnu/packages/patches/jemalloc-arm-address-bits.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/jemalloc.scm | 5 ++- .../patches/jemalloc-arm-address-bits.patch | 39 ---------------------- 3 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 gnu/packages/patches/jemalloc-arm-address-bits.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4fa88e300d..72de5f20b0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -802,7 +802,6 @@ dist_patch_DATA = \ %D%/packages/patches/java-xerces-bootclasspath.patch \ %D%/packages/patches/java-xerces-build_dont_unzip.patch \ %D%/packages/patches/java-xerces-xjavac_taskdef.patch \ - %D%/packages/patches/jemalloc-arm-address-bits.patch \ %D%/packages/patches/jbig2dec-ignore-testtest.patch \ %D%/packages/patches/json-glib-fix-tests-32bit.patch \ %D%/packages/patches/jq-CVE-2015-8863.patch \ diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm index 5086df7a1b..cb870208e4 100644 --- a/gnu/packages/jemalloc.scm +++ b/gnu/packages/jemalloc.scm @@ -32,7 +32,7 @@ (define-module (gnu packages jemalloc) (define-public jemalloc (package (name "jemalloc") - (version "5.0.1") + (version "5.1.0") (source (origin (method url-fetch) (uri (string-append @@ -40,8 +40,7 @@ (define-public jemalloc version "/jemalloc-" version ".tar.bz2")) (sha256 (base32 - "1sf3lzgb0y8nnyzmp4zrca3sngdxw3kfh20sna9z03jv74fph528")) - (patches (search-patches "jemalloc-arm-address-bits.patch")))) + "0s3jpcyhzia8d4k0xyc67is78kg416p9yc3c2f9w6fhhqqffd5jk")))) (build-system gnu-build-system) (arguments `(#:phases diff --git a/gnu/packages/patches/jemalloc-arm-address-bits.patch b/gnu/packages/patches/jemalloc-arm-address-bits.patch deleted file mode 100644 index f2ef24c25a..0000000000 --- a/gnu/packages/patches/jemalloc-arm-address-bits.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 8cfc9dec37b312a2686f602bbcdd102ca07cca99 Mon Sep 17 00:00:00 2001 -From: David Goldblatt -Date: Fri, 29 Sep 2017 13:54:08 -0700 -Subject: [PATCH] ARM: Don't extend bit LG_VADDR to compute high address bits. - -In userspace ARM on Linux, zero-ing the high bits is the correct way to do this. -This doesn't fix the fact that we currently set LG_VADDR to 48 on ARM, when in -fact larger virtual address sizes are coming soon. We'll cross that bridge when -we come to it. ---- - include/jemalloc/internal/rtree.h | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/include/jemalloc/internal/rtree.h b/include/jemalloc/internal/rtree.h -index b5d4db39..4563db23 100644 ---- a/include/jemalloc/internal/rtree.h -+++ b/include/jemalloc/internal/rtree.h -@@ -178,9 +178,21 @@ rtree_leaf_elm_bits_read(tsdn_t *tsdn, rtree_t *rtree, rtree_leaf_elm_t *elm, - - JEMALLOC_ALWAYS_INLINE extent_t * - rtree_leaf_elm_bits_extent_get(uintptr_t bits) { -+# ifdef __aarch64__ -+ /* -+ * aarch64 doesn't sign extend the highest virtual address bit to set -+ * the higher ones. Instead, the high bits gets zeroed. -+ */ -+ uintptr_t high_bit_mask = ((uintptr_t)1 << LG_VADDR) - 1; -+ /* Mask off the slab bit. */ -+ uintptr_t low_bit_mask = ~(uintptr_t)1; -+ uintptr_t mask = high_bit_mask & low_bit_mask; -+ return (extent_t *)(bits & mask); -+# else - /* Restore sign-extended high bits, mask slab bit. */ - return (extent_t *)((uintptr_t)((intptr_t)(bits << RTREE_NHIB) >> - RTREE_NHIB) & ~((uintptr_t)0x1)); -+# endif - } - - JEMALLOC_ALWAYS_INLINE szind_t -- cgit v1.2.3 From f68f5e28ed9ff02cac7c569b35bccc0d8df091ab Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 11 Jun 2018 13:27:47 +0200 Subject: gnu: cups, cups-minimal: Update to 2.2.8. * gnu/packages/cups.scm (cups-minimal): Update to 2.2.8. [source]: Remove patch... * gnu/packages/patches/cups-fix-builds-without-PAM.patch: ...delete... * gnu/local.mk (dist_patch_DATA): ..and remove it. --- gnu/local.mk | 1 - gnu/packages/cups.scm | 7 +- .../patches/cups-fix-builds-without-PAM.patch | 201 --------------------- 3 files changed, 2 insertions(+), 207 deletions(-) delete mode 100644 gnu/packages/patches/cups-fix-builds-without-PAM.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a4c27f6417..f901f21b55 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -621,7 +621,6 @@ dist_patch_DATA = \ %D%/packages/patches/crossmap-allow-system-pysam.patch \ %D%/packages/patches/clucene-contribs-lib.patch \ %D%/packages/patches/cube-nocheck.patch \ - %D%/packages/patches/cups-fix-builds-without-PAM.patch \ %D%/packages/patches/cursynth-wave-rand.patch \ %D%/packages/patches/cvs-2017-12836.patch \ %D%/packages/patches/cyrus-sasl-CVE-2013-4122.patch \ diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 501cadddf5..201c180013 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -173,7 +173,7 @@ (define-public cups-filters (define-public cups-minimal (package (name "cups-minimal") - (version "2.2.7") + (version "2.2.8") (source (origin (method url-fetch) @@ -181,10 +181,7 @@ (define-public cups-minimal version "/cups-" version "-source.tar.gz")) (sha256 (base32 - "0spaqv943bzzq31gqdp73934jgyhhlbzdmgvrmf5cxvhfdxn6jrw")) - ;; “PAM will soon [in 2.3.x] be required for authentication, period.” - ;; - (patches (search-patches "cups-fix-builds-without-PAM.patch")))) + "1r7r7b3nqpzc1a9dczqpj2mr8rkcwf01676v11sp4j7w4qfzqs1r")))) (build-system gnu-build-system) (arguments `(#:configure-flags diff --git a/gnu/packages/patches/cups-fix-builds-without-PAM.patch b/gnu/packages/patches/cups-fix-builds-without-PAM.patch deleted file mode 100644 index cf51bfb0f7..0000000000 --- a/gnu/packages/patches/cups-fix-builds-without-PAM.patch +++ /dev/null @@ -1,201 +0,0 @@ -From 570933a6a3597371bae1beeb754ee8711d6305ab Mon Sep 17 00:00:00 2001 -From: Michael R Sweet -Date: Mon, 2 Apr 2018 20:05:13 -0400 -Subject: [PATCH] Fix builds without PAM (Issue #5283) - ---- - CHANGES.md | 8 +++- - scheduler/auth.c | 134 ++----------------------------------------------------- - 2 files changed, 11 insertions(+), 131 deletions(-) - -diff --git a/CHANGES.md b/CHANGES.md -index f568f35af..e8fc1fbdd 100644 ---- a/CHANGES.md -+++ b/CHANGES.md -@@ -1,7 +1,13 @@ --CHANGES - 2.2.7 - 2018-03-22 -+CHANGES - 2.2.8 - 2018-04-02 - ============================ - - -+Changes in CUPS v2.2.8 -+---------------------- -+ -+- Fixed builds without PAM (Issue #5283) -+ -+ - Changes in CUPS v2.2.7 - ---------------------- - -diff --git a/scheduler/auth.c b/scheduler/auth.c -index 8b134b5d7..fa4e2715d 100644 ---- a/scheduler/auth.c -+++ b/scheduler/auth.c -@@ -1,8 +1,8 @@ - /* - * Authorization routines for the CUPS scheduler. - * -- * Copyright 2007-2016 by Apple Inc. -- * Copyright 1997-2007 by Easy Software Products, all rights reserved. -+ * Copyright © 2007-2018 by Apple Inc. -+ * Copyright © 1997-2007 by Easy Software Products, all rights reserved. - * - * This file contains Kerberos support code, copyright 2006 by - * Jelmer Vernooij. -@@ -71,9 +71,6 @@ static int check_authref(cupsd_client_t *con, const char *right); - static int compare_locations(cupsd_location_t *a, - cupsd_location_t *b); - static cupsd_authmask_t *copy_authmask(cupsd_authmask_t *am, void *data); --#if !HAVE_LIBPAM --static char *cups_crypt(const char *pw, const char *salt); --#endif /* !HAVE_LIBPAM */ - static void free_authmask(cupsd_authmask_t *am, void *data); - #if HAVE_LIBPAM - static int pam_func(int, const struct pam_message **, -@@ -694,14 +691,14 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */ - * client... - */ - -- pass = cups_crypt(password, pw->pw_passwd); -+ pass = crypt(password, pw->pw_passwd); - - if (!pass || strcmp(pw->pw_passwd, pass)) - { - # ifdef HAVE_SHADOW_H - if (spw) - { -- pass = cups_crypt(password, spw->sp_pwdp); -+ pass = crypt(password, spw->sp_pwdp); - - if (pass == NULL || strcmp(spw->sp_pwdp, pass)) - { -@@ -1995,129 +1992,6 @@ copy_authmask(cupsd_authmask_t *mask, /* I - Existing auth mask */ - } - - --#if !HAVE_LIBPAM --/* -- * 'cups_crypt()' - Encrypt the password using the DES or MD5 algorithms, -- * as needed. -- */ -- --static char * /* O - Encrypted password */ --cups_crypt(const char *pw, /* I - Password string */ -- const char *salt) /* I - Salt (key) string */ --{ -- if (!strncmp(salt, "$1$", 3)) -- { -- /* -- * Use MD5 passwords without the benefit of PAM; this is for -- * Slackware Linux, and the algorithm was taken from the -- * old shadow-19990827/lib/md5crypt.c source code... :( -- */ -- -- int i; /* Looping var */ -- unsigned long n; /* Output number */ -- int pwlen; /* Length of password string */ -- const char *salt_end; /* End of "salt" data for MD5 */ -- char *ptr; /* Pointer into result string */ -- _cups_md5_state_t state; /* Primary MD5 state info */ -- _cups_md5_state_t state2; /* Secondary MD5 state info */ -- unsigned char digest[16]; /* MD5 digest result */ -- static char result[120]; /* Final password string */ -- -- -- /* -- * Get the salt data between dollar signs, e.g. $1$saltdata$md5. -- * Get a maximum of 8 characters of salt data after $1$... -- */ -- -- for (salt_end = salt + 3; *salt_end && (salt_end - salt) < 11; salt_end ++) -- if (*salt_end == '$') -- break; -- -- /* -- * Compute the MD5 sum we need... -- */ -- -- pwlen = strlen(pw); -- -- _cupsMD5Init(&state); -- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); -- _cupsMD5Append(&state, (unsigned char *)salt, salt_end - salt); -- -- _cupsMD5Init(&state2); -- _cupsMD5Append(&state2, (unsigned char *)pw, pwlen); -- _cupsMD5Append(&state2, (unsigned char *)salt + 3, salt_end - salt - 3); -- _cupsMD5Append(&state2, (unsigned char *)pw, pwlen); -- _cupsMD5Finish(&state2, digest); -- -- for (i = pwlen; i > 0; i -= 16) -- _cupsMD5Append(&state, digest, i > 16 ? 16 : i); -- -- for (i = pwlen; i > 0; i >>= 1) -- _cupsMD5Append(&state, (unsigned char *)((i & 1) ? "" : pw), 1); -- -- _cupsMD5Finish(&state, digest); -- -- for (i = 0; i < 1000; i ++) -- { -- _cupsMD5Init(&state); -- -- if (i & 1) -- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); -- else -- _cupsMD5Append(&state, digest, 16); -- -- if (i % 3) -- _cupsMD5Append(&state, (unsigned char *)salt + 3, salt_end - salt - 3); -- -- if (i % 7) -- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); -- -- if (i & 1) -- _cupsMD5Append(&state, digest, 16); -- else -- _cupsMD5Append(&state, (unsigned char *)pw, pwlen); -- -- _cupsMD5Finish(&state, digest); -- } -- -- /* -- * Copy the final sum to the result string and return... -- */ -- -- memcpy(result, salt, (size_t)(salt_end - salt)); -- ptr = result + (salt_end - salt); -- *ptr++ = '$'; -- -- for (i = 0; i < 5; i ++, ptr += 4) -- { -- n = ((((unsigned)digest[i] << 8) | (unsigned)digest[i + 6]) << 8); -- -- if (i < 4) -- n |= (unsigned)digest[i + 12]; -- else -- n |= (unsigned)digest[5]; -- -- to64(ptr, n, 4); -- } -- -- to64(ptr, (unsigned)digest[11], 2); -- ptr += 2; -- *ptr = '\0'; -- -- return (result); -- } -- else -- { -- /* -- * Use the standard crypt() function... -- */ -- -- return (crypt(pw, salt)); -- } --} --#endif /* !HAVE_LIBPAM */ -- -- - /* - * 'free_authmask()' - Free function for auth masks. - */ -- cgit v1.2.3 From eb5d2792a0c32dd4e087359920c0375fb7486509 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 11 Jun 2018 13:35:26 +0200 Subject: gnu: freetype: Update to 2.9.1. * gnu/packages/fontutils.scm (freetype): Update to 2.9.1. [source]: Remove patch... * gnu/packages/patches/freetype-CVE-2018-6942.patch: ...delete... * gnu/local.mk (dist_patch_DATA): ...and remove it. --- gnu/local.mk | 1 - gnu/packages/fontutils.scm | 5 ++-- gnu/packages/patches/freetype-CVE-2018-6942.patch | 31 ----------------------- 3 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 gnu/packages/patches/freetype-CVE-2018-6942.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f901f21b55..5b6fe71d1c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -678,7 +678,6 @@ dist_patch_DATA = \ %D%/packages/patches/freeimage-CVE-2016-5684.patch \ %D%/packages/patches/freeimage-fix-build-with-gcc-5.patch \ %D%/packages/patches/freeimage-unbundle.patch \ - %D%/packages/patches/freetype-CVE-2018-6942.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ %D%/packages/patches/gawk-shell.patch \ %D%/packages/patches/gcc-arm-bug-71399.patch \ diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index f7dc2e7634..cf18b55aae 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -54,14 +54,13 @@ (define-module (gnu packages fontutils) (define-public freetype (package (name "freetype") - (version "2.9") + (version "2.9.1") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/freetype/freetype-" version ".tar.bz2")) (sha256 (base32 - "12jcdz1in20yaa55izxalg3hm1pf7nydfrzps5bzb4zgihybmzz6")) - (patches (search-patches "freetype-CVE-2018-6942.patch")))) + "0kg8w6qyiizlyzh4a8lpzslipcbv96hcg3rqqpnxba8ffbm8g3fv")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/patches/freetype-CVE-2018-6942.patch b/gnu/packages/patches/freetype-CVE-2018-6942.patch deleted file mode 100644 index 680f357765..0000000000 --- a/gnu/packages/patches/freetype-CVE-2018-6942.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix CVE-2018-6942: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-6942 -https://people.canonical.com/~ubuntu-security/cve/2018/CVE-2018-6942.html - -Copied from upstream (ChangeLog section removed): -https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=29c759284e305ec428703c9a5831d0b1fc3497ef - -diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c -index d855aaa..551f14a 100644 ---- a/src/truetype/ttinterp.c -+++ b/src/truetype/ttinterp.c -@@ -7532,8 +7532,16 @@ - return; - } - -- for ( i = 0; i < num_axes; i++ ) -- args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */ -+ if ( coords ) -+ { -+ for ( i = 0; i < num_axes; i++ ) -+ args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */ -+ } -+ else -+ { -+ for ( i = 0; i < num_axes; i++ ) -+ args[i] = 0; -+ } - } - - -- cgit v1.2.3 From 243ea8673f783d5a85df94b09d4ffd4bc6cc97ce Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 13 Jun 2018 23:02:31 +0200 Subject: gnu: gcc: Fix 'gcc-strmov-store-file-names.patch'. Fixes . Previously GCC would crash when encountering a 'static const' element without an initializer, as in: #define _GNU_SOURCE #include void foo (char *x) { static const char buf[12]; memcpy (x, buf, 12); } * gnu/packages/patches/gcc-strmov-store-file-names.patch: Return false when DECL_INITIAL returns NULL_TREE. --- gnu/packages/patches/gcc-strmov-store-file-names.patch | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/gcc-strmov-store-file-names.patch b/gnu/packages/patches/gcc-strmov-store-file-names.patch index 9f9162855d..7358de3326 100644 --- a/gnu/packages/patches/gcc-strmov-store-file-names.patch +++ b/gnu/packages/patches/gcc-strmov-store-file-names.patch @@ -15,7 +15,7 @@ and . --- gcc-5.3.0/gcc/builtins.c 2016-10-18 10:50:46.080616285 +0200 +++ gcc-5.3.0/gcc/builtins.c 2016-11-09 15:26:43.693042737 +0100 -@@ -3192,6 +3192,54 @@ determine_block_size (tree len, rtx len_ +@@ -3192,6 +3192,58 @@ determine_block_size (tree len, rtx len_ GET_MODE_MASK (GET_MODE (len_rtx))); } @@ -35,9 +35,13 @@ and . + if (TREE_CODE (str) == VAR_DECL + && TREE_STATIC (str) + && TREE_READONLY (str)) -+ /* STR may be a 'static const' variable whose initial value -+ is a string constant. See . */ -+ str = DECL_INITIAL (str); ++ { ++ /* STR may be a 'static const' variable whose initial value ++ is a string constant. See . */ ++ str = DECL_INITIAL (str); ++ if (str == NULL_TREE) ++ return false; ++ } + + if (TREE_CODE (str) != STRING_CST) + return false; -- cgit v1.2.3 From 6c4709889c665f194822677dc7a1fcd513e46708 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 18 Jul 2018 13:46:20 +0200 Subject: gnu: binutils: Update to 2.31.1. * gnu/packages/base.scm (binutils): Update to 2.31.1. (binutils/fixed): Remove variable * gnu/packages/linux.scm (make-linux-libre): Remove AArch64 workaround. * gnu/packages/patches/binutils-aarch64-symbol-relocation.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/base.scm | 15 ++------- gnu/packages/linux.scm | 6 ---- .../binutils-aarch64-symbol-relocation.patch | 36 ---------------------- 4 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 gnu/packages/patches/binutils-aarch64-symbol-relocation.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 1f09260a4a..80e2a43868 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -585,7 +585,6 @@ dist_patch_DATA = \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ %D%/packages/patches/beignet-correct-file-names.patch \ %D%/packages/patches/bind-CVE-2018-5738.patch \ - %D%/packages/patches/binutils-aarch64-symbol-relocation.patch \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/blast+-fix-makefile.patch \ %D%/packages/patches/boost-fix-icu-build.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index fef6002b3c..c95ab379af 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -435,14 +435,14 @@ (define-public gnu-make (define-public binutils (package (name "binutils") - (version "2.30") + (version "2.31.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/binutils/binutils-" version ".tar.bz2")) (sha256 (base32 - "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg")) + "1l34hn1zkmhr1wcrgf0d4z7r3najxnw3cx2y2fk7v55zjlk3ik7z")) (patches (search-patches "binutils-loongson-workaround.patch")))) (build-system gnu-build-system) @@ -480,17 +480,6 @@ (define-public binutils (license gpl3+) (home-page "https://www.gnu.org/software/binutils/"))) -(define-public binutils/fixed - ;; TODO: Incorporate this in binutils during the next rebuild cycle. - (hidden-package - (package - (inherit binutils) - (source (origin - (inherit (package-source binutils)) - (patches (append (origin-patches (package-source binutils)) - (search-patches - "binutils-aarch64-symbol-relocation.patch")))))))) - (define* (make-ld-wrapper name #:key (target (const #f)) binutils diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index ff3024d574..76c67f4588 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -296,12 +296,6 @@ (define* (make-linux-libre version hash supported-systems (or (%current-target-system) (%current-system))) ((or "x86_64" "i386") `(("gcc" ,gcc-7))) - ("arm64" - ;; Work around a binutils 2.30 bug where some kernel symbols would - ;; be incorrectly marked as relocatable: - ;; . - `(("ld-wrapper" ,(make-ld-wrapper "ld-wrapper" - #:binutils binutils/fixed)))) (_ '())) ,@(match (and configuration-file diff --git a/gnu/packages/patches/binutils-aarch64-symbol-relocation.patch b/gnu/packages/patches/binutils-aarch64-symbol-relocation.patch deleted file mode 100644 index fbd596862b..0000000000 --- a/gnu/packages/patches/binutils-aarch64-symbol-relocation.patch +++ /dev/null @@ -1,36 +0,0 @@ -Fix a regression in Binutils 2.30 where some symbols are incorrectly assumed -to be addresses: - -https://sourceware.org/bugzilla/show_bug.cgi?id=22764 - -Patch taken from upstream (with ChangeLog entries and tests omitted): - -https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=279b2f94168ee91e02ccd070d27c983fc001fe12 - -diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c -index af448f9..2737773 100644 ---- a/bfd/elfnn-aarch64.c -+++ b/bfd/elfnn-aarch64.c -@@ -7189,10 +7189,19 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, - #if ARCH_SIZE == 64 - case BFD_RELOC_AARCH64_32: - #endif -- if (bfd_link_pic (info) -- && (sec->flags & SEC_ALLOC) != 0 -- && (sec->flags & SEC_READONLY) != 0) -+ if (bfd_link_pic (info) && (sec->flags & SEC_ALLOC) != 0) - { -+ if (h != NULL -+ /* This is an absolute symbol. It represents a value instead -+ of an address. */ -+ && ((h->root.type == bfd_link_hash_defined -+ && bfd_is_abs_section (h->root.u.def.section)) -+ /* This is an undefined symbol. */ -+ || h->root.type == bfd_link_hash_undefined)) -+ break; -+ -+ /* For local symbols, defined global symbols in a non-ABS section, -+ it is assumed that the value is an address. */ - int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START; - _bfd_error_handler - /* xgettext:c-format */ -- cgit v1.2.3 From f94a8654d686b7ec36fdb28b6f0e8b0f48b14447 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 19 Jul 2018 00:21:02 +0200 Subject: gnu: perl: Update to 5.28.0. * gnu/packages/patches/perl-deterministic-ordering.patch: Adjust path. * gnu/packages/patches/perl-archive-tar-CVE-2018-12015.patch, gnu/packages/patches/perl-file-path-CVE-2017-6512.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. * gnu/packages/perl.scm (perl): Update to 5.28.0. [source](patches): Remove obsolete. --- gnu/local.mk | 2 - .../patches/perl-archive-tar-CVE-2018-12015.patch | 36 ----- .../patches/perl-deterministic-ordering.patch | 6 +- .../patches/perl-file-path-CVE-2017-6512.patch | 173 --------------------- gnu/packages/perl.scm | 6 +- 5 files changed, 5 insertions(+), 218 deletions(-) delete mode 100644 gnu/packages/patches/perl-archive-tar-CVE-2018-12015.patch delete mode 100644 gnu/packages/patches/perl-file-path-CVE-2017-6512.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 80e2a43868..41a10f5916 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1001,8 +1001,6 @@ dist_patch_DATA = \ %D%/packages/patches/patchutils-xfail-gendiff-tests.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/perf-gcc-ice.patch \ - %D%/packages/patches/perl-archive-tar-CVE-2018-12015.patch \ - %D%/packages/patches/perl-file-path-CVE-2017-6512.patch \ %D%/packages/patches/perl-autosplit-default-time.patch \ %D%/packages/patches/perl-dbd-mysql-CVE-2017-10788.patch \ %D%/packages/patches/perl-deterministic-ordering.patch \ diff --git a/gnu/packages/patches/perl-archive-tar-CVE-2018-12015.patch b/gnu/packages/patches/perl-archive-tar-CVE-2018-12015.patch deleted file mode 100644 index 6460cf5855..0000000000 --- a/gnu/packages/patches/perl-archive-tar-CVE-2018-12015.patch +++ /dev/null @@ -1,36 +0,0 @@ -Fix CVE-2018-12015: - -https://security-tracker.debian.org/tracker/CVE-2018-12015 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12015 -https://rt.cpan.org/Ticket/Display.html?id=125523 - -Patch taken from this upstream commit and adapted to apply to -the bundled copy in the Perl distribution: - -https://github.com/jib/archive-tar-new/commit/ae65651eab053fc6dc4590dbb863a268215c1fc5 - -diff --git a/cpan/Archive-Tar/lib/Archive/Tar.pm b/cpan/Archive-Tar/lib/Archive/Tar.pm -index 6244369..a83975f 100644 ---- a/cpan/Archive-Tar/lib/Archive/Tar.pm -+++ b/cpan/Archive-Tar/lib/Archive/Tar.pm -@@ -845,6 +845,20 @@ sub _extract_file { - return; - } - -+ ### If a file system already contains a block device with the same name as -+ ### the being extracted regular file, we would write the file's content -+ ### to the block device. So remove the existing file (block device) now. -+ ### If an archive contains multiple same-named entries, the last one -+ ### should replace the previous ones. So remove the old file now. -+ ### If the old entry is a symlink to a file outside of the CWD, the new -+ ### entry would create a file there. This is CVE-2018-12015 -+ ### . -+ if (-l $full || -e _) { -+ if (!unlink $full) { -+ $self->_error( qq[Could not remove old file '$full': $!] ); -+ return; -+ } -+ } - if( length $entry->type && $entry->is_file ) { - my $fh = IO::File->new; - $fh->open( $full, '>' ) or ( diff --git a/gnu/packages/patches/perl-deterministic-ordering.patch b/gnu/packages/patches/perl-deterministic-ordering.patch index 92e33ef135..be63d5cde3 100644 --- a/gnu/packages/patches/perl-deterministic-ordering.patch +++ b/gnu/packages/patches/perl-deterministic-ordering.patch @@ -12,10 +12,10 @@ reproducibility. cpan/Devel-PPPort/PPPort_xs.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/cpan/Devel-PPPort/PPPort_xs.PL b/cpan/Devel-PPPort/PPPort_xs.PL +diff --git a/dist/Devel-PPPort/PPPort_xs.PL b/dist/Devel-PPPort/PPPort_xs.PL index 5f18940..149f2fe 100644 ---- a/cpan/Devel-PPPort/PPPort_xs.PL -+++ b/cpan/Devel-PPPort/PPPort_xs.PL +--- a/dist/Devel-PPPort/PPPort_xs.PL ++++ b/dist/Devel-PPPort/PPPort_xs.PL @@ -38,7 +38,7 @@ END my $file; my $sec; diff --git a/gnu/packages/patches/perl-file-path-CVE-2017-6512.patch b/gnu/packages/patches/perl-file-path-CVE-2017-6512.patch deleted file mode 100644 index 28ab067599..0000000000 --- a/gnu/packages/patches/perl-file-path-CVE-2017-6512.patch +++ /dev/null @@ -1,173 +0,0 @@ -Fix CVE-2017-6512: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-6512 -https://rt.cpan.org/Public/Bug/Display.html?id=121951 - -Patch copied from Debian, adapted to apply to the copy of File::Path in Perl -5.24.0. - -https://github.com/jkeenan/File-Path/commit/e5ef95276ee8ad471c66ee574a5d42552b3a6af2 -https://anonscm.debian.org/cgit/perl/perl.git/diff/debian/patches/fixes/file_path_chmod_race.diff?id=e7b50f8fb6413f8ddfbbfda2d531615fb029e2d3 - -From d760748be0efca7c05454440e24f3df77bf7cf5d Mon Sep 17 00:00:00 2001 -From: John Lightsey -Date: Tue, 2 May 2017 12:03:52 -0500 -Subject: Prevent directory chmod race attack. - -CVE-2017-6512 is a race condition attack where the chmod() of directories -that cannot be entered is misused to change the permissions on other -files or directories on the system. This has been corrected by limiting -the directory-permission loosening logic to systems where fchmod() is -supported. - -[Backported (whitespace adjustments) to File-Path 2.12 / perl 5.24 by -Dominic Hargreaves for Debian.] - -Bug: https://rt.cpan.org/Public/Bug/Display.html?id=121951 -Bug-Debian: https://bugs.debian.org/863870 -Patch-Name: fixes/file_path_chmod_race.diff ---- - cpan/File-Path/lib/File/Path.pm | 39 +++++++++++++++++++++++++-------------- - cpan/File-Path/t/Path.t | 40 ++++++++++++++++++++++++++-------------- - 2 files changed, 51 insertions(+), 28 deletions(-) - -diff --git a/cpan/File-Path/lib/File/Path.pm b/cpan/File-Path/lib/File/Path.pm -index 034da1e..a824cc8 100644 ---- a/cpan/File-Path/lib/File/Path.pm -+++ b/cpan/File-Path/lib/File/Path.pm -@@ -354,21 +354,32 @@ sub _rmtree { - - # see if we can escalate privileges to get in - # (e.g. funny protection mask such as -w- instead of rwx) -- $perm &= oct '7777'; -- my $nperm = $perm | oct '700'; -- if ( -- !( -- $arg->{safe} -- or $nperm == $perm -- or chmod( $nperm, $root ) -- ) -- ) -- { -- _error( $arg, -- "cannot make child directory read-write-exec", $canon ); -- next ROOT_DIR; -+ # This uses fchmod to avoid traversing outside of the proper -+ # location (CVE-2017-6512) -+ my $root_fh; -+ if (open($root_fh, '<', $root)) { -+ my ($fh_dev, $fh_inode) = (stat $root_fh )[0,1]; -+ $perm &= oct '7777'; -+ my $nperm = $perm | oct '700'; -+ local $@; -+ if ( -+ !( -+ $arg->{safe} -+ or $nperm == $perm -+ or !-d _ -+ or $fh_dev ne $ldev -+ or $fh_inode ne $lino -+ or eval { chmod( $nperm, $root_fh ) } -+ ) -+ ) -+ { -+ _error( $arg, -+ "cannot make child directory read-write-exec", $canon ); -+ next ROOT_DIR; -+ } -+ close $root_fh; - } -- elsif ( !chdir($root) ) { -+ if ( !chdir($root) ) { - _error( $arg, "cannot chdir to child", $canon ); - next ROOT_DIR; - } -diff --git a/cpan/File-Path/t/Path.t b/cpan/File-Path/t/Path.t -index ff52fd6..956ca09 100644 ---- a/cpan/File-Path/t/Path.t -+++ b/cpan/File-Path/t/Path.t -@@ -3,7 +3,7 @@ - - use strict; - --use Test::More tests => 127; -+use Test::More tests => 126; - use Config; - use Fcntl ':mode'; - use lib 't/'; -@@ -18,6 +18,13 @@ BEGIN { - - my $Is_VMS = $^O eq 'VMS'; - -+my $fchmod_supported = 0; -+if (open my $fh, curdir()) { -+ my ($perm) = (stat($fh))[2]; -+ $perm &= 07777; -+ eval { $fchmod_supported = chmod( $perm, $fh); }; -+} -+ - # first check for stupid permissions second for full, so we clean up - # behind ourselves - for my $perm (0111,0777) { -@@ -299,16 +306,19 @@ is($created[0], $dir, "created directory (old style 3 mode undef) cross-check"); - - is(rmtree($dir, 0, undef), 1, "removed directory 3 verbose undef"); - --$dir = catdir($tmp_base,'G'); --$dir = VMS::Filespec::unixify($dir) if $Is_VMS; -+SKIP: { -+ skip "fchmod of directories not supported on this platform", 3 unless $fchmod_supported; -+ $dir = catdir($tmp_base,'G'); -+ $dir = VMS::Filespec::unixify($dir) if $Is_VMS; - --@created = mkpath($dir, undef, 0200); -+ @created = mkpath($dir, undef, 0400); - --is(scalar(@created), 1, "created write-only dir"); -+ is(scalar(@created), 1, "created read-only dir"); - --is($created[0], $dir, "created write-only directory cross-check"); -+ is($created[0], $dir, "created read-only directory cross-check"); - --is(rmtree($dir), 1, "removed write-only dir"); -+ is(rmtree($dir), 1, "removed read-only dir"); -+} - - # borderline new-style heuristics - if (chdir $tmp_base) { -@@ -450,26 +460,28 @@ SKIP: { - } - - SKIP : { -- my $skip_count = 19; -+ my $skip_count = 18; - # this test will fail on Windows, as per: - # http://perldoc.perl.org/perlport.html#chmod - - skip "Windows chmod test skipped", $skip_count - if $^O eq 'MSWin32'; -+ skip "fchmod() on directories is not supported on this platform", $skip_count -+ unless $fchmod_supported; - my $mode; - my $octal_mode; - my @inputs = ( -- 0777, 0700, 0070, 0007, -- 0333, 0300, 0030, 0003, -- 0111, 0100, 0010, 0001, -- 0731, 0713, 0317, 0371, 0173, 0137, -- 00 ); -+ 0777, 0700, 0470, 0407, -+ 0433, 0400, 0430, 0403, -+ 0111, 0100, 0110, 0101, -+ 0731, 0713, 0317, 0371, -+ 0173, 0137); - my $input; - my $octal_input; -- $dir = catdir($tmp_base, 'chmod_test'); - - foreach (@inputs) { - $input = $_; -+ $dir = catdir($tmp_base, sprintf("chmod_test%04o", $input)); - # We can skip from here because 0 is last in the list. - skip "Mode of 0 means assume user defaults on VMS", 1 - if ($input == 0 && $Is_VMS); diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 27b49e6652..3eb5b1eacf 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -61,18 +61,16 @@ (define-public perl ;; Yeah, Perl... It is required early in the bootstrap process by Linux. (package (name "perl") - (version "5.26.2") + (version "5.28.0") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/src/5.0/perl-" version ".tar.gz")) (sha256 (base32 - "03gpnxx1g6hvlh0v4aqx00580h787sfywp1vlvw64q2xcbm9qbsp")) + "1a3f822lcl8dr8v0hk80yyhpzqlljg49z9flb48rs3nbsij9z4ky")) (patches (search-patches - "perl-file-path-CVE-2017-6512.patch" "perl-no-sys-dirs.patch" - "perl-archive-tar-CVE-2018-12015.patch" "perl-autosplit-default-time.patch" "perl-deterministic-ordering.patch" "perl-reproducible-build-date.patch")))) -- cgit v1.2.3 From 78a9a2501d121c370684a86ffe105ffdc8ca7d70 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 19 Jul 2018 23:15:12 +0200 Subject: gnu: texinfo: Fix FTBFS with Perl 5.28. * gnu/packages/patches/texinfo-perl-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/texinfo.scm (texinfo)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/patches/texinfo-perl-compat.patch | 51 ++++++++++++++++++++++++++ gnu/packages/texinfo.scm | 1 + 3 files changed, 53 insertions(+) create mode 100644 gnu/packages/patches/texinfo-perl-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 41a10f5916..45a7f06032 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1137,6 +1137,7 @@ dist_patch_DATA = \ %D%/packages/patches/tcsh-fix-out-of-bounds-read.patch \ %D%/packages/patches/teensy-loader-cli-help.patch \ %D%/packages/patches/teeworlds-use-latest-wavpack.patch \ + %D%/packages/patches/texinfo-perl-compat.patch \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ %D%/packages/patches/thefuck-test-environ.patch \ diff --git a/gnu/packages/patches/texinfo-perl-compat.patch b/gnu/packages/patches/texinfo-perl-compat.patch new file mode 100644 index 0000000000..a7348fde0d --- /dev/null +++ b/gnu/packages/patches/texinfo-perl-compat.patch @@ -0,0 +1,51 @@ +Fix compatibility with newer Perls. + +The first patch is taken from upstream: +https://svn.savannah.gnu.org/viewvc/texinfo?view=revision&revision=8008 + +The second gets rid of a deprecation warning that breaks some tests. +Taken from Fedora: . + +--- trunk/tp/Texinfo/Convert/XSParagraph/xspara.c 2017/04/30 14:57:26 7765 ++++ trunk/tp/Texinfo/Convert/XSParagraph/xspara.c 2018/07/13 15:39:29 8008 +@@ -248,6 +248,11 @@ + + dTHX; + ++#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8) ++ /* needed due to thread-safe locale handling in newer perls */ ++ switch_to_global_locale(); ++#endif ++ + if (setlocale (LC_CTYPE, "en_US.UTF-8") + || setlocale (LC_CTYPE, "en_US.utf8")) + goto success; +@@ -320,6 +325,10 @@ + { + success: ; + free (utf8_locale); ++#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8) ++ /* needed due to thread-safe locale handling in newer perls */ ++ sync_locale(); ++#endif + /* + fprintf (stderr, "tried to set LC_CTYPE to UTF-8.\n"); + fprintf (stderr, "character encoding is: %s\n", + +diff -up texinfo-6.5/tp/Texinfo/Parser.pm.orig texinfo-6.5/tp/Texinfo/Parser.pm +--- texinfo-6.5/tp/Texinfo/Parser.pm.orig 2018-06-12 13:40:29.356030136 +0200 ++++ texinfo-6.5/tp/Texinfo/Parser.pm 2018-06-12 13:41:28.357725639 +0200 +@@ -5478,11 +5478,11 @@ sub _parse_special_misc_command($$$$) + } + } elsif ($command eq 'clickstyle') { + # REMACRO +- if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) { ++ if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*/) { + $args = ['@'.$1]; + $self->{'clickstyle'} = $1; + $remaining = $line; +- $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//; ++ $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*(\@(c|comment)((\@|\s+).*)?)?//; + $has_comment = 1 if (defined($4)); + } else { + $self->line_error (sprintf($self->__( diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 109a24bf62..5fe7f1ec9c 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -37,6 +37,7 @@ (define-public texinfo (method url-fetch) (uri (string-append "mirror://gnu/texinfo/texinfo-" version ".tar.xz")) + (patches (search-patches "texinfo-perl-compat.patch")) (sha256 (base32 "0qjzvbvnv9003xdrcpi3jp7y68j4hq2ciw9frh2hghh698zlnxvp")))) -- cgit v1.2.3 From fc8778e2934e623b4cfae253942a721cea42a43b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 24 Jul 2018 01:09:39 +0200 Subject: gnu: gdb: Fix build with Python >= 3.7. * gnu/packages/patches/gdb-python-3.7.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/gdb.scm (gdb)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/gdb.scm | 1 + gnu/packages/patches/gdb-python-3.7.patch | 52 +++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 gnu/packages/patches/gdb-python-3.7.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e2bdd4742d..b8189eb2c9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -709,6 +709,7 @@ dist_patch_DATA = \ %D%/packages/patches/gd-CVE-2018-5711.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-freetype-test-failure.patch \ + %D%/packages/patches/gdb-python-3.7.patch \ %D%/packages/patches/gemma-intel-compat.patch \ %D%/packages/patches/geoclue-config.patch \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index 36ccb79d67..4c47cc5854 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -42,6 +42,7 @@ (define-public gdb (method url-fetch) (uri (string-append "mirror://gnu/gdb/gdb-" version ".tar.xz")) + (patches (search-patches "gdb-python-3.7.patch")) (sha256 (base32 "0d2bpqk58fqlx21rbnk8mbcjlggzc9kb5sjirrfrrrjq70ka0qdg")))) diff --git a/gnu/packages/patches/gdb-python-3.7.patch b/gnu/packages/patches/gdb-python-3.7.patch new file mode 100644 index 0000000000..c51442c8b2 --- /dev/null +++ b/gnu/packages/patches/gdb-python-3.7.patch @@ -0,0 +1,52 @@ +Fix build failure with Python 3.7 and newer. + +Taken from this upstream commit, sans ChangeLog update: + +https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=aeab512851bf6ed623d1c6c4305b6ce05e51a10c + +diff --git a/gdb/python/python.c b/gdb/python/python.c +index 1805c90..20fc674 100644 +--- a/gdb/python/python.c ++++ b/gdb/python/python.c +@@ -1667,6 +1667,17 @@ finalize_python (void *ignore) + restore_active_ext_lang (previous_active); + } + ++#ifdef IS_PY3K ++/* This is called via the PyImport_AppendInittab mechanism called ++ during initialization, to make the built-in _gdb module known to ++ Python. */ ++PyMODINIT_FUNC ++init__gdb_module (void) ++{ ++ return PyModule_Create (&python_GdbModuleDef); ++} ++#endif ++ + static bool + do_start_initialization () + { +@@ -1707,6 +1718,9 @@ do_start_initialization () + remain alive for the duration of the program's execution, so + it is not freed after this call. */ + Py_SetProgramName (progname_copy); ++ ++ /* Define _gdb as a built-in module. */ ++ PyImport_AppendInittab ("_gdb", init__gdb_module); + #else + Py_SetProgramName (progname.release ()); + #endif +@@ -1716,9 +1730,7 @@ do_start_initialization () + PyEval_InitThreads (); + + #ifdef IS_PY3K +- gdb_module = PyModule_Create (&python_GdbModuleDef); +- /* Add _gdb module to the list of known built-in modules. */ +- _PyImport_FixupBuiltin (gdb_module, "_gdb"); ++ gdb_module = PyImport_ImportModule ("_gdb"); + #else + gdb_module = Py_InitModule ("_gdb", python_GdbMethods); + #endif +-- +2.9.3 + -- cgit v1.2.3 From 4e8d9015e06ca3ea432da1b53f7518c767d32a11 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 8 Aug 2018 14:18:10 +0200 Subject: gnu: e2fsprogs: Update to 1.44.3. * gnu/packages/linux.scm (e2fsprogs): Update to 1.44.3. * gnu/packages/patches/e2fsprogs-glibc-2.27.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/linux.scm | 5 +-- gnu/packages/patches/e2fsprogs-glibc-2.27.patch | 56 ------------------------- 3 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 gnu/packages/patches/e2fsprogs-glibc-2.27.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 44b275e95c..9eb6360375 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -644,7 +644,6 @@ dist_patch_DATA = \ %D%/packages/patches/doxygen-gcc-ice.patch \ %D%/packages/patches/doxygen-test.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ - %D%/packages/patches/e2fsprogs-glibc-2.27.patch \ %D%/packages/patches/eigen-arm-neon-fixes.patch \ %D%/packages/patches/elfutils-tests-ptrace.patch \ %D%/packages/patches/elogind-glibc-2.27.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 3adc0d68e0..3665080218 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -732,7 +732,7 @@ (define-public usbutils (define-public e2fsprogs (package (name "e2fsprogs") - (version "1.43.6") + (version "1.44.3") (source (origin (method url-fetch) (uri (string-append @@ -741,8 +741,7 @@ (define-public e2fsprogs name "-" version ".tar.xz")) (sha256 (base32 - "00ilv65dzcgiap435j89xk86shf7rrav3wsik7cahy789qijdcn9")) - (patches (search-patches "e2fsprogs-glibc-2.27.patch")))) + "1djb9qnid1j0vvna2bhq4jsz2ig1xckbx7h4d86cr0gl61yrz2ax")))) (build-system gnu-build-system) (inputs `(("util-linux" ,util-linux))) (native-inputs `(("pkg-config" ,pkg-config) diff --git a/gnu/packages/patches/e2fsprogs-glibc-2.27.patch b/gnu/packages/patches/e2fsprogs-glibc-2.27.patch deleted file mode 100644 index f0bc7130c0..0000000000 --- a/gnu/packages/patches/e2fsprogs-glibc-2.27.patch +++ /dev/null @@ -1,56 +0,0 @@ -Copied from: -https://github.com/openwrt/openwrt/blob/58a95f0f8ff768b43d68eed2b6a786e0f40f723b/tools/e2fsprogs/patches/005-misc-rename-copy_file_range-to-copy_file_chunk.patch - -From 01551bdba16ab16512a01affe02ade32c41ede8a Mon Sep 17 00:00:00 2001 -From: Palmer Dabbelt -Date: Fri, 29 Dec 2017 10:19:51 -0800 -Subject: [PATCH] misc: rename copy_file_range to copy_file_chunk - -As of 2.27, glibc will have a copy_file_range library call to wrap the -new copy_file_range system call. This conflicts with the function in -misc/create_inode.c, which this patch renames _copy_file_range. - -Signed-off-by: Palmer Dabbelt -Signed-off-by: Theodore Ts'o ---- - misc/create_inode.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/misc/create_inode.c -+++ b/misc/create_inode.c -@@ -392,7 +392,7 @@ static ssize_t my_pread(int fd, void *bu - } - #endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */ - --static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file, -+static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file, - off_t start, off_t end, char *buf, - char *zerobuf) - { -@@ -466,7 +466,7 @@ static errcode_t try_lseek_copy(ext2_fil - - data_blk = data & ~(fs->blocksize - 1); - hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1); -- err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf, -+ err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf, - zerobuf); - if (err) - return err; -@@ -516,7 +516,7 @@ static errcode_t try_fiemap_copy(ext2_fi - } - for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents; - i++, ext++) { -- err = copy_file_range(fs, fd, e2_file, ext->fe_logical, -+ err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical, - ext->fe_logical + ext->fe_length, - buf, zerobuf); - if (err) -@@ -569,7 +569,7 @@ static errcode_t copy_file(ext2_filsys f - goto out; - #endif - -- err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf, -+ err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf, - zerobuf); - out: - ext2fs_free_mem(&zerobuf); -- cgit v1.2.3 From a3baaaa07a77ae03e891ed5b462d0836d8a2a66e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 10 Aug 2018 16:00:22 +0200 Subject: gnu: meson: Update to 0.47.1. * gnu/packages/build-tools.scm (meson): Update to 0.47.1. * gnu/packages/patches/meson-for-build-rpath.patch: Adjust. --- gnu/packages/build-tools.scm | 6 ++-- gnu/packages/patches/meson-for-build-rpath.patch | 36 +++++++++++++----------- 2 files changed, 22 insertions(+), 20 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index e693aec4ac..aaae0a0a6e 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017 Ricardo Wurmus +;;; Copyright © 2017, 2018 Ricardo Wurmus ;;; Copyright © 2017 Corentin Bocquillon ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Fis Trivial @@ -100,7 +100,7 @@ (define-public bear (define-public meson (package (name "meson") - (version "0.46.1") + (version "0.47.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/mesonbuild/meson/" @@ -108,7 +108,7 @@ (define-public meson version ".tar.gz")) (sha256 (base32 - "0y7f5hhy16q99l7x06x8sid9p9dbg6d7i60zs7c07cz5ww1plj8r")))) + "19mdap2ncvczajx220bd73xmwhd8x906382y18cn9c5syxwxwwyn")))) (build-system python-build-system) (arguments `(;; FIXME: Tests require many additional inputs, a fix for the RUNPATH diff --git a/gnu/packages/patches/meson-for-build-rpath.patch b/gnu/packages/patches/meson-for-build-rpath.patch index 2151d53565..04c07d05bf 100644 --- a/gnu/packages/patches/meson-for-build-rpath.patch +++ b/gnu/packages/patches/meson-for-build-rpath.patch @@ -2,22 +2,24 @@ This patch removes a part of meson that clears the rpath upon installation. This will only be applied to a special version of meson, used for the meson-build-system. -Patch by Peter Mikkelsen - ---- meson-0.42.0/mesonbuild/scripts/meson_install.py.orig 2017-09-09 01:49:39.147374148 +0200 -+++ meson-0.42.0/mesonbuild/scripts/meson_install.py 2017-09-09 01:51:01.209134717 +0200 -@@ -391,14 +391,6 @@ - print("Symlink creation does not work on this platform. " - "Skipping all symlinking.") - printed_symlink_error = True -- if os.path.isfile(outname): -- try: -- depfixer.fix_rpath(outname, install_rpath, False) -- except SystemExit as e: -- if isinstance(e.code, int) and e.code == 0: -- pass -- else: -- raise +Patch for Meson 0.42.0 by Peter Mikkelsen +Adjusted for Meson 0.47.1 by Ricardo Wurmus +--- meson-0.47.1/mesonbuild/minstall.py.old 2018-08-10 11:01:27.812327013 +0200 ++++ meson-0.47.1/mesonbuild/minstall.py 2018-08-10 11:01:51.940368505 +0200 +@@ -436,15 +436,6 @@ + print("Symlink creation does not work on this platform. " + "Skipping all symlinking.") + printed_symlink_error = True +- if os.path.isfile(outname): +- try: +- depfixer.fix_rpath(outname, install_rpath, final_path, +- install_name_mappings, verbose=False) +- except SystemExit as e: +- if isinstance(e.code, int) and e.code == 0: +- pass +- else: +- raise + def run(args): - global install_log_file + parser = buildparser() -- cgit v1.2.3 From 4866cba66ae40d722bb6c50b7dca27725ffa4532 Mon Sep 17 00:00:00 2001 From: Björn Höfling Date: Thu, 9 Aug 2018 16:45:45 +0200 Subject: gnu: libgcrypt: Make build reproducible. * gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gnupg.scm (libgcrypt)[source]: Use it. Signed-off-by: Leo Famulari --- gnu/local.mk | 1 + gnu/packages/gnupg.scm | 4 ++- .../libgcrypt-make-yat2m-reproducible.patch | 32 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 1e2ce8f49e..341e1c4fdf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -860,6 +860,7 @@ dist_patch_DATA = \ %D%/packages/patches/libevent-2.1-skip-failing-test.patch \ %D%/packages/patches/libexif-CVE-2016-6328.patch \ %D%/packages/patches/libexif-CVE-2017-7544.patch \ + %D%/packages/patches/libgcrypt-make-yat2m-reproducible.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ %D%/packages/patches/libgdata-fix-tests.patch \ %D%/packages/patches/libgdata-glib-duplicate-tests.patch \ diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 54b44996ef..942f975e56 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -101,7 +101,9 @@ (define-public libgcrypt version ".tar.bz2")) (sha256 (base32 - "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36")))) + "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36")) + (patches + (search-patches "libgcrypt-make-yat2m-reproducible.patch")))) (build-system gnu-build-system) (propagated-inputs `(("libgpg-error-host" ,libgpg-error))) diff --git a/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch b/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch new file mode 100644 index 0000000000..3056f0baad --- /dev/null +++ b/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch @@ -0,0 +1,32 @@ +Make yat2m in libgcrypt respect SOURCE_DATE_EPOCH, making +the build reproducible. + +This was already fixed upstream in GnuPG: +https://dev.gnupg.org/rG139de02b93773615bdd95e04a7f0c1ad73b4f6fb + +and in libgpg-error: +https://dev.gnupg.org/rE5494a5728418938d2e42158bb646b07124184e64 + + +--- a/doc/yat2m.c 2017-11-23 19:16:58.000000000 +0100 ++++ b/doc/yat2m.c 2017-08-28 12:22:54.000000000 +0200 +@@ -1475,6 +1484,7 @@ + main (int argc, char **argv) + { + int last_argc = -1; ++ const char *s; + + opt_source = "GNU"; + opt_release = ""; +@@ -1608,6 +1618,11 @@ + if (argc > 1) + die ("usage: " PGM " [OPTION] [FILE] (try --help for more information)\n"); + ++ /* Take care of supplied timestamp for reproducible builds. See ++ * https://reproducible-builds.org/specs/source-date-epoch/ */ ++ if (!opt_date && (s = getenv ("SOURCE_DATE_EPOCH")) && *s) ++ opt_date = s; ++ + /* Start processing. */ + if (argc && strcmp (*argv, "-")) + { -- cgit v1.2.3 From fb76ef8477f189d35c1e91bf026236f5627f3a27 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 22 Aug 2018 16:45:17 +0200 Subject: gnu: Remove GCC ICE workarounds. * gnu/packages/patches/doxygen-gcc-ice.patch, gnu/packages/patches/mariadb-gcc-ice.patch, gnu/packages/patches/perf-gcc-ice.patch: Delete files * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/databases.scm (mariadb)[source](patches): Likewise. * gnu/packages/linux.scm (perf)[source](patches): Likewise. * gnu/packages/documentation.scm (doxygen)[inputs, arguments]: Likewise. --- gnu/local.mk | 3 --- gnu/packages/databases.scm | 3 +-- gnu/packages/documentation.scm | 15 +-------------- gnu/packages/linux.scm | 4 +--- gnu/packages/patches/doxygen-gcc-ice.patch | 25 ------------------------- gnu/packages/patches/mariadb-gcc-ice.patch | 24 ------------------------ gnu/packages/patches/perf-gcc-ice.patch | 13 ------------- 7 files changed, 3 insertions(+), 84 deletions(-) delete mode 100644 gnu/packages/patches/doxygen-gcc-ice.patch delete mode 100644 gnu/packages/patches/mariadb-gcc-ice.patch delete mode 100644 gnu/packages/patches/perf-gcc-ice.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 341e1c4fdf..e4a7c3d141 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -641,7 +641,6 @@ dist_patch_DATA = \ %D%/packages/patches/doc++-include-directives.patch \ %D%/packages/patches/doc++-segfault-fix.patch \ %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ - %D%/packages/patches/doxygen-gcc-ice.patch \ %D%/packages/patches/doxygen-test.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ %D%/packages/patches/eigen-arm-neon-fixes.patch \ @@ -927,7 +926,6 @@ dist_patch_DATA = \ %D%/packages/patches/mailutils-uninitialized-memory.patch \ %D%/packages/patches/make-glibc-compat.patch \ %D%/packages/patches/make-impure-dirs.patch \ - %D%/packages/patches/mariadb-gcc-ice.patch \ %D%/packages/patches/mariadb-client-test-32bit.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ @@ -1008,7 +1006,6 @@ dist_patch_DATA = \ %D%/packages/patches/patchelf-rework-for-arm.patch \ %D%/packages/patches/patchutils-xfail-gendiff-tests.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ - %D%/packages/patches/perf-gcc-ice.patch \ %D%/packages/patches/perl-autosplit-default-time.patch \ %D%/packages/patches/perl-dbd-mysql-CVE-2017-10788.patch \ %D%/packages/patches/perl-deterministic-ordering.patch \ diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index bf0484197b..4c0a6d4c28 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -636,8 +636,7 @@ (define-public mariadb (sha256 (base32 "0k9walaglwmwdwmkq48ir17g98n83vliyyg5wck22rjgxn2xk4cy")) - (patches (search-patches "mariadb-gcc-ice.patch" - "mariadb-client-test-32bit.patch")) + (patches (search-patches "mariadb-client-test-32bit.patch")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index f533535f03..9425df707c 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -139,23 +139,10 @@ (define-public doxygen ("libxml2" ,libxml2) ; provides xmllint for the tests ("python" ,python-2))) ; for creating the documentation (inputs - `(("bash" ,bash-minimal) - ,@(if (string-prefix? "armhf-" (%current-system)) - `(("gcc-ice-patch" ,@(search-patches "doxygen-gcc-ice.patch"))) - '()))) + `(("bash" ,bash-minimal))) (arguments `(#:test-target "tests" #:phases (modify-phases %standard-phases - ;; Work around an ICE that shows up on native compiles for - ;; armhf-linux. - ,@(if (string-prefix? "armhf-" (%current-system)) - `((add-after 'unpack 'apply-gcc-patch - (lambda* (#:key inputs #:allow-other-keys) - (let ((patch (assoc-ref inputs "gcc-ice-patch"))) - (invoke "patch" "-p1" "--force" - "--input" patch))))) - '()) - (add-before 'configure 'patch-sh (lambda* (#:key inputs #:allow-other-keys) (substitute* "src/portable.cpp" diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index d7958ac470..cbb8f8f01f 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2508,9 +2508,7 @@ (define-public perf (package (name "perf") (version (package-version linux-libre)) - (source (origin - (inherit (package-source linux-libre)) - (patches (search-patches "perf-gcc-ice.patch")))) + (source (package-source linux-libre)) (build-system gnu-build-system) (arguments '(#:phases diff --git a/gnu/packages/patches/doxygen-gcc-ice.patch b/gnu/packages/patches/doxygen-gcc-ice.patch deleted file mode 100644 index fbfedcb7ab..0000000000 --- a/gnu/packages/patches/doxygen-gcc-ice.patch +++ /dev/null @@ -1,25 +0,0 @@ -Work around this GCC ICE: . It shows up -only when doing native compiles on armhf-linux. - -Yes it's a terrible patch, but it does the job. - ---- doxygen-1.8.13/qtools/qutfcodec.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ doxygen-1.8.13/qtools/qutfcodec.cpp 2018-06-08 14:14:29.614009929 +0200 -@@ -189,7 +189,7 @@ int QUtf16Codec::heuristicContentMatch(c - } - - -- -+volatile const void *bomPointer = &QChar::byteOrderMark; - - class QUtf16Encoder : public QTextEncoder { - bool headerdone; -@@ -209,7 +209,7 @@ public: - headerdone = TRUE; - len_in_out = (1+uc.length())*(int)sizeof(QChar); - QCString d(len_in_out); -- memcpy(d.rawData(),&QChar::byteOrderMark,sizeof(QChar)); -+ memcpy(d.rawData(),(void *)bomPointer,sizeof(QChar)); - memcpy(d.rawData()+sizeof(QChar),uc.unicode(),uc.length()*sizeof(QChar)); - return d; - } diff --git a/gnu/packages/patches/mariadb-gcc-ice.patch b/gnu/packages/patches/mariadb-gcc-ice.patch deleted file mode 100644 index 59b188f45a..0000000000 --- a/gnu/packages/patches/mariadb-gcc-ice.patch +++ /dev/null @@ -1,24 +0,0 @@ -Work around this GCC ICE: . It shows up -only when doing native compiles on armhf-linux. - ---- mariadb-10.1.33/plugin/semisync/semisync_master.cc 2018-07-28 02:13:12.604020250 +0200 -+++ mariadb-10.1.33/plugin/semisync/semisync_master.cc 2018-07-28 02:14:11.907753417 +0200 -@@ -847,6 +847,8 @@ - return function_exit(kWho, 0); - } - -+volatile const void *kSyncHeaderPtr = &ReplSemiSyncMaster::kSyncHeader; -+ - int ReplSemiSyncMaster::reserveSyncHeader(unsigned char *header, - unsigned long size) - { -@@ -873,7 +875,7 @@ - /* Set the magic number and the sync status. By default, no sync - * is required. - */ -- memcpy(header, kSyncHeader, sizeof(kSyncHeader)); -+ memcpy(header, (void *)kSyncHeaderPtr, sizeof(kSyncHeader)); - hlen= sizeof(kSyncHeader); - } - return function_exit(kWho, hlen); - diff --git a/gnu/packages/patches/perf-gcc-ice.patch b/gnu/packages/patches/perf-gcc-ice.patch deleted file mode 100644 index 58ab5359c2..0000000000 --- a/gnu/packages/patches/perf-gcc-ice.patch +++ /dev/null @@ -1,13 +0,0 @@ -Work around this GCC ICE: . - ---- linux-4.16.13/tools/perf/util/header.c 2018-06-04 11:30:39.368146035 +0200 -+++ linux-4.16.13/tools/perf/util/header.c 2018-06-04 11:34:04.667212378 +0200 -@@ -135,7 +135,7 @@ int do_write(struct feat_fd *ff, const v - int write_padded(struct feat_fd *ff, const void *bf, - size_t count, size_t count_aligned) - { -- static const char zero_buf[NAME_ALIGN]; -+ static const char zero_buf[NAME_ALIGN] = { 0 }; - int err = do_write(ff, bf, count); - - if (!err) -- cgit v1.2.3 From e13b547407b0db6c0f8205154ea43d6f99e8b186 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 1 Aug 2018 16:13:45 +0200 Subject: gnu: glibc: Update to 2.28. * gnu/packages/patches/glibc-2.28-git-fixes.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/base.scm (glibc/linux): Update to 2.28. [source](patches): Add 'glibc-2.28-git-fixes.patch'. Remove 2.27 equivalent. (glibc-2.28): Remove variable. (glibc-2.27): New public variable --- gnu/local.mk | 1 + gnu/packages/base.scm | 28 +-- gnu/packages/patches/glibc-2.28-git-fixes.patch | 248 ++++++++++++++++++++++++ 3 files changed, 263 insertions(+), 14 deletions(-) create mode 100644 gnu/packages/patches/glibc-2.28-git-fixes.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e4a7c3d141..d1228b9261 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -740,6 +740,7 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-vectorized-strcspn-guards.patch \ %D%/packages/patches/glibc-versioned-locpath.patch \ %D%/packages/patches/glibc-2.27-git-fixes.patch \ + %D%/packages/patches/glibc-2.28-git-fixes.patch \ %D%/packages/patches/glusterfs-use-PATH-instead-of-hardcodes.patch \ %D%/packages/patches/glog-gcc-5-demangling.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 572d64f53a..c073672473 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -561,13 +561,13 @@ (define-public glibc/linux (name "glibc") ;; Note: Always use a dot after the minor version since various places rely ;; on "version-major+minor" to determine where locales are found. - (version "2.27") + (version "2.28") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji")) + "10iha5ynvdj5m62vgpgqbq4cwvc2yhyl2w9yyyjgfxmdmx8h145i")) (snippet ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is ;; required on LFS distros to avoid loading the distro's libc.so @@ -579,7 +579,7 @@ (define-public glibc/linux #t)) (modules '((guix build utils))) (patches (search-patches "glibc-ldd-x86_64.patch" - "glibc-2.27-git-fixes.patch" + "glibc-2.28-git-fixes.patch" "glibc-hidden-visibility-ldconfig.patch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" @@ -862,25 +862,25 @@ (define* (glibc-for-target #:optional (define-syntax glibc (identifier-syntax (glibc-for-target))) -;; The "next" libc. Useful for populating locale data before reconfiguring the -;; entire system on it. Will be the default in the next rebuild cycle. -(define-public glibc-2.28 +;; Below are old libc versions, which we use mostly to build locale data in +;; the old format (which the new libc cannot cope with.) + +(define-public glibc-2.27 (package (inherit glibc) - (version "2.28") + (version "2.27") (source (origin (inherit (package-source glibc)) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "10iha5ynvdj5m62vgpgqbq4cwvc2yhyl2w9yyyjgfxmdmx8h145i")) - (patches (search-patches "glibc-allow-kernel-2.6.32.patch" - "glibc-ldd-x86_64.patch" + "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji")) + (patches (search-patches "glibc-ldd-x86_64.patch" + "glibc-2.27-git-fixes.patch" "glibc-hidden-visibility-ldconfig.patch" - "glibc-versioned-locpath.patch")))))) - -;; Below are old libc versions, which we use mostly to build locale data in -;; the old format (which the new libc cannot cope with.) + "glibc-versioned-locpath.patch" + "glibc-allow-kernel-2.6.32.patch" + "glibc-reinstate-prlimit64-fallback.patch")))))) (define-public glibc-2.26 (package diff --git a/gnu/packages/patches/glibc-2.28-git-fixes.patch b/gnu/packages/patches/glibc-2.28-git-fixes.patch new file mode 100644 index 0000000000..7e370ef0b1 --- /dev/null +++ b/gnu/packages/patches/glibc-2.28-git-fixes.patch @@ -0,0 +1,248 @@ +This file contains fixes from the "release/2.28/master" branch: +https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/release/2.28/master + +Currently we have these commits (sans tests and ChangeLog updates): +7f11842e7483da7aa9fa3031be122021978ef600 +726e1554ce4db5e35af41cb0110c54c5e1232054 +4b25485f03158959cff45379eecc1d73c7dcdd11 +d05b05d1570ba3ae354a2f5a3cfeefb373b09979 +bfcfa22589f2b4277a65e60c6b736b6bbfbd87d0 +2f498f3d140ab5152bd784df2be7af7d9c5e63ed + +diff --git a/htl/Versions b/htl/Versions +index 6a63a1b8a1..c5a616da10 100644 +--- a/htl/Versions ++++ b/htl/Versions +@@ -150,6 +150,8 @@ libpthread { + __cthread_keycreate; + __cthread_getspecific; + __cthread_setspecific; ++ __pthread_getspecific; ++ __pthread_setspecific; + __pthread_getattr_np; + __pthread_attr_getstack; + } + +diff --git a/sysdeps/htl/pt-getspecific.c b/sysdeps/htl/pt-getspecific.c +index a0227a67f6..64ddf9551a 100644 +--- a/sysdeps/htl/pt-getspecific.c ++++ b/sysdeps/htl/pt-getspecific.c +@@ -36,3 +36,4 @@ __pthread_getspecific (pthread_key_t key) + return self->thread_specifics[key]; + } + strong_alias (__pthread_getspecific, pthread_getspecific); ++hidden_def (__pthread_getspecific) +diff --git a/sysdeps/htl/pt-setspecific.c b/sysdeps/htl/pt-setspecific.c +index a46a12f157..02aff417ef 100644 +--- a/sysdeps/htl/pt-setspecific.c ++++ b/sysdeps/htl/pt-setspecific.c +@@ -48,3 +48,4 @@ __pthread_setspecific (pthread_key_t key, const void *value) + return 0; + } + strong_alias (__pthread_setspecific, pthread_setspecific); ++hidden_def (__pthread_setspecific) +diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h +index 132ac1718e..71c2fcd9c6 100644 +--- a/sysdeps/htl/pthreadP.h ++++ b/sysdeps/htl/pthreadP.h +@@ -68,6 +68,8 @@ struct __pthread_cancelation_handler **___pthread_get_cleanup_stack (void) attri + + #if IS_IN (libpthread) + hidden_proto (__pthread_key_create) ++hidden_proto (__pthread_getspecific) ++hidden_proto (__pthread_setspecific) + hidden_proto (_pthread_mutex_init) + #endif + +diff --git a/sysdeps/unix/sysv/linux/getdents64.c b/sysdeps/unix/sysv/linux/getdents64.c +index 3bde0cf4f0..bc140b5a7f 100644 +--- a/sysdeps/unix/sysv/linux/getdents64.c ++++ b/sysdeps/unix/sysv/linux/getdents64.c +@@ -33,41 +33,80 @@ strong_alias (__getdents64, __getdents) + # include + + # if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2) +-# include ++# include ++# include + +-/* kernel definition of as of 3.2. */ +-struct compat_linux_dirent ++static ssize_t ++handle_overflow (int fd, __off64_t offset, ssize_t count) + { +- /* Both d_ino and d_off are compat_ulong_t which are defined in all +- architectures as 'u32'. */ +- uint32_t d_ino; +- uint32_t d_off; +- unsigned short d_reclen; +- char d_name[1]; +-}; ++ /* If this is the first entry in the buffer, we can report the ++ error. */ ++ if (count == 0) ++ { ++ __set_errno (EOVERFLOW); ++ return -1; ++ } ++ ++ /* Otherwise, seek to the overflowing entry, so that the next call ++ will report the error, and return the data read so far.. */ ++ if (__lseek64 (fd, offset, SEEK_SET) != 0) ++ return -1; ++ return count; ++} + + ssize_t + __old_getdents64 (int fd, char *buf, size_t nbytes) + { +- ssize_t retval = INLINE_SYSCALL_CALL (getdents, fd, buf, nbytes); ++ /* We do not move the individual directory entries. This is only ++ possible if the target type (struct __old_dirent64) is smaller ++ than the source type. */ ++ _Static_assert (offsetof (struct __old_dirent64, d_name) ++ <= offsetof (struct dirent64, d_name), ++ "__old_dirent64 is larger than dirent64"); ++ _Static_assert (__alignof__ (struct __old_dirent64) ++ <= __alignof__ (struct dirent64), ++ "alignment of __old_dirent64 is larger than dirent64"); + +- /* The kernel added the d_type value after the name. Change this now. */ +- if (retval != -1) ++ ssize_t retval = INLINE_SYSCALL_CALL (getdents64, fd, buf, nbytes); ++ if (retval > 0) + { +- union +- { +- struct compat_linux_dirent k; +- struct dirent u; +- } *kbuf = (void *) buf; +- +- while ((char *) kbuf < buf + retval) ++ char *p = buf; ++ char *end = buf + retval; ++ while (p < end) + { +- char d_type = *((char *) kbuf + kbuf->k.d_reclen - 1); +- memmove (kbuf->u.d_name, kbuf->k.d_name, +- strlen (kbuf->k.d_name) + 1); +- kbuf->u.d_type = d_type; ++ struct dirent64 *source = (struct dirent64 *) p; ++ ++ /* Copy out the fixed-size data. */ ++ __ino_t ino = source->d_ino; ++ __off64_t offset = source->d_off; ++ unsigned int reclen = source->d_reclen; ++ unsigned char type = source->d_type; ++ ++ /* Check for ino_t overflow. */ ++ if (__glibc_unlikely (ino != source->d_ino)) ++ return handle_overflow (fd, offset, p - buf); ++ ++ /* Convert to the target layout. Use a separate struct and ++ memcpy to side-step aliasing issues. */ ++ struct __old_dirent64 result; ++ result.d_ino = ino; ++ result.d_off = offset; ++ result.d_reclen = reclen; ++ result.d_type = type; ++ ++ /* Write the fixed-sized part of the result to the ++ buffer. */ ++ size_t result_name_offset = offsetof (struct __old_dirent64, d_name); ++ memcpy (p, &result, result_name_offset); ++ ++ /* Adjust the position of the name if necessary. Copy ++ everything until the end of the record, including the ++ terminating NUL byte. */ ++ if (result_name_offset != offsetof (struct dirent64, d_name)) ++ memmove (p + result_name_offset, source->d_name, ++ reclen - offsetof (struct dirent64, d_name)); + +- kbuf = (void *) ((char *) kbuf + kbuf->k.d_reclen); ++ p += reclen; + } + } + return retval; + +diff --git a/misc/error.c b/misc/error.c +index b4e8b6c938..03378e2f2a 100644 +--- a/misc/error.c ++++ b/misc/error.c +@@ -319,6 +319,7 @@ error (int status, int errnum, const char *message, ...) + + va_start (args, message); + error_tail (status, errnum, message, args); ++ va_end (args); + + #ifdef _LIBC + _IO_funlockfile (stderr); +@@ -390,6 +391,7 @@ error_at_line (int status, int errnum, const char *file_name, + + va_start (args, message); + error_tail (status, errnum, message, args); ++ va_end (args); + + #ifdef _LIBC + _IO_funlockfile (stderr); + +diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c +index 265a02434d..7293b795b6 100644 +--- a/nscd/nscd_conf.c ++++ b/nscd/nscd_conf.c +@@ -190,7 +190,10 @@ nscd_parse_file (const char *fname, struct database_dyn dbs[lastdb]) + if (!arg1) + error (0, 0, _("Must specify user name for server-user option")); + else +- server_user = xstrdup (arg1); ++ { ++ free ((char *) server_user); ++ server_user = xstrdup (arg1); ++ } + } + else if (strcmp (entry, "stat-user") == 0) + { +@@ -198,6 +201,7 @@ nscd_parse_file (const char *fname, struct database_dyn dbs[lastdb]) + error (0, 0, _("Must specify user name for stat-user option")); + else + { ++ free ((char *) stat_user); + stat_user = xstrdup (arg1); + + struct passwd *pw = getpwnam (stat_user); + +diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c +index cfd34b66b9..35b0bfc5d2 100644 +--- a/nss/nss_files/files-alias.c ++++ b/nss/nss_files/files-alias.c +@@ -221,6 +221,13 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result, + { + while (! feof_unlocked (listfile)) + { ++ if (room_left < 2) ++ { ++ free (old_line); ++ fclose (listfile); ++ goto no_more_room; ++ } ++ + first_unused[room_left - 1] = '\xff'; + line = fgets_unlocked (first_unused, room_left, + listfile); +@@ -229,6 +236,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result, + if (first_unused[room_left - 1] != '\xff') + { + free (old_line); ++ fclose (listfile); + goto no_more_room; + } + +@@ -256,6 +264,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result, + + __alignof__ (char *))) + { + free (old_line); ++ fclose (listfile); + goto no_more_room; + } + room_left -= ((first_unused - cp) + -- cgit v1.2.3 From 1aef659e86242020c7ec813e9a1f6ad35431de9d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 1 Aug 2018 23:19:28 +0200 Subject: gnu: gcc: Fix build with glibc >= 2.28. * gnu/packages/patches/gcc-libsanitizer-ustat.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/gcc.scm (gcc-5)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/gcc.scm | 1 + gnu/packages/patches/gcc-libsanitizer-ustat.patch | 41 +++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 gnu/packages/patches/gcc-libsanitizer-ustat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index d1228b9261..9c79e843a8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -690,6 +690,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-fix-texi2pod.patch \ %D%/packages/patches/gcc-4.9-libsanitizer-fix.patch \ %D%/packages/patches/gcc-libsanitizer-fix.patch \ + %D%/packages/patches/gcc-libsanitizer-ustat.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ %D%/packages/patches/gcc-strmov-store-file-names.patch \ %D%/packages/patches/gcc-4-compile-with-gcc-5.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 46b70ce497..2e2135ab51 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -431,6 +431,7 @@ (define-public gcc-5 (base32 "11zd1hgzkli3b2v70qsm2hyqppngd4616qc96lmm9zl2kl9yl32k")) (patches (search-patches "gcc-arm-bug-71399.patch" + "gcc-libsanitizer-ustat.patch" "gcc-strmov-store-file-names.patch" "gcc-5.0-libvtv-runpath.patch" "gcc-5-source-date-epoch-1.patch" diff --git a/gnu/packages/patches/gcc-libsanitizer-ustat.patch b/gnu/packages/patches/gcc-libsanitizer-ustat.patch new file mode 100644 index 0000000000..a4e0c6affa --- /dev/null +++ b/gnu/packages/patches/gcc-libsanitizer-ustat.patch @@ -0,0 +1,41 @@ +Remove use of deprecated ustat interface in glibc 2.28: + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85835 + +Taken from upstream: + +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=260684 + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 858bb2184505..de18e56d11cf 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -157,7 +157,6 @@ typedef struct user_fpregs elf_fpregset_t; + # include + #endif + #include +-#include + #include + #include + #include +@@ -250,7 +249,19 @@ namespace __sanitizer { + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned struct_ustat_sz = sizeof(struct ustat); ++ // Use pre-computed size of struct ustat to avoid which ++ // has been removed from glibc 2.28. ++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ ++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ ++ || defined(__x86_64__) ++#define SIZEOF_STRUCT_USTAT 32 ++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ ++ || defined(__powerpc__) || defined(__s390__) ++#define SIZEOF_STRUCT_USTAT 20 ++#else ++#error Unknown size of struct ustat ++#endif ++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; + unsigned struct_rlimit64_sz = sizeof(struct rlimit64); + unsigned struct_statvfs64_sz = sizeof(struct statvfs64); + #endif // SANITIZER_LINUX && !SANITIZER_ANDROID -- cgit v1.2.3 From 95895d53b06015fa74f07643cf98f86ae21551d7 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 2 Aug 2018 13:32:29 +0200 Subject: gnu: m4: Fix FTBFS with glibc >= 2.28. * gnu/packages/patches/m4-gnulib-libio.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/m4.scm (m4)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/m4.scm | 1 + gnu/packages/patches/m4-gnulib-libio.patch | 128 +++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 gnu/packages/patches/m4-gnulib-libio.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 9c79e843a8..ab21d6b28e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -960,6 +960,7 @@ dist_patch_DATA = \ %D%/packages/patches/mupen64plus-video-z64-glew-correct-path.patch \ %D%/packages/patches/mutt-store-references.patch \ %D%/packages/patches/myrepos-CVE-2018-7032.patch \ + %D%/packages/patches/m4-gnulib-libio.patch \ %D%/packages/patches/net-tools-bitrot.patch \ %D%/packages/patches/netcdf-date-time.patch \ %D%/packages/patches/netcdf-tst_h_par.patch \ diff --git a/gnu/packages/m4.scm b/gnu/packages/m4.scm index b223ce91d1..090f5578e3 100644 --- a/gnu/packages/m4.scm +++ b/gnu/packages/m4.scm @@ -32,6 +32,7 @@ (define-public m4 (method url-fetch) (uri (string-append "mirror://gnu/m4/m4-" version ".tar.xz")) + (patches (search-patches "m4-gnulib-libio.patch")) (sha256 (base32 "01sfjd5a4waqw83bibvmn522g69qfqvwig9i2qlgy154l1nfihgj")))) diff --git a/gnu/packages/patches/m4-gnulib-libio.patch b/gnu/packages/patches/m4-gnulib-libio.patch new file mode 100644 index 0000000000..a26622ccf3 --- /dev/null +++ b/gnu/packages/patches/m4-gnulib-libio.patch @@ -0,0 +1,128 @@ +Adjust the bundled gnulib to cope with removal of libio interface in +glibc 2.28. + +Based on this upstream patch, without hunks that do not apply to m4: +https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e + +diff --git a/lib/fflush.c b/lib/fflush.c +index 983ade0..a6edfa1 100644 +--- a/lib/fflush.c ++++ b/lib/fflush.c +@@ -33,7 +33,7 @@ + #undef fflush + + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ + static void +@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp) + + #endif + +-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) ++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) + + # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT + /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ +@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream) + if (stream == NULL || ! freading (stream)) + return fflush (stream); + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + clear_ungetc_buffer_preserving_position (stream); + +diff --git a/lib/fpending.c b/lib/fpending.c +index c84e3a5..789f50e 100644 +--- a/lib/fpending.c ++++ b/lib/fpending.c +@@ -32,7 +32,7 @@ __fpending (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + return fp->_IO_write_ptr - fp->_IO_write_base; + #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ + /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ +diff --git a/lib/fpurge.c b/lib/fpurge.c +index b1d417c..3aedcc3 100644 +--- a/lib/fpurge.c ++++ b/lib/fpurge.c +@@ -62,7 +62,7 @@ fpurge (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_IO_read_end = fp->_IO_read_ptr; + fp->_IO_write_ptr = fp->_IO_write_base; + /* Avoid memory leak when there is an active ungetc buffer. */ +diff --git a/lib/freadahead.c b/lib/freadahead.c +index c2ecb5b..23ec76e 100644 +--- a/lib/freadahead.c ++++ b/lib/freadahead.c +@@ -30,7 +30,7 @@ extern size_t __sreadahead (FILE *); + size_t + freadahead (FILE *fp) + { +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + if (fp->_IO_write_ptr > fp->_IO_write_base) + return 0; + return (fp->_IO_read_end - fp->_IO_read_ptr) +diff --git a/lib/freading.c b/lib/freading.c +index 73c28ac..c24d0c8 100644 +--- a/lib/freading.c ++++ b/lib/freading.c +@@ -31,7 +31,7 @@ freading (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + return ((fp->_flags & _IO_NO_WRITES) != 0 + || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 + && fp->_IO_read_base != NULL)); +diff --git a/lib/fseeko.c b/lib/fseeko.c +index 0101ab5..193f4e8 100644 +--- a/lib/fseeko.c ++++ b/lib/fseeko.c +@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence) + #endif + + /* These tests are based on fpurge.c. */ +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + if (fp->_IO_read_end == fp->_IO_read_ptr + && fp->_IO_write_ptr == fp->_IO_write_base + && fp->_IO_save_base == NULL) +@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence) + return -1; + } + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_flags &= ~_IO_EOF_SEEN; + fp->_offset = pos; + #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ +diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h +index 78d896e..05c5752 100644 +--- a/lib/stdio-impl.h ++++ b/lib/stdio-impl.h +@@ -18,6 +18,12 @@ + the same implementation of stdio extension API, except that some fields + have different naming conventions, or their access requires some casts. */ + ++/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this ++ problem by defining it ourselves. FIXME: Do not rely on glibc ++ internals. */ ++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN ++# define _IO_IN_BACKUP 0x100 ++#endif + + /* BSD stdio derived implementations. */ + -- cgit v1.2.3 From 2fa4066c0a7c44ec5686a6197542e56c9e47fa45 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 24 Aug 2018 17:24:51 +0200 Subject: gnu: findutils: Fix build with glibc 2.28. * gnu/packages/patches/findutils-gnulib-libio.patch, gnu/packages/patches/findutils-makedev.patch: New files. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/base.scm (findutils)[source](patches): Use them. --- gnu/local.mk | 2 + gnu/packages/base.scm | 2 + gnu/packages/patches/findutils-gnulib-libio.patch | 114 ++++++++++++++++++++++ gnu/packages/patches/findutils-makedev.patch | 22 +++++ 4 files changed, 140 insertions(+) create mode 100644 gnu/packages/patches/findutils-gnulib-libio.patch create mode 100644 gnu/packages/patches/findutils-makedev.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ab21d6b28e..e98973be07 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -671,7 +671,9 @@ dist_patch_DATA = \ %D%/packages/patches/fcgi-2.4.0-poll.patch \ %D%/packages/patches/fifo-map-fix-flags-for-gcc.patch \ %D%/packages/patches/fifo-map-remove-catch.hpp.patch \ + %D%/packages/patches/findutils-gnulib-libio.patch \ %D%/packages/patches/findutils-localstatedir.patch \ + %D%/packages/patches/findutils-makedev.patch \ %D%/packages/patches/findutils-test-xargs.patch \ %D%/packages/patches/flann-cmake-3.11.patch \ %D%/packages/patches/flint-ldconfig.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 1c652bcce4..3a1186673e 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -298,7 +298,9 @@ (define-public findutils (base32 "178nn4dl7wbcw499czikirnkniwnx36argdnqgz4ik9i6zvwkm6y")) (patches (search-patches + "findutils-gnulib-libio.patch" "findutils-localstatedir.patch" + "findutils-makedev.patch" "findutils-test-xargs.patch")) (modules '((guix build utils))) (snippet diff --git a/gnu/packages/patches/findutils-gnulib-libio.patch b/gnu/packages/patches/findutils-gnulib-libio.patch new file mode 100644 index 0000000000..79f9fd914d --- /dev/null +++ b/gnu/packages/patches/findutils-gnulib-libio.patch @@ -0,0 +1,114 @@ +Adjust to removal of libio interface in glibc 2.28. + +Based on this gnulib commit: +https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e + +diff --git a/gl/lib/fflush.c b/gl/lib/fflush.c +index 5ae3e41..7a82470 100644 +--- a/gl/lib/fflush.c ++++ b/gl/lib/fflush.c +@@ -33,7 +33,7 @@ + #undef fflush + + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ + static void +@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp) + + #endif + +-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) ++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) + + # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT + /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ +@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream) + if (stream == NULL || ! freading (stream)) + return fflush (stream); + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + clear_ungetc_buffer_preserving_position (stream); + +diff --git a/gl/lib/fpurge.c b/gl/lib/fpurge.c +index f313b22..ecdf82d 100644 +--- a/gl/lib/fpurge.c ++++ b/gl/lib/fpurge.c +@@ -62,7 +62,7 @@ fpurge (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_IO_read_end = fp->_IO_read_ptr; + fp->_IO_write_ptr = fp->_IO_write_base; + /* Avoid memory leak when there is an active ungetc buffer. */ +diff --git a/gl/lib/freadahead.c b/gl/lib/freadahead.c +index 094daab..3f8101e 100644 +--- a/gl/lib/freadahead.c ++++ b/gl/lib/freadahead.c +@@ -25,7 +25,7 @@ + size_t + freadahead (FILE *fp) + { +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + if (fp->_IO_write_ptr > fp->_IO_write_base) + return 0; + return (fp->_IO_read_end - fp->_IO_read_ptr) +diff --git a/gl/lib/freading.c b/gl/lib/freading.c +index 0512b19..8c48fe4 100644 +--- a/gl/lib/freading.c ++++ b/gl/lib/freading.c +@@ -31,7 +31,7 @@ freading (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + return ((fp->_flags & _IO_NO_WRITES) != 0 + || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 + && fp->_IO_read_base != NULL)); +diff --git a/gl/lib/fseeko.c b/gl/lib/fseeko.c +index 1c65d2a..9026408 100644 +--- a/gl/lib/fseeko.c ++++ b/gl/lib/fseeko.c +@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence) + #endif + + /* These tests are based on fpurge.c. */ +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + if (fp->_IO_read_end == fp->_IO_read_ptr + && fp->_IO_write_ptr == fp->_IO_write_base + && fp->_IO_save_base == NULL) +@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence) + return -1; + } + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_flags &= ~_IO_EOF_SEEN; + fp->_offset = pos; + #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ +diff --git a/gl/lib/stdio-impl.h b/gl/lib/stdio-impl.h +index 502d891..ea38ee2 100644 +--- a/gl/lib/stdio-impl.h ++++ b/gl/lib/stdio-impl.h +@@ -18,6 +18,12 @@ + the same implementation of stdio extension API, except that some fields + have different naming conventions, or their access requires some casts. */ + ++/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this ++ problem by defining it ourselves. FIXME: Do not rely on glibc ++ internals. */ ++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN ++# define _IO_IN_BACKUP 0x100 ++#endif + + /* BSD stdio derived implementations. */ + diff --git a/gnu/packages/patches/findutils-makedev.patch b/gnu/packages/patches/findutils-makedev.patch new file mode 100644 index 0000000000..2f16c625d8 --- /dev/null +++ b/gnu/packages/patches/findutils-makedev.patch @@ -0,0 +1,22 @@ +Include for "makedev". + +Taken from this gnulib commit: +https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4da63c5881f60f71999a943612da9112232b9161 + +diff --git a/gl/lib/mountlist.c b/gl/lib/mountlist.c +index bb4e4ee21..cf4020e2a 100644 +--- a/gl/lib/mountlist.c ++++ b/gl/lib/mountlist.c +@@ -37,6 +37,12 @@ + # include + #endif + ++#if MAJOR_IN_MKDEV ++# include ++#elif MAJOR_IN_SYSMACROS ++# include ++#endif ++ + #if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */ + # if HAVE_SYS_UCRED_H + # include /* needed on OSF V4.0 for definition of NGROUPS, -- cgit v1.2.3 From c37e932764f42df90b77b97af4dd71e5b485800b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 25 Aug 2018 19:23:35 +0200 Subject: gnu: gdb: Remove obsolete patch. * gnu/packages/patches/gdb-python-3.7.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/gdb.scm (gdb)[source](patches): Remove field. --- gnu/local.mk | 1 - gnu/packages/gdb.scm | 1 - gnu/packages/patches/gdb-python-3.7.patch | 52 ------------------------------- 3 files changed, 54 deletions(-) delete mode 100644 gnu/packages/patches/gdb-python-3.7.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index aac3a66577..bacfc28c6e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -716,7 +716,6 @@ dist_patch_DATA = \ %D%/packages/patches/gd-CVE-2018-5711.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-freetype-test-failure.patch \ - %D%/packages/patches/gdb-python-3.7.patch \ %D%/packages/patches/gdm-CVE-2018-14424.patch \ %D%/packages/patches/gemma-intel-compat.patch \ %D%/packages/patches/geoclue-config.patch \ diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index d7b194685c..f0c4c8b804 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -42,7 +42,6 @@ (define-public gdb (method url-fetch) (uri (string-append "mirror://gnu/gdb/gdb-" version ".tar.xz")) - (patches (search-patches "gdb-python-3.7.patch")) (sha256 (base32 "0g6hv9xk12aa58w77fydaldqr9a6b0a6bnwsq87jfc6lkcbc7p4p")))) diff --git a/gnu/packages/patches/gdb-python-3.7.patch b/gnu/packages/patches/gdb-python-3.7.patch deleted file mode 100644 index c51442c8b2..0000000000 --- a/gnu/packages/patches/gdb-python-3.7.patch +++ /dev/null @@ -1,52 +0,0 @@ -Fix build failure with Python 3.7 and newer. - -Taken from this upstream commit, sans ChangeLog update: - -https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=aeab512851bf6ed623d1c6c4305b6ce05e51a10c - -diff --git a/gdb/python/python.c b/gdb/python/python.c -index 1805c90..20fc674 100644 ---- a/gdb/python/python.c -+++ b/gdb/python/python.c -@@ -1667,6 +1667,17 @@ finalize_python (void *ignore) - restore_active_ext_lang (previous_active); - } - -+#ifdef IS_PY3K -+/* This is called via the PyImport_AppendInittab mechanism called -+ during initialization, to make the built-in _gdb module known to -+ Python. */ -+PyMODINIT_FUNC -+init__gdb_module (void) -+{ -+ return PyModule_Create (&python_GdbModuleDef); -+} -+#endif -+ - static bool - do_start_initialization () - { -@@ -1707,6 +1718,9 @@ do_start_initialization () - remain alive for the duration of the program's execution, so - it is not freed after this call. */ - Py_SetProgramName (progname_copy); -+ -+ /* Define _gdb as a built-in module. */ -+ PyImport_AppendInittab ("_gdb", init__gdb_module); - #else - Py_SetProgramName (progname.release ()); - #endif -@@ -1716,9 +1730,7 @@ do_start_initialization () - PyEval_InitThreads (); - - #ifdef IS_PY3K -- gdb_module = PyModule_Create (&python_GdbModuleDef); -- /* Add _gdb module to the list of known built-in modules. */ -- _PyImport_FixupBuiltin (gdb_module, "_gdb"); -+ gdb_module = PyImport_ImportModule ("_gdb"); - #else - gdb_module = Py_InitModule ("_gdb", python_GdbMethods); - #endif --- -2.9.3 - -- cgit v1.2.3 From 8d48f358e965536f01a2d9b1e51f74d428091b90 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 26 Aug 2018 16:20:04 +0200 Subject: gnu: parted: Fix build with glibc >= 2.28. * gnu/packages/patches/parted-glibc-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/disk.scm (parted)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/disk.scm | 1 + gnu/packages/patches/parted-glibc-compat.patch | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 gnu/packages/patches/parted-glibc-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bacfc28c6e..0a593fac2c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1009,6 +1009,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/parted-glibc-compat.patch \ %D%/packages/patches/patchelf-page-size.patch \ %D%/packages/patches/patchelf-rework-for-arm.patch \ %D%/packages/patches/patchutils-xfail-gendiff-tests.patch \ diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index f1b3f265fe..34709b73fc 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -76,6 +76,7 @@ (define-public parted (method url-fetch) (uri (string-append "mirror://gnu/parted/parted-" version ".tar.xz")) + (patches (search-patches "parted-glibc-compat.patch")) (sha256 (base32 "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5")))) diff --git a/gnu/packages/patches/parted-glibc-compat.patch b/gnu/packages/patches/parted-glibc-compat.patch new file mode 100644 index 0000000000..edf4afb0d1 --- /dev/null +++ b/gnu/packages/patches/parted-glibc-compat.patch @@ -0,0 +1,17 @@ +Include for "major" and "minor". + +Taken from upstream: +https://git.savannah.gnu.org/cgit/parted.git/commit/?id=ba5e0451b51c983e40afd123b6e0d3eddb55e610 + +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index 31b98ab..7e86b51 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -41,6 +41,7 @@ + #include /* for uname() */ + #include + #include ++#include + #ifdef ENABLE_DEVICE_MAPPER + #include + #endif -- cgit v1.2.3 From 397334d9777592176608184adc5e59d2494719ea Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 27 Aug 2018 16:49:05 +0200 Subject: gnu: python-pillow: Update to 5.2.0. * gnu/packages/patches/python-pillow-fix-failing-tests.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/python.scm (python-pillow): Update to 5.2.0. [source](patches, patch-flags): Remove. [native-inputs]: Replace PYTHON-NOSE with PYTHON-PYTEST. [arguments]: Adjust custom check phase accordingly. --- gnu/local.mk | 1 - .../patches/python-pillow-fix-failing-tests.patch | Bin 112373 -> 0 bytes gnu/packages/python.scm | 13 +++++-------- 3 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 gnu/packages/patches/python-pillow-fix-failing-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0a593fac2c..0c74914a16 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1074,7 +1074,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-genshi-stripping-of-unsafe-script-tags.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-networkx2-reproducible-build.patch \ - %D%/packages/patches/python-pillow-fix-failing-tests.patch \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ %D%/packages/patches/python-scikit-learn-fix-test-non-determinism.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ diff --git a/gnu/packages/patches/python-pillow-fix-failing-tests.patch b/gnu/packages/patches/python-pillow-fix-failing-tests.patch deleted file mode 100644 index 2575d6f612..0000000000 Binary files a/gnu/packages/patches/python-pillow-fix-failing-tests.patch and /dev/null differ diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index a761fcfc22..6730dc3f1b 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3930,19 +3930,17 @@ (define-public python2-olefile (define-public python-pillow (package (name "python-pillow") - (version "4.3.0") + (version "5.2.0") (source (origin (method url-fetch) (uri (pypi-uri "Pillow" version)) (sha256 (base32 - "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59")) - (patch-flags '("-p1" "--binary")) - (patches (search-patches "python-pillow-fix-failing-tests.patch")))) + "1ary9mj2ddllq3lkxgn6aac7qxqiwbcg2pacrl94py58ql9x9czq")))) (build-system python-build-system) (native-inputs - `(("python-nose" ,python-nose))) + `(("python-pytest" ,python-pytest))) (inputs `(("freetype" ,freetype) ("lcms" ,lcms) @@ -3963,9 +3961,8 @@ (define-public python-pillow ;; Make installed package available for running the ;; tests (add-installed-pythonpath inputs outputs) - (and (zero? (system* "python" "selftest.py" - "--installed")) - (zero? (system* "python" "test-installed.py")))))) + (invoke "python" "selftest.py" "--installed") + (invoke "python" "-m" "pytest" "-vv")))) (delete 'check)))) (home-page "https://pypi.python.org/pypi/Pillow") (synopsis "Fork of the Python Imaging Library") -- cgit v1.2.3 From cbc8a92011d3a439b25201039941aac803870ec2 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 27 Aug 2018 19:48:55 +0200 Subject: gnu: cairo: Fix undefined behaviour. This fixes which showed up in Guix as an infinite loop during cairocffi tests. * gnu/packages/patches/cairo-setjmp-wrapper.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/gtk.scm (cairo)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/gtk.scm | 3 +- gnu/packages/patches/cairo-setjmp-wrapper.patch | 78 +++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/cairo-setjmp-wrapper.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0c74914a16..c62e6ea50e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -595,6 +595,7 @@ dist_patch_DATA = \ %D%/packages/patches/boost-fix-icu-build.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/cairo-CVE-2016-9082.patch \ + %D%/packages/patches/cairo-setjmp-wrapper.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-use-packaged-feedparser.patch \ %D%/packages/patches/catdoc-CVE-2017-11110.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 1cf99f8db1..3322860d83 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -120,7 +120,8 @@ (define-public cairo (sha256 (base32 "05mzyxkvsfc1annjw2dja8vka01ampp9pp93lg09j8hba06g144c")) - (patches (search-patches "cairo-CVE-2016-9082.patch")))) + (patches (search-patches "cairo-CVE-2016-9082.patch" + "cairo-setjmp-wrapper.patch")))) (build-system gnu-build-system) (propagated-inputs `(("fontconfig" ,fontconfig) diff --git a/gnu/packages/patches/cairo-setjmp-wrapper.patch b/gnu/packages/patches/cairo-setjmp-wrapper.patch new file mode 100644 index 0000000000..bffac6e041 --- /dev/null +++ b/gnu/packages/patches/cairo-setjmp-wrapper.patch @@ -0,0 +1,78 @@ +Revert faulty commit to avoid undefined behaviour: +https://bugs.freedesktop.org/show_bug.cgi?id=104325 + +Taken from this upstream commit: +https://cgit.freedesktop.org/cairo/commit/?h=1.14&id=2acc4382c54bd8239361ceed14423412a343d311 + +diff --git a/src/cairo-bentley-ottmann-rectangular.c b/src/cairo-bentley-ottmann-rectangular.c +index cb2e30c..5541bdc 100644 +--- a/src/cairo-bentley-ottmann-rectangular.c ++++ b/src/cairo-bentley-ottmann-rectangular.c +@@ -593,12 +593,6 @@ sweep_line_insert (sweep_line_t *sweep, rectangle_t *rectangle) + pqueue_push (sweep, rectangle); + } + +-static int +-sweep_line_setjmp (sweep_line_t *sweep_line) +-{ +- return setjmp (sweep_line->unwind); +-} +- + static cairo_status_t + _cairo_bentley_ottmann_tessellate_rectangular (rectangle_t **rectangles, + int num_rectangles, +@@ -615,7 +609,7 @@ _cairo_bentley_ottmann_tessellate_rectangular (rectangle_t **rectangles, + rectangles, num_rectangles, + fill_rule, + do_traps, container); +- if ((status = sweep_line_setjmp (&sweep_line))) ++ if ((status = setjmp (sweep_line.unwind))) + return status; + + rectangle = rectangle_pop_start (&sweep_line); +diff --git a/src/cairo-png.c b/src/cairo-png.c +index e64b14a..068617d 100644 +--- a/src/cairo-png.c ++++ b/src/cairo-png.c +@@ -158,14 +158,6 @@ png_simple_warning_callback (png_structp png, + */ + } + +-static int +-png_setjmp (png_struct *png) +-{ +-#ifdef PNG_SETJMP_SUPPORTED +- return setjmp (png_jmpbuf (png)); +-#endif +- return 0; +-} + + /* Starting with libpng-1.2.30, we must explicitly specify an output_flush_fn. + * Otherwise, we will segfault if we are writing to a stream. */ +@@ -237,8 +229,10 @@ write_png (cairo_surface_t *surface, + goto BAIL4; + } + +- if (png_setjmp (png)) ++#ifdef PNG_SETJMP_SUPPORTED ++ if (setjmp (png_jmpbuf (png))) + goto BAIL4; ++#endif + + png_set_write_fn (png, closure, write_func, png_simple_output_flush_fn); + +@@ -577,11 +571,12 @@ read_png (struct png_read_closure_t *png_closure) + png_set_read_fn (png, png_closure, stream_read_func); + + status = CAIRO_STATUS_SUCCESS; +- +- if (png_setjmp (png)) { ++#ifdef PNG_SETJMP_SUPPORTED ++ if (setjmp (png_jmpbuf (png))) { + surface = _cairo_surface_create_in_error (status); + goto BAIL; + } ++#endif + + png_read_info (png, info); + -- cgit v1.2.3 From d9362003b6cbbc77d2cab838aa06514aef6ac4f2 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 28 Aug 2018 00:39:11 +0200 Subject: gnu: GRUB: Adjust to recent binutils changes. * gnu/packages/patches/grub-binutils-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/bootloaders.scm (grub)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 3 +- gnu/packages/patches/grub-binutils-compat.patch | 53 +++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/grub-binutils-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c19d992874..e88709a13c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -771,6 +771,7 @@ dist_patch_DATA = \ %D%/packages/patches/grep-timing-sensitive-test.patch \ %D%/packages/patches/groff-source-date-epoch.patch \ %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \ + %D%/packages/patches/grub-binutils-compat.patch \ %D%/packages/patches/grub-check-error-efibootmgr.patch \ %D%/packages/patches/gsl-test-i686.patch \ %D%/packages/patches/gspell-dash-test.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index e9abf399ab..c99d5d5895 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -86,7 +86,8 @@ (define-public grub (sha256 (base32 "03vvdfhdmf16121v7xs8is2krwnv15wpkhkf16a4yf8nsfc3f2w1")) - (patches (search-patches "grub-check-error-efibootmgr.patch")))) + (patches (search-patches "grub-check-error-efibootmgr.patch" + "grub-binutils-compat.patch")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases diff --git a/gnu/packages/patches/grub-binutils-compat.patch b/gnu/packages/patches/grub-binutils-compat.patch new file mode 100644 index 0000000000..2107869314 --- /dev/null +++ b/gnu/packages/patches/grub-binutils-compat.patch @@ -0,0 +1,53 @@ +Fix a relocation issue that shows up with recent binutils. + +Patch taken from upstream: +https://git.sv.gnu.org/cgit/grub.git/commit/?id=842c390469e2c2e10b5aa36700324cd3bde25875 + +diff --git a/grub-core/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c +index e49d0b6..18facf4 100644 +--- a/grub-core/efiemu/i386/loadcore64.c ++++ b/grub-core/efiemu/i386/loadcore64.c +@@ -98,6 +98,7 @@ grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs, + break; + + case R_X86_64_PC32: ++ case R_X86_64_PLT32: + err = grub_efiemu_write_value (addr, + *addr32 + rel->r_addend + + sym.off +diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c +index 4406906..3a73e6e 100644 +--- a/grub-core/kern/x86_64/dl.c ++++ b/grub-core/kern/x86_64/dl.c +@@ -70,6 +70,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr, + break; + + case R_X86_64_PC32: ++ case R_X86_64_PLT32: + { + grub_int64_t value; + value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value - +diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c +index a2bb054..39d7efb 100644 +--- a/util/grub-mkimagexx.c ++++ b/util/grub-mkimagexx.c +@@ -841,6 +841,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections, + break; + + case R_X86_64_PC32: ++ case R_X86_64_PLT32: + { + grub_uint32_t *t32 = (grub_uint32_t *) target; + *t32 = grub_host_to_target64 (grub_target_to_host32 (*t32) +diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c +index 9179285..a79271f 100644 +--- a/util/grub-module-verifier.c ++++ b/util/grub-module-verifier.c +@@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = { + -1 + }, (int[]){ + R_X86_64_PC32, ++ R_X86_64_PLT32, + -1 + } + }, -- cgit v1.2.3 From 16de7f15cb2e9111916542dd538286d50086f100 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 26 Aug 2018 18:42:23 +0200 Subject: gnu: snappy: Optimise. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/compression.scm (snappy)[source]: Build with ‘-O2’. * gnu/package/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/compression.scm | 17 +++++----- .../snappy-add-O2-flag-in-CmakeLists.txt.patch | 36 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e88709a13c..76d6f69090 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1138,6 +1138,7 @@ dist_patch_DATA = \ %D%/packages/patches/slim-sigusr1.patch \ %D%/packages/patches/slim-reset.patch \ %D%/packages/patches/slim-login.patch \ + %D%/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch \ %D%/packages/patches/sooperlooper-build-with-wx-30.patch \ %D%/packages/patches/soundtouch-CVE-2018-14044-14045.patch \ %D%/packages/patches/soundtouch-CVE-2018-1000223.patch \ diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index f2ed53f036..e15f47ac3b 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -1187,14 +1187,15 @@ (define-public snappy (package (name "snappy") (version "1.1.7") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/google/snappy/archive/" - version ".tar.gz")) - (file-name (string-append "snappy-" version ".tar.gz")) - (sha256 - (base32 - "1m7rcdqzkys5lspj8jcsaah8w33zh28s771bw0ga2lgzfgl05yix")))) + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/google/snappy/archive/" + version ".tar.gz")) + (file-name (string-append "snappy-" version ".tar.gz")) + (sha256 + (base32 "1m7rcdqzkys5lspj8jcsaah8w33zh28s771bw0ga2lgzfgl05yix")) + (patches (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch")))) (build-system cmake-build-system) (arguments `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) diff --git a/gnu/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch b/gnu/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch new file mode 100644 index 0000000000..561763dabe --- /dev/null +++ b/gnu/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch @@ -0,0 +1,36 @@ +From: Tobias Geerinckx-Rice +Date: Sun, 26 Aug 2018 17:24:42 +0200 +Subject: [PATCH] snappy: Add O2 flag in CmakeLists.txt. + +Use ‘-O2’ optimisation when building with CMake, as is already done when +using the Makefile. This patch was copied verbatim from the Snappy +mailing list[0]. + +[0]: + +From 903c72fb29b2db07b4abc38a5feb83d88f739d80 Mon Sep 17 00:00:00 2001 +From: huangwenjun +Date: Fri, 10 Aug 2018 17:17:35 +0800 +Subject: [PATCH] Add O2 optimize flag in CmakeLists.txt. + +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 62ecd09..29e0cdc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,6 +6,9 @@ set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + ++SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") ++SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") ++ + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make + # it prominent in the GUI. + option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." OFF) +-- +2.1.0 + -- cgit v1.2.3 From a446cf26d7f386a81b8667f5ec75fb5f6232d202 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 31 Aug 2018 17:05:24 +0200 Subject: gnu: texinfo@5: Fix FTBFS with Perl >= 5.28. * gnu/packages/patches/texinfo-5-perl-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/texinfo.scm (texinfo-5)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/patches/texinfo-5-perl-compat.patch | 19 +++++++++++++++++++ gnu/packages/texinfo.scm | 1 + 3 files changed, 21 insertions(+) create mode 100644 gnu/packages/patches/texinfo-5-perl-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 76d6f69090..3309186d12 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1158,6 +1158,7 @@ dist_patch_DATA = \ %D%/packages/patches/teensy-loader-cli-help.patch \ %D%/packages/patches/teeworlds-use-latest-wavpack.patch \ %D%/packages/patches/texinfo-perl-compat.patch \ + %D%/packages/patches/texinfo-5-perl-compat.patch \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ %D%/packages/patches/thefuck-test-environ.patch \ diff --git a/gnu/packages/patches/texinfo-5-perl-compat.patch b/gnu/packages/patches/texinfo-5-perl-compat.patch new file mode 100644 index 0000000000..f16d6b4da8 --- /dev/null +++ b/gnu/packages/patches/texinfo-5-perl-compat.patch @@ -0,0 +1,19 @@ +Fix a deprecation warning with newer Perl that breaks some tests. + +--- a/tp/Texinfo/Parser.pm ++++ b/tp/Texinfo/Parser.pm +@@ -5438,12 +5438,12 @@ + } + } elsif ($command eq 'clickstyle') { + # REMACRO +- if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) { ++ if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*/) { + $args = ['@'.$1]; + $self->{'clickstyle'} = $1 + unless(_ignore_global_commands($self)); + $remaining = $line; +- $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//; ++ $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*(\@(c|comment)((\@|\s+).*)?)?//; + $has_comment = 1 if (defined($4)); + } else { + $self->line_error (sprintf($self->__( diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 5fe7f1ec9c..fa98bd56b8 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -69,6 +69,7 @@ (define-public texinfo-5 (method url-fetch) (uri (string-append "mirror://gnu/texinfo/texinfo-" version ".tar.xz")) + (patches (search-patches "texinfo-5-perl-compat.patch")) (sha256 (base32 "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal")))) -- cgit v1.2.3 From 3469a5ea47ba7481bda9b2ff144bc13efd943c87 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 31 Aug 2018 17:40:40 +0200 Subject: gnu: gcc@4.9: Fix FTBFS with Glibc >= 2.28. * gnu/packages/commencement.scm (gcc-for-libstdc++): New variable. (libstdc++-boot0): Inherit from GCC-FOR-LIBSTDC++ instead of GCC-4.9. * gnu/packages/gcc.scm (gcc-4.9)[source](patches): Add "gcc-4.9-libsanitizer-ustat.patch". * gnu/packages/patches/gcc-4.9-libsanitizer-ustat.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/commencement.scm | 15 ++++++++- gnu/packages/gcc.scm | 1 + .../patches/gcc-4.9-libsanitizer-ustat.patch | 37 ++++++++++++++++++++++ 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gcc-4.9-libsanitizer-ustat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3309186d12..29c605006c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -700,6 +700,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-fix-texi2pod.patch \ %D%/packages/patches/gcc-4.8-libsanitizer-fix.patch \ %D%/packages/patches/gcc-4.9-libsanitizer-fix.patch \ + %D%/packages/patches/gcc-4.9-libsanitizer-ustat.patch \ %D%/packages/patches/gcc-libsanitizer-fix.patch \ %D%/packages/patches/gcc-libsanitizer-ustat.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 30a0ffcec9..0aa65fe638 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -186,12 +186,25 @@ (define (remove-triplet-prefix name) ,cf))))) (inputs %boot0-inputs)))) +;; Use a "fixed" package source for this early libstdc++ variant so we can +;; update GCC 4.9 without triggering a full rebuild. +(define gcc-for-libstdc++ + (package + (inherit gcc-4.9) + (source (origin + (inherit (package-source gcc-4.9)) + (patches (search-patches "gcc-4.9-libsanitizer-fix.patch" + "gcc-arm-bug-71399.patch" + "gcc-asan-missing-include.patch" + "gcc-libvtv-runpath.patch" + "gcc-fix-texi2pod.patch")))))) + (define libstdc++-boot0 ;; GCC's libcc1 is always built as a shared library (the top-level ;; 'Makefile.def' forcefully adds --enable-shared) and thus needs to refer ;; to libstdc++.so. We cannot build libstdc++-5.3 because it relies on ;; C++14 features missing in some of our bootstrap compilers. - (let ((lib (package-with-bootstrap-guile (make-libstdc++ gcc-4.9)))) + (let ((lib (package-with-bootstrap-guile (make-libstdc++ gcc-for-libstdc++)))) (package (inherit lib) (name "libstdc++-boot0") diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index e5b1433f92..520f5cba0b 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -398,6 +398,7 @@ (define-public gcc-4.9 (base32 "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc")) (patches (search-patches "gcc-4.9-libsanitizer-fix.patch" + "gcc-4.9-libsanitizer-ustat.patch" "gcc-arm-bug-71399.patch" "gcc-asan-missing-include.patch" "gcc-libvtv-runpath.patch" diff --git a/gnu/packages/patches/gcc-4.9-libsanitizer-ustat.patch b/gnu/packages/patches/gcc-4.9-libsanitizer-ustat.patch new file mode 100644 index 0000000000..795881ab9b --- /dev/null +++ b/gnu/packages/patches/gcc-4.9-libsanitizer-ustat.patch @@ -0,0 +1,37 @@ +Remove use of deprecated ustat interface in glibc 2.28: +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85835 + +Adapted to GCC 4 series from this upstream patch: +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=260684 + +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -81,7 +81,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -163,7 +162,19 @@ + unsigned struct_old_utsname_sz = sizeof(struct old_utsname); + unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname); + unsigned struct_itimerspec_sz = sizeof(struct itimerspec); +- unsigned struct_ustat_sz = sizeof(struct ustat); ++ // Use pre-computed size of struct ustat to avoid which ++ // has been removed from glibc 2.28. ++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ ++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ ++ || defined(__x86_64__) ++#define SIZEOF_STRUCT_USTAT 32 ++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ ++ || defined(__powerpc__) || defined(__s390__) ++#define SIZEOF_STRUCT_USTAT 20 ++#else ++#error Unknown size of struct ustat ++#endif ++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; + #endif // SANITIZER_LINUX + + #if SANITIZER_LINUX && !SANITIZER_ANDROID -- cgit v1.2.3 From 279ed3efee9c71116d368163f805fe9494518687 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 1 Sep 2018 12:48:08 +0200 Subject: gnu: qtbase: Fix build with glibc >= 2.28. * gnu/packages/patches/qtbase-glibc-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/qt.scm (qtbase)[source](patches): Use it. [arguments]: Remove "--no-feature-renameat2" from #:configure-flags. --- gnu/local.mk | 1 + gnu/packages/patches/qtbase-glibc-compat.patch | 50 ++++++++++++++++++++++++++ gnu/packages/qt.scm | 4 +-- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/qtbase-glibc-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 29c605006c..806a5f3c2a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1097,6 +1097,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-waitress-fix-tests.patch \ %D%/packages/patches/qemu-glibc-2.27.patch \ %D%/packages/patches/qt4-ldflags.patch \ + %D%/packages/patches/qtbase-glibc-compat.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ %D%/packages/patches/quagga-reproducible-build.patch \ diff --git a/gnu/packages/patches/qtbase-glibc-compat.patch b/gnu/packages/patches/qtbase-glibc-compat.patch new file mode 100644 index 0000000000..15a2540b3a --- /dev/null +++ b/gnu/packages/patches/qtbase-glibc-compat.patch @@ -0,0 +1,50 @@ +Fix qmake build with glibc 2.28. + +Taken from upstream: +https://code.qt.io/cgit/qt/qtbase.git/commit/?id=25feee4e061b99edab79503d81f5bd045c6c8e3d + +diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h +index 3469ebe5e6..c5585ea32a 100644 +--- a/src/corelib/global/qconfig-bootstrapped.h ++++ b/src/corelib/global/qconfig-bootstrapped.h +@@ -98,10 +98,18 @@ + #define QT_NO_QOBJECT + #define QT_FEATURE_process -1 + #define QT_FEATURE_regularexpression -1 +-#define QT_FEATURE_renameat2 -1 ++#ifdef __GLIBC_PREREQ ++# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1) ++#else ++# define QT_FEATURE_renameat2 -1 ++#endif + #define QT_FEATURE_sharedmemory -1 + #define QT_FEATURE_slog2 -1 +-#define QT_FEATURE_statx -1 ++#ifdef __GLIBC_PREREQ ++# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1) ++#else ++# define QT_FEATURE_statx -1 ++#endif + #define QT_FEATURE_syslog -1 + #define QT_NO_SYSTEMLOCALE + #define QT_FEATURE_systemsemaphore -1 +diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp +index 0c9cdb8667..deb4a9f220 100644 +--- a/src/corelib/io/qfilesystemengine_unix.cpp ++++ b/src/corelib/io/qfilesystemengine_unix.cpp +@@ -91,7 +91,6 @@ extern "C" NSString *NSTemporaryDirectory(); + # include + # include + # include +-# include + + // in case linux/fs.h is too old and doesn't define it: + #ifndef FICLONE +@@ -112,6 +111,7 @@ static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newp + # endif + + # if !QT_CONFIG(statx) && defined(SYS_statx) ++# include + static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf) + { return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); } + # elif !QT_CONFIG(statx) && !defined(SYS_statx) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index f6eb2831fd..affba14e98 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -494,7 +494,8 @@ (define-public qtbase (base32 "0ipv18ypbgpxhh49rfplqmflskmnhhwj1bjr5hrwi0jpvar4gl50")) ;; Use TZDIR to avoid depending on package "tzdata". - (patches (search-patches "qtbase-use-TZDIR.patch")) + (patches (search-patches "qtbase-use-TZDIR.patch" + "qtbase-glibc-compat.patch")) (modules '((guix build utils))) (snippet ;; corelib uses bundled harfbuzz, md4, md5, sha3 @@ -608,7 +609,6 @@ (define-public qtbase ;; kernels that the glibc supports, including the RHEL6 ;; (2.6.32) and RHEL7 (3.10) kernels. "-no-feature-getentropy" ; requires Linux 3.17 - "-no-feature-renameat2" ; requires Linux 3.16 ;; Do not build examples; if desired, these could go ;; into a separate output, but for the time being, we -- cgit v1.2.3 From 842c44c9746f2acb132aab276338b1fac2143364 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 9 Sep 2018 17:54:32 +0200 Subject: gnu: ghostscript: Remove graft for 9.24. * gnu/packages/patches/ghostscript-CVE-2018-10194.patch, gnu/packages/patches/ghostscript-runpath.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. * gnu/packages/ghostscript.scm (ghostscript): Update to 9.24. (ghostscript/fixed): Remove variable. --- gnu/local.mk | 2 - gnu/packages/ghostscript.scm | 57 +++++----------------- .../patches/ghostscript-CVE-2018-10194.patch | 52 -------------------- gnu/packages/patches/ghostscript-runpath.patch | 18 ------- 4 files changed, 13 insertions(+), 116 deletions(-) delete mode 100644 gnu/packages/patches/ghostscript-CVE-2018-10194.patch delete mode 100644 gnu/packages/patches/ghostscript-runpath.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c3cd1d4084..fbc9628227 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -728,13 +728,11 @@ dist_patch_DATA = \ %D%/packages/patches/geoclue-config.patch \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \ - %D%/packages/patches/ghostscript-CVE-2018-10194.patch \ %D%/packages/patches/ghostscript-CVE-2018-16509.patch \ %D%/packages/patches/ghostscript-bug-699708.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ - %D%/packages/patches/ghostscript-runpath.patch \ %D%/packages/patches/giflib-make-reallocarray-private.patch \ %D%/packages/patches/glib-networking-ssl-cert-file.patch \ %D%/packages/patches/glib-tests-timer.patch \ diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 3808d81524..b46451d94e 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -135,8 +135,7 @@ (define-public psutils (define-public ghostscript (package (name "ghostscript") - (replacement ghostscript/fixed) - (version "9.23") + (version "9.24") (source (origin (method url-fetch) @@ -146,9 +145,9 @@ (define-public ghostscript "/ghostscript-" version ".tar.xz")) (sha256 (base32 - "1ng8d9fm5lza7k1f7ybc791275c07z5hcmpkrl2i226nshkxrkhz")) - (patches (search-patches "ghostscript-runpath.patch" - "ghostscript-CVE-2018-10194.patch" + "1mk922rnml93w2g42yxiyn8xqanc50cm65irrgh0b6lp4kgifjfl")) + (patches (search-patches "ghostscript-CVE-2018-16509.patch" + "ghostscript-bug-699708.patch" "ghostscript-no-header-creationdate.patch" "ghostscript-no-header-id.patch" "ghostscript-no-header-uuid.patch")) @@ -167,7 +166,9 @@ (define-public ghostscript (arguments `(#:disallowed-references ("doc") #:configure-flags - (list "--with-system-libtiff" + (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + "--with-system-libtiff" "LIBS=-lz" (string-append "ZLIBDIR=" (assoc-ref %build-inputs "zlib") "/include") @@ -185,6 +186,12 @@ (define-public ghostscript '())) #:phases (modify-phases %standard-phases + (add-before 'configure 'create-output-directory + (lambda* (#:key outputs #:allow-other-keys) + ;; The configure script refuses to function if the directory + ;; specified as -rpath does not already exist. + (mkdir-p (string-append (assoc-ref outputs "out") "/lib")) + #t)) (add-after 'configure 'remove-doc-reference (lambda _ ;; Don't retain a reference to the 'doc' output in 'gs'. @@ -255,44 +262,6 @@ (define-public ghostscript (home-page "https://www.ghostscript.com/") (license license:agpl3+))) -(define-public ghostscript/fixed - (hidden-package - (package - (inherit ghostscript) - (version "9.24") - (source - (origin - (inherit (package-source ghostscript)) - (uri (string-append "https://github.com/ArtifexSoftware/" - "ghostpdl-downloads/releases/download/gs" - (string-delete #\. version) - "/ghostscript-" version ".tar.xz")) - (sha256 - (base32 - "1mk922rnml93w2g42yxiyn8xqanc50cm65irrgh0b6lp4kgifjfl")) - (patches (search-patches "ghostscript-CVE-2018-16509.patch" - "ghostscript-bug-699708.patch" - "ghostscript-no-header-creationdate.patch" - "ghostscript-no-header-id.patch" - "ghostscript-no-header-uuid.patch")))) - (arguments - (substitute-keyword-arguments (package-arguments ghostscript) - ((#:configure-flags flags) - ;; Notice that we removed the 'ghostscript-runpath' patch above. - ;; The reason is that it conflicts with an upstream change that - ;; takes LDFLAGS into account. - `(cons (string-append "LDFLAGS=-Wl,-rpath=" - (assoc-ref %outputs "out") "/lib") - ,flags)) - ((#:phases phases) - `(modify-phases ,phases - (add-before 'configure 'create-output-directory - (lambda* (#:key outputs #:allow-other-keys) - ;; Unfortunately the configure script refuses to function if - ;; the directory specified as -rpath does not already exist. - (mkdir-p (string-append (assoc-ref outputs "out") "/lib")) - #t))))))))) - (define-public ghostscript/x (package/inherit ghostscript (name (string-append (package-name ghostscript) "-with-x")) diff --git a/gnu/packages/patches/ghostscript-CVE-2018-10194.patch b/gnu/packages/patches/ghostscript-CVE-2018-10194.patch deleted file mode 100644 index 242e57c27c..0000000000 --- a/gnu/packages/patches/ghostscript-CVE-2018-10194.patch +++ /dev/null @@ -1,52 +0,0 @@ -Fix CVE-2018-10194: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-10194 -https://bugs.ghostscript.com/show_bug.cgi?id=699255 - -Patch copied from upstream source repository: - -https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=39b1e54b2968620723bf32e96764c88797714879 - -From 39b1e54b2968620723bf32e96764c88797714879 Mon Sep 17 00:00:00 2001 -From: Ken Sharp -Date: Wed, 18 Apr 2018 15:46:32 +0100 -Subject: [PATCH] pdfwrite - Guard against trying to output an infinite number - -Bug #699255 " Buffer overflow on pprintg1 due to mishandle postscript file data to pdf" - -The file uses an enormous parameter to xyxhow, causing an overflow in -the calculation of text positioning (value > 1e39). - -Since this is basically a nonsense value, and PostScript only supports -real values up to 1e38, this patch follows the same approach as for -a degenerate CTM, and treats it as 0. - -Adobe Acrobat Distiller throws a limitcheck error, so we could do that -instead if this approach proves to be a problem. ---- - devices/vector/gdevpdts.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/devices/vector/gdevpdts.c b/devices/vector/gdevpdts.c -index 848ad781f..172fe6bc3 100644 ---- a/devices/vector/gdevpdts.c -+++ b/devices/vector/gdevpdts.c -@@ -103,9 +103,14 @@ append_text_move(pdf_text_state_t *pts, double dw) - static int - set_text_distance(gs_point *pdist, double dx, double dy, const gs_matrix *pmat) - { -- int code = gs_distance_transform_inverse(dx, dy, pmat, pdist); -+ int code; - double rounded; - -+ if (dx > 1e38 || dy > 1e38) -+ code = gs_error_undefinedresult; -+ else -+ code = gs_distance_transform_inverse(dx, dy, pmat, pdist); -+ - if (code == gs_error_undefinedresult) { - /* The CTM is degenerate. - Can't know the distance in user space. --- -2.18.0 - diff --git a/gnu/packages/patches/ghostscript-runpath.patch b/gnu/packages/patches/ghostscript-runpath.patch deleted file mode 100644 index 9f161e45b3..0000000000 --- a/gnu/packages/patches/ghostscript-runpath.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/base/unix-dll.mak b/base/unix-dll.mak -index 9d57a99..36ef1ff 100644 ---- a/base/unix-dll.mak -+++ b/base/unix-dll.mak -@@ -171,11 +171,11 @@ gpdl-so-links-subtarget: $(GPDL_SO) $(UNIX_DLL_MAK) $(MAKEDIRS) - # Build the small Ghostscript loaders, with Gtk+ and without - $(GSSOC_XE): gs-so-links-subtarget $(PSSRC)$(SOC_LOADER) $(UNIX_DLL_MAK) $(MAKEDIRS) - $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)dxmainc.c \ -- -L$(BINDIR) -l$(GS_SO_BASE) -+ -L$(BINDIR) -l$(GS_SO_BASE) -Wl,-rpath=$(libdir) - - $(GSSOX_XE): gs-so-links-subtarget $(PSSRC)$(SOC_LOADER) $(UNIX_DLL_MAK) $(MAKEDIRS) - $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(PSSRC)$(SOC_LOADER) \ -- -L$(BINDIR) -l$(GS_SO_BASE) $(SOC_LIBS) -+ -L$(BINDIR) -l$(GS_SO_BASE) $(SOC_LIBS) -Wl,-rpath=$(libdir) - - $(PCLSOC_XE): gpcl6-so-links-subtarget $(PLSRC)$(REALMAIN_SRC).c $(UNIX_DLL_MAK) $(MAKEDIRS) - $(GLCC) -g -o $(PCLSOC_XE) $(PLSRC)$(REALMAIN_SRC).c -L$(BINDIR) -l$(PCL_SO_BASE) -- cgit v1.2.3 From 0171019418435888afb6024d04702683482d0294 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 9 Sep 2018 17:57:39 +0200 Subject: gnu: openssl: Update to 1.0.2p. * gnu/packages/patches/openssl-1.0.2-CVE-2018-0495.patch, gnu/packages/patches/openssl-1.0.2-CVE-2018-0732.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. * gnu/packages/tls.scm (openssl): Update to 1.0.2p. [source](patches): Remove obsolete. --- gnu/local.mk | 2 - .../patches/openssl-1.0.2-CVE-2018-0495.patch | 215 --------------------- .../patches/openssl-1.0.2-CVE-2018-0732.patch | 50 ----- gnu/packages/tls.scm | 6 +- 4 files changed, 2 insertions(+), 271 deletions(-) delete mode 100644 gnu/packages/patches/openssl-1.0.2-CVE-2018-0495.patch delete mode 100644 gnu/packages/patches/openssl-1.0.2-CVE-2018-0732.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index fbc9628227..ce1f8cc173 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1010,8 +1010,6 @@ dist_patch_DATA = \ %D%/packages/patches/openocd-nrf52.patch \ %D%/packages/patches/opensmtpd-fix-crash.patch \ %D%/packages/patches/openssl-runpath.patch \ - %D%/packages/patches/openssl-1.0.2-CVE-2018-0495.patch \ - %D%/packages/patches/openssl-1.0.2-CVE-2018-0732.patch \ %D%/packages/patches/openssl-1.1.0-c-rehash-in.patch \ %D%/packages/patches/openssl-c-rehash-in.patch \ %D%/packages/patches/orpheus-cast-errors-and-includes.patch \ diff --git a/gnu/packages/patches/openssl-1.0.2-CVE-2018-0495.patch b/gnu/packages/patches/openssl-1.0.2-CVE-2018-0495.patch deleted file mode 100644 index 2d54ed03b9..0000000000 --- a/gnu/packages/patches/openssl-1.0.2-CVE-2018-0495.patch +++ /dev/null @@ -1,215 +0,0 @@ -Fix CVE-2018-0495: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-0495 -https://www.nccgroup.trust/us/our-research/technical-advisory-return-of-the-hidden-number-problem/ - -Patch copied from upstream source repository: - -https://github.com/openssl/openssl/commit/949ff36623eafc3523a9f91784992965018ffb05 - -From 949ff36623eafc3523a9f91784992965018ffb05 Mon Sep 17 00:00:00 2001 -From: Matt Caswell -Date: Fri, 25 May 2018 12:10:13 +0100 -Subject: [PATCH] Add blinding to an ECDSA signature - -Keegan Ryan (NCC Group) has demonstrated a side channel attack on an -ECDSA signature operation. During signing the signer calculates: - -s:= k^-1 * (m + r * priv_key) mod order - -The addition operation above provides a sufficient signal for a -flush+reload attack to derive the private key given sufficient signature -operations. - -As a mitigation (based on a suggestion from Keegan) we add blinding to -the operation so that: - -s := k^-1 * blind^-1 (blind * m + blind * r * priv_key) mod order - -Since this attack is a localhost side channel only no CVE is assigned. - -Reviewed-by: Rich Salz ---- - CHANGES | 4 ++ - crypto/ecdsa/ecdsatest.c | 9 ++++- - crypto/ecdsa/ecs_ossl.c | 82 ++++++++++++++++++++++++++++++++-------- - 3 files changed, 79 insertions(+), 16 deletions(-) - -diff --git a/crypto/ecdsa/ecdsatest.c b/crypto/ecdsa/ecdsatest.c -index 0f301f86d9..a130fc9117 100644 ---- a/crypto/ecdsa/ecdsatest.c -+++ b/crypto/ecdsa/ecdsatest.c -@@ -137,7 +137,7 @@ int restore_rand(void) - return 1; - } - --static int fbytes_counter = 0; -+static int fbytes_counter = 0, use_fake = 0; - static const char *numbers[8] = { - "651056770906015076056810763456358567190100156695615665659", - "6140507067065001063065065565667405560006161556565665656654", -@@ -158,6 +158,11 @@ int fbytes(unsigned char *buf, int num) - int ret; - BIGNUM *tmp = NULL; - -+ if (use_fake == 0) -+ return old_rand->bytes(buf, num); -+ -+ use_fake = 0; -+ - if (fbytes_counter >= 8) - return 0; - tmp = BN_new(); -@@ -199,11 +204,13 @@ int x9_62_test_internal(BIO *out, int nid, const char *r_in, const char *s_in) - /* create the key */ - if ((key = EC_KEY_new_by_curve_name(nid)) == NULL) - goto x962_int_err; -+ use_fake = 1; - if (!EC_KEY_generate_key(key)) - goto x962_int_err; - BIO_printf(out, "."); - (void)BIO_flush(out); - /* create the signature */ -+ use_fake = 1; - signature = ECDSA_do_sign(digest, 20, key); - if (signature == NULL) - goto x962_int_err; -diff --git a/crypto/ecdsa/ecs_ossl.c b/crypto/ecdsa/ecs_ossl.c -index 16d4f59b9b..1d37551803 100644 ---- a/crypto/ecdsa/ecs_ossl.c -+++ b/crypto/ecdsa/ecs_ossl.c -@@ -252,6 +252,7 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len, - { - int ok = 0, i; - BIGNUM *kinv = NULL, *s, *m = NULL, *tmp = NULL, *order = NULL; -+ BIGNUM *blind = NULL, *blindm = NULL; - const BIGNUM *ckinv; - BN_CTX *ctx = NULL; - const EC_GROUP *group; -@@ -269,14 +270,25 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len, - } - - ret = ECDSA_SIG_new(); -- if (!ret) { -+ if (ret == NULL) { - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); - return NULL; - } - s = ret->s; - -- if ((ctx = BN_CTX_new()) == NULL || (order = BN_new()) == NULL || -- (tmp = BN_new()) == NULL || (m = BN_new()) == NULL) { -+ ctx = BN_CTX_new(); -+ if (ctx == NULL) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); -+ goto err; -+ } -+ -+ BN_CTX_start(ctx); -+ order = BN_CTX_get(ctx); -+ tmp = BN_CTX_get(ctx); -+ m = BN_CTX_get(ctx); -+ blind = BN_CTX_get(ctx); -+ blindm = BN_CTX_get(ctx); -+ if (blindm == NULL) { - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); - goto err; - } -@@ -315,26 +327,70 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len, - } - } - -- if (!BN_mod_mul(tmp, priv_key, ret->r, order, ctx)) { -+ /* -+ * The normal signature calculation is: -+ * -+ * s := k^-1 * (m + r * priv_key) mod order -+ * -+ * We will blind this to protect against side channel attacks -+ * -+ * s := k^-1 * blind^-1 * (blind * m + blind * r * priv_key) mod order -+ */ -+ -+ /* Generate a blinding value */ -+ do { -+ if (!BN_rand(blind, BN_num_bits(order) - 1, -1, 0)) -+ goto err; -+ } while (BN_is_zero(blind)); -+ BN_set_flags(blind, BN_FLG_CONSTTIME); -+ BN_set_flags(blindm, BN_FLG_CONSTTIME); -+ BN_set_flags(tmp, BN_FLG_CONSTTIME); -+ -+ /* tmp := blind * priv_key * r mod order */ -+ if (!BN_mod_mul(tmp, blind, priv_key, order, ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ if (!BN_mod_mul(tmp, tmp, ret->r, order, ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* blindm := blind * m mod order */ -+ if (!BN_mod_mul(blindm, blind, m, order, ctx)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* s : = (blind * priv_key * r) + (blind * m) mod order */ -+ if (!BN_mod_add_quick(s, tmp, blindm, order)) { -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); -+ goto err; -+ } -+ -+ /* s:= s * blind^-1 mod order */ -+ if (BN_mod_inverse(blind, blind, order, ctx) == NULL) { - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); - goto err; - } -- if (!BN_mod_add_quick(s, tmp, m, order)) { -+ if (!BN_mod_mul(s, s, blind, order, ctx)) { - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); - goto err; - } -+ -+ /* s := s * k^-1 mod order */ - if (!BN_mod_mul(s, s, ckinv, order, ctx)) { - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); - goto err; - } -+ - if (BN_is_zero(s)) { - /* - * if kinv and r have been supplied by the caller don't to - * generate new kinv and r values - */ - if (in_kinv != NULL && in_r != NULL) { -- ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, -- ECDSA_R_NEED_NEW_SETUP_VALUES); -+ ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ECDSA_R_NEED_NEW_SETUP_VALUES); - goto err; - } - } else -@@ -349,15 +405,11 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len, - ECDSA_SIG_free(ret); - ret = NULL; - } -- if (ctx) -+ if (ctx != NULL) { -+ BN_CTX_end(ctx); - BN_CTX_free(ctx); -- if (m) -- BN_clear_free(m); -- if (tmp) -- BN_clear_free(tmp); -- if (order) -- BN_free(order); -- if (kinv) -+ } -+ if (kinv != NULL) - BN_clear_free(kinv); - return ret; - } --- -2.17.1 - diff --git a/gnu/packages/patches/openssl-1.0.2-CVE-2018-0732.patch b/gnu/packages/patches/openssl-1.0.2-CVE-2018-0732.patch deleted file mode 100644 index 50b95306a5..0000000000 --- a/gnu/packages/patches/openssl-1.0.2-CVE-2018-0732.patch +++ /dev/null @@ -1,50 +0,0 @@ -Fix CVE-2018-0732: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-0732 - -Patch copied from upstream source repository: - -https://github.com/openssl/openssl/commit/3984ef0b72831da8b3ece4745cac4f8575b19098 - -From 3984ef0b72831da8b3ece4745cac4f8575b19098 Mon Sep 17 00:00:00 2001 -From: Guido Vranken -Date: Mon, 11 Jun 2018 19:38:54 +0200 -Subject: [PATCH] Reject excessively large primes in DH key generation. - -CVE-2018-0732 - -Signed-off-by: Guido Vranken - -(cherry picked from commit 91f7361f47b082ae61ffe1a7b17bb2adf213c7fe) - -Reviewed-by: Tim Hudson -Reviewed-by: Matt Caswell -(Merged from https://github.com/openssl/openssl/pull/6457) ---- - crypto/dh/dh_key.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c -index 387558f146..f235e0d682 100644 ---- a/crypto/dh/dh_key.c -+++ b/crypto/dh/dh_key.c -@@ -130,10 +130,15 @@ static int generate_key(DH *dh) - int ok = 0; - int generate_new_key = 0; - unsigned l; -- BN_CTX *ctx; -+ BN_CTX *ctx = NULL; - BN_MONT_CTX *mont = NULL; - BIGNUM *pub_key = NULL, *priv_key = NULL; - -+ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) { -+ DHerr(DH_F_GENERATE_KEY, DH_R_MODULUS_TOO_LARGE); -+ return 0; -+ } -+ - ctx = BN_CTX_new(); - if (ctx == NULL) - goto err; --- -2.17.1 - diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index f638c6094c..6cb739eb1f 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -262,7 +262,7 @@ (define-public gnutls/dane (define-public openssl (package (name "openssl") - (version "1.0.2o") + (version "1.0.2p") (source (origin (method url-fetch) (uri (list (string-append "https://www.openssl.org/source/openssl-" @@ -274,10 +274,8 @@ (define-public openssl "/" name "-" version ".tar.gz"))) (sha256 (base32 - "0kcy13l701054nhpbd901mz32v1kn4g311z0nifd83xs2jbmqgzc")) + "003xh9f898i56344vpvpxxxzmikivxig4xwlm7vbi7m8n43qxaah")) (patches (search-patches "openssl-runpath.patch" - "openssl-1.0.2-CVE-2018-0495.patch" - "openssl-1.0.2-CVE-2018-0732.patch" "openssl-c-rehash-in.patch")))) (build-system gnu-build-system) (outputs '("out" -- cgit v1.2.3 From 6bbbdb1a34607690ca8413f29bb7bf5cacae2bcc Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 31 Aug 2018 16:11:59 +0200 Subject: gnu: oath-toolkit: Fix FTBFS with Glibc >= 2.28. * gnu/packages/patches/oath-toolkit-glibc-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/authentication.scm (oath-toolkit)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/authentication.scm | 2 + .../patches/oath-toolkit-glibc-compat.patch | 90 ++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 gnu/packages/patches/oath-toolkit-glibc-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ce1f8cc173..39cd55f105 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -994,6 +994,7 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ %D%/packages/patches/nyx-show-header-stats-with-python3.patch \ + %D%/packages/patches/oath-toolkit-glibc-compat.patch \ %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch \ %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ %D%/packages/patches/ocaml-CVE-2015-8869.patch \ diff --git a/gnu/packages/authentication.scm b/gnu/packages/authentication.scm index a58eac9890..68a6459828 100644 --- a/gnu/packages/authentication.scm +++ b/gnu/packages/authentication.scm @@ -17,6 +17,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages authentication) + #:use-module (gnu packages) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (guix build-system gnu) @@ -35,6 +36,7 @@ (define-public oath-toolkit (method url-fetch) (uri (string-append "https://download.savannah.nongnu.org/releases/" name "/" name "-" version ".tar.gz")) + (patches (search-patches "oath-toolkit-glibc-compat.patch")) (sha256 (base32 "182ah8vfbg0yhv6mh1b6ap944d0na6x7lpfkwkmzb6jl9gx4cd5h")))) (build-system gnu-build-system) diff --git a/gnu/packages/patches/oath-toolkit-glibc-compat.patch b/gnu/packages/patches/oath-toolkit-glibc-compat.patch new file mode 100644 index 0000000000..22814599e5 --- /dev/null +++ b/gnu/packages/patches/oath-toolkit-glibc-compat.patch @@ -0,0 +1,90 @@ +Adjust the bundled Gnulib to cope with removal of libio interface in Glibc 2.28. + +Based on this upstream gnulib patch: +https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e + +--- a/liboath/gl/fflush.c ++++ b/liboath/gl/fflush.c +@@ -33,7 +33,7 @@ + #undef fflush + + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ + static void +@@ -72,7 +72,7 @@ + + #endif + +-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) ++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) + + # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT + /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ +@@ -148,7 +148,7 @@ + if (stream == NULL || ! freading (stream)) + return fflush (stream); + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + clear_ungetc_buffer_preserving_position (stream); + +--- a/liboath/gl/fpurge.c ++++ b/liboath/gl/fpurge.c +@@ -62,7 +62,7 @@ + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_IO_read_end = fp->_IO_read_ptr; + fp->_IO_write_ptr = fp->_IO_write_base; + /* Avoid memory leak when there is an active ungetc buffer. */ +--- a/libaoth/gl/freading.c ++++ b/liboath/gl/freading.c +@@ -31,7 +31,7 @@ + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + return ((fp->_flags & _IO_NO_WRITES) != 0 + || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 + && fp->_IO_read_base != NULL)); +--- a/liboath/gl/fseeko.c ++++ b/liboath/gl/fseeko.c +@@ -47,7 +47,7 @@ + #endif + + /* These tests are based on fpurge.c. */ +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + if (fp->_IO_read_end == fp->_IO_read_ptr + && fp->_IO_write_ptr == fp->_IO_write_base + && fp->_IO_save_base == NULL) +@@ -123,7 +123,7 @@ + return -1; + } + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_flags &= ~_IO_EOF_SEEN; + fp->_offset = pos; + #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ +--- a/liboath/gl/stdio-impl.h ++++ b/liboath/gl/stdio-impl.h +@@ -18,6 +18,11 @@ + the same implementation of stdio extension API, except that some fields + have different naming conventions, or their access requires some casts. */ + ++/* Glibc 2.28 made _IO_IN_BACKUP private, so define it here for now. */ ++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN ++# define _IO_IN_BACKUP 0x100 ++#endif ++ + /* BSD stdio derived implementations. */ + + #if defined __NetBSD__ /* NetBSD */ -- cgit v1.2.3 From 0ea6af996b06ba453b803f2d4b014ffa709db4b7 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 11 Oct 2018 22:33:59 +0300 Subject: gnu: python-testtools: Fix regression in test suite. * gnu/packages/check.scm (python-testtools)[source]: Add patch. * gnu/packages/patches/python-testtools.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/check.scm | 3 +- gnu/packages/patches/python-testtools.patch | 57 +++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-testtools.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 15c8159460..e5745ba9e6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1087,6 +1087,7 @@ dist_patch_DATA = \ %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-testtools.patch \ %D%/packages/patches/python-paste-remove-website-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 2868f72cf9..1ae6355a93 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -879,7 +879,8 @@ (define-public python-testtools-bootstrap (uri (pypi-uri "testtools" version)) (sha256 (base32 - "0n8519lk8aaa91vymz842831181wf7fss98hyllhygi3z1nfq9sq")))) + "0n8519lk8aaa91vymz842831181wf7fss98hyllhygi3z1nfq9sq")) + (patches (search-patches "python-testtools.patch")))) (build-system python-build-system) (arguments '(#:tests? #f)) (propagated-inputs diff --git a/gnu/packages/patches/python-testtools.patch b/gnu/packages/patches/python-testtools.patch new file mode 100644 index 0000000000..42536e50f9 --- /dev/null +++ b/gnu/packages/patches/python-testtools.patch @@ -0,0 +1,57 @@ +https://github.com/testing-cabal/testtools/commit/29004731f9c480b7c44a9c2605513d50d372898f.patch +Should be fixed in the next release + +From 29004731f9c480b7c44a9c2605513d50d372898f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Thu, 17 May 2018 17:52:26 +0200 +Subject: [PATCH] Fix the tests on Python 3.7 + +Exception's repr got changed not to include trailing comma + +Fixes https://github.com/testing-cabal/testtools/issues/270 +--- + .travis.yml | 1 + + testtools/tests/matchers/test_exception.py | 11 +++++++++-- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 7f1f4db7..784608e0 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -5,6 +5,7 @@ python: + - "3.4" + - "3.5" + - "3.6" ++ - "3.7-dev" + - "pypy" + + install: +diff --git a/testtools/tests/matchers/test_exception.py b/testtools/tests/matchers/test_exception.py +index 6cd80af1..acd39252 100644 +--- a/testtools/tests/matchers/test_exception.py ++++ b/testtools/tests/matchers/test_exception.py +@@ -32,15 +32,22 @@ class TestMatchesExceptionInstanceInterface(TestCase, TestMatchersInterface): + matches_matches = [error_foo] + matches_mismatches = [error_bar, error_base_foo] + ++ if sys.version_info >= (3, 7): ++ # exception's repr has changed ++ _e = '' ++ else: ++ _e = ',' ++ + str_examples = [ +- ("MatchesException(Exception('foo',))", ++ ("MatchesException(Exception('foo'%s))" % _e, + MatchesException(Exception('foo'))) + ] + describe_examples = [ + ("%r is not a %r" % (Exception, ValueError), + error_base_foo, + MatchesException(ValueError("foo"))), +- ("ValueError('bar',) has different arguments to ValueError('foo',).", ++ ("ValueError('bar'%s) has different arguments to ValueError('foo'%s)." ++ % (_e, _e), + error_bar, + MatchesException(ValueError("foo"))), + ] -- cgit v1.2.3 From 0627f93db6a57e7411cb332b7509f35753b149e4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 15 Oct 2018 21:45:08 +0300 Subject: gnu: clang-runtime: Adapt for glibc@2.28. * gnu/packages/llvm.scm (clang-runtime@3.7, clang-runtime@3.8, clang-runtime@3.9)[patches]: Add patch to work around removed ustat.h. * gnu/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/llvm.scm | 10 +++-- .../clang-3.5-libsantitizer-ustat-fix.patch | 46 ++++++++++++++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/clang-3.5-libsantitizer-ustat-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e5745ba9e6..0c40d6c0b8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -613,6 +613,7 @@ dist_patch_DATA = \ %D%/packages/patches/ceph-skip-unittest_blockdev.patch \ %D%/packages/patches/chmlib-inttypes.patch \ %D%/packages/patches/clang-3.5-libc-search-path.patch \ + %D%/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch \ %D%/packages/patches/clang-3.8-libc-search-path.patch \ %D%/packages/patches/clang-6.0-libc-search-path.patch \ %D%/packages/patches/clang-runtime-asan-build-fixes.patch \ diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index d0791d00cc..aef24b3bac 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017 Roel Janssen ;;; Copyright © 2018 Marius Bakke ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2018 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -270,7 +271,8 @@ (define-public clang-runtime-3.9.1 llvm-3.9.1 "16gc2gdmp5c800qvydrdhsp0bzb97s8wrakl6i8a4lgslnqnf2fk" '("clang-runtime-asan-build-fixes.patch" - "clang-runtime-esan-build-fixes.patch"))) + "clang-runtime-esan-build-fixes.patch" + "clang-3.5-libsantitizer-ustat-fix.patch"))) (define-public clang-3.9.1 (clang-from-llvm llvm-3.9.1 clang-runtime-3.9.1 @@ -294,7 +296,8 @@ (define-public clang-runtime-3.8 (clang-runtime-from-llvm llvm-3.8 "0p0y85c7izndbpg2l816z7z7558axq11d5pwkm4h11sdw7d13w0d" - '("clang-runtime-asan-build-fixes.patch"))) + '("clang-runtime-asan-build-fixes.patch" + "clang-3.5-libsantitizer-ustat-fix.patch"))) (define-public clang-3.8 (clang-from-llvm llvm-3.8 clang-runtime-3.8 @@ -317,7 +320,8 @@ (define-public clang-runtime-3.7 (clang-runtime-from-llvm llvm-3.7 "10c1mz2q4bdq9bqfgr3dirc6hz1h3sq8573srd5q5lr7m7j6jiwx" - '("clang-runtime-asan-build-fixes.patch"))) + '("clang-runtime-asan-build-fixes.patch" + "clang-3.5-libsantitizer-ustat-fix.patch"))) (define-public clang-3.7 (clang-from-llvm llvm-3.7 clang-runtime-3.7 diff --git a/gnu/packages/patches/clang-3.5-libsantitizer-ustat-fix.patch b/gnu/packages/patches/clang-3.5-libsantitizer-ustat-fix.patch new file mode 100644 index 0000000000..cfb09a8ce3 --- /dev/null +++ b/gnu/packages/patches/clang-3.5-libsantitizer-ustat-fix.patch @@ -0,0 +1,46 @@ +From d9d97cac3702b99a00cd113de98c41eb535d47ed Mon Sep 17 00:00:00 2001 +From: Efraim Flashner +Date: Sun, 14 Oct 2018 12:11:30 +0300 +Subject: [PATCH] patch modified from the gcc patch series, also dealing with + ustat. + +--- + .../sanitizer_platform_limits_posix.cc | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +index 29fea6e..570b9a5 100644 +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -129,7 +129,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -222,7 +221,19 @@ namespace __sanitizer { + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned struct_ustat_sz = sizeof(struct ustat); ++ // Use pre-computed size of struct ustat to avoid which ++ // has been removed from glibc 2.28. ++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ ++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ ++ || defined(__x86_64__) ++#define SIZEOF_STRUCT_USTAT 32 ++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ ++ || defined(__powerpc__) || defined(__s390__) ++#define SIZEOF_STRUCT_USTAT 20 ++#else ++#error Unknown size of struct ustat ++#endif ++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; + unsigned struct_rlimit64_sz = sizeof(struct rlimit64); + unsigned struct_statvfs64_sz = sizeof(struct statvfs64); + #endif // SANITIZER_LINUX && !SANITIZER_ANDROID +-- +2.19.1 + -- cgit v1.2.3 From 1a2d8d06b53c3c8cf8f94920c6e8734c71b8369b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 15 Oct 2018 21:51:23 +0300 Subject: * gnu: clang-runtime: Fix typo in patch name. This is a follow-up to 0627f93db6a57e7411cb332b7509f35753b149e4. * gnu/packages/patches/libsantitizer-ustat-fix.patch: Rename to gnu/packages/patches/libsanitizer-ustat-fix.patch. * gnu/packages/llvm.scm (clang-runtime@3.7, clang-runtime@3.8, clang-runtime@3.9)[patches]: Fix patch name. --- gnu/packages/llvm.scm | 6 +-- .../patches/clang-3.5-libsanitizer-ustat-fix.patch | 46 ++++++++++++++++++++++ .../clang-3.5-libsantitizer-ustat-fix.patch | 46 ---------------------- 3 files changed, 49 insertions(+), 49 deletions(-) create mode 100644 gnu/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch delete mode 100644 gnu/packages/patches/clang-3.5-libsantitizer-ustat-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index aef24b3bac..54a17be8f4 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -272,7 +272,7 @@ (define-public clang-runtime-3.9.1 "16gc2gdmp5c800qvydrdhsp0bzb97s8wrakl6i8a4lgslnqnf2fk" '("clang-runtime-asan-build-fixes.patch" "clang-runtime-esan-build-fixes.patch" - "clang-3.5-libsantitizer-ustat-fix.patch"))) + "clang-3.5-libsanitizer-ustat-fix.patch"))) (define-public clang-3.9.1 (clang-from-llvm llvm-3.9.1 clang-runtime-3.9.1 @@ -297,7 +297,7 @@ (define-public clang-runtime-3.8 llvm-3.8 "0p0y85c7izndbpg2l816z7z7558axq11d5pwkm4h11sdw7d13w0d" '("clang-runtime-asan-build-fixes.patch" - "clang-3.5-libsantitizer-ustat-fix.patch"))) + "clang-3.5-libsanitizer-ustat-fix.patch"))) (define-public clang-3.8 (clang-from-llvm llvm-3.8 clang-runtime-3.8 @@ -321,7 +321,7 @@ (define-public clang-runtime-3.7 llvm-3.7 "10c1mz2q4bdq9bqfgr3dirc6hz1h3sq8573srd5q5lr7m7j6jiwx" '("clang-runtime-asan-build-fixes.patch" - "clang-3.5-libsantitizer-ustat-fix.patch"))) + "clang-3.5-libsanitizer-ustat-fix.patch"))) (define-public clang-3.7 (clang-from-llvm llvm-3.7 clang-runtime-3.7 diff --git a/gnu/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch b/gnu/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch new file mode 100644 index 0000000000..cfb09a8ce3 --- /dev/null +++ b/gnu/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch @@ -0,0 +1,46 @@ +From d9d97cac3702b99a00cd113de98c41eb535d47ed Mon Sep 17 00:00:00 2001 +From: Efraim Flashner +Date: Sun, 14 Oct 2018 12:11:30 +0300 +Subject: [PATCH] patch modified from the gcc patch series, also dealing with + ustat. + +--- + .../sanitizer_platform_limits_posix.cc | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +index 29fea6e..570b9a5 100644 +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -129,7 +129,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -222,7 +221,19 @@ namespace __sanitizer { + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned struct_ustat_sz = sizeof(struct ustat); ++ // Use pre-computed size of struct ustat to avoid which ++ // has been removed from glibc 2.28. ++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ ++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ ++ || defined(__x86_64__) ++#define SIZEOF_STRUCT_USTAT 32 ++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ ++ || defined(__powerpc__) || defined(__s390__) ++#define SIZEOF_STRUCT_USTAT 20 ++#else ++#error Unknown size of struct ustat ++#endif ++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; + unsigned struct_rlimit64_sz = sizeof(struct rlimit64); + unsigned struct_statvfs64_sz = sizeof(struct statvfs64); + #endif // SANITIZER_LINUX && !SANITIZER_ANDROID +-- +2.19.1 + diff --git a/gnu/packages/patches/clang-3.5-libsantitizer-ustat-fix.patch b/gnu/packages/patches/clang-3.5-libsantitizer-ustat-fix.patch deleted file mode 100644 index cfb09a8ce3..0000000000 --- a/gnu/packages/patches/clang-3.5-libsantitizer-ustat-fix.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d9d97cac3702b99a00cd113de98c41eb535d47ed Mon Sep 17 00:00:00 2001 -From: Efraim Flashner -Date: Sun, 14 Oct 2018 12:11:30 +0300 -Subject: [PATCH] patch modified from the gcc patch series, also dealing with - ustat. - ---- - .../sanitizer_platform_limits_posix.cc | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc -index 29fea6e..570b9a5 100644 ---- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc -+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc -@@ -129,7 +129,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -222,7 +221,19 @@ namespace __sanitizer { - #endif // SANITIZER_LINUX || SANITIZER_FREEBSD - - #if SANITIZER_LINUX && !SANITIZER_ANDROID -- unsigned struct_ustat_sz = sizeof(struct ustat); -+ // Use pre-computed size of struct ustat to avoid which -+ // has been removed from glibc 2.28. -+#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ -+ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ -+ || defined(__x86_64__) -+#define SIZEOF_STRUCT_USTAT 32 -+#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ -+ || defined(__powerpc__) || defined(__s390__) -+#define SIZEOF_STRUCT_USTAT 20 -+#else -+#error Unknown size of struct ustat -+#endif -+ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; - unsigned struct_rlimit64_sz = sizeof(struct rlimit64); - unsigned struct_statvfs64_sz = sizeof(struct statvfs64); - #endif // SANITIZER_LINUX && !SANITIZER_ANDROID --- -2.19.1 - -- cgit v1.2.3 From 16f14f63db7a370d3917cf9c7d7e3735b0f59855 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 17 Oct 2018 20:53:24 +0200 Subject: gnu: Python: Adjust grafts for core-updates merge. This adjust the grafts from a55ebe2e3a7b438b4eec06c594440d3a0fb06a25 and 90aeaee861845142843a0f988fa4ff016c723cdb to apply to Python 2.7.15 and 3.7.0. * gnu/packages/patches/python2-CVE-2018-1060.patch, gnu/packages/patches/python2-CVE-2018-1061.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. * gnu/packages/python.scm (python-2/fixed): Remove patches that are already present in 2.7.15. (python-3/fixed): Remove obsolete phase. --- gnu/local.mk | 2 -- gnu/packages/patches/python2-CVE-2018-1060.patch | 20 -------------------- gnu/packages/patches/python2-CVE-2018-1061.patch | 20 -------------------- gnu/packages/python.scm | 16 ++-------------- 4 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 gnu/packages/patches/python2-CVE-2018-1060.patch delete mode 100644 gnu/packages/patches/python2-CVE-2018-1061.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 1181210da5..8d4d0d26ea 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1068,8 +1068,6 @@ dist_patch_DATA = \ %D%/packages/patches/pygpgme-disable-problematic-tests.patch \ %D%/packages/patches/pyqt-configure.patch \ %D%/packages/patches/pyqt-public-sip.patch \ - %D%/packages/patches/python2-CVE-2018-1060.patch \ - %D%/packages/patches/python2-CVE-2018-1061.patch \ %D%/packages/patches/python2-CVE-2018-14647.patch \ %D%/packages/patches/python2-CVE-2018-1000802.patch \ %D%/packages/patches/python-2-deterministic-build-info.patch \ diff --git a/gnu/packages/patches/python2-CVE-2018-1060.patch b/gnu/packages/patches/python2-CVE-2018-1060.patch deleted file mode 100644 index 5eb7ccfbc9..0000000000 --- a/gnu/packages/patches/python2-CVE-2018-1060.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix CVE-2018-1060: -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1060 - -Taken from upstream commit (sans test and NEWS): -https://github.com/python/cpython/commit/e052d40cea15f582b50947f7d906b39744dc62a2 - -diff --git a/Lib/poplib.py b/Lib/poplib.py -index b91e5f72d2ca..a238510b38fc 100644 ---- a/Lib/poplib.py -+++ b/Lib/poplib.py -@@ -274,7 +274,7 @@ def rpop(self, user): - return self._shortcmd('RPOP %s' % user) - - -- timestamp = re.compile(r'\+OK.*(<[^>]+>)') -+ timestamp = re.compile(br'\+OK.[^<]*(<.*>)') - - def apop(self, user, secret): - """Authorisation - diff --git a/gnu/packages/patches/python2-CVE-2018-1061.patch b/gnu/packages/patches/python2-CVE-2018-1061.patch deleted file mode 100644 index 6caab24b4d..0000000000 --- a/gnu/packages/patches/python2-CVE-2018-1061.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix CVE-2018-1061: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1061 - -Taken from upstream commit (sans test and NEWS): -https://github.com/python/cpython/commit/e052d40cea15f582b50947f7d906b39744dc62a2 - -diff --git a/Lib/difflib.py b/Lib/difflib.py -index 1c6fbdbedcb7..788a92df3f89 100644 ---- a/Lib/difflib.py -+++ b/Lib/difflib.py -@@ -1103,7 +1103,7 @@ def _qformat(self, aline, bline, atags, btags): - - import re - --def IS_LINE_JUNK(line, pat=re.compile(r"\s*#?\s*$").match): -+def IS_LINE_JUNK(line, pat=re.compile(r"\s*(?:#\s*)?$").match): - r""" - Return 1 for ignorable line: iff `line` is blank or contains a single '#'. - diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 39ec96fd66..63cf440014 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -323,9 +323,7 @@ (define python-2/fixed (inherit (package-source python-2)) (patches (append (origin-patches (package-source python-2)) - (search-patches "python2-CVE-2018-1060.patch" - "python2-CVE-2018-1061.patch" - "python2-CVE-2018-14647.patch" + (search-patches "python2-CVE-2018-14647.patch" "python2-CVE-2018-1000802.patch"))))))) (define-public python2-called-python @@ -419,17 +417,7 @@ (define python-3/fixed (source (origin (inherit (package-source python-3)) (patches (append (origin-patches (package-source python-3)) - (search-patches "python-CVE-2018-14647.patch"))))) - (arguments - (substitute-keyword-arguments (package-arguments python-3) - ((#:phases phases) - `(modify-phases ,phases - (add-after 'unpack 'delete-broken-test - (lambda _ - ;; Delete test which fails on recent kernels: - ;; . - (delete-file "Lib/test/test_socket.py") - #t)))))))) + (search-patches "python-CVE-2018-14647.patch"))))))) ;; Current major version. (define-public python python-3) -- cgit v1.2.3 From e8ef3cc4d62d573db5e7338a0342ef20df5f8b4d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 18 Oct 2018 19:13:13 +0200 Subject: gnu: swig: Fix build on i686. * gnu/packages/patches/swig-guile-gc.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/swig.scm (swig)[source](patches): Use it. --- gnu/local.mk | 1 + gnu/packages/patches/swig-guile-gc.patch | 76 ++++++++++++++++++++++++++++++++ gnu/packages/swig.scm | 2 + 3 files changed, 79 insertions(+) create mode 100644 gnu/packages/patches/swig-guile-gc.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 8d4d0d26ea..4b8c4c3d69 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1154,6 +1154,7 @@ dist_patch_DATA = \ %D%/packages/patches/soundtouch-CVE-2018-1000223.patch \ %D%/packages/patches/steghide-fixes.patch \ %D%/packages/patches/superlu-dist-scotchmetis.patch \ + %D%/packages/patches/swig-guile-gc.patch \ %D%/packages/patches/swish-e-search.patch \ %D%/packages/patches/swish-e-format-security.patch \ %D%/packages/patches/synfigstudio-fix-ui-with-gtk3.patch \ diff --git a/gnu/packages/patches/swig-guile-gc.patch b/gnu/packages/patches/swig-guile-gc.patch new file mode 100644 index 0000000000..0e745a6247 --- /dev/null +++ b/gnu/packages/patches/swig-guile-gc.patch @@ -0,0 +1,76 @@ +Fix garbage collection for Guile versions >= 2.0.12. This issue showed +up when running the tests on i686-linux. + +Taken from this upstream commit: +https://github.com/swig/swig/commit/38f2ab0c30e369e63bbd0a6152108488d0de68e1 + +diff --git a/Lib/guile/guile_scm_run.swg b/Lib/guile/guile_scm_run.swg +index 274f197158..0d04cb7c62 100644 +--- a/Lib/guile/guile_scm_run.swg ++++ b/Lib/guile/guile_scm_run.swg +@@ -99,6 +99,7 @@ SWIG_Guile_scm2newstr(SCM str, size_t *len) { + static int swig_initialized = 0; + static scm_t_bits swig_tag = 0; + static scm_t_bits swig_collectable_tag = 0; ++static scm_t_bits swig_finalized_tag = 0; + static scm_t_bits swig_destroyed_tag = 0; + static scm_t_bits swig_member_function_tag = 0; + static SCM swig_make_func = SCM_EOL; +@@ -163,7 +164,19 @@ SWIG_Guile_PointerType(SCM object) + } + else scm_wrong_type_arg("SWIG-Guile-PointerType", 1, object); + } +- ++ ++SWIGINTERN int ++SWIG_Guile_IsValidSmob(SCM smob) ++{ ++ /* We do not accept smobs representing destroyed pointers, but we have to ++ allow finalized smobs because Guile >= 2.0.12 sets all smob instances ++ to the 'finalized' type before calling their 'free' function. This change ++ was introduced to Guile in commit 8dff3af087c6eaa83ae0d72aa8b22aef5c65d65d */ ++ return SCM_SMOB_PREDICATE(swig_tag, smob) ++ || SCM_SMOB_PREDICATE(swig_collectable_tag, smob) ++ || SCM_SMOB_PREDICATE(swig_finalized_tag, smob); ++} ++ + SWIGINTERN int + SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags) + { +@@ -179,8 +192,7 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags) + *result = SCM_POINTER_VALUE(s); + return SWIG_OK; + #endif /* if SCM_MAJOR_VERSION >= 2 */ +- } else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { +- /* we do not accept smobs representing destroyed pointers */ ++ } else if (SWIG_Guile_IsValidSmob(smob)) { + from = (swig_type_info *) SCM_CELL_WORD_2(smob); + if (!from) return SWIG_ERROR; + if (type) { +@@ -239,7 +251,7 @@ SWIG_Guile_MarkPointerNoncollectable(SCM s) + { + SCM smob = SWIG_Guile_GetSmob(s); + if (!SCM_NULLP(smob)) { +- if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { ++ if (SWIG_Guile_IsValidSmob(smob)) { + SCM_SET_CELL_TYPE(smob, swig_tag); + } + else scm_wrong_type_arg(NULL, 0, s); +@@ -252,7 +264,7 @@ SWIG_Guile_MarkPointerDestroyed(SCM s) + { + SCM smob = SWIG_Guile_GetSmob(s); + if (!SCM_NULLP(smob)) { +- if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { ++ if (SWIG_Guile_IsValidSmob(smob)) { + SCM_SET_CELL_TYPE(smob, swig_destroyed_tag); + } + else scm_wrong_type_arg(NULL, 0, s); +@@ -419,6 +431,8 @@ SWIG_Guile_Init () + scm_set_smob_print(swig_collectable_tag, print_collectable_swig); + scm_set_smob_equalp(swig_collectable_tag, equalp_swig); + scm_set_smob_free(swig_collectable_tag, free_swig); ++ /* For Guile >= 2.0.12. See libguile/smob.c:clear_smobnum */ ++ swig_finalized_tag = swig_collectable_tag & ~0xff00; + } + if (ensure_smob_tag(swig_module, &swig_destroyed_tag, + "destroyed-swig-pointer", "destroyed-swig-pointer-tag")) { diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm index b931db412b..61f6a8ccfe 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -22,6 +22,7 @@ (define-module (gnu packages swig) #:use-module (guix download) #:use-module (guix licenses) #:use-module (guix build-system gnu) + #:use-module (gnu packages) #:use-module (gnu packages pcre) #:use-module (gnu packages guile) #:use-module (gnu packages boost) @@ -37,6 +38,7 @@ (define-public swig (uri (string-append "mirror://sourceforge/" name "/" name "/" name "-" version "/" name "-" version ".tar.gz")) + (patches (search-patches "swig-guile-gc.patch")) (sha256 (base32 "0kf99ygrjs5616gsqhz1l7bib3a12izmxi7g48bwblbymr3z9ybw")))) -- cgit v1.2.3 From 3bd83e6db2982d0b419945dd6ea4174d1a880c6d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 5 Nov 2018 23:24:19 +0100 Subject: gnu: qtbase: Remove obsolete patch. This patch is no longer needed since 7930cfc98923eda64ec4a37d56b19f96f86f5f59 was merged to core-updates. * gnu/packages/patches/qtbase-glibc-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/qt.scm (qtbase)[source](patches): Drop it. --- gnu/local.mk | 1 - gnu/packages/patches/qtbase-glibc-compat.patch | 50 -------------------------- gnu/packages/qt.scm | 3 +- 3 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 gnu/packages/patches/qtbase-glibc-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4f1d6306b1..93bf44ac9b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1097,7 +1097,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-waitress-fix-tests.patch \ %D%/packages/patches/qemu-glibc-2.27.patch \ %D%/packages/patches/qt4-ldflags.patch \ - %D%/packages/patches/qtbase-glibc-compat.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ %D%/packages/patches/quagga-reproducible-build.patch \ diff --git a/gnu/packages/patches/qtbase-glibc-compat.patch b/gnu/packages/patches/qtbase-glibc-compat.patch deleted file mode 100644 index 15a2540b3a..0000000000 --- a/gnu/packages/patches/qtbase-glibc-compat.patch +++ /dev/null @@ -1,50 +0,0 @@ -Fix qmake build with glibc 2.28. - -Taken from upstream: -https://code.qt.io/cgit/qt/qtbase.git/commit/?id=25feee4e061b99edab79503d81f5bd045c6c8e3d - -diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h -index 3469ebe5e6..c5585ea32a 100644 ---- a/src/corelib/global/qconfig-bootstrapped.h -+++ b/src/corelib/global/qconfig-bootstrapped.h -@@ -98,10 +98,18 @@ - #define QT_NO_QOBJECT - #define QT_FEATURE_process -1 - #define QT_FEATURE_regularexpression -1 --#define QT_FEATURE_renameat2 -1 -+#ifdef __GLIBC_PREREQ -+# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1) -+#else -+# define QT_FEATURE_renameat2 -1 -+#endif - #define QT_FEATURE_sharedmemory -1 - #define QT_FEATURE_slog2 -1 --#define QT_FEATURE_statx -1 -+#ifdef __GLIBC_PREREQ -+# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1) -+#else -+# define QT_FEATURE_statx -1 -+#endif - #define QT_FEATURE_syslog -1 - #define QT_NO_SYSTEMLOCALE - #define QT_FEATURE_systemsemaphore -1 -diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp -index 0c9cdb8667..deb4a9f220 100644 ---- a/src/corelib/io/qfilesystemengine_unix.cpp -+++ b/src/corelib/io/qfilesystemengine_unix.cpp -@@ -91,7 +91,6 @@ extern "C" NSString *NSTemporaryDirectory(); - # include - # include - # include --# include - - // in case linux/fs.h is too old and doesn't define it: - #ifndef FICLONE -@@ -112,6 +111,7 @@ static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newp - # endif - - # if !QT_CONFIG(statx) && defined(SYS_statx) -+# include - static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf) - { return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); } - # elif !QT_CONFIG(statx) && !defined(SYS_statx) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 1dd21101b2..cffebc7bff 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -508,8 +508,7 @@ (define-public qtbase (base32 "01q1rn5rp9biq3z38953z2hgm4nirvp2jfv8wg7isnld8v1yg0b3")) ;; Use TZDIR to avoid depending on package "tzdata". - (patches (search-patches "qtbase-use-TZDIR.patch" - "qtbase-glibc-compat.patch")) + (patches (search-patches "qtbase-use-TZDIR.patch")) (modules '((guix build utils))) (snippet ;; corelib uses bundled harfbuzz, md4, md5, sha3 -- cgit v1.2.3 From 1badc85068ee0be2a028c1b94a3dd285901bc391 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 27 Sep 2018 18:41:50 +0200 Subject: gnu: ceph: Update to 13.2.2. * gnu/packages/patches/ceph-skip-unittest_blockdev.patch: Adjust for 13.2.2. * gnu/packages/patches/ceph-rocksdb-compat.patch: Delete file. * gnu/packages/patches/ceph-detect-rocksdb.patch, gnu/packages/patches/ceph-volume-respect-PATH.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/storage.scm (ceph): Update to 13.2.2. [source]: Don't remove src/dpdk, which has been moved to src/spdk/dpdk and is purged elsewhere. Drop bundled rapidjson. Adjust patch list. [arguments]: Add "-DWITH_MGR_DASHBOARD_FRONTEND=OFF" and "-DWITH_SPDK=OFF" to #:configure-flags. Drop obsolete "-DWITH_EMBEDDED". Add workaround for . Remove obsolete test substitution. Rework 'wrap-python-script' to be less verbose and wrap more scripts. [native-inputs]: Add GCC-7. [inputs]: Add OATH-TOOLKIT, RAPIDJSON and PYTHON2-SIX. --- gnu/local.mk | 3 +- gnu/packages/patches/ceph-detect-rocksdb.patch | 24 +++++++++ gnu/packages/patches/ceph-rocksdb-compat.patch | 63 ---------------------- .../patches/ceph-skip-unittest_blockdev.patch | 20 +++---- .../patches/ceph-volume-respect-PATH.patch | 22 ++++++++ gnu/packages/storage.scm | 43 +++++++++------ 6 files changed, 82 insertions(+), 93 deletions(-) create mode 100644 gnu/packages/patches/ceph-detect-rocksdb.patch delete mode 100644 gnu/packages/patches/ceph-rocksdb-compat.patch create mode 100644 gnu/packages/patches/ceph-volume-respect-PATH.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 93bf44ac9b..86f081f7cf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -608,10 +608,11 @@ dist_patch_DATA = \ %D%/packages/patches/catdoc-CVE-2017-11110.patch \ %D%/packages/patches/cdparanoia-fpic.patch \ %D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch \ + %D%/packages/patches/ceph-detect-rocksdb.patch \ %D%/packages/patches/ceph-disable-cpu-optimizations.patch \ - %D%/packages/patches/ceph-rocksdb-compat.patch \ %D%/packages/patches/ceph-skip-collect-sys-info-test.patch \ %D%/packages/patches/ceph-skip-unittest_blockdev.patch \ + %D%/packages/patches/ceph-volume-respect-PATH.patch \ %D%/packages/patches/chmlib-inttypes.patch \ %D%/packages/patches/clang-3.5-libc-search-path.patch \ %D%/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch \ diff --git a/gnu/packages/patches/ceph-detect-rocksdb.patch b/gnu/packages/patches/ceph-detect-rocksdb.patch new file mode 100644 index 0000000000..badad6d1b9 --- /dev/null +++ b/gnu/packages/patches/ceph-detect-rocksdb.patch @@ -0,0 +1,24 @@ +Help the build system find system RocksDB. + +Taken from this upstream commit: +https://github.com/ceph/ceph/commit/2ac26bd0e01fd6c82bd59936cf25c25173f7775a + +diff --git a/cmake/modules/Findrocksdb.cmake b/cmake/modules/Findrocksdb.cmake +index f8369f73fc..5926647348 100644 +--- a/cmake/modules/Findrocksdb.cmake ++++ b/cmake/modules/Findrocksdb.cmake +@@ -15,11 +15,11 @@ find_library(ROCKSDB_LIBRARIES rocksdb) + + if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h") + foreach(ver "MAJOR" "MINOR" "PATCH") +- file(STRINGS "${ROCKSDB_INCLUDE_DIR}/version.h" ROCKSDB_VER_${ver}_LINE ++ file(STRINGS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h" ROCKSDB_VER_${ver}_LINE + REGEX "^#define[ \t]+ROCKSDB_${ver}[ \t]+[0-9]+$") + string(REGEX REPLACE "^#define[ \t]+ROCKSDB_${ver}[ \t]+([0-9]+)$" +- "\\1" ROCKSDB_VERSION_${ver} "${ROCKDB_VER_${ver}_LINE}") +- unset(${ROCKDB_VER_${ver}_LINE}) ++ "\\1" ROCKSDB_VERSION_${ver} "${ROCKSDB_VER_${ver}_LINE}") ++ unset(${ROCKSDB_VER_${ver}_LINE}) + endforeach() + set(ROCKSDB_VERSION_STRING + "${ROCKSDB_VERSION_MAJOR}.${ROCKSDB_VERSION_MINOR}.${ROCKSDB_VERSION_PATCH}") diff --git a/gnu/packages/patches/ceph-rocksdb-compat.patch b/gnu/packages/patches/ceph-rocksdb-compat.patch deleted file mode 100644 index 1a3c6b0b23..0000000000 --- a/gnu/packages/patches/ceph-rocksdb-compat.patch +++ /dev/null @@ -1,63 +0,0 @@ -Fix compatibility with newer versions of RocksDB. - -Adapted from this upstream patch, with some additional changes for 12.2: -https://github.com/ceph/ceph/commit/9d73a7121fdb1ae87cb1aa6f7d9d7a13f329ae68 - -diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc -index 8660afe1886d..bc0de79e23cb 100644 ---- a/src/kv/RocksDBStore.cc -+++ b/src/kv/RocksDBStore.cc -@@ -505,7 +505,7 @@ - // considering performance overhead, default is disabled - if (g_conf->rocksdb_perf) { - rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex); -- rocksdb::perf_context.Reset(); -+ rocksdb::get_perf_context()->Reset(); - } - - RocksDBTransactionImpl * _t = -@@ -532,13 +532,13 @@ - utime_t write_wal_time; - utime_t write_pre_and_post_process_time; - write_wal_time.set_from_double( -- static_cast(rocksdb::perf_context.write_wal_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_wal_time)/1000000000); - write_memtable_time.set_from_double( -- static_cast(rocksdb::perf_context.write_memtable_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_memtable_time)/1000000000); - write_delay_time.set_from_double( -- static_cast(rocksdb::perf_context.write_delay_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_delay_time)/1000000000); - write_pre_and_post_process_time.set_from_double( -- static_cast(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000); - logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time); - logger->tinc(l_rocksdb_write_delay_time, write_delay_time); - logger->tinc(l_rocksdb_write_wal_time, write_wal_time); -@@ -558,7 +558,7 @@ - // considering performance overhead, default is disabled - if (g_conf->rocksdb_perf) { - rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex); -- rocksdb::perf_context.Reset(); -+ rocksdb::get_perf_context()->Reset(); - } - - RocksDBTransactionImpl * _t = -@@ -586,13 +586,13 @@ - utime_t write_wal_time; - utime_t write_pre_and_post_process_time; - write_wal_time.set_from_double( -- static_cast(rocksdb::perf_context.write_wal_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_wal_time)/1000000000); - write_memtable_time.set_from_double( -- static_cast(rocksdb::perf_context.write_memtable_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_memtable_time)/1000000000); - write_delay_time.set_from_double( -- static_cast(rocksdb::perf_context.write_delay_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_delay_time)/1000000000); - write_pre_and_post_process_time.set_from_double( -- static_cast(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000); -+ static_cast(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000); - logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time); - logger->tinc(l_rocksdb_write_delay_time, write_delay_time); - logger->tinc(l_rocksdb_write_wal_time, write_wal_time); diff --git a/gnu/packages/patches/ceph-skip-unittest_blockdev.patch b/gnu/packages/patches/ceph-skip-unittest_blockdev.patch index 43b9984862..407bd93278 100644 --- a/gnu/packages/patches/ceph-skip-unittest_blockdev.patch +++ b/gnu/packages/patches/ceph-skip-unittest_blockdev.patch @@ -4,25 +4,21 @@ This test tries to walk a sysfs path and hits a null pointer exception. Expected: (dir) != (nullptr), actual: NULL vs 8-byte object <00-00 00-00 00-00 00-00> diff --git a/src/test/common/CMakeLists.txt b/src/test/common/CMakeLists.txt -index 5172663898..ac84085eaa 100644 --- a/src/test/common/CMakeLists.txt +++ b/src/test/common/CMakeLists.txt -@@ -12,15 +12,6 @@ target_link_libraries(get_command_descriptions +@@ -12,15 +12,6 @@ ${CMAKE_DL_LIBS} ) -if(HAVE_BLKID) --# unittest_blkdev --add_executable(unittest_blkdev -- test_blkdev.cc -- ) --add_ceph_unittest(unittest_blkdev ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_blkdev) --target_link_libraries(unittest_blkdev global ${BLKID_LIBRARIES}) --endif(HAVE_BLKID) +- # unittest_blkdev +- add_executable(unittest_blkdev +- test_blkdev.cc +- ) +- add_ceph_unittest(unittest_blkdev) +- target_link_libraries(unittest_blkdev ceph-common ${BLKID_LIBRARIES}) +-endif() - # unittest_bloom_filter add_executable(unittest_bloom_filter test_bloom_filter.cc --- -2.11.1 - diff --git a/gnu/packages/patches/ceph-volume-respect-PATH.patch b/gnu/packages/patches/ceph-volume-respect-PATH.patch new file mode 100644 index 0000000000..08a9a15ddd --- /dev/null +++ b/gnu/packages/patches/ceph-volume-respect-PATH.patch @@ -0,0 +1,22 @@ +Look for required tools in $PATH instead of just a handful locations. + +diff --git a/src/ceph-volume/ceph_volume/util/system.py b/src/ceph-volume/ceph_volume/util/system.py +index b637f023a4..14516e1c65 100644 +--- a/src/ceph-volume/ceph_volume/util/system.py ++++ b/src/ceph-volume/ceph_volume/util/system.py +@@ -33,14 +33,7 @@ def generate_uuid(): + + def which(executable): + """find the location of an executable""" +- locations = ( +- '/usr/local/bin', +- '/bin', +- '/usr/bin', +- '/usr/local/sbin', +- '/usr/sbin', +- '/sbin', +- ) ++ locations = os.getenv('PATH').split(':') + + for location in locations: + executable_path = os.path.join(location, executable) diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm index 11f6f9d7e8..5051ccd986 100644 --- a/gnu/packages/storage.scm +++ b/gnu/packages/storage.scm @@ -26,6 +26,7 @@ (define-module (gnu packages storage) #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages assembly) + #:use-module (gnu packages authentication) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages boost) #:use-module (gnu packages check) @@ -35,6 +36,7 @@ (define-module (gnu packages storage) #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages disk) + #:use-module (gnu packages gcc) #:use-module (gnu packages gnuzilla) #:use-module (gnu packages gperf) #:use-module (gnu packages jemalloc) @@ -51,18 +53,19 @@ (define-module (gnu packages storage) (define-public ceph (package (name "ceph") - (version "12.2.5") + (version "13.2.2") (source (origin (method url-fetch) (uri (string-append "https://download.ceph.com/tarballs/ceph-" version ".tar.gz")) (sha256 (base32 - "1ydc3mfvc0vpnpfnfmissvsrsj4jyxgzc2pcl1a4vdr3bwkcglp3")) + "0h483n9iy0fkbqrhf7k0dzspwdpcaswkjwmc5n5c600fr6s1v9pk")) (patches (search-patches "ceph-skip-unittest_blockdev.patch" "ceph-skip-collect-sys-info-test.patch" - "ceph-rocksdb-compat.patch" + "ceph-detect-rocksdb.patch" + "ceph-volume-respect-PATH.patch" "ceph-disable-cpu-optimizations.patch")) (modules '((guix build utils))) (snippet @@ -76,7 +79,7 @@ (define-public ceph ;"src/zstd" ;"src/civetweb" "src/test/downloads" - "src/dpdk" + "src/rapidjson" "src/spdk" "src/rocksdb" "src/boost")) @@ -100,13 +103,14 @@ (define-public ceph (assoc-ref %build-inputs "keyutils") "/include") "-DCMAKE_INSTALL_LOCALSTATEDIR=/var" "-DENABLE_SHARED=ON" - "-DWITH_EMBEDDED=OFF" "-DWITH_SYSTEM_ROCKSDB=ON" "-DWITH_SYSTEM_BOOST=ON" "-DWITH_PYTHON3=ON" ;; TODO: Enable these when available in Guix. + "-DWITH_MGR_DASHBOARD_FRONTEND=OFF" ;requires node + nodeenv "-DWITH_BABELTRACE=OFF" "-DWITH_LTTNG=OFF" + "-DWITH_SPDK=OFF" "-DWITH_XFS=OFF" "-DWITH_XIO=OFF" ;; Use jemalloc instead of tcmalloc. @@ -184,9 +188,6 @@ (define-public ceph ;; /tmp/ceph-disk-virtualenv/bin/ceph-disk, but somehow ;; src/ceph-disk/CMakeLists.txt fails to create it. (substitute* "src/test/CMakeLists.txt" - ;; FIXME: "create cannot load compressor of type zlib" - ;; "libceph_zlib.so: undefined symbol: isal_deflate" - (("^add_subdirectory\\(compressor\\)") "") ;; FIXME: These tests fails because `ceph-disk' ;; is not available. (("^add_ceph_test\\(test-ceph-helpers\\.sh.*$") "\n") @@ -235,6 +236,11 @@ (define-public ceph (("^add_ceph_test\\(osd-copy-from\\.sh.*$") "\n") (("^add_ceph_test\\(osd-fast-mark-down\\.sh.*$") "\n")) #t))) + (add-before 'configure 'gcc-workaround + (lambda _ + (unsetenv "C_INCLUDE_PATH") + (unsetenv "CPLUS_INCLUDE_PATH") + #t)) (add-before 'check 'set-check-environment (lambda _ ;; Run tests in parallel. @@ -262,28 +268,28 @@ (define-public ceph (add-after 'install 'wrap-python-scripts (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (ceph (string-append out "/bin/ceph")) - (ceph-disk (string-append out "/bin/ceph-disk")) - (ceph-detect-init (string-append - out "/bin/ceph-detect-init")) - + (scripts '("ceph" "ceph-mgr" "ceph-volume" + "ceph-detect-init" + "ceph-disk")) ;deprecated (prettytable (assoc-ref inputs "python2-prettytable")) - + (six (assoc-ref inputs "python2-six")) (sitedir (lambda (package) (string-append package "/lib/python2.7/site-packages"))) (PYTHONPATH (string-append (sitedir out) ":" + (sitedir six) ":" (sitedir prettytable)))) (for-each (lambda (executable) - (wrap-program executable + (wrap-program (string-append out "/bin/" executable) `("PYTHONPATH" ":" prefix (,PYTHONPATH)))) - (list ceph ceph-disk ceph-detect-init)) + scripts) #t)))))) (outputs '("out" "lib")) (native-inputs - `(("gperf" ,gperf) + `(("gcc" ,gcc-7) ;7 or later is required + ("gperf" ,gperf) ("pkg-config" ,pkg-config) ("python-cython" ,python-cython) ("python-sphinx" ,python-sphinx) @@ -329,13 +335,16 @@ (define-public ceph ("libatomic-ops" ,libatomic-ops) ("lua" ,lua) ("lz4" ,lz4) + ("oath-toolkit" ,oath-toolkit) ("openldap" ,openldap) ("openssl" ,openssl) ("nss" ,nss) ("parted" ,parted) ("python@2" ,python-2) ("python2-prettytable" ,python2-prettytable) ;used by ceph_daemon.py + ("python2-six" ,python2-six) ;for ceph-mgr + plugins ("python@3" ,python-3) + ("rapidjson" ,rapidjson) ("rocksdb" ,rocksdb) ("snappy" ,snappy) ("udev" ,eudev) -- cgit v1.2.3 From 5ac2b2717f8d4b05c39c5717843d40bb1a493364 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 11 Nov 2018 10:29:56 +0200 Subject: gnu: python-networkx2: Remove variable. * gnu/packages/python.scm (python-networkx2): Remove variable. * gnu/packages/patches/python-networkx2-reproducible-build.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../python-networkx2-reproducible-build.patch | 29 ---------------------- gnu/packages/python.scm | 19 -------------- 3 files changed, 49 deletions(-) delete mode 100644 gnu/packages/patches/python-networkx2-reproducible-build.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 545a7d173f..15088a56a2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1080,7 +1080,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ - %D%/packages/patches/python-networkx2-reproducible-build.patch \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ %D%/packages/patches/python-scikit-learn-fix-test-non-determinism.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ diff --git a/gnu/packages/patches/python-networkx2-reproducible-build.patch b/gnu/packages/patches/python-networkx2-reproducible-build.patch deleted file mode 100644 index 8274767ab8..0000000000 --- a/gnu/packages/patches/python-networkx2-reproducible-build.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c065b972ed294769a41936d6b9feb336473af5d1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= -Date: Sat, 4 Nov 2017 15:28:47 +0100 -Subject: Fix SOURCE_DATE_EPOCH ignored bug (#2735) - -* Fix SOURCE_DATE_EPOCH ignored bug - -Fix a bug in networkx/release.py that makes build -non-reproducible. ---- - networkx/release.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/networkx/release.py b/networkx/release.py -index e81fc0c0..6322cf0d 100644 ---- a/networkx/release.py -+++ b/networkx/release.py -@@ -135,7 +135,7 @@ def get_revision(): - - def get_info(dynamic=True): - # Date information -- date_info = datetime.datetime.now() -+ date_info = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) - date = time.asctime(date_info.timetuple()) - - revision, version, version_info, vcs_info = None, None, None, None --- -2.14.2 - diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index d90805071b..f4592829a0 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -5208,25 +5208,6 @@ (define-public python-networkx (define-public python2-networkx (package-with-python2 python-networkx)) -;; Define new package, because the current version of python-colormath does -;; not build against 2.0. -(define-public python-networkx2 - (package (inherit python-networkx) - (name "python-networkx2") - (version "2.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "networkx" version ".zip")) - (sha256 - (base32 - "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd")) - (patches - (search-patches "python-networkx2-reproducible-build.patch")))))) - -(define-public python2-networkx2 - (package-with-python2 python-networkx2)) - (define-public python-datrie (package (name "python-datrie") -- cgit v1.2.3 From 95176544d54cbc8c7c2bacd96e19b4a1411afbff Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 11 Nov 2018 10:41:32 +0200 Subject: gnu: python-paste: Update to 3.0.4. * gnu/packages/python-web.scm (python-paste): Update to 3.0.4. [source]: Remove patch, add snippet to remove one test. [native-inputs]: Add python-pytest, python-pytest-runner. * gnu/packages/patches/python-paste-remove-website-test.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../patches/python-paste-remove-website-test.patch | 21 --------------------- gnu/packages/python-web.scm | 18 ++++++++++++------ 3 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/python-paste-remove-website-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 15088a56a2..31dafdd42b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1086,7 +1086,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-faker-fix-build-32bit.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ - %D%/packages/patches/python-paste-remove-website-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ diff --git a/gnu/packages/patches/python-paste-remove-website-test.patch b/gnu/packages/patches/python-paste-remove-website-test.patch deleted file mode 100644 index 93417fbe75..0000000000 --- a/gnu/packages/patches/python-paste-remove-website-test.patch +++ /dev/null @@ -1,21 +0,0 @@ -Remove the test to see if the Python Paste website is up. - -Obviously without network access there is no way for us to check this, and -it's pretty strange to test a project's website when you really mean to test -the project anyhow... - ---- a/tests/test_proxy.py 2016-02-22 19:13:04.040117767 -0800 -+++ b/tests/test_proxy.py 2016-02-22 19:13:04.040117767 -0800 -@@ -1,12 +1,3 @@ - from paste import proxy - from paste.fixture import TestApp - --def test_paste_website(): -- # Not the most robust test... -- # need to test things like POSTing to pages, and getting from pages -- # that don't set content-length. -- app = proxy.Proxy('http://pythonpaste.org') -- app = TestApp(app) -- res = app.get('/') -- assert 'documentation' in res -- diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 6a8b1f21fb..e158df2000 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Eric Dvorsak -;;; Copyright © 2015, 2016, 2017 Efraim Flashner +;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner ;;; Copyright © 2017 Christopher Baines ;;; Copyright © 2016, 2017 Danny Milosavljevic ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge @@ -2628,19 +2628,25 @@ (define-public python2-wtforms (define-public python-paste (package (name "python-paste") - (version "2.0.3") + (version "3.0.4") (source (origin (method url-fetch) (uri (pypi-uri "Paste" version)) (sha256 (base32 - "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3")) - (patches (search-patches "python-paste-remove-website-test.patch" - "python-paste-remove-timing-test.patch")))) + "01w26w9jyfkh0mfydhfz3dwy3pj3fw7mzvj0lna3vs8hyx1hwl0n")) + (patches (search-patches "python-paste-remove-timing-test.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; This test calls out to the internet. + (delete-file "tests/test_proxy.py") #t)))) (build-system python-build-system) (native-inputs - `(("python-nose" ,python-nose))) + `(("python-pytest" ,python-pytest) + ("python-pytest-runner" ,python-pytest-runner) + ("python-nose" ,python-nose))) (propagated-inputs `(("python-six" ,python-six))) (home-page "http://pythonpaste.org") -- cgit v1.2.3 From 8c5749f1b5255e37a6ef7b43e48fe0bbc57ce209 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 11 Nov 2018 16:59:53 +0100 Subject: gnu: python-cffi: Fix test failure on i686. * gnu/packages/patches/python-cffi-x87-stack-clean.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/libffi.scm (python-cffi)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/libffi.scm | 3 ++- .../patches/python-cffi-x87-stack-clean.patch | 29 ++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-cffi-x87-stack-clean.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 31dafdd42b..3e355ac9b3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1078,6 +1078,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-CVE-2018-14647.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ + %D%/packages/patches/python-cffi-x87-stack-clean.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index d1b910bd07..01a5ea2049 100644 --- a/gnu/packages/libffi.scm +++ b/gnu/packages/libffi.scm @@ -88,7 +88,8 @@ (define-public python-cffi (method url-fetch) (uri (pypi-uri "cffi" version)) (sha256 - (base32 "1x3lrj928dcxx1k8k9gf3s4s3jwvzv8mc3kkyg1g7c3a1sc1f3z9")))) + (base32 "1x3lrj928dcxx1k8k9gf3s4s3jwvzv8mc3kkyg1g7c3a1sc1f3z9")) + (patches (search-patches "python-cffi-x87-stack-clean.patch")))) (build-system python-build-system) (outputs '("out" "doc")) (inputs diff --git a/gnu/packages/patches/python-cffi-x87-stack-clean.patch b/gnu/packages/patches/python-cffi-x87-stack-clean.patch new file mode 100644 index 0000000000..50243505ee --- /dev/null +++ b/gnu/packages/patches/python-cffi-x87-stack-clean.patch @@ -0,0 +1,29 @@ +Fix test that fails on i686: + +https://bitbucket.org/cffi/cffi/issues/382 + +This is a squashed version of these commits: +https://bitbucket.org/cffi/cffi/commits/ef09637b2314 +https://bitbucket.org/cffi/cffi/commits/7a76a3815340 + +diff -r 99940f1f5402 testing/cffi0/test_function.py +--- a/testing/cffi0/test_function.py Tue Feb 27 21:18:33 2018 +0100 ++++ b/testing/cffi0/test_function.py Sun Nov 11 16:26:23 2018 +0100 +@@ -45,14 +45,14 @@ + assert x != math.sin(1.23) # rounding effects + assert abs(x - math.sin(1.23)) < 1E-6 + +- def test_sin_no_return_value(self): ++ def test_lround_no_return_value(self): + # check that 'void'-returning functions work too + ffi = FFI(backend=self.Backend()) + ffi.cdef(""" +- void sin(double x); ++ void lround(double x); + """) + m = ffi.dlopen(lib_m) +- x = m.sin(1.23) ++ x = m.lround(1.23) + assert x is None + + def test_dlopen_filename(self): -- cgit v1.2.3 From af50b4abc0b577f7892dafce1a5e6f57150b88b0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 18 Nov 2018 10:18:42 +0100 Subject: gnu: qt@5: Fix build failure on glibc 2.28. * gnu/packages/patches/qt-5-renameat2.patch: New file. * gnu/packages/qt.scm (qt)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/qt-5-renameat2.patch | 35 +++++++++++++++++++++++++++++++ gnu/packages/qt.scm | 3 ++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qt-5-renameat2.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c4299fcbe4..447f08d201 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1099,6 +1099,7 @@ dist_patch_DATA = \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ + %D%/packages/patches/qt-5-renameat2.patch \ %D%/packages/patches/quagga-reproducible-build.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/quilt-test-fix-regex.patch \ diff --git a/gnu/packages/patches/qt-5-renameat2.patch b/gnu/packages/patches/qt-5-renameat2.patch new file mode 100644 index 0000000000..036070c7ff --- /dev/null +++ b/gnu/packages/patches/qt-5-renameat2.patch @@ -0,0 +1,35 @@ +Avoid conflicting declaration of 'renameat2' on glibc 2.28 +(see .) + +Patch from +by Andreas Müller . + +--- + src/corelib/io/qfilesystemengine_unix.cpp | 11 ++++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp +index be6ce48d0cb..1bf1bebc7f1 100644 +--- a/qtbase/src/corelib/io/qfilesystemengine_unix.cpp ++++ b/qtbase/src/corelib/io/qfilesystemengine_unix.cpp +@@ -98,6 +98,17 @@ extern "C" NSString *NSTemporaryDirectory(); + # define FICLONE _IOW(0x94, 9, int) + #endif + ++// renameat2/statx features for non bootstrapped build ++#ifndef QT_BOOTSTRAPPED ++#ifdef __GLIBC_PREREQ ++# define QT_FEATURE_renameat2 (__GLIBC_PREREQ(2, 28) ? 1 : -1) ++# define QT_FEATURE_statx (__GLIBC_PREREQ(2, 28) ? 1 : -1) ++#else ++# define QT_FEATURE_renameat2 -1 ++# define QT_FEATURE_statx -1 ++#endif ++#endif ++ + # if defined(Q_OS_ANDROID) + // renameat2() and statx() are disabled on Android because quite a few systems + // come with sandboxes that kill applications that make system calls outside a +-- +2.14.4 + diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index cffebc7bff..c4407fea29 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Andreas Enge ;;; Copyright © 2015 Sou Bunnbu -;;; Copyright © 2015 Ludovic Courtès +;;; Copyright © 2015, 2018 Ludovic Courtès ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner ;;; Copyright © 2016, 2017 Nils Gillmann ;;; Copyright © 2016 Thomas Danckaert @@ -121,6 +121,7 @@ (define-public qt (sha256 (base32 "10faac59jvz6dxxljdkaknlxazpnaxgvqdcszabfbbkc1f24n466")) + (patches (search-patches "qt-5-renameat2.patch")) (modules '((guix build utils))) (snippet '(begin -- cgit v1.2.3 From e1f791276144bc1737ab855226d3e66e58909f14 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 21 Nov 2018 10:24:06 +0100 Subject: gnu: casync: Fix build with glibc 2.28. * gnu/packages/patches/casync-renameat2-declaration.patch: New file. * gnu/packages/sync.scm (casync)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../patches/casync-renameat2-declaration.patch | 27 ++++++++++++++++++++++ gnu/packages/sync.scm | 3 ++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/casync-renameat2-declaration.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 358222729a..aeff3f8298 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -607,6 +607,7 @@ dist_patch_DATA = \ %D%/packages/patches/cairo-setjmp-wrapper.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-use-packaged-feedparser.patch \ + %D%/packages/patches/casync-renameat2-declaration.patch \ %D%/packages/patches/catdoc-CVE-2017-11110.patch \ %D%/packages/patches/cdparanoia-fpic.patch \ %D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch \ diff --git a/gnu/packages/patches/casync-renameat2-declaration.patch b/gnu/packages/patches/casync-renameat2-declaration.patch new file mode 100644 index 0000000000..74c2ca7b3c --- /dev/null +++ b/gnu/packages/patches/casync-renameat2-declaration.patch @@ -0,0 +1,27 @@ +Fix build failure on glibc 2.28 where 'renameat2' would end up being +declared twice: . + +From 625244ca47e8ee1375d2d0092271bfd13b0913ea Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Tue, 13 Nov 2018 17:52:48 +0100 +Subject: [PATCH] meson.build: pass -D_GNU_SOURCE when checking for functions + +As described in #166, -D_GNU_SOURCE needs to be passed to the meson function +availability checker. h/t to @tomeon for providing a link to the solution as +well. +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index f42ed16..c0f741e 100644 +--- a/meson.build ++++ b/meson.build +@@ -78,6 +78,6 @@ foreach ident : [ + ['copy_file_range', '''#include + #include '''], + ] +- have = cc.has_function(ident[0], prefix : ident[1]) ++ have = cc.has_function(ident[0], args : '-D_GNU_SOURCE', prefix : ident[1]) + conf.set10('HAVE_' + ident[0].to_upper(), have) + endforeach diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm index e0b0af3d96..60e66437a8 100644 --- a/gnu/packages/sync.scm +++ b/gnu/packages/sync.scm @@ -214,7 +214,8 @@ (define-public casync (sha256 (base32 "0znkp3fcksrykcsv06y2mjvf2lbwmin25snmvfa8i5qfm3f4rm88")) - (file-name (string-append name "-" version "-checkout")))) + (file-name (string-append name "-" version "-checkout")) + (patches (search-patches "casync-renameat2-declaration.patch")))) (build-system meson-build-system) (native-inputs `(("pkg-config" ,pkg-config) -- cgit v1.2.3 From e555bbfc48ebb4ca019d3648324b1900a891cda1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 21 Nov 2018 12:43:57 +0100 Subject: gnu: emacs-pdf-tools: Fix build with recent Poppler. * gnu/packages/patches/emacs-pdf-tools-poppler.patch: New file. * gnu/packages/emacs.scm (emacs-pdf-tools)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/emacs.scm | 3 +- gnu/packages/patches/emacs-pdf-tools-poppler.patch | 41 ++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/emacs-pdf-tools-poppler.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index aeff3f8298..4b194d7b13 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -667,6 +667,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ %D%/packages/patches/emacs-json-reformat-fix-tests.patch \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ + %D%/packages/patches/emacs-pdf-tools-poppler.patch \ %D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \ %D%/packages/patches/emacs-source-date-epoch.patch \ %D%/packages/patches/emacs-realgud-fix-configure-ac.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index c386b080e7..dfcee56afe 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1601,7 +1601,8 @@ (define-public emacs-pdf-tools (file-name (git-file-name name version)) (sha256 (base32 - "1i4647vax5na73basc5dz4lh9kprir00fh8ps4i0l1y3ippnjs2s")))) + "1i4647vax5na73basc5dz4lh9kprir00fh8ps4i0l1y3ippnjs2s")) + (patches (search-patches "emacs-pdf-tools-poppler.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; there are no tests diff --git a/gnu/packages/patches/emacs-pdf-tools-poppler.patch b/gnu/packages/patches/emacs-pdf-tools-poppler.patch new file mode 100644 index 0000000000..0477508fa9 --- /dev/null +++ b/gnu/packages/patches/emacs-pdf-tools-poppler.patch @@ -0,0 +1,41 @@ +Fix build issue with recent Poppler: + . + +This combines upstream commits +6cd76dec9aece2a8daa90f17ab77fbf773157a1d..50a5297b82e26cfd52f6c00645ddc1057099d6a7 +for this file. + +diff --git a/server/poppler-hack.cc b/server/poppler-hack.cc +index 0c62f73..427f9df 100644 +--- a/server/poppler-hack.cc ++++ b/server/poppler-hack.cc +@@ -51,7 +51,10 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST; + double y2; + }; + +- char *_xpoppler_goo_string_to_utf8(GooString *s) ++ // This function does not modify its argument s, but for ++ // compatibility reasons (e.g. getLength in GooString.h before 2015) ++ // with older poppler code, it can't be declared as such. ++ char *_xpoppler_goo_string_to_utf8(/* const */ GooString *s) + { + char *result; + +@@ -85,7 +88,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST; + // Set the rectangle of an annotation. It was first added in v0.26. + void xpoppler_annot_set_rectangle (PopplerAnnot *a, PopplerRectangle *rectangle) + { +- GooString *state = a->annot->getAppearState (); ++ GooString *state = (GooString*) a->annot->getAppearState (); + char *ustate = _xpoppler_goo_string_to_utf8 (state); + + a->annot->setRect (rectangle->x1, rectangle->y1, +@@ -105,7 +108,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST; + g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), NULL); + + annot = static_cast(POPPLER_ANNOT (poppler_annot)->annot); +- text = annot->getDate (); ++ text = (GooString*) annot->getDate (); + + return text ? _xpoppler_goo_string_to_utf8 (text) : NULL; + } -- cgit v1.2.3 From 7ff3f3d22caaf03948a60ae691313db28f4fab06 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 22 Nov 2018 01:47:36 +0100 Subject: gnu: python-scikit-learn: Update to 0.20.1. * gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/machine-learning.scm (python-scikit-learn): Update to 0.20.1. [source](patches): Remove. [arguments]: Skip network tests with pytest instead of deleting files. Make sure $HOME is writable. (python2-scikit-learn): Rewrite in terms of PACKAGE-WITH-PYTHON2. --- gnu/local.mk | 1 - gnu/packages/machine-learning.scm | 35 +++++----------------- ...hon-scikit-learn-fix-test-non-determinism.patch | 25 ---------------- 3 files changed, 8 insertions(+), 53 deletions(-) delete mode 100644 gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e56f8a28dc..b67958d083 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1090,7 +1090,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ - %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 \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 09c525ff20..4b2447ece0 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -706,7 +706,7 @@ (define-public dlib (define-public python-scikit-learn (package (name "python-scikit-learn") - (version "0.19.2") + (version "0.20.1") (source (origin (method git-fetch) @@ -716,9 +716,7 @@ (define-public python-scikit-learn (file-name (git-file-name name version)) (sha256 (base32 - "1dk9hdj01c0bny4ps78b7869fjw9gr6qklxf6wyql8h6nh4k19xm")) - (patches (search-patches - "python-scikit-learn-fix-test-non-determinism.patch")))) + "0qv7ir1fy9vjar3llc72yxmfja3gxm5icdf0y3q57vsn3wcdglkz")))) (build-system python-build-system) (arguments `(#:phases @@ -729,11 +727,11 @@ (define-public python-scikit-learn (lambda _ ;; Restrict OpenBLAS threads to prevent segfaults while testing! (setenv "OPENBLAS_NUM_THREADS" "1") - ;; Disable tests that require network access - (delete-file "sklearn/datasets/tests/test_mldata.py") - (delete-file "sklearn/datasets/tests/test_rcv1.py") - (invoke "pytest" "sklearn") - #t)) + + ;; Some tests require write access to $HOME. + (setenv "HOME" "/tmp") + + (invoke "pytest" "sklearn" "-m" "not network"))) ;; FIXME: This fails with permission denied (delete 'reset-gzip-timestamps)))) (inputs @@ -753,24 +751,7 @@ (define-public python-scikit-learn (license license:bsd-3))) (define-public python2-scikit-learn - (let ((parent (package-with-python2 python-scikit-learn))) - (package (inherit parent) - (arguments - (substitute-keyword-arguments (package-arguments parent) - ((#:phases phases) - `(modify-phases ,phases - (replace 'check - (lambda _ - ;; Restrict OpenBLAS threads to prevent segfaults while testing! - (setenv "OPENBLAS_NUM_THREADS" "1") - ;; Some tests expect to be able to write to HOME. - (setenv "HOME" "/tmp") - ;; Disable tests that require network access - (delete-file "sklearn/datasets/tests/test_kddcup99.py") - (delete-file "sklearn/datasets/tests/test_mldata.py") - (delete-file "sklearn/datasets/tests/test_rcv1.py") - (invoke "pytest" "sklearn") - #t))))))))) + (package-with-python2 python-scikit-learn)) (define-public python-autograd (let* ((commit "442205dfefe407beffb33550846434baa90c4de7") diff --git a/gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch b/gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch deleted file mode 100644 index 90328cc0eb..0000000000 --- a/gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch +++ /dev/null @@ -1,25 +0,0 @@ -This patch stops a test sometimes failing because of non-determinism. See -https://github.com/scikit-learn/scikit-learn/pull/9542 - -From ff9f6db6e8b59c2b3528c8137ed4054f57c1d7c4 Mon Sep 17 00:00:00 2001 -From: Hanmin Qin -Date: Sun, 13 Aug 2017 22:13:49 +0800 -Subject: [PATCH] add random_state - ---- - sklearn/tests/test_kernel_ridge.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sklearn/tests/test_kernel_ridge.py b/sklearn/tests/test_kernel_ridge.py -index 4750a096ac6..979875870b6 100644 ---- a/sklearn/tests/test_kernel_ridge.py -+++ b/sklearn/tests/test_kernel_ridge.py -@@ -10,7 +10,7 @@ - from sklearn.utils.testing import assert_array_almost_equal - - --X, y = make_regression(n_features=10) -+X, y = make_regression(n_features=10, random_state=0) - Xcsr = sp.csr_matrix(X) - Xcsc = sp.csc_matrix(X) - Y = np.array([y, y]).T -- cgit v1.2.3 From 37751b480fccde4db000fc4072f5e23af46fa829 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 22 Nov 2018 21:55:29 +0100 Subject: gnu: podofo: Add patch to fix build. * gnu/packages/patches/podofo-cmake-3.12.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/pdf.scm (podofo)[source]: Add patch. --- gnu/local.mk | 1 + gnu/packages/patches/podofo-cmake-3.12.patch | 19 +++++++++++++++++++ gnu/packages/pdf.scm | 3 ++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/podofo-cmake-3.12.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b67958d083..4a63faa22d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1055,6 +1055,7 @@ dist_patch_DATA = \ %D%/packages/patches/plink-1.07-unclobber-i.patch \ %D%/packages/patches/plink-endian-detection.patch \ %D%/packages/patches/plotutils-libpng-jmpbuf.patch \ + %D%/packages/patches/podofo-cmake-3.12.patch \ %D%/packages/patches/poppler-CVE-2018-19149.patch \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ diff --git a/gnu/packages/patches/podofo-cmake-3.12.patch b/gnu/packages/patches/podofo-cmake-3.12.patch new file mode 100644 index 0000000000..0a3c19b21a --- /dev/null +++ b/gnu/packages/patches/podofo-cmake-3.12.patch @@ -0,0 +1,19 @@ +The build fails with cmake 3.12.0. This patch will be obsolete with the next +release. + +https://sourceforge.net/p/podofo/tickets/24/attachment/podofo-cmake-3.12.patch + + +--- a/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:26:02.921494293 +0200 ++++ b/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:34:53.727136443 +0200 +@@ -2,10 +2,3 @@ + TARGET_LINK_LIBRARIES(TokenizerTest ${PODOFO_LIB} ${PODOFO_LIB_DEPENDS}) + SET_TARGET_PROPERTIES(TokenizerTest PROPERTIES COMPILE_FLAGS "${PODOFO_CFLAGS}") + ADD_DEPENDENCIES(TokenizerTest ${PODOFO_DEPEND_TARGET}) +- +-# Copy the test samples over to the build tree +-ADD_CUSTOM_COMMAND( +- TARGET TokenizerTest +- POST_BUILD +- COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/objects" "${CMAKE_CURRENT_BINARY_DIR}/objects" +- ) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 28737c36e4..b89d49fd52 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -557,7 +557,8 @@ (define-public podofo "/podofo-" version ".tar.gz")) (sha256 (base32 - "0wj0y4zcmj4q79wrn3vv3xq4bb0vhhxs8yifafwy9f2sjm83c5p9")))) + "0wj0y4zcmj4q79wrn3vv3xq4bb0vhhxs8yifafwy9f2sjm83c5p9")) + (patches (search-patches "podofo-cmake-3.12.patch")))) (build-system cmake-build-system) (native-inputs `(("cppunit" ,cppunit) -- cgit v1.2.3 From 1e92d311c3e43827a76f5bc9a43def7f7690f8c1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 25 Nov 2018 20:36:44 +0100 Subject: gnu: randomjungle: Do not build static binaries. * gnu/packages/patches/randomjungle-disable-static-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/machine-learning.scm (randomjungle)[source](patches): Add it. [arguments]: Add "--disable-static" to #:configure-flags. --- gnu/local.mk | 1 + gnu/packages/machine-learning.scm | 4 +++- .../patches/randomjungle-disable-static-build.patch | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/randomjungle-disable-static-build.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 8b673fdd8a..5034727ac2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1115,6 +1115,7 @@ dist_patch_DATA = \ %D%/packages/patches/quilt-compat-getopt-fix-second-separator.patch \ %D%/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch \ %D%/packages/patches/qtwebkit-pbutils-include.patch \ + %D%/packages/patches/randomjungle-disable-static-build.patch \ %D%/packages/patches/rapicorn-isnan.patch \ %D%/packages/patches/raptor2-heap-overflow.patch \ %D%/packages/patches/ratpoison-shell.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 4b2447ece0..7b9b28a2eb 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -333,13 +333,15 @@ (define-public randomjungle (uri (string-append "http://www.imbs-luebeck.de/imbs/sites/default/files/u59/" "randomjungle-" version ".tar_.gz")) + (patches (search-patches "randomjungle-disable-static-build.patch")) (sha256 (base32 "12c8rf30cla71swx2mf4ww9mfd8jbdw5lnxd7dxhyw1ygrvg6y4w")))) (build-system gnu-build-system) (arguments `(#:configure-flags - (list (string-append "--with-boost=" + (list "--disable-static" + (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))) #:phases (modify-phases %standard-phases diff --git a/gnu/packages/patches/randomjungle-disable-static-build.patch b/gnu/packages/patches/randomjungle-disable-static-build.patch new file mode 100644 index 0000000000..3de6c269fd --- /dev/null +++ b/gnu/packages/patches/randomjungle-disable-static-build.patch @@ -0,0 +1,14 @@ +Drop build time dependency on the static executables. + +--- a/src/Makefile.in 2018-11-25 20:27:10.691508925 +0100 ++++ b/src/Makefile.in 2018-11-25 20:27:43.565631413 +0100 +@@ -34,8 +34,7 @@ + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-bin_PROGRAMS = rjungle$(EXEEXT) rjungle_static$(EXEEXT) \ +- rjunglesparse$(EXEEXT) rjunglesparse_static$(EXEEXT) ++bin_PROGRAMS = rjungle$(EXEEXT) rjunglesparse$(EXEEXT) + subdir = src + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -- cgit v1.2.3 From 644af6c87092936e8a556da192ee195db58d65b3 Mon Sep 17 00:00:00 2001 From: Björn Höfling Date: Sun, 25 Nov 2018 20:33:13 +0100 Subject: gnu: aegisub: Fix build. * gnu/packages/patches/aegisub-boost68.patch: New file * gnu/local.mk: Add it. * gnu/packages/video.scm (aegisub)[source]: Use patch. --- gnu/local.mk | 1 + gnu/packages/patches/aegisub-boost68.patch | 35 ++++++++++++++++++++++++++++++ gnu/packages/video.scm | 3 ++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/aegisub-boost68.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 5034727ac2..23af3f67d7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -574,6 +574,7 @@ dist_patch_DATA = \ %D%/packages/patches/aegis-test-fixup-1.patch \ %D%/packages/patches/aegis-test-fixup-2.patch \ %D%/packages/patches/aegisub-icu59-include-unistr.patch \ + %D%/packages/patches/aegisub-boost68.patch \ %D%/packages/patches/agg-am_c_prototype.patch \ %D%/packages/patches/amule-crypto-6.patch \ %D%/packages/patches/ansible-wrap-program-hack.patch \ diff --git a/gnu/packages/patches/aegisub-boost68.patch b/gnu/packages/patches/aegisub-boost68.patch new file mode 100644 index 0000000000..013721f3bd --- /dev/null +++ b/gnu/packages/patches/aegisub-boost68.patch @@ -0,0 +1,35 @@ +Source: https://git.archlinux.org/svntogit/community.git/plain/trunk/boost-1.68.patch?h=packages/aegisub +From d8336d2fed73c72d1227b343d6acfb991bc1651b Mon Sep 17 00:00:00 2001 +From: Jan Beich +Date: Mon, 9 Jul 2018 20:15:29 +0000 +Subject: [PATCH] Keep using std::distance after Boost 1.68 + +src/search_replace_engine.cpp:256:14: error: call to + 'distance' is ambiguous + count += distance( + ^~~~~~~~ +/usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter = + boost::u32regex_iterator >] +distance(_InputIter __first, _InputIter __last) +^ +/usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator = + boost::u32regex_iterator >] + distance(SinglePassIterator first, SinglePassIterator last) + ^ +--- + src/search_replace_engine.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/search_replace_engine.cpp b/src/search_replace_engine.cpp +index 594c21e5e..14c71680d 100644 +--- a/src/search_replace_engine.cpp ++++ b/src/search_replace_engine.cpp +@@ -253,7 +253,7 @@ bool SearchReplaceEngine::ReplaceAll() { + if (MatchState ms = matches(&diag, 0)) { + auto& diag_field = diag.*get_dialogue_field(settings.field); + std::string const& text = diag_field.get(); +- count += distance( ++ count += std::distance( + boost::u32regex_iterator(begin(text), end(text), *ms.re), + boost::u32regex_iterator()); + diag_field = u32regex_replace(text, *ms.re, settings.replace_with); diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 8a5e730bd5..3b2a37112c 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -2757,7 +2757,8 @@ (define-public aegisub (sha256 (base32 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5")) - (patches (search-patches "aegisub-icu59-include-unistr.patch")))) + (patches (search-patches "aegisub-icu59-include-unistr.patch" + "aegisub-boost68.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags -- cgit v1.2.3 From bc0d24292d776826b8ce9c9aa9d620e33160d1ed Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Tue, 27 Nov 2018 00:23:03 +0100 Subject: gnu: mono: Make build reproducible. * gnu/packages/patches/mono-mdoc-timestamping.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/mono.scm (mono)[source]: Use patch. [arguments]<#:phases>[make-reproducible]: New phase. <#:phases>[set-env]: Set SOURCE_DATE_EPOCH. --- gnu/local.mk | 1 + gnu/packages/mono.scm | 11 ++++++++++- gnu/packages/patches/mono-mdoc-timestamping.patch | 15 +++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/mono-mdoc-timestamping.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 23af3f67d7..250c773992 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -972,6 +972,7 @@ dist_patch_DATA = \ %D%/packages/patches/module-init-tools-moduledir.patch \ %D%/packages/patches/monero-use-system-miniupnpc.patch \ %D%/packages/patches/mongodb-support-unknown-linux-distributions.patch \ + %D%/packages/patches/mono-mdoc-timestamping.patch \ %D%/packages/patches/mozjs17-aarch64-support.patch \ %D%/packages/patches/mozjs24-aarch64-support.patch \ %D%/packages/patches/mozjs38-pkg-config-version.patch \ diff --git a/gnu/packages/mono.scm b/gnu/packages/mono.scm index 8ab449dd8e..17f90fe30a 100644 --- a/gnu/packages/mono.scm +++ b/gnu/packages/mono.scm @@ -41,7 +41,8 @@ (define-public mono ".tar.bz2")) (sha256 (base32 - "0jibyvyv2jy8dq5ij0j00iq3v74r0y90dcjc3dkspcfbnn37cphn")))) + "0jibyvyv2jy8dq5ij0j00iq3v74r0y90dcjc3dkspcfbnn37cphn")) + (patches (search-patches "mono-mdoc-timestamping.patch")))) (build-system gnu-build-system) (native-inputs `(("gettext" ,gettext-minimal) @@ -52,10 +53,18 @@ (define-public mono (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'make-reproducible + (lambda _ + (substitute* "mono/mini/Makefile.in" + (("build_date = [^;]*;") + "build_date = (void*) 0;")) + #t)) (add-after 'unpack 'set-env (lambda _ ;;* (#:key inputs #:allow-other-keys) ;; all tests under mcs/class fail trying to access $HOME (setenv "HOME" "/tmp") + ;; ZIP files have "DOS time" which starts in Jan 1980. + (setenv "SOURCE_DATE_EPOCH" "315532800") #t)) (add-after 'unpack 'fix-includes (lambda _ diff --git a/gnu/packages/patches/mono-mdoc-timestamping.patch b/gnu/packages/patches/mono-mdoc-timestamping.patch new file mode 100644 index 0000000000..d5191a93eb --- /dev/null +++ b/gnu/packages/patches/mono-mdoc-timestamping.patch @@ -0,0 +1,15 @@ +--- mono-4.4.1/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs.orig 2018-11-26 22:16:25.008879747 +0100 ++++ mono-4.4.1/mcs/class/monodoc/Monodoc/storage/ZipStorage.cs 2018-11-26 22:21:53.969770985 +0100 +@@ -74,6 +74,12 @@ + id = GetNewCode (); + + ZipEntry entry = new ZipEntry (id); ++ var SOURCE_DATE_EPOCH_string = Environment.GetEnvironmentVariable("SOURCE_DATE_EPOCH"); ++ if (SOURCE_DATE_EPOCH_string != null) ++ { ++ var SOURCE_DATE_EPOCH = Convert.ToInt64(SOURCE_DATE_EPOCH_string); ++ entry.DateTime = new DateTime(SOURCE_DATE_EPOCH, DateTimeKind.Utc); ++ } + zipOutput.PutNextEntry (entry); + } + -- cgit v1.2.3 From f2c99fe52b73bfe81acad825214de952234f82bc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 29 Nov 2018 13:14:22 +0100 Subject: gnu: rust: Shorten patch file name. This file name was too long to fit in a tar archive. * gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch: Rename to... * gnu/packages/patches/rust-reproducible-builds.patch: ... this. * gnu/packages/rust.scm (rust-1.27, rust): Adjust accordingly. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 2 +- ...roducible-builds-by-forcing-window.search.patch | 25 ---------------------- .../patches/rust-reproducible-builds.patch | 25 ++++++++++++++++++++++ gnu/packages/rust.scm | 4 ++-- 4 files changed, 28 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch create mode 100644 gnu/packages/patches/rust-reproducible-builds.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 250c773992..32b561472e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1141,7 +1141,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \ %D%/packages/patches/rust-bootstrap-stage0-test.patch \ %D%/packages/patches/rust-coresimd-doctest.patch \ - %D%/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch \ + %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-test-threading.patch \ diff --git a/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch b/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch deleted file mode 100644 index ef7bf53b5d..0000000000 --- a/gnu/packages/patches/rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001 -From: Tim Ryan -Date: Mon, 14 May 2018 06:22:21 -0400 -Subject: [PATCH] Support reproducible builds by forcing window.search to use - stable key ordering. (#692) -See ---- - src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs -index d49772f8b..1ee66a511 100644 ---- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs -+++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs -@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result { - searchoptions, - index, - }; -+ -+ // By converting to serde_json::Value as an intermediary, we use a -+ // BTreeMap internally and can force a stable ordering of map keys. -+ let json_contents = serde_json::to_value(&json_contents)?; - let json_contents = serde_json::to_string(&json_contents)?; - - Ok(format!("window.search = {};", json_contents)) diff --git a/gnu/packages/patches/rust-reproducible-builds.patch b/gnu/packages/patches/rust-reproducible-builds.patch new file mode 100644 index 0000000000..ef7bf53b5d --- /dev/null +++ b/gnu/packages/patches/rust-reproducible-builds.patch @@ -0,0 +1,25 @@ +From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001 +From: Tim Ryan +Date: Mon, 14 May 2018 06:22:21 -0400 +Subject: [PATCH] Support reproducible builds by forcing window.search to use + stable key ordering. (#692) +See +--- + src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +index d49772f8b..1ee66a511 100644 +--- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs ++++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result { + searchoptions, + index, + }; ++ ++ // By converting to serde_json::Value as an intermediary, we use a ++ // BTreeMap internally and can force a stable ordering of map keys. ++ let json_contents = serde_json::to_value(&json_contents)?; + let json_contents = serde_json::to_string(&json_contents)?; + + Ok(format!("window.search = {};", json_contents)) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 8618c37761..1d9e629a22 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -713,7 +713,7 @@ (define-public rust-1.27 '("rust-coresimd-doctest.patch" "rust-bootstrap-stage0-test.patch" "rust-1.25-accept-more-detailed-gdb-lines.patch" - "rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch")))) + "rust-reproducible-builds.patch")))) (package (inherit base-rust) (arguments @@ -742,7 +742,7 @@ (define-public rust '("rust-coresimd-doctest.patch" "rust-bootstrap-stage0-test.patch" "rust-1.25-accept-more-detailed-gdb-lines.patch" - "rust-mdbook-support-reproducible-builds-by-forcing-window.search.patch")))) + "rust-reproducible-builds.patch")))) (package (inherit base-rust) (inputs -- cgit v1.2.3 From c324ad52b6066b4626312a4120b645c43989dd0a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 29 Nov 2018 14:11:35 +0100 Subject: gnu: lirc: Build reproducibly. * gnu/packages/patches/lirc-reproducible-build.patch: New file. * gnu/packages/lirc.scm (lirc)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/lirc.scm | 3 +- gnu/packages/patches/lirc-reproducible-build.patch | 72 ++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/lirc-reproducible-build.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 32b561472e..6de6306ec5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -935,6 +935,7 @@ dist_patch_DATA = \ %D%/packages/patches/lierolibre-try-building-other-arch.patch \ %D%/packages/patches/linux-pam-no-setfsuid.patch \ %D%/packages/patches/lirc-localstatedir.patch \ + %D%/packages/patches/lirc-reproducible-build.patch \ %D%/packages/patches/llvm-3.5-fix-clang-build-with-gcc5.patch \ %D%/packages/patches/llvm-for-extempore.patch \ %D%/packages/patches/lm-sensors-hwmon-attrs.patch \ diff --git a/gnu/packages/lirc.scm b/gnu/packages/lirc.scm index 860822ce49..7ba2d44532 100644 --- a/gnu/packages/lirc.scm +++ b/gnu/packages/lirc.scm @@ -43,7 +43,8 @@ (define-public lirc (sha256 (base32 "1whlyifvvc7w04ahq07nnk1h18wc8j7c6wnvlb6mszravxh3qxcb")) - (patches (search-patches "lirc-localstatedir.patch")))) + (patches (search-patches "lirc-localstatedir.patch" + "lirc-reproducible-build.patch")))) (build-system gnu-build-system) (arguments '(#:configure-flags diff --git a/gnu/packages/patches/lirc-reproducible-build.patch b/gnu/packages/patches/lirc-reproducible-build.patch new file mode 100644 index 0000000000..20f9344715 --- /dev/null +++ b/gnu/packages/patches/lirc-reproducible-build.patch @@ -0,0 +1,72 @@ +Build Lirc reproducibly. + +https://sourceforge.net/p/lirc/tickets/301/ +https://sourceforge.net/p/lirc/git/merge-requests/33/ +https://sourceforge.net/p/lirc/git/merge-requests/34/ +https://sourceforge.net/p/lirc/git/merge-requests/36/ + +Index: lirc-0.10.1/tools/lirc-lsplugins.cpp +=================================================================== +--- lirc-0.10.1.orig/tools/lirc-lsplugins.cpp ++++ lirc-0.10.1/tools/lirc-lsplugins.cpp +@@ -415,10 +415,9 @@ static void print_header(void) + static void print_yaml_header(void) + { + static const char* const YAML_HEADER = +- "#\n# Generated by lirc-lsplugins --yaml (%s) at %s#\n "; +- const time_t now = time(NULL); ++ "#\n# Generated by lirc-lsplugins --yaml (%s)#\n "; + +- printf(YAML_HEADER, VERSION, ctime(&now)); ++ printf(YAML_HEADER, VERSION); + printf("\ndrivers:\n"); + } + +Index: lirc-0.10.1/python-pkg/lirc/database.py +=================================================================== +--- lirc-0.10.1.orig/python-pkg/lirc/database.py ++++ lirc-0.10.1/python-pkg/lirc/database.py +@@ -156,7 +156,7 @@ class Database(object): + d['device_hint'] = hint + + configs = {} +- for path in glob.glob(configdir + '/*.conf'): ++ for path in sorted(glob.glob(configdir + '/*.conf')): + with open(path) as f: + cf = yaml.load(f.read()) + configs[cf['config']['id']] = cf['config'] +Index: lirc-0.10.1/tools/irdb-get +=================================================================== +--- lirc-0.10.1.orig/tools/irdb-get ++++ lirc-0.10.1/tools/irdb-get +@@ -9,7 +9,6 @@ import fnmatch + import os + import os.path + import sys +-import time + import urllib.error # pylint: disable=no-name-in-module,F0401,E0611 + import urllib.request # pylint: disable=no-name-in-module,F0401,E0611 + +@@ -193,7 +192,7 @@ def do_yaml_config(): + lircmd_by_driver[driver].append("%s/%s" % (tokens[0], tokens[2])) + + print("#") +- print("# Created by 'irdb-get yaml-config' at " + time.ctime()) ++ print("# Created by 'irdb-get yaml-config'") + print("#") + print("\nlircd_by_driver:") + print_yaml_dict(lircd_by_driver) +Index: lirc-0.10.1/tools/lirc-make-devinput +=================================================================== +--- lirc-0.10.1.orig/tools/lirc-make-devinput ++++ lirc-0.10.1/tools/lirc-make-devinput +@@ -61,8 +61,7 @@ if test -n "$lirc_map"; then + fi + + +-echo "# Generated by $(basename $0) on $(uname -r)" +-echo "# Date: $(date)" ++echo "# Generated by $(basename $0)" + cat < Date: Fri, 30 Nov 2018 09:48:16 +0200 Subject: gnu: blender: Use newer ffmpeg. * gnu/packages/graphics.scm (blender)[source]: Add patch for newer ffmpeg compatability. [inputs]: Replace ffmpeg-2.8 with ffmpeg. * gnu/packages/patches/blender-newer-ffmpeg.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/graphics.scm | 5 +- gnu/packages/patches/blender-newer-ffmpeg.patch | 80 +++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/blender-newer-ffmpeg.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b3235b63d1..5b84eef4ef 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -603,6 +603,7 @@ dist_patch_DATA = \ %D%/packages/patches/beignet-correct-file-names.patch \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/blast+-fix-makefile.patch \ + %D%/packages/patches/blender-newer-ffmpeg.patch \ %D%/packages/patches/boost-fix-icu-build.patch \ %D%/packages/patches/borg-respect-storage-quota.patch \ %D%/packages/patches/byobu-writable-status.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index c3c1a4a580..6e184d3334 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -85,7 +85,8 @@ (define-public blender "blender-" version ".tar.gz")) (sha256 (base32 - "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c")))) + "1g4kcdqmf67srzhi3hkdnr4z1ph4h9sza1pahz38mrj998q4r52c")) + (patches (search-patches "blender-newer-ffmpeg.patch")))) (build-system cmake-build-system) (arguments (let ((python-version (version-major+minor (package-version python)))) @@ -141,7 +142,7 @@ (define-public blender ("libjpeg" ,libjpeg) ("libpng" ,libpng) ("libtiff" ,libtiff) - ("ffmpeg-2.8" ,ffmpeg-2.8) ; + ("ffmpeg" ,ffmpeg) ("fftw" ,fftw) ("jack" ,jack-1) ("libsndfile" ,libsndfile) diff --git a/gnu/packages/patches/blender-newer-ffmpeg.patch b/gnu/packages/patches/blender-newer-ffmpeg.patch new file mode 100644 index 0000000000..363489bc70 --- /dev/null +++ b/gnu/packages/patches/blender-newer-ffmpeg.patch @@ -0,0 +1,80 @@ +https://sources.debian.org/data/main/b/blender/2.79.b+dfsg0-4/debian/patches/0008-fix_building_with_latest_versions_of_FFmpeg.patch + +From: Bastien Montagne +Date: Tue, 8 May 2018 16:00:52 +0200 +Subject: fix_building_with_latest_versions_of_FFmpeg + +Some years-old deprecated stuff has now been removed. + +Correct solution is probably to use valid defines etc. in own code, but +this is more FFMEPG maintainer task (since it also may change how old +FFMPEG we do support...). +--- + intern/ffmpeg/ffmpeg_compat.h | 39 ++++++++++++++++++++++++++ + source/blender/blenkernel/intern/writeffmpeg.c | 3 +- + 2 files changed, 41 insertions(+), 1 deletion(-) + +diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h +index 9c06c8a..f7f437c 100644 +--- a/intern/ffmpeg/ffmpeg_compat.h ++++ b/intern/ffmpeg/ffmpeg_compat.h +@@ -109,6 +109,45 @@ int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) + + #endif + ++/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though, ++ * so for now this will do. */ ++ ++#ifndef FF_MIN_BUFFER_SIZE ++# ifdef AV_INPUT_BUFFER_MIN_SIZE ++# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE ++# endif ++#endif ++ ++#ifndef FF_INPUT_BUFFER_PADDING_SIZE ++# ifdef AV_INPUT_BUFFER_PADDING_SIZE ++# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER ++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_GLOBAL_HEADER ++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER ++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_INTERLACED_DCT ++# ifdef AV_CODEC_FLAG_INTERLACED_DCT ++# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT ++# endif ++#endif ++ ++#ifndef CODEC_FLAG_INTERLACED_ME ++# ifdef AV_CODEC_FLAG_INTERLACED_ME ++# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME ++# endif ++#endif ++ + /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */ + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100) + # define AV_CODEC_ID_NONE CODEC_ID_NONE +diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c +index a19e414..04d508a 100644 +--- a/source/blender/blenkernel/intern/writeffmpeg.c ++++ b/source/blender/blenkernel/intern/writeffmpeg.c +@@ -605,7 +605,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, RenderData *rd, int + c->rc_buffer_aggressivity = 1.0; + #endif + +- c->me_method = ME_EPZS; ++ /* Deprecated and not doing anything since July 2015, deleted in recent ffmpeg */ ++ //c->me_method = ME_EPZS; + + codec = avcodec_find_encoder(c->codec_id); + if (!codec) -- cgit v1.2.3