Bump buildroot to 2019.02

This commit is contained in:
2019-03-28 22:49:48 +01:00
parent 5598b1b762
commit 920d307141
5121 changed files with 78550 additions and 46132 deletions

View File

@@ -1,38 +0,0 @@
From a9e4662d26b10789b28282d7e77ab189ef34cf5c Mon Sep 17 00:00:00 2001
From: Carlos Santos <casantos@datacom.ind.br>
Date: Sun, 14 Jan 2018 16:39:31 -0200
Subject: [PATCH] docs: add ISC licence
Save the top 21 lines of sys-utils/rfkill.c as COPYING.ISC. This is
useful for Linux distributions an integration tools like Buildroot,
to collect detailed legal information for each package.
[kzak@redhat.com: - remove C-comments and rfkill header]
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Signed-off-by: Karel Zak <kzak@redhat.com>
---
Documentation/licenses/COPYING.ISC | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 Documentation/licenses/COPYING.ISC
diff --git a/Documentation/licenses/COPYING.ISC b/Documentation/licenses/COPYING.ISC
new file mode 100644
index 000000000..8351a30e3
--- /dev/null
+++ b/Documentation/licenses/COPYING.ISC
@@ -0,0 +1,11 @@
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--
2.14.3

View File

@@ -0,0 +1,86 @@
From e1686b25acdedb34cc357f08f0dd3ca01c559dfd Mon Sep 17 00:00:00 2001
From: Justin Chen <justinpopo6@gmail.com>
Date: Thu, 1 Nov 2018 11:10:38 -0700
Subject: [PATCH] rtcwake: use poweroff if shutdown is not found
Some systems do not have the shutdown command. Use poweroff as an
alternative.
Signed-off-by: Justin Chen <justinpopo6@gmail.com>
---
include/pathnames.h | 1 +
sys-utils/rtcwake.c | 39 +++++++++++++++++++++++++++------------
2 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/include/pathnames.h b/include/pathnames.h
index 3d5052e6f..ed8ea330d 100644
--- a/include/pathnames.h
+++ b/include/pathnames.h
@@ -53,6 +53,7 @@
# define _PATH_LOGIN "/bin/login"
#endif
#define _PATH_SHUTDOWN "/sbin/shutdown"
+#define _PATH_POWEROFF "/sbin/poweroff"
#define _PATH_TERMCOLORS_DIRNAME "terminal-colors.d"
#define _PATH_TERMCOLORS_DIR "/etc/" _PATH_TERMCOLORS_DIRNAME
diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c
index b63c64627..029f00f9b 100644
--- a/sys-utils/rtcwake.c
+++ b/sys-utils/rtcwake.c
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
+#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <termios.h>
@@ -582,18 +583,32 @@ int main(int argc, char **argv)
char *arg[5];
int i = 0;
- if (ctl.verbose)
- printf(_("suspend mode: off; executing %s\n"),
- _PATH_SHUTDOWN);
- arg[i++] = _PATH_SHUTDOWN;
- arg[i++] = "-h";
- arg[i++] = "-P";
- arg[i++] = "now";
- arg[i] = NULL;
- if (!ctl.dryrun) {
- execv(arg[0], arg);
- warn(_("failed to execute %s"), _PATH_SHUTDOWN);
- rc = EXIT_FAILURE;
+ if (!access(_PATH_SHUTDOWN, X_OK)) {
+ arg[i++] = _PATH_SHUTDOWN;
+ arg[i++] = "-h";
+ arg[i++] = "-P";
+ arg[i++] = "now";
+ arg[i] = NULL;
+ } else if (!access(_PATH_POWEROFF, X_OK)) {
+ arg[i++] = _PATH_POWEROFF;
+ arg[i] = NULL;
+ } else {
+ arg[i] = NULL;
+ }
+
+ if (arg[0]) {
+ if (ctl.verbose)
+ printf(_("suspend mode: off; executing %s\n"),
+ arg[0]);
+ if (!ctl.dryrun) {
+ execv(arg[0], arg);
+ warn(_("failed to execute %s"), arg[0]);
+ rc = EX_EXEC_ENOENT;
+ }
+ } else {
+ /* Failed to find shutdown command */
+ warn(_("failed to find shutdown command"));
+ rc = EX_EXEC_ENOENT;
}
break;
}
--
2.17.1

