fix eudev really not depending kernel headers >=3.9
PATCH 1/1 fix eudev really not depending kernel headers >=3.9
--- ...c-don-t-die-on-missing-linux-btrfs.h-fixe.patch | 37 ++++++++++++++++++++++ package/eudev/eudev.mk | 1 + system/Config.in | 7 ++-- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 package/eudev/0001-configure.ac-don-t-die-on-missing-linux-btrfs.h-fixe.patch
package/eudev/0001-configure.ac-don-t-die-on-missing-linux-btrfs.h-fixe.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 6740579367ddd2ce0b315863cdb92d34d1d693c7 Mon Sep 17 00:00:00 2001 +From: "Anthony G. Basile" <[email protected]> +Date: Sun, 16 Nov 2014 13:40:43 -0500 +Subject: [PATCH] configure.ac: don't die on missing linux/btrfs.h, fixes issue + #100 + +Signed-off-by: Anthony G. Basile <[email protected]> +--- + configure.ac | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index a3747f9..dbca833 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -49,11 +49,17 @@ AC_CHECK_HEADERS( + ) + + AC_CHECK_HEADERS( +- [linux/btrfs.h mtd/mtd-user.h], ++ [mtd/mtd-user.h], + [], + [AC_MSG_ERROR([*** KERNEL header not found])] + ) + ++AC_CHECK_HEADERS( ++ [linux/btrfs.h], ++ [], ++ [AC_MSG_WARN([*** KERNEL header not found])] ++) ++ + # Checks for typedefs, structures, and compiler characteristics. + AC_TYPE_UID_T + AC_C_INLINE +-- +1.9.1 +
package/eudev/eudev.mk +1 -0
@@ -10,6 +10,7 @@ EUDEV_SITE = http://dev.gentoo.org/~blueness/eudev EUDEV_LICENSE = GPLv2+ (programs), LGPLv2.1+ (libraries) EUDEV_LICENSE_FILES = COPYING EUDEV_INSTALL_STAGING = YES +EUDEV_AUTORECONF = YES # mq_getattr is in librt EUDEV_CONF_ENV += LIBS=-lrt
system/Config.in +3 -4
@@ -128,13 +128,12 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV depends on BR2_USE_WCHAR depends on !BR2_STATIC_LIBS depends on BR2_USE_MMU # eudev - depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 +# depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 select BR2_PACKAGE_EUDEV -comment "eudev needs a toolchain w/ largefile, wchar, dynamic library, headers >= 3.9" +comment "eudev needs a toolchain w/ largefile, wchar, dynamic library" depends on BR2_USE_MMU - depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_STATIC_LIBS \ - || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_STATIC_LIBS endchoice
Signature · 1 line
1.9.1
PATCH 1/1 fix eudev really not depending kernel headers >=3.9
Dear Alexey Mednyy,
Thanks for this contribution, see some comments below.
The commit title should be something like:
eudev: relax dependency on kernel headers version
at least, the format should almost always be:
<package name>: <description>
Also, since the patch is doing not so trivial things, an empty commit log is a bit strange.
package/eudev/eudev.mk EUDEV_SITE = http://dev.gentoo.org/~blueness/eudev · line 13
Quoted 9 lines · Alexey Mednyy
package/eudev/eudev.mk +1
-0@@ -10,6 +10,7 @@ EUDEV_SITE = http://dev.gentoo.org/~blueness/eudev EUDEV_LICENSE = GPLv2+ (programs), LGPLv2.1+ (libraries) EUDEV_LICENSE_FILES = COPYING EUDEV_INSTALL_STAGING = YES +EUDEV_AUTORECONF = YES
Add a comment above this line saying:
# We're patching configure.ac
system/Config.in config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV · line 131
Quoted 12 lines
package/eudev/eudev.mk +0
-0# mq_getattr is in librt EUDEV_CONF_ENV += LIBS=-lrtsystem/Config.in +1
-1@@ -128,13 +128,12 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV depends on BR2_USE_WCHAR depends on !BR2_STATIC_LIBS depends on BR2_USE_MMU # eudev - depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 +# depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
On which kernel headers version does eudev now depends? If it really builds with old 2.6 kernel headers, then just get rid of this line instead of commenting it out.
However, looking at the eudev source code, I don't see how your solution can fix the problem. Indeed src/udev/udev-builtin-btrfs.c only includes <linux/btrfs.h> if HAVE_LINUX_BTRFS_H is defined. But it uses BTRFS_IOC_DEVICES_READY unconditionally, and this definition is only available in <linux/btrfs.h>.
Can you expand a little bit on how this can work? Maybe I missed something obvious?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 fix eudev really not depending kernel headers >=3.9
Dear Thomas Petazzoni,
Quoted 6 lines · Thomas Petazzoni
Dear Alexey Mednyy,
Thanks for this contribution, see some comments below.
The commit title should be something like:
Quoted 8 lines
eudev: relax dependency on kernel headers version
at least, the format should almost always be:
<package name>: <description>
Also, since the patch is doing not so trivial things, an empty commit log is a bit strange.
Thanks, will fix that in patch v2.
Quoted 16 lines · Alexey Mednyy
package/eudev/eudev.mk EUDEV_SITE = http://dev.gentoo.org/~blueness/eudev · line 13
Quoted 10 lines
package/eudev/eudev.mk +1
-0@@ -10,6 +10,7 @@ EUDEV_SITE = http://dev.gentoo.org/~blueness/eudev EUDEV_LICENSE = GPLv2+ (programs), LGPLv2.1+ (libraries) EUDEV_LICENSE_FILES = COPYING EUDEV_INSTALL_STAGING = YES +EUDEV_AUTORECONF = YESAdd a comment above this line saying:
# We're patching configure.ac
Quoted 15 lines
system/Config.in config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV · line 131
Quoted 12 lines
package/eudev/eudev.mk +0
-0# mq_getattr is in librt EUDEV_CONF_ENV += LIBS=-lrtsystem/Config.in +1
-1@@ -128,13 +128,12 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV depends on BR2_USE_WCHAR depends on !BR2_STATIC_LIBS depends on BR2_USE_MMU # eudev - depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 +# depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9On which kernel headers version does eudev now depends? If it really builds with old 2.6 kernel headers, then just get rid of this line instead of commenting it out.
I'm currently successfully built roots with headers of 2.6.36 and yes I used to delete this line, but forgot it (commented and started test build). Will fix in patch v2.
Quoted 9 lines
However, looking at the eudev source code, I don't see how your solution can fix the problem. Indeed
src/udev/udev-builtin-btrfs.conly includes <linux/btrfs.h> ifHAVE_LINUX_BTRFS_His defined. But it usesBTRFS_IOC_DEVICES_READYunconditionally, and this definition is only available in <linux/btrfs.h>.Can you expand a little bit on how this can work? Maybe I missed something obvious?
I'm not sure why, but seem older kernels - reason for inclusion of BTRFS_IOC_DEVICES_READY in src/shared/missing.h header in eudev.
Thanks.
Signature · 2 lines
_________________________________ Best regards, Mednyy Alexey.
PATCH 1/1 fix eudev really not depending kernel headers >=3.9
Dear Alexey Mednyy,
Quoted 6 lines · Alexey Mednyy
Quoted 3 lines
On which kernel headers version does eudev now depends? If it really builds with old 2.6 kernel headers, then just get rid of this line instead of commenting it out.
I'm currently successfully built roots with headers of 2.6.36 and yes I used to delete this line, but forgot it (commented and started test build). Will fix in patch v2.
Ok, then it's alright, just remove this line.
Quoted 4 lines
Quoted 2 lines
Can you expand a little bit on how this can work? Maybe I missed something obvious?
I'm not sure why, but seem older kernels - reason for inclusion of
BTRFS_IOC_DEVICES_READYinsrc/shared/missing.hheader in eudev.
Ah, yes, indeed that's how it can work. Thanks for the clarification.
Then yes, please resend a v2 with a better title, and the "depends on" line removed instead of commented out.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com