summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorYoann Congal <yoann.congal@smile.fr>2024-03-05 10:57:52 +0100
committerKhem Raj <raj.khem@gmail.com>2024-03-05 11:02:04 -0800
commit0776d3b4e7b0a3d13b755897d1a7ecf3819bf286 (patch)
treefddda6f4ebeefa1a31404eb8fc2ec6ccfd4c5b02 /meta-networking
parent2a6722d1d9a9f4641a3f820c339b55964142c0a0 (diff)
downloadmeta-openembedded-0776d3b4e7b0a3d13b755897d1a7ecf3819bf286.tar.gz
drbd-utils: Fix a udev rule reproducibility
drbd-utils configure step check the build host udev version to enable or disable the target udev rule. This leads to a clear non-reproducibility. This patch fixes this by adding a configure option to the configure step which allows to skip the udev version checks and unconditionally enable the udev rule. Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch55
-rw-r--r--meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb2
2 files changed, 57 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch b/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch
new file mode 100644
index 000000000..b98e1e70c
--- /dev/null
+++ b/meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch
@@ -0,0 +1,55 @@
1From 61991db099f66348dddbc3408e7ee8c05bda85cb Mon Sep 17 00:00:00 2001
2From: Yoann Congal <yoann.congal@smile.fr>
3Date: Sat, 2 Mar 2024 16:23:07 +0100
4Subject: [PATCH] configure.ac: Add an option to disable host udev version
5 checks
6
7In cross-compilation environment, the build host might have an outdated
8udev or no udev at all. But the user may still want to build with the
9enabled udev rule (for its udev-enabled target).
10
11This patch adds a "--disable-udevchecks" option the disable build host
12udev version check at configure-time and unconditionally install the
13enabled udev rule. Without this new option, the behavior stays the same
14(checks enabled).
15
16Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
17Upstream-Status: Backport [https://github.com/LINBIT/drbd-utils/commit/f2b5a7335ae52109dfb95a9d99ae20519c43d59a]
18---
19 configure.ac | 9 +++++++--
20 1 file changed, 7 insertions(+), 2 deletions(-)
21
22diff --git a/configure.ac b/configure.ac
23index f1d69ea3..4c56d33b 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -71,6 +71,11 @@ AC_ARG_WITH([udev],
27 [AS_HELP_STRING([--with-udev],
28 [Enable udev integration])],
29 [WITH_UDEV=$withval])
30+AC_ARG_ENABLE([udevchecks],
31+ [AS_HELP_STRING([--disable-udevchecks],
32+ [Disable host udev version checks])],
33+ [],
34+ [enable_udevchecks=yes])
35 AC_ARG_WITH([xen],
36 [AS_HELP_STRING([--with-xen],
37 [Enable Xen integration])],
38@@ -315,7 +320,7 @@ if test -z $GIT; then
39 AC_MSG_WARN(Cannot update buildtag without git. You may safely ignore this warning when building from a tarball.)
40 fi
41
42-if test $UDEVADM = false && test $UDEVINFO = false; then
43+if test "x$enable_udevchecks" != "xno" && test $UDEVADM = false && test $UDEVINFO = false; then
44 if test "$WITH_UDEV" = "yes"; then
45 AC_MSG_WARN([udev support enabled, but neither udevadm nor udevinfo found on this system.])
46 fi
47@@ -423,7 +428,7 @@ else
48 test -z $INITDIR && INITDIR="$sysconfdir/init.d"
49
50 dnl Our udev rules file is known to work only with udev >= 85
51- if test "$WITH_UDEV" = "yes"; then
52+ if test "x$enable_udevchecks" != "xno" && test "$WITH_UDEV" = "yes"; then
53 udev_version=$( set -- $($UDEVADM version); echo $1 )
54 if test -z "$udev_version"; then
55 udev_version=$( set -- $($UDEVINFO -V); echo $3 )
diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb b/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb
index c99717839..63f0fd18c 100644
--- a/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb
+++ b/meta-networking/recipes-support/drbd/drbd-utils_9.27.0.bb
@@ -11,6 +11,7 @@ SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;prot
11 git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \ 11 git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \
12 file://0001-drbdmon-add-LDFLAGS-when-linking.patch \ 12 file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
13 ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \ 13 ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
14 file://0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch \
14 " 15 "
15SRCREV_drbd-utils = "fdd9a4d603a9dc99d110d8bd0e288d7c0b6f586e" 16SRCREV_drbd-utils = "fdd9a4d603a9dc99d110d8bd0e288d7c0b6f586e"
16SRCREV_drbd-headers = "0349f00825b4198d4ec3248f43884114a187676a" 17SRCREV_drbd-headers = "0349f00825b4198d4ec3248f43884114a187676a"
@@ -40,6 +41,7 @@ EXTRA_OECONF = " \
40 --with-initscripttype=both \ 41 --with-initscripttype=both \
41 --with-systemdunitdir=${systemd_unitdir}/system \ 42 --with-systemdunitdir=${systemd_unitdir}/system \
42 --without-manual \ 43 --without-manual \
44 --disable-udevchecks \
43 " 45 "
44 46
45# If we have inherited reproducible_build, we want to use it. 47# If we have inherited reproducible_build, we want to use it.