diff options
author | Dean Takemori <deant@hawaii.rr.com> | 2012-07-09 09:53:17 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-07-09 09:53:43 +0000 |
commit | d09efed349abd09ba6f78f64d8ec1b639df58ebc (patch) | |
tree | e313b39397fc1a129f8b9b3ffe96c3f7e4256adf /testing | |
parent | 4ef696f942835f0c255ed9d337ec35707011f683 (diff) | |
download | aports-d09efed349abd09ba6f78f64d8ec1b639df58ebc.tar.bz2 aports-d09efed349abd09ba6f78f64d8ec1b639df58ebc.tar.xz |
testing/jailkit: new aport
Utilities for chroot jailing a user or process.
http://olivier.sessink.nl/jailkit
Diffstat (limited to 'testing')
-rw-r--r-- | testing/jailkit/APKBUILD | 47 | ||||
-rw-r--r-- | testing/jailkit/Makefile.in.patch | 23 | ||||
-rw-r--r-- | testing/jailkit/jailkit.post-deinstall | 10 | ||||
-rw-r--r-- | testing/jailkit/jailkit.post-install | 11 |
4 files changed, 91 insertions, 0 deletions
diff --git a/testing/jailkit/APKBUILD b/testing/jailkit/APKBUILD new file mode 100644 index 000000000..f3edc757a --- /dev/null +++ b/testing/jailkit/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Dean Takemori <deant@hawaii.rr.com> +# Maintainer: +pkgname=jailkit +pkgver=2.15 +pkgrel=0 +pkgdesc="Utilities for chroot jailing a user or process." +url="http://olivier.sessink.nl/jailkit" +arch="all" +license="custom" +depends="python" +depends_dev="" +makedepends="$depends_dev" +install="$pkgname.post-install $pkgname.post-deinstall" +subpackages="$pkgname-doc" +source="http://olivier.sessink.nl/jailkit/jailkit-$pkgver.tar.bz2 + Makefile.in.patch" + +_builddir="$srcdir/$pkgname-$pkgver" +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib/*.la +} + +md5sums="76e640aea827604c710a8aedd25c739e jailkit-2.15.tar.bz2 +4be3912010312b1c8980c6b54c4dc61d Makefile.in.patch" diff --git a/testing/jailkit/Makefile.in.patch b/testing/jailkit/Makefile.in.patch new file mode 100644 index 000000000..36494ed07 --- /dev/null +++ b/testing/jailkit/Makefile.in.patch @@ -0,0 +1,23 @@ +--- jailkit-2.15/Makefile.in ++++ jailkit-2.15/Makefile.in-patched +@@ -67,14 +67,6 @@ + @cd src/ && $(MAKE) install + @cd py/ && $(MAKE) install + @cd man/ && $(MAKE) install +- # test if the jk_chrootsh is already in /etc/shells +- # this previously had @echo but that fails on FreeBSD +- if test -w /etc/shells; then \ +- if ! grep ${prefix}/sbin/jk_chrootsh /etc/shells ; then \ +- echo "appending ${prefix}/sbin/jk_chroots to /etc/shells";\ +- echo ${prefix}/sbin/jk_chrootsh >> /etc/shells ;\ +- fi \ +- fi + + + uninstall: +@@ -83,5 +75,3 @@ + @cd man/ && $(MAKE) uninstall + @cd src/ && $(MAKE) uninstall + -rmdir --ignore-fail-on-non-empty ${DESTDIR}${iniprefix} +- @echo "You must manually remove jk_chrootsh from /etc/shells" +-# remove jk_chrootsh from /etc/shells diff --git a/testing/jailkit/jailkit.post-deinstall b/testing/jailkit/jailkit.post-deinstall new file mode 100644 index 000000000..1a6f5abb3 --- /dev/null +++ b/testing/jailkit/jailkit.post-deinstall @@ -0,0 +1,10 @@ +#!/bin/sh + +# test if the jk_chrootsh is already in /etc/shells +if test -w /etc/shells; then \ + if grep /usr/sbin/jk_chrootsh /etc/shells ; then \ + echo "commenting /usr/sbin/jk_chroots out of /etc/shells";\ + sed -i "s|^/usr/sbin/jk_chrootsh.*|#&|" /etc/shells ;\ + fi \ +fi + diff --git a/testing/jailkit/jailkit.post-install b/testing/jailkit/jailkit.post-install new file mode 100644 index 000000000..347657188 --- /dev/null +++ b/testing/jailkit/jailkit.post-install @@ -0,0 +1,11 @@ +#!/bin/sh + +# test if the jk_chrootsh is already in /etc/shells +# this previously had _at_echo but that fails on FreeBSD +if test -w /etc/shells; then \ + if ! grep /usr/sbin/jk_chrootsh /etc/shells ; then \ + echo "appending /usr/sbin/jk_chroots to /etc/shells";\ + echo /usr/sbin/jk_chrootsh >> /etc/shells ;\ + fi \ +fi + |