diff options
| author | Marius Bakke <mbakke@fastmail.com> | 2018-08-31 16:11:59 +0200 |
|---|---|---|
| committer | Marius Bakke <mbakke@fastmail.com> | 2018-09-09 17:59:34 +0200 |
| commit | 6bbbdb1a34607690ca8413f29bb7bf5cacae2bcc (patch) | |
| tree | e8990651a04b7a03a4638d9284a7e6cff6094fa8 | |
| parent | 0171019418435888afb6024d04702683482d0294 (diff) | |
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.
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/authentication.scm | 2 | ||||
| -rw-r--r-- | gnu/packages/patches/oath-toolkit-glibc-compat.patch | 90 |
3 files changed, 93 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index ce1f8cc173e..39cd55f1052 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -994,6 +994,7 @@ dist_patch_DATA = \ | |||
| 994 | %D%/packages/patches/nvi-db4.patch \ | 994 | %D%/packages/patches/nvi-db4.patch \ |
| 995 | %D%/packages/patches/nyacc-binary-literals.patch \ | 995 | %D%/packages/patches/nyacc-binary-literals.patch \ |
| 996 | %D%/packages/patches/nyx-show-header-stats-with-python3.patch \ | 996 | %D%/packages/patches/nyx-show-header-stats-with-python3.patch \ |
| 997 | %D%/packages/patches/oath-toolkit-glibc-compat.patch \ | ||
| 997 | %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch \ | 998 | %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch \ |
| 998 | %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ | 999 | %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ |
| 999 | %D%/packages/patches/ocaml-CVE-2015-8869.patch \ | 1000 | %D%/packages/patches/ocaml-CVE-2015-8869.patch \ |
diff --git a/gnu/packages/authentication.scm b/gnu/packages/authentication.scm index a58eac9890b..68a64598280 100644 --- a/gnu/packages/authentication.scm +++ b/gnu/packages/authentication.scm | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 18 | 18 | ||
| 19 | (define-module (gnu packages authentication) | 19 | (define-module (gnu packages authentication) |
| 20 | #:use-module (gnu packages) | ||
| 20 | #:use-module (gnu packages linux) | 21 | #:use-module (gnu packages linux) |
| 21 | #:use-module (gnu packages pkg-config) | 22 | #:use-module (gnu packages pkg-config) |
| 22 | #:use-module (guix build-system gnu) | 23 | #:use-module (guix build-system gnu) |
| @@ -35,6 +36,7 @@ | |||
| 35 | (method url-fetch) | 36 | (method url-fetch) |
| 36 | (uri (string-append "https://download.savannah.nongnu.org/releases/" | 37 | (uri (string-append "https://download.savannah.nongnu.org/releases/" |
| 37 | name "/" name "-" version ".tar.gz")) | 38 | name "/" name "-" version ".tar.gz")) |
| 39 | (patches (search-patches "oath-toolkit-glibc-compat.patch")) | ||
| 38 | (sha256 | 40 | (sha256 |
| 39 | (base32 "182ah8vfbg0yhv6mh1b6ap944d0na6x7lpfkwkmzb6jl9gx4cd5h")))) | 41 | (base32 "182ah8vfbg0yhv6mh1b6ap944d0na6x7lpfkwkmzb6jl9gx4cd5h")))) |
| 40 | (build-system gnu-build-system) | 42 | (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 00000000000..22814599e54 --- /dev/null +++ b/gnu/packages/patches/oath-toolkit-glibc-compat.patch | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | Adjust the bundled Gnulib to cope with removal of libio interface in Glibc 2.28. | ||
| 2 | |||
| 3 | Based on this upstream gnulib patch: | ||
| 4 | https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e | ||
| 5 | |||
| 6 | --- a/liboath/gl/fflush.c | ||
| 7 | +++ b/liboath/gl/fflush.c | ||
| 8 | @@ -33,7 +33,7 @@ | ||
| 9 | #undef fflush | ||
| 10 | |||
| 11 | |||
| 12 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 13 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 14 | |||
| 15 | /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ | ||
| 16 | static void | ||
| 17 | @@ -72,7 +72,7 @@ | ||
| 18 | |||
| 19 | #endif | ||
| 20 | |||
| 21 | -#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) | ||
| 22 | +#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) | ||
| 23 | |||
| 24 | # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT | ||
| 25 | /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ | ||
| 26 | @@ -148,7 +148,7 @@ | ||
| 27 | if (stream == NULL || ! freading (stream)) | ||
| 28 | return fflush (stream); | ||
| 29 | |||
| 30 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 31 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 32 | |||
| 33 | clear_ungetc_buffer_preserving_position (stream); | ||
| 34 | |||
| 35 | --- a/liboath/gl/fpurge.c | ||
| 36 | +++ b/liboath/gl/fpurge.c | ||
| 37 | @@ -62,7 +62,7 @@ | ||
| 38 | /* Most systems provide FILE as a struct and the necessary bitmask in | ||
| 39 | <stdio.h>, because they need it for implementing getc() and putc() as | ||
| 40 | fast macros. */ | ||
| 41 | -# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 42 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 43 | fp->_IO_read_end = fp->_IO_read_ptr; | ||
| 44 | fp->_IO_write_ptr = fp->_IO_write_base; | ||
| 45 | /* Avoid memory leak when there is an active ungetc buffer. */ | ||
| 46 | --- a/libaoth/gl/freading.c | ||
| 47 | +++ b/liboath/gl/freading.c | ||
| 48 | @@ -31,7 +31,7 @@ | ||
| 49 | /* Most systems provide FILE as a struct and the necessary bitmask in | ||
| 50 | <stdio.h>, because they need it for implementing getc() and putc() as | ||
| 51 | fast macros. */ | ||
| 52 | -# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 53 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 54 | return ((fp->_flags & _IO_NO_WRITES) != 0 | ||
| 55 | || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 | ||
| 56 | && fp->_IO_read_base != NULL)); | ||
| 57 | --- a/liboath/gl/fseeko.c | ||
| 58 | +++ b/liboath/gl/fseeko.c | ||
| 59 | @@ -47,7 +47,7 @@ | ||
| 60 | #endif | ||
| 61 | |||
| 62 | /* These tests are based on fpurge.c. */ | ||
| 63 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 64 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 65 | if (fp->_IO_read_end == fp->_IO_read_ptr | ||
| 66 | && fp->_IO_write_ptr == fp->_IO_write_base | ||
| 67 | && fp->_IO_save_base == NULL) | ||
| 68 | @@ -123,7 +123,7 @@ | ||
| 69 | return -1; | ||
| 70 | } | ||
| 71 | |||
| 72 | -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 73 | +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ | ||
| 74 | fp->_flags &= ~_IO_EOF_SEEN; | ||
| 75 | fp->_offset = pos; | ||
| 76 | #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ | ||
| 77 | --- a/liboath/gl/stdio-impl.h | ||
| 78 | +++ b/liboath/gl/stdio-impl.h | ||
| 79 | @@ -18,6 +18,11 @@ | ||
| 80 | the same implementation of stdio extension API, except that some fields | ||
| 81 | have different naming conventions, or their access requires some casts. */ | ||
| 82 | |||
| 83 | +/* Glibc 2.28 made _IO_IN_BACKUP private, so define it here for now. */ | ||
| 84 | +#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN | ||
| 85 | +# define _IO_IN_BACKUP 0x100 | ||
| 86 | +#endif | ||
| 87 | + | ||
| 88 | /* BSD stdio derived implementations. */ | ||
| 89 | |||
| 90 | #if defined __NetBSD__ /* NetBSD */ | ||
