blob: 12a3105c6881abf47eae98edd797de92ace9a216 [file] [log] [blame]
Andrew Geissler615f2f12022-07-15 14:00:58 -05001#
2# Copyright 2022 Armin Kuster <akuster808@gmail.com>
3#
4SUMMARY = "Linux namespaces and seccomp-bpf sandbox"
5DESCRIPTION = "Firejail is a SUID sandbox program that reduces the risk of security breaches \
6by restricting the running environment of untrusted applications using Linux namespaces, \
7seccomp-bpf and Linux capabilities."
8
9LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
10LICENSE = "GPL-2.0-only"
11
Andrew Geissler2daf84b2023-03-31 09:57:23 -050012SRCREV = "2551bc71f14052344666f3ca2ad67f5b798020b9"
Andrew Geissler615f2f12022-07-15 14:00:58 -050013SRC_URI = "git://github.com/netblue30/firejail.git;protocol=https;branch=master \
14 file://exclude_seccomp_util_compiles.patch \
15 "
16
17DEPENDS = "libseccomp"
18
19S = "${WORKDIR}/git"
20
21inherit autotools-brokensep pkgconfig bash-completion features_check
22
23REQUIRED_DISTRO_FEATURES = "seccomp"
24
25PACKAGECONFIG ?= ""
26PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor', '', d)}"
27PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
28PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
29
30PACKAGECONFIG[apparmor] = "--enable-apparmor, --disable-apparmor, apparmor, apparmor"
31PACKAGECONFIG[selinux] = "--enable-selinux, --disable-selinux, libselinux"
32PACKAGECONFIG[x11] = " --enable-x11, --disable-x11, "
33PACKAGECONFIG[dbusproxy] = ", --disable-dbusproxy, "
34PACKAGECONFIG[notmpfs] = ", --disable-usertmpfs ,"
35PACKAGECONFIG[nofiretunnel] = ", --disable-firetunnel , "
36PACKAGECONFIG[noprivatehome] = ", --disable-private-home, "
37PACKAGECONFIG[nochroot] = ", --disable-chroot, "
38PACKAGECONFIG[nonetwork] = ", --disable-network, "
39PACKAGECONFIG[nouserns] = ", --disable-userns, "
40PACKAGECONFIG[nofiletransfer] = ", --disable-file-transfer, "
41PACKAGECONFIG[nosuid] = ", --disable-suid, "
42
43EXTRA_OECONF = "--disable-man --enable-busybox-workaround"
44
45PACKAGES:append = " ${PN}-vim ${PN}-zsh"
46
47FILES:${PN}-vim = "${datadir}/vim/"
48FILES:${PN}-zsh = "${datadir}/zsh/"
Andrew Geissler2daf84b2023-03-31 09:57:23 -050049FILES:${PN}-dev = "${datadir}/gtksourceview-5/"
Andrew Geissler615f2f12022-07-15 14:00:58 -050050
51pkg_postinst_ontarget:${PN} () {
52 ${libdir}/${BPN}/fseccomp default ${libdir}/${BPN}/seccomp
53 ${libdir}/${BPN}/fsec-optimize ${libdir}/${BPN}/seccomp
54 ${libdir}/${BPN}/fseccomp default ${libdir}/${BPN}/seccomp.debug allow-debuggers
55 ${libdir}/${BPN}/fsec-optimize ${libdir}/${BPN}/seccomp.debug
56 ${libdir}/${BPN}/fseccomp secondary 32 ${libdir}/${BPN}/seccomp.32
57 ${libdir}/${BPN}/fsec-optimize ${libdir}/${BPN}/seccomp.32
58 ${libdir}/${BPN}/fseccomp secondary block ${libdir}/${BPN}/seccomp.block_secondary
59 ${libdir}/${BPN}/fseccomp memory-deny-write-execute ${libdir}/${BPN}/seccomp.mdwx
60}
61
62COMPATIBLE_MACHINE:mips64 = "(!.*mips64).*"
63
64RDEPENDS:${PN} = "bash"