Commit Graph

54 Commits

Author SHA1 Message Date
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
Oliver Smith a47d37c946 debian, utils: switch to python 3
Make build and external tests work with python3, so we can drop
the python2 dependency.

This should be merged shortly after osmo-python-tests was migrated to
python3, and the jenkins build slaves were (automatically) updated to
have the new osmo-python-tests installed.

Related: OS#2819
Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7
Change-Id: I84ef43f700e125c7a65f92347f12844e07e65655
2019-12-12 09:24:04 +00:00
Pau Espin 3f464fc007 socket: Introduce API osmo_sock_init2_multiaddr()
This API will be used by libosmo-netif's osmo_stream for SCTP sockets,
which in turn will be used by libosmo-sccp to support multi-homed
connections.

Related: OS#3608
Change-Id: Ic8681d9e093216c99c6bca4be81c31ef83688ed1
2019-10-18 09:21:48 +00:00
Pau Espin 922d276035 Bump version: 1.1.0.107-afce-dirty → 1.2.0
Change-Id: I05dd1f2725e05f856f1d27c9201a0005de101b8f
2019-08-06 18:02:02 +02:00
Pau Espin 1fcdd0d1b8 Bump version: 1.0.1.143-cc72c → 1.1.0
Change-Id: I351411ca5913c8b40f23287ec7c9ebfe11bd2bb0
2019-05-07 18:36:51 +02:00
Harald Welte a0c1cba28a Bump version: 0.12.0.128-8dfde → 1.0.0
Change-Id: I1bd973754b1ebc42283f6a07defa60f58523f5a3
2019-01-19 22:07:56 +01:00
Harald Welte 81bfef931a Add new osmo-config-merge utility
This utility allows you to merge an incremental config "patch"
into an osmocom-style config file.

The patch file follows the same syntax as the original config file.

It works by appending the leaf nodes of the patch file to the respective
nodes of the input config file.

This process allows configuration file changes/updates to be performed
in a more stable/reliable way than by means of [unified] diff files,
as they break every time the context lines break.

osmo-config-merge doesn't suffer from this problem, as it understands
the tree-like nature of VTY config files.

NITE: This only works with configuration files that have proper
indenting, i.e. every level in the hierarchy must be indented excatly
one character, not multiple.

Change-Id: I61997a3668cc3a40d12ca023272f6d782e6fbefe
2018-09-25 20:05:02 +02:00
Pau Espin 924ef0bc72 Bump version: 0.11.0.91-9d4a3-dirty → 0.12.0
Change-Id: I7e66432f37e13fd4c31389e3d89593fa0981e58f
2018-07-27 17:31:47 +02:00
Harald Welte 572fc2d344 debian: Add libosmoctrl-doc sub-package
This fixes the debian package builds for libosmocore.git

Change-Id: I454e3c0175ab5a89e8925e036a3644299367df0f
2018-05-28 17:55:51 +02:00
Pau Espin 13154ffabd Bump version: 0.10.2.284-bc47-dirty → 0.11.0
Remark: For libosmogb and libosmogsm, LIBVERSION was
already bumped in c4fce1425e.

Change-Id: Ib4fa53a9bb9954ae48d0a610ba9a81dd8e8b4ef6
2018-05-03 15:47:11 +02:00
Pau Espin 93288d76da debian: libosmoctrl: Use correct library version in pkg name
The number used in debian packaging is actually current-age, which is
still 0 in this case after it was bumped a while ago.

As a result, we had a libosmoctrl1_*.deb package installing a
libosmoctrl.so.0 file.

Fixes: OS#3175

Change-Id: I771f6c68570bc3b2bab68e1165c7284fd43e904d
2018-05-03 15:35:40 +02:00
Neels Hofmeyr c4fce1425e implement support for 3-digit MNC with leading zeros
Enable representing three-digit MNC with leading zeros. The MNCs 23 and 023 are
actually different; so far we treated both as 23. Re-encode an incoming BCD or
string of 023 as it were, i.e. not dropping the leading zero as 23.

Break ABI compatibility by changing the size and ordering of structs
gprs_ra_id, osmo_plmn_id, osmo_cell_global_id, ... by adding an mnc_3_digits
flag.

Change ordering in gprs_ra_id because the canonical oder is {Mobile Country
Code, Mobile Network Code}, so have the mcc member first.

ABI compatibility cannot be maintained for struct gprs_ra_id, since it is a
direct member of structs bssgp_bvc_ctx and bssgp_paging_info, and even just
adding a flag to the end would cause ABI changes of those structs. Similarly,
osmo_plmn_id is a direct member of osmo_location_area_id, and so forth.

Add new API to set and read this additional flag to preserve leading zeros:
- osmo_plmn_to_bcd(), osmo_plmn_from_bcd() after
  gsm48_mcc_mnc_to_bcd() and gsm48_mcc_mnc_from_bcd().
- gsm48_decode_lai2(), gsm48_generate_lai2() after
  gsm48_decode_lai(), gsm48_generate_lai().
- gsm0808_create_layer3_2() after gsm0808_create_layer3() and gsm0808_create_layer3_aoip().
- various osmo_*_name() functions in gsm23003.h (osmo_rai_name() still in
  gsm48.h close to struct gprs_ra_id definition). The amount and duplication of
  these may seem a bit overboard, but IMO they do make sense in this way.
  Though most code will soon see patches unifying the data structures used, in
  some cases (vty, ctrl) they are required singled out. Without these
  functions, the formatting ("%0*u", mnc_3_digits ?  3 : 2, mnc) would be
  duplicated all over our diverse repositories.

In various log output, include the leading MNC zeros.

Mark one TODO in card_fs_sim.c, I am not sure how to communicate a leading zero
to/from a SIM card FS. The focus here is on the core network / BSS.

To indicate ABI incompatibility, bump libosmogsm and libosmogb LIBVERSIONs;
adjust debian files accordingly.

Implementation choices:

- The default behavior upon zero-initialization will be the mnc_3_digits flag
  set to false, which yields exactly the previous behavior.

- I decided against packing the mnc with the mnc_3_digits field into a
  sub-struct because it would immediately break all builds of dependent
  projects: it would require immediate merging of numerous patches in other
  repositories, and it would make compiling older code against a newer
  libosmocore unneccessarily hard.

Change-Id: Id2240f7f518494c9df6c8bda52c0d5092f90f221
2018-02-28 19:26:33 +01:00
Harald Welte 4bfa171e92 debian/control: Fix Vcs-Browser URL
Change-Id: I89bff8fcb8e0b7c0a0e415d4eee1636c21b8f8de
2018-02-09 12:12:03 +01:00
Harald Welte 4e4521b3d5 Revert "Use python 3 for utilities"
This reverts commit 76c6c50405, which broke the obs builds. I'm really starting to get annoyed by ongoing python related breakage without ever fixing any bugs!

Change-Id: I4d76e897d4f746ff9ea4e06f2efc708a12cc2944
2018-02-09 08:49:26 +00:00
Max 76c6c50405 Use python 3 for utilities
There're no python2-specific code in there so we can switch right away
without waiting till 2020 for python 2 deprecation.

Related: OS#2819
Change-Id: I8d34aed124b00c5dd2ab1bcc84bbfa8c620282cc
2018-02-08 09:31:04 +00:00
Harald Welte 858cfecf9d debian: build now depends on libgnutls
In Change-Id Ic77866ce65acf524b768882c751a4f9c0635740b we introduced a
gnutls fall-back for random number generation, and made this a default
unless explicitly disabled at compile time.  This means the debian
package needs related build dependency.

Change-Id: I918e4b7bf1cb621679dce6339b3c4b69d653e2a6
Related: OS#1694
2017-11-03 21:52:01 +01:00
Harald Welte faee5dead6 Tag/Release version 0.10.0
It's been way too long since the last release.  Almost one year and
468 commits.

A brief summary of the changes below:

