diff options
author | Jonathan Callen <abcd@gentoo.org> | 2010-03-26 18:14:15 +0000 |
---|---|---|
committer | Jonathan Callen <abcd@gentoo.org> | 2010-03-26 18:14:15 +0000 |
commit | 46cb3c78c2ba7eb9ef6fb3c9433f3f4416e9f8e7 (patch) | |
tree | 741bce8a12ae59d1eaf254d670e3d70b3aff0d2e /dev-util/schroot | |
parent | Change description as per leio's request. (diff) | |
download | gentoo-2-46cb3c78c2ba7eb9ef6fb3c9433f3f4416e9f8e7.tar.gz gentoo-2-46cb3c78c2ba7eb9ef6fb3c9433f3f4416e9f8e7.tar.bz2 gentoo-2-46cb3c78c2ba7eb9ef6fb3c9433f3f4416e9f8e7.zip |
Add patch for boost 1.42.0, thanks to Andrew Savchenko (bug 307975)
(Portage version: -svn/cvs/Linux i686)
Diffstat (limited to 'dev-util/schroot')
-rw-r--r-- | dev-util/schroot/ChangeLog | 8 | ||||
-rw-r--r-- | dev-util/schroot/files/schroot-1.4.1-boost-validation_error.patch | 142 | ||||
-rw-r--r-- | dev-util/schroot/schroot-1.4.1-r1.ebuild | 168 |
3 files changed, 317 insertions, 1 deletions
diff --git a/dev-util/schroot/ChangeLog b/dev-util/schroot/ChangeLog index af8996bdc9cc..b2b38d913fe5 100644 --- a/dev-util/schroot/ChangeLog +++ b/dev-util/schroot/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-util/schroot # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/ChangeLog,v 1.15 2010/02/27 02:06:47 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/ChangeLog,v 1.16 2010/03/26 18:14:15 abcd Exp $ + +*schroot-1.4.1-r1 (26 Mar 2010) + + 26 Mar 2010; Jonathan Callen <abcd@gentoo.org> +schroot-1.4.1-r1.ebuild, + +files/schroot-1.4.1-boost-validation_error.patch: + Add patch for boost 1.42.0, thanks to Andrew Savchenko (bug 307975) *schroot-1.4.1 (27 Feb 2010) diff --git a/dev-util/schroot/files/schroot-1.4.1-boost-validation_error.patch b/dev-util/schroot/files/schroot-1.4.1-boost-validation_error.patch new file mode 100644 index 000000000000..3dc92af2721a --- /dev/null +++ b/dev-util/schroot/files/schroot-1.4.1-boost-validation_error.patch @@ -0,0 +1,142 @@ +Fix for api change in boost 1.42.0 - validation_error -> error. + +Thanks to Andrew Savchenko <bircoph@gmail.com>. + +--- schroot-1.4.1.orig/bin/csbuild/csbuild-options.cc ++++ schroot-1.4.1/bin/csbuild/csbuild-options.cc +@@ -220,9 +220,9 @@ + if (vm.count("binNMU") && vm.count("make-binNMU")) + this->bin_nmu = true; + else if (vm.count("binNMU")) +- throw opt::validation_error(_("--makebinNMU missing")); ++ throw opt::error(_("--makebinNMU missing")); + else if (vm.count("make-binNMU")) +- throw opt::validation_error(_("--binNMU missing")); ++ throw opt::error(_("--binNMU missing")); + + if (!deb_build_options_string.empty()) + { +--- schroot-1.4.1.orig/bin/dchroot-dsa/dchroot-dsa-options.cc ++++ schroot-1.4.1/bin/dchroot-dsa/dchroot-dsa-options.cc +@@ -90,11 +90,11 @@ + + // dchroot-dsa only allows one command. + if (this->command.size() > 1) +- throw opt::validation_error(_("Only one command may be specified")); ++ throw opt::error(_("Only one command may be specified")); + + if (!this->command.empty() && + !sbuild::is_absname(this->command[0])) +- throw opt::validation_error(_("Command must have an absolute path")); ++ throw opt::error(_("Command must have an absolute path")); + + if (this->chroots.empty() && !all_used() && + (this->action != ACTION_CONFIG && +@@ -103,5 +103,5 @@ + this->action != ACTION_LOCATION && + this->action != ACTION_HELP && + this->action != ACTION_VERSION)) +- throw opt::validation_error(_("No chroot specified")); ++ throw opt::error(_("No chroot specified")); + } +--- schroot-1.4.1.orig/bin/schroot/schroot-options-base.cc ++++ schroot-1.4.1/bin/schroot/schroot-options-base.cc +@@ -200,7 +200,7 @@ + this->load_chroots = true; + this->load_sessions = false; + if (this->chroots.size() != 1 || all_used()) +- throw opt::validation_error ++ throw opt::error + (_("Exactly one chroot must be specified when beginning a session")); + + this->all = this->all_chroots = this->all_sessions = false; +@@ -213,7 +213,7 @@ + this->load_chroots = this->load_sessions = true; + + if (!this->session_name.empty()) +- throw opt::validation_error ++ throw opt::error + (_("--session-name is not permitted for the specified action; did you mean to use --chroot?")); + } + else if (this->action == ACTION_HELP || +@@ -234,7 +234,7 @@ + if (this->all_sessions) + this->load_sessions = true; + if (!this->chroots.empty()) +- throw opt::validation_error(_("--chroot may not be used with --list")); ++ throw opt::error(_("--chroot may not be used with --list")); + } + else if (this->action == ACTION_INFO || + this->action == ACTION_LOCATION || +@@ -259,6 +259,6 @@ + // Something went wrong + this->load_chroots = this->load_sessions = false; + this->all = this->all_chroots = this->all_sessions = false; +- throw opt::validation_error(_("Unknown action specified")); ++ throw opt::error(_("Unknown action specified")); + } + } +--- schroot-1.4.1.orig/bin/schroot-base/schroot-base-option-action.cc ++++ schroot-1.4.1/bin/schroot-base/schroot-base-option-action.cc +@@ -82,7 +82,7 @@ + if (this->current_action == "") + this->current_action = action; + else +- throw opt::validation_error(_("Only one action may be specified")); ++ throw opt::error(_("Only one action may be specified")); + } + else + throw std::logic_error((format(_("%1%: invalid action")) % action).str()); +--- schroot-1.4.1.orig/bin/schroot-base/schroot-base-options.cc ++++ schroot-1.4.1/bin/schroot-base/schroot-base-options.cc +@@ -155,7 +155,7 @@ + else if (this->debug_level == "critical") + sbuild::debug_log_level = sbuild::DEBUG_CRITICAL; + else +- throw opt::validation_error(_("Invalid debug level")); ++ throw opt::error(_("Invalid debug level")); + } + else + sbuild::debug_log_level = sbuild::DEBUG_NONE; +--- schroot-1.4.1.orig/bin/schroot-listmounts/schroot-listmounts-options.cc ++++ schroot-1.4.1/bin/schroot-listmounts/schroot-listmounts-options.cc +@@ -86,5 +86,5 @@ + + if (this->action == ACTION_LISTMOUNTS && + this->mountpoint.empty()) +- throw opt::validation_error(_("No mount point specified")); ++ throw opt::error(_("No mount point specified")); + } +--- schroot-1.4.1.orig/bin/schroot-mount/schroot-mount-options.cc ++++ schroot-1.4.1/bin/schroot-mount/schroot-mount-options.cc +@@ -99,5 +99,5 @@ + + if (this->action == ACTION_MOUNT && + this->mountpoint.empty()) +- throw opt::validation_error(_("No mount point specified")); ++ throw opt::error(_("No mount point specified")); + } +--- schroot-1.4.1.orig/bin/schroot-releaselock/schroot-releaselock-options.cc ++++ schroot-1.4.1/bin/schroot-releaselock/schroot-releaselock-options.cc +@@ -89,5 +89,5 @@ + + if (this->action == ACTION_RELEASELOCK && + this->device.empty()) +- throw opt::validation_error(_("No device specified")); ++ throw opt::error(_("No device specified")); + } +--- schroot-1.4.1.orig/test/schroot-base-option-action.cc ++++ schroot-1.4.1/test/schroot-base-option-action.cc +@@ -37,10 +37,10 @@ + CPPUNIT_TEST(test_current); + CPPUNIT_TEST_EXCEPTION(test_current_fail, std::logic_error); + CPPUNIT_TEST_EXCEPTION(test_current_fail_multipleset, +- opt::validation_error); ++ opt::error); + CPPUNIT_TEST(test_operators); + CPPUNIT_TEST_EXCEPTION(test_operators_fail_multipleset, +- opt::validation_error); ++ opt::error); + CPPUNIT_TEST_SUITE_END(); + + protected: diff --git a/dev-util/schroot/schroot-1.4.1-r1.ebuild b/dev-util/schroot/schroot-1.4.1-r1.ebuild new file mode 100644 index 000000000000..cd2a5c01a8d3 --- /dev/null +++ b/dev-util/schroot/schroot-1.4.1-r1.ebuild @@ -0,0 +1,168 @@ +# 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.1-r1.ebuild,v 1.1 2010/03/26 18:14:15 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" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+dchroot debug doc lvm nls pam test" + +COMMON_DEPEND=" + >=dev-libs/boost-1.42.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}/${PN}-1.4.0-tests.patch" + # This patch requires boost >= 1.42.0 + "${FILESDIR}/${PN}-1.4.1-boost-validation_error.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" +} + +pkg_preinst() { + export had_older_1_4_1=false + has_version "<dev-util/schroot-1.4.1" && had_older_1_4_1=true + if ${had_older_1_4_1}; then + einfo "Moving config files to new location..." + mkdir "${ROOT}etc/schroot/default" + mv_conffile etc/schroot/script-defaults etc/schroot/default/config + mv_conffile etc/schroot/mount-defaults etc/schroot/default/fstab + mv_conffile etc/schroot/copyfiles-defaults etc/schroot/default/copyfiles + mv_conffile etc/schroot/nssdatabases-defaults etc/schroot/default/nssdatabases + fi +} + +mv_conffile() { + local OLDFILE=${ROOT}$1 + local NEWFILE=${ROOT}$2 + + # if the old file doesn't exist, or is a symlink, stop + [[ -f ${OLDFILE} ]] || return 0 + [[ -L ${OLDFILE} ]] && return 0 + + # if the new file already exists, then we have a problem... + if [[ -e ${NEWFILE} ]]; then + # but if they are the same, then don't worry about it + if cmp -s "${OLDFILE}" "${NEWFILE}"; then + rm -f "${OLDFILE}" + else + ewarn "${NEWFILE} already exists, not moving ${OLDFILE}" + fi + else + mv "${OLDFILE}" "${NEWFILE}" + fi + + local x y + # now move all the unmerged config files as well + for x in "${OLDFILE%/*}"/._cfg????_"${OLDFILE##*/}"; do + [[ -f ${x} ]] || continue + # /etc/schroot/._cfg0000_script-defaults -> /etc/schroot/default/._cfg0000_config + y=${x##*/} + y=${NEWFILE%*/}${y%${OLDFILE##*/}}${NEWFILE##*/} + mv "${x}" "${y}" + done +} + +pkg_postinst() { + local x + if ${had_older_1_4_1}; then + for x in script:config mount:fstab copyfiles nssdatabases; do + if [[ ! -e ${ROOT}etc/schroot/${x%:*}-defaults && -f ${ROOT}etc/schroot/default/${x#*:} ]]; then + einfo "Creating compatibility symlink for ${x%:*}-defaults" + ln -sf "default/${x#*:}" "${ROOT}etc/schroot/${x%:*}-defaults" + fi + done + + ewarn "Your config files have been moved to the new location in" + ewarn "/etc/schroot/default. Compatibility symlinks have been installed in" + ewarn "/etc/schroot, and may be removed if no running chroot refers to them." + fi +} |