summaryrefslogtreecommitdiff
path: root/dev-util/schroot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-util/schroot
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-util/schroot')
-rw-r--r--dev-util/schroot/Manifest6
-rw-r--r--dev-util/schroot/files/schroot.confd9
-rw-r--r--dev-util/schroot/files/schroot.initd41
-rw-r--r--dev-util/schroot/metadata.xml10
-rw-r--r--dev-util/schroot/schroot-1.6.10-r4.ebuild146
5 files changed, 212 insertions, 0 deletions
diff --git a/dev-util/schroot/Manifest b/dev-util/schroot/Manifest
new file mode 100644
index 000000000000..d67856a63443
--- /dev/null
+++ b/dev-util/schroot/Manifest
@@ -0,0 +1,6 @@
+AUX schroot.confd 371 BLAKE2B efb68aa9818ddf23fa88087c656f8abe8ee3c549714fa16b2be6d0cc0aa3e5dfae6dcd4eefc2e152eab60611e2369db6159a444344adcff6954fd8c1e828f698 SHA512 b86944ee7fb2622ef0bd9c9252a51724916427c6bffa1dc0623a40190e4866ffda48f8999790365f4a589ea647e3695077b6cd7ec8a1d1ab6bd026a5c7480c98
+AUX schroot.initd 706 BLAKE2B 344eb8296714d2d40b451a07fd6e498c6134122da2d115cfc4bf6e7285278ce5c97fb05be7303f8636d30b455323f32594387c87fa96ef1b5a99117b41c2e3cb SHA512 8ce31a67cb4a6064875eed2d5cf3f11ce13f322b19df6b51dc08df2de42447f09124d725d70b1c4ff906644ef52a1f1b5b295575f795a96438bad3dea52f3d15
+DIST schroot_1.6.10-2.debian.tar.xz 34296 BLAKE2B 5c712bca72f938d01a9927d846ab48bca83f7f7ed01cee7b7d4caf9c6b5b38ad650152f68dd989fd93032fb669b8208fff09eaf83be7b7e712fcd41caafbc191 SHA512 ea980199b90a2cffc36348e01e2de229c5cb4321f10bcde4b593eeaaa18f34ab9187cc9c717e6043c477819fefbd793cc707e1e77a5bae1c1815a668956cd84c
+DIST schroot_1.6.10.orig.tar.xz 797328 BLAKE2B 1f91531f22c5b0a75e5bb74effc660efe4819acc59b007355c12a01c0a1de12674881dd0fbbcab00575a02629662fca799d48f5b967eb527812ed8c08ff9ad28 SHA512 25155989c7811ab4c7bf3cdceaa8d0ffb12f08388143891def96fcd205f1cc401dad9a74f0e9a9ef8610d50174ff8319a8368401431dc87e1a11c0241e61fcbe
+EBUILD schroot-1.6.10-r4.ebuild 3759 BLAKE2B f389b68a46ca5edb2054ecaff03d28873d689b3d6f8a8a0cce45e65a5be7cec4e78fc5346c2e4f33572d41b0b6934fb607a201bc294a47ba595211c062c171b9 SHA512 a9dd8c9c35e5d64bc0e686cfedce9295cd24589758d966dd15b9046f588973822c4f97c2cb288f9e98654e6167c4786109d7c859e47c3836d6286d35c4d1401a
+MISC metadata.xml 451 BLAKE2B c37cf286c387974fb9d4d9145724da0340d8846ee772548915fbfc24530567b7fda09fdb845a6918ff70e55c6d33621d586da51a8ed222de820035a1eea71eb1 SHA512 372b1bc77d13fde4eff8f5e45bab2a3c75152d05c7fbc272e5bb119e2edf9f8931acb426ca06b413cbcd7b4476424fdbc9eec49b865dd9cd2990bed88201d40a
diff --git a/dev-util/schroot/files/schroot.confd b/dev-util/schroot/files/schroot.confd
new file mode 100644
index 000000000000..b62263175721
--- /dev/null
+++ b/dev-util/schroot/files/schroot.confd
@@ -0,0 +1,9 @@
+# This is a configuration file for /etc/init.d/schroot; it allows you
+# to perform common modifications to the behavior of schroot
+# initialization without editing the init script.
+
+# What do we want to do with "orphan" sessions when starting or
+# restarting? Recover them (leave empty or set to "recover") or just
+# end them (set to "end")?
+SESSIONS_RECOVER="recover"
+
diff --git a/dev-util/schroot/files/schroot.initd b/dev-util/schroot/files/schroot.initd
new file mode 100644
index 000000000000..be58c3a0f2d0
--- /dev/null
+++ b/dev-util/schroot/files/schroot.initd
@@ -0,0 +1,41 @@
+#!/sbin/openrc-run
+
+depend() {
+ need localmount
+ after net netmount
+}
+
+start() {
+ local msg param
+ case "${SESSIONS_RECOVER}" in
+ end)
+ msg="Ending"
+ param="--end-session"
+ ;;
+ recover|"")
+ msg="Recovering"
+ param="--recover-session"
+ ;;
+ *)
+ ewarn "Invalid value \"$SESSIONS_RECOVER\" for \$SESSIONS_RECOVER, using \"recover\""
+ msg="Recovering"
+ param="--recover-session"
+ ;;
+ esac
+
+ einfo "$msg schroot sessions"
+ eindent
+ local chroot
+ local chroots="$(schroot --all-sessions --list --quiet)"
+ if [ -n "$chroots" ]; then
+ for chroot in $chroots; do
+ ebegin "$chroot"
+ schroot --chroot=$chroot $param
+ eend $?
+ done
+ else
+ einfo "(none)"
+ fi
+ eoutdent
+ einfo "...done"
+}
diff --git a/dev-util/schroot/metadata.xml b/dev-util/schroot/metadata.xml
new file mode 100644
index 000000000000..cc3f6c238b48
--- /dev/null
+++ b/dev-util/schroot/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<use>
+ <flag name="btrfs">Enable support for chroots using btrfs snapshots.</flag>
+ <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 using LVM snapshots.</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-util/schroot/schroot-1.6.10-r4.ebuild b/dev-util/schroot/schroot-1.6.10-r4.ebuild
new file mode 100644
index 000000000000..432388f071b4
--- /dev/null
+++ b/dev-util/schroot/schroot-1.6.10-r4.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils eutils pam versionator bash-completion-r1
+
+MY_P=${PN}_${PV}
+DEB_REL=2
+
+DESCRIPTION="Utility to execute commands in a chroot environment"
+HOMEPAGE="https://packages.debian.org/source/sid/schroot"
+SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}.orig.tar.xz
+ mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}-${DEB_REL}.debian.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="btrfs +dchroot debug doc lvm nls pam test"
+
+COMMON_DEPEND="
+ >=dev-libs/boost-1.42.0
+ >=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=(
+ "${S}/debian/patches/Add-support-for-more-compression-formats.patch"
+ "${S}/debian/patches/Add-SESSION_SOURCE-and-CHROOT_SESSION_SOURCE.patch"
+ "${S}/debian/patches/10mount-Move-mount-directory-to-var-run.patch"
+ "${S}/debian/patches/Support-union-mounts-with-overlay-as-in-Linux-4.0.patch"
+ "${S}/debian/patches/GCC5-fixes-on-regexes.patch"
+)
+
+src_unpack() {
+ unpack ${MY_P}.orig.tar.xz
+ cd "${S}"
+ unpack ${MY_P}-${DEB_REL}.debian.tar.xz
+}
+
+src_prepare() {
+ sed -i -e 's/warn(/message(WARNING /' man/CMakeLists.txt || die
+ sed -i -e '/^have schroot/d' etc/bash_completion/schroot || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -Dbtrfs-snapshot=$(usex btrfs)
+ -Ddchroot=$(usex dchroot)
+ -Ddchroot-dsa=$(usex dchroot)
+ -Ddebug=$(usex debug)
+ -Ddoxygen=$(usex doc)
+ -Dlvm-snapshot=$(usex lvm)
+ -Dnls=$(usex nls)
+ -Dpam=$(usex pam)
+ -Dtest=$(usex test)
+ -Dbash_completion_dir="$(get_bashcompdir)"
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+ -DCMAKE_INSTALL_LOCALSTATEDIR="${EPREFIX}/var"
+ )
+ if ! use nls; then
+ mycmakeargs+=(-DPO4A_EXECUTABLE=NOTFOUND)
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile all $(usev doc)
+}
+
+src_test() {
+ if [[ $EUID -ne 0 ]]; then
+ ewarn "Disabling tests because you are not root"
+ return 0
+ fi
+
+ cmake-utils_src_test
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ 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 "${BUILD_DIR}"/doc/sbuild/html/*
+ docinto html/schroot
+ dohtml "${BUILD_DIR}"/doc/schroot/html/*
+ fi
+
+ if use pam; then
+ rm -f "${ED}"etc/pam.d/schroot
+ pamd_mimic_system schroot auth account session
+ fi
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} == 1.[24]* ]]; then
+ elog "Please read /usr/share/doc/${PF}/NEWS.debian* for important"
+ elog "upgrade information."
+ fi
+ # If installing to a running system, upgrading from <=1.6.10-r3, then
+ # make sure that the runtime dirs are still visible to the new install
+ if [[ ${ROOT} == / && ${REPLACING_VERSIONS} ]] && ! version_is_at_least 1.6.10-r4 ${REPLACING_VERSIONS}; then
+ ln -s "${EPREFIX}"/var/lib/schroot "${EPREFIX}"/var/run/schroot
+ fi
+}
+
+pkg_postrm() {
+ if [[ -z ${REPLACED_BY_VERSION} ]]; then
+ for dir in $(find "${EROOT}"/var/lib/schroot/mount -maxdepth 1 -type d | tac); do
+ rmdir "$dir" || elog "Failed to remove session mount directory $dir: Please check for any stray mounts or data under this directory and remove by hand."
+ done
+ fi
+}