Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/portage: portage-2.1.11.59.ebuild ChangeLog
Date: Wed, 27 Mar 2013 16:52:47
Message-Id: 20130327165242.0610F2171D@flycatcher.gentoo.org
1 zmedico 13/03/27 16:52:41
2
3 Modified: ChangeLog
4 Added: portage-2.1.11.59.ebuild
5 Log:
6 2.1.11.59 version bump. This fixes bug #461868 (don't try to preserve security
7 labels when copying xattrs),
8 bug #462694 (handle ENOLCK for NFS),
9 bug #462802 (fix ebuild.sh path in man pages), bug #456296 (don't use FD_CLOEXEC
10 for stdout on Darwin), bug #463266 (support make.conf as directory),
11 and bug #463394 (make autounmask respect keywords when unmasking package.mask if
12 possible).
13 Bug #462382 tracks all bugs fixed since portage-2.1.11.55.
14
15 (Portage version: 2.2.0_alpha170/cvs/Linux i686, signed Manifest commit with key 0xFDE8EF85AE5719A3)
16
17 Revision Changes Path
18 1.1238 sys-apps/portage/ChangeLog
19
20 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1238&view=markup
21 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1238&content-type=text/plain
22 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.1237&r2=1.1238
23
24 Index: ChangeLog
25 ===================================================================
26 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
27 retrieving revision 1.1237
28 retrieving revision 1.1238
29 diff -u -r1.1237 -r1.1238
30 --- ChangeLog 26 Mar 2013 05:17:45 -0000 1.1237
31 +++ ChangeLog 27 Mar 2013 16:52:41 -0000 1.1238
32 @@ -1,6 +1,16 @@
33 # ChangeLog for sys-apps/portage
34 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
35 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1237 2013/03/26 05:17:45 zmedico Exp $
36 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1238 2013/03/27 16:52:41 zmedico Exp $
37 +
38 +*portage-2.1.11.59 (27 Mar 2013)
39 +
40 + 27 Mar 2013; Zac Medico <zmedico@g.o> +portage-2.1.11.59.ebuild:
41 + 2.1.11.59 version bump. This fixes bug #461868 (don't try to preserve security
42 + labels when copying xattrs), bug #462694 (handle ENOLCK for NFS), bug #462802
43 + (fix ebuild.sh path in man pages), bug #456296 (don't use FD_CLOEXEC for
44 + stdout on Darwin), bug #463266 (support make.conf as directory), and bug
45 + #463394 (make autounmask respect keywords when unmasking package.mask if
46 + possible). Bug #462382 tracks all bugs fixed since portage-2.1.11.55.
47
48 26 Mar 2013; Zac Medico <zmedico@g.o> portage-2.1.11.58.ebuild,
49 portage-2.2.0_alpha169.ebuild, portage-9999.ebuild:
50
51
52
53 1.1 sys-apps/portage/portage-2.1.11.59.ebuild
54
55 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.11.59.ebuild?rev=1.1&view=markup
56 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.11.59.ebuild?rev=1.1&content-type=text/plain
57
58 Index: portage-2.1.11.59.ebuild
59 ===================================================================
60 # Copyright 1999-2013 Gentoo Foundation
61 # Distributed under the terms of the GNU General Public License v2
62 # $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.59.ebuild,v 1.1 2013/03/27 16:52:41 zmedico Exp $
63
64 # Require EAPI 2 since we now require at least python-2.6 (for python 3
65 # syntax support) which also requires EAPI 2.
66 EAPI=2
67 PYTHON_COMPAT=(
68 pypy1_9 pypy2_0
69 python3_1 python3_2 python3_3 python3_4
70 python2_6 python2_7
71 )
72 inherit eutils multilib
73
74 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
75 HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
76 LICENSE="GPL-2"
77 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
78 SLOT="0"
79 IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
80
81 for _pyimpl in ${PYTHON_COMPAT[@]} ; do
82 IUSE+=" python_targets_${_pyimpl}"
83 done
84 unset _pyimpl
85
86 # Import of the io module in python-2.6 raises ImportError for the
87 # thread module if threading is disabled.
88 python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
89 !pypy2_0? ( !python2? ( !python3? (
90 || ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
91 ) ) )
92 pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
93 python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
94 python_dep="${python_dep_ssl//\[ssl\]}"
95 python_dep="${python_dep//,ssl}"
96 python_dep="${python_dep//ssl,}"
97
98 python_dep="${python_dep}
99 python_targets_pypy1_9? ( dev-python/pypy:1.9 )
100 python_targets_pypy2_0? ( dev-python/pypy:2.0 )
101 python_targets_python2_6? ( dev-lang/python:2.6 )
102 python_targets_python2_7? ( dev-lang/python:2.7 )
103 python_targets_python3_1? ( dev-lang/python:3.1 )
104 python_targets_python3_2? ( dev-lang/python:3.2 )
105 python_targets_python3_3? ( dev-lang/python:3.3 )
106 python_targets_python3_4? ( dev-lang/python:3.4 )
107 "
108
109 # The pysqlite blocker is for bug #282760.
110 # make-3.82 is for bug #455858
111 DEPEND="${python_dep}
112 >=sys-devel/make-3.82
113 >=sys-apps/sed-4.0.5 sys-devel/patch
114 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
115 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
116 # Require sandbox-2.2 for bug #288863.
117 # For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
118 # quite slow, so it's not considered in the dependencies as an alternative to
119 # to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
120 # for now, don't pull in xattr deps for other kernels.
121 # For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
122 # For compgen, require bash[readline] (bug #445576).
123 RDEPEND="${python_dep}
124 !build? ( >=sys-apps/sed-4.0.5
125 || ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
126 >=app-admin/eselect-1.2
127 || ( ${python_dep_ssl} dev-python/python-mhash )
128 )
129 elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
130 elibc_glibc? ( >=sys-apps/sandbox-2.2 )
131 elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
132 >=app-misc/pax-utils-0.1.17
133 xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
134 selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
135 !<app-shells/bash-3.2_p17
136 !<app-admin/logrotate-3.8.0"
137 PDEPEND="
138 !build? (
139 >=net-misc/rsync-2.6.4
140 userland_GNU? ( >=sys-apps/coreutils-6.4 )
141 )"
142 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
143 # NOTE: FEATURES=installsources requires debugedit and rsync
144
145 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
146
147 prefix_src_archives() {
148 local x y
149 for x in ${@}; do
150 for y in ${SRC_ARCHIVES}; do
151 echo ${y}/${x}
152 done
153 done
154 }
155
156 PV_PL="2.1.2"
157 PATCHVER_PL=""
158 TARBALL_PV=$PV
159 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
160 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
161 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
162 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
163
164 PATCHVER=
165 [[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
166 if [ -n "${PATCHVER}" ]; then
167 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
168 $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
169 fi
170
171 S="${WORKDIR}"/${PN}-${TARBALL_PV}
172 S_PL="${WORKDIR}"/${PN}-${PV_PL}
173
174 compatible_python_is_selected() {
175 [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
176 }
177
178 current_python_has_xattr() {
179 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
180 local PYTHON=/usr/bin/${EPYTHON}
181 [[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
182 "${PYTHON}" -c 'import xattr' 2>/dev/null
183 }
184
185 call_with_python_impl() {
186 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
187 env EPYTHON=${EPYTHON} "$@"
188 }
189
190 get_python_interpreter() {
191 [ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
192 local impl=$1 python
193 case "${impl}" in
194 python*)
195 python=${impl/_/.}
196 ;;
197 pypy*)
198 python=${impl/_/.}
199 python=${python/pypy/pypy-c}
200 ;;
201 *)
202 die "Unrecognized python target: ${impl}"
203 esac
204 echo ${python}
205 }
206
207 get_python_sitedir() {
208 [ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
209 local impl=$1
210 local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages
211 [[ -d ${ROOT}${site_dir} ]] || \
212 ewarn "site-packages dir missing for ${impl}: ${ROOT}${site_dir}"
213 echo "${site_dir}"
214 }
215
216 python_compileall() {
217 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
218 local d=$1 PYTHON=/usr/bin/${EPYTHON}
219 local d_image=${D}${d#/}
220 [[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
221 case "${EPYTHON}" in
222 python*)
223 "${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
224 # Note: Using -OO breaks emaint, since it requires __doc__,
225 # and __doc__ is None when -OO is used.
226 "${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
227 ;;
228 pypy*)
229 "${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
230 ;;
231 *)
232 die "Unrecognized EPYTHON value: ${EPYTHON}"
233 esac
234 }
235
236 pkg_setup() {
237 if use python2 && use python3 ; then
238 ewarn "Both python2 and python3 USE flags are enabled, but only one"
239 ewarn "can be in the shebangs. Using python3."
240 fi
241 if use pypy2_0 && use python3 ; then
242 ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
243 ewarn "can be in the shebangs. Using python3."
244 fi
245 if use pypy2_0 && use python2 ; then
246 ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
247 ewarn "can be in the shebangs. Using python2"
248 fi
249 if ! use pypy2_0 && ! use python2 && ! use python3 && \
250 ! compatible_python_is_selected ; then
251 ewarn "Attempting to select a compatible default python interpreter"
252 local x success=0
253 for x in /usr/bin/python2.* ; do
254 x=${x#/usr/bin/python2.}
255 if [[ $x -ge 6 ]] 2>/dev/null ; then
256 eselect python set python2.$x
257 if compatible_python_is_selected ; then
258 elog "Default python interpreter is now set to python-2.$x"
259 success=1
260 break
261 fi
262 fi
263 done
264 if [ $success != 1 ] ; then
265 eerror "Unable to select a compatible default python interpreter!"
266 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
267 fi
268 fi
269
270 # We use EPYTHON to designate the active python interpreter,
271 # but we only export when needed, via call_with_python_impl.
272 EPYTHON=python
273 export -n EPYTHON
274 if use python3; then
275 EPYTHON=python3
276 elif use python2; then
277 EPYTHON=python2
278 elif use pypy2_0; then
279 EPYTHON=pypy-c2.0
280 fi
281 }
282
283 src_prepare() {
284 if [ -n "${PATCHVER}" ] ; then
285 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
286 rm "$S/bin/ebuild-helpers/portageq" \
287 || die "failed to remove portageq helper symlink"
288 fi
289 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
290 fi
291 einfo "Setting portage.VERSION to ${PVR} ..."
292 sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
293 die "Failed to patch portage.VERSION"
294 sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
295 die "Failed to patch VERSION in doc/fragment/version"
296 sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
297 die "Failed to patch VERSION in man page headers"
298
299 if ! use ipc ; then
300 einfo "Disabling ipc..."
301 sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
302 -i pym/_emerge/AbstractEbuildProcess.py || \
303 die "failed to patch AbstractEbuildProcess.py"
304 fi
305
306 if use xattr && use kernel_linux ; then
307 einfo "Adding FEATURES=xattr to make.globals ..."
308 echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
309 || die "failed to append to make.globals"
310 fi
311
312 local set_shebang=
313 if use python3; then
314 set_shebang=python3
315 elif use python2; then
316 set_shebang=python2
317 elif use pypy2_0; then
318 set_shebang=pypy-c2.0
319 fi
320 if [[ -n ${set_shebang} ]] ; then
321 einfo "Converting shebangs for ${set_shebang}..."
322 while read -r -d $'\0' ; do
323 local shebang=$(head -n1 "$REPLY")
324 if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
325 sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
326 die "sed failed"
327 fi
328 done < <(find . -type f -print0)
329 fi
330
331 cd "${S}/cnf" || die
332 if [ -f "make.conf.${ARCH}".diff ]; then
333 patch make.conf "make.conf.${ARCH}".diff || \
334 die "Failed to patch make.conf.example"
335 else
336 eerror ""
337 eerror "Portage does not have an arch-specific configuration for this arch."
338 eerror "Please notify the arch maintainer about this issue. Using generic."
339 eerror ""
340 fi
341 }
342
343 src_compile() {
344 if use doc; then
345 call_with_python_impl \
346 emake docbook || die
347 fi
348
349 if use epydoc; then
350 einfo "Generating api docs"
351 call_with_python_impl \
352 emake epydoc || die
353 fi
354 }
355
356 src_test() {
357 call_with_python_impl \
358 emake test || die
359 }
360
361 src_install() {
362 call_with_python_impl \
363 emake DESTDIR="${D}" \
364 sysconfdir="/etc" \
365 prefix="/usr" \
366 install || die
367
368 # Extended set config is currently disabled in portage-2.1.x.
369 rm -rf "${D}/usr/share/portage/config/sets" || die
370
371 # Use dodoc for compression, since the Makefile doesn't do that.
372 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
373
374 if use linguas_pl; then
375 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
376 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
377 fi
378
379 # Allow external portage API consumers to import portage python modules
380 # (this used to be done with PYTHONPATH setting in /etc/env.d).
381 # For each of PYTHON_TARGETS, install a tree of *.py symlinks in
382 # site-packages, and compile with the corresponding interpreter.
383 local impl files mod_dir dest_mod_dir python relative_path x
384 for impl in "${PYTHON_COMPAT[@]}" ; do
385 use "python_targets_${impl}" || continue
386 while read -r mod_dir ; do
387 cd "${D}/usr/lib/portage/pym/${mod_dir}" || die
388 files=$(echo *.py)
389 if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
390 # __pycache__ directories contain no py files
391 continue
392 fi
393 dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
394 dodir "${dest_mod_dir}" || die
395 relative_path=../../../lib/portage/pym/${mod_dir}
396 x=/${mod_dir}
397 while [ -n "${x}" ] ; do
398 relative_path=../${relative_path}
399 x=${x%/*}
400 done
401 for x in ${files} ; do
402 dosym "${relative_path}/${x}" \
403 "${dest_mod_dir}/${x}" || die
404 done
405 done < <(cd "${D}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
406 cd "${S}" || die
407 EPYTHON=$(get_python_interpreter ${impl}) \
408 python_compileall "$(get_python_sitedir ${impl})"
409 done
410
411 # Compile /usr/lib/portage/pym with the active interpreter, since portage
412 # internal commands force this directory to the beginning of sys.path.
413 python_compileall /usr/lib/portage/pym
414 }
415
416 pkg_preinst() {
417 if [[ $ROOT == / ]] ; then
418 # Run some minimal tests as a sanity check.
419 local test_runner=$(find "$D" -name runTests)
420 if [[ -n $test_runner && -x $test_runner ]] ; then
421 einfo "Running preinst sanity tests..."
422 "$test_runner" || die "preinst sanity tests failed"
423 fi
424 fi
425
426 if use xattr && ! current_python_has_xattr ; then
427 ewarn "For optimal performance in xattr handling, install"
428 ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
429 ewarn "enable USE=python3 for $CATEGORY/$PN."
430 fi
431
432 if [[ -d ${ROOT}var/log/portage && \
433 $(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
434 has_version '<sys-apps/portage-2.1.10.11' ; then
435 # Initialize permissions for bug #378451 and bug #377177, since older
436 # portage does not create /var/log/portage with the desired default
437 # permissions.
438 einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
439 chown portage:portage "${ROOT}var/log/portage"
440 chmod g+ws "${ROOT}var/log/portage"
441 fi
442
443 if has_version '<sys-apps/portage-2.1.10.61' ; then
444 ewarn "FEATURES=config-protect-if-modified is now enabled by default."
445 ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
446 ewarn "files that have not been modified since they were installed."
447 fi
448 }