X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.122]) by mail.alpinelinux.org (Postfix) with ESMTP id 2C7B3DC3802 for ; Mon, 9 Jul 2012 09:33:45 +0000 (UTC) Authentication-Results: hrndva-omtalb.mail.rr.com smtp.user=deant@hawaii.rr.com; auth=pass (LOGIN) X-Authority-Analysis: v=2.0 cv=ZuBv2qHG c=1 sm=0 a=qPtdY-45c8sA:10 a=05ChyHeVI94A:10 a=ayC55rCoAAAA:8 a=2C6oZsjh3FLQtKAJ7wYA:9 a=QEXdDO2ut3YA:10 a=4c29EuvuAAAA:8 a=cyMWD6oPJ7xdT1gcrQIA:9 a=hodd19auLMwkElwNXQv/yg==:117 X-Cloudmark-Score: 0 Received: from [10.128.132.156] ([10.128.132.156:51381] helo=hrndva-web05-z02) by hrndva-oedge04.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTPA id 24/E0-21135-975AAFF4; Mon, 09 Jul 2012 09:33:45 +0000 Message-ID: <20120709093345.I92H4.239.root@hrndva-web05-z02> Date: Mon, 9 Jul 2012 5:33:45 -0400 From: To: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] Initial APKBUILD for jailkit In-Reply-To: <20120708221042.96VAQ.13868.root@hrndva-web05-z02> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_695_26561796.1341826425298" X-Priority: 3 (Normal) Sensitivity: Normal X-Originating-IP: ------=_Part_695_26561796.1341826425298 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Copy/Paste probably messed up the tabs in the Makefile. Try again as an attachment. ------=_Part_695_26561796.1341826425298 Content-Type: application/octet-stream; name=jailkit.git-diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=jailkit.git-diff commit ad8c5d628dac3c4590566c616d5ce3eb16a59d45 Author: Dean Takemori Date: Sun Jul 8 23:25:18 2012 -1000 Add initial files for jailkit diff --git a/testing/jailkit/APKBUILD b/testing/jailkit/APKBUILD new file mode 100644 index 0000000..f3edc75 --- /dev/null +++ b/testing/jailkit/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Dean Takemori +# 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 0000000..36494ed --- /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 0000000..1a6f5ab --- /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 0000000..3476571 --- /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 + ------=_Part_695_26561796.1341826425298-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---