Message ID | 20201006153726.790986-2-antoine.tenart@bootlin.com |
---|---|
State | Superseded |
Headers | show |
Series | [v2,1/2] package/mtd: add host-acl dependency for host | expand |
Antoine, On Tue, Oct 6, 2020 at 10:39 AM Antoine Tenart <antoine.tenart@bootlin.com> wrote: > > This patch sets the --with-xattr option when generating an image with > mkfs.jffs2 if BR2_PACKAGE_LIBSELINUX is selected, so that SELinux > security contexts will be kept and available in jffs2 images. > > Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Reviewed-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Antoine, All, On 2020-10-06 17:37 +0200, Antoine Tenart spake thusly: > This patch sets the --with-xattr option when generating an image with > mkfs.jffs2 if BR2_PACKAGE_LIBSELINUX is selected, so that SELinux > security contexts will be kept and available in jffs2 images. > > Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> > --- > > Since v1: > - s/BR2_PACKAGE_REFPOLICY/BR2_PACKAGE_LIBSELINUX/ > > fs/jffs2/jffs2.mk | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/fs/jffs2/jffs2.mk b/fs/jffs2/jffs2.mk > index 2adbc2320e38..d93ba58ded6e 100644 > --- a/fs/jffs2/jffs2.mk > +++ b/fs/jffs2/jffs2.mk > @@ -35,6 +35,10 @@ JFFS2_OPTS += -n > SUMTOOL_OPTS += -n > endif > > +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) > +JFFS2_OPTS += --with-xattr > +endif Does that means that, if people are using extended attributes in their device tables [0], then their jffs2 filesystem will not carry those xattrs? [0] https://buildroot.org/downloads/manual/manual.html#makedev-syntax Basically, I fiond it dubious that a filesystem option depens on a package being enabled or not. Regards, Yann E. MORIN. > ROOTFS_JFFS2_DEPENDENCIES = host-mtd > > ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),) > -- > 2.26.2 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
On Tue, 6 Oct 2020 23:09:02 +0200 "Yann E. MORIN" <yann.morin.1998@free.fr> wrote: > Does that means that, if people are using extended attributes in their > device tables [0], then their jffs2 filesystem will not carry those > xattrs? Correct. > Basically, I fiond it dubious that a filesystem option depens on a > package being enabled or not. True, but what do you suggest? That we unconditionally enable xattr support when generating a JFFS2 image? Thomas
Hello, Quoting Thomas Petazzoni (2020-10-06 23:14:02) > On Tue, 6 Oct 2020 23:09:02 +0200 > "Yann E. MORIN" <yann.morin.1998@free.fr> wrote: > > > Basically, I fiond it dubious that a filesystem option depens on a > > package being enabled or not. > > True, but what do you suggest? That we unconditionally enable xattr > support when generating a JFFS2 image? Enabling xattr support unconditionally would be consistent with what is done with ext images (mkfs.extX does copy the xattr by default unless explicitly disabled). Should I post a v3 with the condition on BR2_PACKAGE_LIBSELINUX removed? Thanks, Antoine
On Thu, 08 Oct 2020 09:49:34 +0200 Antoine Tenart <antoine.tenart@bootlin.com> wrote: > Quoting Thomas Petazzoni (2020-10-06 23:14:02) > > On Tue, 6 Oct 2020 23:09:02 +0200 > > "Yann E. MORIN" <yann.morin.1998@free.fr> wrote: > > > > > Basically, I fiond it dubious that a filesystem option depens on a > > > package being enabled or not. > > > > True, but what do you suggest? That we unconditionally enable xattr > > support when generating a JFFS2 image? > > Enabling xattr support unconditionally would be consistent with what is > done with ext images (mkfs.extX does copy the xattr by default unless > explicitly disabled). > > Should I post a v3 with the condition on BR2_PACKAGE_LIBSELINUX removed? I would say yes. Thanks! Thomas
diff --git a/fs/jffs2/jffs2.mk b/fs/jffs2/jffs2.mk index 2adbc2320e38..d93ba58ded6e 100644 --- a/fs/jffs2/jffs2.mk +++ b/fs/jffs2/jffs2.mk @@ -35,6 +35,10 @@ JFFS2_OPTS += -n SUMTOOL_OPTS += -n endif +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +JFFS2_OPTS += --with-xattr +endif + ROOTFS_JFFS2_DEPENDENCIES = host-mtd ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),)
This patch sets the --with-xattr option when generating an image with mkfs.jffs2 if BR2_PACKAGE_LIBSELINUX is selected, so that SELinux security contexts will be kept and available in jffs2 images. Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> --- Since v1: - s/BR2_PACKAGE_REFPOLICY/BR2_PACKAGE_LIBSELINUX/ fs/jffs2/jffs2.mk | 4 ++++ 1 file changed, 4 insertions(+)