Commit Graph

29 Commits

Author SHA1 Message Date
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 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 7abb4ca810 OBS, ttcn3-testsuites: add 2022q1
Related: SYS#5887
Change-Id: Idadb541b49e57b4403a6a6e4c966bcba9c6651db
2022-04-13 19:38:18 +02:00
Oliver Smith 37fe0ed2f4 OBS, ttcn3-testsuites: add 2021q4
Related: SYS#5726
Change-Id: I4913218b192cf0cb1fb74b239ced9a0501c2eb48
2021-12-23 09:15:48 +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 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 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 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
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
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 b72ee5ff74 OBS: use _sourcedir to write rpmlintrc
Change-Id: I16e1b3fe297ab516ceff4742ff39633480f3720e
2021-01-18 17:14:10 +01:00
Oliver Smith 577e84350d OBS: make rpmlint shlib-fixed-dependency non-fatal
Create a rpmlint config, which makes the shlib-fixed-dependency check
non-fatal, as it caused builds for openSUSE_Leap_15.2 to fail. The check
is supposed to warn about libraries depending on specific versions of
other packages. However, for the nightly and next packages, this is
exactly what we want to do to ensure that users will always upgrade all
Osmocom packages to the builds from a specific day, and not mix them.

Messages from the check:
[  307s] libosmocodec0.armv7hl: E: shlib-fixed-dependency (Badness: 440) osmocom-nightly = 1.0.0.202101181006
...
[  307s] libosmovty4.armv7hl: E: shlib-fixed-dependency (Badness: 440) osmocom-nightly = 1.0.0.202101181006
[  307s] Your shared library package requires a fixed version of another package. The
[  307s] intention of the Shared Library Policy is to allow parallel installation of
[  307s] multiple versions of the same shared library, hard dependencies likely make
[  307s] that impossible. Please remove this dependency and instead move it to the
[  307s] runtime uses of your library.
[  307s]
[  307s] (none): E: badness 3960 exceeds threshold 1000, aborting.

Related: OS#4733
Related: https://en.opensuse.org/openSUSE:Packaging_checks#Disarming_Fatal_Errors
Change-Id: I560b4adf80b5785d396a17afefa590559ad5ca5a
2021-01-18 15:53:44 +00:00
Oliver Smith 0550cf9b92 OBS: nightly: depend on dummy pkg of current date
Make it impossible to mix nightly/next builds of different dates.

Related: OS#4733
Change-Id: Ida8db8e6c91834c9d9e43694d9b4daea55a2f8f8
2021-01-15 16:51:25 +01:00
Oliver Smith e738afafa3 OBS: osmo_obs_add_rpm_spec: depend on conflict pkg
Related: OS#4733
Change-Id: I69bebdadaf89c2a6e5dd9a27161703a567882359
2021-01-15 16:51:22 +01:00
Oliver Smith d92c2d362d OBS: osmo_obs_add_rpm_spec: refactor
Rename $spec to $spec_in and add $spec to hold the destination path, to
avoid constructing it multiple times below.

Related: OS#4733
Change-Id: I4f3d4f8a8bc83ff22983e49f6a496dc8318b53cd
2021-01-15 16:51:18 +01:00
Oliver Smith d0ab94579b OBS: add_depend_deb: no self-dependencies
Check if we are trying to make a package depend on itself, and skip in
that case. This happens for the osmocom-nightly etc. metapackages, as
they go through the same code path as regular packages. While at it, use
proper variable names in the function.

Add the new variable as second argument and not as third, because a
fourth argument will be added with the dependency version, and because
this order will be consistent with osmo_obs_add_rpm_spec() when it gets
extended in a future commit.

Fix the following warning:
W: osmocom-nightly source: package-depends-on-itself osmocom-nightly depends

Related: OS#4733
Change-Id: I439079c00259d73a18cb8617a3e76d05df5a7a35
2021-01-15 16:51:13 +01:00
Oliver Smith b7f05a92e5 OBS: rename osmo_obs_add_debian_dependency
Change name to osmo_obs_add_depend_deb. I'll add a _rpm function in a
future patch, and so we get consistent names.

Related: OS#4733
Change-Id: Icf444b86df993184c9fe4db8d3e67ab4bb06bd47
2021-01-15 16:51:12 +01:00
Oliver Smith 0771116a49 OBS: move obs_prepare_conflict to own file
Prepare to add another function that creates similar dummy packages for
rpm (current version only works for deb).

Related: OS#4733
Change-Id: I29a5f54fe3a09610cffa0eacb5f0ad99154612f7
2021-01-15 16:51:00 +01:00
Oliver Smith 79b63d35a2 OBS: support more than one conflicting package
For the upcoming network:osmocom:next repository, it would be
inconsistent to have the debian package conflict mechanism only support
latest and nightly, even if the next repository is currently not built
for debian.

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

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

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

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

Related: OS#4562
Change-Id: I2b69571ebc08a920c9147ce544fa8a2e6d950e65
2020-05-25 11:46:04 +02:00
Oliver Smith a36c355462 OBS: check required programs before start
osmocom-*-packages.sh take some time to execute and has quite a few
programs that are not commonly installed. Check the required
dependencies first, so it doesn't abort in the middle of the scripts if
these are missing. I just ran into this with the new meson dependency.

Change-Id: I46cf1aeedd61dbd4fc8fa3f24c60e29033339ead
2020-05-22 11:36:53 +02:00
Oliver Smith 4f66f30307 OBS: add RPM spec files
Use existing osmocom-*-packages.sh scripts to add RPM spec.in files. Set
the same version, as in the debian .dsc files.

Related: OS#4550
Change-Id: If93b9d95e4c18cf1c29594c0802cbffaea27101c
2020-05-19 16:58:37 +02:00
Oliver Smith e26866af0d OBS: make nightly packages conflict with latest
Add conflicting dummy packages osmocom-nightly and osmocom-latest, and
make all packages from each repository depend on the right one.

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

Related: OS#2640
Change-Id: I79c45e798c10a65443b9fb9ecb54393d1918608a
2019-06-17 12:21:32 +02:00