From 2f32687a40d63fd7bdfef7bcb4702d22cdde4a8e894fb58fa2e1d03c4a7dcc9a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 28 Dec 2017 00:35:20 +0000 Subject: [PATCH] upload old workspace OBS-URL: https://build.opensuse.org/package/show/network:telephony/osmo-ggsn?expand=0&rev=1 --- .gitattributes | 23 +++++++ .gitignore | 1 + _service | 13 ++++ build-fixes.diff | 125 ++++++++++++++++++++++++++++++++++++++ osmo-ggsn-1.0.0.30.tar.xz | 3 + osmo-ggsn.changes | 10 +++ osmo-ggsn.service | 11 ++++ osmo-ggsn.spec | 120 ++++++++++++++++++++++++++++++++++++ 8 files changed, 306 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 build-fixes.diff create mode 100644 osmo-ggsn-1.0.0.30.tar.xz create mode 100644 osmo-ggsn.changes create mode 100644 osmo-ggsn.service create mode 100644 osmo-ggsn.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..180153d --- /dev/null +++ b/_service @@ -0,0 +1,13 @@ + + + git + git://git.osmocom.org/osmo-ggsn + master + @PARENT_TAG@.@TAG_OFFSET@ + + + *.tar + xz + + + diff --git a/build-fixes.diff b/build-fixes.diff new file mode 100644 index 0000000..23eec89 --- /dev/null +++ b/build-fixes.diff @@ -0,0 +1,125 @@ + +* stuff is in the wrong directory, move to sbin +* CFLAGS is abused for preprocessor, move to CPPFLAGS +* add missing $(LIBGTPNL_CFLAGS) +* ggsn includes libmnl.h but fails to PKG_CHECK for it; + turns out it only uses the header and no defs, so kill that. +* _DEPENDENCIES on files not generated by $this Makefile are pointless +* must use .la files in _LDADD/_LIBADD whenever they exist +* remove AC_PROG_CXX, the C++ is never used + +--- + ggsn/Makefile.am | 12 ++++++------ + ggsn/gtp-kernel.c | 5 +---- + gtp/Makefile.am | 3 ++- + lib/Makefile.am | 8 +++++--- + sgsnemu/Makefile.am | 9 ++++----- + 5 files changed, 18 insertions(+), 19 deletions(-) + +Index: osmo-ggsn-1.0.0.30/ggsn/Makefile.am +=================================================================== +--- osmo-ggsn-1.0.0.30.orig/ggsn/Makefile.am ++++ osmo-ggsn-1.0.0.30/ggsn/Makefile.am +@@ -1,17 +1,17 @@ +-bin_PROGRAMS = osmo-ggsn ++sbin_PROGRAMS = osmo-ggsn + + AM_LDFLAGS = @EXEC_LDFLAGS@ + +-AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS) ++AM_CPPFLAGS = -D_GNU_SOURCE -DSBINDIR='"${sbindir}"' ${LIBOSMOCORE_CFLAGS} ${LIBOSMOCTRL_CFLAGS} ${LIBOSMOVTY_CFLAGS} ++AM_CFLAGS = -fno-builtin -Wall + +-osmo_ggsn_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) $(LIBOSMOVTY_LIBS) ++osmo_ggsn_LDADD = @EXEC_LDADD@ ../gtp/libgtp.la ../lib/libmisc.la $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) $(LIBOSMOVTY_LIBS) + + if ENABLE_GTP_KERNEL +-AM_CFLAGS += -DGTP_KERNEL +-osmo_ggsn_LDADD += -lgtpnl ++AM_CPPFLAGS += -DGTP_KERNEL ${LIBGTPNL_CFLAGS} ++osmo_ggsn_LDADD += ${LIBGTPNL_LIBS} + endif + +-osmo_ggsn_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a + osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h icmpv6.c icmpv6.h checksum.c checksum.h + + if ENABLE_GTP_KERNEL +Index: osmo-ggsn-1.0.0.30/ggsn/gtp-kernel.c +=================================================================== +--- osmo-ggsn-1.0.0.30.orig/ggsn/gtp-kernel.c ++++ osmo-ggsn-1.0.0.30/ggsn/gtp-kernel.c +@@ -17,8 +17,6 @@ + + #include + #include +-#include +- + #include + + #include +@@ -30,8 +28,6 @@ + + #include + #include +-#include +- + #include "gtp-kernel.h" + + static void pdp_debug(struct pdp_t *pdp) +@@ -69,6 +65,7 @@ static void pdp_debug(struct pdp_t *pdp) + printf("\n"); + } + ++struct mnl_socket; + static struct { + int genl_id; + struct mnl_socket *nl; +Index: osmo-ggsn-1.0.0.30/gtp/Makefile.am +=================================================================== +--- osmo-ggsn-1.0.0.30.orig/gtp/Makefile.am ++++ osmo-ggsn-1.0.0.30/gtp/Makefile.am +@@ -6,7 +6,8 @@ lib_LTLIBRARIES = libgtp.la + + include_HEADERS = gtp.h pdp.h gtpie.h + +-AM_CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) ++AM_CPPFLAGS = -DSBINDIR='"$(sbindir)"' $(LIBOSMOCORE_CFLAGS) ++AM_CFLAGS = -O2 -fno-builtin -Wall -ggdb + + libgtp_la_SOURCES = gtp.c gtp.h gtpie.c gtpie.h pdp.c pdp.h lookupa.c lookupa.h queue.c queue.h + libgtp_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined +Index: osmo-ggsn-1.0.0.30/lib/Makefile.am +=================================================================== +--- osmo-ggsn-1.0.0.30.orig/lib/Makefile.am ++++ osmo-ggsn-1.0.0.30/lib/Makefile.am +@@ -1,7 +1,9 @@ +-noinst_LIBRARIES = libmisc.a ++noinst_LTLIBRARIES = libmisc.la + + noinst_HEADERS = gnugetopt.h ippool.h lookup.h syserr.h tun.h in46_addr.h + +-AM_CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) ++AM_CPPFLAGS = -DSBINDIR='"${sbindir}"' ${LIBOSMOCORE_CFLAGS} ++AM_CFLAGS = -fno-builtin -Wall + +-libmisc_a_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c ++libmisc_la_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c ++libmisc_la_LIBADD = ${LIBOSMOCORE_LIBS} +Index: osmo-ggsn-1.0.0.30/sgsnemu/Makefile.am +=================================================================== +--- osmo-ggsn-1.0.0.30.orig/sgsnemu/Makefile.am ++++ osmo-ggsn-1.0.0.30/sgsnemu/Makefile.am +@@ -1,9 +1,8 @@ +-bin_PROGRAMS = sgsnemu ++sbin_PROGRAMS = sgsnemu + + AM_LDFLAGS = @EXEC_LDFLAGS@ ++AM_CPPFLAGS = -D_GNU_SOURCE -DSBINDIR='"$(sbindir)"' $(LIBOSMOCORE_CFLAGS) ++AM_CFLAGS = -O2 -fno-builtin -Wall -ggdb + +-AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) +- +-sgsnemu_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) +-sgsnemu_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a ++sgsnemu_LDADD = @EXEC_LDADD@ ../gtp/libgtp.la ../lib/libmisc.la $(LIBOSMOCORE_LIBS) + sgsnemu_SOURCES = sgsnemu.c cmdline.c cmdline.h diff --git a/osmo-ggsn-1.0.0.30.tar.xz b/osmo-ggsn-1.0.0.30.tar.xz new file mode 100644 index 0000000..f346899 --- /dev/null +++ b/osmo-ggsn-1.0.0.30.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94147ff40b089cd094e440b6d709e62b7b830bf563cd403d887b2b77b29d0e1b +size 112644 diff --git a/osmo-ggsn.changes b/osmo-ggsn.changes new file mode 100644 index 0000000..a649edc --- /dev/null +++ b/osmo-ggsn.changes @@ -0,0 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 2 23:35:06 UTC 2017 - jengelh@inai.de + +- Update to new upstream snapshot 1.0.0.30 + +------------------------------------------------------------------- +Sat Apr 29 01:21:17 UTC 2017 - jengelh@inai.de + +- Initial package (version 0.93.7) for build.opensuse.org +- Add build-fixes.diff diff --git a/osmo-ggsn.service b/osmo-ggsn.service new file mode 100644 index 0000000..d784b9f --- /dev/null +++ b/osmo-ggsn.service @@ -0,0 +1,11 @@ +[Unit] +Description=Gateway GPRS Support Node +After=network.target +Documentation=man:ggsn(8) +ConditionFileNotEmpty=/etc/openggsn/ggsn.conf + +[Service] +ExecStart=/usr/sbin/ggsn -fc /etc/openggsn/ggsn.conf + +[Install] +WantedBy=multi-user.target diff --git a/osmo-ggsn.spec b/osmo-ggsn.spec new file mode 100644 index 0000000..4fbb0f0 --- /dev/null +++ b/osmo-ggsn.spec @@ -0,0 +1,120 @@ +# +# spec file for package osmo-ggsn +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: osmo-ggsn +Version: 1.0.0.30 +Release: 0 +Summary: GPRS Support Node +License: GPL-2.0 and LGPL-2.1+ +Group: Productivity/Telephony/Servers +Url: http://sourceforge.net/projects/ggsn/ +Source: %name-%version.tar.xz +Source2: osmo-ggsn.service +Patch1: build-fixes.diff +BuildRequires: libtool >= 2 +BuildRequires: pkg-config >= 0.20 +BuildRequires: systemd-rpm-macros +BuildRequires: xz +BuildRequires: pkgconfig(libgtpnl) >= 1.0.0 +BuildRequires: pkgconfig(libmnl) >= 1.0.3 +BuildRequires: pkgconfig(libosmocore) >= 0.6.4 +BuildRequires: pkgconfig(libosmoctrl) +BuildRequires: pkgconfig(libosmogsm) +BuildRequires: pkgconfig(libosmovty) >= 0.3.0 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Obsoletes: openggsn +%{?systemd_requires} + +%description +Osmo-GGSN is a C-language implementation of a GGSN (Gateway GPRS +Support Node), a core network element of ETSI/3GPP cellular networks +such as GPRS, EDGE, UMTS or HSPA. + +%package -n libgtp1 +Summary: Library implementing GTP between SGSN and GGSN +License: GPL-2.0 +Group: System/Libraries + +%description -n libgtp1 +libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN. + +%package -n libgtp-devel +Summary: Development files for the GTP library +License: GPL-2.0 +Group: Development/Libraries/C and C++ +Requires: libgtp1 = %version + +%description -n libgtp-devel +libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN. + +This subpackage contains libraries and header files for developing +applications that want to make use of libgtp. + +%prep +%setup -q +%patch -P 1 -p1 + +%build +autoreconf -fi +%configure --disable-static --includedir="%_includedir/%name" \ + --enable-gtp-linux +make %{?_smp_mflags} V=1 + +%install +b="%buildroot" +%make_install +rm -f "$b/%_libdir"/*.la +mkdir -p "$b/%_localstatedir/lib/ggsn" +echo 0 >"$b/%_localstatedir/lib/ggsn/gsn_restart" +install -Dm0644 "%{S:2}" "$b/%_unitdir/ggsn.service" + +%pre +%service_add_pre ggsn.service + +%post +%service_add_post ggsn.service + +%preun +%service_del_preun ggsn.service + +%postun +%service_del_postun ggsn.service + +%post -n libgtp1 -p /sbin/ldconfig +%postun -n libgtp1 -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc COPYING NEWS README.md examples/ggsn.conf examples/sgsnemu.conf +%_sbindir/ggsn +%_sbindir/sgsnemu +%_mandir/man8/*.8* +%_localstatedir/lib/ggsn/ +%_unitdir/ggsn.service + +%files -n libgtp1 +%defattr(-,root,root) +%_libdir/libgtp.so.1* + +%files -n libgtp-devel +%defattr(-,root,root) +%_includedir/%name/ +%_libdir/libgtp.so +%_libdir/pkgconfig/*.pc + +%changelog