summaryrefslogtreecommitdiff
path: root/dev-util/schroot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /dev-util/schroot
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'dev-util/schroot')
-rw-r--r--dev-util/schroot/Manifest5
-rw-r--r--dev-util/schroot/files/06zfscloneopts44
-rw-r--r--dev-util/schroot/files/11gentoo61
-rw-r--r--dev-util/schroot/files/schroot_prompt.sh1
-rw-r--r--dev-util/schroot/schroot-1.6.10_p12-r1.ebuild (renamed from dev-util/schroot/schroot-1.6.10_p12.ebuild)18
5 files changed, 128 insertions, 1 deletions
diff --git a/dev-util/schroot/Manifest b/dev-util/schroot/Manifest
index e6d47d5bd0d1..311191101757 100644
--- a/dev-util/schroot/Manifest
+++ b/dev-util/schroot/Manifest
@@ -1,9 +1,12 @@
+AUX 06zfscloneopts 1467 BLAKE2B e515b70b7d105470a8b32ecd8f2d88446f039424a132215bb149e7716429efc7b726630de9bda9ff0cf197a8ba777ce2f0e14da1709fd89a9f50e88713dc3b1d SHA512 4026af077ebbb2aa4e123af1cffa5125e5b420ac79a13f7c1a510bd6d57dc4e5c439470396ffdf0701ce7a4009044a415bed6a460cf829364b3c48cd71edd37f
+AUX 11gentoo 1992 BLAKE2B 61e4396196b7c6b4695567f74c6f17fe24ab0152a8e57da136ecefa16d30e3127b94c701bc9ba0b923fa0d3aa5ab87811aed64c656d0aa475a37dbb884082749 SHA512 98f549edae1326840f04058442c07fc8e2af70811393c106bea84426c51eea36378b6a863352cc0b2aab8efd8e81b0e70c4d10bdaeda5f2a17f51fbb3ca9abf3
AUX schroot.confd 371 BLAKE2B efb68aa9818ddf23fa88087c656f8abe8ee3c549714fa16b2be6d0cc0aa3e5dfae6dcd4eefc2e152eab60611e2369db6159a444344adcff6954fd8c1e828f698 SHA512 b86944ee7fb2622ef0bd9c9252a51724916427c6bffa1dc0623a40190e4866ffda48f8999790365f4a589ea647e3695077b6cd7ec8a1d1ab6bd026a5c7480c98
AUX schroot.initd 706 BLAKE2B 344eb8296714d2d40b451a07fd6e498c6134122da2d115cfc4bf6e7285278ce5c97fb05be7303f8636d30b455323f32594387c87fa96ef1b5a99117b41c2e3cb SHA512 8ce31a67cb4a6064875eed2d5cf3f11ce13f322b19df6b51dc08df2de42447f09124d725d70b1c4ff906644ef52a1f1b5b295575f795a96438bad3dea52f3d15
AUX schroot.tmpfilesd 91 BLAKE2B f731cf3cb0037ec35f8144d2667f3a12fbfcef088454d165cfcdc63d34f433eb7abc9442917c0cccaf48b66cab028db0b04edbd9d1cb2864d257213fe54fd3e6 SHA512 381d715e2a1443d0115a6fa35cc7d43205a1dfa432f40e4903d944c219b8f5f0b076fb93c90c159f1f7edd5cf8a8766653a41e168940da92bae0b186c93eff96
+AUX schroot_prompt.sh 73 BLAKE2B d833a51c7a36ba45b672e1b7adc1e371c3641b53c74530abe7c21c4d3d590b59aef4ff86f33db5e4feef500e74aee9566cddaffba67c3798e202605c7fb90c22 SHA512 403145790845a1fcc49991c76c1bf76c5e38a6e86d8fa150690289f34660d7b02acb91e8ac24335975285437176e0d4f8d91a643a173962a9578938e7f0f4b48
DIST schroot_1.6.10-12.debian.tar.xz 83636 BLAKE2B 0289848f7e64983c06f47a70346e06d7024722c643034ac24745fe4548311b893053ec28891f39264cb0894c12236f4e8523b70cd83553d1a7179cbfc63cbfa3 SHA512 77ae2d758593de505e9381e4800eb17a9e14fb949a5bdb07b9235671ae4bd18c668aa9c35a1ba6340af93b308b5c3798afc83f14165e4b19e7cebab92b83fc52
DIST schroot_1.6.10-7.debian.tar.xz 82524 BLAKE2B 664ee356f8de1215c761a771cc0700d25ff6c0513124f4d84d5b33a046cac6ff194b62dded1e8f966a922a013644edd3d9424b0d577a8bb2b371e23e8dd88ed5 SHA512 ee362cce46ec804cd0ad6bfe3c7dec37fdeffe56941d51aec9e9622057a4d2a94e47f7530d28862c948233c6623cfa4b4721c27f293e31a28ec0320ffe02a47a
DIST schroot_1.6.10.orig.tar.xz 797328 BLAKE2B 1f91531f22c5b0a75e5bb74effc660efe4819acc59b007355c12a01c0a1de12674881dd0fbbcab00575a02629662fca799d48f5b967eb527812ed8c08ff9ad28 SHA512 25155989c7811ab4c7bf3cdceaa8d0ffb12f08388143891def96fcd205f1cc401dad9a74f0e9a9ef8610d50174ff8319a8368401431dc87e1a11c0241e61fcbe
-EBUILD schroot-1.6.10_p12.ebuild 2957 BLAKE2B a5489b17883aaaac9fc5c3f619e5a724092768ef60415907f0b70c77c262f6a5ca1e244e4facf51beef185c879203c1de584aca8e71cd721087f6f600ed6780c SHA512 c2c8e873c26f63588ad6f45b2c8a7d480021abda6ffd29226e004506bc6b813dc2785d16403f048e80cece7ea01cd4f742bc62151a533328bc744a6faa6f71d4
+EBUILD schroot-1.6.10_p12-r1.ebuild 3505 BLAKE2B 7a57b2481fe1c47486b74e82fc442c7a190b7a615ca97e945c4fa98d2e0a65b3e88e517bc56470bd64e785bc1a0306b0101f6b44d25e17d8fec32ba54b6cf32b SHA512 457fa94d6f75850aade78766982d9da76e486d6cd843a8f765dae81cc792d93dd903be53020ceb1fe7d8e701715b7f6f624ed7f302d2975380c8ead2ba0c9c14
EBUILD schroot-1.6.10_p7-r1.ebuild 2936 BLAKE2B b285e3f9241e8ca1998bced999d9e8c60cfeef9a6705bc48af724fed626a2db1aebb66898d4342751b5e8935330b9d0cdfe18ffb88f638a37008703d79b2cf3b SHA512 490bf8a58156f74f14a8407fe5fbbacdec7c9596b0918e37753e4261d914c9712877db564ac5faaba080658844419589f9b563e0389522fb7b0d5e3501bc370e
MISC metadata.xml 615 BLAKE2B 8f6cde0f4bd1d00fed8330dd097b9ce0de021621af06aee3534e9cdaf79ae9353c27d831916d4e53ecfe11f264a3a9111001aff469471d75e1c51a04d55be4d2 SHA512 3ed685c418e1f8aa15d1a50e695aa71c2c2d48888a0b888a06d830c40a617a804d3c2c5f0f0ff14cea4206aee821239b63df273ccaf7452246112c931e6a923b
diff --git a/dev-util/schroot/files/06zfscloneopts b/dev-util/schroot/files/06zfscloneopts
new file mode 100644
index 000000000000..e66f0885e78f
--- /dev/null
+++ b/dev-util/schroot/files/06zfscloneopts
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Copyright © 2020 Georgy Yakovlev <gyakovlev@gentoo.org>
+#
+# schroot is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# schroot is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+#####################################################################
+
+set -e
+
+. "$SETUP_DATA_DIR/common-data"
+. "$SETUP_DATA_DIR/common-functions"
+. "$SETUP_DATA_DIR/common-config"
+
+if [ "$CHROOT_TYPE" = "zfs-snapshot" ] && [ -n "$CHROOT_ZFS_CLONE_NAME" ]; then
+
+ if [ $STAGE = "setup-start" ]; then
+
+ if ! zfs list "$CHROOT_ZFS_CLONE_NAME" >/dev/null 2>&1; then
+ fatal "Dataset '$CHROOT_ZFS_CLONE_NAME' does not exist"
+ fi
+
+ if [ "${ZFS_CLONE_OPTIONS+set}" = "set" ]; then
+ if [ "$VERBOSE" = "verbose" ]; then
+ zfs set $ZFS_CLONE_OPTIONS \
+ "$CHROOT_ZFS_CLONE_NAME"
+ else
+ zfs set $ZFS_CLONE_OPTIONS \
+ "$CHROOT_ZFS_CLONE_NAME" > /dev/null
+ fi
+ fi
+ fi
+fi
diff --git a/dev-util/schroot/files/11gentoo b/dev-util/schroot/files/11gentoo
new file mode 100644
index 000000000000..ddf2df305c68
--- /dev/null
+++ b/dev-util/schroot/files/11gentoo
@@ -0,0 +1,61 @@
+#!/bin/sh
+# Copyright © 2020 Georgy Yakovlev <gyakovlev@gentoo.org>
+#
+# schroot is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# schroot is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/>.
+#
+#####################################################################
+
+set -e
+
+. "$SETUP_DATA_DIR/common-data"
+. "$SETUP_DATA_DIR/common-functions"
+. "$SETUP_DATA_DIR/common-config"
+
+if [ "$VERBOSE" = "verbose" ]; then
+ VERBOSE_OPT="true"
+fi
+
+if [ "${PORTAGE_BASE_TMPDIR+set}" = "set" ] ; then
+ if [ "$STAGE" = "setup-start" ]; then
+ if [ ! -d "$PORTAGE_BASE_TMPDIR" ]; then
+ fatal "$PORTAGE_BASE_TMPDIR does not exist or not a directory"
+ fi
+ if [ "x$SESSION_ID" = x ]; then
+ fatal "SESSION_ID is not set"
+ fi
+ if [ ! -d "$PORTAGE_BASE_TMPDIR/schroot-$SESSION_ID" ]; then
+ mkdir ${VERBOSE_OPT+-v} \
+ "$PORTAGE_BASE_TMPDIR/schroot-$SESSION_ID"
+ fi
+ mkdir -p ${VERBOSE_OPT+-v} "$CHROOT_MOUNT_LOCATION/var/tmp/portage"
+ mount --make-private -o bind ${VERBOSE_OPT+-v}\
+ "$PORTAGE_BASE_TMPDIR/schroot-$SESSION_ID" \
+ "$CHROOT_MOUNT_LOCATION/var/tmp/portage"
+
+ elif [ "$STAGE" = "setup-stop" ]; then
+ if [ "$CHROOT_SESSION_PURGE" = true ] || \
+ [ "${CHROOT_NAME/#*_master/m}" = "m" ]; then
+ umount ${VERBOSE_OPT+-v} \
+ "$CHROOT_MOUNT_LOCATION/var/tmp/portage"
+ if [ -d "$PORTAGE_BASE_TMPDIR/schroot-$SESSION_ID" ]; then
+ if [ "x$SESSION_ID" != x ]; then
+ rm -fr ${VERBOSE_OPT+-v} \
+ "$PORTAGE_BASE_TMPDIR/schroot-$SESSION_ID"
+ fi
+ fi
+ fi
+
+ fi
+fi
diff --git a/dev-util/schroot/files/schroot_prompt.sh b/dev-util/schroot/files/schroot_prompt.sh
new file mode 100644
index 000000000000..bd72f2ce5b83
--- /dev/null
+++ b/dev-util/schroot/files/schroot_prompt.sh
@@ -0,0 +1 @@
+[[ -f /etc/debian_chroot ]] && PS1="chr: $(< /etc/debian_chroot) ${PS1}"
diff --git a/dev-util/schroot/schroot-1.6.10_p12.ebuild b/dev-util/schroot/schroot-1.6.10_p12-r1.ebuild
index d1292d3caaaf..0a4a39d4ed2f 100644
--- a/dev-util/schroot/schroot-1.6.10_p12.ebuild
+++ b/dev-util/schroot/schroot-1.6.10_p12-r1.ebuild
@@ -101,6 +101,24 @@ src_test() {
src_install() {
cmake_src_install
+ # debian-stype PS1 for chroot
+ # checks for /etc/debian_chroot file, which is created by schroot
+ insinto /etc/bash/bashrc.d
+ doins "${FILESDIR}/schroot_prompt.sh"
+
+ # gentoo /var/tmp/portage handler
+ # e.g. portage.base.tmpdir=/var/tmp/portage in config file
+ # will use a subdirectory of hosts $PORTAGE_TMPDIR
+ exeinto /etc/schroot/setup.d
+ doexe "${FILESDIR}/11gentoo"
+
+ # support for zfs clone options.
+ # zfs.clone.options=com.sun:auto-snapshot=false
+ if use zfs; then
+ exeinto /etc/schroot/setup.d
+ doexe "${FILESDIR}/06zfscloneopts"
+ fi
+
keepdir /var/lib/schroot/{session,unpack,union/{overlay,underlay}}
docinto /usr/share/doc/${PF}/contrib/setup.d