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