Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From 85763549c53b2907dab094163f1404b2233f8029 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Duskett <aduskett@gmail.com>
|
||||
Date: Mon, 9 Oct 2017 16:51:20 -0400
|
||||
Subject: [PATCH] Add DESTDIR to setfiles
|
||||
|
||||
The addition of this patch makes the use of DESTDIR
|
||||
mandatory as there are conditional checks which would fail if it's not
|
||||
defined.
|
||||
|
||||
This patch was updated from the patch provided by Niranjan Reddy to
|
||||
accomodate version 2.5
|
||||
|
||||
Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
|
||||
Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Update for 2.8]
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
[Update for 3.2]
|
||||
---
|
||||
setfiles/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setfiles/Makefile b/setfiles/Makefile
|
||||
index a3bbbe1..df675cf 100644
|
||||
--- a/setfiles/Makefile
|
||||
+++ b/setfiles/Makefile
|
||||
@@ -3,7 +3,7 @@ LINGUAS ?= ru
|
||||
PREFIX ?= /usr
|
||||
SBINDIR ?= /sbin
|
||||
MANDIR = $(PREFIX)/share/man
|
||||
-AUDITH ?= $(shell test -f /usr/include/libaudit.h && echo y)
|
||||
+AUDITH ?= $(shell test -f $(DESTDIR)$(PREFIX)/include/libaudit.h && echo y)
|
||||
|
||||
CFLAGS ?= -g -Werror -Wall -W
|
||||
override CFLAGS += -I../../libselinux/include
|
||||
--
|
||||
2.13.6
|
||||
|
||||
54
package/policycoreutils/0002-Add-PREFIX-to-host-paths.patch
Normal file
54
package/policycoreutils/0002-Add-PREFIX-to-host-paths.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
From a221304344b3f9db7e86d928cf97d77542bcf456 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Duskett <aduskett@gmail.com>
|
||||
Date: Mon, 9 Oct 2017 16:47:19 -0400
|
||||
Subject: [PATCH] Add PREFIX to host paths
|
||||
|
||||
Updates the remaining hardcoded host paths used in the build to be
|
||||
prefixed with a PREFIX path to allow cross compilation.
|
||||
|
||||
Updated to work with version 3.2
|
||||
|
||||
Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
|
||||
Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Update for 2.8]
|
||||
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
||||
[Update for 3.2]
|
||||
---
|
||||
newrole/Makefile | 4 ++--
|
||||
run_init/Makefile | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/newrole/Makefile b/newrole/Makefile
|
||||
index 0e7ebce..3188cec 100644
|
||||
--- a/newrole/Makefile
|
||||
+++ b/newrole/Makefile
|
||||
@@ -4,8 +4,8 @@ PREFIX ?= /usr
|
||||
BINDIR ?= $(PREFIX)/bin
|
||||
MANDIR ?= $(PREFIX)/share/man
|
||||
ETCDIR ?= /etc
|
||||
-LOCALEDIR = $(DESTDIR)$(PREFIX)/share/locale
|
||||
-INCLUDEDIR ?= $(PREFIX)/include
|
||||
+LOCALEDIR = $(DESTDIR)$(PREFIX)
|
||||
+INCLUDEDIR ?= $(LOCALEDIR)/include
|
||||
PAMH ?= $(shell test -f $(INCLUDEDIR)/security/pam_appl.h && echo y)
|
||||
AUDITH ?= $(shell test -f $(INCLUDEDIR)/libaudit.h && echo y)
|
||||
# Enable capabilities to permit newrole to generate audit records.
|
||||
diff --git a/run_init/Makefile b/run_init/Makefile
|
||||
index e86364a..20a64d4 100644
|
||||
--- a/run_init/Makefile
|
||||
+++ b/run_init/Makefile
|
||||
@@ -6,8 +6,8 @@ SBINDIR ?= $(PREFIX)/sbin
|
||||
MANDIR ?= $(PREFIX)/share/man
|
||||
ETCDIR ?= /etc
|
||||
LOCALEDIR ?= $(DESTDIR)$(PREFIX)/share/locale
|
||||
-PAMH ?= $(shell test -f /usr/include/security/pam_appl.h && echo y)
|
||||
-AUDITH ?= $(shell test -f /usr/include/libaudit.h && echo y)
|
||||
+PAMH ?= $(shell test -f $(DESTDIR)$(PREFIX)/include/security/pam_appl.h && echo y)
|
||||
+AUDITH ?= $(shell test -f $(DESTDIR)$(PREFIX)/include/libaudit.h && echo y)
|
||||
|
||||
CFLAGS ?= -Werror -Wall -W
|
||||
override CFLAGS += -I../../libselinux/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
|
||||
--
|
||||
2.31.1
|
||||
|
||||
41
package/policycoreutils/Config.in
Normal file
41
package/policycoreutils/Config.in
Normal file
@@ -0,0 +1,41 @@
|
||||
comment "policycoreutils needs a toolchain w/ threads, dynamic library, gcc >= 5"
|
||||
depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
|
||||
config BR2_PACKAGE_POLICYCOREUTILS
|
||||
bool "policycoreutils"
|
||||
depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS # libsemanage
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libselinux, libsemanage, libsepol
|
||||
depends on !BR2_STATIC_LIBS # libselinux, libsemanage, libsepol
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # libsemanage -> libselinux -> libsepol
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libcap-ng
|
||||
select BR2_PACKAGE_LIBSELINUX
|
||||
select BR2_PACKAGE_LIBSEMANAGE
|
||||
select BR2_PACKAGE_LIBSEPOL
|
||||
select BR2_PACKAGE_LIBCAP_NG
|
||||
select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
|
||||
help
|
||||
Policycoreutils is a collection of policy utilities
|
||||
(originally the "core" set of utilities needed to use
|
||||
SELinux, although it has grown a bit over time), which have
|
||||
different dependencies. sestatus, secon, run_init, and
|
||||
newrole only use libselinux. load_policy and setfiles only
|
||||
use libselinux and libsepol. semodule and semanage use
|
||||
libsemanage (and thus bring in dependencies on libsepol and
|
||||
libselinux as well). setsebool uses libselinux to make
|
||||
non-persistent boolean changes (via the kernel interface)
|
||||
and uses libsemanage to make persistent boolean changes.
|
||||
|
||||
The base package will install the following utilities:
|
||||
load_policy
|
||||
newrole
|
||||
run_init
|
||||
secon
|
||||
semodule
|
||||
sestatus
|
||||
setfiles
|
||||
setsebool
|
||||
|
||||
http://selinuxproject.org/page/Main_Page
|
||||
5
package/policycoreutils/policycoreutils.hash
Normal file
5
package/policycoreutils/policycoreutils.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# https://github.com/SELinuxProject/selinux/wiki/Releases
|
||||
sha256 8dbd50d868acbfae9d1a972f6bbb2587f06c9ec73308d11af6acb3a401de9832 policycoreutils-3.10.tar.gz
|
||||
|
||||
# Hash for license file
|
||||
sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 LICENSE
|
||||
65
package/policycoreutils/policycoreutils.mk
Normal file
65
package/policycoreutils/policycoreutils.mk
Normal file
@@ -0,0 +1,65 @@
|
||||
################################################################################
|
||||
#
|
||||
# policycoreutils
|
||||
#
|
||||
################################################################################
|
||||
|
||||
POLICYCOREUTILS_VERSION = 3.10
|
||||
POLICYCOREUTILS_SITE = https://github.com/SELinuxProject/selinux/releases/download/$(POLICYCOREUTILS_VERSION)
|
||||
POLICYCOREUTILS_LICENSE = GPL-2.0
|
||||
POLICYCOREUTILS_LICENSE_FILES = LICENSE
|
||||
POLICYCOREUTILS_CPE_ID_VENDOR = selinuxproject
|
||||
|
||||
POLICYCOREUTILS_DEPENDENCIES = libselinux libsemanage libsepol libcap-ng host-pkgconf $(TARGET_NLS_DEPENDENCIES)
|
||||
POLICYCOREUTILS_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) LDLIBS=$(TARGET_NLS_LIBS)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
|
||||
POLICYCOREUTILS_DEPENDENCIES += libxcrypt
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
||||
POLICYCOREUTILS_DEPENDENCIES += linux-pam
|
||||
POLICYCOREUTILS_MAKE_OPTS += NAMESPACE_PRIV=y
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_AUDIT),y)
|
||||
POLICYCOREUTILS_DEPENDENCIES += audit
|
||||
POLICYCOREUTILS_MAKE_OPTS += AUDIT_LOG_PRIV=y USE_AUDIT=y
|
||||
endif
|
||||
|
||||
# Enable LSPP_PRIV if both audit and linux pam are enabled
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PAM)$(BR2_PACKAGE_AUDIT),yy)
|
||||
POLICYCOREUTILS_MAKE_OPTS += LSPP_PRIV=y
|
||||
endif
|
||||
|
||||
# We need to pass DESTDIR at build time because it's used by
|
||||
# policycoreutils build system to find headers and libraries.
|
||||
define POLICYCOREUTILS_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(POLICYCOREUTILS_MAKE_OPTS) \
|
||||
DESTDIR=$(STAGING_DIR) all
|
||||
endef
|
||||
|
||||
define POLICYCOREUTILS_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(POLICYCOREUTILS_MAKE_OPTS) \
|
||||
DESTDIR=$(TARGET_DIR) install
|
||||
endef
|
||||
|
||||
HOST_POLICYCOREUTILS_DEPENDENCIES = host-libselinux host-libsemanage host-libsepol host-pkgconf
|
||||
|
||||
# We need to pass PREFIX because it defaults to $(DESTDIR)/usr
|
||||
HOST_POLICYCOREUTILS_MAKE_OPTS = \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
PREFIX=$(HOST_DIR) \
|
||||
ETCDIR=$(HOST_DIR)/etc \
|
||||
SBINDIR=$(HOST_DIR)/sbin
|
||||
|
||||
define HOST_POLICYCOREUTILS_BUILD_CMDS
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_POLICYCOREUTILS_MAKE_OPTS) all
|
||||
endef
|
||||
|
||||
define HOST_POLICYCOREUTILS_INSTALL_CMDS
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_POLICYCOREUTILS_MAKE_OPTS) install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user