Commit Graph

236 Commits

Author SHA1 Message Date
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
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 'http://download.opensuse.org/.../Debian_10 ./ 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 http://security.debian.org/debian-security stretch/updates/main amd64 libssl1.1 amd64 1.1.0l-1~deb9u2
    404  Not Found [IP: 151.101.130.132 80]

Change-Id: I9d28967dc556e95eec2e3e3d7ff88533154acf3c
2021-02-25 14:43:59 +00:00
Harald Welte bdb36dd055 osmocom-latest-packages: re-enable osmo-uecups
this should have been re-enabled since libosmocore 1.4.0 already

Change-Id: I5b8789cdfff2432c8d43972e19117f9f54eaaa7f
2021-02-23 20:21:11 +01:00
Oliver Smith bc2d794da8 OBS: nightly: use epoch from debian/changelog
If epoch is used in debian/changelog, prepend it to the version from
git-version-gen. Also set the epoch in the spec file.

For example, the version in debian/changelog may be 1:0.0.1. The epoch
is 1, therefore a 0.0.1.18.b5d18 version from git-version-gen would turn
into 1:0.0.1.18.b5d18.

Setting epoch=1 is needed for osmo-gbproxy, so apt on debian 10 with the
nightly Osmocom repository enabled does not try to install osmo-gbproxy
1.3.0 from the debian repositories instead of 0.0.1 from the Omsocom
repository.

Related: https://www.debian.org/doc/debian-policy/ch-controlfields.html#version
Related: OS#4992
Change-Id: I3d63f040058340bdcf9075c03387798c5314be03
2021-02-16 11:37:24 +01:00
Oliver Smith 70ce36c3ff OBS: nightly: add osmo-gbproxy
Depends: osmo-sgsn I37f7cebaf2a06bd93627a452f5df44edcfc0f87a
Related: OS#4992
Change-Id: I08c513ba812bcb302b5dcab52fc187b27b1b32b7
2021-02-03 10:44:49 +00:00
Harald Welte 2f611e206c osmocom-latest-packages: Build osmo-cbc
osmo-cbc has full support for building dpkg + rpm from the latest
tag (0.2), hence we can enable building it also in 'latest'

Change-Id: Ia5bfd126ad168da7ab629b1f18ecfd60d4a49a51
2021-02-03 08:38:30 +00:00
Oliver Smith 708aed1ebd OBS: nightly: don't download bumpversion
Stop downloading bumpversion related archives with each run. They were
not uploaded to OBS after the download (no 'osc add' runs aftewards, and
last modified of network:osmocom:nightly:bumpversion is 3 years ago).

bumpversion is needed to run osmo-release.sh, and is available in debian
since 9 (stretch).

Related: https://build.opensuse.org/package/show/network:osmocom:nightly/bumpversion
Change-Id: Iaf2527043e9acdb6acff3e481d4516ac4b75b7e7
2021-02-02 14:12:04 +01:00
Oliver Smith 6f5f4d6dd3 OBS nightly: don't try to use UNKNOWN as version
If the repository doesn't have a git tag yet, git-version-gen will set
the version to UNKNOWN. The debian package build tools will choke on
that, so fall back to using the version from debian/changelog.

Related: OS#4992 (osmo-gbproxy.git doesn't have a tag just yet)
Change-Id: I43c32f73bdfd715db5afdeec3bd8026d3c1fd8eb
2021-01-29 16:11:06 +01: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
$DISTRO.

Related: OS#4969
Change-Id: Ie537e8befeebd7958b2a1fe8f6fd54587cfcb1b6
2021-01-25 10:27:26 +01:00
Oliver Smith 4813fb7fd9 repo-install-test: verify DISTRO argument
Keep list of supported distros in one place in repo-install-test.sh.

Related: OS#4969
Change-Id: I1aa2564ff861d81a866302e44a1f99ff876c7b31
2021-01-25 10:27:20 +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
future.

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
centos8.

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 run-inside-docker.sh 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