Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/schroot/
Date: Sun, 05 Jan 2020 07:52:14
Message-Id: 1578210714.83f8cc0edff0c74dcee86924f323d8520639e553.gyakovlev@gentoo
1 commit: 83f8cc0edff0c74dcee86924f323d8520639e553
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 5 07:50:25 2020 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 5 07:51:54 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83f8cc0e
7
8 dev-util/schroot: bump to 1.6.20_p7, with zfs support
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 dev-util/schroot/Manifest | 1 +
14 dev-util/schroot/metadata.xml | 1 +
15 dev-util/schroot/schroot-1.6.10_p7.ebuild | 129 ++++++++++++++++++++++++++++++
16 3 files changed, 131 insertions(+)
17
18 diff --git a/dev-util/schroot/Manifest b/dev-util/schroot/Manifest
19 index e0894c0588e..721e99dc717 100644
20 --- a/dev-util/schroot/Manifest
21 +++ b/dev-util/schroot/Manifest
22 @@ -1,3 +1,4 @@
23 DIST schroot_1.6.10-2.debian.tar.xz 34296 BLAKE2B 5c712bca72f938d01a9927d846ab48bca83f7f7ed01cee7b7d4caf9c6b5b38ad650152f68dd989fd93032fb669b8208fff09eaf83be7b7e712fcd41caafbc191 SHA512 ea980199b90a2cffc36348e01e2de229c5cb4321f10bcde4b593eeaaa18f34ab9187cc9c717e6043c477819fefbd793cc707e1e77a5bae1c1815a668956cd84c
24 DIST schroot_1.6.10-6.debian.tar.xz 76576 BLAKE2B 719c994703df8fb391b3a8c8f83a5afea4247b4f817e16317b6ed0ba7ec0f962d669c4d50a120eabdd9054b1a31bb58cc426324108cf77fe5b1aec0024bc03c2 SHA512 44177da262c0a8a511534aba964196cdb5a8a7ec094727122954638c29cdc9b80ef0a1ffb709c4841918effb44fe2c0f8912ae87cfa9e4696dbbe9f55adb1211
25 +DIST schroot_1.6.10-7.debian.tar.xz 82524 BLAKE2B 664ee356f8de1215c761a771cc0700d25ff6c0513124f4d84d5b33a046cac6ff194b62dded1e8f966a922a013644edd3d9424b0d577a8bb2b371e23e8dd88ed5 SHA512 ee362cce46ec804cd0ad6bfe3c7dec37fdeffe56941d51aec9e9622057a4d2a94e47f7530d28862c948233c6623cfa4b4721c27f293e31a28ec0320ffe02a47a
26 DIST schroot_1.6.10.orig.tar.xz 797328 BLAKE2B 1f91531f22c5b0a75e5bb74effc660efe4819acc59b007355c12a01c0a1de12674881dd0fbbcab00575a02629662fca799d48f5b967eb527812ed8c08ff9ad28 SHA512 25155989c7811ab4c7bf3cdceaa8d0ffb12f08388143891def96fcd205f1cc401dad9a74f0e9a9ef8610d50174ff8319a8368401431dc87e1a11c0241e61fcbe
27
28 diff --git a/dev-util/schroot/metadata.xml b/dev-util/schroot/metadata.xml
29 index 2cca4eb6a23..ff1941a852c 100644
30 --- a/dev-util/schroot/metadata.xml
31 +++ b/dev-util/schroot/metadata.xml
32 @@ -9,5 +9,6 @@
33 <flag name="btrfs">Enable support for chroots using btrfs snapshots</flag>
34 <flag name="dchroot">Enables the building of a wrapper named "dchroot", replacing <pkg>sys-apps/dchroot</pkg></flag>
35 <flag name="lvm">Enable support for chroots using LVM snapshots</flag>
36 + <flag name="zfs">Enable support for chroots using ZFS shapshots/clones</flag>
37 </use>
38 </pkgmetadata>
39
40 diff --git a/dev-util/schroot/schroot-1.6.10_p7.ebuild b/dev-util/schroot/schroot-1.6.10_p7.ebuild
41 new file mode 100644
42 index 00000000000..37c1dd419a1
43 --- /dev/null
44 +++ b/dev-util/schroot/schroot-1.6.10_p7.ebuild
45 @@ -0,0 +1,129 @@
46 +# Copyright 1999-2020 Gentoo Authors
47 +# Distributed under the terms of the GNU General Public License v2
48 +
49 +EAPI=7
50 +
51 +inherit bash-completion-r1 cmake pam tmpfiles
52 +
53 +MY_P=${PN}_${PV/_p/-}
54 +
55 +DESCRIPTION="Utility to execute commands in a chroot environment"
56 +HOMEPAGE="https://packages.debian.org/source/sid/schroot"
57 +SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${MY_P/%-*/}.orig.tar.xz
58 + mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}.debian.tar.xz"
59 +
60 +LICENSE="GPL-3"
61 +SLOT="0"
62 +KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
63 +IUSE="btrfs +dchroot debug doc lvm nls pam test zfs"
64 +RESTRICT="!test? ( test )"
65 +
66 +COMMON_DEPEND="
67 + >=dev-libs/boost-1.42.0:=
68 + >=sys-apps/util-linux-2.16
69 + btrfs? ( >=sys-fs/btrfs-progs-0.19-r2 )
70 + lvm? ( sys-fs/lvm2 )
71 + pam? ( sys-libs/pam )
72 + zfs? ( sys-fs/zfs )
73 +"
74 +
75 +DEPEND="${COMMON_DEPEND}
76 + app-arch/xz-utils
77 + sys-apps/groff
78 + doc? (
79 + app-doc/doxygen
80 + media-gfx/graphviz
81 + )
82 + nls? (
83 + >=app-text/po4a-0.40
84 + sys-devel/gettext
85 + )
86 + test? ( >=dev-util/cppunit-1.10.0 )
87 +"
88 +RDEPEND="${COMMON_DEPEND}
89 + sys-apps/debianutils
90 + dchroot? ( !sys-apps/dchroot )
91 + nls? ( virtual/libintl )
92 +"
93 +
94 +S="${WORKDIR}/${PN}-${PV/%_p*/}"
95 +
96 +src_unpack() {
97 + unpack ${MY_P/%-*/}.orig.tar.xz
98 + cd "${S}"
99 + unpack ${MY_P}.debian.tar.xz
100 +}
101 +
102 +src_prepare() {
103 + sed -i -e 's/warn(/message(WARNING /' man/CMakeLists.txt || die
104 + eapply "${S}"/debian/patches/*.patch
105 + cmake_src_prepare
106 +}
107 +
108 +src_configure() {
109 + local mycmakeargs=(
110 + -Dbtrfs-snapshot=$(usex btrfs)
111 + -Ddchroot=$(usex dchroot)
112 + -Ddchroot-dsa=$(usex dchroot)
113 + -Ddebug=$(usex debug)
114 + -Ddoxygen=$(usex doc)
115 + -Dlvm-snapshot=$(usex lvm)
116 + -Dnls=$(usex nls)
117 + -Dpam=$(usex pam)
118 + -Dtest=$(usex test)
119 + -Dzfs-snapshot=$(usex zfs)
120 + -Dbash_completion_dir="$(get_bashcompdir)"
121 + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
122 + -DCMAKE_INSTALL_LOCALSTATEDIR="${EPREFIX}/var"
123 + -DSCHROOT_MOUNT_DIR="${EPREFIX}/run/${PN}/mount"
124 + )
125 + if ! use nls; then
126 + mycmakeargs+=(-DPO4A_EXECUTABLE=NOTFOUND)
127 + fi
128 +
129 + cmake_src_configure
130 +}
131 +
132 +src_compile() {
133 + cmake_src_compile all $(usev doc)
134 +}
135 +
136 +src_test() {
137 + if [[ $EUID -ne 0 ]]; then
138 + ewarn "Disabling tests because you are not root"
139 + return 0
140 + fi
141 +
142 + cmake_src_test
143 +}
144 +
145 +src_install() {
146 + cmake_src_install
147 +
148 + keepdir /var/lib/schroot/{session,unpack,union/{overlay,underlay}}
149 +
150 + docinto /usr/share/doc/${PF}/contrib/setup.d
151 + dodoc contrib/setup.d/05customdir contrib/setup.d/09fsck contrib/setup.d/10mount-ssh
152 +
153 + newdoc debian/schroot.NEWS NEWS.debian
154 +
155 + newinitd "${FILESDIR}"/schroot.initd schroot
156 + newconfd "${FILESDIR}"/schroot.confd schroot
157 + newtmpfiles "${FILESDIR}"/schroot.tmpfilesd schroot.conf
158 +
159 + if use doc; then
160 + docinto html/sbuild
161 + dodoc "${BUILD_DIR}"/doc/sbuild/html/*
162 + docinto html/schroot
163 + dodoc "${BUILD_DIR}"/doc/schroot/html/*
164 + fi
165 +
166 + if use pam; then
167 + rm -f "${ED}"/etc/pam.d/schroot
168 + pamd_mimic_system schroot auth account session
169 + fi
170 +}
171 +
172 +pkg_postinst() {
173 + tmpfiles_process ${PN}.conf
174 +}