Commit Graph

76 Commits

Author SHA1 Message Date
Pau Espin aca2c724ae Bump version: 1.8.0.252-13c29 → 1.9.0
Change-Id: I6f8eccbccb73c6c094f13f2d4bdee931cf5b9010
2023-09-12 13:15:54 +02:00
Oliver Smith 8c0a2c72b0 contrib/libosmocore.spec: centos7: disable uring
liburing is not available in CentOS 7, so disable it there. I've
verified that this works as expected in our OBS with CentOS 7, 8 and
openSUSE Tumbleweed.

Related: OS#5751
Change-Id: Ie2399754952d460499c9355706be37f792988bac
2023-08-29 15:48:39 +02:00
Daniel Willmann f91d2aac9d osmo_io: Add io_uring backend
Change-Id: I5152129eb84b31ccc9e02bc2a5c5bdb046d331bc
2023-08-24 17:33:19 +02:00
Neels Hofmeyr e1c4f24cb9 contrib/talloc_count.sh: improve hexadecimal masking
Also mask hexadecimal without leading 0x. But take care to not match on
every letter a-f,A-F in normal words and names.

before:

    10 map_rua(NffffNfNecN-example-com-RUA-N)[N]
    10 map_sccp(NffffNfNecN-example-com-SCCP-N)[N]
    17 map_rua(NffffNcN-example-com-RUA-N)[N]
    17 map_sccp(NffffNcN-example-com-SCCP-N)[N]
    18 map_rua(NffffNeNbN-example-com-RUA-N)[N]
    18 map_sccp(NffffNeNbN-example-com-SCCP-N)[N]
    82 map_rua(NffffNfNdN-example-com-RUA-N)[N]
    82 map_sccp(NffffNfNdN-example-com-SCCP-N)[N]
    85 map_rua(NffffNfN-example-com-RUA-N)[N]
    85 map_sccp(NffffNfN-example-com-SCCP-N)[N]
   224 struct hnbgw_context_map

after:

   224 map_rua(N-example-com-RUA-N)[N]
   224 map_sccp(N-example-com-SCCP-N)[N]
   224 struct hnbgw_context_map

Change-Id: I1b42ce3e67c7ed2d38d3e5c9cbfa90ba185a07b7
2023-03-14 20:12:57 +00:00
Vadim Yanitskiy ed501d3172 contrib/struct_endianness.py: simplify file extension check
Change-Id: Iaf7194fdfc3772973f9a9c806d375a9a56ff57c8
2023-02-28 18:48:56 +00:00
Oliver Smith 0b5c09b3f0 Fix typo endianess -> endianness
Rename contrib/struct_endianess.py to contrib/struct_endianness.py, and
fix the typo everywhere. This is in preparation to call the script in
CI on all repositories.

Related: OS#5884
Change-Id: Idc4af9098ba1de26243464c772d6ea8be330646a
2023-02-17 10:37:40 +01:00
Neels Hofmeyr 6939169de9 add contrib/talloc_count.sh
When a user reports a memory leak with a talloc report, this script is
useful to quickly get a handle of what is being leaked. The alternative
is eyeballing the talloc report for a very long time.

Change-Id: I5b3242dd6e0649925ac6abfd1e96625c682b8934
2023-02-10 21:40:21 +01:00
Pau Espin 5f15e4199c Bump version: 1.7.0.119-b31a-dirty → 1.8.0
Change-Id: I5e953cedc041371a9c192f58348b673a787f542e
2023-02-07 11:20:42 +01:00
Harald Welte d55a209d1c create libosmoisdn sub-library
There are some parts of libosmogsm which are not really GSM specific,
but rather ISDN bits that were inherited by GSM.  This includes the
I.460 multiplex as well as the core LAPD protocol.

Let's move those bits to its own libosmoisdn library, before we add
more ISDN specific bits to the wrong place.

Backwards-compatibility is created by making libosmogsm depend on
libosmoisdn, and by providing wrapper include files for source
compatibility.

Change-Id: Ib1a6c762322fd5047be3188b1df22408ef06aa50
2023-01-21 22:41:57 +01:00
Max a840ad5e19 jenkins_arm.sh: disable external tests
We don not run 'make check' at all so configuring with external tests support is pointless.

