* [Buildroot] [PATCH] package/eudev: add libselinux dependency
@ 2015-07-30 13:27 Romain Naour
2015-07-30 13:48 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Romain Naour @ 2015-07-30 13:27 UTC (permalink / raw)
To: buildroot
Disable libselinux support with musl toolchains which doesn't have
struct mallinfo.
selinux-util.c: In function ?mac_selinux_init?:
selinux-util.c:70:25: error: storage size of ?before_mallinfo? isn?t known
struct mallinfo before_mallinfo, after_mallinfo;
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Cc: Clayton Shotwell <clshotwe@rockwellcollins.com>
---
package/eudev/eudev.mk | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
index 87bce3e..f904cdd 100644
--- a/package/eudev/eudev.mk
+++ b/package/eudev/eudev.mk
@@ -44,6 +44,15 @@ else
EUDEV_CONF_OPTS += --disable-gudev
endif
+# Disable selinux support with musl toolchains which doesn't have
+# struct mallinfo.
+ifeq ($(BR2_PACKAGE_LIBSELINUX)x$(BR2_TOOLCHAIN_USES_MUSL),yx)
+EUDEV_CONF_OPTS += --enable-selinux
+EUDEV_DEPENDENCIES += libselinux
+else
+EUDEV_CONF_OPTS += --disable-selinux
+endif
+
define EUDEV_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 package/eudev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
endef
--
2.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Buildroot] [PATCH] package/eudev: add libselinux dependency 2015-07-30 13:27 [Buildroot] [PATCH] package/eudev: add libselinux dependency Romain Naour @ 2015-07-30 13:48 ` Thomas Petazzoni 2015-07-30 14:49 ` Romain Naour 0 siblings, 1 reply; 4+ messages in thread From: Thomas Petazzoni @ 2015-07-30 13:48 UTC (permalink / raw) To: buildroot Dear Romain Naour, On Thu, 30 Jul 2015 15:27:44 +0200, Romain Naour wrote: > Disable libselinux support with musl toolchains which doesn't have > struct mallinfo. > > selinux-util.c: In function ?mac_selinux_init?: > selinux-util.c:70:25: error: storage size of ?before_mallinfo? isn?t known > struct mallinfo before_mallinfo, after_mallinfo; > > Signed-off-by: Romain Naour <romain.naour@openwide.fr> > Cc: Clayton Shotwell <clshotwe@rockwellcollins.com> Thanks for the patch, however I am not sure this is really the right fix. mallinfo() is only used to display some statistics about the heap consumption of the SELinux database, so it could be disabled. So the right fix would be to add a configure.ac check for mallinfo(), and if available, use it, and if not, remove this useless debug message. Like in configure.ac: AC_CHECK_FUNCS([mallinfo]) and then use #ifdef HAVE_MALLINFO in the code. Now the question is whether something like that would be accepted upstream. If eudev accepts its own patches that are not in systemd, then I'd say yes. If however they are really only a copy of the udev sources from systemd, we would have to get this upstream in systemd, which has no chance to happen. 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] package/eudev: add libselinux dependency 2015-07-30 13:48 ` Thomas Petazzoni @ 2015-07-30 14:49 ` Romain Naour [not found] ` <55BA6B97.8040805@gentoo.org> 0 siblings, 1 reply; 4+ messages in thread From: Romain Naour @ 2015-07-30 14:49 UTC (permalink / raw) To: buildroot Hi Thomas, All, Le 30/07/2015 15:48, Thomas Petazzoni a ?crit : > Dear Romain Naour, > > On Thu, 30 Jul 2015 15:27:44 +0200, Romain Naour wrote: >> Disable libselinux support with musl toolchains which doesn't have >> struct mallinfo. >> >> selinux-util.c: In function ?mac_selinux_init?: >> selinux-util.c:70:25: error: storage size of ?before_mallinfo? isn?t known >> struct mallinfo before_mallinfo, after_mallinfo; >> >> Signed-off-by: Romain Naour <romain.naour@openwide.fr> >> Cc: Clayton Shotwell <clshotwe@rockwellcollins.com> > > Thanks for the patch, however I am not sure this is really the right > fix. mallinfo() is only used to display some statistics about the heap > consumption of the SELinux database, so it could be disabled. > > So the right fix would be to add a configure.ac check for mallinfo(), > and if available, use it, and if not, remove this useless debug message. > > Like in configure.ac: > > AC_CHECK_FUNCS([mallinfo]) > > and then use #ifdef HAVE_MALLINFO in the code. Ok, I'll try that. It's true that my patch is a bit rude... ;-) > > Now the question is whether something like that would be accepted > upstream. If eudev accepts its own patches that are not in systemd, > then I'd say yes. If however they are really only a copy of the udev > sources from systemd, we would have to get this upstream in systemd, > which has no chance to happen. I don't know, I'm adding Anthony G. Basile in Cc. Anthony, what do you think about Thomas's proposal ? Best regards, Romain > > Thomas > ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <55BA6B97.8040805@gentoo.org>]
* [Buildroot] [PATCH] package/eudev: add libselinux dependency [not found] ` <55BA6B97.8040805@gentoo.org> @ 2015-07-30 18:45 ` Romain Naour 0 siblings, 0 replies; 4+ messages in thread From: Romain Naour @ 2015-07-30 18:45 UTC (permalink / raw) To: buildroot Hi, Le 30/07/2015 20:23, Anthony G. Basile a ?crit : > On 7/30/15 10:49 AM, Romain Naour wrote: >> Hi Thomas, All, [snip] >>> > Yeah something like that would be acceptable. I definitely support musl. > Submit it and we'll work at getting it in. > Done, see the pull request on github: https://github.com/gentoo/eudev/pull/122 Thanks! Best regards, Romain Naour ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-30 18:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30 13:27 [Buildroot] [PATCH] package/eudev: add libselinux dependency Romain Naour
2015-07-30 13:48 ` Thomas Petazzoni
2015-07-30 14:49 ` Romain Naour
[not found] ` <55BA6B97.8040805@gentoo.org>
2015-07-30 18:45 ` Romain Naour
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox