Bug#728596: libpopt-dev: __secure_getenv() function renamed to secure_getenv()

2013-11-03 Thread Laurent Bigonville
Package: libpopt-dev
Version: 1.16-7
Severity: important
Tags: patch

Hi,

Since glibc version 2.17, the __secure_getenv() has been renamed to
secure_getenv()

The attached patch add detection for both.

The patch is coming from http://rpm5.org/cvs/chngview?cn=16984


Cheers

Laurent Bigonville

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_BE.utf8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libpopt-dev depends on:
ii  libc6-dev [libc-dev]  2.17-93
ii  libpopt0  1.16-7

libpopt-dev recommends no packages.

libpopt-dev suggests no packages.

-- no debconf information
Index: popt/CHANGES
RCS File: /v/rpm/cvs/popt/CHANGES,v
rcsdiff -q -kk '-r1.182' '-r1.183' -u '/v/rpm/cvs/popt/CHANGES,v' 2/dev/null
--- CHANGES	2013/07/02 14:05:26	1.182
+++ CHANGES	2013/07/02 15:45:08	1.183
@@ -1,4 +1,12 @@
 1.17 - 2.0:
+- devzero2000: check secure_getenv for glibc 2.17 
+  Use secure_getenv if it is available.
+  Fall back to __secure_getenv if it is not.
+  In glibc 2.17, __secure_getenv was renamed to secure_getenv.
+  So check also for it.
+  Reference:
+   http://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv
+   http://marc.info/?t=13419261851r=1w=2
 - devzero2000: update the gettext version prereq
 - devzero2000: fix misspelling
   Fix misspelling using  http://github.com/lyda/misspell-check
Index: popt/configure.ac
RCS File: /v/rpm/cvs/popt/configure.ac,v
rcsdiff -q -kk '-r1.86' '-r1.87' -u '/v/rpm/cvs/popt/configure.ac,v' 2/dev/null
--- configure.ac	2013/06/24 21:15:20	1.86
+++ configure.ac	2013/07/02 15:45:08	1.87
@@ -306,7 +306,7 @@
 AC_CHECK_FUNC(setreuid, [], [
 AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb /dev/null ;then :; else LIBS=$LIBS -lc -lucb USEUCB=y;fi])
 ])
-AC_CHECK_FUNCS([getuid geteuid iconv mtrace __secure_getenv setregid stpcpy strerror vasprintf srandom])
+AC_CHECK_FUNCS([getuid geteuid iconv mtrace __secure_getenv secure_gentenv setregid stpcpy strerror vasprintf srandom])
 # drop AC_FUNC_MALLOC, REALLOC and STRTOD
 AC_CHECK_FUNCS([malloc realloc strtod memset nl_langinfo stpcpy strchr strerror strrchr])
 
Index: popt/system.h
RCS File: /v/rpm/cvs/popt/system.h,v
rcsdiff -q -kk '-r1.26' '-r1.27' -u '/v/rpm/cvs/popt/system.h,v' 2/dev/null
--- system.h	2011/09/05 13:20:54	1.26
+++ system.h	2013/07/02 15:45:08	1.27
@@ -202,9 +202,14 @@
 #define	xstrdup(_str)	strdup(_str)
 #endif  /* defined(HAVE_MCHECK_H)  defined(__GNUC__) */
 
-#if defined(HAVE___SECURE_GETENV)  !defined(__LCLINT__)
+#if !defined(__LCLINT__)
+#if defined(HAVE_SECURE_GETENV)
+#define	getenv(_s)	secure_getenv(_s)
+#else
+#if defined(HAVE___SECURE_GETENV)
 #define	getenv(_s)	__secure_getenv(_s)
 #endif
+#endif
 
 /* Include configmake.h autogenerated from Makefile.am */
 #include configmake.h


Bug#728596: libpopt-dev: __secure_getenv() function renamed to secure_getenv()

2013-11-03 Thread Paul Martin
Package: popt
Tags: pending

On Sun, Nov 03, 2013 at 02:06:59PM +0100, Laurent Bigonville wrote:
 Since glibc version 2.17, the __secure_getenv() has been renamed to
 secure_getenv()

Thanks very much. This will be in the next upload (hopefully tonight).


-- 
Paul Martin p...@debian.org


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#728596: libpopt-dev: __secure_getenv() function renamed to secure_getenv()

2013-11-03 Thread Laurent Bigonville
Hi,

Thanks for the upload.

But unfortunately I'm not sure this is enough, as the configure.ac file
has been modified, I think that the autotools (configure and
config.h.in) should also have been regenerated.

The C code is correct, but HAVE_SECURE_GETENV is never defined because
of this.

Cheers

Laurent Bigonville


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#728596: libpopt-dev: __secure_getenv() function renamed to secure_getenv()

2013-11-03 Thread Paul Martin
On Sun, Nov 03, 2013 at 10:38:36PM +0100, Laurent Bigonville wrote:

 But unfortunately I'm not sure this is enough, as the configure.ac file
 has been modified, I think that the autotools (configure and
 config.h.in) should also have been regenerated.

 The C code is correct, but HAVE_SECURE_GETENV is never defined because
 of this.

You have a point here...

I'm going to have to refactor popt to build with dh rather than the
complex script it uses at the moment.  In doing that I'll get it to
automatically rebuild configure, etc.

There's a typo in upstream's configure.ac, so that won't be working
either.  Oops!

-- 
Paul Martin p...@debian.org


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org