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