diff mbox series

[meta-networking] drbd-utils: Fix a udev rule reproducibility

Message ID 20240304201312.1089609-1-yoann.congal@smile.fr
State Superseded
Headers show
Series [meta-networking] drbd-utils: Fix a udev rule reproducibility | expand

Commit Message

Yoann Congal March 4, 2024, 8:13 p.m. UTC
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>
---
 ...-an-option-to-disable-host-udev-vers.patch | 55 +++++++++++++++++++
 .../recipes-support/drbd/drbd-utils_9.22.0.bb |  2 +
 2 files changed, 57 insertions(+)
 create mode 100644 meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch

Comments

Khem Raj March 4, 2024, 11:47 p.m. UTC | #1
which branch is it meant for ?

On Mon, Mar 4, 2024 at 12:13 PM Yoann Congal <yoann.congal@smile.fr> wrote:
>
> 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>
> ---
>  ...-an-option-to-disable-host-udev-vers.patch | 55 +++++++++++++++++++
>  .../recipes-support/drbd/drbd-utils_9.22.0.bb |  2 +
>  2 files changed, 57 insertions(+)
>  create mode 100644 meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch
>
> 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 0000000000..5e03ff7b32
> --- /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 @@
> +From 50749a5b0eb0becb39a4edb5fe844b13bbeb5836 Mon Sep 17 00:00:00 2001
> +From: Yoann Congal <yoann.congal@smile.fr>
> +Date: Sat, 2 Mar 2024 16:23:07 +0100
> +Subject: [PATCH] configure.ac: Add an option to disable host udev version
> + checks
> +
> +In cross-compilation environment, the build host might have an outdated
> +udev or no udev at all. But the user may still want to build with the
> +enabled udev rule (for its udev-enabled target).
> +
> +This patch adds a "--disable-udevchecks" option the disable build host
> +udev version check at configure-time and unconditionally install the
> +enabled udev rule. Without this new option, the behavior stays the same
> +(checks enabled).
> +
> +Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
> +Upstream-Status: Submitted [https://lists.linbit.com/pipermail/drbd-dev/2024-March/007201.html]
> +---
> + configure.ac | 9 +++++++--
> + 1 file changed, 7 insertions(+), 2 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index d5a0e733..da083240 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -71,6 +71,11 @@ AC_ARG_WITH([udev],
> +       [AS_HELP_STRING([--with-udev],
> +                       [Enable udev integration])],
> +       [WITH_UDEV=$withval])
> ++AC_ARG_ENABLE([udevchecks],
> ++      [AS_HELP_STRING([--disable-udevchecks],
> ++                      [Disable host udev version checks])],
> ++      [],
> ++      [enable_udevchecks=yes])
> + AC_ARG_WITH([xen],
> +       [AS_HELP_STRING([--with-xen],
> +                       [Enable Xen integration])],
> +@@ -309,7 +314,7 @@ if test -z $GIT; then
> +    AC_MSG_WARN(Cannot update buildtag without git. You may safely ignore this warning when building from a tarball.)
> + fi
> +
> +-if test $UDEVADM = false && test $UDEVINFO = false; then
> ++if test "x$enable_udevchecks" != "xno" && test $UDEVADM = false && test $UDEVINFO = false; then
> +    if test "$WITH_UDEV" = "yes"; then
> +      AC_MSG_WARN([udev support enabled, but neither udevadm nor udevinfo found on this system.])
> +    fi
> +@@ -413,7 +418,7 @@ dnl default.
> + test -z $INITDIR && INITDIR="$sysconfdir/init.d"
> +
> + dnl Our udev rules file is known to work only with udev >= 85
> +-if test "$WITH_UDEV" = "yes"; then
> ++if test "x$enable_udevchecks" != "xno" && test "$WITH_UDEV" = "yes"; then
> +    udev_version=$( set -- $($UDEVADM version); echo $1 )
> +    if test -z "$udev_version"; then
> +       udev_version=$( set -- $($UDEVINFO -V); echo $3 )
> diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb b/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
> index 960260fd39..65a43d9b26 100644
> --- a/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
> +++ b/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
> @@ -12,6 +12,7 @@ SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;prot
>             file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
>             file://0001-replace-off64_t-with-off_t.patch \
>             ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
> +           file://0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch \
>             "
>  SRC_URI:append:libc-musl = " file://0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch "
>  SRCREV_drbd-utils = "409097fe02187f83790b88ac3e0d94f3c167adab"
> @@ -39,6 +40,7 @@ EXTRA_OECONF = " \
>                  --with-initscripttype=both    \
>                  --with-systemdunitdir=${systemd_unitdir}/system \
>                  --without-manual \
> +                --disable-udevchecks \
>                 "
>
>  # If we have inherited reproducible_build, we want to use it.
> --
> 2.39.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#109102): https://lists.openembedded.org/g/openembedded-devel/message/109102
> Mute This Topic: https://lists.openembedded.org/mt/104730465/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Yoann Congal March 5, 2024, 6:49 a.m. UTC | #2
Le mar. 5 mars 2024 à 00:48, Khem Raj <raj.khem@gmail.com> a écrit :

> which branch is it meant for ?
>

That was for the master branch but I missed the 9.27.0 update, sorry.

I'll rebase and send a v2.

On Mon, Mar 4, 2024 at 12:13 PM Yoann Congal <yoann.congal@smile.fr> wrote:
> >
> > 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>
> > ---
> >  ...-an-option-to-disable-host-udev-vers.patch | 55 +++++++++++++++++++
> >  .../recipes-support/drbd/drbd-utils_9.22.0.bb |  2 +
> >  2 files changed, 57 insertions(+)
> >  create mode 100644
> meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch
> >
> > 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 0000000000..5e03ff7b32
> > --- /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 @@
> > +From 50749a5b0eb0becb39a4edb5fe844b13bbeb5836 Mon Sep 17 00:00:00 2001
> > +From: Yoann Congal <yoann.congal@smile.fr>
> > +Date: Sat, 2 Mar 2024 16:23:07 +0100
> > +Subject: [PATCH] configure.ac: Add an option to disable host udev
> version
> > + checks
> > +
> > +In cross-compilation environment, the build host might have an outdated
> > +udev or no udev at all. But the user may still want to build with the
> > +enabled udev rule (for its udev-enabled target).
> > +
> > +This patch adds a "--disable-udevchecks" option the disable build host
> > +udev version check at configure-time and unconditionally install the
> > +enabled udev rule. Without this new option, the behavior stays the same
> > +(checks enabled).
> > +
> > +Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
> > +Upstream-Status: Submitted [
> https://lists.linbit.com/pipermail/drbd-dev/2024-March/007201.html]
> > +---
> > + configure.ac | 9 +++++++--
> > + 1 file changed, 7 insertions(+), 2 deletions(-)
> > +
> > +diff --git a/configure.ac b/configure.ac
> > +index d5a0e733..da083240 100644
> > +--- a/configure.ac
> > ++++ b/configure.ac
> > +@@ -71,6 +71,11 @@ AC_ARG_WITH([udev],
> > +       [AS_HELP_STRING([--with-udev],
> > +                       [Enable udev integration])],
> > +       [WITH_UDEV=$withval])
> > ++AC_ARG_ENABLE([udevchecks],
> > ++      [AS_HELP_STRING([--disable-udevchecks],
> > ++                      [Disable host udev version checks])],
> > ++      [],
> > ++      [enable_udevchecks=yes])
> > + AC_ARG_WITH([xen],
> > +       [AS_HELP_STRING([--with-xen],
> > +                       [Enable Xen integration])],
> > +@@ -309,7 +314,7 @@ if test -z $GIT; then
> > +    AC_MSG_WARN(Cannot update buildtag without git. You may safely
> ignore this warning when building from a tarball.)
> > + fi
> > +
> > +-if test $UDEVADM = false && test $UDEVINFO = false; then
> > ++if test "x$enable_udevchecks" != "xno" && test $UDEVADM = false &&
> test $UDEVINFO = false; then
> > +    if test "$WITH_UDEV" = "yes"; then
> > +      AC_MSG_WARN([udev support enabled, but neither udevadm nor
> udevinfo found on this system.])
> > +    fi
> > +@@ -413,7 +418,7 @@ dnl default.
> > + test -z $INITDIR && INITDIR="$sysconfdir/init.d"
> > +
> > + dnl Our udev rules file is known to work only with udev >= 85
> > +-if test "$WITH_UDEV" = "yes"; then
> > ++if test "x$enable_udevchecks" != "xno" && test "$WITH_UDEV" = "yes";
> then
> > +    udev_version=$( set -- $($UDEVADM version); echo $1 )
> > +    if test -z "$udev_version"; then
> > +       udev_version=$( set -- $($UDEVINFO -V); echo $3 )
> > diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
> b/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
> > index 960260fd39..65a43d9b26 100644
> > --- a/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
> > +++ b/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
> > @@ -12,6 +12,7 @@ SRC_URI = "git://
> github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;prot
> >             file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
> >             file://0001-replace-off64_t-with-off_t.patch \
> >
>  ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)}
> \
> > +
>  file://0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch \
> >             "
> >  SRC_URI:append:libc-musl = "
> file://0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch "
> >  SRCREV_drbd-utils = "409097fe02187f83790b88ac3e0d94f3c167adab"
> > @@ -39,6 +40,7 @@ EXTRA_OECONF = " \
> >                  --with-initscripttype=both    \
> >                  --with-systemdunitdir=${systemd_unitdir}/system \
> >                  --without-manual \
> > +                --disable-udevchecks \
> >                 "
> >
> >  # If we have inherited reproducible_build, we want to use it.
> > --
> > 2.39.2
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#109102):
> https://lists.openembedded.org/g/openembedded-devel/message/109102
> > Mute This Topic: https://lists.openembedded.org/mt/104730465/1997914
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
Yoann Congal March 5, 2024, 9:59 a.m. UTC | #3
Le mar. 5 mars 2024 à 07:49, Yoann CONGAL <yoann.congal@smile.fr> a écrit :

> Le mar. 5 mars 2024 à 00:48, Khem Raj <raj.khem@gmail.com> a écrit :
>
>> which branch is it meant for ?
>>
>
> That was for the master branch but I missed the 9.27.0 update, sorry.
>
> I'll rebase and send a v2.
>

v2 sent!

Thanks!


>
> On Mon, Mar 4, 2024 at 12:13 PM Yoann Congal <yoann.congal@smile.fr>
>> wrote:
>> >
>> > 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>
>> > ---
>> >  ...-an-option-to-disable-host-udev-vers.patch | 55 +++++++++++++++++++
>> >  .../recipes-support/drbd/drbd-utils_9.22.0.bb |  2 +
>> >  2 files changed, 57 insertions(+)
>> >  create mode 100644
>> meta-networking/recipes-support/drbd/drbd-utils/0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch
>> >
>> > 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 0000000000..5e03ff7b32
>> > --- /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 @@
>> > +From 50749a5b0eb0becb39a4edb5fe844b13bbeb5836 Mon Sep 17 00:00:00 2001
>> > +From: Yoann Congal <yoann.congal@smile.fr>
>> > +Date: Sat, 2 Mar 2024 16:23:07 +0100
>> > +Subject: [PATCH] configure.ac: Add an option to disable host udev
>> version
>> > + checks
>> > +
>> > +In cross-compilation environment, the build host might have an outdated
>> > +udev or no udev at all. But the user may still want to build with the
>> > +enabled udev rule (for its udev-enabled target).
>> > +
>> > +This patch adds a "--disable-udevchecks" option the disable build host
>> > +udev version check at configure-time and unconditionally install the
>> > +enabled udev rule. Without this new option, the behavior stays the same
>> > +(checks enabled).
>> > +
>> > +Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
>> > +Upstream-Status: Submitted [
>> https://lists.linbit.com/pipermail/drbd-dev/2024-March/007201.html]
>> > +---
>> > + configure.ac | 9 +++++++--
>> > + 1 file changed, 7 insertions(+), 2 deletions(-)
>> > +
>> > +diff --git a/configure.ac b/configure.ac
>> > +index d5a0e733..da083240 100644
>> > +--- a/configure.ac
>> > ++++ b/configure.ac
>> > +@@ -71,6 +71,11 @@ AC_ARG_WITH([udev],
>> > +       [AS_HELP_STRING([--with-udev],
>> > +                       [Enable udev integration])],
>> > +       [WITH_UDEV=$withval])
>> > ++AC_ARG_ENABLE([udevchecks],
>> > ++      [AS_HELP_STRING([--disable-udevchecks],
>> > ++                      [Disable host udev version checks])],
>> > ++      [],
>> > ++      [enable_udevchecks=yes])
>> > + AC_ARG_WITH([xen],
>> > +       [AS_HELP_STRING([--with-xen],
>> > +                       [Enable Xen integration])],
>> > +@@ -309,7 +314,7 @@ if test -z $GIT; then
>> > +    AC_MSG_WARN(Cannot update buildtag without git. You may safely
>> ignore this warning when building from a tarball.)
>> > + fi
>> > +
>> > +-if test $UDEVADM = false && test $UDEVINFO = false; then
>> > ++if test "x$enable_udevchecks" != "xno" && test $UDEVADM = false &&
>> test $UDEVINFO = false; then
>> > +    if test "$WITH_UDEV" = "yes"; then
>> > +      AC_MSG_WARN([udev support enabled, but neither udevadm nor
>> udevinfo found on this system.])
>> > +    fi
>> > +@@ -413,7 +418,7 @@ dnl default.
>> > + test -z $INITDIR && INITDIR="$sysconfdir/init.d"
>> > +
>> > + dnl Our udev rules file is known to work only with udev >= 85
>> > +-if test "$WITH_UDEV" = "yes"; then
>> > ++if test "x$enable_udevchecks" != "xno" && test "$WITH_UDEV" = "yes";
>> then
>> > +    udev_version=$( set -- $($UDEVADM version); echo $1 )
>> > +    if test -z "$udev_version"; then
>> > +       udev_version=$( set -- $($UDEVINFO -V); echo $3 )
>> > diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
>> b/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
>> > index 960260fd39..65a43d9b26 100644
>> > --- a/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
>> > +++ b/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
>> > @@ -12,6 +12,7 @@ SRC_URI = "git://
>> github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;prot
>> >             file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
>> >             file://0001-replace-off64_t-with-off_t.patch \
>> >
>>  ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)}
>> \
>> > +
>>  file://0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch \
>> >             "
>> >  SRC_URI:append:libc-musl = "
>> file://0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch "
>> >  SRCREV_drbd-utils = "409097fe02187f83790b88ac3e0d94f3c167adab"
>> > @@ -39,6 +40,7 @@ EXTRA_OECONF = " \
>> >                  --with-initscripttype=both    \
>> >                  --with-systemdunitdir=${systemd_unitdir}/system \
>> >                  --without-manual \
>> > +                --disable-udevchecks \
>> >                 "
>> >
>> >  # If we have inherited reproducible_build, we want to use it.
>> > --
>> > 2.39.2
>> >
>> >
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> > Links: You receive all messages sent to this group.
>> > View/Reply Online (#109102):
>> https://lists.openembedded.org/g/openembedded-devel/message/109102
>> > Mute This Topic: https://lists.openembedded.org/mt/104730465/1997914
>> > Group Owner: openembedded-devel+owner@lists.openembedded.org
>> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
>> [raj.khem@gmail.com]
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> >
>>
> --
> Yoann Congal - Smile ECS
>
diff mbox series

Patch

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 0000000000..5e03ff7b32
--- /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 @@ 
+From 50749a5b0eb0becb39a4edb5fe844b13bbeb5836 Mon Sep 17 00:00:00 2001
+From: Yoann Congal <yoann.congal@smile.fr>
+Date: Sat, 2 Mar 2024 16:23:07 +0100
+Subject: [PATCH] configure.ac: Add an option to disable host udev version
+ checks
+
+In cross-compilation environment, the build host might have an outdated
+udev or no udev at all. But the user may still want to build with the
+enabled udev rule (for its udev-enabled target).
+
+This patch adds a "--disable-udevchecks" option the disable build host
+udev version check at configure-time and unconditionally install the
+enabled udev rule. Without this new option, the behavior stays the same
+(checks enabled).
+
+Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
+Upstream-Status: Submitted [https://lists.linbit.com/pipermail/drbd-dev/2024-March/007201.html]
+---
+ configure.ac | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d5a0e733..da083240 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,6 +71,11 @@ AC_ARG_WITH([udev],
+ 	[AS_HELP_STRING([--with-udev],
+ 			[Enable udev integration])],
+ 	[WITH_UDEV=$withval])
++AC_ARG_ENABLE([udevchecks],
++	[AS_HELP_STRING([--disable-udevchecks],
++			[Disable host udev version checks])],
++	[],
++	[enable_udevchecks=yes])
+ AC_ARG_WITH([xen],
+ 	[AS_HELP_STRING([--with-xen],
+ 			[Enable Xen integration])],
+@@ -309,7 +314,7 @@ if test -z $GIT; then
+    AC_MSG_WARN(Cannot update buildtag without git. You may safely ignore this warning when building from a tarball.)
+ fi
+ 
+-if test $UDEVADM = false && test $UDEVINFO = false; then
++if test "x$enable_udevchecks" != "xno" && test $UDEVADM = false && test $UDEVINFO = false; then
+    if test "$WITH_UDEV" = "yes"; then
+      AC_MSG_WARN([udev support enabled, but neither udevadm nor udevinfo found on this system.])
+    fi
+@@ -413,7 +418,7 @@ dnl default.
+ test -z $INITDIR && INITDIR="$sysconfdir/init.d"
+ 
+ dnl Our udev rules file is known to work only with udev >= 85
+-if test "$WITH_UDEV" = "yes"; then
++if test "x$enable_udevchecks" != "xno" && test "$WITH_UDEV" = "yes"; then
+    udev_version=$( set -- $($UDEVADM version); echo $1 )
+    if test -z "$udev_version"; then
+ 	udev_version=$( set -- $($UDEVINFO -V); echo $3 )
diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb b/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
index 960260fd39..65a43d9b26 100644
--- a/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
+++ b/meta-networking/recipes-support/drbd/drbd-utils_9.22.0.bb
@@ -12,6 +12,7 @@  SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;prot
            file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
            file://0001-replace-off64_t-with-off_t.patch \
            ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
+           file://0001-configure.ac-Add-an-option-to-disable-host-udev-vers.patch \
            "
 SRC_URI:append:libc-musl = " file://0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch "
 SRCREV_drbd-utils = "409097fe02187f83790b88ac3e0d94f3c167adab"
@@ -39,6 +40,7 @@  EXTRA_OECONF = " \
                 --with-initscripttype=both    \
                 --with-systemdunitdir=${systemd_unitdir}/system \
                 --without-manual \
+                --disable-udevchecks \
                "
 
 # If we have inherited reproducible_build, we want to use it.