Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/
Date: Fri, 17 Aug 2018 23:16:22
Message-Id: 1534547426.4bc99e82ee5a7b34db8439e68dae92ef7016eefc.zmedico@gentoo
1 commit: 4bc99e82ee5a7b34db8439e68dae92ef7016eefc
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 17 23:03:59 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 17 23:10:26 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bc99e82
7
8 sys-apps/portage: version bump to 2.3.47
9
10 #636674 - add make.conf.example for arm
11 #663848 - fix bugs in FEATURES=test to USE=test mapping
12 #663904 - map empty ROOT environment variable to /
13
14 Package-Manager: Portage-2.3.47, Repoman-2.3.10
15
16 sys-apps/portage/Manifest | 1 +
17 sys-apps/portage/portage-2.3.47.ebuild | 264 +++++++++++++++++++++++++++++++++
18 2 files changed, 265 insertions(+)
19
20 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
21 index c1a923a4f59..cc23e6bb95e 100644
22 --- a/sys-apps/portage/Manifest
23 +++ b/sys-apps/portage/Manifest
24 @@ -7,4 +7,5 @@ DIST portage-2.3.40.tar.bz2 995122 BLAKE2B 3bfadee6cf57dace32bb4a365850650e13664
25 DIST portage-2.3.44.tar.bz2 1008301 BLAKE2B de370ce9f455e6f778dece3be78703f23852caa9185d79b54e6fc35939923f2a28c91aa372a4ae601872b7933970b536e935ea1f8cb8604bf1547dced3d70c33 SHA512 e491998958439dc27fed6e6f9a3b87867c881cae6ec1fe9515db3277fb2f6f866b6ea6298bae5bf6553591ebe75719a5f379ae92e4aede440ac620ce4af9160d
26 DIST portage-2.3.45.tar.bz2 1009687 BLAKE2B 396dc6e09e2415ab034963f2b30fe318bd783c873437f3f82e8af233605b7356130c45a18e2423029ec025669f0490542283308011dd60f4c3ee7a95a6d28c2b SHA512 551d24ac168f1cd8dd3affd6bc30e3a6e8a0622956407db72ffb283cfc0937b81b2cb1007ffe7eb8f9c7f94515fab44e1b82c1f45be0375c9d867369b2533792
27 DIST portage-2.3.46.tar.bz2 1009905 BLAKE2B 009615295b3b040c5d009bf1ca87a2875eb2aef6380ae6c715cc08903865f6a52d7ece4a4ac861c59170480396f9c80df16c50a30f931420c6bac8e97d81b0db SHA512 60782adc06a1339166a33e25a26cfaae029b242e5036f329f9328c30c4e99ea9c1d23cbf487faa9f4834145b111d753b0a6f70fb090ae907a6ab61c637a0815d
28 +DIST portage-2.3.47.tar.bz2 1010355 BLAKE2B 3d1058c4dfbd147468619bbc29ba894addfe0d390ad586d1da36f9ed3e379141e0e5954117bf011cb88f88760e5fb0f31e03f6c48ddc3d8dcc62a447bdab2fd2 SHA512 85609e0130108eac18ce43511648ce0be1d04f6bd1cbbe8a92d806b15450a233f5020fea06ca33762b6ccaa48d8c13c9876bc66b4521ba61a96ee07f0f21c1d5
29 DIST portage-2.3.8.tar.bz2 938062 BLAKE2B 3f7bedf6268131a3b3539d53c8a7bb069b533b3a78e5eec521b6201439c8ee5e66996e798fe295561d0a94bfcd32adf414d4f8b5e7a93035cea09749406e64a3 SHA512 4b4b2de20323799b9b0f7a8812f939aa9a96d2744a0f65ad5287ba49744c491b55169cdb21f2885317a6a7c960d2070775ffd798f247b44eebc677c33c271eb8
30
31 diff --git a/sys-apps/portage/portage-2.3.47.ebuild b/sys-apps/portage/portage-2.3.47.ebuild
32 new file mode 100644
33 index 00000000000..0da8ed04e4f
34 --- /dev/null
35 +++ b/sys-apps/portage/portage-2.3.47.ebuild
36 @@ -0,0 +1,264 @@
37 +# Copyright 1999-2018 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=5
41 +
42 +PYTHON_COMPAT=(
43 + pypy
44 + python3_4 python3_5 python3_6 python3_7
45 + python2_7
46 +)
47 +PYTHON_REQ_USE='bzip2(+),threads(+)'
48 +
49 +inherit distutils-r1 systemd
50 +
51 +DESCRIPTION="Portage is the package management and distribution system for Gentoo"
52 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
53 +
54 +LICENSE="GPL-2"
55 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd"
56 +SLOT="0"
57 +IUSE="build doc epydoc gentoo-dev +ipc +native-extensions +rsync-verify selinux xattr"
58 +
59 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
60 + >=app-arch/tar-1.27
61 + dev-lang/python-exec:2
62 + >=sys-apps/sed-4.0.5 sys-devel/patch
63 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
64 + epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
65 +# Require sandbox-2.2 for bug #288863.
66 +# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
67 +# quite slow, so it's not considered in the dependencies as an alternative to
68 +# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
69 +# for now, don't pull in xattr deps for other kernels.
70 +# For whirlpool hash, require python[ssl] (bug #425046).
71 +# For compgen, require bash[readline] (bug #445576).
72 +# app-portage/gemato goes without PYTHON_USEDEP since we're calling
73 +# the executable.
74 +RDEPEND="
75 + >=app-arch/tar-1.27
76 + dev-lang/python-exec:2
77 + !build? (
78 + >=sys-apps/sed-4.0.5
79 + app-shells/bash:0[readline]
80 + >=app-admin/eselect-1.2
81 + $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \
82 + python{2_7,3_4,3_5} pypy)
83 + rsync-verify? (
84 + >=app-portage/gemato-12.1[${PYTHON_USEDEP}]
85 + app-crypt/openpgp-keys-gentoo-release
86 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
87 + )
88 + )
89 + elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
90 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
91 + elibc_musl? ( >=sys-apps/sandbox-2.2 )
92 + elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
93 + >=app-misc/pax-utils-0.1.17
94 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
95 + xattr? ( kernel_linux? (
96 + >=sys-apps/install-xattr-0.3
97 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
98 + python2_7 pypy)
99 + ) )
100 + !<app-admin/logrotate-3.8.0
101 + !<app-portage/repoman-2.3.10"
102 +PDEPEND="
103 + !build? (
104 + >=net-misc/rsync-2.6.4
105 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
106 + )"
107 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
108 +# NOTE: FEATURES=installsources requires debugedit and rsync
109 +
110 +REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
111 +
112 +SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives"
113 +
114 +prefix_src_archives() {
115 + local x y
116 + for x in ${@}; do
117 + for y in ${SRC_ARCHIVES}; do
118 + echo ${y}/${x}
119 + done
120 + done
121 +}
122 +
123 +TARBALL_PV=${PV}
124 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
125 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
126 +
127 +pkg_setup() {
128 + use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
129 +}
130 +
131 +python_prepare_all() {
132 + distutils-r1_python_prepare_all
133 +
134 + if use gentoo-dev; then
135 + einfo "Disabling --dynamic-deps by default for gentoo-dev..."
136 + sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
137 + -i lib/_emerge/create_depgraph_params.py || \
138 + die "failed to patch create_depgraph_params.py"
139 +
140 + einfo "Enabling additional FEATURES for gentoo-dev..."
141 + echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \
142 + >> cnf/make.globals || die
143 + fi
144 +
145 + if use native-extensions; then
146 + printf "[build_ext]\nportage-ext-modules=true\n" >> \
147 + setup.cfg || die
148 + fi
149 +
150 + if ! use ipc ; then
151 + einfo "Disabling ipc..."
152 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
153 + -i lib/_emerge/AbstractEbuildProcess.py || \
154 + die "failed to patch AbstractEbuildProcess.py"
155 + fi
156 +
157 + if use xattr && use kernel_linux ; then
158 + einfo "Adding FEATURES=xattr to make.globals ..."
159 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
160 + || die "failed to append to make.globals"
161 + fi
162 +
163 + if use build || ! use rsync-verify; then
164 + sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \
165 + -i cnf/repos.conf || die "sed failed"
166 + fi
167 +
168 + if [[ -n ${EPREFIX} ]] ; then
169 + einfo "Setting portage.const.EPREFIX ..."
170 + sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
171 + -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
172 + -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
173 + -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
174 + -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
175 + -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
176 + -i lib/portage/const.py || \
177 + die "Failed to patch portage.const.EPREFIX"
178 +
179 + einfo "Prefixing shebangs ..."
180 + while read -r -d $'\0' ; do
181 + local shebang=$(head -n1 "$REPLY")
182 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
183 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
184 + die "sed failed"
185 + fi
186 + done < <(find . -type f -print0)
187 +
188 + einfo "Adjusting make.globals ..."
189 + sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
190 + -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
191 + -i cnf/make.globals || die "sed failed"
192 +
193 + einfo "Adjusting repos.conf ..."
194 + sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
195 + -e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \
196 + -i cnf/repos.conf || die "sed failed"
197 + if use prefix-guest ; then
198 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
199 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
200 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
201 + -i cnf/repos.conf || die "sed failed"
202 + fi
203 +
204 + einfo "Adding FEATURES=force-prefix to make.globals ..."
205 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
206 + || die "failed to append to make.globals"
207 + fi
208 +
209 + cd "${S}/cnf" || die
210 + if [ -f "make.conf.example.${ARCH}".diff ]; then
211 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
212 + die "Failed to patch make.conf.example"
213 + else
214 + eerror ""
215 + eerror "Portage does not have an arch-specific configuration for this arch."
216 + eerror "Please notify the arch maintainer about this issue. Using generic."
217 + eerror ""
218 + fi
219 +}
220 +
221 +python_compile_all() {
222 + local targets=()
223 + use doc && targets+=( docbook )
224 + use epydoc && targets+=( epydoc )
225 +
226 + if [[ ${targets[@]} ]]; then
227 + esetup.py "${targets[@]}"
228 + fi
229 +}
230 +
231 +python_test() {
232 + esetup.py test
233 +}
234 +
235 +python_install() {
236 + # Install sbin scripts to bindir for python-exec linking
237 + # they will be relocated in pkg_preinst()
238 + distutils-r1_python_install \
239 + --system-prefix="${EPREFIX}/usr" \
240 + --bindir="$(python_get_scriptdir)" \
241 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
242 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
243 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
244 + --sbindir="$(python_get_scriptdir)" \
245 + --sysconfdir="${EPREFIX}/etc" \
246 + "${@}"
247 +}
248 +
249 +python_install_all() {
250 + distutils-r1_python_install_all
251 +
252 + local targets=()
253 + use doc && targets+=(
254 + install_docbook
255 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
256 + )
257 + use epydoc && targets+=(
258 + install_epydoc
259 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
260 + )
261 +
262 + # install docs
263 + if [[ ${targets[@]} ]]; then
264 + esetup.py "${targets[@]}"
265 + fi
266 +
267 + systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
268 +
269 + # Due to distutils/python-exec limitations
270 + # these must be installed to /usr/bin.
271 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
272 + einfo "Moving admin scripts to the correct directory"
273 + dodir /usr/sbin
274 + for target in ${sbin_relocations}; do
275 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
276 + mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
277 + done
278 +}
279 +
280 +pkg_preinst() {
281 + # comment out sanity test until it is fixed to work
282 + # with the new PORTAGE_PYM_PATH
283 + #if [[ $ROOT == / ]] ; then
284 + ## Run some minimal tests as a sanity check.
285 + #local test_runner=$(find "${ED}" -name runTests)
286 + #if [[ -n $test_runner && -x $test_runner ]] ; then
287 + #einfo "Running preinst sanity tests..."
288 + #"$test_runner" || die "preinst sanity tests failed"
289 + #fi
290 + #fi
291 +
292 + # elog dir must exist to avoid logrotate error for bug #415911.
293 + # This code runs in preinst in order to bypass the mapping of
294 + # portage:portage to root:root which happens after src_install.
295 + keepdir /var/log/portage/elog
296 + # This is allowed to fail if the user/group are invalid for prefix users.
297 + if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
298 + chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
299 + fi
300 +}