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: Sun, 03 Jul 2022 23:54:28
Message-Id: 1656892363.4953f8ef033673023485d1b05b96137166a812cf.sam@gentoo
1 commit: 4953f8ef033673023485d1b05b96137166a812cf
2 Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
3 AuthorDate: Fri Jul 1 11:44:33 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 3 23:52:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4953f8ef
7
8 sys-apps/busybox: drop 1.32.1-r1, 1.33.1, 1.33.1-r2
9
10 They have security issues
11
12 Bug: https://bugs.gentoo.org/824222
13 Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
14 Closes: https://github.com/gentoo/gentoo/pull/26180
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 sys-apps/busybox/Manifest | 2 -
18 sys-apps/busybox/busybox-1.32.1-r1.ebuild | 337 -----------------------------
19 sys-apps/busybox/busybox-1.33.1-r2.ebuild | 345 ------------------------------
20 sys-apps/busybox/busybox-1.33.1.ebuild | 337 -----------------------------
21 4 files changed, 1021 deletions(-)
22
23 diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest
24 index d0fdec66cb25..830289bc60fb 100644
25 --- a/sys-apps/busybox/Manifest
26 +++ b/sys-apps/busybox/Manifest
27 @@ -1,4 +1,2 @@
28 -DIST busybox-1.32.1.tar.bz2 2444679 BLAKE2B b0258345d40628d8c12b4cc5c3efdb318cfb469e029242942cdad22aeec5142963291a746fbac450b43a4a1f2f7e9204442456691fa98f18eeaa58c70d714caf SHA512 3a33e99adaf7cbd51dcbeb31b5361123bf61ac040c0a032656c654ddb69c4074af75fb4335ba63f283067f61a22d7d7cbca8e1ed265c9522982c453ce48ea2fd
29 -DIST busybox-1.33.1.tar.bz2 2453694 BLAKE2B 2dce3427ab7703c56cbb3bdc0c93c1fe1c6dc24c5b467b6213b8f9cf55223ec63136b3837970e41293cc3d55d320599945d29a69a4ef8b4b3ab9fb5e2a527632 SHA512 d24931432f65e4e79cf54a6c2b91c9cafba817b637d337f456ce8f505434fc06c4345c65cde4fe2a019650a8a089a6f5336bfafb5ef64a4f14659a9d0b3ddb1a
30 DIST busybox-1.34.1.tar.bz2 2476932 BLAKE2B 1f45f58db26ae0bae2eb728db3a7d49680d611f489c4633d1fdf2827d3c33285721e232f722ac1f80f2ad7616352df9fd6b8880bcb5fa0dc6787b70c897dd033 SHA512 fb7e53a56c07b1098a12ee7232ad5401b147816648a0619b3b5358fdcf0915cfbb054500c0e0dd4acb3bc0a93a584b62bc5448e1f16b28004f58b39518a13b9d
31 DIST busybox-1.35.0.tar.bz2 2480624 BLAKE2B c08656bc863cd3fa8f7269032e808a30832215c36414c12f8233ab00503636ed1979541b7df42df654f1dfdfdd46fc00c8fe790bf0bed629a915b4c806c643b9 SHA512 62b2e718b6669271380445ed6db249618d777a4e8d5e6d879fa39ffee43887b6a2e93ceef874c615c565ad492deb772b03a19b7475c403202741579fb151e16a
32
33 diff --git a/sys-apps/busybox/busybox-1.32.1-r1.ebuild b/sys-apps/busybox/busybox-1.32.1-r1.ebuild
34 deleted file mode 100644
35 index 962ff5a9bfeb..000000000000
36 --- a/sys-apps/busybox/busybox-1.32.1-r1.ebuild
37 +++ /dev/null
38 @@ -1,337 +0,0 @@
39 -# Copyright 1999-2022 Gentoo Authors
40 -# Distributed under the terms of the GNU General Public License v2
41 -
42 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
43 -
44 -EAPI=7
45 -
46 -inherit flag-o-matic savedconfig toolchain-funcs
47 -
48 -DESCRIPTION="Utilities for rescue and embedded systems"
49 -HOMEPAGE="https://www.busybox.net/"
50 -if [[ ${PV} == "9999" ]] ; then
51 - MY_P=${P}
52 - EGIT_REPO_URI="https://git.busybox.net/busybox"
53 - inherit git-r3
54 -else
55 - MY_P=${PN}-${PV/_/-}
56 - SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2"
57 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
58 -fi
59 -
60 -LICENSE="GPL-2" # GPL-2 only
61 -SLOT="0"
62 -IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd"
63 -REQUIRED_USE="pam? ( !static )"
64 -RESTRICT="test"
65 -
66 -# TODO: Could make pkgconfig conditional on selinux? bug #782829
67 -COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
68 - pam? ( sys-libs/pam )
69 - virtual/libcrypt:="
70 -DEPEND="${COMMON_DEPEND}
71 - static? (
72 - virtual/libcrypt[static-libs]
73 - selinux? ( sys-libs/libselinux[static-libs(+)] )
74 - )
75 - >=sys-kernel/linux-headers-2.6.39"
76 -BDEPEND="virtual/pkgconfig"
77 -RDEPEND="${COMMON_DEPEND}
78 - mdev? ( !<sys-apps/openrc-0.13 )"
79 -
80 -S="${WORKDIR}/${MY_P}"
81 -
82 -busybox_config_option() {
83 - local flag=$1 ; shift
84 - if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
85 - busybox_config_option $(usex ${flag} y n) "$@"
86 - return
87 - fi
88 - local expr
89 - while [[ $# -gt 0 ]] ; do
90 - case ${flag} in
91 - y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
92 - n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
93 - *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
94 - esac
95 - sed -i -e "${expr}" .config || die
96 - einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
97 - shift
98 - done
99 -}
100 -
101 -busybox_config_enabled() {
102 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
103 - case ${val} in
104 - "") return 1 ;;
105 - y) return 0 ;;
106 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
107 - esac
108 -}
109 -
110 -# patches go here!
111 -PATCHES=(
112 - "${FILESDIR}"/${PN}-1.26.2-bb.patch
113 - # "${FILESDIR}"/${P}-*.patch
114 -)
115 -
116 -src_prepare() {
117 - default
118 - unset KBUILD_OUTPUT #88088
119 - append-flags -fno-strict-aliasing #310413
120 - use ppc64 && append-flags -mminimal-toc #130943
121 -
122 - cp "${FILESDIR}"/ginit.c init/ || die
123 -
124 - # flag cleanup
125 - sed -i -r \
126 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
127 - Makefile.flags || die
128 - #sed -i '/bbsh/s:^//::' include/applets.h
129 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
130 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
131 - sed -i \
132 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
133 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
134 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
135 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
136 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
137 - Makefile || die
138 - sed -i \
139 - -e 's:-static-libgcc::' \
140 - Makefile.flags || die
141 -}
142 -
143 -src_configure() {
144 - # check for a busybox config before making one of our own.
145 - # if one exist lets return and use it.
146 -
147 - restore_config .config
148 - if [ -f .config ]; then
149 - yes "" | emake -j1 -s oldconfig >/dev/null
150 - return 0
151 - else
152 - ewarn "Could not locate user configfile, so we will save a default one"
153 - fi
154 -
155 - # setup the config file
156 - emake -j1 -s allyesconfig >/dev/null
157 - # nommu forces a bunch of things off which we want on #387555
158 - busybox_config_option n NOMMU
159 - sed -i '/^#/d' .config
160 - yes "" | emake -j1 -s oldconfig >/dev/null
161 -
162 - # now turn off stuff we really don't want
163 - busybox_config_option n DMALLOC
164 - busybox_config_option n FEATURE_2_4_MODULES #607548
165 - busybox_config_option n FEATURE_SUID_CONFIG
166 - busybox_config_option n BUILD_AT_ONCE
167 - busybox_config_option n BUILD_LIBBUSYBOX
168 - busybox_config_option n FEATURE_CLEAN_UP
169 - busybox_config_option n MONOTONIC_SYSCALL
170 - busybox_config_option n USE_PORTABLE_CODE
171 - busybox_config_option n WERROR
172 - # triming the BSS size may be dangerous
173 - busybox_config_option n FEATURE_USE_BSS_TAIL
174 -
175 - # These cause trouble with musl.
176 - if use elibc_musl; then
177 - busybox_config_option n FEATURE_UTMP
178 - busybox_config_option n EXTRA_COMPAT
179 - busybox_config_option n FEATURE_VI_REGEX_SEARCH
180 - fi
181 -
182 - # If these are not set and we are using a busybox setup
183 - # all calls to system() will fail.
184 - busybox_config_option y ASH
185 - busybox_config_option y SH_IS_ASH
186 - busybox_config_option n HUSH
187 - busybox_config_option n SH_IS_HUSH
188 -
189 - busybox_config_option '"/run"' PID_FILE_PATH
190 - busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
191 -
192 - # disable ipv6 applets
193 - if ! use ipv6; then
194 - busybox_config_option n FEATURE_IPV6
195 - busybox_config_option n TRACEROUTE6
196 - busybox_config_option n PING6
197 - busybox_config_option n UDHCPC6
198 - fi
199 -
200 - busybox_config_option pam PAM
201 - busybox_config_option static STATIC
202 - busybox_config_option syslog {K,SYS}LOGD LOGGER
203 - busybox_config_option systemd FEATURE_SYSTEMD
204 - busybox_config_option math FEATURE_AWK_LIBM
205 -
206 - # all the debug options are compiler related, so punt them
207 - busybox_config_option n DEBUG_SANITIZE
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 - busybox_config_option $(usex debug y n) TFTP_DEBUG
213 -
214 - busybox_config_option selinux SELINUX
215 -
216 - # this opt only controls mounting with <linux-2.6.23
217 - busybox_config_option n FEATURE_MOUNT_NFS
218 -
219 - # glibc-2.26 and later does not ship RPC implientation
220 - busybox_config_option n FEATURE_HAVE_RPC
221 - busybox_config_option n FEATURE_INETD_RPC
222 -
223 - # default a bunch of uncommon options to off
224 - local opt
225 - for opt in \
226 - ADD_SHELL \
227 - BEEP BOOTCHARTD \
228 - CRONTAB \
229 - DC DEVFSD DNSD DPKG{,_DEB} \
230 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
231 - FEATURE_DEVFS \
232 - HOSTID HUSH \
233 - INETD INOTIFYD IPCALC \
234 - LOCALE_SUPPORT LOGNAME LPD \
235 - MAKEMIME MKFS_MINIX MSH \
236 - OD \
237 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
238 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
239 - TASKSET TCPSVD \
240 - RPM RPM2CPIO \
241 - UDPSVD UUDECODE UUENCODE
242 - do
243 - busybox_config_option n ${opt}
244 - done
245 -
246 - emake -j1 oldconfig > /dev/null
247 -}
248 -
249 -src_compile() {
250 - unset KBUILD_OUTPUT #88088
251 - export SKIP_STRIP=y
252 -
253 - emake V=1 busybox
254 -
255 - # bug #701512
256 - emake V=1 doc
257 -}
258 -
259 -src_install() {
260 - unset KBUILD_OUTPUT #88088
261 - save_config .config
262 -
263 - into /
264 - dodir /bin
265 - if use sep-usr ; then
266 - # install /ginit to take care of mounting stuff
267 - exeinto /
268 - newexe busybox_unstripped ginit
269 - dosym /ginit /bin/bb
270 - dosym bb /bin/busybox
271 - else
272 - newbin busybox_unstripped busybox
273 - dosym busybox /bin/bb
274 - fi
275 - if use mdev ; then
276 - dodir /$(get_libdir)/mdev/
277 - use make-symlinks || dosym /bin/bb /sbin/mdev
278 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
279 -
280 - exeinto /$(get_libdir)/mdev/
281 - doexe "${FILESDIR}"/mdev/*
282 -
283 - newinitd "${FILESDIR}"/mdev.initd mdev
284 - fi
285 - if use livecd ; then
286 - dosym busybox /bin/vi
287 - fi
288 -
289 - # add busybox daemon's, bug #444718
290 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
291 - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
292 - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
293 - fi
294 - if busybox_config_enabled SYSLOGD; then
295 - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
296 - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
297 - fi
298 - if busybox_config_enabled KLOGD; then
299 - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
300 - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
301 - fi
302 - if busybox_config_enabled WATCHDOG; then
303 - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
304 - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
305 - fi
306 - if busybox_config_enabled UDHCPC; then
307 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
308 - exeinto "${path%/*}"
309 - newexe examples/udhcp/simple.script "${path##*/}"
310 - fi
311 - if busybox_config_enabled UDHCPD; then
312 - insinto /etc
313 - doins examples/udhcp/udhcpd.conf
314 - fi
315 -
316 - # bundle up the symlink files for use later
317 - emake DESTDIR="${ED}" install
318 - rm _install/bin/busybox
319 - # for compatibility, provide /usr/bin/env
320 - mkdir -p _install/usr/bin
321 - ln -s /bin/env _install/usr/bin/env
322 - tar cf busybox-links.tar -C _install . || : #;die
323 - insinto /usr/share/${PN}
324 - use make-symlinks && doins busybox-links.tar
325 -
326 - dodoc AUTHORS README TODO
327 -
328 - cd docs || die
329 - doman busybox.1
330 - docinto txt
331 - dodoc *.txt
332 - docinto pod
333 - dodoc *.pod
334 - docinto html
335 - dodoc *.html
336 -
337 - cd ../examples || die
338 - docinto examples
339 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
340 -}
341 -
342 -pkg_preinst() {
343 - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ -z "${ROOT}" ]] ; then
344 - ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
345 - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
346 - ewarn "If you are creating a binary only and not merging this is probably ok."
347 - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
348 - die "silly options will destroy your system"
349 - fi
350 -
351 - if use make-symlinks ; then
352 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
353 - fi
354 -}
355 -
356 -pkg_postinst() {
357 - savedconfig_pkg_postinst
358 -
359 - if use make-symlinks ; then
360 - cd "${T}" || die
361 - mkdir _install
362 - tar xf busybox-links.tar -C _install || die
363 - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
364 - fi
365 -
366 - if use sep-usr ; then
367 - elog "In order to use the sep-usr support, you have to update your"
368 - elog "kernel command line. Add the option:"
369 - elog " init=/ginit"
370 - elog "To launch a different init than /sbin/init, use:"
371 - elog " init=/ginit /sbin/yourinit"
372 - elog "To get a rescue shell, you may boot with:"
373 - elog " init=/ginit bb"
374 - fi
375 -}
376
377 diff --git a/sys-apps/busybox/busybox-1.33.1-r2.ebuild b/sys-apps/busybox/busybox-1.33.1-r2.ebuild
378 deleted file mode 100644
379 index 169995d3ca48..000000000000
380 --- a/sys-apps/busybox/busybox-1.33.1-r2.ebuild
381 +++ /dev/null
382 @@ -1,345 +0,0 @@
383 -# Copyright 1999-2022 Gentoo Authors
384 -# Distributed under the terms of the GNU General Public License v2
385 -
386 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
387 -
388 -EAPI=7
389 -
390 -inherit flag-o-matic savedconfig toolchain-funcs
391 -
392 -DESCRIPTION="Utilities for rescue and embedded systems"
393 -HOMEPAGE="https://www.busybox.net/"
394 -if [[ ${PV} == "9999" ]] ; then
395 - MY_P=${P}
396 - EGIT_REPO_URI="https://git.busybox.net/busybox"
397 - inherit git-r3
398 -else
399 - MY_P=${PN}-${PV/_/-}
400 - SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2"
401 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
402 -fi
403 -
404 -LICENSE="GPL-2" # GPL-2 only
405 -SLOT="0"
406 -IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd"
407 -REQUIRED_USE="pam? ( !static )"
408 -RESTRICT="test"
409 -
410 -# TODO: Could make pkgconfig conditional on selinux? bug #782829
411 -COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
412 - pam? ( sys-libs/pam )
413 - virtual/libcrypt:="
414 -DEPEND="${COMMON_DEPEND}
415 - static? (
416 - virtual/libcrypt[static-libs]
417 - selinux? ( sys-libs/libselinux[static-libs(+)] )
418 - )
419 - >=sys-kernel/linux-headers-2.6.39"
420 -BDEPEND="virtual/pkgconfig"
421 -RDEPEND="${COMMON_DEPEND}
422 - mdev? ( !<sys-apps/openrc-0.13 )"
423 -
424 -S="${WORKDIR}/${MY_P}"
425 -
426 -busybox_config_option() {
427 - local flag=$1 ; shift
428 - if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
429 - busybox_config_option $(usex ${flag} y n) "$@"
430 - return
431 - fi
432 - local expr
433 - while [[ $# -gt 0 ]] ; do
434 - case ${flag} in
435 - y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
436 - n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
437 - *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
438 - esac
439 - sed -i -e "${expr}" .config || die
440 - einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
441 - shift
442 - done
443 -}
444 -
445 -busybox_config_enabled() {
446 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
447 - case ${val} in
448 - "") return 1 ;;
449 - y) return 0 ;;
450 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
451 - esac
452 -}
453 -
454 -# patches go here!
455 -PATCHES=(
456 - "${FILESDIR}"/${PN}-1.26.2-bb.patch
457 - # "${FILESDIR}"/${P}-*.patch
458 -)
459 -
460 -src_prepare() {
461 - default
462 - unset KBUILD_OUTPUT #88088
463 - append-flags -fno-strict-aliasing #310413
464 - use ppc64 && append-flags -mminimal-toc #130943
465 -
466 - cp "${FILESDIR}"/ginit.c init/ || die
467 -
468 - # flag cleanup
469 - sed -i -r \
470 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
471 - Makefile.flags || die
472 - #sed -i '/bbsh/s:^//::' include/applets.h
473 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
474 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
475 - sed -i \
476 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
477 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
478 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
479 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
480 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
481 - Makefile || die
482 - sed -i \
483 - -e 's:-static-libgcc::' \
484 - Makefile.flags || die
485 -}
486 -
487 -src_configure() {
488 - # check for a busybox config before making one of our own.
489 - # if one exist lets return and use it.
490 -
491 - restore_config .config
492 - if [ -f .config ]; then
493 - yes "" | emake -j1 -s oldconfig >/dev/null
494 - return 0
495 - else
496 - ewarn "Could not locate user configfile, so we will save a default one"
497 - fi
498 -
499 - # setup the config file
500 - emake -j1 -s allyesconfig >/dev/null
501 - # nommu forces a bunch of things off which we want on #387555
502 - busybox_config_option n NOMMU
503 - sed -i '/^#/d' .config
504 - yes "" | emake -j1 -s oldconfig >/dev/null
505 -
506 - # now turn off stuff we really don't want
507 - busybox_config_option n DMALLOC
508 - busybox_config_option n FEATURE_2_4_MODULES #607548
509 - busybox_config_option n FEATURE_SUID_CONFIG
510 - busybox_config_option n BUILD_AT_ONCE
511 - busybox_config_option n BUILD_LIBBUSYBOX
512 - busybox_config_option n FEATURE_CLEAN_UP
513 - busybox_config_option n MONOTONIC_SYSCALL
514 - busybox_config_option n USE_PORTABLE_CODE
515 - busybox_config_option n WERROR
516 - # triming the BSS size may be dangerous
517 - busybox_config_option n FEATURE_USE_BSS_TAIL
518 -
519 - # These cause trouble with musl.
520 - if use elibc_musl; then
521 - busybox_config_option n FEATURE_UTMP
522 - busybox_config_option n EXTRA_COMPAT
523 - busybox_config_option n FEATURE_VI_REGEX_SEARCH
524 - fi
525 -
526 - # Disable standalone shell mode when using make-symlinks, else Busybox calls its
527 - # applets by default without looking up in PATH.
528 - # This also enables users to disable a builtin by deleting the corresponding symlink.
529 - if use make-symlinks; then
530 - busybox_config_option n FEATURE_PREFER_APPLETS
531 - busybox_config_option n FEATURE_SH_STANDALONE
532 - fi
533 -
534 - # If these are not set and we are using a busybox setup
535 - # all calls to system() will fail.
536 - busybox_config_option y ASH
537 - busybox_config_option y SH_IS_ASH
538 - busybox_config_option n HUSH
539 - busybox_config_option n SH_IS_HUSH
540 -
541 - busybox_config_option '"/run"' PID_FILE_PATH
542 - busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
543 -
544 - # disable ipv6 applets
545 - if ! use ipv6; then
546 - busybox_config_option n FEATURE_IPV6
547 - busybox_config_option n TRACEROUTE6
548 - busybox_config_option n PING6
549 - busybox_config_option n UDHCPC6
550 - fi
551 -
552 - busybox_config_option pam PAM
553 - busybox_config_option static STATIC
554 - busybox_config_option syslog {K,SYS}LOGD LOGGER
555 - busybox_config_option systemd FEATURE_SYSTEMD
556 - busybox_config_option math FEATURE_AWK_LIBM
557 -
558 - # all the debug options are compiler related, so punt them
559 - busybox_config_option n DEBUG_SANITIZE
560 - busybox_config_option n DEBUG
561 - busybox_config_option y NO_DEBUG_LIB
562 - busybox_config_option n DMALLOC
563 - busybox_config_option n EFENCE
564 - busybox_config_option $(usex debug y n) TFTP_DEBUG
565 -
566 - busybox_config_option selinux SELINUX
567 -
568 - # this opt only controls mounting with <linux-2.6.23
569 - busybox_config_option n FEATURE_MOUNT_NFS
570 -
571 - # glibc-2.26 and later does not ship RPC implientation
572 - busybox_config_option n FEATURE_HAVE_RPC
573 - busybox_config_option n FEATURE_INETD_RPC
574 -
575 - # default a bunch of uncommon options to off
576 - local opt
577 - for opt in \
578 - ADD_SHELL \
579 - BEEP BOOTCHARTD \
580 - CRONTAB \
581 - DC DEVFSD DNSD DPKG{,_DEB} \
582 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
583 - FEATURE_DEVFS \
584 - HOSTID HUSH \
585 - INETD INOTIFYD IPCALC \
586 - LOCALE_SUPPORT LOGNAME LPD \
587 - MAKEMIME MKFS_MINIX MSH \
588 - OD \
589 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
590 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
591 - TASKSET TCPSVD \
592 - RPM RPM2CPIO \
593 - UDPSVD UUDECODE UUENCODE
594 - do
595 - busybox_config_option n ${opt}
596 - done
597 -
598 - emake -j1 oldconfig > /dev/null
599 -}
600 -
601 -src_compile() {
602 - unset KBUILD_OUTPUT #88088
603 - export SKIP_STRIP=y
604 -
605 - emake V=1 busybox
606 -
607 - # bug #701512
608 - emake V=1 doc
609 -}
610 -
611 -src_install() {
612 - unset KBUILD_OUTPUT #88088
613 - save_config .config
614 -
615 - into /
616 - dodir /bin
617 - if use sep-usr ; then
618 - # install /ginit to take care of mounting stuff
619 - exeinto /
620 - newexe busybox_unstripped ginit
621 - dosym /ginit /bin/bb
622 - dosym bb /bin/busybox
623 - else
624 - newbin busybox_unstripped busybox
625 - dosym busybox /bin/bb
626 - fi
627 - if use mdev ; then
628 - dodir /$(get_libdir)/mdev/
629 - use make-symlinks || dosym /bin/bb /sbin/mdev
630 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
631 -
632 - exeinto /$(get_libdir)/mdev/
633 - doexe "${FILESDIR}"/mdev/*
634 -
635 - newinitd "${FILESDIR}"/mdev.initd mdev
636 - fi
637 - if use livecd ; then
638 - dosym busybox /bin/vi
639 - fi
640 -
641 - # add busybox daemon's, bug #444718
642 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
643 - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
644 - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
645 - fi
646 - if busybox_config_enabled SYSLOGD; then
647 - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
648 - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
649 - fi
650 - if busybox_config_enabled KLOGD; then
651 - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
652 - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
653 - fi
654 - if busybox_config_enabled WATCHDOG; then
655 - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
656 - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
657 - fi
658 - if busybox_config_enabled UDHCPC; then
659 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
660 - exeinto "${path%/*}"
661 - newexe examples/udhcp/simple.script "${path##*/}"
662 - fi
663 - if busybox_config_enabled UDHCPD; then
664 - insinto /etc
665 - doins examples/udhcp/udhcpd.conf
666 - fi
667 -
668 - # bundle up the symlink files for use later
669 - emake DESTDIR="${ED}" install
670 - rm _install/bin/busybox
671 - # for compatibility, provide /usr/bin/env
672 - mkdir -p _install/usr/bin
673 - ln -s /bin/env _install/usr/bin/env
674 - tar cf busybox-links.tar -C _install . || : #;die
675 - insinto /usr/share/${PN}
676 - use make-symlinks && doins busybox-links.tar
677 -
678 - dodoc AUTHORS README TODO
679 -
680 - cd docs || die
681 - doman busybox.1
682 - docinto txt
683 - dodoc *.txt
684 - docinto pod
685 - dodoc *.pod
686 - docinto html
687 - dodoc *.html
688 -
689 - cd ../examples || die
690 - docinto examples
691 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
692 -}
693 -
694 -pkg_preinst() {
695 - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ -z "${ROOT}" ]] ; then
696 - ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
697 - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
698 - ewarn "If you are creating a binary only and not merging this is probably ok."
699 - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
700 - die "silly options will destroy your system"
701 - fi
702 -
703 - if use make-symlinks ; then
704 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
705 - fi
706 -}
707 -
708 -pkg_postinst() {
709 - savedconfig_pkg_postinst
710 -
711 - if use make-symlinks ; then
712 - cd "${T}" || die
713 - mkdir _install
714 - tar xf busybox-links.tar -C _install || die
715 - false | cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
716 - fi
717 -
718 - if use sep-usr ; then
719 - elog "In order to use the sep-usr support, you have to update your"
720 - elog "kernel command line. Add the option:"
721 - elog " init=/ginit"
722 - elog "To launch a different init than /sbin/init, use:"
723 - elog " init=/ginit /sbin/yourinit"
724 - elog "To get a rescue shell, you may boot with:"
725 - elog " init=/ginit bb"
726 - fi
727 -}
728
729 diff --git a/sys-apps/busybox/busybox-1.33.1.ebuild b/sys-apps/busybox/busybox-1.33.1.ebuild
730 deleted file mode 100644
731 index 1ba499654370..000000000000
732 --- a/sys-apps/busybox/busybox-1.33.1.ebuild
733 +++ /dev/null
734 @@ -1,337 +0,0 @@
735 -# Copyright 1999-2022 Gentoo Authors
736 -# Distributed under the terms of the GNU General Public License v2
737 -
738 -# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
739 -
740 -EAPI=7
741 -
742 -inherit flag-o-matic savedconfig toolchain-funcs
743 -
744 -DESCRIPTION="Utilities for rescue and embedded systems"
745 -HOMEPAGE="https://www.busybox.net/"
746 -if [[ ${PV} == "9999" ]] ; then
747 - MY_P=${P}
748 - EGIT_REPO_URI="https://git.busybox.net/busybox"
749 - inherit git-r3
750 -else
751 - MY_P=${PN}-${PV/_/-}
752 - SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2"
753 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
754 -fi
755 -
756 -LICENSE="GPL-2" # GPL-2 only
757 -SLOT="0"
758 -IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd"
759 -REQUIRED_USE="pam? ( !static )"
760 -RESTRICT="test"
761 -
762 -# TODO: Could make pkgconfig conditional on selinux? bug #782829
763 -COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
764 - pam? ( sys-libs/pam )
765 - virtual/libcrypt:="
766 -DEPEND="${COMMON_DEPEND}
767 - static? (
768 - virtual/libcrypt[static-libs]
769 - selinux? ( sys-libs/libselinux[static-libs(+)] )
770 - )
771 - >=sys-kernel/linux-headers-2.6.39"
772 -BDEPEND="virtual/pkgconfig"
773 -RDEPEND="${COMMON_DEPEND}
774 - mdev? ( !<sys-apps/openrc-0.13 )"
775 -
776 -S="${WORKDIR}/${MY_P}"
777 -
778 -busybox_config_option() {
779 - local flag=$1 ; shift
780 - if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
781 - busybox_config_option $(usex ${flag} y n) "$@"
782 - return
783 - fi
784 - local expr
785 - while [[ $# -gt 0 ]] ; do
786 - case ${flag} in
787 - y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;;
788 - n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;;
789 - *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;;
790 - esac
791 - sed -i -e "${expr}" .config || die
792 - einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")"
793 - shift
794 - done
795 -}
796 -
797 -busybox_config_enabled() {
798 - local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
799 - case ${val} in
800 - "") return 1 ;;
801 - y) return 0 ;;
802 - *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
803 - esac
804 -}
805 -
806 -# patches go here!
807 -PATCHES=(
808 - "${FILESDIR}"/${PN}-1.26.2-bb.patch
809 - # "${FILESDIR}"/${P}-*.patch
810 -)
811 -
812 -src_prepare() {
813 - default
814 - unset KBUILD_OUTPUT #88088
815 - append-flags -fno-strict-aliasing #310413
816 - use ppc64 && append-flags -mminimal-toc #130943
817 -
818 - cp "${FILESDIR}"/ginit.c init/ || die
819 -
820 - # flag cleanup
821 - sed -i -r \
822 - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
823 - Makefile.flags || die
824 - #sed -i '/bbsh/s:^//::' include/applets.h
825 - sed -i '/^#error Aborting compilation./d' applets/applets.c || die
826 - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
827 - sed -i \
828 - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \
829 - -e "/^AR\>/s:=.*:= $(tc-getAR):" \
830 - -e "/^CC\>/s:=.*:= $(tc-getCC):" \
831 - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
832 - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
833 - Makefile || die
834 - sed -i \
835 - -e 's:-static-libgcc::' \
836 - Makefile.flags || die
837 -}
838 -
839 -src_configure() {
840 - # check for a busybox config before making one of our own.
841 - # if one exist lets return and use it.
842 -
843 - restore_config .config
844 - if [ -f .config ]; then
845 - yes "" | emake -j1 -s oldconfig >/dev/null
846 - return 0
847 - else
848 - ewarn "Could not locate user configfile, so we will save a default one"
849 - fi
850 -
851 - # setup the config file
852 - emake -j1 -s allyesconfig >/dev/null
853 - # nommu forces a bunch of things off which we want on #387555
854 - busybox_config_option n NOMMU
855 - sed -i '/^#/d' .config
856 - yes "" | emake -j1 -s oldconfig >/dev/null
857 -
858 - # now turn off stuff we really don't want
859 - busybox_config_option n DMALLOC
860 - busybox_config_option n FEATURE_2_4_MODULES #607548
861 - busybox_config_option n FEATURE_SUID_CONFIG
862 - busybox_config_option n BUILD_AT_ONCE
863 - busybox_config_option n BUILD_LIBBUSYBOX
864 - busybox_config_option n FEATURE_CLEAN_UP
865 - busybox_config_option n MONOTONIC_SYSCALL
866 - busybox_config_option n USE_PORTABLE_CODE
867 - busybox_config_option n WERROR
868 - # triming the BSS size may be dangerous
869 - busybox_config_option n FEATURE_USE_BSS_TAIL
870 -
871 - # These cause trouble with musl.
872 - if use elibc_musl; then
873 - busybox_config_option n FEATURE_UTMP
874 - busybox_config_option n EXTRA_COMPAT
875 - busybox_config_option n FEATURE_VI_REGEX_SEARCH
876 - fi
877 -
878 - # If these are not set and we are using a busybox setup
879 - # all calls to system() will fail.
880 - busybox_config_option y ASH
881 - busybox_config_option y SH_IS_ASH
882 - busybox_config_option n HUSH
883 - busybox_config_option n SH_IS_HUSH
884 -
885 - busybox_config_option '"/run"' PID_FILE_PATH
886 - busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH
887 -
888 - # disable ipv6 applets
889 - if ! use ipv6; then
890 - busybox_config_option n FEATURE_IPV6
891 - busybox_config_option n TRACEROUTE6
892 - busybox_config_option n PING6
893 - busybox_config_option n UDHCPC6
894 - fi
895 -
896 - busybox_config_option pam PAM
897 - busybox_config_option static STATIC
898 - busybox_config_option syslog {K,SYS}LOGD LOGGER
899 - busybox_config_option systemd FEATURE_SYSTEMD
900 - busybox_config_option math FEATURE_AWK_LIBM
901 -
902 - # all the debug options are compiler related, so punt them
903 - busybox_config_option n DEBUG_SANITIZE
904 - busybox_config_option n DEBUG
905 - busybox_config_option y NO_DEBUG_LIB
906 - busybox_config_option n DMALLOC
907 - busybox_config_option n EFENCE
908 - busybox_config_option $(usex debug y n) TFTP_DEBUG
909 -
910 - busybox_config_option selinux SELINUX
911 -
912 - # this opt only controls mounting with <linux-2.6.23
913 - busybox_config_option n FEATURE_MOUNT_NFS
914 -
915 - # glibc-2.26 and later does not ship RPC implientation
916 - busybox_config_option n FEATURE_HAVE_RPC
917 - busybox_config_option n FEATURE_INETD_RPC
918 -
919 - # default a bunch of uncommon options to off
920 - local opt
921 - for opt in \
922 - ADD_SHELL \
923 - BEEP BOOTCHARTD \
924 - CRONTAB \
925 - DC DEVFSD DNSD DPKG{,_DEB} \
926 - FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
927 - FEATURE_DEVFS \
928 - HOSTID HUSH \
929 - INETD INOTIFYD IPCALC \
930 - LOCALE_SUPPORT LOGNAME LPD \
931 - MAKEMIME MKFS_MINIX MSH \
932 - OD \
933 - RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \
934 - SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
935 - TASKSET TCPSVD \
936 - RPM RPM2CPIO \
937 - UDPSVD UUDECODE UUENCODE
938 - do
939 - busybox_config_option n ${opt}
940 - done
941 -
942 - emake -j1 oldconfig > /dev/null
943 -}
944 -
945 -src_compile() {
946 - unset KBUILD_OUTPUT #88088
947 - export SKIP_STRIP=y
948 -
949 - emake V=1 busybox
950 -
951 - # bug #701512
952 - emake V=1 doc
953 -}
954 -
955 -src_install() {
956 - unset KBUILD_OUTPUT #88088
957 - save_config .config
958 -
959 - into /
960 - dodir /bin
961 - if use sep-usr ; then
962 - # install /ginit to take care of mounting stuff
963 - exeinto /
964 - newexe busybox_unstripped ginit
965 - dosym /ginit /bin/bb
966 - dosym bb /bin/busybox
967 - else
968 - newbin busybox_unstripped busybox
969 - dosym busybox /bin/bb
970 - fi
971 - if use mdev ; then
972 - dodir /$(get_libdir)/mdev/
973 - use make-symlinks || dosym /bin/bb /sbin/mdev
974 - cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
975 -
976 - exeinto /$(get_libdir)/mdev/
977 - doexe "${FILESDIR}"/mdev/*
978 -
979 - newinitd "${FILESDIR}"/mdev.initd mdev
980 - fi
981 - if use livecd ; then
982 - dosym busybox /bin/vi
983 - fi
984 -
985 - # add busybox daemon's, bug #444718
986 - if busybox_config_enabled FEATURE_NTPD_SERVER; then
987 - newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
988 - newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
989 - fi
990 - if busybox_config_enabled SYSLOGD; then
991 - newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
992 - newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
993 - fi
994 - if busybox_config_enabled KLOGD; then
995 - newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
996 - newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
997 - fi
998 - if busybox_config_enabled WATCHDOG; then
999 - newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
1000 - newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
1001 - fi
1002 - if busybox_config_enabled UDHCPC; then
1003 - local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
1004 - exeinto "${path%/*}"
1005 - newexe examples/udhcp/simple.script "${path##*/}"
1006 - fi
1007 - if busybox_config_enabled UDHCPD; then
1008 - insinto /etc
1009 - doins examples/udhcp/udhcpd.conf
1010 - fi
1011 -
1012 - # bundle up the symlink files for use later
1013 - emake DESTDIR="${ED}" install
1014 - rm _install/bin/busybox
1015 - # for compatibility, provide /usr/bin/env
1016 - mkdir -p _install/usr/bin
1017 - ln -s /bin/env _install/usr/bin/env
1018 - tar cf busybox-links.tar -C _install . || : #;die
1019 - insinto /usr/share/${PN}
1020 - use make-symlinks && doins busybox-links.tar
1021 -
1022 - dodoc AUTHORS README TODO
1023 -
1024 - cd docs || die
1025 - doman busybox.1
1026 - docinto txt
1027 - dodoc *.txt
1028 - docinto pod
1029 - dodoc *.pod
1030 - docinto html
1031 - dodoc *.html
1032 -
1033 - cd ../examples || die
1034 - docinto examples
1035 - dodoc inittab depmod.pl *.conf *.script undeb unrpm
1036 -}
1037 -
1038 -pkg_preinst() {
1039 - if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ -z "${ROOT}" ]] ; then
1040 - ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
1041 - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
1042 - ewarn "If you are creating a binary only and not merging this is probably ok."
1043 - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want."
1044 - die "silly options will destroy your system"
1045 - fi
1046 -
1047 - if use make-symlinks ; then
1048 - mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
1049 - fi
1050 -}
1051 -
1052 -pkg_postinst() {
1053 - savedconfig_pkg_postinst
1054 -
1055 - if use make-symlinks ; then
1056 - cd "${T}" || die
1057 - mkdir _install
1058 - tar xf busybox-links.tar -C _install || die
1059 - cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
1060 - fi
1061 -
1062 - if use sep-usr ; then
1063 - elog "In order to use the sep-usr support, you have to update your"
1064 - elog "kernel command line. Add the option:"
1065 - elog " init=/ginit"
1066 - elog "To launch a different init than /sbin/init, use:"
1067 - elog " init=/ginit /sbin/yourinit"
1068 - elog "To get a rescue shell, you may boot with:"
1069 - elog " init=/ginit bb"
1070 - fi
1071 -}