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: Fri, 30 Mar 2018 04:30:18
Message-Id: 1522384205.cbe07d8ee1d2b5d3334706f6e9352a4d2bfd9297.zmedico@gentoo
1 commit: cbe07d8ee1d2b5d3334706f6e9352a4d2bfd9297
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 30 04:04:26 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 30 04:30:05 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbe07d8e
7
8 sys-apps/portage: version bump to 2.3.27
9
10 #651952 - INSTALL_MASK: honor install time config for binary packages
11
12 Closes: https://bugs.gentoo.org/651952
13 Package-Manager: Portage-2.3.27_p1, Repoman-2.3.8
14
15 sys-apps/portage/Manifest | 1 +
16 sys-apps/portage/portage-2.3.27.ebuild | 284 +++++++++++++++++++++++++++++++++
17 2 files changed, 285 insertions(+)
18
19 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
20 index 234fc195fa3..6d263c9755b 100644
21 --- a/sys-apps/portage/Manifest
22 +++ b/sys-apps/portage/Manifest
23 @@ -3,4 +3,5 @@ DIST portage-2.3.16.tar.bz2 949134 BLAKE2B f8e7b6f13dfbf9aecdec444705042c6584c32
24 DIST portage-2.3.19.tar.bz2 954921 BLAKE2B e1bb3606ff2c5ba7b2123c61469b99f4d5d89f534a9af26065ac03bb2accd00cd363e4027e33546fc9b6d01b2fb65ca0d4311c6e2e8cc518c09030c979a69240 SHA512 94899bdfa4d22c846234bd28d4744613202cf67d3f32c242cb7fb60b17419419a2a29912e584ade7df52fba4c6a58774c5859148352221c978f34b4e7680981d
25 DIST portage-2.3.24.tar.bz2 959266 BLAKE2B bc15f10599c694ad29f5a55264e929d0a04a9c5211e9cafd4f1a35de1d77e655d99df0ceb352fd431a8cefd40c733064422d8f41099edf7263aa36ef8cfd2ba8 SHA512 fca250d4afc1819a27b67daff770132ed4e88fb067038992a6b3f8aac63604536366ea628dd30c24f93db19ae55e88da372598ccc489bcf445038dfe860ce0ec
26 DIST portage-2.3.26.tar.bz2 970245 BLAKE2B b854bef894327b9e4beabca55d70368d326548d96efdc5b63e47f77971da195d041c8e8412bbb308ef6922be02964727c99f9dcc92a2a4b0a7372e0a1c774ffe SHA512 5acb8a00fdbc72a8c3e79f8b1c2ba17c9b469205edf1e56592db9ccfeb54b4dc83a98548ff0e01c408456a1c962262377967f6d70510c8d1b0e7ab15eab51079
27 +DIST portage-2.3.27.tar.bz2 970480 BLAKE2B dc46362773544102d9a07e686759d454a37177e9ac6e88d664c1aeb1676b9fb4e12662500f1de63644ad5eaf69d58bf85f38339c18d695cdc42930746dedb731 SHA512 791c87ffe958e883fe16562e69e606dd7ff860c13b2262b3eaa665f78acacdcb547c5e124b69d2c0faa36147fdc7c1d60669dee43b7401ea4f89784a619f81fe
28 DIST portage-2.3.8.tar.bz2 938062 BLAKE2B 3f7bedf6268131a3b3539d53c8a7bb069b533b3a78e5eec521b6201439c8ee5e66996e798fe295561d0a94bfcd32adf414d4f8b5e7a93035cea09749406e64a3 SHA512 4b4b2de20323799b9b0f7a8812f939aa9a96d2744a0f65ad5287ba49744c491b55169cdb21f2885317a6a7c960d2070775ffd798f247b44eebc677c33c271eb8
29
30 diff --git a/sys-apps/portage/portage-2.3.27.ebuild b/sys-apps/portage/portage-2.3.27.ebuild
31 new file mode 100644
32 index 00000000000..c2e3ea64cbb
33 --- /dev/null
34 +++ b/sys-apps/portage/portage-2.3.27.ebuild
35 @@ -0,0 +1,284 @@
36 +# Copyright 1999-2018 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=5
40 +
41 +PYTHON_COMPAT=(
42 + pypy
43 + python3_4 python3_5 python3_6
44 + python2_7
45 +)
46 +PYTHON_REQ_USE='bzip2(+),threads(+)'
47 +
48 +inherit distutils-r1 systemd
49 +
50 +DESCRIPTION="Portage is the package management and distribution system for Gentoo"
51 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
52 +
53 +LICENSE="GPL-2"
54 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
55 +SLOT="0"
56 +IUSE="build doc epydoc gentoo-dev +ipc +native-extensions rsync-verify selinux xattr"
57 +
58 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
59 + >=app-arch/tar-1.27
60 + dev-lang/python-exec:2
61 + >=sys-apps/sed-4.0.5 sys-devel/patch
62 + doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
63 + epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
64 +# Require sandbox-2.2 for bug #288863.
65 +# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
66 +# quite slow, so it's not considered in the dependencies as an alternative to
67 +# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
68 +# for now, don't pull in xattr deps for other kernels.
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 + >=app-arch/tar-1.27
75 + dev-lang/python-exec:2
76 + !build? (
77 + >=sys-apps/sed-4.0.5
78 + app-shells/bash:0[readline]
79 + >=app-admin/eselect-1.2
80 + $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \
81 + python{2_7,3_4,3_5} pypy)
82 + rsync-verify? (
83 + >=app-portage/gemato-10
84 + app-crypt/gentoo-keys
85 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
86 + )
87 + )
88 + elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
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 + >=app-misc/pax-utils-0.1.17
93 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
94 + xattr? ( kernel_linux? (
95 + >=sys-apps/install-xattr-0.3
96 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
97 + python2_7 pypy)
98 + ) )
99 + !<app-admin/logrotate-3.8.0"
100 +PDEPEND="
101 + !build? (
102 + >=net-misc/rsync-2.6.4
103 + userland_GNU? ( >=sys-apps/coreutils-6.4 )
104 + )"
105 +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
106 +# NOTE: FEATURES=installsources requires debugedit and rsync
107 +
108 +REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
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_setup() {
126 + use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
127 +}
128 +
129 +python_prepare_all() {
130 + distutils-r1_python_prepare_all
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 pym/_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; 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 pym/_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 + -i cnf/repos.conf || die "sed failed"
164 + fi
165 +
166 + if [[ -n ${EPREFIX} ]] ; then
167 + einfo "Setting portage.const.EPREFIX ..."
168 + sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
169 + -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
170 + -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
171 + -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
172 + -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
173 + -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
174 + -i pym/portage/const.py || \
175 + die "Failed to patch portage.const.EPREFIX"
176 +
177 + einfo "Prefixing shebangs ..."
178 + while read -r -d $'\0' ; do
179 + local shebang=$(head -n1 "$REPLY")
180 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
181 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
182 + die "sed failed"
183 + fi
184 + done < <(find . -type f -print0)
185 +
186 + einfo "Adjusting make.globals ..."
187 + sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
188 + -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
189 + -i cnf/make.globals || die "sed failed"
190 +
191 + einfo "Adjusting repos.conf ..."
192 + sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
193 + -e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \
194 + -i cnf/repos.conf || die "sed failed"
195 + if use prefix-guest ; then
196 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
197 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
198 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
199 + -i cnf/repos.conf || die "sed failed"
200 + fi
201 +
202 + einfo "Adding FEATURES=force-prefix to make.globals ..."
203 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
204 + || die "failed to append to make.globals"
205 + fi
206 +
207 + cd "${S}/cnf" || die
208 + if [ -f "make.conf.example.${ARCH}".diff ]; then
209 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
210 + die "Failed to patch make.conf.example"
211 + else
212 + eerror ""
213 + eerror "Portage does not have an arch-specific configuration for this arch."
214 + eerror "Please notify the arch maintainer about this issue. Using generic."
215 + eerror ""
216 + fi
217 +}
218 +
219 +python_compile_all() {
220 + local targets=()
221 + use doc && targets+=( docbook )
222 + use epydoc && targets+=( epydoc )
223 +
224 + if [[ ${targets[@]} ]]; then
225 + esetup.py "${targets[@]}"
226 + fi
227 +}
228 +
229 +python_test() {
230 + esetup.py test
231 +}
232 +
233 +python_install() {
234 + # Install sbin scripts to bindir for python-exec linking
235 + # they will be relocated in pkg_preinst()
236 + distutils-r1_python_install \
237 + --system-prefix="${EPREFIX}/usr" \
238 + --bindir="$(python_get_scriptdir)" \
239 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
240 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
241 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
242 + --sbindir="$(python_get_scriptdir)" \
243 + --sysconfdir="${EPREFIX}/etc" \
244 + "${@}"
245 +}
246 +
247 +python_install_all() {
248 + distutils-r1_python_install_all
249 +
250 + local targets=()
251 + use doc && targets+=(
252 + install_docbook
253 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
254 + )
255 + use epydoc && targets+=(
256 + install_epydoc
257 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
258 + )
259 +
260 + # install docs
261 + if [[ ${targets[@]} ]]; then
262 + esetup.py "${targets[@]}"
263 + fi
264 +
265 + systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
266 +
267 + # Due to distutils/python-exec limitations
268 + # these must be installed to /usr/bin.
269 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
270 + einfo "Moving admin scripts to the correct directory"
271 + dodir /usr/sbin
272 + for target in ${sbin_relocations}; do
273 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
274 + mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
275 + done
276 +}
277 +
278 +pkg_preinst() {
279 + # comment out sanity test until it is fixed to work
280 + # with the new PORTAGE_PYM_PATH
281 + #if [[ $ROOT == / ]] ; then
282 + ## Run some minimal tests as a sanity check.
283 + #local test_runner=$(find "${ED}" -name runTests)
284 + #if [[ -n $test_runner && -x $test_runner ]] ; then
285 + #einfo "Running preinst sanity tests..."
286 + #"$test_runner" || die "preinst sanity tests failed"
287 + #fi
288 + #fi
289 +
290 + # elog dir must exist to avoid logrotate error for bug #415911.
291 + # This code runs in preinst in order to bypass the mapping of
292 + # portage:portage to root:root which happens after src_install.
293 + keepdir /var/log/portage/elog
294 + # This is allowed to fail if the user/group are invalid for prefix users.
295 + if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
296 + chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
297 + fi
298 +
299 + if has_version ">=${CATEGORY}/${PN}-2.3.1" && \
300 + has_version "<${CATEGORY}/${PN}-2.3.3"; then
301 + SYNC_DEPTH_UPGRADE=true
302 + else
303 + SYNC_DEPTH_UPGRADE=false
304 + fi
305 +}
306 +
307 +pkg_postinst() {
308 + if ${SYNC_DEPTH_UPGRADE}; then
309 + ewarn "Please note that this release no longer respects sync-depth for"
310 + ewarn "git repositories. There have been too many problems and"
311 + ewarn "performance issues. See bugs 552814, 559008"
312 + fi
313 + einfo ""
314 + einfo "This release of portage NO LONGER contains the repoman code base."
315 + einfo "Repoman has its own ebuild and release package."
316 + einfo "For repoman functionality please emerge app-portage/repoman"
317 + einfo "Please report any bugs you may encounter."
318 + einfo ""
319 +}