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