Commit Graph

52 Commits

Author SHA1 Message Date
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
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

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 file

Change-Id: I00b9c97d9d85fb37ba33a48caa732cd50de99683
2023-11-02 21:42:19 +00: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/', which is also in package soapysdr0.7-module-lms7:amd64

Change-Id: I51f3541c62edc78842d4c461362dd8e5ea2f5d94
2023-09-15 10:46:51 +02:00
Oliver Smith 82ff45e7f7 repo-install-test: add debian12
Related: OS#6057
Change-Id: I51fa3c5212b5e29f4c2804384781693e8de2c097
2023-08-03 11:03:58 +02:00
Oliver Smith 6dcd1360ff repo-install-test: run uname -a
Print the kernel version running inside the VM.

Change-Id: Ic111ac8eda11c5609ec6ce7cf8a22584d32ed567
2023-02-13 12:30:58 +01:00
Oliver Smith 378abe1844 repo-install-test: add DOMAIN variable
Allow overriding the domain of the url where
packages are downloaded from, so we can download them from instead while developing / debugging, e.g.:

Change-Id: I36bc0eae9fdee75512c1dbdca84cd6224b8c192a
2023-02-13 12:30:58 +01:00
Oliver Smith 6e945b50c3 repo-install-test: update tests for e1d/ggsn/pfcp
Disable workarounds for OS#5817, where packaging bugs have been fixed.

Change-Id: I2452993abc1c0fe78bef464f1a62fe578b48016b
2023-02-13 12:30:55 +01:00
Oliver Smith b31d480ed6 repo-install-test: adjust to 2023-02 releases
Change-Id: Ic1d912efbe504b6e35b59e31d12b983b9d924355
2023-02-13 11:56:12 +01:00
Oliver Smith e3f0badc7d repo-install-test: disable osmo-upf service check
Don't check the osmo-upf service until it's fixed, so we don't miss
other errors that repo-install-test may find.

Related: OS#5905
Change-Id: I970cad1bdb4586afa8ba5b4dac31bb9ac02b7b2d
2023-02-13 11:56:12 +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

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

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 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
Oliver Smith 4f766e6028 repo-install-test: adjust for
Related: OS#5557
Change-Id: Ib53df6c40ae92634e6d93389dcb8a21c48dfb63d
2022-08-19 14:09:52 +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 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:

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

Change-Id: Idd0fb6e07cba959a36269244b0c7b5c62aaffeee
2022-06-10 15:15:37 +02:00
Pau Espin 82f21fa6fc repo-install-test: Validate osmo-hnodeb --version
Change-Id: I87c9c375fa810223daadd5768d6a54e9935c34eb
2021-12-21 10:57:11 +01:00
Pau Espin 2ab3f7d4dc Build and test osmo-hnodeb nightly packages
Change-Id: I53c2b357b0669f5101ceec7896c4ba30e69605c2
2021-10-25 11:06:50 +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 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
Oliver Smith 52578dde20 repo-install-test: install repo after repo key
In previous patch 27ee885a68, I made sure
that "apt-get update" runs before trying to install wget to download the
repository key. But of course the OBS repository should not be present
before installing the repo key, or else it will fail:

E: The repository ' ./ InRelease' is not signed.

Fixes: 27ee885 ("repo-install-test: apt update before install wget")
Change-Id: If79484f9ffe2a14ce6481b53867f5aee111aa11b
2021-02-26 17:34:20 +01:00
Oliver Smith 27ee885a68 repo-install-test: apt update before install wget
Fix errors caused by outdated package index:
  + apt install -y wget
  Err:2 stretch/updates/main amd64 libssl1.1 amd64 1.1.0l-1~deb9u2
    404  Not Found [IP: 80]

Change-Id: I9d28967dc556e95eec2e3e3d7ff88533154acf3c
2021-02-25 14:43:59 +00:00
Oliver Smith 00b7181760 repo-install-test: add 'debian10'
Related: OS#4969
Depends: docker-playground I7addb30aa3f8564dcbdc3f6cf2e2e0cfdf4dd02d
Change-Id: If0fc12464b571dc42b33f2a077c77ea6e5120b8d
2021-01-25 10:31:11 +01:00
Oliver Smith 137d39c764 repo-install-test: rename 'debian' to 'debian9'
Related: OS#4969
Depends: docker-playground I2ea18997019ebaa013c258996f5131386bcd6426
Change-Id: Iaa2202cca4072b4dc0309e011aba6cb33ed5b8aa
2021-01-25 10:28:16 +01:00
Oliver Smith 6786c2615c Cosmetic: repo-install-test: fix DISTRO comment
A valid example is "centos8", with the version, not "centos". Remove the
debian example, as we'll require a version with that later on as well.

Related: OS#4969
Change-Id: Ie8c2c86bc77606b1d2d4339751521139de22db04
2021-01-25 10:27:26 +01:00
Oliver Smith 9318ea8720 repo-install-test: resolve distro obs dir in func
Instead of hardcoding CentOS_8 in the centos code path, and Debian_9.0
in the debian code path, resolve the proper OBS directory based on

