Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/busybox/
Date: Wed, 28 Dec 2022 00:33:08
Message-Id: 1672187537.80f0e49f5dd305d1a56903a085a468f656521185.sam@gentoo
1 commit: 80f0e49f5dd305d1a56903a085a468f656521185
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 27 23:54:12 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 28 00:32:17 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80f0e49f
7
8 sys-apps/busybox: drop 1.34.1, 1.35.0
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-apps/busybox/busybox-1.34.1.ebuild | 340 --------------------------------
13 sys-apps/busybox/busybox-1.35.0.ebuild | 341 ---------------------------------
14 2 files changed, 681 deletions(-)
15
16 diff --git a/sys-apps/busybox/busybox-1.34.1.ebuild b/sys-apps/busybox/busybox-1.34.1.ebuild
17 deleted file mode 100644
18 index a983429625d9..000000000000
19 --- a/sys-apps/busybox/busybox-1.34.1.ebuild
20 +++ /dev/null
21 @@ -1,340 +0,0 @@
22 -# Copyright 1999-2022 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
26 -
27 -EAPI=7
28 -
29 -inherit flag-o-matic savedconfig toolchain-funcs
30 -
31 -DESCRIPTION="Utilities for rescue and embedded systems"
32 -HOMEPAGE="https://www.busybox.net/"
33 -if [[ ${PV} == "9999" ]] ; then
34 - MY_P="${P}"
35 - EGIT_REPO_URI="https://git.busybox.net/busybox"
36 - inherit git-r3
37 -else
38 - MY_P="${PN}-${PV/_/-}"
39 - SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2"
40 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
41 -fi
42 -
43 -LICENSE="GPL-2" # GPL-2 only
44 -SLOT="0"
45 -IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd"
46 -REQUIRED_USE="pam? ( !static )"
47 -RESTRICT="test"
48 -
49 -# TODO: Could make pkgconfig conditional on selinux? bug #782829
50 -RDEPEND="
51 - !static? (
52 - virtual/libc
53 - virtual/libcrypt:=
54 - selinux? ( sys-libs/libselinux )
55 - )
56 - pam? ( sys-libs/pam )
57 -"
58 -DEPEND="${RDEPEND}
59 - static? (
60 - virtual/libcrypt[static-libs]
61 - selinux? ( sys-libs/libselinux[static-libs(+)] )
62 - )
63 - sys-kernel/linux-headers"
64 -BDEPEND="virtual/pkgconfig"
65 -
66 -S="${WORKDIR}/${MY_P}"
67 -
68 -busybox_config_option() {
69 - local flag=$1 ; shift
70 - if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
71 - busybox_config_option $(usex ${flag} y n) "$@"
72 - return
73 - fi
74 - local expr
75 - while [[ $# -gt 0 ]] ; do
76 - case ${flag} in
77 - y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
78 - n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
79 - *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
80 - esac
81 - sed -i -e "${expr}" .config || die
82 - einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
83 - shift
84 - done
85 -}
86 -
87 -busybox_config_enabled() {
88 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
89 - case ${val} in
90 - "") return 1 ;;
91 - y) return 0 ;;
92 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
93 - esac
94 -}
95 -
96 -# patches go here!
97 -PATCHES=(
98 - "${FILESDIR}"/${PN}-1.26.2-bb.patch
99 - # "${FILESDIR}"/${P}-*.patch
100 -)
101 -
102 -src_prepare() {
103 - default
104 - unset KBUILD_OUTPUT #88088
105 - append-flags -fno-strict-aliasing #310413
106 - use ppc64 && append-flags -mminimal-toc #130943
107 -
108 - cp "${FILESDIR}"/ginit.c init/ || die
109 -
110 - # flag cleanup
111 - sed -i -r \
112 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
113 - Makefile.flags || die
114 - #sed -i '/bbsh/s:^//::' include/applets.h
115 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
116 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
117 - sed -i \
118 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
119 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
120 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
121 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
122 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
123 - Makefile || die
124 - sed -i \
125 - -e 's:-static-libgcc::' \
126 - Makefile.flags || die
127 -}
128 -
129 -src_configure() {
130 - # check for a busybox config before making one of our own.
131 - # if one exist lets return and use it.
132 -
133 - restore_config .config
134 - if [ -f .config ]; then
135 - yes "" | emake -j1 -s oldconfig >/dev/null
136 - return 0
137 - else
138 - ewarn "Could not locate user configfile, so we will save a default one"
139 - fi
140 -
141 - # setup the config file
142 - emake -j1 -s allyesconfig >/dev/null
143 - # nommu forces a bunch of things off which we want on #387555
144 - busybox_config_option n NOMMU
145 - sed -i '/^#/d' .config
146 - yes "" | emake -j1 -s oldconfig >/dev/null
147 -
148 - # now turn off stuff we really don't want
149 - busybox_config_option n DMALLOC
150 - busybox_config_option n FEATURE_2_4_MODULES #607548
151 - busybox_config_option n FEATURE_SUID_CONFIG
152 - busybox_config_option n BUILD_AT_ONCE
153 - busybox_config_option n BUILD_LIBBUSYBOX
154 - busybox_config_option n FEATURE_CLEAN_UP
155 - busybox_config_option n MONOTONIC_SYSCALL
156 - busybox_config_option n USE_PORTABLE_CODE
157 - busybox_config_option n WERROR
158 - # triming the BSS size may be dangerous
159 - busybox_config_option n FEATURE_USE_BSS_TAIL
160 -
161 - # These cause trouble with musl.
162 - if use elibc_musl; then
163 - busybox_config_option n FEATURE_UTMP
164 - busybox_config_option n EXTRA_COMPAT
165 - busybox_config_option n FEATURE_VI_REGEX_SEARCH
166 - fi
167 -
168 - # Disable standalone shell mode when using make-symlinks, else Busybox calls its
169 - # applets by default without looking up in PATH.
170 - # This also enables users to disable a builtin by deleting the corresponding symlink.
171 - if use make-symlinks; then
172 - busybox_config_option n FEATURE_PREFER_APPLETS
173 - busybox_config_option n FEATURE_SH_STANDALONE
174 - fi
175 -
176 - # If these are not set and we are using a busybox setup
177 - # all calls to system() will fail.
178 - busybox_config_option y ASH
179 - busybox_config_option y SH_IS_ASH
180 - busybox_config_option n HUSH
181 - busybox_config_option n SH_IS_HUSH
182 -
183 - busybox_config_option '"/run"' PID_FILE_PATH
184 - busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
185 -
186 - # disable ipv6 applets
187 - if ! use ipv6; then
188 - busybox_config_option n FEATURE_IPV6
189 - busybox_config_option n TRACEROUTE6
190 - busybox_config_option n PING6
191 - busybox_config_option n UDHCPC6
192 - fi
193 -
194 - busybox_config_option pam PAM
195 - busybox_config_option static STATIC
196 - busybox_config_option syslog {K,SYS}LOGD LOGGER
197 - busybox_config_option systemd FEATURE_SYSTEMD
198 - busybox_config_option math FEATURE_AWK_LIBM
199 -
200 - # all the debug options are compiler related, so punt them
201 - busybox_config_option n DEBUG_SANITIZE
202 - busybox_config_option n DEBUG
203 - busybox_config_option y NO_DEBUG_LIB
204 - busybox_config_option n DMALLOC
205 - busybox_config_option n EFENCE
206 - busybox_config_option $(usex debug y n) TFTP_DEBUG
207 -
208 - busybox_config_option selinux SELINUX
209 -
210 - # this opt only controls mounting with <linux-2.6.23
211 - busybox_config_option n FEATURE_MOUNT_NFS
212 -
213 - # glibc-2.26 and later does not ship RPC implientation
214 - busybox_config_option n FEATURE_HAVE_RPC
215 - busybox_config_option n FEATURE_INETD_RPC
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 -
249 - # bug #701512
250 - emake V=1 doc
251 -}
252 -
253 -src_install() {
254 - unset KBUILD_OUTPUT #88088
255 - save_config .config
256 -
257 - into /
258 - dodir /bin
259 - if use sep-usr ; then
260 - # install /ginit to take care of mounting stuff
261 - exeinto /
262 - newexe busybox_unstripped ginit
263 - dosym /ginit /bin/bb
264 - dosym bb /bin/busybox
265 - else
266 - newbin busybox_unstripped busybox
267 - dosym busybox /bin/bb
268 - fi
269 - if use mdev ; then
270 - dodir /$(get_libdir)/mdev/
271 - use make-symlinks || dosym /bin/bb /sbin/mdev
272 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
273 -
274 - exeinto /$(get_libdir)/mdev/
275 - doexe "${FILESDIR}"/mdev/*
276 -
277 - newinitd "${FILESDIR}"/mdev.initd mdev
278 - fi
279 - if use livecd ; then
280 - dosym busybox /bin/vi
281 - fi
282 -
283 - # add busybox daemon's, bug #444718
284 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
285 - newconfd "${FILESDIR}"/ntpd.confd busybox-ntpd
286 - newinitd "${FILESDIR}"/ntpd.initd busybox-ntpd
287 - fi
288 - if busybox_config_enabled SYSLOGD; then
289 - newconfd "${FILESDIR}"/syslogd.confd busybox-syslogd
290 - newinitd "${FILESDIR}"/syslogd.initd busybox-syslogd
291 - fi
292 - if busybox_config_enabled KLOGD; then
293 - newconfd "${FILESDIR}"/klogd.confd busybox-klogd
294 - newinitd "${FILESDIR}"/klogd.initd busybox-klogd
295 - fi
296 - if busybox_config_enabled WATCHDOG; then
297 - newconfd "${FILESDIR}"/watchdog.confd busybox-watchdog
298 - newinitd "${FILESDIR}"/watchdog.initd busybox-watchdog
299 - fi
300 - if busybox_config_enabled UDHCPC; then
301 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
302 - exeinto "${path%/*}"
303 - newexe examples/udhcp/simple.script "${path##*/}"
304 - fi
305 - if busybox_config_enabled UDHCPD; then
306 - insinto /etc
307 - doins examples/udhcp/udhcpd.conf
308 - fi
309 -
310 - # bundle up the symlink files for use later
311 - emake DESTDIR="${ED}" install
312 - rm _install/bin/busybox || die
313 - # for compatibility, provide /usr/bin/env
314 - mkdir -p _install/usr/bin || die
315 - ln -s /bin/env _install/usr/bin/env || die
316 - tar cf busybox-links.tar -C _install . || : #;die
317 - insinto /usr/share/${PN}
318 - use make-symlinks && doins busybox-links.tar
319 -
320 - dodoc AUTHORS README TODO
321 -
322 - cd docs || die
323 - doman busybox.1
324 - docinto txt
325 - dodoc *.txt
326 - docinto pod
327 - dodoc *.pod
328 - docinto html
329 - dodoc *.html
330 -
331 - cd ../examples || die
332 - docinto examples
333 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
334 -}
335 -
336 -pkg_preinst() {
337 - if use make-symlinks ; then
338 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
339 - fi
340 -}
341 -
342 -pkg_postinst() {
343 - savedconfig_pkg_postinst
344 -
345 - if use make-symlinks ; then
346 - cd "${T}" || die
347 - mkdir _install
348 - tar xf busybox-links.tar -C _install || die
349 - echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
350 - fi
351 -
352 - if use sep-usr ; then
353 - elog "In order to use the sep-usr support, you have to update your"
354 - elog "kernel command line. Add the option:"
355 - elog " init=/ginit"
356 - elog "To launch a different init than /sbin/init, use:"
357 - elog " init=/ginit /sbin/yourinit"
358 - elog "To get a rescue shell, you may boot with:"
359 - elog " init=/ginit bb"
360 - fi
361 -}
362
363 diff --git a/sys-apps/busybox/busybox-1.35.0.ebuild b/sys-apps/busybox/busybox-1.35.0.ebuild
364 deleted file mode 100644
365 index 223e6ce2486d..000000000000
366 --- a/sys-apps/busybox/busybox-1.35.0.ebuild
367 +++ /dev/null
368 @@ -1,341 +0,0 @@
369 -# Copyright 1999-2022 Gentoo Authors
370 -# Distributed under the terms of the GNU General Public License v2
371 -
372 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
373 -
374 -EAPI=7
375 -
376 -inherit flag-o-matic savedconfig toolchain-funcs
377 -
378 -DESCRIPTION="Utilities for rescue and embedded systems"
379 -HOMEPAGE="https://www.busybox.net/"
380 -if [[ ${PV} == "9999" ]] ; then
381 - MY_P="${P}"
382 - EGIT_REPO_URI="https://git.busybox.net/busybox"
383 - inherit git-r3
384 -else
385 - MY_P="${PN}-${PV/_/-}"
386 - SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2"
387 - # unstable release - no keywords
388 - # KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
389 -fi
390 -
391 -LICENSE="GPL-2" # GPL-2 only
392 -SLOT="0"
393 -IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd"
394 -REQUIRED_USE="pam? ( !static )"
395 -RESTRICT="test"
396 -
397 -# TODO: Could make pkgconfig conditional on selinux? bug #782829
398 -RDEPEND="
399 - !static? (
400 - virtual/libc
401 - virtual/libcrypt:=
402 - selinux? ( sys-libs/libselinux )
403 - )
404 - pam? ( sys-libs/pam )
405 -"
406 -DEPEND="${RDEPEND}
407 - static? (
408 - virtual/libcrypt[static-libs]
409 - selinux? ( sys-libs/libselinux[static-libs(+)] )
410 - )
411 - sys-kernel/linux-headers"
412 -BDEPEND="virtual/pkgconfig"
413 -
414 -S="${WORKDIR}/${MY_P}"
415 -
416 -busybox_config_option() {
417 - local flag=$1 ; shift
418 - if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
419 - busybox_config_option $(usex ${flag} y n) "$@"
420 - return
421 - fi
422 - local expr
423 - while [[ $# -gt 0 ]] ; do
424 - case ${flag} in
425 - y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
426 - n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
427 - *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
428 - esac
429 - sed -i -e "${expr}" .config || die
430 - einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
431 - shift
432 - done
433 -}
434 -
435 -busybox_config_enabled() {
436 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
437 - case ${val} in
438 - "") return 1 ;;
439 - y) return 0 ;;
440 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
441 - esac
442 -}
443 -
444 -# patches go here!
445 -PATCHES=(
446 - "${FILESDIR}"/${PN}-1.26.2-bb.patch
447 - # "${FILESDIR}"/${P}-*.patch
448 -)
449 -
450 -src_prepare() {
451 - default
452 - unset KBUILD_OUTPUT #88088
453 - append-flags -fno-strict-aliasing #310413
454 - use ppc64 && append-flags -mminimal-toc #130943
455 -
456 - cp "${FILESDIR}"/ginit.c init/ || die
457 -
458 - # flag cleanup
459 - sed -i -r \
460 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
461 - Makefile.flags || die
462 - #sed -i '/bbsh/s:^//::' include/applets.h
463 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
464 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
465 - sed -i \
466 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
467 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
468 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
469 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
470 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
471 - Makefile || die
472 - sed -i \
473 - -e 's:-static-libgcc::' \
474 - Makefile.flags || die
475 -}
476 -
477 -src_configure() {
478 - # check for a busybox config before making one of our own.
479 - # if one exist lets return and use it.
480 -
481 - restore_config .config
482 - if [ -f .config ]; then
483 - yes "" | emake -j1 -s oldconfig >/dev/null
484 - return 0
485 - else
486 - ewarn "Could not locate user configfile, so we will save a default one"
487 - fi
488 -
489 - # setup the config file
490 - emake -j1 -s allyesconfig >/dev/null
491 - # nommu forces a bunch of things off which we want on #387555
492 - busybox_config_option n NOMMU
493 - sed -i '/^#/d' .config
494 - yes "" | emake -j1 -s oldconfig >/dev/null
495 -
496 - # now turn off stuff we really don't want
497 - busybox_config_option n DMALLOC
498 - busybox_config_option n FEATURE_2_4_MODULES #607548
499 - busybox_config_option n FEATURE_SUID_CONFIG
500 - busybox_config_option n BUILD_AT_ONCE
501 - busybox_config_option n BUILD_LIBBUSYBOX
502 - busybox_config_option n FEATURE_CLEAN_UP
503 - busybox_config_option n MONOTONIC_SYSCALL
504 - busybox_config_option n USE_PORTABLE_CODE
505 - busybox_config_option n WERROR
506 - # triming the BSS size may be dangerous
507 - busybox_config_option n FEATURE_USE_BSS_TAIL
508 -
509 - # These cause trouble with musl.
510 - if use elibc_musl; then
511 - busybox_config_option n FEATURE_UTMP
512 - busybox_config_option n EXTRA_COMPAT
513 - busybox_config_option n FEATURE_VI_REGEX_SEARCH
514 - fi
515 -
516 - # Disable standalone shell mode when using make-symlinks, else Busybox calls its
517 - # applets by default without looking up in PATH.
518 - # This also enables users to disable a builtin by deleting the corresponding symlink.
519 - if use make-symlinks; then
520 - busybox_config_option n FEATURE_PREFER_APPLETS
521 - busybox_config_option n FEATURE_SH_STANDALONE
522 - fi
523 -
524 - # If these are not set and we are using a busybox setup
525 - # all calls to system() will fail.
526 - busybox_config_option y ASH
527 - busybox_config_option y SH_IS_ASH
528 - busybox_config_option n HUSH
529 - busybox_config_option n SH_IS_HUSH
530 -
531 - busybox_config_option '"/run"' PID_FILE_PATH
532 - busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
533 -
534 - # disable ipv6 applets
535 - if ! use ipv6; then
536 - busybox_config_option n FEATURE_IPV6
537 - busybox_config_option n TRACEROUTE6
538 - busybox_config_option n PING6
539 - busybox_config_option n UDHCPC6
540 - fi
541 -
542 - busybox_config_option pam PAM
543 - busybox_config_option static STATIC
544 - busybox_config_option syslog {K,SYS}LOGD LOGGER
545 - busybox_config_option systemd FEATURE_SYSTEMD
546 - busybox_config_option math FEATURE_AWK_LIBM
547 -
548 - # all the debug options are compiler related, so punt them
549 - busybox_config_option n DEBUG_SANITIZE
550 - busybox_config_option n DEBUG
551 - busybox_config_option y NO_DEBUG_LIB
552 - busybox_config_option n DMALLOC
553 - busybox_config_option n EFENCE
554 - busybox_config_option $(usex debug y n) TFTP_DEBUG
555 -
556 - busybox_config_option selinux SELINUX
557 -
558 - # this opt only controls mounting with <linux-2.6.23
559 - busybox_config_option n FEATURE_MOUNT_NFS
560 -
561 - # glibc-2.26 and later does not ship RPC implientation
562 - busybox_config_option n FEATURE_HAVE_RPC
563 - busybox_config_option n FEATURE_INETD_RPC
564 -
565 - # default a bunch of uncommon options to off
566 - local opt
567 - for opt in \
568 - ADD_SHELL \
569 - BEEP BOOTCHARTD \
570 - CRONTAB \
571 - DC DEVFSD DNSD DPKG{,_DEB} \
572 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
573 - FEATURE_DEVFS \
574 - HOSTID HUSH \
575 - INETD INOTIFYD IPCALC \
576 - LOCALE_SUPPORT LOGNAME LPD \
577 - MAKEMIME MKFS_MINIX MSH \
578 - OD \
579 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
580 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
581 - TASKSET TCPSVD \
582 - RPM RPM2CPIO \
583 - UDPSVD UUDECODE UUENCODE
584 - do
585 - busybox_config_option n ${opt}
586 - done
587 -
588 - emake -j1 oldconfig > /dev/null
589 -}
590 -
591 -src_compile() {
592 - unset KBUILD_OUTPUT #88088
593 - export SKIP_STRIP=y
594 -
595 - emake V=1 busybox
596 -
597 - # bug #701512
598 - emake V=1 doc
599 -}
600 -
601 -src_install() {
602 - unset KBUILD_OUTPUT #88088
603 - save_config .config
604 -
605 - into /
606 - dodir /bin
607 - if use sep-usr ; then
608 - # install /ginit to take care of mounting stuff
609 - exeinto /
610 - newexe busybox_unstripped ginit
611 - dosym /ginit /bin/bb
612 - dosym bb /bin/busybox
613 - else
614 - newbin busybox_unstripped busybox
615 - dosym busybox /bin/bb
616 - fi
617 - if use mdev ; then
618 - dodir /$(get_libdir)/mdev/
619 - use make-symlinks || dosym /bin/bb /sbin/mdev
620 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
621 -
622 - exeinto /$(get_libdir)/mdev/
623 - doexe "${FILESDIR}"/mdev/*
624 -
625 - newinitd "${FILESDIR}"/mdev.initd mdev
626 - fi
627 - if use livecd ; then
628 - dosym busybox /bin/vi
629 - fi
630 -
631 - # add busybox daemon's, bug #444718
632 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
633 - newconfd "${FILESDIR}"/ntpd.confd busybox-ntpd
634 - newinitd "${FILESDIR}"/ntpd.initd busybox-ntpd
635 - fi
636 - if busybox_config_enabled SYSLOGD; then
637 - newconfd "${FILESDIR}"/syslogd.confd busybox-syslogd
638 - newinitd "${FILESDIR}"/syslogd.initd busybox-syslogd
639 - fi
640 - if busybox_config_enabled KLOGD; then
641 - newconfd "${FILESDIR}"/klogd.confd busybox-klogd
642 - newinitd "${FILESDIR}"/klogd.initd busybox-klogd
643 - fi
644 - if busybox_config_enabled WATCHDOG; then
645 - newconfd "${FILESDIR}"/watchdog.confd busybox-watchdog
646 - newinitd "${FILESDIR}"/watchdog.initd busybox-watchdog
647 - fi
648 - if busybox_config_enabled UDHCPC; then
649 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
650 - exeinto "${path%/*}"
651 - newexe examples/udhcp/simple.script "${path##*/}"
652 - fi
653 - if busybox_config_enabled UDHCPD; then
654 - insinto /etc
655 - doins examples/udhcp/udhcpd.conf
656 - fi
657 -
658 - # bundle up the symlink files for use later
659 - emake DESTDIR="${ED}" install
660 - rm _install/bin/busybox || die
661 - # for compatibility, provide /usr/bin/env
662 - mkdir -p _install/usr/bin || die
663 - ln -s /bin/env _install/usr/bin/env || die
664 - tar cf busybox-links.tar -C _install . || : #;die
665 - insinto /usr/share/${PN}
666 - use make-symlinks && doins busybox-links.tar
667 -
668 - dodoc AUTHORS README TODO
669 -
670 - cd docs || die
671 - doman busybox.1
672 - docinto txt
673 - dodoc *.txt
674 - docinto pod
675 - dodoc *.pod
676 - docinto html
677 - dodoc *.html
678 -
679 - cd ../examples || die
680 - docinto examples
681 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
682 -}
683 -
684 -pkg_preinst() {
685 - if use make-symlinks ; then
686 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
687 - fi
688 -}
689 -
690 -pkg_postinst() {
691 - savedconfig_pkg_postinst
692 -
693 - if use make-symlinks ; then
694 - cd "${T}" || die
695 - mkdir _install
696 - tar xf busybox-links.tar -C _install || die
697 - echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
698 - fi
699 -
700 - if use sep-usr ; then
701 - elog "In order to use the sep-usr support, you have to update your"
702 - elog "kernel command line. Add the option:"
703 - elog " init=/ginit"
704 - elog "To launch a different init than /sbin/init, use:"
705 - elog " init=/ginit /sbin/yourinit"
706 - elog "To get a rescue shell, you may boot with:"
707 - elog " init=/ginit bb"
708 - fi
709 -}