* Doxygen for libosmo{coding,gb}
* pseudotalloc for embedded builds, jenkins for arm-none-gnueabi
* --disable-doxygen, --disable-ctrl, --disable-simd
* update debian packaging
* gsm0503 coding routines
* osmo_hton[sl]
* statistics.h -> counter.h
* QCDIAG in gsmtap
* llist_{first,last}_entry()
* llist_count()
* LOGPSRC() macro
* msgb_pull_to_l2()
* msgb_printf()
* prbs
* osmo_sock_init2()
* osmo_sock_mcast_{name,loop_set,ttl_set,all_set,subscribe,ip}()
* OSMO_STRINGIFY()
* OSMO_VALUE_STRING()
* OSMO_BYTES_FOR_BITS()
* osmo_talloc_asprintf()
* osmo_sub_auth_type_name()
* osmo_sub_auth_data support for IND/SQN_MS
* osmo_fsm ctrl interface
* ctrl_handle_alloc2()
* ctrl_interface_setup_dynip2()
* OSMO_CTRL_PORT_HLR
* bssgp_tx_bvc_ptp_reset()
* gprs_ns_inst connect/remote_{ip,port}
* osmo_gprs_{ul,dl}_block_size_{bits,bytes}()
* osmo_gprs_{dl,ul}_cs_by_block_bytes()
* gprs_ns_pdu_strings[]
* more BSSGP cause values
* abis_nm_admin_name()
* AoIP support in gsm0808
* gsm_fn_as_gsmtime_str()
* osmo_dump_gsmtime()
* gsup charging support
* ipa_ccm_make_id_resp()
* ipa_ccm_make_id_resp_from_req()
* struct gsm48_gprs_susp_req
* gsm_04_14.h
* rsl measurement preprocessing related IEs
* abis_nm_event_cause_names[]
* abis_nm_sw_desc and friends
* more SYSINFO_TYPE_ values
* osmo_earfcn_bit_size_ext()
* t16lv_put()
* msgb_t16lv_put()
* tlvp_val16be()
* tlvp_val32be()
* osmo_tlvp_copy()
* osmo_tlvp_merge()
* many additional VTY nodes
* cmd_node.name member
* bitvec_set_u64()
* bitvec_rl_curbit
* ctrl_lookup_register()
* osmo_fsm_find_by_name()
* osmo_fsm_inst_find_by_name()
* osmo_fsm_inst_find_by_id()

Change-Id: Ieb5db2e910a90db780ea058b3280f2facbd68d76
2017-10-27 20:18:49 +02:00
Max 98f6482ec7 Make release helper more robust
* check for bumpversion and error out if missing
* drop bumpversion dependency from .deb

Change-Id: Ide04d4c1ba20426bdf9531e25b462eda9418858a
Related: OS#1861
2017-09-15 15:04:20 +00:00
Max ff932bbc38 Add release target to Makefile
Add simple helper target to automate basic release steps:
* version bump
* prepare release commit
* git commit, tag and sign

For library projects:
* update debian/changelog from TODO-RELEASE
* cleanup TODO-RELEASE

For non-library projects:
* update debian/changelog from git log

Note: it requires bumpversion package to be installed, debian/control is
adjusted accordingly. The helper itself is installed to facilitate reuse
by other libraries.

N. B: you still have to manually adjust LIBVERSION in previous commit -
see TODO-RELEASE header for details.

Use it as follows:
make REL=minor release

The REL parameter defines which component of the version [1] to bump and
can be any of { major, minor, patch }.

[1] http://semver.org/

Change-Id: I790ceb958195b9f6cbabfe8c977dc30e2bd7414b
Related: OS#1861
2017-08-08 11:55:03 +00:00
Max 70861e33d2 deb: fix build by adding libosmogb doc package
Change-Id: I3fe45feaee4033c17e25c4c0552d54a81d9b44f5
Fixes: OS#2340
2017-06-27 13:57:56 +02:00
Vadim Yanitskiy 3262f820b5 libosmocoding: migrate transcoding routines from OsmoBTS
There are some projects, such as GR-GSM and OsmocomBB, which would
benefit from using one shared implementation of GSM 05.03 code. So,
this commit introduces a new sub-library called libosmocoding, which
(for now) provides GSM, GPRS and EDGE transcoding routines, migrated
from OsmoBTS.

The original GSM 05.03 code from OsmoBTS was relicensed under
GPLv2-or-later with permission of copyright holders (Andreas Eversberg,
Alexander Chemeris and Tom Tsou).

The following data types are currently supported:

 - xCCH
 - PDTCH (CS 1-4 and MCS 1-9)
 - TCH/FR
 - TCH/HR
 - TCH/AFS
 - RCH/AHS
 - RACH
 - SCH

Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1
2017-03-07 01:06:38 +07:00
Max 126def7105 Integrate Debian packaging changes
debian/control:
* restructure to make it easier to incorporate further changes
* update package descriptions
* move build-depends to a proper place
* update project URL

debian/rules:
* use proper hardening syntax
* strip linker option without explicit shell invocation
* remove useless comment
* add extra cleanup

debian/: package documentation separately

debian/docs: remove empty file

debian/coryright: update to match Debian format

Change-Id: Ia7654d34730e9f269831612bfba70a1338ce29d3
Related: OS#1694
2016-12-22 13:54:32 +00:00
Max 4e72ee0d0f Catch-up with git version tags
* update debian/changelog
* update TODO-RELEASE
* add comments to Makefile.am and TODO-RELEASE to simplify the process
  in future
* add link to libtool docs to Makefile.am to simplify LIBVERSION
  maintenance

Related: OS#1861
Change-Id: I22c257e357f597519120232d742d6a61289db021
2016-12-21 10:31:17 +00:00
Holger Hans Peter Freyther d71257fdb6 debian: Fix packaging by requiring python-minimal
We require the python2 binary to generate code. In Debian this
is provided by python-minimal. Add it to the build-depends to
fix building packages.

Change-Id: Iaa26f4331966d015b193d2ab1e34621b1e319ef1
Reviewed-on: https://gerrit.osmocom.org/37
Tested-by: Jenkins Builder
Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-10 11:43:25 +00:00
Harald Welte 84da22f964 Add code generator for convolutional codes
Add python utility to generate .c code with convolutional
encoder/decoder based on polynomial description of the code. If argument
given it'll be interpreted as intended output directory, otherwise
current working directory is used.

Codes for *CCH, CS2/3 and TCH/AFS are generated. Corresponding manual
implementations are removed from tests. This introduce build-time
dependency on python.

The main work for this patch was generously contributed by Sylvain
Munaut.

Fixes: OS#1629
2016-04-29 13:17:22 +02:00
Holger Hans Peter Freyther 57f253a792 debian: Make sure that libtalloc-dev is installed
This way libosmo-abis, libosmo-sccp, openggsn, openbsc does not
need to install it.
2016-03-05 08:36:26 +01:00
Holger Hans Peter Freyther 62f80fccb8 talloc: Depend on libtalloc-dev being present as well 2015-12-14 20:31:20 +01:00
Harald Welte 84c19a9b36 update debian packaging from libosmocore6 to libosmocore7 2015-12-08 14:17:05 +01:00
Holger Hans Peter Freyther bb4ae64fbb debian: Install libosmoctrl0 too when installing the dev package 2015-11-03 11:36:18 +01:00
Holger Hans Peter Freyther 8649d57f50 misc: Prepare the release of libosmocore 0.9.0
Bump the ABI version of libosmovty and we need to do this
recursively to force rebuilds of our software.
2015-11-03 09:32:32 +01:00
Holger Hans Peter Freyther d452a48ac6 Prepare new upstream release 2015-08-23 17:39:14 +02:00
Holger Hans Peter Freyther c136da587f release: Prepare the 0.8.2 release
I have kind of used 0.8.1 by accident already so let us move
to 0.8.2 now.
2015-08-01 20:20:24 +02:00
Holger Hans Peter Freyther 4dafdefa7a debian: Aim for a higher standards version 2015-03-14 19:30:19 +01:00
Holger Hans Peter Freyther 4d45d40c78 debian: Move to multi-arch support in libosmocore
Enable multi-arch support in libosmocore. This means the package
can not be built on squeeze anymore.

The concept of "foreign" is not really well documented but I
think I use it correctly here.
2015-03-14 19:22:34 +01:00
Holger Hans Peter Freyther 19d00517af debian: Add pcsc build depends and pkg-config for the m4 macro 2015-01-27 11:08:27 +01:00
Holger Hans Peter Freyther 25aeab7a82 Prepare a new libosmocore release 2015-01-18 19:20:42 +01:00
Ciaby 8497b0a786 Fix debian packaging
- Added debian/libosmosim0.install
- Added libosmosim definition in debian/control
2014-11-10 20:28:33 +01:00
Holger Hans Peter Freyther 804590e6d2 debian: Depend on the right version of libosmogsm as well 2014-09-08 07:44:20 +02:00
Holger Hans Peter Freyther 575a5395a6 debian: Depend on libosmocore5 for the legacy package 2014-09-08 07:27:52 +02:00
Ciaby 2cbfb5967c debian: fix build errors with libosmogsm and libosmoctrl
libosmogsm: the transition from 5 to 6 wasn't done properly. Fixed version number.
libosmoctrl: missing definition in debian/control and also missing libosmoctrl0.install.
2014-09-08 07:18:12 +02:00
Harald Welte 336915aa0a prepare for 0.7.0 release 2014-08-21 15:53:20 +02:00
Holger Hans Peter Freyther 0c50b17a26 Release: Prepare the release of 0.6.6 2014-03-31 15:40:46 +02:00
Holger Hans Peter Freyther f41e5e6c5d release: Prepare the 0.6.4 release of libosmocore
New interfaces and ABI incompatible changes in the GB library
2013-10-15 13:22:15 +02:00
Holger Hans Peter Freyther 9a935e27b5 debian: Split libosmocore into various libs and address lintian warnings
Package the various libraries separately. This will allow to install
libosmogsm3 and libosmogsm4 in parallel.

E: libosmocore-dev: non-empty-dependency_libs-in-la-file usr/lib/libosmocore.la
E: libosmocore-dev: non-empty-dependency_libs-in-la-file usr/lib/libosmogb.la
E: libosmocore-dev: non-empty-dependency_libs-in-la-file usr/lib/libosmogsm.la
E: libosmocore-dev: non-empty-dependency_libs-in-la-file usr/lib/libosmovty.la

W: libosmocore-dbg: wrong-bug-number-in-closes l54:#nnnn
W: libosmocore: wrong-bug-number-in-closes l54:#nnnn

W: libosmocore: package-name-doesnt-match-sonames libosmocodec0 libosmocore4 libosmogb2 libosmogsm4 libosmovty0
2013-08-12 15:29:54 +02:00
Holger Hans Peter Freyther a5007dbdc5 debian: Re-enable the debug packages
Remove the .dirs/.install as things will go wrong then. debhelper
will try to install the debug symbols before they were created. Thanks
to Jan for pointing that out.
2013-02-13 20:00:54 +01:00
Holger Hans Peter Freyther b73d191c0b debian: Bump the changelog and package osmo-arfcn 2013-01-04 10:10:52 +01:00
Holger Hans Peter Freyther 9e6789da18 debian: Create a git-buildpackage based 0.5.3 2012-11-06 14:01:54 +01:00
Eric Butler 8dbdc4f3d4 Fix debian package building.
* Removed log file
* Add 'git' add 'libdpkg-perl' to build dependencies
* Disable tests (one of them is failing)
2012-08-26 20:11:24 +02:00
Holger Hans Peter Freyther d9db89d1e7 Revert various debian related changes
The debian related changes were not meant to be comitted and
were local experiments. The changes should go through Jan and
not this way.

Revert "more changes"
This reverts commit 96ba20cb44.

Revert "debian: Updates to fix lintian errors"
This reverts commit b670c86edd.

Revert "debian: Switch to the 3.0(quilt) format to play with launchpad"
This reverts commit 7a91d6071d.

Revert "debian: Add new changelog entry for the shlib:Depends change"
This reverts commit 54b8c4e0ed.

Revert "debian: dpkg-buildpackage complains about this here"
This reverts commit 4284307ead.

Revert "debian: Add a new changelog entry"
This reverts commit ae9b220d16.
2011-07-16 11:11:31 +02:00
Holger Hans Peter Freyther b670c86edd debian: Updates to fix lintian errors 2011-07-13 20:38:59 +02:00