Gentoo Archives: gentoo-commits

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