1 |
commit: 7548e62ce8f1723dbd2b8457a348bcd2e69da073 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 18 16:49:25 2021 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 18 16:50:08 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7548e62c |
7 |
|
8 |
sys-apps/portage: Remove old versions |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
sys-apps/portage/Manifest | 4 - |
14 |
sys-apps/portage/portage-3.0.13.ebuild | 269 ---------------------------- |
15 |
sys-apps/portage/portage-3.0.17-r2.ebuild | 286 ------------------------------ |
16 |
3 files changed, 559 deletions(-) |
17 |
|
18 |
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest |
19 |
index 31b4a9ee57a..96b1b41b98b 100644 |
20 |
--- a/sys-apps/portage/Manifest |
21 |
+++ b/sys-apps/portage/Manifest |
22 |
@@ -1,7 +1,3 @@ |
23 |
-DIST portage-3.0.13.tar.bz2 1049930 BLAKE2B 092e4a25896d613dcfcdaaa1c75f29d19112688328c4078a8ab2b24edcf1e26fff3273da56a79f8b35aada5e11e3cf7f14ef40aca742da0874ea7e907c4778bc SHA512 a9106fce311053523fd026c6c65cb85562bae69ab6ea6b5ae784044ffedbfeb0e3b1c3758ebea9204b11f885da383f9d8ee31d34ad52ac14f059cf97894e3590 |
24 |
-DIST portage-3.0.17-bug-775053-setup-globals-double-prefix-ff7d78.patch 908 BLAKE2B 51984f04bf9a9b448207f9f724a01e72f76a1df8f3da8a9cf263a870674458e885ed47aba7597b3a01d9ee3c86b687bcb9048356af9d7d2b015dac9c41c97baa SHA512 1aef52afcf4e5dca3afe7d746a868f5ea5a1afb28703e2087d620f5206cebdbf71e0d600d3354693e59f49cd92758f47e3aafb4625539af0cdec80b36109051b |
25 |
-DIST portage-3.0.17-bug-775239-_test_lock_fn-tempfile-leak-d8a12c.patch 733 BLAKE2B 8281107d270908b49218603ef64b7580c5d6e0bf015eabef4c35f8ee9d76b2b7790f4b75404b9d85fd030c3a0f9183e88894d67bf547978f3fa0bed0630112cf SHA512 5ea4ccc7d517ea79a02fad77d20502d613cedf9df00edebf73972979bd5a469f47c14ae5b69b850f0ce9860b9fdf1b5bb283e138bd7be5b832928697e4bba42b |
26 |
-DIST portage-3.0.17.tar.xz 970076 BLAKE2B 261d8d3b0da5bb77f37328219365a59d7ac56a22e887de59a6b702fcf895493f7a0aac1af744bc67b80c9e2aa730795e507764e9e1c807c247d1ccbe6f825d2f SHA512 6f4a50b005a67e6eea24600d10179fd48b4aa1de4cdf99bc310854dc303248408f8a31bca4135e4e530fcbd2b3d99c2f89644e4e4240e3a754fd97e949403ffc |
27 |
DIST portage-3.0.18.tar.xz 971692 BLAKE2B 0a8d2062fce1bf85a2f1025d17ddd3eafc987fd93c01f17bcc4487b23841e530451502417e24bbe58175b4fee871ceb528696775116a60f93b7b841d14ecf7a3 SHA512 d3f4b5258748fbef7b8ec000685b7e42804123a5c6b474bb6679666c2696a16e3bd202108df6e647770406539ff223bfd0deb1a3b4240e0a7ba1f2ec52aca2cd |
28 |
DIST portage-3.0.19.tar.gz 1347687 BLAKE2B 86eea08c2559b2d5a3eac39d8f7523380769710e7b4e3973463410bc291e746d9a36708e26d9b6456c06f67157fd04385c98ae28e25e48dba510fbaaab2d3536 SHA512 355153839219b93ae5d7c844ac5ed7ada10b2932d4a8e2b8208793fc33dfba3d46abe5ec7ecfbef9f16f23a6b21e57b7b14247f0b1fd85018a07e198bafa209c |
29 |
DIST portage-3.0.20-bug-777492-209be9a.patch 1758 BLAKE2B 9ed7b18ef8b73c59a08e5a2c2fba9365b37bd8cace32d5a275a4003cbf3f40f6a0a5a4d168dae987169e2017222a3af291d9a860a4494c994ef51ca851620db1 SHA512 38f402d1ecf125af7c454afdcee12221fa715f4e043c1a59073422025a12508a06a4bb77503bb75f6ed9603ff507499558bc1032157f5fc0aee9573bb18a6e4b |
30 |
|
31 |
diff --git a/sys-apps/portage/portage-3.0.13.ebuild b/sys-apps/portage/portage-3.0.13.ebuild |
32 |
deleted file mode 100644 |
33 |
index 489969e0c4a..00000000000 |
34 |
--- a/sys-apps/portage/portage-3.0.13.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,269 +0,0 @@ |
37 |
-# Copyright 1999-2021 Gentoo Authors |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
- |
40 |
-EAPI=7 |
41 |
- |
42 |
-DISTUTILS_USE_SETUPTOOLS=no |
43 |
-PYTHON_COMPAT=( pypy3 python3_{7..9} ) |
44 |
-PYTHON_REQ_USE='bzip2(+),threads(+)' |
45 |
-TMPFILES_OPTIONAL=1 |
46 |
- |
47 |
-inherit distutils-r1 linux-info tmpfiles prefix |
48 |
- |
49 |
-DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
50 |
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
51 |
- |
52 |
-LICENSE="GPL-2" |
53 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" |
54 |
-SLOT="0" |
55 |
-IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr" |
56 |
-RESTRICT="!test? ( test )" |
57 |
- |
58 |
-BDEPEND="test? ( dev-vcs/git )" |
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 |
- apidoc? ( |
65 |
- dev-python/sphinx |
66 |
- dev-python/sphinx-epytext |
67 |
- )" |
68 |
-# Require sandbox-2.2 for bug #288863. |
69 |
-# For whirlpool hash, require python[ssl] (bug #425046). |
70 |
-# For compgen, require bash[readline] (bug #445576). |
71 |
-# app-portage/gemato goes without PYTHON_USEDEP since we're calling |
72 |
-# the executable. |
73 |
-RDEPEND=" |
74 |
- acct-user/portage |
75 |
- app-arch/zstd |
76 |
- >=app-arch/tar-1.27 |
77 |
- dev-lang/python-exec:2 |
78 |
- >=sys-apps/findutils-4.4 |
79 |
- !build? ( |
80 |
- >=sys-apps/sed-4.0.5 |
81 |
- app-shells/bash:0[readline] |
82 |
- >=app-admin/eselect-1.2 |
83 |
- rsync-verify? ( |
84 |
- >=app-portage/gemato-14.5[${PYTHON_USEDEP}] |
85 |
- >=app-crypt/openpgp-keys-gentoo-release-20180706 |
86 |
- >=app-crypt/gnupg-2.2.4-r2[ssl(-)] |
87 |
- ) |
88 |
- ) |
89 |
- elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
90 |
- elibc_musl? ( >=sys-apps/sandbox-2.2 ) |
91 |
- elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) |
92 |
- kernel_linux? ( sys-apps/util-linux ) |
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 |
- ) ) |
98 |
- !<app-admin/logrotate-3.8.0 |
99 |
- !<app-portage/gentoolkit-0.4.6 |
100 |
- !<app-portage/repoman-2.3.10 |
101 |
- !~app-portage/repoman-3.0.0" |
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 |
-SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives" |
111 |
- |
112 |
-prefix_src_archives() { |
113 |
- local x y |
114 |
- for x in ${@}; do |
115 |
- for y in ${SRC_ARCHIVES}; do |
116 |
- echo ${y}/${x} |
117 |
- done |
118 |
- done |
119 |
-} |
120 |
- |
121 |
-TARBALL_PV=${PV} |
122 |
-SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
123 |
- $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)" |
124 |
- |
125 |
-pkg_pretend() { |
126 |
- local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS" |
127 |
- |
128 |
- check_extra_config |
129 |
-} |
130 |
- |
131 |
-python_prepare_all() { |
132 |
- distutils-r1_python_prepare_all |
133 |
- |
134 |
- sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die |
135 |
- |
136 |
- if use gentoo-dev; then |
137 |
- einfo "Disabling --dynamic-deps by default for gentoo-dev..." |
138 |
- sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \ |
139 |
- -i lib/_emerge/create_depgraph_params.py || \ |
140 |
- die "failed to patch create_depgraph_params.py" |
141 |
- |
142 |
- einfo "Enabling additional FEATURES for gentoo-dev..." |
143 |
- echo 'FEATURES="${FEATURES} strict-keepdir"' \ |
144 |
- >> cnf/make.globals || die |
145 |
- fi |
146 |
- |
147 |
- if use native-extensions; then |
148 |
- printf "[build_ext]\nportage-ext-modules=true\n" >> \ |
149 |
- setup.cfg || die |
150 |
- fi |
151 |
- |
152 |
- if ! use ipc ; then |
153 |
- einfo "Disabling ipc..." |
154 |
- sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
155 |
- -i lib/_emerge/AbstractEbuildProcess.py || \ |
156 |
- die "failed to patch AbstractEbuildProcess.py" |
157 |
- fi |
158 |
- |
159 |
- if use xattr && use kernel_linux ; then |
160 |
- einfo "Adding FEATURES=xattr to make.globals ..." |
161 |
- echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
162 |
- || die "failed to append to make.globals" |
163 |
- fi |
164 |
- |
165 |
- if use build || ! use rsync-verify; then |
166 |
- sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \ |
167 |
- -e '/^sync-webrsync-verify-signature/s|yes|no|' \ |
168 |
- -i cnf/repos.conf || die "sed failed" |
169 |
- fi |
170 |
- |
171 |
- if [[ -n ${EPREFIX} ]] ; then |
172 |
- einfo "Setting portage.const.EPREFIX ..." |
173 |
- hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \ |
174 |
- -w "/_BINARY/" lib/portage/const.py |
175 |
- |
176 |
- einfo "Prefixing shebangs ..." |
177 |
- while read -r -d $'\0' ; do |
178 |
- local shebang=$(head -n1 "$REPLY") |
179 |
- if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
180 |
- sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
181 |
- die "sed failed" |
182 |
- fi |
183 |
- done < <(find . -type f ! -name etc-update -print0) |
184 |
- |
185 |
- einfo "Adjusting make.globals, repos.conf and etc-update ..." |
186 |
- hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
187 |
- |
188 |
- if use prefix-guest ; then |
189 |
- sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
190 |
- -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |
191 |
- -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \ |
192 |
- -i cnf/repos.conf || die "sed failed" |
193 |
- fi |
194 |
- |
195 |
- einfo "Adding FEATURES=force-prefix to make.globals ..." |
196 |
- echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \ |
197 |
- || die "failed to append to make.globals" |
198 |
- fi |
199 |
- |
200 |
- cd "${S}/cnf" || die |
201 |
- if [ -f "make.conf.example.${ARCH}".diff ]; then |
202 |
- patch make.conf.example "make.conf.example.${ARCH}".diff || \ |
203 |
- die "Failed to patch make.conf.example" |
204 |
- else |
205 |
- eerror "" |
206 |
- eerror "Portage does not have an arch-specific configuration for this arch." |
207 |
- eerror "Please notify the arch maintainer about this issue. Using generic." |
208 |
- eerror "" |
209 |
- fi |
210 |
-} |
211 |
- |
212 |
-python_compile_all() { |
213 |
- local targets=() |
214 |
- use doc && targets+=( docbook ) |
215 |
- use apidoc && targets+=( apidoc ) |
216 |
- |
217 |
- if [[ ${targets[@]} ]]; then |
218 |
- esetup.py "${targets[@]}" |
219 |
- fi |
220 |
-} |
221 |
- |
222 |
-python_test() { |
223 |
- esetup.py test |
224 |
-} |
225 |
- |
226 |
-python_install() { |
227 |
- # Install sbin scripts to bindir for python-exec linking |
228 |
- # they will be relocated in pkg_preinst() |
229 |
- distutils-r1_python_install \ |
230 |
- --system-prefix="${EPREFIX}/usr" \ |
231 |
- --bindir="$(python_get_scriptdir)" \ |
232 |
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
233 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
234 |
- --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ |
235 |
- --sbindir="$(python_get_scriptdir)" \ |
236 |
- --sysconfdir="${EPREFIX}/etc" \ |
237 |
- "${@}" |
238 |
-} |
239 |
- |
240 |
-python_install_all() { |
241 |
- distutils-r1_python_install_all |
242 |
- |
243 |
- local targets=() |
244 |
- use doc && targets+=( |
245 |
- install_docbook |
246 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
247 |
- ) |
248 |
- use apidoc && targets+=( |
249 |
- install_apidoc |
250 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
251 |
- ) |
252 |
- |
253 |
- # install docs |
254 |
- if [[ ${targets[@]} ]]; then |
255 |
- esetup.py "${targets[@]}" |
256 |
- fi |
257 |
- |
258 |
- dotmpfiles "${FILESDIR}"/portage-ccache.conf |
259 |
- |
260 |
- # Due to distutils/python-exec limitations |
261 |
- # these must be installed to /usr/bin. |
262 |
- local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' |
263 |
- einfo "Moving admin scripts to the correct directory" |
264 |
- dodir /usr/sbin |
265 |
- for target in ${sbin_relocations}; do |
266 |
- einfo "Moving /usr/bin/${target} to /usr/sbin/${target}" |
267 |
- mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!" |
268 |
- done |
269 |
-} |
270 |
- |
271 |
-pkg_preinst() { |
272 |
- python_setup |
273 |
- local sitedir=$(python_get_sitedir) |
274 |
- [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" |
275 |
- env -u DISTDIR \ |
276 |
- -u PORTAGE_OVERRIDE_EPREFIX \ |
277 |
- -u PORTAGE_REPOSITORIES \ |
278 |
- -u PORTDIR \ |
279 |
- -u PORTDIR_OVERLAY \ |
280 |
- PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
281 |
- "${PYTHON}" -m portage._compat_upgrade.default_locations || die |
282 |
- |
283 |
- env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ |
284 |
- PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
285 |
- "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die |
286 |
- |
287 |
- # elog dir must exist to avoid logrotate error for bug #415911. |
288 |
- # This code runs in preinst in order to bypass the mapping of |
289 |
- # portage:portage to root:root which happens after src_install. |
290 |
- keepdir /var/log/portage/elog |
291 |
- # This is allowed to fail if the user/group are invalid for prefix users. |
292 |
- if chown portage:portage "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then |
293 |
- chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog} |
294 |
- fi |
295 |
- |
296 |
- if has_version "<${CATEGORY}/${PN}-2.3.77"; then |
297 |
- elog "The emerge --autounmask option is now disabled by default, except for" |
298 |
- elog "portions of behavior which are controlled by the --autounmask-use and" |
299 |
- elog "--autounmask-license options. For backward compatibility, previous" |
300 |
- elog "behavior of --autounmask=y and --autounmask=n is entirely preserved." |
301 |
- elog "Users can get the old behavior simply by adding --autounmask to the" |
302 |
- elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this" |
303 |
- elog "change, see https://bugs.gentoo.org/658648." |
304 |
- fi |
305 |
-} |
306 |
|
307 |
diff --git a/sys-apps/portage/portage-3.0.17-r2.ebuild b/sys-apps/portage/portage-3.0.17-r2.ebuild |
308 |
deleted file mode 100644 |
309 |
index c15b19433d3..00000000000 |
310 |
--- a/sys-apps/portage/portage-3.0.17-r2.ebuild |
311 |
+++ /dev/null |
312 |
@@ -1,286 +0,0 @@ |
313 |
-# Copyright 1999-2021 Gentoo Authors |
314 |
-# Distributed under the terms of the GNU General Public License v2 |
315 |
- |
316 |
-EAPI=7 |
317 |
- |
318 |
-DISTUTILS_USE_SETUPTOOLS=no |
319 |
-PYTHON_COMPAT=( pypy3 python3_{7..9} ) |
320 |
-PYTHON_REQ_USE='bzip2(+),threads(+)' |
321 |
-TMPFILES_OPTIONAL=1 |
322 |
- |
323 |
-inherit distutils-r1 linux-info tmpfiles prefix |
324 |
- |
325 |
-DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
326 |
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
327 |
- |
328 |
-LICENSE="GPL-2" |
329 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" |
330 |
-SLOT="0" |
331 |
-IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr" |
332 |
-RESTRICT="!test? ( test )" |
333 |
- |
334 |
-BDEPEND=" |
335 |
- app-arch/xz-utils |
336 |
- test? ( dev-vcs/git )" |
337 |
-DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') ) |
338 |
- >=app-arch/tar-1.27 |
339 |
- dev-lang/python-exec:2 |
340 |
- >=sys-apps/sed-4.0.5 sys-devel/patch |
341 |
- doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
342 |
- apidoc? ( |
343 |
- dev-python/sphinx |
344 |
- dev-python/sphinx-epytext |
345 |
- )" |
346 |
-# Require sandbox-2.2 for bug #288863. |
347 |
-# For whirlpool hash, require python[ssl] (bug #425046). |
348 |
-# For compgen, require bash[readline] (bug #445576). |
349 |
-# app-portage/gemato goes without PYTHON_USEDEP since we're calling |
350 |
-# the executable. |
351 |
-RDEPEND=" |
352 |
- acct-user/portage |
353 |
- app-arch/zstd |
354 |
- >=app-arch/tar-1.27 |
355 |
- dev-lang/python-exec:2 |
356 |
- >=sys-apps/findutils-4.4 |
357 |
- !build? ( |
358 |
- >=sys-apps/sed-4.0.5 |
359 |
- app-shells/bash:0[readline] |
360 |
- >=app-admin/eselect-1.2 |
361 |
- rsync-verify? ( |
362 |
- >=app-portage/gemato-14.5[${PYTHON_USEDEP}] |
363 |
- >=app-crypt/openpgp-keys-gentoo-release-20180706 |
364 |
- >=app-crypt/gnupg-2.2.4-r2[ssl(-)] |
365 |
- ) |
366 |
- ) |
367 |
- elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
368 |
- elibc_musl? ( >=sys-apps/sandbox-2.2 ) |
369 |
- elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) |
370 |
- kernel_linux? ( sys-apps/util-linux ) |
371 |
- >=app-misc/pax-utils-0.1.17 |
372 |
- selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] ) |
373 |
- xattr? ( kernel_linux? ( |
374 |
- >=sys-apps/install-xattr-0.3 |
375 |
- ) ) |
376 |
- !<app-admin/logrotate-3.8.0 |
377 |
- !<app-portage/gentoolkit-0.4.6 |
378 |
- !<app-portage/repoman-2.3.10 |
379 |
- !~app-portage/repoman-3.0.0" |
380 |
-PDEPEND=" |
381 |
- !build? ( |
382 |
- >=net-misc/rsync-2.6.4 |
383 |
- userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
384 |
- )" |
385 |
-# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
386 |
-# NOTE: FEATURES=installsources requires debugedit and rsync |
387 |
- |
388 |
-SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives" |
389 |
- |
390 |
-prefix_src_archives() { |
391 |
- local x y |
392 |
- for x in ${@}; do |
393 |
- for y in ${SRC_ARCHIVES}; do |
394 |
- echo ${y}/${x} |
395 |
- done |
396 |
- done |
397 |
-} |
398 |
- |
399 |
-TARBALL_PV=${PV} |
400 |
-SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.xz |
401 |
- $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.xz) |
402 |
- https://github.com/gentoo/portage/commit/ff7d78442895e53afb534c072477f98bada4f248.patch -> ${P}-bug-775053-setup-globals-double-prefix-ff7d78.patch |
403 |
- https://github.com/gentoo/portage/commit/d8a12c258cbe15b2725c51b1061e8297919b20df.patch -> ${P}-bug-775239-_test_lock_fn-tempfile-leak-d8a12c.patch" |
404 |
- |
405 |
-PATCHES=( |
406 |
- "${DISTDIR}/${P}-bug-775053-setup-globals-double-prefix-ff7d78.patch" |
407 |
- "${DISTDIR}/${P}-bug-775239-_test_lock_fn-tempfile-leak-d8a12c.patch" |
408 |
-) |
409 |
- |
410 |
-pkg_pretend() { |
411 |
- local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS" |
412 |
- |
413 |
- check_extra_config |
414 |
-} |
415 |
- |
416 |
-python_prepare_all() { |
417 |
- distutils-r1_python_prepare_all |
418 |
- |
419 |
- sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die |
420 |
- |
421 |
- if use gentoo-dev; then |
422 |
- einfo "Disabling --dynamic-deps by default for gentoo-dev..." |
423 |
- sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \ |
424 |
- -i lib/_emerge/create_depgraph_params.py || \ |
425 |
- die "failed to patch create_depgraph_params.py" |
426 |
- |
427 |
- einfo "Enabling additional FEATURES for gentoo-dev..." |
428 |
- echo 'FEATURES="${FEATURES} strict-keepdir"' \ |
429 |
- >> cnf/make.globals || die |
430 |
- fi |
431 |
- |
432 |
- if use native-extensions; then |
433 |
- printf "[build_ext]\nportage-ext-modules=true\n" >> \ |
434 |
- setup.cfg || die |
435 |
- fi |
436 |
- |
437 |
- if ! use ipc ; then |
438 |
- einfo "Disabling ipc..." |
439 |
- sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
440 |
- -i lib/_emerge/AbstractEbuildProcess.py || \ |
441 |
- die "failed to patch AbstractEbuildProcess.py" |
442 |
- fi |
443 |
- |
444 |
- if use xattr && use kernel_linux ; then |
445 |
- einfo "Adding FEATURES=xattr to make.globals ..." |
446 |
- echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
447 |
- || die "failed to append to make.globals" |
448 |
- fi |
449 |
- |
450 |
- if use build || ! use rsync-verify; then |
451 |
- sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \ |
452 |
- -e '/^sync-webrsync-verify-signature/s|yes|no|' \ |
453 |
- -i cnf/repos.conf || die "sed failed" |
454 |
- fi |
455 |
- |
456 |
- if [[ -n ${EPREFIX} ]] ; then |
457 |
- einfo "Setting portage.const.EPREFIX ..." |
458 |
- hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \ |
459 |
- -w "/_BINARY/" lib/portage/const.py |
460 |
- |
461 |
- einfo "Prefixing shebangs ..." |
462 |
- > "${T}/shebangs" || die |
463 |
- while read -r -d $'\0' ; do |
464 |
- local shebang=$(head -n1 "$REPLY") |
465 |
- if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
466 |
- echo "${REPLY}" >> "${T}/shebangs" || die |
467 |
- fi |
468 |
- done < <(find . -type f -executable ! -name etc-update -print0) |
469 |
- |
470 |
- if [[ -s ${T}/shebangs ]]; then |
471 |
- xargs sed -i -e "1s:^#!:#!${EPREFIX}:" < "${T}/shebangs" || die "sed failed" |
472 |
- fi |
473 |
- |
474 |
- einfo "Adjusting make.globals, repos.conf and etc-update ..." |
475 |
- hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
476 |
- |
477 |
- if use prefix-guest ; then |
478 |
- sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
479 |
- -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |
480 |
- -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \ |
481 |
- -i cnf/repos.conf || die "sed failed" |
482 |
- fi |
483 |
- |
484 |
- einfo "Adding FEATURES=force-prefix to make.globals ..." |
485 |
- echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \ |
486 |
- || die "failed to append to make.globals" |
487 |
- fi |
488 |
- |
489 |
- cd "${S}/cnf" || die |
490 |
- if [ -f "make.conf.example.${ARCH}".diff ]; then |
491 |
- patch make.conf.example "make.conf.example.${ARCH}".diff || \ |
492 |
- die "Failed to patch make.conf.example" |
493 |
- else |
494 |
- eerror "" |
495 |
- eerror "Portage does not have an arch-specific configuration for this arch." |
496 |
- eerror "Please notify the arch maintainer about this issue. Using generic." |
497 |
- eerror "" |
498 |
- fi |
499 |
-} |
500 |
- |
501 |
-python_compile_all() { |
502 |
- local targets=() |
503 |
- use doc && targets+=( docbook ) |
504 |
- use apidoc && targets+=( apidoc ) |
505 |
- |
506 |
- if [[ ${targets[@]} ]]; then |
507 |
- esetup.py "${targets[@]}" |
508 |
- fi |
509 |
-} |
510 |
- |
511 |
-python_test() { |
512 |
- esetup.py test |
513 |
-} |
514 |
- |
515 |
-python_install() { |
516 |
- # Install sbin scripts to bindir for python-exec linking |
517 |
- # they will be relocated in pkg_preinst() |
518 |
- distutils-r1_python_install \ |
519 |
- --system-prefix="${EPREFIX}/usr" \ |
520 |
- --bindir="$(python_get_scriptdir)" \ |
521 |
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
522 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
523 |
- --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ |
524 |
- --sbindir="$(python_get_scriptdir)" \ |
525 |
- --sysconfdir="${EPREFIX}/etc" \ |
526 |
- "${@}" |
527 |
-} |
528 |
- |
529 |
-python_install_all() { |
530 |
- distutils-r1_python_install_all |
531 |
- |
532 |
- local targets=() |
533 |
- use doc && targets+=( |
534 |
- install_docbook |
535 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
536 |
- ) |
537 |
- use apidoc && targets+=( |
538 |
- install_apidoc |
539 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
540 |
- ) |
541 |
- |
542 |
- # install docs |
543 |
- if [[ ${targets[@]} ]]; then |
544 |
- esetup.py "${targets[@]}" |
545 |
- fi |
546 |
- |
547 |
- dotmpfiles "${FILESDIR}"/portage-ccache.conf |
548 |
- |
549 |
- # Due to distutils/python-exec limitations |
550 |
- # these must be installed to /usr/bin. |
551 |
- local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' |
552 |
- einfo "Moving admin scripts to the correct directory" |
553 |
- dodir /usr/sbin |
554 |
- for target in ${sbin_relocations}; do |
555 |
- einfo "Moving /usr/bin/${target} to /usr/sbin/${target}" |
556 |
- mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!" |
557 |
- done |
558 |
-} |
559 |
- |
560 |
-pkg_preinst() { |
561 |
- python_setup |
562 |
- local sitedir=$(python_get_sitedir) |
563 |
- [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" |
564 |
- env -u DISTDIR \ |
565 |
- -u PORTAGE_OVERRIDE_EPREFIX \ |
566 |
- -u PORTAGE_REPOSITORIES \ |
567 |
- -u PORTDIR \ |
568 |
- -u PORTDIR_OVERLAY \ |
569 |
- PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
570 |
- "${PYTHON}" -m portage._compat_upgrade.default_locations || die |
571 |
- |
572 |
- env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ |
573 |
- PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
574 |
- "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die |
575 |
- |
576 |
- env -u FEATURES -u PORTAGE_REPOSITORIES \ |
577 |
- PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
578 |
- "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die |
579 |
- |
580 |
- # elog dir must exist to avoid logrotate error for bug #415911. |
581 |
- # This code runs in preinst in order to bypass the mapping of |
582 |
- # portage:portage to root:root which happens after src_install. |
583 |
- keepdir /var/log/portage/elog |
584 |
- # This is allowed to fail if the user/group are invalid for prefix users. |
585 |
- if chown portage:portage "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then |
586 |
- chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog} |
587 |
- fi |
588 |
- |
589 |
- if has_version "<${CATEGORY}/${PN}-2.3.77"; then |
590 |
- elog "The emerge --autounmask option is now disabled by default, except for" |
591 |
- elog "portions of behavior which are controlled by the --autounmask-use and" |
592 |
- elog "--autounmask-license options. For backward compatibility, previous" |
593 |
- elog "behavior of --autounmask=y and --autounmask=n is entirely preserved." |
594 |
- elog "Users can get the old behavior simply by adding --autounmask to the" |
595 |
- elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this" |
596 |
- elog "change, see https://bugs.gentoo.org/658648." |
597 |
- fi |
598 |
-} |