# HG changeset patch # User Dirk Olmes # Date 1292324028 -3600 # Node ID f379bcbcfffaeee3b608fe234f0c3d6b49634244 # Parent 720198e89466542ed46a197adc50751823cc0a50 ebuild for jailkit 2.13 that actually works diff -r 720198e89466 -r f379bcbcfffa app-admin/jailkit/Manifest --- a/app-admin/jailkit/Manifest Sun Nov 28 07:58:43 2010 +0100 +++ b/app-admin/jailkit/Manifest Tue Dec 14 11:53:48 2010 +0100 @@ -2,5 +2,10 @@ 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 +AUX jailkit-2.13-ldflags.patch 1885 RMD160 4a1b7bbabb29f9852e9988945ba1047b33443dad SHA1 afbf0aa87f43f881aafc4ee9f6c54c606063d1ad SHA256 a4c32f8ede109b5bdf8b40c32fe18d7c60fef9da9aeb55f86ffae1db0b4bd1a7 +AUX jailkit-2.13-noshells.patch 514 RMD160 5583bcdfb602d6f682db2e125bde2507fd2ebb1a SHA1 4c6c722093ae6d7616269ff48ed402db06533b57 SHA256 1dac48a765603f506e1cc0a0d876fb32ed5121cb64cf12dd5ffec31136880ae3 +AUX jailkit-2.13-pyc.patch 354 RMD160 d0a548409b74ed94fcb9537850ebba96954917b3 SHA1 c55581b9216680aeec54d5e12da4f988052c4777 SHA256 7ec99db35b9483446601495d2ae481df52611e6f52926d3cd18ffbd569a5fd70 DIST jailkit-2.11.tar.bz2 110684 RMD160 2d04fa253fc4b419c05137e4618ef18c51c88a19 SHA1 6344b79a2093699115d22668a08e052e75f655e3 SHA256 e774de4ebfa261c82c6fc9e6294a5b5f88d871d26ba0ca4f6d7ccc7308f17de2 +DIST jailkit-2.13.tar.bz2 113352 RMD160 b9224b9b5108842d7345f32ee7daa10110b6ae84 SHA1 ebe77105308d53b254cf9a0cc1dbccd1729c8308 SHA256 ffebd6d1414f0575bd14410063b007409a0662743ef72b60aaa1500249b14f67 EBUILD jailkit-2.11.ebuild 887 RMD160 2e457e785e5047d654d90ecdf0b089867e87ce4e SHA1 6448166e336586f6e4e3adcca23920dd98d2afe4 SHA256 0d2583c4098860c9c3fcb469d17b918ee1c3b85f84db8a3214cfe1e37ba2a75f +EBUILD jailkit-2.13.ebuild 887 RMD160 2e457e785e5047d654d90ecdf0b089867e87ce4e SHA1 6448166e336586f6e4e3adcca23920dd98d2afe4 SHA256 0d2583c4098860c9c3fcb469d17b918ee1c3b85f84db8a3214cfe1e37ba2a75f diff -r 720198e89466 -r f379bcbcfffa app-admin/jailkit/files/jailkit-2.13-ldflags.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-admin/jailkit/files/jailkit-2.13-ldflags.patch Tue Dec 14 11:53:48 2010 +0100 @@ -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 720198e89466 -r f379bcbcfffa app-admin/jailkit/files/jailkit-2.13-noshells.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-admin/jailkit/files/jailkit-2.13-noshells.patch Tue Dec 14 11:53:48 2010 +0100 @@ -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 720198e89466 -r f379bcbcfffa app-admin/jailkit/files/jailkit-2.13-pyc.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-admin/jailkit/files/jailkit-2.13-pyc.patch Tue Dec 14 11:53:48 2010 +0100 @@ -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 720198e89466 -r f379bcbcfffa app-admin/jailkit/jailkit-2.13.ebuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-admin/jailkit/jailkit-2.13.ebuild Tue Dec 14 11:53:48 2010 +0100 @@ -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 $? +}