[packages/libsmi] Fix build with automake 1.13 and -Werror=format-security

megabajt megabajt at pld-linux.org
Tue Feb 5 13:06:46 CET 2013


commit 6a668894a000fb81bcfd99c204f298de7173c93a
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date:   Tue Feb 5 13:05:55 2013 +0100

    Fix build with automake 1.13 and -Werror=format-security

 libsmi-am.patch              | 11 +++++++++++
 libsmi-format-security.patch | 20 ++++++++++++++++++++
 libsmi.spec                  |  4 ++++
 3 files changed, 35 insertions(+)
---
diff --git a/libsmi.spec b/libsmi.spec
index 219971d..dd64827 100644
--- a/libsmi.spec
+++ b/libsmi.spec
@@ -11,6 +11,8 @@ Source0:	ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/%{name}-%{version}.tar.gz
 # Source0-md5:	760b6b1070738158708649ed2c63425e
 Source1:	%{name}-smi.conf
 Patch0:		flat-mibdir.patch
+Patch1:		%{name}-am.patch
+Patch2:		%{name}-format-security.patch
 URL:		http://www.ibr.cs.tu-bs.de/projects/libsmi/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -149,6 +151,8 @@ Dane PIB (Policy Information Base) dostarczane przez LibSMI.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 find '(' -name '*~' -o -name '*.orig' -o -name '*-orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
diff --git a/libsmi-am.patch b/libsmi-am.patch
new file mode 100644
index 0000000..8f522b6
--- /dev/null
+++ b/libsmi-am.patch
@@ -0,0 +1,11 @@
+--- libsmi-0.4.8/configure.in.newautomake	2013-02-05 12:56:47.028569291 +0100
++++ libsmi-0.4.8/configure.in	2013-02-05 12:56:58.745172483 +0100
+@@ -24,7 +24,7 @@ VERSION_STRING="$LIBSMI_MAJOR.$LIBSMI_MI
+ VERSION_LIBTOOL="$LIBTOOL_VERSION:$LIBTOOL_REVISION:$LIBTOOL_AGE"
+ 
+ AM_INIT_AUTOMAKE(libsmi,$VERSION_STRING)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ 
+ AC_DEFINE([MAX_LEX_DEPTH], 30,
+ [The maximum module import recursion depth.])
diff --git a/libsmi-format-security.patch b/libsmi-format-security.patch
new file mode 100644
index 0000000..4ce1738
--- /dev/null
+++ b/libsmi-format-security.patch
@@ -0,0 +1,20 @@
+--- libsmi-0.4.8/tools/dump-tree.c.formatsec	2013-02-05 13:00:54.907226417 +0100
++++ libsmi-0.4.8/tools/dump-tree.c	2013-02-05 13:01:49.217530638 +0100
+@@ -117,7 +117,7 @@ static void fprintIndex(FILE *f, SmiNode
+ 	 smiElement; smiElement = smiGetNextElement(smiElement), i++) {
+ 	if (i > 0) fprintf(f, ",");
+ 	if (indexname) {
+-	    fprintf(f, indexname);
++	    fputs(indexname, f);
+ 	}
+ 	indexname = smiGetElementNode(smiElement)->name;
+     }
+@@ -143,7 +143,7 @@ static void fprintObjects(FILE *f, SmiNo
+ 	 smiElement = smiGetNextElement(smiElement), i++) {
+ 	if (i > 0) fprintf(f, ",");
+ 	if (objectname) {
+-	    fprintf(f, objectname);
++	    fputs(objectname, f);
+ 	}
+ 	objectname = smiGetElementNode(smiElement)->name;
+     }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libsmi.git/commitdiff/6a668894a000fb81bcfd99c204f298de7173c93a



More information about the pld-cvs-commit mailing list