Files
operating-system/buildroot/package/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch
Stefan Agner a0871be6c0 Bump buildroot to 2020.11-rc1 (#985)
* 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
2020-11-13 18:25:44 +01:00

105 lines
3.6 KiB
Diff

From 399f2c9a3acd5bd913e50a4dde52dee6527b297e Mon Sep 17 00:00:00 2001
From: Kairui Song <kasong@redhat.com>
Date: Wed, 29 Jan 2020 13:37:13 +0800
Subject: [PATCH] Remove duplicated variable definitions
When building on Fedora 32 (with GCC 10), following error is observed:
/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:2010: multiple definition of
`crash_reserved_mem_nr'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:2010: first defined here
/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:2009: multiple definition of
`crash_reserved_mem'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:2009: first defined here
/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:1278: multiple definition of
`parallel_info_t'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:1278: first defined here
/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:1265: multiple definition of
`splitting_info_t'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:1265: first defined here
...
collect2: error: ld returned 1 exit status
make: *** [Makefile:97: makedumpfile] Error 1
These variables are wrongly defined multiple times. So remove the
duplicated definitions.
Signed-off-by: Kairui Song <kasong@redhat.com>
Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
---
makedumpfile.c | 8 ++++----
makedumpfile.h | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/makedumpfile.c b/makedumpfile.c
index e290fbd..ae7336a 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -10954,7 +10954,7 @@ check_param_for_reassembling_dumpfile(int argc, char *argv[])
return FALSE;
if ((info->splitting_info
- = malloc(sizeof(splitting_info_t) * info->num_dumpfile))
+ = malloc(sizeof(struct splitting_info) * info->num_dumpfile))
== NULL) {
MSG("Can't allocate memory for splitting_info.\n");
return FALSE;
@@ -11042,7 +11042,7 @@ check_param_for_creating_dumpfile(int argc, char *argv[])
return FALSE;
}
if ((info->splitting_info
- = malloc(sizeof(splitting_info_t) * info->num_dumpfile))
+ = malloc(sizeof(struct splitting_info) * info->num_dumpfile))
== NULL) {
MSG("Can't allocate memory for splitting_info.\n");
return FALSE;
@@ -11077,13 +11077,13 @@ check_param_for_creating_dumpfile(int argc, char *argv[])
if (info->num_threads) {
if ((info->parallel_info =
- malloc(sizeof(parallel_info_t) * info->num_threads))
+ malloc(sizeof(struct parallel_info) * info->num_threads))
== NULL) {
MSG("Can't allocate memory for parallel_info.\n");
return FALSE;
}
- memset(info->parallel_info, 0, sizeof(parallel_info_t)
+ memset(info->parallel_info, 0, sizeof(struct parallel_info)
* info->num_threads);
}
diff --git a/makedumpfile.h b/makedumpfile.h
index 68d9691..7217407 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -1262,7 +1262,7 @@ struct splitting_info {
mdf_pfn_t end_pfn;
off_t offset_eraseinfo;
unsigned long size_eraseinfo;
-} splitting_info_t;
+};
struct parallel_info {
int fd_memory;
@@ -1275,7 +1275,7 @@ struct parallel_info {
#ifdef USELZO
lzo_bytep wrkmem;
#endif
-} parallel_info_t;
+};
struct ppc64_vmemmap {
unsigned long phys;
@@ -2006,8 +2006,8 @@ struct memory_range {
};
#define CRASH_RESERVED_MEM_NR 8
-struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
-int crash_reserved_mem_nr;
+extern struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
+extern int crash_reserved_mem_nr;
unsigned long read_vmcoreinfo_symbol(char *str_symbol);
int readmem(int type_addr, unsigned long long addr, void *bufptr, size_t size);
--
2.28.0