1 |
commit: 227c1e8bcb5a6fc377be46dbac33ef9a3dcaa27d |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 30 02:53:01 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 30 02:55:00 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=227c1e8b |
7 |
|
8 |
sys-apps/portage: version bump to 2.3.66 |
9 |
|
10 |
#175612 download distfiles to temp file and rename atomically |
11 |
#651678 enable FEATURES=strict-keepdir behavior for new EAPIs |
12 |
|
13 |
Bug: https://bugs.gentoo.org/683434 |
14 |
Bug: https://bugs.gentoo.org/175612 |
15 |
Bug: https://bugs.gentoo.org/651678 |
16 |
Package-Manager: Portage-2.3.66, Repoman-2.3.12 |
17 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
18 |
|
19 |
sys-apps/portage/Manifest | 1 + |
20 |
sys-apps/portage/portage-2.3.66.ebuild | 259 +++++++++++++++++++++++++++++++++ |
21 |
2 files changed, 260 insertions(+) |
22 |
|
23 |
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest |
24 |
index ef1201ba305..da89a7dca00 100644 |
25 |
--- a/sys-apps/portage/Manifest |
26 |
+++ b/sys-apps/portage/Manifest |
27 |
@@ -2,3 +2,4 @@ DIST portage-2.3.62.tar.bz2 1021442 BLAKE2B 37d5dab0e678ced78e0ff4dc9907af3d2037 |
28 |
DIST portage-2.3.63.tar.bz2 1021603 BLAKE2B 8a9fe026e92880c2fe42ddd8441c3436d940c918fdd89a7d6e46c0bf4f3ec1a6f948d9821ba6de092d289230c6395dee5e37526d157d8e7cbd9d43ce2b27acf6 SHA512 27fbd09b586bb9743700e90d41ce94ed22aaf64b465755978c8d6489417ff3ab88d2ee400944c983f095f2aaff9490910006af9d2645d259ac0d3fc89bc00a19 |
29 |
DIST portage-2.3.64.tar.bz2 1021942 BLAKE2B 592146bf3fc39cf2a4de72d55c59fe6fb0f557bd2dd63d662925753d16435719255f682b2c1fbd294ba54f1935a44a5f4bc0ef8a8bc00980791dc1dc7046af5d SHA512 847d558dc33960f3989b6676a2569bc8c600864f5024b82db77fd45e31215700c25759168d7aa46bd14773c37bd363c349ee8b95250f1db3630d70e7fbff5da7 |
30 |
DIST portage-2.3.65.tar.bz2 1022351 BLAKE2B 819cfe2b975e23ae35f03c9499a12839a181eaaf92196717efff0475a327f828cdadda0d5f5994fdafd66f65b19a61a9100a29a510b4ca73ab967c64a184ce8d SHA512 b7765060be6b13e2bcc628c32305973821bdc193a2a5a9dedf9cae8a03d5c4809b022bb643852dfdf7323c6d427475423284231f04756e70697740708dc3f3a5 |
31 |
+DIST portage-2.3.66.tar.bz2 1023966 BLAKE2B dc378b714101b287fa33defeb778e586da83275cdc2d0bc7a98e9f2ea568568313d6a2767f693f3111fc41f0c6f07451315021186a1719bd52520da327c103d6 SHA512 f8642237e0127d9838c6e91430a19b8886295f8ce6b18cf915d6eb63204c7a8c65783f1554eec90b7ce7d0b613ef4206643eec8751b0594de1dcb4ede4491779 |
32 |
|
33 |
diff --git a/sys-apps/portage/portage-2.3.66.ebuild b/sys-apps/portage/portage-2.3.66.ebuild |
34 |
new file mode 100644 |
35 |
index 00000000000..b3a016883b3 |
36 |
--- /dev/null |
37 |
+++ b/sys-apps/portage/portage-2.3.66.ebuild |
38 |
@@ -0,0 +1,259 @@ |
39 |
+# Copyright 1999-2019 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=5 |
43 |
+ |
44 |
+PYTHON_COMPAT=( |
45 |
+ pypy |
46 |
+ python3_5 python3_6 python3_7 |
47 |
+ python2_7 |
48 |
+) |
49 |
+PYTHON_REQ_USE='bzip2(+),threads(+)' |
50 |
+ |
51 |
+inherit distutils-r1 epatch 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 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd" |
58 |
+SLOT="0" |
59 |
+IUSE="build doc epydoc 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 |
+ epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )" |
67 |
+# Require sandbox-2.2 for bug #288863. |
68 |
+# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's |
69 |
+# quite slow, so it's not considered in the dependencies as an alternative to |
70 |
+# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so |
71 |
+# for now, don't pull in xattr deps for other kernels. |
72 |
+# For whirlpool hash, require python[ssl] (bug #425046). |
73 |
+# For compgen, require bash[readline] (bug #445576). |
74 |
+# app-portage/gemato goes without PYTHON_USEDEP since we're calling |
75 |
+# the executable. |
76 |
+RDEPEND=" |
77 |
+ >=app-arch/tar-1.27 |
78 |
+ dev-lang/python-exec:2 |
79 |
+ !build? ( |
80 |
+ >=sys-apps/sed-4.0.5 |
81 |
+ app-shells/bash:0[readline] |
82 |
+ >=app-admin/eselect-1.2 |
83 |
+ $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \ |
84 |
+ python{2_7,3_5} pypy) |
85 |
+ rsync-verify? ( |
86 |
+ >=app-portage/gemato-14[${PYTHON_USEDEP}] |
87 |
+ >=app-crypt/openpgp-keys-gentoo-release-20180706 |
88 |
+ >=app-crypt/gnupg-2.2.4-r2[ssl(-)] |
89 |
+ ) |
90 |
+ ) |
91 |
+ elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
92 |
+ elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
93 |
+ elibc_musl? ( >=sys-apps/sandbox-2.2 ) |
94 |
+ elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) |
95 |
+ kernel_linux? ( sys-apps/util-linux ) |
96 |
+ >=app-misc/pax-utils-0.1.17 |
97 |
+ selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] ) |
98 |
+ xattr? ( kernel_linux? ( |
99 |
+ >=sys-apps/install-xattr-0.3 |
100 |
+ $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \ |
101 |
+ python2_7 pypy) |
102 |
+ ) ) |
103 |
+ !<app-admin/logrotate-3.8.0 |
104 |
+ !<app-portage/repoman-2.3.10" |
105 |
+PDEPEND=" |
106 |
+ !build? ( |
107 |
+ >=net-misc/rsync-2.6.4 |
108 |
+ userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
109 |
+ )" |
110 |
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
111 |
+# NOTE: FEATURES=installsources requires debugedit and rsync |
112 |
+ |
113 |
+REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )" |
114 |
+ |
115 |
+SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives" |
116 |
+ |
117 |
+prefix_src_archives() { |
118 |
+ local x y |
119 |
+ for x in ${@}; do |
120 |
+ for y in ${SRC_ARCHIVES}; do |
121 |
+ echo ${y}/${x} |
122 |
+ done |
123 |
+ done |
124 |
+} |
125 |
+ |
126 |
+TARBALL_PV=${PV} |
127 |
+SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
128 |
+ $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)" |
129 |
+ |
130 |
+pkg_pretend() { |
131 |
+ local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS" |
132 |
+ |
133 |
+ check_extra_config |
134 |
+} |
135 |
+ |
136 |
+pkg_setup() { |
137 |
+ use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 ) |
138 |
+} |
139 |
+ |
140 |
+python_prepare_all() { |
141 |
+ distutils-r1_python_prepare_all |
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} ipc-sandbox network-sandbox 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 |
+ -i cnf/repos.conf || die "sed failed" |
175 |
+ fi |
176 |
+ |
177 |
+ if [[ -n ${EPREFIX} ]] ; then |
178 |
+ einfo "Setting portage.const.EPREFIX ..." |
179 |
+ hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \ |
180 |
+ -w "/_BINARY/" lib/portage/const.py |
181 |
+ |
182 |
+ einfo "Prefixing shebangs ..." |
183 |
+ while read -r -d $'\0' ; do |
184 |
+ local shebang=$(head -n1 "$REPLY") |
185 |
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
186 |
+ sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
187 |
+ die "sed failed" |
188 |
+ fi |
189 |
+ done < <(find . -type f -print0) |
190 |
+ |
191 |
+ einfo "Adjusting make.globals, repos.conf and etc-update ..." |
192 |
+ hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
193 |
+ |
194 |
+ if use prefix-guest ; then |
195 |
+ sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
196 |
+ -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |
197 |
+ -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \ |
198 |
+ -i cnf/repos.conf || die "sed failed" |
199 |
+ fi |
200 |
+ |
201 |
+ einfo "Adding FEATURES=force-prefix to make.globals ..." |
202 |
+ echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \ |
203 |
+ || die "failed to append to make.globals" |
204 |
+ fi |
205 |
+ |
206 |
+ cd "${S}/cnf" || die |
207 |
+ if [ -f "make.conf.example.${ARCH}".diff ]; then |
208 |
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \ |
209 |
+ die "Failed to patch make.conf.example" |
210 |
+ else |
211 |
+ eerror "" |
212 |
+ eerror "Portage does not have an arch-specific configuration for this arch." |
213 |
+ eerror "Please notify the arch maintainer about this issue. Using generic." |
214 |
+ eerror "" |
215 |
+ fi |
216 |
+} |
217 |
+ |
218 |
+python_compile_all() { |
219 |
+ local targets=() |
220 |
+ use doc && targets+=( docbook ) |
221 |
+ use epydoc && targets+=( epydoc ) |
222 |
+ |
223 |
+ if [[ ${targets[@]} ]]; then |
224 |
+ esetup.py "${targets[@]}" |
225 |
+ fi |
226 |
+} |
227 |
+ |
228 |
+python_test() { |
229 |
+ esetup.py test |
230 |
+} |
231 |
+ |
232 |
+python_install() { |
233 |
+ # Install sbin scripts to bindir for python-exec linking |
234 |
+ # they will be relocated in pkg_preinst() |
235 |
+ distutils-r1_python_install \ |
236 |
+ --system-prefix="${EPREFIX}/usr" \ |
237 |
+ --bindir="$(python_get_scriptdir)" \ |
238 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
239 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
240 |
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ |
241 |
+ --sbindir="$(python_get_scriptdir)" \ |
242 |
+ --sysconfdir="${EPREFIX}/etc" \ |
243 |
+ "${@}" |
244 |
+} |
245 |
+ |
246 |
+python_install_all() { |
247 |
+ distutils-r1_python_install_all |
248 |
+ |
249 |
+ local targets=() |
250 |
+ use doc && targets+=( |
251 |
+ install_docbook |
252 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
253 |
+ ) |
254 |
+ use epydoc && targets+=( |
255 |
+ install_epydoc |
256 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
257 |
+ ) |
258 |
+ |
259 |
+ # install docs |
260 |
+ if [[ ${targets[@]} ]]; then |
261 |
+ esetup.py "${targets[@]}" |
262 |
+ fi |
263 |
+ |
264 |
+ systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf |
265 |
+ |
266 |
+ # Due to distutils/python-exec limitations |
267 |
+ # these must be installed to /usr/bin. |
268 |
+ local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' |
269 |
+ einfo "Moving admin scripts to the correct directory" |
270 |
+ dodir /usr/sbin |
271 |
+ for target in ${sbin_relocations}; do |
272 |
+ einfo "Moving /usr/bin/${target} to /usr/sbin/${target}" |
273 |
+ mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!" |
274 |
+ done |
275 |
+} |
276 |
+ |
277 |
+pkg_preinst() { |
278 |
+ python_setup |
279 |
+ python_export PYTHON_SITEDIR |
280 |
+ [[ -d ${D%/}${PYTHON_SITEDIR} ]] || die "${D%/}${PYTHON_SITEDIR}: No such directory" |
281 |
+ env -u DISTDIR \ |
282 |
+ -u PORTAGE_OVERRIDE_EPREFIX \ |
283 |
+ -u PORTAGE_REPOSITORIES \ |
284 |
+ -u PORTDIR \ |
285 |
+ -u PORTDIR_OVERLAY \ |
286 |
+ PYTHONPATH="${D%/}${PYTHON_SITEDIR}${PYTHONPATH:+:${PYTHONPATH}}" \ |
287 |
+ "${PYTHON}" -m portage._compat_upgrade.default_locations || die |
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 |
+} |