From 6a0241b5d83608209018fae29114bbcdc5658243f9bf3348fef9b905b3b77ff6 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 11 Dec 2018 13:47:53 +0000 Subject: [PATCH] - Update to new upstream release 0.3.0 OBS-URL: https://build.opensuse.org/package/show/network:telephony/osmo-iuh?expand=0&rev=11 --- ...ning-implicit-function-declaration-i.patch | 28 --- 0001-fix-return-values.patch | 209 +----------------- 0001-iu_client-uses-gprs_msgb.h.patch | 43 ++-- _service | 4 +- osmo-iuh-0.2.0.tar.xz | 3 - osmo-iuh-0.3.0.tar.xz | 3 + osmo-iuh.changes | 13 ++ osmo-iuh.spec | 38 ++-- 8 files changed, 69 insertions(+), 272 deletions(-) delete mode 100644 0001-fix-compiler-warning-implicit-function-declaration-i.patch delete mode 100644 osmo-iuh-0.2.0.tar.xz create mode 100644 osmo-iuh-0.3.0.tar.xz diff --git a/0001-fix-compiler-warning-implicit-function-declaration-i.patch b/0001-fix-compiler-warning-implicit-function-declaration-i.patch deleted file mode 100644 index 32cc912..0000000 --- a/0001-fix-compiler-warning-implicit-function-declaration-i.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 1ce7ac8cb973e0b694c52659429f992e0b56e359 Mon Sep 17 00:00:00 2001 -From: Martin Hauke -Date: Fri, 30 Dec 2016 11:12:06 +0100 -Subject: [PATCH] fix compiler warning: implicit-function-declaration in - hnbgw_vty.c - -hnbgw_vty.c:233:2: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration] - if (addr && (strcmp(addr, HNBGW_LOCAL_IP_DEFAULT) != 0)) ---- - src/hnbgw_vty.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c -index 59871da..e40b077 100644 ---- a/src/hnbgw_vty.c -+++ b/src/hnbgw_vty.c -@@ -18,6 +18,8 @@ - * - */ - -+#include -+ - #include - - #include --- -2.6.6 - diff --git a/0001-fix-return-values.patch b/0001-fix-return-values.patch index 535db65..6e5f162 100644 --- a/0001-fix-return-values.patch +++ b/0001-fix-return-values.patch @@ -1,206 +1,21 @@ -From fc52e9614856ac03294a74c09d485349d33eed6d Mon Sep 17 00:00:00 2001 From: Jan Engelhardt -Date: Tue, 2 Jan 2018 00:08:53 +0100 +Date: 2018-12-11 14:44:48.979665889 +0100 Subject: [PATCH] fix return values -(fixed in git already - but only partially) +Fix yet more return value problems. --- - asn1/utils/asn1tostruct.py | 2 ++ - src/context_map.c | 1 + - src/hnbgw.c | 1 + - src/hnbgw_cn.c | 4 +++- - src/hnbgw_hnbap.c | 9 +++++---- - src/hnbgw_ranap.c | 5 ++++- - src/ranap_common_cn.c | 5 ++++- - src/tests/test_common.c | 1 + - 8 files changed, 21 insertions(+), 7 deletions(-) + src/hnbgw_hnbap.c | 1 + + 1 file changed, 1 insertion(+) -diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py -index 8364c27..63aea8b 100755 ---- a/asn1/utils/asn1tostruct.py -+++ b/asn1/utils/asn1tostruct.py -@@ -384,6 +384,8 @@ for key in iesDefs: - iename = re.sub('id-', '', ie[0]) - ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename)) - f.write(" ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_%s, &%s->%s);\n" % (ietypeunderscore, lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore)) -+ -+ f.write(" return 0;\n") - f.write("}\n\n") - - for key in iesDefs: -diff --git a/src/context_map.c b/src/context_map.c -index 0960cb9..8fb2187 100644 ---- a/src/context_map.c -+++ b/src/context_map.c -@@ -169,4 +169,5 @@ int context_map_init(struct hnb_gw *gw) - context_map_tmr.cb = context_map_tmr_cb; - context_map_tmr.data = gw; - osmo_timer_schedule(&context_map_tmr, EXPIRY_TIMER_SECS, 0); -+ return 0; - } -diff --git a/src/hnbgw.c b/src/hnbgw.c -index c9fdd53..db4b534 100644 ---- a/src/hnbgw.c -+++ b/src/hnbgw.c -@@ -175,6 +175,7 @@ void ue_context_free(struct ue_context *ue) - } - static int hnb_close_cb(struct osmo_stream_srv *conn) - { -+ return 0; - } - - static int hnb_read_cb(struct osmo_stream_srv *conn) -diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c -index 3b828b4..a8d3ebc 100644 ---- a/src/hnbgw_cn.c -+++ b/src/hnbgw_cn.c -@@ -87,6 +87,7 @@ int hnbgw_cnlink_change_state(struct hnbgw_cnlink *cnlink, enum hnbgw_cnlink_sta - osmo_timer_del(&cnlink->T_RafC); - break; +Index: osmo-iuh-0.3.0/src/hnbgw_hnbap.c +=================================================================== +--- osmo-iuh-0.3.0.orig/src/hnbgw_hnbap.c ++++ osmo-iuh-0.3.0/src/hnbgw_hnbap.c +@@ -86,6 +86,7 @@ static int hnbgw_tx_hnb_register_rej(str + /* The message was not queued. Destroy the connection right away. */ + hnb_context_release(ctx, true); } + return 0; } - /*********************************************************************** -@@ -218,6 +219,7 @@ static int _cn_ranap_rx(struct hnbgw_cnlink *cnlink, RANAP_RANAP_PDU_t *pdu, - "presence %u from CN, ignoring\n", pdu->present); - break; - } -+ return rc; - } - - static int handle_cn_ranap(struct hnbgw_cnlink *cnlink, const uint8_t *data, -@@ -389,7 +391,7 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *ctx) - case OSMO_PRIM(OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION): - rc = handle_cn_disc_ind(cnlink, &prim->u.disconnect, oph); - break; -- defualt: -+ default: - LOGP(DMAIN, LOGL_ERROR, - "Received unknown prim %u from SCCP USER SAP\n", - OSMO_PRIM_HDR(oph)); -diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c -index 0473482..d13e0a8 100644 ---- a/src/hnbgw_hnbap.c -+++ b/src/hnbgw_hnbap.c -@@ -517,16 +517,17 @@ static int hnbgw_rx_initiating_msg(struct hnb_context *hnb, InitiatingMessage_t - imsg->procedureCode); - break; - } -+ return rc; - } - - static int hnbgw_rx_successful_outcome_msg(struct hnb_context *hnb, SuccessfulOutcome_t *msg) - { -- -+ return -1; - } - - static int hnbgw_rx_unsuccessful_outcome_msg(struct hnb_context *hnb, UnsuccessfulOutcome_t *msg) - { -- -+ return -1; - } - - -@@ -559,7 +560,7 @@ int hnbgw_hnbap_rx(struct hnb_context *hnb, struct msgb *msg) - { - HNBAP_PDU_t _pdu, *pdu = &_pdu; - asn_dec_rval_t dec_ret; -- int rc; -+ int rc = 0; - - /* decode and handle to _hnbgw_hnbap_rx() */ - -@@ -581,5 +582,5 @@ int hnbgw_hnbap_rx(struct hnb_context *hnb, struct msgb *msg) - - int hnbgw_hnbap_init(void) - { -- -+ return 0; - } -diff --git a/src/hnbgw_ranap.c b/src/hnbgw_ranap.c -index 7fd6d0a..1f3246b 100644 ---- a/src/hnbgw_ranap.c -+++ b/src/hnbgw_ranap.c -@@ -151,6 +151,7 @@ static int ranap_rx_initiating_msg(struct hnb_context *hnb, RANAP_InitiatingMess - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); - break; - } -+ return rc; - } - - static int ranap_rx_successful_msg(struct hnb_context *hnb, RANAP_SuccessfulOutcome_t *imsg) -@@ -179,6 +180,7 @@ static int ranap_rx_successful_msg(struct hnb_context *hnb, RANAP_SuccessfulOutc - "Procedure %u from HNB, ignoring\n", imsg->procedureCode); - break; - } -+ return rc; - } - - -@@ -204,6 +206,7 @@ static int _hnbgw_ranap_rx(struct hnb_context *hnb, RANAP_RANAP_PDU_t *pdu) - "presence %u from HNB, ignoring\n", pdu->present); - break; - } -+ return rc; - } - - -@@ -228,5 +231,5 @@ int hnbgw_ranap_rx(struct msgb *msg, uint8_t *data, size_t len) - - int hnbgw_ranap_init(void) - { -- -+ return 0; - } -diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c -index d02eb37..7c2a743 100644 ---- a/src/ranap_common_cn.c -+++ b/src/ranap_common_cn.c -@@ -360,6 +360,7 @@ static int cn_ranap_rx_initiating_msg_cl(void *ctx, RANAP_InitiatingMessage_t *i - get_value_string(ranap_procedure_code_vals, imsg->procedureCode)); - break; - } -+ return rc; - } - - static void cn_ranap_free_initiating_msg_cl(ranap_message *message) -@@ -433,6 +434,7 @@ static int cn_ranap_rx_successful_msg_cl(void *ctx, RANAP_SuccessfulOutcome_t *i - get_value_string(ranap_procedure_code_vals, imsg->procedureCode)); - break; - } -+ return rc; - } - - static void cn_ranap_free_successful_msg_cl(ranap_message *message) -@@ -463,7 +465,7 @@ static void cn_ranap_free_successful_msg_cl(ranap_message *message) - - static int _cn_ranap_rx_cl(void *ctx, RANAP_RANAP_PDU_t *pdu, ranap_message *message) - { -- int rc; -+ int rc = 0; - - /* Extend _cn_ranap_free_cl as well when extending this function */ - -@@ -488,6 +490,7 @@ static int _cn_ranap_rx_cl(void *ctx, RANAP_RANAP_PDU_t *pdu, ranap_message *mes - get_value_string(ranap_presence_vals, pdu->present)); - break; - } -+ return rc; - } - - static void _cn_ranap_free_cl(ranap_message *message) -diff --git a/src/tests/test_common.c b/src/tests/test_common.c -index c8aafdd..9ea48e0 100644 ---- a/src/tests/test_common.c -+++ b/src/tests/test_common.c -@@ -84,4 +84,5 @@ int test_common_init(void) - - log_set_print_filename(osmo_stderr_target, 0); - log_set_use_color(osmo_stderr_target, 0); -+ return 0; - } --- -2.15.1 - + static int hnbgw_tx_hnb_register_acc(struct hnb_context *ctx) diff --git a/0001-iu_client-uses-gprs_msgb.h.patch b/0001-iu_client-uses-gprs_msgb.h.patch index d52d5f7..361b260 100644 --- a/0001-iu_client-uses-gprs_msgb.h.patch +++ b/0001-iu_client-uses-gprs_msgb.h.patch @@ -1,41 +1,38 @@ -From ce3576e41d5a9b9897e704bba69faac643afb1be Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 2 Jan 2018 00:21:09 +0100 Subject: [PATCH] iu_client uses gprs_msgb.h --- - configure.ac | 1 + - src/Makefile.am | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) + configure.ac | 1 + + src/Makefile.am | 5 +++-- + 2 files changed, 4 insertions(+), 2 deletions(-) -diff --git a/configure.ac b/configure.ac -index ff0501a..393ad83 100644 ---- a/configure.ac -+++ b/configure.ac +Index: osmo-iuh-0.3.0/configure.ac +=================================================================== +--- osmo-iuh-0.3.0.orig/configure.ac ++++ osmo-iuh-0.3.0/configure.ac @@ -34,6 +34,7 @@ fi PKG_PROG_PKG_CONFIG([0.20]) - PKG_CHECK_MODULES(OSMOCORE, libosmocore >= 0.10.0) + PKG_CHECK_MODULES(OSMOCORE, libosmocore >= 0.11.0) +PKG_CHECK_MODULES([OSMOGB], [libosmogb]) - PKG_CHECK_MODULES(OSMOGSM, libosmogsm >= 0.10.0) - PKG_CHECK_MODULES(OSMOVTY, libosmovty >= 0.10.0) - PKG_CHECK_MODULES(OSMONETIF, libosmo-netif >= 0.1.0) -diff --git a/src/Makefile.am b/src/Makefile.am -index d815394..fe3f90e 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -42,9 +42,9 @@ gen_ranap.stamp: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN1TOSTRUCT) + PKG_CHECK_MODULES(OSMOGSM, libosmogsm >= 0.11.0) + PKG_CHECK_MODULES(OSMOVTY, libosmovty >= 0.11.0) + PKG_CHECK_MODULES(OSMOCTRL, libosmoctrl >= 0.11.0) +Index: osmo-iuh-0.3.0/src/Makefile.am +=================================================================== +--- osmo-iuh-0.3.0.orig/src/Makefile.am ++++ osmo-iuh-0.3.0/src/Makefile.am +@@ -42,9 +42,10 @@ gen_ranap.stamp: $(ASN1_ROOT)/ranap/RANA ranap_decoder.c ranap_encoder.c: gen_ranap.stamp --AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ +-AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include \ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ - $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) \ + $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOCTRL_CFLAGS) $(OSMOGSM_CFLAGS) \ - $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) + $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) $(OSMOGB_CFLAGS) - COMMON_LDADD = -lsctp ++AM_CFLAGS = -Wall # build the shared RANAP library --- -2.15.1 - + # diff --git a/_service b/_service index ae8d2ef..687d2e3 100644 --- a/_service +++ b/_service @@ -2,8 +2,8 @@ git git://git.osmocom.org/osmo-iuh - 0.2.0 - @PARENT_TAG@ + 0.3.0 + 0.3.0 *.tar diff --git a/osmo-iuh-0.2.0.tar.xz b/osmo-iuh-0.2.0.tar.xz deleted file mode 100644 index 914cba7..0000000 --- a/osmo-iuh-0.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8295e0fb139bc3016f046330beeff58a6b60d73c701982239c46e83ebf270399 -size 10189156 diff --git a/osmo-iuh-0.3.0.tar.xz b/osmo-iuh-0.3.0.tar.xz new file mode 100644 index 0000000..c470c1d --- /dev/null +++ b/osmo-iuh-0.3.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3eb44fae92e9e17ad3c4545b88fe91adfa728b2480691d85a4f1fd88f255d5eb +size 10054460 diff --git a/osmo-iuh.changes b/osmo-iuh.changes index 877c7d3..4087bcd 100644 --- a/osmo-iuh.changes +++ b/osmo-iuh.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Dec 11 13:21:58 UTC 2018 - Jan Engelhardt + +- Update to new upstream release 0.3.0 + * osmo-hnbgw: auto-config local and remote PCs if omitted + * osmo-hnbgw: don't configure specific local IP address for STP connection + * hnbgw: use proper VTY port number defined in libosmocore (4261) + * vty: tweak / improve HNB and cnlink introspection + * Add control interface + * ensure unique CellIDs in HNB-GW +- Remove + 0001-fix-compiler-warning-implicit-function-declaration-i.patch + ------------------------------------------------------------------- Thu Mar 22 19:26:39 UTC 2018 - jengelh@inai.de diff --git a/osmo-iuh.spec b/osmo-iuh.spec index d797b06..8105f78 100644 --- a/osmo-iuh.spec +++ b/osmo-iuh.spec @@ -12,20 +12,20 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: osmo-iuh -Version: 0.2.0 +%define lname libosmo-ranap2 +Version: 0.3.0 Release: 0 Summary: Osmocom code for the Iuh interface (HNBAP, RUA, RANAP) License: AGPL-3.0-or-later AND GPL-2.0-or-later Group: Hardware/Mobile Url: https://osmocom.org/projects/osmohnbgw/wiki Source: %name-%version.tar.xz -Patch1: 0001-fix-compiler-warning-implicit-function-declaration-i.patch -Patch2: 0001-fix-return-values.patch +Patch1: 0001-fix-return-values.patch Patch3: 0001-iu_client-uses-gprs_msgb.h.patch BuildRequires: automake >= 1.9 BuildRequires: libtool >= 2 @@ -34,28 +34,29 @@ BuildRequires: pkg-config >= 0.20 # python2 for asn1tostruct.py BuildRequires: python2 BuildRequires: xz -BuildRequires: pkgconfig(libasn1c) >= 0.9.28 -BuildRequires: pkgconfig(libosmo-netif) >= 0.1.0 -BuildRequires: pkgconfig(libosmo-sigtran) >= 0.8.0 -BuildRequires: pkgconfig(libosmocore) >= 0.10.0 +BuildRequires: pkgconfig(libasn1c) >= 0.9.30 +BuildRequires: pkgconfig(libosmo-netif) >= 0.2.0 +BuildRequires: pkgconfig(libosmo-sigtran) >= 0.9.0 +BuildRequires: pkgconfig(libosmocore) >= 0.11.0 +BuildRequires: pkgconfig(libosmoctrl) >= 0.11.0 BuildRequires: pkgconfig(libosmogb) -BuildRequires: pkgconfig(libosmogsm) >= 0.10.0 -BuildRequires: pkgconfig(libosmovty) >= 0.10.0 +BuildRequires: pkgconfig(libosmogsm) >= 0.11.0 +BuildRequires: pkgconfig(libosmovty) >= 0.11.0 %description Osmocom code for the Iuh interface (HNBAP, RUA, RANAP) -%package -n libosmo-ranap1 +%package -n %lname Summary: Shared Library part of libosmo-ranap Group: System/Libraries -%description -n libosmo-ranap1 +%description -n %lname Osmocom code for the Iuh interface (HNBAP, RUA, RANAP) %package -n libosmo-ranap-devel Summary: Development files for Osmocom RANAP library Group: Development/Libraries/C and C++ -Requires: libosmo-ranap1 = %version +Requires: %lname = %version %description -n libosmo-ranap-devel Osmocom code for the Iuh interface (HNBAP, RUA, RANAP) @@ -64,8 +65,7 @@ This subpackage contains libraries and header files for developing applications that want to make use of libosmoranap. %prep -%setup -q -%patch -P 1 -P 2 -P 3 -p1 +%autosetup -p1 %build autoreconf -fi @@ -84,8 +84,8 @@ if ! make %{?_smp_mflags} check; then %endif fi -%post -n libosmo-ranap1 -p /sbin/ldconfig -%postun -n libosmo-ranap1 -p /sbin/ldconfig +%post -n %lname -p /sbin/ldconfig +%postun -n %lname -p /sbin/ldconfig %files %doc COPYING README.md @@ -93,8 +93,8 @@ fi %_docdir/%name/examples/osmo-hnbgw.cfg %_bindir/osmo-hnbgw -%files -n libosmo-ranap1 -%_libdir/libosmo-ranap.so.1* +%files -n %lname +%_libdir/libosmo-ranap.so.2* %files -n libosmo-ranap-devel %_includedir/*