summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Callen <abcd@gentoo.org>2010-01-31 22:40:12 +0000
committerJonathan Callen <abcd@gentoo.org>2010-01-31 22:40:12 +0000
commitefd2a9a76c0d4f12e771647cb821a160f905e949 (patch)
tree0a3f9f338bb852934f6ea7e5a48008e7b7ae1590 /dev-util/schroot
parentDisable the SSL tests in all old 5.x ebuilds because the SSL certificates hav... (diff)
downloadgentoo-2-efd2a9a76c0d4f12e771647cb821a160f905e949.tar.gz
gentoo-2-efd2a9a76c0d4f12e771647cb821a160f905e949.tar.bz2
gentoo-2-efd2a9a76c0d4f12e771647cb821a160f905e949.zip
Bump schroot
(Portage version: -svn/cvs/Linux i686)
Diffstat (limited to 'dev-util/schroot')
-rw-r--r--dev-util/schroot/ChangeLog10
-rw-r--r--dev-util/schroot/files/schroot-1.4.0-tests.patch81
-rw-r--r--dev-util/schroot/metadata.xml1
-rw-r--r--dev-util/schroot/schroot-1.4.0.ebuild108
4 files changed, 198 insertions, 2 deletions
diff --git a/dev-util/schroot/ChangeLog b/dev-util/schroot/ChangeLog
index 53537cef54f7..1e6e1fa14084 100644
--- a/dev-util/schroot/ChangeLog
+++ b/dev-util/schroot/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-util/schroot
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/ChangeLog,v 1.12 2009/12/29 21:39:32 abcd Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/ChangeLog,v 1.13 2010/01/31 22:40:11 abcd Exp $
+
+*schroot-1.4.0 (31 Jan 2010)
+
+ 31 Jan 2010; Jonathan Callen <abcd@gentoo.org> +schroot-1.4.0.ebuild,
+ +files/schroot-1.4.0-tests.patch, metadata.xml:
+ New upstream version
29 Dec 2009; Jonathan Callen <abcd@gentoo.org> schroot-1.2.3-r4.ebuild:
Fix incorrect blocker
diff --git a/dev-util/schroot/files/schroot-1.4.0-tests.patch b/dev-util/schroot/files/schroot-1.4.0-tests.patch
new file mode 100644
index 000000000000..57885a88ed68
--- /dev/null
+++ b/dev-util/schroot/files/schroot-1.4.0-tests.patch
@@ -0,0 +1,81 @@
+Split out the root-only tests from the tests that can run as a non-root user.
+
+--- schroot-1.4.0.orig/configure.ac
++++ schroot-1.4.0/configure.ac
+@@ -254,6 +254,19 @@ AC_ARG_WITH([bash-completion-dir], [AS_H
+ AC_MSG_RESULT([$bashcompletiondir])
+ AC_SUBST([bashcompletiondir])
+
++AC_MSG_CHECKING([whether to enable root-only unit tests])
++AC_ARG_ENABLE([root-tests], [AS_HELP_STRING([--with-root-tests], [Enable root-only tests])],
++ [ case "${enableval}" in
++ yes) enable_root_tests="yes" ;;
++ no) enable_root_tests="no" ;;
++ *) AC_MSG_RESULT([unknown])
++ AC_MSG_ERROR([bad value ${enableval} for --enable-root-tests]) ;;
++ esac],
++ [ enable_root_tests="yes" ])
++AC_MSG_RESULT([$enable_root_tests])
++AM_CONDITIONAL([USE_ROOT_TESTS], [test "$enable_root_tests" = "yes"])
++AC_SUBST([enable_root_tests])
++
+ # Checks for programs.
+ AC_PROG_CXX
+ AC_LANG([C++])
+--- schroot-1.4.0.orig/test/Makefile.am
++++ schroot-1.4.0/test/Makefile.am
+@@ -24,17 +24,24 @@ include $(top_srcdir)/scripts/global.mk
+ LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) $(CPPUNIT_CFLAGS) -DTESTDATADIR='"./testdata"' -I$(top_srcdir)/bin
+
+ if USE_UNIT_TESTS
+-noinst_LTLIBRARIES = libtest.la
++check_LTLIBRARIES = libtest.la
+
+-noinst_PROGRAMS = \
+- sbuild-chroot \
++ROOT_TESTS =
++
++if USE_ROOT_TESTS
++ROOT_TESTS += \
+ sbuild-chroot-plain \
+ sbuild-chroot-file \
+ sbuild-chroot-directory \
+ sbuild-chroot-block-device \
+ sbuild-chroot-loopback \
+ sbuild-chroot-lvm-snapshot \
+- sbuild-chroot-config \
++ sbuild-chroot-config
++endif
++
++check_PROGRAMS = \
++ sbuild-chroot \
++ $(ROOT_TESTS) \
+ sbuild-environment \
+ sbuild-keyfile \
+ sbuild-lock \
+@@ -51,13 +58,7 @@ noinst_PROGRAMS = \
+ # randomly on slow or heavily-loaded systems.
+ TESTS = setup-test-data \
+ sbuild-chroot \
+- sbuild-chroot-plain \
+- sbuild-chroot-file \
+- sbuild-chroot-directory \
+- sbuild-chroot-block-device \
+- sbuild-chroot-loopback \
+- sbuild-chroot-lvm-snapshot \
+- sbuild-chroot-config \
++ $(ROOT_TESTS) \
+ sbuild-environment \
+ sbuild-keyfile \
+ sbuild-log \
+--- schroot-1.4.0.orig/test/setup-test-data
++++ schroot-1.4.0/test/setup-test-data
+@@ -4,4 +4,8 @@
+ rm -rf testdata
+ mkdir testdata
+ cp -r ${srcdir}/*.ex* testdata
++if test `id -u` -ne 0; then
++echo "You are not root, only doing partial setup"
++else
+ chown -R root:root testdata
++fi
diff --git a/dev-util/schroot/metadata.xml b/dev-util/schroot/metadata.xml
index 56e20e8103d8..c764bed00c60 100644
--- a/dev-util/schroot/metadata.xml
+++ b/dev-util/schroot/metadata.xml
@@ -8,5 +8,6 @@
</maintainer>
<use>
<flag name="dchroot">Enables the building of a wrapper named "dchroot", replacing <pkg>sys-apps/dchroot</pkg>.</flag>
+ <flag name="lvm">Enable support for chroots on LVM.</flag>
</use>
</pkgmetadata>
diff --git a/dev-util/schroot/schroot-1.4.0.ebuild b/dev-util/schroot/schroot-1.4.0.ebuild
new file mode 100644
index 000000000000..5bfaee71c6b4
--- /dev/null
+++ b/dev-util/schroot/schroot-1.4.0.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/schroot-1.4.0.ebuild,v 1.1 2010/01/31 22:40:11 abcd Exp $
+
+EAPI="2"
+WANT_AUTOMAKE="1.11"
+
+inherit autotools base pam
+
+DESCRIPTION="Utility to execute commands in a chroot environment"
+HOMEPAGE="http://packages.debian.org/source/sid/schroot"
+SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.orig.tar.gz"
+
+RESTRICT="mirror"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+dchroot debug doc lvm nls pam test"
+
+COMMON_DEPEND="
+ >=dev-libs/boost-1.39.0
+ dev-libs/lockdev
+ >=sys-apps/util-linux-2.16
+ lvm? ( sys-fs/lvm2 )
+ pam? ( sys-libs/pam )
+"
+
+DEPEND="${COMMON_DEPEND}
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )
+ nls? ( sys-devel/gettext )
+ test? ( >=dev-util/cppunit-1.10.0 )
+"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/debianutils
+ dchroot? ( !sys-apps/dchroot )
+ nls? ( virtual/libintl )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-tests.patch"
+)
+
+src_prepare() {
+ base_src_prepare
+
+ # Don't depend on cppunit unless we are testing
+ use test || sed -i '/AM_PATH_CPPUNIT/d' configure.ac
+
+ echo -e "Package: ${PN}\nVersion: ${PV}" > VERSION
+
+ eautoreconf
+}
+
+src_configure() {
+ root_tests=no
+ use test && (( EUID == 0 )) && root_tests=yes
+ econf \
+ $(use_enable doc doxygen) \
+ $(use_enable dchroot) \
+ $(use_enable dchroot dchroot-dsa) \
+ $(use_enable debug) \
+ $(use_enable lvm lvm-snapshot) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ --enable-block-device \
+ --enable-loopback \
+ --enable-uuid \
+ --enable-root-tests=$root_tests \
+ --enable-shared \
+ --disable-static \
+ --localstatedir=/var \
+ --with-bash-completion-dir=/usr/share/bash-completion
+}
+
+src_test() {
+ if [[ $root_tests == yes && $EUID -ne 0 ]]; then
+ ewarn "Disabling tests because you are no longer root"
+ return 0
+ fi
+ default
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ newinitd "${FILESDIR}"/schroot.initd schroot || die "installation of init.d script failed"
+ newconfd "${FILESDIR}"/schroot.confd schroot || die "installation of conf.d file failed"
+
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO || die "installation of docs failed"
+ if use doc; then
+ docinto html/sbuild
+ dohtml doc/sbuild/html/* || die "installation of html docs failed"
+ docinto html/schroot
+ dohtml doc/schroot/html/* || die "installation of html docs failed"
+ fi
+
+ if use pam; then
+ rm -f "${D}"/etc/pam.d/schroot
+ pamd_mimic_system schroot auth account session
+ fi
+
+ # Remove *.la files
+ find "${D}" -name "*.la" -exec rm {} + || die "removal of *.la files failed"
+}