Commit Graph

97 Commits

Author SHA1 Message Date
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 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
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 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 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 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 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 4afadcdddb obs: make limesuite build with debian 12
Related: OS#6057
Change-Id: Ic81dfbfa232b92e3fd9af9c5d7d0f2aca4b9879c
2023-06-22 13:25:41 +02:00
Oliver Smith cdd4eece45 data/build_rpm: force refresh of package indexes
The yum-builddep command already has a mechanism to update the package
index data if the last update (when the docker image was built) was some
time ago. However when the packages we use happened to be updated in
that timeframe, the indexes are not updated and attempting to download
them leads to 404 errors. Force refresh all package indexes to avoid
this.

Fixes: OS#6038
Change-Id: I6e2592466b6190782cdd93e00b3d5020fd665372
2023-05-19 10:14:24 +02:00
Oliver Smith 0b87eb3fbf obs: build_binpkg: ubuntu: use manuals container
Use the optimization of only installing osmo-gsm-manuals-dev and all its
dependencies once not only with debian, but also with ubuntu.

Change-Id: Ic9fef9f10b4384538e7a73479bf57a9b737a9a55
2023-05-10 12:13:33 +02:00
Oliver Smith 106120cace obs: build_binpkg: add feed argument
Make it possible to configure a different feed than master inside the
docker container that gets used to build the packages. This way we can
build ubuntu packages against nightly.

We don't build the Osmocom packages in the master feed for Ubuntu as we
rarely have a build error that only happens on ubuntu. With this patch,
it can be easily reproduced if it happens.

Change-Id: Ibc27459815f26e8c691c83fe594ff84962b991f5
2023-05-10 12:13:27 +02:00
Oliver Smith 3dff9ee40c obs: build_binpkg --docker: set metavar to DISTRO
Make it obvious that the argument passed to --docker is the Linux
distribution that will be used.

$ ./build_binpkg.py -h
usage: build_binpkg.py [-h] [-d [DISTRO]] [-j JOBS] [-r] [-v] package

Change-Id: Ibf6f1a8fce7fd13795f1c25c75e14fb9eb8aa2b6
2023-05-10 11:41:11 +02:00
Oliver Smith badcf3d055 obs: support all debian/ubuntu/almalinux versions
Adjust the code so one can pass all versions, instead of hardcoding
only debian:11, ubuntu:22.04, almalinux:8. I'll use this for
reproducing a build error that happens on e.g. ubuntu:18.04.

Change-Id: Id85f5b67d144dc178d3fb23ff8e533a671473363
2023-05-10 11:41:07 +02:00
Oliver Smith bdbc48a372 obs: update_obs_project: add ALL_OSMOCOM_PACKAGES
Add this alias to use all Osmocom packages, but no the misc packages
that would also be selected if not specifying the packages argument at
all (limesuite, neocon, open5gs).

This will be used for building packages from the rhizomatica branches,
so we don't check the git repositories of these misc projects for the
git branches.

Related: OS#5981
Change-Id: I4265f43408bc21ac8765449d6766381c75cafe86
2023-04-06 10:59:28 +02:00
Oliver Smith ccb0dba7f3 obs: update_obs_project: add --delete arg
Add a new argument to delete packages from OBS if the git branch does
not exist anymore, but the packages still exists in OBS.

Related: OS#5981
Change-Id: Ib5ccf93a5a0cf8981fc35976bb9e0d3a29721b8d
2023-04-06 10:59:28 +02:00
Oliver Smith ff8ec46ac5 obs: add --conflict-pkgname arg
Prepare to create new feeds for the rhizomatica/testing and
rhizomatica/production branches, which will be based on osmocom:latest.
They will depend on osmocom-latest (the "conflict package"/meta
package), even though their feed name is not latest.

Related: OS#5981
Change-Id: I58e33bb003e2a4af9e9a7b53e5f79a91c3b541eb
2023-04-06 10:58:40 +02:00
Oliver Smith 78ca65b5d3 obs: wireshark: user proper OBS api url
Set the proper https://obs.osmocom.org api URL, not "obs.osmocom.org".
The latter only works on jenkins because we have set up an alias there,
but not locally without setting up the same alias.

Change-Id: I663ba4f137a57890ba9a2079ef3453bb7544de8b
2023-04-05 09:51:35 +00:00
Oliver Smith 937425179d obs: wireshark: remove laforge/amr-2023 branch
Remove it, as the AMR patches have been upstreamed \o/

Related: https://gitlab.com/wireshark/wireshark/-/merge_requests/10025
Change-Id: I7f3f06bc5390ffac9b3760035831ae17d28b744e
2023-03-22 12:02:12 +01:00
Oliver Smith b55b11d671 obs: build_binpkg: add ubuntu 22.04
Add it for debugging a build failure that we only saw on Ubuntu.

