From 30b93cb5c2b5e295152d70ade5115f688bef04c0befe2da3c29642e1cedf9afc Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 25 Mar 2018 09:20:12 +0000 Subject: [PATCH 1/2] Accepting request 588167 from home:mnhauke:osmocom:latest - Derive libversion from version - Create subpackage for osmo-stp - Show testsuite.log when tests are failing - Cosmetic fixes - Fix url OBS-URL: https://build.opensuse.org/request/show/588167 OBS-URL: https://build.opensuse.org/package/show/network:telephony/libosmo-sccp?expand=0&rev=24 --- libosmo-sccp.changes | 9 ++++++ libosmo-sccp.spec | 67 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 61 insertions(+), 15 deletions(-) diff --git a/libosmo-sccp.changes b/libosmo-sccp.changes index a34a612..142ac67 100644 --- a/libosmo-sccp.changes +++ b/libosmo-sccp.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sat Mar 17 16:50:04 UTC 2018 - mardnh@gmx.de + +- Derive libversion from version +- Create subpackage for osmo-stp +- Show testsuite.log when tests are failing +- Cosmetic fixes +- Fix url + ------------------------------------------------------------------- Thu Dec 28 00:32:03 UTC 2017 - jengelh@inai.de diff --git a/libosmo-sccp.spec b/libosmo-sccp.spec index 9b278bc..53a388b 100644 --- a/libosmo-sccp.spec +++ b/libosmo-sccp.spec @@ -1,7 +1,7 @@ # # spec file for package libosmo-sccp # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -16,14 +16,15 @@ # +%define libversion %(echo "%{version}" |sed 's/\\./_/g') + Name: libosmo-sccp Version: 0.8.1 Release: 0 -%define libversion 0_8_1 Summary: Osmocom library for the A-bis interface between BTS and BSC -License: AGPL-3.0+ and GPL-2.0+ +License: AGPL-3.0-or-later AND GPL-2.0-or-later Group: Hardware/Mobile -Url: http://openbsc.osmocom.org/ +Url: https://projects.osmocom.org/projects/libosmo-sccp #Git-Clone: git://git.osmocom.org/libosmo-sccp Source: %name-%version.tar.xz @@ -33,6 +34,7 @@ BuildRequires: automake >= 1.6 BuildRequires: libtool >= 2 BuildRequires: lksctp-tools-devel BuildRequires: pkg-config >= 0.20 +BuildRequires: systemd-rpm-macros BuildRequires: xz BuildRequires: pkgconfig(libosmo-netif) >= 0.1.0 BuildRequires: pkgconfig(libosmocore) >= 0.10.0 @@ -47,7 +49,7 @@ heavily used in cellular networks such as GSM. %package -n libosmo-mtp-%libversion Summary: Osmocom Message Transfer Part library -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Libraries %description -n libosmo-mtp-%libversion @@ -58,7 +60,7 @@ transport of SS7 messages between communication partners. %package -n libosmo-mtp-devel Summary: Development files for the Osmocom MTP library -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Development/Libraries/C and C++ Requires: libosmo-mtp-%libversion = %version @@ -71,7 +73,7 @@ library. %package -n libosmo-sccp-%libversion Summary: Osmocom Signalling Connection Control Part library -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Libraries %description -n libosmo-sccp-%libversion @@ -83,7 +85,7 @@ MTP for basic routing and error detection. %package -n libosmo-sccp-devel Summary: Development files for the Osmocom SCCP library -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Development/Libraries/C and C++ Requires: libosmo-sccp-%libversion = %version @@ -97,7 +99,7 @@ library. %package -n libosmo-sigtran0 Summary: Osmocom SIGTRAN library -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Libraries %description -n libosmo-sigtran0 @@ -105,7 +107,7 @@ Osmocom implementation of (parts of) SIGTRAN. %package -n libosmo-sigtran-devel Summary: Development files for the Osmocom sigtran library -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Development/Libraries/C and C++ Requires: libosmo-sigtran0 = %version @@ -117,7 +119,7 @@ SIGTRAN library. %package -n libosmo-xua-%libversion Summary: Osmocom Message Transfer Part 2 User Adaptation library -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Libraries %description -n libosmo-xua-%libversion @@ -127,7 +129,7 @@ across an IP network. %package -n libosmo-xua-devel Summary: Development files for the Osmocom M2UA library -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Development/Libraries/C and C++ Requires: libosmo-sigtran-devel = %version Requires: libosmo-xua-%libversion = %version @@ -139,6 +141,19 @@ and service interface across an IP network. This subpackage contains the development files for the Osmocom M2UA library. +%package -n osmo-stp +Summary: Osmocom SIGTRAN STP (Signaling Transfer Point) +License: GPL-2.0-or-later +Group: Productivity/Telephony/Servers + +%description -n osmo-stp +This is the Osmocom (Open Source Mobile Communications) implementation +of a Signaling Transfer Point (STP) for SS7/SIGTRAN telecommunication +networks. At this point it is a very minimal implementation, missing +lots of the functionality usually present in a STP, such as Global Title +Routing, Global Title Translation. + + %prep %setup -q %patch -P 1 -p1 @@ -146,17 +161,23 @@ library. %build echo "%version" >.tarball-version autoreconf -fiv -%configure --enable-shared --disable-static --includedir="%_includedir/%name" +%configure \ + --enable-shared \ + --disable-static \ + --includedir="%_includedir/%name" make %{?_smp_mflags} %install %make_install find "%buildroot/%_libdir" -type f -name "*.la" -delete +install -D -m 0644 contrib/systemd/osmo-stp.service %{buildroot}%{_unitdir}/osmo-stp.service +install -d "%{buildroot}/%{_unitdir}" "%{buildroot}/%{_sbindir}" +ln -s service "%{buildroot}/%{_sbindir}/rcosmo-stp" %check %ifnarch ppc64 sparc64 s390x # still BE problems? -make %{?_smp_mflags} check +make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} \; ; false) %endif %post -n libosmo-mtp-%libversion -p /sbin/ldconfig @@ -168,6 +189,18 @@ make %{?_smp_mflags} check %post -n libosmo-xua-%libversion -p /sbin/ldconfig %postun -n libosmo-xua-%libversion -p /sbin/ldconfig +%preun -n osmo-stp +%service_del_preun osmo-stp.service + +%postun -n osmo-stp +%service_del_postun osmo-stp.service + +%pre -n osmo-stp +%service_add_pre osmo-stp.service + +%post -n osmo-stp +%service_add_post osmo-stp.service + %files -n libosmo-mtp-%libversion %defattr(-,root,root) %_libdir/libosmo-mtp-%version.so @@ -187,7 +220,6 @@ make %{?_smp_mflags} check %files -n libosmo-sccp-devel %defattr(-,root,root) -%_bindir/osmo-stp %dir %_includedir/%name %dir %_includedir/%name/osmocom %_includedir/%name/osmocom/sccp/ @@ -214,4 +246,9 @@ make %{?_smp_mflags} check %_libdir/libosmo-xua.so %_libdir/pkgconfig/libosmo-xua.pc +%files -n osmo-stp +%{_bindir}/osmo-stp +%{_sbindir}/rcosmo-stp +%{_unitdir}/osmo-stp.service + %changelog From f7f7d12a1c2159594e986ba978c7dc13870a9481f1ad561b26e3dcb6cd66ec69 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 25 Mar 2018 09:22:47 +0000 Subject: [PATCH 2/2] Wrap desc at 70 cols Streamline macro curlification OBS-URL: https://build.opensuse.org/package/show/network:telephony/libosmo-sccp?expand=0&rev=25 --- libosmo-sccp.spec | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/libosmo-sccp.spec b/libosmo-sccp.spec index 53a388b..df833b0 100644 --- a/libosmo-sccp.spec +++ b/libosmo-sccp.spec @@ -16,11 +16,10 @@ # -%define libversion %(echo "%{version}" |sed 's/\\./_/g') - Name: libosmo-sccp Version: 0.8.1 Release: 0 +%define libversion %(echo "%version" | sed 's/\\./_/g') Summary: Osmocom library for the A-bis interface between BTS and BSC License: AGPL-3.0-or-later AND GPL-2.0-or-later Group: Hardware/Mobile @@ -147,12 +146,11 @@ License: GPL-2.0-or-later Group: Productivity/Telephony/Servers %description -n osmo-stp -This is the Osmocom (Open Source Mobile Communications) implementation -of a Signaling Transfer Point (STP) for SS7/SIGTRAN telecommunication -networks. At this point it is a very minimal implementation, missing -lots of the functionality usually present in a STP, such as Global Title -Routing, Global Title Translation. - +This is the Osmocom (Open Source Mobile Communications) +implementation of a Signaling Transfer Point (STP) for SS7/SIGTRAN +telecommunication networks. At this point, it is a minimal +implementation, missing lots of the functionality usually present in +a STP, such as Global Title Routing, Global Title Translation. %prep %setup -q @@ -161,24 +159,24 @@ Routing, Global Title Translation. %build echo "%version" >.tarball-version autoreconf -fiv -%configure \ - --enable-shared \ - --disable-static \ - --includedir="%_includedir/%name" +%configure --disable-static --includedir="%_includedir/%name" make %{?_smp_mflags} %install %make_install find "%buildroot/%_libdir" -type f -name "*.la" -delete -install -D -m 0644 contrib/systemd/osmo-stp.service %{buildroot}%{_unitdir}/osmo-stp.service -install -d "%{buildroot}/%{_unitdir}" "%{buildroot}/%{_sbindir}" -ln -s service "%{buildroot}/%{_sbindir}/rcosmo-stp" +install -D -m 0644 contrib/systemd/osmo-stp.service %buildroot%_unitdir/osmo-stp.service +install -d "%buildroot/%_unitdir" "%buildroot/%_sbindir" +ln -s service "%buildroot/%_sbindir/rcosmo-stp" %check +if ! make %{?_smp_mflags} check; then + find . -name testsuite.log -exec cat "{}" "+" %ifnarch ppc64 sparc64 s390x -# still BE problems? -make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} \; ; false) + # still BE problems? + exit 1 %endif +fi %post -n libosmo-mtp-%libversion -p /sbin/ldconfig %postun -n libosmo-mtp-%libversion -p /sbin/ldconfig @@ -247,8 +245,8 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} \; ; fals %_libdir/pkgconfig/libosmo-xua.pc %files -n osmo-stp -%{_bindir}/osmo-stp -%{_sbindir}/rcosmo-stp -%{_unitdir}/osmo-stp.service +%_bindir/osmo-stp +%_sbindir/rcosmo-stp +%_unitdir/osmo-stp.service %changelog