From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: core-updates schedule Date: Mon, 20 Aug 2018 14:41:49 +0200 Message-ID: <87ftz98b1u.fsf@fastmail.com> References: <87a7q6rkub.fsf@elephly.net> <87600o7tvp.fsf@elephly.net> <87efetif51.fsf@gnu.org> <878t51tl36.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frjVR-0006A2-3c for guix-devel@gnu.org; Mon, 20 Aug 2018 08:42:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frjVK-0006SN-E3 for guix-devel@gnu.org; Mon, 20 Aug 2018 08:42:00 -0400 In-Reply-To: <878t51tl36.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus , Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ricardo Wurmus writes: > Ludovic Court=C3=A8s writes: > >> Today I=E2=80=99ll try switching to glibc 2.28, and if it works well, I= =E2=80=99d like >> to make it the last big change in =E2=80=98core-updates=E2=80=99. > > Marius was working glibc 2.28 and that was the last big change I wanted > to allow into core-updates. I don=E2=80=99t know how close Marius was in > getting this done. One problem with glibc 2.28 is that many (most?) packages that bundle gnulib needs patching. I've attached patches below that fixes some of the packages. Is the "substitution" style okay, or are origin patches preferred? Another thing we should get in is coreutils: version 2.30 has a recent enough gnulib, but I could not figure out the new test failure. Any takers? :-) I will push patches that adjusts bootstrap-tarballs to the new static outputs shortly. glibc progress attached: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=glibc-2.28.patch Content-Transfer-Encoding: quoted-printable From=203f4dcbe7d6331b8bf157464b4d045d2a91ac03cd Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 1 Aug 2018 16:13:45 +0200 Subject: [PATCH 1/4] gnu: glibc: Update to 2.28. * gnu/packages/base.scm (glibc/linux): Update to 2.28. [source](patches): Remove 'glibc-2.27-git-fixes.patch'. (glibc-2.28): Remove variable. (glibc-2.27): New public variable =2D-- gnu/packages/base.scm | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 4065af0ab..ccbbdbf8d 100644 =2D-- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -572,13 +572,13 @@ store.") (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. =2D (version "2.27") + (version "2.28") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.= xz")) (sha256 (base32 =2D "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 @@ -590,7 +590,6 @@ store.") #t)) (modules '((guix build utils))) (patches (search-patches "glibc-ldd-x86_64.patch" =2D "glibc-2.27-git-fixes.patch" "glibc-hidden-visibility-ldconfig.pat= ch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" @@ -873,25 +872,25 @@ GLIBC/HURD for a Hurd host" (define-syntax glibc (identifier-syntax (glibc-for-target))) =20 =2D;; The "next" libc. Useful for populating locale data before reconfigur= ing the =2D;; entire system on it. Will be the default in the next rebuild cycle. =2D(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) =2D (version "2.28") + (version "2.27") (source (origin (inherit (package-source glibc)) (uri (string-append "mirror://gnu/glibc/glibc-" version ".ta= r.xz")) (sha256 (base32 =2D "10iha5ynvdj5m62vgpgqbq4cwvc2yhyl2w9yyyjgfxmdmx8h145i")) =2D (patches (search-patches "glibc-allow-kernel-2.6.32.patch" =2D "glibc-ldd-x86_64.patch" + "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji")) + (patches (search-patches "glibc-ldd-x86_64.patch" + "glibc-2.27-git-fixes.patch" "glibc-hidden-visibility-ldconfig.p= atch" =2D "glibc-versioned-locpath.patch"))= )))) =2D =2D;; Below are old libc versions, which we use mostly to build locale data= in =2D;; 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")))))) =20 (define-public glibc-2.26 (package =2D-=20 2.18.0 From=20c73ec33c536df65d666de2cd7a20d6564d8f4649 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 2 Aug 2018 13:32:29 +0200 Subject: [PATCH 2/4] gnu: m4: Fix FTBFS with glibc >=3D 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. =2D-- 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 diff --git a/gnu/local.mk b/gnu/local.mk index 4013803b0..2819d6c95 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -967,6 +967,7 @@ dist_patch_DATA =3D \ %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 b223ce91d..090f5578e 100644 =2D-- a/gnu/packages/m4.scm +++ b/gnu/packages/m4.scm @@ -32,6 +32,7 @@ (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/patc= hes/m4-gnulib-libio.patch new file mode 100644 index 000000000..a26622ccf =2D-- /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=3D4af4a4a71827c0bc= 5e0ec67af23edef4f15cee8e + +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 +=20 +=20 +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeO= S, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeOS, H= aiku, Linux libc5 */ +=20 + /* Clear the stream's ungetc buffer, preserving the value of ftello (fp).= */ + static void +@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp) +=20 + #endif +=20 +-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, = BeOS, Haiku, Linux libc5 */) ++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeOS= , Haiku, Linux libc5 */) +=20 + # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) = && defined __SNPT + /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Androi= d */ +@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream) + if (stream =3D=3D NULL || ! freading (stream)) + return fflush (stream); +=20 +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeO= S, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeOS, H= aiku, Linux libc5 */ +=20 + clear_ungetc_buffer_preserving_position (stream); +=20 +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__ =3D=3D 1 /* GNU libc, BeO= S, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeOS, H= aiku, 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, Andr= oid */ +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__ =3D=3D 1 /* GNU libc, Be= OS, Haiku, Linux libc5 */ ++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeOS, = Haiku, Linux libc5 */ + fp->_IO_read_end =3D fp->_IO_read_ptr; + fp->_IO_write_ptr =3D 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__ =3D=3D 1 /* GNU libc, BeO= S, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeOS, H= aiku, 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__ =3D=3D 1 /* GNU libc, Be= OS, Haiku, Linux libc5 */ ++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeOS, = Haiku, Linux libc5 */ + return ((fp->_flags & _IO_NO_WRITES) !=3D 0 + || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) =3D= =3D 0 + && fp->_IO_read_base !=3D 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 +=20 + /* These tests are based on fpurge.c. */ +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeO= S, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeOS, H= aiku, Linux libc5 */ + if (fp->_IO_read_end =3D=3D fp->_IO_read_ptr + && fp->_IO_write_ptr =3D=3D fp->_IO_write_base + && fp->_IO_save_base =3D=3D NULL) +@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence) + return -1; + } +=20 +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeO= S, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ =3D=3D 1 /* GNU libc, BeOS, H= aiku, Linux libc5 */ + fp->_flags &=3D ~_IO_EOF_SEEN; + fp->_offset =3D 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= . */ +=20 ++/* 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 +=20 + /* BSD stdio derived implementations. */ +=20 =2D-=20 2.18.0 From=2080d193c4454261aec57b9f4822ffc45623a17fbf Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 2 Aug 2018 13:54:44 +0200 Subject: [PATCH 3/4] gnu: gzip: Fix FTBFS with glibc >=3D 2.28. * gnu/packages/compression.scm (gzip)[arguments]: Add phase 'patch-for-glibc-2.28'. =2D-- gnu/packages/compression.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 8104b9d55..de2a8fb7c 100644 =2D-- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -216,6 +216,21 @@ adding and extracting files to/from a tar archive.") '(#:tests? #f #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-for-glibc-2.28 + (lambda _ + ;; Adjust the bundled gnulib to work with glibc 2.28. See e.g. + ;; "m4-gnulib-libio.patch". This is a phase rather than patch + ;; or snippet to work around . + (substitute* (find-files "lib" "\\.c$") + (("#if defined _IO_ftrylockfile") + "#if defined _IO_EOF_SEEN")) + (substitute* "lib/stdio-impl.h" + (("^/\\* BSD stdio derived implementations") + (string-append "#if !defined _IO_IN_BACKUP && defined _IO_E= OF_SEEN\n" + "# define _IO_IN_BACKUP 0x100\n" + "#endif\n\n" + "/* BSD stdio derived implementations"))) + #t)) (add-after 'unpack 'use-absolute-name-of-gzip (lambda* (#:key outputs #:allow-other-keys) (substitute* "gunzip.in" =2D-=20 2.18.0 From=20445717532dc4ff60c56fb9cef80c5aa28af22d15 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 10 Aug 2018 16:01:32 +0200 Subject: [PATCH 4/4] gnu: coreutils: Fix build failure with glibc >=3D 2.28. * gnu/packages/base.scm (coreutils): Ad phase to work around glibc 2.28 gnu= lib. =2D-- gnu/packages/base.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index ccbbdbf8d..7955b0fd7 100644 =2D-- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -355,6 +355,22 @@ used to apply commands with arbitrarily long arguments= .") (arguments `(#:parallel-build? #f ; help2man may be called too early #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-for-glibc-2.28 + (lambda _ + ;; Adjust the bundled gnulib to work with glibc 2.28.= See e.g. + ;; "m4-gnulib-libio.patch". This is a phase rather t= han patch + ;; or snippet to work around . + (substitute* (find-files "lib" "\\.c$") + (("#if defined _IO_ftrylockfile") + "#if defined _IO_EOF_SEEN")) + (substitute* "lib/stdio-impl.h" + (("^/\\* BSD stdio derived implementations") + (string-append + "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SE= EN\n" + "# define _IO_IN_BACKUP 0x100\n" + "#endif\n\n" + "/* BSD stdio derived implementations"))) + #t)) (add-before 'build 'patch-shell-references (lambda _ ;; 'split' uses either $SHELL or /bin/sh. Set $SHELL= so =2D-=20 2.18.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlt6tw0ACgkQoqBt8qM6 VPoQiAgAymLj2XfK+4J7k5XsipFbMEVSEVLfaEnx4n7q0fq7rGT8wlRjUknV9nQg SXwxnnthLGd8c4tT5eZXBbJGsxnp3/szyEjCpTH21cik568fbxMbX8SZOhxoOMCy +grGvz0hog+TnmskNL5fRYmYR3i+78v/RDv0IrmL4M5P5TjBgVcKqiA8qDufJVtw 1A2OXuhhgB4R0DKvYn7e5Ol1ZmprWstOXj1r7Odj7P/3nDReXxteIkSMt3h0C/8k +rR5MfjTj+1CTnC0jQXifUDEqwL6gcDuaQWVQ7f7l2Cdojr7XzBRCX2aH0Pk0Wsi sXXmpEo+OHF2l1lcdAgKgfnDqRIrow== =T9+F -----END PGP SIGNATURE----- --==-=-=--