From a6b729bdf1c612eeb48c8426a6c580894edaa729aeb49bb0dbef23397374f98e Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 24 Jan 2014 08:10:14 +0000 Subject: [PATCH] Accepting request 214990 from home:aeneas_jaissle:branches:Base:System - Cleanup spec file, remove %clean section - Updated to 2.5.2 - Removed linux-atm-2.5.0.diff (in mainline) - Removed linux-atm-2.5.0-include.patch (in mainline) - Rebased linux-atm-2.5.0-fdleak.patch as linux-atm-2.5.2_fdleak.patch - Added linux-atm-2.5.2_implicit-fortify-decl.patch to fix implicit declarations OBS-URL: https://build.opensuse.org/request/show/214990 OBS-URL: https://build.opensuse.org/package/show/Base:System/linux-atm?expand=0&rev=15 --- linux-atm-2.5.0-fdleak.patch | 22 -- linux-atm-2.5.0-include.patch | 132 ----------- linux-atm-2.5.0.diff | 238 -------------------- linux-atm-2.5.0.tar.gz | 3 - linux-atm-2.5.2.tar.gz | 3 + linux-atm-2.5.2_fdleak.patch | 29 +++ linux-atm-2.5.2_implicit-fortify-decl.patch | 10 + linux-atm.changes | 10 + linux-atm.spec | 64 +++--- 9 files changed, 86 insertions(+), 425 deletions(-) delete mode 100644 linux-atm-2.5.0-fdleak.patch delete mode 100644 linux-atm-2.5.0-include.patch delete mode 100644 linux-atm-2.5.0.diff delete mode 100644 linux-atm-2.5.0.tar.gz create mode 100644 linux-atm-2.5.2.tar.gz create mode 100644 linux-atm-2.5.2_fdleak.patch create mode 100644 linux-atm-2.5.2_implicit-fortify-decl.patch diff --git a/linux-atm-2.5.0-fdleak.patch b/linux-atm-2.5.0-fdleak.patch deleted file mode 100644 index c419b97..0000000 --- a/linux-atm-2.5.0-fdleak.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: src/arpd/atmarp.c -=================================================================== ---- src/arpd/atmarp.c.orig 2009-10-10 01:49:14.000000000 +0200 -+++ src/arpd/atmarp.c 2009-10-10 01:51:34.000000000 +0200 -@@ -90,14 +90,17 @@ static int print_table(void) - } - while ((size = read(fd,buffer,BUF_SIZE))) { - if (size < 0) { -+ close(fd); - perror("read " ATMARP_DUMP_DIR "/" ATMARP_DUMP_FILE); - return 1; - } - if (write(0,buffer,size) < 0) { -+ close(fd); - perror("write stdout"); - return 1; - } - } -+ close(fd); - return 0; - } - diff --git a/linux-atm-2.5.0-include.patch b/linux-atm-2.5.0-include.patch deleted file mode 100644 index 9155d3f..0000000 --- a/linux-atm-2.5.0-include.patch +++ /dev/null @@ -1,132 +0,0 @@ -Index: linux-atm-2.5.0/src/arpd/arp.c -=================================================================== ---- linux-atm-2.5.0.orig/src/arpd/arp.c -+++ linux-atm-2.5.0/src/arpd/arp.c -@@ -16,6 +16,7 @@ - #include /* for linux/if_arp.h */ - #include /* for ntohs, etc. */ - #define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */ -+#include - #include - #include - #include -Index: linux-atm-2.5.0/src/arpd/atmarp.c -=================================================================== ---- linux-atm-2.5.0.orig/src/arpd/atmarp.c -+++ linux-atm-2.5.0/src/arpd/atmarp.c -@@ -19,6 +19,7 @@ - #include - - #include -+#include - #include - #include - -Index: linux-atm-2.5.0/src/arpd/io.c -=================================================================== ---- linux-atm-2.5.0.orig/src/arpd/io.c -+++ linux-atm-2.5.0/src/arpd/io.c -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include /* for CLIP_DEFAULT_IDLETIMER */ - #include - #define _LINUX_NETDEVICE_H /* glibc2 */ -Index: linux-atm-2.5.0/src/arpd/itf.c -=================================================================== ---- linux-atm-2.5.0.orig/src/arpd/itf.c -+++ linux-atm-2.5.0/src/arpd/itf.c -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - #include - #include - #define _LINUX_NETDEVICE_H /* glibc2 */ -Index: linux-atm-2.5.0/src/mpoad/io.c -=================================================================== ---- linux-atm-2.5.0.orig/src/mpoad/io.c -+++ linux-atm-2.5.0/src/mpoad/io.c -@@ -19,6 +19,7 @@ - _syscall3(int,poll,struct pollfd *,ufds,unsigned int,nfds,int,timeout); - #endif - #include -+#include - #include - #include - #include -Index: linux-atm-2.5.0/src/mpoad/k_interf.c -=================================================================== ---- linux-atm-2.5.0.orig/src/mpoad/k_interf.c -+++ linux-atm-2.5.0/src/mpoad/k_interf.c -@@ -10,6 +10,7 @@ - #include /* for OPEN_MAX */ - #include - #include /* for ntohl() */ -+#include - #include - #include - #include "k_interf.h" -Index: linux-atm-2.5.0/src/mpoad/lecs.c -=================================================================== ---- linux-atm-2.5.0.orig/src/mpoad/lecs.c -+++ linux-atm-2.5.0/src/mpoad/lecs.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include /* for MPOA Device type TLV */ - #include "lecs.h" - #include "k_interf.h" -Index: linux-atm-2.5.0/src/mpoad/main.c -=================================================================== ---- linux-atm-2.5.0.orig/src/mpoad/main.c -+++ linux-atm-2.5.0/src/mpoad/main.c -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include - #include - #include -Index: linux-atm-2.5.0/src/mpoad/p_factory.c -=================================================================== ---- linux-atm-2.5.0.orig/src/mpoad/p_factory.c -+++ linux-atm-2.5.0/src/mpoad/p_factory.c -@@ -5,6 +5,7 @@ - #include - #include - #include -+#include - #include - #include - #include -Index: linux-atm-2.5.0/src/mpoad/p_recogn.c -=================================================================== ---- linux-atm-2.5.0.orig/src/mpoad/p_recogn.c -+++ linux-atm-2.5.0/src/mpoad/p_recogn.c -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - #include - #include - #include /* For UINT_MAX */ -Index: linux-atm-2.5.0/src/led/main.c -=================================================================== ---- linux-atm-2.5.0.orig/src/led/main.c -+++ linux-atm-2.5.0/src/led/main.c -@@ -41,6 +41,7 @@ - #include - #include - #include -+#include - - #include - #include diff --git a/linux-atm-2.5.0.diff b/linux-atm-2.5.0.diff deleted file mode 100644 index aacd5c8..0000000 --- a/linux-atm-2.5.0.diff +++ /dev/null @@ -1,238 +0,0 @@ -Index: src/ilmid/atmf_uni.c -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/ilmid/atmf_uni.c,v -retrieving revision 1.2.2.1 -diff -u -w -r1.2.2.1 atmf_uni.c ---- src/ilmid/atmf_uni.c 19 Jul 2003 21:07:19 -0000 1.2.2.1 -+++ src/ilmid/atmf_uni.c 22 Apr 2005 09:41:13 -0000 -@@ -203,6 +203,7 @@ - int cmp; - NetPrefixNode *prefix, *newPrefix; - AsnOid *varBindName; -+ NetPrefixNode *node; - - diag(COMPONENT,DIAG_DEBUG,"setNetPrefix"); - varBindName = &varbind->name; -@@ -217,7 +218,9 @@ - varBindName->octs[NETPREFIX_LEN + 1] != NETPREFIX_STRINGLEN) - return NOSUCHNAME; - -- for(prefix = (NetPrefixNode *) var->value, cmp = AsnOidLess; -+ node = (NetPrefixNode *) var->value; -+ -+ for(prefix = node, cmp = AsnOidLess; - prefix != NULL && (cmp = AsnOidCompare(varBindName, prefix->name)) < - AsnOidEqual; - prefix = prefix->next); -@@ -228,7 +231,7 @@ - newPrefix->name = alloc_t(AsnOid); - newPrefix->name->octs = alloc(varBindName->octetLen); - AsnOidCopy(newPrefix->name, varBindName); -- Q_INSERT_BEFORE((NetPrefixNode *) var->value, newPrefix, prefix); -+ Q_INSERT_BEFORE(node, newPrefix, prefix); - if(atmNetPrefix.octs == NULL) - { - atmNetPrefix.octetLen = varBindName->octetLen - NETPREFIX_LEN - 2; -@@ -238,7 +241,7 @@ - } - else if (varbind->value->a.simple->a.number == INVALID && cmp == AsnOidEqual) - { -- Q_REMOVE((NetPrefixNode *) var->value, prefix); -+ Q_REMOVE(node, prefix); - } - - return NOERROR; -Index: src/lane/lecs_db.l -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/lane/lecs_db.l,v -retrieving revision 1.2 -diff -u -w -r1.2 lecs_db.l ---- src/lane/lecs_db.l 9 Oct 2001 22:33:07 -0000 1.2 -+++ src/lane/lecs_db.l 22 Apr 2005 09:41:13 -0000 -@@ -7,6 +7,7 @@ - /*Standard includes*/ - #include - #include -+#include - - /* Local includes */ - #include "lecs_load.h" -Index: src/lane/load_lex.l -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/lane/load_lex.l,v -retrieving revision 1.2 -diff -u -w -r1.2 load_lex.l ---- src/lane/load_lex.l 9 Oct 2001 22:33:07 -0000 1.2 -+++ src/lane/load_lex.l 22 Apr 2005 09:41:13 -0000 -@@ -4,6 +4,7 @@ - #include - #endif - -+#include - #include - #include - -Index: src/lane/mem_lecs.c -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/lane/mem_lecs.c,v -retrieving revision 1.2 -diff -u -w -r1.2 mem_lecs.c ---- src/lane/mem_lecs.c 9 Oct 2001 22:33:07 -0000 1.2 -+++ src/lane/mem_lecs.c 22 Apr 2005 09:41:13 -0000 -@@ -13,6 +13,7 @@ - /* System includes */ - #include - #include -+#include - #include - - /* Local includes */ -Index: src/maint/atmtcp.c -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/maint/atmtcp.c,v -retrieving revision 1.2 -diff -u -w -r1.2 atmtcp.c ---- src/maint/atmtcp.c 9 Oct 2001 22:33:07 -0000 1.2 -+++ src/maint/atmtcp.c 22 Apr 2005 09:41:13 -0000 -@@ -60,7 +60,7 @@ - static IN *inputs = NULL; - static fd_set in_set; - static int fds = 0; --static int debug = 0; -+/* static */ int debug = 0; - static int links = 0; - - -Index: src/mpoad/k_interf.c -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/mpoad/k_interf.c,v -retrieving revision 1.2 -diff -u -w -r1.2 k_interf.c ---- src/mpoad/k_interf.c 9 Oct 2001 22:33:07 -0000 1.2 -+++ src/mpoad/k_interf.c 22 Apr 2005 09:41:13 -0000 -@@ -4,6 +4,7 @@ - - #include - #include -+#include - #include - #include - #include /* for OPEN_MAX */ -Index: src/mpoad/p_factory.c -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/mpoad/p_factory.c,v -retrieving revision 1.2 -diff -u -w -r1.2 p_factory.c ---- src/mpoad/p_factory.c 9 Oct 2001 22:33:07 -0000 1.2 -+++ src/mpoad/p_factory.c 22 Apr 2005 09:41:13 -0000 -@@ -34,7 +34,9 @@ - - while( count > 1 ) { - /* This is the inner loop */ -- sum += * ((uint16_t *) addr)++; -+ // sum += * ((uint16_t *) addr)++; -+ sum += * ((uint16_t *) addr); -+ addr += 2; - count -= 2; - } - -Index: src/qgen/qlib.c -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/qgen/qlib.c,v -retrieving revision 1.2 -diff -u -w -r1.2 qlib.c ---- src/qgen/qlib.c 9 Oct 2001 22:33:07 -0000 1.2 -+++ src/qgen/qlib.c 22 Apr 2005 09:41:13 -0000 -@@ -26,7 +26,7 @@ - #include "op.h" - - --static int debug = 0; -+/* static */ int debug = 0; - - - void PREFIX(report)(int severity,const char *msg,...) -Index: src/sigd/cfg_y.y -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/sigd/cfg_y.y,v -retrieving revision 1.2.2.1 -diff -u -w -r1.2.2.1 cfg_y.y ---- src/sigd/cfg_y.y 20 Apr 2005 16:40:47 -0000 1.2.2.1 -+++ src/sigd/cfg_y.y 22 Apr 2005 09:41:13 -0000 -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - #include "atm.h" - #include "atmd.h" -Index: src/switch/cfg_y.y -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/switch/cfg_y.y,v -retrieving revision 1.2.2.1 -diff -u -w -r1.2.2.1 cfg_y.y ---- src/switch/cfg_y.y 20 Apr 2005 16:40:47 -0000 1.2.2.1 -+++ src/switch/cfg_y.y 22 Apr 2005 09:41:13 -0000 -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - #include "atm.h" - -Index: src/switch/debug/debug.c -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/switch/debug/debug.c,v -retrieving revision 1.2 -diff -u -w -r1.2 debug.c ---- src/switch/debug/debug.c 9 Oct 2001 22:33:08 -0000 1.2 -+++ src/switch/debug/debug.c 22 Apr 2005 09:41:13 -0000 -@@ -43,7 +43,8 @@ - - void fab_init(CALL *call) - { -- PRV(call) = alloc_t(FAB); -+ // PRV(call) = alloc_t(FAB); -+ call->fab = alloc_t(FAB); - PRV(call)->next = calls; - calls = call; - } -@@ -59,7 +60,8 @@ - diag(COMPONENT,DIAG_FATAL,"fab_destroy: call %p not found",call); - *walk = PRV(call)->next; - free(PRV(call)); -- PRV(call) = NULL; -+ // PRV(call) = NULL; -+ call->fab = NULL; - } - - -Index: src/switch/tcp/tcpsw.c -=================================================================== -RCS file: /cvsroot/linux-atm/linux-atm/src/switch/tcp/tcpsw.c,v -retrieving revision 1.2 -diff -u -w -r1.2 tcpsw.c ---- src/switch/tcp/tcpsw.c 9 Oct 2001 22:33:08 -0000 1.2 -+++ src/switch/tcp/tcpsw.c 22 Apr 2005 09:41:13 -0000 -@@ -345,7 +345,8 @@ - - void fab_init(CALL *call) - { -- PRV(call) = alloc_t(FAB); -+ // PRV(call) = alloc_t(FAB); -+ call->fab = alloc_t(FAB); - PRV(call)->active = 0; - PRV(call)->next = calls; - calls = call; -@@ -362,7 +363,8 @@ - diag(COMPONENT,DIAG_FATAL,"fab_destroy: call %p not found",call); - *walk = PRV(call)->next; - free(PRV(call)); -- PRV(call) = NULL; -+ // PRV(call) = NULL; -+ call->fab = NULL; - } - - diff --git a/linux-atm-2.5.0.tar.gz b/linux-atm-2.5.0.tar.gz deleted file mode 100644 index bde7880..0000000 --- a/linux-atm-2.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e73aa34dc00c9fd50da73d8b528da994f28003dcdd1d23485d251bb451220ca8 -size 1036180 diff --git a/linux-atm-2.5.2.tar.gz b/linux-atm-2.5.2.tar.gz new file mode 100644 index 0000000..b1216f3 --- /dev/null +++ b/linux-atm-2.5.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a +size 1082256 diff --git a/linux-atm-2.5.2_fdleak.patch b/linux-atm-2.5.2_fdleak.patch new file mode 100644 index 0000000..82dfb67 --- /dev/null +++ b/linux-atm-2.5.2_fdleak.patch @@ -0,0 +1,29 @@ +diff -Ppru linux-atm-2.5.2.orig/.directory linux-atm-2.5.2/.directory +--- linux-atm-2.5.2.orig/.directory 1970-01-01 01:00:00.000000000 +0100 ++++ linux-atm-2.5.2/.directory 2014-01-23 23:39:47.120089077 +0100 +@@ -0,0 +1,4 @@ ++[Dolphin] ++Timestamp=2014,1,23,23,39,47 ++Version=3 ++ViewMode=1 +diff -Ppru linux-atm-2.5.2.orig/src/arpd/atmarp.c linux-atm-2.5.2/src/arpd/atmarp.c +--- linux-atm-2.5.2.orig/src/arpd/atmarp.c 2009-11-30 17:56:52.000000000 +0100 ++++ linux-atm-2.5.2/src/arpd/atmarp.c 2014-01-23 23:44:31.170128564 +0100 +@@ -89,14 +89,17 @@ static int print_table(void) + } + while ((size = read(fd,buffer,BUF_SIZE))) { + if (size < 0) { ++ close(fd); + perror("read " ATMARP_DUMP_DIR "/" ATMARP_DUMP_FILE); + return 1; + } + if (write(1,buffer,size) < 0) { ++ close(fd); + perror("write stdout"); + return 1; + } + } ++ close(fd); + return 0; + } + diff --git a/linux-atm-2.5.2_implicit-fortify-decl.patch b/linux-atm-2.5.2_implicit-fortify-decl.patch new file mode 100644 index 0000000..a98f7dc --- /dev/null +++ b/linux-atm-2.5.2_implicit-fortify-decl.patch @@ -0,0 +1,10 @@ +diff -Ppru linux-atm-2.5.2.orig/src/maint/hediag.c linux-atm-2.5.2/src/maint/hediag.c +--- linux-atm-2.5.2.orig/src/maint/hediag.c 2009-11-30 17:56:52.000000000 +0100 ++++ linux-atm-2.5.2/src/maint/hediag.c 2014-01-23 23:29:56.288066939 +0100 +@@ -1,5 +1,6 @@ + #include + #include ++#include + #include + #include + #include diff --git a/linux-atm.changes b/linux-atm.changes index b02d05c..dec9ca9 100644 --- a/linux-atm.changes +++ b/linux-atm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Jan 23 21:59:12 UTC 2014 - aj@ajaissle.de + +- Cleanup spec file, remove %clean section +- Updated to 2.5.2 +- Removed linux-atm-2.5.0.diff (in mainline) +- Removed linux-atm-2.5.0-include.patch (in mainline) +- Rebased linux-atm-2.5.0-fdleak.patch as linux-atm-2.5.2_fdleak.patch +- Added linux-atm-2.5.2_implicit-fortify-decl.patch to fix implicit declarations + ------------------------------------------------------------------- Tue Apr 16 08:05:54 UTC 2013 - mmeister@suse.com diff --git a/linux-atm.spec b/linux-atm.spec index 2cf7d53..d05c0bc 100644 --- a/linux-atm.spec +++ b/linux-atm.spec @@ -1,7 +1,7 @@ # # spec file for package linux-atm # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 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 @@ -17,79 +17,83 @@ Name: linux-atm -%define sover 1 -BuildRequires: bison -BuildRequires: flex -BuildRequires: glibc-devel -Url: http://sourceforge.net/projects/linux-atm/ +Version: 2.5.2 +Release: 0 +%global sover 1 Summary: Tools for ATM License: BSD-3-Clause and GPL-2.0+ and LGPL-2.1+ Group: Productivity/Networking/Other -Version: 2.5.0 -Release: 0 + +Url: http://linux-atm.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz -Patch0: linux-atm-%{version}.diff -Patch1: linux-atm-2.5.0-include.patch -Patch2: linux-atm-2.5.0-fdleak.patch +# PATCH-FIX-UPSTREAM linux-atm-2.5.2_fdleak.patch +Patch0: linux-atm-2.5.2_fdleak.patch +# PATCH-FIX-UPSTREAM linux-atm-2.5.2_implicit-fortify-decl.patch -- fix implicit declarations +Patch1: linux-atm-2.5.2_implicit-fortify-decl.patch + +BuildRequires: bison +BuildRequires: flex +BuildRequires: glibc-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Tools to support ATM (Asynchronous Transfer Mode) networking. -%package -n libatm%sover + +%package -n libatm%{sover} Summary: Libraries for ATM Group: System/Libraries -%description -n libatm%sover +%description -n libatm%{sover} Libraries for ATM (Asynchronous Transfer Mode) networking. + %package devel Summary: Development for ATM Group: Development/Libraries/C and C++ -Requires: libatm%sover = %version +Requires: libatm%{sover} = %{version} %description devel Libraries and header files for ATM (Asynchronous Transfer Mode) networking. + %prep -%setup -q -n linux-atm-%{version} -%patch0 +%setup -q +%patch0 -p1 %patch1 -p1 -%patch2 %build %configure --disable-static %{__make} %{?_smp_mflags} %install -make install DESTDIR=$RPM_BUILD_ROOT +%{__make} install DESTDIR=%{buildroot} %{__rm} -rf %{buildroot}%{_libdir}/*.la -%clean -rm -rf %{buildroot} +%post -n libatm%{sover} -p /sbin/ldconfig -%post -n libatm%sover -p /sbin/ldconfig - -%postun -n libatm%sover -p /sbin/ldconfig +%postun -n libatm%{sover} -p /sbin/ldconfig %files %defattr(-,root,root) -%config(noreplace) /etc/atmsigd.conf -/usr/bin/* -/usr/sbin/* +%config(noreplace) %{_sysconfdir}/atmsigd.conf +%config(noreplace) %{_sysconfdir}/hosts.atm +%{_bindir}/* +%{_sbindir}/* +/lib/firmware/* %doc README AUTHORS ChangeLog NEWS THANKS BUGS %doc COPYING COPYING.GPL COPYING.LGPL %doc %{_mandir}/man*/*.gz -%files -n libatm%sover +%files -n libatm%{sover} %defattr(-,root,root) -%{_libdir}/*.so -%{_libdir}/*.so.* +%{_libdir}/libatm.so.%{sover}* %files devel %defattr(-,root,root) -%{_includedir}/* +%{_includedir}/atm*.h +%{_libdir}/libatm.so %changelog