Fix compilation of busybox 1.21.1
PATCH v2 1/1 Fix compilation of busybox 1.21.1
It seems patches previously applied on busybox 1.20.2 are also needed for version 1.21.1.
--- ...ersion_code-don-t-fail-on-Linux-version-s.patch | 46 ++++++++ ...correct-m_status-field-in-outgoing-packet.patch | 40 +++++++ .../1.21.1/busybox-1.21.1-pkg-config-selinux.patch | 67 +++++++++++ .../1.21.1/busybox-1.21.1-sys-resource.patch | 123 ++++++++++++++++++++ 4 files changed, 276 insertions(+) create mode 100644 package/busybox/1.21.1/busybox-1.21.1-get_linux_version_code-don-t-fail-on-Linux-version-s.patch create mode 100644 package/busybox/1.21.1/busybox-1.21.1-ntpd-fix-incorrect-m_status-field-in-outgoing-packet.patch create mode 100644 package/busybox/1.21.1/busybox-1.21.1-pkg-config-selinux.patch create mode 100644 package/busybox/1.21.1/busybox-1.21.1-sys-resource.patch
package/busybox/1.21.1/busybox-1.21.1-get_linux_version_code-don-t-fail-on-Linux-version-s.patch new file +46 -0
@@ -0,0 +1,46 @@ +From 556ac3633ce3e7bd51c93b78827ae3874d856257 Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter <[email protected]> +Date: Sat, 5 May 2012 17:47:23 +0200 +Subject: [PATCH] get_linux_version_code: don't fail on Linux version strints + like "3.0-foo" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Oberritter <[email protected]> +Signed-off-by: Denys Vlasenko <[email protected]> +Signed-off-by: J?r?me Pouiller <[email protected]> +--- + libbb/kernel_version.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/libbb/kernel_version.c b/libbb/kernel_version.c +index a168a1e..738ed02 100644 +--- a/libbb/kernel_version.c ++++ b/libbb/kernel_version.c +@@ -20,18 +20,15 @@ + int FAST_FUNC get_linux_version_code(void) + { + struct utsname name; +- char *s; ++ char *s, *t; + int i, r; + +- if (uname(&name) == -1) { +- bb_perror_msg("can't get system information"); +- return 0; +- } +- ++ uname(&name); /* never fails */ + s = name.release; + r = 0; + for (i = 0; i < 3; i++) { +- r = r * 256 + atoi(strtok(s, ".")); ++ t = strtok(s, "."); ++ r = r * 256 + (t ? atoi(t) : 0); + s = NULL; + } + return r; +-- +1.7.9.5 +
package/busybox/1.21.1/busybox-1.21.1-ntpd-fix-incorrect-m_status-field-in-outgoing-packet.patch new file +40 -0
@@ -0,0 +1,40 @@ +From b7841cf7b919b16d1bd4619154bf7cb4c22b4ccd Mon Sep 17 00:00:00 2001 +From: Paul Marks <[email protected]> +Date: Mon, 14 Jan 2013 02:39:10 +0100 +Subject: [PATCH] ntpd: fix incorrect m_status field in outgoing packets. + Closes 5120 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When using busybox ntpd with an NTPv3 client and NTPv4 server (or vice +versa), the version numbers can be incorrectly ORed together, yielding +the bogus value of "NTPv7". This makes ntpd unusable with clients +such as Chrony and Windows "Internet Time". + +This patch avoids the version mangling, by copying only the Leap +Indicator bits from the server's status field. + +Signed-off-by: Paul Marks <[email protected]> +Signed-off-by: Denys Vlasenko <[email protected]> +Signed-off-by: J?r?me Pouiller <[email protected]> +--- + networking/ntpd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/networking/ntpd.c b/networking/ntpd.c +index 45485c0..79b7c37 100644 +--- a/networking/ntpd.c ++++ b/networking/ntpd.c +@@ -1851,7 +1851,7 @@ recv_and_process_client_pkt(void /*int fd*/) + + /* Build a reply packet */ + memset(&msg, 0, sizeof(msg)); +- msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM; ++ msg.m_status = G.stratum < MAXSTRAT ? (G.ntp_status & LI_MASK) : LI_ALARM; + msg.m_status |= (query_status & VERSION_MASK); + msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ? + MODE_SERVER : MODE_SYM_PAS; +-- +1.7.9.5 +
package/busybox/1.21.1/busybox-1.21.1-pkg-config-selinux.patch new file +67 -0
67 lines not on this page · raw message
package/busybox/1.21.1/busybox-1.21.1-sys-resource.patch new file +123 -0
123 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 1/1 Fix compilation of busybox 1.21.1
Quoted 4 lines · On Wednesday 09 October 2013 11:15:09 J?r?me Pouiller wrote:
It seems patches previously applied on busybox 1.20.2 are also needed for version 1.21.1.
Signed-off-by J?r?me Pouiller <[email protected]>
Quoted 10 lines
--- ...ersion_code-don-t-fail-on-Linux-version-s.patch | 46 ++++++++ ...correct-m_status-field-in-outgoing-packet.patch | 40 +++++++ .../1.21.1/busybox-1.21.1-pkg-config-selinux.patch | 67 +++++++++++ .../1.21.1/busybox-1.21.1-sys-resource.patch | 123 ++++++++++++++++++++ 4 files changed, 276 insertions(+) create mode 100644 package/busybox/1.21.1/busybox-1.21.1-get_linux_version_code-don-t-fail-on-Linux-version-s.patch create mode 100644 package/busybox/1.21.1/busybox-1.21.1-ntpd-fix-incorrect-m_status-field-in-outgoing-packet.patch create mode 100644 package/busybox/1.21.1/busybox-1.21.1-pkg-config-selinux.patch create mode 100644 package/busybox/1.21.1/busybox-1.21.1-sys-resource.patch
Arg! Forget this patch. Problem was local to my workstation.
Sorry for disturbing,
Signature · 3 lines
J?r?me Pouiller, Sysmic Embedded Linux specialist http://www.sysmic.fr
PATCH v2 1/1 Fix compilation of busybox 1.21.1
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"J?r?me" == J?r?me Pouiller <[email protected]> writes:
Quoted 14 lines · J?r?me> On Wednesday 09 October 2013 11:15:09 J?r?me Pouiller wrote:
Quoted 10 lines
It seems patches previously applied on busybox 1.20.2 are also needed for version 1.21.1.
Signed-off-by J?r?me Pouiller <[email protected]>---
...ersion_code-don-t-fail-on-Linux-version-s.patch | 46 ++++++++ ...correct-m_status-field-in-outgoing-packet.patch | 40 +++++++ .../1.21.1/busybox-1.21.1-pkg-config-selinux.patch | 67 +++++++++++ .../1.21.1/busybox-1.21.1-sys-resource.patch | 123 ++++++++++++++++++++ 4 files changed, 276 insertions(+)Quoted 4 lines
create mode 100644
package/busybox/1.21.1/busybox-1.21.1-get_linux_version_code-don-t-fail-on-Linux-version-s.patchcreate mode 100644package/busybox/1.21.1/busybox-1.21.1-ntpd-fix-incorrect-m_status-field-in-outgoing-packet.patchcreate mode 100644package/busybox/1.21.1/busybox-1.21.1-pkg-config-selinux.patch
create mode 100644package/busybox/1.21.1/busybox-1.21.1-sys-resource.patch
J?r?me> Arg! Forget this patch. Problem was local to my workstation.
Ahh, ok - I was just about to ask why these patches were needed.
J?r?me> Sorry for disturbing,
No problem, I'll remove them from patchwork.
Signature · 1 line
Bye, Peter Korsgaard