1 |
zmedico 08/10/09 16:59:05 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: portage-2.1.4.5.ebuild |
5 |
Log: |
6 |
2.1.4.5 stable bump for security bug #239560 (insecure search path for |
7 |
python -c). This also fixes bugs #222091 (mysterious 'Argument list too |
8 |
long' errors), #239006 (dependency issues triggered by EAPI bump without |
9 |
revbump), and #239471 (EAPI 2 triggers InvalidDependString during --search). |
10 |
Bug #240304 tracks all bugs fixed since 2.1.4.4. |
11 |
(Portage version: 2.2_rc11_p11661/cvs/Linux 2.6.26-0911-x86-64 i686, RepoMan options: --force) |
12 |
|
13 |
Revision Changes Path |
14 |
1.545 sys-apps/portage/ChangeLog |
15 |
|
16 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.545&view=markup |
17 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.545&content-type=text/plain |
18 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.544&r2=1.545 |
19 |
|
20 |
Index: ChangeLog |
21 |
=================================================================== |
22 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v |
23 |
retrieving revision 1.544 |
24 |
retrieving revision 1.545 |
25 |
diff -u -r1.544 -r1.545 |
26 |
--- ChangeLog 26 Sep 2008 16:12:26 -0000 1.544 |
27 |
+++ ChangeLog 9 Oct 2008 16:59:05 -0000 1.545 |
28 |
@@ -1,6 +1,16 @@ |
29 |
# ChangeLog for sys-apps/portage |
30 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
31 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.544 2008/09/26 16:12:26 zmedico Exp $ |
32 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.545 2008/10/09 16:59:05 zmedico Exp $ |
33 |
+ |
34 |
+*portage-2.1.4.5 (09 Oct 2008) |
35 |
+ |
36 |
+ 09 Oct 2008; Zac Medico <zmedico@g.o> +files/portage-2.1.4.5.patch, |
37 |
+ +portage-2.1.4.5.ebuild: |
38 |
+ 2.1.4.5 stable bump for security bug #239560 (insecure search path for |
39 |
+ python -c). This also fixes bugs #222091 (mysterious 'Argument list too |
40 |
+ long' errors), #239006 (dependency issues triggered by EAPI bump without |
41 |
+ revbump), and #239471 (EAPI 2 triggers InvalidDependString during --search). |
42 |
+ Bug #240304 tracks all bugs fixed since 2.1.4.4. |
43 |
|
44 |
*portage-2.2_rc11 (26 Sep 2008) |
45 |
|
46 |
|
47 |
|
48 |
|
49 |
1.1 sys-apps/portage/portage-2.1.4.5.ebuild |
50 |
|
51 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/portage-2.1.4.5.ebuild?rev=1.1&view=markup |
52 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/portage/portage-2.1.4.5.ebuild?rev=1.1&content-type=text/plain |
53 |
|
54 |
Index: portage-2.1.4.5.ebuild |
55 |
=================================================================== |
56 |
# Copyright 1999-2008 Gentoo Foundation |
57 |
# Distributed under the terms of the GNU General Public License v2 |
58 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.4.5.ebuild,v 1.1 2008/10/09 16:59:05 zmedico Exp $ |
59 |
|
60 |
inherit toolchain-funcs eutils flag-o-matic multilib |
61 |
|
62 |
DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
63 |
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" |
64 |
LICENSE="GPL-2" |
65 |
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" |
66 |
PROVIDE="virtual/portage" |
67 |
SLOT="0" |
68 |
IUSE="build doc epydoc selinux linguas_pl" |
69 |
DEPEND=">=dev-lang/python-2.4 |
70 |
!build? ( >=sys-apps/sed-4.0.5 ) |
71 |
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
72 |
epydoc? ( >=dev-python/epydoc-2.0 )" |
73 |
RDEPEND=">=dev-lang/python-2.4 |
74 |
!build? ( >=sys-apps/sed-4.0.5 |
75 |
>=app-shells/bash-3.2_p17 ) |
76 |
elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
77 |
elibc_glibc? ( >=sys-apps/sandbox-1.2.17 !mips? ( >=sys-apps/sandbox-1.2.18.1-r2 ) ) |
78 |
elibc_uclibc? ( >=sys-apps/sandbox-1.2.17 !mips? ( >=sys-apps/sandbox-1.2.18.1-r2 ) ) |
79 |
>=app-misc/pax-utils-0.1.13 |
80 |
selinux? ( >=dev-python/python-selinux-2.16 )" |
81 |
PDEPEND=" |
82 |
!build? ( |
83 |
>=net-misc/rsync-2.6.4 |
84 |
userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
85 |
|| ( >=dev-lang/python-2.5 >=dev-python/pycrypto-2.0.1-r6 ) |
86 |
)" |
87 |
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
88 |
# rsync-2.6.4 rdep is for the --filter option #167668 |
89 |
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" |
90 |
|
91 |
PV_PL="2.1.2" |
92 |
PATCHVER_PL="" |
93 |
TARBALL_PV="2.1.4" |
94 |
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
95 |
${SRC_ARCHIVES}/${PN}-${TARBALL_PV}.tar.bz2 |
96 |
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 |
97 |
${SRC_ARCHIVES}/${PN}-man-pl-${PV_PL}.tar.bz2 )" |
98 |
|
99 |
PATCHVER="2.1.4.4" |
100 |
if [ -n "${PATCHVER}" ]; then |
101 |
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 |
102 |
${SRC_ARCHIVES}/${PN}-${PATCHVER}.patch.bz2" |
103 |
fi |
104 |
|
105 |
if [ -n "${PATCHVER_PL}" ]; then |
106 |
SRC_URI="${SRC_URI} linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}${PATCHVER_PL}.patch.bz2 |
107 |
${SRC_ARCHIVES}/${PN}-man-pl-${PV_PL}${PATCHVER_PL}.patch.bz2 )" |
108 |
fi |
109 |
|
110 |
S="${WORKDIR}"/${PN}-${TARBALL_PV} |
111 |
S_PL="${WORKDIR}"/${PN}-${PV_PL} |
112 |
|
113 |
portage_docs() { |
114 |
elog "" |
115 |
elog "For help with using portage please consult the Gentoo Handbook" |
116 |
elog "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" |
117 |
elog "" |
118 |
} |
119 |
|
120 |
src_unpack() { |
121 |
unpack ${A} |
122 |
cd "${S}" |
123 |
if [ -n "${PATCHVER}" ]; then |
124 |
cd "${S}" |
125 |
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" |
126 |
fi |
127 |
epatch "$FILESDIR"/portage-2.1.4.5.patch |
128 |
einfo "Setting portage.VERSION to ${PVR} ..." |
129 |
sed -i "s/^VERSION=.*/VERSION=\"${PVR}\"/" pym/portage.py || \ |
130 |
die "Failed to patch portage.VERSION" |
131 |
eend 0 |
132 |
if [ -n "${PATCHVER_PL}" ]; then |
133 |
use linguas_pl && \ |
134 |
epatch "${WORKDIR}/${PN}-man-pl-${PV_PL}${PATCHVER_PL}.patch" |
135 |
fi |
136 |
} |
137 |
|
138 |
src_compile() { |
139 |
append-lfs-flags |
140 |
|
141 |
cd "${S}"/src |
142 |
$(tc-getCC) ${CFLAGS} ${LDFLAGS} -o tbz2tool tbz2tool.c || \ |
143 |
die "Failed to build tbz2tool" |
144 |
|
145 |
if use doc; then |
146 |
cd "${S}"/doc |
147 |
touch fragment/date |
148 |
sed -i "s/svn-trunk/${PVR}/" fragment/version |
149 |
make xhtml xhtml-nochunks || die "failed to make docs" |
150 |
fi |
151 |
|
152 |
if use epydoc; then |
153 |
einfo "Generating api docs" |
154 |
mkdir "${WORKDIR}"/api |
155 |
local my_modules |
156 |
my_modules="$(find "${S}/pym" -name "*.py" \ |
157 |
| sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ |
158 |
-e 's:/:.:g')" || die "error listing modules" |
159 |
PYTHONPATH="${S}/pym:${PYTHONPATH}" epydoc -o "${WORKDIR}"/api \ |
160 |
-qqqqq --no-frames --show-imports \ |
161 |
--name "${PN}" --url "${HOMEPAGE}" \ |
162 |
${my_modules} || die "epydoc failed" |
163 |
fi |
164 |
} |
165 |
|
166 |
src_test() { |
167 |
./tests/runTests || \ |
168 |
die "test(s) failed" |
169 |
} |
170 |
|
171 |
src_install() { |
172 |
local libdir=$(get_libdir) |
173 |
local portage_base="/usr/${libdir}/portage" |
174 |
cd "${S}"/cnf |
175 |
insinto /etc |
176 |
doins etc-update.conf dispatch-conf.conf make.globals |
177 |
if [ -f "make.conf.${ARCH}".diff ]; then |
178 |
patch make.conf "make.conf.${ARCH}".diff || \ |
179 |
die "Failed to patch make.conf.example" |
180 |
newins make.conf make.conf.example |
181 |
else |
182 |
eerror "" |
183 |
eerror "Portage does not have an arch-specific configuration for this arch." |
184 |
eerror "Please notify the arch maintainer about this issue. Using generic." |
185 |
eerror "" |
186 |
newins make.conf make.conf.example |
187 |
fi |
188 |
|
189 |
insinto /etc/logrotate.d |
190 |
doins "${S}"/cnf/logrotate.d/elog-save-summary |
191 |
|
192 |
dodir ${portage_base}/bin |
193 |
exeinto ${portage_base}/bin |
194 |
# BSD and OSX need a sed wrapper so that find/xargs work properly |
195 |
if use userland_GNU; then |
196 |
rm "${S}"/bin/sed || die "Failed to remove sed wrapper" |
197 |
fi |
198 |
cd "${S}"/bin |
199 |
doexe * |
200 |
doexe "${S}"/src/tbz2tool |
201 |
dosym newins ${portage_base}/bin/donewins |
202 |
|
203 |
local mydir |
204 |
for mydir in pym pym/cache pym/elog_modules; do |
205 |
dodir ${portage_base}/${mydir} |
206 |
insinto ${portage_base}/${mydir} |
207 |
cd "${S}"/${mydir} |
208 |
doins *.py |
209 |
done |
210 |
|
211 |
doman "${S}"/man/*.[0-9] |
212 |
if use linguas_pl; then |
213 |
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] |
214 |
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] |
215 |
fi |
216 |
dodoc "${S}"/ChangeLog |
217 |
dodoc "${S}"/NEWS |
218 |
dodoc "${S}"/RELEASE-NOTES |
219 |
use doc && dohtml "${S}"/doc/*.html |
220 |
use epydoc && dohtml -r "${WORKDIR}"/api |
221 |
|
222 |
dodir /usr/bin |
223 |
local x |
224 |
for x in ebuild emerge portageq repoman tbz2tool xpak; do |
225 |
dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} |
226 |
done |
227 |
|
228 |
dodir /usr/sbin |
229 |
local my_syms="archive-conf |
230 |
dispatch-conf |
231 |
emaint |
232 |
emerge-webrsync |
233 |
env-update |
234 |
etc-update |
235 |
fixpackages |
236 |
quickpkg |
237 |
regenworld" |
238 |
local x |
239 |
for x in ${my_syms}; do |
240 |
dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} |
241 |
done |
242 |
dosym env-update /usr/sbin/update-env |
243 |
dosym etc-update /usr/sbin/update-etc |
244 |
|
245 |
dodir /etc/portage |
246 |
keepdir /etc/portage |
247 |
|
248 |
echo PYTHONPATH=\"${portage_base}/pym\" > "${WORKDIR}"/05portage.envd |
249 |
doenvd "${WORKDIR}"/05portage.envd |
250 |
} |
251 |
|
252 |
pkg_preinst() { |
253 |
if ! use build && ! has_version dev-python/pycrypto && \ |
254 |
has_version '>=dev-lang/python-2.5' ; then |
255 |
if ! built_with_use '>=dev-lang/python-2.5' ssl ; then |
256 |
echo "If you are a Gentoo developer and you plan to" \ |
257 |
"commit ebuilds with this system then please install" \ |
258 |
"pycrypto or enable python's ssl USE flag in order" \ |
259 |
"to enable RMD160 hash support. See bug #198398 for" \ |
260 |
"more information." | \ |
261 |
fmt -w 70 | while read line ; do ewarn "${line}" ; done |
262 |
fi |
263 |
fi |
264 |
local portage_base="/usr/$(get_libdir)/portage" |
265 |
if has livecvsportage ${FEATURES} && [ "${ROOT}" = "/" ]; then |
266 |
rm -rf "${D}"/${portage_base}/pym/* |
267 |
mv "${D}"/${portage_base}/bin/tbz2tool "${T}" |
268 |
rm -rf "${D}"/${portage_base}/bin/* |
269 |
mv "${T}"/tbz2tool "${D}"/${portage_base}/bin/ |
270 |
fi |
271 |
} |
272 |
|
273 |
pkg_postinst() { |
274 |
local x |
275 |
|
276 |
if [ ! -f "${ROOT}/var/lib/portage/world" ] && |
277 |
[ -f "${ROOT}"/var/cache/edb/world ] && |
278 |
[ ! -h "${ROOT}"/var/cache/edb/world ]; then |
279 |
mv "${ROOT}"/var/cache/edb/world "${ROOT}"/var/lib/portage/world |
280 |
ln -s ../../lib/portage/world /var/cache/edb/world |
281 |
fi |
282 |
|
283 |
for x in "${ROOT}"/etc/._cfg????_make.globals; do |
284 |
# Overwrite the globals file automatically. |
285 |
[ -e "${x}" ] && mv -f "${x}" "${ROOT}etc/make.globals" |
286 |
done |
287 |
|
288 |
# Compile all source files recursively. Any orphans |
289 |
# will be identified and removed in postrm. |
290 |
compile_all_python_bytecodes "${ROOT}usr/$(get_libdir)/portage/pym" |
291 |
|
292 |
echo "If you have an overlay then you should remove **/files/digest-*" \ |
293 |
"files (Manifest1) because they are no longer supported. If earlier" \ |
294 |
"versions of portage will be used to generate manifests for your overlay" \ |
295 |
"then you should add a file named manifest1_obsolete to the root of the" \ |
296 |
"repository in order to disable generation of the" \ |
297 |
"Manifest1 digest files." | fmt -w 75 | while read x ; do elog "$x" ; done |
298 |
|
299 |
portage_docs |
300 |
} |
301 |
|
302 |
pkg_postrm() { |
303 |
remove_orphan_python_bytecodes "${ROOT}usr/$(get_libdir)/portage/pym" |
304 |
} |
305 |
|
306 |
compile_all_python_bytecodes() { |
307 |
python -c "from compileall import compile_dir; compile_dir('${1}', quiet=True)" |
308 |
python -O -c "from compileall import compile_dir; compile_dir('${1}', quiet=True)" |
309 |
} |
310 |
|
311 |
remove_orphan_python_bytecodes() { |
312 |
[[ -d ${1} ]] || return |
313 |
find "${1}" -name '*.py[co]' -print0 | \ |
314 |
while read -d $'\0' f ; do |
315 |
src_py=${f%[co]} |
316 |
[[ -f ${src_py} ]] && continue |
317 |
rm -f "${src_py}"[co] |
318 |
done |
319 |
} |