* [Buildroot] [PATCH] fix eudev really not depending kernel headers >=3.9
@ 2015-03-06 17:09 Alexey Mednyy
2015-03-06 22:48 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Mednyy @ 2015-03-06 17:09 UTC (permalink / raw)
To: buildroot
---
...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
diff --git a/package/eudev/0001-configure.ac-don-t-die-on-missing-linux-btrfs.h-fixe.patch b/package/eudev/0001-configure.ac-don-t-die-on-missing-linux-btrfs.h-fixe.patch
new file mode 100644
index 0000000..a749b08
--- /dev/null
+++ b/package/eudev/0001-configure.ac-don-t-die-on-missing-linux-btrfs.h-fixe.patch
@@ -0,0 +1,37 @@
+From 6740579367ddd2ce0b315863cdb92d34d1d693c7 Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+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 <blueness@gentoo.org>
+---
+ 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
+
diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
index 2221966..eb266a1 100644
--- a/package/eudev/eudev.mk
+++ b/package/eudev/eudev.mk
@@ -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
diff --git a/system/Config.in b/system/Config.in
index 4d1c3d2..9e2b13f 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -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
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] fix eudev really not depending kernel headers >=3.9
2015-03-06 17:09 [Buildroot] [PATCH] fix eudev really not depending kernel headers >=3.9 Alexey Mednyy
@ 2015-03-06 22:48 ` Thomas Petazzoni
2015-03-07 1:09 ` Alexey Mednyy
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-03-06 22:48 UTC (permalink / raw)
To: buildroot
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.
On Fri, 6 Mar 2015 20:09:43 +0300, Alexey Mednyy wrote:
> diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
> index 2221966..eb266a1 100644
> --- a/package/eudev/eudev.mk
> +++ b/package/eudev/eudev.mk
> @@ -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
> # mq_getattr is in librt
> EUDEV_CONF_ENV += LIBS=-lrt
> diff --git a/system/Config.in b/system/Config.in
> index 4d1c3d2..9e2b13f 100644
> --- a/system/Config.in
> +++ b/system/Config.in
> @@ -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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] fix eudev really not depending kernel headers >=3.9
2015-03-06 22:48 ` Thomas Petazzoni
@ 2015-03-07 1:09 ` Alexey Mednyy
2015-03-07 7:58 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Mednyy @ 2015-03-07 1:09 UTC (permalink / raw)
To: buildroot
Dear Thomas Petazzoni,
On 03/07/2015 01:48 AM, Thomas Petazzoni wrote:
> 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.
Thanks, will fix that in patch v2.
>
> On Fri, 6 Mar 2015 20:09:43 +0300, Alexey Mednyy wrote:
>
>> diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
>> index 2221966..eb266a1 100644
>> --- a/package/eudev/eudev.mk
>> +++ b/package/eudev/eudev.mk
>> @@ -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
>
>> # mq_getattr is in librt
>> EUDEV_CONF_ENV += LIBS=-lrt
>> diff --git a/system/Config.in b/system/Config.in
>> index 4d1c3d2..9e2b13f 100644
>> --- a/system/Config.in
>> +++ b/system/Config.in
>> @@ -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.
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.
>
> 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?
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.
--
_________________________________
Best regards, Mednyy Alexey.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] fix eudev really not depending kernel headers >=3.9
2015-03-07 1:09 ` Alexey Mednyy
@ 2015-03-07 7:58 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-03-07 7:58 UTC (permalink / raw)
To: buildroot
Dear Alexey Mednyy,
On Sat, 07 Mar 2015 04:09:43 +0300, Alexey Mednyy wrote:
> > 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.
> > 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.
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-07 7:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-06 17:09 [Buildroot] [PATCH] fix eudev really not depending kernel headers >=3.9 Alexey Mednyy
2015-03-06 22:48 ` Thomas Petazzoni
2015-03-07 1:09 ` Alexey Mednyy
2015-03-07 7:58 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox