# HG changeset patch # User Dirk Olmes # Date 1277511331 -7200 # Node ID b7f1409d82f37c1db7a1dc7884c52598b6b4d03f # Parent 186f8bced4d508aae848f5e897761eba1b7098d8 add jailkit ebuild diff -r 186f8bced4d5 -r b7f1409d82f3 app-admin/jailkit/Manifest --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-admin/jailkit/Manifest Sat Jun 26 02:15:31 2010 +0200 @@ -0,0 +1,6 @@ +AUX jailkit 277 RMD160 3008e6f78a67af2eb318988c034f58197c54abc1 SHA1 a365679a5c9f80db63c3737f979c5b1c99d8f5d4 SHA256 58a7fcdaae6b1706d0183c826b4ff5856c99f24ba41eaf7956b42ff8e35388a7 +AUX jailkit-2.11-ldflags.patch 1885 RMD160 4a1b7bbabb29f9852e9988945ba1047b33443dad SHA1 afbf0aa87f43f881aafc4ee9f6c54c606063d1ad SHA256 a4c32f8ede109b5bdf8b40c32fe18d7c60fef9da9aeb55f86ffae1db0b4bd1a7 +AUX jailkit-2.11-noshells.patch 514 RMD160 5583bcdfb602d6f682db2e125bde2507fd2ebb1a SHA1 4c6c722093ae6d7616269ff48ed402db06533b57 SHA256 1dac48a765603f506e1cc0a0d876fb32ed5121cb64cf12dd5ffec31136880ae3 +AUX jailkit-2.11-pyc.patch 354 RMD160 d0a548409b74ed94fcb9537850ebba96954917b3 SHA1 c55581b9216680aeec54d5e12da4f988052c4777 SHA256 7ec99db35b9483446601495d2ae481df52611e6f52926d3cd18ffbd569a5fd70 +DIST jailkit-2.11.tar.bz2 110684 RMD160 2d04fa253fc4b419c05137e4618ef18c51c88a19 SHA1 6344b79a2093699115d22668a08e052e75f655e3 SHA256 e774de4ebfa261c82c6fc9e6294a5b5f88d871d26ba0ca4f6d7ccc7308f17de2 +EBUILD jailkit-2.11.ebuild 887 RMD160 2e457e785e5047d654d90ecdf0b089867e87ce4e SHA1 6448166e336586f6e4e3adcca23920dd98d2afe4 SHA256 0d2583c4098860c9c3fcb469d17b918ee1c3b85f84db8a3214cfe1e37ba2a75f diff -r 186f8bced4d5 -r b7f1409d82f3 app-admin/jailkit/files/jailkit --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-admin/jailkit/files/jailkit Sat Jun 26 02:15:31 2010 +0200 @@ -0,0 +1,18 @@ +#!/sbin/runscript + +JK_SOCKETD="/usr/sbin/jk_socketd" + +depend() { + need logger +} + +start() { + ebegin "Starting jk_socketd" + start-stop-daemon --start --exec ${JK_SOCKETD} + eend $? +} +stop() { + ebegin "Stopping jk_socketd" + start-stop-daemon --stop --exec ${JK_SOCKETD} + eend $? +} diff -r 186f8bced4d5 -r b7f1409d82f3 app-admin/jailkit/files/jailkit-2.11-ldflags.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-admin/jailkit/files/jailkit-2.11-ldflags.patch Sat Jun 26 02:15:31 2010 +0200 @@ -0,0 +1,46 @@ +diff --git a/configure.ac b/configure.ac +index e77ea24..1814f2a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -142,7 +142,7 @@ AC_CHECK_FUNCS( + [cap_get_proc],, + AC_CHECK_LIB([cap], [cap_get_proc], + AC_DEFINE(HAVE_CAP_GET_PROC) +- LDFLAGS="$LDLAGS -lcap", ++ LIBS="$LIBS -lcap", + ) + ) + +diff --git a/src/Makefile.in b/src/Makefile.in +index 49449b6..f55150f 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -67,22 +67,22 @@ OBJS = $(SRCS:.c=.o) + all: ${BINARIES} + + jk_chrootlaunch: jk_chrootlaunch.o jk_lib.o utils.o +- $(CC) $(DEFS) $(LDFLAGS) $(LIBS) -o $@ jk_chrootlaunch.o jk_lib.o utils.o ++ $(CC) $(DEFS) $(LDFLAGS) -o $@ jk_chrootlaunch.o jk_lib.o utils.o $(LIBS) + + jk_socketd: jk_socketd.o jk_lib.o utils.o iniparser.o +- $(CC) $(DEFS) $(LDFLAGS) $(LIBS) -o $@ jk_socketd.o jk_lib.o utils.o iniparser.o ++ $(CC) $(DEFS) $(LDFLAGS) -o $@ jk_socketd.o jk_lib.o utils.o iniparser.o $(LIBS) + + jk_lsh: jk_lsh.o iniparser.o jk_lib.o utils.o wordexp.o +- $(CC) $(DEFS) $(LDFLAGS) $(LIBS) -o $@ jk_lsh.o iniparser.o jk_lib.o utils.o wordexp.o ++ $(CC) $(DEFS) $(LDFLAGS) -o $@ jk_lsh.o iniparser.o jk_lib.o utils.o wordexp.o $(LIBS) + + jk_chrootsh: jk_chrootsh.o iniparser.o jk_lib.o utils.o passwdparser.o +- $(CC) $(DEFS) $(LDFLAGS) $(LIBS) -o $@ jk_chrootsh.o iniparser.o jk_lib.o utils.o passwdparser.o ++ $(CC) $(DEFS) $(LDFLAGS) -o $@ jk_chrootsh.o iniparser.o jk_lib.o utils.o passwdparser.o $(LIBS) + + jk_uchroot: jk_uchroot.o iniparser.o jk_lib.o utils.o +- $(CC) $(DEFS) $(LDFLAGS) $(LIBS) -o $@ jk_uchroot.o iniparser.o jk_lib.o utils.o ++ $(CC) $(DEFS) $(LDFLAGS) -o $@ jk_uchroot.o iniparser.o jk_lib.o utils.o $(LIBS) + + jk_procmailwrapper: jk_procmailwrapper.o jk_lib.o utils.o +- $(CC) $(DEFS) $(LDFLAGS) $(LIBS) -o $@ jk_procmailwrapper.o jk_lib.o utils.o ++ $(CC) $(DEFS) $(LDFLAGS) -o $@ jk_procmailwrapper.o jk_lib.o utils.o $(LIBS) + + clean: + rm -f ${BINARIES} diff -r 186f8bced4d5 -r b7f1409d82f3 app-admin/jailkit/files/jailkit-2.11-noshells.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-admin/jailkit/files/jailkit-2.11-noshells.patch Sat Jun 26 02:15:31 2010 +0200 @@ -0,0 +1,17 @@ +diff --git a/Makefile.in b/Makefile.in +index 69a9229..eccdbf4 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -69,12 +69,6 @@ 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: diff -r 186f8bced4d5 -r b7f1409d82f3 app-admin/jailkit/files/jailkit-2.11-pyc.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-admin/jailkit/files/jailkit-2.11-pyc.patch Sat Jun 26 02:15:31 2010 +0200 @@ -0,0 +1,12 @@ +diff --git a/py/Makefile.in b/py/Makefile.in +index 925cd12..7ffb1a2 100644 +--- a/py/Makefile.in ++++ b/py/Makefile.in +@@ -67,7 +67,6 @@ install: all + done + ${INSTALL} -d -m 755 ${DESTDIR}${PYLIBDIR} + ${INSTALL} -m 0644 jk_lib.py ${DESTDIR}${PYLIBDIR}/ +- ${INSTALL} -m 0644 jk_lib.pyc ${DESTDIR}${PYLIBDIR}/ + + uninstall: + for file in ${PY_BINS}; do \ diff -r 186f8bced4d5 -r b7f1409d82f3 app-admin/jailkit/jailkit-2.11.ebuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-admin/jailkit/jailkit-2.11.ebuild Sat Jun 26 02:15:31 2010 +0200 @@ -0,0 +1,36 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit autotools eutils + +DESCRIPTION="Allows you to easily put programs and users in a chrooted environment" +HOMEPAGE="http://olivier.sessink.nl/jailkit/" +SRC_URI="http://olivier.sessink.nl/${PN}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +src_prepare() { + epatch \ + "${FILESDIR}/${P}-ldflags.patch" \ + "${FILESDIR}/${P}-pyc.patch" \ + "${FILESDIR}/${P}-noshells.patch" + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + doinitd "${FILESDIR}/jailkit" || die "doinit install failed" +} + +pkg_postinst() { + ebegin "Updating /etc/shells" + { grep -v "^/usr/sbin/jk_chrootsh$" "${ROOT}"etc/shells; echo "/usr/sbin/jk_chrootsh"; } > "${T}"/shells + mv -f "${T}"/shells "${ROOT}"etc/shells + eend $? +}