From ffc015bea26f24d862e7e877d907fbe1ab9a9967 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sun, 25 Jun 2017 20:58:17 -0400 Subject: [PATCH] gnu: glibc: Fix replacement on i686. This is followup to 665d6a59161769e10b52ffcbcd5cd2db22f32681. Fixes . * gnu/packages/base.scm (glibc-2.25-patched, glibc-2.24, glibc-2.23) (glibc-2.22): Add glibc-vectorized-strcspn-guards.patch to patches. Move a comment where it belongs. * gnu/packages/patches/glibc-CVE-2017-1000366-pt2.patch: Swap with ... * gnu/packages/patches/glibc-CVE-2017-1000366-pt3.patch: ... this. * gnu/packages/patches/glibc-vectorized-strcspn-guards.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Fix formatting. --- gnu/local.mk | 7 +++--- gnu/packages/base.scm | 10 +++++--- ...patch => glibc-CVE-2017-1000366-pt2.patch} | 0 ...patch => glibc-CVE-2017-1000366-pt3.patch} | 0 .../glibc-vectorized-strcspn-guards.patch | 23 +++++++++++++++++++ 5 files changed, 34 insertions(+), 6 deletions(-) rename gnu/packages/patches/{glibc-CVE-2017-1000366-pt3.patch => glibc-CVE-2017-1000366-pt2.patch} (100%) rename gnu/packages/patches/{glibc-CVE-2017-1000366-pt2.patch => glibc-CVE-2017-1000366-pt3.patch} (100%) create mode 100644 gnu/packages/patches/glibc-vectorized-strcspn-guards.patch diff --git a/gnu/local.mk b/gnu/local.mk index 102fe98e60..5d024de07e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -630,14 +630,15 @@ dist_patch_DATA = \ %D%/packages/patches/ghostscript-runpath.patch \ %D%/packages/patches/glib-networking-ssl-cert-file.patch \ %D%/packages/patches/glib-tests-timer.patch \ - %D%/packages/patches/glibc-CVE-2017-1000366-pt1.patch \ - %D%/packages/patches/glibc-CVE-2017-1000366-pt2.patch \ - %D%/packages/patches/glibc-CVE-2017-1000366-pt3.patch \ + %D%/packages/patches/glibc-CVE-2017-1000366-pt1.patch \ + %D%/packages/patches/glibc-CVE-2017-1000366-pt2.patch \ + %D%/packages/patches/glibc-CVE-2017-1000366-pt3.patch \ %D%/packages/patches/glibc-bootstrap-system.patch \ %D%/packages/patches/glibc-ldd-x86_64.patch \ %D%/packages/patches/glibc-locales.patch \ %D%/packages/patches/glibc-memchr-overflow-i686.patch \ %D%/packages/patches/glibc-o-largefile.patch \ + %D%/packages/patches/glibc-vectorized-strcspn-guards.patch \ %D%/packages/patches/glibc-versioned-locpath.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 2767909805..979d657957 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -902,9 +902,6 @@ GLIBC/HURD for a Hurd host" (define-syntax glibc (identifier-syntax (glibc-for-target))) -;; 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 glibc-2.25-patched (package (inherit glibc) @@ -914,10 +911,14 @@ GLIBC/HURD for a Hurd host" (patches (search-patches "glibc-ldd-x86_64.patch" "glibc-versioned-locpath.patch" "glibc-o-largefile.patch" + "glibc-vectorized-strcspn-guards.patch" "glibc-CVE-2017-1000366-pt1.patch" "glibc-CVE-2017-1000366-pt2.patch" "glibc-CVE-2017-1000366-pt3.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.) + (define-public glibc-2.24 (package (inherit glibc) @@ -933,6 +934,7 @@ GLIBC/HURD for a Hurd host" (patches (search-patches "glibc-ldd-x86_64.patch" "glibc-versioned-locpath.patch" "glibc-o-largefile.patch" + "glibc-vectorized-strcspn-guards.patch" "glibc-CVE-2017-1000366-pt1.patch" "glibc-CVE-2017-1000366-pt2.patch" "glibc-CVE-2017-1000366-pt3.patch")))))) @@ -952,6 +954,7 @@ GLIBC/HURD for a Hurd host" (patches (search-patches "glibc-ldd-x86_64.patch" "glibc-versioned-locpath.patch" "glibc-o-largefile.patch" + "glibc-vectorized-strcspn-guards.patch" "glibc-CVE-2017-1000366-pt1.patch" "glibc-CVE-2017-1000366-pt2.patch" "glibc-CVE-2017-1000366-pt3.patch")))))) @@ -969,6 +972,7 @@ GLIBC/HURD for a Hurd host" (base32 "0j49682pm2nh4qbdw35bas82p1pgfnz4d2l7iwfyzvrvj0318wzb")) (patches (search-patches "glibc-ldd-x86_64.patch" + "glibc-vectorized-strcspn-guards.patch" "glibc-CVE-2017-1000366-pt1.patch" "glibc-CVE-2017-1000366-pt2.patch" "glibc-CVE-2017-1000366-pt3.patch")))) diff --git a/gnu/packages/patches/glibc-CVE-2017-1000366-pt3.patch b/gnu/packages/patches/glibc-CVE-2017-1000366-pt2.patch similarity index 100% rename from gnu/packages/patches/glibc-CVE-2017-1000366-pt3.patch rename to gnu/packages/patches/glibc-CVE-2017-1000366-pt2.patch diff --git a/gnu/packages/patches/glibc-CVE-2017-1000366-pt2.patch b/gnu/packages/patches/glibc-CVE-2017-1000366-pt3.patch similarity index 100% rename from gnu/packages/patches/glibc-CVE-2017-1000366-pt2.patch rename to gnu/packages/patches/glibc-CVE-2017-1000366-pt3.patch diff --git a/gnu/packages/patches/glibc-vectorized-strcspn-guards.patch b/gnu/packages/patches/glibc-vectorized-strcspn-guards.patch new file mode 100644 index 0000000000..3d6c7749d4 --- /dev/null +++ b/gnu/packages/patches/glibc-vectorized-strcspn-guards.patch @@ -0,0 +1,23 @@ +Copied from Debian. + +2017-06-14 Florian Weimer + + * sysdeps/i386/i686/multiarch/strcspn-c.c: Add IS_IN (libc) guard. + * sysdeps/i386/i686/multiarch/varshift.c: Likewise. + +--- a/sysdeps/i386/i686/multiarch/strcspn-c.c ++++ b/sysdeps/i386/i686/multiarch/strcspn-c.c +@@ -1,2 +1,4 @@ +-#define __strcspn_sse2 __strcspn_ia32 +-#include ++#if IS_IN (libc) ++# define __strcspn_sse2 __strcspn_ia32 ++# include ++#endif +--- a/sysdeps/i386/i686/multiarch/varshift.c ++++ b/sysdeps/i386/i686/multiarch/varshift.c +@@ -1 +1,3 @@ +-#include ++#if IS_IN (libc) ++# include ++#endif -- 2.20.1