osmith submitted this change.

View Change


Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved
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
---
M debian/control
M debian/rules
2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/debian/control b/debian/control
index 1f1975e..e6b96e1 100644
--- a/debian/control
+++ b/debian/control
@@ -2,6 +2,7 @@
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 @@
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 efa5adc..f0105b4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,7 +25,7 @@
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 @@
--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

To view, visit change 34260. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If18d6543fae9537c8b188e90499491bda3fdfe59
Gerrit-Change-Number: 34260
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged