Gentoo Archives: gentoo-commits

From: Dennis Lamm <expeditioneer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/firejail/
Date: Sun, 11 Aug 2019 20:06:32
Message-Id: 1565553980.46552a03ddd8f3488fcf6cc9c91d37f80df05cae.expeditioneer@gentoo
1 commit: 46552a03ddd8f3488fcf6cc9c91d37f80df05cae
2 Author: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 11 20:05:42 2019 +0000
4 Commit: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 11 20:06:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46552a03
7
8 sys-apps/firejail: added live ebuild
9
10 Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>
11 Package-Manager: Portage-2.3.69, Repoman-2.3.16
12
13 sys-apps/firejail/firejail-9999.ebuild | 75 ++++++++++++++++++++++++++++++++++
14 1 file changed, 75 insertions(+)
15
16 diff --git a/sys-apps/firejail/firejail-9999.ebuild b/sys-apps/firejail/firejail-9999.ebuild
17 new file mode 100644
18 index 00000000000..f47575ac444
19 --- /dev/null
20 +++ b/sys-apps/firejail/firejail-9999.ebuild
21 @@ -0,0 +1,75 @@
22 +# Copyright 1999-2019 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +if [[ ${PV} != 9999 ]]; then
28 + KEYWORDS="~amd64 ~x86"
29 + SRC_URI="https://github.com/netblue30/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
30 +else
31 + inherit git-r3
32 + EGIT_REPO_URI="https://github.com/netblue30/firejail.git"
33 + EGIT_BRANCH="master"
34 +fi
35 +
36 +DESCRIPTION="Security sandbox for any type of processes"
37 +HOMEPAGE="https://firejail.wordpress.com/"
38 +
39 +LICENSE="GPL-2"
40 +SLOT="0"
41 +IUSE="apparmor +chroot contrib debug +file-transfer +globalcfg +network +overlayfs +private-home +seccomp +suid test +userns vim-syntax +whitelist x11"
42 +
43 +DEPEND="!sys-apps/firejail-lts
44 + apparmor? ( sys-libs/libapparmor )
45 + test? ( dev-tcltk/expect )"
46 +
47 +RDEPEND="apparmor? ( sys-libs/libapparmor )"
48 +
49 +# TODO: enable tests
50 +RESTRICT="test"
51 +
52 +src_prepare() {
53 + default
54 +
55 + find ./contrib -type f -name '*.py' | xargs sed --in-place 's-#!/usr/bin/python3-#!/usr/bin/env python3-g' || die
56 +
57 + find -type f -name Makefile.in | xargs sed --in-place --regexp-extended \
58 + --expression='/^\tinstall .*COPYING /d' \
59 + --expression='/CFLAGS/s: (-O2|-ggdb) : :g' || die
60 +
61 + sed --in-place --regexp-extended '/CFLAGS/s: (-O2|-ggdb) : :g' ./src/common.mk.in || die
62 +
63 + # remove compression of man pages
64 + sed --in-place '/gzip -9n $$man; \\/d' Makefile.in || die
65 + sed --in-place '/rm -f $$man.gz; \\/d' Makefile.in || die
66 + sed --in-place --regexp-extended 's|\*\.([[:digit:]])\) install -c -m 0644 \$\$man\.gz|\*\.\1\) install -c -m 0644 \$\$man|g' Makefile.in || die
67 +}
68 +
69 +src_configure() {
70 + econf \
71 + $(use_enable apparmor) \
72 + $(use_enable chroot) \
73 + $(use_enable contrib contrib-install) \
74 + $(use_enable file-transfer) \
75 + $(use_enable globalcfg) \
76 + $(use_enable network) \
77 + $(use_enable overlayfs) \
78 + $(use_enable private-home) \
79 + $(use_enable seccomp) \
80 + $(use_enable suid) \
81 + $(use_enable userns) \
82 + $(use_enable whitelist) \
83 + $(use_enable x11)
84 +}
85 +
86 +src_install() {
87 + default
88 +
89 + if use vim-syntax; then
90 + insinto /usr/share/vim/vimfiles/ftdetect
91 + doins contrib/vim/ftdetect/firejail.vim
92 +
93 + insinto /usr/share/vim/vimfiles/syntax
94 + doins contrib/vim/syntax/firejail.vim
95 + fi
96 +}