diff options
author | Oliver Smith <osmith@sysmocom.de> | 2021-01-18 14:26:11 +0100 |
---|---|---|
committer | osmith <osmith@sysmocom.de> | 2021-01-18 15:53:44 +0000 |
commit | 577e84350d804316aae628fd951049fc4e41d0b3 (patch) | |
tree | 7dfd522983561fd36fdef4365ff2aab8d2317814 | |
parent | 90544fe93428c70e77ab82f0682f343231aaaccd (diff) |
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
-rw-r--r-- | scripts/common-obs.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh index 40cacf2..ace0e81 100644 --- a/scripts/common-obs.sh +++ b/scripts/common-obs.sh @@ -75,6 +75,21 @@ osmo_obs_add_depend_rpm() { "%package"*) echo "Requires: $depend" ;; + # Build recipe + "%build"*) + if [ -n "$dependver" ]; then + cat << EOF +# HACK: don't let rpmlint abort the build when it finds that a library depends +# on a package with a specific version. The path used here is listed in: +# https://build.opensuse.org/package/view_file/devel:openSUSE:Factory:rpmlint/rpmlint-mini/rpmlint-mini.config?expand=1 +# Instead of writing to the SOURCES dir, we could upload osmocom-rpmlintrc as +# additional source for each package. But that's way more effort, not worth it. +echo "setBadness('shlib-fixed-dependency', 0)" \\ + > /home/abuild/rpmbuild/SOURCES/osmocom-rpmlintrc + +EOF + fi + ;; esac done < "$spec" ) > "$spec.new" |