[cdargs] Fix FTBFS with -Werror=format-security (#1037010, #1106037)

Yaakov Selkowitz yselkowitz at fedoraproject.org
Thu Jul 31 05:44:14 UTC 2014


commit 4063229ee6929193c761a707520d608f702cb0b2
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date:   Thu Jul 31 00:43:52 2014 -0500

    Fix FTBFS with -Werror=format-security (#1037010, #1106037)

 cdargs-1.35_format_security.patch |   13 +++++++++++++
 cdargs.spec                       |   17 +++++++----------
 2 files changed, 20 insertions(+), 10 deletions(-)
---
diff --git a/cdargs-1.35_format_security.patch b/cdargs-1.35_format_security.patch
new file mode 100644
index 0000000..3ddc550
--- /dev/null
+++ b/cdargs-1.35_format_security.patch
@@ -0,0 +1,13 @@
+diff --git a/src/cdargs.cc b/src/cdargs.cc
+index e505e4e..1fdfeb8 100644
+--- a/src/cdargs.cc
++++ b/src/cdargs.cc
+@@ -1301,7 +1301,7 @@ void helpscreen(void) {
+ 
+ void fatal_exit(char* msg) {
+     endwin();
+-    fprintf(stderr, msg);
++    fprintf(stderr, "%s", msg);
+     exit(1);
+ }
+ 
diff --git a/cdargs.spec b/cdargs.spec
index 8298687..45842b7 100644
--- a/cdargs.spec
+++ b/cdargs.spec
@@ -2,7 +2,7 @@
 
 Name:		cdargs
 Version:	1.35
-Release:	13%{?dist}
+Release:	14%{?dist}
 Summary:	The shell cd with bookmarks and browser
 
 Group:		Applications/File
@@ -11,7 +11,7 @@ URL:		http://www.skamphausen.de/cgi-bin/ska/CDargs/
 Source0:	http://www.skamphausen.de/downloads/cdargs/%{name}-%{version}.tar.gz
 Source1:	%{name}-%{version}_emacs-init.el
 Patch0:		%{name}-%{version}_shebangs.patch
-BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch1:		%{name}-1.35_format_security.patch
 
 BuildRequires:	ncurses-devel
 BuildRequires:	emacs
@@ -58,6 +58,7 @@ Cdargs.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %configure
@@ -65,7 +66,6 @@ make %{?_smp_mflags}
 %{_emacs_bytecompile} contrib/cdargs.el
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 
 mkdir -p $RPM_BUILD_ROOT%{profiledir}
@@ -79,31 +79,28 @@ install -p -m 644 contrib/cdargs-bash.sh $RPM_BUILD_ROOT%{profiledir}/cdargs.sh
 install -p -m 644 contrib/cdargs-tcsh.csh $RPM_BUILD_ROOT%{profiledir}/cdargs.csh
 install -D -p -m 644 src/cdargs.h $RPM_BUILD_ROOT%{_includedir}/cdargs.h
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
-%defattr(-, root, root, -)
 %{_bindir}/cdargs
 %config(noreplace) %{profiledir}/cdargs.*
 %doc %{_mandir}/man1/cdargs.1*
 %doc AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS TODO
 
 %files devel
-%defattr(-, root, root, -)
 %{_includedir}/cdargs.h
 
 %files -n emacs-cdargs
-%defattr(-, root, root, -)
 %dir %{_emacs_sitelispdir}/%{name}
 %{_emacs_sitelispdir}/%{name}/*.elc
 %{_emacs_sitestartdir}/cdargs-init.el
 
 %files -n emacs-cdargs-el
-%defattr(-, root, root, -)
 %{_emacs_sitelispdir}/%{name}/*.el
 
 %changelog
+* Thu Jul 31 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 1.35-14
+- Fix FTBFS with -Werror=format-security (#1037010, #1106037)
+- Cleanup spec
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.35-13
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list