Debian Bug report logs - #693346
diffutils: FTBFS with eglibc 2.16 - due to outdated gnulib

version graph

Package: diffutils; Maintainer for diffutils is Santiago Vila <sanvila@debian.org>; Source for diffutils is src:diffutils.

Reported by: Wookey <wookey@wookware.org>

Date: Thu, 15 Nov 2012 16:36:01 UTC

Severity: normal

Tags: experimental, patch, sid, upstream

Merged with 701391

Found in version 3.2-7

Fixed in version diffutils/1:3.2-8

Done: Santiago Vila <sanvila@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#693346; Package diffutils. (Thu, 15 Nov 2012 16:36:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wookey <wookey@wookware.org>:
New Bug report received and forwarded. Copy sent to Santiago Vila <sanvila@debian.org>. (Thu, 15 Nov 2012 16:36:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Wookey <wookey@wookware.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: diffutils: FTBFS with eglibc 2.16 - due to outdated gnulib
Date: Thu, 15 Nov 2012 16:33:43 +0000
[Message part 1 (text/plain, inline)]
Package: diffutils
Version: 3.2-7
Severity: serious
Tags: patch experimental upstream
Justification: fails to build from source

Diffutils doesn't build with eglibc2.16 due to gets finally being
removed but the gnulib in the package not knowing about this. The
patch has links to upstream bugs.

A new diffutils release with new gnulib is the right fix for this, but
this simple nobbling works in the meantime (and allows the arm64
bootstrap to progress)

-- System Information:
Debian Release: 6.0.6
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32.33-kvm-i386-20111128-dirty (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
[diffutils-3.2-7-glibc2.16fix.patch (text/x-diff, attachment)]

Severity set to 'normal' from 'serious' Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Thu, 15 Nov 2012 16:39:24 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#693346; Package diffutils. (Thu, 22 Nov 2012 13:24:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to Santiago Vila <sanvila@debian.org>. (Thu, 22 Nov 2012 13:24:03 GMT) Full text and rfc822 format available.

Message #12 received at 693346@bugs.debian.org (full text, mbox):

From: Colin Watson <cjwatson@ubuntu.com>
To: Wookey <wookey@wookware.org>, 693346@bugs.debian.org
Subject: Re: Bug#693346: diffutils: FTBFS with eglibc 2.16 - due to outdated gnulib
Date: Thu, 22 Nov 2012 13:20:56 +0000
On Thu, Nov 15, 2012 at 04:33:43PM +0000, Wookey wrote:
> Diffutils doesn't build with eglibc2.16 due to gets finally being
> removed but the gnulib in the package not knowing about this. The
> patch has links to upstream bugs.
> 
> A new diffutils release with new gnulib is the right fix for this, but
> this simple nobbling works in the meantime (and allows the arm64
> bootstrap to progress)

Here's a somewhat different nobbling which I applied in Ubuntu.  I think
this is a bit closer to the upstream gnulib fix.

  * Avoid assuming that gets is declared.

diff -Nru diffutils-3.2/debian/patches/gnulib-gets diffutils-3.2/debian/patches/gnulib-gets
--- diffutils-3.2/debian/patches/gnulib-gets	1970-01-01 01:00:00.000000000 +0100
+++ diffutils-3.2/debian/patches/gnulib-gets	2012-10-30 16:39:44.000000000 +0000
@@ -0,0 +1,141 @@
+Description: Avoid assuming that gets is declared
+Origin: backport, http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=66712c23388e93e5c518ebc8515140fa0c807348
+Forwarded: no
+Last-Update: 2012-10-30
+
+Index: b/lib/stdio.in.h
+===================================================================
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -681,22 +681,11 @@
+ # endif
+ #endif
+ 
+-#if @GNULIB_GETS@
+-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-#   undef gets
+-#   define gets rpl_gets
+-#  endif
+-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
+-_GL_CXXALIAS_RPL (gets, char *, (char *s));
+-# else
+-_GL_CXXALIAS_SYS (gets, char *, (char *s));
+-#  undef gets
+-# endif
+-_GL_CXXALIASWARN (gets);
+ /* It is very rare that the developer ever has full control of stdin,
+-   so any use of gets warrants an unconditional warning.  Assume it is
+-   always declared, since it is required by C89.  */
++   so any use of gets warrants an unconditional warning; besides, C11
++   removed it.  */
++#undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+ 
+@@ -1018,9 +1007,9 @@
+ # endif
+ #endif
+ 
+-/* Some people would argue that sprintf should be handled like gets
+-   (for example, OpenBSD issues a link warning for both functions),
+-   since both can cause security holes due to buffer overruns.
++/* Some people would argue that all sprintf uses should be warned about
++   (for example, OpenBSD issues a link warning for it),
++   since it can cause security holes due to buffer overruns.
+    However, we believe that sprintf can be used safely, and is more
+    efficient than snprintf in those safe cases; and as proof of our
+    belief, we use sprintf in several gnulib modules.  So this header
+Index: b/m4/stdio_h.m4
+===================================================================
+--- a/m4/stdio_h.m4
++++ b/m4/stdio_h.m4
+@@ -18,7 +18,6 @@
+   GNULIB_GETC=1
+   GNULIB_GETCHAR=1
+   GNULIB_FGETS=1
+-  GNULIB_GETS=1
+   GNULIB_FREAD=1
+   dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
+   dnl "expected source file, required through AC_LIBSOURCES, not found". It is
+@@ -72,9 +71,9 @@
+ 
+   dnl Check for declarations of anything we want to poison if the
+   dnl corresponding gnulib module is not in use, and which is not
+-  dnl guaranteed by C89.
++  dnl guaranteed by both C89 and C11.
+   gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
+-    ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
++    ]], [dprintf fpurge fseeko ftello getdelim getline gets popen renameat
+     snprintf tmpfile vdprintf vsnprintf])
+ ])
+ 
+@@ -112,7 +111,6 @@
+   GNULIB_GETCHAR=0;              AC_SUBST([GNULIB_GETCHAR])
+   GNULIB_GETDELIM=0;             AC_SUBST([GNULIB_GETDELIM])
+   GNULIB_GETLINE=0;              AC_SUBST([GNULIB_GETLINE])
+-  GNULIB_GETS=0;                 AC_SUBST([GNULIB_GETS])
+   GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
+   GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+   GNULIB_PERROR=0;               AC_SUBST([GNULIB_PERROR])
+Index: b/m4/warn-on-use.m4
+===================================================================
+--- a/m4/warn-on-use.m4
++++ b/m4/warn-on-use.m4
+@@ -1,5 +1,5 @@
+-# warn-on-use.m4 serial 4
+-dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
++# warn-on-use.m4 serial 5
++dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+ dnl with or without modifications, as long as this notice is preserved.
+@@ -18,8 +18,8 @@
+ # some systems declare functions in the wrong header, then INCLUDES
+ # should do likewise.
+ #
+-# If you assume C89, then it is generally safe to assume declarations
+-# for functions declared in that standard (such as gets) without
++# It is generally safe to assume declarations for functions declared
++# in the intersection of C89 and C11 (such as printf) without
+ # needing gl_WARN_ON_USE_PREPARE.
+ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
+ [
+Index: b/configure
+===================================================================
+--- a/configure
++++ b/configure
+@@ -1078,7 +1078,6 @@
+ GNULIB_PERROR
+ GNULIB_OBSTACK_PRINTF_POSIX
+ GNULIB_OBSTACK_PRINTF
+-GNULIB_GETS
+ GNULIB_GETLINE
+ GNULIB_GETDELIM
+ GNULIB_GETCHAR
+@@ -10006,7 +10005,6 @@
+   GNULIB_GETCHAR=0;
+   GNULIB_GETDELIM=0;
+   GNULIB_GETLINE=0;
+-  GNULIB_GETS=0;
+   GNULIB_OBSTACK_PRINTF=0;
+   GNULIB_OBSTACK_PRINTF_POSIX=0;
+   GNULIB_PERROR=0;
+@@ -22530,7 +22528,6 @@
+   GNULIB_GETC=1
+   GNULIB_GETCHAR=1
+   GNULIB_FGETS=1
+-  GNULIB_GETS=1
+   GNULIB_FREAD=1
+ 
+ 
+@@ -22548,7 +22545,7 @@
+ 
+ 
+ 
+-    for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat     snprintf tmpfile vdprintf vsnprintf; do
++    for gl_func in dprintf fpurge fseeko ftello getdelim getline gets popen renameat     snprintf tmpfile vdprintf vsnprintf; do
+     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+ $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
diff -Nru diffutils-3.2/debian/patches/series diffutils-3.2/debian/patches/series
--- diffutils-3.2/debian/patches/series	2012-10-04 17:14:44.000000000 +0100
+++ diffutils-3.2/debian/patches/series	2012-10-30 16:31:45.000000000 +0000
@@ -1,3 +1,4 @@
 01-no-usr-share-info-dir-gz
 02-gnulib-fix-for-float-in-powerpc
 99-config-guess-config-sub
+gnulib-gets

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



Added tag(s) sid. Request was from Santiago Vila <sanvila@unex.es> to control@bugs.debian.org. (Sun, 24 Feb 2013 12:51:03 GMT) Full text and rfc822 format available.

Merged 693346 701391 Request was from Santiago Vila <sanvila@unex.es> to control@bugs.debian.org. (Sun, 24 Feb 2013 12:51:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#693346; Package diffutils. (Sun, 24 Feb 2013 13:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Santiago Vila <sanvila@unex.es>:
Extra info received and forwarded to list. Copy sent to Santiago Vila <sanvila@debian.org>. (Sun, 24 Feb 2013 13:39:03 GMT) Full text and rfc822 format available.

Message #21 received at 693346@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@unex.es>
To: Colin Watson <cjwatson@ubuntu.com>, 693346@bugs.debian.org
Cc: Wookey <wookey@wookware.org>
Subject: Re: Bug#693346: diffutils: FTBFS with eglibc 2.16 - due to outdated gnulib
Date: Sun, 24 Feb 2013 14:34:18 +0100 (CET)
On Thu, 22 Nov 2012, Colin Watson wrote:

> On Thu, Nov 15, 2012 at 04:33:43PM +0000, Wookey wrote:
> > Diffutils doesn't build with eglibc2.16 due to gets finally being
> > removed but the gnulib in the package not knowing about this. The
> > patch has links to upstream bugs.
> > 
> > A new diffutils release with new gnulib is the right fix for this, but
> > this simple nobbling works in the meantime (and allows the arm64
> > bootstrap to progress)
> 
> Here's a somewhat different nobbling which I applied in Ubuntu.  I think
> this is a bit closer to the upstream gnulib fix.
> 
>   * Avoid assuming that gets is declared.

Thanks for the more accurate patch, but I had the same bug in
three different packages and this is going to be fixed upstream anyway
(since they are GNU packages) so I applied the simple patch in this case.



Reply sent to Santiago Vila <sanvila@debian.org>:
You have taken responsibility. (Sun, 24 Feb 2013 15:21:06 GMT) Full text and rfc822 format available.

Notification sent to Wookey <wookey@wookware.org>:
Bug acknowledged by developer. (Sun, 24 Feb 2013 15:21:06 GMT) Full text and rfc822 format available.

Message #26 received at 693346-close@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@debian.org>
To: 693346-close@bugs.debian.org
Subject: Bug#693346: fixed in diffutils 1:3.2-8
Date: Sun, 24 Feb 2013 15:17:49 +0000
Source: diffutils
Source-Version: 1:3.2-8

We believe that the bug you reported is fixed in the latest version of
diffutils, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 693346@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Vila <sanvila@debian.org> (supplier of updated diffutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 24 Feb 2013 13:28:12 +0100
Source: diffutils
Binary: diffutils diffutils-doc
Architecture: source amd64 all
Version: 1:3.2-8
Distribution: unstable
Urgency: low
Maintainer: Santiago Vila <sanvila@debian.org>
Changed-By: Santiago Vila <sanvila@debian.org>
Description: 
 diffutils  - File comparison utilities
 diffutils-doc - Documentation for GNU diffutils in HTML format
Closes: 693346
Changes: 
 diffutils (1:3.2-8) unstable; urgency=low
 .
   * Added fix for gnulib compilation against eglibc 2.16, which no longer
     declares gets by default. Closes: #693346.
Checksums-Sha1: 
 131c267f73cc5e13cfa671831bd09d9c8d232e1f 1439 diffutils_3.2-8.dsc
 56f2085621e5d750b78ee69d99ae2d48e44befda 11754 diffutils_3.2-8.debian.tar.gz
 71999e15b8a62267c9989cf09a4ec43d54f111df 366582 diffutils_3.2-8_amd64.deb
 3f0666faf55eeb24f022d84b87956f33b04ddaa9 116346 diffutils-doc_3.2-8_all.deb
Checksums-Sha256: 
 3ac442d1b2f4bcb4acdc1bee0c1889247c993d32231415b78967541a78f5bf74 1439 diffutils_3.2-8.dsc
 96f9df0a28965765fa97424eba77bca6f3fa2edcd5f6193c32cd7d310410f643 11754 diffutils_3.2-8.debian.tar.gz
 8cc14194e41a7197195e863273bf91e8b415a9c4ef0f756f9c5465144a4b342d 366582 diffutils_3.2-8_amd64.deb
 b47ee6a16a7621f26a2087c13cc05db60536377d562ce654ef50f4cfd5118751 116346 diffutils-doc_3.2-8_all.deb
Files: 
 19865c1dfc56db9a59c462551e0e7fa2 1439 utils required diffutils_3.2-8.dsc
 5f8254cdc7395f4a1000e0f7604f0121 11754 utils required diffutils_3.2-8.debian.tar.gz
 88d2efdf162142aef56abe00841159f6 366582 utils required diffutils_3.2-8_amd64.deb
 7e58d14139275bd4e2b81aa6fe0dfa64 116346 doc optional diffutils-doc_3.2-8_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBCAAGBQJRKhH7AAoJEEHOfwufG4syx1oIAJNenT1YSLOurICFQEjyar1B
DcLN76i44nKvLmJaiSWYxfBhafL2Fkt+eGP503Zxlo+HnFGeDT39hPRTJwzFL95V
Zacg1NmZoIgfB9wacZGbNFTexGaBBcMnAOq2MJgH/6bILTaexRXogDLcfU5cuJs5
CSdIdDZu1P6GdHC9AH2wXITqWehLYdeIziseUJ9BU5xFj6MzKWpbJ6FpGbz877+a
Jxf5iyfiRbd0lykjvGHOHPnp+skKtQbx3jBkxN8hE62Sh4ZF9DLul1cczRI11biE
IC2kwnr623HZCDBHF5aT9HHrIOHdpGdqQe3MKdp6/F3vcW1Lb+M3H83q3fHtfrk=
=KKcw
-----END PGP SIGNATURE-----




Reply sent to Santiago Vila <sanvila@debian.org>:
You have taken responsibility. (Sun, 24 Feb 2013 15:21:07 GMT) Full text and rfc822 format available.

Notification sent to Matthias Klose <doko@debian.org>:
Bug acknowledged by developer. (Sun, 24 Feb 2013 15:21:07 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 25 Mar 2013 07:29:38 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 12:51:16 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.