initial buildroot for linux 5.15
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 LDLIBS += -lselinux -lsepol
|
||||
--
|
||||
2.13.6
|
||||
|
||||
@@ -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 += -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
comment "policycoreutils needs a toolchain w/ threads, dynamic library"
|
||||
depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_POLICYCOREUTILS
|
||||
bool "policycoreutils"
|
||||
depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS # libsemanage
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libsemanage
|
||||
depends on !BR2_STATIC_LIBS #libsemanage
|
||||
select BR2_PACKAGE_LIBSEMANAGE
|
||||
select BR2_PACKAGE_LIBCAP_NG
|
||||
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
|
||||
@@ -0,0 +1,3 @@
|
||||
# https://github.com/SELinuxProject/selinux/wiki/Releases
|
||||
sha256 d1331c6fa766c547b071c491de90b9f343c8dbffdb119be8a5a7e491199b93a9 policycoreutils-3.2.tar.gz
|
||||
sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING
|
||||
@@ -0,0 +1,97 @@
|
||||
################################################################################
|
||||
#
|
||||
# policycoreutils
|
||||
#
|
||||
################################################################################
|
||||
|
||||
POLICYCOREUTILS_VERSION = 3.2
|
||||
POLICYCOREUTILS_SITE = https://github.com/SELinuxProject/selinux/releases/download/$(POLICYCOREUTILS_VERSION)
|
||||
POLICYCOREUTILS_LICENSE = GPL-2.0
|
||||
POLICYCOREUTILS_LICENSE_FILES = COPYING
|
||||
POLICYCOREUTILS_CPE_ID_VENDOR = selinuxproject
|
||||
|
||||
POLICYCOREUTILS_DEPENDENCIES = libsemanage libcap-ng $(TARGET_NLS_DEPENDENCIES)
|
||||
POLICYCOREUTILS_MAKE_OPTS = LDLIBS=$(TARGET_NLS_LIBS)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
||||
POLICYCOREUTILS_DEPENDENCIES += linux-pam
|
||||
POLICYCOREUTILS_MAKE_OPTS += NAMESPACE_PRIV=y
|
||||
define POLICYCOREUTILS_INSTALL_TARGET_LINUX_PAM_CONFS
|
||||
$(INSTALL) -D -m 0644 $(@D)/newrole/newrole-lspp.pamd $(TARGET_DIR)/etc/pam.d/newrole
|
||||
$(INSTALL) -D -m 0644 $(@D)/run_init/run_init.pamd $(TARGET_DIR)/etc/pam.d/run_init
|
||||
endef
|
||||
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
|
||||
|
||||
# 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
|
||||
POLICYCOREUTILS_MAKE_OPTS += \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(TARGET_CFLAGS) -U_FILE_OFFSET_BITS" \
|
||||
CPPFLAGS="$(TARGET_CPPFLAGS) -U_FILE_OFFSET_BITS"
|
||||
|
||||
POLICYCOREUTILS_MAKE_DIRS = \
|
||||
load_policy newrole run_init \
|
||||
secon semodule sestatus setfiles \
|
||||
setsebool scripts
|
||||
|
||||
# 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
|
||||
$(foreach d,$(POLICYCOREUTILS_MAKE_DIRS),
|
||||
$(MAKE) -C $(@D)/$(d) $(POLICYCOREUTILS_MAKE_OPTS) \
|
||||
DESTDIR=$(STAGING_DIR) all
|
||||
)
|
||||
endef
|
||||
|
||||
define POLICYCOREUTILS_INSTALL_TARGET_CMDS
|
||||
$(foreach d,$(POLICYCOREUTILS_MAKE_DIRS),
|
||||
$(MAKE) -C $(@D)/$(d) $(POLICYCOREUTILS_MAKE_OPTS) \
|
||||
DESTDIR=$(TARGET_DIR) install
|
||||
)
|
||||
endef
|
||||
|
||||
HOST_POLICYCOREUTILS_DEPENDENCIES = host-libsemanage
|
||||
|
||||
# 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
|
||||
# We also need to pass PREFIX because it defaults to $(DESTDIR)/usr
|
||||
HOST_POLICYCOREUTILS_MAKE_OPTS = \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(HOST_CFLAGS) -U_FILE_OFFSET_BITS" \
|
||||
CPPFLAGS="$(HOST_CPPFLAGS) -U_FILE_OFFSET_BITS" \
|
||||
PREFIX=$(HOST_DIR) \
|
||||
ETCDIR=$(HOST_DIR)/etc \
|
||||
SBINDIR=$(HOST_DIR)/sbin
|
||||
|
||||
# Note: We are only building the programs required by the refpolicy build
|
||||
HOST_POLICYCOREUTILS_MAKE_DIRS = \
|
||||
load_policy newrole run_init \
|
||||
secon semodule sestatus setfiles \
|
||||
setsebool
|
||||
|
||||
define HOST_POLICYCOREUTILS_BUILD_CMDS
|
||||
$(foreach d,$(HOST_POLICYCOREUTILS_MAKE_DIRS),
|
||||
$(MAKE) -C $(@D)/$(d) $(HOST_POLICYCOREUTILS_MAKE_OPTS) all
|
||||
)
|
||||
endef
|
||||
|
||||
define HOST_POLICYCOREUTILS_INSTALL_CMDS
|
||||
$(foreach d,$(HOST_POLICYCOREUTILS_MAKE_DIRS),
|
||||
$(MAKE) -C $(@D)/$(d) $(HOST_POLICYCOREUTILS_MAKE_OPTS) install
|
||||
)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user