View File

@@ -0,0 +1,26 @@
From 73c5a3cc748b853936319e6cdc94159a6974db52 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Wed, 7 Nov 2018 13:55:06 +0100
Subject: [PATCH] agetty: fix output of escaped characters
Signed-off-by: Christian Hesse <mail@eworm.de>
---
term-utils/agetty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 05a269abb..b9f08728e 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -2755,7 +2755,7 @@ static void output_special_char(struct issue *ie,
break;
}
default:
- putchar(c);
+ putc(c, ie->output);
break;
}
}
--
2.17.1

View File

@@ -1,52 +0,0 @@
From a9cf659e0508c1f56813a7d74c64f67bbc962538 Mon Sep 17 00:00:00 2001
From: Carlo Caione <carlo@endlessm.com>
Date: Mon, 19 Mar 2018 10:31:07 +0000
Subject: [PATCH] lib/randutils: Do not block on getrandom()
In Endless we have hit a problem when using 'sfdisk' on the really first
boot to automatically expand the rootfs partition. On this platform
'sfdisk' is blocking on getrandom() because not enough random bytes are
available. This is an ARM platform without a hwrng.
We fix this passing GRND_NONBLOCK to getrandom(). 'sfdisk' will use the
best entropy it has available and fallback only as necessary.
Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
lib/randutils.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/randutils.c b/lib/randutils.c
index e1c4059e1..02c3d9eb0 100644
--- a/lib/randutils.c
+++ b/lib/randutils.c
@@ -36,6 +36,8 @@
#if !defined(HAVE_GETRANDOM) && defined(SYS_getrandom)
/* libc without function, but we have syscal */
+#define GRND_NONBLOCK 0x01
+#define GRND_RANDOM 0x02
static int getrandom(void *buf, size_t buflen, unsigned int flags)
{
return (syscall(SYS_getrandom, buf, buflen, flags));
@@ -104,13 +106,15 @@ void random_get_bytes(void *buf, size_t nbytes)
int x;
errno = 0;
- x = getrandom(cp, n, 0);
+ x = getrandom(cp, n, GRND_NONBLOCK);
if (x > 0) { /* success */
n -= x;
cp += x;
lose_counter = 0;
} else if (errno == ENOSYS) /* kernel without getrandom() */
break;
+ else if (errno == EAGAIN)
+ break;
else if (lose_counter++ > 16) /* entropy problem? */
break;
}
--
2.11.0

View File

@@ -1,71 +0,0 @@
From edc1c90cb972fdca1f66be5a8e2b0706bd2a4949 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Tue, 20 Mar 2018 14:17:24 +0100
Subject: [PATCH] lib/randutils: don't break on EAGAIN, use usleep()
The current code uses lose_counter to make more attempts to read
random numbers. It seems better to wait a moment between attempts to
avoid busy loop (we do the same in all-io.h).
The worst case is 1 second delay for all random_get_bytes() on systems
with uninitialized entropy pool -- for example you call sfdisk (MBR Id
or GPT UUIDs) on very first boot, etc. In this case it will use libc
rand() as a fallback solution.
Note that we do not use random numbers for security sensitive things
like keys or so. It's used for random based UUIDs etc.
Addresses: https://github.com/karelzak/util-linux/pull/603
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
lib/randutils.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/lib/randutils.c b/lib/randutils.c
index 02c3d9eb0..de4279530 100644
--- a/lib/randutils.c
+++ b/lib/randutils.c
@@ -95,6 +95,9 @@ int random_get_fd(void)
* Use /dev/urandom if possible, and if not,
* use glibc pseudo-random functions.
*/
+#define UL_RAND_READ_ATTEMPTS 8
+#define UL_RAND_READ_DELAY 125000 /* microseconds */
+
void random_get_bytes(void *buf, size_t nbytes)
{
unsigned char *cp = (unsigned char *)buf;
@@ -111,11 +114,14 @@ void random_get_bytes(void *buf, size_t nbytes)
n -= x;
cp += x;
lose_counter = 0;
- } else if (errno == ENOSYS) /* kernel without getrandom() */
- break;
- else if (errno == EAGAIN)
+
+ } else if (errno == ENOSYS) { /* kernel without getrandom() */
break;
- else if (lose_counter++ > 16) /* entropy problem? */
+
+ } else if (errno == EAGAIN && lose_counter < UL_RAND_READ_ATTEMPTS) {
+ xusleep(UL_RAND_READ_DELAY); /* no etropy, wait and try again */
+ lose_counter++;
+ } else
break;
}
@@ -134,8 +140,9 @@ void random_get_bytes(void *buf, size_t nbytes)
while (n > 0) {
ssize_t x = read(fd, cp, n);
if (x <= 0) {
- if (lose_counter++ > 16)
+ if (lose_counter++ > UL_RAND_READ_ATTEMPTS)
break;
+ xusleep(UL_RAND_READ_DELAY);
continue;
}
n -= x;
--
2.11.0

View File

@@ -0,0 +1,84 @@
From 3fa06e049012218d883d0e1251df86bafbc446bf Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 22 Nov 2018 11:03:35 +0100
Subject: [PATCH] setarch: fix obscure sparc32bash use-case
Reported-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Carlos Santos <casantos@datacom.com.br>
---
sys-utils/setarch.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index a733f7b3c..7c0a63fbb 100644
--- a/sys-utils/setarch.c
+++ b/sys-utils/setarch.c
@@ -268,6 +268,7 @@ int main(int argc, char *argv[])
int c;
struct arch_domain *doms, *target;
unsigned long pers_value = 0;
+ char *shell = NULL, *shell_arg = NULL;
/* Options without equivalent short options */
enum {
@@ -310,14 +311,14 @@ int main(int argc, char *argv[])
archwrapper = strcmp(program_invocation_short_name, "setarch") != 0;
if (archwrapper) {
arch = program_invocation_short_name; /* symlinks to setarch */
-#if defined(__sparc64__) || defined(__sparc__)
+
+ /* Don't use ifdef sparc here, we get "Unrecognized architecture"
+ * error message later if necessary */
if (strcmp(arch, "sparc32bash") == 0) {
- if (set_arch(arch, 0L, 0))
- err(EXIT_FAILURE, _("Failed to set personality to %s"), arch);
- execl("/bin/bash", "", NULL);
- errexec("/bin/bash");
+ shell = "/bin/bash";
+ shell_arg = "";
+ goto set_arch;
}
-#endif
} else {
if (1 < argc && *argv[1] != '-') {
arch = argv[1];
@@ -391,6 +392,7 @@ int main(int argc, char *argv[])
argc -= optind;
argv += optind;
+set_arch:
/* get execution domain (architecture) */
if (arch) {
doms = init_arch_domains();
@@ -422,17 +424,23 @@ int main(int argc, char *argv[])
if (arch)
verify_arch_domain(target, arch);
+ if (!argc) {
+ shell = "/bin/sh";
+ shell_arg = "-sh";
+ }
if (verbose) {
- printf(_("Execute command `%s'.\n"), argc ? argv[0] : "/bin/sh");
+ printf(_("Execute command `%s'.\n"), shell ? shell : argv[0]);
/* flush all output streams before exec */
fflush(NULL);
}
- if (!argc) {
- execl("/bin/sh", "-sh", NULL);
- errexec("/bin/sh");
+ /* Execute shell */
+ if (shell) {
+ execl(shell, shell_arg, NULL);
+ errexec(shell);
}
+ /* Execute on command line specified command */
execvp(argv[0], argv);
errexec(argv[0]);
}
--
2.14.5

View File

@@ -53,7 +53,7 @@ config BR2_PACKAGE_UTIL_LINUX_BINARIES
help
Install the basic set of util-linux binaries.
blkdiscard, blkid, blockdev, chcpu, col, colcrt, colrm,
blkdiscard, blkid, blockdev, chcpu, choom, col, colcrt, colrm,
column, ctrlaltdel, dmesg, fdisk, fincore, findfs, findmnt,
flock, fsfreeze, fstrim, getopt, hexdump, ipcmk, isosize,
ldattach, look, lsblk, lscpu, lsipc, lslocks, lsns, mcookie,

View File

@@ -1,9 +1,9 @@
# From https://www.kernel.org/pub/linux/utils/util-linux/v2.31/sha256sums.asc
sha256 1a51b16fa9cd51d26ef9ab52d2f1de12403b810fc8252bf7d478df91b3cddf11 util-linux-2.31.1.tar.xz
# From https://www.kernel.org/pub/linux/utils/util-linux/v2.33/sha256sums.asc
sha256 f261b9d73c35bfeeea04d26941ac47ee1df937bd3b0583e748217c1ea423658a util-linux-2.33.tar.xz
# License files, locally calculated
sha256 1e4b65802b0df8115395c697029d03339f983d451a473a08643309c684410d9a README.licensing
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Documentation/licenses/COPYING.GPLv2
sha256 ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8 Documentation/licenses/COPYING.UCB
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 Documentation/licenses/COPYING.LGPLv2.1
sha256 9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d Documentation/licenses/COPYING.BSD-3
sha256 4335620e8f478ee4dc4d26540448d39469091ef1d8e3fbbbb8bf753206ceac74 README.licensing
sha256 9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d Documentation/licenses/COPYING.BSD-3-Clause
sha256 ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8 Documentation/licenses/COPYING.BSD-4-Clause-UC
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Documentation/licenses/COPYING.GPL-2.0-or-later
sha256 e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63 Documentation/licenses/COPYING.ISC
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 Documentation/licenses/COPYING.LGPL-2.1-or-later

View File

@@ -4,22 +4,22 @@
#
################################################################################
UTIL_LINUX_VERSION_MAJOR = 2.31
UTIL_LINUX_VERSION_MINOR = 1
UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).$(UTIL_LINUX_VERSION_MINOR)
UTIL_LINUX_VERSION_MAJOR = 2.33
UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
# README.licensing claims that some files are GPL-2.0 only, but this is not true.
# Some files are GPL-3.0+ but only in tests. rfkill uses an ISC-style license.
UTIL_LINUX_LICENSE = GPL-2.0+, BSD-4-Clause, LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid) ISC (rfkill)
UTIL_LINUX_LICENSE_FILES = README.licensing Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.UCB Documentation/licenses/COPYING.LGPLv2.1 Documentation/licenses/COPYING.BSD-3 Documentation/licenses/COPYING.ISC
UTIL_LINUX_LICENSE_FILES = README.licensing \
Documentation/licenses/COPYING.BSD-3-Clause \
Documentation/licenses/COPYING.BSD-4-Clause-UC \
Documentation/licenses/COPYING.GPL-2.0-or-later \
Documentation/licenses/COPYING.ISC \
Documentation/licenses/COPYING.LGPL-2.1-or-later
UTIL_LINUX_INSTALL_STAGING = YES
UTIL_LINUX_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)
# uClibc needs NTP_LEGACY for sys/timex.h -> ntp_gettime() support
# (used in logger.c), and the common default is N.
UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no \
$(if $(BR2_TOOLCHAIN_USES_UCLIBC),ac_cv_header_sys_timex_h=no)
UTIL_LINUX_CONF_OPTS += \
--disable-rpath \
--disable-makeinstall-chown
@@ -36,12 +36,6 @@ HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
# We also don't want the host-python dependency
HOST_UTIL_LINUX_CONF_OPTS = --without-python
# If both util-linux and busybox are selected, make certain util-linux
# wins the fight over who gets to have their utils actually installed
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
UTIL_LINUX_DEPENDENCIES += busybox
endif
# Prevent the installation from attempting to move shared libraries from
# ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are
# the same when merged usr is in use.