1 |
commit: 1357c8a82ddd4f787ab43ff458cf0eb05b8cc6e7 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 28 18:34:41 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 28 18:43:25 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1357c8a8 |
7 |
|
8 |
sys-apps/portage-mgorny: Bump to 2.3.24.5 |
9 |
|
10 |
sys-apps/portage-mgorny/Manifest | 1 + |
11 |
.../portage-mgorny/portage-mgorny-2.3.24.5.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 cebabb865d5..289ceb36dd1 100644 |
16 |
--- a/sys-apps/portage-mgorny/Manifest |
17 |
+++ b/sys-apps/portage-mgorny/Manifest |
18 |
@@ -1 +1,2 @@ |
19 |
DIST portage-mgorny-2.3.24.4.tar.gz 1235738 BLAKE2B 4365b4c2ac754b6a09a19598d7e4bddc16575b17dcd3e6dabcbb58ddd905a548da5d7c5a660e8bb8e638e39bf8803869144f08f6ece34775e79dd70f4be6d933 SHA512 ed5f14a457d00951f4af6b76db501f33523b6a19f2983d1b7acaa62f7eee90b8facf834f88d4de2dea26f12b7f373c64771c9f797af6c82578fb45b8db8ef678 |
20 |
+DIST portage-mgorny-2.3.24.5.tar.gz 1236839 BLAKE2B 388ef0e61c33a3c9db8e2b9e0e2ddef5e163a522156bb3021c00da7006c298681297ab636f5ab64ebca4ceb07488616a3e2a96aca454db6721dea0d258ded7cc SHA512 18fe8037076f62b1683bf2b861af4ce9dfc90791d5f9bb0e6b4aab356804d4e894322a2c87f0413a4f8b664584d4d24fb5aeedef276286f0896e16915342af26 |
21 |
|
22 |
diff --git a/sys-apps/portage-mgorny/portage-mgorny-2.3.24.5.ebuild b/sys-apps/portage-mgorny/portage-mgorny-2.3.24.5.ebuild |
23 |
new file mode 100644 |
24 |
index 00000000000..39117506dcf |
25 |
--- /dev/null |
26 |
+++ b/sys-apps/portage-mgorny/portage-mgorny-2.3.24.5.ebuild |
27 |
@@ -0,0 +1,199 @@ |
28 |
+# Copyright 1999-2018 Gentoo Foundation |
29 |
+# Distributed under the terms of the GNU General Public License v2 |
30 |
+ |
31 |
+EAPI=6 |
32 |
+ |
33 |
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} pypy ) |
34 |
+PYTHON_REQ_USE='bzip2(+),threads(+)' |
35 |
+ |
36 |
+inherit distutils-r1 |
37 |
+ |
38 |
+DESCRIPTION="Fork of Portage focused on cleaning up and useful features" |
39 |
+HOMEPAGE="https://github.com/mgorny/portage" |
40 |
+SRC_URI="https://github.com/mgorny/portage/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
41 |
+S=${WORKDIR}/portage-${PV} |
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 |
+} |