Update recipes-core patches
cover Update recipes-core patches
I'm digging through Fedora, Wind River Linux and other sources looking for patches that Poky does not have that fix bugs, add necessary enhancements, or are needed for one reason or another.
This set completes the patches for the recipe-core group.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: mhatle/wrsync
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/wrsync
Thanks,
Mark Hatle <[email protected]>
---
Mark Hatle (4):
busybox: Support DHCP refresh without restarting the interface
coreutils: Add various bug fixes
sysfsutils: Merge bug fix
util-linux: Add mount lock patch
.../busybox-udhcpc-no_deconfig.patch | 110 + meta/recipes-core/busybox/busybox.inc | 4 +- meta/recipes-core/busybox/busybox_1.17.3.bb | 4 +- meta/recipes-core/busybox/files/busybox-udhcpc | 25 + .../coreutils-6.9/coreutils-6.9-cp-i-u.patch | 118 + .../coreutils-6.9/coreutils-fix-install.patch | 99 + .../coreutils/coreutils-6.9/coreutils-i18n.patch | 4049 ++++++++++++++++++++ .../coreutils/coreutils-6.9/coreutils-ls-x.patch | 115 + .../coreutils-6.9/coreutils-overflow.patch | 17 + meta/recipes-core/coreutils/coreutils_6.9.bb | 5 + .../sysfsutils-2.0.0-class-dup.patch | 21 + meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb | 6 +- .../util-linux-ng-2.16-mount_lock_path.patch | 25 + meta/recipes-core/util-linux/util-linux_2.17.2.bb | 5 +- 14 files changed, 4597 insertions(+), 6 deletions(-) create mode 100644 meta/recipes-core/busybox/busybox-1.17.3/busybox-udhcpc-no_deconfig.patch create mode 100755 meta/recipes-core/busybox/files/busybox-udhcpc create mode 100644 meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch create mode 100644 meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch create mode 100644 meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch create mode 100644 meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch create mode 100644 meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch create mode 100644 meta/recipes-core/sysfsutils/sysfsutils-2.1.0/sysfsutils-2.0.0-class-dup.patch create mode 100644 meta/recipes-core/util-linux/util-linux-2.17.2/util-linux-ng-2.16-mount_lock_path.patch
Signature · 1 line
1.7.3.4
PATCH 1/4 busybox: Support DHCP refresh without restarting the interface
When the kernel is started using ip=dhcp, we want a way to be able to run the udhcp client within busybox and not reset the interface.
When using the '-D' option to udhcpc, the defconfig script will be skipped allowing the refresh without changing the network settings.
Also provide an initscript that can be used to detect ip=dhcp on the kernel command line, if detected it will refresh the lease and set the proper resolve.conf and related files, but not reset the interface.
Original code in Wind River Linux by Greg Moffatt <[email protected]>
--- .../busybox-udhcpc-no_deconfig.patch | 110 ++++++++++++++++++++ meta/recipes-core/busybox/busybox.inc | 4 +- meta/recipes-core/busybox/busybox_1.17.3.bb | 4 +- meta/recipes-core/busybox/files/busybox-udhcpc | 25 +++++ 4 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-core/busybox/busybox-1.17.3/busybox-udhcpc-no_deconfig.patch create mode 100755 meta/recipes-core/busybox/files/busybox-udhcpc
meta/recipes-core/busybox/busybox-1.17.3/busybox-udhcpc-no_deconfig.patch new file +110 -0
@@ -0,0 +1,110 @@ +Add a new option -D to the udhcpc client that allows for +dhcp renewal to occur without having to down the interface +in the process. + +Signed-off-by: Greg Moffatt <[email protected]> + +Updated to latest Busybox 1.17.3 + +Signed-off-by: Mark Hatle <[email protected]> + +diff -ur busybox-1.17.3.orig/networking/udhcp/dhcpc.c busybox-1.17.3/networking/udhcp/dhcpc.c +--- busybox-1.17.3.orig/networking/udhcp/dhcpc.c ++++ busybox-1.17.3/networking/udhcp/dhcpc.c +@@ -35,6 +35,9 @@ + #endif + #include <linux/filter.h> + ++/* option whether to down the interface when reconfiguring */ ++static int allow_deconfig = 1; ++ + /* struct client_config_t client_config is in bb_common_bufsiz1 */ + + +@@ -709,7 +712,8 @@ + state = RENEW_REQUESTED; + break; + case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ +- udhcp_run_script(NULL, "deconfig"); ++ if (allow_deconfig) ++ udhcp_run_script(NULL, "deconfig"); + case REQUESTING: + case RELEASED: + change_listen_mode(LISTEN_RAW); +@@ -733,7 +737,8 @@ + bb_info_msg("Unicasting a release of %s to %s", + inet_ntoa(temp_addr), buffer); + send_release(server_addr, requested_ip); /* unicast */ +- udhcp_run_script(NULL, "deconfig"); ++ if (allow_deconfig) ++ udhcp_run_script(NULL, "deconfig"); + } + bb_info_msg("Entering released state"); + +@@ -836,6 +841,7 @@ + OPT_o = 1 << 18, + OPT_x = 1 << 19, + OPT_f = 1 << 20, ++ OPT_D = 1 << 21, + /* The rest has variable bit positions, need to be clever */ + OPTBIT_f = 20, + USE_FOR_MMU( OPTBIT_b,) +@@ -861,7 +867,7 @@ + #endif + ; + IF_LONG_OPTS(applet_long_options = udhcpc_longopts;) +- opt = getopt32(argv, "c:CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:f" ++ opt = getopt32(argv, "c:CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fD" + USE_FOR_MMU("b") + IF_FEATURE_UDHCPC_ARPING("a") + IF_FEATURE_UDHCP_PORT("P:") +@@ -950,6 +956,9 @@ + logmode |= LOGMODE_SYSLOG; + } + ++ if (opt & OPT_D) ++ allow_deconfig = 0; ++ + /* Make sure fd 0,1,2 are open */ + bb_sanitize_stdio(); + /* Equivalent of doing a fflush after every \n */ +@@ -964,7 +973,8 @@ + srand(monotonic_us()); + + state = INIT_SELECTING; +- udhcp_run_script(NULL, "deconfig"); ++ if (allow_deconfig) ++ udhcp_run_script(NULL, "deconfig"); + change_listen_mode(LISTEN_RAW); + packet_num = 0; + timeout = 0; +@@ -1100,7 +1110,8 @@ + } + /* Timed out, enter init state */ + bb_info_msg("Lease lost, entering init state"); +- udhcp_run_script(NULL, "deconfig"); ++ if (allow_deconfig) ++ udhcp_run_script(NULL, "deconfig"); + state = INIT_SELECTING; + /*timeout = 0; - already is */ + packet_num = 0; +@@ -1246,7 +1257,8 @@ + send_decline(xid, server_addr, packet.yiaddr); + + if (state != REQUESTING) +- udhcp_run_script(NULL, "deconfig"); ++ if (allow_deconfig) ++ udhcp_run_script(NULL, "deconfig"); + change_listen_mode(LISTEN_RAW); + state = INIT_SELECTING; + requested_ip = 0; +@@ -1292,7 +1304,8 @@ + bb_info_msg("Received DHCP NAK"); + udhcp_run_script(&packet, "nak"); + if (state != REQUESTING) +- udhcp_run_script(NULL, "deconfig"); ++ if (allow_deconfig) ++ udhcp_run_script(NULL, "deconfig"); + change_listen_mode(LISTEN_RAW); + sleep(3); /* avoid excessive network traffic */ + state = INIT_SELECTING;
meta/recipes-core/busybox/busybox.inc +3 -1
@@ -18,11 +18,12 @@ FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" FILES_${PN} += "${datadir}/udhcpc" +FILES_${PN} += "${sysconfdir}/init.d/busybox-udhcpc" INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd" INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" -INITSCRIPT_NAME_${PN} = "syslog" +INITSCRIPT_NAME_${PN} = "syslog busybox-udhcpc" CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${PN}" # This disables the syslog startup links in slugos (see slugos-init)
@@ -97,6 +98,7 @@ do_install () { install -d ${D}${datadir}/udhcpc install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script + install -m 0755 ${WORKDIR}/busybox-udhcpc ${D}${sysconfdir}/init.d/ fi install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
meta/recipes-core/busybox/busybox_1.17.3.bb +3 -1
@@ -1,5 +1,5 @@ require busybox.inc -PR = "r0" +PR = "r1" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://udhcpscript.patch \
@@ -9,10 +9,12 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://busybox-appletlib-dependency.patch \ file://run-parts.in.usr-bin.patch \ file://make-382-fix.patch \ + file://busybox-udhcpc-no_deconfig.patch \ file://find-touchscreen.sh \ file://busybox-cron \ file://busybox-httpd \ file://busybox-udhcpd \ + file://busybox-udhcpc \ file://default.script \ file://simple.script \ file://hwclock.sh \
meta/recipes-core/busybox/files/busybox-udhcpc new file +25 -0
@@ -0,0 +1,25 @@ +#!/bin/sh +# +# (c) 2010-2011 Wind River Systems, Inc. +# +# Busybox udhcpc init script +# +# script to start the udpchc DHCP client on boots where +# the parameter 'ip=dhcp' was included in the kernel parameters + +# ensure the required binaries are present +[ -x /sbin/udhcpc ] || exit 1 +[ -x /bin/grep ] || exit 1 +[ -x /bin/mount ] || exit 1 + +# ensure /proc is mounted +if ! mount | grep -q "/proc "; then + exit 2 +fi + +rc=0 +if grep -q -E "\bip=dhcp\b" /proc/cmdline; then + /sbin/udhcpc -D -s /usr/share/udhcpc/default.script + rc=$? +fi +exit $rc
Signature · 1 line
1.7.3.4
PATCH 2/4 coreutils: Add various bug fixes
In reply to Mark HatleAdd a number of bug fixes, mostly imported from Fedora and Wind River Linux.
cp-i-u: fix unnecessary prompting
fix-install: Fix installing to a dangling symlink
i18n: li18nux/lsb compliance
ls-x: Fix incorrect output
overflow: Fix potential overflow in who command
--- .../coreutils-6.9/coreutils-6.9-cp-i-u.patch | 118 + .../coreutils-6.9/coreutils-fix-install.patch | 99 + .../coreutils/coreutils-6.9/coreutils-i18n.patch | 4049 ++++++++++++++++++++ .../coreutils/coreutils-6.9/coreutils-ls-x.patch | 115 + .../coreutils-6.9/coreutils-overflow.patch | 17 + meta/recipes-core/coreutils/coreutils_6.9.bb | 5 + 6 files changed, 4403 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch create mode 100644 meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch create mode 100644 meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch create mode 100644 meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch create mode 100644 meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch
meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch new file +118 -0
@@ -0,0 +1,118 @@ +This patch was imported from the Fedora Core 8 coreutils-6.9-9 package. + +The package is stated as being Licensed as GPLv2+. + +Signed-off-by: Mark Hatle <[email protected]> + +---- + +When "cp -i --update old new" would do nothing because "new" is +newer than "old", cp would nonetheless prompt for whether it is +ok to overwrite "new". Then, regardless of the response (because +of the --update option), cp would do nothing. + +The following patch eliminates the unnecessary prompt in that case. + +diff --git a/src/copy.c b/src/copy.c +index b7bf73b..0e549d2 100644 +--- a/src/copy.c ++++ b/src/copy.c +@@ -1210,6 +1210,30 @@ copy_internal (char const *src_name, char const *dst_name, + return false; + } + ++ if (!S_ISDIR (src_mode) && x->update) ++ { ++ /* When preserving time stamps (but not moving within a file ++ system), don't worry if the destination time stamp is ++ less than the source merely because of time stamp ++ truncation. */ ++ int options = ((x->preserve_timestamps ++ && ! (x->move_mode ++ && dst_sb.st_dev == src_sb.st_dev)) ++ ? UTIMECMP_TRUNCATE_SOURCE ++ : 0); ++ ++ if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options)) ++ { ++ /* We're using --update and the destination is not older ++ than the source, so do not copy or move. Pretend the ++ rename succeeded, so the caller (if it's mv) doesn't ++ end up removing the source file. */ ++ if (rename_succeeded) ++ *rename_succeeded = true; ++ return true; ++ } ++ } ++ + /* When there is an existing destination file, we may end up + returning early, and hence not copying/moving the file. + This may be due to an interactive `negative' reply to the +@@ -1302,30 +1326,6 @@ copy_internal (char const *src_name, char const *dst_name, + return false; + } + } +- +- if (x->update) +- { +- /* When preserving time stamps (but not moving within a file +- system), don't worry if the destination time stamp is +- less than the source merely because of time stamp +- truncation. */ +- int options = ((x->preserve_timestamps +- && ! (x->move_mode +- && dst_sb.st_dev == src_sb.st_dev)) +- ? UTIMECMP_TRUNCATE_SOURCE +- : 0); +- +- if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options)) +- { +- /* We're using --update and the destination is not older +- than the source, so do not copy or move. Pretend the +- rename succeeded, so the caller (if it's mv) doesn't +- end up removing the source file. */ +- if (rename_succeeded) +- *rename_succeeded = true; +- return true; +- } +- } + } + + if (x->move_mode) +diff --git a/tests/mv/update b/tests/mv/update +index 0c06024..6c3d149 100755 +--- a/tests/mv/update ++++ b/tests/mv/update +@@ -1,7 +1,7 @@ + #!/bin/sh + # make sure --update works as advertised + +-# Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. ++# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc. + + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -46,11 +46,16 @@ fi + + fail=0 + +-for cp_or_mv in cp mv; do +- # This is a no-op. +- $cp_or_mv --update old new || fail=1 +- case "`cat new`" in new) ;; *) fail=1 ;; esac +- case "`cat old`" in old) ;; *) fail=1 ;; esac ++for interactive in '' -i; do ++ for cp_or_mv in cp mv; do ++ # This is a no-op, with no prompt. ++ # With coreutils-6.9 and earlier, using --update with -i would ++ # mistakenly elicit a prompt. ++ $cp_or_mv $interactive --update old new < /dev/null > out 2>&1 || fail=1 ++ test -s out && fail=1 ++ case "`cat new`" in new) ;; *) fail=1 ;; esac ++ case "`cat old`" in old) ;; *) fail=1 ;; esac ++ done + done + + # This will actually perform the rename. +-- +1.5.3.rc1.16.g9d6f
meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch new file +99 -0
99 lines not on this page · raw message
meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch new file +4049 -0
2,783 lines not on this page · raw message
meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch new file +115 -0
115 lines not on this page · raw message
meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch new file +17 -0
Lines of this file are not shown. View the raw message.
meta/recipes-core/coreutils/coreutils_6.9.bb +5 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.3.4
Part of the diff is not shown here. View the raw message.
PATCH 3/4 sysfsutils: Merge bug fix
In reply to Mark HatleMerge a small bug fix located in the Fedora Core 9 version of this package.
--- .../sysfsutils-2.0.0-class-dup.patch | 21 ++++++++++++++++++++ meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb | 6 +++- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-core/sysfsutils/sysfsutils-2.1.0/sysfsutils-2.0.0-class-dup.patch
meta/recipes-core/sysfsutils/sysfsutils-2.1.0/sysfsutils-2.0.0-class-dup.patch new file +21 -0
@@ -0,0 +1,21 @@ +This patch is from the Fedora Core 9 sysfsutils-2.1.0-3.fc9 package. + +It fixes a problem in the upstream package where not all devices +will be returned by the function. + +The package License indicates this is GPLv2 licensed. + +Signed-off-by: Mark Hatle <[email protected]> + +diff -puN lib/sysfs_class.c~sysfsutils_class_dup lib/sysfs_class.c +--- sysfsutils-2.1.0/lib/sysfs_class.c~sysfsutils_class_dup 2006-09-07 17:01:26.000000000 -0500 ++++ sysfsutils-2.1.0-bjking1/lib/sysfs_class.c 2006-09-07 17:01:26.000000000 -0500 +@@ -66,7 +66,7 @@ static int cdev_name_equal(void *a, void + return 0; + + if (strncmp((char *)a, ((struct sysfs_class_device *)b)->name, +- strlen((char *)a)) == 0) ++ SYSFS_NAME_LEN) == 0) + return 1; + + return 0;
meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb +4 -2
@@ -8,9 +8,11 @@ LICENSE_libsysfs = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=3d06403ea54c7574a9e581c6478cc393 \ file://cmd/GPL;md5=d41d4e2e1e108554e0388ea4aecd8d27 \ file://lib/LGPL;md5=b75d069791103ffe1c0d6435deeff72e" -PR = "r0" +PR = "r1" -SRC_URI = "${SOURCEFORGE_MIRROR}/linux-diag/sysfsutils-${PV}.tar.gz" +SRC_URI = "${SOURCEFORGE_MIRROR}/linux-diag/sysfsutils-${PV}.tar.gz \ + file://sysfsutils-2.0.0-class-dup.patch \ + " SRC_URI[md5sum] = "14e7dcd0436d2f49aa403f67e1ef7ddc" SRC_URI[sha256sum] = "e865de2c1f559fff0d3fc936e660c0efaf7afe662064f2fb97ccad1ec28d208a"
Signature · 1 line
1.7.3.4
PATCH 4/4 util-linux: Add mount lock patch
In reply to Mark HatleAdd the mount lock patch that moves the lock file from the potentially R/O /etc, to the R/W /var/lock directory.
This resolves a problem when mounting when / (and /etc) is mounted R/O.
--- .../util-linux-ng-2.16-mount_lock_path.patch | 25 ++++++++++++++++++++ meta/recipes-core/util-linux/util-linux_2.17.2.bb | 5 ++- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-core/util-linux/util-linux-2.17.2/util-linux-ng-2.16-mount_lock_path.patch
meta/recipes-core/util-linux/util-linux-2.17.2/util-linux-ng-2.16-mount_lock_path.patch new file +25 -0
@@ -0,0 +1,25 @@ +The FHS indicates that /etc must be capable of being mounted R/O. + +The FHS also indicates that lock files belong in /var/lock, and /var must +be R/W as soon as possible during boot. + +This patch moves the mtab lock file from the potentially R/O /etc, to the +R/W /var/lock area. This lock file is used when mounting disks and making +other mount adjustments. The _PATH_MOUNTED_TMP is not adjusted, as failing +to write to this file does not cause any functional limitations. + +(Note, if /etc is R/O, then /etc/mtab should be a symlink to /proc/mounts) + +Signed-off-by: Mark Hatle <[email protected]> + +--- util-linux-ng-2.16/include/pathnames.h.orig ++++ util-linux-ng-2.16/include/pathnames.h +@@ -90,7 +90,7 @@ + # endif + #endif + +-#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~" ++#define _PATH_MOUNTED_LOCK "/var/lock/mtab~" + #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp" + + #ifndef _PATH_DEV
meta/recipes-core/util-linux/util-linux_2.17.2.bb +3 -2
@@ -1,9 +1,10 @@ MAJOR_VERSION = "2.17" require util-linux.inc -PR = "r4" +PR = "r5" SRC_URI += "file://uclibc-compile.patch \ - file://util-linux-ng-replace-siginterrupt.patch" + file://util-linux-ng-replace-siginterrupt.patch \ + file://util-linux-ng-2.16-mount_lock_path.patch" SRC_URI[md5sum] = "4635725a3eef1c57090bac8ea5e082e6" SRC_URI[sha256sum] = "c9ae801b6a5ab20b7749a278a8bf6830ef53adc5e8b7eb0ac1a9f410c774118f"
Signature · 1 line
1.7.3.4