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, 28 Jan 2019 19:32:21
Message-Id: 1548656828.bc5692d278fcca7d07e2d5bc282f5467a2237ecf.zmedico@gentoo
1 commit: bc5692d278fcca7d07e2d5bc282f5467a2237ecf
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 28 06:18:05 2019 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 28 06:27:08 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc5692d2
7
8 sys-apps/portage: version bump to 2.3.59
9
10 #675868 pid-sandbox: pid-ns-init TIOCSCTTY after setsid
11
12 Bug: https://bugs.gentoo.org/671498
13 Bug: https://bugs.gentoo.org/675868
14 Package-Manager: Portage-2.3.59, 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.59.ebuild | 271 +++++++++++++++++++++++++++++++++
19 2 files changed, 272 insertions(+)
20
21 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
22 index 844b4b941dd..f7d9ed6c889 100644
23 --- a/sys-apps/portage/Manifest
24 +++ b/sys-apps/portage/Manifest
25 @@ -4,5 +4,6 @@ DIST portage-2.3.40.tar.bz2 995122 BLAKE2B 3bfadee6cf57dace32bb4a365850650e13664
26 DIST portage-2.3.49.tar.bz2 1010414 BLAKE2B be8e0194855eda8e8a617ee4415d702199e10772bab9539ff27cb165b6749090be887b6f48d449f4e7650e618d43be1b0d26ba59597996a9d3d3ecd0caea166a SHA512 d3daee0075eee61c354ad1d4865b1cf433d9afe5ed56101758219694325c7c5ad62a0d9ce41bf2205934b6e073d0eba3ef3f7c8b6633b5a3448e469783c5329a
27 DIST portage-2.3.51.tar.bz2 1013015 BLAKE2B f7f5e6c9e627db5a9e4bfcc9a6cbebb40fda910d3cc928922870b295c706a9f669d3d812e726b220610efe6b182460811eb9420d6fa5b8756481df64a88fe2b9 SHA512 6c22b97959d4b5be263b9a1de6bb343b1f8300e989f37c7334a9d5d6fb65fe2390958e222bc5379ec95099124fc51a049ecca6e1bfc18f0a6c57e4601342bb94
28 DIST portage-2.3.58.tar.bz2 1018510 BLAKE2B d1fe49bdb7b7c24cd94c315596ba81127b9b17bcb3a56d101af37873ba1e788a5648f62cdd3a79e536221c5df36417885130ac8734805f691a52199118c1429f SHA512 2720ed0c5119cf24cb80501820ebd387ae7a5c17baa87188d38003580cf752f03990475caf4ee5a4d1e78bcf420c67e113a45d5cfce85af377197e833020d484
29 +DIST portage-2.3.59.tar.bz2 1019295 BLAKE2B 705e51343be5a522cfb9d4cc7935042cd1e5b697b2d78aa283bcc6cbdd3163fa54a572824355221915141b14c2f847c3810e5d4088e8784f23a0111d2bcf321a SHA512 abd188a6b6e4a2c19379e15278cfea31f45eaeb327307e6011877b1babf8460066d6f2b3879d77b5d4aee5120387beaa0318ec2764d2039cd10a3aeb26973658
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.59.ebuild b/sys-apps/portage/portage-2.3.59.ebuild
34 new file mode 100644
35 index 00000000000..4bf3a6b2ded
36 --- /dev/null
37 +++ b/sys-apps/portage/portage-2.3.59.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 +}