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, 20 Feb 2019 00:57:42
Message-Id: 1550624133.4b4da5d7e1cb1298cec0d8a01d94044f630b5a3a.zmedico@gentoo
1 commit: 4b4da5d7e1cb1298cec0d8a01d94044f630b5a3a
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 20 00:55:24 2019 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 20 00:55:33 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b4da5d7
7
8 sys-apps/portage: version bump to 2.3.62
9
10 #678278 unprivileged sync emergelog lock permission denied
11
12 Bug: https://bugs.gentoo.org/671498
13 Bug: https://bugs.gentoo.org/678278
14 Package-Manager: Portage-2.3.62, Repoman-2.3.12
15 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
16
17 sys-apps/portage/Manifest | 1 +
18 sys-apps/portage/portage-2.3.62.ebuild | 271 +++++++++++++++++++++++++++++++++
19 2 files changed, 272 insertions(+)
20
21 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
22 index b6c067230ee..d4f1365a7df 100644
23 --- a/sys-apps/portage/Manifest
24 +++ b/sys-apps/portage/Manifest
25 @@ -6,5 +6,6 @@ DIST portage-2.3.51.tar.bz2 1013015 BLAKE2B f7f5e6c9e627db5a9e4bfcc9a6cbebb40fda
26 DIST portage-2.3.59.tar.bz2 1019295 BLAKE2B 705e51343be5a522cfb9d4cc7935042cd1e5b697b2d78aa283bcc6cbdd3163fa54a572824355221915141b14c2f847c3810e5d4088e8784f23a0111d2bcf321a SHA512 abd188a6b6e4a2c19379e15278cfea31f45eaeb327307e6011877b1babf8460066d6f2b3879d77b5d4aee5120387beaa0318ec2764d2039cd10a3aeb26973658
27 DIST portage-2.3.60.tar.bz2 1019434 BLAKE2B ef6cd672cf0a0781d836c3090de099a6da19e36c8d6650b3b9a9eedd0c106259824cdb34ff968cdbc38fdd1bee43aa1ef76f0914c98a45b3cf79edaf9742cae7 SHA512 ad5145c1b82fef50224df3a299375d3e9def03f5b7aaf0e616b6dd646141e1bb94dcb7cef0f210e64c705b0e6142bcf969f85a989c423084f33706a15e6b2e07
28 DIST portage-2.3.61.tar.bz2 1020972 BLAKE2B 783e0b1a38a42b6727fb42287745720fefd7ab0b0ef75a91d55ceeae6d9379d36bd37abcf42dfb90f6fcbe86354b14a3a2879d3b931174a6d26388375aad6b93 SHA512 2240ec3f3c01596bf0e1920e805392f429caecd58b7df60fd56ecf3ff5946299bb0d91581d358541d676f9136989b20593cb52ec883f0a28d332177b263896ea
29 +DIST portage-2.3.62.tar.bz2 1021442 BLAKE2B 37d5dab0e678ced78e0ff4dc9907af3d20370a4b0f52cea9118be3d06bb14e24fe6597d86c9bbd9d3ed2fc51f9e031d4e9ba84f354b945f7a399da3cbb95d74a SHA512 d4eca7e70573aae07a0522b4bf361191fded00fa02c5e6d8f70cf72c19c4dcfa9be7169a267afdc58cdd0a8ee333774a7779ac08dee3490aa8e8a1ebd39deb49
30 DIST portage-2.3.8.tar.bz2 938062 BLAKE2B 3f7bedf6268131a3b3539d53c8a7bb069b533b3a78e5eec521b6201439c8ee5e66996e798fe295561d0a94bfcd32adf414d4f8b5e7a93035cea09749406e64a3 SHA512 4b4b2de20323799b9b0f7a8812f939aa9a96d2744a0f65ad5287ba49744c491b55169cdb21f2885317a6a7c960d2070775ffd798f247b44eebc677c33c271eb8
31 DIST portage-74d2509c99fbcb43e018ead4950b938e41e524e5-bug-671472.patch 1584 BLAKE2B 452cd4cb25e42dcfa05c4f9da2bd3cc279556b9cd87037d0d965d39678f347b701dac0eaa59bfdebee9e3715abb506bf3744900ebefafa8fa729a1eb442889b9 SHA512 5bbe163e8eec00ece831c113676e87f0cf61a40f30a75a0de548490eeb789479336feec5bf81868a284bf32bafa00209176156cfb9ce557390d0f4a2ab6d1c1a
32
33 diff --git a/sys-apps/portage/portage-2.3.62.ebuild b/sys-apps/portage/portage-2.3.62.ebuild
34 new file mode 100644
35 index 00000000000..4bf3a6b2ded
36 --- /dev/null
37 +++ b/sys-apps/portage/portage-2.3.62.ebuild
38 @@ -0,0 +1,271 @@
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_4 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
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-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 + sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
180 + -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
181 + -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
182 + -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
183 + -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
184 + -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
185 + -i lib/portage/const.py || \
186 + die "Failed to patch portage.const.EPREFIX"
187 +
188 + einfo "Prefixing shebangs ..."
189 + while read -r -d $'\0' ; do
190 + local shebang=$(head -n1 "$REPLY")
191 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
192 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
193 + die "sed failed"
194 + fi
195 + done < <(find . -type f -print0)
196 +
197 + einfo "Adjusting make.globals ..."
198 + sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
199 + -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
200 + -i cnf/make.globals || die "sed failed"
201 +
202 + einfo "Adjusting repos.conf ..."
203 + sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
204 + -e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \
205 + -i cnf/repos.conf || die "sed failed"
206 + if use prefix-guest ; then
207 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
208 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
209 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
210 + -i cnf/repos.conf || die "sed failed"
211 + fi
212 +
213 + einfo "Adding FEATURES=force-prefix to make.globals ..."
214 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
215 + || die "failed to append to make.globals"
216 + fi
217 +
218 + cd "${S}/cnf" || die
219 + if [ -f "make.conf.example.${ARCH}".diff ]; then
220 + patch make.conf.example "make.conf.example.${ARCH}".diff || \
221 + die "Failed to patch make.conf.example"
222 + else
223 + eerror ""
224 + eerror "Portage does not have an arch-specific configuration for this arch."
225 + eerror "Please notify the arch maintainer about this issue. Using generic."
226 + eerror ""
227 + fi
228 +}
229 +
230 +python_compile_all() {
231 + local targets=()
232 + use doc && targets+=( docbook )
233 + use epydoc && targets+=( epydoc )
234 +
235 + if [[ ${targets[@]} ]]; then
236 + esetup.py "${targets[@]}"
237 + fi
238 +}
239 +
240 +python_test() {
241 + esetup.py test
242 +}
243 +
244 +python_install() {
245 + # Install sbin scripts to bindir for python-exec linking
246 + # they will be relocated in pkg_preinst()
247 + distutils-r1_python_install \
248 + --system-prefix="${EPREFIX}/usr" \
249 + --bindir="$(python_get_scriptdir)" \
250 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
251 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
252 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
253 + --sbindir="$(python_get_scriptdir)" \
254 + --sysconfdir="${EPREFIX}/etc" \
255 + "${@}"
256 +}
257 +
258 +python_install_all() {
259 + distutils-r1_python_install_all
260 +
261 + local targets=()
262 + use doc && targets+=(
263 + install_docbook
264 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
265 + )
266 + use epydoc && targets+=(
267 + install_epydoc
268 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
269 + )
270 +
271 + # install docs
272 + if [[ ${targets[@]} ]]; then
273 + esetup.py "${targets[@]}"
274 + fi
275 +
276 + systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf
277 +
278 + # Due to distutils/python-exec limitations
279 + # these must be installed to /usr/bin.
280 + local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
281 + einfo "Moving admin scripts to the correct directory"
282 + dodir /usr/sbin
283 + for target in ${sbin_relocations}; do
284 + einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
285 + mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
286 + done
287 +}
288 +
289 +pkg_preinst() {
290 + # comment out sanity test until it is fixed to work
291 + # with the new PORTAGE_PYM_PATH
292 + #if [[ $ROOT == / ]] ; then
293 + ## Run some minimal tests as a sanity check.
294 + #local test_runner=$(find "${ED}" -name runTests)
295 + #if [[ -n $test_runner && -x $test_runner ]] ; then
296 + #einfo "Running preinst sanity tests..."
297 + #"$test_runner" || die "preinst sanity tests failed"
298 + #fi
299 + #fi
300 +
301 + # elog dir must exist to avoid logrotate error for bug #415911.
302 + # This code runs in preinst in order to bypass the mapping of
303 + # portage:portage to root:root which happens after src_install.
304 + keepdir /var/log/portage/elog
305 + # This is allowed to fail if the user/group are invalid for prefix users.
306 + if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
307 + chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
308 + fi
309 +}