1 |
vapier 12/05/30 18:27:48 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: busybox-1.20.1.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
|
8 |
(Portage version: HEAD/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.310 sys-apps/busybox/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.310&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.310&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/ChangeLog?r1=1.309&r2=1.310 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v |
20 |
retrieving revision 1.309 |
21 |
retrieving revision 1.310 |
22 |
diff -u -r1.309 -r1.310 |
23 |
--- ChangeLog 26 May 2012 00:07:11 -0000 1.309 |
24 |
+++ ChangeLog 30 May 2012 18:27:47 -0000 1.310 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for sys-apps/busybox |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.309 2012/05/26 00:07:11 vapier Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.310 2012/05/30 18:27:47 vapier Exp $ |
30 |
+ |
31 |
+*busybox-1.20.1 (30 May 2012) |
32 |
+ |
33 |
+ 30 May 2012; Mike Frysinger <vapier@g.o> +busybox-1.20.1.ebuild: |
34 |
+ Version bump. |
35 |
|
36 |
26 May 2012; Mike Frysinger <vapier@g.o> busybox-1.19.3-r1.ebuild, |
37 |
busybox-1.20.0.ebuild, busybox-9999.ebuild: |
38 |
|
39 |
|
40 |
|
41 |
1.1 sys-apps/busybox/busybox-1.20.1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/busybox-1.20.1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/busybox-1.20.1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: busybox-1.20.1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2012 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.20.1.ebuild,v 1.1 2012/05/30 18:27:47 vapier Exp $ |
51 |
|
52 |
EAPI="4" |
53 |
inherit eutils flag-o-matic savedconfig toolchain-funcs multilib |
54 |
|
55 |
################################################################################ |
56 |
# BUSYBOX ALTERNATE CONFIG MINI-HOWTO |
57 |
# |
58 |
# Busybox can be modified in many different ways. Here's a few ways to do it: |
59 |
# |
60 |
# (1) Emerge busybox with FEATURES=keepwork so the work directory won't |
61 |
# get erased afterwards. Add a definition like ROOT=/my/root/path to the |
62 |
# start of the line if you're installing to somewhere else than the root |
63 |
# directory. This command will save the default configuration to |
64 |
# ${PORTAGE_CONFIGROOT} (or ${ROOT} if ${PORTAGE_CONFIGROOT} is not |
65 |
# defined), and it will tell you that it has done this. Note the location |
66 |
# where the config file was saved. |
67 |
# |
68 |
# FEATURES=keepwork USE=savedconfig emerge busybox |
69 |
# |
70 |
# (2) Go to the work directory and change the configuration of busybox using its |
71 |
# menuconfig feature. |
72 |
# |
73 |
# cd /var/tmp/portage/busybox*/work/busybox-* |
74 |
# make menuconfig |
75 |
# |
76 |
# (3) Save your configuration to the default location and copy it to the |
77 |
# one of the locations listed in /usr/portage/eclass/savedconfig.eclass |
78 |
# |
79 |
# (4) Emerge busybox with USE=savedconfig to use the configuration file you |
80 |
# just generated. |
81 |
# |
82 |
################################################################################ |
83 |
# |
84 |
# (1) Alternatively skip the above steps and simply emerge busybox without |
85 |
# USE=savedconfig. |
86 |
# |
87 |
# (2) Edit the file it saves by hand. ${ROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF} |
88 |
# |
89 |
# (3) Remerge busybox as using USE=savedconfig. |
90 |
# |
91 |
################################################################################ |
92 |
|
93 |
DESCRIPTION="Utilities for rescue and embedded systems" |
94 |
HOMEPAGE="http://www.busybox.net/" |
95 |
if [[ ${PV} == "9999" ]] ; then |
96 |
MY_P=${PN} |
97 |
EGIT_REPO_URI="git://busybox.net/busybox.git" |
98 |
inherit git-2 |
99 |
else |
100 |
MY_P=${PN}-${PV/_/-} |
101 |
SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2" |
102 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
103 |
fi |
104 |
|
105 |
LICENSE="GPL-2" |
106 |
SLOT="0" |
107 |
IUSE="ipv6 livecd make-symlinks math mdev -pam selinux sep-usr static" |
108 |
RESTRICT="test" |
109 |
|
110 |
RDEPEND="selinux? ( sys-libs/libselinux ) |
111 |
pam? ( sys-libs/pam )" |
112 |
DEPEND="${RDEPEND} |
113 |
>=sys-kernel/linux-headers-2.6.39" |
114 |
|
115 |
S=${WORKDIR}/${MY_P} |
116 |
|
117 |
busybox_config_option() { |
118 |
case $1 in |
119 |
y) sed -i -e "s:.*\<CONFIG_$2\>.*set:CONFIG_$2=y:g" .config;; |
120 |
n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;; |
121 |
*) use $1 \ |
122 |
&& busybox_config_option y $2 \ |
123 |
|| busybox_config_option n $2 |
124 |
return 0 |
125 |
;; |
126 |
esac |
127 |
einfo $(grep "CONFIG_$2[= ]" .config || echo Could not find CONFIG_$2 ...) |
128 |
} |
129 |
|
130 |
src_prepare() { |
131 |
unset KBUILD_OUTPUT #88088 |
132 |
append-flags -fno-strict-aliasing #310413 |
133 |
use ppc64 && append-flags -mminimal-toc #130943 |
134 |
|
135 |
# patches go here! |
136 |
epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch |
137 |
#epatch "${FILESDIR}"/${P}-*.patch |
138 |
cp "${FILESDIR}"/ginit.c init/ || die |
139 |
|
140 |
# flag cleanup |
141 |
sed -i -r \ |
142 |
-e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ |
143 |
Makefile.flags || die |
144 |
#sed -i '/bbsh/s:^//::' include/applets.h |
145 |
sed -i '/^#error Aborting compilation./d' applets/applets.c || die |
146 |
use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile |
147 |
sed -i \ |
148 |
-e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ |
149 |
-e "/^AR\>/s:=.*:= $(tc-getAR):" \ |
150 |
-e "/^CC\>/s:=.*:= $(tc-getCC):" \ |
151 |
-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ |
152 |
Makefile || die |
153 |
sed -i \ |
154 |
-e 's:-static-libgcc::' \ |
155 |
Makefile.flags || die |
156 |
} |
157 |
|
158 |
src_configure() { |
159 |
# check for a busybox config before making one of our own. |
160 |
# if one exist lets return and use it. |
161 |
|
162 |
restore_config .config |
163 |
if [ -f .config ]; then |
164 |
yes "" | emake -j1 oldconfig > /dev/null |
165 |
return 0 |
166 |
else |
167 |
ewarn "Could not locate user configfile, so we will save a default one" |
168 |
fi |
169 |
|
170 |
# setup the config file |
171 |
emake -j1 allyesconfig > /dev/null |
172 |
# nommu forces a bunch of things off which we want on #387555 |
173 |
busybox_config_option n NOMMU |
174 |
sed -i '/^#/d' .config |
175 |
yes "" | emake -j1 oldconfig >/dev/null |
176 |
|
177 |
# now turn off stuff we really don't want |
178 |
busybox_config_option n DMALLOC |
179 |
busybox_config_option n FEATURE_SUID_CONFIG |
180 |
busybox_config_option n BUILD_AT_ONCE |
181 |
busybox_config_option n BUILD_LIBBUSYBOX |
182 |
busybox_config_option n MONOTONIC_SYSCALL |
183 |
busybox_config_option n WERROR |
184 |
|
185 |
# If these are not set and we are using a uclibc/busybox setup |
186 |
# all calls to system() will fail. |
187 |
busybox_config_option y ASH |
188 |
busybox_config_option n HUSH |
189 |
|
190 |
# disable ipv6 applets |
191 |
if ! use ipv6; then |
192 |
busybox_config_option n FEATURE_IPV6 |
193 |
busybox_config_option n TRACEROUTE6 |
194 |
busybox_config_option n PING6 |
195 |
fi |
196 |
|
197 |
if use static && use pam ; then |
198 |
ewarn "You cannot have USE='static pam'. Assuming static is more important." |
199 |
fi |
200 |
use static \ |
201 |
&& busybox_config_option n PAM \ |
202 |
|| busybox_config_option pam PAM |
203 |
busybox_config_option static STATIC |
204 |
busybox_config_option math FEATURE_AWK_LIBM |
205 |
|
206 |
# all the debug options are compiler related, so punt them |
207 |
busybox_config_option n DEBUG |
208 |
busybox_config_option y NO_DEBUG_LIB |
209 |
busybox_config_option n DMALLOC |
210 |
busybox_config_option n EFENCE |
211 |
|
212 |
busybox_config_option selinux SELINUX |
213 |
|
214 |
# this opt only controls mounting with <linux-2.6.23 |
215 |
busybox_config_option n FEATURE_MOUNT_NFS |
216 |
|
217 |
# default a bunch of uncommon options to off |
218 |
local opt |
219 |
for opt in \ |
220 |
ADD_SHELL \ |
221 |
BEEP BOOTCHARTD \ |
222 |
CRONTAB \ |
223 |
DC DEVFSD DNSD DPKG{,_DEB} \ |
224 |
FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \ |
225 |
FEATURE_DEVFS \ |
226 |
HOSTID HUSH \ |
227 |
INETD INOTIFYD IPCALC \ |
228 |
LOCALE_SUPPORT LOGNAME LPD \ |
229 |
MAKEMIME MKFS_MINIX MSH \ |
230 |
OD \ |
231 |
RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \ |
232 |
SLATTACH SMEMCAP SULOGIN SV{,LOGD} \ |
233 |
TASKSET TCPSVD \ |
234 |
RPM RPM2CPIO \ |
235 |
UDPSVD UUDECODE UUENCODE |
236 |
do |
237 |
busybox_config_option n ${opt} |
238 |
done |
239 |
|
240 |
emake -j1 oldconfig > /dev/null |
241 |
} |
242 |
|
243 |
src_compile() { |
244 |
unset KBUILD_OUTPUT #88088 |
245 |
export SKIP_STRIP=y |
246 |
|
247 |
emake V=1 busybox |
248 |
if ! use static ; then |
249 |
cp .config{,.bak} |
250 |
mv busybox_unstripped{,.bak} |
251 |
use pam && busybox_config_option n PAM |
252 |
emake CONFIG_STATIC=y busybox |
253 |
mv busybox_unstripped bb |
254 |
mv busybox_unstripped{.bak,} |
255 |
mv .config{.bak,} |
256 |
else |
257 |
# keeps src_install simpler |
258 |
ln busybox_unstripped bb |
259 |
fi |
260 |
} |
261 |
|
262 |
src_install() { |
263 |
unset KBUILD_OUTPUT #88088 |
264 |
save_config .config |
265 |
|
266 |
into / |
267 |
dodir /bin |
268 |
if use sep-usr ; then |
269 |
# install /ginit to take care of mounting stuff |
270 |
exeinto / |
271 |
newexe bb ginit |
272 |
dosym /ginit /bin/bb |
273 |
if use static ; then |
274 |
dosym bb /bin/busybox |
275 |
else |
276 |
newbin busybox_unstripped busybox |
277 |
fi |
278 |
else |
279 |
newbin busybox_unstripped busybox |
280 |
if use static ; then |
281 |
dosym busybox /bin/bb |
282 |
else |
283 |
dobin bb |
284 |
fi |
285 |
fi |
286 |
if use mdev ; then |
287 |
dodir /$(get_libdir)/mdev/ |
288 |
use make-symlinks || dosym /bin/bb /sbin/mdev |
289 |
cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf |
290 |
|
291 |
exeinto /$(get_libdir)/mdev/ |
292 |
doexe "${FILESDIR}"/mdev/* |
293 |
|
294 |
newinitd "${FILESDIR}"/mdev.rc.1 mdev |
295 |
fi |
296 |
if use livecd ; then |
297 |
dosym busybox /bin/vi |
298 |
fi |
299 |
|
300 |
# bundle up the symlink files for use later |
301 |
emake DESTDIR="${ED}" install |
302 |
rm _install/bin/busybox |
303 |
tar cf busybox-links.tar -C _install . || : #;die |
304 |
insinto /usr/share/${PN} |
305 |
use make-symlinks && doins busybox-links.tar |
306 |
|
307 |
dodoc AUTHORS README TODO |
308 |
|
309 |
cd docs |
310 |
docinto txt |
311 |
dodoc *.txt |
312 |
docinto pod |
313 |
dodoc *.pod |
314 |
dohtml *.html |
315 |
|
316 |
cd ../examples |
317 |
docinto examples |
318 |
dodoc inittab depmod.pl *.conf *.script undeb unrpm |
319 |
} |
320 |
|
321 |
pkg_preinst() { |
322 |
if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then |
323 |
ewarn "setting USE=make-symlinks and emerging to / is very dangerous." |
324 |
ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." |
325 |
ewarn "If you are creating a binary only and not merging this is probably ok." |
326 |
ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want." |
327 |
die "silly options will destroy your system" |
328 |
fi |
329 |
|
330 |
if use make-symlinks ; then |
331 |
mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die |
332 |
fi |
333 |
} |
334 |
|
335 |
pkg_postinst() { |
336 |
savedconfig_pkg_postinst |
337 |
|
338 |
if use make-symlinks ; then |
339 |
cd "${T}" || die |
340 |
mkdir _install |
341 |
tar xf busybox-links.tar -C _install || die |
342 |
cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" |
343 |
fi |
344 |
|
345 |
if use sep-usr ; then |
346 |
elog "In order to use the sep-usr support, you have to update your" |
347 |
elog "kernel command line. Add the option:" |
348 |
elog " init=/ginit" |
349 |
elog "To launch a different init than /sbin/init, use:" |
350 |
elog " init=/ginit /sbin/yourinit" |
351 |
elog "To get a rescue shell, you may boot with:" |
352 |
elog " init=/ginit bb" |
353 |
fi |
354 |
} |