mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-11-17 14:49:27 +00:00
* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
97 lines
3.8 KiB
Diff
97 lines
3.8 KiB
Diff
From 9fecb6ce056f25837dffac95260d5a80b9f468c0 Mon Sep 17 00:00:00 2001
|
||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||
Date: Wed, 19 Aug 2020 10:37:07 +0200
|
||
Subject: [PATCH] fix build with gcc 10
|
||
|
||
Move initialisation of global variables to main functions to fix the
|
||
following build failure with gcc 10:
|
||
|
||
/tmp/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: ./libgdbmapp.a(parseopt.o):(.bss+0x2c): multiple definition of `parseopt_program_args'; gdbm_dump.o:(.data.rel.local+0x28): first defined here
|
||
/tmp/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: ./libgdbmapp.a(parseopt.o):(.bss+0x30): multiple definition of `parseopt_program_doc'; gdbm_dump.o:(.data.rel.local+0x2c): first defined here
|
||
/tmp/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: ./libgdbmapp.a(parseopt.o):(.bss+0x2c): multiple definition of `parseopt_program_args'; gdbm_load.o:(.data.rel.local+0xa0): first defined here
|
||
/tmp/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: ./libgdbmapp.a(parseopt.o):(.bss+0x30): multiple definition of `parseopt_program_doc'; gdbm_load.o:(.data.rel.local+0xa4): first defined here
|
||
|
||
Fixes:
|
||
- http://autobuild.buildroot.org/results/d09b5368bb624df629296359a5abcdd37ba61e9e
|
||
|
||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||
[Upstream status: sent to Sergey Poznyakoff <gray@gnu.org>]
|
||
---
|
||
src/gdbm_dump.c | 5 +++--
|
||
src/gdbm_load.c | 5 +++--
|
||
src/gdbmtool.c | 5 +++--
|
||
3 files changed, 9 insertions(+), 6 deletions(-)
|
||
|
||
diff --git a/src/gdbm_dump.c b/src/gdbm_dump.c
|
||
index 82fb5af..67574ac 100644
|
||
--- a/src/gdbm_dump.c
|
||
+++ b/src/gdbm_dump.c
|
||
@@ -19,8 +19,6 @@
|
||
# include "gdbmapp.h"
|
||
# include "gdbmdefs.h"
|
||
|
||
-char *parseopt_program_doc = "dump a GDBM database to a file";
|
||
-char *parseopt_program_args = "DB_FILE [FILE]";
|
||
struct gdbm_option optab[] = {
|
||
{ 'H', "format", "binary|ascii|0|1", N_("select dump format") },
|
||
{ 0 }
|
||
@@ -36,6 +34,9 @@ main (int argc, char **argv)
|
||
char *dbname, *filename;
|
||
FILE *fp;
|
||
|
||
+ parseopt_program_doc = "dump a GDBM database to a file";
|
||
+ parseopt_program_args = "DB_FILE [FILE]";
|
||
+
|
||
#ifdef HAVE_SETLOCALE
|
||
setlocale (LC_ALL, "");
|
||
#endif
|
||
diff --git a/src/gdbm_load.c b/src/gdbm_load.c
|
||
index 2d96ada..1b2739c 100644
|
||
--- a/src/gdbm_load.c
|
||
+++ b/src/gdbm_load.c
|
||
@@ -29,8 +29,6 @@ int mode;
|
||
uid_t owner_uid;
|
||
gid_t owner_gid;
|
||
|
||
-char *parseopt_program_doc = "load a GDBM database from a file";
|
||
-char *parseopt_program_args = "FILE [DB_FILE]";
|
||
struct gdbm_option optab[] = {
|
||
{ 'r', "replace", NULL, N_("replace records in the existing database") },
|
||
{ 'm', "mode", N_("MODE"), N_("set file mode") },
|
||
@@ -100,6 +98,9 @@ main (int argc, char **argv)
|
||
int cache_size = 0;
|
||
int block_size = 0;
|
||
|
||
+ parseopt_program_doc = "load a GDBM database from a file";
|
||
+ parseopt_program_args = "FILE [DB_FILE]";
|
||
+
|
||
#ifdef HAVE_SETLOCALE
|
||
setlocale (LC_ALL, "");
|
||
#endif
|
||
diff --git a/src/gdbmtool.c b/src/gdbmtool.c
|
||
index bbadbae..69bc3b1 100644
|
||
--- a/src/gdbmtool.c
|
||
+++ b/src/gdbmtool.c
|
||
@@ -1535,8 +1535,6 @@ command_lookup (const char *str, struct locus *loc, struct command **pcmd)
|
||
return found->tok;
|
||
}
|
||
|
||
-char *parseopt_program_doc = N_("examine and/or modify a GDBM database");
|
||
-char *parseopt_program_args = N_("DBFILE [COMMAND [ARG ...]]");
|
||
|
||
enum {
|
||
OPT_LEX_TRACE = 256,
|
||
@@ -2053,6 +2051,9 @@ main (int argc, char *argv[])
|
||
char *source = NULL;
|
||
instream_t input = NULL;
|
||
|
||
+ parseopt_program_doc = N_("examine and/or modify a GDBM database");
|
||
+ parseopt_program_args = N_("DBFILE [COMMAND [ARG ...]]");
|
||
+
|
||
set_progname (argv[0]);
|
||
#if GDBM_DEBUG_ENABLE
|
||
gdbm_debug_printer = debug_printer;
|
||
--
|
||
2.27.0
|
||
|