[lirc] Fix -Werror=format-security build error (#1037178).
leamas
leamas at fedoraproject.org
Tue Dec 3 16:26:10 UTC 2013
commit a21833d1aec0fae0089d1ee65c47a23f6b805d70
Author: Alec Leamas <alec at tests.notat.diaspora.com>
Date: Tue Dec 3 17:19:44 2013 +0100
Fix -Werror=format-security build error (#1037178).
...ng-FTBS-when-using-Werror-format-security.patch | 72 ++++++++++++++++++++
lirc.spec | 13 +++-
2 files changed, 83 insertions(+), 2 deletions(-)
---
diff --git a/0200-Fixing-FTBS-when-using-Werror-format-security.patch b/0200-Fixing-FTBS-when-using-Werror-format-security.patch
new file mode 100644
index 0000000..31e9598
--- /dev/null
+++ b/0200-Fixing-FTBS-when-using-Werror-format-security.patch
@@ -0,0 +1,72 @@
+From ca8ef3bb75fb5759e13702f456680fc30fdc7df7 Mon Sep 17 00:00:00 2001
+From: Alec Leamas <alec at tests.notat.diaspora.com>
+Date: Tue, 3 Dec 2013 16:56:09 +0100
+Subject: [PATCH] Fixing FTBS when using -Werror=format-security
+
+Fedora moves to using above flag for security reasons. Simple
+fix to get rid of compilation error.
+---
+ doc/man2html.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/doc/man2html.c b/doc/man2html.c
+index e1cce31..6898f64 100644
+--- a/doc/man2html.c
++++ b/doc/man2html.c
+@@ -29,7 +29,7 @@
+ ** found, that page will be displayed.
+ **
+ ** man2html will add links to the converted manpages. The function add_links
+-** is used for that. At the moment it will add links as follows, where
++** is used for that. At the moment it will add links as follows, where
+ ** indicates what should match to start with:
+ ** ^^^
+ ** Recognition Item Link
+@@ -748,7 +748,7 @@ char *scan_escape(char *c)
+ h = expand_string(i);
+ break;
+ case 'f':
+- c++;
++ c++;
+ if (*c=='\\') {
+ c++;
+ c=scan_escape(c);
+@@ -1579,7 +1579,7 @@ char *section_list[] = {
+ "8S", "Maintenance Commands",
+ "8V", "Maintenance Commands",
+ "L", "Local Commands",
+-/* for Solaris:
++/* for Solaris:
+ "1", "User Commands",
+ "1B", "SunOS/BSD Compatibility Package Commands",
+ "1b", "SunOS/BSD Compatibility Package Commands",
+@@ -1924,7 +1924,7 @@ char *scan_request(char *c)
+ c=skip_till_newline(c+j);
+ break;
+ case V('i','e'):
+- /* .ie c anything : then part of if else */
++ /* .ie c anything : then part of if else */
+ case V('i','f'):
+ /* .if c anything
+ * .if !c anything
+@@ -2031,7 +2031,7 @@ char *scan_request(char *c)
+ f=fopen(h,"r");
+ if (!f || !buf || !l)
+ fprintf(stderr, "Unable to open or read file %s.\n",
+- h);
++ h);
+ else {
+ i=fread(buf+1,1,l,f);
+ fclose(f);
+@@ -3027,7 +3027,7 @@ int main(int argc, char **argv)
+ /* for mosaic users */
+ printf("<HR>\n<A NAME=\"index\"> </A><H2>Index</H2>\n<DL>\n");
+ manidx[mip]=0;
+- printf(manidx);
++ printf("%s", manidx);
+ if (subs) printf("</DL>\n");
+ printf("</DL>\n");
+ print_sig();
+--
+1.8.3.1
+
diff --git a/lirc.spec b/lirc.spec
index 25f9eb5..5d6e776 100644
--- a/lirc.spec
+++ b/lirc.spec
@@ -22,7 +22,7 @@
Name: lirc
Version: 0.9.0
%if 0%{?released}
-Release: 21%{?dist}
+Release: 22%{?dist}
%else
Release: 0.5.%{pre}%{?dist}
%endif
@@ -66,6 +66,8 @@ Patch103: 0103-xmode2.c-Use-generic-fixed-font-instead-of-Courier.patch
Patch104: 0104-Add-systemd-socket-activation-support.patch
# local glue which should not go upstream.
Patch105: 0105-configure-ac-back-to-0.9.0.patch
+# https://sourceforge.net/p/lirc/mailman/lirc-list/?viewmonth=201312
+Patch200: 0200-Fixing-FTBS-when-using-Werror-format-security.patch
Buildrequires: autoconf
BuildRequires: automake
@@ -203,6 +205,8 @@ to use the LIRCD_IR_DEVICE option in /etc/sysconfig/lirc
%patch104 -p1
%patch105 -p1
+%patch200 -p1
+
chmod 644 contrib/*
chmod +x contrib/hal
chmod +x daemons/input_map.sh
@@ -220,7 +224,7 @@ done
%build
mkdir m4 || :
autoreconf -fi
-
+export CFLAGS="%{optflags} -Werror=format-security"
%configure \
--libdir=%{_libdir} \
--disable-static \
@@ -337,6 +341,11 @@ find /etc/systemd -name lirc.service -xtype l -delete || :
%changelog
+
+* Sun Nov 17 2013 leamas.alec at gmail.com - 0.9.0-22
+- Fix -Werror=format-security build error (#1037178).
+- Not yet built.
+
* Sun Nov 17 2013 leamas.alec at gmail.com - 0.9.0-21
- lircd.service: add sh wrapper to handle empty argumentes.
More information about the scm-commits
mailing list