Gentoo Archives: gentoo-commits

From: Michael Sterrett <mr_bones_@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/busybox/
Date: Wed, 28 Oct 2015 21:29:50
Message-Id: 1446067140.aaeb4496c781b71c516577eaa7b17ca1409c903f.mr_bones_@gentoo
1 commit: aaeb4496c781b71c516577eaa7b17ca1409c903f
2 Author: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 28 17:15:59 2015 +0000
4 Commit: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 28 21:19:00 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaeb4496
7
8 clean out old keyword shadowed versions
9
10 Package-Manager: portage-2.2.20.1
11
12 sys-apps/busybox/Manifest | 5 -
13 sys-apps/busybox/busybox-1.20.2.ebuild | 291 ----------------------------
14 sys-apps/busybox/busybox-1.21.1.ebuild | 299 -----------------------------
15 sys-apps/busybox/busybox-1.22.0.ebuild | 299 -----------------------------
16 sys-apps/busybox/busybox-1.22.1-r1.ebuild | 300 -----------------------------
17 sys-apps/busybox/busybox-1.22.1.ebuild | 299 -----------------------------
18 sys-apps/busybox/busybox-1.23.0-r1.ebuild | 302 ------------------------------
19 7 files changed, 1795 deletions(-)
20
21 diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest
22 index 70008b2..c7e1fc3 100644
23 --- a/sys-apps/busybox/Manifest
24 +++ b/sys-apps/busybox/Manifest
25 @@ -1,8 +1,3 @@
26 -DIST busybox-1.20.2.tar.bz2 2186738 SHA256 eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882 SHA512 089b67cd920f332daf910711739b1e55ba4c76cfa2122dfe5464432e0d76d3af8327837ebc3cc9954deef3e8f766d16a1928aecb2c169fe3de5a722eea7ea3dd WHIRLPOOL aa8fec92d0ac8bb246dea7353537d425a5fecfa0bb807d0e291c7351e8289b84aab83303c45b75f9b7a98cd10177e210511064f0709425c2f84b069fe6a06420
27 DIST busybox-1.21.0.tar.bz2 2200841 SHA256 eb9d268627783297f5f459cb9bd61a94e395dc7cb3647e10ec186e0159aa36ed SHA512 ddafded24881f03db550d9793585bb5442c70f2a60a5d9770126f50981dadfe95fc0b280f83d5b8a8ce21c86bb7ce64e9f1a606cea140fb2f2599a21de55ba31 WHIRLPOOL d50378bb823dd59e8a607ed6a72d4890f4e5ad3304f1ddba9f7f3d49b5ab820acc9daa2b3c4619f8b147dec085c53c3c6f4b4ebe4c60b431299031d2af00a4d3
28 -DIST busybox-1.21.1.tar.bz2 2201917 SHA256 cd5be0912ec856110ae12c76c3ec9cd5cba1df45b5a9da2b095b8284d1481303 SHA512 b1dd626e1c111214ebd9b933ce2465c943fd8a0a515b6962a31f3a76276ff7992c21b7f96eeb9baeb861a5e734689054e6df5dd6414c753c37084e2d705810e1 WHIRLPOOL 8ec0d9c23d8e2eb28e7f8e88f076908cf6a3f7b64aabd0a7a1af2200064a5337c82fdac9450726236e0632faa202ea08396ca5c35e5334c2128a307adbdd736c
29 -DIST busybox-1.22.0.tar.bz2 2218120 SHA256 92f00cd391b7d5fa2215c8450abe2ba15f9d16c226e8855fb21b6c9a5b723a53 SHA512 75d00fbad703d942c5a6882bda0c66fde32fb480ee9693c8da8107c2088ec5c95aad8eb3dbb2feceed095e133916fea27136328b7a1eba47e3b63bf50bc40a66 WHIRLPOOL 055aba8e8d116f664f61458f32c31c08bfdb0db97934eb00af02098981e25665aff16e9a371234a6859e4954d1568603a99ca7d6925cd42a27e7dae30523514f
30 -DIST busybox-1.22.1.tar.bz2 2218650 SHA256 ae0b029d0a9e4dd71a077a790840e496dd838998e4571b87b60fed7462b6678b SHA512 3e99fe373d638f714c3a61e1b02493d85ca532f472df038f7557db518ded38347072882ed568852941be7aac46fc34007257b4287375335ff5a09b60b295ce80 WHIRLPOOL 8f022480960b81d673772bdda857b5b3860edd893a833a64f5184ec6816b6b0f328079ca67ec1ba1d288a7c4b805b39c6038f0d385884762a396a86ccea7b0c8
31 -DIST busybox-1.23.0.tar.bz2 2253001 SHA256 483ab594dd962ddbb332fd24e36ffdd6e36ac2182fbff055c56e1ca49fda09e4 SHA512 02c8f9dd9e47ad67b417fa58ba952bbdda6e79bad5399fba3d8217803053c2fd045228bd76d56e97d40c98296841dc66e4fa829887c05378a83bdeabafeb7f72 WHIRLPOOL 01d68487d4d3cff4fb807970446f42db1dec3309fdd3fb0402f138eee28dc0885dba324b5b12b417effd4fad87581a32da09a0e9f7c050377025a52ecce2308b
32 DIST busybox-1.23.1.tar.bz2 2252635 SHA256 300f1db0a7ca4ecee8f8d8027aba250b903372e8339b7d9123d37c1e900473bf SHA512 60849c220dde596c4197f16dd844573b24dd46c8544345a2d5a2b1976fa0ac340d22fbc97f5a1437b7de1c04f4e16aa07b3d62bc77eb83b2467582a50ed4b362 WHIRLPOOL 7cd25e42e74663849b094df699a72deaf02b1088064a511341f76aaa419c936557bbafd54523c6818082dfd4e17605f06ee51abed238ef57a56a9be12c910f99
33 DIST busybox-1.23.2.tar.bz2 2252786 SHA256 05a6f9e21aad8c098e388ae77de7b2361941afa7157ef74216703395b14e319a SHA512 209c8ef26e40ccb81510f6b663202b080f9bbecac7faf386bbabf7e36a43d63b15dd6ce9f7a84c1ccc5345c524999812251da1e113ef9faadc6af1fedd24c7c9 WHIRLPOOL a0396f7f49ae702f1617e72d5d4646aceec4eba67219c7125bd8d0926d1acb1ef41ea15a7406c3cf5e5e0d8925cc75910ed5128e5fbdd257b80e2cb4f7a048a2
34
35 diff --git a/sys-apps/busybox/busybox-1.20.2.ebuild b/sys-apps/busybox/busybox-1.20.2.ebuild
36 deleted file mode 100644
37 index 465f436..0000000
38 --- a/sys-apps/busybox/busybox-1.20.2.ebuild
39 +++ /dev/null
40 @@ -1,291 +0,0 @@
41 -# Copyright 1999-2013 Gentoo Foundation
42 -# Distributed under the terms of the GNU General Public License v2
43 -# $Id$
44 -
45 -EAPI="4"
46 -inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
47 -
48 -################################################################################
49 -# BUSYBOX ALTERNATE CONFIG MINI-HOWTO
50 -#
51 -# Busybox can be modified in many different ways. Here's a few ways to do it:
52 -#
53 -# (1) Emerge busybox with FEATURES=keepwork so the work directory won't
54 -# get erased afterwards. Add a definition like ROOT=/my/root/path to the
55 -# start of the line if you're installing to somewhere else than the root
56 -# directory. This command will save the default configuration to
57 -# ${PORTAGE_CONFIGROOT} (or ${ROOT} if ${PORTAGE_CONFIGROOT} is not
58 -# defined), and it will tell you that it has done this. Note the location
59 -# where the config file was saved.
60 -#
61 -# FEATURES=keepwork USE=savedconfig emerge busybox
62 -#
63 -# (2) Go to the work directory and change the configuration of busybox using its
64 -# menuconfig feature.
65 -#
66 -# cd /var/tmp/portage/busybox*/work/busybox-*
67 -# make menuconfig
68 -#
69 -# (3) Save your configuration to the default location and copy it to the
70 -# one of the locations listed in /usr/portage/eclass/savedconfig.eclass
71 -#
72 -# (4) Emerge busybox with USE=savedconfig to use the configuration file you
73 -# just generated.
74 -#
75 -################################################################################
76 -#
77 -# (1) Alternatively skip the above steps and simply emerge busybox without
78 -# USE=savedconfig.
79 -#
80 -# (2) Edit the file it saves by hand. ${ROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF}
81 -#
82 -# (3) Remerge busybox as using USE=savedconfig.
83 -#
84 -################################################################################
85 -
86 -DESCRIPTION="Utilities for rescue and embedded systems"
87 -HOMEPAGE="http://www.busybox.net/"
88 -if [[ ${PV} == "9999" ]] ; then
89 - MY_P=${PN}
90 - EGIT_REPO_URI="git://busybox.net/busybox.git"
91 - inherit git-2
92 -else
93 - MY_P=${PN}-${PV/_/-}
94 - SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
95 - KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
96 -fi
97 -
98 -LICENSE="GPL-2"
99 -SLOT="0"
100 -IUSE="ipv6 livecd make-symlinks math mdev -pam selinux sep-usr +static systemd"
101 -RESTRICT="test"
102 -
103 -RDEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
104 - pam? ( sys-libs/pam )"
105 -DEPEND="${RDEPEND}
106 - static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
107 - >=sys-kernel/linux-headers-2.6.39"
108 -
109 -S=${WORKDIR}/${MY_P}
110 -
111 -busybox_config_option() {
112 - case $1 in
113 - y) sed -i -e "s:.*\<CONFIG_$2\>.*set:CONFIG_$2=y:g" .config;;
114 - n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;;
115 - *) use $1 \
116 - && busybox_config_option y $2 \
117 - || busybox_config_option n $2
118 - return 0
119 - ;;
120 - esac
121 - einfo $(grep "CONFIG_$2[= ]" .config || echo Could not find CONFIG_$2 ...)
122 -}
123 -
124 -src_prepare() {
125 - unset KBUILD_OUTPUT #88088
126 - append-flags -fno-strict-aliasing #310413
127 - use ppc64 && append-flags -mminimal-toc #130943
128 -
129 - # patches go here!
130 - epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
131 - epatch "${FILESDIR}"/${PN}-1.20.0-udhcpc6-ipv6.patch
132 - epatch "${FILESDIR}"/${P}-*.patch
133 - cp "${FILESDIR}"/ginit.c init/ || die
134 -
135 - # flag cleanup
136 - sed -i -r \
137 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
138 - Makefile.flags || die
139 - #sed -i '/bbsh/s:^//::' include/applets.h
140 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
141 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
142 - sed -i \
143 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
144 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
145 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
146 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
147 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
148 - Makefile || die
149 - sed -i \
150 - -e 's:-static-libgcc::' \
151 - Makefile.flags || die
152 -}
153 -
154 -src_configure() {
155 - # check for a busybox config before making one of our own.
156 - # if one exist lets return and use it.
157 -
158 - restore_config .config
159 - if [ -f .config ]; then
160 - yes "" | emake -j1 oldconfig > /dev/null
161 - return 0
162 - else
163 - ewarn "Could not locate user configfile, so we will save a default one"
164 - fi
165 -
166 - # setup the config file
167 - emake -j1 allyesconfig > /dev/null
168 - # nommu forces a bunch of things off which we want on #387555
169 - busybox_config_option n NOMMU
170 - sed -i '/^#/d' .config
171 - yes "" | emake -j1 oldconfig >/dev/null
172 -
173 - # now turn off stuff we really don't want
174 - busybox_config_option n DMALLOC
175 - busybox_config_option n FEATURE_SUID_CONFIG
176 - busybox_config_option n BUILD_AT_ONCE
177 - busybox_config_option n BUILD_LIBBUSYBOX
178 - busybox_config_option n FEATURE_CLEAN_UP
179 - busybox_config_option n MONOTONIC_SYSCALL
180 - busybox_config_option n USE_PORTABLE_CODE
181 - busybox_config_option n WERROR
182 -
183 - # If these are not set and we are using a uclibc/busybox setup
184 - # all calls to system() will fail.
185 - busybox_config_option y ASH
186 - busybox_config_option n HUSH
187 -
188 - # disable ipv6 applets
189 - if ! use ipv6; then
190 - busybox_config_option n FEATURE_IPV6
191 - busybox_config_option n TRACEROUTE6
192 - busybox_config_option n PING6
193 - fi
194 -
195 - if use static && use pam ; then
196 - ewarn "You cannot have USE='static pam'. Assuming static is more important."
197 - fi
198 - busybox_config_option $(usex static n pam) PAM
199 - busybox_config_option static STATIC
200 - busybox_config_option systemd FEATURE_SYSTEMD
201 - busybox_config_option math FEATURE_AWK_LIBM
202 -
203 - # all the debug options are compiler related, so punt them
204 - busybox_config_option n DEBUG
205 - busybox_config_option y NO_DEBUG_LIB
206 - busybox_config_option n DMALLOC
207 - busybox_config_option n EFENCE
208 -
209 - busybox_config_option selinux SELINUX
210 -
211 - # this opt only controls mounting with <linux-2.6.23
212 - busybox_config_option n FEATURE_MOUNT_NFS
213 -
214 - # default a bunch of uncommon options to off
215 - local opt
216 - for opt in \
217 - ADD_SHELL \
218 - BEEP BOOTCHARTD \
219 - CRONTAB \
220 - DC DEVFSD DNSD DPKG{,_DEB} \
221 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
222 - FEATURE_DEVFS \
223 - HOSTID HUSH \
224 - INETD INOTIFYD IPCALC \
225 - LOCALE_SUPPORT LOGNAME LPD \
226 - MAKEMIME MKFS_MINIX MSH \
227 - OD \
228 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
229 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
230 - TASKSET TCPSVD \
231 - RPM RPM2CPIO \
232 - UDPSVD UUDECODE UUENCODE
233 - do
234 - busybox_config_option n ${opt}
235 - done
236 -
237 - emake -j1 oldconfig > /dev/null
238 -}
239 -
240 -src_compile() {
241 - unset KBUILD_OUTPUT #88088
242 - export SKIP_STRIP=y
243 -
244 - emake V=1 busybox
245 -}
246 -
247 -src_install() {
248 - unset KBUILD_OUTPUT #88088
249 - save_config .config
250 -
251 - into /
252 - dodir /bin
253 - if use sep-usr ; then
254 - # install /ginit to take care of mounting stuff
255 - exeinto /
256 - newexe busybox_unstripped ginit
257 - dosym /ginit /bin/bb
258 - dosym bb /bin/busybox
259 - else
260 - newbin busybox_unstripped busybox
261 - dosym busybox /bin/bb
262 - fi
263 - if use mdev ; then
264 - dodir /$(get_libdir)/mdev/
265 - use make-symlinks || dosym /bin/bb /sbin/mdev
266 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
267 -
268 - exeinto /$(get_libdir)/mdev/
269 - doexe "${FILESDIR}"/mdev/*
270 -
271 - newinitd "${FILESDIR}"/mdev.rc.1 mdev
272 - fi
273 - if use livecd ; then
274 - dosym busybox /bin/vi
275 - fi
276 -
277 - # bundle up the symlink files for use later
278 - emake DESTDIR="${ED}" install
279 - rm _install/bin/busybox
280 - tar cf busybox-links.tar -C _install . || : #;die
281 - insinto /usr/share/${PN}
282 - use make-symlinks && doins busybox-links.tar
283 -
284 - dodoc AUTHORS README TODO
285 -
286 - cd docs
287 - docinto txt
288 - dodoc *.txt
289 - docinto pod
290 - dodoc *.pod
291 - dohtml *.html
292 -
293 - cd ../examples
294 - docinto examples
295 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
296 -}
297 -
298 -pkg_preinst() {
299 - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
300 - ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
301 - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
302 - ewarn "If you are creating a binary only and not merging this is probably ok."
303 - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
304 - die "silly options will destroy your system"
305 - fi
306 -
307 - if use make-symlinks ; then
308 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
309 - fi
310 -}
311 -
312 -pkg_postinst() {
313 - savedconfig_pkg_postinst
314 -
315 - if use make-symlinks ; then
316 - cd "${T}" || die
317 - mkdir _install
318 - tar xf busybox-links.tar -C _install || die
319 - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
320 - fi
321 -
322 - if use sep-usr ; then
323 - elog "In order to use the sep-usr support, you have to update your"
324 - elog "kernel command line. Add the option:"
325 - elog " init=/ginit"
326 - elog "To launch a different init than /sbin/init, use:"
327 - elog " init=/ginit /sbin/yourinit"
328 - elog "To get a rescue shell, you may boot with:"
329 - elog " init=/ginit bb"
330 - fi
331 -}
332
333 diff --git a/sys-apps/busybox/busybox-1.21.1.ebuild b/sys-apps/busybox/busybox-1.21.1.ebuild
334 deleted file mode 100644
335 index 7db94ec..0000000
336 --- a/sys-apps/busybox/busybox-1.21.1.ebuild
337 +++ /dev/null
338 @@ -1,299 +0,0 @@
339 -# Copyright 1999-2013 Gentoo Foundation
340 -# Distributed under the terms of the GNU General Public License v2
341 -# $Id$
342 -
343 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
344 -
345 -EAPI="4"
346 -inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
347 -
348 -DESCRIPTION="Utilities for rescue and embedded systems"
349 -HOMEPAGE="http://www.busybox.net/"
350 -if [[ ${PV} == "9999" ]] ; then
351 - MY_P=${PN}
352 - EGIT_REPO_URI="git://busybox.net/busybox.git"
353 - inherit git-2
354 -else
355 - MY_P=${PN}-${PV/_/-}
356 - SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
357 - KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
358 -fi
359 -
360 -LICENSE="GPL-2"
361 -SLOT="0"
362 -
363 -IUSE="ipv6 livecd make-symlinks math mdev -pam selinux sep-usr +static syslog systemd"
364 -RESTRICT="test"
365 -
366 -RDEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
367 - pam? ( sys-libs/pam )"
368 -DEPEND="${RDEPEND}
369 - static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
370 - >=sys-kernel/linux-headers-2.6.39"
371 -
372 -S=${WORKDIR}/${MY_P}
373 -
374 -busybox_config_option() {
375 - local flag=$1 ; shift
376 - if [[ ${flag} != [yn] ]] ; then
377 - busybox_config_option $(usex ${flag} y n) "$@"
378 - return
379 - fi
380 - while [[ $# -gt 0 ]] ; do
381 - if [[ ${flag} == "y" ]] ; then
382 - sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config
383 - else
384 - sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" .config
385 - fi
386 - einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find CONFIG_$1 ...)
387 - shift
388 - done
389 -}
390 -
391 -busybox_config_enabled() {
392 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
393 - case ${val} in
394 - "") return 1 ;;
395 - y) return 0 ;;
396 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
397 - esac
398 -}
399 -
400 -src_prepare() {
401 - unset KBUILD_OUTPUT #88088
402 - append-flags -fno-strict-aliasing #310413
403 - use ppc64 && append-flags -mminimal-toc #130943
404 -
405 - # patches go here!
406 - epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
407 - epatch "${FILESDIR}"/${P}-*.patch
408 - cp "${FILESDIR}"/ginit.c init/ || die
409 -
410 - # flag cleanup
411 - sed -i -r \
412 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
413 - Makefile.flags || die
414 - #sed -i '/bbsh/s:^//::' include/applets.h
415 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
416 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
417 - sed -i \
418 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
419 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
420 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
421 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
422 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
423 - Makefile || die
424 - sed -i \
425 - -e 's:-static-libgcc::' \
426 - Makefile.flags || die
427 -}
428 -
429 -src_configure() {
430 - # check for a busybox config before making one of our own.
431 - # if one exist lets return and use it.
432 -
433 - restore_config .config
434 - if [ -f .config ]; then
435 - yes "" | emake -j1 oldconfig > /dev/null
436 - return 0
437 - else
438 - ewarn "Could not locate user configfile, so we will save a default one"
439 - fi
440 -
441 - # setup the config file
442 - emake -j1 allyesconfig > /dev/null
443 - # nommu forces a bunch of things off which we want on #387555
444 - busybox_config_option n NOMMU
445 - sed -i '/^#/d' .config
446 - yes "" | emake -j1 oldconfig >/dev/null
447 -
448 - # now turn off stuff we really don't want
449 - busybox_config_option n DMALLOC
450 - busybox_config_option n FEATURE_SUID_CONFIG
451 - busybox_config_option n BUILD_AT_ONCE
452 - busybox_config_option n BUILD_LIBBUSYBOX
453 - busybox_config_option n FEATURE_CLEAN_UP
454 - busybox_config_option n MONOTONIC_SYSCALL
455 - busybox_config_option n USE_PORTABLE_CODE
456 - busybox_config_option n WERROR
457 -
458 - # If these are not set and we are using a uclibc/busybox setup
459 - # all calls to system() will fail.
460 - busybox_config_option y ASH
461 - busybox_config_option n HUSH
462 -
463 - # disable ipv6 applets
464 - if ! use ipv6; then
465 - busybox_config_option n FEATURE_IPV6
466 - busybox_config_option n TRACEROUTE6
467 - busybox_config_option n PING6
468 - fi
469 -
470 - if use static && use pam ; then
471 - ewarn "You cannot have USE='static pam'. Assuming static is more important."
472 - fi
473 - busybox_config_option $(usex static n pam) PAM
474 - busybox_config_option static STATIC
475 - busybox_config_option syslog {K,SYS}LOGD LOGGER
476 - busybox_config_option systemd FEATURE_SYSTEMD
477 - busybox_config_option math FEATURE_AWK_LIBM
478 -
479 - # all the debug options are compiler related, so punt them
480 - busybox_config_option n DEBUG
481 - busybox_config_option y NO_DEBUG_LIB
482 - busybox_config_option n DMALLOC
483 - busybox_config_option n EFENCE
484 -
485 - busybox_config_option selinux SELINUX
486 -
487 - # this opt only controls mounting with <linux-2.6.23
488 - busybox_config_option n FEATURE_MOUNT_NFS
489 -
490 - # default a bunch of uncommon options to off
491 - local opt
492 - for opt in \
493 - ADD_SHELL \
494 - BEEP BOOTCHARTD \
495 - CRONTAB \
496 - DC DEVFSD DNSD DPKG{,_DEB} \
497 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
498 - FEATURE_DEVFS \
499 - HOSTID HUSH \
500 - INETD INOTIFYD IPCALC \
501 - LOCALE_SUPPORT LOGNAME LPD \
502 - MAKEMIME MKFS_MINIX MSH \
503 - OD \
504 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
505 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
506 - TASKSET TCPSVD \
507 - RPM RPM2CPIO \
508 - UDPSVD UUDECODE UUENCODE
509 - do
510 - busybox_config_option n ${opt}
511 - done
512 -
513 - emake -j1 oldconfig > /dev/null
514 -}
515 -
516 -src_compile() {
517 - unset KBUILD_OUTPUT #88088
518 - export SKIP_STRIP=y
519 -
520 - emake V=1 busybox
521 -}
522 -
523 -src_install() {
524 - unset KBUILD_OUTPUT #88088
525 - save_config .config
526 -
527 - into /
528 - dodir /bin
529 - if use sep-usr ; then
530 - # install /ginit to take care of mounting stuff
531 - exeinto /
532 - newexe busybox_unstripped ginit
533 - dosym /ginit /bin/bb
534 - dosym bb /bin/busybox
535 - else
536 - newbin busybox_unstripped busybox
537 - dosym busybox /bin/bb
538 - fi
539 - if use mdev ; then
540 - dodir /$(get_libdir)/mdev/
541 - use make-symlinks || dosym /bin/bb /sbin/mdev
542 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
543 -
544 - exeinto /$(get_libdir)/mdev/
545 - doexe "${FILESDIR}"/mdev/*
546 -
547 - newinitd "${FILESDIR}"/mdev.rc.1 mdev
548 - fi
549 - if use livecd ; then
550 - dosym busybox /bin/vi
551 - fi
552 -
553 - # add busybox daemon's, bug #444718
554 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
555 - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
556 - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
557 - fi
558 - if busybox_config_enabled SYSLOGD; then
559 - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
560 - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
561 - fi
562 - if busybox_config_enabled KLOGD; then
563 - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
564 - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
565 - fi
566 - if busybox_config_enabled WATCHDOG; then
567 - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
568 - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
569 - fi
570 - if busybox_config_enabled UDHCPC; then
571 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
572 - exeinto "${path%/*}"
573 - newexe examples/udhcp/simple.script "${path##*/}"
574 - fi
575 - if busybox_config_enabled UDHCPD; then
576 - insinto /etc
577 - doins examples/udhcp/udhcpd.conf
578 - fi
579 -
580 - # bundle up the symlink files for use later
581 - emake DESTDIR="${ED}" install
582 - rm _install/bin/busybox
583 - # for compatibility, provide /usr/bin/env
584 - mkdir -p _install/usr/bin
585 - ln -s /bin/env _install/usr/bin/env
586 - tar cf busybox-links.tar -C _install . || : #;die
587 - insinto /usr/share/${PN}
588 - use make-symlinks && doins busybox-links.tar
589 -
590 - dodoc AUTHORS README TODO
591 -
592 - cd docs
593 - docinto txt
594 - dodoc *.txt
595 - docinto pod
596 - dodoc *.pod
597 - dohtml *.html
598 -
599 - cd ../examples
600 - docinto examples
601 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
602 -}
603 -
604 -pkg_preinst() {
605 - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
606 - ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
607 - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
608 - ewarn "If you are creating a binary only and not merging this is probably ok."
609 - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
610 - die "silly options will destroy your system"
611 - fi
612 -
613 - if use make-symlinks ; then
614 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
615 - fi
616 -}
617 -
618 -pkg_postinst() {
619 - savedconfig_pkg_postinst
620 -
621 - if use make-symlinks ; then
622 - cd "${T}" || die
623 - mkdir _install
624 - tar xf busybox-links.tar -C _install || die
625 - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
626 - fi
627 -
628 - if use sep-usr ; then
629 - elog "In order to use the sep-usr support, you have to update your"
630 - elog "kernel command line. Add the option:"
631 - elog " init=/ginit"
632 - elog "To launch a different init than /sbin/init, use:"
633 - elog " init=/ginit /sbin/yourinit"
634 - elog "To get a rescue shell, you may boot with:"
635 - elog " init=/ginit bb"
636 - fi
637 -}
638
639 diff --git a/sys-apps/busybox/busybox-1.22.0.ebuild b/sys-apps/busybox/busybox-1.22.0.ebuild
640 deleted file mode 100644
641 index 82f62c9..0000000
642 --- a/sys-apps/busybox/busybox-1.22.0.ebuild
643 +++ /dev/null
644 @@ -1,299 +0,0 @@
645 -# Copyright 1999-2014 Gentoo Foundation
646 -# Distributed under the terms of the GNU General Public License v2
647 -# $Id$
648 -
649 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
650 -
651 -EAPI="4"
652 -inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
653 -
654 -DESCRIPTION="Utilities for rescue and embedded systems"
655 -HOMEPAGE="http://www.busybox.net/"
656 -if [[ ${PV} == "9999" ]] ; then
657 - MY_P=${PN}
658 - EGIT_REPO_URI="git://busybox.net/busybox.git"
659 - inherit git-2
660 -else
661 - MY_P=${PN}-${PV/_/-}
662 - SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
663 - KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
664 -fi
665 -
666 -LICENSE="GPL-2"
667 -SLOT="0"
668 -
669 -IUSE="ipv6 livecd make-symlinks math mdev -pam selinux sep-usr +static syslog systemd"
670 -RESTRICT="test"
671 -
672 -RDEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
673 - pam? ( sys-libs/pam )"
674 -DEPEND="${RDEPEND}
675 - static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
676 - >=sys-kernel/linux-headers-2.6.39"
677 -
678 -S=${WORKDIR}/${MY_P}
679 -
680 -busybox_config_option() {
681 - local flag=$1 ; shift
682 - if [[ ${flag} != [yn] ]] ; then
683 - busybox_config_option $(usex ${flag} y n) "$@"
684 - return
685 - fi
686 - while [[ $# -gt 0 ]] ; do
687 - if [[ ${flag} == "y" ]] ; then
688 - sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config
689 - else
690 - sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" .config
691 - fi
692 - einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find CONFIG_$1 ...)
693 - shift
694 - done
695 -}
696 -
697 -busybox_config_enabled() {
698 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
699 - case ${val} in
700 - "") return 1 ;;
701 - y) return 0 ;;
702 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
703 - esac
704 -}
705 -
706 -src_prepare() {
707 - unset KBUILD_OUTPUT #88088
708 - append-flags -fno-strict-aliasing #310413
709 - use ppc64 && append-flags -mminimal-toc #130943
710 -
711 - # patches go here!
712 - epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
713 - epatch "${FILESDIR}"/${P}-*.patch
714 - cp "${FILESDIR}"/ginit.c init/ || die
715 -
716 - # flag cleanup
717 - sed -i -r \
718 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
719 - Makefile.flags || die
720 - #sed -i '/bbsh/s:^//::' include/applets.h
721 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
722 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
723 - sed -i \
724 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
725 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
726 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
727 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
728 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
729 - Makefile || die
730 - sed -i \
731 - -e 's:-static-libgcc::' \
732 - Makefile.flags || die
733 -}
734 -
735 -src_configure() {
736 - # check for a busybox config before making one of our own.
737 - # if one exist lets return and use it.
738 -
739 - restore_config .config
740 - if [ -f .config ]; then
741 - yes "" | emake -j1 oldconfig > /dev/null
742 - return 0
743 - else
744 - ewarn "Could not locate user configfile, so we will save a default one"
745 - fi
746 -
747 - # setup the config file
748 - emake -j1 allyesconfig > /dev/null
749 - # nommu forces a bunch of things off which we want on #387555
750 - busybox_config_option n NOMMU
751 - sed -i '/^#/d' .config
752 - yes "" | emake -j1 oldconfig >/dev/null
753 -
754 - # now turn off stuff we really don't want
755 - busybox_config_option n DMALLOC
756 - busybox_config_option n FEATURE_SUID_CONFIG
757 - busybox_config_option n BUILD_AT_ONCE
758 - busybox_config_option n BUILD_LIBBUSYBOX
759 - busybox_config_option n FEATURE_CLEAN_UP
760 - busybox_config_option n MONOTONIC_SYSCALL
761 - busybox_config_option n USE_PORTABLE_CODE
762 - busybox_config_option n WERROR
763 -
764 - # If these are not set and we are using a uclibc/busybox setup
765 - # all calls to system() will fail.
766 - busybox_config_option y ASH
767 - busybox_config_option n HUSH
768 -
769 - # disable ipv6 applets
770 - if ! use ipv6; then
771 - busybox_config_option n FEATURE_IPV6
772 - busybox_config_option n TRACEROUTE6
773 - busybox_config_option n PING6
774 - fi
775 -
776 - if use static && use pam ; then
777 - ewarn "You cannot have USE='static pam'. Assuming static is more important."
778 - fi
779 - busybox_config_option $(usex static n pam) PAM
780 - busybox_config_option static STATIC
781 - busybox_config_option syslog {K,SYS}LOGD LOGGER
782 - busybox_config_option systemd FEATURE_SYSTEMD
783 - busybox_config_option math FEATURE_AWK_LIBM
784 -
785 - # all the debug options are compiler related, so punt them
786 - busybox_config_option n DEBUG
787 - busybox_config_option y NO_DEBUG_LIB
788 - busybox_config_option n DMALLOC
789 - busybox_config_option n EFENCE
790 -
791 - busybox_config_option selinux SELINUX
792 -
793 - # this opt only controls mounting with <linux-2.6.23
794 - busybox_config_option n FEATURE_MOUNT_NFS
795 -
796 - # default a bunch of uncommon options to off
797 - local opt
798 - for opt in \
799 - ADD_SHELL \
800 - BEEP BOOTCHARTD \
801 - CRONTAB \
802 - DC DEVFSD DNSD DPKG{,_DEB} \
803 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
804 - FEATURE_DEVFS \
805 - HOSTID HUSH \
806 - INETD INOTIFYD IPCALC \
807 - LOCALE_SUPPORT LOGNAME LPD \
808 - MAKEMIME MKFS_MINIX MSH \
809 - OD \
810 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
811 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
812 - TASKSET TCPSVD \
813 - RPM RPM2CPIO \
814 - UDPSVD UUDECODE UUENCODE
815 - do
816 - busybox_config_option n ${opt}
817 - done
818 -
819 - emake -j1 oldconfig > /dev/null
820 -}
821 -
822 -src_compile() {
823 - unset KBUILD_OUTPUT #88088
824 - export SKIP_STRIP=y
825 -
826 - emake V=1 busybox
827 -}
828 -
829 -src_install() {
830 - unset KBUILD_OUTPUT #88088
831 - save_config .config
832 -
833 - into /
834 - dodir /bin
835 - if use sep-usr ; then
836 - # install /ginit to take care of mounting stuff
837 - exeinto /
838 - newexe busybox_unstripped ginit
839 - dosym /ginit /bin/bb
840 - dosym bb /bin/busybox
841 - else
842 - newbin busybox_unstripped busybox
843 - dosym busybox /bin/bb
844 - fi
845 - if use mdev ; then
846 - dodir /$(get_libdir)/mdev/
847 - use make-symlinks || dosym /bin/bb /sbin/mdev
848 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
849 -
850 - exeinto /$(get_libdir)/mdev/
851 - doexe "${FILESDIR}"/mdev/*
852 -
853 - newinitd "${FILESDIR}"/mdev.rc.1 mdev
854 - fi
855 - if use livecd ; then
856 - dosym busybox /bin/vi
857 - fi
858 -
859 - # add busybox daemon's, bug #444718
860 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
861 - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
862 - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
863 - fi
864 - if busybox_config_enabled SYSLOGD; then
865 - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
866 - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
867 - fi
868 - if busybox_config_enabled KLOGD; then
869 - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
870 - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
871 - fi
872 - if busybox_config_enabled WATCHDOG; then
873 - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
874 - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
875 - fi
876 - if busybox_config_enabled UDHCPC; then
877 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
878 - exeinto "${path%/*}"
879 - newexe examples/udhcp/simple.script "${path##*/}"
880 - fi
881 - if busybox_config_enabled UDHCPD; then
882 - insinto /etc
883 - doins examples/udhcp/udhcpd.conf
884 - fi
885 -
886 - # bundle up the symlink files for use later
887 - emake DESTDIR="${ED}" install
888 - rm _install/bin/busybox
889 - # for compatibility, provide /usr/bin/env
890 - mkdir -p _install/usr/bin
891 - ln -s /bin/env _install/usr/bin/env
892 - tar cf busybox-links.tar -C _install . || : #;die
893 - insinto /usr/share/${PN}
894 - use make-symlinks && doins busybox-links.tar
895 -
896 - dodoc AUTHORS README TODO
897 -
898 - cd docs
899 - docinto txt
900 - dodoc *.txt
901 - docinto pod
902 - dodoc *.pod
903 - dohtml *.html
904 -
905 - cd ../examples
906 - docinto examples
907 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
908 -}
909 -
910 -pkg_preinst() {
911 - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
912 - ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
913 - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
914 - ewarn "If you are creating a binary only and not merging this is probably ok."
915 - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
916 - die "silly options will destroy your system"
917 - fi
918 -
919 - if use make-symlinks ; then
920 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
921 - fi
922 -}
923 -
924 -pkg_postinst() {
925 - savedconfig_pkg_postinst
926 -
927 - if use make-symlinks ; then
928 - cd "${T}" || die
929 - mkdir _install
930 - tar xf busybox-links.tar -C _install || die
931 - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
932 - fi
933 -
934 - if use sep-usr ; then
935 - elog "In order to use the sep-usr support, you have to update your"
936 - elog "kernel command line. Add the option:"
937 - elog " init=/ginit"
938 - elog "To launch a different init than /sbin/init, use:"
939 - elog " init=/ginit /sbin/yourinit"
940 - elog "To get a rescue shell, you may boot with:"
941 - elog " init=/ginit bb"
942 - fi
943 -}
944
945 diff --git a/sys-apps/busybox/busybox-1.22.1-r1.ebuild b/sys-apps/busybox/busybox-1.22.1-r1.ebuild
946 deleted file mode 100644
947 index d6d5bfa..0000000
948 --- a/sys-apps/busybox/busybox-1.22.1-r1.ebuild
949 +++ /dev/null
950 @@ -1,300 +0,0 @@
951 -# Copyright 1999-2014 Gentoo Foundation
952 -# Distributed under the terms of the GNU General Public License v2
953 -# $Id$
954 -
955 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
956 -
957 -EAPI="4"
958 -inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
959 -
960 -DESCRIPTION="Utilities for rescue and embedded systems"
961 -HOMEPAGE="http://www.busybox.net/"
962 -if [[ ${PV} == "9999" ]] ; then
963 - MY_P=${PN}
964 - EGIT_REPO_URI="git://busybox.net/busybox.git"
965 - inherit git-2
966 -else
967 - MY_P=${PN}-${PV/_/-}
968 - SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
969 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
970 -fi
971 -
972 -LICENSE="GPL-2"
973 -SLOT="0"
974 -IUSE="debug ipv6 livecd make-symlinks math mdev -pam selinux sep-usr +static syslog systemd"
975 -RESTRICT="test"
976 -
977 -RDEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
978 - pam? ( sys-libs/pam )"
979 -DEPEND="${RDEPEND}
980 - static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
981 - >=sys-kernel/linux-headers-2.6.39"
982 -
983 -S=${WORKDIR}/${MY_P}
984 -
985 -busybox_config_option() {
986 - local flag=$1 ; shift
987 - if [[ ${flag} != [yn] ]] ; then
988 - busybox_config_option $(usex ${flag} y n) "$@"
989 - return
990 - fi
991 - while [[ $# -gt 0 ]] ; do
992 - if [[ ${flag} == "y" ]] ; then
993 - sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config
994 - else
995 - sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" .config
996 - fi
997 - einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find CONFIG_$1 ...)
998 - shift
999 - done
1000 -}
1001 -
1002 -busybox_config_enabled() {
1003 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
1004 - case ${val} in
1005 - "") return 1 ;;
1006 - y) return 0 ;;
1007 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
1008 - esac
1009 -}
1010 -
1011 -src_prepare() {
1012 - unset KBUILD_OUTPUT #88088
1013 - append-flags -fno-strict-aliasing #310413
1014 - use ppc64 && append-flags -mminimal-toc #130943
1015 -
1016 - # patches go here!
1017 - epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
1018 - epatch "${FILESDIR}"/${P}-*.patch
1019 - cp "${FILESDIR}"/ginit.c init/ || die
1020 -
1021 - # flag cleanup
1022 - sed -i -r \
1023 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
1024 - Makefile.flags || die
1025 - #sed -i '/bbsh/s:^//::' include/applets.h
1026 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
1027 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
1028 - sed -i \
1029 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
1030 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
1031 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
1032 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
1033 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
1034 - Makefile || die
1035 - sed -i \
1036 - -e 's:-static-libgcc::' \
1037 - Makefile.flags || die
1038 -}
1039 -
1040 -src_configure() {
1041 - # check for a busybox config before making one of our own.
1042 - # if one exist lets return and use it.
1043 -
1044 - restore_config .config
1045 - if [ -f .config ]; then
1046 - yes "" | emake -j1 -s oldconfig >/dev/null
1047 - return 0
1048 - else
1049 - ewarn "Could not locate user configfile, so we will save a default one"
1050 - fi
1051 -
1052 - # setup the config file
1053 - emake -j1 -s defconfig >/dev/null
1054 - # nommu forces a bunch of things off which we want on #387555
1055 - busybox_config_option n NOMMU
1056 - sed -i '/^#/d' .config
1057 - yes "" | emake -j1 -s oldconfig >/dev/null
1058 -
1059 - # now turn off stuff we really don't want
1060 - busybox_config_option n DMALLOC
1061 - busybox_config_option n FEATURE_SUID_CONFIG
1062 - busybox_config_option n BUILD_AT_ONCE
1063 - busybox_config_option n BUILD_LIBBUSYBOX
1064 - busybox_config_option n FEATURE_CLEAN_UP
1065 - busybox_config_option n MONOTONIC_SYSCALL
1066 - busybox_config_option n USE_PORTABLE_CODE
1067 - busybox_config_option n WERROR
1068 -
1069 - # If these are not set and we are using a uclibc/busybox setup
1070 - # all calls to system() will fail.
1071 - busybox_config_option y ASH
1072 - busybox_config_option n HUSH
1073 -
1074 - # disable ipv6 applets
1075 - if ! use ipv6; then
1076 - busybox_config_option n FEATURE_IPV6
1077 - busybox_config_option n TRACEROUTE6
1078 - busybox_config_option n PING6
1079 - busybox_config_option n UDHCPC6
1080 - fi
1081 -
1082 - if use static && use pam ; then
1083 - ewarn "You cannot have USE='static pam'. Assuming static is more important."
1084 - fi
1085 - busybox_config_option $(usex static n pam) PAM
1086 - busybox_config_option static STATIC
1087 - busybox_config_option syslog {K,SYS}LOGD LOGGER
1088 - busybox_config_option systemd FEATURE_SYSTEMD
1089 - busybox_config_option math FEATURE_AWK_LIBM
1090 -
1091 - # all the debug options are compiler related, so punt them
1092 - busybox_config_option n DEBUG
1093 - busybox_config_option y NO_DEBUG_LIB
1094 - busybox_config_option n DMALLOC
1095 - busybox_config_option n EFENCE
1096 - busybox_config_option $(usex debug y n) TFTP_DEBUG
1097 -
1098 - busybox_config_option selinux SELINUX
1099 -
1100 - # this opt only controls mounting with <linux-2.6.23
1101 - busybox_config_option n FEATURE_MOUNT_NFS
1102 -
1103 - # default a bunch of uncommon options to off
1104 - local opt
1105 - for opt in \
1106 - ADD_SHELL \
1107 - BEEP BOOTCHARTD \
1108 - CRONTAB \
1109 - DC DEVFSD DNSD DPKG{,_DEB} \
1110 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
1111 - FEATURE_DEVFS \
1112 - HOSTID HUSH \
1113 - INETD INOTIFYD IPCALC \
1114 - LOCALE_SUPPORT LOGNAME LPD \
1115 - MAKEMIME MKFS_MINIX MSH \
1116 - OD \
1117 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
1118 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
1119 - TASKSET TCPSVD \
1120 - RPM RPM2CPIO \
1121 - UDPSVD UUDECODE UUENCODE
1122 - do
1123 - busybox_config_option n ${opt}
1124 - done
1125 -
1126 - emake -j1 oldconfig > /dev/null
1127 -}
1128 -
1129 -src_compile() {
1130 - unset KBUILD_OUTPUT #88088
1131 - export SKIP_STRIP=y
1132 -
1133 - emake V=1 busybox
1134 -}
1135 -
1136 -src_install() {
1137 - unset KBUILD_OUTPUT #88088
1138 - save_config .config
1139 -
1140 - into /
1141 - dodir /bin
1142 - if use sep-usr ; then
1143 - # install /ginit to take care of mounting stuff
1144 - exeinto /
1145 - newexe busybox_unstripped ginit
1146 - dosym /ginit /bin/bb
1147 - dosym bb /bin/busybox
1148 - else
1149 - newbin busybox_unstripped busybox
1150 - dosym busybox /bin/bb
1151 - fi
1152 - if use mdev ; then
1153 - dodir /$(get_libdir)/mdev/
1154 - use make-symlinks || dosym /bin/bb /sbin/mdev
1155 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
1156 -
1157 - exeinto /$(get_libdir)/mdev/
1158 - doexe "${FILESDIR}"/mdev/*
1159 -
1160 - newinitd "${FILESDIR}"/mdev.rc.1 mdev
1161 - fi
1162 - if use livecd ; then
1163 - dosym busybox /bin/vi
1164 - fi
1165 -
1166 - # add busybox daemon's, bug #444718
1167 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
1168 - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
1169 - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
1170 - fi
1171 - if busybox_config_enabled SYSLOGD; then
1172 - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
1173 - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
1174 - fi
1175 - if busybox_config_enabled KLOGD; then
1176 - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
1177 - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
1178 - fi
1179 - if busybox_config_enabled WATCHDOG; then
1180 - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
1181 - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
1182 - fi
1183 - if busybox_config_enabled UDHCPC; then
1184 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
1185 - exeinto "${path%/*}"
1186 - newexe examples/udhcp/simple.script "${path##*/}"
1187 - fi
1188 - if busybox_config_enabled UDHCPD; then
1189 - insinto /etc
1190 - doins examples/udhcp/udhcpd.conf
1191 - fi
1192 -
1193 - # bundle up the symlink files for use later
1194 - emake DESTDIR="${ED}" install
1195 - rm _install/bin/busybox
1196 - # for compatibility, provide /usr/bin/env
1197 - mkdir -p _install/usr/bin
1198 - ln -s /bin/env _install/usr/bin/env
1199 - tar cf busybox-links.tar -C _install . || : #;die
1200 - insinto /usr/share/${PN}
1201 - use make-symlinks && doins busybox-links.tar
1202 -
1203 - dodoc AUTHORS README TODO
1204 -
1205 - cd docs
1206 - docinto txt
1207 - dodoc *.txt
1208 - docinto pod
1209 - dodoc *.pod
1210 - dohtml *.html
1211 -
1212 - cd ../examples
1213 - docinto examples
1214 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
1215 -}
1216 -
1217 -pkg_preinst() {
1218 - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
1219 - ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
1220 - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
1221 - ewarn "If you are creating a binary only and not merging this is probably ok."
1222 - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
1223 - die "silly options will destroy your system"
1224 - fi
1225 -
1226 - if use make-symlinks ; then
1227 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
1228 - fi
1229 -}
1230 -
1231 -pkg_postinst() {
1232 - savedconfig_pkg_postinst
1233 -
1234 - if use make-symlinks ; then
1235 - cd "${T}" || die
1236 - mkdir _install
1237 - tar xf busybox-links.tar -C _install || die
1238 - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
1239 - fi
1240 -
1241 - if use sep-usr ; then
1242 - elog "In order to use the sep-usr support, you have to update your"
1243 - elog "kernel command line. Add the option:"
1244 - elog " init=/ginit"
1245 - elog "To launch a different init than /sbin/init, use:"
1246 - elog " init=/ginit /sbin/yourinit"
1247 - elog "To get a rescue shell, you may boot with:"
1248 - elog " init=/ginit bb"
1249 - fi
1250 -}
1251
1252 diff --git a/sys-apps/busybox/busybox-1.22.1.ebuild b/sys-apps/busybox/busybox-1.22.1.ebuild
1253 deleted file mode 100644
1254 index 9d6a3e7..0000000
1255 --- a/sys-apps/busybox/busybox-1.22.1.ebuild
1256 +++ /dev/null
1257 @@ -1,299 +0,0 @@
1258 -# Copyright 1999-2014 Gentoo Foundation
1259 -# Distributed under the terms of the GNU General Public License v2
1260 -# $Id$
1261 -
1262 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
1263 -
1264 -EAPI="4"
1265 -inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
1266 -
1267 -DESCRIPTION="Utilities for rescue and embedded systems"
1268 -HOMEPAGE="http://www.busybox.net/"
1269 -if [[ ${PV} == "9999" ]] ; then
1270 - MY_P=${PN}
1271 - EGIT_REPO_URI="git://busybox.net/busybox.git"
1272 - inherit git-2
1273 -else
1274 - MY_P=${PN}-${PV/_/-}
1275 - SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
1276 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
1277 -fi
1278 -
1279 -LICENSE="GPL-2"
1280 -SLOT="0"
1281 -
1282 -IUSE="ipv6 livecd make-symlinks math mdev -pam selinux sep-usr +static syslog systemd"
1283 -RESTRICT="test"
1284 -
1285 -RDEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
1286 - pam? ( sys-libs/pam )"
1287 -DEPEND="${RDEPEND}
1288 - static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
1289 - >=sys-kernel/linux-headers-2.6.39"
1290 -
1291 -S=${WORKDIR}/${MY_P}
1292 -
1293 -busybox_config_option() {
1294 - local flag=$1 ; shift
1295 - if [[ ${flag} != [yn] ]] ; then
1296 - busybox_config_option $(usex ${flag} y n) "$@"
1297 - return
1298 - fi
1299 - while [[ $# -gt 0 ]] ; do
1300 - if [[ ${flag} == "y" ]] ; then
1301 - sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config
1302 - else
1303 - sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" .config
1304 - fi
1305 - einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find CONFIG_$1 ...)
1306 - shift
1307 - done
1308 -}
1309 -
1310 -busybox_config_enabled() {
1311 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
1312 - case ${val} in
1313 - "") return 1 ;;
1314 - y) return 0 ;;
1315 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
1316 - esac
1317 -}
1318 -
1319 -src_prepare() {
1320 - unset KBUILD_OUTPUT #88088
1321 - append-flags -fno-strict-aliasing #310413
1322 - use ppc64 && append-flags -mminimal-toc #130943
1323 -
1324 - # patches go here!
1325 - epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
1326 - epatch "${FILESDIR}"/${P}-*.patch
1327 - cp "${FILESDIR}"/ginit.c init/ || die
1328 -
1329 - # flag cleanup
1330 - sed -i -r \
1331 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
1332 - Makefile.flags || die
1333 - #sed -i '/bbsh/s:^//::' include/applets.h
1334 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
1335 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
1336 - sed -i \
1337 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
1338 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
1339 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
1340 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
1341 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
1342 - Makefile || die
1343 - sed -i \
1344 - -e 's:-static-libgcc::' \
1345 - Makefile.flags || die
1346 -}
1347 -
1348 -src_configure() {
1349 - # check for a busybox config before making one of our own.
1350 - # if one exist lets return and use it.
1351 -
1352 - restore_config .config
1353 - if [ -f .config ]; then
1354 - yes "" | emake -j1 oldconfig > /dev/null
1355 - return 0
1356 - else
1357 - ewarn "Could not locate user configfile, so we will save a default one"
1358 - fi
1359 -
1360 - # setup the config file
1361 - emake -j1 allyesconfig > /dev/null
1362 - # nommu forces a bunch of things off which we want on #387555
1363 - busybox_config_option n NOMMU
1364 - sed -i '/^#/d' .config
1365 - yes "" | emake -j1 oldconfig >/dev/null
1366 -
1367 - # now turn off stuff we really don't want
1368 - busybox_config_option n DMALLOC
1369 - busybox_config_option n FEATURE_SUID_CONFIG
1370 - busybox_config_option n BUILD_AT_ONCE
1371 - busybox_config_option n BUILD_LIBBUSYBOX
1372 - busybox_config_option n FEATURE_CLEAN_UP
1373 - busybox_config_option n MONOTONIC_SYSCALL
1374 - busybox_config_option n USE_PORTABLE_CODE
1375 - busybox_config_option n WERROR
1376 -
1377 - # If these are not set and we are using a uclibc/busybox setup
1378 - # all calls to system() will fail.
1379 - busybox_config_option y ASH
1380 - busybox_config_option n HUSH
1381 -
1382 - # disable ipv6 applets
1383 - if ! use ipv6; then
1384 - busybox_config_option n FEATURE_IPV6
1385 - busybox_config_option n TRACEROUTE6
1386 - busybox_config_option n PING6
1387 - fi
1388 -
1389 - if use static && use pam ; then
1390 - ewarn "You cannot have USE='static pam'. Assuming static is more important."
1391 - fi
1392 - busybox_config_option $(usex static n pam) PAM
1393 - busybox_config_option static STATIC
1394 - busybox_config_option syslog {K,SYS}LOGD LOGGER
1395 - busybox_config_option systemd FEATURE_SYSTEMD
1396 - busybox_config_option math FEATURE_AWK_LIBM
1397 -
1398 - # all the debug options are compiler related, so punt them
1399 - busybox_config_option n DEBUG
1400 - busybox_config_option y NO_DEBUG_LIB
1401 - busybox_config_option n DMALLOC
1402 - busybox_config_option n EFENCE
1403 -
1404 - busybox_config_option selinux SELINUX
1405 -
1406 - # this opt only controls mounting with <linux-2.6.23
1407 - busybox_config_option n FEATURE_MOUNT_NFS
1408 -
1409 - # default a bunch of uncommon options to off
1410 - local opt
1411 - for opt in \
1412 - ADD_SHELL \
1413 - BEEP BOOTCHARTD \
1414 - CRONTAB \
1415 - DC DEVFSD DNSD DPKG{,_DEB} \
1416 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
1417 - FEATURE_DEVFS \
1418 - HOSTID HUSH \
1419 - INETD INOTIFYD IPCALC \
1420 - LOCALE_SUPPORT LOGNAME LPD \
1421 - MAKEMIME MKFS_MINIX MSH \
1422 - OD \
1423 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
1424 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
1425 - TASKSET TCPSVD \
1426 - RPM RPM2CPIO \
1427 - UDPSVD UUDECODE UUENCODE
1428 - do
1429 - busybox_config_option n ${opt}
1430 - done
1431 -
1432 - emake -j1 oldconfig > /dev/null
1433 -}
1434 -
1435 -src_compile() {
1436 - unset KBUILD_OUTPUT #88088
1437 - export SKIP_STRIP=y
1438 -
1439 - emake V=1 busybox
1440 -}
1441 -
1442 -src_install() {
1443 - unset KBUILD_OUTPUT #88088
1444 - save_config .config
1445 -
1446 - into /
1447 - dodir /bin
1448 - if use sep-usr ; then
1449 - # install /ginit to take care of mounting stuff
1450 - exeinto /
1451 - newexe busybox_unstripped ginit
1452 - dosym /ginit /bin/bb
1453 - dosym bb /bin/busybox
1454 - else
1455 - newbin busybox_unstripped busybox
1456 - dosym busybox /bin/bb
1457 - fi
1458 - if use mdev ; then
1459 - dodir /$(get_libdir)/mdev/
1460 - use make-symlinks || dosym /bin/bb /sbin/mdev
1461 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
1462 -
1463 - exeinto /$(get_libdir)/mdev/
1464 - doexe "${FILESDIR}"/mdev/*
1465 -
1466 - newinitd "${FILESDIR}"/mdev.rc.1 mdev
1467 - fi
1468 - if use livecd ; then
1469 - dosym busybox /bin/vi
1470 - fi
1471 -
1472 - # add busybox daemon's, bug #444718
1473 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
1474 - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
1475 - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
1476 - fi
1477 - if busybox_config_enabled SYSLOGD; then
1478 - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
1479 - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
1480 - fi
1481 - if busybox_config_enabled KLOGD; then
1482 - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
1483 - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
1484 - fi
1485 - if busybox_config_enabled WATCHDOG; then
1486 - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
1487 - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
1488 - fi
1489 - if busybox_config_enabled UDHCPC; then
1490 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
1491 - exeinto "${path%/*}"
1492 - newexe examples/udhcp/simple.script "${path##*/}"
1493 - fi
1494 - if busybox_config_enabled UDHCPD; then
1495 - insinto /etc
1496 - doins examples/udhcp/udhcpd.conf
1497 - fi
1498 -
1499 - # bundle up the symlink files for use later
1500 - emake DESTDIR="${ED}" install
1501 - rm _install/bin/busybox
1502 - # for compatibility, provide /usr/bin/env
1503 - mkdir -p _install/usr/bin
1504 - ln -s /bin/env _install/usr/bin/env
1505 - tar cf busybox-links.tar -C _install . || : #;die
1506 - insinto /usr/share/${PN}
1507 - use make-symlinks && doins busybox-links.tar
1508 -
1509 - dodoc AUTHORS README TODO
1510 -
1511 - cd docs
1512 - docinto txt
1513 - dodoc *.txt
1514 - docinto pod
1515 - dodoc *.pod
1516 - dohtml *.html
1517 -
1518 - cd ../examples
1519 - docinto examples
1520 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
1521 -}
1522 -
1523 -pkg_preinst() {
1524 - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
1525 - ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
1526 - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
1527 - ewarn "If you are creating a binary only and not merging this is probably ok."
1528 - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
1529 - die "silly options will destroy your system"
1530 - fi
1531 -
1532 - if use make-symlinks ; then
1533 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
1534 - fi
1535 -}
1536 -
1537 -pkg_postinst() {
1538 - savedconfig_pkg_postinst
1539 -
1540 - if use make-symlinks ; then
1541 - cd "${T}" || die
1542 - mkdir _install
1543 - tar xf busybox-links.tar -C _install || die
1544 - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
1545 - fi
1546 -
1547 - if use sep-usr ; then
1548 - elog "In order to use the sep-usr support, you have to update your"
1549 - elog "kernel command line. Add the option:"
1550 - elog " init=/ginit"
1551 - elog "To launch a different init than /sbin/init, use:"
1552 - elog " init=/ginit /sbin/yourinit"
1553 - elog "To get a rescue shell, you may boot with:"
1554 - elog " init=/ginit bb"
1555 - fi
1556 -}
1557
1558 diff --git a/sys-apps/busybox/busybox-1.23.0-r1.ebuild b/sys-apps/busybox/busybox-1.23.0-r1.ebuild
1559 deleted file mode 100644
1560 index e413eee..0000000
1561 --- a/sys-apps/busybox/busybox-1.23.0-r1.ebuild
1562 +++ /dev/null
1563 @@ -1,302 +0,0 @@
1564 -# Copyright 1999-2015 Gentoo Foundation
1565 -# Distributed under the terms of the GNU General Public License v2
1566 -# $Id$
1567 -
1568 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
1569 -
1570 -EAPI="4"
1571 -inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
1572 -
1573 -DESCRIPTION="Utilities for rescue and embedded systems"
1574 -HOMEPAGE="http://www.busybox.net/"
1575 -if [[ ${PV} == "9999" ]] ; then
1576 - MY_P=${PN}
1577 - EGIT_REPO_URI="git://busybox.net/busybox.git"
1578 - inherit git-2
1579 -else
1580 - MY_P=${PN}-${PV/_/-}
1581 - SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
1582 - KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
1583 -fi
1584 -
1585 -LICENSE="GPL-2"
1586 -SLOT="0"
1587 -IUSE="debug ipv6 livecd make-symlinks math mdev -pam selinux sep-usr +static syslog systemd"
1588 -RESTRICT="test"
1589 -
1590 -COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
1591 - pam? ( sys-libs/pam )"
1592 -DEPEND="${COMMON_DEPEND}
1593 - static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
1594 - >=sys-kernel/linux-headers-2.6.39"
1595 -RDEPEND="${COMMON_DEPEND}
1596 -mdev? ( !<sys-apps/openrc-0.13 )"
1597 -
1598 -S=${WORKDIR}/${MY_P}
1599 -
1600 -busybox_config_option() {
1601 - local flag=$1 ; shift
1602 - if [[ ${flag} != [yn] ]] ; then
1603 - busybox_config_option $(usex ${flag} y n) "$@"
1604 - return
1605 - fi
1606 - while [[ $# -gt 0 ]] ; do
1607 - if [[ ${flag} == "y" ]] ; then
1608 - sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config
1609 - else
1610 - sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" .config
1611 - fi
1612 - einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find CONFIG_$1 ...)
1613 - shift
1614 - done
1615 -}
1616 -
1617 -busybox_config_enabled() {
1618 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
1619 - case ${val} in
1620 - "") return 1 ;;
1621 - y) return 0 ;;
1622 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
1623 - esac
1624 -}
1625 -
1626 -src_prepare() {
1627 - unset KBUILD_OUTPUT #88088
1628 - append-flags -fno-strict-aliasing #310413
1629 - use ppc64 && append-flags -mminimal-toc #130943
1630 -
1631 - # patches go here!
1632 - epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
1633 -# epatch "${FILESDIR}"/${P}-*.patch
1634 - cp "${FILESDIR}"/ginit.c init/ || die
1635 -
1636 - # flag cleanup
1637 - sed -i -r \
1638 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
1639 - Makefile.flags || die
1640 - #sed -i '/bbsh/s:^//::' include/applets.h
1641 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
1642 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
1643 - sed -i \
1644 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
1645 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
1646 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
1647 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
1648 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
1649 - Makefile || die
1650 - sed -i \
1651 - -e 's:-static-libgcc::' \
1652 - Makefile.flags || die
1653 -}
1654 -
1655 -src_configure() {
1656 - # check for a busybox config before making one of our own.
1657 - # if one exist lets return and use it.
1658 -
1659 - restore_config .config
1660 - if [ -f .config ]; then
1661 - yes "" | emake -j1 -s oldconfig >/dev/null
1662 - return 0
1663 - else
1664 - ewarn "Could not locate user configfile, so we will save a default one"
1665 - fi
1666 -
1667 - # setup the config file
1668 - emake -j1 -s allyesconfig >/dev/null
1669 - # nommu forces a bunch of things off which we want on #387555
1670 - busybox_config_option n NOMMU
1671 - sed -i '/^#/d' .config
1672 - yes "" | emake -j1 -s oldconfig >/dev/null
1673 -
1674 - # now turn off stuff we really don't want
1675 - busybox_config_option n DMALLOC
1676 - busybox_config_option n FEATURE_SUID_CONFIG
1677 - busybox_config_option n BUILD_AT_ONCE
1678 - busybox_config_option n BUILD_LIBBUSYBOX
1679 - busybox_config_option n FEATURE_CLEAN_UP
1680 - busybox_config_option n MONOTONIC_SYSCALL
1681 - busybox_config_option n USE_PORTABLE_CODE
1682 - busybox_config_option n WERROR
1683 -
1684 - # If these are not set and we are using a uclibc/busybox setup
1685 - # all calls to system() will fail.
1686 - busybox_config_option y ASH
1687 - busybox_config_option n HUSH
1688 -
1689 - # disable ipv6 applets
1690 - if ! use ipv6; then
1691 - busybox_config_option n FEATURE_IPV6
1692 - busybox_config_option n TRACEROUTE6
1693 - busybox_config_option n PING6
1694 - busybox_config_option n UDHCPC6
1695 - fi
1696 -
1697 - if use static && use pam ; then
1698 - ewarn "You cannot have USE='static pam'. Assuming static is more important."
1699 - fi
1700 - busybox_config_option $(usex static n pam) PAM
1701 - busybox_config_option static STATIC
1702 - busybox_config_option syslog {K,SYS}LOGD LOGGER
1703 - busybox_config_option systemd FEATURE_SYSTEMD
1704 - busybox_config_option math FEATURE_AWK_LIBM
1705 -
1706 - # all the debug options are compiler related, so punt them
1707 - busybox_config_option n DEBUG
1708 - busybox_config_option y NO_DEBUG_LIB
1709 - busybox_config_option n DMALLOC
1710 - busybox_config_option n EFENCE
1711 - busybox_config_option $(usex debug y n) TFTP_DEBUG
1712 -
1713 - busybox_config_option selinux SELINUX
1714 -
1715 - # this opt only controls mounting with <linux-2.6.23
1716 - busybox_config_option n FEATURE_MOUNT_NFS
1717 -
1718 - # default a bunch of uncommon options to off
1719 - local opt
1720 - for opt in \
1721 - ADD_SHELL \
1722 - BEEP BOOTCHARTD \
1723 - CRONTAB \
1724 - DC DEVFSD DNSD DPKG{,_DEB} \
1725 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
1726 - FEATURE_DEVFS \
1727 - HOSTID HUSH \
1728 - INETD INOTIFYD IPCALC \
1729 - LOCALE_SUPPORT LOGNAME LPD \
1730 - MAKEMIME MKFS_MINIX MSH \
1731 - OD \
1732 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
1733 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
1734 - TASKSET TCPSVD \
1735 - RPM RPM2CPIO \
1736 - UDPSVD UUDECODE UUENCODE
1737 - do
1738 - busybox_config_option n ${opt}
1739 - done
1740 -
1741 - emake -j1 oldconfig > /dev/null
1742 -}
1743 -
1744 -src_compile() {
1745 - unset KBUILD_OUTPUT #88088
1746 - export SKIP_STRIP=y
1747 -
1748 - emake V=1 busybox
1749 -}
1750 -
1751 -src_install() {
1752 - unset KBUILD_OUTPUT #88088
1753 - save_config .config
1754 -
1755 - into /
1756 - dodir /bin
1757 - if use sep-usr ; then
1758 - # install /ginit to take care of mounting stuff
1759 - exeinto /
1760 - newexe busybox_unstripped ginit
1761 - dosym /ginit /bin/bb
1762 - dosym bb /bin/busybox
1763 - else
1764 - newbin busybox_unstripped busybox
1765 - dosym busybox /bin/bb
1766 - fi
1767 - if use mdev ; then
1768 - dodir /$(get_libdir)/mdev/
1769 - use make-symlinks || dosym /bin/bb /sbin/mdev
1770 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
1771 -
1772 - exeinto /$(get_libdir)/mdev/
1773 - doexe "${FILESDIR}"/mdev/*
1774 -
1775 - newinitd "${FILESDIR}"/mdev.initd mdev
1776 - fi
1777 - if use livecd ; then
1778 - dosym busybox /bin/vi
1779 - fi
1780 -
1781 - # add busybox daemon's, bug #444718
1782 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
1783 - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
1784 - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
1785 - fi
1786 - if busybox_config_enabled SYSLOGD; then
1787 - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
1788 - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
1789 - fi
1790 - if busybox_config_enabled KLOGD; then
1791 - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
1792 - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
1793 - fi
1794 - if busybox_config_enabled WATCHDOG; then
1795 - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
1796 - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
1797 - fi
1798 - if busybox_config_enabled UDHCPC; then
1799 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
1800 - exeinto "${path%/*}"
1801 - newexe examples/udhcp/simple.script "${path##*/}"
1802 - fi
1803 - if busybox_config_enabled UDHCPD; then
1804 - insinto /etc
1805 - doins examples/udhcp/udhcpd.conf
1806 - fi
1807 -
1808 - # bundle up the symlink files for use later
1809 - emake DESTDIR="${ED}" install
1810 - rm _install/bin/busybox
1811 - # for compatibility, provide /usr/bin/env
1812 - mkdir -p _install/usr/bin
1813 - ln -s /bin/env _install/usr/bin/env
1814 - tar cf busybox-links.tar -C _install . || : #;die
1815 - insinto /usr/share/${PN}
1816 - use make-symlinks && doins busybox-links.tar
1817 -
1818 - dodoc AUTHORS README TODO
1819 -
1820 - cd docs
1821 - docinto txt
1822 - dodoc *.txt
1823 - docinto pod
1824 - dodoc *.pod
1825 - dohtml *.html
1826 -
1827 - cd ../examples
1828 - docinto examples
1829 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
1830 -}
1831 -
1832 -pkg_preinst() {
1833 - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
1834 - ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
1835 - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
1836 - ewarn "If you are creating a binary only and not merging this is probably ok."
1837 - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
1838 - die "silly options will destroy your system"
1839 - fi
1840 -
1841 - if use make-symlinks ; then
1842 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
1843 - fi
1844 -}
1845 -
1846 -pkg_postinst() {
1847 - savedconfig_pkg_postinst
1848 -
1849 - if use make-symlinks ; then
1850 - cd "${T}" || die
1851 - mkdir _install
1852 - tar xf busybox-links.tar -C _install || die
1853 - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
1854 - fi
1855 -
1856 - if use sep-usr ; then
1857 - elog "In order to use the sep-usr support, you have to update your"
1858 - elog "kernel command line. Add the option:"
1859 - elog " init=/ginit"
1860 - elog "To launch a different init than /sbin/init, use:"
1861 - elog " init=/ginit /sbin/yourinit"
1862 - elog "To get a rescue shell, you may boot with:"
1863 - elog " init=/ginit bb"
1864 - fi
1865 -}