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: Wed, 11 Jul 2018 09:06:23
Message-Id: 1531299972.5349def16029399e04421e41d35848c6ff528ea8.zmedico@gentoo
1 commit: 5349def16029399e04421e41d35848c6ff528ea8
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 11 08:58:04 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 11 09:06:12 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5349def1
7
8 sys-apps/portage: version bump to 2.3.42
9
10 Package-Manager: Portage-2.3.42, Repoman-2.3.9
11
12 sys-apps/portage/Manifest | 1 +
13 sys-apps/portage/portage-2.3.42.ebuild | 284 +++++++++++++++++++++++++++++++++
14 2 files changed, 285 insertions(+)
15
16 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
17 index d33899070dc..e2fb58e9826 100644
18 --- a/sys-apps/portage/Manifest
19 +++ b/sys-apps/portage/Manifest
20 @@ -5,4 +5,5 @@ DIST portage-2.3.40-bug-656942-bug-657436-937d0156aa06.patch 15214 BLAKE2B 0351f
21 DIST portage-2.3.40-bug-657436-937d0156aa06-1fc628eead43.patch 4131 BLAKE2B 1b051097ef4fb073d22b9ef3472077b4845190ec3839886f462cacbee0996dc4c036549c4beab09025e1bb42f421e5032144e90197e3aa5de08dd7d8d1c50fbb SHA512 5910469816b69afb7a0078dd3b35a5304e2c806ac03ff3949603cf4162900fd9dd1df15661b91a2181528e8406679e525308822a0f6ddf4799c79fa9652c27a9
22 DIST portage-2.3.40.tar.bz2 995122 BLAKE2B 3bfadee6cf57dace32bb4a365850650e13664202f3b16bf75821ff6226e85da823785ac87875fa82bd5cf1b953d638773819495f73f471c06ffd6926518df1ac SHA512 ded128c1941664fab6bc95f05115ec08900fddaedd1b6f12afa48da024531ee8939134d49759e09995c76a95e41beafdbf5528a5b62d3bf21c826ab1ac0cd1c5
23 DIST portage-2.3.41.tar.bz2 996250 BLAKE2B f76c9198b5a4f00a5d67c85613b182dcb30c8ff568cd74b798c230945294532ecac65a682e97b64da28dd297b6d985445b7f3999b84d5152e4241f22e8813330 SHA512 113113a982e346c31e65c326326913458229c05d443f531c1d1897a679dda143d80223cab8bfbe831f4d92b6db9d09fc451ae3c7753e4d73b33736cc4f34c5e9
24 +DIST portage-2.3.42.tar.bz2 998518 BLAKE2B 8943dcaf80b9bd566dcc9297e655a225cfafb0d316b17a82aeb25ea05f9cfeeda1ff6a78eb500f85057e98f936ae923200112f3dca920325182e793b4bde74be SHA512 406776e7e026ed5f91c8f16b823a0f18d59deb864ac9e5f86447eba9785b33a91ffc737d9aec19ea764b3f1c32b15dad9c5bb7d35cbf0225c6ed9daa8a471d5f
25 DIST portage-2.3.8.tar.bz2 938062 BLAKE2B 3f7bedf6268131a3b3539d53c8a7bb069b533b3a78e5eec521b6201439c8ee5e66996e798fe295561d0a94bfcd32adf414d4f8b5e7a93035cea09749406e64a3 SHA512 4b4b2de20323799b9b0f7a8812f939aa9a96d2744a0f65ad5287ba49744c491b55169cdb21f2885317a6a7c960d2070775ffd798f247b44eebc677c33c271eb8
26
27 diff --git a/sys-apps/portage/portage-2.3.42.ebuild b/sys-apps/portage/portage-2.3.42.ebuild
28 new file mode 100644
29 index 00000000000..08db0a649a2
30 --- /dev/null
31 +++ b/sys-apps/portage/portage-2.3.42.ebuild
32 @@ -0,0 +1,284 @@
33 +# Copyright 1999-2018 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=5
37 +
38 +PYTHON_COMPAT=(
39 + pypy
40 + python3_4 python3_5 python3_6
41 + python2_7
42 +)
43 +PYTHON_REQ_USE='bzip2(+),threads(+)'
44 +
45 +inherit distutils-r1 systemd
46 +
47 +DESCRIPTION="Portage is the package management and distribution system for Gentoo"
48 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
49 +
50 +LICENSE="GPL-2"
51 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd"
52 +SLOT="0"
53 +IUSE="build doc epydoc gentoo-dev +ipc +native-extensions +rsync-verify selinux xattr"
54 +
55 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
56 + >=app-arch/tar-1.27
57 + dev-lang/python-exec:2
58 + >=sys-apps/sed-4.0.5 sys-devel/patch
59 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
60 + epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
61 +# Require sandbox-2.2 for bug #288863.
62 +# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
63 +# quite slow, so it's not considered in the dependencies as an alternative to
64 +# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
65 +# for now, don't pull in xattr deps for other kernels.
66 +# For whirlpool hash, require python[ssl] (bug #425046).
67 +# For compgen, require bash[readline] (bug #445576).
68 +# app-portage/gemato goes without PYTHON_USEDEP since we're calling
69 +# the executable.
70 +RDEPEND="
71 + >=app-arch/tar-1.27
72 + dev-lang/python-exec:2
73 + !build? (
74 + >=sys-apps/sed-4.0.5
75 + app-shells/bash:0[readline]
76 + >=app-admin/eselect-1.2
77 + $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \
78 + python{2_7,3_4,3_5} pypy)
79 + rsync-verify? (
80 + >=app-portage/gemato-12.1[${PYTHON_USEDEP}]
81 + app-crypt/openpgp-keys-gentoo-release
82 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
83 + )
84 + )
85 + elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
86 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
87 + elibc_musl? ( >=sys-apps/sandbox-2.2 )
88 + elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
89 + >=app-misc/pax-utils-0.1.17
90 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
91 + xattr? ( kernel_linux? (
92 + >=sys-apps/install-xattr-0.3
93 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
94 + python2_7 pypy)
95 + ) )
96 + !<app-admin/logrotate-3.8.0"
97 +PDEPEND="
98 + !build? (
99 + >=net-misc/rsync-2.6.4
100 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
101 + )"
102 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
103 +# NOTE: FEATURES=installsources requires debugedit and rsync
104 +
105 +REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
106 +
107 +SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives"
108 +
109 +prefix_src_archives() {
110 + local x y
111 + for x in ${@}; do
112 + for y in ${SRC_ARCHIVES}; do
113 + echo ${y}/${x}
114 + done
115 + done
116 +}
117 +
118 +TARBALL_PV=${PV}
119 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
120 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
121 +
122 +pkg_setup() {
123 + use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
124 +}
125 +
126 +python_prepare_all() {
127 + distutils-r1_python_prepare_all
128 +
129 + if use gentoo-dev; then
130 + einfo "Disabling --dynamic-deps by default for gentoo-dev..."
131 + sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \
132 + -i pym/_emerge/create_depgraph_params.py || \
133 + die "failed to patch create_depgraph_params.py"
134 +
135 + einfo "Enabling additional FEATURES for gentoo-dev..."
136 + echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \
137 + >> cnf/make.globals || die
138 + fi
139 +
140 + if use native-extensions; then
141 + printf "[build_ext]\nportage-ext-modules=true\n" >> \
142 + setup.cfg || die
143 + fi
144 +
145 + if ! use ipc ; then
146 + einfo "Disabling ipc..."
147 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
148 + -i pym/_emerge/AbstractEbuildProcess.py || \
149 + die "failed to patch AbstractEbuildProcess.py"
150 + fi
151 +
152 + if use xattr && use kernel_linux ; then
153 + einfo "Adding FEATURES=xattr to make.globals ..."
154 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
155 + || die "failed to append to make.globals"
156 + fi
157 +
158 + if use build || ! use rsync-verify; then
159 + sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \
160 + -i cnf/repos.conf || die "sed failed"
161 + fi
162 +
163 + if [[ -n ${EPREFIX} ]] ; then
164 + einfo "Setting portage.const.EPREFIX ..."
165 + sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
166 + -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
167 + -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
168 + -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
169 + -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
170 + -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
171 + -i pym/portage/const.py || \
172 + die "Failed to patch portage.const.EPREFIX"
173 +
174 + einfo "Prefixing shebangs ..."
175 + while read -r -d $'\0' ; do
176 + local shebang=$(head -n1 "$REPLY")
177 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
178 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
179 + die "sed failed"
180 + fi
181 + done < <(find . -type f -print0)
182 +
183 + einfo "Adjusting make.globals ..."
184 + sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
185 + -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
186 + -i cnf/make.globals || die "sed failed"
187 +
188 + einfo "Adjusting repos.conf ..."
189 + sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
190 + -e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \
191 + -i cnf/repos.conf || die "sed failed"
192 + if use prefix-guest ; then
193 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
194 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
195 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
196 + -i cnf/repos.conf || die "sed failed"
197 + fi
198 +
199 + einfo "Adding FEATURES=force-prefix to make.globals ..."
200 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
201 + || die "failed to append to make.globals"
202 + fi
203 +
204 + cd "${S}/cnf" || die
205 + if [ -f "make.conf.example.${ARCH}".diff ]; then
206 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
207 + die "Failed to patch make.conf.example"
208 + else
209 + eerror ""
210 + eerror "Portage does not have an arch-specific configuration for this arch."
211 + eerror "Please notify the arch maintainer about this issue. Using generic."
212 + eerror ""
213 + fi
214 +}
215 +
216 +python_compile_all() {
217 + local targets=()
218 + use doc && targets+=( docbook )
219 + use epydoc && targets+=( epydoc )
220 +
221 + if [[ ${targets[@]} ]]; then
222 + esetup.py "${targets[@]}"
223 + fi
224 +}
225 +
226 +python_test() {
227 + esetup.py test
228 +}
229 +
230 +python_install() {
231 + # Install sbin scripts to bindir for python-exec linking
232 + # they will be relocated in pkg_preinst()
233 + distutils-r1_python_install \
234 + --system-prefix="${EPREFIX}/usr" \
235 + --bindir="$(python_get_scriptdir)" \
236 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
237 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
238 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
239 + --sbindir="$(python_get_scriptdir)" \
240 + --sysconfdir="${EPREFIX}/etc" \
241 + "${@}"
242 +}
243 +
244 +python_install_all() {
245 + distutils-r1_python_install_all
246 +
247 + local targets=()
248 + use doc && targets+=(
249 + install_docbook
250 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
251 + )
252 + use epydoc && targets+=(
253 + install_epydoc
254 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
255 + )
256 +
257 + # install docs
258 + if [[ ${targets[@]} ]]; then
259 + esetup.py "${targets[@]}"
260 + fi
261 +
262 + systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
263 +
264 + # Due to distutils/python-exec limitations
265 + # these must be installed to /usr/bin.
266 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
267 + einfo "Moving admin scripts to the correct directory"
268 + dodir /usr/sbin
269 + for target in ${sbin_relocations}; do
270 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
271 + mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
272 + done
273 +}
274 +
275 +pkg_preinst() {
276 + # comment out sanity test until it is fixed to work
277 + # with the new PORTAGE_PYM_PATH
278 + #if [[ $ROOT == / ]] ; then
279 + ## Run some minimal tests as a sanity check.
280 + #local test_runner=$(find "${ED}" -name runTests)
281 + #if [[ -n $test_runner && -x $test_runner ]] ; then
282 + #einfo "Running preinst sanity tests..."
283 + #"$test_runner" || die "preinst sanity tests failed"
284 + #fi
285 + #fi
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.1" && \
297 + has_version "<${CATEGORY}/${PN}-2.3.3"; then
298 + SYNC_DEPTH_UPGRADE=true
299 + else
300 + SYNC_DEPTH_UPGRADE=false
301 + fi
302 +}
303 +
304 +pkg_postinst() {
305 + if ${SYNC_DEPTH_UPGRADE}; then
306 + ewarn "Please note that this release no longer respects sync-depth for"
307 + ewarn "git repositories. There have been too many problems and"
308 + ewarn "performance issues. See bugs 552814, 559008"
309 + fi
310 + einfo ""
311 + einfo "This release of portage NO LONGER contains the repoman code base."
312 + einfo "Repoman has its own ebuild and release package."
313 + einfo "For repoman functionality please emerge app-portage/repoman"
314 + einfo "Please report any bugs you may encounter."
315 + einfo ""
316 +}