Commit Graph

364 Commits

Author SHA1 Message Date
Pau Espin fc1edb3ea4 build-old-tags-against-master: Ignore some osmo-bts and openbsc versions
Some unit tests in those repositories started failing due to a fix in
libosmocore logging system where extra coloring tags were printed when not
needed.

Unit tests in current master of those repositories are fixed to work with
both old and new versions of libosmocore since they got coloring disabled
in their output, and new patch releases have been done containing the
fix, which means last releases already work with both libosmocore
version. However, older releases are expected to fail when built against
libosmocore master.

Change-Id: I03ca926b903a4dcc9967ab5fe455d715cdb9ed45
2020-09-23 13:33:09 +02:00
Harald Welte 7a7c38e78e old-tags-against-master: Don't build osmo-gsgsn 1.6.0+1.6.1
both tags will not build due to osmo_sockaddr name collisions.

Change-Id: Ifd3c0d30897d4d0286fa129f5c17b495a8f2323b
2020-08-14 11:56:52 +02:00
Harald Welte f95275f0eb osmocom-latest-packages: Remove limesuite-debian10
Since LimeSuite v20.07.x has been released, we don't need a debian10
specific package anymore.

Change-Id: Ibc1337e2500fc37c47a283141fad58a2fb321f05
2020-08-09 13:03:34 +02:00
Harald Welte 1d5d879be0 Revert "nightly-packages: Hard-code LimeSuite to 20.01.0 as 20.07.0 is broken"
This reverts commit e17a4d66d0, i.e.
we are back to building the latest tag, now that v20.07.1 has been
released, which actually builds again.

However, the package name in debian/changelog has not been updated to
reflect that version change, resulting in v20.07.1 being packaged
in a package called v20.07.0.

Change-Id: I01b77f03924a0b303103fb737dfee15b9c4b0c9c
2020-08-05 11:48:25 +02:00
Harald Welte e17a4d66d0 nightly-packages: Hard-code LimeSuite to 20.01.0 as 20.07.0 is broken
See https://github.com/myriadrf/LimeSuite/issues/313

This also reverts the previous commits that removed the work-around for
building LimeSuite on Debian10, as that one is still required for
v20.01.0 (and not for v20.07.0).

Change-Id: Ib70418f0b8a4c6aafa3098b6fa3e240f89112b59
2020-07-30 11:07:12 +02:00
Harald Welte 5fa739dc40 obs-nightly: Remove limesuite-debian10 package altogether
20.07 builds unmodified on debian10

Change-Id: I24f95efe55e3c88c07e3f313a11d706d6947b4ab
2020-07-30 09:30:06 +02:00
Harald Welte e969f7f8a4 latest-packages: build osmo-e1d
Change-Id: Ib74832bff1ce6856ada126c54f5f66c510034af4
2020-07-01 10:50:25 +02:00
Harald Welte ac1769865d nightly-packages: Add osmo-e1d
Change-Id: I71630d9f99e3fe703fc90ce14f3f0c3a82282a0d
2020-06-30 21:58:44 +02:00
Harald Welte cf8711ed9a remove openbsc from nightly and latest builds
The only part that we haven't migrated elsewhere is osmo-bsc_nat,
which is also really unmaintained at this point.  Let's not confuse
people into thinking they should actually use this software anymore.

Change-Id: Icee165422a52bfe04be103a5b7ebb5c8909c0321
2020-06-03 20:50:34 +02:00
Oliver Smith e683e3eb8a scripts: source common.sh before cd
common.sh tries to set OSMO_CI_DIR now; however this does not work when
common.sh was sourced with ". ./common.sh":

	realpath: scripts/..: No such file or directory

Fixes: 7cb8e2d0 ("OBS: add debian10 specific patch for limesuite")
Related: https://jenkins.osmocom.org/jenkins/job/Osmocom-build-tags-against-master/455/console
Change-Id: Ib326eb0fa769528398335c9cf06dc9c9576c882e
2020-05-28 10:14:58 +00:00
Oliver Smith 799d936cc6 OBS: add osmocom-next-packages.sh
Fill the "next" feed with source packages generated from the "next"
branch of each Osmocom project, if it exists, with fallback to the
"master" branch. Implement as wrapper around osmocom-nightly-packages.sh,
so we don't duplicate code and don't need to add more logic to the jenkins
job.

Adjust all osmo_obs_prepare_conflict calls. Add a comment line on top of
each osmocom-*-packages.sh script stating the feed they can be used with.

Related: SYS#4887
Change-Id: I0542b6243bdd29d08381fcc82368dcbd30bf9dce
2020-05-28 10:01:23 +00:00
Oliver Smith 79b63d35a2 OBS: support more than one conflicting package
For the upcoming network:osmocom:next repository, it would be
inconsistent to have the debian package conflict mechanism only support
latest and nightly, even if the next repository is currently not built
for debian.

Change-Id: I2c07313fbbdffe5571e447059b08fe74c853cef0
2020-05-28 10:01:23 +00:00
Oliver Smith 8a65d0efd2 repo-install-test: don't mount /data
The "run-inside-docker.sh" script is running as root (in order to be
able to install packages). Do not mount an outside directory as /data
inside the image anymore, where the script would write temporary data.
This causes problems on jenkins, as the temporary files are written as
root and jenkins is then unable to wipe the workspace.

I had used this for debugging when I wrote the script initially, but
almost the same can be done now with INTERACTIVE=1 and cat on the
temporary files.

Related: OS#4563
Change-Id: If7e1d83580c2951e7e50181ba7e755b987675e4b
2020-05-28 09:53:22 +00:00
Oliver Smith 6b3980d05f repo-install-test: support centos
Related: OS#4563
Depends: I50743c304728444ede8e0d40b8abef9d17c44d8d (docker-playground)
Change-Id: I399360ee6389591180859b52f0ef08883447b90b
2020-05-28 09:53:22 +00:00
Oliver Smith ee7d5314fb repo-install-test: add KEEP_CACHE env var
Keep downloaded binary packages to make test cycles shorter during
development. While at it, also document all environment variables.

Change-Id: I4d6ebaf460e47f29e023acb0bd78ef52ca80c7cd
2020-05-28 09:53:22 +00:00
Oliver Smith 118915fba7 repo-install-test: use sh -ex
Make it consistent with run-inside-docker.sh by also using -e and -x.
This makes development easier.

Change-Id: I733164829bf076fb42df3fde725f3e330f8abecc
2020-05-28 09:53:22 +00:00
Oliver Smith 29d77413c0 repo-install-test: docker: add --tmpfs /run/lock
Make the script work on a debian10 host. I had developed it initially on
debian9, where this was not necessary, and the Jenkins servers are also
running debian9. Fixes:

Failed to mount tmpfs at /run/lock: Permission denied
[!!!!!!] Failed to mount API filesystems, freezing.
Freezing execution.

Change-Id: I5127356031a5dd080473aa650c2beae2a81a697f
2020-05-28 09:53:22 +00:00
Oliver Smith 2774c91438 repo-install-test: integrate
Make the script run from its new location.

Related: OS#4563
Change-Id: Ib6fbc4b9487a84e0c28cd8b0622ddc2d5b1dfe14
2020-05-28 09:53:22 +00:00
Oliver Smith 913a61b1f7 repo-install-test: move from docker-playground
Prepare the repo-install-test to be extended to cover centos8 as well.
Move the scripts to osmo-ci.git first, so we can mount them as shared
files into the docker containers from here.

Move files without any changes. Integration will be done in a follow-up
commit, so we have a clean git log.

debian-repo-install-test/jenkins.sh
	=> scripts/repo-install-test.sh
debian-repo-install-test/testdata/blacklist.txt
	=> scripts/repo-install-test/blacklist.txt
debian-repo-install-test/testdata/repo-install-test.sh
	=> scripts/repo-install-test/run-inside-docker.sh

Related: OS#4563
Related: If93f37e8d46597a9abc67a4529be9addd65780f5 (docker-playground)
Change-Id: Ia678cc15e66630bd6b75b6c89bc75c1e27afd66c
2020-05-28 09:53:22 +00:00
Oliver Smith ec04994c10 Cosmetic: OBS: remove comments for requirements
The list is incomplete, and we have a programmatic check for required
binaries in common-obs.sh now. The next patch will add a new one of
these scripts, so let's clean it up a bit.

Change-Id: Ifab635e0d7a162142a8e80f3223d024888114f3f
2020-05-25 11:47:30 +02:00
Oliver Smith 7cb8e2d05c OBS: add debian10 specific patch for limesuite
Add a patch to replace libwxgtk3.0-dev with libwxgtk3.0-gtk3-dev in
debian/control. Adjust OBS scripts to apply such patches from this
repository if they exist here, and fall back to the project's
repository (osmo-trx, osmo-gsm-manuals patches are there).

Related: OS#4562
Change-Id: I8dfb60e999bf9f61e6cd11983dba033a4c6107ad
2020-05-25 11:47:11 +02:00
Oliver Smith b6965f877c scripts/common-obs.sh: move osmo_obs_checkout_copy
Refactor checkout_copy_debian8_jessie from osmocom-latest-packages.sh
and osmocom-nightly-packages.sh to take the distribution name as
argument and merge both to osmo_obs_checkout_copy in common-obs.sh.

Use debian8 as distribution name instead of debian8-jessie, so the
distribution name matches the suffix of the patch file
(build-for-debian8.patch).

A follow-up commit will apply a debian10 specific patch with this new
function.

Related: OS#4562
Change-Id: I2b69571ebc08a920c9147ce544fa8a2e6d950e65
2020-05-25 11:46:04 +02:00
Oliver Smith eb33aa7f63 OBS: add --noservice to osc ci command
Prevent the following error:

ERROR: please install obs-service-format_spec_file or use the --noservice option
Build step 'Execute shell' marked build as failure

Related: https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_latest/976/console
Change-Id: Ib2fbaace47b3c12462860419f19b01a5b4d192e8
2020-05-22 11:36:58 +02:00
Oliver Smith a36c355462 OBS: check required programs before start
osmocom-*-packages.sh take some time to execute and has quite a few
programs that are not commonly installed. Check the required
dependencies first, so it doesn't abort in the middle of the scripts if
these are missing. I just ran into this with the new meson dependency.

Change-Id: I46cf1aeedd61dbd4fc8fa3f24c60e29033339ead
2020-05-22 11:36:53 +02:00
Oliver Smith 4969d2b116 scripts/osmocom-obs-link.sh: remove sdcc
sdcc does not build for centos 8 without diving deeper into the
dependency hell:

nothing provides gputils,
nothing provides python3-base,
nothing provides inkscape,
nothing provides lyx,
nothing provides makeinfo

So let's not build libusrp for centos 8 for now. We can build osmo-trx
without the usrp1 backend (already configured in the spec.in file).

Related: OS#4550
Change-Id: Icfb289b0eeeb7215d23517fb8a4e56f2a8d774f1
2020-05-20 11:27:39 +02:00
Oliver Smith b38c3e753b scripts/osmocom-obs-link.sh: new file
Related: OS#4550
Change-Id: Ib36682d645d9badad5515476675a947f2aec0baa
2020-05-19 17:02:33 +02:00
Oliver Smith 4f66f30307 OBS: add RPM spec files
Use existing osmocom-*-packages.sh scripts to add RPM spec.in files. Set
the same version, as in the debian .dsc files.

Related: OS#4550
Change-Id: If93b9d95e4c18cf1c29594c0802cbffaea27101c
2020-05-19 16:58:37 +02:00
Harald Welte bede70bee5 disable osmo-uecups latest build; needs new libosmocore release
Change-Id: Ib2f5fcd7e7a5b05a1fef9f3cbac99c6f203e2baa
2020-04-27 09:32:03 +02:00
Harald Welte b5254872aa osmocom-*-packages.sh: fix osmo-uecups
Change-Id: I359fe8f4fb94dc9b4b31e10f5cb9d0d4400a0e2a
2020-04-24 23:41:44 +02:00
Harald Welte fcd7f76107 add osmo-uecups to nightly + latest feeds
Change-Id: Ic7de1b4c6ce47093874fe373cac8a1f7e47ee179
2020-04-20 13:32:00 +02:00
Pau Espin 3e0d3e36c0 ansible: Use osmo-gsm-tester docker image in jenkins job osmo-gsm-tester_virtual
Let's use the osmo-gsm-tester docker image based on the
debian-stretch-jenkins instead of the later directly, since the former
has all osmo-gsm-tester required dependencies.

Change-Id: I256eeed82eef0969d93dc015e043b0417f56f52c
2020-03-12 16:06:05 +01:00
Pau Espin 5855cf91cc update-osmo-ci-slaves: Fail jenkins jobs on script failure
It's been noted that jenkins job update-osmo-ci-on-slaves succeeds even
if make script called by some children function fails:

"""
../make/Makefile:57: recipe for target 'docker-build' failed
make: *** [docker-build] Terminated
make: Leaving directory '/home/osmocom-build/osmo-ci/_docker_playground/debian-stretch-jenkins'
+ exit 1
Finished: SUCCESS
"""

Change-Id: Iab9bc49eebee0f42657ff3ab5ffaa10315446440
2020-03-03 09:22:01 +00:00
Harald Welte 99a7abe42e osmocom-*-packages: Build neocon package
Change-Id: Ie0243bf066d6bc369737b8d659d09e3871cae79d
2020-02-26 14:45:30 +01:00
Harald Welte d52b4ee105 osmocom-latest-packages: Allow non-osmocom git URL in checkout()
Change-Id: I33bbc47598cb2c31cdc4209cd2fe3e6f6dd67e7a
2020-02-26 14:45:30 +01:00
Harald Welte 79df6f2b65 osmocom-nightly-packages: Allow non-osmocom git URL in checkout()
Change-Id: Ib768ff2822df5875820e4f12390004ed18614144
2020-02-26 14:45:30 +01:00
Harald Welte 30ca06a8d4 osmocom-nightly/latest: Build open5gs
This is unfortunately harder than expected.  The problem is the use
of meson external dependencies using 'wrap', specifically for
freeDiameter.

As a debian source package needs to include the entire source, the
dpkg helpers are calling 'meson --wrap-mode=nodownload' at build time.

This in turn requires us to download the freeDiameter after the git
clone of open5gs.  Unfortunately this creates a git checkout in a
sub directory of the open5gs repo, which is not part of the git history.

git-buildpackage hence generates a source tarball *without*
freeDiameter.  I tried very hard in several methods like
* git commit subprojects/freeDiameter
* adding subprojects/freeDiameter as git submodule
unfortuantely none of them helped.

In the end, I resorted to using 'dpkg-buildpackage' instead of
'git-buildpackage' (gbp), which then has other disadvantages,
such as not being able to determine the output directory to which
the .tar.* and .dsc files are written to.

In the end, the solution implemented here is the only one I could
make work.

Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41
2020-02-24 10:52:30 +01:00
Oliver Smith d93fd48da9 OBS: clone from gerrit.osmocom.org
Work around "garbage at end of loose object" errors that occasionally
cause these jenkins jobs to fail.

A few repositories are not hosted on gerrit, so they still get cloned
from git.osmocom.org. However, having almost all repositories cloned from
gerrit should improve the situation a lot.

Related: OS#4083
Change-Id: Id8f08a1bc10d6c81be9ad44c60646e2ea9f6cf4e
2020-01-16 14:42:02 +00:00
Oliver Smith aadc60f403 jobs/gerrit-verifications.yml: add erlang repos
Run contrib/jenkins.sh in erlang repositories, that were recently
updated (osmo_gsup, osmo_dia2gsup, osmo_ss7).

Depends: docker-playground Ia3eaec6090c9652549b2850de74ee21730374bbd
Related: OS#4345
Change-Id: I05d152de6b7a04dee935d79b9987c511351eca95
2020-01-15 10:26:23 +01:00
Oliver Smith b79e06367b docker: move to docker-playground.git
Instead of building "osmocom:deb9_amd64" from this repository, build
"$USER/debian-stretch-jenkins" from docker-playground.git (same
Dockerfile). Adjust all jobs to use the new image name.

Add a new "update-osmo-ci-on-slaves-dp" jenkins job, which triggers
the existing "update-osmo-ci-on-slaves" job whenever
docker-playground.git changes.

Replace docker/rebuild_osmocom_jenkins_image.sh with
scripts/osmo-ci-docker-rebuild.sh, so we can get rid of the docker dir.
I thought about dropping the script completely, and directly writing the
two lines into contrib/jenkins.sh. But I kept the extra script for
convenience, when testing locally.

Related: OS#4345
Depends: docker-playground I125ae8a6bcabbd1f485028c79b0abacda0622c3a
Change-Id: I30a61aebcadef5536e74edd35e1c75ef77a2da9f
2020-01-15 10:24:38 +01:00
Oliver Smith d0418d0f92 docker_images_require: add symlink code path
Make development easier by skipping fetch, checkout and reset --hard if
_docker_playground is a symlink. Document _docker_playground in
README.adoc and explain how to set up the symlink.

Change-Id: If6209ff71488d39e590f5f8506b9d73ad0314846
2020-01-15 10:19:13 +01:00
Harald Welte a47e13ee49 osmo-depcheck: Skip comment lines containing PKG_CHECK_CONFIG
This is a problem e.g. with current osmo-hlr containing
"\t# FIXME: PKG_CHECK_MODULES() may return cached result here!"

Change-Id: I30d539a895bf39aaabe907be9eb52d7e4b3977a7
2019-12-17 14:38:22 +01:00
Harald Welte 8d0605c4fb verify_*.py: Ignore UTF-8 decoding errors
Some of our source files are inherited from other sources, particularly
for microcontroller firmware projects.  We cannot assume they're all
clean UTF-8.  Let's ignore any decoder errors when verifying log
statements and value_string arrays.

Closes: OS#4334
Change-Id: I1e19f4bc6bee46481c6ea743e8334bd4485909be
2019-12-17 13:19:12 +01:00
Harald Welte bcd5a7b927 implement osmo_source_subdir() for simtrace2
Change-Id: I3afad11991d2e8bd72f44bed05f7204653e63133
2019-12-17 02:34:58 +01:00
Oliver Smith a7fcf3218d build-old-tags: remove LD_LIBRARY_PATH
Do not set LD_LIBRARY_PATH during builds, as this causes testsuites to
use the wrong libraries.

This bug appeared with libosmocore, it gets built for master first, and
then an old version like 1.2.0. When using LD_LIBRARY_PATH, the tests
during the 1.2.0 build are executed against the libosmo*.so from
master, which causes a few tests to fail.

Change-Id: I0bfb57e418b91c298337b9426448fbcfd7bf32e6
2019-10-11 11:03:39 +00:00
Oliver Smith df967f76f6 OBS: print date/time before git clone and on error
The OBS job clones a lot of repositories from git.osmocom.org every
night, so it is a good candidate to reproduce the "garbage at end of
loose object" error we are getting sporadically.

Print exact timestamps, so we can check if there is anything related in
the server logs, when this error happens again.

Related: OS#4083
Change-Id: Ic9a6d3f0c2b8dad2661ede793c21307f1680a52e
2019-07-22 13:22:33 +02:00
Harald Welte dcb9edafd4 latest-packages: Enable osmo-remsim as new libosmo-abis is tagged
Change-Id: Id1902f8b79357ac280767edba3698450f67b7c37
2019-07-21 21:35:00 +02:00
Oliver Smith e6aff494a6 common.sh: add docker_images_require
Clone docker-playground.git, source its jenkins-common.sh and run
docker_images_require from there. This will make it possible to run
osmocom-release-tarballs.sh in a docker container, for which the
Dockerfile is stored in docker-playground.git.

Related: OS#3870
Change-Id: Ic4519ccb6978793054869862f8ca0e21d9cf5be4
2019-07-02 13:14:59 +02:00
Oliver Smith 0a389c4083 scripts: add osmocom-release-tarballs.sh
Generate tarball releases for all tags in all repositories.

Related: OS#3870
Change-Id: I0a904c26e1c45aa46ddc59a01b776f2c7c5f947d
2019-07-02 12:59:52 +02:00
Oliver Smith 0aa0ba0c55 osmocom-list-commits: move repo list to common.sh
Prepare for new script, which will use the same list of repositories.

Related: OS#3870
Change-Id: I954b1d5229c44ebcec7e7228f2565a5c6755d16c
2019-07-02 10:24:57 +02:00
Oliver Smith a5d5bedd55 common.sh: osmo_git_last_commits_tags: add "all"
Allow printing all tags instead of only the N most recent ones.

Related: OS#3870
Change-Id: I684c6881915831b33b679e8ae873213beb034ab7
2019-07-01 13:41:40 +02:00
Oliver Smith e26866af0d OBS: make nightly packages conflict with latest
Add conflicting dummy packages osmocom-nightly and osmocom-latest, and
make all packages from each repository depend on the right one.

As usually, the latest packages will only get changed when a new release
appears. So the dependency will get introduced after tagging a new
release. I have tested in an own OBS namespace, that everything works as
expected.

Related: OS#2640
Change-Id: I79c45e798c10a65443b9fb9ecb54393d1918608a
2019-06-17 12:21:32 +02:00
Oliver Smith 83f4f25d7c OBS: build osmo-gsm-manuals-dev in latest
Enable in osmocom-latest-packages.sh. Check it out and create the source
package for the latest release as usually, but also create a second
version for debian 8 with adjusted dependencies (like in nightly [1]).

[1] Change-Id: I3570599ede51b974d350064f44f77e360fafd8b0

Related: OS#3899
Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad
2019-05-29 12:41:11 +02:00
Oliver Smith 9dc7e2ad4b OBS: latest: remove redundant checkout in build()
Don't checkout a specific version in build(), this is already done in
checkout().

Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156
2019-05-29 12:37:39 +02:00
Pau Espin 777a2f8060 nightly-packages: Update LimeSuite to latest tag (v19.0.4)
Change-Id: Id6c27a924e3005ffadc7720190b261f089beada1
2019-05-24 09:35:12 +02:00
Harald Welte acb2fb6078 osmocom-latest-packages: Enable osmo-sysmon
Since libosmocore 1.1.0 and libosmo-netif 0.5.0 are released, we can
address the TODO and build osmo-sysmon also in our latest feed.

Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58
2019-05-11 06:15:24 +00:00
Oliver Smith 72a84b551e nightly-packages: add osmo-gsm-manuals-debian8-jessie
Create a compatible package for debian 8 with adjusted dependencies.
While at it, refactor create_osmo_trx_debian8_jessie() into a generic
checkout_copy_debian8_jessie() function.

Related: OS#3899
Depends: I5b9575ceb1141961e570643a5755a2bd6b6a4254 (osmo-gsm-manuals)
Change-Id: I3570599ede51b974d350064f44f77e360fafd8b0
2019-05-08 11:52:22 +00:00
Pau Espin fb69674156 nightly-packages: Update limesuite hash to support LimeNet-Micro
Newer LimeSuite (at least 7557e291209fc66a78ffa74dd8314e75841f7c96) is
required to have LimeNet-Micro working properly with osmo-trx.
We update to current newest master since other fixes related to sample
rate are applied after the commit mentioned above.

Related: OS#3861
Change-Id: I62779f3bdbc4a459363a1d660d96d5f02f7763c1
2019-04-18 13:01:00 +02:00
Oliver Smith dc5fc51c1f OBS: build osmo-gsm-manuals-dev in nightly
Enable in osmo-nightly-packages.sh, and add as coment in
osmocom-nightly-packages.sh for now (needs a tagged release first).

Related: OS#3899
Depends: I7edb5093e5b58eb3b0f7af2376476db4026db735 (osmo-gsm-manuals.git)
Change-Id: Ideeae4f7846fa5626fe2c1f5a77e07a3c6e626fe
2019-04-15 08:53:47 +02:00
Pau Espin 53f2e1585f nightly-packages: Build latest tag of limesuite
Like we actually do already on latest-packages.

Change-Id: I5a9e97a7a93c1d2a9983926cd0f5d7255e9666bd
2019-04-12 17:53:15 +02:00
Pau Espin bfea6499a3 nightly-packages: Move some code and rename some vars to look similar to latest-packages
Change-Id: I177bb7fb75e293ef665e95363a38c6b4f8e49c13
2019-04-12 17:53:15 +02:00
Pau Espin a5a4c5a867 nightly-packages: Remove unused variable
Change-Id: Ic120dbc134cba9bd77098ab14a5dba3d5c4d71b9
2019-04-11 15:32:59 +02:00
Pau Espin 5f9f7ca8b4 nightly-packages: Remove duplicated check
Change-Id: I9659e71d87b03971673da3bfb2101de9d5fe3c6a
2019-04-11 15:32:50 +02:00
Harald Welte 15ae47aa99 osmocom-nightly-packages: build osmo-remsim
As of Change-Id Id5044b1835190edc948952d207a5196a18669eb1, osmo-remsim
contains Debian packaging information and hence we can build it as part
of our nightly feeds.

We're not yet enabling 'latest' builds as we need to wait for the next
libosmo-abis release for that (requires the IPA keepalive FSM).

Change-Id: Ic367dc95f46cece4bd769061af860fd82b4bd2e9
2019-04-03 12:23:34 +02:00
Oliver Smith ebb42f8bde build-old-tags: build libosmo-legacy-mgcp
Build osmo-mgw 1.4.0 (which provides libosmo-legacy-mgcp) and install
it into a different temp dir. Allows properly building osmo-bsc 1.2.x,
as soon as a new release is tagged, which makes it use
LIBOSMOLEGACYMGCP_CFLAGS and therefore pick up the include path
properly [1].

osmo-mgw 1.4.0's "make check" doesn't pass right now, so add a check
parameter to build_repo() and disable them when building
libosmo-legacy-mgcp. The checks will get executed later, when the
depends are installed and we are building various tags of Osmocom repos,
including osmo-mgw 1.4.0.

While at it, slightly refactor build_repo() to put all arguments into
descriptive variable names (as it is getting a bit longer now).

[1]: Change-Id: Ibd7948f12da710f8ca2b8fde8870f134308eb908

Related: OS#3867
Change-Id: I63d16f8e44c14dee46e2ef3fd050a421017c56b0
2019-04-02 08:03:24 +00:00
Oliver Smith e73ac2aea4 Cosmetic: build-old-tags: osmo-msc: note fixed in
Change-Id: If4d84e3c8c2b8d75136f7440a737956d654f2297
2019-03-30 09:30:47 +00:00
Oliver Smith e9fbc29e5a build-old-tags: known error: osmo-bts-1.0.0
Change-Id: Ifa9953161ad4dbead09675f367baeffe19c788b7
2019-03-28 09:32:14 +00:00
Oliver Smith 15c1f80dcc Add osmocom-build-old-tags-against-master.sh
Build old releases of Osmocom programs and libraries against
"master of the day" to detect breakage.

Redirect each build's output to its own log file, so it is easy to see
what is currently getting build, and what failed. On error, print the
end of the new failing build logs, along with a note to find the full
logs in the jenkins artifacts.

This initial configuration builds the last three release tags of the
Osmocom repositories against master. The configuration can be changed
easily.

Indicate known failures with "err" instead of "ERR" in the output, do
not cause them to fail the build and do not print the beginning of the
error log (it is still in the artifacts). This way, new errors stand out
and don't get overlooked among the known errors.

Related: OS#3765
Change-Id: I7cb45cc40c9930840a3d4e6a86f39e1400478ed3
2019-03-26 15:54:38 +01:00
Oliver Smith e81f90f7e1 osmo-build-dep.sh: run 'make check' when CHECK=1
Prepare for osmocom-build-old-tags-against-master.sh.

Related: OS#3765
Change-Id: I248b53d7a6fe1b64f2a994c568c0466dc93858de
2019-03-26 10:39:13 +01:00
Oliver Smith f8653decf5 osmo-build-dep.sh: cd into subdir before building
Support building the legacy openbsc source with osmo-build.dep.sh. This
will be used by the upcoming osmocom-build-old-tags-against-master.sh
script.

Related: OS#3765
Change-Id: I852e103e80bf295f692cf13c4cb38e80fbc19eca
2019-03-26 10:39:13 +01:00
Oliver Smith 3b3a250f6b osmocom-list-commits.sh: move functions to common.sh
Prepare for the upcoming osmocom-build-old-tags-against-master.sh
script, which will benefit from querying the last n git tags in advance.

Related: OS#3765
Change-Id: I61be4cffb9275cabc1b253f0b298503ad0d3aea4
2019-03-26 10:38:58 +01:00
Oliver Smith bb714ca042 osmocom-list-commits.sh: fix sorting release tags
Properly sort "git ls-remote" output, which looks like:
352f32c9cffef2e5df99cd2f03368dc56c99ee23	refs/tags/0.4.0

Use / as field separator and field no 3, instead of assuming that the
string gets split automatically after the tab character (which it does
not).

Use -V (version sort) instead of numeric sort.

Change-Id: I334e684ac5109fc289b68af78165862148074ea7
2019-03-22 15:57:38 +00:00
Pau Espin b3b2e37246 scripts: Enable osmo-sysmon debian package OBS build
Change-Id: I638c58be1ddf5e7fcf5a51de532ae8c4c06dcdbb
2019-03-22 12:51:14 +00:00
Oliver Smith 391bdf542f Add scripts/osmocom-list-commits.sh
Generate a table of Osmocom CNI repositories and their latest tag,
related commit, and last commit on master.

Related: OS#3840
Change-Id: I91cab0139229e6c1c67e889d33b3d984025bc9da
2019-03-20 11:11:32 +01:00
Harald Welte 2dfb2c6fa1 osmocom-*-packages: clone via https:// not via unencrypted git://
Change-Id: Ibfb52cbac93451ba402edb6b59350620954b0d81
2019-01-26 18:29:01 +01:00
Harald Welte 65353904bc latest-packages: Add libosmo-dsp
Now that libosmo-dsp has a 0.4.0 tag that includes debian packaging
information, we can add it to the latest feed.

Change-Id: Ic082a4ad6b8582dfe44df5bdaafa525e52da7246
2019-01-26 18:29:01 +01:00
Harald Welte 789c5a9c3f nightly packages: Build libosmo-dsp
Change-Id: I989c7961336b4dacbc83e97d1c098f93f56ef6ab
2019-01-17 17:55:10 +01:00
Max 4778fc0323 Add osmo-sysmon to default depcheck config
Change-Id: Ie57d0d55459d492e18b56496c9018a5f8619813a
2018-11-22 14:24:24 +01:00
Harald Welte 499aea7836 osmo-layer1-headers.sh: Check-out NuRAN branches without slashes
this is an ugly workaround for Jenkins not being able to deal with slash
('/') in label names that comprise the axis of a matrix buildjob, while
nuran not using tags but only branch names in their firmware
repositories :(

Change-Id: I1bbfc61f66c5fc490ceca96a8eb21210dd89b629
2018-10-27 13:32:58 +02:00
Harald Welte 6fdb3ef090 osmo-layer1-headers.sh: Add support for OC-2G
Change-Id: Iceb62df4511ed50f0286e5762d9ffc4b068f70a6
2018-10-26 16:07:58 +02:00
Pau Espin 2958d13e2b osmocom-latest-packages.sh: Refactor to support building limesuite
This way the latest script is a lot more similar to the nightly one, and
easier to maintain and expand with new features.

checkout and build steps are split because once we have a new
osmo-trx release, we'll need the create_osmo_trx_debian8_jessie trick to
build it.

In the future we can do further steps to have a common function lib
between latest and nightly scripts.

Change-Id: I786c6f4ad4b4e43d1692c1588d2ad2194d0b25a4
2018-10-05 12:05:10 +02:00
Pau Espin 59f131cc44 osmocom-nightly-packages.sh: Build against newest limesuite release v18.10.0
Change-Id: I4e3a3d3ac4422cbf9c4e8c8bda3d3f7b27be1a14
2018-10-04 17:59:37 +02:00
Oliver Smith 6cced05c01 osmo-depcheck: don't use /tmp, better git code
* 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-25 09:59:05 +00:00
Oliver Smith 85c2effd89 osmo-depcheck: script to verify PKG_CHECK_MODULES
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-20 16:28:00 +02:00
Pau Espin 08b81bf085 osmo-build-dep.sh: Let autotools install systemd services to correct path
Change-Id: I9eba05995fc53b72b04a4a9d63ebd5a236304f7c
2018-09-10 16:06:33 +02:00
Harald Welte 4f30778d08 osmocom-latest-packages: Add simtrace2
Change-Id: I9e6b01f465470f77c58268979d3608afe2005b1c
2018-08-26 10:46:05 +02:00
Harald Welte 4c7321bba3 nightly packages: add simtrace2
Change-Id: Idab162dd11c631d5e72f09b08ed04610e16f05a9
2018-08-26 10:36:04 +02:00
Alexander Couzens c74c64d726 obs-nightly: introduce osmo-trx-debian8-jessie
A compatible package for debian8 as it does not support limesdr.
This patch depend on: I261302d2ed16e76540073589504e7426e23d00a1

Change-Id: I8477b580976b376ee5abdde98a651d47199ef6d9
2018-08-10 00:43:58 +00:00
Harald Welte b67c04b3ec osmocom-latest-packages: Fix libusrp and other non-osmocom builds
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-08 08:29:13 +02:00
Harald Welte 447521ba8b osmocom-nightly-packages: Fix libusrp and other non-osmocom builds
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-06 17:47:21 +02:00
Harald Welte 4e3c888398 osmocom-nightly-packages: Fix build of limesuite
We add a bogus .tarball-version file to make limesuite look like
osmocom projects.

Change-Id: Idbe34df54743d346cf4194d6ea377e886132042d
2018-08-06 14:17:56 +02:00
Harald Welte d8084ff514 osmocom-latest-packages: Add .tar.xz for new packages
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-06 13:31:06 +02:00
Harald Welte aef62b0c77 osmocom packages: Ensure PACKAGE_VERSION is set correctly
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-08-06 12:02:00 +02:00
Neels Hofmeyr e83f8a4737 scripts/verify_log_statements.py: on parse error, print file
If string eval encounters an uncovered parse error, it's useful to know which
file it happened in.

Change-Id: I5fe9a3bbdbfb8a995f24596bf09e70ca5bb3fe8a
2018-07-19 20:13:09 +02:00
Neels Hofmeyr 6475204b4c scripts/verify_log_statements.py: strip OSMO_STRINGIFY()
Change-Id: I439ee65cd65cf42e1005ca71aa7d4b680b18c0e5
2018-07-19 20:11:51 +02:00
Neels Hofmeyr 7ae9791c59 scripts/verify_log_statements.py: figure out line numbers
Change-Id: Ib75c8f5a99ed556d85896b7f8c65fb9446a2fbce
2018-07-19 19:48:26 +02:00
Neels Hofmeyr 16515ddc78 scripts/verify_log_statements.py: fix regex
Would miss those where the fmt string starts on a new line.

Change-Id: If61a36a014a799b94030e5e08a50dfef4207a8a2
2018-07-19 19:47:07 +02:00
Neels Hofmeyr 7eec2dab31 add scripts/verify_log_statements.py
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-16 19:53:29 +02:00
Neels Hofmeyr ec6aa1593f verify_value_string_arrays_are_terminated.py: allow dir args and no args
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-07-05 06:56:49 +00:00
Pau Espin c97b444d1f obs-nightly: build debian pkgs from osmo-python-tests
Change-Id: Id8b4b4d7a1e4328565b06faff2eaccea7efa74e2
2018-06-26 16:13:46 +02:00
Pau Espin fc05401420 obs-nightly: Upgrade to newer required limesuite
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-25 17:07:47 +02:00
Pau Espin 268aba7b3c obs-nightly: list limesuite before osmo-trx
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-25 17:05:40 +02:00
Neels Hofmeyr 4a85bf4584 verify_value_string_arrays_are_terminated.py: allow terminating with '{}'
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-16 13:46:41 +00:00
Harald Welte 9f7affb20e Revert "osmocom-latest-packages: Also accept "v" in front of version tags"
This reverts commit 5b2bb86e8a.

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-04 14:09:21 +02:00
Harald Welte c4f4290f3a osmocom-latest-packages: diable rtl-sdr and osmo-fl2k again
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-03 20:08:30 +02:00
Harald Welte 5b2bb86e8a osmocom-latest-packages: Also accept "v" in front of version tags
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-03 20:05:39 +02:00
Harald Welte 534bb718b6 osmocom latest+nightly packages: Add osmo-fl2k
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-03 16:27:10 +02:00
Harald Welte f2fb8a9e2c osmocom latest+nightly packages: Add rtl-sdr
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-06-03 15:37:06 +02:00
Alexander Couzens f82c367858 osmocom-nightly-packages: replace version string with by git-version-gen
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-05-04 00:31:07 +00:00
Pau Espin bf8ee94485 scripts: osmocom-*-packages.sh: Build libusrp
Depends on: I5ff1d76f533b9ac68ab3f2c70ead6b66f4413b4f

Change-Id: Ic742db854b8a3aba6ddc85ffb41fc6f4697c572d
2018-04-26 19:49:43 +02:00
Alexander Couzens bd20389e49 scripts/docker-cleanup.sh: set permissions to 755
It will otherwise not executed by the cron, because the cron
is checking for the executable bit

Change-Id: Ie9d67b157d62b38b62f5e74406d14344f90d07b8
2018-04-16 16:33:08 +02:00
Harald Welte acdde1617b add docker-cleanup.sh script
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-11 06:07:12 +00:00
Neels Hofmeyr e12ebb99e4 osmo-clean-workspace.sh: make more robust against broken git clones
Change-Id: Ifa70fd75468b3e21b5c9327ea28bc7a4c8cb549d
2018-04-09 14:50:37 +02:00
Neels Hofmeyr 91404470d6 osmo-clean-workspace.sh: cosmetic: no need to clean -e deps
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-09 14:50:37 +02:00
Pau Espin 5cd1529182 scripts: osmo-deps.sh: Allow building against tags
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-04-02 19:35:36 +00:00
Pau Espin 0765327601 osmocom-latest-packages.sh: Catch latest tags outside master branch
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-03-07 14:11:48 +01:00
Alexander Couzens a45a34e9d0 osmo-clean-workspace: fix force checkout of a subdirectory
Instead of the subdirectory, the main repository was
forced checked out.

Change-Id: If23e89872edf48dc5b751b3c069faf585bd6a3ef
2018-02-27 15:55:13 +01:00
Alexander Huemer 69350b67e6 Use stow for dependency management
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
2018-01-12 19:14:01 +00:00
Harald Welte 795c27976e add libgtpnl also to 'latest', not just to 'nightly'
Change-Id: Ifd9b3c6e98d890f135356648ef3f9a62c07dcf94
2017-12-14 14:53:21 +01:00
Alexander Couzens 61038264ed rewrite osmocom-nightly-package based on the old osmocom-nightly-split.sh
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-13 10:19:30 +00:00
Alexander Couzens 6655542cec osmocom-nightly/latest: check if osc is installed
Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41
2017-12-07 22:35:33 +00:00
Alexander Couzens 8bcebb5350 osmocom-nightly/latest: document which debian packages are required
Change-Id: If127d0e852ea8e321461d6aa709621167a0a8ecb
2017-12-06 14:38:41 +00:00
Alexander Couzens 83ccbfe87b osmocom-latest-packages: only publish source tar balls if a new tag was created
OBS should only be updated if there is a new tag.

Change-Id: Ife10c9819e5971b001c5be9d313781eb3fd19e23
2017-11-21 14:36:38 +01:00
Alexander Couzens 1b293e89b2 osmocom-latest-packages: fix shellcheck warnings
Change-Id: I1733658ce9b3de595b6087a58da0cb8c8bcf928f
2017-11-21 14:36:38 +01:00
Alexander Couzens 3eb2c50d28 osmocom-latest-packages: introduce $TOP dir variable
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-21 14:36:38 +01:00
Alexander Couzens d43eda7abb osmocom-latest-packages: set -e: exit on any failure
Change-Id: I8dbf32a731d01b6eba933b8af22500c5edd1502d
2017-11-21 14:36:30 +01:00
Pau Espin adc35d0e69 osmo-deps.sh: Force fetching git tags
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-07 16:40:00 +01:00
Neels Hofmeyr 135f448545 osmo-deps.sh: fix: add 'origin/' to branch, to properly update
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-11-01 13:47:31 +01:00
Harald Welte c758c4e1d4 osmocom-nightly-packages: Build latest libgtpnl
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-30 23:35:54 +01:00
Harald Welte 3c1889e198 Add osmocom-latest-packages.sh script for network:osmocom:latest
Change-Id: I8b036e57d8a5f4e08081c9641bbef50fead0c52a
2017-10-28 23:22:43 +02:00
Neels Hofmeyr 6350953170 osmo-deps.sh: make sure to not clean all deps when inside a dep dir
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-28 04:19:23 +02:00
Neels Hofmeyr f9c1cb2777 scripts: use 'git checkout -f' instead of 'reset --hard'
'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
2017-10-27 22:37:22 +02:00
Neels Hofmeyr 7c5e34cba0 osmo-build-dep: offload branch checkout to osmo-deps.sh
In osmo-deps.sh, add second arg $branch, and also name the first one (i.e.
$project). Use the passed branch or 'origin/master' by default.

In osmo-build-dep.sh, it's not necessary to do a second 'git rev-parse HEAD',
osmo-deps.sh already does it.

Change-Id: I598c41a12352acea6e49a321ad2f665f6ea07a44
2017-10-27 22:37:22 +02:00
Neels Hofmeyr f42a1cfa50 add osmo-clean-workspace.sh, use in osmo-deps.sh
So far, each jenkins job does its own cleanup, more or less well. Also, jenkins
git config offers the 'Clean before checkout' option, which seems to fail when
there are non-writable leftovers from a failed 'make distcheck'.

Furthermore, our jenkins build slaves have unused compiled binaries piling up
by the gigabytes: each matrix build x each parallel build and each compiled
dependency therein builds .o, .a, .so and executables plus installs them to a
local prefix, and just leaves them sitting around to rot until the job runs
again. Instead, we want to clean them out when building is done.

All of this calls for a unified cleanup script that knows how to clean a
workspace properly, to run once before and once after each jenkins build.
Here it is.

Use that function in osmo-deps.sh instead of duplicating cleanup steps.

Change-Id: I2409b2928b4d7ebbd6c005097d4ad7337307dd93
2017-10-27 22:37:22 +02:00
Harald Welte 26f9d8768b osmocom:nightly OBS: add osmo-bsc package / remove nitb-split
This was the last package that we only built in
osmocom:nitb-split:nightly, so we can remove the latter, too

Change-Id: Ib99e0775e9db30ec3c5263bb3a364d8cab4633c3
2017-10-26 20:53:05 +02:00
Harald Welte ff683afa2d osmocom:nightly OBS: Add osmo-msc + osmo-mgw
Change-Id: Ie417f912f11f3a45c6efb39595d6a4d89cf3a058
2017-10-26 18:01:23 +02:00
Harald Welte 27d8069385 osmocom:nightly OBS: remove old osmo-stp/cellmgr-ng package
this package doesn't exist in the OBS anyway, yet we continue to attempt
to upload it there. Stop that :)

Change-Id: I0f0726ed412e4a281dcf99047ca22b494216b4ad
2017-10-26 18:01:05 +02:00
Harald Welte 5b05a88bb3 nightly-pacakges: don't copy over gsm_data_shared.[ch] anymore
This is no longer needed by upstream osmo-bts since Change-Id
I9f004fb5c4c1db29d4792dfd281d388c7063da13

Change-Id: Ie53482a1538d1559e764da86dbbb78031c9c386b
2017-10-10 11:44:56 +08:00
Harald Welte 973dca9917 osmocom:nitb-split:nightly Re-introduce osmo-sgsn + osmo-ggsn
For some strange reason, in commit
8e9fe08080, the osmocom:nitb-split:nightly
package feed was rendered to use old packages for sgsn+ggsn, rather than
current ones by removing the "osc upload" from this script, but still
leaving the packages in OBS at
https://build.opensuse.org/project/show/network:osmocom:nitb-split:nightly

Removing them half (only in osmo-ci but not at OBS) is a bad idea, as
it leaves people with old packages who actually want to use nightly
builds.

Also, removing the packages in general is a very bad idea.  People
are *either* using osmocom:nightly, *or* they are using the
osmocom:nitb-split:nightly feed, but not both. So we cannot remove
any packages from the osmocom:nitb-split:nightly feed until we have
introduced all those packages to osmocom:nightly *and* we have given
people sufficient notice to update!

Change-Id: I5c091127d92a4b4beb7355e16abd9788fa3b9fe5
2017-10-06 10:13:09 +08:00
Harald Welte 418e728fc2 osmocom-nightly-packages.sh: Add libasn1c required by osmo-iuh
Change-Id: Ia455655eaf53faeab6c3049a54c153cb9ddd3d37
2017-10-06 10:03:37 +08:00
Max 707c200607 Add osmo-iuh to nightly .deb builds
It produces libosmo-ranap-dev which is required by osmo-sgsn.

Change-Id: Ief40137cc94e2c54da8c12e2a00953834a578171
2017-10-05 11:23:35 +02:00
Max 1b3bf67bf2 Fix OsmoSGSN nightly build
It depends on libgtp provided by OsmoGGSN so let's build it in that
order.

Change-Id: Icedc259ddc3a3b83ce8fe87f5572596ef29d6814
Related: OS#2527
2017-10-04 12:07:39 +02:00
Max 8e9fe08080 Use new GPRS repositories
* use coverity check on osmo-ggsn instead of openggsn
* move osmo-sgsn and osmo-ggsn from nightly-split into nightly

Change-Id: Ia49969cbfb9ef57b635a3b5759f411f71a54f8e1
2017-10-02 08:37:40 +00:00
André Boddenberg 6c401be095 Gerrit verification jobs as Jenkins Job Builder YAML [1] file.
All jobs are in jobs/ directory and will be automatically verified and
deployed in a follow-up commit.

Note: osmocom-nightly-nitb-split.yml has been moved to jobs/ dir.

[1] https://docs.openstack.org/infra/jenkins-job-builder/

Change-Id: I04387367a6e2d737bfb50423c81a8908d3c2a89f
2017-09-19 16:05:38 +00:00
Harald Welte b258f0cfc8 build both openggsn (old) and osmo-ggsn (new) in nightly feeds
Change-Id: I310c6237ce5ec34e4cc008123a5219d5cadaf7a3
2017-09-06 10:55:52 +02:00
Harald Welte f73c1c50f0 change from openggsn to osmo-ggsn in nightly nitb-split packages
Change-Id: Ie0d6d39ad0451733f6577844737f63028d087d8e
2017-09-06 09:36:42 +02:00
André Boddenberg 6cbb843fa3 Change used protocoll for 'git ls-remote' call from https to git.
Otherwise script depends on availability of https://git.osmocom.org, which is currently down.

Change-Id: Icf2a6b425177ef24aef1dba6e270d36fdc05d214
2017-09-04 20:23:30 +02:00
Neels Hofmeyr 7b58ee9985 debian nightly: don't use pre_release branches, use master
Related: OS#2297
Change-Id: I15e114389095af381978201c1bb3aad2a51fbaaa
2017-09-03 00:54:44 +02:00
Alexander Couzens ff6ea23be5 scripts: add requirements.txt to list jenkins-job-builder
Change-Id: If25ce84593bbf6a393928a8f4e1670f320c48ca4
2017-08-26 05:55:32 +00:00
Alexander Couzens 31f7e2a762 osmocom-nightly-nitb-split.yml: schedule the job to be run at midnight
Change-Id: I0d80e7d260f9092f44d4d80471a4dd67b7acc839
2017-08-26 05:55:32 +00:00
Max 81bde16fb0 Add value string termination check from libosmocore
The script by Neels Hofmeyr <nhofmeyr@sysmocom.de> has actually nothing
to do with libosmocore itself - it's a generic build-time check used by
jenkins so it should be part of this repo to avoid extra checkout of
libosmocore just for this script.

Change-Id: I079218b61f512975ec5bfc7dc23503ec369cbb5a
2017-08-18 18:08:16 +00:00
Alexander Couzens 315944495c add jenkins job builder files for osmocom-nightly-nitb-split.sh
jenkins job builder is a python library to write jenkins jobs in .yml or
.json including templating and basic substition operation.

To update the job call:
Create your own jenkins_jobs.ini based on the exmaple and call
jenkins-jobs --conf ./jenkins_jobs.ini update osmocom-nightly-nitb-split.yml

Change-Id: Ie7c655c6e0e3761e7970e479cadb5ae14faa2c1c
2017-08-15 18:11:29 +02:00
Alexander Couzens a0d34c1b8d create osmocom-nightly-nitb-split.sh based on osmocom-nightly-packages.sh
Create a snapshot of the nitb split and upload it to OBS.

Change-Id: I8bf9fce1547e98c44b62a693ac4aaa4beed1aef9
2017-08-15 17:13:14 +02:00
blobb efcf6881a2 Introduce artifacts holding dependencies to speed up builds.
Basically, osmo-build.sh holds logic to check whether the necessary
artifact is available. If so it fetches artifact, unpacks it and
triggers the actual build. In case the necessary artifact is not
available osmo-build.sh simply builds all dependencies from source
by using osmo-build-dep.sh and archives deps to the ARTIFACT_STORE
afterwards.

The necessary functions to determine the artifact name from remote and
local repositories as well as the handling of artifact files live in
osmo-artifacts.sh, which is sourced by osmo-build.sh.

osmo-build.sh will be sourced by the contrib/jenkins.sh build script
inside each git repository. This automatically triggers the build,
so one need to source at the end of each jenkins.sh script.

See jenkins-openBsc.sh [1] for more details.

Artifacts will be stored as follows:

	$ARTIFACT_STORE/$JOB_NAME/<dep_1>.<branch_1>.<rev_1>_...
		..._<dep_n>.<tag_n>.tar.gz

Furthermore, ARTIFACT_STORE environment variable has to be set on all
jenkins slaves. The JOB_NAME variables is injected to each jenkins job
by jenkins.

[1] https://github.com/blobbsen/diy-artifacts/blob/master/jenkins-openBSC.sh

Change-Id: Ifee0a2f837d23b19aa5326f810234d5452e47484
2017-07-28 14:41:51 +00:00
Max 09b2ec93f1 lc15: correct default master branch
Change-Id: I6e86edc34fdb8c7bc57f87c41e05dd2338dd2506
Related: SYS#3683
2017-06-19 13:09:36 +02:00
Max 1f512a6b25 Add script for fetching BTS-specific L1 headers
Several of the supported BTS models require hw-specific L1 headers for
compilation which are stored in separate repository. Instead of
copy-pasting code which obtains those header for each BTS it's better to
create separate script.

Change-Id: I840533d5bf9233822bc0534a25c252f1cab0a7b0
Related: SYS#3682
2017-06-15 11:34:21 +02:00
Neels Hofmeyr 5977e23db7 osmocom-nightly-packages.sh: add osmo-hlr 2017-03-14 15:28:22 +01:00
Neels Hofmeyr 75ac11a784 osmocom-nightly-packages.sh: chmod a+x 2017-03-14 15:21:10 +01:00
Neels Hofmeyr dccc24b9b3 add script to submit nightly packages
Move the script here from
http://jenkins.osmocom.org/jenkins/job/Osmocom_nightly_packages/
The jenkins job shall call this script instead.

One change: instead of 'rm -rf *', rather check for an empty dir, to not
endanger valuable data a user may have around when invoking this script out of
curiosity.
2017-03-14 15:12:52 +01:00
Neels Hofmeyr a0a2e0ffa7 scripts/osmo-deps.sh: show complete git hash of cloned HEAD revision
Change-Id: I0e1a65d864b075bd1dbfb579d308631f745d6937
2016-12-11 01:02:07 +01:00
Neels Hofmeyr 5044f45935 scripts/osmo-deps.sh: set -ex to log actions and exit on error
Change-Id: Ic61a51bd639e44cbb19ec67a90ab04825e512314
2016-12-11 00:58:00 +01:00
Neels Hofmeyr c4ce20a93e cosmetic: osmo-build-dep.sh: print example on error
I've been asked at least twice what the contents of the expected env
vars should be, so log an example on error.

Change-Id: I635752e6033c57bfce90d8b0732bc402bf3014c8
2016-11-30 02:45:41 +01:00
Neels Hofmeyr 315e5929f5 add osmo-build-dep.sh from openbsc/contrib/jenkins.sh
Change-Id: I73669753a0f5030575d21e90378a1285cfe898de
2016-10-06 22:47:52 +02:00
Neels Hofmeyr 79480b6f81 add cat-testlogs.sh
Change-Id: I2d145cb9ca636ba42194f797b5f4d59437cea131
2016-09-27 01:34:20 +02:00
Holger Hans Peter Freyther 483c54f0ab Initial commit for a CI repository 2016-04-24 11:24:30 +02:00