diff options
author | Nicolas Iooss | 2018-08-25 11:11:04 +0200 |
---|---|---|
committer | Nicolas Iooss | 2018-08-25 23:01:13 +0200 |
commit | 37fd30ec3cd5743b10f248cdd26db4721c3ecc8d (patch) | |
tree | 135bcfb3a4c2cfa9b61b5717254e849f747bfe04 | |
parent | 4c4e076c9e8f62de00076336aee5d00eaff2b268 (diff) | |
download | aur-37fd30ec3cd5743b10f248cdd26db4721c3ecc8d.tar.gz |
findutils-selinux 4.6.0-2: fix build with glibc 2.28
glibc 2.28 introduced breakage in gnulib, which has been patched
upstream.
As this does not break binary builds, do not bump pkgrel.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | gnulib-glibc2.28-compatibility.patch | 125 |
3 files changed, 137 insertions, 2 deletions
@@ -15,7 +15,9 @@ pkgbase = findutils-selinux conflicts = findutils conflicts = selinux-findutils source = https://ftp.gnu.org/pub/gnu/findutils/findutils-4.6.0.tar.gz + source = gnulib-glibc2.28-compatibility.patch sha1sums = f18e8aaee3f3d4173a1f598001003be8706d28b0 + sha1sums = 089b2f56a7c4b24e03184c158f1352ade2b5d050 pkgname = findutils-selinux @@ -19,9 +19,17 @@ conflicts=("${pkgname/-selinux}" "selinux-${pkgname/-selinux}") provides=("${pkgname/-selinux}=${pkgver}-${pkgrel}" "selinux-${pkgname/-selinux}=${pkgver}-${pkgrel}") url="http://www.gnu.org/software/findutils" -source=(https://ftp.gnu.org/pub/gnu/findutils/${pkgname/-selinux}-${pkgver}.tar.gz) -sha1sums=('f18e8aaee3f3d4173a1f598001003be8706d28b0') +source=(https://ftp.gnu.org/pub/gnu/findutils/${pkgname/-selinux}-${pkgver}.tar.gz + gnulib-glibc2.28-compatibility.patch) +sha1sums=('f18e8aaee3f3d4173a1f598001003be8706d28b0' + '089b2f56a7c4b24e03184c158f1352ade2b5d050') #validpgpkeys=('A15B725964A95EE5') # James Youngman <james@youngman.org> + +prepare() { + cd "${srcdir}/${pkgname/-selinux}-${pkgver}" + patch -Np1 -i ../gnulib-glibc2.28-compatibility.patch +} + build() { cd "${srcdir}/${pkgname/-selinux}-${pkgver}" diff --git a/gnulib-glibc2.28-compatibility.patch b/gnulib-glibc2.28-compatibility.patch new file mode 100644 index 000000000000..14447e730a98 --- /dev/null +++ b/gnulib-glibc2.28-compatibility.patch @@ -0,0 +1,125 @@ +Backport gnulib commit 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e to fix +compatibility with glibc 2.28. + +https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e;hp=0404c9ae2845cbf93d71b295b67d6c8bd39382d8 + + +diff --git a/gl/lib/fflush.c b/gl/lib/fflush.c +--- 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 +--- 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 + <stdio.h>, 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 +--- 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 +--- 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 + <stdio.h>, 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 +--- 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/mountlist.c b/gl/lib/mountlist.c +--- a/gl/lib/mountlist.c ++++ b/gl/lib/mountlist.c +@@ -37,6 +37,12 @@ + # include <sys/param.h> + #endif + ++#if MAJOR_IN_MKDEV ++# include <sys/mkdev.h> ++#elif MAJOR_IN_SYSMACROS ++# include <sys/sysmacros.h> ++#endif ++ + #if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */ + # if HAVE_SYS_UCRED_H + # include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS, +diff --git a/gl/lib/stdio-impl.h b/gl/lib/stdio-impl.h +--- 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. */ + |