Accepting request 141110 from network:utilities

- Add libsmi-flex.patch: yyleng should be type of size_t

OBS-URL: https://build.opensuse.org/request/show/141110
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libsmi?expand=0&rev=16
This commit is contained in:
Stephan Kulow 2012-11-13 16:07:55 +00:00 committed by Git OBS Bridge
commit 9ae72c9d09
3 changed files with 51 additions and 37 deletions

26
libsmi-flex.patch Normal file
View File

@ -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();

View File

@ -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

View File

@ -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 <strauss@ibr.cs.tu-bs.de>
%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 <strauss@ibr.cs.tu-bs.de>
%description devel
This package contains the header files and static libraries of package
libsmi.
Authors:
--------
Frank Strauss <strauss@ibr.cs.tu-bs.de>
%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 \
%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