forked from pool/osmo-ggsn
Accepting request 560591 from home:mnhauke:osmocom:latest
- Use systemd service file from tarball - Fix URL - Use correct libversion - Minor specfile cleanup - Disable kernel-gtp support - Do not apply patch (broken in some parts) - build-fixes.diff - Add patch: - build-fixes2.diff - 0001-fix-compiler-warnings-return-0-in-main-in-3-tests.patch OBS-URL: https://build.opensuse.org/request/show/560591 OBS-URL: https://build.opensuse.org/package/show/network:telephony/osmo-ggsn?expand=0&rev=3
This commit is contained in:
parent
c5cc42515a
commit
c369f2c20b
45
0001-fix-compiler-warnings-return-0-in-main-in-3-tests.patch
Normal file
45
0001-fix-compiler-warnings-return-0-in-main-in-3-tests.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
From dabb8b4860199a44401fa436f5fcd56eb3d09512 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Neels Hofmeyr <neels@hofmeyr.de>
|
||||||
|
Date: Sun, 29 Oct 2017 01:53:50 +0200
|
||||||
|
Subject: [PATCH] fix compiler warnings: return 0 in main(), in 3 tests
|
||||||
|
|
||||||
|
Change-Id: I9e49ceba6b0a8dffd331e5707667d9bb007f3ec7
|
||||||
|
---
|
||||||
|
tests/gtp/gtpie_test.c | 1 +
|
||||||
|
tests/lib/in46a_test.c | 1 +
|
||||||
|
tests/lib/ippool_test.c | 1 +
|
||||||
|
3 files changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/tests/gtp/gtpie_test.c b/tests/gtp/gtpie_test.c
|
||||||
|
index fe2d502..8d87dcc 100644
|
||||||
|
--- a/tests/gtp/gtpie_test.c
|
||||||
|
+++ b/tests/gtp/gtpie_test.c
|
||||||
|
@@ -124,4 +124,5 @@ int main(int argc, char **argv)
|
||||||
|
/* TODO: gtpie_encaps() */
|
||||||
|
/* TODO: gtpie_encaps2() */
|
||||||
|
/* TODO: gtpie_getie(), gtpie_exist(), gtpie_get*() */
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c
|
||||||
|
index 42a1768..ab7156f 100644
|
||||||
|
--- a/tests/lib/in46a_test.c
|
||||||
|
+++ b/tests/lib/in46a_test.c
|
||||||
|
@@ -321,4 +321,5 @@ int main(int argc, char **argv)
|
||||||
|
test_in46a_to_eua();
|
||||||
|
test_in46a_from_eua();
|
||||||
|
test_in46a_netmasklen();
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
diff --git a/tests/lib/ippool_test.c b/tests/lib/ippool_test.c
|
||||||
|
index ea56edd..5b3227c 100644
|
||||||
|
--- a/tests/lib/ippool_test.c
|
||||||
|
+++ b/tests/lib/ippool_test.c
|
||||||
|
@@ -130,4 +130,5 @@ int main(int argc, char **argv)
|
||||||
|
srand(time(NULL));
|
||||||
|
|
||||||
|
test_pool_sizes();
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.13.6
|
||||||
|
|
47
build-fixes2.diff
Normal file
47
build-fixes2.diff
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
diff --git a/ggsn/Makefile.am b/ggsn/Makefile.am
|
||||||
|
index 8a468a9..0d8d8ff 100644
|
||||||
|
--- a/ggsn/Makefile.am
|
||||||
|
+++ b/ggsn/Makefile.am
|
||||||
|
@@ -1,8 +1,9 @@
|
||||||
|
-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)
|
||||||
|
|
||||||
|
diff --git a/gtp/Makefile.am b/gtp/Makefile.am
|
||||||
|
index 7a0ff0a..211abc3 100644
|
||||||
|
--- a/gtp/Makefile.am
|
||||||
|
+++ b/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
|
||||||
|
diff --git a/sgsnemu/Makefile.am b/sgsnemu/Makefile.am
|
||||||
|
index 4d02eca..32df2a3 100644
|
||||||
|
--- a/sgsnemu/Makefile.am
|
||||||
|
+++ b/sgsnemu/Makefile.am
|
||||||
|
@@ -1,8 +1,10 @@
|
||||||
|
-bin_PROGRAMS = sgsnemu
|
||||||
|
+sbin_PROGRAMS = sgsnemu
|
||||||
|
|
||||||
|
AM_LDFLAGS = @EXEC_LDFLAGS@
|
||||||
|
|
||||||
|
-AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS)
|
||||||
|
+AM_CPPFLAGS = -D_GNU_SOURCE -DSBINDIR='"$(sbindir)"' $(LIBOSMOCORE_CFLAGS)
|
||||||
|
+AM_CFLAGS = -O2 -fno-builtin -Wall -ggdb
|
||||||
|
+
|
||||||
|
|
||||||
|
sgsnemu_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS)
|
||||||
|
sgsnemu_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 29 16:38:27 UTC 2017 - mardnh@gmx.de
|
||||||
|
|
||||||
|
- Use systemd service file from tarball
|
||||||
|
- Fix URL
|
||||||
|
- Use correct libversion
|
||||||
|
- Minor specfile cleanup
|
||||||
|
- Disable kernel-gtp support
|
||||||
|
- Do not apply patch (broken in some parts)
|
||||||
|
- build-fixes.diff
|
||||||
|
- Add patch:
|
||||||
|
- build-fixes2.diff
|
||||||
|
- 0001-fix-compiler-warnings-return-0-in-main-in-3-tests.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 28 00:36:08 UTC 2017 - jengelh@inai.de
|
Thu Dec 28 00:36:08 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
[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
|
|
@ -20,14 +20,15 @@ Name: osmo-ggsn
|
|||||||
Version: 1.1.0
|
Version: 1.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: GPRS Support Node
|
Summary: GPRS Support Node
|
||||||
License: GPL-2.0 and LGPL-2.1+
|
License: GPL-2.0 AND LGPL-2.1+
|
||||||
Group: Productivity/Telephony/Servers
|
Group: Productivity/Telephony/Servers
|
||||||
Url: http://sourceforge.net/projects/ggsn/
|
URL: https://osmocom.org/projects/openggsn/wiki/OsmoGGSN
|
||||||
Source: %name-%version.tar.xz
|
Source: %{name}-%{version}.tar.xz
|
||||||
Source2: osmo-ggsn.service
|
#Patch1: build-fixes.diff
|
||||||
Patch1: build-fixes.diff
|
Patch2: build-fixes2.diff
|
||||||
|
Patch3: 0001-fix-compiler-warnings-return-0-in-main-in-3-tests.patch
|
||||||
BuildRequires: libtool >= 2
|
BuildRequires: libtool >= 2
|
||||||
BuildRequires: pkg-config >= 0.20
|
BuildRequires: pkgconfig >= 0.20
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
BuildRequires: pkgconfig(libgtpnl) >= 1.0.0
|
BuildRequires: pkgconfig(libgtpnl) >= 1.0.0
|
||||||
@ -36,7 +37,6 @@ BuildRequires: pkgconfig(libosmocore) >= 0.6.4
|
|||||||
BuildRequires: pkgconfig(libosmoctrl)
|
BuildRequires: pkgconfig(libosmoctrl)
|
||||||
BuildRequires: pkgconfig(libosmogsm)
|
BuildRequires: pkgconfig(libosmogsm)
|
||||||
BuildRequires: pkgconfig(libosmovty) >= 0.3.0
|
BuildRequires: pkgconfig(libosmovty) >= 0.3.0
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
Obsoletes: openggsn
|
Obsoletes: openggsn
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
|
||||||
@ -45,19 +45,19 @@ Osmo-GGSN is a C-language implementation of a GGSN (Gateway GPRS
|
|||||||
Support Node), a core network element of ETSI/3GPP cellular networks
|
Support Node), a core network element of ETSI/3GPP cellular networks
|
||||||
such as GPRS, EDGE, UMTS or HSPA.
|
such as GPRS, EDGE, UMTS or HSPA.
|
||||||
|
|
||||||
%package -n libgtp1
|
%package -n libgtp2
|
||||||
Summary: Library implementing GTP between SGSN and GGSN
|
Summary: Library implementing GTP between SGSN and GGSN
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
|
||||||
%description -n libgtp1
|
%description -n libgtp2
|
||||||
libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN.
|
libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN.
|
||||||
|
|
||||||
%package -n libgtp-devel
|
%package -n libgtp-devel
|
||||||
Summary: Development files for the GTP library
|
Summary: Development files for the GTP library
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: libgtp1 = %version
|
Requires: libgtp2 = %{version}
|
||||||
|
|
||||||
%description -n libgtp-devel
|
%description -n libgtp-devel
|
||||||
libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN.
|
libgtp implements the GPRS Tunneling Protocol between SGSN and GGSN.
|
||||||
@ -67,54 +67,65 @@ applications that want to make use of libgtp.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch -P 1 -p1
|
#%%patch -P 1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
echo "%{version}" >.tarball-version
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
%configure --disable-static --includedir="%_includedir/%name" \
|
%configure \
|
||||||
--enable-gtp-linux
|
--disable-static \
|
||||||
|
--docdir=%{_docdir}/%{name} \
|
||||||
|
--includedir="%{_includedir}/%{name}"
|
||||||
make %{?_smp_mflags} V=1
|
make %{?_smp_mflags} V=1
|
||||||
|
|
||||||
%install
|
%install
|
||||||
b="%buildroot"
|
b=%{buildroot}
|
||||||
%make_install
|
%make_install
|
||||||
rm -f "$b/%_libdir"/*.la
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
mkdir -p "$b/%_localstatedir/lib/ggsn"
|
install -D -m 0644 contrib/osmo-ggsn.service "$b/%{_unitdir}/%{name}.service"
|
||||||
echo 0 >"$b/%_localstatedir/lib/ggsn/gsn_restart"
|
install -d %{buildroot}/%{_sbindir}
|
||||||
install -Dm0644 "%{S:2}" "$b/%_unitdir/ggsn.service"
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
|
install -d %{buildroot}%{_sysconfdir}/osmocom
|
||||||
|
install -m 0644 doc/examples/osmo-ggsn.cfg %{buildroot}%{_sysconfdir}/osmocom/osmo-ggsn.cfg
|
||||||
|
install -m 0644 doc/examples/sgsnemu.conf %{buildroot}%{_sysconfdir}/osmocom/sgsnemu.conf
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%service_add_pre ggsn.service
|
%service_add_pre %{name}.service
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%service_add_post ggsn.service
|
%service_add_post %{name}.service
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%service_del_preun ggsn.service
|
%service_del_preun %{name}.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%service_del_postun ggsn.service
|
%service_del_postun %{name}.service
|
||||||
|
|
||||||
%post -n libgtp1 -p /sbin/ldconfig
|
%post -n libgtp2 -p /sbin/ldconfig
|
||||||
%postun -n libgtp1 -p /sbin/ldconfig
|
%postun -n libgtp2 -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%doc AUTHORS COPYING README.md
|
||||||
%doc COPYING NEWS README.md examples/ggsn.conf examples/sgsnemu.conf
|
%{_sbindir}/osmo-ggsn
|
||||||
%_sbindir/ggsn
|
%{_sbindir}/sgsnemu
|
||||||
%_sbindir/sgsnemu
|
%{_mandir}/man8/osmo-ggsn.8%{ext_man}
|
||||||
%_mandir/man8/*.8*
|
%{_mandir}/man8/sgsnemu.8%{ext_man}
|
||||||
%_localstatedir/lib/ggsn/
|
%{_unitdir}/%{name}.service
|
||||||
%_unitdir/ggsn.service
|
%{_sbindir}/rc%{name}
|
||||||
|
%dir %{_docdir}/%{name}/examples
|
||||||
|
%{_docdir}/%{name}/examples/osmo-ggsn.cfg
|
||||||
|
%dir %{_sysconfdir}/osmocom
|
||||||
|
%config(noreplace) %{_sysconfdir}/osmocom/osmo-ggsn.cfg
|
||||||
|
%config(noreplace) %{_sysconfdir}/osmocom/sgsnemu.conf
|
||||||
|
|
||||||
%files -n libgtp1
|
%files -n libgtp2
|
||||||
%defattr(-,root,root)
|
%{_libdir}/libgtp.so.2*
|
||||||
%_libdir/libgtp.so.1*
|
|
||||||
|
|
||||||
%files -n libgtp-devel
|
%files -n libgtp-devel
|
||||||
%defattr(-,root,root)
|
%{_includedir}/%{name}/
|
||||||
%_includedir/%name/
|
%{_libdir}/libgtp.so
|
||||||
%_libdir/libgtp.so
|
%{_libdir}/pkgconfig/libgtp.pc
|
||||||
%_libdir/pkgconfig/*.pc
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user