1 |
commit: 47be5cf7a7d781f4d8bb7e906be2d4078de33a5a |
2 |
Author: gebau00a <gebauer.andy <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Jan 29 07:22:40 2017 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 29 11:07:27 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=47be5cf7 |
7 |
|
8 |
Bump busybox to 1.26.2 |
9 |
|
10 |
sys-apps/busybox/Manifest | 3 + |
11 |
sys-apps/busybox/busybox-1.26.2.ebuild | 310 +++++++++++++++++++++++++ |
12 |
sys-apps/busybox/files/busybox-1.26.2-bb.patch | 42 ++++ |
13 |
3 files changed, 355 insertions(+) |
14 |
|
15 |
diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest |
16 |
index d6ea4a8..7f76ff5 100644 |
17 |
--- a/sys-apps/busybox/Manifest |
18 |
+++ b/sys-apps/busybox/Manifest |
19 |
@@ -3,6 +3,7 @@ AUX busybox-1.24.1-trylink-ldflags.patch 1179 SHA256 2d57a1e34f3a8a6c4e08a0214ae |
20 |
AUX busybox-1.24.2-CVE-2016-2147.patch 3453 SHA256 7cedbcfe2744a7efc1d811372932bc8ef610b8bbdfe34d28ba5a0b5d582b885d SHA512 1268f11089ab5bc4d296995ff8216a8f2f6fbb644d20f04502f92fcadd1cafade43eb6e613fe4b9ab7e475e2bcc3b85ae8196d78c4d56a62db2ce0f3564ba644 WHIRLPOOL 38c30e4256e18cb2f366c5d5b35cd8b268fd0375a94616c38b43ef283df1c7772ec28f61fb4d181e5448ddc04bdc8ab3a0fdc8dd4f97ccd82bfa38cdfd190c0e |
21 |
AUX busybox-1.24.2-CVE-2016-2148.patch 1956 SHA256 0d42e12334ff14616ce9dc22f02f15c8f3df3ef3334c9ef81abd29d21b5ac687 SHA512 0ffdfa24d5943a15d924fdd42b5d410c0a215d0cad1753caf6c6aba7d0e5be7a883b561a683a4ac8b906e96b1839f4e6f235501c1467afe50508284f51e42c0c WHIRLPOOL 6a37440abe63b75815b41d2bb4ddc8de1a557bca3a7a17802b7443079fd7418260d81231900f697cab4b4fbbd892be37dc9d97df6880e342db07fa5792f556bb |
22 |
AUX busybox-1.24.2-ash-recursive-heredocs.patch 2442 SHA256 2e4b028036b6e983f04f51a2cfb5e61a6e71e4143e5342c54b96bc2296e5d45c SHA512 24cd081d29fd013b9e1893ceb6f3fb8e240e46f69c1d225eed4c71ab5b630e064a15d158f37a2a1ad3f00dafa972af84fe79bd32917b4f126d557839b3288b02 WHIRLPOOL d9108189f20b0326f3095d420aab74dae4bad00381781558f4d6360c62aa9021b01194b773be13625dd7ab97732ea737685e330f19046527792f0f278f761e26 |
23 |
+AUX busybox-1.26.2-bb.patch 2172 SHA256 46893ff6666269df3af68fbe2bdd09cb1aca57f5e1166adfe93db3c29ec5ae28 SHA512 ead355aa1882ac7394d1803efb045d6a3039569c8f33bbd51e41654a1d50ca47c7d5f5caeadc8d36ddd360416e7b23bcd270cae1d515b524dd3ab08338b1b910 WHIRLPOOL 6dd0bbe52cc6a0b1e3ed98fc1c9bc3585d0cbcd5c7143096b5793d484b28733f79da56d09eea662cb2cb1ab172412273256f548a03b7b9a44e834e1d275ed5b5 |
24 |
AUX ginit.c 3097 SHA256 fd6a4715d3dd10f6db479020433da3997d397658301335c847fb779129238b8c SHA512 8bf70f13db0fbeecedf9a9f862c5391c0d8b7aa3ddd2ec85cda9b360c3117a01e32b01017b8c30197f587e521ba360ff70d1caf8d0f69d5c3a27f37ecc252e7c WHIRLPOOL a1ec3ccc296033d88a9504b693c7d249d0bd11b1d75e3f59a62137c5e4b4c914fe2b8971c86dbca2cc8ccc0d86f3f8c2c45bb44cec85a3628c44f091476baa92 |
25 |
AUX klogd.confd 218 SHA256 737b78745964e110da2fd3357c6d5fb80ccacf979039b8d40c03cf1cb969e5f3 SHA512 3348d5376b368b28d1431692a93868cd4550be12ad729340c5f78da35a5bd295e7613d70ce8ccde5029ad6d87a41c2f24155180f3570de8a9174dd63dece143f WHIRLPOOL ea28c1d926e36fba0ab69de8ddfd2503889b7cfa3a4ada347a9d22d9894fe30be068c0ed55f899b952e62b8de3cb69e1a4209f7864787988ded28ede10c7445a |
26 |
AUX klogd.initd 256 SHA256 50b2596723b566cf3621ce408de8aaa2210118187fcb7b4bc64d499fa9fc9ee8 SHA512 d7810c5744b6d2bf0796413838baaac90c53c7495acee058d412a274b4c8cf80de5ba88665ee6dc8aaf3abc43dddee8d7ef794814eafe61aa2e3a40a9f051be3 WHIRLPOOL 65f7ec4ac19ce5f60f41f3be1bdf2934a379f8cbcedbb395792c09569608f2239312d8d7116e4d6d0f939b62413d8b78d8727576ae64be8f534b85459075f092 |
27 |
@@ -19,6 +20,8 @@ AUX watchdog.confd 232 SHA256 786d9497ad55c29d6fff231709e71ecad94f2ee1de3b45b461 |
28 |
AUX watchdog.initd 230 SHA256 ef7f8dc91fe058323336558cb0659f402a45783a69f6c2da80975ec69d785e0e SHA512 262967c00428a6dfb8dfe0d5913ea9bf9202d1a77c0b661d1cc6522650c78333ce89f12ff27a382f21d9928427e12cc677964d78ff5d5c74c17e57ca101d06f2 WHIRLPOOL c247926f5d99a179586286281e34da3dc292973089b450a81e3dd9c0644eb10e7e3989ff47423371c9f7a5780a1be1deb576734dee35dfade439fbd37fca7170 |
29 |
DIST busybox-1.25.1.tar.bz2 2103070 SHA256 27667e0f2328fdbd79cfd622e4453e5c57e58f781c5da97c9be337d93aa2a02e SHA512 9648877ed11e5a55213cd14fd64f6fc64dbd17013fbfaa4e67f4fd433f59e9231ed78a88e6e8100a4794d833f1d9863bb86f75faae093418866770804bf873cb WHIRLPOOL 4b7bc6d3a88559812797feb4574975b9fdeb6eac6ac7a0fe51e4750a3b05a614ecb8bd9d58547047cdf1e0b66d9bcd189c8a4193fc2f3b491a6268bc06761ad1 |
30 |
DIST busybox-1.26.0.tar.bz2 2143958 SHA256 3ad227375ee870d529007f6ce83f173b8bd5a37df624ecb460295554261c0f4c SHA512 9e38c2f4c5ddb6c3a184170b5526c1a78cf53a575ed359fb18c407976cab9788fa95a26ca2d4e5c32e1d639890944d98e118149ee1402b18fe085b0baf0186d3 WHIRLPOOL c8a7419bd711d3e0249807ef9f9ff6123ff8d0767479ea3b3e54ef48f6132514942bc37b79334ca2afd6009d32c5e242712bd6b3995f49904c33040c66df9dcc |
31 |
+DIST busybox-1.26.2.tar.bz2 2120931 SHA256 da3e44913fc1a9c9b7c5337ea5292da518683cbff32be630777f565d6036af16 SHA512 9926d211d0b4f34b513d934d7b111ebbf933c2dc31206bdd80426a62d47d5b1475b70bec5aaa14a26b94a202ab1465d994062a002750a312dcb8167096eb3719 WHIRLPOOL 64fdbd3ede8e382d0237b1576000555f563c4ca93d58cfbb72f71374b662e3201863110a069f0e4a27dab7c0a6102d98ccfd4d57f1dfe44c9b12a17c6a30128a |
32 |
EBUILD busybox-1.25.1.ebuild 8808 SHA256 7e1018cb8319bacad230d2714122a64d6d91cfbad5827fc9dc6a92cd578bcbed SHA512 a22023117d44e2e23529e296e08545372f30f356a3d281ed106c1863782bc495c13f687d427e32bc460eeaae3cce4f7a8f2d7d1898eceb81d52f20ea53559e1d WHIRLPOOL 7a8936c0a02f736e474b4e7e16cd84451058367280633547ede83269d02ce3dfc0bfae08f1cbaab7661f9f2543d60f05f3941cea5148ffdb3ffb47e866e6974c |
33 |
EBUILD busybox-1.26.0.ebuild 8812 SHA256 6fbc35ef5b176e55db72046bb23152111a36232f48afd3d0609196d0a0fe8f46 SHA512 a9ae6af14c6136a07cd485ccf8c1cf8a057fbf97a9602507698f9cb19810f3129bb5ca16743e2d9bcc1b11e3a314dcaca202cebbbbc832f824a6b394975404f3 WHIRLPOOL 2b669f258e34304315a53908fdc5492d4e149e1ef638d57a6cebb48e5b60ee1bbf4cee52f4b07f14a8b2585acb137f393233336ee773af25a6f4c2e8d96863a9 |
34 |
+EBUILD busybox-1.26.2.ebuild 8812 SHA256 142f77e3913743bcf0262ad0acb9b3cfb7d5cc7447d311661e80e800801159ba SHA512 84d5da9a4ec5cf83eb51ab5a63437ee63c9ac4509f0feecea75261ea0f5061bbc6f5c51f11bf8c07c9e8ce719de7900c093d5e7ac1c24e273cd587b341afcd33 WHIRLPOOL 1d94d513f7c9c6fb9197628335ad189f8c6e338d7bf5b2893ab498e8b83873bb59171c3678d5e9d1e67c53d32b2ad8864cfecd0901aadccb2a9335879b4b7724 |
35 |
MISC metadata.xml 872 SHA256 1cf483a8d55e8cbe20edb30261276d71e0ba0a1b06d73621f849496d1f6c4a17 SHA512 c0b3f8b9348553d8a4db25c1c51ef5a82bcd14a09251568c0709b392e2dea9bc35dced96377d11a32ad53ba09052603781caebf754428debf7acb0aaedafbf07 WHIRLPOOL 91b126a39ecd6937e6058814b88043e9fbbf7b434854e25a4e4a7ad8e666de37978b8bac0c8dca0255096a42af9afed412bb5bbccdffaf03ba75c2fd2e4b3428 |
36 |
|
37 |
diff --git a/sys-apps/busybox/busybox-1.26.2.ebuild b/sys-apps/busybox/busybox-1.26.2.ebuild |
38 |
new file mode 100644 |
39 |
index 0000000..5569856 |
40 |
--- /dev/null |
41 |
+++ b/sys-apps/busybox/busybox-1.26.2.ebuild |
42 |
@@ -0,0 +1,310 @@ |
43 |
+# Copyright 1999-2016 Gentoo Foundation |
44 |
+# Distributed under the terms of the GNU General Public License v2 |
45 |
+# $Id$ |
46 |
+ |
47 |
+# See `man savedconfig.eclass` for info on how to use USE=savedconfig. |
48 |
+ |
49 |
+EAPI="5" |
50 |
+inherit eutils flag-o-matic savedconfig toolchain-funcs multilib |
51 |
+ |
52 |
+DESCRIPTION="Utilities for rescue and embedded systems" |
53 |
+HOMEPAGE="https://www.busybox.net/" |
54 |
+if [[ ${PV} == "9999" ]] ; then |
55 |
+ MY_P=${PN} |
56 |
+ EGIT_REPO_URI="git://busybox.net/busybox.git" |
57 |
+ inherit git-2 |
58 |
+else |
59 |
+ MY_P=${PN}-${PV/_/-} |
60 |
+ SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2" |
61 |
+ KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" |
62 |
+fi |
63 |
+ |
64 |
+LICENSE="GPL-2" # GPL-2 only |
65 |
+SLOT="0" |
66 |
+IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd" |
67 |
+REQUIRED_USE="pam? ( !static )" |
68 |
+RESTRICT="test" |
69 |
+ |
70 |
+COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) ) |
71 |
+ pam? ( sys-libs/pam )" |
72 |
+DEPEND="${COMMON_DEPEND} |
73 |
+ static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) ) |
74 |
+ >=sys-kernel/linux-headers-2.6.39" |
75 |
+RDEPEND="${COMMON_DEPEND} |
76 |
+ mdev? ( !<sys-apps/openrc-0.13 )" |
77 |
+ |
78 |
+S=${WORKDIR}/${MY_P} |
79 |
+ |
80 |
+busybox_config_option() { |
81 |
+ local flag=$1 ; shift |
82 |
+ if [[ ${flag} != [yn] ]] ; then |
83 |
+ busybox_config_option $(usex ${flag} y n) "$@" |
84 |
+ return |
85 |
+ fi |
86 |
+ while [[ $# -gt 0 ]] ; do |
87 |
+ if [[ ${flag} == "y" ]] ; then |
88 |
+ sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config |
89 |
+ else |
90 |
+ sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" .config |
91 |
+ fi |
92 |
+ einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find CONFIG_$1 ...) |
93 |
+ shift |
94 |
+ done |
95 |
+} |
96 |
+ |
97 |
+busybox_config_enabled() { |
98 |
+ local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config) |
99 |
+ case ${val} in |
100 |
+ "") return 1 ;; |
101 |
+ y) return 0 ;; |
102 |
+ *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;; |
103 |
+ esac |
104 |
+} |
105 |
+ |
106 |
+src_prepare() { |
107 |
+ unset KBUILD_OUTPUT #88088 |
108 |
+ append-flags -fno-strict-aliasing #310413 |
109 |
+ use ppc64 && append-flags -mminimal-toc #130943 |
110 |
+ |
111 |
+ # patches go here! |
112 |
+ epatch "${FILESDIR}"/${PN}-1.26.2-bb.patch |
113 |
+# epatch "${FILESDIR}"/${P}-*.patch |
114 |
+ cp "${FILESDIR}"/ginit.c init/ || die |
115 |
+ |
116 |
+ # flag cleanup |
117 |
+ sed -i -r \ |
118 |
+ -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ |
119 |
+ Makefile.flags || die |
120 |
+ #sed -i '/bbsh/s:^//::' include/applets.h |
121 |
+ sed -i '/^#error Aborting compilation./d' applets/applets.c || die |
122 |
+ use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile |
123 |
+ sed -i \ |
124 |
+ -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ |
125 |
+ -e "/^AR\>/s:=.*:= $(tc-getAR):" \ |
126 |
+ -e "/^CC\>/s:=.*:= $(tc-getCC):" \ |
127 |
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ |
128 |
+ -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \ |
129 |
+ Makefile || die |
130 |
+ sed -i \ |
131 |
+ -e 's:-static-libgcc::' \ |
132 |
+ Makefile.flags || die |
133 |
+} |
134 |
+ |
135 |
+src_configure() { |
136 |
+ # check for a busybox config before making one of our own. |
137 |
+ # if one exist lets return and use it. |
138 |
+ |
139 |
+ restore_config .config |
140 |
+ if [ -f .config ]; then |
141 |
+ yes "" | emake -j1 -s oldconfig >/dev/null |
142 |
+ return 0 |
143 |
+ else |
144 |
+ ewarn "Could not locate user configfile, so we will save a default one" |
145 |
+ fi |
146 |
+ |
147 |
+ # setup the config file |
148 |
+ emake -j1 -s allyesconfig >/dev/null |
149 |
+ # nommu forces a bunch of things off which we want on #387555 |
150 |
+ busybox_config_option n NOMMU |
151 |
+ sed -i '/^#/d' .config |
152 |
+ yes "" | emake -j1 -s oldconfig >/dev/null |
153 |
+ |
154 |
+ # now turn off stuff we really don't want |
155 |
+ busybox_config_option n DMALLOC |
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 causes trouble with musl. Since we don't really |
167 |
+ # depend on busybox for most of the musl work, we'll lazily |
168 |
+ # just turn them off. |
169 |
+ busybox_config_option n FEATURE_UTMP |
170 |
+ busybox_config_option n EXTRA_COMPAT |
171 |
+ busybox_config_option n FEATURE_VI_REGEX_SEARCH |
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 n HUSH |
177 |
+ |
178 |
+ # disable ipv6 applets |
179 |
+ if ! use ipv6; then |
180 |
+ busybox_config_option n FEATURE_IPV6 |
181 |
+ busybox_config_option n TRACEROUTE6 |
182 |
+ busybox_config_option n PING6 |
183 |
+ busybox_config_option n UDHCPC6 |
184 |
+ fi |
185 |
+ |
186 |
+ busybox_config_option $(usex static n pam) PAM |
187 |
+ busybox_config_option static STATIC |
188 |
+ busybox_config_option syslog {K,SYS}LOGD LOGGER |
189 |
+ busybox_config_option systemd FEATURE_SYSTEMD |
190 |
+ busybox_config_option math FEATURE_AWK_LIBM |
191 |
+ |
192 |
+ # all the debug options are compiler related, so punt them |
193 |
+ busybox_config_option n DEBUG_SANITIZE |
194 |
+ busybox_config_option n DEBUG |
195 |
+ busybox_config_option y NO_DEBUG_LIB |
196 |
+ busybox_config_option n DMALLOC |
197 |
+ busybox_config_option n EFENCE |
198 |
+ busybox_config_option $(usex debug y n) TFTP_DEBUG |
199 |
+ |
200 |
+ busybox_config_option selinux SELINUX |
201 |
+ |
202 |
+ # this opt only controls mounting with <linux-2.6.23 |
203 |
+ busybox_config_option n FEATURE_MOUNT_NFS |
204 |
+ |
205 |
+ # default a bunch of uncommon options to off |
206 |
+ local opt |
207 |
+ for opt in \ |
208 |
+ ADD_SHELL \ |
209 |
+ BEEP BOOTCHARTD \ |
210 |
+ CRONTAB \ |
211 |
+ DC DEVFSD DNSD DPKG{,_DEB} \ |
212 |
+ FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \ |
213 |
+ FEATURE_DEVFS \ |
214 |
+ HOSTID HUSH \ |
215 |
+ INETD INOTIFYD IPCALC \ |
216 |
+ LOCALE_SUPPORT LOGNAME LPD \ |
217 |
+ MAKEMIME MKFS_MINIX MSH \ |
218 |
+ OD \ |
219 |
+ RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \ |
220 |
+ SLATTACH SMEMCAP SULOGIN SV{,LOGD} \ |
221 |
+ TASKSET TCPSVD \ |
222 |
+ RPM RPM2CPIO \ |
223 |
+ UDPSVD UUDECODE UUENCODE |
224 |
+ do |
225 |
+ busybox_config_option n ${opt} |
226 |
+ done |
227 |
+ |
228 |
+ emake -j1 oldconfig > /dev/null |
229 |
+} |
230 |
+ |
231 |
+src_compile() { |
232 |
+ unset KBUILD_OUTPUT #88088 |
233 |
+ export SKIP_STRIP=y |
234 |
+ |
235 |
+ emake V=1 busybox |
236 |
+} |
237 |
+ |
238 |
+src_install() { |
239 |
+ unset KBUILD_OUTPUT #88088 |
240 |
+ save_config .config |
241 |
+ |
242 |
+ into / |
243 |
+ dodir /bin |
244 |
+ if use sep-usr ; then |
245 |
+ # install /ginit to take care of mounting stuff |
246 |
+ exeinto / |
247 |
+ newexe busybox_unstripped ginit |
248 |
+ dosym /ginit /bin/bb |
249 |
+ dosym bb /bin/busybox |
250 |
+ else |
251 |
+ newbin busybox_unstripped busybox |
252 |
+ dosym busybox /bin/bb |
253 |
+ fi |
254 |
+ if use mdev ; then |
255 |
+ dodir /$(get_libdir)/mdev/ |
256 |
+ use make-symlinks || dosym /bin/bb /sbin/mdev |
257 |
+ cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf |
258 |
+ |
259 |
+ exeinto /$(get_libdir)/mdev/ |
260 |
+ doexe "${FILESDIR}"/mdev/* |
261 |
+ |
262 |
+ newinitd "${FILESDIR}"/mdev.initd mdev |
263 |
+ fi |
264 |
+ if use livecd ; then |
265 |
+ dosym busybox /bin/vi |
266 |
+ fi |
267 |
+ |
268 |
+ # add busybox daemon's, bug #444718 |
269 |
+ if busybox_config_enabled FEATURE_NTPD_SERVER; then |
270 |
+ newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd" |
271 |
+ newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd" |
272 |
+ fi |
273 |
+ if busybox_config_enabled SYSLOGD; then |
274 |
+ newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd" |
275 |
+ newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd" |
276 |
+ fi |
277 |
+ if busybox_config_enabled KLOGD; then |
278 |
+ newconfd "${FILESDIR}/klogd.confd" "busybox-klogd" |
279 |
+ newinitd "${FILESDIR}/klogd.initd" "busybox-klogd" |
280 |
+ fi |
281 |
+ if busybox_config_enabled WATCHDOG; then |
282 |
+ newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog" |
283 |
+ newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog" |
284 |
+ fi |
285 |
+ if busybox_config_enabled UDHCPC; then |
286 |
+ local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT) |
287 |
+ exeinto "${path%/*}" |
288 |
+ newexe examples/udhcp/simple.script "${path##*/}" |
289 |
+ fi |
290 |
+ if busybox_config_enabled UDHCPD; then |
291 |
+ insinto /etc |
292 |
+ doins examples/udhcp/udhcpd.conf |
293 |
+ fi |
294 |
+ |
295 |
+ # bundle up the symlink files for use later |
296 |
+ emake DESTDIR="${ED}" install |
297 |
+ rm _install/bin/busybox |
298 |
+ # for compatibility, provide /usr/bin/env |
299 |
+ mkdir -p _install/usr/bin |
300 |
+ ln -s /bin/env _install/usr/bin/env |
301 |
+ tar cf busybox-links.tar -C _install . || : #;die |
302 |
+ insinto /usr/share/${PN} |
303 |
+ use make-symlinks && doins busybox-links.tar |
304 |
+ |
305 |
+ dodoc AUTHORS README TODO |
306 |
+ |
307 |
+ cd docs |
308 |
+ docinto txt |
309 |
+ dodoc *.txt |
310 |
+ docinto pod |
311 |
+ dodoc *.pod |
312 |
+ dohtml *.html |
313 |
+ |
314 |
+ cd ../examples |
315 |
+ docinto examples |
316 |
+ dodoc inittab depmod.pl *.conf *.script undeb unrpm |
317 |
+} |
318 |
+ |
319 |
+pkg_preinst() { |
320 |
+ if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then |
321 |
+ ewarn "setting USE=make-symlinks and emerging to / is very dangerous." |
322 |
+ ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." |
323 |
+ ewarn "If you are creating a binary only and not merging this is probably ok." |
324 |
+ ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want." |
325 |
+ die "silly options will destroy your system" |
326 |
+ fi |
327 |
+ |
328 |
+ if use make-symlinks ; then |
329 |
+ mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die |
330 |
+ fi |
331 |
+} |
332 |
+ |
333 |
+pkg_postinst() { |
334 |
+ savedconfig_pkg_postinst |
335 |
+ |
336 |
+ if use make-symlinks ; then |
337 |
+ cd "${T}" || die |
338 |
+ mkdir _install |
339 |
+ tar xf busybox-links.tar -C _install || die |
340 |
+ cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" |
341 |
+ fi |
342 |
+ |
343 |
+ if use sep-usr ; then |
344 |
+ elog "In order to use the sep-usr support, you have to update your" |
345 |
+ elog "kernel command line. Add the option:" |
346 |
+ elog " init=/ginit" |
347 |
+ elog "To launch a different init than /sbin/init, use:" |
348 |
+ elog " init=/ginit /sbin/yourinit" |
349 |
+ elog "To get a rescue shell, you may boot with:" |
350 |
+ elog " init=/ginit bb" |
351 |
+ fi |
352 |
+} |
353 |
|
354 |
diff --git a/sys-apps/busybox/files/busybox-1.26.2-bb.patch b/sys-apps/busybox/files/busybox-1.26.2-bb.patch |
355 |
new file mode 100644 |
356 |
index 0000000..f120340 |
357 |
--- /dev/null |
358 |
+++ b/sys-apps/busybox/files/busybox-1.26.2-bb.patch |
359 |
@@ -0,0 +1,42 @@ |
360 |
+diff -Naur busybox-1.26.2.orig/shell/ash.c busybox-1.26.2/shell/ash.c |
361 |
+--- busybox-1.26.2.orig/shell/ash.c 2017-01-10 10:55:51.000000000 -0500 |
362 |
++++ busybox-1.26.2/shell/ash.c 2017-01-28 17:02:08.961584737 -0500 |
363 |
+@@ -144,6 +144,8 @@ |
364 |
+ //applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP)) |
365 |
+ //applet:IF_SH_IS_ASH(APPLET_ODDNAME(sh, ash, BB_DIR_BIN, BB_SUID_DROP, ash)) |
366 |
+ //applet:IF_BASH_IS_ASH(APPLET_ODDNAME(bash, ash, BB_DIR_BIN, BB_SUID_DROP, ash)) |
367 |
++//applet:IF_ASH(APPLET_ODDNAME(bb, ash, BB_DIR_BIN, BB_SUID_DROP, ash)) |
368 |
++//applet:IF_ASH(APPLET_ODDNAME(bbsh, ash, BB_DIR_BIN, BB_SUID_DROP, ash)) |
369 |
+ |
370 |
+ //kbuild:lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o shell_common.o |
371 |
+ //kbuild:lib-$(CONFIG_SH_IS_ASH) += ash.o ash_ptr_hack.o shell_common.o |
372 |
+@@ -7572,6 +7574,8 @@ |
373 |
+ } |
374 |
+ /* re-exec ourselves with the new arguments */ |
375 |
+ execve(bb_busybox_exec_path, argv, envp); |
376 |
++ execve("/bin/busybox.static", argv, envp); |
377 |
++ execve("/bin/busybox", argv, envp); |
378 |
+ /* If they called chroot or otherwise made the binary no longer |
379 |
+ * executable, fall through */ |
380 |
+ } |
381 |
+diff -Naur busybox-1.26.2.orig/shell/hush.c busybox-1.26.2/shell/hush.c |
382 |
+--- busybox-1.26.2.orig/shell/hush.c 2017-01-10 10:55:51.000000000 -0500 |
383 |
++++ busybox-1.26.2/shell/hush.c 2017-01-28 17:05:13.235936850 -0500 |
384 |
+@@ -221,6 +221,8 @@ |
385 |
+ //applet:IF_MSH(APPLET_ODDNAME(msh, hush, BB_DIR_BIN, BB_SUID_DROP, hush)) |
386 |
+ //applet:IF_SH_IS_HUSH(APPLET_ODDNAME(sh, hush, BB_DIR_BIN, BB_SUID_DROP, hush)) |
387 |
+ //applet:IF_BASH_IS_HUSH(APPLET_ODDNAME(bash, hush, BB_DIR_BIN, BB_SUID_DROP, hush)) |
388 |
++//applet:IF_HUSH(APPLET_ODDNAME(bb, hush, BB_DIR_BIN, BB_SUID_DROP, hush)) |
389 |
++//applet:IF_HUSH(APPLET_ODDNAME(bbsh, hush, BB_DIR_BIN, BB_SUID_DROP, hush)) |
390 |
+ |
391 |
+ //kbuild:lib-$(CONFIG_HUSH) += hush.o match.o shell_common.o |
392 |
+ //kbuild:lib-$(CONFIG_SH_IS_HUSH) += hush.o match.o shell_common.o |
393 |
+@@ -6073,6 +6075,8 @@ |
394 |
+ if (SPECIAL_JOBSTOP_SIGS != 0) |
395 |
+ switch_off_special_sigs(G.special_sig_mask & SPECIAL_JOBSTOP_SIGS); |
396 |
+ execve(bb_busybox_exec_path, argv, pp); |
397 |
++ execve("/bin/busybox.static", argv, envp); |
398 |
++ execve("/bin/busybox", argv, envp); |
399 |
+ /* Fallback. Useful for init=/bin/hush usage etc */ |
400 |
+ if (argv[0][0] == '/') |
401 |
+ execve(argv[0], argv, pp); |