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: Sat, 15 Feb 2020 01:17:32
Message-Id: 1581729434.76ea0ae6484979140a3f9204eeaa8dc775f6cf47.zmedico@gentoo
1 commit: 76ea0ae6484979140a3f9204eeaa8dc775f6cf47
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 15 01:13:16 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 15 01:17:14 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76ea0ae6
7
8 sys-apps/portage: Bump to version 2.3.89
9
10 #649622 depclean: ensure consistency with update actions, via
11 consistent order of dependency traversal
12
13 Bug: https://bugs.gentoo.org/706142
14 Bug: https://bugs.gentoo.org/649622
15 Package-Manager: Portage-2.3.89, Repoman-2.3.20
16 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
17
18 sys-apps/portage/Manifest | 1 +
19 sys-apps/portage/portage-2.3.89.ebuild | 271 +++++++++++++++++++++++++++++++++
20 2 files changed, 272 insertions(+)
21
22 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
23 index 135c9674f21..30af146acf3 100644
24 --- a/sys-apps/portage/Manifest
25 +++ b/sys-apps/portage/Manifest
26 @@ -6,3 +6,4 @@ DIST portage-2.3.85.tar.bz2 1046025 BLAKE2B 721999b1200b69d2fd3fdd8f4690859f44e6
27 DIST portage-2.3.86.tar.bz2 1046806 BLAKE2B 6aadfcf17eacc8f7b82645a82fce96b7d90e93d797704c5b04fe437cbe587440dea8f8e39847c2c95eacf383e4525d4f015ee26b41694c156f907bd22d6663fb SHA512 fad0e89fd2c831ebd8cfd1fe080433c4696f408008f463a151e6fd4f3a2ab2a81249dd0db76f28c7d2cdf0e14e5163c3898c7ca22e7f0edb2e882e1ab7bda95e
28 DIST portage-2.3.87.tar.bz2 1046448 BLAKE2B bbcb31a362d89bc81cdedb03be431792dab53d983d35f10853e6a68c2e2fb3da8ddd237305e78ab5946c8199f4dd7a3a41f023912a50abe9fa96bcf7ac35af75 SHA512 47a4d4901c2ecc9df8e38fa804efeb8583928a77e45a9b19dd8edd7e1323911762c357ad0bc1a182d8389225282660f4ef6e442e8addc087e404d561466c3b86
29 DIST portage-2.3.88.tar.bz2 1048081 BLAKE2B d84b13686d09d125863835467989a11787333dea18a7eabb48560e6847c54643155a98c74d061e08b991064bfa9236e0a617a06beabb575162c4968e4cc13fe8 SHA512 ec043bbd7667f810e1a7c7fd3cae19b81adac1c323d7c488d1e4e809d9cec7c7f13bc2e5b8769a03b9f8aa78e389f5680e15b6a8f0f3543cf43d0f43fb7ee5f7
30 +DIST portage-2.3.89.tar.bz2 1048621 BLAKE2B 1353f0697a977eb395abd857c8cc43c839912f4bd31436c6620d10e3dc29dc32ee9970478ad0f569b02f14989c48a7d956a233c7db22e172897a49a98fd2a94d SHA512 fa453d3134139fc1f435d6388aa7d6271cd680d08ea1736269a917c12500bb463a81afc956ddd0045e98784bcdbb6541c333be6ff0c2a00feeb482b637f08e98
31
32 diff --git a/sys-apps/portage/portage-2.3.89.ebuild b/sys-apps/portage/portage-2.3.89.ebuild
33 new file mode 100644
34 index 00000000000..0188237e0e1
35 --- /dev/null
36 +++ b/sys-apps/portage/portage-2.3.89.ebuild
37 @@ -0,0 +1,271 @@
38 +# Copyright 1999-2020 Gentoo Authors
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=5
42 +
43 +DISTUTILS_USE_SETUPTOOLS=no
44 +PYTHON_COMPAT=(
45 + pypy3
46 + python3_6 python3_7 python3_8
47 + python2_7
48 +)
49 +PYTHON_REQ_USE='bzip2(+),threads(+)'
50 +
51 +inherit distutils-r1 linux-info systemd prefix
52 +
53 +DESCRIPTION="Portage is the package management and distribution system for Gentoo"
54 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
55 +
56 +LICENSE="GPL-2"
57 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
58 +SLOT="0"
59 +IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux xattr"
60 +
61 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
62 + >=app-arch/tar-1.27
63 + dev-lang/python-exec:2
64 + >=sys-apps/sed-4.0.5 sys-devel/patch
65 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
66 + apidoc? (
67 + dev-python/sphinx
68 + dev-python/sphinx-epytext
69 + )"
70 +# Require sandbox-2.2 for bug #288863.
71 +# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
72 +# quite slow, so it's not considered in the dependencies as an alternative to
73 +# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
74 +# for now, don't pull in xattr deps for other kernels.
75 +# For whirlpool hash, require python[ssl] (bug #425046).
76 +# For compgen, require bash[readline] (bug #445576).
77 +# app-portage/gemato goes without PYTHON_USEDEP since we're calling
78 +# the executable.
79 +RDEPEND="
80 + >=app-arch/tar-1.27
81 + dev-lang/python-exec:2
82 + !build? (
83 + >=sys-apps/sed-4.0.5
84 + app-shells/bash:0[readline]
85 + >=app-admin/eselect-1.2
86 + $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \
87 + python{2_7,3_5} pypy)
88 + rsync-verify? (
89 + >=app-portage/gemato-14[${PYTHON_USEDEP}]
90 + >=app-crypt/openpgp-keys-gentoo-release-20180706
91 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
92 + )
93 + )
94 + elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
95 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
96 + elibc_musl? ( >=sys-apps/sandbox-2.2 )
97 + elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
98 + kernel_linux? ( sys-apps/util-linux )
99 + >=app-misc/pax-utils-0.1.17
100 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
101 + xattr? ( kernel_linux? (
102 + >=sys-apps/install-xattr-0.3
103 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
104 + python2_7 pypy)
105 + ) )
106 + !<app-admin/logrotate-3.8.0
107 + !<app-portage/gentoolkit-0.4.6
108 + !<app-portage/repoman-2.3.10"
109 +PDEPEND="
110 + !build? (
111 + >=net-misc/rsync-2.6.4
112 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
113 + )"
114 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
115 +# NOTE: FEATURES=installsources requires debugedit and rsync
116 +
117 +SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives"
118 +
119 +prefix_src_archives() {
120 + local x y
121 + for x in ${@}; do
122 + for y in ${SRC_ARCHIVES}; do
123 + echo ${y}/${x}
124 + done
125 + done
126 +}
127 +
128 +TARBALL_PV=${PV}
129 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
130 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
131 +
132 +pkg_pretend() {
133 + local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS"
134 +
135 + check_extra_config
136 +}
137 +
138 +python_prepare_all() {
139 + distutils-r1_python_prepare_all
140 +
141 + sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die
142 +
143 + if use gentoo-dev; then
144 + einfo "Disabling --dynamic-deps by default for gentoo-dev..."
145 + sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
146 + -i lib/_emerge/create_depgraph_params.py || \
147 + die "failed to patch create_depgraph_params.py"
148 +
149 + einfo "Enabling additional FEATURES for gentoo-dev..."
150 + echo 'FEATURES="${FEATURES} strict-keepdir"' \
151 + >> cnf/make.globals || die
152 + fi
153 +
154 + if use native-extensions; then
155 + printf "[build_ext]\nportage-ext-modules=true\n" >> \
156 + setup.cfg || die
157 + fi
158 +
159 + if ! use ipc ; then
160 + einfo "Disabling ipc..."
161 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
162 + -i lib/_emerge/AbstractEbuildProcess.py || \
163 + die "failed to patch AbstractEbuildProcess.py"
164 + fi
165 +
166 + if use xattr && use kernel_linux ; then
167 + einfo "Adding FEATURES=xattr to make.globals ..."
168 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
169 + || die "failed to append to make.globals"
170 + fi
171 +
172 + if use build || ! use rsync-verify; then
173 + sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \
174 + -e '/^sync-webrsync-verify-signature/s|yes|no|' \
175 + -i cnf/repos.conf || die "sed failed"
176 + fi
177 +
178 + if [[ -n ${EPREFIX} ]] ; then
179 + einfo "Setting portage.const.EPREFIX ..."
180 + hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \
181 + -w "/_BINARY/" lib/portage/const.py
182 +
183 + einfo "Prefixing shebangs ..."
184 + while read -r -d $'\0' ; do
185 + local shebang=$(head -n1 "$REPLY")
186 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
187 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
188 + die "sed failed"
189 + fi
190 + done < <(find . -type f ! -name etc-update -print0)
191 +
192 + einfo "Adjusting make.globals, repos.conf and etc-update ..."
193 + hprefixify cnf/{make.globals,repos.conf} bin/etc-update
194 +
195 + if use prefix-guest ; then
196 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
197 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
198 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
199 + -i cnf/repos.conf || die "sed failed"
200 + fi
201 +
202 + einfo "Adding FEATURES=force-prefix to make.globals ..."
203 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
204 + || die "failed to append to make.globals"
205 + fi
206 +
207 + cd "${S}/cnf" || die
208 + if [ -f "make.conf.example.${ARCH}".diff ]; then
209 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
210 + die "Failed to patch make.conf.example"
211 + else
212 + eerror ""
213 + eerror "Portage does not have an arch-specific configuration for this arch."
214 + eerror "Please notify the arch maintainer about this issue. Using generic."
215 + eerror ""
216 + fi
217 +}
218 +
219 +python_compile_all() {
220 + local targets=()
221 + use doc && targets+=( docbook )
222 + use apidoc && targets+=( apidoc )
223 +
224 + if [[ ${targets[@]} ]]; then
225 + esetup.py "${targets[@]}"
226 + fi
227 +}
228 +
229 +python_test() {
230 + esetup.py test
231 +}
232 +
233 +python_install() {
234 + # Install sbin scripts to bindir for python-exec linking
235 + # they will be relocated in pkg_preinst()
236 + distutils-r1_python_install \
237 + --system-prefix="${EPREFIX}/usr" \
238 + --bindir="$(python_get_scriptdir)" \
239 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
240 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
241 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
242 + --sbindir="$(python_get_scriptdir)" \
243 + --sysconfdir="${EPREFIX}/etc" \
244 + "${@}"
245 +}
246 +
247 +python_install_all() {
248 + distutils-r1_python_install_all
249 +
250 + local targets=()
251 + use doc && targets+=(
252 + install_docbook
253 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
254 + )
255 + use apidoc && targets+=(
256 + install_apidoc
257 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
258 + )
259 +
260 + # install docs
261 + if [[ ${targets[@]} ]]; then
262 + esetup.py "${targets[@]}"
263 + fi
264 +
265 + systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
266 +
267 + # Due to distutils/python-exec limitations
268 + # these must be installed to /usr/bin.
269 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
270 + einfo "Moving admin scripts to the correct directory"
271 + dodir /usr/sbin
272 + for target in ${sbin_relocations}; do
273 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
274 + mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
275 + done
276 +}
277 +
278 +pkg_preinst() {
279 + python_setup
280 + python_export PYTHON_SITEDIR
281 + [[ -d ${D%/}${PYTHON_SITEDIR} ]] || die "${D%/}${PYTHON_SITEDIR}: No such directory"
282 + env -u DISTDIR \
283 + -u PORTAGE_OVERRIDE_EPREFIX \
284 + -u PORTAGE_REPOSITORIES \
285 + -u PORTDIR \
286 + -u PORTDIR_OVERLAY \
287 + PYTHONPATH="${D%/}${PYTHON_SITEDIR}${PYTHONPATH:+:${PYTHONPATH}}" \
288 + "${PYTHON}" -m portage._compat_upgrade.default_locations || die
289 +
290 + # elog dir must exist to avoid logrotate error for bug #415911.
291 + # This code runs in preinst in order to bypass the mapping of
292 + # portage:portage to root:root which happens after src_install.
293 + keepdir /var/log/portage/elog
294 + # This is allowed to fail if the user/group are invalid for prefix users.
295 + if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
296 + chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
297 + fi
298 +
299 + if has_version "<${CATEGORY}/${PN}-2.3.77"; then
300 + elog "The emerge --autounmask option is now disabled by default, except for"
301 + elog "portions of behavior which are controlled by the --autounmask-use and"
302 + elog "--autounmask-license options. For backward compatibility, previous"
303 + elog "behavior of --autounmask=y and --autounmask=n is entirely preserved."
304 + elog "Users can get the old behavior simply by adding --autounmask to the"
305 + elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this"
306 + elog "change, see https://bugs.gentoo.org/658648."
307 + fi
308 +}