1 |
commit: 8aaf9267a01065f20d6de77135bf4e980b63beb2 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 23 17:04:48 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 23 17:05:06 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8aaf9267 |
7 |
|
8 |
sys-apps/portage-mgorny: Bump to 2.3.24.2 |
9 |
|
10 |
sys-apps/portage-mgorny/Manifest | 1 + |
11 |
.../portage-mgorny/portage-mgorny-2.3.24.2.ebuild | 163 +++++++++++++++++++++ |
12 |
2 files changed, 164 insertions(+) |
13 |
|
14 |
diff --git a/sys-apps/portage-mgorny/Manifest b/sys-apps/portage-mgorny/Manifest |
15 |
index 7badf79f6fb..603db566abe 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.1.tar.gz 1239318 BLAKE2B bfa8418ade600835c90378177bc6cd91f6c17e02c0e05b0829f4ee3b500ce3275fcb76424e19af5618026daa7b79d402aeb0d9f2133e7db09cb8983eeb355427 SHA512 04e3d5ee08f78ba3bb8045c36e7e81b06b7a0aff65a22c82cd2ca6fc0ab9f7b63a49c7eda9048d15fbc9c8d1a898c0d038f7cac2f4daf6d68bb799a9303d74c1 |
20 |
+DIST portage-mgorny-2.3.24.2.tar.gz 1239343 BLAKE2B 701c90d333c10976f11910babed4b002cb545561c931d635973cf9b455a247b050b098c61fca0b20a5a8d70d4478a9daddacc826045e74c52d45878260431c93 SHA512 0319a973a26650ce182c0e1f997399f0c3944474ad5c8c2f88b9588ffbf99ccd12bd84e7537f8368f8362a098a72d177fc3c844e2afc086f95094baa27d97b93 |
21 |
|
22 |
diff --git a/sys-apps/portage-mgorny/portage-mgorny-2.3.24.2.ebuild b/sys-apps/portage-mgorny/portage-mgorny-2.3.24.2.ebuild |
23 |
new file mode 100644 |
24 |
index 00000000000..eb3315f80c8 |
25 |
--- /dev/null |
26 |
+++ b/sys-apps/portage-mgorny/portage-mgorny-2.3.24.2.ebuild |
27 |
@@ -0,0 +1,163 @@ |
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 has_version sys-apps/portage; then |
86 |
+ ewarn "If you are migrating from sys-apps/portage to sys-apps/portage-mgorny," |
87 |
+ ewarn "please note that Portage will abort upon having to unmerge itself." |
88 |
+ ewarn "However, sys-apps/portage-mgorny will already be installed at this" |
89 |
+ ewarn "point, so you simply have to restart emerge and it will successfully" |
90 |
+ ewarn "clean the old package afterwards." |
91 |
+ fi |
92 |
+} |
93 |
+ |
94 |
+python_prepare_all() { |
95 |
+ distutils-r1_python_prepare_all |
96 |
+ |
97 |
+ if ! use ipc ; then |
98 |
+ einfo "Disabling ipc..." |
99 |
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
100 |
+ -i pym/_emerge/AbstractEbuildProcess.py || |
101 |
+ die "failed to patch AbstractEbuildProcess.py" |
102 |
+ fi |
103 |
+ |
104 |
+ if use xattr && use kernel_linux ; then |
105 |
+ einfo "Adding FEATURES=xattr to make.globals ..." |
106 |
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
107 |
+ || die "failed to append to make.globals" |
108 |
+ fi |
109 |
+ |
110 |
+ if [[ -n ${EPREFIX} ]] ; then |
111 |
+ einfo "Setting portage.const.EPREFIX ..." |
112 |
+ sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \ |
113 |
+ -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \ |
114 |
+ -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \ |
115 |
+ -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \ |
116 |
+ -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \ |
117 |
+ -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \ |
118 |
+ -i pym/portage/const.py || |
119 |
+ die "Failed to patch portage.const.EPREFIX" |
120 |
+ |
121 |
+ einfo "Prefixing shebangs ..." |
122 |
+ while read -r -d $'\0' ; do |
123 |
+ local shebang=$(head -n1 "${REPLY}") |
124 |
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
125 |
+ sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "${REPLY}" || |
126 |
+ die "sed failed" |
127 |
+ fi |
128 |
+ done < <(find . -type f -print0) |
129 |
+ |
130 |
+ einfo "Adjusting make.globals ..." |
131 |
+ sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \ |
132 |
+ -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \ |
133 |
+ -i cnf/make.globals || die "sed failed" |
134 |
+ |
135 |
+ einfo "Adjusting repos.conf ..." |
136 |
+ sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \ |
137 |
+ -e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \ |
138 |
+ -i cnf/repos.conf || die "sed failed" |
139 |
+ if prefix-guest ; then |
140 |
+ sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
141 |
+ -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |
142 |
+ -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \ |
143 |
+ -i cnf/repos.conf || die "sed failed" |
144 |
+ fi |
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_configure_all() { |
164 |
+ cat >> setup.cfg <<-EOF || die |
165 |
+ [build_ext] |
166 |
+ portage-ext-modules=$(usex native-extensions true false) |
167 |
+ EOF |
168 |
+} |
169 |
+ |
170 |
+python_test() { |
171 |
+ esetup.py test |
172 |
+} |
173 |
+ |
174 |
+python_install() { |
175 |
+ distutils-r1_python_install \ |
176 |
+ --system-prefix="${EPREFIX}/usr" \ |
177 |
+ --bindir="$(python_get_scriptdir)" \ |
178 |
+ --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ |
179 |
+ --sysconfdir="${EPREFIX}/etc" \ |
180 |
+ "${@}" |
181 |
+ |
182 |
+ keepdir /var/log/portage/elog |
183 |
+} |
184 |
+ |
185 |
+pkg_preinst() { |
186 |
+ # This is allowed to fail if the user/group are invalid for prefix users. |
187 |
+ if chown portage:portage "${ED%/}"/var/log/portage{,/elog} 2>/dev/null ; then |
188 |
+ chmod g+s,ug+rwx "${ED%/}"/var/log/portage{,/elog} |
189 |
+ fi |
190 |
+} |