From 20a47371c5ded5dd616c4a4bd256fbabd1636fd6 Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Mon, 23 Jul 2012 15:22:34 +0200 Subject: [PATCH] - update to 1.2.1 - fixed FTBFS caused by gnulib --- .gitignore | 2 +- libpipeline-1.2.1-gnulib.patch | 122 +++++++++++++++++++++++++++++++++ libpipeline.spec | 14 ++-- sources | 2 +- 4 files changed, 132 insertions(+), 8 deletions(-) create mode 100644 libpipeline-1.2.1-gnulib.patch diff --git a/.gitignore b/.gitignore index 44eaa0f..0a3c45c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/libpipeline-1.2.0.tar.gz +/libpipeline-1.2.1.tar.gz diff --git a/libpipeline-1.2.1-gnulib.patch b/libpipeline-1.2.1-gnulib.patch new file mode 100644 index 0000000..042de6b --- /dev/null +++ b/libpipeline-1.2.1-gnulib.patch @@ -0,0 +1,122 @@ +diff -upr libpipeline-1.2.1.orig/configure libpipeline-1.2.1/configure +--- libpipeline-1.2.1.orig/configure 2012-03-02 20:55:41.000000000 +0100 ++++ libpipeline-1.2.1/configure 2012-07-23 14:43:27.119564858 +0200 +@@ -919,7 +919,6 @@ GNULIB_PERROR + GNULIB_PCLOSE + GNULIB_OBSTACK_PRINTF_POSIX + GNULIB_OBSTACK_PRINTF +-GNULIB_GETS + GNULIB_GETLINE + GNULIB_GETDELIM + GNULIB_GETCHAR +@@ -17613,7 +17612,6 @@ fi + GNULIB_GETCHAR=0; + GNULIB_GETDELIM=0; + GNULIB_GETLINE=0; +- GNULIB_GETS=0; + GNULIB_OBSTACK_PRINTF=0; + GNULIB_OBSTACK_PRINTF_POSIX=0; + GNULIB_PCLOSE=0; +@@ -22070,7 +22068,6 @@ $as_echo "$gl_cv_next_stdio_h" >&6; } + GNULIB_GETC=1 + GNULIB_GETCHAR=1 + GNULIB_FGETS=1 +- GNULIB_GETS=1 + GNULIB_FREAD=1 + + +@@ -22088,7 +22085,7 @@ $as_echo "$gl_cv_next_stdio_h" >&6; } + + + +- for gl_func in dprintf fpurge fseeko ftello getdelim getline pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do ++ for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose 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 -upr libpipeline-1.2.1.orig/gnulib/lib/stdio.in.h libpipeline-1.2.1/gnulib/lib/stdio.in.h +--- libpipeline-1.2.1.orig/gnulib/lib/stdio.in.h 2012-02-05 03:29:44.000000000 +0100 ++++ libpipeline-1.2.1/gnulib/lib/stdio.in.h 2012-07-23 14:43:27.096571041 +0200 +@@ -699,26 +699,14 @@ _GL_WARN_ON_USE (getline, "getline is un + # 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 + +- + #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ + struct obstack; + /* Grow an obstack with formatted output. Return the number of +@@ -1054,9 +1042,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is + # 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 +diff -upr libpipeline-1.2.1.orig/gnulib/m4/stdio_h.m4 libpipeline-1.2.1/gnulib/m4/stdio_h.m4 +--- libpipeline-1.2.1.orig/gnulib/m4/stdio_h.m4 2012-02-05 03:29:45.000000000 +0100 ++++ libpipeline-1.2.1/gnulib/m4/stdio_h.m4 2012-07-23 14:45:02.696900197 +0200 +@@ -1,4 +1,4 @@ +-# stdio_h.m4 serial 40 ++# stdio_h.m4 serial 41 + dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, +@@ -18,7 +18,6 @@ AC_DEFUN([gl_STDIO_H], + 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,10 +71,10 @@ 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 +- ]], [dprintf fpurge fseeko ftello getdelim getline pclose popen renameat +- snprintf tmpfile vdprintf vsnprintf]) ++ ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen ++ renameat snprintf tmpfile vdprintf vsnprintf]) + ]) + + AC_DEFUN([gl_STDIO_MODULE_INDICATOR], +@@ -113,7 +112,6 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], + 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_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE]) diff --git a/libpipeline.spec b/libpipeline.spec index cccce20..16ff4d3 100644 --- a/libpipeline.spec +++ b/libpipeline.spec @@ -1,12 +1,12 @@ Summary: A pipeline manipulation library Name: libpipeline -Version: 1.2.0 -Release: 3%{?dist} +Version: 1.2.1 +Release: 1%{?dist} License: GPLv3+ Group: Development/Libraries URL: http://libpipeline.nongnu.org/ Source0: http://download.savannah.gnu.org/releases/libpipeline/%{name}-%{version}.tar.gz -Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: libpipeline-1.2.1-gnulib.patch BuildRequires: libtool Provides: bundled(gnulib) @@ -29,6 +29,7 @@ to develop programs that use libpipeline library. %prep %setup -q +%patch0 -p1 -b .gnulibpatch %build ./configure --libdir=%{_libdir} @@ -40,9 +41,6 @@ make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} \ INSTALL='install -p' rm $RPM_BUILD_ROOT/%{_libdir}/libpipeline.la -%clean -rm -rf $RPM_BUILD_ROOT - %post /sbin/ldconfig exit 0 @@ -62,6 +60,10 @@ exit 0 %{_libdir}/pkgconfig/libpipeline.pc %changelog +* Mon Jul 23 2012 Peter Schiffer - 1.2.1-1 +- update to 1.2.1 +- fixed FTBFS caused by gnulib + * Thu Jul 19 2012 Fedora Release Engineering - 1.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/sources b/sources index 34e93d3..3027e56 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dd3a987a0d2b594716baee2f73d61ae3 libpipeline-1.2.0.tar.gz +20896c919eca4acb3d2f13012fb7ba02 libpipeline-1.2.1.tar.gz