package/basu: new package
PATCH 1/1 package/basu: new package
basu is the sd-bus library, extracted from systemd.
Some projects rely on the sd-bus library for DBus support. However not all systems have systemd or elogind installed. This library provides just sd-bus (and the busctl utility).
Signed-off-by Sergey Bobrenok <[email protected]>
--- DEVELOPERS | 1 + package/Config.in | 1 + ...ble-stack-protection-for-Buildroot-p.patch | 39 +++++++++++++++++++ ...-F_ADD_SEALS-definition-from-missing.patch | 34 ++++++++++++++++ package/basu/Config.in | 23 +++++++++++ package/basu/basu.hash | 4 ++ package/basu/basu.mk | 28 +++++++++++++ 7 files changed, 130 insertions(+) create mode 100644 package/basu/0001-meson.build-Disable-stack-protection-for-Buildroot-p.patch create mode 100644 package/basu/0002-memfd-util.c-Use-F_ADD_SEALS-definition-from-missing.patch create mode 100644 package/basu/Config.in create mode 100644 package/basu/basu.hash create mode 100644 package/basu/basu.mk
DEVELOPERS +1 -0
@@ -2779,6 +2779,7 @@ F: package/systemd F: support/scripts/pkg-stats N: Sergey Bobrenok <[email protected]> +F: package/basu/ F: package/sdbus-cpp/ N: Sergey Matyukevich <[email protected]>
package/Config.in +1 -0
@@ -2086,6 +2086,7 @@ menu "Other" source "package/armadillo/Config.in" source "package/atf/Config.in" source "package/avro-c/Config.in" + source "package/basu/Config.in" source "package/bctoolbox/Config.in" source "package/bdwgc/Config.in" source "package/belr/Config.in"
package/basu/0001-meson.build-Disable-stack-protection-for-Buildroot-p.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 6133c87299bce32c13dcf1692842ea5f2890c5ad Mon Sep 17 00:00:00 2001 +From: Sergey Bobrenok <[email protected]> +Date: Wed, 28 Feb 2024 16:29:17 +0300 +Subject: [PATCH] meson.build: Disable stack protection for Buildroot packaging + +In Buildroot, the SSP flags are passed via the wrapper, and only flags +supported by the toolchain will be used. So the SSP flags can be +safely removed from the build files. + +Fixes: + src/basic/libbasic.a.p/log.c.o: in function `write_to_console.isra.0': + log.c:(.text.write_to_console.isra.0+0x154): undefined reference to `__stack_chk_fail_local' + +Upstream: N/A [Buildroot specific] + +Signed-off-by: Sergey Bobrenok <[email protected]> +--- + meson.build | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/meson.build b/meson.build +index 6f79707..51fd400 100644 +--- a/meson.build ++++ b/meson.build +@@ -75,9 +75,6 @@ possible_cc_flags = [ + '-fdiagnostics-show-option', + '-fno-strict-aliasing', + '-fvisibility=hidden', +- '-fstack-protector', +- '-fstack-protector-strong', +- '--param=ssp-buffer-size=4', + ] + + # --as-needed and --no-undefined are provided by meson by default, + +base-commit: 684a41d68cfbb05e38aacb60a8548e21ddfbecdb +-- +2.43.2 +
package/basu/0002-memfd-util.c-Use-F_ADD_SEALS-definition-from-missing.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 8e4960e8b9d11d9be96e83b02bd3b08178ddce1b Mon Sep 17 00:00:00 2001 +From: Sergey Bobrenok <[email protected]> +Date: Wed, 28 Feb 2024 20:42:19 +0300 +Subject: [PATCH basu] memfd-util.c: Use F_ADD_SEALS definition from missing.h + +uClibc and glibc (until version 2.27, 2018) implementations don't +support F_ADD_SEALS and other F_SEAL_xxx flags. +'missing.h' was removed from 'memfd-util.c' in 37dbb2fcb ("Remove +useless includes"). + +Upstream: https://lists.sr.ht/~emersion/public-inbox/patches/49899 + +Signed-off-by: Sergey Bobrenok <[email protected]> +--- + src/basic/memfd-util.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/basic/memfd-util.c b/src/basic/memfd-util.c +index 89893ba..7e535c6 100644 +--- a/src/basic/memfd-util.c ++++ b/src/basic/memfd-util.c +@@ -7,6 +7,7 @@ + + #include "alloc-util.h" + #include "memfd-util.h" ++#include "missing.h" + + int memfd_set_sealed(int fd) { + #if defined(__FreeBSD__) && __FreeBSD__ < 13 + +base-commit: 684a41d68cfbb05e38aacb60a8548e21ddfbecdb +-- +2.44.0 +
package/basu/Config.in new file +23 -0
@@ -0,0 +1,23 @@ +config BR2_PACKAGE_BASU + bool "basu" + depends on BR2_USE_MMU # dbus + depends on BR2_USE_WCHAR # uchar.h + depends on BR2_ENABLE_LOCALE # locale_t + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # __sync_add_and_fetch + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # F_ADD_SEALS + select BR2_PACKAGE_DBUS if !BR2_PACKAGE_DBUS_BROKER # runtime + help + basu is the sd-bus library, extracted from systemd. + + Some projects rely on the sd-bus library for DBus support. + However not all systems have systemd or elogind installed. + This library provides just sd-bus (and the busctl utility). + + https://git.sr.ht/~emersion/basu + +comment "basu needs a toolchain w/ wchar, locale, threads, headers >= 3.17" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_ENABLE_LOCALE || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
package/basu/basu.hash new file +4 -0
@@ -0,0 +1,4 @@ +# From https://git.sr.ht/~emersion/basu/refs/v0.2.1 +sha256 d9b373a9fcb5d5eb5f6c1c56355f76edb7f2f52bc744570e80604e83455a19bd basu-0.2.1.tar.gz +# Locally computed: +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LICENSE.LGPL2.1
package/basu/basu.mk new file +28 -0
@@ -0,0 +1,28 @@ +################################################################################ +# +# basu +# +################################################################################ + +BASU_VERSION = 0.2.1 +BASU_SITE = https://git.sr.ht/~emersion/basu/refs/download/v$(BASU_VERSION) +BASU_INSTALL_STAGING = YES +BASU_LICENSE = LGPL-2.1+ +BASU_LICENSE_FILES = LICENSE.LGPL2.1 +BASU_DEPENDENCIES = host-gperf + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +BASU_DEPENDENCIES += libcap +BASU_CONF_OPTS += -Dlibcap=enabled +else +BASU_CONF_OPTS += -Dlibcap=disabled +endif + +ifeq ($(BR2_PACKAGE_AUDIT),y) +BASU_DEPENDENCIES += audit +BASU_CONF_OPTS += -Daudit=enabled +else +BASU_CONF_OPTS += -Daudit=disabled +endif + +$(eval $(meson-package))
Signature · 6 lines
2.44.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 7 lines · On Thu, 29 Feb 2024 22:21:38 +0300 Sergey Bobrenok <[email protected]> wrote:
basu is the sd-bus library, extracted from systemd.
Some projects rely on the sd-bus library for DBus support. However not all systems have systemd or elogind installed. This library provides just sd-bus (and the busctl utility).
Signed-off-by Sergey Bobrenok <[email protected]>
Quoted 14 lines
--- DEVELOPERS | 1 + package/Config.in | 1 + ...ble-stack-protection-for-Buildroot-p.patch | 39 +++++++++++++++++++ ...-F_ADD_SEALS-definition-from-missing.patch | 34 ++++++++++++++++ package/basu/Config.in | 23 +++++++++++ package/basu/basu.hash | 4 ++ package/basu/basu.mk | 28 +++++++++++++ 7 files changed, 130 insertions(+) create mode 100644 package/basu/0001-meson.build-Disable-stack-protection-for-Buildroot-p.patch create mode 100644 package/basu/0002-memfd-util.c-Use-F_ADD_SEALS-definition-from-missing.patch create mode 100644 package/basu/Config.in create mode 100644 package/basu/basu.hash create mode 100644 package/basu/basu.mk
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot