Commit Graph

459 Commits

Author SHA1 Message Date
Harald Welte 0334fe327e obs: add 2023q1
Change-Id: Id8fa36ac79a6d83d0384e629ef0b8c4db432cc0e
Related: SYS#6283
2023-01-11 21:50:20 +01:00
Oliver Smith 57a9e54524 obs: put git submodules into source packages
We started using git submodules with osmo-trx. Adjust the obs scripts
to actually make the git submodules part of the source packages.

Note that this didn't fail in jenkins before with the rpm build
verification, as jenkins updates git submodules on its own.

Fix for:
[  165s] Makefile.am:32: error: required directory ./osmocom-bb/src/host/trxcon does not exist

Change-Id: I51b423f3885d6ead5c21a83bdf8ef6051dc34fe3
2022-12-23 15:10:19 +01:00
Oliver Smith 9223287228 repo-install-test: sort centos pkgs from repoquery
Apparently the output of repoquery isn't always sorted, it started
failing on jenkins after moving the test inside qemu. Add an explicit
sort.

Fix for:
  + comm -23 osmocom_packages_all.txt blacklist.txt
  comm: file 1 is not in sorted order

Related: OS#5365
Change-Id: Icb00df102555e06b66b1c2597488b625e3c77f1c
2022-12-09 11:56:03 +01:00
Oliver Smith c551a3c297 repo-install-test: print osmocom_packages_all.txt
While I'm developing this, Jenkins is currently failing here. Make it
easier to debug this by printing the file contents.

Related: OS#5365
Change-Id: Ifbf4ca7f49c1f4441f84695aea0936515e01ffd4
2022-12-09 11:56:03 +01:00
Oliver Smith 9f68d7d370 repo-install-test: update test_binaries
Related: OS#5365
Change-Id: Iaad0260b5872d29b41a97aac3ea5ba0af81c6adb
2022-12-09 11:56:03 +01:00
Oliver Smith 36215cfff2 repo-install-test: fix osmo-trx-usrp1 check
The DISTRO variable is either debian10 or debian11, fix the broken
check. This condition is there in the first place, because we don't
build the usrp1 backend for centos8.

Change-Id: I987f27db257961faf06824df2dcc8f9db1fedccf
Related: OS#5365
2022-12-09 11:56:03 +01:00
Oliver Smith f5bd274018 repo-install-test: update services list
Add services from new projects and enable previously disabled services,
now that this test runs in qemu and services have more permissions like
setting realtime priorities.

Related: OS#5365
Change-Id: Iec7db433cac4c77226e0f1ae2ba502de0d1a8a2b
2022-12-09 11:56:03 +01:00
Oliver Smith ed2d877bc6 repo-install-test: fix check for Release.key
$release_key is not defined, replace it with the path.

Change-Id: I6bd13cc6149db1f2ba25ef1ee343115d3c53cf3b
2022-12-09 10:55:15 +00:00
Oliver Smith aae43b731f repo-install-test: add SKIP_PREPARE_VM env var
Change-Id: I96c7aef70d9d2c6318ce4e43c24450461bc00d91
2022-12-09 10:55:15 +00:00
Oliver Smith 048492d1c8 repo-install-test: run inside qemu + kvm
Change repo-install-test to run inside of qemu instead of docker. This
job needs to run systemd to verify that the systemd services start up
properly. Running systemd inside docker was never officially supported,
it worked with cgroups1 but does not work anymore with cgroups2.

An alternative approach was running inside podman instead of docker
(running systemd inside of podman is officially supported). However we
would have needed various workarounds with podman and wouldn't be able
to test all Osmocom systemd services in the end, due to lack of
permissions (see review of I394918fc61de36acce65ffb33defcb8fc21801c4).

By running with a separate kernel inside qemu we can run all Osmocom
services.

Related: OS#5365
Change-Id: Ie7f1bccb05779cb3614016c0b965b810bbb1471b
2022-12-09 10:55:15 +00:00
Oliver Smith d198fe6b38 Cosmetic: repo-install-test: sort env vars comment
Related: OS#5365
Change-Id: Ic21b46e614c7bfd8e0306599b4d33a1b963db376
2022-12-09 10:55:15 +00:00
Oliver Smith 21a641d6c2 scripts/docker-cleanup: remove fallback code
Remove the fallback clean up code, as it also may lead to images getting
removed right before we need to use them. Besides that, it should be
dead code by now since docuum should be running on all our jenkins nodes
to clean up old images based on last use date.

Change-Id: I9ca0c2ba245bdd75d9fb8eaf341055e8c2ab1b55
2022-12-09 10:40:58 +01:00
Oliver Smith a7df704d4d scripts/docker-cleanup: fix timing problems
Don't delete images while they are being used, to fix these errors we
see from time to time in the middle of "docker build" on jenkins:
unknown parent image ID sha256:1b072e35048cd8b680eddabdc641ac678edb1184d222d5e7b3fbe0b3c333129a

This happens because "docker build" creates so-called dangling images
for each step processed of a Dockerfile. The "docker system prune" call
deletes these dangling images (among other things).

Remove the "docker system prune" call. We already have the docuum daemon
to deal with unused images (dangling and not dangling), it removes them
based on last use date so that the used space is always below a
configured limit. As it deletes images that haven't been used the
longest when it reaches the limit, it will not result in the problem
explained above.

Besides images, "docker system prune" also removes unused containers
(instances of images created with 'docker run' without --rm) and
networks. Add "docker container prune" and "docker network prune"
commands to remove them from now on.

