SELinux Buildroot Additions
cover SELinux Buildroot Additions
Submitting an initial patch set to add SELinux support to Buildroot. This patch set adds packages required for an SELinux system along with the packages needed to build them.
The next patch set will be a set to add flags into existing packages to enable SELinux support in those packages. A final set of patches will be submitted to give an example SELinux configuration that targets a specific platform.
A couple of note on these packages. The audit package contains a large patch to add support for cross compiling. This patch has been submitted to the audit developers for incorporation into their build structure. There are several patches fixing the makefiles of packages to enable cross compiling.
Clayton Shotwell (17):
libsepol: new package
libselinux: new package
ustr: new package
libsemanage: new package
checkpolicy: new package
sepolgen: new package
setools: new package
libcgroup: new package
policycoreutils: new package
python-pyxml: new package
refpolicy: new package
python-pyparsing: Add host build option
audit: new package
shadow: new package
pcre: Add host build support
bzip2: Add host build shared library installation
sqlite: Add host build support
package/Config.in | 18 + package/audit/Config.in | 26 + package/audit/S14auditd | 172 +++ ...audit-2.3.1-crossCompileHeaderCreationFix.patch | 1388 ++++++++++++++++++++ package/audit/audit-2.3.1-remove-zos-plugin.patch | 31 + package/audit/audit.mk | 61 + package/bzip2/bzip2.mk | 2 + package/checkpolicy/Config.in | 11 + package/checkpolicy/checkpolicy.mk | 71 + package/libcgroup/Config.in | 4 + package/libcgroup/libcgroup.mk | 22 + package/libselinux/Config.in | 22 + package/libselinux/libselinux.mk | 128 ++ package/libsemanage/Config.in | 21 + .../libsemanage-2.1.10-execptionLibPathFix.patch | 10 + package/libsemanage/libsemanage.mk | 113 ++ package/libsepol/Config.in | 7 + package/libsepol/libsepol.mk | 69 + package/pcre/pcre.mk | 1 + package/policycoreutils/Config.in | 64 + package/policycoreutils/S15restorecond | 85 ++ .../policycoreutils-crossCompileFixes.patch | 328 +++++ package/policycoreutils/policycoreutils.mk | 200 +++ package/python-pyparsing/python-pyparsing.mk | 47 +- package/python-pyxml/Config.in | 11 + package/python-pyxml/python-xml.mk | 64 + package/refpolicy/Config.in | 87 ++ package/refpolicy/S12selinux | 134 ++ package/refpolicy/config | 10 + .../refpolicy-001-gentoo_hardened_fixes.patch | 1250 ++++++++++++++++++ package/refpolicy/refpolicy.mk | 84 ++ package/sepolgen/Config.in | 7 + package/sepolgen/sepolgen.mk | 46 + package/setools/Config.in | 22 + .../setools/setools-0001-cross_compile_fixes.patch | 116 ++ .../setools-0002-swig_typedef_python_fixes.patch | 1010 ++++++++++++++ package/setools/setools.mk | 91 ++ package/shadow/Config.in | 13 + package/shadow/shadow.mk | 53 + package/sqlite/sqlite.mk | 1 + package/ustr/Config.in | 6 + .../ustr-1.0.4-crossCompileModifications.patch | 104 ++ package/ustr/ustr.mk | 68 + 43 files changed, 6065 insertions(+), 13 deletions(-) create mode 100644 package/audit/Config.in create mode 100755 package/audit/S14auditd create mode 100644 package/audit/audit-2.3.1-crossCompileHeaderCreationFix.patch create mode 100644 package/audit/audit-2.3.1-remove-zos-plugin.patch create mode 100644 package/audit/audit.mk create mode 100644 package/checkpolicy/Config.in create mode 100644 package/checkpolicy/checkpolicy.mk create mode 100644 package/libcgroup/Config.in create mode 100644 package/libcgroup/libcgroup.mk create mode 100644 package/libselinux/Config.in create mode 100644 package/libselinux/libselinux.mk create mode 100644 package/libsemanage/Config.in create mode 100644 package/libsemanage/libsemanage-2.1.10-execptionLibPathFix.patch create mode 100644 package/libsemanage/libsemanage.mk create mode 100644 package/libsepol/Config.in create mode 100644 package/libsepol/libsepol.mk create mode 100644 package/policycoreutils/Config.in create mode 100755 package/policycoreutils/S15restorecond create mode 100644 package/policycoreutils/policycoreutils-crossCompileFixes.patch create mode 100644 package/policycoreutils/policycoreutils.mk create mode 100644 package/python-pyxml/Config.in create mode 100644 package/python-pyxml/python-xml.mk create mode 100644 package/refpolicy/Config.in create mode 100644 package/refpolicy/S12selinux create mode 100755 package/refpolicy/config create mode 100644 package/refpolicy/refpolicy-001-gentoo_hardened_fixes.patch create mode 100644 package/refpolicy/refpolicy.mk create mode 100644 package/sepolgen/Config.in create mode 100644 package/sepolgen/sepolgen.mk create mode 100644 package/setools/Config.in create mode 100644 package/setools/setools-0001-cross_compile_fixes.patch create mode 100644 package/setools/setools-0002-swig_typedef_python_fixes.patch create mode 100644 package/setools/setools.mk create mode 100644 package/shadow/Config.in create mode 100644 package/shadow/shadow.mk create mode 100644 package/ustr/Config.in create mode 100644 package/ustr/ustr-1.0.4-crossCompileModifications.patch create mode 100644 package/ustr/ustr.mk
PATCH 1/17 libsepol: new package
--- package/Config.in | 4 ++ package/libsepol/Config.in | 7 ++++ package/libsepol/libsepol.mk | 69 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 0 deletions(-) create mode 100644 package/libsepol/Config.in create mode 100644 package/libsepol/libsepol.mk
package/Config.in +4 -0
@@ -896,6 +896,10 @@ endif source "package/xmlstarlet/Config.in" endmenu +menu "Security" +source "package/libsepol/Config.in" +endmenu + menu "System tools" source "package/acl/Config.in" source "package/attr/Config.in"
package/libsepol/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBSEPOL + bool "libsepol" + help + Libsepol is the binary policy manipulation library. It doesn't + depend upon or use any of the other SELinux components. + + http://selinuxproject.org/page/Main_Page
package/libsepol/libsepol.mk new file +69 -0
69 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 1/17 libsepol: new package
Dear Clayton Shotwell,
package/Config.in endif · line 901
Quoted 3 lines · Clayton Shotwell
package/Config.in +3
-0+menu "Security" +source "package/libsepol/Config.in" +endmenu
You're introducing this new menu directly under "Target packages", while this package (and a few of the others you're adding) are libraries, so they should be under "Target packages -> Libraries".
I have nothing against adding both "Target packages -> Security" and "Target packages -> Libraries -> Security", but that would require a quick look at the existing packages that would also fit in those new categories.
Quoted 22 lines
menu "System tools"
source "package/acl/Config.in"
source "package/attr/Config.in"package/libsepol/Config.in new file +7
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBSEPOL + bool "libsepol" + help + Libsepol is the binary policy manipulation library. It doesn't + depend upon or use any of the other SELinux components. + + http://selinuxproject.org/page/Main_Pagepackage/libsepol/libsepol.mk new file +0
-0
package/libsepol/libsepol.mk line 5
Quoted 5 lines
package/libsepol/libsepol.mk new file +5
-0@@ -0,0 +1,69 @@ +############################################################# +# +# libsepol +# +#############################################################
Nitpick: those ### lines should have 80 dashes, and there should be one empty line between this header and the first variables.
package/libsepol/libsepol.mk line 7
Quoted 2 lines
package/libsepol/libsepol.mk new file +2
-0+LIBSEPOL_VERSION = 2.1.9 +LIBSEPOL_SOURCE = libsepol-$(LIBSEPOL_VERSION).tar.gz
This last line is not needed, since it's the default.
package/libsepol/libsepol.mk line 9
Quoted 2 lines
package/libsepol/libsepol.mk new file +2
-0+LIBSEPOL_SITE = http://userspace.selinuxproject.org/releases/20130423/ +LIBSEPOL_LICENSE = LGPLv2.1
Is it really LGPLv2.1 or LGPLv2.1+ ? It's never said in the COPYING file, you'd have to look at the copyright headers without the source code.
package/libsepol/libsepol.mk line 14
Quoted 5 lines
package/libsepol/libsepol.mk new file +5
-0+LIBSEPOL_LICENSE_FILES = COPYING + +############################## +# Target Section +##############################
We generally don't put such delimiters.
package/libsepol/libsepol.mk line 16
Quoted 2 lines
package/libsepol/libsepol.mk new file +2
-0+LIBSEPOL_INSTALL_STAGING = YES +LIBSEPOL_INSTALL_TARGET = YES
This last line is not needed since it's the default.
package/libsepol/libsepol.mk line 18
Quoted 1 line
package/libsepol/libsepol.mk new file +1
-0+LIBSEPOL_MAKE_CMDS = $(TARGET_CONFIGURE_OPTS)
I believe this definition is useless, just use directly $(TARGET_CONFIGURE_OPTS) where appropriate.
package/libsepol/libsepol.mk line 21
Quoted 3 lines
package/libsepol/libsepol.mk new file +3
-0+ +define LIBSEPOL_BUILD_CMDS + $(MAKE) -C $(@D) $(LIBSEPOL_MAKE_CMDS) DESTDIR=$(STAGING_DIR)
DESTDIR is most likely not needed in the build step.
Quoted 15 lines
package/libsepol/libsepol.mk new file +15
-0+endef + +define LIBSEPOL_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_CMDS) DESTDIR=$(STAGING_DIR) +endef + +define LIBSEPOL_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_CMDS) DESTDIR=$(TARGET_DIR) +endef + +define LIBSEPOL_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +define LIBSEPOL_UNINSTALL_STAGING_CMDS
package/libsepol/libsepol.mk line 46
Quoted 10 lines
package/libsepol/libsepol.mk new file +10
-0+ rm -rf $(addprefix $(STAGING_DIR),/usr/include/sepol /usr/bin/chkcon \ + /usr/lib/pkgconfig/libsepol* /lib/libsepol* /usr/lib/libsepol*) + rm -f $(addprefix $(STAGING_DIR)/usr/man/man3/,$(notdir $(wildcard $(@D)/man/man3/*.3))) + rm -f $(addprefix $(STAGING_DIR)/usr/man/man3/,$(notdir $(wildcard $(@D)/man/man8/*.8))) +endef + +define LIBSEPOL_UNINSTALL_TARGET_CMDS + rm -rf $(addprefix $(TARGET_DIR),/usr/bin/chkcon /usr/lib/pkgconfig/libsepol* \ + /lib/libsepol* /usr/lib/libsepol*) +endef
Don't bother implementing the uninstall commands, we are phasing them out.
package/libsepol/libsepol.mk line 50
Quoted 4 lines
package/libsepol/libsepol.mk new file +4
-0+ +############################## +# Host Section +##############################
Header unneeded.
package/libsepol/libsepol.mk line 51
Quoted 1 line
package/libsepol/libsepol.mk new file +1
-0+HOST_LIBSEPOL_MAKE_CMDS = $(HOST_CONFIGURE_OPTS)
Just use $(HOST_CONFIGURE_OPTS) where needed.
package/libsepol/libsepol.mk line 54
Quoted 3 lines
package/libsepol/libsepol.mk new file +3
-0+ +define HOST_LIBSEPOL_BUILD_CMDS + $(MAKE) -C $(@D) $(HOST_LIBSEPOL_MAKE_CMDS) DESTDIR=$(HOST_DIR)
DESTDIR generally not needed in the build step.
package/libsepol/libsepol.mk line 61
Quoted 7 lines
package/libsepol/libsepol.mk new file +7
-0+endef + +define HOST_LIBSEPOL_INSTALL_CMDS + $(MAKE) -C $(@D) install $(HOST_LIBSEPOL_MAKE_CMDS) DESTDIR=$(HOST_DIR) + mv $(HOST_DIR)/lib/libsepol.so.1 $(HOST_DIR)/usr/lib + (cd $(HOST_DIR)/usr/lib; rm -f libsepol.so; ln -s libsepol.so.1 libsepol.so) + -rmdir $(HOST_DIR)/lib
So I guess the problem here is that the library gets installed in /lib while you wanted it in /usr/lib. It's not very pretty but maybe you can cheat by passing DESTDIR=$(HOST_DIR)/usr.
package/libsepol/libsepol.mk line 69
Quoted 8 lines
package/libsepol/libsepol.mk new file +8
-0+endef + +define HOST_LIBSEPOL_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package))
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/17 libsepol: new package
Thomas,
Thanks for the quick review. I have a few questions before I submit a new version of
the patch.
Thomas Petazzoni <[email protected]> wrote on 09/05/2013 02:44:46 AM:
Quoted 9 lines
From: Thomas Petazzoni <[email protected]> You're introducing this new menu directly under "Target packages", while this package (and a few of the others you're adding) are libraries, so they should be under "Target packages -> Libraries".
I have nothing against adding both "Target packages -> Security" and "Target packages -> Libraries -> Security", but that would require a quick look at the existing packages that would also fit in those new categories.
I was hoping to keep all of the SELinux packages in one place to make it easier
to enable everything but I can move the libraries into a "Target packages -> Libraries -> Security" instead.
Quoted 1 line
Quoted 1 line
+LIBSEPOL_SITE =
http://userspace.selinuxproject.org/releases/20130423/
Quoted 5 lines
Quoted 1 line
+LIBSEPOL_LICENSE = LGPLv2.1
Is it really LGPLv2.1 or LGPLv2.1+ ? It's never said in the COPYING file, you'd have to look at the copyright headers without the source code.
I checked the source files and it is definitely LGPLv2.1+. I'll make that change.
Quoted 4 lines
package/libsepol/libsepol.mk line 21
Quoted 2 lines
package/libsepol/libsepol.mk new file +2
-0+define LIBSEPOL_BUILD_CMDS + $(MAKE) -C $(@D) $(LIBSEPOL_MAKE_CMDS) DESTDIR=$(STAGING_DIR)DESTDIR is most likely not needed in the build step.
Unfortunately, the Makefiles in the SELinux packages require DESTDIR to be specified
to determine setup include and library paths. I thought it would be easier
to just work with the existing Makefiles rather than to rewrite them.
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+define HOST_LIBSEPOL_INSTALL_CMDS + $(MAKE) -C $(@D) install $(HOST_LIBSEPOL_MAKE_CMDS)
DESTDIR=$(HOST_DIR)
Quoted 8 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ mv $(HOST_DIR)/lib/libsepol.so.1 $(HOST_DIR)/usr/lib + (cd $(HOST_DIR)/usr/lib; rm -f libsepol.so; ln -s libsepol.so.1 libsepol.so)
Quoted 1 line
+ -rmdir $(HOST_DIR)/lib
So I guess the problem here is that the library gets installed in /lib while you wanted it in
/usr/lib. It's not very pretty but maybe you can cheat by passing DESTDIR=$(HOST_DIR)/usr.
Oh I wish these packages followed standard conventions. They are purposefully
installing the library in /lib and symlinking to it from /usr/lib. This little
hack was created to correct this to match what most other packages do. If it is alright, I will just leave it like that and not worry about it (i.e. have the library install to /lib), otherwise I can patch the makefile
to make it a little cleaner.
Thanks,
Clayton
Clayton Shotwell
Software Engineer
clshotwe at rockwellcollins.com
www.rockwellcollins.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130905/13b73bbf/attachment.html>
PATCH 1/17 libsepol: new package
Clayton,
Quoted 2 lines · clshotwe at rockwellcollins.com
Thanks for the quick review. I have a few questions before I submit a new version of the patch.
Sure. Note that many of the comments I did on the first three patches were identical, and apply to other patches in the series. If you could rework the other patches according to those general comments, it would be great (even though there will probably be other details to sort out than those general comments).
Quoted 9 lines
Quoted 4 lines
I have nothing against adding both "Target packages -> Security" and "Target packages -> Libraries -> Security", but that would require a quick look at the existing packages that would also fit in those new categories.
I was hoping to keep all of the SELinux packages in one place to make it easier
to enable everything but I can move the libraries into a "Target packages -> Libraries -> Security" instead.
Well, libraries are normally 'selected' by the applications needing them. So having the libraries separated from the programs is usually not a big problem for the user, since library dependencies are automatically pulled in when programs are enabled.
Moreover, we might end up later with a global knob 'I want SELinux' on my system (depending on how the SELinux integration will look like), and we can make that enable all the relevant packages automatically.
Quoted 6 lines
Quoted 3 lines
Is it really LGPLv2.1 or LGPLv2.1+ ? It's never said in the COPYING file, you'd have to look at the copyright headers without the source code.
I checked the source files and it is definitely LGPLv2.1+. I'll make that change.
Ok.
Quoted 11 lines
Quoted 5 lines
package/libsepol/libsepol.mk line 21
Quoted 3 lines
package/libsepol/libsepol.mk new file +2
-0+define LIBSEPOL_BUILD_CMDS + $(MAKE) -C $(@D) $(LIBSEPOL_MAKE_CMDS) DESTDIR=$(STAGING_DIR)DESTDIR is most likely not needed in the build step.
Unfortunately, the Makefiles in the SELinux packages require DESTDIR to be specified
to determine setup include and library paths. I thought it would be easier
to just work with the existing Makefiles rather than to rewrite them.
Ah, right. libsepol isn't really concerned by this since it doesn't have any dependency, but libselinux is indeed using DESTDIR at build time to pass some include or library paths. It's a mistake of the build system to think that the paths where things are at build time will be the same as the one where things will be at run time, but anyway, in this case it doesn't to cause any problem.
So, fine for passing DESTDIR= at build time, but since it's unusual, maybe a comment above the BUILD_CMDS would be nice, like:
# DESTDIR= is needed at build time, as it's used by the Makefile to
# compute some library and header paths
(don't hesitate to fix my broken English as needed).
Quoted 12 lines
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+define HOST_LIBSEPOL_INSTALL_CMDS + $(MAKE) -C $(@D) install $(HOST_LIBSEPOL_MAKE_CMDS)DESTDIR=$(HOST_DIR)
Quoted 8 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ mv $(HOST_DIR)/lib/libsepol.so.1 $(HOST_DIR)/usr/lib + (cd $(HOST_DIR)/usr/lib; rm -f libsepol.so; ln -s libsepol.so.1 libsepol.so)
Quoted 1 line
+ -rmdir $(HOST_DIR)/lib
So I guess the problem here is that the library gets installed in /lib while you wanted it in
/usr/lib. It's not very pretty but maybe you can cheat by passing DESTDIR=$(HOST_DIR)/usr.
Quoted 8 lines
Oh I wish these packages followed standard conventions. They are purposefully
installing the library in /lib and symlinking to it from/usr/lib. This little
hack was created to correct this to match what most other packages do. If it is alright, I will just leave it like that and not worry about it (i.e. have the library install to /lib), otherwise I can patch the makefile to make it a little cleaner.
Ok, then probably what you did looks like the best compromise. Maybe a little comment above that explains what you're doing this would be good. Generally speaking, whenever something 'unusual' is done, it's good to add a comment, which will help both at review time, but also at maintenance time.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/17 libsepol: new package
In reply to clshotwe at rockwellcollins.comQuoted 12 lines · clshotwe at rockwellcollins.com
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+define HOST_LIBSEPOL_INSTALL_CMDS + $(MAKE) -C $(@D) install $(HOST_LIBSEPOL_MAKE_CMDS)DESTDIR=$(HOST_DIR)
Quoted 8 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ mv $(HOST_DIR)/lib/libsepol.so.1 $(HOST_DIR)/usr/lib + (cd $(HOST_DIR)/usr/lib; rm -f libsepol.so; ln -s libsepol.so.1 libsepol.so)
Quoted 1 line
+ -rmdir $(HOST_DIR)/lib
So I guess the problem here is that the library gets installed in /lib while you wanted it in
/usr/lib. It's not very pretty but maybe you can cheat by passing DESTDIR=$(HOST_DIR)/usr.
Quoted 5 lines
Oh I wish these packages followed standard conventions. They are purposefully
installing the library in /lib and symlinking to it from/usr/lib. This little
hack was created to correct this to match what most other packages do.
I don't think it's really necessary to do this move just because it
looks nicer. I think it's better to stay with upstream. Although this would be the first package to install anything in $(HOST_DIR)/lib, we anyway already have
HOST_LDFLAGS += -L$(HOST_DIR)/lib ...
We don't have an rpath for it, though, so maybe that should be added.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/17 libsepol: new package
Dear Arnout Vandecappelle,
Quoted 8 lines · Arnout Vandecappelle
I don't think it's really necessary to do this move just because it
looks nicer. I think it's better to stay with upstream. Although this would be the first package to install anything in $(HOST_DIR)/lib, we anyway already have
HOST_LDFLAGS+= -L$(HOST_DIR)/lib ...We don't have an rpath for it, though, so maybe that should be added.
Yes, that's the other option. I don't have a strong feeling about this.
At some point, I was thinking of proposing to remove $(HOST_DIR)/usr and have everything under $(HOST_DIR)/ directly. The advantage is that the binaries of the toolchain would be directly under $(HOST_DIR)/bin, which would mean creating a tarball of $(HOST_DIR) would create a toolchain that is more similar to other cross-compilation toolchains you can find around (Linaro, CodeSourcery, etc.).
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/17 libsepol: new package
Thomas,
Thomas Petazzoni <[email protected]> wrote on 09/06/2013 01:28:27 AM:
Quoted 18 lines · Arnout Vandecappelle
Quoted 2 lines
I don't think it's really necessary to do this move
just because it
Quoted 1 line
looks nicer. I think it's better to stay with upstream.
Although this
Quoted 1 line
would be the first package to install anything in $
(HOST_DIR)/lib, we
Quoted 5 lines
anyway already have
HOST_LDFLAGS+= -L$(HOST_DIR)/lib ...We don't have an rpath for it, though, so maybe that
should be added.
Yes, that's the other option. I don't have a strong feeling about this.
Quoted 8 lines
At some point, I was thinking of proposing to remove $(HOST_DIR)/usr and have everything under $(HOST_DIR)/ directly. The advantage is that
the binaries of the toolchain would be directly under $ (HOST_DIR)/bin,
which would mean creating a tarball of $(HOST_DIR) would create a toolchain that is more similar to other cross-compilation toolchains you can find around (Linaro, CodeSourcery, etc.).
I will go ahead and keep the move in there the way it currently is. If the $(HOST_DIR)/usr folder is removed, there will have to be more cleanup to this package to have it not install into the $(HOST_DIR)/usr folder anyway. All-in-all, this package does not follow standard install practices.
Thanks,
Clayton
Clayton Shotwell
Software Engineer
clshotwe at rockwellcollins.com
www.rockwellcollins.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130909/68b775e0/attachment.html>
PATCH 2/17 libselinux: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/libselinux/Config.in | 22 +++++++ package/libselinux/libselinux.mk | 128 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+), 0 deletions(-) create mode 100644 package/libselinux/Config.in create mode 100644 package/libselinux/libselinux.mk
package/Config.in +1 -0
@@ -898,6 +898,7 @@ endmenu menu "Security" source "package/libsepol/Config.in" +source "package/libselinux/Config.in" endmenu menu "System tools"
package/libselinux/Config.in new file +22 -0
@@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBSELINUX + bool "libselinux" + depends on BR2_LINUX_KERNEL + help + libselinux is the runtime SELinux library that provides interfaces + (e.g. library functions for the SELinux kernel APIs like getcon(), + other support functions like getseuserbyname()) to SELinux-aware + applications. libselinux may use the shared libsepol to manipulate + the binary policy if necessary (e.g. to downgrade the policy format + to an older version supported by the kernel) when loading policy. + + http://selinuxproject.org/page/Main_Page + +if BR2_PACKAGE_LIBSELINUX + +config BR2_PACKAGE_LIBSELINUX_PYTHON_BINDINGS + select BR2_PACKAGE_PYTHON + bool "python bindings" + help + enable building python bindings + +endif
package/libselinux/libselinux.mk new file +128 -0
128 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 2/17 libselinux: new package
Dear Clayton Shotwell,
Quoted 4 lines · Clayton Shotwell
menu "Security"
source "package/libsepol/Config.in"
+source "package/libselinux/Config.in"
endmenu
Same comment as previous package: libselinux is a library, so it should be under Target packages -> Libraries.
package/libselinux/Config.in line 3
Quoted 11 lines
menu "System tools"
package/libselinux/Config.in new file +3
-0@@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBSELINUX + bool "libselinux" + depends on BR2_LINUX_KERNEL
Hum, can you clarify why a dependency on the kernel is needed here?
Quoted 4 lines
package/libselinux/Config.in new file +4
-0+ help + libselinux is the runtime SELinux library that provides interfaces + (e.g. library functions for the SELinux kernel APIs like getcon(), + other support functions like getseuserbyname()) to SELinux-aware
package/libselinux/Config.in line 17
Quoted 10 lines
package/libselinux/Config.in new file +10
-0+ applications. libselinux may use the shared libsepol to manipulate + the binary policy if necessary (e.g. to downgrade the policy format + to an older version supported by the kernel) when loading policy. + + http://selinuxproject.org/page/Main_Page + +if BR2_PACKAGE_LIBSELINUX + +config BR2_PACKAGE_LIBSELINUX_PYTHON_BINDINGS + select BR2_PACKAGE_PYTHON
Here I am not sure whether we should have:
(1) An option that selects BR2_PACKAGE_PYTHON (as you did)
(2) An option that depends on BR2_PACKAGE_PYTHON
(3) No option at all, and have the package automatically enable Python bindings when BR2_PACKAGE_PYTHON is enabled.
What do the others think?
Quoted 11 lines
package/libselinux/Config.in new file +5
-0+ bool "python bindings" + help + enable building python bindings + +endifpackage/libselinux/libselinux.mk new file +0
-0
package/libselinux/libselinux.mk line 5
Quoted 5 lines
package/libselinux/libselinux.mk new file +5
-0@@ -0,0 +1,128 @@ +################################################################################ +# +# libselinux +# +################################################################################
One empty line between header and variables.
package/libselinux/libselinux.mk line 7
Quoted 2 lines
package/libselinux/libselinux.mk new file +2
-0+LIBSELINUX_VERSION = 2.1.13 +LIBSELINUX_SOURCE = libselinux-$(LIBSELINUX_VERSION).tar.gz
This line is not needed, that's the default value.
package/libselinux/libselinux.mk line 14
Quoted 7 lines
package/libselinux/libselinux.mk new file +7
-0+LIBSELINUX_SITE = http://userspace.selinuxproject.org/releases/20130423/ +LIBSELINUX_LICENSE = PublicDomain +LIBSELINUX_LICENSE_FILES = LICENSE + +############################## +# Target Section +##############################
Comment not needed.
package/libselinux/libselinux.mk line 15
Quoted 1 line
package/libselinux/libselinux.mk new file +1
-0+LIBSELINUX_DEPENDENCIES = libsepol pcre
Then you should select BR2_PACKAGE_LIBSEPOL and BR2_PACKAGE_PCRE in your Config.in file.
package/libselinux/libselinux.mk line 18
Quoted 3 lines
package/libselinux/libselinux.mk new file +3
-0+ +LIBSELINUX_INSTALL_STAGING = YES +LIBSELINUX_INSTALL_TARGET = YES
This last line is not needed, that's the default.
package/libselinux/libselinux.mk line 20
Quoted 2 lines
package/libselinux/libselinux.mk new file +2
-0+ +LIBSELINUX_MAKE_CMDS = $(TARGET_CONFIGURE_OPTS) LDFLAGS="$(TARGET_LDFLAGS) -lpcre -lpthread"
This could use a little bit of wrapping:
LIBSELINUX_MAKE_CMDS = \ $(TARGET_CONFIGURE_OPTS) \ LDFLAGS="$(TARGET_LDFLAGS) -lpcre -lpthread"
BTW, I'm not sure _MAKE_CMDS is really the appropriate suffix, maybe _MAKE_OPTS ?
package/libselinux/libselinux.mk line 32
Quoted 11 lines
package/libselinux/libselinux.mk new file +11
-0+ifeq ($(BR2_PACKAGE_LIBSELINUX_PYTHON_BINDINGS),y) + +LIBSELINUX_DEPENDENCIES += python host-swig host-python +LIBSELINUX_MAKE_CMDS += PYINC="-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)/" \ + PYTHONLIBDIR="-L$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/" \ + PYLIBVER="python$(PYTHON_VERSION_MAJOR)" \ + SWIG_LIB="$(HOST_DIR)/usr/share/swig/$(SWIG_VERSION)/" + +define LIBSELINUX_PYTHON_BUILD_CMDS + $(MAKE) -C $(@D) $(LIBSELINUX_MAKE_CMDS) DESTDIR=$(STAGING_DIR) swigify + $(MAKE) -C $(@D) $(LIBSELINUX_MAKE_CMDS) DESTDIR=$(STAGING_DIR) pywrap
DESTDIR really needed at build time ?
Quoted 7 lines
package/libselinux/libselinux.mk new file +7
-0+endef + +define LIBSELINUX_PYTHON_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install-pywrap $(LIBSELINUX_MAKE_CMDS) DESTDIR=$(STAGING_DIR) +endef + +define LIBSELINUX_PYTHON_INSTALL_TARGET_CMDS
package/libselinux/libselinux.mk line 49
Quoted 10 lines
package/libselinux/libselinux.mk new file +10
-0+ $(MAKE) -C $(@D) install-pywrap $(LIBSELINUX_MAKE_CMDS) DESTDIR=$(TARGET_DIR) +endef + +define LIBSELINUX_PYTHON_UNINSTALL_STAGING_CMDS + rm -rf $(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/selinux +endef + +define LIBSELINUX_PYTHON_UNINSTALL_TARGET_CMDS + rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/selinux +endef
You can get rid of install commands.
package/libselinux/libselinux.mk line 54
Quoted 5 lines
package/libselinux/libselinux.mk new file +5
-0+ +endif + +define LIBSELINUX_BUILD_CMDS + $(MAKE) -C $(@D) $(LIBSELINUX_MAKE_CMDS) DESTDIR=$(STAGING_DIR) all
DESTDIR unneeded at build time.
Quoted 29 lines
package/libselinux/libselinux.mk new file +29
-0+ $(LIBSELINUX_PYTHON_BUILD_CMDS) +endef + +define LIBSELINUX_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install $(LIBSELINUX_MAKE_CMDS) DESTDIR=$(STAGING_DIR) + $(LIBSELINUX_PYTHON_INSTALL_STAGING_CMDS) +endef + +define LIBSELINUX_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install $(LIBSELINUX_MAKE_CMDS) DESTDIR=$(TARGET_DIR) + $(LIBSELINUX_PYTHON_INSTALL_TARGET_CMDS) +endef + +define LIBSELINUX_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +LIBSELINUX_SBIN_FILES = avcstat compute_av compute_create compute_member \ + compute_relabel compute_user getconlist getdefaultcon getenforce \ + getfilecon getpidcon getsebool getseuser matchpathcon policyvers \ + sefcontext_compile selinux_check_securetty_context selinuxenabled \ + selinuxexeccon setenforce setfilecon togglesebool + +define LIBSELINUX_UNINSTALL_STAGING_CMDS + rm -rf $(addprefix $(STAGING_DIR), /usr/include/selinux \ + $(addprefix /usr/sbin/, $(LIBSELINUX_SBIN_FILES)) \ + /usr/lib/pkgconfig/libselinux* /usr/lib/libselinux* /lib/libselinux*) + rm -f $(addprefix $(STAGING_DIR)/usr/man/man3/,$(notdir $(wildcard $(@D)/man/man3/*.3))) + rm -f $(addprefix $(STAGING_DIR)/usr/man/man5/,$(notdir $(wildcard $(@D)/man/man5/*.5)))
package/libselinux/libselinux.mk line 93
Quoted 10 lines
package/libselinux/libselinux.mk new file +10
-0+ rm -f $(addprefix $(STAGING_DIR)/usr/man/man8/,$(notdir $(wildcard $(@D)/man/man8/*.8))) + $(LIBSELINUX_PYTHON_UNINSTALL_STAGING_CMDS) +endef + +define LIBSELINUX_UNINSTALL_TARGET_CMDS + rm -rf $(addprefix $(TARGET_DIR), /usr/include/selinux \ + $(addprefix /usr/sbin/, $(LIBSELINUX_SBIN_FILES)) \ + /usr/lib/pkgconfig/libselinux* /usr/lib/libselinux* /lib/libselinux*) + $(LIBSELINUX_PYTHON_UNINSTALL_TARGET_CMDS) +endef
Yeah, just drop the uninstall commands.
package/libselinux/libselinux.mk line 97
Quoted 3 lines
package/libselinux/libselinux.mk new file +3
-0+############################## +# Host Section +##############################
Drop this header.
package/libselinux/libselinux.mk line 98
Quoted 1 line
package/libselinux/libselinux.mk new file +1
-0+HOST_LIBSELINUX_DEPENDENCIES = host-python host-libsepol host-swig host-pcre
So for the host variant, the Python bindings are always enabled? Is there a reason for that?
package/libselinux/libselinux.mk line 109
Quoted 11 lines
package/libselinux/libselinux.mk new file +11
-0+ +HOST_LIBSELINUX_MAKE_CMDS = $(HOST_CONFIGURE_OPTS) LDFLAGS="$(HOST_LDFLAGS) -lpcre -lpthread"\ + PYINC="-I$(HOST_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)/" \ + PYTHONLIBDIR="-L$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/" \ + PYLIBVER="python$(PYTHON_VERSION_MAJOR)" \ + SWIG_LIB="$(HOST_DIR)/usr/share/swig/$(SWIG_VERSION)/" \ + +define HOST_LIBSELINUX_BUILD_CMDS + $(MAKE) -C $(@D) $(HOST_LIBSELINUX_MAKE_CMDS) DESTDIR=$(HOST_DIR) all + $(MAKE) -C $(@D) $(HOST_LIBSELINUX_MAKE_CMDS) DESTDIR=$(HOST_DIR) swigify + $(MAKE) -C $(@D) $(HOST_LIBSELINUX_MAKE_CMDS) DESTDIR=$(HOST_DIR) pywrap
DESTDIR usually not needed at build time.
package/libselinux/libselinux.mk line 120
Quoted 11 lines
package/libselinux/libselinux.mk new file +11
-0+endef + +define HOST_LIBSELINUX_INSTALL_CMDS + $(MAKE) -C $(@D) install install-pywrap $(HOST_LIBSELINUX_MAKE_CMDS) DESTDIR=$(HOST_DIR) + mv $(HOST_DIR)/lib/libselinux.so.1 $(HOST_DIR)/usr/lib + (cd $(HOST_DIR)/usr/lib; rm -f libselinux.so; ln -s libselinux.so.1 libselinux.so) + rmdir $(HOST_DIR)/lib + (if -f $(HOST_DIR)/sbin/matchpathcon; then \ + mv $(HOST_DIR)/sbin/matchpathcon $(HOST_DIR)/usr/sbin/; \ + rmdir $(HOST_DIR)/sbin; \ + fi)
Same suggestion as above: what if you pass DESTDIR=$(HOST_DIR)/usr ?
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 2/17 libselinux: new package
Thomas,
Thomas Petazzoni <[email protected]> wrote on 09/05/2013 02:51:29 AM:
Quoted 7 lines
Quoted 4 lines
menu "Security"
source "package/libsepol/Config.in"
+source "package/libselinux/Config.in"
endmenuSame comment as previous package: libselinux is a library, so it should be under Target packages -> Libraries.
Agree
Quoted 5 lines
package/libselinux/Config.in line 3
Quoted 3 lines
package/libselinux/Config.in new file +3
-0+config BR2_PACKAGE_LIBSELINUX + bool "libselinux" + depends on BR2_LINUX_KERNELHum, can you clarify why a dependency on the kernel is needed here?
Probably shouldn't be an explicit one, though SELinux will not work outside of Linux. I will go ahead and remove this dependency.
Quoted 5 lines
package/libselinux/Config.in line 17
Quoted 2 lines
package/libselinux/Config.in new file +2
-0+config BR2_PACKAGE_LIBSELINUX_PYTHON_BINDINGS + select BR2_PACKAGE_PYTHONHere I am not sure whether we should have:
Quoted 8 lines
(1) An option that selects
BR2_PACKAGE_PYTHON(as you did)(2) An option that depends on
BR2_PACKAGE_PYTHON(3) No option at all, and have the package automatically enable Python bindings when
BR2_PACKAGE_PYTHONis enabled.What do the others think?
I added this option because the policycoreutils package contains utilities that rely on the python bindings from the libselinux and sepolgen packages. What I can do is remove the option and have the bindings for libselinux and sepolgen depend on BR2_PACKAGE_PYTHON. I can then change policycoreutils select BR2_PACKAGE_PYTHON which would enable the other two. This would also allow the bindings to be generated any time Python support is enabled.
Quoted 2 lines
Then you should select
BR2_PACKAGE_LIBSEPOLandBR2_PACKAGE_PCREin your Config.in file.
Can do.
Quoted 5 lines
Quoted 1 line
+HOST_LIBSELINUX_DEPENDENCIES = host-python host-libsepol host-
swig host-pcre
So for the host variant, the Python bindings are always enabled? Is there a reason for that?
This was just a easier way than checking to see if host python is being installed. Should I break this out and if so, what should I check to see if the host version is being installed?
The same DESTDIR comments from my previous email apply to this package also. I will pull the generic changes into all of my patches and resubmit them if that works for you.
Thanks,
Clayton
Clayton Shotwell
Software Engineer
clshotwe at rockwellcollins.com
www.rockwellcollins.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130905/15910dc8/attachment-0001.html>
PATCH 3/17 ustr: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/ustr/Config.in | 6 + .../ustr-1.0.4-crossCompileModifications.patch | 104 ++++++++++++++++++++ package/ustr/ustr.mk | 68 +++++++++++++ 4 files changed, 179 insertions(+), 0 deletions(-) create mode 100644 package/ustr/Config.in create mode 100644 package/ustr/ustr-1.0.4-crossCompileModifications.patch create mode 100644 package/ustr/ustr.mk
package/Config.in +1 -0
@@ -677,6 +677,7 @@ source "package/pcre/Config.in" source "package/popt/Config.in" source "package/readline/Config.in" source "package/slang/Config.in" +source "package/ustr/Config.in" endmenu menu "JSON/XML"
package/ustr/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_USTR + bool "ustr" + help + A small, safe string library. + + http://www.and.org/ustr/
package/ustr/ustr-1.0.4-crossCompileModifications.patch new file +104 -0
104 lines not on this page · raw message
package/ustr/ustr.mk new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 3/17 ustr: new package
Dear Clayton Shotwell,
package/ustr/ustr-1.0.4-crossCompileModifications.patch
Quoted 1 line · Clayton Shotwell
package/ustr/ustr-1.0.4-crossCompileModifications.patch +0
-0
Patch names should not contain the version number, but instead a number that allows patches to be applied in the right order. See
http://buildroot.org/downloads/manual/manual.html#patch-policy.
Also, while it is not written anywhere explicitly, the patch filename should be all in lower case.
Quoted 2 lines
new file mode 100644
index 0000000..aad9b81
The patch should contain a description + Signed-off-by line. See
http://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches.
package/ustr/ustr.mk line 5
Quoted 11 lines
package/ustr/ustr.mk new file +5
-0@@ -0,0 +1,68 @@ +############################################################# +# +# ustr +# +#############################################################
80 dashes, one empty line between header and variables.
package/ustr/ustr.mk line 14
Quoted 9 lines
package/ustr/ustr.mk new file +9
-0+USTR_VERSION = 1.0.4 +USTR_SOURCE = ustr-$(USTR_VERSION).tar.bz2 +USTR_SITE = http://www.and.org/ustr/$(USTR_VERSION)/ +USTR_LICENSE = BSD-2c MIT LGPLv2+ +USTR_LICENSE_FILES = LICENCE LICENSE_BSD LICENSE_LGPL LICENSE_MIT + +############################## +# Target Section +##############################
Comment not needed.
package/ustr/ustr.mk line 16
Quoted 2 lines
package/ustr/ustr.mk new file +2
-0+USTR_INSTALL_STAGING = YES +USTR_INSTALL_TARGET = YES
Last line not needed.
package/ustr/ustr.mk line 18
Quoted 2 lines
package/ustr/ustr.mk new file +2
-0+ +USTR_MAKE_CMDS = $(TARGET_CONFIGURE_OPTS)
Use $(TARGET_CONFIGURE_OPTS) directly.
package/ustr/ustr.mk line 22
Quoted 4 lines
package/ustr/ustr.mk new file +4
-0+ +define USTR_BUILD_CMDS + $(MAKE) -C $(@D) all $(USTR_MAKE_CMDS) DESTDIR=$(STAGING_DIR) + $(MAKE) -C $(@D) all-shared $(USTR_MAKE_CMDS) DESTDIR=$(STAGING_DIR)
DESTDIR typically not needed when building. Also, you can probably combine this in one line:
$(MAKE) -C $(@D) \ $(USTR_MAKE_CMDS) all all-shared
However, there's one thing we've forgotten: we try to support static library builds in Buildroot, when BR2_PREFER_STATIC_LIB is enabled. So when it's possible, it'd be great if the packages could behave nicely when BR2_PREFER_STATIC_LIB=y (by disabling the build of shared libraries). If it's not possible or too complicated, we can add a depends on !BR2_PREFER_STATIC_LIB.
Quoted 15 lines
package/ustr/ustr.mk new file +15
-0+endef + +define USTR_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install $(USTR_MAKE_CMDS) DESTDIR=$(STAGING_DIR) +endef + +define USTR_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install $(USTR_MAKE_CMDS) DESTDIR=$(TARGET_DIR) +endef + +define USTR_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +define USTR_UNINSTALL_STAGING_CMDS
package/ustr/ustr.mk line 47
Quoted 10 lines
package/ustr/ustr.mk new file +10
-0+ rm -rf $(addprefix $(TARGET_DIR),/usr/lib/libustr* /usr/lib/pkgconfig/ustr* \ + /usr/bin/ustr* /usr/include/ustr* /usr/include/ \ + /usr/share/doc/ustr-$(USTR_VERSION) /usr/share/ustr-$(USTR_VERSION) \ + /usr/share/man/man1/ustr* /usr/share/man/man3/ustr*) +endef + +define USTR_UNINSTALL_TARGET_CMDS + rm -rf $(addprefix $(TARGET_DIR),/usr/lib/libustr* /usr/lib/pkgconfig/ustr* \ + /usr/bin/ustr* /usr/include/ustr*) +endef
Drop the uninstall comands.
package/ustr/ustr.mk line 57
Quoted 9 lines
package/ustr/ustr.mk new file +9
-0+############################## +# Host Section +############################## +HOST_USTR_MAKE_CMDS = $(HOST_CONFIGURE_OPTS) + +define HOST_USTR_BUILD_CMDS + $(MAKE) -C $(@D) all $(HOST_USTR_MAKE_CMDS) DESTDIR=$(HOST_DIR) + $(MAKE) -C $(@D) all-shared $(HOST_USTR_MAKE_CMDS) DESTDIR=$(HOST_DIR) +endef
Same comments as above, for everything :)
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 4/17 libsemanage: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/libsemanage/Config.in | 21 ++++ .../libsemanage-2.1.10-execptionLibPathFix.patch | 10 ++ package/libsemanage/libsemanage.mk | 113 ++++++++++++++++++++ 4 files changed, 145 insertions(+), 0 deletions(-) create mode 100644 package/libsemanage/Config.in create mode 100644 package/libsemanage/libsemanage-2.1.10-execptionLibPathFix.patch create mode 100644 package/libsemanage/libsemanage.mk
package/Config.in +1 -0
@@ -900,6 +900,7 @@ endmenu menu "Security" source "package/libsepol/Config.in" source "package/libselinux/Config.in" +source "package/libsemanage/Config.in" endmenu menu "System tools"
package/libsemanage/Config.in new file +21 -0
@@ -0,0 +1,21 @@ +config BR2_PACKAGE_LIBSEMANAGE + bool "libsemanage" + help + libsemanage is the policy management library. It uses libsepol for binary + policy manipulation and libselinux for interacting with the SELinux + system. It also exec's helper programs for loading policy and for checking + whether the file_contexts configuration is valid (load_policy and + setfiles from policycoreutils) presently, although this may change at + least for the bootstrapping case (for rpm). + + http://selinuxproject.org/page/Main_Page + +if BR2_PACKAGE_LIBSEMANAGE + +config BR2_PACKAGE_LIBSEMANAGE_PYTHON_BINDINGS + select BR2_PACKAGE_PYTHON + bool "python bindings" + help + enable building python bindings + +endif
package/libsemanage/libsemanage-2.1.10-execptionLibPathFix.patch new file +10 -0
@@ -0,0 +1,10 @@ +--- a/src/exception.sh 2011-12-21 11:46:04.000000000 -0600 ++++ b/src/exception.sh 2012-08-27 11:29:58.000000000 -0500 +@@ -9,6 +9,6 @@ + } + " + } +-gcc -x c -c - -aux-info temp.aux < ../include/semanage/semanage.h ++gcc -x c -c - -aux-info temp.aux -I../include < ../include/semanage/semanage.h + for i in `awk '/extern int/ { print $6 }' temp.aux`; do except $i ; done + rm -f -- temp.aux -.o
package/libsemanage/libsemanage.mk new file +113 -0
113 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 5/17 checkpolicy: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/checkpolicy/Config.in | 11 ++++++ package/checkpolicy/checkpolicy.mk | 71 ++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 0 deletions(-) create mode 100644 package/checkpolicy/Config.in create mode 100644 package/checkpolicy/checkpolicy.mk
package/Config.in +1 -0
@@ -898,6 +898,7 @@ source "package/xmlstarlet/Config.in" endmenu menu "Security" +source "package/checkpolicy/Config.in" source "package/libsepol/Config.in" source "package/libselinux/Config.in" source "package/libsemanage/Config.in"
package/checkpolicy/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_CHECKPOLICY + bool "checkpolicy" + select BR2_PACKAGE_FLEX + help + checkpolicy is the policy compiler. It uses libsepol to + generate the binary policy. checkpolicy uses the static + libsepol since it deals with low level details of the policy + that have not been encapsulated/abstracted by a proper + shared library interface. + + http://selinuxproject.org/page/Main_Page
package/checkpolicy/checkpolicy.mk new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 5/17 checkpolicy: new package
Dear Clayton Shotwell,
Quoted 4 lines · Clayton Shotwell
package/checkpolicy/Config.in new file +1
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_CHECKPOLICY
package/checkpolicy/Config.in line 11
Quoted 10 lines
package/checkpolicy/Config.in new file +10
-0+ bool "checkpolicy" + select BR2_PACKAGE_FLEX + help + checkpolicy is the policy compiler. It uses libsepol to + generate the binary policy. checkpolicy uses the static + libsepol since it deals with low level details of the policy + that have not been encapsulated/abstracted by a proper + shared library interface. + + http://selinuxproject.org/page/Main_Page
Is a target variant of this package really needed? In the context of Buildroot and cross-compilation, I would expect the policy to be written on the development machine, the compilation to happen on the development machine, and only the resulting binary copied to the target.
We generally don't support "development" on the target, and we expect the system generated by Buildroot to be ready to use. I am not familiar with SELinux at all, but my understanding is that this Buildroot policy should translate into just the SELinux binary policy to be installed on the target, the compiler being kept on the host.
Other comments below.
package/checkpolicy/checkpolicy.mk line 5
Quoted 11 lines
package/checkpolicy/checkpolicy.mk new file +5
-0@@ -0,0 +1,71 @@ +############################################################# +# +# checkpolicy +# +#############################################################
80 dashes, empty line missing.
package/checkpolicy/checkpolicy.mk line 7
Quoted 2 lines
package/checkpolicy/checkpolicy.mk new file +2
-0+CHECKPOLICY_VERSION = 2.1.12 +CHECKPOLICY_SOURCE = checkpolicy-$(CHECKPOLICY_VERSION).tar.gz
Not needed, that's the default.
package/checkpolicy/checkpolicy.mk line 9
Quoted 2 lines
package/checkpolicy/checkpolicy.mk new file +2
-0+CHECKPOLICY_SITE = http://userspace.selinuxproject.org/releases/20130423/ +CHECKPOLICY_LICENSE = GPLv2
Really GPLv2, not GPLv2+ ?
package/checkpolicy/checkpolicy.mk line 14
Quoted 5 lines
package/checkpolicy/checkpolicy.mk new file +5
-0+CHECKPOLICY_LICENSE_FILES = COPYING + +############################## +# Target Section +##############################
We can remove this comment.
package/checkpolicy/checkpolicy.mk line 15
Quoted 1 line
package/checkpolicy/checkpolicy.mk new file +1
-0+CHECKPOLICY_DEPENDENCIES = host-flex host-bison libselinux flex
So flex is needed both on the target, and at runtime?
package/checkpolicy/checkpolicy.mk line 18
Quoted 3 lines
package/checkpolicy/checkpolicy.mk new file +3
-0+ +CHECKPOLICY_INSTALL_STAGING = YES +CHECKPOLICY_INSTALL_TARGET = YES
Last line not needed, that's the default.
Quoted 19 lines
package/checkpolicy/checkpolicy.mk new file +19
-0+ +CHECKPOLICY_MAKE_CMDS = $(TARGET_CONFIGURE_OPTS) \ + LEX="$(HOST_DIR)/usr/bin/flex" \ + YACC="$(HOST_DIR)/usr/bin/bison -y" + +define CHECKPOLICY_BUILD_CMDS + $(MAKE) -C $(@D) $(CHECKPOLICY_MAKE_CMDS) DESTDIR=$(STAGING_DIR) +endef + +define CHECKPOLICY_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install $(CHECKPOLICY_MAKE_CMDS) DESTDIR=$(STAGING_DIR) +endef + +define CHECKPOLICY_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install $(CHECKPOLICY_MAKE_CMDS) DESTDIR=$(TARGET_DIR) +endef + +define CHECKPOLICY_CLEAN_CMDS + $(MAKE) -C $(@D) clean
package/checkpolicy/checkpolicy.mk line 47
Quoted 10 lines
package/checkpolicy/checkpolicy.mk new file +10
-0+endef + +define CHECKPOLICY_UNINSTALL_STAGING_CMDS + rm -f $(STAGING_DIR)/usr/bin/checkpolicy + rm -f $(addprefix $(STAGING_DIR)/usr/man/man8/,$(notdir $(wildcard $(@D)/*.8))) +endef + +define CHECKPOLICY_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/checkpolicy +endef
You can get rid of uninstall commands.
package/checkpolicy/checkpolicy.mk line 51
Quoted 3 lines
package/checkpolicy/checkpolicy.mk new file +3
-0+############################## +# Host Section +##############################
Comment not needed.
Quoted 10 lines
package/checkpolicy/checkpolicy.mk new file +10
-0+HOST_CHECKPOLICY_DEPENDENCIES = host-libselinux host-flex host-bison + +HOST_CHECKPOLICY_MAKE_CMDS = $(HOST_CONFIGURE_OPTS) \ + LEX="$(HOST_DIR)/usr/bin/flex" \ + YACC="$(HOST_DIR)/usr/bin/bison -y" + +define HOST_CHECKPOLICY_BUILD_CMDS + $(MAKE) -C $(@D) $(HOST_CHECKPOLICY_MAKE_CMDS) DESTDIR=$(HOST_DIR) +endef +
package/checkpolicy/checkpolicy.mk line 71
Quoted 10 lines
package/checkpolicy/checkpolicy.mk new file +10
-0+define HOST_CHECKPOLICY_INSTALL_CMDS + $(MAKE) -C $(@D) install $(CHOST_HECKPOLICY_MAKE_CMDS) DESTDIR=$(HOST_DIR) +endef + +define HOST_CHECKPOLICY_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package))
Thanks,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 5/17 checkpolicy: new package
Thomas,
Thomas Petazzoni <[email protected]> wrote on 09/06/2013 12:56:09 PM:
Quoted 6 lines
Is a target variant of this package really needed? In the context of Buildroot and cross-compilation, I would expect the policy to be written on the development machine, the compilation to happen on the development machine, and only the resulting binary copied to the target.
Quoted 9 lines
We generally don't support "development" on the target, and we expect
the system generated by Buildroot to be ready to use. I am not familiar
with SELinux at all, but my understanding is that this Buildroot policy
should translate into just the SELinux binary policy to be installed on
the target, the compiler being kept on the host.
Very good point and I agree completely. This package is used to compile the SELinux policy from source and that should only be done on the host. I will go ahead and remove the target build commands and Config.in file to keep this a host only utility.
Quoted 5 lines
Quoted 1 line
+CHECKPOLICY_SITE = http://userspace.selinuxproject.org/
releases/20130423/
Quoted 1 line
+CHECKPOLICY_LICENSE = GPLv2
Really GPLv2, not GPLv2+ ?
Yes, just GPLv2 per most of the headers. Several source files contain no license information and there are a couple that contain a LGPLv2.1+. I am going to consider everything under the GPLv2 since that is the most restrictive license.
Thanks,
Clayton
Clayton Shotwell
Software Engineer
clshotwe at rockwellcollins.com
www.rockwellcollins.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130909/0b5f6af6/attachment.html>
PATCH 5/17 checkpolicy: new package
Quoted 20 lines · Clayton Shotwell
Thomas,
Thomas Petazzoni <[email protected]> wrote on 09/06/2013 12:56:09 PM:
Quoted 6 lines
Is a target variant of this package really needed? In the context of Buildroot and cross-compilation, I would expect the policy to be written on the development machine, the compilation to happen on the development machine, and only the resulting binary copied to the target.
Quoted 9 lines
We generally don't support "development" on the target, and we expect
the system generated by Buildroot to be ready to use. I am not familiar
with SELinux at all, but my understanding is that this Buildroot policy
should translate into just the SELinux binary policy to be installed on
the target, the compiler being kept on the host.
Quoted 4 lines
Very good point and I agree completely. This package is used to compile the SELinux policy from source and that should only be done on the host. I will go ahead and remove the target build commands and Config.in file to keep this a host only utility.
Note: you'll probably want to add a Config.in.host for this package, so
people can select it in their config and use it in a post-build script.
In the long term, it is probably also a good idea to have a
system-level SELinux menu where you can specify some policy files to be put on the target, and buildroot will compile and install them for you.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 5/17 checkpolicy: new package
Dear Arnout Vandecappelle,
Quoted 8 lines · Arnout Vandecappelle
Note: you'll probably want to add a Config.in.host for this
package, so people can select it in their config and use it in a post-build script.In the long term, it is probably also a good idea to have a
system-level SELinux menu where you can specify some policy files to be put on the target, and buildroot will compile and install them for you.
I agree. Usage of SELinux is such a system-wide thing that we might need an entry for it in the "System configuration" menu for example.
But well, let's get the packages merged first, and we'll work together to see how to polish the integration.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 6/17 sepolgen: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/sepolgen/Config.in | 7 ++++++ package/sepolgen/sepolgen.mk | 46 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 0 deletions(-) create mode 100644 package/sepolgen/Config.in create mode 100644 package/sepolgen/sepolgen.mk
package/Config.in +1 -0
@@ -902,6 +902,7 @@ source "package/checkpolicy/Config.in" source "package/libsepol/Config.in" source "package/libselinux/Config.in" source "package/libsemanage/Config.in" +source "package/sepolgen/Config.in" endmenu menu "System tools"
package/sepolgen/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_SEPOLGEN + bool "sepolgen" + help + sepolgen is a python module/library that forms the core + of the modern audit2allow (a rewrite). + + http://selinuxproject.org/page/Main_Page
package/sepolgen/sepolgen.mk new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 7/17 setools: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/setools/Config.in | 22 + .../setools/setools-0001-cross_compile_fixes.patch | 116 +++ .../setools-0002-swig_typedef_python_fixes.patch | 1010 ++++++++++++++++++++ package/setools/setools.mk | 91 ++ 5 files changed, 1240 insertions(+), 0 deletions(-) create mode 100644 package/setools/Config.in create mode 100644 package/setools/setools-0001-cross_compile_fixes.patch create mode 100644 package/setools/setools-0002-swig_typedef_python_fixes.patch create mode 100644 package/setools/setools.mk
package/Config.in +1 -0
@@ -903,6 +903,7 @@ source "package/libsepol/Config.in" source "package/libselinux/Config.in" source "package/libsemanage/Config.in" source "package/sepolgen/Config.in" +source "package/setools/Config.in" endmenu menu "System tools"
package/setools/Config.in new file +22 -0
@@ -0,0 +1,22 @@ +config BR2_PACKAGE_SETOOLS + bool "setools" + help + SETools is an open source project designed to facilitate SELinux policy + analysis. The primary tools are: + + apol - analyze a SELinux policy. + seaudit - analyze audit messages from SELinux. + seaudit-report - generate highly-customized audit log reports. + sechecker - command line tool for performing modular checks on an SELinux policy. + sediff - semantic policy difference tool for SELinux. + secmds - command-line tools to analyze and search SELinux policy. + +if BR2_PACKAGE_SETOOLS + +config BR2_PACKAGE_SETOOLS_PYTHON_BINDINGS + bool "python bindings" + select BR2_PACKAGE_PYTHON + help + enable building python bindings + +endif
package/setools/setools-0001-cross_compile_fixes.patch new file +116 -0
116 lines not on this page · raw message
package/setools/setools-0002-swig_typedef_python_fixes.patch new file +1010 -0
1,010 lines not on this page · raw message
package/setools/setools.mk new file +91 -0
91 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 8/17 libcgroup: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/libcgroup/Config.in | 4 ++++ package/libcgroup/libcgroup.mk | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+), 0 deletions(-) create mode 100644 package/libcgroup/Config.in create mode 100644 package/libcgroup/libcgroup.mk
package/Config.in +1 -0
@@ -629,6 +629,7 @@ source "package/libatomic_ops/Config.in" source "package/libbsd/Config.in" source "package/libcap/Config.in" source "package/libcap-ng/Config.in" +source "package/libcgroup/Config.in" source "package/libdaemon/Config.in" source "package/libelf/Config.in" source "package/libevent/Config.in"
package/libcgroup/Config.in new file +4 -0
@@ -0,0 +1,4 @@ +config BR2_PACKAGE_LIBCGROUP + bool "libcgroup" + help + libcgroup is a library that abstracts the control group file system in Linux.
package/libcgroup/libcgroup.mk new file +22 -0
@@ -0,0 +1,22 @@ +############################################################# +# +# libcgroup +# +############################################################# +LIBCGROUP_VERSION = 0.38 +LIBCGROUP_SOURCE = libcgroup-$(LIBCGROUP_VERSION).tar.bz2 +LIBCGROUP_SITE = http://sourceforge.net/projects/libcg/files/latest/download +LIBCGROUP_LICENSE = LGPLv2.0 +LIBCGROUP_LICENSE_FILES = +LIBCGROUP_DEPENDENCIES = linux-pam + +LIBCGROUP_INSTALL_STAGING = YES +LIBCGROUP_INSTALL_TARGET = YES + +# Undefining _FILE_OFFSET_BITS here because of a "bug" with glibc fts.h large file support. +# see https://bugzilla.redhat.com/show_bug.cgi?id=574992 for more information +# This same issue is in policycoreutils +LIBCGROUP_CONF_ENV = CXXFLAGS+="-U_FILE_OFFSET_BITS" \ + CFLAGS+="-U_FILE_OFFSET_BITS" + +$(eval $(autotools-package))
Signature · 1 line
1.7.1
PATCH 9/17 policycoreutils: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/policycoreutils/Config.in | 64 ++++ package/policycoreutils/S15restorecond | 85 +++++ .../policycoreutils-crossCompileFixes.patch | 328 ++++++++++++++++++++ package/policycoreutils/policycoreutils.mk | 200 ++++++++++++ 5 files changed, 678 insertions(+), 0 deletions(-) create mode 100644 package/policycoreutils/Config.in create mode 100755 package/policycoreutils/S15restorecond create mode 100644 package/policycoreutils/policycoreutils-crossCompileFixes.patch create mode 100644 package/policycoreutils/policycoreutils.mk
package/Config.in +1 -0
@@ -903,6 +903,7 @@ source "package/checkpolicy/Config.in" source "package/libsepol/Config.in" source "package/libselinux/Config.in" source "package/libsemanage/Config.in" +source "package/policycoreutils/Config.in" source "package/sepolgen/Config.in" source "package/setools/Config.in" endmenu
package/policycoreutils/Config.in new file +64 -0
64 lines not on this page · raw message
package/policycoreutils/S15restorecond new file +85 -0
85 lines not on this page · raw message
package/policycoreutils/policycoreutils-crossCompileFixes.patch new file +328 -0
328 lines not on this page · raw message
package/policycoreutils/policycoreutils.mk new file +200 -0
200 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 10/17 python-pyxml: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/python-pyxml/Config.in | 11 ++++++ package/python-pyxml/python-xml.mk | 64 ++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 0 deletions(-) create mode 100644 package/python-pyxml/Config.in create mode 100644 package/python-pyxml/python-xml.mk
package/Config.in +1 -0
@@ -371,6 +371,7 @@ source "package/python-protobuf/Config.in" source "package/python-pygame/Config.in" source "package/python-pyparsing/Config.in" source "package/python-pyro/Config.in" +source "package/python-pyxml/Config.in" source "package/python-serial/Config.in" source "package/python-setuptools/Config.in" source "package/python-thrift/Config.in"
package/python-pyxml/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_PYXML + bool "python-pyxml" + depends on BR2_PACKAGE_PYTHON + help + This is the Python XML package. The distribution contains a + validating XML parser, an implementation of the SAX and DOM + programming interfaces, an interface to the Expat parser (and the + Expat parser itself), and a C helper module that can speed up + xmllib.py by a factor of 5. There's even documentation! + + http://pyxml.sourceforge.net/topics/index.html
package/python-pyxml/python-xml.mk new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 11/17 refpolicy: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/refpolicy/Config.in | 87 ++ package/refpolicy/S12selinux | 134 +++ package/refpolicy/config | 10 + .../refpolicy-001-gentoo_hardened_fixes.patch | 1250 ++++++++++++++++++++ package/refpolicy/refpolicy.mk | 84 ++ 6 files changed, 1566 insertions(+), 0 deletions(-) create mode 100644 package/refpolicy/Config.in create mode 100644 package/refpolicy/S12selinux create mode 100755 package/refpolicy/config create mode 100644 package/refpolicy/refpolicy-001-gentoo_hardened_fixes.patch create mode 100644 package/refpolicy/refpolicy.mk
package/Config.in +1 -0
@@ -905,6 +905,7 @@ source "package/libsepol/Config.in" source "package/libselinux/Config.in" source "package/libsemanage/Config.in" source "package/policycoreutils/Config.in" +source "package/refpolicy/Config.in" source "package/sepolgen/Config.in" source "package/setools/Config.in" endmenu
package/refpolicy/Config.in new file +87 -0
87 lines not on this page · raw message
package/refpolicy/S12selinux new file +134 -0
134 lines not on this page · raw message
package/refpolicy/config new file +10 -0
@@ -0,0 +1,10 @@ +# This file controls the state of SELinux on the system. +# SELINUX= can take one of these three values: +# enforcing - SELinux security policy is enforced. +# permissive - SELinux prints warnings instead of enforcing. +# disabled - No SELinux policy is loaded. +SELINUX=permissive +# SELINUXTYPE= can take one of these two values: +# targeted - Targeted processes are protected, +# mls - Multi Level Security protection. +SELINUXTYPE=refpolicy
package/refpolicy/refpolicy-001-gentoo_hardened_fixes.patch new file +1250 -0
1,250 lines not on this page · raw message
package/refpolicy/refpolicy.mk new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 12/17 python-pyparsing: Add host build option
In reply to Clayton Shotwell--- package/python-pyparsing/python-pyparsing.mk | 47 ++++++++++++++++++------- 1 files changed, 34 insertions(+), 13 deletions(-)
package/python-pyparsing/python-pyparsing.mk +34 -13
@@ -14,25 +14,46 @@ PYTHON_PYPARSING_DEPENDENCIES = python # Shamelessly vampirised from python-pygame ;-) define PYTHON_PYPARSING_BUILD_CMDS - (cd $(@D); \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDSHARED="$(TARGET_CROSS)gcc -shared" \ - CROSS_COMPILING=yes \ - _python_sysroot=$(STAGING_DIR) \ - _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ - _python_prefix=/usr \ - _python_exec_prefix=/usr \ - $(HOST_DIR)/usr/bin/python setup.py build \ + (cd $(@D); \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDSHARED="$(TARGET_CROSS)gcc -shared" \ + CROSS_COMPILING=yes \ + _python_sysroot=$(STAGING_DIR) \ + _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr \ + $(HOST_DIR)/usr/bin/python setup.py build \ ) endef # Shamelessly vampirised from python-pygame ;-) define PYTHON_PYPARSING_INSTALL_TARGET_CMDS - (cd $(@D); \ - $(HOST_DIR)/usr/bin/python setup.py install \ - --prefix=$(TARGET_DIR)/usr \ + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python setup.py install \ + --prefix=$(TARGET_DIR)/usr \ + ) +endef + +HOST_PYTHON_PYPARSING_DEPENDENCIES = host-python + +define HOST_PYTHON_PYPARSING_BUILD_CMDS + (cd $(@D); \ + _python_sysroot=$(HOST_DIR) \ + _python_srcdir=$(BUILD_DIR)/host-python$(PYTHON_VERSION) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr \ + $(HOST_DIR)/usr/bin/python setup.py build \ + ) +endef + +define HOST_PYTHON_PYPARSING_INSTALL_CMDS + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python setup.py install \ + --prefix=$(HOST_DIR)/usr \ ) endef $(eval $(generic-package)) +$(eval $(host-generic-package)) +
Signature · 1 line
1.7.1
PATCH 13/17 audit: new package
In reply to Clayton Shotwell--- package/Config.in | 1 + package/audit/Config.in | 26 + package/audit/S14auditd | 172 +++ ...audit-2.3.1-crossCompileHeaderCreationFix.patch | 1388 ++++++++++++++++++++ package/audit/audit-2.3.1-remove-zos-plugin.patch | 31 + package/audit/audit.mk | 61 + 6 files changed, 1679 insertions(+), 0 deletions(-) create mode 100644 package/audit/Config.in create mode 100755 package/audit/S14auditd create mode 100644 package/audit/audit-2.3.1-crossCompileHeaderCreationFix.patch create mode 100644 package/audit/audit-2.3.1-remove-zos-plugin.patch create mode 100644 package/audit/audit.mk
package/Config.in +1 -0
@@ -913,6 +913,7 @@ endmenu menu "System tools" source "package/acl/Config.in" source "package/attr/Config.in" +source "package/audit/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/bootutils/Config.in" endif
package/audit/Config.in new file +26 -0
@@ -0,0 +1,26 @@ +config BR2_PACKAGE_AUDIT + bool "audit" + help + The audit package contains the user space utilities for + storing and searching the audit records generate by + the audit subsystem in the Linux 2.6 kernel + + Note: The z/OS remote plugin is disabled in this package + + http://people.redhat.com/sgrubb/audit/ + +if BR2_PACKAGE_AUDIT + +config BR2_PACKAGE_AUDIT_PYTHON_BINDINGS + select BR2_PACKAGE_PYTHON + bool "python bindings" + help + enable building python bindings + +config BR2_PACKAGE_AUDIT_LIBCAP_NG + select BR2_PACKAGE_LIBCAP_NG + bool "libcap-ng support" + help + Add Libcap-ng support + +endif
package/audit/S14auditd new file +172 -0
172 lines not on this page · raw message
package/audit/audit-2.3.1-crossCompileHeaderCreationFix.patch new file +1388 -0
1,388 lines not on this page · raw message
package/audit/audit-2.3.1-remove-zos-plugin.patch new file +31 -0
@@ -0,0 +1,31 @@ +--- a/audisp/plugins/Makefile.am 2012-08-28 10:33:03.582396601 -0500 ++++ b/audisp/plugins/Makefile.am 2012-08-28 10:33:14.162399662 -0500 +@@ -22,7 +22,7 @@ + + CONFIG_CLEAN_FILES = *.loT *.rej *.orig + +-SUBDIRS = builtins zos-remote remote ++SUBDIRS = builtins remote + #SUBDIRS = builtins zos-remote + if HAVE_PRELUDE + SUBDIRS += prelude +--- a/audisp/plugins/Makefile.in 2012-08-28 10:33:03.592380390 -0500 ++++ b/audisp/plugins/Makefile.in 2012-08-28 10:35:38.482397668 -0500 +@@ -84,7 +84,7 @@ + distdir + ETAGS = etags + CTAGS = ctags +-DIST_SUBDIRS = builtins zos-remote remote prelude ++DIST_SUBDIRS = builtins remote prelude + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + am__relativize = \ + dir0=`pwd`; \ +@@ -242,7 +242,7 @@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + CONFIG_CLEAN_FILES = *.loT *.rej *.orig +-SUBDIRS = builtins zos-remote remote $(am__append_1) ++SUBDIRS = builtins remote $(am__append_1) + all: all-recursive + + .SUFFIXES:
package/audit/audit.mk new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 14/17 shadow: new package
In reply to Clayton Shotwell--- package/Config.in | 3 ++ package/shadow/Config.in | 13 +++++++++++ package/shadow/shadow.mk | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 0 deletions(-) create mode 100644 package/shadow/Config.in create mode 100644 package/shadow/shadow.mk
package/Config.in +3 -0
@@ -891,6 +891,9 @@ source "package/lockfile-progs/Config.in" source "package/logrotate/Config.in" source "package/logsurfer/Config.in" source "package/screen/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS +source "package/shadow/Config.in" +endif source "package/sudo/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/time/Config.in"
package/shadow/Config.in new file +13 -0
@@ -0,0 +1,13 @@ +config BR2_PACKAGE_SHADOW + bool "shadow" + help + The shadow-utils package includes the necessary programs for + converting UNIX password files to the shadow password format, plus + programs for managing user and group accounts. The pwconv command + converts passwords to the shadow password format. The pwunconv command + unconverts shadow passwords and generates an npasswd file (a standard + UNIX password file). The pwck command checks the integrity of password + and shadow files. The lastlog command prints out the last login times + for all users. The useradd, userdel, and usermod commands are used for + managing user accounts. The groupadd, groupdel, and groupmod commands + are used for managing group accounts.
package/shadow/shadow.mk new file +53 -0
53 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 15/17 pcre: Add host build support
In reply to Clayton Shotwell--- package/pcre/pcre.mk | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
package/pcre/pcre.mk +1 -0
@@ -21,3 +21,4 @@ PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_16),--enable-pcre16,--disable-pcre16) PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_32),--enable-pcre32,--disable-pcre32) $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
1.7.1
PATCH 16/17 bzip2: Add host build shared library installation
In reply to Clayton Shotwell--- package/bzip2/bzip2.mk | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
package/bzip2/bzip2.mk +2 -0
@@ -71,6 +71,8 @@ endef define HOST_BZIP2_INSTALL_CMDS $(HOST_MAKE_ENV) \ $(MAKE) PREFIX=$(HOST_DIR)/usr -C $(@D) install + $(HOST_MAKE_ENV) $(MAKE) \ + -f Makefile-libbz2_so PREFIX=$(HOST_DIR)/usr -C $(@D) install endef $(eval $(generic-package))
Signature · 1 line
1.7.1
PATCH 17/17 sqlite: Add host build support
In reply to Clayton Shotwell--- package/sqlite/sqlite.mk | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
package/sqlite/sqlite.mk +1 -0
@@ -68,3 +68,4 @@ define SQLITE_UNINSTALL_STAGING_CMDS endef $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
1.7.1
cover SELinux Buildroot Additions
In reply to Clayton ShotwellDear Clayton Shotwell,
Quoted 3 lines · Clayton Shotwell
Submitting an initial patch set to add SELinux support to Buildroot. This patch set adds packages required for an SELinux system along with the packages needed to build them.
Thanks Clayton for these patches. They are definitely interesting, but as you've seen they are also quite big and therefore will take a bit of time to review and get merged.
In order to ease the review process, would it be possible to get a short introduction to SELinux, and especially what tools are needed on the host, what tools are needed on the target? I'm especially interested in understanding why/if we need all this Python stuff on the target.
So essentially, having an overview of the patch series would be nice:
what the various packages are doing (you can skip the basic stuff like ustr), and how they "interact" with each other.
Thanks a lot again for this contribution!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
cover SELinux Buildroot Additions
Thomas,
Clayton and I have been going back and forth on how best to do this, as the next set of patch that we want to release provides information on SELinux.
You had provided feedback to Clayton on options for providing this information
and I think it was agreed upon that the manual will be the best place for this.
Is this correct?
Thomas Petazzoni <[email protected]> wrote on 09/06/2013 12:49:03 PM:
Quoted 11 lines
Dear Clayton Shotwell,
Quoted 3 lines · Clayton Shotwell
Submitting an initial patch set to add SELinux support to Buildroot. This patch set adds packages required for an SELinux system along with the packages needed to build them.
Thanks Clayton for these patches. They are definitely interesting, but as you've seen they are also quite big and therefore will take a bit of time to review and get merged.
Quoted 5 lines
In order to ease the review process, would it be possible to get a short introduction to SELinux, and especially what tools are needed on the host, what tools are needed on the target? I'm especially interested in understanding why/if we need all this Python stuff on the target.
I believe the best way to answer to questions above about is add to the manual.
As this way that we won't have to necessarily duplicate work (and motivates us
to create the documentation). So hopefully by the middle of the week next week
we can submit some documentation.
Where would you like this documentation placed? Also how does one go about adding
to the manual (I can't seem to find anything in the manual)? Or do we want to place
this information on the buildroot wiki?
Quoted 6 lines
So essentially, having an overview of the patch series would be nice:
what the various packages are doing (you can skip the basic stuff like ustr), and how they "interact" with each other.Thanks a lot again for this contribution!
Ryan J Barnett / Software Engineer / Platform SW MS 137-157, 855 35th St NE, Cedar Rapids, IA, 52498-3161, US
Phone: 319-263-3880 / VPN: 263-3880
rjbarnet at rockwellcollins.com www.rockwellcollins.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130906/6b51d6f2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2004 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130906/6b51d6f2/attachment-0001.gif>
cover SELinux Buildroot Additions
Dear Ryan Barnett,
Quoted 8 lines · Ryan Barnett
Clayton and I have been going back and forth on how best to do this, as the next set of patch that we want to release provides information on SELinux.
You had provided feedback to Clayton on options for providing this information
and I think it was agreed upon that the manual will be the best place for this.
Is this correct?
This is correct.
Quoted 6 lines
Quoted 5 lines
In order to ease the review process, would it be possible to get a short introduction to SELinux, and especially what tools are needed on the host, what tools are needed on the target? I'm especially interested in understanding why/if we need all this Python stuff on the target.
Quoted 7 lines
I believe the best way to answer to questions above about is add to the manual.
As this way that we won't have to necessarily duplicate work (and motivates us
to create the documentation). So hopefully by the middle of the week next week
we can submit some documentation.
That would be good. However, I am not sure the questions I am asking here match exactly what should be in the documentation. In the documentation, we should explain how a Buildroot user can enable SELinux support and make use of it on the target. While my questions certainly overlap some of this, I believe we also need a few more details of the internals to roughly understand what the different packages are doing.
Quoted 5 lines
Where would you like this documentation placed? Also how does one go about adding
to the manual (I can't seem to find anything in the manual)? Or do we want to place
this information on the buildroot wiki?
I believe the manual is a better place than the Buildroot Wiki. For now, we've usually stored this kind of additional informations in the "Details on Buildroot configuration" section. So something like:
docs/manual/configure.txt +5 -0
@@ -430,3 +430,8 @@ can be chosen from +System configuration+, +Init system+: The solution recommended by Buildroot developers is to use the *Busybox init* as it is sufficient for most embedded systems. *systemd* can be used for more complex situations. + +SELinux support +~~~~~~~~~~~~~~~ + +Here put some details about the SELinux support.
Thanks,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com