diff options
author | 2020-05-13 13:07:07 +0300 | |
---|---|---|
committer | 2020-05-14 13:10:14 +0000 | |
commit | 87e7b313997b1d2be6553cfb22fef71b74c84ea6 (patch) | |
tree | cf1fc8d97a0f414a589043a0664d427b0009d997 /mkdeb-apparmor.sh | |
parent | add new profile: plv (#3410) (diff) | |
download | firejail-87e7b313997b1d2be6553cfb22fef71b74c84ea6.tar.gz firejail-87e7b313997b1d2be6553cfb22fef71b74c84ea6.tar.zst firejail-87e7b313997b1d2be6553cfb22fef71b74c84ea6.zip |
Configure Debian package with AA and SELinux options
Configure Debian package with AA and SELinux options if they are
enabled.
Diffstat (limited to 'mkdeb-apparmor.sh')
-rwxr-xr-x | mkdeb-apparmor.sh | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/mkdeb-apparmor.sh b/mkdeb-apparmor.sh deleted file mode 100755 index 3c560179c..000000000 --- a/mkdeb-apparmor.sh +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2020 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | # based on http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/ | ||
7 | # a code archive should already be available | ||
8 | |||
9 | set -e | ||
10 | |||
11 | TOP=`pwd` | ||
12 | CODE_ARCHIVE="$1-$2.tar.xz" | ||
13 | CODE_DIR="$1-$2" | ||
14 | INSTALL_DIR="${INSTALL_DIR}${CODE_DIR}/debian" | ||
15 | DEBIAN_CTRL_DIR="${DEBIAN_CTRL_DIR}${CODE_DIR}/debian/DEBIAN" | ||
16 | |||
17 | echo "*****************************************" | ||
18 | echo "code archive: $CODE_ARCHIVE" | ||
19 | echo "code directory: $CODE_DIR" | ||
20 | echo "install directory: $INSTALL_DIR" | ||
21 | echo "debian control directory: $DEBIAN_CTRL_DIR" | ||
22 | echo "*****************************************" | ||
23 | |||
24 | tar -xJvf $CODE_ARCHIVE | ||
25 | #mkdir -p $INSTALL_DIR | ||
26 | cd $CODE_DIR | ||
27 | ./configure --prefix=/usr --enable-apparmor | ||
28 | make -j2 | ||
29 | mkdir debian | ||
30 | DESTDIR=debian make install-strip | ||
31 | |||
32 | cd .. | ||
33 | echo "*****************************************" | ||
34 | SIZE=`du -s $INSTALL_DIR` | ||
35 | echo "install size $SIZE" | ||
36 | echo "*****************************************" | ||
37 | |||
38 | mv $INSTALL_DIR/usr/share/doc/firejail/RELNOTES $INSTALL_DIR/usr/share/doc/firejail/changelog.Debian | ||
39 | gzip -9 -n $INSTALL_DIR/usr/share/doc/firejail/changelog.Debian | ||
40 | rm $INSTALL_DIR/usr/share/doc/firejail/COPYING | ||
41 | install -m644 platform/debian/copyright $INSTALL_DIR/usr/share/doc/firejail/. | ||
42 | mkdir -p $DEBIAN_CTRL_DIR | ||
43 | sed "s/FIREJAILVER/$2/g" platform/debian/control.$(dpkg-architecture -qDEB_HOST_ARCH) > $DEBIAN_CTRL_DIR/control | ||
44 | |||
45 | mkdir -p $INSTALL_DIR/usr/share/lintian/overrides/ | ||
46 | install -m644 platform/debian/firejail.lintian-overrides $INSTALL_DIR/usr/share/lintian/overrides/firejail | ||
47 | |||
48 | find $INSTALL_DIR/etc -type f | sed "s,^$INSTALL_DIR,," | LC_ALL=C sort > $DEBIAN_CTRL_DIR/conffiles | ||
49 | chmod 644 $DEBIAN_CTRL_DIR/conffiles | ||
50 | find $INSTALL_DIR -type d | xargs chmod 755 | ||
51 | cd $CODE_DIR | ||
52 | fakeroot dpkg-deb --build debian | ||
53 | lintian debian.deb | ||
54 | mv debian.deb ../firejail-apparmor_$2_1_$(dpkg-architecture -qDEB_HOST_ARCH).deb | ||
55 | cd .. | ||
56 | rm -fr $CODE_DIR | ||