[imake] Fix imake build with -Werror=format-security (#1037129)

Adam Jackson ajax at fedoraproject.org
Mon Dec 9 16:15:01 UTC 2013


commit 3ec1d83efa38afb3275db7539d69f18ffe32fd2b
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Dec 9 11:15:05 2013 -0500

    Fix imake build with -Werror=format-security (#1037129)

 imake-1.0.2-find-pedantry.patch |   29 ---------
 imake-fputs.patch               |   28 ++++++++
 imake.spec                      |  131 ++-------------------------------------
 3 files changed, 33 insertions(+), 155 deletions(-)
---
diff --git a/imake-fputs.patch b/imake-fputs.patch
new file mode 100644
index 0000000..eca4798
--- /dev/null
+++ b/imake-fputs.patch
@@ -0,0 +1,28 @@
+From f231ed52c4adeb071de0553af7a575687a6d3dc5 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau at debian.org>
+Date: Sat, 17 Aug 2013 10:12:08 +0000
+Subject: Replace fprintf with fputs
+
+Fix build failure with -Werror=format-security:
+imake.c:1008:5: error: format not a string literal and no format arguments [-Werror=format-security]
+     fprintf (inFile, command);
+     ^
+
+Signed-off-by: Julien Cristau <jcristau at debian.org>
+Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
+---
+diff --git a/imake.c b/imake.c
+index 7ea13e6..c20cd4a 100644
+--- a/imake.c
++++ b/imake.c
+@@ -1005,7 +1005,7 @@ get_libc_version(FILE *inFile)
+     abort ();
+ 
+   while (fgets (command, len, fp))
+-    fprintf (inFile, command);
++    fputs (command, inFile);
+ 
+   len = pclose (fp);
+   remove (aout);
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/imake.spec b/imake.spec
index a1ea66c..26787eb 100644
--- a/imake.spec
+++ b/imake.spec
@@ -1,7 +1,6 @@
 Summary: imake source code configuration and build system
 Name: imake
 Version: 1.0.5
-Release: 8%{?dist}
 License: MIT
 Group: User Interface/X
 URL: http://www.x.org
@@ -13,6 +12,7 @@ Source3: ftp://ftp.x.org/pub/individual/util/xorg-cf-files-1.0.4.tar.bz2
 Source4: ftp://ftp.x.org/pub/individual/util/lndir-1.0.3.tar.bz2
 Patch2: xorg-cf-files-1.0.2-redhat.patch
 Patch11: imake-1.0.2-abort.patch
+Patch12: imake-fputs.patch
 
 BuildRequires: pkgconfig
 BuildRequires: xorg-x11-util-macros
@@ -37,6 +37,7 @@ migrate software to the GNU autotools system.
 # imake patches
 pushd %{name}-%{version}
 %patch11 -p1 -b .abort
+%patch12 -p1 -b .fputs
 popd
 
 %build
@@ -114,6 +115,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/xmkmf.1*
 
 %changelog
+* Mon Dec 09 2013 Adam Jackson <ajax at redhat.com> 1.0.5-8
+- Fix imake build with -Werror=format-security (#1037129)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.5-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
@@ -130,128 +134,3 @@ rm -rf $RPM_BUILD_ROOT
 - imake 1.0.5
 - lndir 1.0.3
 - makedepend 1.0.4
-
-* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.4-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
-
-* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.4-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-
-* Thu Jan 06 2011 Adam Jackson <ajax at redhat.com> 1.0.4-2
-- xorg-cf-files 1.0.4
-- xorg-cf-files-1.0.2-xprint.patch: Drop, merged.
-
-* Mon Nov 01 2010 Peter Hutterer <peter.hutterer at redhat.com> 1.0.4-1
-- imake 1.0.4
-- makedepend 1.0.3
-- lndir 1.0.2
-
-* Mon Oct 25 2010 Adam Jackson <ajax at redhat.com> 1.0.2-15
-- imake-1.0.2-abort.patch: Paper over an abort (#646561)
-
-* Mon Oct 25 2010 Adam Jackson <ajax at redhat.com> 1.0.2-14
-- Don't own things owned by filesystem (#569411)
-
-* Mon Feb 22 2010 Matěj Cepl <mcepl at redhat.com> - 1.0.2-13
--  lndir should ignore .git directory (RH BZ #538249)
-
-* Mon Oct 19 2009 Adam Jackson <ajax at redhat.com> 1.0.2-12
-- xorg-cf-files 1.0.3.3.3
-
-* Tue Oct 13 2009 Adam Jackson <ajax at redhat.com> 1.0.2-11
-- makedepend 1.0.2
-
-* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.2-10
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-
-* Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.2-9
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
-
-* Sun Feb 08 2009 Adam Jackson <ajax at redhat.com> 1.0.2-8
-- imake-1.0.2-find-pedantry.patch: Silence useless pedantry warning from
-  find(1) when running cleanlinks. (#483126)
-
-* Tue Jul 15 2008 Adam Jackson <ajax at redhat.com> 1.0.2-7
-- Fix license tag.
-
-* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.0.2-6
-- Autorebuild for GCC 4.3
-
-* Tue Aug 21 2007 Adam Jackson <ajax at redhat.com> - 1.0.2-5
-- Rebuild for build id
-
-* Mon Mar 26 2007 Adam Jackson <ajax at redhat.com> 1.0.2-4
-- makedepend 1.0.1
-
-* Tue Jul 18 2006 Than Ngo <than at redhat.com> 1.0.2-3
-- cleanup patch files
-- update source files
-
-* Fri Jul 14 2006 Jesse Keating <jkeating at redhat.com> - 1.0.2-2
-- rebuild
-
-* Wed Jun 21 2006 Mike A. Harris <mharris at redhat.com> 1.0.2-1
-- Update to imake-1.0.2, gccmakedep-1.0.2, xorg-cf-files-1.0.2
-
-* Tue Apr 25 2006 Adam Jackson <ajackson at redhat.com> 1.0.1-4
-- Fix ExtraXawReqs to reflect reality (libXp is unneeded)
-
-* Mon Mar 06 2006 Mike A. Harris <mharris at redhat.com> 1.0.1-3
-- Updated xorg-cf-files-1.0.1-redhat.patch with fix for (#178177)
-
-* Wed Mar 01 2006 Karsten Hopp <karsten at redhat.de> 1.0.1-2
-- Buildrequires: xorg-x11-proto-devel
-
-* Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> 1.0.1-1.2
-- bump again for double-long bug on ppc(64)
-
-* Tue Feb 07 2006 Jesse Keating <jkeating at redhat.com> 1.0.1-1.1
-- rebuilt for new gcc4.1 snapshot and glibc changes
-
-* Wed Jan 18 2006 Mike A. Harris <mharris at redhat.com> 1.0.1-1
-- Updated all packages to version 1.0.1 from X11R7.0
-
-* Wed Dec 21 2005 Than Ngo <than at redhat.com> 1.0.0-4
-- final fix for #173593
-
-* Tue Dec 20 2005 Than Ngo <than at redhat.com> 1.0.0-3
-- add correct XAppLoadDir #173593
-- add more macros for fedora
-
-* Mon Dec 19 2005 Than Ngo <than at redhat.com> 1.0.0-2
-- add some macros to fix problem in building of manpages
-
-* Sat Dec 17 2005 Mike A. Harris <mharris at redhat.com> 1.0.0-1
-- Updated all packages to version 1.0.0 from X11R7 RC4
-- Added new lndir, gccmakedep tarballs.  (#173478)
-- Changed manpage dirs from man1x to man1 to match upstream RC4 default.
-- Removed all previous 'misc' patch, as we now pass --with-config-dir to
-  configure to specify the location of the Imake config files.
-- Renamed imake patch to xorg-cf-files-1.0.0-ProjectRoot.patch as it did not
-  patch imake at all.  This should probably be changed to be a custom Red Hat
-  host.def file that is added as a source line instead of randomly patching
-  various files.
-
-* Fri Dec 09 2005 Jesse Keating <jkeating at redhat.com> 0.99.2-5.1
-- rebuilt
-
-* Mon Nov 28 2005 Than Ngo <than at redhat.com> 0.99.2-5
-- add correct ProjectRoot for modular X
-
-* Wed Nov 16 2005 Than Ngo <than at redhat.com> 0.99.2-4 
-- add missing host.conf
-
-* Wed Nov 16 2005 Than Ngo <than at redhat.com> 0.99.2-3
-- fix typo 
-
-* Wed Nov 16 2005 Than Ngo <than at redhat.com> 0.99.2-2
-- fix xmkmf to look config files in /usr/share/X11/config
-  instead /usr/%%{_lib}/X11/config/
-- add host.conf
-
-* Fri Nov 11 2005 Mike A. Harris <mharris at redhat.com> 0.99.2-1
-- Updated to imake-0.99.2, xorg-cf-files-0.99.2, makedepend-0.99.2 from
-  X11R7 RC2.
-
-* Thu Nov 10 2005 Mike A. Harris <mharris at redhat.com> 0.99.1-1
-- Initial build.


More information about the scm-commits mailing list