Sync from SUSE:ALP:Source:Standard:1.0 busybox revision e95c5e0081fa4f8687c67efd8cea8857

This commit is contained in:
Adrian Schröter 2023-12-21 13:34:34 +01:00
commit e7702fe10c
16 changed files with 2663 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,80 @@
From d417193cf37ca1005830d7e16f5fa7e1d8a44209 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Mon, 12 Jun 2023 17:48:47 +0200
Subject: [PATCH] shell: avoid segfault on ${0::0/0~09J}. Closes 15216
function old new delta
evaluate_string 1011 1053 +42
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
shell/math.c | 39 +++++++++++++++++++++++++++++++++++----
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/shell/math.c b/shell/math.c
index 76d22c9bd..727c29467 100644
--- a/shell/math.c
+++ b/shell/math.c
@@ -577,6 +577,28 @@ static arith_t strto_arith_t(const char *nptr, char **endptr)
# endif
#endif
+//TODO: much better estimation than expr_len/2? Such as:
+//static unsigned estimate_nums_and_names(const char *expr)
+//{
+// unsigned count = 0;
+// while (*(expr = skip_whitespace(expr)) != '\0') {
+// const char *p;
+// if (isdigit(*expr)) {
+// while (isdigit(*++expr))
+// continue;
+// count++;
+// continue;
+// }
+// p = endofname(expr);
+// if (p != expr) {
+// expr = p;
+// count++;
+// continue;
+// }
+// }
+// return count;
+//}
+
static arith_t
evaluate_string(arith_state_t *math_state, const char *expr)
{
@@ -584,10 +606,12 @@ evaluate_string(arith_state_t *math_state, const char *expr)
const char *errmsg;
const char *start_expr = expr = skip_whitespace(expr);
unsigned expr_len = strlen(expr) + 2;
- /* Stack of integers */
- /* The proof that there can be no more than strlen(startbuf)/2+1
- * integers in any given correct or incorrect expression
- * is left as an exercise to the reader. */
+ /* Stack of integers/names */
+ /* There can be no more than strlen(startbuf)/2+1
+ * integers/names in any given correct or incorrect expression.
+ * (modulo "09v09v09v09v09v" case,
+ * but we have code to detect that early)
+ */
var_or_num_t *const numstack = alloca((expr_len / 2) * sizeof(numstack[0]));
var_or_num_t *numstackptr = numstack;
/* Stack of operator tokens */
@@ -652,6 +676,13 @@ evaluate_string(arith_state_t *math_state, const char *expr)
numstackptr->var = NULL;
errno = 0;
numstackptr->val = strto_arith_t(expr, (char**) &expr);
+ /* A number can't be followed by another number, or a variable name.
+ * We'd catch this later anyway, but this would require numstack[]
+ * to be twice as deep to handle strings where _every_ char is
+ * a new number or name. Example: 09v09v09v09v09v09v09v09v09v
+ */
+ if (isalnum(*expr) || *expr == '_')
+ goto err;
//bb_error_msg("val:%lld", numstackptr->val);
if (errno)
numstackptr->val = 0; /* bash compat */
--
2.26.2

BIN
busybox-1.36.1.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

BIN
busybox-1.36.1.tar.bz2.sig Normal file

Binary file not shown.

972
busybox.changes Normal file
View File

@ -0,0 +1,972 @@
-------------------------------------------------------------------
Fri Dec 8 10:47:35 UTC 2023 - Thorsten Kukuk <kukuk@suse.com>
- Install udhcpc and udhcpc6 into the same directory
(udhcp6-install-path.patch)
- Fully enable udhcpc and document that this tool needs special
configuration and does not work out of the box [bsc#1217883]
-------------------------------------------------------------------
Tue Aug 29 09:55:24 UTC 2023 - Radoslav Kolev <radoslav.kolev@suse.com>
- Add ash-fix-segfault-d417193cf.patch: fix stack overflow vulnerability
in ash (CVE-2022-48174, bsc#1214538)
-------------------------------------------------------------------
Fri Jun 2 21:08:22 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 1.36.1:
* fixes for line editing, detection of hardware sha1/sha256
support, unzip
(do not create suid/sgid files unless -K),
shell (printf and sleep with no args, handing of SIGINT
in sleep), ed.
-------------------------------------------------------------------
Fri Jan 6 08:01:46 UTC 2023 - Radoslav Kolev <radoslav.kolev@suse.com>
- Update to version 1.36.0
- awk: fix use after free (CVE-2022-30065)
- various fixes for ash, bc, cut, fbset, kbuild, libbb, mkfs.vfat,
mv, powertop, sed, sort, taskset, top, udhcpc6, unzip, vi, xxd
- improvements in ash, cmp, crond, devmem, ed, fbset, fdisk, ls, xargs, pkill
- new applets added: seedrng, tree, tsort
- Adjust busybox.config for new features
- ash: enable sleep built-in
- enable new applets: seedrng, tree, tsort
- enable SHA hardware acceleration
- try LOOP_CONFIGURE for losetup/loop mounts, but fall back to
LOOP_SET_FD + LOOP_SET_STATUS if not supported
- drop e63d7cdf.patch (fix for CVE-2022-30065), included upstream
-------------------------------------------------------------------
Tue Dec 27 10:27:35 UTC 2022 - Ludwig Nussel <lnussel@suse.com>
- Replace transitional %usrmerged macro with regular version check (boo#1206798)
-------------------------------------------------------------------
Wed Nov 23 13:24:55 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
- Add e63d7cdf.patch: awk: fix use after free (CVE-2022-30065,
boo#1199744).
-------------------------------------------------------------------
Mon Nov 14 08:52:35 UTC 2022 - Radoslav Kolev <radoslav.kolev@suse.com>
- Fix build under SLE-12
-------------------------------------------------------------------
Mon Oct 17 17:26:27 UTC 2022 - Radoslav Kolev <radoslav.kolev@suse.com>
- Annotate CVEs already fixed in upstream, but not mentioned in .changes:
* CVE-2014-9645 (bsc#914660): strips of / in module names that can lead to loading unwanted modules
-------------------------------------------------------------------
Thu Jun 30 08:30:05 UTC 2022 - Ludwig Nussel <lnussel@suse.de>
- prepare spec file for rpmbuild --build-in-place --noprep
- use bcond for static and ww3 subpackages
- fix verbose flag
-------------------------------------------------------------------
Fri Jun 10 17:52:27 UTC 2022 - Marcos de Souza <mpdesouza@suse.com>
- Enable switch_root
With this change virtme --force-initramfs works as expected.
-------------------------------------------------------------------
Wed Mar 30 14:05:16 UTC 2022 - Marcos de Souza <mpdesouza@suse.com>
- Enable udhcpc
-------------------------------------------------------------------
Wed Mar 23 13:36:44 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
- BuildRequire hostname: the test suite wants to compare the output
of 'hostname' against 'busybox hostname'. We should not rely
hostname to be present in the build environment.
-------------------------------------------------------------------
Wed Jan 12 15:40:40 UTC 2022 - Thorsten Kukuk <kukuk@suse.com>
- Update to 1.35.0
- awk: fix printf %%, fix read beyond end of buffer
- chrt: silence analyzer warning
- libarchive: remove duplicate forward declaration
- mount: "mount -o rw ...." should not fall back to RO mount
- ps: fix -o pid=PID,args interpreting entire "PID,args" as header
- tar: prevent malicious archives with long name sizes causing OOM
- udhcpc6: fix udhcp_find_option to actually find DHCP6 options
- xxd: fix -p -r
- support for new optoins added to basename, cpio, date, find,
mktemp, wget and others
- Adjust busybox.config for new features in find, date and cpio
-------------------------------------------------------------------
Thu Jan 6 06:37:24 UTC 2022 - Radoslav Kolev <radoslav.kolev@suse.com>
- Annotate CVEs already fixed in upstream, but not mentioned in .changes:
* CVE-2017-16544 (bsc#1069412): Insufficient sanitization of filenames when autocompleting
* CVE-2015-9261 (bsc#1102912): huft_build misuses a pointer, causing segfaults
* CVE-2016-2147 (bsc#970663): out of bounds write (heap) due to integer underflow in udhcpc
* CVE-2016-2148 (bsc#970662): heap-based buffer overflow in OPTION_6RD parsing
* CVE-2016-6301 (bsc#991940): NTP server denial of service flaw
* CVE-2017-15873 (bsc#1064976): The get_next_block function in archival/libarchive/decompress_bunzip2.c has an Integer Overflow
* CVE-2017-15874 (bsc#1064978): archival/libarchive/decompress_unlzma.c has an Integer Underflow
* CVE-2019-5747 (bsc#1121428): out of bounds read in udhcp components
* CVE-2021-42373, CVE-2021-42374, CVE-2021-42375, CVE-2021-42376,
CVE-2021-42377, CVE-2021-42378, CVE-2021-42379, CVE-2021-42380,
CVE-2021-42381, CVE-2021-42382, CVE-2021-42383, CVE-2021-42384,
CVE-2021-42385, CVE-2021-42386 (bsc#1192869) : v1.34.0 bugfixes
- CVE-2021-28831 (bsc#1184522): invalid free or segmentation fault via malformed gzip data
- CVE-2018-20679 (bsc#1121426): out of bounds read in udhcp
- CVE-2018-1000517 (bsc#1099260): Heap-based buffer overflow in the retrieve_file_data()
- CVE-2011-5325 (bsc#951562): tar directory traversal
- CVE-2018-1000500 (bsc#1099263): wget: Missing SSL certificate validation
-------------------------------------------------------------------
Sat Oct 30 09:03:16 UTC 2021 - Stephan Kulow <coolo@suse.com>
- Disable crc32 to avoid conflict with perl-Archive-Zip
(until some project really requires crc32)
-------------------------------------------------------------------
Wed Oct 27 17:22:38 UTC 2021 - Egbert Eich <eich@suse.com>
- Build busybox-warewulf3 for i586 as well. This allowes to set up
i586 nodes.
-------------------------------------------------------------------
Fri Oct 22 12:10:55 UTC 2021 - Lukas Lansky <lukas.lansky@suse.com>
- Enable fdisk (jsc#CAR-16)
- Add testsuite-gnu-echo.patch: testing.sh to use GNU echo
-------------------------------------------------------------------
Thu Oct 21 17:43:22 UTC 2021 - Stephan Kulow <coolo@suse.com>
- Remove the duplicated config entries and construct the snippets
on the fly based on the main config. This way it's easier to
keep track of what's different
-------------------------------------------------------------------
Thu Oct 21 16:36:27 UTC 2021 - Stephan Kulow <coolo@suse.com>
- Update to 1.34.1:
* build system: use SOURCE_DATE_EPOCH for timestamp if available
* many bug fixes and new features
* touch: make FEATURE_TOUCH_NODEREF unconditional
-------------------------------------------------------------------
Sat Oct 9 13:16:11 UTC 2021 - Egbert Eich <eich@suse.com>
- Create separate 'Warewulf3' (https://github.com/warewulf/warewulf3)
flavor of busybox with the
additional setting:
CONFIG_REBOOT=y
CONFIG_SWITCH_ROOT=y
CONFIG_CTTYHACK=y
(bsc#1191514).
-------------------------------------------------------------------
Fri May 7 19:04:53 UTC 2021 - Andreas Stieger <andreas.stieger@gmx.de>
- update to 1.33.1:
* httpd: fix sendfile
* ash: fix HISTFILE corruptio
* ash: fix unset variable pattern expansion
* traceroute: fix option parsing
* gunzip: fix for archive corruption
- drop update_passwd_selinux_fix.patch, included upstream
- add upstream signing key and verify source signature
-------------------------------------------------------------------
Thu Jan 28 15:22:02 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
- Update to version 1.33.0
- many bug fixes and new features
- update_passwd_selinux_fix.patch upstream compile fix for SELinux
-------------------------------------------------------------------
Tue Jan 5 08:17:09 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
- Update to version 1.32.1
- fixes a case where in ash, "wait" never finishes.
-------------------------------------------------------------------
Tue Jan 5 07:26:20 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
- sendmail-ignore-F-option.patch: ignore -F option as used by
cron (workaround for [bbn#13426])
-------------------------------------------------------------------
Wed Dec 9 14:40:27 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Don't require nogroup for adduser command, as this can lead to
a dependency cycle with sysusers-tools.
-------------------------------------------------------------------
Mon Dec 7 10:25:00 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- cpio-long-opt.patch: add more long options to cpio for IBS/unrpm
-------------------------------------------------------------------
Fri Nov 20 08:59:57 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
- prepare usrmerge (boo#1029961)
-------------------------------------------------------------------
Tue Sep 29 10:00:25 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Disable RPM builtin, did become pretty useless
- Disable popmaildir and mime utilities
-------------------------------------------------------------------
Fri Aug 21 11:56:44 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Set CONFIG_FIRST_SYSTEM_ID to 101 as we use 100 already as fixed
ID for a system account.
- Require group "nogroup" (used by adduser)
-------------------------------------------------------------------
Wed Aug 12 13:43:26 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Enable SELinux for the dynamic version
-------------------------------------------------------------------
Wed Jul 22 15:10:41 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Update to busybox 1.32.0
- many bugfixes and new features
- Obsoletes busybox-no-stime.patch
-------------------------------------------------------------------
Wed Jul 22 09:24:42 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Disable ftpget/ftpput, non-standard, ftp is outdated
- Disable run-init, we don't use that
- Disable cttyhack, we don't provide the calling tools
- Disable dnsd
-------------------------------------------------------------------
Sat Jul 11 06:05:40 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Enable syslogd for containers
-------------------------------------------------------------------
Wed Jul 8 07:26:14 UTC 2020 - Stephan Kulow <coolo@suse.com>
- Enable testsuite and package it for later rerun (for QA,
jsc#CAR-15)
-------------------------------------------------------------------
Fri Apr 17 09:46:21 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Re-add modutils
-------------------------------------------------------------------
Sat Mar 21 11:18:54 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Set last ID to 65533, else nobody cannot be created
-------------------------------------------------------------------
Fri Mar 13 20:04:25 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Merge config of default, -container and -static to be able to
drop -container variant
-------------------------------------------------------------------
Sat Feb 22 17:46:55 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Disable CONFIG_FEATURE_NSLOOKUP_BIG as it leads to incompatible
nslookup behavior
-------------------------------------------------------------------
Mon Feb 10 11:46:10 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Eanble FEATURE_TFTP_HPA_COMPAT and SH_MATH_BASE
-------------------------------------------------------------------
Sat Feb 8 14:38:51 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 1.31.1:
+ Bug fix release. 1.30.1 has fixes for dc, ash (PS1 expansion
fix), hush, dpkg-deb, telnet and wget.
- Changes from version 1.31.0:
+ many bugfixes and new features.
- Add busybox-no-stime.patch: stime() has been deprecated in glibc
2.31 and replaced with clock_settime().
-------------------------------------------------------------------
Wed Oct 23 22:35:14 CEST 2019 - kukuk@suse.de
- Add man.conf to container variant
-------------------------------------------------------------------
Tue Sep 10 07:27:49 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Trim marketing from description.
-------------------------------------------------------------------
Thu Aug 22 15:27:18 CEST 2019 - kukuk@suse.de
- Drop busybox-rpm-E.patch, not needed anymore
- Create new "container" subpackage with special stripped down
version for container images (8MB instead of 15MB).
-------------------------------------------------------------------
Thu Jul 25 15:29:03 CEST 2019 - kukuk@suse.de
- Provide "useradd_or_adduser_dep" for sysuser-shadow
-------------------------------------------------------------------
Fri Mar 29 12:03:49 CET 2019 - kukuk@suse.de
- Implement rpm -E %_dbpath for kiwi (busybox-rpm-E.patch)
- Don't require /bin/sh, be self contained
-------------------------------------------------------------------
Thu Mar 28 21:58:41 CET 2019 - kukuk@suse.de
- update to 1.30.1
* many bugfixes and new features
- obsolete busybox-1.18.3-libarchive.patch
- obsolete busybox-resource.patch
- Update busybox*.config
- Merge busybox.spec and busybox-static.spec and build the static
binary as subpackage
-------------------------------------------------------------------
Wed Aug 22 21:41:23 UTC 2018 - jjolly@suse.com
- Enabled functionality within busybox for warewulf compatibility
* CONFIG_FEATURE_REMOTE_LOG
* CONFIG_DEPMOD
* CONFIG_TAC
-------------------------------------------------------------------
Fri Nov 10 16:16:48 CET 2017 - kukuk@suse.de
- Build against libtirpc in preparation of deprecating sunrpc from
glibc
-------------------------------------------------------------------
Sun Jul 2 11:27:52 UTC 2017 - astieger@suse.com
- update to 1.26.2:
* many updates and fixes to individual tools
-------------------------------------------------------------------
Tue Nov 1 17:20:51 UTC 2016 - astieger@suse.com
- update to 1.25.1:
* fixes for hush, gunzip, ip route, ntpd
- includes changes from 1.25.0:
* many added and expanded implementations of command options
- includes changes from 1.24.2:
* fixes for build system (static build with glibc fixed),
truncate, gunzip and unzip.
-------------------------------------------------------------------
Thu Mar 3 13:21:03 UTC 2016 - olaf@aepfle.de
- Disable build timestamp
-------------------------------------------------------------------
Sun Jan 3 12:00:13 UTC 2016 - p.drouand@gmail.com
- Update to version 1.24.1
* for a full list of changes see http://www.busybox.net/news.html
- Refresh busybox.install.patch
-------------------------------------------------------------------
Mon Apr 20 16:16:14 UTC 2015 - mpluskal@suse.com
- Update to 1.23.2
* for a full list of changes see http://www.busybox.net/news.html
- Cleaned up spec file with spec-cleaner
- Refreshed patches
-------------------------------------------------------------------
Thu Oct 9 11:41:36 UTC 2014 - olaf@aepfle.de
- Remove mkinitrd scripts
-------------------------------------------------------------------
Thu Sep 4 23:43:33 UTC 2014 - andreas.stieger@gmx.de
- update to 1.22.1:
Many updates and fixes for most included tools, see
see http://www.busybox.net/news.html
- adjust busybox-resource.patch
-------------------------------------------------------------------
Thu Dec 12 23:21:11 UTC 2013 - p.drouand@gmail.com
- Update to version 1.21.1
+ fixes for ntfs detection (big-endian fix)
+ xz decompression of concatenated streams
+ mdev acquired a [ENV=regex;] extension instead of undocumented
subsystem match hack it used to have prior to 1.21.x.
- Changes from 1.21.0
+ udhcpc: gracefully handle packets with CHECKSUM_PARTIAL
+ ifupdown: improve compatibility with Debian
+ get_linux_version_code: don't fail on Linux version strings
like "3.0-foo"
+ build system: fix build failure when only gunzip is selected
+ CONFIG_PID_FILE_PATH: new configuration option for pidfile paths
+ declare strings with ALIGN1, as appropriate
+ nanddump: use the right operator of logic AND
+ nanddump: skip bad blocks when instructed to do so
+ nanddump: invert the meaning of the -o parameter to match upstream
+ mount: fix -o user=foo mishandling, fix unc= generation, add prefixpath=
+ build system: fix build of kconfig on Darwin
+ tar: support -J, --xz explicit compression option
+ simplify copyright/license notice that appears in the binary
+ mdev: tell kernel that we didn't find the firmware
+ lineedit: fix Alt-D when cursor==0
+ lineedit: histfile can get emptied when CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y
+ build system: stop .eh_frame generation
+ build system: fix build failure when compressed help is selected, but bz2 compression is not
+ scripts/kconfig/mconf: work on systems w/o SIGWINCH
+ platform.h: disable ALIGNn macros for s390[x]
+ adduser: install to /usr, not /, like all other similar tools
+ ash: fix "read -s" + ^C. Closes 5504
+ ash: fix a bug in >${varexp} handling. Closes 5282
+ ash: implement export -n
+ ash: revert wrong "fix" for an apparent memory leak. Closes 5822
+ awk: fix FS assignment behavior. Closes 5108
+ awk: make -F STR interpret escape sequences. Closes 5126
+ brctl: fix build failure by s/strtotimeval/bb_strtotimeval/ (android has strtotimeval)
+ busybox: tweak help text and copyright year
+ decompress_uncompress: comment out debug printout on corrupted data
+ decompress_uncompress: move 'code' variable into loop - sole user
+ dhcpd: write lease file on exit
+ dpkg: fix creation of .list files (were empty since b768aeb). Closes 5324
+ du: document incompatibility with standard tool
+ examples/mdev_fat.conf: small addition
+ find: if DESKTOP=y, support -wholename (synonym for -path)
+ find: make -mindepth N -xdev correctly stop on mountpoints
+ ftpd: fix MDTM's month value. Closes 5336
+ ftpd: free allocated string on error path
+ getty: fix for NOCTTY killing us with SIGHUP
+ grep: fix grep -Fw not respecting the -w option. Closes 5792
+ ifconfig: do not accept "ifconfig eth0 up 1.2.3.4/17" (ip with mask). Closes 5786
+ libbb: correctness/size tweaks in signal-related helpers
+ lineedit: in !EDITING config, return -1 on fgets error
+ login: increase login name size limit from 32 to 64
+ lpr: don't send 0-byte print jobs (compat)
+ man: fix handling of gzipped manpages
+ mdev: add support for $DEVNAME and /dev/mdev.log debug aid
+ mdev: fix mode of dir1 in =dir1/dir2/file rule
+ mdev: remove undocumented subsystem/devname matching hack
+ mdev: when found, print major,minor into mdev.log
+ modprobe_small: make rmmod to NOT remove dependencies. Closes 5162
+ mount: do not pass "comment=ANYTHING" option to kernel. Closes 5240
+ mount: fix the wrongly stored fs creation time
+ mount: set up RO loop device if mount -o ro. Closes 4784
+ mount: support strictatime option. Closes 5240
+ ntpd: on time step, kill all outstanding replies from other peers
+ sed: fix handling of s/// which has empty matches
+ sed: fix zero chars match/replace
+ sha3: make size/speed optimization decision configurable
+ syslogd: do not segfault on parse error when using default config. Closes 5762
+ telnet: convert CR -> CR LF, not CR -> CR NUL when sending data to server
+ telnet: convert Enter -> CR LF in line mode too
+ tftpd: fix -u USER to work with chroot. Closes 5348
+ top/ps: argv0:"gdm-session-worker [pam/gdm-password]" == comm:"gdm-session-wor"
+ top: do not touch stdin if -b
+ top: fix "last CPU" parsing
+ top: implement scrolling up/down (_very_ useful)
+ udhcp[cd]: fix binding to network aliases. Closes 5432, 5438
+ udhcpc: make -O <numeric_opt> work. Closes 5402
+ udhcpc[6]: show select timeout in log
+ unzip: make options parsing more robust on getopt w/o gnu extensions
+ vi: do not set autoindent by default
+ vi: nuke FEATURE_VI_OPTIMIZE_CURSOR
+ vi: save/restore screen upon invocation
+ volume_id/ext: detect ext4 too
+ wget: correctly handle failure to -c (continue)
+ wget: make -c _not_ truncate the file
+ wget: reorder fread and poll: poll only if fread returns EAGAIN. Closes 5426
+ wget: try reading after poll timeout - stdio may have buffered data. Closes 5426
+ acpid: add missing lid switch definition
+ tar: fix 256-bit encoded number decoding
+ udhcpc[6]: allow discover_retries == 0 (infinite)
+ ash: fix a memory leak
+ sysctl: implement -q
+ powertop: fix error message
+ sha3sum: new applet
+ fbset: respect rgba configuration lines in fb.modes
+ fbsplash: support non-RGB565 pixels in 16-bit mode
+ flashcp: remove unused variable opts
+ mount: add unc option to CIFS mount (needed for Linux 3.4+)
+ nanddump: make dumping read-only partitions work
+ ps: use separate get_uptime() and make it work on non-linux too
+ declare strings with ALIGN1, as appropriate
+ udhcpc6: depend on ipv6
+ include sys/resource.h where needed
+ disable format security warnings
+ build system: use pkg-config to look up selinux libs
+ ifenslave: fix missing close paren
+ sed: allow 'w' cmd to use two address form
+ tar: implement --no-recursion
+ unzip: ignore chmod errors
+ brctl: fix description and usage
+ su: do not change to home dir unless -l
+ ntpd: fix incorrect m_status field in outgoing packets. Closes 5120
+ dmesg: handle multi-char log levels
+ klogd: handle multi-char log levels
+ syslogd: add option to log to Linux kernel printk buffer
+ syslogd: convert dummy functions to statics and get rid of IF_FEATURE_* checks
+ config: do not refer to HTTPS for wget
+ sendmail: use host rather than NIS domain name for HELO
+ mktemp: fix mktemp -u temp.XXXXXX returning garbage when TMPDIR is set
+ blkid: show filesystem when both label and UUID are missing, but type is known
+ volume_id: add exFAT detection
+ ln: support -T and -v
+ sed: support long opts and -iSFX
+ mkdir,rmdir: accept and ignore -v, --verbose
+ mv: accept but ignore -v
+ blkid: add type display for btrfs
+ blkid: add support for nilfs2
+ blkid: add type display for hfsplus
+ volume_id: display hfs[+] 128-bit UUID properly
+ volume_id: uuid_format small code shrink
+ volume_id: add squashfs detection
+ testsuite: some more awk tests related to conditions
+ modinfo: match more standard module fields and fix version field
+ inetd: fix build failure in Android
+ android: fix 'stat', ifdef S_TYPEIS* in coreutiles/stat.c
+ platform.h: Android tweaks: ioprio defines, BB_ADDITIONAL_PATH
+ android: some sensible defconfig changes
+ libbb: add missing_syscalls.c: for now, only Android syscalls
+ fbsplash: fix regression from e4fa7b7
+ adduser: make it accept "adduser USER GROUP" form
+ wget: add dummy --no-cache
+ testsuite: make mkfs.minix test not fail spuriously on big endian
+ refactor correct_password.c to avoid one if
-------------------------------------------------------------------
Sun Dec 9 14:17:29 UTC 2012 - p.drouand@gmail.com
- Update to 1.20.2 (Bug fix release):
* fix for variable expansion in redirection
* fix for "pre-up" and "pre-down" handling
* fixes for compressed man pages handling
* important fix! due to misplaced s_mkfs_time field, ext4 driver
couldn't mount our images
* fix for getting uptime on non-Linux platforms
* fix base-256 decoding
- Remove busybox-1.19.4-ext2fs_h.diff: fixed on upstream release
-------------------------------------------------------------------
Wed Aug 1 14:15:40 UTC 2012 - lnussel@suse.de
- fix path in busybox.install (bnc#680153)
-------------------------------------------------------------------
Wed Jul 18 07:43:58 UTC 2012 - aj@suse.de
- Add missing sys/resource include (glibc 2.16)
-------------------------------------------------------------------
Wed Jun 6 13:02:52 UTC 2012 - seife+obs@b1-systems.com
- busybox-1.19.4-ext2fs_h.diff:
more complete fix for latest ext2_fs.h breakage from busybox git,
drop busybox-1.19.4-typedef_umode_t.patch
-------------------------------------------------------------------
Tue Apr 10 15:19:52 CEST 2012 - ro@suse.de
- busybox-1.19.4-typedef_umode_t.patch:
fix compile as umode_t is only defined with KERNEL and is
used in header linux/linux/ext2_fs.h
-------------------------------------------------------------------
Tue Apr 10 14:49:18 CEST 2012 - ro@suse.de
- update to 1.19.4
- fix getty, mdev, modinfo and wget
- update to 1.19.3
- fix chpasswd, crond, inetd, syslogd, tail, tftp
- update to 1.19.2
- fix ash/hush, cttyhack, find, grep, less, patch, sed, top,
uncompress
- update to 1.19.0:
- countless fixes in all utility programs, please see
http://www.busybox.net/ for details
- remove obsolete patches previously marked as upstreamed
-------------------------------------------------------------------
Fri Sep 30 14:45:39 UTC 2011 - uli@suse.com
- cross-build fix: use %__cc macro, set HOSTCC
-------------------------------------------------------------------
Sat Sep 17 21:08:48 UTC 2011 - jengelh@medozas.de
- Remove redundant tags/sections from specfile
-------------------------------------------------------------------
Sat Mar 12 23:03:39 UTC 2011 - chris@computersalat.de
- update to 1.18.13
see http://www.busybox.net/ for full changelog
- add upstream patches
o buildsys.patch
o cksum.patch
o klogd.patch
o menuconfig.patch
o modutils24.patch
o wget.patch
- rework libunarchive-array patch
o -> libarchive patch
- remove .gitignore files
- added missing BusyBox.1 as S:1
- added export CFLAGS="{optflags} -fno-strict-aliasing"
-------------------------------------------------------------------
Sun Oct 31 12:37:02 UTC 2010 - jengelh@medozas.de
- Use %_smp_mflags
-------------------------------------------------------------------
Wed Oct 6 16:39:15 UTC 2010 - aj@suse.de
- Update to busybox 1.17.2:
* obsoletes patches busybox.dmesg-size.patch, busybox-1.17.1-make.patch,
busybox-buildfix.patch
* see http://www.busybox.net/ for full changelog
-------------------------------------------------------------------
Mon Sep 20 13:25:00 UTC 2010 - coolo@novell.com
- add backported fix for make 3.82
-------------------------------------------------------------------
Tue Aug 4 18:13:36 CEST 2009 - aj@suse.de
- Fix build with updated kernel headers (busybox-buildfix.patch)
-------------------------------------------------------------------
Thu Dec 18 11:35:49 CET 2008 - sassmann@suse.de
- update to 1.12.3 bugfix release
* has fixes for option parsing and line editing
-------------------------------------------------------------------
Tue Nov 4 14:01:23 CET 2008 - sassmann@suse.de
- updated config file to use a single config for
both busybox and busybox-static
-------------------------------------------------------------------
Wed Oct 15 14:17:15 CEST 2008 - sassmann@suse.de
- update to 1.12.1
see http://www.busybox.net/ for full changelog
- removed patches included upstream
* busybox-1.8.2-arping.patch
* busybox-1.8.2-static
* busybox-1.8.2-vi.patch
- refreshed patches
* busybox.libunarchive-array.patch
* busybox.dmesg-size.patch
- updated config file
* removed awk math support and dc to get rid of libm
-------------------------------------------------------------------
Wed Sep 3 11:09:34 CEST 2008 - hare@suse.de
- Call mkinitrd_setup during %post and %postun (bnc#413709)
-------------------------------------------------------------------
Fri Aug 22 16:55:24 CEST 2008 - prusnak@suse.cz
- enabled SELinux support [Fate#303662]
-------------------------------------------------------------------
Wed Jul 23 15:16:30 CEST 2008 - hare@suse.de
- Include mkinitrd scriptlets.
-------------------------------------------------------------------
Thu Jan 17 14:30:48 CET 2008 - sassmann@suse.de
- update to 1.8.2
see http://www.busybox.net/ for full changelog
- added bugfixes
* busybox-1.8.2-arping.patch
* busybox-1.8.2-static
* busybox-1.8.2-vi.patch
-------------------------------------------------------------------
Fri Nov 16 15:02:36 CET 2007 - olh@suse.de
- update to 1.8.1
see http://www.busybox.net/ for full changelog
-------------------------------------------------------------------
Sun Jul 15 10:47:28 CEST 2007 - olh@suse.de
- update to 1.6.1
see http://www.busybox.net/ for full changelog
-------------------------------------------------------------------
Fri May 11 16:18:53 CEST 2007 - olh@suse.de
- increase ash cmdline history size
user kernel ringbuffer size for dmesg
-------------------------------------------------------------------
Mon May 7 10:27:51 CEST 2007 - olh@suse.de
- gcc42 rejects out of bounds array access
-------------------------------------------------------------------
Sat Apr 28 21:32:57 CEST 2007 - olh@suse.de
- update to 1.4.2
reduces binary size after e2fsprogs removal
-------------------------------------------------------------------
Wed Dec 6 17:41:32 CET 2006 - trenn@suse.de
- move to 1.2.2 and enable nearly everything.
Most important (awk,less,vi and much more)
binary on i386 now has 732k
-------------------------------------------------------------------
Wed Aug 9 01:25:09 CEST 2006 - ihno@suse.de
- update to busybox 1.2.1 final
Bugfix release. Bugs fixed:
lash: "var=value" works without export
tar: can extract git generated tarballs
adduser: /etc/group is updated
modprobe: look for modules.conf at the right place for 2.6 kernels
all setuid and getgid calls are check return values in case
somebody using per-process resource limits that prevent a user
from having too many processes
-------------------------------------------------------------------
Wed Jan 25 21:34:46 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Mon Jan 16 17:04:28 CET 2006 - ihno@suse.de
- Update to busybox 1.1.0 final
-------------------------------------------------------------------
Wed Jan 11 15:39:39 CET 2006 - ihno@suse.de
- update to busybox 1.1.0-pre1
-------------------------------------------------------------------
Wed Nov 16 15:44:27 CET 2005 - dmueller@suse.de
- build against dietlibc unconditionally
-------------------------------------------------------------------
Thu May 12 18:08:14 CEST 2005 - uli@suse.de
- use dietlibc on ARM
- uclibc config file needs to be fixed
-------------------------------------------------------------------
Sat Apr 2 00:36:53 CEST 2005 - mmj@suse.de
- Correct function declaration
-------------------------------------------------------------------
Mon Jan 24 04:40:25 CET 2005 - nashif@suse.de
- Update to 1.00 final
-------------------------------------------------------------------
Tue Aug 17 13:45:34 CEST 2004 - nashif@suse.de
- Update to 1.00-rc3
-------------------------------------------------------------------
Thu Aug 5 23:28:44 CEST 2004 - nashif@suse.de
- Update to 1.00-rc2
-------------------------------------------------------------------
Wed Jul 21 17:10:34 CEST 2004 - nashif@suse.de
- Update to 1.00-rc1
-------------------------------------------------------------------
Tue May 11 16:38:33 CEST 2004 - nashif@suse.de
- Bug #39461 - Fixes netlink vulnerability
-------------------------------------------------------------------
Tue Apr 27 11:17:35 CEST 2004 - mmj@suse.de
- Fix strict aliasing
-------------------------------------------------------------------
Mon Mar 1 06:27:03 CET 2004 - nashif@suse.de
- Update to 1.0 pre 8
-------------------------------------------------------------------
Wed Feb 11 02:00:48 CET 2004 - ro@suse.de
- hack to build it on amd64
-------------------------------------------------------------------
Tue Feb 10 23:15:31 CET 2004 - schwab@suse.de
- Fix building on ia64.
-------------------------------------------------------------------
Wed Feb 4 09:57:44 CET 2004 - kukuk@suse.de
- Remove wrong dietlibc requires
-------------------------------------------------------------------
Mon Feb 2 14:43:54 CET 2004 - hare@suse.de
- Fixed spec file to build on all archs.
-------------------------------------------------------------------
Fri Jan 30 14:55:45 CET 2004 - hare@suse.de
- Update to 1.00-pre5
- Patched dietlibc support to use a menuconfig option.
-------------------------------------------------------------------
Sat Jan 10 18:25:15 CET 2004 - adrian@suse.de
- build as user
-------------------------------------------------------------------
Wed Dec 10 14:48:43 CET 2003 - uli@suse.de
- build with dietlibc where available
-------------------------------------------------------------------
Mon Jun 2 16:05:33 CEST 2003 - nashif@suse.de
- Set Autoreqprov: on
-------------------------------------------------------------------
Thu May 29 15:49:26 CEST 2003 - nashif@suse.de
- Updated with latest stable release incl. patches.
-------------------------------------------------------------------
Sat May 17 01:48:55 CEST 2003 - nashif@suse.de
- Removed CVS files
-------------------------------------------------------------------
Sat Nov 2 04:17:12 CET 2002 - nashif@suse.de
- Update to version 0.60.5
- Unique patch names
-------------------------------------------------------------------
Mon Jun 10 02:21:41 CEST 2002 - nashif@suse.de
- Update to version 0.60.3
-------------------------------------------------------------------
Mon Nov 26 05:15:14 CET 2001 - nashif@suse.de
- Update to version 0.60.2
- Major Changes:
* msh was reworked
* reworked hostname
* Various bugfixes
-------------------------------------------------------------------
Fri Aug 24 02:59:15 CEST 2001 - nashif@suse.de
- Update to version 0.60.1
- This is a relatively minor bug fixing release which fixes bugs
in the following applets, among others: msh, sed, route, syslogd,
ifconfig, lash
- Rewrite of tftp
-------------------------------------------------------------------
Sat Aug 4 07:21:18 CEST 2001 - nashif@suse.de
- Update to version 0.60.0
-------------------------------------------------------------------
Fri Jul 13 00:29:02 CEST 2001 - nashif@suse.de
- Update to version 0.52
-------------------------------------------------------------------
Wed Apr 11 06:16:03 CEST 2001 - nashif@suse.de
- Update to version 0.51
-------------------------------------------------------------------
Fri Feb 9 17:30:33 MET 2001 - nashif@suse.de
- Fixed sync.c to compile
-------------------------------------------------------------------
Mon Feb 5 08:06:26 MET 2001 - nashif@suse.de
- Update to version 0.49
-------------------------------------------------------------------
Wed Dec 20 17:53:40 CET 2000 - uli@suse.de
- disabled insmod for all archs except IA32, ARM and SH
-------------------------------------------------------------------
Tue Dec 19 19:10:50 MET 2000 - nashif@suse.de
- Update to 0.48 (Fixes many bugs)
-------------------------------------------------------------------
Mon Nov 27 22:36:15 MET 2000 - nashif@suse.de
- Fixed pathes in install script
-------------------------------------------------------------------
Tue Nov 7 21:36:42 MET 2000 - nashif@suse.de
- Added EM_486 and OPEN_MAX fixes
-------------------------------------------------------------------
Wed Sep 27 04:47:12 MEST 2000 - nashif@suse.de
- Update to 0.47
- Fix nfsmount.c
-------------------------------------------------------------------
Wed Aug 30 06:51:34 MEST 2000 - nashif@suse.de
- Fix for axp
-------------------------------------------------------------------
Mon Aug 28 18:54:49 MEST 2000 - nashif@suse.de
- Update to version 0.46
-------------------------------------------------------------------
Thu Jul 6 19:17:53 MEST 2000 - nashif@suse.de
- Fix install script (Bug #3195)
-------------------------------------------------------------------
Tue May 23 20:37:05 CEST 2000 - nashif@suse.de
- Initial Release (Version 0.43)

1231
busybox.config Normal file

File diff suppressed because it is too large Load Diff

17
busybox.config.static Normal file
View File

@ -0,0 +1,17 @@
# CONFIG_SELINUX is not set
CONFIG_STATIC=y
# CONFIG_PIE is not set
# CONFIG_FEATURE_TAR_SELINUX is not set
# CONFIG_CHCON is not set
# CONFIG_GETENFORCE is not set
# CONFIG_GETSEBOOL is not set
# CONFIG_LOAD_POLICY is not set
# CONFIG_MATCHPATHCON is not set
# CONFIG_RUNCON is not set
# CONFIG_SELINUXENABLED is not set
# CONFIG_SESTATUS is not set
# CONFIG_SETENFORCE is not set
# CONFIG_SETFILES is not set
# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
# CONFIG_RESTORECON is not set
# CONFIG_SETSEBOOL is not set

View File

@ -0,0 +1,4 @@
CONFIG_REBOOT=y
CONFIG_SWITCH_ROOT=y
CONFIG_CTTYHACK=y

37
busybox.install.patch Normal file
View File

@ -0,0 +1,37 @@
--- a/applets/install.sh
+++ b/applets/install.sh 2019/03/29 09:03:34
@@ -1,11 +1,11 @@
-#!/bin/sh
+#!/usr/bin/busybox sh
export LC_ALL=POSIX
export LC_CTYPE=POSIX
prefix=$1
if [ -z "$prefix" ]; then
- echo "usage: applets/install.sh DESTINATION TYPE [OPTS ...]"
+ echo "usage: busybox.install DESTINATION TYPE [OPTS ...]"
echo " TYPE is one of: --symlinks --hardlinks --binaries --scriptwrapper --none"
echo " OPTS is one or more of: --cleanup --noclobber"
exit 1
@@ -13,9 +13,9 @@
shift # Keep only remaining options
# Source the configuration
-. ./.config
+#. ./.config
-h=`sort busybox.links | uniq`
+h=`sort /usr/share/busybox/busybox.links | uniq`
sharedlib_dir="0_lib"
@@ -78,7 +78,7 @@
rm -f "$prefix/bin/busybox" || exit 1
mkdir -p "$prefix/bin" || exit 1
-install -m 755 busybox "$prefix/bin/busybox" || exit 1
+install -m 755 /usr/bin/busybox "$prefix/bin/busybox" || exit 1
for i in $h; do
appdir=`dirname "$i"`

24
busybox.keyring Normal file
View File

@ -0,0 +1,24 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.6 (GNU/Linux)
mQGiBEV/D2cRBACIILILVH2Hw7pTT/wGSx8sV4AiRGqgLrkSYej1o2aV73KYr803
ciaE6cvCv2pA7VVDGNjjA0Qm6z9NLiwOyL6Lxt0X7pv5LPHiGuusuJbo1IlT7Alf
vJS47XNZUKOK+DwTbrnKawEGKJLdANJ3x4aqu1tZI0tle2u42Ek1zgBiiwCg5WIB
LbZbsN9vuvhDXkU5rjA+rtsD/jeV7l4q+F31xboCE6Kixzv1Q+UNeiP+lcncqzOW
CIzh6prPooRqdXokb13OYwfAv1d84Ww2AA93grCAnNHUBomz4iVzpnMsRRxpwMoy
EnVFbutX8Zl1S631IqSKmM237X4cTItUDHABQIqUY4k7xW44UMBb62jYxyekNW6v
yVo5A/4yM8ri1E7AIUAOjoEMuWkBSYxdcq7h1jxh1Rm5QqRejiS7TNejF5EOUSlo
oPx5ijS56JHAvPJZFWu5CU0VUveTcFrv0IhqDuoYNM4uUIh/QIjo06CxBEjgviNs
kYZBwHBIBMGOIj/Vo+xzGQLySDuVxzMpDrUm9gXb49e/5skxSrQpRGVuaXMgVmxh
c2Vua28gPHZkYS5saW51eEBnb29nbGVtYWlsLmNvbT6IYAQTEQIAIAUCRX8PZwIb
AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEEe3DFWsyZZbExwAoOTGwQOj75Hj
pDbOw99+vhlx8/uUAKCwAaxacnpRFUkhVRBsCYWIC5obf7kBDQRFfw9oEAQAjQyS
MWag/Dxc6G9Em9/2jVG9FQAi+NOPx2EigOUC8wEeErEjwQRN/9xIU8CCncttYfBe
U00b198fSL9axKZIptn0hLAMOruFODBVjVDiOY09M67DfQ47zzTRE9HWst47TgVN
LWdfNljB+wqgvEor4S6WtZpyAcq8f1kOMrX115sAAwUD/2eow67bKR7yGhHw8Me2
HWqUmd8B0+CM5QpfYGOND5p7oKnMLXDu+Q0bma6wbTasQX+urA1UxdXo0EAWrQXr
ttQTF92G6G0Gi5JcMWu2QkgTWiZMr90sY+PMAi3nGnqiJLwHVnlxhKnTSE5JdpcX
cQLJQDYDoJtBBccBUtF0o1z+iEkEGBECAAkFAkV/D2gCGwwACgkQR7cMVazJllvV
igCfbxD3ZRcgCpaZo6gZyXf89oyKCjAAnAiK5h7KxXPrwviUL4K/GlWGGFOA
=2JoA
-----END PGP PUBLIC KEY BLOCK-----

208
busybox.spec Normal file
View File

@ -0,0 +1,208 @@
#
# spec file for package busybox
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%ifarch x86_64 aarch64 i586
%bcond_without ww3
%else
%bcond_with ww3
%endif
%bcond_without static
Name: busybox
Version: 1.36.1
Release: 0
Summary: Minimalist variant of UNIX utilities linked in a single executable
License: GPL-2.0-or-later
Group: System/Base
URL: https://www.busybox.net/
Source: https://busybox.net/downloads/%{name}-%{version}.tar.bz2
Source2: busybox.config
# Make sure busybox-static.config stays in sync with busybox.config -
# exception: SELinux commands - these do not build statically.
Source3: busybox.config.static
Source4: man.conf
Source5: https://busybox.net/downloads/%{name}-%{version}.tar.bz2.sig
Source6: https://busybox.net/~vda/vda_pubkey.gpg#/%{name}.keyring
Source7: busybox.config.static.warewulf3
Patch0: cpio-long-opt.patch
Patch1: sendmail-ignore-F-option.patch
Patch2: testsuite-gnu-echo.patch
# PATCH-FIX-UPSTREAM shell: avoid segfault on ${0::0/0~09J} (CVE-2022-48174) https://git.busybox.net/busybox/commit/?id=d417193cf
Patch3: ash-fix-segfault-d417193cf.patch
Patch4: udhcp6-install-path.patch
# other patches
Patch100: busybox.install.patch
Provides: useradd_or_adduser_dep
BuildRequires: glibc-devel-static
#in SLE12 hostname is part of the net-tools package
%if %{?suse_version} && %{?suse_version} <= 1315
BuildRequires: net-tools
%else
BuildRequires: hostname
%endif
BuildRequires: pkgconfig(libselinux)
# for test suite
BuildRequires: zip
%description
BusyBox combines tiny versions of many common UNIX utilities into a
single executable. It provides minimalist replacements for utilities
usually found in fileutils, shellutils, findutils, textutils, grep,
gzip, tar, and more. BusyBox provides a fairly complete POSIX
environment for small or embedded systems. The utilities in BusyBox
generally have fewer options than their GNU cousins. The options that
are included provide the expected functionality and behave much like
their GNU counterparts.
BusyBox is for emergency and special use cases. Replacing the standard
tools in a system is not supported. Some tools don't work out of the
box but need special configuration, like udhcpc, the dhcp client.
%package static
Summary: Static linked version of Busybox, a compact UNIX utility collection
Group: System/Base
%description static
BusyBox combines tiny versions of many common UNIX utilities into a
single executable.
%package warewulf3
Summary: Static version of Busybox - for building Warewulf3
Group: System/Base
%description warewulf3
This version of busybox is only for building Warewulf3
https://github.com/warewulf/warewulf3
%package testsuite
Summary: Testsuite of busybox
Group: Development/Testing
Requires: %{name} = %{version}
Requires: zip
%description testsuite
Using this package you can test the busybox build on different kernels and glibc.
It needs to run with permission to the current directory, so either copy it away
as is or run as root:
cd /usr/share/busybox/testsuite
PATH=/usr/share/busybox:$PATH SKIP_KNOWN_BUGS=1 ./runtest
%prep
#SLE12 needs an empty line after autosetup for it to expand properly (bsc#1205420)
%autosetup -p1
find "(" -name CVS -o -name .cvsignore -o -name .svn -o -name .gitignore ")" \
-exec rm -Rf {} +
%build
export KCONFIG_NOTIMESTAMP=KCONFIG_NOTIMESTAMP
export KBUILD_VERBOSE=1
export CFLAGS="%{optflags} -fPIC -fno-strict-aliasing -I/usr/include/tirpc"
export CC="gcc"
export HOSTCC=gcc
%if %{with static}
cat %{SOURCE3} %{SOURCE2} > .config
make %{?_smp_mflags} -e oldconfig
make -e %{?_smp_mflags}
mv busybox busybox-static
%endif
%if 0%{with ww3}
make -e %{?_smp_mflags} clean
cat %{SOURCE7} %{SOURCE3} %{SOURCE2} > .config
make %{?_smp_mflags} -e oldconfig
make -e %{?_smp_mflags}
mv busybox busybox-warewulf3
make -e busybox.links %{?_smp_mflags}
mv busybox.links busybox-warewulf3.links
%endif
make -e %{?_smp_mflags} clean
cp -a %{SOURCE2} .config
make %{?_smp_mflags} -e oldconfig
#make -e %{?_smp_mflags}
make -e
make -e doc busybox.links %{?_smp_mflags}
%if 0%{?suse_version} >= 1550
for i in busybox.links %{?with_ww3:busybox-warewulf3.links}; do
sed -i -e 's,^/\(s\?bin\)/,/usr/\1/,' $i
done
%endif
%install
install -d %{buildroot}/%{_bindir}
install -d %{buildroot}/%{_datadir}/busybox
install -m 0644 busybox.links %{buildroot}%{_datadir}/busybox
install applets/install.sh %{buildroot}%{_bindir}/busybox.install
install -m 0755 busybox %{buildroot}%{_bindir}
%if %{with static}
install -m 0755 busybox-static %{buildroot}%{_bindir}
%endif
install -d %{buildroot}%{_sysconfdir}
install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/
install -d %{buildroot}%{_mandir}/man1
install -m 644 docs/busybox.1 %{buildroot}%{_mandir}/man1
%if %{with ww3}
install -m 0644 busybox-warewulf3.links %{buildroot}%{_datadir}/busybox
install -m 0755 busybox-warewulf3 %{buildroot}%{_bindir}
%endif
cp %{SOURCE2} %{buildroot}%{_datadir}/busybox/.config
ln -s %_bindir/busybox %{buildroot}%{_datadir}/busybox/busybox
cp -a testsuite %{buildroot}%{_datadir}/busybox/testsuite
%check
export KCONFIG_NOTIMESTAMP=KCONFIG_NOTIMESTAMP
export KBUILD_VERBOSE=1
export CFLAGS="%{optflags} -fPIC -fno-strict-aliasing -I/usr/include/tirpc"
export CC="gcc"
export HOSTCC=gcc
export SKIP_KNOWN_BUGS=1
export SKIP_INTERNET_TESTS=1
make -e %{?_smp_mflags} test
%files
%license LICENSE
%doc docs/mdev.txt
%config %{_sysconfdir}/man.conf
%doc %{_mandir}/man1/busybox.1.gz
%{_bindir}/busybox
%{_bindir}/busybox.install
%dir %{_datadir}/busybox
%{_datadir}/busybox/busybox.links
%files testsuite
%{_datadir}/busybox/busybox
%{_datadir}/busybox/.config
%{_datadir}/busybox/testsuite
%if %{with static}
%files static
%license LICENSE
%{_bindir}/busybox-static
%endif
%if %{with ww3}
%files warewulf3
%license LICENSE
%{_bindir}/busybox-warewulf3
%dir %{_datadir}/busybox
%{_datadir}/busybox/busybox-warewulf3.links
%endif
%changelog

14
cpio-long-opt.patch Normal file
View File

@ -0,0 +1,14 @@
Index: busybox-1.35.0/archival/cpio.c
===================================================================
--- busybox-1.35.0.orig/archival/cpio.c
+++ busybox-1.35.0/archival/cpio.c
@@ -413,6 +413,9 @@ int cpio_main(int argc UNUSED_PARAM, cha
const char *long_opts =
"extract\0" No_argument "i"
"list\0" No_argument "t"
+ "unconditional\0" No_argument "u"
+ "preserve-modification-time\0" No_argument "m"
+ "make-directories\0" No_argument "d"
#if ENABLE_FEATURE_CPIO_O
"create\0" No_argument "o"
"format\0" Required_argument "H"

1
man.conf Normal file
View File

@ -0,0 +1 @@
MANPATH /usr/share/man

View File

@ -0,0 +1,12 @@
diff -urN busybox-1.32.0.orig/mailutils/sendmail.c busybox-1.32.0/mailutils/sendmail.c
--- busybox-1.32.0.orig/mailutils/sendmail.c 2020-06-26 20:47:44.000000000 +0200
+++ busybox-1.32.0/mailutils/sendmail.c 2021-01-05 09:04:05.973347132 +0100
@@ -271,7 +271,7 @@
// -a is for ssmtp (http://downloads.openwrt.org/people/nico/man/man8/ssmtp.8.html) compatibility,
// it is still under development.
opts = getopt32(argv, "^"
- "tf:o:iw:+H:S:a:*:v"
+ "tf:o:iw:+H:S:a:*:vF:"
"\0"
// -v is a counter, -H and -S are mutually exclusive, -a is a list
"vv:H--S:S--H",

26
testsuite-gnu-echo.patch Normal file
View File

@ -0,0 +1,26 @@
From 0bc41194d1f934f94c84fd0a7b835cee6961d824 Mon Sep 17 00:00:00 2001
From: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com>
Date: Thu, 4 Feb 2021 18:02:11 +0200
Subject: [PATCH v1] testing.sh: Use GNU echo instead of builtin
Signed-off-by: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com>
---
testsuite/testing.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testsuite/testing.sh b/testsuite/testing.sh
index f5b756947..c853f3cfd 100644
--- a/testsuite/testing.sh
+++ b/testsuite/testing.sh
@@ -39,7 +39,7 @@ export SKIP=
# Helper for helpers. Oh my...
test x"$ECHO" != x"" || {
- ECHO="echo"
+ ECHO="/bin/echo"
test x"`echo -ne`" = x"" || {
# Compile and use a replacement 'echo' which understands -e -n
ECHO="$PWD/echo-ne"
--
2.26.2

11
udhcp6-install-path.patch Normal file
View File

@ -0,0 +1,11 @@
--- busybox-1.36.1/networking/udhcp/d6_dhcpc.c.old 2023-01-03 15:14:43.000000000 +0100
+++ busybox-1.36.1/networking/udhcp/d6_dhcpc.c 2023-12-08 11:46:16.570298842 +0100
@@ -45,7 +45,7 @@
//config: You can request bootfile-url with "-O bootfile_url" and
//config: bootfile-params with "-O bootfile_params".
-//applet:IF_UDHCPC6(APPLET(udhcpc6, BB_DIR_USR_BIN, BB_SUID_DROP))
+//applet:IF_UDHCPC6(APPLET(udhcpc6, BB_DIR_USR_SBIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_UDHCPC6) += d6_dhcpc.o d6_packet.o d6_socket.o common.o socket.o signalpipe.o
//kbuild:lib-$(CONFIG_FEATURE_UDHCPC6_RFC3646) += domain_codec.o