Commit Graph

229 Commits (f1fab926ed0aa51339d8e168322d0f93624d7764)

Author SHA1 Message Date
Neels Hofmeyr ba0a8280a9 clean up naming: s/SIPCON_REMOTE/PBX_SIP etc
Change-Id: Ie66b32466f80d930150ea940d236cfbbe026fc50
2019-12-04 03:58:17 +01:00
Neels Hofmeyr 7049cc146d add no_dahdi.opts hlr-manual.opts
Change-Id: I9a96f5653b8a2086dabc4fe123987a48eee13612
2019-12-04 03:28:38 +01:00
Oliver Smith 667f19b199 add freeswitch
Change-Id: If948de9e9e7e288b0a031ab973f453cd91a9e99b
2019-12-04 03:16:59 +01:00
Oliver Smith 87dae195e3 copy subdirs
Change-Id: I010336d1ab2bb8abb69f38b3b5630ec9c47c77ed
2019-12-04 02:55:34 +01:00
Neels Hofmeyr 1d6a2b3bc3 fix BTS_MAX_POWER_RED
Change-Id: I921b900c55fb9ac962aa4681478eacaaf0da0467
2019-12-04 02:53:53 +01:00
Oliver Smith 01401bcfe4 support sip (osmo-sip-connector)
Change-Id: I9eed35628f25be37bf0190e5d5797d792c1f0ef9
2019-11-28 12:19:28 +01:00
Oliver Smith e398564bdd ttcn3: run ttcn3 testsuites from osmo-dev
Build testsuite, SUT and dependencies and run everything with one
command. Example usage:

$ ./ttcn3/ msc

So far, it works at least with:
hlr, mgw, msc, pcu, pcu-sns, sgsn

Change-Id: I6b4bf2743adeec1a950d5f090a690182b991cf49
2019-10-18 11:32:51 +02:00
Neels Hofmeyr c65901cf09 sort foreach items numerically, not alphabetically
Make sure that BTS 11 doesn't get sorted between BTS 1 and 2, because osmo-bsc
requires the BTS to be configured in numerical order.

Also makes sense as foreach loop ordering in general.

Change-Id: Ib06052fd71def3d4c869ee9b3dc4d02ba06267af
2019-08-21 04:07:41 +02:00
Neels Hofmeyr fecf156c11 kamailio: fixes and tweaks
This is what I did to get external MNCC with kamailio to work.

(As before, only change MSC_MNCC from "internal" to "external ..." in config_*
to enable use of kamailio as external MNCC.)

Change-Id: I18c991bf914dedeb69cb8a2fcde117633e51a899
2019-08-08 15:43:54 +02:00
Neels Hofmeyr 768303432f osmo-bsc.cfg: remove 'as' config from cs7
It's not needed and causes confusion with routing-keys when more BSCs show up.

Change-Id: I6b3717a29ae832d61710abc58d922c00ae8f4dc0
2019-08-08 15:43:54 +02:00
Neels Hofmeyr 0dc7326b0f drop -M mncc-socket option from osmo-msc cmdline
Since commit [1], the MNCC socket path is configured in the .cfg file. There is
no need to pass the -M option to osmo-msc on the cmdline anymore.

Also, the udtrace example to launch osmo-msc in includes a '| tee' so
that the -M would be passed as option to tee and breaks that example.

[1] cbdd7180a6 / Ie6352c584c0fce57c617387160c285abf40a5f90

Change-Id: Id5c177a7fe98b752881ddd0d98152a2e30380d0e
2019-08-08 15:43:54 +02:00
Neels Hofmeyr 8e4948421c add comment to show how to enable MNCC udtrace
Change-Id: I94fdc87e8adea345ad735449558b75a56953fcc5
2019-08-08 15:20:38 +02:00
Neels Hofmeyr eb446fe27f add
Change-Id: I0cb372bddd115246ad1822dc06d318815387e8a4
2019-08-08 15:13:46 +02:00
Neels Hofmeyr 0ec459258a don't trigger rebuild on
Lately I'm seeing unecessary rebuilds because is newer than the
./configure file. The rule to trigger on *.in files is intended for "manual"
.in files, not those from autoconf/automake. Exclude
2019-07-12 01:22:50 +02:00
Neels Hofmeyr 7f46be3a0d gits: dont ask to push -f to None
Change-Id: I5edf0abff1b01a3d85e4bf2d77c8ab964e0bf2f0
2019-03-29 15:43:04 +01:00
Neels Hofmeyr efa34acc59 gits: also rebase onto origin/master
Change-Id: Icb331d225e8ec1b75d199e40c61c741a44c9a87c
2019-03-15 15:35:38 +01:00
Neels Hofmeyr 94e0aec3f6 gits: tweak "Rebasing" output
Change-Id: I81d57481650c6f94a3816f04d7b93e28bbc7f9c3
2019-03-15 15:35:38 +01:00
Neels Hofmeyr 3cf904ac68 expand ${FOOn} outside of ${foreach} blocks
Change-Id: Icd724218afac86e04d1c1030ff982d9b7c3ab6cb
2019-03-15 15:35:38 +01:00
Oliver Smith 2490f69804 fix $TO_RAN_IP and $TO_RAN_IU_IP usage
Add curly braces around both variables, so they get replaced properly