Related: OS#4969
Change-Id: Ie537e8befeebd7958b2a1fe8f6fd54587cfcb1b6
2021-01-25 10:27:26 +01:00
Oliver Smith 89c733986e repo-install-test: no distro version in function
Instead of calling various foo_debian and foo_centos8 versions with
foo_$DISTRO, create new foo functions that call the right
distro-specific function based on debian* or centos* being in DISTRO.
Rename all foo_centos8 functions to foo_centos.

This is in preparation to run this script with debian10 too, not just
debian9. This can also be used to test a different centos version in the

Related: OS#4969
Change-Id: Ibb9f93af16af7ebe947f7efcd4e709f3e62d12c0
2021-01-22 12:06:09 +01:00
Oliver Smith eea4a2f637 repo-install-test: print successful test msg
Change-Id: Idfb75b0461a352ae1703f3c8452cd3afc3320049
2021-01-22 12:06:06 +01:00
Oliver Smith 2c8767a5c7 repo-install-test: add test_conflict
Install one Osmocom package from one package feed and attempt to install
a second package from a different feed. Verify that the package manager
exits with error and mentions the conflict in its output.

Related: OS#4733
Change-Id: Icf2a3a1d1de2ff42b1dc9aadf2075e5e1ff40291
2021-01-20 14:28:25 +01:00
Oliver Smith 14c04c4296 repo-install-test: add TESTS variable
Allow to enable only certain tests during development.

Related: OS#4733
Change-Id: I8d817f47d790e4cdc25c5182a0e91b66a00fbf52
2021-01-20 14:26:52 +01:00
Oliver Smith 9733e2e4d5 repo-install-test: cfg_osmocom_repo: add PROJ arg
Prepare for future conflicts test, which will configure repositories
with a different PROJ.

Related: OS#4733
Change-Id: Ib9946b5a02f8692efc8515907ba84048026474f9
2021-01-20 14:24:41 +01:00
Oliver Smith 4d7c21a8ac repo-install-test: download/add deb release key
Download and add the release key for the debian repository from OBS.
This is useful for manually testing the existing tests with a different
PROJ for debugging, and it will be used by a future conflict test to
install a second repository (e.g. nightly and latest at the same time).

Note that this is not needed for rpm, because the dnf package manager
automatically downloads the key if it is missing.

Related: OS#4733
Change-Id: I91e7a208d8f5cb50f8baa2fde0eb979aae91da8f
2021-01-20 14:22:48 +01:00
Oliver Smith 07ea04f8f7 repo-install-test: don't use $FEED in centos8 repo
Use $PROJ instead of $FEED in the repository name, so we can add $PROJ
as parameter to the repo configuration functions later without worrying
about having a matching $FEED.

Related: OS#4733
Change-Id: Ic316add6b2d9b6f50335cad762628bb16da61d82
2021-01-20 14:19:16 +01:00
Oliver Smith fcfec399fb repo-install-test: put $PROJ in sources.list name
Don't call the file osmocom-latest regardless of the feed name. This becomes
important in a future conflict test where we will have two repositories
from two feeds configured.

Related: OS#4733
Change-Id: I8926443a9ff70f285d9467d39658e64456972b07
2021-01-20 14:19:12 +01:00
Oliver Smith 12e6889125 repo-install-test: make HTTP, OBS vars local
Move the two debian-specific variables to the debian-related functions
where they are used. Both are only used once, and having them global is
misleading since the test isn't just for debian anymore, but also for

Make the variables lowercase to indicate that they aren't used globally.

Related: OS#4733
Change-Id: I1dfddbd9311d741c03ceedb12aee9aeae6abdab8
2021-01-20 14:19:07 +01:00
Oliver Smith 5ddc64b292 repo-install-test: add PROJ variable
Make debugging easier by having a PROJ variable that can be overridden
by an environment variable of the same name. Pass it to docker and use
it to generate all related URLs etc.

Add functions in to convert the PROJ variable into
the two other formates needed (with slashes, with underscore), so a
future patch can use these functions with a different PROJ variable too.

Related: OS#4733
Change-Id: I0ac05a79ad65b5664b5ba37227b65e3b1422a4bf
2021-01-20 14:19:02 +01:00
Harald Welte 7fc59fcc08 repo-install-test: Move from CentOS_8_Stream to CentOS_8
Change-Id: I233c3c944ac58823dc6ff489b5ecf1fdf56b3951
2020-12-22 07:34:24 +01:00
Pau Espin Pedrol 2adc80b86f repo-install-test: Fix name blacklist_centos.txt to centos8
Change-Id: I9d50def17b3645b59b71fc1f1bcf8ff2a4ac790b
2020-12-07 14:50:16 +01:00
Pau Espin Pedrol e935398ae9 jobs: repo-install-test: Use centos8 as distro name
We use centos8 instead of centos in all docker-playground.git setups and
the infrastructure there expects that kind of naming.

Related: OS#4888
Change-Id: Idfbb2c4fc1ca10741406c8ab8930dabe8ce632ee
2020-12-07 12:54:17 +01:00
Oliver Smith 8a65d0efd2 repo-install-test: don't mount /data
The "" 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