blob: 35f7b076c78fc2b8323a6edc0261d5c7657302bd [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
12SRCREV = "b4b08d21cd95725c9d55dfdb6987fcc6d7893247"
13SRC_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/"
49
50pkg_postinst_ontarget:${PN} () {
51 ${libdir}/${BPN}/fseccomp default ${libdir}/${BPN}/seccomp
52 ${libdir}/${BPN}/fsec-optimize ${libdir}/${BPN}/seccomp
53 ${libdir}/${BPN}/fseccomp default ${libdir}/${BPN}/seccomp.debug allow-debuggers
54 ${libdir}/${BPN}/fsec-optimize ${libdir}/${BPN}/seccomp.debug
55 ${libdir}/${BPN}/fseccomp secondary 32 ${libdir}/${BPN}/seccomp.32
56 ${libdir}/${BPN}/fsec-optimize ${libdir}/${BPN}/seccomp.32
57 ${libdir}/${BPN}/fseccomp secondary block ${libdir}/${BPN}/seccomp.block_secondary
58 ${libdir}/${BPN}/fseccomp memory-deny-write-execute ${libdir}/${BPN}/seccomp.mdwx
59}
60
61COMPATIBLE_MACHINE:mips64 = "(!.*mips64).*"
62
63RDEPENDS:${PN} = "bash"