Change-Id: I1f0f749b74fe5fd3982e045283735151f69c2487
2019-03-13 15:16:16 +01:00
Neels Hofmeyr 44543a98b0 gen_makefile: fix deps: add *.map (for e.g.
Change-Id: I7bc2b5889213a1c635d039d4c6b577f6b4766d7f
2019-03-10 21:08:46 +01:00
Neels Hofmeyr cbdd7180a6 net/: refactor cfg templates
Adopt "foreach" and "common_" features and generally take in the improved
templates as used at 35c3.

If your config file relies on the tmpl_std that is now removed, you can locally
resurrect it with

  git checkout 2c6a55baa7 -- tmpl_std

but it's probably better to make a new copy of config_2g3g and insert your
local config there.

Change-Id: Ie6352c584c0fce57c617387160c285abf40a5f90
2019-03-07 16:28:06 +01:00
Neels Hofmeyr 3ad6817cd1 add manuals.opts, no_doxygen.opts, no_optimization.opts
Change-Id: Ief9e6865eaff587dbd1f1f73f2fecac470e77a81
2019-03-06 16:49:10 +01:00
Oliver Smith 2136f52ddf Add .gitreview
Allows downloading patches quickly with 'git review -d 1308' and other
shortcurts. We also have this in the other Osmocom repositories.

Change-Id: I18712cf0779ec65389736132ad6b40e629c37dc6
2019-03-04 11:09:35 +01:00
Neels Hofmeyr 2c6a55baa7 fix do not clear the entire pkgconfig
Change-Id: Iac0652c4284ee8303596772765e1a5f467a9b1ea
2019-02-12 15:12:56 +01:00
Neels Hofmeyr a61b9223ef drop mgw endpoint-range
Change-Id: Ia662b1a7e1737d6cc522b6b8a5c7d4ebbe419f21
2019-02-12 15:11:41 +01:00
Neels Hofmeyr c3adf3e6f4 readme on osmo-trx and address sanitizer
Change-Id: I6fc9469ddb148651286cde3b0ce70913f99a7a0d
2019-02-12 15:10:08 +01:00
Neels Hofmeyr a4fefee68d gen_makefile: add *.tpl to dependency file list
libosmocore has some *.tpl files to generate source files. Add *.tpl to

Change-Id: Id12fa34e58ef223820528c47e23f9d4bdb2dd3bc
2019-02-12 15:08:30 +01:00
Neels Hofmeyr 6257d9ec79 gen_makefile: fix dependency file list
The configure step naturally depends on and *.in files. However,
the automake process also generates files: exclude those from *.in.

This fixes spurious unnecessary rebuilds: especially when libosmocore had
modifications, it often rebuilt *twice* after this (causing all of the other
source trees to rebuild as well).

Change-Id: Ia6f48ac9a8b300440d23c9b495fb39b5e40b59d8
2019-02-12 15:08:22 +01:00
Oliver Smith 24ddf9c941 more userfriendly "stale configs" message
Make the message easy to understand at first glance, print what needs to
be done to regenerate the configs. Add an empty line before listing the
stale file that has been found, so it stands out from the (at this
point) less relevant path listings. It looks like the following now:

$ ./
using config file '/home/user/code/osmo-dev/net/config_2g3g_osmith'
on templates '/home/user/code/osmo-dev/net/tmpl_std'
with NET_DIR '/home/user/code/osmo-dev/net/osmith'

Stale: '/home/user/code/osmo-dev/net/tmpl_std/' is newer than ''

WARNING: STALE CONFIGS - your net configs are older than the templates they should be based on!
 * Hit enter to continue, and use the stale config files
 * Hit ^C and run 'make regen' to regenerate your configs

Change-Id: If225e094619a07a228e0e2f337153ee18cdb420c
2019-01-30 17:56:22 +01:00
Oliver Smith 0a5dd920ad net/tmpl_std: add Makefile for 'make regen'
Allow using "make regen" in the net dir to regenerate the configs, just
like it is possible to type "make regen" in the make dir.

This is a minor usability improvement, so one does not need to remember
to type ../ in the net dir.

Change-Id: I8b23f8ae1f1d6ade597a30a222dfc82ea890d207
2019-01-30 16:35:59 +01:00
Oliver Smith 8d86dba01f net: enable saving IMEI in HLR by default
Related: OS#2541
Change-Id: I12ab66b5ff2147918e2cb4e9beab8d6a730fdc5a
2019-01-30 16:35:56 +01:00
Oliver Smith 5467ef979a run osmo-hlr with --db-upgrade
Do not stop if the DB needs to be upgraded.

Change-Id: I74dd09698dd508fce047ce086a22a369ad9ee6a4
2018-12-13 13:28:41 +01:00
Neels Hofmeyr e7cb4a591c fill_config: fix multiple command expansions
If there are multiple ${foo()} commands expanded in one iteration, there would
be offset mismatches because the changed string was used with regex offsets
from before the match. Re-run the regex after each change.

Change-Id: I69de60d840ff3ba115c37d1ede7ccbc8879c82eb
2018-11-26 01:20:03 +01:00
Neels Hofmeyr 3c093457d2 fill_config: tweak for_each error message
Change-Id: If2c87e4aabeba91f99a2ec9da2b3d7ac8fa986ba
2018-11-26 01:19:16 +01:00
Neels Hofmeyr ae79f4b349 gits: fix ask_reset_hard_or_push_f(), missing args
Change-Id: I91a1087ce1f6399ff652dfeba0097f275050aba3
2018-11-23 04:09:19 +01:00
Neels Hofmeyr 20d95d003e gits: when asking for reset --hard, also offer push -f
Change-Id: Iab38229ee7deaec91c342fa114028e222e652b60
2018-11-20 16:50:15 +01:00
Neels Hofmeyr dff944bff6 gits: remove code dup: ask_reset_hard()
Change-Id: I741aa6ca29370f26a724f5b4b9c6e7f8ac3f282a
2018-11-20 16:50:15 +01:00
Neels Hofmeyr 68d8f34206 gits: use @{u} to get upstream branch, not origin/%s
git has an internal concept of a branch's upstream branch, and the remote need
not be 'origin', and also, the upstream branch name may differ completely. So,
use git's {u} keyword to obtain the upstream branch name.

This removes all 'origin' strings from gits. Also, git_branch_exists() is no
longer needed, drop it.

Also remove a couple of default arguments which aren't ever used because we
always pass arguments anyway.

In the case of git_ahead_behind(), we would have use for a default
branch_upstream=None to imply calling git_branch_upstream(), but then during
rebase, if no upstream exists, we would invoke it twice to get None a second
time. So just call the function explicitly. I thought about returning an empty
string instead of None, but it's too convoluted.

In git_output(), pipe STDERR to STDOUT, because every time we parse a remote
ref (git ref-parse --abbrev-ref '%s{u}') and there is no remote branch, git
prints 'Fatal: there is no remote bla bla' on stdout, and that error is
expected / ok to happen, so it just clutters the 'gits' output. The easiest way
to achieve silence then is to pipe to STDOUT, IIUC otherwise we'd have to use
Popen() and communicate()... In the case of error, subprocess raises an
exception and we see that an error happens. In the ref-parse case we can simply
catch the exception and be quiet.

Change-Id: Ife146903ae1323a4e568587ccfd4018725e9d719
2018-11-20 16:49:29 +01:00
Oliver Smith d63a44c2ec gitignore: add make/ and net/ (with exceptions)
Ignore all files and folders that get created when following the README
and net/README instructions.

Change-Id: I62277f973cc8f1ee61c5244c9d8cc75775c7cfd9
2018-11-20 01:41:30 +00:00
Oliver Smith afe5c29f02 gitignore: update src/ whitelist
gits has replaced most shell scripts from src. Add gits and missing

Change-Id: I39ed2d4c16bbd31dea7aca95e7f5a04b87b374c2
2018-11-20 01:40:25 +00:00
Neels Hofmeyr 39b19b687c gits: fix git_can_fast_forward: use arg instead of HEAD
Change-Id: Idec9c9b9b7eddea2dc574fe41f73c0ac570630ca
2018-11-19 15:45:20 +00:00
Oliver Smith 2a30b520c4 gits: fix MODS marks by timestamp-only changes
Use 'git diff' instead of 'git diff-index'. The latter does not look at
the content. It listed a file with an updated timestap as modified
(indicated in gits with "MODS"), whereas 'git diff' and 'git status'
did not (and we want this behavior, not marking it as modified).

This was a regression from b93f50 ("gits: use git plumbing commands").

Change-Id: I6726190912a1b3eb865cda77fbea6bf58a635d6e
2018-11-19 12:51:25 +00:00
Neels Hofmeyr 1cbec1915b README: explain no_systemd.opts
Change-Id: I8210ae363514957e49ae82cc4b30af5419f72aaf
2018-11-19 02:56:47 +01:00
Neels Hofmeyr 7aeaf42112 add prefix_usr.opts
Change-Id: I258711d3cfcc310a0dde1a37532c3a8b1ea2f373
2018-11-19 02:54:11 +01:00
Neels Hofmeyr 4f0612251c ignore templates starting with 'common_'
It's useful to include common parts in numerous cfg files, using the
${include(path)} command. So far they were called common_* and stored outside
of the templates dir (e.g. for logging). So far all files in a templates dir
are seen as templates, so the common files had to be stored in a different dir,
which is a bit senseless.

Allow storing them in the same dir with the templates: ignore all files
starting with 'common_'.

Change-Id: I74446dc0a7f51d4f231e8758a691abb675e87483
2018-11-17 00:05:16 +01:00
Neels Hofmeyr 5549ffbde8 add ${foreach(FOO)}
This patch indicates that we should rather use a proper templating python
library instead of re-inventing this stuff. But now that we're here...

Add a construct

   bts ${BTSn}
    location_area_code ${BTSn_LAC}

that repeats for each BTS<nr> variable found, e.g.


would result in three blocks of the above.

I am using this to avoid copy-pasting for configuring N BTSes for 35c3.

Change-Id: Ie1139a017f42cea5bf7ebbbe457bbc3bfe06944c
2018-11-16 18:43:43 +01:00
Neels Hofmeyr 01496a8afe deps: osmo-msc now needs libosmo-gsup-client from osmo-hlr
Change-Id: Ic50819b7bf7b5bcebe39d89850cf8b153fd287d8
2018-11-15 16:06:42 +01:00
Oliver Smith b93f504814 gits: use git plumbing commands
Instead of 'git status' and 'git branch', which change their output
depending on the git version and locale, use the low-level plumbing

'gits status' output is exactly the same, 'gits rebase' output is
a bit less redundant now (that was easier to implement).

Change-Id: I42544313d14db126c99e2d9a02b8f63031944947
2018-11-09 15:22:09 +01:00
Neels Hofmeyr b459b6c2ae replace src/* git scripts with a single src/gits
I keep re-using this functionality in completely unrelated realms, and decided
to unify the oddly named scripts in a single 'gits' meta-repos tool, so I can
just symlink this script into my ~/bin and use it everywhere.

Change-Id: I579e7af26d76d5c5d83b2349695456bc7b54f5a2
2018-11-08 11:37:19 +01:00
Neels Hofmeyr 0cbe590462 sanitize.opts: add osmo-sip-connector --enable-sanitize
Otherwise it is not able to link asan-enabled libosmocore in the binaries.

Change-Id: I5e04ef38982ee6c89110776fc941ee0e2c193196
2018-11-07 16:54:23 +01:00