--- /dev/null
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils
+
+DESCRIPTION="Security sandbox for any type of processes"
+HOMEPAGE="https://firejail.wordpress.com/"
+
+SRC_URI="https://github.com/netblue30/${PN}/archive/${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="apparmor +chroot contrib debug +file-transfer +globalcfg +network +overlayfs +private-home +seccomp +suid test +userns +whitelist x11"
+
+DEPEND="!sys-apps/firejail-lts
+ apparmor? ( sys-libs/libapparmor )
+ test? ( dev-tcltk/expect )"
+
+RDEPEND=" apparmor? ( sys-libs/libapparmor )"
+
+RESTRICT="test"
+
+src_prepare() {
+ default
+
+ find ./contrib -type f -name '*.py' | xargs sed --in-place 's-#!/usr/bin/python3-#!/usr/bin/env python3-g'
+
+ find -type f -name Makefile.in | xargs sed --inplace --regexp-extended \
+ --expression='/^\tinstall .*COPYING /d' \
+ --expression='/CFLAGS/s: (-O2|-ggdb) : :g'
+
+ sed --inplace --regexp-extended '/CFLAGS/s: (-O2|-ggdb) : :g' ./src/common.mk.in
+}
+
+src_configure() {
+ econf \
+ $(use_enable apparmor) \
+ $(use_enable chroot) \
+ $(use_enable contrib contrib-install) \
+ $(use_enable file-transfer) \
+ $(use_enable globalcfg) \
+ $(use_enable network) \
+ $(use_enable overlayfs) \
+ $(use_enable private-home)
+ $(use_enable seccomp) \
+ $(use_enable suid) \
+ $(use_enable userns) \
+ $(use_enable whitelist) \
+ $(use_enable x11)
+}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person">
+ <email>expeditioneer@gentoo.org</email>
+ <name>Dennis Lamm</name>
+ </maintainer>
<longdescription lang="en">
- Firejail is a SUID program that reduces the risk of security breaches
- by restricting the running environment of untrusted applications using
- Linux namespaces and seccomp-bpf. It allows a process and all its
- descendants to have their own private view of the globally shared
- kernel resources, such as the network stack, process table, mount
- table.
+ Firejail is a SUID program that reduces the risk of security breaches by restricting the running environment of
+ untrusted applications using Linux namespaces and seccomp-bpf. It allows a process and all its descendants to
+ have their own private view of the globally shared kernel resources, such as the network stack, process table,
+ mount table.
- This is bleeding edge branch. For long term support version see
- sys-apps/firejail-lts.
+ This is the regular version. For a long term support version see sys-apps/firejail-lts.
</longdescription>
<upstream>
<remote-id type="sourceforge">firejail</remote-id>
</upstream>
<use>
- <flag name="apparmor">Enable support for custom AppArmor
- profiles</flag>
+ <flag name="apparmor">Enable support for custom AppArmor profiles</flag>
<flag name="bind">Enable custom bind mounts</flag>
<flag name="chroot">Enable chrooting to custom directory</flag>
<flag name="contrib">Install contrib scripts</flag>
- <flag name="file-transfer">Enable file transfers between sandboxes and
- the host system</flag>
+ <flag name="file-transfer">Enable file transfers between sandboxes and the host system</flag>
+ <flag name="globalcfg">Enable global config file</flag>
<flag name="network">Enable networking features</flag>
- <flag name="network-restricted">Grant access to --interface,
- --net=ethXXX and --netfilter only to root user; regular users are
- only allowed --net=none</flag>
+ <flag name="network-restricted">Grant access to --interface, --net=ethXXX and --netfilter only to root user;
+ regular users are only allowed --net=none</flag>
+ <flag name="overlayfs">Enable overlayfs</flag>
+ <flag name="private-home">Enable private home feature</flag>
<flag name="seccomp">Enable system call filtering</flag>
- <flag name="userns">Enable attaching a new user namespace to a
- sandbox (--noroot option)</flag>
+ <flag name="userns">Enable attaching a new user namespace to a sandbox (--noroot option)</flag>
+ <flag name="whitelist">Enable whitelist</flag>
<flag name="x11">Enable X11 sandboxing</flag>
</use>
</pkgmetadata>