Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages to support the SELinux security mechanism #10664

Open
wants to merge 11 commits into
base: master
from

utils/policycoreutils: new package

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  • Loading branch information
tpetazzoni committed May 22, 2019
commit 614992e10f655fb0c9e0c4f4ff7ac55604576af2
@@ -0,0 +1,60 @@
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=policycoreutils
PKG_VERSION:=2.9
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20190315
PKG_HASH:=c53c344f28007b3c0742bd958751e9b5d2385898adeb8aec6281ae57342f0f7b
PKG_INSTALL:=1
HOST_BUILD_DEPENDS:=libsemanage/host

PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>

include $(INCLUDE_DIR)/package.mk

define Package/policycoreutils
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:= +libsemanage +libcap-ng
TITLE:=SELinux policy utilities
URL:=http://selinuxproject.org/page/Main_Page
endef

define Package/policycoreutils/description
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.
endef

include $(INCLUDE_DIR)/host-build.mk

HOST_MAKE_FLAGS += \
PREFIX=$(STAGING_DIR_HOSTPKG) \
SBINDIR=$(STAGING_DIR_HOSTPKG)/sbin \
ETCDIR=$(STAGING_DIR_HOSTPKG)/etc

define Package/policycoreutils/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/sbin
$(CP) $(PKG_INSTALL_DIR)/sbin/* $(1)/sbin/
endef

$(eval $(call HostBuild))
$(eval $(call BuildPackage,policycoreutils))
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.