Also remove the redundant container removal logic (previous it was
redundant with "docker system prune", now redundant with "docker
container prune").

Related: https://docs.docker.com/config/pruning/
Change-Id: Ia1b466eea43dd135373949e8e3e6b005c169ea0c
2022-12-09 10:40:33 +01:00
Oliver Smith 4fe56c0968 obs: build_deb/rpm: show contents after build
After building packages with the OBS scripts, show their contents. This
allows easy checking if config files were correctly packaged etc. By
adding it here, it will also show up at the end of the related jenkins
jobs for gerrit verifications.

Related: OS#5817
Change-Id: Ie30b07f35f7e41990fa352523427d86458291d4d
2022-12-08 15:42:59 +01:00
Oliver Smith ce5875fd07 jobs/osmo-gsm-tester virtual: fix docker img
Build the docker image right before using it, instead of building it in
another jenkins job update-osmo-ci-on-slaves via
osmo-ci-docker-rebuild.sh.

The logic in osmo-ci-docker-rebuild.sh was broken. I didn't realize at
the time that this image is only used for the virtual osmo-gsm-tester,
not the physical ones. But only the machines running the physical
osmo-gsm-tester have the /var/tmp/osmo-gsm-tester/state path. The
virtual osmo-gsm-tester isn't running on these machines but on generic
jenkins nodes.

Building the image right before using it makes sense for this job, as it
is the only user of the image. If it was already built from the same
Dockerfile, a cached version is used.

Fix for:
  Unable to find image 'osmocom-build/osmo-gsm-tester:latest' locally

Fixes: 9139e76b ("osmo-ci-docker-rebuild: don't always build osmo-gsm-tester")
Change-Id: Icad9459de1d3a3a4e65ecacf7f903433bb504cc9
2022-12-01 15:04:38 +01:00
Oliver Smith 521b83ba3a scripts/osmocom-build-old…: skip openbsc 1.4.{0,1}
Don't attempt to build openbsc 1.4.0 and 1.4.1 in the
osmocom-build-old-tags-against-master job, as it fails to build with a
modern gcc with a potential null pointer dereference warning that gets
treated as error. This was fixed in 1.4.2 with openbsc patch
I93d816a20ba208e9fd32a1fc172a78ccd326e1ba.

A more modern gcc gets used, as this job gets changed to not only run on
jenkins nodes with debian 9 installed, but also more modern versions.
This job does not run in docker, and since it still passes it doesn't
seem worth changing that now.

Related: OS#5793
Change-Id: Ibf4b66195fbd70a68d63929b156a9aac54a699bc
2022-11-30 17:46:43 +01:00
Oliver Smith 1263d6e0b9 obs/srcpkg: open5gs: download all subprojects
With recent changes in open5gs, building the source packages we
generated fails:
[   45s] ../lib/metrics/meson.build:52:4: ERROR: Automatic wrap-based subproject downloading is disabled
[   45s] dh_auto_configure: error: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 meson .. --wrap-mode=nodownload --buildtype=plain --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=lib/x86_64-linux-gnu --libexecdir=lib/x86_64-linux-gnu returned exit code 1

Fix this by downloading all subprojects. This is now possible as I added
a meson.build file to the prometheus-client-c repository that open5gs
uses: https://github.com/open5gs/prometheus-client-c/pull/2

Change-Id: If3910b520382b177a77b216c93771ea88414723d
2022-11-21 16:48:35 +01:00
Oliver Smith f560ce08ab jenkins-gerrit: fix ambiguous use of review api
Fix an error when the same Change-Id is used on multiple branches or in
theory projects. This is actually allowed by gerrit, and we use this
e.g. when backporting patches from master.

Use the project, change number (e.g. 30147) and patchset number (e.g. 2)
instead of the Change-Id.

Fix for:
  + ssh -p 29418 -l jenkins gerrit.osmocom.org gerrit review 4835a62cd88f0d69db76fb3bfd2df02176a91a6d --json
  fatal: "4835a62cd88f0d69db76fb3bfd2df02176a91a6d" matches multiple patch sets

Related: https://gerrit-review.googlesource.com/Documentation/cmd-review.html
Change-Id: I2d627f8f3b400fa57a50a228d47df2194f60fd08
2022-11-15 11:38:08 +00:00
Oliver Smith e4a33ebda2 jenkins-gerrit: display JOB_TYPE infront of url
In the summary comment posted by jenkins to the patch on gerrit, display
the JOB_TYPE infront of the URL instead of "build", if the build job is
a matrix job that uses JOB_TYPE as variable.

For such jobs, it changes:
  [build] https://jenkins.osmocom.org/…
  [build] https://jenkins.osmocom.org/…
  [build] https://jenkins.osmocom.org/…
  [build] https://jenkins.osmocom.org/…
  [lint] https://jenkins.osmocom.org/…
to:
  [manuals] https://jenkins.osmocom.org/…
  [gateware] https://jenkins.osmocom.org/…
  [firmware] https://jenkins.osmocom.org/…
  [software] https://jenkins.osmocom.org/…
  [lint] https://jenkins.osmocom.org/…

JOB_TYPE is used by osmo-e1-hardware and pysim.

Change-Id: I51f49e4799961776dbddaedd76c14ed37a0e6c84
2022-11-07 08:16:23 +00:00
Oliver Smith 288fa2d51e obs: check_builders: at least 10, fail on error
The number of builders connected to the OBS server seems to fluctuate a
bit (used to be 14, then 17 now 16). Make sure that we have at least 10
builders connected. Fix that the test didn't exit with 1 on error.

Related: https://obs.osmocom.org/monitor
Change-Id: Iedd506601a5450550e21bf701309b4ea79a3d897
2022-11-04 15:08:00 +00:00
Oliver Smith 8d7596a311 obs: build_binpkg: add --run-shell-on-error arg
Allow easy inspection of the build dir inside docker on error.

Related: OS#5737
Change-Id: I218c3189d36d24c64cbd7b9eab379aff8ce2bee2
2022-11-03 13:01:43 +01:00
Oliver Smith 13b76cced1 obs: fix building rpms with man pages
Add the "%ext_man .gz" macro from OBS, so building rpms with man pages
does not fail with errors like:
  File not found: /home/user/rpmbuild/BUILDROOT/osmo-ggsn-1.9.0.3.0d3b-0.x86_64/usr/share/man/man8/osmo-ggsn.8

Fixes: OS#5737
Change-Id: Ib6950fb46e9f94aabae98021b215f69838557045
2022-11-03 12:22:45 +01:00
Oliver Smith c4df55dcfd jenkins-gerrit: send mail for V+1 for some users
Add a list of users that do not only get a notification mail when the
gerrit verification failed, but also on success.

Change-Id: I603b8a911c8f17aa726d9e3d5d644ad3262b42dd
2022-10-27 16:43:14 +02:00
Oliver Smith f52c26a695 jobs: add osmocom-obs-check-builders
Add a job that checks if the amount of connected builders to the OBS
server matches what we expect. This should prevent what we had today,
that it only was noticed by chance several days after all builders
failed to connect and the packages were outdated since then.

I'm not sure if there is a proper api to do this check, but I don't
expect the string we check for to change often so this should work fine.

Change-Id: I6e7c1f206551722d6bfe1631b9c1da8d34d85ba8
2022-10-26 08:35:05 +00:00
Oliver Smith 1cd0685b55 jenkins-gerrit: add note for build fails/pkgs pass
One might be wondering what happened if the build job failed, but
building the binary packages succeeded. Since we run 'make check' in
all cases. Add this short explanation:

  The build job(s) failed, but deb/rpm jobs passed.
  We don't enable external/vty tests when building
  packages, so maybe those failed. Check the logs.

Related: OS#2385
Change-Id: I70027ec970a220c3ddfa766302faec7bd8752118
2022-10-21 08:34:15 +00:00
Oliver Smith 5be9a7442b obs: fix master rpm repository description
Instead of having the description of the nightly repository (copy paste
error), put in "osmocom:master". This gets printed a few times in the
log of the gerrit-binpkgs-rpm jenkins job and may lead to confusion -
the nightly repository is not used, it's a separate master repository.

Related: OS#2385
Change-Id: Ia5a88b064da66d7bf5cebe910961f752262b1bac
2022-10-19 10:46:11 +02:00
Oliver Smith 84866a7d8e jenkins-gerrit: add link to retrigger the build
It's useful to be able to retrigger the pipeline, for example if the
build failed because a depending patch was not merged yet and later it
is merged. Add the link where the "Retrigger" button is to make this
convenient.

Related: OS#2385
Change-Id: I647efac9e79d755282b78f14bd27244c99ef7f11
2022-10-14 16:35:14 +02:00
Oliver Smith 5354547dff jenkins-gerrit: tweak notify setting
Instead of notifying everybody listed as reviewers and in CC:
* notify the owner if the build failed
* notify nobody if the build was successful

Related: OS#2385
Change-Id: I7c6c183b98624eb75d5dccd9766ee3ff5568b06e
2022-10-12 12:22:44 +02:00
Oliver Smith 348751bc05 jenkins-gerrit: add 0-9 to re_start_build
Let it match "Starting building: gerrit-osmo-ttcn3-hacks-build #5". It
failed on the 3 in ttcn3 before.

Related: OS#2385
Change-Id: I247af55e2c0e3a2dd088ab1c951d8535cfc93229
2022-10-12 11:07:42 +02:00
Oliver Smith a02b53fe4f jenkins-gerrit: meaningful re_start_build error
Related: OS#2385
Change-Id: Ib29b7ce69a27453b460f946ad67bd12faffc2c89
2022-10-12 11:07:09 +02:00
Oliver Smith 9c2e2575a9 obs: support Osmocom projects without prefix
Allow running build_srcpkg.py with "osmo_dia2gsup" instead of
"erlang/osmo_dia2gsup", because that's how it gets passed along from
jobs/gerrit-verifications.yml for the binary package build
verifications.

Related: OS#2385
Change-Id: I09304b219e7002495bd3fcce61bc68c34d5ffcd8
2022-10-11 12:07:40 +02:00
Oliver Smith 4e679c8f2e jobs/gerrit-verifications: write summary comment
Instead of having multiple mails from jenkins per submitted gerrit
patch, only have one at the end of the pipeline that writes a summary
with all relevant links and votes +1/-1 for verified.

This also resolves the problem we had for a long time, that the link for
the build job didn't directly point to the relevant console output.
Instead it pointed to a matrix job that didn't have a direct link to the
relevant job.

The summary looks like this:

1 failed:
  [build] https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-bsc-nat-build/a1=default,a2=default,a3=default,a4=default,label=osmocom-gerrit-debian9/11/consoleFull

3 passed:
  [rpm] https://jenkins.osmocom.org/jenkins/job/gerrit-binpkgs-rpm/5/consoleFull
  [deb] https://jenkins.osmocom.org/jenkins/job/gerrit-binpkgs-deb/5/consoleFull
  [lint] https://jenkins.osmocom.org/jenkins/job/gerrit-lint/11/consoleFull

Build Failed

Related: OS#2385
Change-Id: Idcab969e1b5ca4e0f1383bee8f36f2d1aac4f624
2022-10-11 12:07:40 +02:00
Oliver Smith d0ef24c3c6 obs: config: update note about testing packages
Related: OS#2385
Change-Id: If6d772052ca64ef93536bf8729a72271f67fbecb
2022-10-11 12:07:40 +02:00
Oliver Smith 38109f8429 obs/README: add overview with build_binpkg.py
Related: OS#2385
Change-Id: I1b741ad325e6541e6d59dfd50de66bee805e56fe
2022-10-11 12:07:40 +02:00
Oliver Smith 7614916a72 obs: build_binpkg: use almalinux:8 naming
Instead of using "--docker centos:8" as argument and translating it
later on in the code to use "almalinux:8" as base distribution, use
"--docker almalinux:8" as argument. It was brought up in code review
that this makes it less confusing.

Related: OS#2385
Change-Id: Id8298e8bafe065010f7bc00f1ff261aa6431ed4c
2022-10-11 12:07:40 +02:00
Oliver Smith c449c5de8d obs: build_binpkg: optimize osmo-gsm-manuals-dev
Installing osmo-gsm-manuals-dev plus depends takes a long time. Don't do
this for every build, instead do it once when building a second docker
container and then use that.

Related: OS#2385
Change-Id: I8475bd954352b572197795ad4cd9461e39896d48
2022-10-06 09:45:02 +02:00
Oliver Smith 6298cbbe0f obs: build_binpkg: debian: don't install manpages
Configure dpkg to not extract man pages. Otherwise it will spend some
time regenerating the man page index whenever installing build
dependencies before starting to build a package.

Related: OS#2385
Change-Id: I1c9e3883b976e023c96dfd59eb147770f7ad99a7
2022-10-06 09:45:02 +02:00
Oliver Smith 449dae8c13 obs: add build_binpkg.py
Add a script to build deb/rpm packages, as it would be done on
obs.osmocom.org. This will be used by jenkins to verify deb and rpm
builds for each submitted gerrit patch.

I have attempted to use 'osc build' instead of directly calling
apt-get build-dep and dpkg-buildpackage (and rpm equivalents). Using
'osc build' would have the advantage that the build works as close to
the OBS build as possible. However it would try to install dependencies
with sudo, so we would need to have sudo available in the docker
container that builds the untrusted code from gerrit. Let's not do that.

Related: OS#2385
Change-Id: I4c6b5d61af35df98cbc70d9ddc8ad36d38a9ce18
2022-10-06 09:45:02 +02:00
Oliver Smith d423d17e07 obs: lib.docker: fix redundant get_image_name()
Related: OS#2385
Change-Id: Ifa4e316db63c1a3bb9e0d845e7f755d04cf1297e
2022-10-06 09:45:02 +02:00
Oliver Smith 1816b47606 obs: run_in_docker_and_exit: no os.path.basename
Don't use os.path.basename on the script_path parameter passed to the
function. A future patch will pass a script that is inside the data
subdirectory to this function, therefore this is needed.

Related: OS#2385
Change-Id: Ide78d976f9af445c4c8d8748bc274d7289064769
2022-10-06 07:44:31 +00:00
Oliver Smith b88200546a obs: prepare for multiple dockerfiles
Rename Dockerfile to build_srcpkg.Dockerfile and adjust related code to
allow using a different Dockerfile for building the binary packages in a
future patch.

Related: OS#2385
Change-Id: I8ef7944a4a81acd6c915998f37139eebad2b2d3e
2022-10-06 07:44:31 +00:00
Oliver Smith 10bd88ab54 obs: run_in_docker_and_exit: remove args param
No need to pass args here. It was only used for args.verbose, and that
isn't necessary since we don't need to restore the verbose mode.

Related: OS#2385
Change-Id: I620cdef46e18f4c66644f14003caf2183c89686f
2022-10-06 07:44:31 +00:00
Oliver Smith 9ffc482315 obs: run_in_docker_and_exit: --rm on extra line
Put it on an extra line like the other arguments to prevent it from
getting overlooked.

Related: OS#2385
Change-Id: Ie7dea2734e7c47766dfe64b7091bc4f5f72d53a5
2022-10-06 07:44:31 +00:00
Oliver Smith b5d65e6dae jobs/osmocom-obs: add job for master feed
Add one new job for building source packages and sending them to
obs.osmocom.org. Trigger it from all master-* jobs.

I've also considered adding one job per existing master job that would
only update one package at a time (master-libosmocore-obs,
master-osmo-bsc-obs, ...). With some additional development effort it
should be possible, and it would make each individual master OBS job
faster. But given that with the current implementation it only takes
20s to 30s for *all* packages if there are no changes, as it compares
git remote HEAD with the version currently on OBS before starting to
clone repositories and building the source packages (similar to
Osmocom_OBS_latest_obs.osmocom.org), it didn't seem worth optimizing.

Set concurrent to false as the triggers from master-builds will likely
cause it to run multiple times in parallel otherwise.

Related: https://jenkins.osmocom.org/jenkins/view/OBS/job/Osmocom_OBS_master_obs.osmocom.org/
Related: https://obs.osmocom.org/project/show/osmocom:master
Related: OS#2385
Change-Id: I53a494f13f81ae837f2d362c54e1bdf13f121db3
2022-10-06 07:44:31 +00:00
Oliver Smith 3a6250a9fb obs: update_obs_project: add master feed
Add a new master feed, where packages are updated as soon as patches get
merged to master. Upload a commit_$COMMIT.txt file for each package in
this feed and use it to determine if the package needs to be updated or
not.

In most packages the commit is already part of the version in the dsc
file, e.g. "libosmocore_1.7.0.38.c3b90.dsc", but that's harder to parse
and is more likely to have a hash collision (just 5 characters).

Related: OS#2385
Change-Id: I3b0b4f4876b8c1eeb61f20d903a6f2cac6e99638
2022-10-06 07:44:31 +00:00
Oliver Smith a91667d04c obs: build_srcpkg_if_needed: switch if branches
Make it slightly easier to read, before extending the latest branch with
master too in a follow-up patch.

Related: OS#2385
Change-Id: I4f1d4e250eb4d8163f1ded29106a44deb0d0feff
2022-10-06 07:44:31 +00:00
Oliver Smith ba8df68397 obs: lib.git.get_default_branch: add function
Refactor checkout_default_branch so the get_default_branch logic can be
used from another function in a future patch.

Related: OS#2385
Change-Id: If3f0ab500ff165d81f61b19ad41af90bd39dce8f
2022-10-06 07:44:31 +00:00
Vadim Yanitskiy 4bb6385a22 scripts: osmo_git_clone_url(): properly handle 'satellite/osmo-gmr'
Coverity job currently fails because it fails to fetch osmo-gmr.git.

Change-Id: I4d52dbf0f81332dc1856944a6a3c7376cb1e0638
Fixes: I17590d0b0b46274e2ceb007e20d7d1dc039f4e8d
2022-10-01 17:42:55 +07:00
Oliver Smith 7fc58133d6 Replace most remaining git.osmocom.org urls
Replace the legacy git.osmocom.org clone URLs with either gerrit or
gitea in most places. Besides not using legacy urls anymore, the
advantage of using gerrit directly is that we don't have a delay of 10
min to several hours on the repository.

Not replaced:
* ansible/roles/osmocom-workstation: not sure if still used, would need
  a bit of a rewrite to use logic similar to osmo_git_clone_url().

Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Git_infrastructure
Change-Id: I90409c9e7f4db4e1765647021625f9acfccaa78b
2022-09-26 15:07:59 +02:00
Oliver Smith a5521ff99e scripts/common: remove osmo_git_clone_date
This had been added for debugging purposes and isn't used anymore. Also
one less hit for git grep git.osmocom.org.

Change-Id: I10cbb598f0d5d675034ca87568a8b6f1920f2ad3
2022-09-26 14:54:01 +02:00
Oliver Smith 3d1bbda3bc osmo_git_clone_url: git.osmocom.org -> gitea
Update the function to not use legacy URLs anymore and allow adding
future gitea URLs more easily. Update the description of the function to
reflect the new motivation for using this.

Change-Id: Ibf53ca2c444fae82af73e417410faa5b16f5de59
2022-09-26 14:41:19 +02:00
Oliver Smith ad447c5379 Revert "scripts/obs: make shallow git clones"
I didn't realize during code review that the git-version-gen script we
use in Osmocom repositories need the git history to generate a proper
version string.

For example (libosmocore):
  1.7.0.38-c3b90.202209240002
With a shallow clone, it is:
  1.7.0.202209250002

Revert the shallow git clone patch to get the proper version strings
again. This reverts commit 115262d841.

Related: https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly_obs.osmocom.org/102/console
Related: https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly_obs.osmocom.org/103/console
Change-Id: I6176e52187d12d264eee82e238051ca65e0c8f4d
2022-09-26 12:44:54 +02:00
Max 115262d841 scripts/obs: make shallow git clones
While generating srcpkg we're not really interested in entire
project history (which can be quite heavy) - let's only get
the bare minimum from git.

Change-Id: I71629c244d2c29728a88871e83b20493341321c8
2022-09-23 21:40:32 +07:00
Max d19d4da914 build_srcpkg.py: add option to use git-review
Having an option to explicitly checkout sources for package from gerrit
using numeric ID comes in handy for testing changes.

Related: OS#4107
Change-Id: I403c2083ef8c3f6f966c5b376fb13ea46d8a7a2b
2022-09-21 14:27:59 +00:00
Max f2efe48110 scripts/obs/*.py: add option to ignore required programs check
Not all the required programs are actually required to build subset of packages.
Add option to ignore the default check.

Change-Id: I8b5eaedab87b586fb1ca4c22746be4dfbb3c2176
2022-09-21 14:27:42 +00:00
Oliver Smith f067b7a4d9 obs: lib.run_cmd: set stdin to subprocess.DEVNULL
Don't pass stdin to the programs, as we expect them to run
non-interactively and also don't show the program's output unless -v is
used or the exit code is not 0.

Change-Id: I7e893101c2a3e7b005659ec72aa44fa932b7ccd9
2022-09-21 14:17:37 +00:00
Oliver Smith 910cf06220 obs: update_obs_project: check if oscrc exists
Check if the oscrc exists, as otherwise the osc command will
interactively prompt for the credentials. If running without verbose
mode (the default), the command output is hidden and so it would just
appear to be hanging without this patch if the config doesn't exist.

Change-Id: I6f140b2c1d171d3019fd259399e6a46da9c6451f
2022-09-21 14:17:37 +00:00
Oliver Smith 34b97c7aa6 obs: don't print verbose output twice on error
When running in verbose mode, it's enough that the output is displayed
while the command is running. Don't print it again on error.

Change-Id: I4fcf2421a6f82bd94ba098b39f58e5d3f18aa8fd
2022-09-21 14:17:37 +00:00
Max 29b9881ff1 scripts/obs/*.py: log name of function calling command
Change-Id: If4ccc0eb44da4ea743f3858b09c762ee6a138f1d
2022-09-21 11:26:01 +07:00
Oliver Smith f649cc024e repo-install-test: fix nftables errors on centos8
Don't attempt to install nftables-devel or python3-nftables in centos8
in the repo-install-test. What happens is, that dnf tries to install the
versions from the centos repositories, which conflict with the ones from
the OBS repositories. This fixes the failing
Osmocom-repo-install-centos8 jenkins job.

Change-Id: I57670069cc09a5493667971997f0245e1d6a7259
2022-08-26 12:22:59 +02:00
Neels Hofmeyr cf0d92ff21 obs/lib/config.py: add osmo-upf
Depends: libosmo-pfcp 0.1.2 I6ae6cf59e769214e11447107316d38fe5fad583d
Depends: osmo-upf 0.1.1 I1d73255f8cc30feabd3c251bdc3af1682ed4694a
Change-Id: Ia65508eaf241b799b5d4b1b81eebdeaa40f4381e
2022-08-24 16:58:42 +02:00
Oliver Smith 9d9a8661d6 scripts/osmo-deps.sh: use osmo_git_clone_url
Instead of hardcoding https://git.osmocom.org for all clones, use
the osmo_git_clone_url function. This clones via https from gerrit where
possible, it should fix the many errors we are currently seeing from
the master-openbsc job:

  + osmo-deps.sh libosmo-sccp
  + project=libosmo-sccp
  + branch=master
  + git branch -a
  + grep -c remotes/origin/master$
  + [ x1 != x0 ]
  + branch=origin/master
  + test -d libosmo-sccp
  + git clone https://git.osmocom.org/libosmo-sccp libosmo-sccp
  Cloning into 'libosmo-sccp'...
  error: HTTP/2 stream 0 was closed cleanly, but before getting  all response header fields, treated as error (curl_result = 92, http_code = 0, sha1 = d23e38020fdbb685570145acd3a35e22a5a91344)
  error: HTTP/2 stream 0 was closed cleanly, but before getting  all response header fields, treated as error (curl_result = 92, http_code = 0, sha1 = 68b450098714e3015a65b6628a7e61ac09dd4d47)
  error: Unable to find 68b450098714e3015a65b6628a7e61ac09dd4d47 under https://git.osmocom.org/libosmo-sccp
  Cannot obtain needed tree 68b450098714e3015a65b6628a7e61ac09dd4d47
  while processing commit d23e38020fdbb685570145acd3a35e22a5a91344.
  error: fetch failed.

Related: https://lists.osmocom.org/hyperkitty/list/openbsc@lists.osmocom.org/thread/RHMXTPTKU2SPGCVXF55RFJQ5GYBZ46CO/
Change-Id: I700d608ff74eca3981ed41f04ee9ced9629436aa
2022-08-22 14:07:59 +02:00
Oliver Smith 945ec9a0b3 obs: Cosmetic: verify new projects on OBS first
Related: OS#5654
Change-Id: I4a2ebf65de09e08cf3883ae4de9e7e8c952c2182
2022-08-22 12:52:07 +02:00
Oliver Smith 9d6e43a7c7 obs: disable osmo-upf
Deb and rpm packages don't build for osmo-upf so disable it again until
it is fixed.

Related: OS#5655, OS#5654
Change-Id: Idf18159b786c51154fda9b40758b08a8656fc215
2022-08-22 12:42:16 +02:00
Oliver Smith 4f766e6028 repo-install-test: adjust for obs.osmocom.org
Related: OS#5557
Change-Id: Ib53df6c40ae92634e6d93389dcb8a21c48dfb63d
2022-08-19 14:09:52 +00:00
Oliver Smith 4cb6289b51 repo-install-test: don't use next repository
For the conflict test, don't attempt to install packages from the next
feed for centos8. This was useful when we didn't have binary packages
for centos8 for latest yet, but we have them now. The next feed existed
temporarily and isn't updated anymore for a long time. We did not add it
to obs.osmocom.org.

This is in preparation for adjusting repo-install-test to use packages
from obs.osmocom.org, where we don't have a next feed.

Change-Id: I73a6c051c423eb30ddeab1688fc78fe959e60cf4
2022-08-19 14:09:25 +00:00
Oliver Smith 65cc10c602 obs: meaningful error if debian/changelog is empty
If there's an empty debian/changelog, packaging needs to be fixed in the
git repository of the project. Print a meaningful error instead of:

    File "/obs/lib/srcpkg.py", line 68, in get_version_for_feed
      if ":" in ret:
  TypeError: argument of type 'NoneType' is not iterable

Change-Id: I294d844ccccfa12599b6ba1def087e4a32d289e7
2022-08-19 14:03:10 +00:00
Oliver Smith a8536d8847 obs: prepend origin/ to branch selected with -b
Doing this makes more sense and is less prone to errors.

Change-Id: I2fa9c457e0e17cdd1b5946dc27ae232ec13bfa25
2022-08-18 13:18:25 +00:00
Oliver Smith fb1f39e0c9 obs: make git fetch the default
As discussed with Neels, it makes more sense to fetch git repos by
default.

Change-Id: Ib8adfbcf59d66b26f322ad22b2df1ccbeaf15af7
2022-08-18 13:18:25 +00:00
Oliver Smith 3a41a4c1b8 obs: checkout_for_feed + fetch: fix for 2022q1 etc
As Neels pointed out, with the current code the 2022q1 and similar feeds
do not get checked out properly if:
* the repository was not freshly cloned (like jenkins would do)
* the repository was fetched (--git-fetch)

Instead of the last revision of that branch from origin, we get the
revision that was previously checked out on the branch. Fix this by
prepending origin/.

Change-Id: I2e265fc84abd4596c386bb56cbabb2af121dc7ca
2022-08-18 13:18:25 +00:00
Vadim Yanitskiy dbd1e02ca3 obs: add libosmo-gprs
Change-Id: I96f48cfc328f61bcbee98c4675896cc4c4e9a48f
2022-08-18 09:32:39 +00:00
Oliver Smith 43d5155b2e osmocom-list-commits: use proper git clone urls
Fix the Osmocom-list-commits jenkins job that is currently failing with:
  fatal: repository 'https://git.osmocom.org/osmo-upf/' not found

Change-Id: I2acb9880be57411f11805a2195076b514156aaf3
2022-08-18 08:27:52 +00:00
Neels Hofmeyr 7057a9f55d obs: tweak logging output
Change-Id: I203cb7f0aa21b59b06973e8f329cffdc64aa8d47
2022-08-17 15:32:07 +02:00
Neels Hofmeyr 39cde7f098 obs: add README
Explain how to use the obs/ scripts to test a private git branch.

Change-Id: I4d1303e0c04e827200b48a9fe4aea3680c9c9f84
2022-08-17 15:32:07 +02:00
Neels Hofmeyr 60fe5c86b5 obs: expand help for --feed
Change-Id: Iabd165e4f7a8c17b30f01ad27abd1a878233dabf
2022-08-17 15:32:07 +02:00
Neels Hofmeyr 872dbbd58b obs: add explicit --git-branch arg
Change-Id: I612c18e533542f442e0571927fee8b8be9fb8c2b
2022-08-17 15:32:07 +02:00
Neels Hofmeyr c90ee51321 obs: add libosmo-pfcp, osmo-upf
Change-Id: I7192f4c9e77035cebb147b8186296bcd741d419b
2022-08-16 23:14:57 +02:00
Harald Welte 5455b42405 update git URLs (git -> https; gitea/gerrit)
Unencrypted git:// protocol offers no integrity or authentication,
making it subject to tampering.  Use https:// instead.

https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git
https://blog.readthedocs.com/github-git-protocol-deprecation/

Change-Id: Ia44e4127ff87a3d4d747225d3258188a0a891f1b
2022-08-13 04:02:51 +07:00
Vadim Yanitskiy ac0b663951 {jobs,coverity}: add a new project - libosmo-gprs
Change-Id: I83e86084e9f7a7431bf5a70c372da1f9ccd28436
2022-08-10 04:39:36 +07:00
Vadim Yanitskiy 9f36fd75a4 OSMO_RELEASE_REPOS: add missing libosmo-pfcp and osmo-upf
Change-Id: Ib7431281ff78686087d23bb6d600e6c68faef6e5
2022-08-10 04:32:00 +07:00
Oliver Smith 3f4ee14898 obs: add osmo-bsc-nat, osmo-fl2k
Looks like I copied the list of packages from the old latest script, so
these two that were only in nightly are missing. Once added, they will
be built for nightly again and not for latest as there's no tag matching
the patterin in the git repositories.

Change-Id: I4b96f15e95c70f1dca12a292964e6f12b04e4a04
2022-08-04 14:17:40 +00:00
Oliver Smith 72bab749e5 obs: fix_source_format: ignore missing \n
Apparently a \n at the end of debian/source/format is not required, so
don't fix it if it is missing. This avoids printing this confusing line:
  osmo-trx: fixing debian/source/format (3.0 (native) => 3.0 (native))

Change-Id: I7f9bb22a389a2109109f7fecd3b7ae0413fe6f5b
2022-08-03 15:24:24 +02:00
Oliver Smith 35030b7618 scripts/obs: rewrite pushing source pkgs to OBS
Harald requested that the OBS scripts should not stop if building one
specific source package fails, instead it should keep going and report
at the end a non-success exit code.

Given that the shell script code has historically grown and became hard
to maintain, I decided to rewrite the scripts for implementing this
feature. This rewrite solves additional problems:

* No full checkout of an OBS project like network:osmocom:latest
  anymore, with lots of packages that won't get updated (e.g. the uhd
  package has a uhd-images_3.14.1.1.tar.xz file that is 108 MB). With
  the old code, developers had to wait minutes during the checkout
  before the script reaches code that is currently being developed. Now
  only single packages get checked out right before they get updated.

* No need to clone git repositories over and over. With the new code,
  git repos only get cloned if needed (for latest it is not needed if
  the remote git tag is the same as the version in OBS). During
  development, the cloned git repositories are cached.

* Output from commands like "git tag -l" is not written to the log
  unless they failed. This makes the log more readable, which is
  especially important when a package fails to build, we keep going and
  need to spot the build error in the middle of the log later on.

* No more duplicated code for nightly and latest scripts that worked
  similar but had slight differences. Also the list of packages is not
  duplicated for nightly and latest anymore; nightly uses all packages
  and latest uses packages that have at least one git tag.

* Building source packages is decoupled from uploading them. A separate
  script build_srcpkg.py can be used to just build the deb + rpm spec
  source packages, without interacting with the OBS server.

* The scripts can optionally run in docker with a command-line switch,
  and this is used by jenkins. This way we don't need to install
  more dependencies on the host such as rebar3 which is now needed for
  erlang/osmo_dia2gsup.

* Add erlang/osmo_dia2gsup and run its generate_build_dep.sh (SYS#6006)

I have done the new implementation in python to make use of argparse
and to be able to use try/except and print a trace when building one
package fails.

Example output:
* https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly_obs.osmocom.org/48/console
* https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_latest_obs.osmocom.org/46/console

Change-Id: I45a555d05a9da808c0fe0145aae665f583cb80d9
2022-08-01 16:29:20 +02:00
Oliver Smith 7d299912ca scripts: osmo_obs_add_rpm_spec: fix tar pattern
Fix the pattern that gets the source tarball with ls in order to update
the "Source:" line in the spec file. The previous assumption was that it
would always match:
  ls -1 "${name}_"*".tar."*

But this isn't the case anymore since a spec file was added to
libosmo-dsp where the package name ($name) is libosmo-dsp, but the
tarball doesn't have the minus character:
  libosmodsp_0.4.0.1.d7d9.202207150002.tar.xz

Therefore just change the pattern to:
  ls -1 *_*.tar.*

We can do this because there is always only one tarball in the directory
and we wouldn't use ".tar." in a package name.

Fixes: OS#5619
Change-Id: Ic704f480102ab6f90f3936a3be30e3020402e750
2022-07-18 10:56:38 +02:00
Oliver Smith 54eef69a40 scripts/osmocom-packages-docker: pass OBS_SERVER
Make the variable available, as it's needed by the scripts that
osmocom-packages-docker.sh calls since
Ib271e16e93ebc58ed1ecb0ea881e1f1370e40928.

Change-Id: I8e53523b9b1ceafa45fe7b3dca2731d4e1c74959
2022-07-15 16:30:28 +02:00
Oliver Smith 6754a89e4c docker-rebuild: add debian-bullseye-jenkins
Related: OS#6041
Depends: docker-playground I849568826b1993fd9fb652779e631188af4a319e
Change-Id: I22f95de0bd131f0f0cfd5e2a24e17bed22e5d248
2022-07-12 14:33:30 +00:00
Oliver Smith fa8a74dfde docker-rebuild: build erlang img on x86_64 only
Build debian-bullseye-erlang on x86_64 nodes only, as the image doesn't
get used on nodes with other arches. The image is only used by
gerrit-verifications jobs for osmo_dia2gsum and osmo_gsup, which are
restriected to run on these nodes:
https://jenkins.osmocom.org/jenkins/label/osmocom-gerrit-debian9/

Remove the check and comments for not building for debian 10 x32, as
that node has been replaced with a debian 11 one.

Related: OS#5453
Change-Id: I5636dfc9e06a44b096f9dc55528d677ea2dfc352
2022-07-12 14:33:30 +00:00
Oliver Smith 56d1a172d6 scripts/repo-install-test: add debian 11, drop 9
Change-Id: I3e154def9051076bd8091b3f027ee76bbb94cb18
2022-07-08 15:35:14 +02:00
Oliver Smith 6135bf1bc4 scripts/OBS latest: fix checkout with dir in path
osmo-python-tests was added to latest just like it was in nightly, by
adding the following two lines to build_osmocom():

  checkout python/osmo-python-tests
  ...
  build osmo-python-tests

But the build fails, because the "checkout" function clones into a
"python/osmo-python-tests" directory in latest, and not into a
"osmo-python-tests" directory like in nightly. Make it behave the same
by adjusting the "checkout" function in nightly.

(This code has historically grown and should be refactored imho, but
let's fix this bug first.)

Fix for:
  ====> Building osmo-python-tests
  + cd /home/osmocom-build/jenkins/workspace/Osmocom_OBS_latest_obs.osmocom.org/osmo-python-tests
  ./scripts/osmocom-latest-packages.sh: 99: cd: can't cd to .../osmo-python-tests

Change-Id: I97074ee953cadac476fe2e4b686689c26bac1ea1
2022-07-08 14:44:43 +02:00
Oliver Smith 6116c0dfe2 scripts/osmocom-latest-packages.sh: build osmo-python-tests
Build the source package too, don't just checkout the sources.

Related: OS#5604
Change-Id: I5b7c6b6849edbca44f45041a6e506f10933b5d43
2022-07-07 09:19:32 +00:00
Oliver Smith dc00f325c7 ci-docker-rebuild: drop debian-stretch-jenkins
Related: OS#5601
Change-Id: I572ff9624fba25d7d96af79d1229b614be1c11ba
2022-07-06 15:20:22 +00:00
Oliver Smith 7bc57b7ef1 scripts/osmocom-latest-packages: add osmo-python-tests
Add it in the same place as in osmocom-nightly-packages.sh.

Closes: OS#5604
Change-Id: I187c73f8dff6800abaaeb6126ace13142a8ae20d
2022-07-06 16:08:41 +02:00
Oliver Smith 2bf20f60ed jobs/osmocom-release-tarballs: move to dp
Move the long shell command into a jenkins.sh in docker-playground, and
move the osmocom-release-tarballs.sh script there as well. This makes it
easier to test the script, and only patching one repository is needed
from now on when changing to a newer debian version.

Depends: docker-playground I4cf66097f508c029f688ec8af1cab2238d42f84f
Change-Id: I15f6c08b807f1462f91e95b624cdc1aad0592dd6
2022-07-01 15:50:37 +00:00
Oliver Smith 9139e76baa osmo-ci-docker-rebuild: don't always build osmo-gsm-tester
Currently there is only one jenkins node labeled as
osmo-gsm-tester-build. Build the osmo-gsm-tester container only there,
not on all x86_64 nodes.

The /var/tmp/osmo-gsm-tester/state directory is set up by
ansible/roles/gsm-tester/tasks/main.yml.

Related: https://jenkins.osmocom.org/jenkins/label/osmo-gsm-tester-build/
Change-Id: I9191d6d54d516ce75f3f576f34463dcaad22c85a
2022-06-29 09:33:30 +00:00
Oliver Smith fc4579cf76 jobs/osmocom-obs: run against obs.osmocom.org too
Split the OBS related jenkins jobs into two, one that uploads to the
new obs.osmocom.org and one that uploads to build.opensuse.org.

Set an alias for "osc" that sets the right server, and set the
expand_aliases shopt so the bash scripts that source common-obs.sh will
not ignore the alias.

Related: OS#5557
Change-Id: Ib271e16e93ebc58ed1ecb0ea881e1f1370e40928
2022-06-27 13:31:44 +02:00
Oliver Smith 51ed5421f1 jobs, scripts: add 2022q2
Related: SYS#6007
Change-Id: I59198f38ba817f56f6b24eae163297393587ec0b
2022-06-21 13:22:05 +02:00
Oliver Smith a1b4e8bb55 repo-install-test: get OBS pub key from proper URL
The public OBS key expired on 2022-05-22 and was replaced with a key
that was only shortly valid until 2022-06-08. Shortly after it was
replaced with a key that is valid longer, until 2024-08-02.

On 2022-06-09, one of the osmocom-repo-install tests started failing.
For some reason, the key in the latest/Debian_10 directory was not
updated to the latest one:
https://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_10/Release.key

Since the key is the same for all of network:osmocom, adjust the
function to download it from a place that the OBS web UI links to when
attempting to download the public GPG key.

I guess the latest/Debian_10/Release.key will get updated once making a
new release and updating the packages in the repository. But sinc
there's a lot of other tasks to do, just use this practical solution for
now.

Change-Id: Idd0fb6e07cba959a36269244b0c7b5c62aaffeee
2022-06-10 15:15:37 +02:00
Oliver Smith 7abb4ca810 OBS, ttcn3-testsuites: add 2022q1
Related: SYS#5887
Change-Id: Idadb541b49e57b4403a6a6e4c966bcba9c6651db
2022-04-13 19:38:18 +02:00
Oliver Smith 0c250b7c52 OBS nightly-packages.sh: add osmo-bsc-nat
Related: SYS#5560
Change-Id: I47cd67d5dcf3eb49b486e99840449e1c6a41b4ab
2022-03-29 16:45:24 +02:00
Oliver Smith 432aff8deb scripts/osmo-ci-docker-rebuild: x86: skip deb11
Don't attempt to build debian-bullseye (11) in docker on debian 10 x86,
as it results in:

  GPG error: http://security.debian.org/debian-security bullseye-security InRelease: At least one invalid signature was encountered.
  E: The repository 'http://security.debian.org/debian-security bullseye-security InRelease' is not signed.

This is a temporary measure until we've upgraded the only jenkins node
that runs debian 10 on x86, gtp0-deb10build32.

Related: OS#5453
Change-Id: Iba7679c027ca89a29393c220d01b195cfce4fec3
2022-02-21 10:30:04 +01:00
Neels Hofmeyr 950b8ea380 allow to terminate value_string[] with '{0}'
For a long time I was using '{}' to indicate a nulled out struct. But
apparently '{0}' is the favored way to write that. Let's allow using
this notation to terminate a value_string[].

Change-Id: Id2f5ba897ec83f34f8d3c4425353c0baf309bb6d
2022-02-18 14:04:13 +00:00
Pau Espin ef9b2c4062 Use docker image debian-bullseye-erlang instead of debian-buster-erlang
Let's use newer debian to avoid problems with older erlang. Furthermore,
the new image builds rebar3 to avoid issues with unmatching erlang
versions.

Change-Id: I7b1956c515daccf6ab1ff87031c6fec649cadb4b
2022-02-15 20:36:10 +01:00
Oliver Smith 88521fbc14 scripts/docker-cleanup.sh: conditional img clean
Only run the simple image clean code if docuum is not running. It works
well enough in most cases, but has the drawbacks that it never deletes
"latest" images or images not matching "^osmocom-build", and may delete
images that are still being used (OS#5447). With the other tool, all
images are considered for removal, and the ones that have not been used
the longest time are removed first.

Related: OS#5477, OS#5066, SYS#5827
Change-Id: I1cef0833c096de0fa5acf77156bb5dd362e2ef9c
2022-02-11 15:44:44 +01:00
Oliver Smith b5ebf6ea6b scripts/docker-cleanup.sh: use "docker system prune"
Do not only clean up dangling images, but also containers, volumes and
networks.

Related: SYS#5827
Change-Id: If441b251de50063f0229d36fb1bc260a4cb1dd87
2022-02-11 15:44:16 +01:00
Oliver Smith 2b77e64c48 scripts/docker-cleanup.sh: delete containers too
Related: SYS#5827
Change-Id: I73b2f13875286c1aaa5424809edab2202f41768b
2022-02-11 15:44:16 +01:00
Oliver Smith e94b29e837 scripts/docker-cleanup.sh: use set -x
Change-Id: Iba170128e55a9778467c3d3bcf33a91321a8c29f
2022-02-11 15:44:16 +01:00
Oliver Smith 2e88fa2663 scripts/osmocom-packages-docker: docker run --rm
Change-Id: I357ae8071d27088a2c0a74f962ac1589bff43a70
2022-02-11 15:44:16 +01:00
Pau Espin 2362892acb Add new repo osmo-hnbgw (latest) to build jobs and scripts
Change-Id: I634ebbfa7f471342ffcf253fdb8a316f5e71089f
2022-01-05 12:29:40 +01:00
Pau Espin 702fd8ff94 Add new repo osmo-hnbgw (nightly) to build jobs and scripts
Change-Id: I2fdbd651e4b50191e1a67e183590de99d6366ca5
2022-01-05 11:39:41 +01:00
Oliver Smith 37fe0ed2f4 OBS, ttcn3-testsuites: add 2021q4
Related: SYS#5726
Change-Id: I4913218b192cf0cb1fb74b239ced9a0501c2eb48
2021-12-23 09:15:48 +00:00
Pau Espin 82f21fa6fc repo-install-test: Validate osmo-hnodeb --version
Change-Id: I87c9c375fa810223daadd5768d6a54e9935c34eb
2021-12-21 10:57:11 +01:00
Oliver Smith 444e048693 osmocom-release-tarballs: fix missing st2 clone
Clone simtrace2.git before trying to create the tarball with git.
Fix for:
  simtrace2
    simtrace2-0.1.tar.bz2 (creating)
  + cd /osmo-ci/_temp/repos/simtrace2
  /osmo-ci/scripts/osmocom-release-tarballs.sh: 195: cd: can't cd to /osmo-ci/_temp/repos/simtrace2

Related: OS#5347
Fixes: 0221a0 ("OSMO_RELEASE_REPOS: add simtrace2, osmo-remsim")
Change-Id: I0a845549ba1fe9f0d9ab55a5c5c7bf5b8f57caae
2021-12-14 08:53:18 +00:00
Oliver Smith 0221a0b7f3 OSMO_RELEASE_REPOS: add simtrace2, osmo-remsim
Adjust to simtrace2's directory structure, which does not have a
configure.ac in the main directory like all other repositories. The main
directory has a regular Makefile without autotools, only the host dir
has a configure.ac file (and only in newer versions). Deal with this by
creating two tarballs, one with "git archive" for the whole directory,
and one for the host dir only with the usual "autoreconf -fi;
./configure; make dist-bzip2". The latter one has the files created by
autoreconf ("configure" script and others).

simtrace2
├── simtrace2-0.1.tar.bz2
├── simtrace2-0.2.tar.bz2
├── simtrace2-0.3.tar.bz2
├── simtrace2-0.4.tar.bz2
├── simtrace2-0.5.1.tar.bz2
├── simtrace2-0.5.tar.bz2
├── simtrace2-0.6.1.tar.bz2
├── simtrace2-0.6.tar.bz2
├── simtrace2-0.7.0.tar.bz2
├── simtrace2-0.7.1.tar.bz2
├── simtrace2-0.8.0.tar.bz2
├── simtrace2-0.8.1.tar.bz2
├── simtrace2-host-0.6.1.tar.bz2
├── simtrace2-host-0.6.tar.bz2
├── simtrace2-host-0.7.0.tar.bz2
├── simtrace2-host-0.7.1.tar.bz2
├── simtrace2-host-0.8.0.tar.bz2
└── simtrace2-host-0.8.1.tar.bz2

Closes: OS#5347
Change-Id: Ib52a23a2a7d6ea64bfa539b1d026f035fdb3af57
2021-12-13 11:56:21 +00:00
Oliver Smith 8a32ca538a OSMO_RELEASE_REPOS: sync with Nov 2021 releases
Depends: docker-playground I19b6b0363aeeb89ab6aac2b125359589e6b9b5a7
Related: OS#5347
Related: https://osmocom.org/news/152
Change-Id: Ib2022ca670b322d81ff83bbca3bb262f8d7287a6
2021-12-13 11:56:21 +00:00
Oliver Smith 1e7b1586e4 OSMO_RELEASE_REPOS: sort
Make it easier to figure out which projects are missing.

Related: OS#5347
Change-Id: I3660032d020154b7a175483691842b576552ffd1
2021-12-13 11:56:21 +00:00
Oliver Smith 2100dc42f4 OBS: latest: enable osmo-hnodeb
Enable osmo-hnodeb for latest, now that we have a tagged version.

Change-Id: I3037a43280dbb56ecaf4f2e067f0a1533d19d10a
2021-11-17 11:35:46 +01:00
Vadim Yanitskiy f6974d89c8 scripts: add a script for checking presence of <endian.h>
Change-Id: I6a1e7fc2e96f42fc596f47b4d7f1ac6c61d834b6
2021-10-30 01:09:58 +03:00
Oliver Smith 3dad8b5e7f OBS: nightly: fix missing checkout osmo-hnodeb
Fixes: 2ab3f7 ("Build and test osmo-hnodeb nightly packages")
Related: https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/1044
Change-Id: I327adaa8f60c1f90aa150e9d4fba5a10f271c96b
2021-10-26 08:17:55 +02:00
Pau Espin 2ab3f7d4dc Build and test osmo-hnodeb nightly packages
Change-Id: I53c2b357b0669f5101ceec7896c4ba30e69605c2
2021-10-25 11:06:50 +02:00
Oliver Smith c1bdb5b9ce build-old-tags: mark osmo-msc 1.7.0 as known error
Old osmo-msc releases failed to build because logging output of
libosmo-mgcp-client has changed. I'm backporting the fix as 1.7.1 and
1.6.4. The script builds the last 3 releases (1.6.4, 1.7.0, 1.7.1), so
mark 1.7.0 as known error.

Related: osmo-msc Id197e4ab9ba12e284299ef520edee9c362513bf1
Change-Id: I86f8252d450165f4be3d7c97fa70235638f7dd96
2021-09-16 11:02:57 +02:00
Oliver Smith d314ae8280 OBS: remove {osmo-gsm-manuals,osmo-trx}-debian8
Drop these workarounds, as we are not building binary packages for
debian 8 anymore.

Related: OS#5223
Change-Id: Ibe7ba124557969df62798ba49c4489e9606c2341
2021-09-01 16:49:53 +02:00
Oliver Smith 20901e849e repo-install-test: osmo-pcap-server: !latest
Disable osmo-pcap-server for latest again, as the port is still
conflicting there with osmo-bts.

Fixes: 7ca9c4 ("repo-install-test: clear SERVICES_NIGHTLY list")
Related: OS#5203
Change-Id: I711e0e13c3e3af30407b85fd10aca9446f2b94ba
2021-08-09 16:11:08 +02:00
Oliver Smith 7ca9c4f33d repo-install-test: clear SERVICES_NIGHTLY list
All services that start up in nightly should also start in the latest
release now, as new versions have been released of related programs.

Change-Id: Idc94270978ec5ca67d6f7e20e009f905e972f984
2021-08-05 19:06:55 +02:00
Oliver Smith 1bc1947974 osmo-ci-docker-rebuild: don't build ogt for arm
Don't attempt to build the osmo-gsm-tester docker container on arm. It's
currently causing the update-osmo-ci-on-slaves job to fail on
rpi4-raspbian10build-ansible-*.

Related: https://jenkins.osmocom.org/jenkins/job/update-osmo-ci-on-slaves/label=rpi4-raspbian10build-ansible-1/876/console
Change-Id: Ic30de69d318927d5c142f8212eefa3a53037ef25
2021-06-16 15:37:13 +02:00
Oliver Smith 60cef18539 OBS: use nightly script to build 2021q1 feed
Use the nightly script instead of latest, so all packages get
upgraded when upgrading osmocom-2021q1.

Related: SYS#5370
Change-Id: If8de585652997aae1edb586c948c181f564f6994
2021-05-19 06:35:56 +00:00
Oliver Smith 33be93bcc9 OBS: refactor osmo_obs_prepare_conflict
Determine the package name of the conflict package itself and all
conflicting packages automatically, so we don't need to have it
duplicated in the OBS latest and OBS nightly scripts.

This is in preparation to move osmocom-2021q1 from latest to nightly.
With the current logic in nightly for the conflict package, it would not
be possible.

Related: SYS#5370
Change-Id: I183b9040250e66e0d7d17ef4b95af9e7d4a26f04
2021-05-19 06:35:56 +00:00
Oliver Smith 58d02c5483 OBS: move verify_feed to common
Prepare to move the 2021q1 feed from latest to nightly.

Related: SYS#5370
Change-Id: I91e4c36d4a04d465fc9ccb933e8060511b7cd145
2021-05-19 06:35:56 +00:00
Oliver Smith 00188531c2 OBS: conflict: allow overriding pkgver
Allow overriding OSMO_OBS_CONFLICT_PKGVER, so we can increase the
version of the osmocom-2021q1 package whenever something changes on one
of the 2021q1 branches.

Related: SYS#5370
Change-Id: Iae45d7462aab8227ed3756e6cccfa3e64cb04211
2021-05-17 08:27:17 +00:00
Harald Welte 1a8bdf4674 layer1-headers: change git.sysmocom.de to https
after migrating to gitea, we don't offer classic git:// anymore

Change-Id: I61b3b5508031b5b1f1dd521833096a84ab7c9c0f
2021-05-17 08:09:29 +02:00
Oliver Smith f8099e5504 OBS: add osmocom-packages-docker.sh
Add a simple helper script to run osmocom-*-packages.sh in docker to
avoid installing dependencies on the host system.

Related: SYS#5370
Depends: docker-playground Ibb55ad18d2ccf4313f52fa3e3c10d4420c84dced
Change-Id: Icc89e20950c2aaa67b209340d1d797b76fce32d2
2021-04-29 16:05:14 +02:00
Oliver Smith 730d011de5 OBS: common: don't require wget anymore
Not needed anymore since Iaf2527043e9acdb6acff3e481d4516ac4b75b7e7.

Change-Id: I2e03487058e4c2c9426872975953fa1814b24ccd
2021-04-29 16:05:14 +02:00
Oliver Smith a323d1a41c OBS: latest: add commit to version for 2021q1 feed
Move get_commit_version to common-obs.sh and call it in
osmocom-latest-packages.sh, if the feed is not "latest". This way, the
packages don't have the latest tag as version anymore, and the version
changes if commits get pushed to the feed's branch.

Related: SYS#5370
Change-Id: I4a4fa3b8f66652ef36a7fe62047a88a69c473f19
2021-04-29 16:05:14 +02:00
Oliver Smith 4e82ff70cd OBS: refactor git_version_gen related logic
Move git_version_gen calls into an own function and add some of the
description from I76e3713f0b01a6110091ff90e8e53aa79533c374 where this
code was added.

Don't call it inside get_commit_version anymore, but call it before.
Don't try to cat the resulting .tarball-version there if it doesn't
exist.

Related: SYS#5370
Change-Id: I9a1b6ae4b4311abb77dc6390733c5e330e3d489e
2021-04-29 16:05:14 +02:00
Oliver Smith 5ef41781aa OBS: add PACKAGES env var
Skip checking out and building source packages of all other packages, if
the environment variable is set.

Related: SYS#5370
Change-Id: I83c3744713fd6abda4b832460f30eb2e79ebeed8
2021-04-29 16:05:14 +02:00
Oliver Smith 797e4aa386 OBS: latest: support new 2021q1 feed
Related: SYS#5370
Change-Id: I7a59a6ad94b21ba397349813b56b9bd5ea01c7c3
2021-04-29 16:05:10 +02:00
Oliver Smith c925604247 Cosmetic: OBS: explain difference latest/nightly
Related: SYS#5370
Change-Id: I4de2a9e9d096f8f77bfd72b8cabb0a69af2d51df
2021-04-29 16:04:34 +02:00
Oliver Smith e660339f2e OBS: require PROJ environment variable to be set
Uploading to network:osmocom:* should only be done when these scripts
are running in the Osmocom jenkins. Remove the default and require users
of the script to explicitly set PROJ.

Related: SYS#5370
Change-Id: If49ce217e77716b63dfde9139e869672a54b66a2
2021-04-29 16:04:00 +02:00
Oliver Smith 3c31513bcc OBS: nightly: build: simplify changelog parameter
Change-Id: I4a7f63f71d248b3796493adf6dc1be9c1b737c2e
2021-04-29 11:03:07 +02:00
Oliver Smith 57a07962f6 Cosmetic: OBS: describe build() parameters
Change-Id: Ib50499d6d3bd862879eaff58c9bf2260afc97ff8
2021-04-29 11:03:00 +02:00
Oliver Smith e8f56403fc OBS: nightly: append date to all packages
Instead of only appending the date to non-Osmocom packages in
get_commit_version, append it to all packages in build(). This ensures
we increase the version of Osmocom packages even if the commit did not
change.

Fixes: OS#5135
Change-Id: I04d84f39f4093c8edfe21a94c10ecb8d3c7b5b64
2021-04-29 10:38:10 +02:00
Oliver Smith 0bb0238465 OBS: nightly: no change to osmocom-$FEED changelog
Skip the logic to generate a new debian/changelog version for
osmocom-nightly and osmocom-next packages in build(). Use
$OSMO_OBS_CONFLICT_PKGVER instead, as it gets written to
debian/changelog in common-obs-conflict.sh already, and append the date
to the variable.

Related: OS#5135
Change-Id: I85f0bcb633c16c7b5a81104f198d9561f53c0c01
2021-04-29 10:32:08 +02:00
Oliver Smith ccc67c7d44 repo-install-test: get journal of failed services
Depending on the service, error messages are not shown with the
systemctl command. Run journalctl for failed services so we get the
reason for the failure in the jenkins log.

Related: OS#5130
Change-Id: Ib454424d7867137246fadd73255d4dbff63731a6
2021-04-26 10:05:09 +02:00
Pau Espin fd18e126ac scripts: build debian-buster-jenkins image in docker regsitry
Change-Id: Ia08537e0ec67fd5fe102e418648a4f71aaedfd19
2021-03-22 12:46:16 +01:00
Oliver Smith 0949776344 OBS: latest: fix code path to add new package
Fix osmo_obs_add_rpm_spec() to not assume to be in the $oscdir.
This caused the following error when being called from
osmocom-latest-packages.sh in the code path for adding a new package:
  ls: cannot access 'osmo-gbproxy_*.tar.*': No such file or directory

Related: OS#5051
Change-Id: I467e332b69accfabba53332fdb9cd785991855fc
2021-03-02 12:23:01 +00:00
Harald Welte 0eade12c25 osmocom-latest-packages: Package osmo-smlc
osmo-smlc now has a tag that builds against a tagged libosmocore

Change-Id: I0e6756f94027ad1ffd88109b2977cb33ee891a21
2021-03-02 11:17:21 +00:00
Oliver Smith ac802f941f OBS: latest: add osmo-gbproxy
Related: OS#5051
Change-Id: I66bb4e7aeedbb6f40aa9401f4adaf077e22dd9fe
2021-03-01 12:53:01 +00:00
Oliver Smith bb880678c1 OBS: latest: run osmo_obs_add_rpm_spec every time
Replace the current logic, that would only run osmo_obs_add_rpm_spec
when adding a new package, or when the version of a package has changed,
with running it every time.

Running the command when it is not needed does not hurt, as it does not
take significant time, and osc does not attempt to upload the file when
it did not change.

The advantage is, that we can update/upload the spec file without
tagging a new version, if a bug prevented it from getting uploaded
before (as it just was the case for all Osmocom packages).

Related: OS#5054
Change-Id: Ie067c97b5f54ec5b3309ddbd2bfb7f846cd0ccd3
2021-03-01 12:52:40 +00:00
Oliver Smith 08a554c7d1 OBS: latest: fix osmo_obs_add_rpm_spec call
Pass the path to the project's git repository to osmo_obs_add_rpm_spec,
instead of $output (has the output of "gbp buildpackage").

Related: OS#5054
Change-Id: I799398120ab0cbdb74b2d74a3fb139395d66d449
2021-03-01 12:52:40 +00:00
Oliver Smith 571c52207a OBS: don't amend distro specific patch
Make a separate commit for the distro specific patch, instead of using
"git commit --amend". Otherwise, if HEAD was pointing to the latest tag
before the amend, git-version-gen will use the previous tag instead of
the latest one after the amend.

Fixes: OS#5053
Change-Id: I67770a19ee60101df989f98673a22705ad50beed
2021-03-01 11:03:16 +01:00
Harald Welte 1a7e2730e2 ignore osmo-trx 1.3.0 as it doesn't do "make dist"
Change-Id: I47fcd280de158a318f85149eb93b8201ac326e17
Closes: OS#5052
2021-02-28 12:37:54 +01:00