[lxpanel] Fix FTBFS with -Werror=format-security (#1037185, #1106143)

Yaakov Selkowitz yselkowitz at fedoraproject.org
Tue Jul 8 00:22:22 UTC 2014


commit 4ae2e5b1ccfe067c6471cee0638b3783c5bc87d6
Author: Yaakov Selkowitz <yselkowi at redhat.com>
Date:   Thu Jun 19 11:05:34 2014 -0500

    Fix FTBFS with -Werror=format-security (#1037185, #1106143)

 lxpanel-0.6.1-format-security.patch |   13 +++++++++++++
 lxpanel.spec                        |   17 ++++++++---------
 2 files changed, 21 insertions(+), 9 deletions(-)
---
diff --git a/lxpanel-0.6.1-format-security.patch b/lxpanel-0.6.1-format-security.patch
new file mode 100644
index 0000000..c148b4a
--- /dev/null
+++ b/lxpanel-0.6.1-format-security.patch
@@ -0,0 +1,13 @@
+diff --git a/src/plugins/netstatus/netstatus-iface.c b/src/plugins/netstatus/netstatus-iface.c
+index b0009c7..a57f4c8 100644
+--- a/src/plugins/netstatus/netstatus-iface.c
++++ b/src/plugins/netstatus/netstatus-iface.c
+@@ -408,7 +408,7 @@ netstatus_iface_set_polling_error (NetstatusIface *iface,
+   va_start (args, format);
+ 
+   error_message = g_strdup_vprintf (format, args);
+-  error = g_error_new (NETSTATUS_ERROR, code, error_message);
++  error = g_error_new (NETSTATUS_ERROR, code, "%s", error_message);
+ 
+   dprintf (POLLING, "ERROR: %s\n", error->message);
+   netstatus_iface_set_error (iface, error);
diff --git a/lxpanel.spec b/lxpanel.spec
index f5dc039..a4a2053 100644
--- a/lxpanel.spec
+++ b/lxpanel.spec
@@ -2,7 +2,7 @@
 
 Name:           lxpanel
 Version:        0.6.1
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        A lightweight X11 desktop panel
 
 Group:          User Interface/Desktops
@@ -21,10 +21,10 @@ Patch100:       lxpanel-0.5.9-default.patch
 Patch101:       lxpanel-0.3.8.1-nm-connection-editor.patch
 # use zenity instead of xmessage to display low battery warning
 Patch102:       lxpanel-0.5.12-battery-plugin-use-zenity.patch
+# -Werror=format-security
+Patch103:       lxpanel-0.6.1-format-security.patch
 
 
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
 #BuildRequires:  docbook-utils
 BuildRequires:  gettext
 BuildRequires:  gtk2-devel 
@@ -65,6 +65,7 @@ developing applications that use %{name}.
 %patch100 -p1 -b .default
 %patch101 -p1 -b .system-config-network
 %patch102 -p1 -b .zenity
+%patch103 -p1 -b .formatsec
 
 # Fedora >= 19 doesn't use vendor prefixes for desktop files. Instead of
 # maintaining two patches we just strip the prefixes from the files we just
@@ -82,17 +83,12 @@ make %{?_smp_mflags} V=1
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 
 %find_lang %{name}
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 
 %files -f %{name}.lang
-%defattr(-,root,root,-)
 %doc AUTHORS COPYING README
 %{_bindir}/lxpanel*
 %{_datadir}/lxpanel/
@@ -100,11 +96,14 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/lxpanel*
 
 %files devel
-%defattr(-,root,root,-)
 %{_includedir}/lxpanel/
 %{_libdir}/pkgconfig/lxpanel.pc
 
 %changelog
+* Thu Jun 19 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 0.6.1-5
+- Fix FTBFS with -Werror=format-security (#1037185, #1106143)
+- Cleanup spec
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.6.1-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list