meta-selinux/recipes-security/selinux/restorecond_3.8.1.bb
Scott Murray 05178ce178 Adapt to UNPACKDIR changes
Remove or update S definitions as required to work with oe-core
S/UNPACKDIR changes.  A default definition of S has been added to
selinux_common.inc to avoid duplication in the set of recipes that
use it to build packages from different subdirectories of the selinux
repo.  The three packagegroups test build successfully with these
changes.

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-06-30 13:38:18 +08:00

36 lines
1.2 KiB
BlitzBasic

SUMMARY = "Daemon to watch for file creation and set default file context"
DESCRIPTION = "\
The restorecond daemon uses inotify to watch files listed in the \
/etc/selinux/restorecond.conf, when they are created, this daemon \
will make sure they have the correct file context associated with \
the policy."
SECTION = "base"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=393a5ca445f6965873eca0259a17f833"
require selinux_common.inc
inherit pkgconfig systemd update-rc.d
DEPENDS = "libsepol libselinux glib-2.0"
EXTRA_OEMAKE = "SYSTEMDSYSTEMUNITDIR=${systemd_system_unitdir} \
SYSTEMDUSERUNITDIR=${systemd_user_unitdir} \
"
FILES:${PN} += "${datadir}/dbus-1/services/org.selinux.Restorecond.service \
${systemd_user_unitdir}/* \
"
SYSTEMD_SERVICE:restorecond = "restorecond.service"
INITSCRIPT_PACKAGES = "restorecond"
INITSCRIPT_NAME:restorecond = "restorecond"
INITSCRIPT_PARAMS:restorecond = "defaults"
do_install:append() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then
# remove /usr/lib/systemd/user
rm -rf ${D}${nonarch_libdir}
fi
}