1 |
commit: 93c70800e7935baed2d7d6ac53f209c7a43dceea |
2 |
Author: Thomas Sachau <tommy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 5 12:12:05 2015 +0000 |
4 |
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 31 10:41:15 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/multilib-portage.git/commit/?id=93c70800 |
7 |
|
8 |
Revision bump for fake abi_x86_32 dependency support |
9 |
|
10 |
sys-apps/portage/Manifest | 1 + |
11 |
sys-apps/portage/portage-2.2.18-r2.ebuild | 349 ++++++++++++++++++++++++++++++ |
12 |
2 files changed, 350 insertions(+) |
13 |
|
14 |
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest |
15 |
index c455c14..3f58062 100644 |
16 |
--- a/sys-apps/portage/Manifest |
17 |
+++ b/sys-apps/portage/Manifest |
18 |
@@ -1,2 +1,3 @@ |
19 |
EBUILD portage-2.2.18-r1.ebuild 11531 SHA256 f76ea14152df9db2a1c5cea42b63da88f3d247b4983bfa91d5b6a1028f10b1ec SHA512 57ebe740d6a8099f1121d06e4b478ce1c889552909fea29eb984276eee1ba9c1784fa47355ee27b11c69574895b4f25596a0a44894d132f226eeb01175218be3 WHIRLPOOL 0135931c190dd8276088aba25b83837debce91c43f60cd96b0972c4ff510ba650d3cccd0c16b4ef80d4c26c69aee5131f7bf531440d3c2a53576ea770f456fe0 |
20 |
+EBUILD portage-2.2.18-r2.ebuild 11531 SHA256 27419daddd85c91a5eeb14f03b511a3e5e9c4da1f1ed7657c2d33f15bdfa4c31 SHA512 38e64e367213676a34231bf81fa676afc335ac8560d167d146a6f5da695fbf0f45b6dcff013a8f28bac441b5def2027f4a3f51791153dc650c48c48159bcaeb6 WHIRLPOOL 232ff0fc8f19bc846efcdfa476f40a04697befe34a9224c180f81606c622598289668d0dd8054d54c2b5e4faba3e0f965bca83d04e81054dec60a689d0bdabfc |
21 |
MISC metadata.xml 365 SHA256 475a792c24a7db2ae5fab7fb108bf39af08c272d03d87ef942883b297de95d6a SHA512 45a78cd446f546ca81c6d6623e0f7215e13ed81d58d6dfcf7a2614b2ad8250a7af4c9ed8b3d1c301a103f3f17b2f5d8eb16caa82267b7565798fb00383957fb6 WHIRLPOOL 1f744a508a6d6d9225087850a85e47b8effadeff6eb0600daca677f761f22c8ddcc08a972bf4b4c2d6545518710365b560f54dd43d283f19eebdb3b2a0972630 |
22 |
|
23 |
diff --git a/sys-apps/portage/portage-2.2.18-r2.ebuild b/sys-apps/portage/portage-2.2.18-r2.ebuild |
24 |
new file mode 100644 |
25 |
index 0000000..a74a037 |
26 |
--- /dev/null |
27 |
+++ b/sys-apps/portage/portage-2.2.18-r2.ebuild |
28 |
@@ -0,0 +1,349 @@ |
29 |
+# Copyright 1999-2015 Gentoo Foundation |
30 |
+# Distributed under the terms of the GNU General Public License v2 |
31 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.18.ebuild,v 1.9 2015/04/26 15:42:47 zlogene Exp $ |
32 |
+ |
33 |
+EAPI=5 |
34 |
+ |
35 |
+PYTHON_COMPAT=( |
36 |
+ pypy |
37 |
+ python3_3 python3_4 |
38 |
+ python2_7 |
39 |
+) |
40 |
+# Note: substituted below |
41 |
+PYTHON_REQ_USE='bzip2(+)' |
42 |
+ |
43 |
+inherit distutils-r1 git-2 multilib |
44 |
+ |
45 |
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/portage.git" |
46 |
+EGIT_BRANCH="multilib" |
47 |
+EGIT_COMMIT="47c39606998a29f78056f077b7a8a29e0bf20c86" |
48 |
+DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
49 |
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
50 |
+ |
51 |
+LICENSE="GPL-2" |
52 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
53 |
+SLOT="0" |
54 |
+IUSE="build doc epydoc +ipc linguas_ru selinux xattr" |
55 |
+ |
56 |
+DEPEND="!build? ( ${PYTHON_DEPS//bzip2(+)/ssl(+),bzip2(+)} ) |
57 |
+ dev-lang/python-exec:2 |
58 |
+ >=sys-apps/sed-4.0.5 sys-devel/patch |
59 |
+ doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
60 |
+ epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] ) |
61 |
+ >=sys-apps/abi-wrapper-1.0-r6" |
62 |
+# Require sandbox-2.2 for bug #288863. |
63 |
+# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's |
64 |
+# quite slow, so it's not considered in the dependencies as an alternative to |
65 |
+# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so |
66 |
+# for now, don't pull in xattr deps for other kernels. |
67 |
+# For whirlpool hash, require python[ssl] (bug #425046). |
68 |
+# For compgen, require bash[readline] (bug #445576). |
69 |
+RDEPEND=" |
70 |
+ dev-lang/python-exec:2 |
71 |
+ !build? ( |
72 |
+ >=sys-apps/sed-4.0.5 |
73 |
+ app-shells/bash:0[readline] |
74 |
+ >=app-admin/eselect-1.2 |
75 |
+ ) |
76 |
+ elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
77 |
+ elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
78 |
+ elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) |
79 |
+ >=app-misc/pax-utils-0.1.17 |
80 |
+ selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] ) |
81 |
+ xattr? ( kernel_linux? ( |
82 |
+ >=sys-apps/install-xattr-0.3 |
83 |
+ $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \ |
84 |
+ python2_7 pypy) |
85 |
+ ) ) |
86 |
+ !<app-admin/logrotate-3.8.0 |
87 |
+ >=sys-apps/abi-wrapper-1.0-r6" |
88 |
+PDEPEND=" |
89 |
+ !build? ( |
90 |
+ >=net-misc/rsync-2.6.4 |
91 |
+ userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
92 |
+ )" |
93 |
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
94 |
+# NOTE: FEATURES=installsources requires debugedit and rsync |
95 |
+ |
96 |
+REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )" |
97 |
+ |
98 |
+python_prepare_all() { |
99 |
+ distutils-r1_python_prepare_all |
100 |
+ |
101 |
+ if ! use ipc ; then |
102 |
+ einfo "Disabling ipc..." |
103 |
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
104 |
+ -i pym/_emerge/AbstractEbuildProcess.py || \ |
105 |
+ die "failed to patch AbstractEbuildProcess.py" |
106 |
+ fi |
107 |
+ |
108 |
+ if use xattr && use kernel_linux ; then |
109 |
+ einfo "Adding FEATURES=xattr to make.globals ..." |
110 |
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
111 |
+ || die "failed to append to make.globals" |
112 |
+ fi |
113 |
+ |
114 |
+ if [[ -n ${EPREFIX} ]] ; then |
115 |
+ einfo "Setting portage.const.EPREFIX ..." |
116 |
+ sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \ |
117 |
+ -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \ |
118 |
+ -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \ |
119 |
+ -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \ |
120 |
+ -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \ |
121 |
+ -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \ |
122 |
+ -i pym/portage/const.py || \ |
123 |
+ die "Failed to patch portage.const.EPREFIX" |
124 |
+ |
125 |
+ einfo "Prefixing shebangs ..." |
126 |
+ while read -r -d $'\0' ; do |
127 |
+ local shebang=$(head -n1 "$REPLY") |
128 |
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
129 |
+ sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
130 |
+ die "sed failed" |
131 |
+ fi |
132 |
+ done < <(find . -type f -print0) |
133 |
+ |
134 |
+ einfo "Adjusting make.globals ..." |
135 |
+ sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \ |
136 |
+ -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \ |
137 |
+ -i cnf/make.globals || die "sed failed" |
138 |
+ |
139 |
+ einfo "Adjusting repos.conf ..." |
140 |
+ sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
141 |
+ -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |
142 |
+ -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \ |
143 |
+ -e "s|^\(sync-uri = \).*|\\1rsync://prefix.gentooexperimental.org/gentoo-portage-prefix|" \ |
144 |
+ -i cnf/repos.conf || die "sed failed" |
145 |
+ |
146 |
+ einfo "Adding FEATURES=force-prefix to make.globals ..." |
147 |
+ echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \ |
148 |
+ || die "failed to append to make.globals" |
149 |
+ fi |
150 |
+ |
151 |
+ cd "${S}/cnf" || die |
152 |
+ if [ -f "make.conf.example.${ARCH}".diff ]; then |
153 |
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \ |
154 |
+ die "Failed to patch make.conf.example" |
155 |
+ else |
156 |
+ eerror "" |
157 |
+ eerror "Portage does not have an arch-specific configuration for this arch." |
158 |
+ eerror "Please notify the arch maintainer about this issue. Using generic." |
159 |
+ eerror "" |
160 |
+ fi |
161 |
+} |
162 |
+ |
163 |
+python_compile_all() { |
164 |
+ local targets=() |
165 |
+ use doc && targets+=( docbook ) |
166 |
+ use epydoc && targets+=( epydoc ) |
167 |
+ |
168 |
+ if [[ ${targets[@]} ]]; then |
169 |
+ esetup.py "${targets[@]}" |
170 |
+ fi |
171 |
+} |
172 |
+ |
173 |
+python_test() { |
174 |
+ esetup.py test |
175 |
+} |
176 |
+ |
177 |
+python_install() { |
178 |
+ # Install sbin scripts to bindir for python-exec linking |
179 |
+ # they will be relocated in pkg_preinst() |
180 |
+ distutils-r1_python_install \ |
181 |
+ --system-prefix="${EPREFIX}/usr" \ |
182 |
+ --bindir="$(python_get_scriptdir)" \ |
183 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
184 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
185 |
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ |
186 |
+ --sbindir="$(python_get_scriptdir)" \ |
187 |
+ --sysconfdir="${EPREFIX}/etc" \ |
188 |
+ "${@}" |
189 |
+} |
190 |
+ |
191 |
+python_install_all() { |
192 |
+ distutils-r1_python_install_all |
193 |
+ |
194 |
+ local targets=() |
195 |
+ use doc && targets+=( install_docbook ) |
196 |
+ use epydoc && targets+=( install_epydoc ) |
197 |
+ |
198 |
+ # install docs |
199 |
+ if [[ ${targets[@]} ]]; then |
200 |
+ esetup.py "${targets[@]}" |
201 |
+ fi |
202 |
+ |
203 |
+ # Due to distutils/python-exec limitations |
204 |
+ # these must be installed to /usr/bin. |
205 |
+ local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' |
206 |
+ einfo "Moving admin scripts to the correct directory" |
207 |
+ dodir /usr/sbin |
208 |
+ for target in ${sbin_relocations}; do |
209 |
+ einfo "Moving /usr/bin/${target} to /usr/sbin/${target}" |
210 |
+ mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!" |
211 |
+ done |
212 |
+} |
213 |
+ |
214 |
+pkg_preinst() { |
215 |
+ # comment out sanity test until it is fixed to work |
216 |
+ # with the new PORTAGE_PYM_PATH |
217 |
+ #if [[ $ROOT == / ]] ; then |
218 |
+ ## Run some minimal tests as a sanity check. |
219 |
+ #local test_runner=$(find "${ED}" -name runTests) |
220 |
+ #if [[ -n $test_runner && -x $test_runner ]] ; then |
221 |
+ #einfo "Running preinst sanity tests..." |
222 |
+ #"$test_runner" || die "preinst sanity tests failed" |
223 |
+ #fi |
224 |
+ #fi |
225 |
+ |
226 |
+ # elog dir must exist to avoid logrotate error for bug #415911. |
227 |
+ # This code runs in preinst in order to bypass the mapping of |
228 |
+ # portage:portage to root:root which happens after src_install. |
229 |
+ keepdir /var/log/portage/elog |
230 |
+ # This is allowed to fail if the user/group are invalid for prefix users. |
231 |
+ if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then |
232 |
+ chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog} |
233 |
+ fi |
234 |
+ |
235 |
+ if has_version "<${CATEGORY}/${PN}-2.1.13" || \ |
236 |
+ { |
237 |
+ has_version ">=${CATEGORY}/${PN}-2.2_rc0" && \ |
238 |
+ has_version "<${CATEGORY}/${PN}-2.2.0_alpha189" |
239 |
+ } ; then |
240 |
+ USERPRIV_UPGRADE=true |
241 |
+ USERSYNC_UPGRADE=true |
242 |
+ REPOS_CONF_UPGRADE=true |
243 |
+ REPOS_CONF_SYNC= |
244 |
+ type -P portageq >/dev/null 2>&1 && \ |
245 |
+ REPOS_CONF_SYNC=$("$(type -P portageq)" envvar SYNC) |
246 |
+ else |
247 |
+ USERPRIV_UPGRADE=false |
248 |
+ USERSYNC_UPGRADE=false |
249 |
+ REPOS_CONF_UPGRADE=false |
250 |
+ fi |
251 |
+} |
252 |
+ |
253 |
+get_ownership() { |
254 |
+ case ${USERLAND} in |
255 |
+ BSD) |
256 |
+ stat -f '%Su:%Sg' "${1}" |
257 |
+ ;; |
258 |
+ *) |
259 |
+ stat -c '%U:%G' "${1}" |
260 |
+ ;; |
261 |
+ esac |
262 |
+} |
263 |
+ |
264 |
+new_config_protect() { |
265 |
+ # Generate a ._cfg file even if the target file |
266 |
+ # does not exist, ensuring that the user will |
267 |
+ # notice the config change. |
268 |
+ local basename=${1##*/} |
269 |
+ local dirname=${1%/*} |
270 |
+ local i=0 |
271 |
+ while true ; do |
272 |
+ local filename=$( |
273 |
+ echo -n "${dirname}/._cfg" |
274 |
+ printf "%04d" ${i} |
275 |
+ echo -n "_${basename}" |
276 |
+ ) |
277 |
+ [[ -e ${filename} ]] || break |
278 |
+ (( i++ )) |
279 |
+ done |
280 |
+ echo "${filename}" |
281 |
+} |
282 |
+ |
283 |
+pkg_postinst() { |
284 |
+ |
285 |
+ if ${REPOS_CONF_UPGRADE} ; then |
286 |
+ einfo "Generating repos.conf" |
287 |
+ local repo_name= |
288 |
+ [[ -f ${PORTDIR}/profiles/repo_name ]] && \ |
289 |
+ repo_name=$(< "${PORTDIR}/profiles/repo_name") |
290 |
+ if [[ -z ${REPOS_CONF_SYNC} ]] ; then |
291 |
+ REPOS_CONF_SYNC=$(grep "^sync-uri =" "${EROOT:-${ROOT}}usr/share/portage/config/repos.conf") |
292 |
+ REPOS_CONF_SYNC=${REPOS_CONF_SYNC##* } |
293 |
+ fi |
294 |
+ local sync_type= |
295 |
+ [[ ${REPOS_CONF_SYNC} == git://* ]] && sync_type=git |
296 |
+ |
297 |
+ if [[ ${REPOS_CONF_SYNC} == cvs://* ]]; then |
298 |
+ sync_type=cvs |
299 |
+ REPOS_CONF_SYNC=${REPOS_CONF_SYNC#cvs://} |
300 |
+ fi |
301 |
+ |
302 |
+ cat <<-EOF > "${T}/repos.conf" |
303 |
+ [DEFAULT] |
304 |
+ main-repo = ${repo_name:-gentoo} |
305 |
+ |
306 |
+ [${repo_name:-gentoo}] |
307 |
+ location = ${PORTDIR:-${EPREFIX}/usr/portage} |
308 |
+ sync-type = ${sync_type:-rsync} |
309 |
+ sync-uri = ${REPOS_CONF_SYNC} |
310 |
+ EOF |
311 |
+ |
312 |
+ [[ ${sync_type} == cvs ]] && echo "sync-cvs-repo = $(<"${PORTDIR}/CVS/Repository")" >> "${T}/repos.conf" |
313 |
+ |
314 |
+ local dest=${EROOT:-${ROOT}}etc/portage/repos.conf |
315 |
+ if [[ ! -f ${dest} ]] && mkdir -p "${dest}" 2>/dev/null ; then |
316 |
+ dest=${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf |
317 |
+ fi |
318 |
+ # Don't install the config update if the desired repos.conf directory |
319 |
+ # and config file exist, since users may accept it blindly and break |
320 |
+ # their config (bug #478726). |
321 |
+ [[ -e ${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf ]] || \ |
322 |
+ mv "${T}/repos.conf" "$(new_config_protect "${dest}")" |
323 |
+ |
324 |
+ if [[ ${PORTDIR} == ${EPREFIX}/usr/portage ]] ; then |
325 |
+ einfo "Generating make.conf PORTDIR setting for backward compatibility" |
326 |
+ for dest in "${EROOT:-${ROOT}}etc/make.conf" "${EROOT:-${ROOT}}etc/portage/make.conf" ; do |
327 |
+ [[ -e ${dest} ]] && break |
328 |
+ done |
329 |
+ [[ -d ${dest} ]] && dest=${dest}/portdir.conf |
330 |
+ rm -rf "${T}/make.conf" |
331 |
+ [[ -f ${dest} ]] && cat "${dest}" > "${T}/make.conf" |
332 |
+ cat <<-EOF >> "${T}/make.conf" |
333 |
+ |
334 |
+ # Set PORTDIR for backward compatibility with various tools: |
335 |
+ # gentoo-bashcomp - bug #478444 |
336 |
+ # euse - bug #474574 |
337 |
+ # euses and ufed - bug #478318 |
338 |
+ PORTDIR="${EPREFIX}/usr/portage" |
339 |
+ EOF |
340 |
+ mkdir -p "${dest%/*}" |
341 |
+ mv "${T}/make.conf" "$(new_config_protect "${dest}")" |
342 |
+ fi |
343 |
+ fi |
344 |
+ |
345 |
+ local distdir=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}} |
346 |
+ |
347 |
+ if ${USERSYNC_UPGRADE} && \ |
348 |
+ [[ -d ${PORTDIR} && -w ${PORTDIR} ]] ; then |
349 |
+ local ownership=$(get_ownership "${PORTDIR}") |
350 |
+ if [[ -n ${ownership} ]] ; then |
351 |
+ einfo "Adjusting PORTDIR permissions for usersync" |
352 |
+ find "${PORTDIR}" -path "${distdir%/}" -prune -o \ |
353 |
+ ! \( -user "${ownership%:*}" -a -group "${ownership#*:}" \) \ |
354 |
+ -exec chown "${ownership}" {} + |
355 |
+ fi |
356 |
+ fi |
357 |
+ |
358 |
+ einfo |
359 |
+ elog "For setup instructions after switching to portage-multilib" |
360 |
+ elog "read doc/portage-multilib-instructions inside the multilib overlay" |
361 |
+ einfo |
362 |
+ elog "The bin/ dir of the overlay has some scripts to switch from lib32" |
363 |
+ elog "to MULTILIB_ABI or to add the default MULTILIB_ABI flags" |
364 |
+ |
365 |
+ # Do this last, since it could take a long time if there |
366 |
+ # are lots of live sources, and the user may be tempted |
367 |
+ # to kill emerge while it is running. |
368 |
+ if ${USERPRIV_UPGRADE} && \ |
369 |
+ [[ -d ${distdir} && -w ${distdir} ]] ; then |
370 |
+ local ownership=$(get_ownership "${distdir}") |
371 |
+ if [[ ${ownership#*:} == portage ]] ; then |
372 |
+ einfo "Adjusting DISTDIR permissions for userpriv" |
373 |
+ find "${distdir}" -mindepth 1 -maxdepth 1 -type d -uid 0 \ |
374 |
+ -exec chown -R portage:portage {} + |
375 |
+ fi |
376 |
+ fi |
377 |
+} |