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: Mon, 16 Jul 2018 07:14:01
Message-Id: 1531725223.92035653615782bdb3e7b5cf555521ff6d22cdb4.zmedico@gentoo
1 commit: 92035653615782bdb3e7b5cf555521ff6d22cdb4
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 16 06:46:34 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 16 07:13:43 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92035653
7
8 sys-apps/portage: version bump to 2.3.43
9
10 #640058 - failure to unmerge gentoo-sources include-prefixes directory
11 #649806 - eliminate redundant stat calls on profile.bashrc files
12 #650814 - eliminate unnecessary access syscalls on ebuilds
13 #660982 - repoman incorrectly reports IUSE.missing
14 #661276 - fix make.conf PORTDIR override when path does not exist
15
16 Package-Manager: Portage-2.3.43, Repoman-2.3.10
17
18 sys-apps/portage/Manifest | 1 +
19 sys-apps/portage/portage-2.3.43.ebuild | 285 +++++++++++++++++++++++++++++++++
20 2 files changed, 286 insertions(+)
21
22 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
23 index e2fb58e9826..b3b8cf9dd41 100644
24 --- a/sys-apps/portage/Manifest
25 +++ b/sys-apps/portage/Manifest
26 @@ -6,4 +6,5 @@ DIST portage-2.3.40-bug-657436-937d0156aa06-1fc628eead43.patch 4131 BLAKE2B 1b05
27 DIST portage-2.3.40.tar.bz2 995122 BLAKE2B 3bfadee6cf57dace32bb4a365850650e13664202f3b16bf75821ff6226e85da823785ac87875fa82bd5cf1b953d638773819495f73f471c06ffd6926518df1ac SHA512 ded128c1941664fab6bc95f05115ec08900fddaedd1b6f12afa48da024531ee8939134d49759e09995c76a95e41beafdbf5528a5b62d3bf21c826ab1ac0cd1c5
28 DIST portage-2.3.41.tar.bz2 996250 BLAKE2B f76c9198b5a4f00a5d67c85613b182dcb30c8ff568cd74b798c230945294532ecac65a682e97b64da28dd297b6d985445b7f3999b84d5152e4241f22e8813330 SHA512 113113a982e346c31e65c326326913458229c05d443f531c1d1897a679dda143d80223cab8bfbe831f4d92b6db9d09fc451ae3c7753e4d73b33736cc4f34c5e9
29 DIST portage-2.3.42.tar.bz2 998518 BLAKE2B 8943dcaf80b9bd566dcc9297e655a225cfafb0d316b17a82aeb25ea05f9cfeeda1ff6a78eb500f85057e98f936ae923200112f3dca920325182e793b4bde74be SHA512 406776e7e026ed5f91c8f16b823a0f18d59deb864ac9e5f86447eba9785b33a91ffc737d9aec19ea764b3f1c32b15dad9c5bb7d35cbf0225c6ed9daa8a471d5f
30 +DIST portage-2.3.43.tar.bz2 998958 BLAKE2B 28874db4dc989e550aa4a54a91b8ad303f17b2444d6e23a539672c4742ec62c4228f6070f0d36a31b90d1d32998bc4825de706e5a6635bb7051e5b592f8e3eac SHA512 b8f3ab4f700cc72364b38153451a32a371d0b222feacfb206017be7182596cbc83b7e036025d07399e8b32cf3e3889dbc6ba8d26a64fbfc4253f1506da3c8252
31 DIST portage-2.3.8.tar.bz2 938062 BLAKE2B 3f7bedf6268131a3b3539d53c8a7bb069b533b3a78e5eec521b6201439c8ee5e66996e798fe295561d0a94bfcd32adf414d4f8b5e7a93035cea09749406e64a3 SHA512 4b4b2de20323799b9b0f7a8812f939aa9a96d2744a0f65ad5287ba49744c491b55169cdb21f2885317a6a7c960d2070775ffd798f247b44eebc677c33c271eb8
32
33 diff --git a/sys-apps/portage/portage-2.3.43.ebuild b/sys-apps/portage/portage-2.3.43.ebuild
34 new file mode 100644
35 index 00000000000..b0e8987ea11
36 --- /dev/null
37 +++ b/sys-apps/portage/portage-2.3.43.ebuild
38 @@ -0,0 +1,285 @@
39 +# Copyright 1999-2018 Gentoo Foundation
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=5
43 +
44 +PYTHON_COMPAT=(
45 + pypy
46 + python3_4 python3_5 python3_6
47 + python2_7
48 +)
49 +PYTHON_REQ_USE='bzip2(+),threads(+)'
50 +
51 +inherit distutils-r1 systemd
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_4,3_5} pypy)
85 + rsync-verify? (
86 + >=app-portage/gemato-12.1[${PYTHON_USEDEP}]
87 + app-crypt/openpgp-keys-gentoo-release
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 + >=app-misc/pax-utils-0.1.17
96 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
97 + xattr? ( kernel_linux? (
98 + >=sys-apps/install-xattr-0.3
99 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
100 + python2_7 pypy)
101 + ) )
102 + !<app-admin/logrotate-3.8.0
103 + !<app-portage/repoman-2.3.10"
104 +PDEPEND="
105 + !build? (
106 + >=net-misc/rsync-2.6.4
107 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
108 + )"
109 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
110 +# NOTE: FEATURES=installsources requires debugedit and rsync
111 +
112 +REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
113 +
114 +SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives"
115 +
116 +prefix_src_archives() {
117 + local x y
118 + for x in ${@}; do
119 + for y in ${SRC_ARCHIVES}; do
120 + echo ${y}/${x}
121 + done
122 + done
123 +}
124 +
125 +TARBALL_PV=${PV}
126 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
127 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
128 +
129 +pkg_setup() {
130 + use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
131 +}
132 +
133 +python_prepare_all() {
134 + distutils-r1_python_prepare_all
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 pym/_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} ipc-sandbox network-sandbox 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 pym/_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 + -i cnf/repos.conf || die "sed failed"
168 + fi
169 +
170 + if [[ -n ${EPREFIX} ]] ; then
171 + einfo "Setting portage.const.EPREFIX ..."
172 + sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
173 + -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
174 + -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
175 + -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
176 + -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
177 + -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
178 + -i pym/portage/const.py || \
179 + die "Failed to patch portage.const.EPREFIX"
180 +
181 + einfo "Prefixing shebangs ..."
182 + while read -r -d $'\0' ; do
183 + local shebang=$(head -n1 "$REPLY")
184 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
185 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
186 + die "sed failed"
187 + fi
188 + done < <(find . -type f -print0)
189 +
190 + einfo "Adjusting make.globals ..."
191 + sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
192 + -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
193 + -i cnf/make.globals || die "sed failed"
194 +
195 + einfo "Adjusting repos.conf ..."
196 + sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
197 + -e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \
198 + -i cnf/repos.conf || die "sed failed"
199 + if use prefix-guest ; then
200 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
201 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
202 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
203 + -i cnf/repos.conf || die "sed failed"
204 + fi
205 +
206 + einfo "Adding FEATURES=force-prefix to make.globals ..."
207 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
208 + || die "failed to append to make.globals"
209 + fi
210 +
211 + cd "${S}/cnf" || die
212 + if [ -f "make.conf.example.${ARCH}".diff ]; then
213 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
214 + die "Failed to patch make.conf.example"
215 + else
216 + eerror ""
217 + eerror "Portage does not have an arch-specific configuration for this arch."
218 + eerror "Please notify the arch maintainer about this issue. Using generic."
219 + eerror ""
220 + fi
221 +}
222 +
223 +python_compile_all() {
224 + local targets=()
225 + use doc && targets+=( docbook )
226 + use epydoc && targets+=( epydoc )
227 +
228 + if [[ ${targets[@]} ]]; then
229 + esetup.py "${targets[@]}"
230 + fi
231 +}
232 +
233 +python_test() {
234 + esetup.py test
235 +}
236 +
237 +python_install() {
238 + # Install sbin scripts to bindir for python-exec linking
239 + # they will be relocated in pkg_preinst()
240 + distutils-r1_python_install \
241 + --system-prefix="${EPREFIX}/usr" \
242 + --bindir="$(python_get_scriptdir)" \
243 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
244 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
245 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
246 + --sbindir="$(python_get_scriptdir)" \
247 + --sysconfdir="${EPREFIX}/etc" \
248 + "${@}"
249 +}
250 +
251 +python_install_all() {
252 + distutils-r1_python_install_all
253 +
254 + local targets=()
255 + use doc && targets+=(
256 + install_docbook
257 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
258 + )
259 + use epydoc && targets+=(
260 + install_epydoc
261 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
262 + )
263 +
264 + # install docs
265 + if [[ ${targets[@]} ]]; then
266 + esetup.py "${targets[@]}"
267 + fi
268 +
269 + systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
270 +
271 + # Due to distutils/python-exec limitations
272 + # these must be installed to /usr/bin.
273 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
274 + einfo "Moving admin scripts to the correct directory"
275 + dodir /usr/sbin
276 + for target in ${sbin_relocations}; do
277 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
278 + mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
279 + done
280 +}
281 +
282 +pkg_preinst() {
283 + # comment out sanity test until it is fixed to work
284 + # with the new PORTAGE_PYM_PATH
285 + #if [[ $ROOT == / ]] ; then
286 + ## Run some minimal tests as a sanity check.
287 + #local test_runner=$(find "${ED}" -name runTests)
288 + #if [[ -n $test_runner && -x $test_runner ]] ; then
289 + #einfo "Running preinst sanity tests..."
290 + #"$test_runner" || die "preinst sanity tests failed"
291 + #fi
292 + #fi
293 +
294 + # elog dir must exist to avoid logrotate error for bug #415911.
295 + # This code runs in preinst in order to bypass the mapping of
296 + # portage:portage to root:root which happens after src_install.
297 + keepdir /var/log/portage/elog
298 + # This is allowed to fail if the user/group are invalid for prefix users.
299 + if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
300 + chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
301 + fi
302 +
303 + if has_version ">=${CATEGORY}/${PN}-2.3.1" && \
304 + has_version "<${CATEGORY}/${PN}-2.3.3"; then
305 + SYNC_DEPTH_UPGRADE=true
306 + else
307 + SYNC_DEPTH_UPGRADE=false
308 + fi
309 +}
310 +
311 +pkg_postinst() {
312 + if ${SYNC_DEPTH_UPGRADE}; then
313 + ewarn "Please note that this release no longer respects sync-depth for"
314 + ewarn "git repositories. There have been too many problems and"
315 + ewarn "performance issues. See bugs 552814, 559008"
316 + fi
317 + einfo ""
318 + einfo "This release of portage NO LONGER contains the repoman code base."
319 + einfo "Repoman has its own ebuild and release package."
320 + einfo "For repoman functionality please emerge app-portage/repoman"
321 + einfo "Please report any bugs you may encounter."
322 + einfo ""
323 +}