diff options
author | Oliver Smith <osmith@sysmocom.de> | 2023-08-31 12:40:22 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2023-08-31 14:48:49 +0200 |
commit | 405e7cc9714a7f14884a6b1ffe07871eb97b599e (patch) | |
tree | 5f85ab76d411a801a1abd0bf8f08f57dd1d0d5d9 | |
parent | 3236fdffd6c1c94c350d6f7b99806a6ede12e5ce (diff) |
debian: fix build on ubuntu 20.04 without liburing
Ubuntu 20.04 is based on debian 11, but does not have liburing. Extend
the logic to cover this distribution too, so building packages for it
isn't stuck anymore on libosmocore not being able to resolve the
liburing-dev dependency.
I have verified that this makes libosmocore properly build with/without
liburing on debian 10, 11 and ubuntu 20.04 and 22.04.
Fixes: e486e012 ("debian: depend on liburing-dev for debian >= 11")
Change-Id: If18d6543fae9537c8b188e90499491bda3fdfe59
-rw-r--r-- | debian/control | 3 | ||||
-rwxr-xr-x | debian/rules | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/debian/control b/debian/control index 1f1975e9..e6b96e10 100644 --- a/debian/control +++ b/debian/control @@ -2,6 +2,7 @@ Source: libosmocore Maintainer: Osmocom team <openbsc@lists.osmocom.org> Section: libs Priority: optional +# liburing-dev: don't try to install it on debian 10 and ubuntu 20.04 Build-Depends: debhelper (>= 10), autotools-dev, autoconf, @@ -19,7 +20,7 @@ Build-Depends: debhelper (>= 10), libusb-1.0-0-dev, libmnl-dev, libsystemd-dev, - base-files (<< 11) | liburing-dev, + liburing-dev | base-files (<< 11) | ubuntu-keyring (<< 2021), python3:native Standards-Version: 3.9.8 Vcs-Git: https://gitea.osmocom.org/osmocom/libosmocore diff --git a/debian/rules b/debian/rules index efa5adcd..f0105b43 100755 --- a/debian/rules +++ b/debian/rules @@ -25,7 +25,7 @@ override_dh_install: override_dh_auto_test: dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) -# Set --disable-uring for debian < 11 based distributions +# Set --disable-uring for debian 10 and ubuntu 20.04 override_dh_auto_configure: set -x && \ CONFIGURE_FLAGS=" \ @@ -33,8 +33,8 @@ override_dh_auto_configure: --enable-static \ --enable-systemd-logging \ "; \ - base_ver="$$(dpkg -l base-files | grep "^ii" | awk '{print $$3}')"; \ - if dpkg --compare-versions "$$base_ver" lt 11; then \ + distro_v=$$(. /etc/os-release && echo $$VERSION_ID); \ + if [ "$$distro_v" = 10 ] || [ "$$distro_v" = 20.04 ]; then \ CONFIGURE_FLAGS="$$CONFIGURE_FLAGS --disable-uring"; \ fi; \ dh_auto_configure -- $$CONFIGURE_FLAGS |