Related: OS#5671
Change-Id: If96756a85ab3b01a786838a4882884efe33f968b
2022-12-04 10:03:13 +00:00
Pau Espin a1584d237b Bump version: 1.6.0.132-0239-dirty → 1.7.0
Change-Id: Idb0d20aa4336a69cb100e140fb1fa9e7ac25b984
2022-06-28 17:00:51 +02:00
Pau Espin b0c2f75665 jenkins: Validate gsm 08.58 IEs are added to tlv_definition
It was recently found that several IEs which were added in the header
file were not actually added to the tlv_definition, and hence the tlv
parser failed to decode them. Let's make sure we don't foget to add new
IEs in the future.

Related: SYS#5915

Change-Id: Id8a679ca43eb0fcc4882780e9a95ec21c7f51972
2022-04-05 17:38:25 +02:00
Harald Welte c73a160743 libosmocore.spec: Make libosmocore-devel require libsctp
Now that the libosmo*.pc files 'Require' the libsctp pkg-config
file to be installed, we need an explicit package dependency
from libosmocore-devel to lksctp-tools-devel, the package providing
the related libsctp.pc file.

Change-Id: I967369f6726e88946872881d298ab90440ca2c0e
2022-03-25 11:30:09 +01:00
Pau Espin 2d10ff20a6 jenkins: Validate IEs are added to tlv_definition
It was recently found that several IEs which were added in the header
file were not actually added to the tlv_definition, and hence the tlv
parser failed to decode them. Let's make sure we don't foget to add new
IEs in the future.

Related: SYS#5891
Change-Id: I1f6c274ea86b5803bbf1d845473b98078f46d1ad
2022-03-18 17:36:46 +01:00
Vadim Yanitskiy 381dc61099 contrib/jenkins_amd64.sh: remove FreeBSD specific quirks
We don't run build verification on FreeBSD anymore.

Change-Id: Ia3a9a49cade453a937ee230163ca44930a39d639
2022-03-13 21:56:36 +00:00
Vadim Yanitskiy 663eaaa4fe contrib/libosmocore.spec.in: mention osmo-config-merge in utils
Change-Id: I4d3d06b2f27ded60f9408e326202c5c6bf6d35d1
2022-01-10 14:40:19 +00:00
Pau Espin c7deaf28aa Bump version: 1.5.1.282-ab5e-dirty → 1.6.0
Change-Id: Ia3ac0a36b9e898996f596c6d2787e03cd59bfc11
2021-11-16 13:08:23 +01:00
Pau Espin 4a15c2d47a contrib/libosmocore.spec.in: Depends on talloc 2.1.0
With recent commit (see below) libosmocore started using talloc API
talloc_pooled_object(), which is available only startinf from talloc
2.1.0.
Let's bump required version check accordingly.

