1 |
commit: 9fd85ebbf97de2a354edd242a2be470e0c2fa8c3 |
2 |
Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 1 18:16:22 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 2 04:26:43 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fd85ebb |
7 |
|
8 |
sys-apps/busybox: Version bump to 1.34.1 |
9 |
|
10 |
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org> |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
sys-apps/busybox/Manifest | 1 + |
14 |
sys-apps/busybox/busybox-1.34.1.ebuild | 351 +++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 352 insertions(+) |
16 |
|
17 |
diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest |
18 |
index ce18d576c22..b27b7378d8e 100644 |
19 |
--- a/sys-apps/busybox/Manifest |
20 |
+++ b/sys-apps/busybox/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST busybox-1.32.1.tar.bz2 2444679 BLAKE2B b0258345d40628d8c12b4cc5c3efdb318cfb469e029242942cdad22aeec5142963291a746fbac450b43a4a1f2f7e9204442456691fa98f18eeaa58c70d714caf SHA512 3a33e99adaf7cbd51dcbeb31b5361123bf61ac040c0a032656c654ddb69c4074af75fb4335ba63f283067f61a22d7d7cbca8e1ed265c9522982c453ce48ea2fd |
23 |
DIST busybox-1.33.1.tar.bz2 2453694 BLAKE2B 2dce3427ab7703c56cbb3bdc0c93c1fe1c6dc24c5b467b6213b8f9cf55223ec63136b3837970e41293cc3d55d320599945d29a69a4ef8b4b3ab9fb5e2a527632 SHA512 d24931432f65e4e79cf54a6c2b91c9cafba817b637d337f456ce8f505434fc06c4345c65cde4fe2a019650a8a089a6f5336bfafb5ef64a4f14659a9d0b3ddb1a |
24 |
DIST busybox-1.34.0.tar.bz2 2476120 BLAKE2B ea8b06c08ce0abf0fc2742a3231417d169aa0ad7024bb3672816c8ab410d8df11836f68e5e1ac0c7358e2c50a796a114ee4a67bacb1022b2c48daafa98cfc8e5 SHA512 c57231e6d5dea8f2f5429673e9ea392a0f4b752731ec1f4903da8ca786914cda3065d80deeb28fb27d77848c892d587adf3b3150218d27cd87c5ece43de1b35a |
25 |
+DIST busybox-1.34.1.tar.bz2 2476932 BLAKE2B 1f45f58db26ae0bae2eb728db3a7d49680d611f489c4633d1fdf2827d3c33285721e232f722ac1f80f2ad7616352df9fd6b8880bcb5fa0dc6787b70c897dd033 SHA512 fb7e53a56c07b1098a12ee7232ad5401b147816648a0619b3b5358fdcf0915cfbb054500c0e0dd4acb3bc0a93a584b62bc5448e1f16b28004f58b39518a13b9d |
26 |
|
27 |
diff --git a/sys-apps/busybox/busybox-1.34.1.ebuild b/sys-apps/busybox/busybox-1.34.1.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..987a0f8cbf2 |
30 |
--- /dev/null |
31 |
+++ b/sys-apps/busybox/busybox-1.34.1.ebuild |
32 |
@@ -0,0 +1,351 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+# See `man savedconfig.eclass` for info on how to use USE=savedconfig. |
37 |
+ |
38 |
+EAPI=7 |
39 |
+ |
40 |
+inherit flag-o-matic savedconfig toolchain-funcs |
41 |
+ |
42 |
+DESCRIPTION="Utilities for rescue and embedded systems" |
43 |
+HOMEPAGE="https://www.busybox.net/" |
44 |
+if [[ ${PV} == "9999" ]] ; then |
45 |
+ MY_P="${P}" |
46 |
+ EGIT_REPO_URI="https://git.busybox.net/busybox" |
47 |
+ inherit git-r3 |
48 |
+else |
49 |
+ MY_P="${PN}-${PV/_/-}" |
50 |
+ SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2" |
51 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
52 |
+fi |
53 |
+ |
54 |
+LICENSE="GPL-2" # GPL-2 only |
55 |
+SLOT="0" |
56 |
+IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static syslog systemd" |
57 |
+REQUIRED_USE="pam? ( !static )" |
58 |
+RESTRICT="test" |
59 |
+ |
60 |
+# TODO: Could make pkgconfig conditional on selinux? bug #782829 |
61 |
+RDEPEND=" |
62 |
+ virtual/libcrypt:= |
63 |
+ !static? ( selinux? ( sys-libs/libselinux ) ) |
64 |
+ pam? ( sys-libs/pam ) |
65 |
+" |
66 |
+DEPEND="${RDEPEND} |
67 |
+ static? ( |
68 |
+ virtual/libcrypt[static-libs] |
69 |
+ selinux? ( sys-libs/libselinux[static-libs(+)] ) |
70 |
+ ) |
71 |
+ sys-kernel/linux-headers" |
72 |
+BDEPEND="virtual/pkgconfig" |
73 |
+ |
74 |
+S="${WORKDIR}/${MY_P}" |
75 |
+ |
76 |
+busybox_config_option() { |
77 |
+ local flag=$1 ; shift |
78 |
+ if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then |
79 |
+ busybox_config_option $(usex ${flag} y n) "$@" |
80 |
+ return |
81 |
+ fi |
82 |
+ local expr |
83 |
+ while [[ $# -gt 0 ]] ; do |
84 |
+ case ${flag} in |
85 |
+ y) expr="s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" ;; |
86 |
+ n) expr="s:CONFIG_$1=y:# CONFIG_$1 is not set:g" ;; |
87 |
+ *) expr="s:.*\<CONFIG_$1\>.*:CONFIG_$1=${flag}:g" ;; |
88 |
+ esac |
89 |
+ sed -i -e "${expr}" .config || die |
90 |
+ einfo "$(grep "CONFIG_$1[= ]" .config || echo "Could not find CONFIG_$1 ...")" |
91 |
+ shift |
92 |
+ done |
93 |
+} |
94 |
+ |
95 |
+busybox_config_enabled() { |
96 |
+ local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config) |
97 |
+ case ${val} in |
98 |
+ "") return 1 ;; |
99 |
+ y) return 0 ;; |
100 |
+ *) echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;; |
101 |
+ esac |
102 |
+} |
103 |
+ |
104 |
+# patches go here! |
105 |
+PATCHES=( |
106 |
+ "${FILESDIR}"/${PN}-1.26.2-bb.patch |
107 |
+ # "${FILESDIR}"/${P}-*.patch |
108 |
+) |
109 |
+ |
110 |
+src_prepare() { |
111 |
+ default |
112 |
+ unset KBUILD_OUTPUT #88088 |
113 |
+ append-flags -fno-strict-aliasing #310413 |
114 |
+ use ppc64 && append-flags -mminimal-toc #130943 |
115 |
+ |
116 |
+ cp "${FILESDIR}"/ginit.c init/ || die |
117 |
+ |
118 |
+ # flag cleanup |
119 |
+ sed -i -r \ |
120 |
+ -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ |
121 |
+ Makefile.flags || die |
122 |
+ #sed -i '/bbsh/s:^//::' include/applets.h |
123 |
+ sed -i '/^#error Aborting compilation./d' applets/applets.c || die |
124 |
+ use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile |
125 |
+ sed -i \ |
126 |
+ -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ |
127 |
+ -e "/^AR\>/s:=.*:= $(tc-getAR):" \ |
128 |
+ -e "/^CC\>/s:=.*:= $(tc-getCC):" \ |
129 |
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ |
130 |
+ -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \ |
131 |
+ Makefile || die |
132 |
+ sed -i \ |
133 |
+ -e 's:-static-libgcc::' \ |
134 |
+ Makefile.flags || die |
135 |
+} |
136 |
+ |
137 |
+src_configure() { |
138 |
+ # check for a busybox config before making one of our own. |
139 |
+ # if one exist lets return and use it. |
140 |
+ |
141 |
+ restore_config .config |
142 |
+ if [ -f .config ]; then |
143 |
+ yes "" | emake -j1 -s oldconfig >/dev/null |
144 |
+ return 0 |
145 |
+ else |
146 |
+ ewarn "Could not locate user configfile, so we will save a default one" |
147 |
+ fi |
148 |
+ |
149 |
+ # setup the config file |
150 |
+ emake -j1 -s allyesconfig >/dev/null |
151 |
+ # nommu forces a bunch of things off which we want on #387555 |
152 |
+ busybox_config_option n NOMMU |
153 |
+ sed -i '/^#/d' .config |
154 |
+ yes "" | emake -j1 -s oldconfig >/dev/null |
155 |
+ |
156 |
+ # now turn off stuff we really don't want |
157 |
+ busybox_config_option n DMALLOC |
158 |
+ busybox_config_option n FEATURE_2_4_MODULES #607548 |
159 |
+ busybox_config_option n FEATURE_SUID_CONFIG |
160 |
+ busybox_config_option n BUILD_AT_ONCE |
161 |
+ busybox_config_option n BUILD_LIBBUSYBOX |
162 |
+ busybox_config_option n FEATURE_CLEAN_UP |
163 |
+ busybox_config_option n MONOTONIC_SYSCALL |
164 |
+ busybox_config_option n USE_PORTABLE_CODE |
165 |
+ busybox_config_option n WERROR |
166 |
+ # triming the BSS size may be dangerous |
167 |
+ busybox_config_option n FEATURE_USE_BSS_TAIL |
168 |
+ |
169 |
+ # These cause trouble with musl. |
170 |
+ if use elibc_musl; then |
171 |
+ busybox_config_option n FEATURE_UTMP |
172 |
+ busybox_config_option n EXTRA_COMPAT |
173 |
+ busybox_config_option n FEATURE_VI_REGEX_SEARCH |
174 |
+ fi |
175 |
+ |
176 |
+ # Disable standalone shell mode when using make-symlinks, else Busybox calls its |
177 |
+ # applets by default without looking up in PATH. |
178 |
+ # This also enables users to disable a builtin by deleting the corresponding symlink. |
179 |
+ if use make-symlinks; then |
180 |
+ busybox_config_option n FEATURE_PREFER_APPLETS |
181 |
+ busybox_config_option n FEATURE_SH_STANDALONE |
182 |
+ fi |
183 |
+ |
184 |
+ # If these are not set and we are using a uclibc/busybox setup |
185 |
+ # all calls to system() will fail. |
186 |
+ busybox_config_option y ASH |
187 |
+ busybox_config_option y SH_IS_ASH |
188 |
+ busybox_config_option n HUSH |
189 |
+ busybox_config_option n SH_IS_HUSH |
190 |
+ |
191 |
+ busybox_config_option '"/run"' PID_FILE_PATH |
192 |
+ busybox_config_option '"/run/ifstate"' IFUPDOWN_IFSTATE_PATH |
193 |
+ |
194 |
+ # disable ipv6 applets |
195 |
+ if ! use ipv6; then |
196 |
+ busybox_config_option n FEATURE_IPV6 |
197 |
+ busybox_config_option n TRACEROUTE6 |
198 |
+ busybox_config_option n PING6 |
199 |
+ busybox_config_option n UDHCPC6 |
200 |
+ fi |
201 |
+ |
202 |
+ busybox_config_option pam PAM |
203 |
+ busybox_config_option static STATIC |
204 |
+ busybox_config_option syslog {K,SYS}LOGD LOGGER |
205 |
+ busybox_config_option systemd FEATURE_SYSTEMD |
206 |
+ busybox_config_option math FEATURE_AWK_LIBM |
207 |
+ |
208 |
+ # disable features that uClibc doesn't (yet?) provide. |
209 |
+ if use elibc_uclibc; then |
210 |
+ busybox_config_option n FEATURE_SYNC_FANCY #567598 |
211 |
+ busybox_config_option n NSENTER |
212 |
+ fi |
213 |
+ |
214 |
+ # all the debug options are compiler related, so punt them |
215 |
+ busybox_config_option n DEBUG_SANITIZE |
216 |
+ busybox_config_option n DEBUG |
217 |
+ busybox_config_option y NO_DEBUG_LIB |
218 |
+ busybox_config_option n DMALLOC |
219 |
+ busybox_config_option n EFENCE |
220 |
+ busybox_config_option $(usex debug y n) TFTP_DEBUG |
221 |
+ |
222 |
+ busybox_config_option selinux SELINUX |
223 |
+ |
224 |
+ # this opt only controls mounting with <linux-2.6.23 |
225 |
+ busybox_config_option n FEATURE_MOUNT_NFS |
226 |
+ |
227 |
+ # glibc-2.26 and later does not ship RPC implientation |
228 |
+ busybox_config_option n FEATURE_HAVE_RPC |
229 |
+ busybox_config_option n FEATURE_INETD_RPC |
230 |
+ |
231 |
+ # default a bunch of uncommon options to off |
232 |
+ local opt |
233 |
+ for opt in \ |
234 |
+ ADD_SHELL \ |
235 |
+ BEEP BOOTCHARTD \ |
236 |
+ CRONTAB \ |
237 |
+ DC DEVFSD DNSD DPKG{,_DEB} \ |
238 |
+ FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \ |
239 |
+ FEATURE_DEVFS \ |
240 |
+ HOSTID HUSH \ |
241 |
+ INETD INOTIFYD IPCALC \ |
242 |
+ LOCALE_SUPPORT LOGNAME LPD \ |
243 |
+ MAKEMIME MKFS_MINIX MSH \ |
244 |
+ OD \ |
245 |
+ RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \ |
246 |
+ SLATTACH SMEMCAP SULOGIN SV{,LOGD} \ |
247 |
+ TASKSET TCPSVD \ |
248 |
+ RPM RPM2CPIO \ |
249 |
+ UDPSVD UUDECODE UUENCODE |
250 |
+ do |
251 |
+ busybox_config_option n ${opt} |
252 |
+ done |
253 |
+ |
254 |
+ emake -j1 oldconfig > /dev/null |
255 |
+} |
256 |
+ |
257 |
+src_compile() { |
258 |
+ unset KBUILD_OUTPUT #88088 |
259 |
+ export SKIP_STRIP=y |
260 |
+ |
261 |
+ emake V=1 busybox |
262 |
+ |
263 |
+ # bug #701512 |
264 |
+ emake V=1 doc |
265 |
+} |
266 |
+ |
267 |
+src_install() { |
268 |
+ unset KBUILD_OUTPUT #88088 |
269 |
+ save_config .config |
270 |
+ |
271 |
+ into / |
272 |
+ dodir /bin |
273 |
+ if use sep-usr ; then |
274 |
+ # install /ginit to take care of mounting stuff |
275 |
+ exeinto / |
276 |
+ newexe busybox_unstripped ginit |
277 |
+ dosym /ginit /bin/bb |
278 |
+ dosym bb /bin/busybox |
279 |
+ else |
280 |
+ newbin busybox_unstripped busybox |
281 |
+ dosym busybox /bin/bb |
282 |
+ fi |
283 |
+ if use mdev ; then |
284 |
+ dodir /$(get_libdir)/mdev/ |
285 |
+ use make-symlinks || dosym /bin/bb /sbin/mdev |
286 |
+ cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf |
287 |
+ |
288 |
+ exeinto /$(get_libdir)/mdev/ |
289 |
+ doexe "${FILESDIR}"/mdev/* |
290 |
+ |
291 |
+ newinitd "${FILESDIR}"/mdev.initd mdev |
292 |
+ fi |
293 |
+ if use livecd ; then |
294 |
+ dosym busybox /bin/vi |
295 |
+ fi |
296 |
+ |
297 |
+ # add busybox daemon's, bug #444718 |
298 |
+ if busybox_config_enabled FEATURE_NTPD_SERVER; then |
299 |
+ newconfd "${FILESDIR}"/ntpd.confd busybox-ntpd |
300 |
+ newinitd "${FILESDIR}"/ntpd.initd busybox-ntpd |
301 |
+ fi |
302 |
+ if busybox_config_enabled SYSLOGD; then |
303 |
+ newconfd "${FILESDIR}"/syslogd.confd "busybox-syslogd |
304 |
+ newinitd "${FILESDIR}"/syslogd.initd "busybox-syslogd |
305 |
+ fi |
306 |
+ if busybox_config_enabled KLOGD; then |
307 |
+ newconfd "${FILESDIR}"/klogd.confd busybox-klogd |
308 |
+ newinitd "${FILESDIR}"/klogd.initd busybox-klogd |
309 |
+ fi |
310 |
+ if busybox_config_enabled WATCHDOG; then |
311 |
+ newconfd "${FILESDIR}"/watchdog.confd busybox-watchdog |
312 |
+ newinitd "${FILESDIR}"/watchdog.initd busybox-watchdog |
313 |
+ fi |
314 |
+ if busybox_config_enabled UDHCPC; then |
315 |
+ local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT) |
316 |
+ exeinto "${path%/*}" |
317 |
+ newexe examples/udhcp/simple.script "${path##*/}" |
318 |
+ fi |
319 |
+ if busybox_config_enabled UDHCPD; then |
320 |
+ insinto /etc |
321 |
+ doins examples/udhcp/udhcpd.conf |
322 |
+ fi |
323 |
+ |
324 |
+ # bundle up the symlink files for use later |
325 |
+ emake DESTDIR="${ED}" install |
326 |
+ rm _install/bin/busybox || die |
327 |
+ # for compatibility, provide /usr/bin/env |
328 |
+ mkdir -p _install/usr/bin || die |
329 |
+ ln -s /bin/env _install/usr/bin/env || die |
330 |
+ tar cf busybox-links.tar -C _install . || : #;die |
331 |
+ insinto /usr/share/${PN} |
332 |
+ use make-symlinks && doins busybox-links.tar |
333 |
+ |
334 |
+ dodoc AUTHORS README TODO |
335 |
+ |
336 |
+ cd docs || die |
337 |
+ doman busybox.1 |
338 |
+ docinto txt |
339 |
+ dodoc *.txt |
340 |
+ docinto pod |
341 |
+ dodoc *.pod |
342 |
+ docinto html |
343 |
+ dodoc *.html |
344 |
+ |
345 |
+ cd ../examples || die |
346 |
+ docinto examples |
347 |
+ dodoc inittab depmod.pl *.conf *.script undeb unrpm |
348 |
+} |
349 |
+ |
350 |
+pkg_preinst() { |
351 |
+ if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ -z "${ROOT}" ]] ; then |
352 |
+ ewarn "setting USE=make-symlinks and emerging to / is very dangerous." |
353 |
+ ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." |
354 |
+ ewarn "If you are creating a binary only and not merging this is probably ok." |
355 |
+ ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want." |
356 |
+ die "silly options will destroy your system" |
357 |
+ fi |
358 |
+ |
359 |
+ if use make-symlinks ; then |
360 |
+ mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die |
361 |
+ fi |
362 |
+} |
363 |
+ |
364 |
+pkg_postinst() { |
365 |
+ savedconfig_pkg_postinst |
366 |
+ |
367 |
+ if use make-symlinks ; then |
368 |
+ cd "${T}" || die |
369 |
+ mkdir _install |
370 |
+ tar xf busybox-links.tar -C _install || die |
371 |
+ echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" |
372 |
+ fi |
373 |
+ |
374 |
+ if use sep-usr ; then |
375 |
+ elog "In order to use the sep-usr support, you have to update your" |
376 |
+ elog "kernel command line. Add the option:" |
377 |
+ elog " init=/ginit" |
378 |
+ elog "To launch a different init than /sbin/init, use:" |
379 |
+ elog " init=/ginit /sbin/yourinit" |
380 |
+ elog "To get a rescue shell, you may boot with:" |
381 |
+ elog " init=/ginit bb" |
382 |
+ fi |
383 |
+} |