[lxdm] Fix FTBFS with -Werror=format-security (#1037184, #1106142)
Yaakov Selkowitz
yselkowitz at fedoraproject.org
Tue Jul 8 00:20:19 UTC 2014
commit 5c18acef40e1cc36ce41b1b3d6c1e4cd13f9aee0
Author: Yaakov Selkowitz <yselkowi at redhat.com>
Date: Thu Jun 19 10:40:47 2014 -0500
Fix FTBFS with -Werror=format-security (#1037184, #1106142)
lxdm-0.4.1-format-security.patch | 11 +++++++++++
lxdm.spec | 18 ++++++++++--------
2 files changed, 21 insertions(+), 8 deletions(-)
---
diff --git a/lxdm-0.4.1-format-security.patch b/lxdm-0.4.1-format-security.patch
new file mode 100644
index 0000000..64ceaf7
--- /dev/null
+++ b/lxdm-0.4.1-format-security.patch
@@ -0,0 +1,11 @@
+--- a/src/ui.c
++++ b/src/ui.c
+@@ -146,7 +146,7 @@ static gboolean on_greeter_input(GIOChannel *source, GIOCondition condition, gpo
+ else if( !strncmp(str, "shutdown", 6) )
+ lxdm_do_shutdown();
+ else if( !strncmp(str, "log ", 4) )
+- g_message(str + 4);
++ g_message("%s", str + 4);
+ else if( !strncmp(str, "login ", 6) )
+ {
+ char *user = greeter_param(str, "user");
diff --git a/lxdm.spec b/lxdm.spec
index 55cd614..bace6ec 100644
--- a/lxdm.spec
+++ b/lxdm.spec
@@ -18,7 +18,7 @@
Name: lxdm
Version: 0.4.1
-Release: 7%{?git_version:.%{?git_version}}%{?dist}
+Release: 8%{?git_version:.%{?git_version}}%{?dist}
Summary: Lightweight X11 Display Manager
Group: User Interface/Desktops
@@ -81,7 +81,10 @@ Patch50: lxdm-0.4.1-config.patch
# SELinux, permit graphical root login etc.
Patch51: lxdm-0.4.1-pam.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+# -Werror=format-security
+Patch52: lxdm-0.4.1-format-security.patch
+
BuildRequires: pkgconfig(gtk+-2.0) >= 2.12.0
BuildRequires: iso-codes-devel
@@ -125,6 +128,7 @@ KDM in LXDE distros. It's still in very early stage of development.
%patch50 -p1 -b .config
%patch51 -p1 -b .orig
+%patch52 -p1 -b .formatsec
cat << EOF > tempfiles.lxdm.conf
@@ -137,7 +141,6 @@ EOF
make %{?_smp_mflags} V=1
%install
-rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL='install -p'
%find_lang %{name}
@@ -157,10 +160,6 @@ install -m644 -p -D %{SOURCE2} %{buildroot}%{_unitdir}-preset/83-fedora-lxdm.pre
%endif
-%clean
-rm -rf %{buildroot}
-
-
%if 0%{?fedora} >= 18
%post
%systemd_post %{name}.service
@@ -176,7 +175,6 @@ rm -rf %{buildroot}
%files -f %{name}.lang
-%defattr(-,root,root,-)
# FIXME add ChangeLog and NEWS if not empty
%doc AUTHORS COPYING README TODO gpl-2.0.txt lgpl-2.1.txt
%dir %{_sysconfdir}/%{name}
@@ -219,6 +217,10 @@ rm -rf %{buildroot}
%changelog
+* Thu Jun 19 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 0.4.1-8
+- Fix FTBFS with -Werror=format-security (#1037184, #1106142)
+- Cleanup spec
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.4.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list