Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/portage-mgorny/
Date: Mon, 26 Mar 2018 18:17:34
Message-Id: 1522088243.d4377ff8aa2d0e6f035fae93e3d4ba3c19e0779d.mgorny@gentoo
1 commit: d4377ff8aa2d0e6f035fae93e3d4ba3c19e0779d
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 26 18:02:02 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 26 18:17:23 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4377ff8
7
8 sys-apps/portage-mgorny: Bump to 2.3.24.4
9
10 sys-apps/portage-mgorny/Manifest | 1 +
11 .../portage-mgorny/portage-mgorny-2.3.24.4.ebuild | 199 +++++++++++++++++++++
12 2 files changed, 200 insertions(+)
13
14 diff --git a/sys-apps/portage-mgorny/Manifest b/sys-apps/portage-mgorny/Manifest
15 index a928530bce9..d06a0ba308c 100644
16 --- a/sys-apps/portage-mgorny/Manifest
17 +++ b/sys-apps/portage-mgorny/Manifest
18 @@ -1,3 +1,4 @@
19 DIST portage-mgorny-2.3.24.1.tar.gz 1239318 BLAKE2B bfa8418ade600835c90378177bc6cd91f6c17e02c0e05b0829f4ee3b500ce3275fcb76424e19af5618026daa7b79d402aeb0d9f2133e7db09cb8983eeb355427 SHA512 04e3d5ee08f78ba3bb8045c36e7e81b06b7a0aff65a22c82cd2ca6fc0ab9f7b63a49c7eda9048d15fbc9c8d1a898c0d038f7cac2f4daf6d68bb799a9303d74c1
20 DIST portage-mgorny-2.3.24.2.tar.gz 1239343 BLAKE2B 701c90d333c10976f11910babed4b002cb545561c931d635973cf9b455a247b050b098c61fca0b20a5a8d70d4478a9daddacc826045e74c52d45878260431c93 SHA512 0319a973a26650ce182c0e1f997399f0c3944474ad5c8c2f88b9588ffbf99ccd12bd84e7537f8368f8362a098a72d177fc3c844e2afc086f95094baa27d97b93
21 DIST portage-mgorny-2.3.24.3.tar.gz 1235966 BLAKE2B 0919ad1c287075cdeaacb3c40b468ba9afd93df59ea3e8caa87300f87e0638e72d3d2791d07764d82147025c407f83f7442d9c4f02b5b8ae7ba8485f54193499 SHA512 dfb2341a512b3db37b7f282d7246d16afb8df9e1c401656022ac72adf35541bd4aa0224974deb581e76174b1bd7c49368c76215dd977168e5da858e9d8b8eda5
22 +DIST portage-mgorny-2.3.24.4.tar.gz 1235738 BLAKE2B 4365b4c2ac754b6a09a19598d7e4bddc16575b17dcd3e6dabcbb58ddd905a548da5d7c5a660e8bb8e638e39bf8803869144f08f6ece34775e79dd70f4be6d933 SHA512 ed5f14a457d00951f4af6b76db501f33523b6a19f2983d1b7acaa62f7eee90b8facf834f88d4de2dea26f12b7f373c64771c9f797af6c82578fb45b8db8ef678
23
24 diff --git a/sys-apps/portage-mgorny/portage-mgorny-2.3.24.4.ebuild b/sys-apps/portage-mgorny/portage-mgorny-2.3.24.4.ebuild
25 new file mode 100644
26 index 00000000000..39117506dcf
27 --- /dev/null
28 +++ b/sys-apps/portage-mgorny/portage-mgorny-2.3.24.4.ebuild
29 @@ -0,0 +1,199 @@
30 +# Copyright 1999-2018 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=6
34 +
35 +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} pypy )
36 +PYTHON_REQ_USE='bzip2(+),threads(+)'
37 +
38 +inherit distutils-r1
39 +
40 +DESCRIPTION="Fork of Portage focused on cleaning up and useful features"
41 +HOMEPAGE="https://github.com/mgorny/portage"
42 +SRC_URI="https://github.com/mgorny/portage/archive/v${PV}.tar.gz -> ${P}.tar.gz"
43 +S=${WORKDIR}/portage-${PV}
44 +
45 +LICENSE="GPL-2"
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
47 +SLOT="0"
48 +IUSE="build +ipc +native-extensions selinux xattr kernel_linux"
49 +
50 +DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
51 + >=app-arch/tar-1.27
52 + >=sys-apps/sed-4.0.5
53 + sys-devel/patch"
54 +RDEPEND="
55 + >=app-arch/tar-1.27
56 + !build? (
57 + >=app-admin/eselect-1.2
58 + app-crypt/openpgp-keys-gentoo-release
59 + >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
60 + >=app-portage/gemato-10
61 + app-shells/bash:0[readline]
62 + $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \
63 + python{2_7,3_4,3_5} pypy)
64 + >=dev-python/lxml-3.6.0[${PYTHON_USEDEP}]
65 + >=sys-apps/sed-4.0.5
66 + )
67 + elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
68 + elibc_glibc? ( >=sys-apps/sandbox-2.2 )
69 + elibc_musl? ( >=sys-apps/sandbox-2.2 )
70 + elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
71 + >=app-misc/pax-utils-0.1.17
72 + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
73 + xattr? ( kernel_linux? (
74 + >=sys-apps/install-xattr-0.3
75 + $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
76 + python2_7 pypy)
77 + ) )
78 + !app-portage/repoman
79 + !sys-apps/portage"
80 +PDEPEND="
81 + !build? (
82 + >=net-misc/rsync-2.6.4
83 + )"
84 +# NOTE: FEATURES=installsources requires debugedit and rsync
85 +
86 +pkg_pretend() {
87 + if [[ -f ${EROOT%/}/etc/make.conf ]]; then
88 + eerror "You seem to be using /etc/make.conf. Please migrate to the new"
89 + eerror "/etc/portage/make.conf location before upgrading."
90 + if [[ ! -f ${EROOT%/}/etc/portage/make.conf ]]; then
91 + eerror
92 + eerror " mv ${EROOT%/}/etc/make.conf ${EROOT%/}/etc/portage/make.conf"
93 + else
94 + ewarn
95 + ewarn "WARNING: You seem to have make.conf in both locations. Please take"
96 + ewarn "care not to accientally overwrite one with the other."
97 + fi
98 + die "${EROOT%/}/etc/make.conf present"
99 + fi
100 +
101 + if [[ -f ${EROOT%/}/etc/portage/package.keywords ]]; then
102 + eerror "You seem to be using /etc/portage/package.keywords. Please migrate"
103 + eerror "to the new /etc/portage/package.accept_keywords location before"
104 + eerror "upgrading."
105 + eerror
106 + if [[ -d ${EROOT%/}/etc/portage/package.accept_keywords ]]; then
107 + eerror " mv ${EROOT%/}/etc/portage/package.keywords ${EROOT%/}/etc/portage/package.accept_keywords/99old"
108 + else
109 + if [[ -f ${EROOT%/}/etc/portage/package.accept_keywords ]]; then
110 + eerror " cat ${EROOT%/}/etc/portage/package.accept_keywords >> ${EROOT%/}/etc/portage/package.keywords"
111 + fi
112 + eerror " mv ${EROOT%/}/etc/portage/package.keywords ${EROOT%/}/etc/portage/package.accept_keywords"
113 + fi
114 + die "${EROOT%/}/etc/portage/package.keywords present"
115 + fi
116 +
117 + if has_version sys-apps/portage; then
118 + ewarn "If you are migrating from sys-apps/portage to sys-apps/portage-mgorny,"
119 + ewarn "please note that Portage will abort upon having to unmerge itself."
120 + ewarn "However, sys-apps/portage-mgorny will already be installed at this"
121 + ewarn "point, so you simply have to restart emerge and it will successfully"
122 + ewarn "clean the old package afterwards."
123 + ewarn
124 + ewarn "If you did not use '--dynamic-deps n' in Portage, your VDB dependency"
125 + ewarn "graph is probably broken. You may need to use '--changed-deps y'"
126 + ewarn "for your first @world upgrade to resolve the conflicts. Afterwards,"
127 + ewarn "--changed-deps should no longer be necessary and any conflicts"
128 + ewarn "introduced afterwards should be reported to bugs.gentoo.org."
129 + fi
130 +}
131 +
132 +python_prepare_all() {
133 + distutils-r1_python_prepare_all
134 +
135 + if ! use ipc ; then
136 + einfo "Disabling ipc..."
137 + sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
138 + -i pym/_emerge/AbstractEbuildProcess.py ||
139 + die "failed to patch AbstractEbuildProcess.py"
140 + fi
141 +
142 + if use xattr && use kernel_linux ; then
143 + einfo "Adding FEATURES=xattr to make.globals ..."
144 + echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
145 + || die "failed to append to make.globals"
146 + fi
147 +
148 + if [[ -n ${EPREFIX} ]] ; then
149 + einfo "Setting portage.const.EPREFIX ..."
150 + sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
151 + -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
152 + -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
153 + -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
154 + -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
155 + -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
156 + -i pym/portage/const.py ||
157 + die "Failed to patch portage.const.EPREFIX"
158 +
159 + einfo "Prefixing shebangs ..."
160 + while read -r -d $'\0' ; do
161 + local shebang=$(head -n1 "${REPLY}")
162 + if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
163 + sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "${REPLY}" ||
164 + die "sed failed"
165 + fi
166 + done < <(find . -type f -print0)
167 +
168 + einfo "Adjusting make.globals ..."
169 + sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
170 + -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
171 + -i cnf/make.globals || die "sed failed"
172 +
173 + einfo "Adjusting repos.conf ..."
174 + sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
175 + -e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \
176 + -i cnf/repos.conf || die "sed failed"
177 + if prefix-guest ; then
178 + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
179 + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
180 + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
181 + -i cnf/repos.conf || die "sed failed"
182 + fi
183 +
184 + einfo "Adding FEATURES=force-prefix to make.globals ..."
185 + echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
186 + || die "failed to append to make.globals"
187 + fi
188 +
189 + cd "${S}/cnf" || die
190 + if [[ -f make.conf.example.${ARCH}.diff ]]; then
191 + patch make.conf.example "make.conf.example.${ARCH}.diff" ||
192 + die "Failed to patch make.conf.example"
193 + else
194 + eerror ""
195 + eerror "Portage does not have an arch-specific configuration for this arch."
196 + eerror "Please notify the arch maintainer about this issue. Using generic."
197 + eerror ""
198 + fi
199 +}
200 +
201 +python_configure_all() {
202 + cat >> setup.cfg <<-EOF || die
203 + [build_ext]
204 + portage-ext-modules=$(usex native-extensions true false)
205 + EOF
206 +}
207 +
208 +python_test() {
209 + esetup.py test
210 +}
211 +
212 +python_install() {
213 + distutils-r1_python_install \
214 + --system-prefix="${EPREFIX}/usr" \
215 + --bindir="$(python_get_scriptdir)" \
216 + --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
217 + --sysconfdir="${EPREFIX}/etc" \
218 + "${@}"
219 +
220 + keepdir /var/log/portage/elog
221 +}
222 +
223 +pkg_preinst() {
224 + # This is allowed to fail if the user/group are invalid for prefix users.
225 + if chown portage:portage "${ED%/}"/var/log/portage{,/elog} 2>/dev/null ; then
226 + chmod g+s,ug+rwx "${ED%/}"/var/log/portage{,/elog}
227 + fi
228 +}