1 |
commit: 3009f682e74a46a4a88ecab250c59f8e921ea2f9 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 19 19:20:06 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 19 19:20:17 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3009f682 |
7 |
|
8 |
sys-apps/portage: add 3.0.45.3 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/899542 |
11 |
Closes: https://bugs.gentoo.org/900683 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
sys-apps/portage/Manifest | 1 + |
15 |
sys-apps/portage/portage-3.0.45.3.ebuild | 284 +++++++++++++++++++++++++++++++ |
16 |
2 files changed, 285 insertions(+) |
17 |
|
18 |
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest |
19 |
index 58289a9dee47..18632e0ed2d0 100644 |
20 |
--- a/sys-apps/portage/Manifest |
21 |
+++ b/sys-apps/portage/Manifest |
22 |
@@ -1,3 +1,4 @@ |
23 |
DIST portage-3.0.43.tar.bz2 1139615 BLAKE2B e0f2646c3b6d5d49ec23038ad27507f7b9c0c03b848e82aff336896802c07b29344f924c4525d880f8895ba38f8116a7c79ecea51c794a433da9bd146efadc20 SHA512 b5e5339f3b5446f5c8f9b319e86e82d260e004b0606c3d0eadf09f91c95de0279c64c0fc4d7f6251ebd2cf7a65ba1ba37d752ed48b712e72b8c024835e747691 |
24 |
DIST portage-3.0.44.tar.bz2 1140911 BLAKE2B 06f584e6e37bbb309b9bb0e29ba4381eadd4ae6246aeb1045e3a5c5dcb33d74f74e74aa3f2325acbf37e16a535095c433f2796ed042f73cea5e208150e210cb0 SHA512 d40c95f3a31c5e2ae35374243c40c8d1f6b47b7c89f6a711a12d8744cb6848a85443298c0f947475b32acf52332e7f09b1e85915149ab8363930c0404f08410e |
25 |
DIST portage-3.0.45.2.tar.bz2 1145556 BLAKE2B 09cd28839418f91f512ce4ddf45addf37f72d07d6ee84812519239245529c6b5fbe63e45ee3fe3048fb8b3aced2a18c0f30fbdb261a793bae87243e9258799bd SHA512 16be3572d74b26ca5ed62392e3da701cc8e93e6d6d35024a2d10b0f971618404a135645a869d8df2aedf9e3e9201e7ad912a427e9593065fe20ada7a0fedf353 |
26 |
+DIST portage-3.0.45.3.tar.bz2 1146552 BLAKE2B 0506124bf47d71df699c2ecb2846b19f68b39813409e141fe292e237093eeb4f3d6fb771f6328624e0182322f71f42e629c2c58a2c590efb8697fa61b03d73a4 SHA512 89757efb71127249356c7d4ea1a05de7409285abaf045b2c6b5ddd463bef997db497df6ea3a05085656eced49bee625732bfb2d0771b7592f883f8712e547415 |
27 |
|
28 |
diff --git a/sys-apps/portage/portage-3.0.45.3.ebuild b/sys-apps/portage/portage-3.0.45.3.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..c226bd813658 |
31 |
--- /dev/null |
32 |
+++ b/sys-apps/portage/portage-3.0.45.3.ebuild |
33 |
@@ -0,0 +1,284 @@ |
34 |
+# Copyright 1999-2023 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+PYTHON_COMPAT=( pypy3 python3_{9..11} ) |
40 |
+PYTHON_REQ_USE='bzip2(+),threads(+)' |
41 |
+TMPFILES_OPTIONAL=1 |
42 |
+ |
43 |
+inherit distutils-r1 linux-info toolchain-funcs tmpfiles prefix |
44 |
+ |
45 |
+DESCRIPTION="The package management and distribution system for Gentoo" |
46 |
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
47 |
+SRC_URI="https://gitweb.gentoo.org/proj/portage.git/snapshot/${P}.tar.bz2" |
48 |
+ |
49 |
+LICENSE="GPL-2" |
50 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
51 |
+SLOT="0" |
52 |
+IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr" |
53 |
+RESTRICT="!test? ( test )" |
54 |
+ |
55 |
+BDEPEND=" |
56 |
+ app-arch/xz-utils |
57 |
+ test? ( dev-vcs/git ) |
58 |
+" |
59 |
+DEPEND=" |
60 |
+ !build? ( $(python_gen_impl_dep 'ssl(+)') ) |
61 |
+ >=app-arch/tar-1.27 |
62 |
+ dev-lang/python-exec:2 |
63 |
+ >=sys-apps/sed-4.0.5 sys-devel/patch |
64 |
+ doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
65 |
+ apidoc? ( |
66 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
67 |
+ dev-python/sphinx-epytext[${PYTHON_USEDEP}] |
68 |
+ ) |
69 |
+" |
70 |
+# Require sandbox-2.2 for bug #288863. |
71 |
+# For whirlpool hash, require python[ssl] (bug #425046). |
72 |
+# For compgen, require bash[readline] (bug #445576). |
73 |
+# app-portage/gemato goes without PYTHON_USEDEP since we're calling |
74 |
+# the executable. |
75 |
+RDEPEND=" |
76 |
+ acct-user/portage |
77 |
+ app-arch/zstd |
78 |
+ >=app-arch/tar-1.27 |
79 |
+ dev-lang/python-exec:2 |
80 |
+ >=sys-apps/findutils-4.4 |
81 |
+ !build? ( |
82 |
+ >=sys-apps/sed-4.0.5 |
83 |
+ >=app-shells/bash-5.0:0[readline] |
84 |
+ >=app-admin/eselect-1.2 |
85 |
+ rsync-verify? ( |
86 |
+ >=app-portage/gemato-14.5[${PYTHON_USEDEP}] |
87 |
+ >=sec-keys/openpgp-keys-gentoo-release-20220101 |
88 |
+ >=app-crypt/gnupg-2.2.4-r2[ssl(-)] |
89 |
+ ) |
90 |
+ ) |
91 |
+ elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
92 |
+ elibc_musl? ( >=sys-apps/sandbox-2.2 ) |
93 |
+ kernel_linux? ( sys-apps/util-linux ) |
94 |
+ >=app-misc/pax-utils-0.1.17 |
95 |
+ selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] ) |
96 |
+ xattr? ( kernel_linux? ( |
97 |
+ >=sys-apps/install-xattr-0.3 |
98 |
+ ) ) |
99 |
+ !<app-admin/logrotate-3.8.0 |
100 |
+ !<app-portage/gentoolkit-0.4.6 |
101 |
+ !<app-portage/repoman-2.3.10 |
102 |
+ !~app-portage/repoman-3.0.0 |
103 |
+" |
104 |
+PDEPEND=" |
105 |
+ !build? ( |
106 |
+ >=net-misc/rsync-2.6.4 |
107 |
+ >=sys-apps/coreutils-6.4 |
108 |
+ >=sys-apps/file-5.44-r3 |
109 |
+ ) |
110 |
+" |
111 |
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
112 |
+# NOTE: FEATURES=installsources requires debugedit and rsync |
113 |
+ |
114 |
+pkg_pretend() { |
115 |
+ local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS" |
116 |
+ |
117 |
+ if use native-extensions && tc-is-cross-compiler; then |
118 |
+ einfo "Disabling USE=native-extensions for cross-compilation (bug #612158)" |
119 |
+ fi |
120 |
+ |
121 |
+ check_extra_config |
122 |
+} |
123 |
+ |
124 |
+python_prepare_all() { |
125 |
+ local PATCHES=( |
126 |
+ ) |
127 |
+ |
128 |
+ distutils-r1_python_prepare_all |
129 |
+ |
130 |
+ sed -e "s:^VERSION = \"HEAD\"$:VERSION = \"${PV}\":" -i lib/portage/__init__.py || die |
131 |
+ |
132 |
+ if use gentoo-dev; then |
133 |
+ einfo "Disabling --dynamic-deps by default for gentoo-dev..." |
134 |
+ sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \ |
135 |
+ -i lib/_emerge/create_depgraph_params.py || \ |
136 |
+ die "failed to patch create_depgraph_params.py" |
137 |
+ |
138 |
+ einfo "Enabling additional FEATURES for gentoo-dev..." |
139 |
+ echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \ |
140 |
+ >> cnf/make.globals || die |
141 |
+ fi |
142 |
+ |
143 |
+ if use native-extensions && ! tc-is-cross-compiler; then |
144 |
+ printf "[build_ext]\nportage_ext_modules=true\n" >> \ |
145 |
+ setup.cfg || die |
146 |
+ fi |
147 |
+ |
148 |
+ if ! use ipc ; then |
149 |
+ einfo "Disabling ipc..." |
150 |
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
151 |
+ -i lib/_emerge/AbstractEbuildProcess.py || \ |
152 |
+ die "failed to patch AbstractEbuildProcess.py" |
153 |
+ fi |
154 |
+ |
155 |
+ if use xattr && use kernel_linux ; then |
156 |
+ einfo "Adding FEATURES=xattr to make.globals ..." |
157 |
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
158 |
+ || die "failed to append to make.globals" |
159 |
+ fi |
160 |
+ |
161 |
+ if use build || ! use rsync-verify; then |
162 |
+ sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \ |
163 |
+ -e '/^sync-webrsync-verify-signature/s|yes|no|' \ |
164 |
+ -i cnf/repos.conf || die "sed failed" |
165 |
+ fi |
166 |
+ |
167 |
+ if [[ -n ${EPREFIX} ]] ; then |
168 |
+ einfo "Setting portage.const.EPREFIX ..." |
169 |
+ hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \ |
170 |
+ -w "/_BINARY/" lib/portage/const.py |
171 |
+ |
172 |
+ einfo "Prefixing shebangs ..." |
173 |
+ > "${T}/shebangs" || die |
174 |
+ while read -r -d $'\0' ; do |
175 |
+ local shebang=$(head -n1 "$REPLY") |
176 |
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
177 |
+ echo "${REPLY}" >> "${T}/shebangs" || die |
178 |
+ fi |
179 |
+ done < <(find . -type f -executable ! -name etc-update -print0) |
180 |
+ |
181 |
+ if [[ -s ${T}/shebangs ]]; then |
182 |
+ xargs sed -i -e "1s:^#!:#!${EPREFIX}:" < "${T}/shebangs" || die "sed failed" |
183 |
+ fi |
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 |
+ fi |
195 |
+ |
196 |
+ cd "${S}/cnf" || die |
197 |
+ if [[ -f "make.conf.example.${ARCH}".diff ]] ; then |
198 |
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \ |
199 |
+ die "Failed to patch make.conf.example" |
200 |
+ else |
201 |
+ eerror "" |
202 |
+ eerror "Portage does not have an arch-specific configuration for this arch." |
203 |
+ eerror "Please notify the arch maintainer about this issue. Using generic." |
204 |
+ eerror "" |
205 |
+ fi |
206 |
+} |
207 |
+ |
208 |
+python_compile_all() { |
209 |
+ local targets=() |
210 |
+ use doc && targets+=( docbook ) |
211 |
+ use apidoc && targets+=( apidoc ) |
212 |
+ |
213 |
+ if [[ ${targets[@]} ]]; then |
214 |
+ esetup.py "${targets[@]}" |
215 |
+ fi |
216 |
+} |
217 |
+ |
218 |
+python_test() { |
219 |
+ esetup.py test |
220 |
+} |
221 |
+ |
222 |
+python_install() { |
223 |
+ # Install sbin scripts to bindir for python-exec linking |
224 |
+ # they will be relocated in pkg_preinst() |
225 |
+ distutils-r1_python_install \ |
226 |
+ --system-prefix="${EPREFIX}/usr" \ |
227 |
+ --bindir="$(python_get_scriptdir)" \ |
228 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
229 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
230 |
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ |
231 |
+ --sbindir="$(python_get_scriptdir)" \ |
232 |
+ --sysconfdir="${EPREFIX}/etc" \ |
233 |
+ "${@}" |
234 |
+} |
235 |
+ |
236 |
+python_install_all() { |
237 |
+ distutils-r1_python_install_all |
238 |
+ |
239 |
+ local targets=() |
240 |
+ use doc && targets+=( |
241 |
+ install_docbook |
242 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
243 |
+ ) |
244 |
+ use apidoc && targets+=( |
245 |
+ install_apidoc |
246 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
247 |
+ ) |
248 |
+ |
249 |
+ # install docs |
250 |
+ if [[ ${targets[@]} ]]; then |
251 |
+ esetup.py "${targets[@]}" |
252 |
+ fi |
253 |
+ |
254 |
+ dotmpfiles "${FILESDIR}"/portage-{ccache,tmpdir}.conf |
255 |
+ |
256 |
+ # Due to distutils/python-exec limitations |
257 |
+ # these must be installed to /usr/bin. |
258 |
+ local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' |
259 |
+ einfo "Moving admin scripts to the correct directory" |
260 |
+ dodir /usr/sbin |
261 |
+ for target in ${sbin_relocations}; do |
262 |
+ einfo "Moving /usr/bin/${target} to /usr/sbin/${target}" |
263 |
+ mv "${ED}/usr/bin/${target}" "${ED}/usr/sbin/${target}" || die "sbin scripts move failed!" |
264 |
+ done |
265 |
+} |
266 |
+ |
267 |
+pkg_preinst() { |
268 |
+ if ! use build; then |
269 |
+ python_setup |
270 |
+ local sitedir=$(python_get_sitedir) |
271 |
+ [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" |
272 |
+ env -u DISTDIR \ |
273 |
+ -u PORTAGE_OVERRIDE_EPREFIX \ |
274 |
+ -u PORTAGE_REPOSITORIES \ |
275 |
+ -u PORTDIR \ |
276 |
+ -u PORTDIR_OVERLAY \ |
277 |
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
278 |
+ "${PYTHON}" -m portage._compat_upgrade.default_locations || die |
279 |
+ |
280 |
+ env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ |
281 |
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
282 |
+ "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die |
283 |
+ |
284 |
+ env -u FEATURES -u PORTAGE_REPOSITORIES \ |
285 |
+ PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ |
286 |
+ "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die |
287 |
+ fi |
288 |
+ |
289 |
+ # elog dir must exist to avoid logrotate error for bug #415911. |
290 |
+ # This code runs in preinst in order to bypass the mapping of |
291 |
+ # portage:portage to root:root which happens after src_install. |
292 |
+ keepdir /var/log/portage/elog |
293 |
+ # This is allowed to fail if the user/group are invalid for prefix users. |
294 |
+ if chown portage:portage "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then |
295 |
+ chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog} |
296 |
+ fi |
297 |
+ |
298 |
+ if has_version "<${CATEGORY}/${PN}-2.3.77"; then |
299 |
+ elog "The emerge --autounmask option is now disabled by default, except for" |
300 |
+ elog "portions of behavior which are controlled by the --autounmask-use and" |
301 |
+ elog "--autounmask-license options. For backward compatibility, previous" |
302 |
+ elog "behavior of --autounmask=y and --autounmask=n is entirely preserved." |
303 |
+ elog "Users can get the old behavior simply by adding --autounmask to the" |
304 |
+ elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this" |
305 |
+ elog "change, see https://bugs.gentoo.org/658648." |
306 |
+ fi |
307 |
+} |
308 |
+ |
309 |
+pkg_postinst() { |
310 |
+ # Warn about obsolete "enotice" script, bug #867010 |
311 |
+ local bashrc=${EROOT}/etc/portage/profile/profile.bashrc |
312 |
+ if [[ -e ${bashrc} ]] && grep -q enotice "${bashrc}"; then |
313 |
+ eerror "Obsolete 'enotice' script detected!" |
314 |
+ eerror "Please remove this from ${bashrc} to avoid problems." |
315 |
+ eerror "See bug 867010 for more details." |
316 |
+ fi |
317 |
+} |