Commit Graph

458 Commits

Author SHA1 Message Date
Oliver Smith ec9efbf649 repo-install-test: centos8: fix almalinux keys
Run "dnf upgrade almalinux-release" inside centos8/almalinux8 to upgrade
the gpg keys first, in order to prevent gpg key errors while installing
packages. We are not running repo-install-test for centos8 in CI anymore
(SYS#6759), but I'm currently using this configuration to manually test
that fixing permissions during upgrade and running systemd services as
users works as expected on an rpm-based system.

Related: OS#4107
Related: https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
Change-Id: Ia06d24ce7ce48651f5a41489e78b5b55dc2d3921
2024-04-24 11:57:08 +02:00
Oliver Smith f0cff7161b OBS: add gapk, osmocom-bb
Related: OS#6409
Depends: osmocom-bb I3713201233e13fca5ea4e0b8c4df913c787965f5
Depends: gapk I8e9d42fc332c5d426b9074c6bc58bc6efe037fea
Change-Id: Ifd84479f97fe17de35a5f409c8fabadd3bf5c272
2024-03-19 13:00:31 +01:00
Oliver Smith 33ddf03dfe OBS: srcpkg Dockerfile: add lsb-release, quilt
Wireshark with Osmocom patches on top of wireshark.git master failed to
build. I've reworked the packaging to use the "debian" dir from upstream
instead of having our own (now outdated) copy:
https://gitea.osmocom.org/osmocom/wireshark/commits/branch/osmith/deb-packaging

Add the additional dependencies that are now required to build the
wireshark source package to the Dockerfile.

Related: OS#2537
Change-Id: I82f64de70b9d099ac404530ca74c771d66b306d8
2023-12-21 13:23:11 +01:00
Oliver Smith a9c93850c3 jobs/osmo-gsm-tester-virtual: kill old instances
Make sure osmo-gsm-tester gets killed eventually, even if a bug causes
it to run forever or if aborted manually.

* add a name to the docker container
* kill the docker container if it runs longer than 24h with
  docker-cleanup.sh
* rename fix_permissions_trap to clean_up_trap and kill it there, when
  it is still running before the job starts and after it is done
  (in my testing this did not kill it after pressing abort, but it would
  be killed either at the start of the next job running on the same
  jenkins node, or after 24h by docker-cleanup.sh)

Related: OS#6304
Change-Id: I6fc874d319d74aabdc33c10910cbcca2978d5bbb
2023-12-14 11:11:27 +01:00
Oliver Smith 11f9724c39 OBS: add jenkins job to check for new distros
Add a new jenkins job to notify us about new versions of Debian,
Raspbian and Ubuntu becoming available in the openSUSE OBS. This allows
us to consistently follow along and make the repositories available in
the Osmocom OBS. I've decided to check the openSUSE OBS instead of
checking somewhere upstream, because it takes time between a new
release of a distribution and the version becoming available in
openSUSE OBS, and we have another job that syncs the configuration with
that OBS instance.

Related: OS#6163
Change-Id: I0abc49a95197da55f7d83ed4fd1c4ebb6bd14b1e
2023-12-06 06:10:46 +00:00
Oliver Smith 6b136f74d1 OBS: lib.osc.get_projects: print apiurl
Print the apiurl, to make more obvious what is going on when running the
function twice in a row with two different apiurls (as done in the next
patch).

Change-Id: I789d12ce59ff14f526ab0334e78a6b22a063ec06
2023-12-06 06:10:46 +00:00
Oliver Smith 2031b3d747 repo-install-test: update package filtering logic
Instead of filtering with several blacklist_* files that must contain
the exact names of packages to be filtered, add a shell function that
uses fnmatch for filtering. Combine all lists into one.

This fixes the error we get with each limesuite release, without the
need to increase the version in the txt files every time. Currently the
repo-install-tests are failing for all debian versions because of this.

Change-Id: I6745b10804685119d68b089f129ec9b0cde8cdf5
2023-11-27 07:09:33 +00:00
Daniel Willmann de1651b1bf scripts/obs: Add -M/--no-meta option to avoid depending on osmocom-*
This is useful for testing one-off dev packages

Change-Id: Id18c75de559c9ba29efd38d8510f2db3206c4209
2023-11-24 10:00:57 +01:00
Oliver Smith a13ce691d1 scripts/docker-cleanup: buildkit cache too
In newer docker versions, a buildkit cache was introduced. It gets used
while building images. Clean it up as well.

Related: https://osmocom.org/projects/osmocom-servers/wiki/Docker_cache_clean_up
Change-Id: Icf5237def75d4bcef6b0065f3f1f1da2ff362322
2023-11-21 13:01:03 +00:00
Oliver Smith 38707a473c tarballs: git archive: make proper tar.bz2
Compress the tarball from "git archive" with bzip2 to turn it into a
proper .tar.bz2. Previously the archive was named .tar.bz2, but it was
just a regular tarball as git archive didn't guess the type from the
filename (supposedly this works for .tar.gz and some others) and just
defaulted to tar.

Move the code that adds build_dep.tar.gz to the archive before the bzip2
call, because tar can't add files to the archive if it is compressed.

Change-Id: I5830f9123150540a6467c19c64461d2fa1972a52
2023-11-07 12:23:20 +01:00
Oliver Smith 0c79a15162 tarballs: git archive: put files in directory
Make the releases created from the "git archive" code path more similar
to the autotools releases, by having all files in a subdirectory with
the project name and tag name instead of having them directly in the
root of the tarball.

  $ tree osmo_dia2gsup-0.1.1 | head
  osmo_dia2gsup-0.1.1
  ├── build_dep.tar.gz
  ├── contrib
  │   ├── generate_build_dep.sh
  │   ├── jenkins.sh
  │   └── systemd
  │       └── osmo_dia2gsup.service
  ├── debian
  │   ├── changelog
  │   ├── compat

Change-Id: If37dcdc04278de0d4479cf72e0ca33c90b7deea8
2023-11-07 11:56:37 +01:00
Oliver Smith 88d62e3c69 tarballs: add osmo_dia2gsup
Change-Id: I9cbd3d3ce27a4b4c9c8e19b2876386d170d4f0a6
2023-11-07 11:40:06 +01:00
Oliver Smith a9e9c366b1 repo-install-test: ignore limesuite-images
Don't attempt to install limesuite-images. It runs a post-install script
that downloads files from an external server and fails currently, as
there are no images for 23.10. While we have limesuite-images packages
in our OBS repository, this is just a side-effect of building limesuite.
What we are really interested in is liblimesuite for osmo-trx, as I
understand.

Add --no-install-recommends to the apt-get install line in
install_repo_packages_debian, because the main limesuite package has
limesuite-images in recommends and would pull it in otherwise.

Change-Id: I237408c805977c831f352a57a301ea45753d1ac1
2023-11-02 21:42:19 +00:00
Oliver Smith 8ba48eb28a repo-install-test: fix ca-certificates-java error
The repo-install-test started to fail on debian 10 with the following
error. Apparently this happens when installing ca-certificates-java
after installing java. Add a workaround.

  Setting up ca-certificates-java (20190405) ...
  head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
  Exception in thread "main" java.lang.InternalError: Error loading java.security file

Change-Id: I00b9c97d9d85fb37ba33a48caa732cd50de99683
2023-11-02 21:42:19 +00:00
Oliver Smith 25f74d3d51 Update git tag patterns for rtl-sdr, osmo-fl2k
With the v2.0.0 release of rtl-sdr, it was decided to include the v in
the tag pattern again, so adjust it in the related scripts. Adjust
osmo-fl2k too in the OBS scripts because there the tag pattern was not
set.

Change-Id: If1bb64722bd24b0079d2427ea3b0f5b5c87ef7ac
2023-11-02 13:53:22 +01:00
Oliver Smith 867f2d28fd OBS: add workaround for limesuite 23.10 release
The previous workaround for building on debian 12 is not needed anymore,
as the related patch has been merged. Replace it with a new workaround
needed for building the limesuite 23.10 release.

Change-Id: I569642ebb13ac3eb3e241642e299be0a0a2ab15d
2023-10-31 12:04:33 +01:00
Oliver Smith b365c1df68 scripts/tarballs: gapk: add install depends
Now that we run ./configure before building the tarball, make sure the
dependencies are installed.

Related: OS#6227
Change-Id: I82eb0a87f6e294fb258003ebe76f850a99952938
2023-10-26 12:31:52 +02:00
Oliver Smith b59c791d13 scripts/tarballs: gapk > v1.0: use make dist-bzip2
Use autotools logic to build tarballs for gapk above version v1.0.

Related: OS#6227
Change-Id: If9a04b458553e311cf8b891b204244db2b1ae2d8
2023-10-26 11:05:22 +02:00
Oliver Smith 3d2c3dd14c scripts/repo-install-test: fix sftp compat, part 2
Copy files inside repo-install-test, instead of copying the directory
again. Otherwise it creates a /repo-install-test/repo-install-test/ path
inside qemu and then fails to run the script inside the directory:

Fix for:
  sh: 0: cannot open /repo-install-test/run-inside-env.sh: No such file

Fixes: a7791217 ("scripts/repo-install-test: fix sftp compat")
Change-Id: I04d8c0e0fd31ee5d2a0912300dc93f5339bbef11
2023-10-23 12:57:54 +02:00
Oliver Smith a779121725 scripts/repo-install-test: fix sftp compat
When running scp, Debian 12 uses the SFTP protocol by default instead of
the legacy SCP protocol. For some reason, this means it doesn't create
the /repo-install-test directory inside QEMU:

  + … scp … -r scripts/repo-install-test root@127.0.0.1:/repo-install-test
  Warning: Permanently added '[127.0.0.1]:22793' (ED25519) to the list of known hosts.
  scp: realpath /repo-install-test: No such file
  scp: upload "/repo-install-test": path canonicalization failed
  scp: failed to upload directory scripts/repo-install-test to /repo-install-test

Changing to the legacy protocol with "scp -O" would make it work again,
but instead of doing that add the mkdir so it works with the new
protocol too.

Related: OS#6186
Change-Id: I740affad2ea794094c8faa89a89bcad094e0075d
2023-10-20 12:19:30 +02:00
Oliver Smith 48b3edb0cc scripts/tarballs: create release dir if missing
Fix for:
rsync: [Receiver] change_dir#3 "/downloads/home/releases/web-files/gapk" failed: No such file or directory (2)

Change-Id: I46310d633302028d486dd356147c9c4f35b24940
2023-10-19 11:37:53 +02:00
Oliver Smith 7fbb49f87d scripts/tarballs: add osmo-fl2k, rtl-sdr
Closes: OS#6226, OS#6225
Change-Id: Idff299c65902b6818e409a409a3d303e8fccc4f9
2023-10-19 11:09:43 +02:00
Oliver Smith 5597e82d55 scripts/tarballs: add gapk
Closes: OS#6227
Change-Id: I6f26b6f5953701b383acb3b93058b66a286f7989
2023-10-19 11:07:06 +02:00
Oliver Smith 4e0a34b26e scripts/common: osmo_git_last_commit…: add vars
Add variable names for $1, $2, $3 so the logic is easier to follow.

Related: OS#6227
Change-Id: I7abbcefc8d5bd4c5b84c30a7e38ca3dcb855dd56
2023-10-19 11:07:06 +02:00
Oliver Smith a498ca6f2a scripts/tarballs: add osmo-e1-recorder
Closes: OS#6228
Change-Id: I6bd8387f99c258226125b33705645c43aadd875f
2023-10-19 11:02:18 +02:00
Oliver Smith 15777116dd obs: build_binpkg: no network during build
Simulate that we don't have network during package builds in gerrit
verifications, like it is the case when the packages will be built by
OBS.

I've also considered using network namespaces via "unshare -n" or
bubblewrap, but it wouldn't be possible to create a loopback device
inside the network namespace inside docker (maybe with --privileged, but
not worth it) and e.g. the osmo-mgw tests rely on lo.

Depends: osmo-epdg I2bb0b5f608cd5d9a24c2a367425c524447bd002c
Change-Id: I00282552e9988d66fdc269c6230f0e1432ace360
2023-10-06 14:05:51 +02:00
Oliver Smith f8e2ee24ed obs: srcpkg: support having no git tags
Instead of failing when a project has no git-version-gen script, and no
git tags, use 0.0.0 as version. This is needed for the new osmo-epdg
project, which doesn't have tags yet.

Change-Id: I2f0f409feb96611095dfa511a33ea730e5bbf3e4
2023-10-05 18:05:41 +02:00
Pau Espin 76a67bc8d7 obs: Fix typo in log line informing variable to be modified
Change-Id: I381f30ad2443bbd86a23d2808a5f8e3c650953b7
2023-10-05 17:36:42 +02:00
Pau Espin 325162a1fe obs: add erlang/osmo-epdg to projects_osmocom
Change-Id: I5c5537e2d96752cb68fb251552bd444a9abf8cd1
2023-10-05 17:36:42 +02:00
Oliver Smith 3f037f4a73 obs: srcpkg.py: Run generate_build_dep.sh for all projects
Adjust srcpkg.py to run a generate_build_dep.sh not only for
osmo_dia2gsup, but for any Osmocom project that has such a script. This
is in preparation for osmo-epdg, which will also have one.

Change-Id: Icd9dc734ec938398668640f77ec83aae4a1ee0f4
2023-10-05 17:35:02 +02:00
Oliver Smith b206b2f1d2 scripts/docker-cleanup: remove containers > 24h
Remove containers starting with jenkins- or having ttcn3 in the name, if
they have been running for more than 24 hours. This can happen with the
ttcn3 testsuites, as they typically start multiple docker containers in
the background (one per Osmocom program) before they start the testsuite
docker container in the foreground. Usually the clean up trap makes sure
that all containers get killed, but we have seen that a few containers
have been running for a few months. One reason for this could be
temporary loss of connection between the jenkins server and the node
running the job.

Extend the clean script to remove the containers that were not properly
removed by the clean up trap.

Historically we used to kill docker containers of the same name before
starting a testsuite, but this had the downside that we could not start
the same testsuite multiple times in parallel. This was refactored in
docker-playground Ifcd384272c56d585e220e2588f2186dc110902ed.

Change-Id: I58c17b57c998eaba411658e83b7295d7cfcf9a23
2023-10-04 17:53:51 +02:00
Oliver Smith 1e748b38a4 OBS: add git tag pattern for wireshark
Since previous patch 62693be1 ("OBS: fix generating wrong limesuite
version"), the scripts rely on having the correct pattern for the tag
in the config. Add the pattern for wireshark.

Fix for:
  fatal: No tags can describe '6d412b991d8c2f50b7854611b1a9ef567bab9962'.

Change-Id: Ic8e83b4d5d897cb6b94b04b1232486288f3a1f9b
2023-09-18 10:41:41 +02:00
Oliver Smith 9df253bb34 repo-install-test: skip soapysdr-module-lms7
Fix for:
  dpkg: error processing archive /tmp/apt-dpkg-install-4OjX3P/0924-soapysdr0.8-module-lms7_22.09.1+dfsg-1+b2_amd64.deb (--unpack):
   trying to overwrite '/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libLMS7Support.so', which is also in package soapysdr0.7-module-lms7:amd64 22.09.1.17.4828.202309142026

Change-Id: I51f3541c62edc78842d4c461362dd8e5ea2f5d94
2023-09-15 10:46:51 +02:00
Oliver Smith 62693be148 OBS: fix generating wrong limesuite version
Instead of using git-version-gen in all git repositories, only use it
where it is part of the repository. Use git directly to build the
version string otherwise. To fix generating the wrong version string for
limesuite, use "git describe --tags" instead of "git describe" as in
git-version-gen. This is needed because limesuite releases > 20.01 only
have lightweight (non-annotated) tags.

Fix for:
  limesuite: WARNING: version from changelog (22.09.1-1) is higher than
  version based on git tag (20.01.0.182-4828.202309140026), using
  version from changelog (git tag not pushed yet?)

Change-Id: I00d97d5cd12b2938a002d3e5c8ada6503f976e36
2023-09-14 15:40:53 +02:00
Oliver Smith 757d58710b OBS: keep going if version can't be parsed
Don't crash in Osmocom_OBS_wireshark because the version can't be
parsed.

Fix for:
  packaging.version.InvalidVersion: Invalid version: '4.1.1rc0.238'

Change-Id: I0cf6c7c2d5939dccc14107f0a8c15593ea8bc4c2
2023-09-13 15:00:38 +02:00
Oliver Smith f453e35022 scripts: wireshark: remove laforge/doc-fixes
The two patches from this branch have been upstreamed:
15ed53005b

And with recent changes to docs/README.dissector, git fails to detect
that these are already applied.

Fix for:
  CONFLICT (content): Merge conflict in doc/README.dissector

Change-Id: I17017ba396996e781250d30406193c4f5ec44f82
2023-09-13 14:38:04 +02:00
Oliver Smith 3970487882 OBS: don't downgrade version in debian/changelog
Fix the bug that the version in debian/changelog could get lowered if a
release was made and the release git tag was not pushed yet.

Fixes: OS#6173
Change-Id: I550ed10a60c863626d870e35034028f0bd066211
2023-09-12 17:31:45 +02:00
Oliver Smith d27ba27a55 OBS: exit() -> sys.exit()
As pointed out in code review, sys.exit() should be used instead of
exit() from site.

https://docs.python.org/3/library/constants.html#exit says:
> The site module (which is imported automatically during startup,
> except if the -S command-line option is given) adds several
> constants to the built-in namespace. They are useful for the
> interactive interpreter shell and should not be used in programs.

Change-Id: Ia9d355e660afd1ad3c60064900d8be66e8e1d385
2023-09-08 11:09:39 +02:00
Oliver Smith 10d7aedfeb OBS: build_binpkg: support debian:testing
Change-Id: I71de94ef34c3ccc3610643bd8861b78cccd266a5
2023-09-08 11:09:39 +02:00
Oliver Smith 4cfe5d42b5 OBS: add sync_obs_projects.py
Add a new script that syncronizes base distributions from openSUSE's
OBS, like Debian:12. This is done by getting  "meta" and "prjconf" from
the source OBS, adjusting it and writing it to our OBS instance.

The motivation for this is making our OBS more resilient, by using these
synchronized projects we can build packages even if the openSUSE OBS API
is not reachable.

Related: OS#6165
Change-Id: I00122f7819ba682cb791c370d781377cfb302629
2023-09-08 09:06:57 +00:00
Oliver Smith aa2e3cc5c0 OBS: lib/osc: add private proj variable
Adjust lib/osc.py to take the OBS project from a global variable that
can be set with lib.osc.set_apiurl(), instead of using
lib.args.obs_project. Move the sanity check to set_apiurl().

This is in preparation for adding a new sync script, which will operate
on multiple OBS instances.

Related: OS#6165
Change-Id: Iabb871bcb432f2fbdaec9cbcab3d663ccf969901
2023-09-08 09:06:57 +00:00
Oliver Smith 18c730fc10 OBS: build_srcpkg.Dockerfile: use bookworm
rebar3 is in debian bookworm's repositories, hence it is not needed
anymore to use osmocom:latest here.

Change-Id: Iddd0295ee928fc9a47d4d206e414b78a2561d13d
2023-09-08 09:06:57 +00:00
Oliver Smith 451cbe7d86 jobs/master-builds: add xgoldmon
Replace the legacy xgoldmon job (not done with jenkins-job-builder) with
a new master-xgoldmon job that works more similar to other master jobs:
- build in docker
- have build commands in a jenkins.sh script

Put the jenkins.sh script into osmo-ci, as the upstream repository is
outside of Osmocom infrastructure.

The motivation for this change is, that the current xgoldmon job is
failing since libosmocore depends on liburing by default. This uncovered
that the job is still running outside of docker, where the dependency
has already been added. The following patches will modernize other jobs
which have the same problem.

Change-Id: Ice5704eb12f3c3a777961bc18a55fac63df80fd6
2023-08-29 12:56:34 +02:00
Oliver Smith bb6db80a2c scripts/osmocom-api-doxygen: check ssh early
Check for working SSH right at the start of the job, so we don't need to
wait 2 minutes until it has built everything to find it out.

Change-Id: Id93c15d38a49859dc63d39f70f051a7df871c398
2023-08-25 13:31:24 +02:00
Oliver Smith 53bd6b8ade jobs/osmocom-api: run inside docker
Run the osmocom-api job inside docker, so all depends are available
(fixes that it currently fails because liburing isn't available for
libosmocore).

Use the contrib/known_hosts file, instead of writing an own copy during
the job.

Change-Id: I6e831c71c4c88772c3e4232fcb1a9e2c1c73d997
2023-08-25 13:31:24 +02:00
Oliver Smith 8920d73730 jobs/osmocom-release-tarballs: modernize
Rewrite the osmocom-release-manuals script (previous version is in
docker-playground Ic35a28a386170b85d32aab8f2bd33e48e6d45392):

* Instead of using a separate docker container for this, that also lists
  all dependencies for all packages (as needed to pass ./configure), use
  debian-bookworm-build and install missing packages at time of
  generating the tarballs with "apt-get build-dep". Missing dependencies
  are typically other Osmocom libraries.

* This allows removing the debian 11 based release-tarball-build-dist
  container. As the script doesn't depend on a separate docker container
  anymore, move it to osmo-ci.git.

* Make it similar to scripts/manuals/publish-manuals-for-tags.sh, so it
  is easier to maintain both.

Related: OS#6057
Change-Id: I9f8b671b9780da500637a64fc4dbc72b450f9d11
2023-08-17 14:01:32 +02:00
Oliver Smith b65409baa9 scripts/manuals: adjust patch for removing draft
Adjust the patch, to not remove the "NOTE: TO REMOVE DRAFT MODE" as it
isn't in osmo-gsm-manuals anymore.

Related: osmo-gsm-manuals I23d11bab274793eb8bcedc3fd9290901823e32d2
Change-Id: Ia27cb8e4dd0204c0a91c322bed65bf8c9847a7be
2023-08-17 13:58:35 +02:00
Oliver Smith 6ff5153042 scripts/osmo-ci-docker-rebuild: drop debian-bullseye-jenkins
It is not used anymore, stop building it.

Related: OS#6057
Change-Id: I8e11e4c87fea9a2cfc5e72f0427cf4ca82030554
2023-08-14 09:28:40 +00:00
Oliver Smith c749c28c3c scripts/manuals/publish-manuals-for-tags: use bookworm
Related: OS#6057
Change-Id: Ifa56e7f035fde5fb750376c64572277de2417d65
2023-08-14 09:28:40 +00:00
Oliver Smith 82ff45e7f7 repo-install-test: add debian12
Related: OS#6057
Change-Id: I51fa3c5212b5e29f4c2804384781693e8de2c097
2023-08-03 11:03:58 +02:00