busybox fixes and cleanups + update 1.23.2 -> 1.24.1
cover busybox fixes and cleanups + update 1.23.2 -> 1.24.1
Andre McCurdy (11):
busybox_git: Enable getopt applet
busybox.inc: don't export EXTRA_OEMAKE
busybox: move EXTRA_OEMAKE etc into busybox.inc
busybox.inc: explicitly include CC=${CC} on make command line busybox.inc: don't set .config CROSS_COMPILER_PREFIX busybox.inc: fix CONFIG_EXTRA_CFLAGS configmangle busybox.inc: remove MAKEFLAGS over-ride from EXTRA_OEMAKE
busybox: re-order defconfig to align with busybox 1.24.1
busybox: update 1.23.2 -> 1.24.1
busybox: disable support for mounting NFS file systems on Linux < 2.6.23
busybox: enable resize applet
meta/recipes-core/busybox/busybox.inc | 20 +- .../busybox/0001-Switch-to-POSIX-utmpx-API.patch | 388 --------------------- .../busybox/busybox/0001-chown-fix-help-text.patch | 34 -- ...ix-double-free-fatal-error-in-INET_sprint.patch | 67 ---- meta/recipes-core/busybox/busybox/defconfig | 63 ++-- meta/recipes-core/busybox/busybox/resize.cfg | 2 + meta/recipes-core/busybox/busybox_1.23.2.bb | 53 --- meta/recipes-core/busybox/busybox_1.24.1.bb | 43 +++ meta/recipes-core/busybox/busybox_git.bb | 18 +- 9 files changed, 105 insertions(+), 583 deletions(-) delete mode 100644 meta/recipes-core/busybox/busybox/0001-Switch-to-POSIX-utmpx-API.patch delete mode 100644 meta/recipes-core/busybox/busybox/0001-chown-fix-help-text.patch delete mode 100644 meta/recipes-core/busybox/busybox/0001-ifconfig-fix-double-free-fatal-error-in-INET_sprint.patch create mode 100644 meta/recipes-core/busybox/busybox/resize.cfg delete mode 100644 meta/recipes-core/busybox/busybox_1.23.2.bb create mode 100644 meta/recipes-core/busybox/busybox_1.24.1.bb
Signature · 1 line
1.9.1
PATCH 1/11 busybox_git: Enable getopt applet
Keep git recipe in sync with 1.23.2:
http://git.openembedded.org/openembedded-core/commit/?id=10c2c484d5916ad476ad7717c3629f6684f01e6d
--- meta/recipes-core/busybox/busybox_git.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/busybox/busybox_git.bb +1 -0
@@ -41,6 +41,7 @@ SRC_URI = "git://busybox.net/busybox.git \ file://mount-via-label.cfg \ file://sha1sum.cfg \ file://sha256sum.cfg \ + file://getopts.cfg \ " EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
Signature · 1 line
1.9.1
PATCH 2/11 busybox.inc: don't export EXTRA_OEMAKE
In reply to Andre McCurdyEXTRA_OEMAKE is private to OE and shouldn't be exported to the busybox build.
--- meta/recipes-core/busybox/busybox.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/busybox/busybox.inc +2 -1
@@ -17,7 +17,8 @@ BUSYBOX_SPLIT_SUID ?= "1" export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" -export EXTRA_OEMAKE += "'LD=${CCLD}'" + +EXTRA_OEMAKE += "'LD=${CCLD}'" PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
Signature · 1 line
1.9.1
PATCH 3/11 busybox: move EXTRA_OEMAKE etc into busybox.inc
In reply to Andre McCurdyEXTRA_OEMAKE and do_install_ptest() are currently common to all supported versions of busybox, so move from version specific recipes into busybox.inc.
--- meta/recipes-core/busybox/busybox.inc | 7 +++++++ meta/recipes-core/busybox/busybox_1.23.2.bb | 8 -------- meta/recipes-core/busybox/busybox_git.bb | 8 -------- 3 files changed, 7 insertions(+), 16 deletions(-)
meta/recipes-core/busybox/busybox.inc +7 -0
@@ -19,6 +19,7 @@ export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" EXTRA_OEMAKE += "'LD=${CCLD}'" +EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
@@ -301,6 +302,12 @@ do_install () { fi } +do_install_ptest () { + cp -r ${B}/testsuite ${D}${PTEST_PATH}/ + cp ${B}/.config ${D}${PTEST_PATH}/ + ln -s /bin/busybox ${D}${PTEST_PATH}/busybox +} + inherit update-alternatives ALTERNATIVE_PRIORITY = "50"
meta/recipes-core/busybox/busybox_1.23.2.bb +0 -8
@@ -43,11 +43,3 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ SRC_URI[tarball.md5sum] = "7925683d7dd105aabe9b6b618d48cc73" SRC_URI[tarball.sha256sum] = "05a6f9e21aad8c098e388ae77de7b2361941afa7157ef74216703395b14e319a" - -EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" - -do_install_ptest () { - cp -r ${B}/testsuite ${D}${PTEST_PATH}/ - cp ${B}/.config ${D}${PTEST_PATH}/ - ln -s /bin/busybox ${D}${PTEST_PATH}/busybox -}
meta/recipes-core/busybox/busybox_git.bb +0 -8
@@ -44,12 +44,4 @@ SRC_URI = "git://busybox.net/busybox.git \ file://getopts.cfg \ " -EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" - -do_install_ptest () { - cp -r ${B}/testsuite ${D}${PTEST_PATH}/ - cp ${B}/.config ${D}${PTEST_PATH}/ - ln -s /bin/busybox ${D}${PTEST_PATH}/busybox -} - DEFAULT_PREFERENCE = "-1"
Signature · 1 line
1.9.1
PATCH 4/11 busybox.inc: explicitly include CC=${CC} on make command line
In reply to Andre McCurdyThe busybox build currently relies on 'make -e' to over-ride CC and the make command line to over-ride LD. Add CC to the make command line to make the CC over-ride more explicit and consistent with LD.
--- meta/recipes-core/busybox/busybox.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/busybox.inc +1 -1
@@ -18,7 +18,7 @@ BUSYBOX_SPLIT_SUID ?= "1" export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" -EXTRA_OEMAKE += "'LD=${CCLD}'" +EXTRA_OEMAKE += "'CC=${CC}' 'LD=${CCLD}'" EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
Signature · 1 line
1.9.1
PATCH 5/11 busybox.inc: don't set .config CROSS_COMPILER_PREFIX
In reply to Andre McCurdySetting CROSS_COMPILER_PREFIX via .config is redundant (setting CROSS_COMPILE via the make command line will always over-ride it).
--- meta/recipes-core/busybox/busybox.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-core/busybox/busybox.inc +2 -4
@@ -81,8 +81,7 @@ def features_to_busybox_del(d): cnf, rem = features_to_busybox_settings(d) return rem -configmangle = '/CROSS_COMPILER_PREFIX/d; \ - /CONFIG_EXTRA_CFLAGS/d; \ +configmangle = '/CONFIG_EXTRA_CFLAGS/d; \ ' OE_FEATURES := "${@features_to_busybox_conf(d)}" OE_DEL := "${@features_to_busybox_del(d)}"
@@ -98,8 +97,7 @@ python () { ("\\n".join((d.expand("${OE_FEATURES}").split("\n"))))) d.setVar('configmangle_append', "/^### CROSS$/a\\\n%s\n" % - ("\\n".join(["CONFIG_CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"", - "CONFIG_EXTRA_CFLAGS=\"${CFLAGS}\" \"${HOST_CC_ARCH}\"" + ("\\n".join(["CONFIG_EXTRA_CFLAGS=\"${CFLAGS}\" \"${HOST_CC_ARCH}\"" ]) )) }
Signature · 1 line
1.9.1
PATCH 6/11 busybox.inc: fix CONFIG_EXTRA_CFLAGS configmangle
In reply to Andre McCurdyWith current busybox Kbuild, setting .config to:
CONFIG_EXTRA_CFLAGS="foo" "bar"
and then running 'make oldconfig' results in .config containing:
CONFIG_EXTRA_CFLAGS="foo"
ie the CONFIG_EXTRA_CFLAGS configmangle in the busybox.inc doesn't currently work as intended. Remove the extra \" \" to ensure that ${HOST_CC_ARCH} gets added to CONFIG_EXTRA_CFLAGS.
--- meta/recipes-core/busybox/busybox.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/busybox.inc +1 -1
@@ -97,7 +97,7 @@ python () { ("\\n".join((d.expand("${OE_FEATURES}").split("\n"))))) d.setVar('configmangle_append', "/^### CROSS$/a\\\n%s\n" % - ("\\n".join(["CONFIG_EXTRA_CFLAGS=\"${CFLAGS}\" \"${HOST_CC_ARCH}\"" + ("\\n".join(["CONFIG_EXTRA_CFLAGS=\"${CFLAGS} ${HOST_CC_ARCH}\"" ]) )) }
Signature · 1 line
1.9.1
PATCH 7/11 busybox.inc: remove MAKEFLAGS over-ride from EXTRA_OEMAKE
In reply to Andre McCurdyBusybox Kbuild likes to control its own MAKEFLAGS (it adds -rR, etc), so avoid over-riding MAKEFLAGS via EXTRA_OEMAKE.
--- meta/recipes-core/busybox/busybox.inc | 4 ++++ 1 file changed, 4 insertions(+)
meta/recipes-core/busybox/busybox.inc +4 -0
@@ -18,6 +18,10 @@ BUSYBOX_SPLIT_SUID ?= "1" export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" +# Busybox Kbuild likes to control its own MAKEFLAGS (it adds -rR, +# etc), so avoid over-riding MAKEFLAGS via EXTRA_OEMAKE. +EXTRA_OEMAKE = "-e" + EXTRA_OEMAKE += "'CC=${CC}' 'LD=${CCLD}'" EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
Signature · 1 line
1.9.1
PATCH 8/11 busybox: re-order defconfig to align with busybox 1.24.1
In reply to Andre McCurdyNo functional changes, simply re-order lines in defconfig so that the existing options don't move elsewhere in the file when run though busybox 1.24.1 'make oldconfig'.
--- meta/recipes-core/busybox/busybox/defconfig | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-)
meta/recipes-core/busybox/busybox/defconfig +19 -19
@@ -183,10 +183,15 @@ CONFIG_DATE=y # CONFIG_FEATURE_DATE_ISOFMT is not set # CONFIG_FEATURE_DATE_NANO is not set CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +# CONFIG_FEATURE_DD_IBS_OBS is not set # CONFIG_HOSTID is not set CONFIG_ID=y CONFIG_GROUPS=y CONFIG_SHUF=y +CONFIG_SYNC=y CONFIG_TEST=y CONFIG_FEATURE_TEST_64=y CONFIG_TOUCH=y
@@ -211,10 +216,6 @@ CONFIG_CHROOT=y CONFIG_CP=y # CONFIG_FEATURE_CP_LONG_OPTIONS is not set CONFIG_CUT=y -CONFIG_DD=y -CONFIG_FEATURE_DD_SIGNAL_HANDLING=y -# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set -# CONFIG_FEATURE_DD_IBS_OBS is not set CONFIG_DF=y # CONFIG_FEATURE_DF_FANCY is not set CONFIG_DIRNAME=y
@@ -283,7 +284,6 @@ CONFIG_STAT=y CONFIG_FEATURE_STAT_FORMAT=y CONFIG_STTY=y # CONFIG_SUM is not set -CONFIG_SYNC=y # CONFIG_TAC is not set CONFIG_TAIL=y CONFIG_FEATURE_FANCY_TAIL=y
@@ -553,6 +553,15 @@ CONFIG_FSTRIM=y # CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set # CONFIG_FEATURE_MDEV_EXEC is not set # CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +CONFIG_FEATURE_MOUNT_NFS=y +# CONFIG_FEATURE_MOUNT_CIFS is not set +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y # CONFIG_REV is not set # CONFIG_ACPID is not set # CONFIG_FEATURE_ACPID_COMPAT is not set
@@ -599,15 +608,6 @@ CONFIG_LOSETUP=y CONFIG_MKSWAP=y # CONFIG_FEATURE_MKSWAP_UUID is not set CONFIG_MORE=y -CONFIG_MOUNT=y -# CONFIG_FEATURE_MOUNT_FAKE is not set -# CONFIG_FEATURE_MOUNT_VERBOSE is not set -# CONFIG_FEATURE_MOUNT_HELPERS is not set -# CONFIG_FEATURE_MOUNT_LABEL is not set -CONFIG_FEATURE_MOUNT_NFS=y -# CONFIG_FEATURE_MOUNT_CIFS is not set -CONFIG_FEATURE_MOUNT_FLAGS=y -CONFIG_FEATURE_MOUNT_FSTAB=y CONFIG_PIVOT_ROOT=y CONFIG_RDATE=y # CONFIG_RDEV is not set
@@ -758,6 +758,11 @@ CONFIG_NC=y CONFIG_PING=y CONFIG_PING6=y CONFIG_FEATURE_FANCY_PING=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_TIMEOUT=y # CONFIG_WHOIS is not set CONFIG_FEATURE_IPV6=y # CONFIG_FEATURE_UNIX_LOCAL is not set
@@ -885,11 +890,6 @@ CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" # CONFIG_UDPSVD is not set # CONFIG_VCONFIG is not set -CONFIG_WGET=y -CONFIG_FEATURE_WGET_STATUSBAR=y -CONFIG_FEATURE_WGET_AUTHENTICATION=y -CONFIG_FEATURE_WGET_LONG_OPTIONS=y -CONFIG_FEATURE_WGET_TIMEOUT=y # CONFIG_ZCIP is not set #
Signature · 1 line
1.9.1
PATCH 9/11 busybox: update 1.23.2 -> 1.24.1
In reply to Andre McCurdyThe busybox defconfig has also been refreshed, with all new apps and features disabled by default. Update _git recipe version too.
--- .../busybox/0001-Switch-to-POSIX-utmpx-API.patch | 388 --------------------- .../busybox/busybox/0001-chown-fix-help-text.patch | 34 -- ...ix-double-free-fatal-error-in-INET_sprint.patch | 67 ---- meta/recipes-core/busybox/busybox/defconfig | 23 +- meta/recipes-core/busybox/busybox_1.23.2.bb | 45 --- meta/recipes-core/busybox/busybox_1.24.1.bb | 42 +++ meta/recipes-core/busybox/busybox_git.bb | 8 +- 7 files changed, 65 insertions(+), 542 deletions(-) delete mode 100644 meta/recipes-core/busybox/busybox/0001-Switch-to-POSIX-utmpx-API.patch delete mode 100644 meta/recipes-core/busybox/busybox/0001-chown-fix-help-text.patch delete mode 100644 meta/recipes-core/busybox/busybox/0001-ifconfig-fix-double-free-fatal-error-in-INET_sprint.patch delete mode 100644 meta/recipes-core/busybox/busybox_1.23.2.bb create mode 100644 meta/recipes-core/busybox/busybox_1.24.1.bb
meta/recipes-core/busybox/busybox/0001-Switch-to-POSIX-utmpx-API.patch deleted +0 -388
@@ -1,388 +0,0 @@ -From 86a7f18f211af1abda5c855d2674b0fcb53de524 Mon Sep 17 00:00:00 2001 -From: Bernhard Reutner-Fischer <[email protected]> -Date: Thu, 2 Apr 2015 23:03:46 +0200 -Subject: [PATCH] *: Switch to POSIX utmpx API - -UTMP is SVID legacy, UTMPX is mandated by POSIX. - -Glibc and uClibc have identical layout of UTMP and UTMPX, both of these -libc treat _PATH_UTMPX as _PATH_UTMP so from a user-perspective nothing -changes except the names of the API entrypoints. - -Signed-off-by: Bernhard Reutner-Fischer <[email protected]> ---- -Upstream-Status: Backport - - coreutils/who.c | 8 ++++---- - include/libbb.h | 2 +- - init/halt.c | 4 ++-- - libbb/utmp.c | 44 ++++++++++++++++++++++---------------------- - miscutils/last.c | 8 ++++---- - miscutils/last_fancy.c | 16 ++++++++++------ - miscutils/runlevel.c | 12 ++++++------ - miscutils/wall.c | 8 ++++---- - procps/uptime.c | 6 +++--- - 9 files changed, 56 insertions(+), 52 deletions(-) - -diff --git a/coreutils/who.c b/coreutils/who.c -index f955ce6..8337212 100644 ---- a/coreutils/who.c -+++ b/coreutils/who.c -@@ -73,7 +73,7 @@ static void idle_string(char *str6, time_t t) - int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; - int who_main(int argc UNUSED_PARAM, char **argv) - { -- struct utmp *ut; -+ struct utmpx *ut; - unsigned opt; - int do_users = (ENABLE_USERS && (!ENABLE_WHO || applet_name[0] == 'u')); - const char *fmt = "%s"; -@@ -83,8 +83,8 @@ int who_main(int argc UNUSED_PARAM, char **argv) - if (opt & 2) // -H - printf("USER\t\tTTY\t\tIDLE\tTIME\t\t HOST\n"); - -- setutent(); -- while ((ut = getutent()) != NULL) { -+ setutxent(); -+ while ((ut = getutxent()) != NULL) { - if (ut->ut_user[0] - && ((opt & 1) || ut->ut_type == USER_PROCESS) - ) { -@@ -126,6 +126,6 @@ int who_main(int argc UNUSED_PARAM, char **argv) - if (do_users) - bb_putchar('\n'); - if (ENABLE_FEATURE_CLEAN_UP) -- endutent(); -+ endutxent(); - return EXIT_SUCCESS; - } -diff --git a/include/libbb.h b/include/libbb.h -index 26b6868..0f8363b 100644 ---- a/include/libbb.h -+++ b/include/libbb.h -@@ -84,7 +84,7 @@ - # include <selinux/av_permissions.h> - #endif - #if ENABLE_FEATURE_UTMP --# include <utmp.h> -+# include <utmpx.h> - #endif - #if ENABLE_LOCALE_SUPPORT - # include <locale.h> -diff --git a/init/halt.c b/init/halt.c -index 7974adb..ad12d91 100644 ---- a/init/halt.c -+++ b/init/halt.c -@@ -74,7 +74,7 @@ - - static void write_wtmp(void) - { -- struct utmp utmp; -+ struct utmpx utmp; - struct utsname uts; - /* "man utmp" says wtmp file should *not* be created automagically */ - /*if (access(bb_path_wtmp_file, R_OK|W_OK) == -1) { -@@ -88,7 +88,7 @@ static void write_wtmp(void) - utmp.ut_line[0] = '~'; utmp.ut_line[1] = '~'; /* = strcpy(utmp.ut_line, "~~"); */ - uname(&uts); - safe_strncpy(utmp.ut_host, uts.release, sizeof(utmp.ut_host)); -- updwtmp(bb_path_wtmp_file, &utmp); -+ updwtmpx(bb_path_wtmp_file, &utmp); - } - #else - #define write_wtmp() ((void)0) -diff --git a/libbb/utmp.c b/libbb/utmp.c -index 8ad9ba2..bd07670 100644 ---- a/libbb/utmp.c -+++ b/libbb/utmp.c -@@ -16,7 +16,7 @@ static void touch(const char *filename) - - void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname) - { -- struct utmp utent; -+ struct utmpx utent; - char *id; - unsigned width; - -@@ -45,17 +45,17 @@ void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, con - tty_name += 3; - strncpy(id, tty_name, width); - -- touch(_PATH_UTMP); -- //utmpname(_PATH_UTMP); -- setutent(); -+ touch(_PATH_UTMPX); -+ //utmpxname(_PATH_UTMPX); -+ setutxent(); - /* Append new one (hopefully, unless we collide on ut_id) */ -- pututline(&utent); -- endutent(); -+ pututxline(&utent); -+ endutxent(); - - #if ENABLE_FEATURE_WTMP - /* "man utmp" says wtmp file should *not* be created automagically */ - /*touch(bb_path_wtmp_file);*/ -- updwtmp(bb_path_wtmp_file, &utent); -+ updwtmpx(bb_path_wtmp_file, &utent); - #endif - } - -@@ -64,17 +64,17 @@ void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, con - */ - void FAST_FUNC update_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname) - { -- struct utmp utent; -- struct utmp *utp; -+ struct utmpx utent; -+ struct utmpx *utp; - -- touch(_PATH_UTMP); -- //utmpname(_PATH_UTMP); -- setutent(); -+ touch(_PATH_UTMPX); -+ //utmpxname(_PATH_UTMPX); -+ setutxent(); - - /* Did init/getty/telnetd/sshd/... create an entry for us? - * It should be (new_type-1), but we'd also reuse - * any other potentially stale xxx_PROCESS entry */ -- while ((utp = getutent()) != NULL) { -+ while ((utp = getutxent()) != NULL) { - if (utp->ut_pid == pid - // && ut->ut_line[0] - && utp->ut_id[0] /* must have nonzero id */ -@@ -88,25 +88,25 @@ void FAST_FUNC update_utmp(pid_t pid, int new_type, const char *tty_name, const - /* Stale record. Nuke hostname */ - memset(utp->ut_host, 0, sizeof(utp->ut_host)); - } -- /* NB: pututline (see later) searches for matching utent -- * using getutid(utent) - we must not change ut_id -+ /* NB: pututxline (see later) searches for matching utxent -+ * using getutxid(utent) - we must not change ut_id - * if we want *exactly this* record to be overwritten! - */ - break; - } - } -- //endutent(); - no need, pututline can deal with (and actually likes) -+ //endutxent(); - no need, pututxline can deal with (and actually likes) - //the situation when utmp file is positioned on found record - - if (!utp) { - if (new_type != DEAD_PROCESS) - write_new_utmp(pid, new_type, tty_name, username, hostname); - else -- endutent(); -+ endutxent(); - return; - } - -- /* Make a copy. We can't use *utp, pututline's internal getutid -+ /* Make a copy. We can't use *utp, pututxline's internal getutxid - * will overwrite it before it is used! */ - utent = *utp; - -@@ -120,14 +120,14 @@ void FAST_FUNC update_utmp(pid_t pid, int new_type, const char *tty_name, const - utent.ut_tv.tv_sec = time(NULL); - - /* Update, or append new one */ -- //setutent(); -- pututline(&utent); -- endutent(); -+ //setutxent(); -+ pututxline(&utent); -+ endutxent(); - - #if ENABLE_FEATURE_WTMP - /* "man utmp" says wtmp file should *not* be created automagically */ - /*touch(bb_path_wtmp_file);*/ -- updwtmp(bb_path_wtmp_file, &utent); -+ updwtmpx(bb_path_wtmp_file, &utent); - #endif - } - -diff --git a/miscutils/last.c b/miscutils/last.c -index a144c7e..6d8b584 100644 ---- a/miscutils/last.c -+++ b/miscutils/last.c -@@ -32,21 +32,21 @@ - - #if defined UT_LINESIZE \ - && ((UT_LINESIZE != 32) || (UT_NAMESIZE != 32) || (UT_HOSTSIZE != 256)) --#error struct utmp member char[] size(s) have changed! -+#error struct utmpx member char[] size(s) have changed! - #elif defined __UT_LINESIZE \ - && ((__UT_LINESIZE != 32) || (__UT_NAMESIZE != 64) || (__UT_HOSTSIZE != 256)) --#error struct utmp member char[] size(s) have changed! -+#error struct utmpx member char[] size(s) have changed! - #endif - - #if EMPTY != 0 || RUN_LVL != 1 || BOOT_TIME != 2 || NEW_TIME != 3 || \ - OLD_TIME != 4 --#error Values for the ut_type field of struct utmp changed -+#error Values for the ut_type field of struct utmpx changed - #endif - - int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; - int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) - { -- struct utmp ut; -+ struct utmpx ut; - int n, file = STDIN_FILENO; - time_t t_tmp; - off_t pos; -diff --git a/miscutils/last_fancy.c b/miscutils/last_fancy.c -index 16ed9e9..8194e31 100644 ---- a/miscutils/last_fancy.c -+++ b/miscutils/last_fancy.c -@@ -22,6 +22,10 @@ - #define HEADER_LINE_WIDE "USER", "TTY", \ - INET6_ADDRSTRLEN, INET6_ADDRSTRLEN, "HOST", "LOGIN", " TIME", "" - -+#if !defined __UT_LINESIZE && defined UT_LINESIZE -+# define __UT_LINESIZE UT_LINESIZE -+#endif -+ - enum { - NORMAL, - LOGGED, -@@ -39,7 +43,7 @@ enum { - - #define show_wide (option_mask32 & LAST_OPT_W) - --static void show_entry(struct utmp *ut, int state, time_t dur_secs) -+static void show_entry(struct utmpx *ut, int state, time_t dur_secs) - { - unsigned days, hours, mins; - char duration[sizeof("(%u+02:02)") + sizeof(int)*3]; -@@ -104,7 +108,7 @@ static void show_entry(struct utmp *ut, int state, time_t dur_secs) - duration_str); - } - --static int get_ut_type(struct utmp *ut) -+static int get_ut_type(struct utmpx *ut) - { - if (ut->ut_line[0] == '~') { - if (strcmp(ut->ut_user, "shutdown") == 0) { -@@ -142,7 +146,7 @@ static int get_ut_type(struct utmp *ut) - return ut->ut_type; - } - --static int is_runlevel_shutdown(struct utmp *ut) -+static int is_runlevel_shutdown(struct utmpx *ut) - { - if (((ut->ut_pid & 255) == '0') || ((ut->ut_pid & 255) == '6')) { - return 1; -@@ -154,7 +158,7 @@ static int is_runlevel_shutdown(struct utmp *ut) - int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; - int last_main(int argc UNUSED_PARAM, char **argv) - { -- struct utmp ut; -+ struct utmpx ut; - const char *filename = _PATH_WTMP; - llist_t *zlist; - off_t pos; -@@ -242,9 +246,9 @@ int last_main(int argc UNUSED_PARAM, char **argv) - { - llist_t *el, *next; - for (el = zlist; el; el = next) { -- struct utmp *up = (struct utmp *)el->data; -+ struct utmpx *up = (struct utmpx *)el->data; - next = el->link; -- if (strncmp(up->ut_line, ut.ut_line, UT_LINESIZE) == 0) { -+ if (strncmp(up->ut_line, ut.ut_line, __UT_LINESIZE) == 0) { - if (show) { - show_entry(&ut, NORMAL, up->ut_tv.tv_sec); - show = 0; -diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c -index 76231df..8558db8 100644 ---- a/miscutils/runlevel.c -+++ b/miscutils/runlevel.c -@@ -29,19 +29,19 @@ - int runlevel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; - int runlevel_main(int argc UNUSED_PARAM, char **argv) - { -- struct utmp *ut; -+ struct utmpx *ut; - char prev; - -- if (argv[1]) utmpname(argv[1]); -+ if (argv[1]) utmpxname(argv[1]); - -- setutent(); -- while ((ut = getutent()) != NULL) { -+ setutxent(); -+ while ((ut = getutxent()) != NULL) { - if (ut->ut_type == RUN_LVL) { - prev = ut->ut_pid / 256; - if (prev == 0) prev = 'N'; - printf("%c %c\n", prev, ut->ut_pid % 256); - if (ENABLE_FEATURE_CLEAN_UP) -- endutent(); -+ endutxent(); - return 0; - } - } -@@ -49,6 +49,6 @@ int runlevel_main(int argc UNUSED_PARAM, char **argv) - puts("unknown"); - - if (ENABLE_FEATURE_CLEAN_UP) -- endutent(); -+ endutxent(); - return 1; - } -diff --git a/miscutils/wall.c b/miscutils/wall.c -index bb709ee..50658f4 100644 ---- a/miscutils/wall.c -+++ b/miscutils/wall.c -@@ -32,7 +32,7 @@ - int wall_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; - int wall_main(int argc UNUSED_PARAM, char **argv) - { -- struct utmp *ut; -+ struct utmpx *ut; - char *msg; - int fd; - -@@ -46,8 +46,8 @@ int wall_main(int argc UNUSED_PARAM, char **argv) - msg = xmalloc_read(fd, NULL); - if (ENABLE_FEATURE_CLEAN_UP && argv[1]) - close(fd); -- setutent(); -- while ((ut = getutent()) != NULL) { -+ setutxent(); -+ while ((ut = getutxent()) != NULL) { - char *line; - if (ut->ut_type != USER_PROCESS) - continue; -@@ -56,7 +56,7 @@ int wall_main(int argc UNUSED_PARAM, char **argv) - free(line); - } - if (ENABLE_FEATURE_CLEAN_UP) { -- endutent(); -+ endutxent(); - free(msg); - } - return EXIT_SUCCESS; -diff --git a/procps/uptime.c b/procps/uptime.c -index 778812a..149bae6 100644 ---- a/procps/uptime.c -+++ b/procps/uptime.c -@@ -81,10 +81,10 @@ int uptime_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) - - #if ENABLE_FEATURE_UPTIME_UTMP_SUPPORT - { -- struct utmp *ut; -+ struct utmpx *ut; - unsigned users = 0; -- while ((ut = getutent()) != NULL) { -- if ((ut->ut_type == USER_PROCESS) && (ut->ut_name[0] != '\0')) -+ while ((ut = getutxent()) != NULL) { -+ if ((ut->ut_type == USER_PROCESS) && (ut->ut_user[0] != '\0')) - users++; - } - printf(", %u users", users); --- -2.5.1 -
meta/recipes-core/busybox/busybox/0001-chown-fix-help-text.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From d291c2fdd5cb8616605c67ecbfb04274fa094242 Mon Sep 17 00:00:00 2001 -From: Junling Zheng <[email protected]> -Date: Sun, 7 Jun 2015 02:32:23 +0200 -Subject: [PATCH] chown: fix help text - -Derived from: -http://git.busybox.net/busybox/commit/?id=d291c2fdd5cb8616605c67ecbfb04274fa094242. - -Only when DESKTOP is enabled, chown has -L, -H and -P options. - -Upstream-Status: Backport - -Signed-off-by: Junling Zheng <[email protected]> -Signed-off-by: Denys Vlasenko <[email protected]> ---- - coreutils/chown.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/coreutils/chown.c b/coreutils/chown.c -index cb07bbc..679c0d8 100644 ---- a/coreutils/chown.c -+++ b/coreutils/chown.c -@@ -11,7 +11,7 @@ - /* http://www.opengroup.org/onlinepubs/007904975/utilities/chown.html */ - - //usage:#define chown_trivial_usage --//usage: "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..." -+//usage: "[-Rh"IF_DESKTOP("LHPcvf")"]... OWNER[<.|:>[GROUP]] FILE..." - //usage:#define chown_full_usage "\n\n" - //usage: "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" - //usage: "\n -R Recurse" --- -1.8.3.4 -
meta/recipes-core/busybox/busybox/0001-ifconfig-fix-double-free-fatal-error-in-INET_sprint.patch deleted +0 -67
67 lines not on this page · raw message
meta/recipes-core/busybox/busybox/defconfig +19 -4
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Busybox version: 1.23.2 -# Thu Jul 30 11:00:00 2015 +# Busybox version: 1.24.1 +# Tue Oct 31 11:00:00 2015 # CONFIG_HAVE_DOT_CONFIG=y
@@ -64,9 +64,9 @@ CONFIG_FEATURE_HAVE_RPC=y # CONFIG_FEATURE_INDIVIDUAL is not set # CONFIG_FEATURE_SHARED_BUSYBOX is not set CONFIG_LFS=y -# CONFIG_CROSS_COMPILER_PREFIX is not set +CONFIG_CROSS_COMPILER_PREFIX="" CONFIG_SYSROOT="" -# CONFIG_EXTRA_CFLAGS is not set +CONFIG_EXTRA_CFLAGS="" CONFIG_EXTRA_LDFLAGS="" CONFIG_EXTRA_LDLIBS=""
@@ -156,6 +156,7 @@ CONFIG_CPIO=y CONFIG_GZIP=y # CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set CONFIG_GZIP_FAST=0 +# CONFIG_FEATURE_GZIP_LEVELS is not set # CONFIG_LZOP is not set # CONFIG_LZOP_COMPR_HIGH is not set # CONFIG_RPM is not set
@@ -187,11 +188,13 @@ CONFIG_DD=y CONFIG_FEATURE_DD_SIGNAL_HANDLING=y # CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set # CONFIG_FEATURE_DD_IBS_OBS is not set +# CONFIG_FEATURE_DD_STATUS is not set # CONFIG_HOSTID is not set CONFIG_ID=y CONFIG_GROUPS=y CONFIG_SHUF=y CONFIG_SYNC=y +# CONFIG_FEATURE_SYNC_FANCY is not set CONFIG_TEST=y CONFIG_FEATURE_TEST_64=y CONFIG_TOUCH=y
@@ -200,6 +203,7 @@ CONFIG_FEATURE_TOUCH_SUSV3=y CONFIG_TR=y CONFIG_FEATURE_TR_CLASSES=y # CONFIG_FEATURE_TR_EQUIV is not set +# CONFIG_TRUNCATE is not set CONFIG_UNLINK=y # CONFIG_BASE64 is not set CONFIG_WHO=y
@@ -292,6 +296,7 @@ CONFIG_TEE=y CONFIG_TRUE=y CONFIG_TTY=y CONFIG_UNAME=y +CONFIG_UNAME_OSNAME="GNU/Linux" # CONFIG_UNEXPAND is not set # CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set CONFIG_UNIQ=y
@@ -562,7 +567,9 @@ CONFIG_FEATURE_MOUNT_NFS=y # CONFIG_FEATURE_MOUNT_CIFS is not set CONFIG_FEATURE_MOUNT_FLAGS=y CONFIG_FEATURE_MOUNT_FSTAB=y +# CONFIG_FEATURE_MOUNT_OTHERTAB is not set # CONFIG_REV is not set +# CONFIG_UEVENT is not set # CONFIG_ACPID is not set # CONFIG_FEATURE_ACPID_COMPAT is not set # CONFIG_BLKID is not set
@@ -660,10 +667,15 @@ CONFIG_FEATURE_MOUNT_LOOP_CREATE=y # CONFIG_FEATURE_CROND_D is not set # CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set CONFIG_FEATURE_CROND_DIR="" +# CONFIG_I2CGET is not set +# CONFIG_I2CSET is not set +# CONFIG_I2CDUMP is not set +# CONFIG_I2CDETECT is not set CONFIG_LESS=y CONFIG_FEATURE_LESS_MAXLINES=9999999 CONFIG_FEATURE_LESS_BRACKETS=y CONFIG_FEATURE_LESS_FLAGS=y +# CONFIG_FEATURE_LESS_TRUNCATE is not set # CONFIG_FEATURE_LESS_MARKS is not set # CONFIG_FEATURE_LESS_REGEXP is not set # CONFIG_FEATURE_LESS_WINCH is not set
@@ -763,6 +775,8 @@ CONFIG_FEATURE_WGET_STATUSBAR=y CONFIG_FEATURE_WGET_AUTHENTICATION=y CONFIG_FEATURE_WGET_LONG_OPTIONS=y CONFIG_FEATURE_WGET_TIMEOUT=y +# CONFIG_FEATURE_WGET_OPENSSL is not set +# CONFIG_FEATURE_WGET_SSL_HELPER is not set # CONFIG_WHOIS is not set CONFIG_FEATURE_IPV6=y # CONFIG_FEATURE_UNIX_LOCAL is not set
@@ -824,6 +838,7 @@ CONFIG_IP=y CONFIG_FEATURE_IP_ADDRESS=y CONFIG_FEATURE_IP_LINK=y CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2" CONFIG_FEATURE_IP_TUNNEL=y # CONFIG_FEATURE_IP_RULE is not set # CONFIG_FEATURE_IP_SHORT_FORMS is not set
meta/recipes-core/busybox/busybox_1.23.2.bb deleted +0 -45
45 lines not on this page · raw message
meta/recipes-core/busybox/busybox_1.24.1.bb new file +42 -0
42 lines not on this page · raw message
meta/recipes-core/busybox/busybox_git.bb +4 -4
@@ -1,8 +1,8 @@ require busybox.inc -SRCREV = "be947c4d97c0dacb703a6f24dd813ff6dd3a33b6" +SRCREV = "966423d4034067f52b419570a1016d1dfc4aeacd" # Lookout for PV bump too when SRCREV is changed -PV = "1.23.2+git${SRCPV}" +PV = "1.25.0+git${SRCPV}" S = "${WORKDIR}/git"
@@ -36,8 +36,8 @@ SRC_URI = "git://busybox.net/busybox.git \ file://login-utilities.cfg \ file://recognize_connmand.patch \ file://busybox-cross-menuconfig.patch \ - file://0001-ifconfig-fix-double-free-fatal-error-in-INET_sprint.patch \ - file://0001-chown-fix-help-text.patch \ + file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \ + file://0002-Passthrough-r-to-linker.patch \ file://mount-via-label.cfg \ file://sha1sum.cfg \ file://sha256sum.cfg \
Signature · 1 line
1.9.1
PATCH 10/11 busybox: disable support for mounting NFS file systems on Linux < 2.6.23
In reply to Andre McCurdyThe busybox CONFIG_FEATURE_MOUNT_NFS config option is described as:
Enable mounting of NFS file systems on Linux kernels prior to version 2.6.23. Note that in this case mounting of NFS over IPv6 will not be possible.
Since OE-core sets OLDEST_KERNEL = "2.6.32", CONFIG_FEATURE_MOUNT_NFS is not required in the default busybox defconfig.
--- meta/recipes-core/busybox/busybox/defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/busybox/busybox/defconfig +2 -2
@@ -52,7 +52,7 @@ CONFIG_FEATURE_SUID_CONFIG_QUIET=y # CONFIG_FEATURE_PREFER_APPLETS is not set CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" CONFIG_FEATURE_SYSLOG=y -CONFIG_FEATURE_HAVE_RPC=y +# CONFIG_FEATURE_HAVE_RPC is not set # # Build Options
@@ -563,7 +563,7 @@ CONFIG_MOUNT=y # CONFIG_FEATURE_MOUNT_VERBOSE is not set # CONFIG_FEATURE_MOUNT_HELPERS is not set # CONFIG_FEATURE_MOUNT_LABEL is not set -CONFIG_FEATURE_MOUNT_NFS=y +# CONFIG_FEATURE_MOUNT_NFS is not set # CONFIG_FEATURE_MOUNT_CIFS is not set CONFIG_FEATURE_MOUNT_FLAGS=y CONFIG_FEATURE_MOUNT_FSTAB=y
Signature · 1 line
1.9.1
PATCH 11/11 busybox: enable resize applet
In reply to Andre McCurdyThe /etc/profile script contains a call to resize, which improves the usability of shells run on the serial console.
http://git.openembedded.org/openembedded-core/commit/?id=cc6360f4c4d97e0000f9d3545f381224ee99ce7d
Unfortunately the resize applet is not currently enabled in busybox defconfig, so resize is never called. Fix that.
--- meta/recipes-core/busybox/busybox/resize.cfg | 2 ++ meta/recipes-core/busybox/busybox_1.24.1.bb | 1 + meta/recipes-core/busybox/busybox_git.bb | 1 + 3 files changed, 4 insertions(+) create mode 100644 meta/recipes-core/busybox/busybox/resize.cfg
meta/recipes-core/busybox/busybox/resize.cfg new file +2 -0
@@ -0,0 +1,2 @@ +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y
meta/recipes-core/busybox/busybox_1.24.1.bb +1 -0
@@ -36,6 +36,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://sha1sum.cfg \ file://sha256sum.cfg \ file://getopts.cfg \ + file://resize.cfg \ " SRC_URI[tarball.md5sum] = "be98a40cadf84ce2d6b05fa41a275c6a"
meta/recipes-core/busybox/busybox_git.bb +1 -0
@@ -42,6 +42,7 @@ SRC_URI = "git://busybox.net/busybox.git \ file://sha1sum.cfg \ file://sha256sum.cfg \ file://getopts.cfg \ + file://resize.cfg \ " DEFAULT_PREFERENCE = "-1"
Signature · 1 line
1.9.1
Quoted 4 lines · Andre McCurdy
Andre McCurdy (11):
busybox_git: Enable getopt applet
busybox.inc: don't exportEXTRA_OEMAKE
busybox: moveEXTRA_OEMAKEetc into busybox.inc
Quoted 8 lines
busybox.inc: explicitly include CC=${CC} on make command line busybox.inc: don't set .config
CROSS_COMPILER_PREFIXbusybox.inc: fixCONFIG_EXTRA_CFLAGSconfigmangle busybox.inc: remove MAKEFLAGS over-ride fromEXTRA_OEMAKE
busybox: re-order defconfig to align with busybox 1.24.1
busybox: update 1.23.2 -> 1.24.1
busybox: disable support for mounting NFS file systems on Linux < 2.6.23
busybox: enable resize applet
I'm planning to refresh these patches one more time to remove "-e" from EXTRA_OEMAKE.
Is there anything else which needs fixing or dropping before these patches are suitable for merging to master?
Quoted 20 lines
meta/recipes-core/busybox/busybox.inc | 20 +- .../busybox/0001-Switch-to-POSIX-utmpx-API.patch | 388 --------------------- .../busybox/busybox/0001-chown-fix-help-text.patch | 34 -- ...ix-double-free-fatal-error-in-INET_sprint.patch | 67 ---- meta/recipes-core/busybox/busybox/defconfig | 63 ++-- meta/recipes-core/busybox/busybox/resize.cfg | 2 + meta/recipes-core/busybox/busybox_1.23.2.bb | 53 --- meta/recipes-core/busybox/busybox_1.24.1.bb | 43 +++ meta/recipes-core/busybox/busybox_git.bb | 18 +- 9 files changed, 105 insertions(+), 583 deletions(-) delete mode 100644 meta/recipes-core/busybox/busybox/0001-Switch-to-POSIX-utmpx-API.patch delete mode 100644 meta/recipes-core/busybox/busybox/0001-chown-fix-help-text.patch delete mode 100644 meta/recipes-core/busybox/busybox/0001-ifconfig-fix-double-free-fatal-error-in-INET_sprint.patch create mode 100644 meta/recipes-core/busybox/busybox/resize.cfg delete mode 100644 meta/recipes-core/busybox/busybox_1.23.2.bb create mode 100644 meta/recipes-core/busybox/busybox_1.24.1.bb--
1.9.1
Hi Andre,
Quoted 5 lines · Andre McCurdy
I'm planning to refresh these patches one more time to remove "-e" from
EXTRA_OEMAKE.Is there anything else which needs fixing or dropping before these patches are suitable for merging to master?
I've not punished your patches on the autobuilder, but they look fine. I'll wait for a V2 before testing them.
Cheers,
Ross