From 7338757c4514eed0845258987e314c3d42948f700c3588881f864c26023c2471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 13 Nov 2012 10:53:52 +0000 Subject: [PATCH] - Add libsmi-flex.patch: yyleng should be type of size_t OBS-URL: https://build.opensuse.org/package/show/network:utilities/libsmi?expand=0&rev=10 --- libsmi-flex.patch | 26 +++++++++++++++++++++ libsmi.changes | 5 +++++ libsmi.spec | 57 +++++++++++++++++------------------------------ 3 files changed, 51 insertions(+), 37 deletions(-) create mode 100644 libsmi-flex.patch diff --git a/libsmi-flex.patch b/libsmi-flex.patch new file mode 100644 index 0000000..e754e7b --- /dev/null +++ b/libsmi-flex.patch @@ -0,0 +1,26 @@ +Index: libsmi-0.4.8/lib/scanner-smi.h +=================================================================== +--- libsmi-0.4.8.orig/lib/scanner-smi.h ++++ libsmi-0.4.8/lib/scanner-smi.h +@@ -21,7 +21,7 @@ + #define YY_NO_UNPUT + + extern char *yytext; +-extern int yyleng; ++extern size_t yyleng; + + extern int smiEnterLexRecursion(FILE *file); + extern void smiLeaveLexRecursion(); +Index: libsmi-0.4.8/lib/scanner-sming.h +=================================================================== +--- libsmi-0.4.8.orig/lib/scanner-sming.h ++++ libsmi-0.4.8/lib/scanner-sming.h +@@ -21,7 +21,7 @@ + #define YY_NO_UNPUT + + extern char *yytext; +-extern int yyleng; ++extern size_t yyleng; + + extern int smingEnterLexRecursion(FILE *file); + extern void smingLeaveLexRecursion(); diff --git a/libsmi.changes b/libsmi.changes index 73b04c3..2a191b3 100644 --- a/libsmi.changes +++ b/libsmi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 13 10:46:32 UTC 2012 - idonmez@suse.com + +- Add libsmi-flex.patch: yyleng should be type of size_t + ------------------------------------------------------------------- Wed Nov 23 09:21:39 UTC 2011 - coolo@suse.com diff --git a/libsmi.spec b/libsmi.spec index e2a17f2..65c08e9 100644 --- a/libsmi.spec +++ b/libsmi.spec @@ -1,7 +1,7 @@ # # spec file for package libsmi # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,22 +15,23 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: libsmi Version: 0.4.8 -Release: 2 -Group: System/Libraries -License: MIT +Release: 0 Url: http://www.ibr.cs.tu-bs.de/projects/libsmi Summary: A Library to Access SMI MIB Information +License: MIT +Group: System/Libraries Source: %{name}-%{version}.tar.gz Patch0: libsmi-0.4.8-parser.patch Patch1: libsmi-0.4.8-gnu-source.patch Patch2: libsmi-CVE-2010-2891.patch +Patch3: libsmi-flex.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: bison flex libtool +BuildRequires: bison +BuildRequires: flex +BuildRequires: libtool %description The purpose of libsmi is to @@ -44,22 +45,15 @@ The purpose of libsmi is to * Allow addition of new kinds of MIB repositories without the need to adapt applications that make use of libsmi - - -Authors: --------- - Frank Strauss - %package devel -License: MIT Summary: Libsmi Header Files And Static Libraries Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} glibc-devel +Requires: %{name} = %{version} +Requires: glibc-devel %package -n libsmi2 -License: MIT -Group: System/Libraries Summary: Libsmi Shared Libraries +Group: System/Libraries Requires: %{name} = %{version} %description -n libsmi2 @@ -74,48 +68,37 @@ The purpose of libsmi is to * Allow addition of new kinds of MIB repositories without the need to adapt applications that make use of libsmi - - -Authors: --------- - Frank Strauss - %description devel This package contains the header files and static libraries of package libsmi. - - -Authors: --------- - Frank Strauss - %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 +%if 0%{?suse_version} > 1220 +%patch3 -p1 +%endif %build autoreconf --force --install -%configure --disable-static --with-pic --enable-smi \ - --enable-sming \ - --with-mibdir=%{_datadir}/mibs +%configure --disable-static \ + --with-pic --enable-smi \ + --enable-sming \ + --with-mibdir=%{_datadir}/mibs -%{__make} %{?jobs:-j%jobs} +make %{?_smp_mflags} %install make install DESTDIR=%buildroot -%{__rm} -f %{buildroot}%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/*.la %post -n libsmi2 -p /sbin/ldconfig %postun -n libsmi2 -p /sbin/ldconfig -%clean -rm -rf $RPM_BUILD_ROOT - %files %defattr(-, root, root) %doc ANNOUNCE COPYING ChangeLog README THANKS TODO doc/*.txt