[gettext] patch gnulib since glibc and C11 dropped gets

Jens Petersen petersen at fedoraproject.org
Fri Jul 27 08:49:35 UTC 2012


commit 5ea031c7fe1012c2a0a9db34ef6b90e7c840cafd
Author: Jens Petersen <petersen at redhat.com>
Date:   Fri Jul 27 17:48:39 2012 +0900

    patch gnulib since glibc and C11 dropped gets

 gettext-0.18.1.1-stdio-gets.patch |   13 +++++++++++++
 gettext.spec                      |   13 ++++++-------
 2 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/gettext-0.18.1.1-stdio-gets.patch b/gettext-0.18.1.1-stdio-gets.patch
new file mode 100644
index 0000000..d1b3123
--- /dev/null
+++ b/gettext-0.18.1.1-stdio-gets.patch
@@ -0,0 +1,13 @@
+--- gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h~	2010-05-18 04:56:12.000000000 +0900
++++ gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h	2012-07-27 17:39:41.812242483 +0900
+@@ -140,8 +140,10 @@
+ /* 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.  */
++#if defined gets
+ #undef gets
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ 
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/gettext.spec b/gettext.spec
index cc38a57..86b2bf9 100644
--- a/gettext.spec
+++ b/gettext.spec
@@ -6,7 +6,7 @@
 Summary: GNU libraries and utilities for producing multi-lingual messages
 Name: gettext
 Version: 0.18.1.1
-Release: 15%{?dist}
+Release: 16%{?dist}
 License: GPLv3+ and LGPLv2+
 Group: Development/Tools
 URL: http://www.gnu.org/software/gettext/
@@ -50,6 +50,7 @@ Provides: /bin/gettext
 Provides: bundled(gnulib)
 Patch1: gettext-readlink-einval.patch
 Patch2: gettext-0.18.1-fix-xgettext-crash.patch
+Patch3: gettext-0.18.1.1-stdio-gets.patch
 
 %description
 The GNU gettext package provides a set of tools and documentation for
@@ -137,6 +138,7 @@ Emacs.
 %setup -q
 %patch1 -p1 -b .orig
 %patch2 -p1 -b .crash
+%patch3 -p1 -b .gets
 
 
 %build
@@ -267,7 +269,6 @@ fi
 %postun libs -p /sbin/ldconfig
 
 %files -f %{name}.lang
-%defattr(-,root,root,-)
 %doc AUTHORS gettext-runtime/BUGS
 %doc COPYING gettext-tools/misc/DISCLAIM README
 %doc NEWS THANKS 
@@ -289,11 +290,9 @@ fi
 %{_datadir}/%{name}/styles
 
 %files common-devel
-%defattr(-,root,root,-)
 %{_datadir}/%{name}/archive.*.tar.gz
 
 %files devel
-%defattr(-,root,root,-)
 %doc gettext-runtime/man/*.3.html ChangeLog
 %{_bindir}/autopoint
 %{_datadir}/%{name}/projects/
@@ -315,7 +314,6 @@ fi
 %endif
 
 %files libs
-%defattr(-,root,root,-)
 %{_libdir}/libasprintf.so.*
 %{_libdir}/libgettextpo.so.*
 %{_libdir}/libgettextlib-0.*.so
@@ -325,16 +323,17 @@ fi
 %endif
 
 %files -n emacs-%{name}
-%defattr(-,root,root,-)
 %dir %{_emacs_sitelispdir}/%{name}
 %{_emacs_sitelispdir}/%{name}/*.elc
 %{_emacs_sitestartdir}/*.el
 
 %files -n emacs-%{name}-el
-%defattr(-,root,root,-)
 %{_emacs_sitelispdir}/%{name}/*.el
 
 %changelog
+* Fri Jul 27 2012 Jens Petersen <petersen at redhat.com> - 0.18.1.1-16
+- patch gnulib since glibc and C11 dropped gets
+
 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.18.1.1-15
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list