Related: OS#5946
Change-Id: I4a927447d8f8b89411b93c563fbc6aa8d4998ffa
2023-03-22 09:30:53 +00:00
Oliver Smith e7eba15315 jobs: add Osmocom_OBS_wireshark
Add a nightly jenkins job that does the following:
* Clone Wireshark from upstream
* Merge several Osmocom branches on top
* Build a source package
* Submit it to the osmocom:wireshark OBS project

Related: OS#2537
Change-Id: Ifb49c5cb22a4de0da30a920e5450a27172b11d73
2023-03-17 11:33:55 +01:00
Oliver Smith 1ab4ce32f9 obs: add --version-append argument
Related: OS#2537
Change-Id: Iff5a530bebd645be13e0206ce0a670e1dfe6e2f9
2023-03-17 11:33:55 +01:00
Oliver Smith dc1415959f obs: add --allow-unknown-package
Prepare to add a wireshark package. It will be in its own
osmocom:wireshark repository, and not in osmocom:nightly, :latest,
:master, so it's not added to lib/config.py.

Move lib.set_args() before parse_packages(), so the latter is able to
use lib.args.allow_unknown_package.

Related: OS#2537
Change-Id: I007f937ccb629e0593ec9253541ed05df42fac66
2023-03-17 11:33:55 +01:00
Oliver Smith 3ccebc4514 obs: srcpkg.build: fix conflict_version regression
During refactoring, conflict_version was changed to version here, which
was wrong. The packages need to depend on the conflict_version of the
meta package, version is the version of the package itself.

Fix for:
  The following packages have unmet dependencies:
   libosmo-netif-dev : Depends: osmocom-nightly (= 202303160009) but it is not going to be installed
                       Depends: libosmocore but it is not going to be installed
                       Depends: libosmonetif11 (= 1.3.0.8.9e65.202303160009) but it is not going to be installed
   libosmocore-dev : Depends: osmocom-nightly (= 1.8.0.79-b394d.202303170006) but it is not going to be installed
                     Depends: libosmocore but it is not going to be installed

Fixes: 0ed0e464 ("obs: don't pass conflict_version through functions")
Change-Id: I2326e3817c6f6887ef1196e603c3877768119a66
2023-03-17 11:33:45 +01:00
Oliver Smith 8d137c66a7 obs: add --git-skip-checkout argument
Prepare to use this for wireshark, to build a branch on-the-fly that
does not get pushed to origin, with Osmocom patches on top of upstream
master.

Related: OS#2537
Change-Id: Ifc963daf51ba3542f67420daaf7b29745404a92e
2023-03-15 18:25:52 +01:00
Oliver Smith f7ff90d64b obs: don't pass skip_up_to_date through functions
Change-Id: Ide0c1f5452f5ce965541b45039345abc52b3d140
2023-03-15 18:25:52 +01:00
Oliver Smith 78cd3a3c75 obs: don't pass meta through functions
Change-Id: Ieb49e5f8630e3e918b11a7a225febbbcee2e82b3
2023-03-15 18:25:52 +01:00
Oliver Smith 372b33a582 obs: don't pass fetch through functions
Change-Id: I0689868db6fadaaaca470cdefbf60ceedc2eb225
2023-03-15 18:25:52 +01:00
Oliver Smith 0ed0e46421 obs: don't pass conflict_version through functions
Change-Id: I3d712e94d56269c49ee5baecfee1fa9f35101488
2023-03-15 18:25:52 +01:00
Oliver Smith 06f7482a7e obs: don't pass branch through functions
Change-Id: I9ec6d04c51bc795dd9cd4738313e60a556791eb2
2023-03-15 18:25:52 +01:00
Oliver Smith dd36e9f489 obs: don't pass feed through functions
Change-Id: I9124d33c45ef3fef48666b485fd169eec0eb393a
2023-03-15 18:25:52 +01:00
Oliver Smith e4313bc6b7 obs: don't pass proj through functions
Change-Id: Id213ae155f34c74529845ff86468b68ffa6ffb1d
2023-03-15 18:25:52 +01:00
Oliver Smith 9337c6c035 obs: lib.args: store argparse result here
Prepare to add more arguments to the OBS scripts, so they can be used
for building the wireshark package in its own OBS project.

It was not so clear to me when writing this initially, but with more and
more arguments getting added: it's not very maintainable to pass each
variable from the argparse result several functions down to where it
gets used... so unfortunately this means the code needs to be refactored
to just use libs.args in the few lines of code where the arguments
actually get used.

This patch adds lib.args, and the next patches refactor existing code to
use it instead of passing parameters, where it makes sense. After that
follow the patches related to adding the wireshark package.

Related: OS#2537
Change-Id: I48853444f1386dfb842c174ebc45f9decc8bec0f
2023-03-15 18:20:21 +01:00
Oliver Smith 7f0060ae70 obs: git.py: fix f-string
Change-Id: Iaaedf019012d77e4a385054532d1d10659ef8e76
2023-02-08 16:25:22 +01:00
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