[lxpolkit] Fix FTBFS with -Werror=format-security (#1037186, #1106144)

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


commit 953d4c815e36940815237b18503ee2c81e4a8636
Author: Yaakov Selkowitz <yselkowi at redhat.com>
Date:   Thu Jun 19 11:11:29 2014 -0500

    Fix FTBFS with -Werror=format-security (#1037186, #1106144)

 lxpolkit-0.1.0-format-security.patch |   13 +++++++++++++
 lxpolkit.spec                        |   15 +++++++--------
 2 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/lxpolkit-0.1.0-format-security.patch b/lxpolkit-0.1.0-format-security.patch
new file mode 100644
index 0000000..5e4b50d
--- /dev/null
+++ b/lxpolkit-0.1.0-format-security.patch
@@ -0,0 +1,13 @@
+diff --git a/src/lxpolkit.c b/src/lxpolkit.c
+index 9b2b05d..d0cb10c 100644
+--- a/src/lxpolkit.c
++++ b/src/lxpolkit.c
+@@ -37,7 +37,7 @@ static GOptionEntry option_entries[] =
+ 
+ void show_msg(GtkWindow* parent, GtkMessageType type, const char* msg)
+ {
+-    GtkWidget* dlg = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL, type, GTK_BUTTONS_OK, msg);
++    GtkWidget* dlg = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL, type, GTK_BUTTONS_OK, "%s", msg);
+     const char* title = NULL;
+     switch(type)
+     {
diff --git a/lxpolkit.spec b/lxpolkit.spec
index 75e854c..1ffbae5 100644
--- a/lxpolkit.spec
+++ b/lxpolkit.spec
@@ -2,7 +2,7 @@
 
 Name:           lxpolkit
 Version:        0.1.0
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        Simple PolicyKit authentication agent
 
 Group:          User Interface/Desktops
@@ -10,7 +10,7 @@ License:        GPLv2+
 URL:            http://lxde.org/
 #VCS: git:git://lxde.git.sourceforge.net/gitroot/lxde/lxpolkit
 Source0:        http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0:         lxpolkit-0.1.0-format-security.patch
 
 BuildRequires:  gtk2-devel
 BuildRequires:  intltool
@@ -28,6 +28,7 @@ Lightweight X11 Desktop Environment.
 
 %prep
 %setup -q
+%patch0 -p1
 # Don't start in Xfce to avoid bugs like
 # https://bugzilla.redhat.com/show_bug.cgi?id=616730
 sed -i 's/^NotShowIn=GNOME;KDE;/NotShowIn=GNOME;KDE;XFCE;/g' data/lxpolkit.desktop.in.in
@@ -39,18 +40,12 @@ make %{?_smp_mflags}
 
 
 %install
-rm -rf %{buildroot}
 make install DESTDIR=%{buildroot} INSTALL="install -p"
 %find_lang %{name}
 desktop-file-validate %{buildroot}%{_sysconfdir}/xdg/autostart/%{name}.desktop
 
 
-%clean
-rm -rf %{buildroot}
-
-
 %files -f %{name}.lang
-%defattr(-,root,root,-)
 # FIXME add ChangeLog and NEWS if not empty
 %doc AUTHORS COPYING README
 %config %{_sysconfdir}/xdg/autostart/lxpolkit.desktop
@@ -59,6 +54,10 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Thu Jun 19 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 0.1.0-8
+- Fix FTBFS with -Werror=format-security (#1037186, #1106144)
+- Cleanup spec
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.1.0-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list