RDEPENDS:${PN}:append:with-lsm-smack = " smack" PACKAGE_WRITE_DEPS:append:with-lsm-smack = " smack-native" do_install:append() { install -m 0700 -d ${D}/${sysconfdir}/skel chmod -R 0700 ${D}/${sysconfdir}/skel install -m 0700 -d ${D}/${sysconfdir}/skel/app-data install -m 0700 -d ${D}/${sysconfdir}/skel/.config install -m 0755 -d ${D}/var if [ -d ${D}/usr/local ]; then mv ${D}/usr/local ${D}/var else install -m 0755 -d ${D}/var/local fi ln -s ../var/local ${D}/usr/local } do_install:append:with-lsm-smack () { install -d ${D}/${sysconfdir}/smack/accesses.d cat > ${D}/${sysconfdir}/smack/accesses.d/default-access-domains-no-user <${D}/${sysconfdir}/smack/accesses.d/default-access-domains <${D}/${libdir}/tmpfiles.d/packet-forwarding.conf <${D}/${base_libdir}/udev/rules.d/85-netdev-ipconf-smacklabel.rules < install -d $D${sysconfdir} # This has no effect on files installed into /etc during image construction # because pseudo does not know the special semantic of SMACK::TRANSMUTE. # To avoid having different xattrs on files inside /etc when pre-installed # in an image vs. installed on a device, the xattr-images.bbclass has # a workaround for this deficiency in pseudo. chsmack -t $D${sysconfdir} chsmack -a 'System::Shared' $D${sysconfdir} # Same for /media. Any daemon running as "System" will get write access # to everything. install -d $D/media chsmack -t $D/media chsmack -a 'System::Shared' $D/media # Same for /var. Any daemon running as "System" will get write access # to everything. install -d $D${localstatedir} chsmack -t $D${localstatedir} chsmack -a 'System::Shared' $D${localstatedir} # mkdir -p $D/tmp chsmack -a '*' $D/tmp # # # These are in a file system mounted by systemd. We patch the systemd service # to set these attributes. }