Issue found by osmo-release.sh:
ERROR: configure.ac <talloc, 2.1.0> does NOT match contrib/*.spec.in <talloc, 2.0.1>!

Fixes: b72867f0e6
Change-Id: I6797e244118ce2ca7dd22050ff505d8442bba672
2021-11-16 12:47:49 +01:00
Harald Welte af52bcc5a0 attempt to fix RPM spec file after recent soversion bump
In I3bc0826c0000be4d76235ed6b5be86d216ea2e4d the soversion was
chhanged (e.g. libosmocore.so.16 to libosmocore.so.17) but the
spec.in file was not adjusted accordingly.

Change-Id: Id7e1e3feef6bda1a2d2a615a61635e22d550b5a3
2021-02-24 08:28:30 +00:00
Pau Espin Pedrol f286fdc87e Bump version: 1.4.0.535-e387-dirty → 1.5.0
Change-Id: I3bc0826c0000be4d76235ed6b5be86d216ea2e4d
2021-02-23 14:03:31 +01:00
Harald Welte 700822b305 Enable systemd-journald log target in debian + rpm packaging
Given that all the distributions we support are shipping systemd
anyway, this will not really introduce any additional runtime package
dependencies.

Change-Id: Ib3af918cd4cc8d0ca6d228a0f2c8338534374d46
2021-02-03 14:56:17 +01:00
Harald Welte 53a2fde368 Integrate libmnl (minimal netlink) library with libosmocore select loop
This adds an easy way to listen to netlink events form the Linux kernel
from within libosmocore applications.

The new dependency can be disabled via the "--disable-lbimnl" configure flag.

Change-Id: I4f787ee68f0d6d04f0a5655eb57d55b3b326a42f
2020-12-02 21:04:51 +00:00
Pau Espin 3c5fa2df44 contrib: jenkins: Enable parallel make in make distcheck
Related: OS#4421
Change-Id: I4db992d599bd5cdc16a58729695654d1b759b682
2020-10-13 08:24:03 +00:00
Harald Welte 5c5713e869 Bump version: 1.3.0.173-51974 → 1.4.0
Change-Id: I4fc6dd4f727c8ff5a64865bbb87e1d9feb7c5174
2020-08-13 11:06:36 +02:00
Oliver Smith 6370f5dd6f contrib: integrate RPM spec
Remove OpenSUSE bug report link, set version to @VERSION@, make it build with
CentOS 8 etc.

Related: OS#4550
Change-Id: I59255889740195ec811a947a7130ae0918ea4b4d
2020-05-20 10:29:05 +00:00
Oliver Smith bfeeb1c86c contrib: import RPM spec
Copy the RPM spec file from:
https://build.opensuse.org/project/show/home:mnhauke:osmocom:nightly

Related: OS#4550
Change-Id: Ib329b719fbeaf4618d299fa20514c76fe704cb48
2020-05-16 19:56:54 +00:00
Neels Hofmeyr bd5869706d struct_endianess.py: also recognise unnamed substructs
Before this, the new dtap_header substruct construct would end up being split
up in a weird way:

	struct dtap_header {
		uint8_t type;
		union {
			uint8_t link_id;  /* Backward compatibility */
			struct {
				uint8_t dlci_cc:2,
				dlci_spare:3,
				dlci_sapi:3; /* enum gsm0406_dlc_sapi */
			};
		};
		uint8_t length;
	} __attribute__((packed));

would previously become

	struct dtap_header {
		uint8_t type;
		union {
			uint8_t link_id;  /* Backward compatibility */
			struct {
	#if OSMO_IS_LITTLE_ENDIAN
				uint8_t dlci_cc:2,
				dlci_spare:3,
				dlci_sapi:3; /* enum gsm0406_dlc_sapi */
			};
		};
		uint8_t length;
	#elif OSMO_IS_BIG_ENDIAN
	/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
				uint8_t dlci_sapi:3, dlci_spare:3, dlci_cc:2;
			};
		};
		uint8_t length;
	#endif
	} __attribute__((packed));

now becomes

	struct dtap_header {
		uint8_t type;
		union {
			uint8_t link_id;  /* Backward compatibility */
			struct {
	#if OSMO_IS_LITTLE_ENDIAN
				uint8_t dlci_cc:2,
				dlci_spare:3,
				dlci_sapi:3; /* enum gsm0406_dlc_sapi */
	#elif OSMO_IS_BIG_ENDIAN
	/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
				uint8_t dlci_sapi:3, dlci_spare:3, dlci_cc:2;
	#endif
			};
		};
		uint8_t length;
	} __attribute__((packed));

Change-Id: I3c4986ebd1e41aad8b279d6132b7e3b2539d7dc5
2020-05-15 16:13:54 +00:00
Neels Hofmeyr b82cc772eb jenkins.sh: simpler invocation of verify_value_string_...
The script
osmo-ci/scripts/verify_value_string_arrays_are_terminated.py
is able to find .c/.h files in directory trees by itself.

Shorten the cmdline invocation of this script for libosmocore.

Change-Id: I888c20b9b19d777cd6581a541536842292f434b9
2020-01-07 22:18:56 +00:00
Harald Welte da432cdc35 libosmocore libusb integration
Osmocom applications typically use libosmocore select.[ch] event loop
code as their main event dispatch mechanism.  When they want to deal
with libusb in a non-blocking/asynchronous way, they need to integrate
libusb into that select().

The new libosmousb is doing exactly that: Providing a shared utility
library for Osmocom programs that wish to use libusb.  This is useful
for example in simtrace2 host utilitie as well as osmo-e1d.

Change-Id: I656a1a38cbb5b1f3a9145d2869d3b4d0adefcae3
Closes: OS#4299
2019-12-16 00:17:27 +01:00
Pau Espin ea2afb21d6 configure: Introduce --disable-libsctp and error by default if libsctp not found
This way libosmocore build fails during configuring phase if expected
default behavior (building with libsctp support enabled and providing
osmo_sock_init2_multiaddr() API) fails. User is still provided with
--disable-libsctp option in case he doesn't need those features or his
environment doesn't provide required libsctp APIs.

Change-Id: I710c9cb1c6da0e5fc94b792df8bf60194a72208f
2019-10-24 15:56:49 +02:00
Oliver Smith a3dec04c00 contrib/jenkins.sh: run "make maintainer-clean"
Related: OS#3047
Change-Id: Ic147678e7906a8b9ad7fac8367602b656f4172e6
2019-07-11 03:37:36 +00:00
Keith Whyte c8e3c84ba1 Add expect script: 'vty' for easy access to all vtys
This expect script can be run as:
 ./vty bsc
 ./vty msc
 ./vty sip ...

etc (no need to remember ports)

Change-Id: Ice4532be7cb3139da29cb9d84dd4769e8d826dfa
2019-05-08 22:53:41 +00:00
Neels Hofmeyr 4ff41d94ce jenkins distcheck: enable external tests
It was recently discovered that logging_vty_test.vty was missing from
EXTRA_DIST. To make sure we don't forget similar files in the future, add
python tests to 'make distcheck', by means of DISTCHECK_CONFIGURE_FLAGS.

Related: I1bcedf3097f02b2adc679560d1cbceb27dbc345e
Change-Id: Id569b2a932c1428cabb4d7ff17822cff8eee02af
2019-01-29 01:03:25 +01:00
Neels Hofmeyr 7ab5fc1f3b add contrib/struct_endianess.py
In libosmocore (and likely elsewhere) we have scores of packed structs with
sub-byte integer members that lack the necessary member reversal shims to be
able to work on big endian architectures.

Instead of manually editing each one of them and probably introduce errors in
the process, this script handles the change automatically, and in the future
allows us to verify correctness in gerrit verifications.

Change-Id: I8e75b17d8071c7b3a2a171ba776fb76854b28a53
2018-11-22 13:49:24 +00:00
Neels Hofmeyr ba2bd2eeb1 jenkins: print gcc version in log
Change-Id: I8dfac78868f64213413e80cc52ac585d9d4a2c93
2018-11-06 21:43:16 +00:00
Neels Hofmeyr d79f01e0a6 jenkins: add --enable-external-tests
Run the new logging_vty_test.vty VTY transcript test in our CI.

Change-Id: Ic4ec1f6c131da50b3956f16f0b49375f387196b3
2018-09-13 15:46:55 +00:00
Harald Welte 61650d5117 jenkins_arm.sh: Use same Werror related options as on other builds
Change-Id: I45ab11b461a35923853f38b5bedd5025f53cc5b5
2018-08-01 17:42:06 +02:00
Harald Welte 79d49af93a jenkins_arch.sh: Exit with error on unknown architecture
The jenkins build job used to call this script using an "arch"
it doesn't understand.  This should have resulted in an error,
but it didn't as there was a missing "exit 1" statement :(

Related: OS#3360
Change-Id: Ib27c9ebaf2630c432b1923f8e14b36e7772a6033
2018-06-28 10:57:42 +02:00
Harald Welte cae93e51d9 jenkins_arch.sh: Accept "arm-none-eabi" as alias for "arm"
The jenkins build job is calling the script using "amd64" and
"arm-none-eabi", while the script expects "amd64" and "arm".

Let's add "arm-none-eabi" as an alias for "arm".

Closes: OS#3360
Change-Id: Idedd4778a63d67cdbf4f4d538bf4a225abb7547a
2018-06-28 10:57:42 +02:00
Harald Welte 1e78313e8e jenkins_arm.sh: Don't run 'make check' on embedded builds
If we're cross-compiling for arm-none-eabi, we cannot execute test
programs.

Change-Id: I64e88a31091b67c37c308c44013c42d4574d2312
2018-06-28 10:57:42 +02:00
Neels Hofmeyr 71f781c303 contrib/fsm-to-dot: warn about identically named FSMs
FSMs with identical names confuse the script, so at least warn about them.
IMHO we should also have different names for each FSM, so not bothering to make
the script safe against identical naming.

Change-Id: I4fe7e85d2fdf23e2ba964f3b47be1954edc63cef
2018-03-26 15:04:32 +02:00
Neels Hofmeyr 338d174399 contrib/fsm-to-dot: mark illegal states in red
If an FSM transitions to a state that actually belongs to a different FSM,
print an error and mark it red, instead of exiting with exception.

Change-Id: I73d95a0c65ca1ea586ad55234610671a53d6220f
2018-03-26 15:04:18 +02:00
Neels Hofmeyr ec0f334e99 contrib/fsm-to-dot: less false positives on event parsing
Do some more mad hacking to only detect event triggers if event names actually
appear in if() or case: statements. Also combine events in consecutive 'case'
statements.

When will this madness stop?

Change-Id: Iabaaab57f0d1687607eaaa4e09c7c2439fbd7a25
2018-03-26 13:03:20 +00:00
Neels Hofmeyr 536534a62f contrib/fsm-to-dot: mark arrows that feed events
Most arrows draw state transitions, but some want to show that an event is
delivered to a state. Mark those with a "halfopen" arrow head.

Change-Id: Ib07380894a6d513896c9135f175ecbf653a23eec
2018-03-26 13:03:20 +00:00
Neels Hofmeyr 75ee4e8aa9 contrib/fsm-to-dot: add default edge label '-'
When some edges have no label, it is sometimes hard to interpret which label
belongs to which edge. Adding a '-' default label clarifies the edge labeling.

Change-Id: I3a10b615288107e8fc12ffdbbe0099cf51abe94f
2018-03-26 13:03:20 +00:00
Neels Hofmeyr fcf79926e5 contrib/fsm-to-dot: warn and draw unallowed state transitions
Hacked as it is, fsm-to-dot is capable of detecting action functions
transitioning to states that are not allowed according to the FSM definition
struct.

Draw those in red and output a warning.

Found these osmo-bsc gscon errors with this patch:

ERROR: gscon_fsm_active() triggers a transition to ST_WAIT_HO_COMPL, but this is not allowed by the FSM definition
ERROR: gscon_fsm_wait_ho_compl() triggers a transition to ST_WAIT_MDCX_BTS_HO, but this is not allowed by the FSM definition

Related: OS#3109
Change-Id: Ic6319a958b3c7247510c1930bac8b02b95f9dcf2
2018-03-26 13:03:19 +00:00
Neels Hofmeyr bb22df3db9 contrib/fsm-to-dot: don't match on event names in comments
Strip comments from function bodies before matching on event names.

In osmo-bsc's gscon FSM, there often are event names in comments. The naive
parsing of fsm-to-dot.py mistakes these as events causing state transitions,
but the comments are just explaining how states interact.

Makes me reconsider parsing the C with clang instead, but I got away with a
dirty hack once more.

Change-Id: I56d70ae14d363f7ca655dced16d93d795b3f940d
2018-03-26 13:03:19 +00:00
Neels Hofmeyr 46145e80ec contrib/fsm-to-dot: allow transition from and to the same state
In osmo-bsc's new gscon FSM, there is an osmo_fsm_inst_state_chg() from
ST_ACTIVE to ST_ACTIVE. Avoid an exception triggering on this simple fact.

Change-Id: I420c7be84e3af555cc5e8bddbff7261013348375
2018-03-26 13:03:19 +00:00
Neels Hofmeyr 167f808d76 contrib/fsm-to-dot: add -h option to print basic instructions
Change-Id: I196033e44d50ebb73cf9b44cbdc94a2b8b4f98ce
2018-03-26 13:03:19 +00:00
Neels Hofmeyr b10ec0be5f jenkins_amd64.sh: use --enable-werror configure flag, not CFLAGS
Note that the jenkins_arm.sh passes various CFLAGS and potentially overwrites
./configure internal CFLAGS like that. I'm staying out of that for now.

Change-Id: I81b50c39cd6e908c4c95651829b679425de87a28
2018-03-13 00:00:30 +00:00