2013-09-11 23:59:21 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# libsepol
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
libsepol: bump to 2.7, setools: bump to 4.1.1
The reason for combining these patches is because the
old version of setools is not compatible iwth libsepol 2.7. If a user where
to do a git pull on a patch that only updates libsepol or setools, the build
would fail to compile.
setools has been completely rewritten in python instead of C.
The current version of setools includes a few programs that require
python-qt5 or python-networkx to run, however the package does not
check to see if these exist when compiling, and will install the scripts
to the target directory even if they don't exist.
In the case of python-networkx, this package is not available on Buildroot.
The scripts that require them are: sedta and seinfoflow.
In the case of python-qt5, qpol is the script that requires it.
Some setools.mk notes to get the package to compile:
- Convert the package .mk to use python-package instead of autotools-package.
- setup.py hard codes base_lib_dirs to point to several host directories.
To fix this, sed is used before compiling to point the base_lib_dirs to
the staging directory.
- setup.py also includes the "Werror" flag, however compilers before gcc6
cause a few autogenerated variables to not be initialized before use,
causing the build to fail.
To fix this, a patch is provided that removes the Werror flag.
- Remove sedta and seinfoflow from the target system after install. These
packages rely on the package python-networkx which is not available in
buildroot.
- Remove the installed apol package and the setoolsgui directory from the
target directory if python-qt5 is not selected.
Other changes:
- Removed all patches, as they are not compatible with the new version of
setools.
- Add COPYING, COPYING.GPL, and COPYING.LGPL to setools.hash
Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-10-18 00:32:16 +02:00
|
|
|
LIBSEPOL_VERSION = 2.7
|
|
|
|
LIBSEPOL_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804
|
2017-03-30 15:43:34 +02:00
|
|
|
LIBSEPOL_LICENSE = LGPL-2.1+
|
2013-09-11 23:59:21 +02:00
|
|
|
LIBSEPOL_LICENSE_FILES = COPYING
|
|
|
|
|
|
|
|
LIBSEPOL_INSTALL_STAGING = YES
|
2016-07-02 00:24:55 +02:00
|
|
|
LIBSEPOL_DEPENDENCIES = host-flex
|
2016-07-03 00:20:53 +02:00
|
|
|
HOST_LIBSEPOL_DEPENDENCIES = host-flex
|
2013-09-11 23:59:21 +02:00
|
|
|
|
2014-02-20 22:42:36 +01:00
|
|
|
LIBSEPOL_MAKE_FLAGS = $(TARGET_CONFIGURE_OPTS)
|
|
|
|
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2014-02-20 22:42:36 +01:00
|
|
|
LIBSEPOL_MAKE_FLAGS += STATIC=1
|
|
|
|
endif
|
|
|
|
|
2013-09-11 23:59:21 +02:00
|
|
|
define LIBSEPOL_BUILD_CMDS
|
2018-01-16 09:22:18 +01:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(LIBSEPOL_MAKE_FLAGS)
|
2013-09-11 23:59:21 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBSEPOL_INSTALL_STAGING_CMDS
|
2016-10-17 18:06:53 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(STAGING_DIR)
|
2013-09-11 23:59:21 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LIBSEPOL_INSTALL_TARGET_CMDS
|
2016-10-17 18:06:53 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(TARGET_DIR)
|
2013-09-11 23:59:21 +02:00
|
|
|
endef
|
|
|
|
|
2017-07-03 14:44:56 +02:00
|
|
|
HOST_LIBSEPOL_MAKE_ENV = \
|
|
|
|
$(HOST_MAKE_ENV) \
|
2017-07-05 13:14:18 +02:00
|
|
|
PREFIX=$(HOST_DIR)
|
2017-07-03 14:44:56 +02:00
|
|
|
|
2013-09-11 23:59:21 +02:00
|
|
|
define HOST_LIBSEPOL_BUILD_CMDS
|
2017-07-03 14:44:56 +02:00
|
|
|
$(HOST_LIBSEPOL_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS)
|
2013-09-11 23:59:21 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_LIBSEPOL_INSTALL_CMDS
|
2017-07-03 14:44:56 +02:00
|
|
|
$(HOST_LIBSEPOL_MAKE_ENV) $(MAKE) -C $(@D) install $(HOST_CONFIGURE_OPTS)
|
2017-07-05 13:14:21 +02:00
|
|
|
ln -sf libsepol.so.1 $(HOST_DIR)/lib/libsepol.so
|
2013-09-11 23:59:21 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|
|
|
|
$(eval $(host-generic-package))
|