summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2018-09-21osmo-depcheck: don't use /tmp, better git codeosmith/dependency-checkOliver Smith4-66/+94
* replace --gitdir with --workdir and give it a new folder structure: * git/$repo: downloaded source code * build/$repo: files created during the build process * install/: installation prefix * adjust the jenkins job to use --workdir * fetch --tags when source exists already * readable error message for failed git checkout Change-Id: I06589277b9d54a2af177451cfab2ca1a658b4058 Relates: OS#2642
2018-09-20osmo-depcheck: script to verify PKG_CHECK_MODULESOliver Smith5-0/+518
This script verifies that Osomcom programs really build with the dependency versions they claim to support in configure.ac. In order to do that, it clones the dependency repositories if they don't exist already, and checks out the minimum version tag. This happens recursively for their dependencies as well. See 'osmo-depcheck.py -h' for the full usage instructions. There's also a new jenkins job in jobs/osmocom-depcheck.yml. Change-Id: I8f495dbe030775f66ac125e60ded95c5d7660b65 Relates: OS#2642
2018-09-10osmo-build-dep.sh: Let autotools install systemd services to correct pathPau Espin Pedrol1-1/+1
Change-Id: I9eba05995fc53b72b04a4a9d63ebd5a236304f7c
2018-08-26osmocom-latest-packages: Add simtrace2Harald Welte1-0/+1
Change-Id: I9e6b01f465470f77c58268979d3608afe2005b1c
2018-08-26nightly packages: add simtrace2Harald Welte1-0/+2
Change-Id: Idab162dd11c631d5e72f09b08ed04610e16f05a9
2018-08-10obs-nightly: introduce osmo-trx-debian8-jessieAlexander Couzens1-0/+13
A compatible package for debian8 as it does not support limesdr. This patch depend on: I261302d2ed16e76540073589504e7426e23d00a1 Change-Id: I8477b580976b376ee5abdde98a651d47199ef6d9
2018-08-08osmocom-latest-packages: Fix libusrp and other non-osmocom buildsHarald Welte1-4/+9
We're using the build() function not only to build osmocom projects requiring a .tarball-version file, but also other projects such as libusrp. Let's make the related git-buildpackage arguments conditional to whether or not a .tarball-version file exists at all. Change-Id: I0683cff036a240b1b819f91fbd230d5f9211074c
2018-08-06osmocom-nightly-packages: Fix libusrp and other non-osmocom buildsHarald Welte1-5/+8
We're using the build() function not only to build osmocom projects requiring a .tarball-version file, but also other projects such as libusrp. Let's make the related git-buildpackage arguments conditional to whether or not a .tarball-version file exists at all. Change-Id: I0312a6671e739b803beb583769e4dfc6f44fa091
2018-08-06osmocom-nightly-packages: Fix build of limesuiteHarald Welte1-0/+1
We add a bogus .tarball-version file to make limesuite look like osmocom projects. Change-Id: Idbe34df54743d346cf4194d6ea377e886132042d
2018-08-06osmocom-latest-packages: Add .tar.xz for new packagesHarald Welte1-0/+1
If a new package is uploaded to OBS, prior to this change, only the .dsc file is uploaded, not the actual .tar.xz containing the source code. Let's fix that. Change-Id: Id1c9e6d112781004238a516b24dd446af0beb95a
2018-08-06osmocom packages: Ensure PACKAGE_VERSION is set correctlyHarald Welte2-4/+11
At the "autorecon -fi" stage, Osmocom programs either need the .git directory peresent, or a .tarball-version file in order to determine the exact source code version. Normally, "make dist" exists exactly for this purpose: It runs git-version-gen and saves the result to .tarball-version, and we then include this file in the .tar.gz we generate. However, as the nightly paackaging scripts use git-buildpackage, it bypasses the "make dist" logic and hence we need to 1) manually generate the .tarball-version file 2) copy it over to the directory specified as --git-export-dir This way, the .tarball-version is inside the tar.xz generated by gbp, and autoreconf then has something to use as PACKAGE_VERSION. This commit fixes "UNKNOWN-dirty" in .pc files of libraries, as well as in "show version" commands on the vty. Closes: OS#3449 Change-Id: I76e3713f0b01a6110091ff90e8e53aa79533c374
2018-07-19scripts/verify_log_statements.py: on parse error, print fileNeels Hofmeyr1-53/+56
If string eval encounters an uncovered parse error, it's useful to know which file it happened in. Change-Id: I5fe9a3bbdbfb8a995f24596bf09e70ca5bb3fe8a
2018-07-19scripts/verify_log_statements.py: strip OSMO_STRINGIFY()Neels Hofmeyr1-0/+2
Change-Id: I439ee65cd65cf42e1005ca71aa7d4b680b18c0e5
2018-07-19scripts/verify_log_statements.py: figure out line numbersNeels Hofmeyr1-13/+61
Change-Id: Ib75c8f5a99ed556d85896b7f8c65fb9446a2fbce
2018-07-19scripts/verify_log_statements.py: fix regexNeels Hofmeyr1-2/+2
Would miss those where the fmt string starts on a new line. Change-Id: If61a36a014a799b94030e5e08a50dfef4207a8a2
2018-07-16add scripts/verify_log_statements.pyNeels Hofmeyr1-0/+87
This came up in https://gerrit.osmocom.org/#/c/osmo-bsc/+/9671/6//COMMIT_MSG@36 The errors it finds in the current code base are numerous, and many are intended LOGP .. LOGPC calls. It doesn't make sense to enforce this, but so far this can be used manually. Change-Id: Id79389f090a2fded7ff01dc7e3fe9774e7f22ca0
2018-07-05verify_value_string_arrays_are_terminated.py: allow dir args and no argsNeels Hofmeyr1-2/+18
So far we call with a $(find . -name "*.[hc]") argument list, which might become too long at some point. Rather include dir walking in the script itself and allow passing dir arguments as well. This is backwards compatible, calling with above file args still works. Change-Id: I36456383906b6295c798b82aa131dda21f8efc02
2018-06-26obs-nightly: build debian pkgs from osmo-python-testsPau Espin Pedrol1-0/+2
Change-Id: Id8b4b4d7a1e4328565b06faff2eaccea7efa74e2
2018-06-25obs-nightly: Upgrade to newer required limesuitePau Espin Pedrol1-2/+2
osmo-trx-lms requires limesuite newer than 17.02, as there were a lot of features and bug fixes which osmo-trx relies on. Furthermore, osmo-trx-lms cannot build with that version since it doesn't provide yet a pkgconfig file. We cannot use latest tagged release (18.06) since that version has some build related bugs which have been fixed later on (c1496679cadff2913cacdaa84afe93bbee76d8e4), hence why we are using latest available master instead. Change-Id: If47a3767c7fefbb75923cbfc8eeb921e29393285
2018-06-25obs-nightly: list limesuite before osmo-trxPau Espin Pedrol1-2/+2
Let's move limesuite first since it doesn't depend itself on any osmocom related package, and osmo-trx depends on it. Change-Id: I0cdc85a2d0212432bf0c2586230660d363212dcc
2018-06-16verify_value_string_arrays_are_terminated.py: allow terminating with '{}'Neels Hofmeyr1-1/+1
Writing '{ 0, NULL }' is actually identical to just '{}', and that's what I use these days in all sorts of other contexts. So allow this notation as well in the C code grepper. Change-Id: I0822d2d997dccbfb31316953a7b6024c317d92cf
2018-06-04Revert "osmocom-latest-packages: Also accept "v" in front of version tags"Harald Welte1-1/+1
This reverts commit 5b2bb86e8ada837732f06bb4a77779cdbca73496. While it was intended to enable automatic "latest" builds from rtl-sdr, it breaks builds e.g. of libosmo-abis, where we have both (new) tags without 'v' and old tags with 'v', and now the older 'v' tags win due to lexicographical sorting :( Change-Id: I1c8d2ab18e389a8c2c41082d997f101d72c3acc0
2018-06-03osmocom-latest-packages: diable rtl-sdr and osmo-fl2k againHarald Welte1-2/+3
we cannot yet build "latest" for them, as they don't have any tagged versions yet which include the /debian directory. Change-Id: Ia5708508d918fd71eb05393e39b93859b943d623
2018-06-03osmocom-latest-packages: Also accept "v" in front of version tagsHarald Welte1-1/+1
Some projects (notably rtl-sdr) use "v" in front of their version tags in the git history. Let's make sure we also recognize those. Change-Id: I20f9896cc7844a6ddec7ba63bc9a77f548082e2a
2018-06-03osmocom latest+nightly packages: Add osmo-fl2kHarald Welte2-0/+3
Now that osmo-fl2k has debian packaging information included, we can easily build it as part of the "latest" and "nightly" feeds. Change-Id: Ie2429df14ad51aadb55b4a7d8f6cfcb45c5c6e70
2018-06-03osmocom latest+nightly packages: Add rtl-sdrHarald Welte2-0/+3
Now that rtl-sdr has debian packaging information included, we can easily build it as part of the "latest" and "nightly" feeds. Change-Id: Idc6afb523e71ed977401d707895844bad6247f8b
2018-05-04osmocom-nightly-packages: replace version string with by git-version-genAlexander Couzens1-3/+22
E.g. old version 0.10.2.20180501 (0.10.2 last deb version, 20180501 was the date) The new version will look like 0.10.2.279.178b - 0.10.2 is the last tag - .279 is 279 commits since the tag - 178b is the actual short git rev The direct output of ./git-version-gen couldn't be used because debian forbids using a minus (-) in upstream versions. Change-Id: I2da90ada90adf8ef8f8cfee3d26f86fbd3cec181
2018-04-26scripts: osmocom-*-packages.sh: Build libusrpPau Espin Pedrol2-0/+3
Depends on: I5ff1d76f533b9ac68ab3f2c70ead6b66f4413b4f Change-Id: Ic742db854b8a3aba6ddc85ffb41fc6f4697c572d
2018-04-16scripts/docker-cleanup.sh: set permissions to 755Alexander Couzens1-0/+0
It will otherwise not executed by the cron, because the cron is checking for the executable bit Change-Id: Ie9d67b157d62b38b62f5e74406d14344f90d07b8
2018-04-11add docker-cleanup.sh scriptHarald Welte1-0/+9
This script should be executed regularly on all build slaves that have docker in order to discard unused images/layers. It would be a good idea to call "fstrim /" afterwards in order to get more SSD performance. However, the latter requires root access, and hence cannot be called by the 'osmocom-build' user and thus jenkins. Maybe we should install it as a cron job or systemd periodic timer job? Related: OS#3144 Change-Id: I688b952578507a9cc28fe682221b5c7e3a245519
2018-04-09osmo-clean-workspace.sh: make more robust against broken git clonesNeels Hofmeyr1-4/+25
Change-Id: Ifa70fd75468b3e21b5c9327ea28bc7a4c8cb549d
2018-04-09osmo-clean-workspace.sh: cosmetic: no need to clean -e depsNeels Hofmeyr1-1/+2
git clean always excludes git clone subdirs; furthermore, even if I supply a dir as -e, the contents of that dir still get cleaned out. So it is useless to pass -e on the commandline. Drop it. Change-Id: I2b59cc9c9adf88a2663469b22cfeffbd66b5bf2e
2018-04-02scripts: osmo-deps.sh: Allow building against tagsPau Espin Pedrol1-1/+6
In case we provide a tag, origin/$tag doesn't resolve correctly, we must use $tag. Same happens probably if we want to build against a specific commit hash. Change-Id: Ica50080c8b3e20686fe6f47a2b61718ef4a66d95
2018-03-07osmocom-latest-packages.sh: Catch latest tags outside master branchPau Espin Pedrol1-1/+1
Some projects, like osmo-trx, may have tags created in a non-master branch. Let's catch those too. Tested with several osmocom repositories. The ones showing different behaviour are osmo-trx (expected) and other repositories which have wrong or no tags and are anyway not used since there's no OBS build for them. Old cmdline is left of ==, new is right: artwork: ( == ) asn1c: ( == ) docker-playground: (debian-jessie-buildslave-0.1.0 == ) layer1-api: (superfemto_v3.8.1 == ) libasn1c: (0.9.28 == 0.9.28) libgtpnl: (1.1.0 == 1.1.0) libosmo-abis: (0.4.0 == 0.4.0) libosmocore: (0.10.2 == 0.10.2) libosmo-netif: (0.1.1 == 0.1.1) libosmo-sccp: (0.8.1 == 0.8.1) libsmpp34: (1.12.0 == 1.12.0) meta-telephony: ( == ) mncc-python: ( == ) octphy-2g-headers: (OCTSDR-OPENBSC-02.09.00-B1121 == ) openbsc: (1.0.0 == 1.0.0) osmo-bsc: (1.1.2 == 1.1.2) osmo-bts: (0.7.0 == 0.7.0) osmo-ci: ( == ) osmocom-bb: (osmocon_v0.0.0 == ) osmo-ggsn: (1.1.0 == 1.1.0) osmo-gsm-manuals: ( == v1) osmo-gsm-tester: ( == 0.1) osmo-gsm-tester-conf: ( == ) osmo-gsm-tester-sysmocom: ( == ) osmo-hlr: (0.1.0 == 0.1.0) osmo-iuh: (0.2.0 == 0.2.0) osmo-mgw: (1.2.0 == 1.2.0) osmo-msc: (1.1.2 == 1.1.2) osmo-pcu: (0.4.0 == 0.4.0) osmo-python-tests: ( == ) osmo-sgsn: (1.2.0 == 1.2.0) osmo-sip-connector: (1.1.0 == 1.1.0) osmo-trx: (0.2.0 == 0.3.0) pysim: ( == ) python-smpplib: ( == ) Change-Id: I3b521a194f0ae9fdfa358423e66f30c1316c23e8
2018-02-27osmo-clean-workspace: fix force checkout of a subdirectoryAlexander Couzens1-2/+2
Instead of the subdirectory, the main repository was forced checked out. Change-Id: If23e89872edf48dc5b751b3c069faf585bd6a3ef
2018-01-12Use stow for dependency managementAlexander Huemer1-1/+9
This commit introduces the usage of GNU stow[1] for dependency management. Stow uses symlinks to make dependencies available in a single directory althoguh they were installed in distinct directories. Keeping installation directories seperate has the advantage of letting the build fail if AM_CFLAGS and LDADD do not contain all dependencies which are actually used. Installing multiple dependencies into a single directory causes x_CFLAGS and x_LIBS variables to magically point where other dependencies are found as well, therefore missing entries can be overlooked. Stow acts as a convenience layer here, making it unnecessary to supply a list of locations in LD_LIBRARY_PATH, PKG_CONFIG_PATH and so forth for building when dependencies are installed in distinct directories manually. Stow has to be present on the jenkins build nodes for successful executing of osmo-build-dep.sh. [1] https://www.gnu.org/software/stow/ Change-Id: I8f5012419495a656912b7b71e4f76ce102c6b63a
2017-12-14add libgtpnl also to 'latest', not just to 'nightly'Harald Welte1-0/+1
Change-Id: Ifd9b3c6e98d890f135356648ef3f9a62c07dcf94
2017-12-13rewrite osmocom-nightly-package based on the old osmocom-nightly-split.shAlexander Couzens1-67/+162
The split build script also initilize the repository if it's empty and doesn't need any state of the osc repository. It also downloads bumpversion and limesuite Change-Id: I3b55e14b5b4915a3aae23ee382d65bce4ef82774
2017-12-07osmocom-nightly/latest: check if osc is installedAlexander Couzens2-0/+10
Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41
2017-12-06osmocom-nightly/latest: document which debian packages are requiredAlexander Couzens2-0/+6
Change-Id: If127d0e852ea8e321461d6aa709621167a0a8ecb
2017-11-21osmocom-latest-packages: only publish source tar balls if a new tag was createdAlexander Couzens1-9/+27
OBS should only be updated if there is a new tag. Change-Id: Ife10c9819e5971b001c5be9d313781eb3fd19e23
2017-11-21osmocom-latest-packages: fix shellcheck warningsAlexander Couzens1-13/+13
Change-Id: I1733658ce9b3de595b6087a58da0cb8c8bcf928f
2017-11-21osmocom-latest-packages: introduce $TOP dir variableAlexander Couzens1-6/+8
Using a $TOP variable makes directory paths more clear to understandable. Path now expressed starting from the TOP dir instead of using ../../../foo Change-Id: I7a87532a3232fbcfb5f676588991dbc59a34f739
2017-11-21osmocom-latest-packages: set -e: exit on any failureAlexander Couzens1-1/+1
Change-Id: I8dbf32a731d01b6eba933b8af22500c5edd1502d
2017-11-07osmo-deps.sh: Force fetching git tagsPau Espin Pedrol1-0/+1
It was recently spotted, in a osmo-msc jenkins build, that an updated dependency (new commits to be fetched) contained a new tag which was not fetched with the commit. It resulted in the Makefile generating an old .version file, which ended up generating a library version in the .pc which later in the build make the configure script fail while checking at the dependencies. As far as I could understand after reading several discussion threads, it seems git fetch doesn't necessarily fetch and store locally all new tags found in the remote, and we need to explicitly add the --tags parameter to be sure all of them are downloaded. This patch adds a new fetch line instead of patching the one already present because it seems in old versions of git the --tags parameter had a different behaviour, in which only tags and not branches are fetched. This way is ensured that we get both correct regardless of git version. Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c
2017-11-01osmo-deps.sh: fix: add 'origin/' to branch, to properly updateNeels Hofmeyr1-1/+1
If I have a git clone that once did 'checkout [-f] branch', and if then origin/branch gets updates, doing another 'checkout -f branch' only goes back to the local tracking-branch of origin/branch. We never pull in changes from origin/branch anymore as soon as a local branch exists. Always prepend 'origin/', so that 'checkout -f' goes into detached-HEAD state onto the newest fetched revision. Change-Id: Ia715a100b5beaf7e612c2c64cdad8819aa00c8bd
2017-10-30osmocom-nightly-packages: Build latest libgtpnlHarald Welte1-0/+2
libgtpnl is the userspace library for using kenrel GTP-U support, which is used by openggsn (and will be used by osmo-ggsn). Change-Id: Iad600a36cb658bbd874b4587ec514f49703d6a45
2017-10-28Add osmocom-latest-packages.sh script for network:osmocom:latestHarald Welte1-0/+62
Change-Id: I8b036e57d8a5f4e08081c9641bbef50fead0c52a
2017-10-28osmo-deps.sh: make sure to not clean all deps when inside a dep dirNeels Hofmeyr1-2/+2
Make sure osmo-deps.sh passes no $deps in to osmo-clean-workspace.sh. In most builds, $deps is a relative path, and when within a dir that contains no such subir, calling osmo-clean-workspace.sh has no effect. However, in some, $deps is passed in as absolute path, so when within a deps/... subdir in osmo-deps.sh, the script would still find the abspath and clean out all deps subdirs; for example in osmo-bts. Change-Id: I431d20aedefc708645a1f1862334cffaef20b928
2017-10-27scripts: use 'git checkout -f' instead of 'reset --hard'Neels Hofmeyr2-2/+2
'checkout -f' more accurately does what is intended. 'reset' changes the current branch to some hash, 'checkout -f' force-checkouts another branch. Change-Id: Ic6279ebaf8160bceb3fa2ab40eff0b888ecd5009