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
This commit is contained in:
Stefan Agner
2020-11-13 18:25:44 +01:00
committed by GitHub
parent 25a0dd3082
commit a0871be6c0
4024 changed files with 68095 additions and 47900 deletions

View File

@@ -1,32 +1,33 @@
From 056df008ecb8ab354191b7515199267eb6b84124 Mon Sep 17 00:00:00 2001
From: bkuhls <bkuhls@users.noreply.github.com>
Date: Mon, 6 Jul 2020 04:23:21 +0200
Subject: [PATCH] Compatibility with libmicrohttpd 0.9.71 (#199)
From cfcd8a8f73aa337e8f45d287a79cd9b8e5c51dcd Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Sun, 5 Jul 2020 11:42:23 +0200
Subject: [PATCH] Compatibility with libmicrohttpd 0.9.71
From the libmicrohttpd 0.9.71 release notes:
The release introduces an 'enum MHD_Result' instead of
Furthermore, the release introduces an 'enum MHD_Result' instead of
defines for MHD_YES/MHD_NO. This is intended to make it easier to check
for certain API misuse bugs by providing better types (not everything is
an 'int'). While this does NOT change the binary API, this change
_will_ cause compiler warnings for all legacy code -- until 'int' is
replaced with 'enum MHD_Result'.
replaced with 'enum MHD_Result'
(cherry picked from commit 51b343c6b05dd13cbde0db04984fbf392e9f6df6)
[Peter: backported to 0.17.5]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Patch sent upstream: https://github.com/etr/libhttpserver/pull/199
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
src/http_request.cpp | 6 +++---
src/httpserver/http_request.hpp | 6 +++---
src/httpserver/http_utils.hpp | 4 ++++
src/httpserver/webserver.hpp | 16 ++++++++--------
src/webserver.cpp | 24 ++++++++++++++----------
5 files changed, 32 insertions(+), 24 deletions(-)
src/httpserver/webserver.hpp | 14 +++++++-------
src/webserver.cpp | 22 +++++++++++++---------
5 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/src/http_request.cpp b/src/http_request.cpp
index 973ab33..37035b2 100644
index 5703663..be342c7 100644
--- a/src/http_request.cpp
+++ b/src/http_request.cpp
@@ -86,7 +86,7 @@ const std::string http_request::get_connection_value(const std::string& key, enu
@@ -88,7 +88,7 @@ const std::string http_request::get_connection_value(const std::string& key, enu
return header_c;
}
@@ -35,7 +36,7 @@ index 973ab33..37035b2 100644
void *cls,
enum MHD_ValueKind kind,
const char *key,
@@ -187,7 +187,7 @@ const std::string http_request::get_querystring() const
@@ -189,7 +189,7 @@ const std::string http_request::get_querystring() const
return querystring;
}
@@ -44,7 +45,7 @@ index 973ab33..37035b2 100644
void *cls,
enum MHD_ValueKind kind,
const char *key,
@@ -202,7 +202,7 @@ int http_request::build_request_args(
@@ -204,7 +204,7 @@ int http_request::build_request_args(
return MHD_YES;
}
@@ -54,12 +55,12 @@ index 973ab33..37035b2 100644
enum MHD_ValueKind kind,
const char *key,
diff --git a/src/httpserver/http_request.hpp b/src/httpserver/http_request.hpp
index 21f2176..6bd371c 100644
index 139272b..62e5275 100644
--- a/src/httpserver/http_request.hpp
+++ b/src/httpserver/http_request.hpp
@@ -304,15 +304,15 @@ class http_request
@@ -247,15 +247,15 @@ class http_request
unescaper_ptr unescaper;
unescaper_ptr unescaper = 0x0;
- static int build_request_header(void *cls, enum MHD_ValueKind kind,
+ static MHD_Result build_request_header(void *cls, enum MHD_ValueKind kind,
@@ -77,10 +78,10 @@ index 21f2176..6bd371c 100644
);
diff --git a/src/httpserver/http_utils.hpp b/src/httpserver/http_utils.hpp
index bd3df17..cf18360 100644
index 9ad89b4..a812197 100644
--- a/src/httpserver/http_utils.hpp
+++ b/src/httpserver/http_utils.hpp
@@ -39,6 +39,10 @@
@@ -53,6 +53,10 @@
#define DEFAULT_MASK_VALUE 0xFFFF
@@ -92,10 +93,10 @@ index bd3df17..cf18360 100644
typedef void(*unescaper_ptr)(std::string&);
diff --git a/src/httpserver/webserver.hpp b/src/httpserver/webserver.hpp
index 2660c70..3c915a1 100644
index 1ff472b..661b6ee 100644
--- a/src/httpserver/webserver.hpp
+++ b/src/httpserver/webserver.hpp
@@ -201,14 +201,14 @@ class webserver
@@ -195,14 +195,14 @@ class webserver
enum MHD_RequestTerminationCode toe
);
@@ -112,23 +113,17 @@ index 2660c70..3c915a1 100644
(
void *cls,
enum MHD_ValueKind kind,
@@ -225,30 +225,30 @@ class webserver
@@ -219,25 +219,25 @@ class webserver
void **con_cls, int upgrade_socket
);
- int bodyless_requests_answer(MHD_Connection* connection,
+ MHD_Result bodyless_requests_answer(MHD_Connection* connection,
const char* method, const char* version,
struct details::modded_request* mr
);
- int bodyfull_requests_answer_first_step(MHD_Connection* connection,
+ MHD_Result bodyfull_requests_answer_first_step(MHD_Connection* connection,
- int requests_answer_first_step(MHD_Connection* connection,
+ MHD_Result requests_answer_first_step(MHD_Connection* connection,
struct details::modded_request* mr
);
- int bodyfull_requests_answer_second_step(MHD_Connection* connection,
+ MHD_Result bodyfull_requests_answer_second_step(MHD_Connection* connection,
- int requests_answer_second_step(MHD_Connection* connection,
+ MHD_Result requests_answer_second_step(MHD_Connection* connection,
const char* method, const char* version, const char* upload_data,
size_t* upload_data_size, struct details::modded_request* mr
);
@@ -150,10 +145,10 @@ index 2660c70..3c915a1 100644
);
friend void error_log(void* cls, const char* fmt, va_list ap);
diff --git a/src/webserver.cpp b/src/webserver.cpp
index e71c364..ab6b530 100644
index a3104e9..3340eb0 100644
--- a/src/webserver.cpp
+++ b/src/webserver.cpp
@@ -61,6 +61,10 @@
@@ -75,6 +75,10 @@
#define SOCK_CLOEXEC 02000000
#endif
@@ -164,7 +159,7 @@ index e71c364..ab6b530 100644
using namespace std;
namespace httpserver
@@ -68,7 +72,7 @@ namespace httpserver
@@ -82,7 +86,7 @@ namespace httpserver
using namespace http;
@@ -173,8 +168,8 @@ index e71c364..ab6b530 100644
void error_log(void*, const char*, va_list);
void* uri_log(void*, const char*);
void access_log(webserver*, string);
@@ -408,7 +412,7 @@ void webserver::disallow_ip(const string& ip)
this->allowances.erase(ip);
@@ -421,7 +425,7 @@ void webserver::disallow_ip(const string& ip)
allowances.erase(ip);
}
-int policy_callback (void *cls, const struct sockaddr* addr, socklen_t addrlen)
@@ -182,7 +177,7 @@ index e71c364..ab6b530 100644
{
if(!(static_cast<webserver*>(cls))->ban_system_enabled) return MHD_YES;
@@ -455,7 +459,7 @@ size_t unescaper_func(void * cls, struct MHD_Connection *c, char *s)
@@ -468,7 +472,7 @@ size_t unescaper_func(void * cls, struct MHD_Connection *c, char *s)
return std::string(s).size();
}
@@ -191,34 +186,25 @@ index e71c364..ab6b530 100644
const char *key,
const char *filename,
const char *content_type,
@@ -509,7 +513,7 @@ const std::shared_ptr<http_response> webserver::internal_error_page(details::mod
@@ -522,7 +526,7 @@ const std::shared_ptr<http_response> webserver::internal_error_page(details::mod
}
}
-int webserver::bodyless_requests_answer(
+MHD_Result webserver::bodyless_requests_answer(
MHD_Connection* connection, const char* method,
const char* version, struct details::modded_request* mr
)
@@ -519,7 +523,7 @@ int webserver::bodyless_requests_answer(
return complete_request(connection, mr, version, method);
}
-int webserver::bodyfull_requests_answer_first_step(
+MHD_Result webserver::bodyfull_requests_answer_first_step(
-int webserver::requests_answer_first_step(
+MHD_Result webserver::requests_answer_first_step(
MHD_Connection* connection,
struct details::modded_request* mr
)
@@ -565,7 +569,7 @@ int webserver::bodyfull_requests_answer_first_step(
@@ -574,7 +578,7 @@ int webserver::requests_answer_first_step(
return MHD_YES;
}
-int webserver::bodyfull_requests_answer_second_step(
+MHD_Result webserver::bodyfull_requests_answer_second_step(
-int webserver::requests_answer_second_step(
+MHD_Result webserver::requests_answer_second_step(
MHD_Connection* connection, const char* method,
const char* version, const char* upload_data,
size_t* upload_data_size, struct details::modded_request* mr
@@ -583,7 +587,7 @@ int webserver::bodyfull_requests_answer_second_step(
@@ -597,7 +601,7 @@ int webserver::requests_answer_second_step(
return MHD_YES;
}
@@ -227,7 +213,7 @@ index e71c364..ab6b530 100644
MHD_Connection* connection,
struct details::modded_request* mr,
const char* method
@@ -717,10 +721,10 @@ int webserver::finalize_answer(
@@ -731,10 +735,10 @@ int webserver::finalize_answer(
mr->dhrs->decorate_response(raw_response);
to_ret = mr->dhrs->enqueue_response(connection, raw_response);
MHD_destroy_response(raw_response);
@@ -240,7 +226,7 @@ index e71c364..ab6b530 100644
MHD_Connection* connection,
struct details::modded_request* mr,
const char* version,
@@ -736,7 +740,7 @@ int webserver::complete_request(
@@ -750,7 +754,7 @@ int webserver::complete_request(
return finalize_answer(connection, mr, method);
}
@@ -250,5 +236,5 @@ index e71c364..ab6b530 100644
const char* version, const char* upload_data,
size_t* upload_data_size, void** con_cls
--
2.20.1
2.26.2

View File

@@ -1,27 +0,0 @@
From 2bc7cf0beb6b8a124c1c7360c4fb5279e8763f07 Mon Sep 17 00:00:00 2001
From: Sebastiano Merlino <electrictwister2000@gmail.com>
Date: Sat, 8 Jun 2019 15:36:06 -0700
Subject: [PATCH] Fix lib expectations in libhttpserver.pc.in
Signed-off-by: Stephan Hoffmann <stephan.hoffmann@ext.grandcentrix.net>
---
Patch status: upstream commit 458d16b922304006fe418897044e14
libhttpserver.pc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libhttpserver.pc.in b/libhttpserver.pc.in
index 36355ee..55f7c0e 100644
--- a/libhttpserver.pc.in
+++ b/libhttpserver.pc.in
@@ -8,6 +8,6 @@ Description: A C++ library for creating an embedded Rest HTTP server
Version: @VERSION@
Requires: libmicrohttpd >= 0.9.37
Conflicts:
-Libs: -L${libdir} -lmicrohttpd
+Libs: -L${libdir} -lhttpserver
Libs.private: @LHT_LIBDEPS@
Cflags: -I${includedir} -I${includedir}/httpserver
--
2.17.1

View File

@@ -1,5 +1,6 @@
config BR2_PACKAGE_LIBHTTPSERVER
bool "libhttpserver"
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++11 PR59526
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS
select BR2_PACKAGE_LIBMICROHTTPD
@@ -11,5 +12,6 @@ config BR2_PACKAGE_LIBHTTPSERVER
https://github.com/etr/libhttpserver
comment "libhttpserver needs a toolchain w/ C++, threads"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
comment "libhttpserver needs a toolchain w/ C++, threads, gcc >= 5"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_5

View File

@@ -1,3 +1,3 @@
# Locally computed:
sha256 778fa0aec199bf8737b2d540c2563a694c18957329f9885e372f7aaafb838351 libhttpserver-0.17.5.tar.gz
sha256 5df07007198989c622f5d41de8d703e7bef3d0e79d62e24332ee739a452af62a COPYING.LESSER
sha256 c830cb40b448a44cfc9000713aefff15d4ab1f6ebd6b47280a3cb64cb020f326 libhttpserver-0.18.1.tar.gz
sha256 5df07007198989c622f5d41de8d703e7bef3d0e79d62e24332ee739a452af62a COPYING.LESSER

View File

@@ -4,7 +4,7 @@
#
################################################################################
LIBHTTPSERVER_VERSION = 0.17.5
LIBHTTPSERVER_VERSION = 0.18.1
LIBHTTPSERVER_SITE = $(call github,etr,libhttpserver,$(LIBHTTPSERVER_VERSION))
LIBHTTPSERVER_LICENSE = LGPL-2.1+
LIBHTTPSERVER_LICENSE_FILES = COPYING.LESSER