[libprelude] Fix building with glibc-2.16.6
Petr Pisar
ppisar at fedoraproject.org
Wed Aug 8 12:28:33 UTC 2012
commit 244f41da4ea4e3b7f06951714b0e8a9d35b86870
Author: Petr Písař <ppisar at redhat.com>
Date: Wed Aug 8 14:23:38 2012 +0200
Fix building with glibc-2.16.6
...lude-1.0.0-Fix-building-with-glibc-2.16.6.patch | 75 ++++++++++++++++++++
libprelude.spec | 12 +++-
2 files changed, 86 insertions(+), 1 deletions(-)
---
diff --git a/libprelude-1.0.0-Fix-building-with-glibc-2.16.6.patch b/libprelude-1.0.0-Fix-building-with-glibc-2.16.6.patch
new file mode 100644
index 0000000..74cd58c
--- /dev/null
+++ b/libprelude-1.0.0-Fix-building-with-glibc-2.16.6.patch
@@ -0,0 +1,75 @@
+From f5fab01434b096b3bc2b058fec41123392eb3dcb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Wed, 8 Aug 2012 14:13:16 +0200
+Subject: [PATCH] Fix building with glibc-2.16.6
+
+Ported to libprelude-1.0.0 from gnulib commit:
+
+From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
+From: Eric Blake <eblake at redhat.com>
+Date: Thu, 29 Mar 2012 13:30:41 -0600
+Subject: [PATCH] stdio: don't assume gets any more
+
+Gnulib intentionally does not have a gets module, and now that C11
+and glibc have dropped it, we should be more proactive about warning
+any user on a platform that still has a declaration of this dangerous
+interface.
+---
+ libmissing/m4/stdio_h.m4 | 4 ++--
+ libmissing/m4/warn-on-use.m4 | 4 ++--
+ libmissing/stdio.in.h | 6 ++++--
+ 3 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/libmissing/m4/stdio_h.m4 b/libmissing/m4/stdio_h.m4
+index 781fa8d..fc65d37 100644
+--- a/libmissing/m4/stdio_h.m4
++++ b/libmissing/m4/stdio_h.m4
+@@ -34,9 +34,9 @@ AC_DEFUN([gl_STDIO_H],
+
+ 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 vdprintf vsnprintf])
+ ])
+
+diff --git a/libmissing/m4/warn-on-use.m4 b/libmissing/m4/warn-on-use.m4
+index ab46422..494e00b 100644
+--- a/libmissing/m4/warn-on-use.m4
++++ b/libmissing/m4/warn-on-use.m4
+@@ -18,8 +18,8 @@ dnl with or without modifications, as long as this notice is preserved.
+ # 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],
+ [
+diff --git a/libmissing/stdio.in.h b/libmissing/stdio.in.h
+index f5d5d88..6924ef2 100644
+--- a/libmissing/stdio.in.h
++++ b/libmissing/stdio.in.h
+@@ -114,10 +114,12 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
+ #endif
+
+ /* 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
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
+--
+1.7.11.2
+
diff --git a/libprelude.spec b/libprelude.spec
index c10a4ac..ff55135 100644
--- a/libprelude.spec
+++ b/libprelude.spec
@@ -6,18 +6,22 @@
Name: libprelude
Epoch: 1
Version: 1.0.0
-Release: 14%{?dist}
+Release: 15%{?dist}
Summary: The prelude library
Group: System Environment/Libraries
License: GPLv2+
URL: http://prelude-ids.org/
Source0: http://www.prelude-ids.org/download/releases/%{name}/%{name}-%{version}.tar.gz
Patch1: libprelude-1.0.0-gcc46.patch
+# Adjust bundled gnulib to pass compilation with glibc-2.16.6, bug #839602
+Patch2: libprelude-1.0.0-Fix-building-with-glibc-2.16.6.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gnutls-devel, python-devel, lua-devel
#BuildRequires: ruby, ruby-devel
BuildRequires: swig chrpath
+# For libprelude-1.0.0-Fix-building-with-glibc-2.16.6.patch:
+BuildRequires: autoconf, automake
%description
Libprelude is a library that guarantees secure connections between
@@ -71,6 +75,9 @@ Perl bindings for libprelude.
%prep
%setup -q
%patch1 -p1
+# For libprelude-1.0.0-Fix-building-with-glibc-2.16.6.patch
+%patch2 -p1
+autoreconf
%build
%configure --disable-static \
@@ -149,6 +156,9 @@ rm -rf %{buildroot}
#%{ruby_sitearch}/PreludeEasy.so
%changelog
+* Wed Aug 08 2012 Petr Pisar <ppisar at redhat.com> - 1:1.0.0-15
+- Fix building with glibc-2.16.6 (bug #839602)
+
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:1.0.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list