diff options
author | Jonathan Callen <abcd@gentoo.org> | 2012-09-20 08:46:20 +0000 |
---|---|---|
committer | Jonathan Callen <abcd@gentoo.org> | 2012-09-20 08:46:20 +0000 |
commit | 661aa906945378b9a52d4e0c3da805d5877c034b (patch) | |
tree | 03a8f25f03c4f47d3f21526a4f97adfdd6c5c16b | |
parent | Version bump. New USE flag "zeitgeist" for optional dev-libs/libzeitgeist dep... (diff) | |
download | gentoo-2-661aa906945378b9a52d4e0c3da805d5877c034b.tar.gz gentoo-2-661aa906945378b9a52d4e0c3da805d5877c034b.tar.bz2 gentoo-2-661aa906945378b9a52d4e0c3da805d5877c034b.zip |
New upstream version
(Portage version: 2.2.0_alpha129/cvs/Linux x86_64)
-rw-r--r-- | dev-util/schroot/ChangeLog | 9 | ||||
-rw-r--r-- | dev-util/schroot/files/schroot-1.6.3-tests.patch | 86 | ||||
-rw-r--r-- | dev-util/schroot/schroot-1.6.3.ebuild | 131 |
3 files changed, 224 insertions, 2 deletions
diff --git a/dev-util/schroot/ChangeLog b/dev-util/schroot/ChangeLog index 0df502210a13..b742517311c5 100644 --- a/dev-util/schroot/ChangeLog +++ b/dev-util/schroot/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-util/schroot # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/ChangeLog,v 1.34 2012/05/26 06:25:17 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/ChangeLog,v 1.35 2012/09/20 08:46:20 abcd Exp $ + +*schroot-1.6.3 (20 Sep 2012) + + 20 Sep 2012; Jonathan Callen <abcd@gentoo.org> + +files/schroot-1.6.3-tests.patch, +schroot-1.6.3.ebuild: + New upstream version *schroot-1.4.26 (26 May 2012) @@ -169,4 +175,3 @@ +files/schroot.initd, +metadata.xml: New ebuild. Thanks to Nick Fortino <nfortino@gmail.com> for initial ebuild and patches (bug #257334). - diff --git a/dev-util/schroot/files/schroot-1.6.3-tests.patch b/dev-util/schroot/files/schroot-1.6.3-tests.patch new file mode 100644 index 000000000000..e58b6bae32ba --- /dev/null +++ b/dev-util/schroot/files/schroot-1.6.3-tests.patch @@ -0,0 +1,86 @@ +diff -purN schroot-1.6.3.orig/configure.ac schroot-1.6.3/configure.ac +--- schroot-1.6.3.orig/configure.ac 2012-07-23 17:54:07.000000000 -0400 ++++ schroot-1.6.3/configure.ac 2012-09-20 03:43:20.451738906 -0400 +@@ -264,6 +264,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++]) +diff -purN schroot-1.6.3.orig/test/Makefile.am schroot-1.6.3/test/Makefile.am +--- schroot-1.6.3.orig/test/Makefile.am 2012-07-23 17:54:07.000000000 -0400 ++++ schroot-1.6.3/test/Makefile.am 2012-09-20 03:45:31.400235841 -0400 +@@ -24,10 +24,12 @@ 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-custom \ + sbuild-chroot-file \ +@@ -37,7 +39,12 @@ noinst_PROGRAMS = \ + sbuild-chroot-lvm-snapshot \ + sbuild-chroot-btrfs-snapshot \ + sbuild-chroot-config \ +- sbuild-chroot-facet-userdata \ ++ sbuild-chroot-facet-userdata ++endif ++ ++check_PROGRAMS = \ ++ sbuild-chroot \ ++ $(ROOT_TESTS) \ + sbuild-environment \ + sbuild-keyfile \ + sbuild-lock \ +@@ -54,16 +61,7 @@ noinst_PROGRAMS = \ + # randomly on slow or heavily-loaded systems. + TESTS = setup-test-data \ + sbuild-chroot \ +- sbuild-chroot-plain \ +- sbuild-chroot-custom \ +- sbuild-chroot-file \ +- sbuild-chroot-directory \ +- sbuild-chroot-block-device \ +- sbuild-chroot-loopback \ +- sbuild-chroot-lvm-snapshot \ +- sbuild-chroot-btrfs-snapshot \ +- sbuild-chroot-config \ +- sbuild-chroot-facet-userdata \ ++ $(ROOT_TESTS) \ + sbuild-environment \ + sbuild-keyfile \ + sbuild-log \ +diff -purN schroot-1.6.3.orig/test/setup-test-data schroot-1.6.3/test/setup-test-data +--- schroot-1.6.3.orig/test/setup-test-data 2012-07-23 17:54:07.000000000 -0400 ++++ schroot-1.6.3/test/setup-test-data 2012-09-20 03:43:20.451738906 -0400 +@@ -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/schroot-1.6.3.ebuild b/dev-util/schroot/schroot-1.6.3.ebuild new file mode 100644 index 000000000000..568e1ec6547c --- /dev/null +++ b/dev-util/schroot/schroot-1.6.3.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/schroot-1.6.3.ebuild,v 1.1 2012/09/20 08:46:20 abcd Exp $ + +EAPI="4" + +inherit autotools base pam versionator + +MY_P=${PN}_${PV} + +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}/${MY_P}.orig.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="btrfs +dchroot debug doc lvm nls pam test" + +COMMON_DEPEND=" + >=dev-libs/boost-1.42.0 + dev-libs/lockdev + >=sys-apps/util-linux-2.16 + btrfs? ( >=sys-fs/btrfs-progs-0.19-r2 ) + lvm? ( sys-fs/lvm2 ) + pam? ( sys-libs/pam ) +" + +DEPEND="${COMMON_DEPEND} + app-arch/xz-utils + sys-apps/groff + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) + nls? ( + >=app-text/po4a-0.40 + 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}/${PN}-1.6.3-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 + + eautoreconf +} + +src_configure() { + root_tests=no + use test && (( EUID == 0 )) && root_tests=yes + use nls || export ac_cv_path_PO4A= + econf \ + $(use_enable btrfs btrfs-snapshot) \ + $(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="${EPREFIX}"/var \ + --with-bash-completion-dir="${EPREFIX}"/usr/share/bash-completion +} + +src_compile() { + emake all $(usev doc) +} + +src_test() { + if [[ $root_tests == yes && $EUID -ne 0 ]]; then + ewarn "Disabling tests because you are no longer root" + return 0 + fi + + # Fix a bug in the tarball -- an empty directory was omitted + mkdir test/run-parts.ex2 + default +} + +src_install() { + default + + insinto /usr/share/doc/${PF}/contrib/setup.d + doins contrib/setup.d/05customdir contrib/setup.d/09fsck contrib/setup.d/10mount-ssh + + newdoc debian/schroot.NEWS NEWS.debian + + newinitd "${FILESDIR}"/schroot.initd schroot + newconfd "${FILESDIR}"/schroot.confd schroot + + if use doc; then + docinto html/sbuild + dohtml doc/sbuild/html/* + docinto html/schroot + dohtml doc/schroot/html/* + fi + + if use pam; then + rm -f "${ED}"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" +} + +pkg_postinst() { + if [[ ${REPLACING_VERSIONS} == 1.[24]* ]]; then + elog "Please read /usr/share/doc/${PF}/NEWS.debian* for important" + elog "upgrade information." + fi +} |