systemd: Fix 252 release build on musl
PATCH v3 1/1 systemd: Fix 252 release build on musl
Signed-off-by Khem Raj <[email protected]>
Cc Luca Boccassi <[email protected]>
---
v2: Replace the utmp patch with an upstream backport
v3: Drop unrelated recipe changes
.../0001-Adjust-for-musl-headers.patch | 84 +--------- ....c-Use-net-if.h-for-getting-IFF_LOOP.patch | 27 +++ ...trerror-is-assumed-to-be-GNU-specifi.patch | 42 +++++ ...-test-utmp.c-only-if-UTMP-is-enabled.patch | 44 +++++ .../0002-Add-sys-stat.h-for-S_IFDIR.patch | 4 +- ...k-parse_printf_format-implementation.patch | 22 +-- ...missing.h-check-for-missing-strndupa.patch | 158 ++---------------- ...OB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch | 29 ++-- ...10-Use-uintmax_t-for-handling-rlim_t.patch | 14 +- ...T_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | 14 +- ...patible-basename-for-non-glibc-syste.patch | 8 +- ...uffering-when-writing-to-oom_score_a.patch | 4 +- ...compliant-strerror_r-from-GNU-specif.patch | 22 ++- ...-not-disable-buffer-in-writing-files.patch | 100 ++++------- .../systemd/0026-Handle-missing-gshadow.patch | 14 +- meta/recipes-core/systemd/systemd_252.bb | 5 +- 16 files changed, 218 insertions(+), 373 deletions(-) create mode 100644 meta/recipes-core/systemd/systemd/0001-networkd-ipv4acd.c-Use-net-if.h-for-getting-IFF_LOOP.patch create mode 100644 meta/recipes-core/systemd/systemd/0001-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch create mode 100644 meta/recipes-core/systemd/systemd/0001-test-compile-test-utmp.c-only-if-UTMP-is-enabled.patch
meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch +5 -79
@@ -47,8 +47,6 @@ Signed-off-by: Khem Raj <[email protected]> src/udev/udev-builtin-net_id.c | 2 +- 37 files changed, 44 insertions(+), 42 deletions(-) -diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c -index b346a50d78..7884d4c1cd 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -5,7 +5,7 @@
@@ -60,8 +58,6 @@ index b346a50d78..7884d4c1cd 100644 #include <linux/if_infiniband.h> #include "sd-dhcp6-client.h" -diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c -index 8ff0eb1360..7e06b8d57d 100644 --- a/src/network/netdev/bareudp.c +++ b/src/network/netdev/bareudp.c @@ -2,7 +2,7 @@
@@ -73,8 +69,6 @@ index 8ff0eb1360..7e06b8d57d 100644 #include "bareudp.h" #include "netlink-util.h" -diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c -index 15f3aee3a6..ec76428436 100644 --- a/src/network/netdev/batadv.c +++ b/src/network/netdev/batadv.c @@ -3,7 +3,7 @@
@@ -86,8 +80,6 @@ index 15f3aee3a6..ec76428436 100644 #include "batadv.h" #include "fileio.h" -diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c -index 5d94aa1d68..4e379a326d 100644 --- a/src/network/netdev/bond.c +++ b/src/network/netdev/bond.c @@ -1,7 +1,7 @@
@@ -99,8 +91,6 @@ index 5d94aa1d68..4e379a326d 100644 #include "alloc-util.h" #include "bond.h" -diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c -index b974f2ae0a..9a5f18d556 100644 --- a/src/network/netdev/bridge.c +++ b/src/network/netdev/bridge.c @@ -2,7 +2,7 @@
@@ -112,8 +102,6 @@ index b974f2ae0a..9a5f18d556 100644 #include <linux/if_bridge.h> #include "bridge.h" -diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c -index 00df1d2787..77b506b422 100644 --- a/src/network/netdev/dummy.c +++ b/src/network/netdev/dummy.c @@ -1,6 +1,6 @@
@@ -124,8 +112,6 @@ index 00df1d2787..77b506b422 100644 #include "dummy.h" -diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c -index 224c17e979..fb79cc13f6 100644 --- a/src/network/netdev/geneve.c +++ b/src/network/netdev/geneve.c @@ -2,7 +2,7 @@
@@ -137,8 +123,6 @@ index 224c17e979..fb79cc13f6 100644 #include "alloc-util.h" #include "conf-parser.h" -diff --git a/src/network/netdev/ifb.c b/src/network/netdev/ifb.c -index d7ff44cb9e..e037629ae4 100644 --- a/src/network/netdev/ifb.c +++ b/src/network/netdev/ifb.c @@ -1,7 +1,7 @@
@@ -150,8 +134,6 @@ index d7ff44cb9e..e037629ae4 100644 #include "ifb.h" -diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c -index e0ff9e8c62..ab085c1f6d 100644 --- a/src/network/netdev/ipoib.c +++ b/src/network/netdev/ipoib.c @@ -1,6 +1,6 @@
@@ -162,8 +144,6 @@ index e0ff9e8c62..ab085c1f6d 100644 #include <linux/if_link.h> #include "ipoib.h" -diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c -index d15766cd7b..60728b4f94 100644 --- a/src/network/netdev/ipvlan.c +++ b/src/network/netdev/ipvlan.c @@ -2,7 +2,7 @@
@@ -175,8 +155,6 @@ index d15766cd7b..60728b4f94 100644 #include "conf-parser.h" #include "ipvlan.h" -diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c -index f1a566a9ca..1f37927a83 100644 --- a/src/network/netdev/macsec.c +++ b/src/network/netdev/macsec.c @@ -1,7 +1,7 @@
@@ -188,8 +166,6 @@ index f1a566a9ca..1f37927a83 100644 #include <linux/if_ether.h> #include <linux/if_macsec.h> #include <linux/genetlink.h> -diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c -index c41be6e78f..ee2660c5bf 100644 --- a/src/network/netdev/macvlan.c +++ b/src/network/netdev/macvlan.c @@ -2,7 +2,7 @@
@@ -201,8 +177,6 @@ index c41be6e78f..ee2660c5bf 100644 #include "conf-parser.h" #include "macvlan.h" -diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c -index 8e7fe11c18..701ab2bd69 100644 --- a/src/network/netdev/netdev.c +++ b/src/network/netdev/netdev.c @@ -2,7 +2,7 @@
@@ -214,8 +188,6 @@ index 8e7fe11c18..701ab2bd69 100644 #include <unistd.h> #include "alloc-util.h" -diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c -index 15d5c132f9..a3ffa48b15 100644 --- a/src/network/netdev/netdevsim.c +++ b/src/network/netdev/netdevsim.c @@ -1,6 +1,6 @@
@@ -226,8 +198,6 @@ index 15d5c132f9..a3ffa48b15 100644 #include "netdevsim.h" -diff --git a/src/network/netdev/nlmon.c b/src/network/netdev/nlmon.c -index ff372092e6..eef66811f4 100644 --- a/src/network/netdev/nlmon.c +++ b/src/network/netdev/nlmon.c @@ -1,6 +1,6 @@
@@ -238,8 +208,6 @@ index ff372092e6..eef66811f4 100644 #include "nlmon.h" -diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c -index 97e534fe99..0302c1cb94 100644 --- a/src/network/netdev/tunnel.c +++ b/src/network/netdev/tunnel.c @@ -2,7 +2,7 @@
@@ -251,8 +219,6 @@ index 97e534fe99..0302c1cb94 100644 #include <linux/if_tunnel.h> #include <linux/ip.h> #include <linux/ip6_tunnel.h> -diff --git a/src/network/netdev/vcan.c b/src/network/netdev/vcan.c -index 380547ee1e..137c1adf8a 100644 --- a/src/network/netdev/vcan.c +++ b/src/network/netdev/vcan.c @@ -1,6 +1,6 @@
@@ -263,8 +229,6 @@ index 380547ee1e..137c1adf8a 100644 #include "vcan.h" -diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c -index c946e81fc0..d1a6be73f9 100644 --- a/src/network/netdev/veth.c +++ b/src/network/netdev/veth.c @@ -3,7 +3,7 @@
@@ -276,8 +240,6 @@ index c946e81fc0..d1a6be73f9 100644 #include <linux/veth.h> #include "netlink-util.h" -diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c -index af3e77963e..efa4b0a164 100644 --- a/src/network/netdev/vlan.c +++ b/src/network/netdev/vlan.c @@ -2,7 +2,7 @@
@@ -289,8 +251,6 @@ index af3e77963e..efa4b0a164 100644 #include <linux/if_vlan.h> #include "parse-util.h" -diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c -index b1b6707441..1c6d1982e1 100644 --- a/src/network/netdev/vrf.c +++ b/src/network/netdev/vrf.c @@ -2,7 +2,7 @@
@@ -302,8 +262,6 @@ index b1b6707441..1c6d1982e1 100644 #include "vrf.h" -diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c -index a0ba048eb1..875f2e5901 100644 --- a/src/network/netdev/vxcan.c +++ b/src/network/netdev/vxcan.c @@ -1,7 +1,7 @@
@@ -315,8 +273,6 @@ index a0ba048eb1..875f2e5901 100644 #include "vxcan.h" -diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c -index 30b0855598..a065158801 100644 --- a/src/network/netdev/vxlan.c +++ b/src/network/netdev/vxlan.c @@ -2,7 +2,7 @@
@@ -328,8 +284,6 @@ index 30b0855598..a065158801 100644 #include "conf-parser.h" #include "alloc-util.h" -diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c -index 88f668753a..5fc753384b 100644 --- a/src/network/netdev/wireguard.c +++ b/src/network/netdev/wireguard.c @@ -6,7 +6,7 @@
@@ -341,8 +295,6 @@ index 88f668753a..5fc753384b 100644 #include <linux/ipv6_route.h> #include "sd-resolve.h" -diff --git a/src/network/netdev/xfrm.c b/src/network/netdev/xfrm.c -index ef5e735b2b..419afd75f2 100644 --- a/src/network/netdev/xfrm.c +++ b/src/network/netdev/xfrm.c @@ -1,6 +1,6 @@
@@ -353,8 +305,6 @@ index ef5e735b2b..419afd75f2 100644 #include "missing_network.h" #include "xfrm.h" -diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c -index 10025a97ae..a0239ea83a 100644 --- a/src/network/networkd-bridge-mdb.c +++ b/src/network/networkd-bridge-mdb.c @@ -1,7 +1,5 @@
@@ -374,8 +324,6 @@ index 10025a97ae..a0239ea83a 100644 #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U -diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c -index 7996960bd1..e870b9ba26 100644 --- a/src/network/networkd-dhcp-common.c +++ b/src/network/networkd-dhcp-common.c @@ -1,7 +1,8 @@
@@ -387,9 +335,7 @@ index 7996960bd1..e870b9ba26 100644 +#include <net/if.h> #include "bus-error.h" - #include "dhcp-identifier.h" -diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c -index 7be9713d46..e830fcd575 100644 + #include "bus-locator.h" --- a/src/network/networkd-dhcp-prefix-delegation.c +++ b/src/network/networkd-dhcp-prefix-delegation.c @@ -1,7 +1,5 @@
@@ -409,8 +355,6 @@ index 7be9713d46..e830fcd575 100644 bool link_dhcp_pd_is_enabled(Link *link) { assert(link); -diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c -index 9acfd17d49..3108289602 100644 --- a/src/network/networkd-dhcp-server.c +++ b/src/network/networkd-dhcp-server.c @@ -1,7 +1,7 @@
@@ -422,8 +366,6 @@ index 9acfd17d49..3108289602 100644 #include <linux/if.h> #include "sd-dhcp-server.h" -diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c -index cb9c428ae9..a35d58f3f1 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -3,7 +3,7 @@
@@ -435,21 +377,17 @@ index cb9c428ae9..a35d58f3f1 100644 #include "alloc-util.h" #include "dhcp-client-internal.h" -diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c -index dc09171afe..5b93ef3dd4 100644 --- a/src/network/networkd-ipv6ll.c +++ b/src/network/networkd-ipv6ll.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ - + #include <linux/if.h> -#include <linux/if_arp.h> +//#include <linux/if_arp.h> - + #include "in-addr-util.h" #include "networkd-address.h" -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 63679505f7..825ea76ff2 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -3,7 +3,7 @@
@@ -461,8 +399,6 @@ index 63679505f7..825ea76ff2 100644 #include <linux/if_link.h> #include <linux/netdevice.h> #include <sys/socket.h> -diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c -index efe407fedb..46a086cdf5 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -6,7 +6,7 @@
@@ -471,11 +407,9 @@ index efe407fedb..46a086cdf5 100644 #include <linux/if.h> -#include <linux/if_arp.h> +//#include <linux/if_arp.h> - + #include "sd-ndisc.h" - -diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c -index 934fed3b7f..fdb89313dd 100644 + --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -1,9 +1,5 @@
@@ -499,8 +433,6 @@ index 934fed3b7f..fdb89313dd 100644 int route_new(Route **ret) { _cleanup_(route_freep) Route *route = NULL; -diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c -index e00cc1e589..e392c7e1a2 100644 --- a/src/network/networkd-setlink.c +++ b/src/network/networkd-setlink.c @@ -2,7 +2,7 @@
@@ -512,8 +444,6 @@ index e00cc1e589..e392c7e1a2 100644 #include <linux/if_bridge.h> #include "missing_network.h" -diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h -index cf20b6dba5..c3a46dda11 100644 --- a/src/shared/linux/ethtool.h +++ b/src/shared/linux/ethtool.h @@ -16,7 +16,8 @@
@@ -526,8 +456,6 @@ index cf20b6dba5..c3a46dda11 100644 #ifndef __KERNEL__ #include <limits.h> /* for INT_MAX */ -diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c -index f56c5646c1..5af28ff119 100644 --- a/src/shared/netif-util.c +++ b/src/shared/netif-util.c @@ -1,7 +1,7 @@
@@ -539,8 +467,6 @@ index f56c5646c1..5af28ff119 100644 #include "arphrd-util.h" #include "device-util.h" -diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c -index f2ea2a7cd5..fe60a0744d 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -18,7 +18,7 @@
meta/recipes-core/systemd/systemd/0001-networkd-ipv4acd.c-Use-net-if.h-for-getting-IFF_LOOP.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 4a464ea4aaed5184a70b2e1ac77e4a955443d067 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 8 Nov 2022 12:21:35 -0800 +Subject: [PATCH] networkd-ipv4acd.c: Use net/if.h for getting IFF_LOOPBACK definition + +This helps in avoiding compiling errors on musl. Definition of +IFF_LOOPBACK is the reason for including linux/if_arp.h, this however +could be obtained from net/if.h glibc header equally and makes it +portable as well. + +Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/25304] +Signed-off-by: Khem Raj <[email protected]> +--- + src/network/networkd-ipv4acd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/network/networkd-ipv4acd.c ++++ b/src/network/networkd-ipv4acd.c +@@ -1,6 +1,7 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + +-#include <linux/if_arp.h> ++#include <net/if.h> /* IFF_LOOPBACK */ ++#include <net/if_arp.h> /* ARPHRD_ETHER */ + + #include "sd-dhcp-client.h" + #include "sd-ipv4acd.h"
meta/recipes-core/systemd/systemd/0001-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch new file +42 -0
42 lines not on this page · raw message
meta/recipes-core/systemd/systemd/0001-test-compile-test-utmp.c-only-if-UTMP-is-enabled.patch new file +44 -0
44 lines not on this page · raw message
meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch +1 -3
@@ -13,11 +13,9 @@ Signed-off-by: Khem Raj <[email protected]> src/shared/mkdir-label.c | 1 + 1 file changed, 1 insertion(+) -diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c -index 5b1ac5d1e0..fa5802b894 100644 --- a/src/shared/mkdir-label.c +++ b/src/shared/mkdir-label.c -@@ -6,6 +6,7 @@ +@@ -7,6 +7,7 @@ #include "selinux-util.h" #include "smack-util.h" #include "user-util.h"
meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch +4 -18
@@ -22,11 +22,9 @@ Signed-off-by: Scott Murray <[email protected]> create mode 100644 src/basic/parse-printf-format.c create mode 100644 src/basic/parse-printf-format.h -diff --git a/meson.build b/meson.build -index 36cbfa4893..30b5305b89 100644 --- a/meson.build +++ b/meson.build -@@ -694,6 +694,7 @@ endif +@@ -739,6 +739,7 @@ endif foreach header : ['crypt.h', 'linux/memfd.h', 'linux/vm_sockets.h',
@@ -34,11 +32,9 @@ index 36cbfa4893..30b5305b89 100644 'sys/auxv.h', 'valgrind/memcheck.h', 'valgrind/valgrind.h', -diff --git a/src/basic/meson.build b/src/basic/meson.build -index 9b89fdcdea..0b1ef91016 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build -@@ -336,6 +336,11 @@ endforeach +@@ -337,6 +337,11 @@ endforeach basic_sources += generated_gperf_headers
@@ -50,9 +46,6 @@ index 9b89fdcdea..0b1ef91016 100644 ############################################################ arch_list = [ -diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c -new file mode 100644 -index 0000000000..49437e5445 --- /dev/null +++ b/src/basic/parse-printf-format.c @@ -0,0 +1,273 @@
@@ -329,9 +322,6 @@ index 0000000000..49437e5445 + + return last; +} -diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h -new file mode 100644 -index 0000000000..47be7522d7 --- /dev/null +++ b/src/basic/parse-printf-format.h @@ -0,0 +1,57 @@
@@ -392,8 +382,6 @@ index 0000000000..47be7522d7 +size_t parse_printf_format(const char *fmt, size_t n, int *types); + +#endif /* HAVE_PRINTF_H */ -diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h -index 69d7062ec6..f55c5aab2c 100644 --- a/src/basic/stdio-util.h +++ b/src/basic/stdio-util.h @@ -1,13 +1,13 @@
@@ -409,10 +397,8 @@ index 69d7062ec6..f55c5aab2c 100644 #include "memory-util.h" +#include "parse-printf-format.h" - #define snprintf_ok(buf, len, fmt, ...) \ - ({ \ -diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c -index 1e10ed5524..e6ceba54f9 100644 + #define snprintf_ok(buf, len, fmt, ...) \ + ({ \ --- a/src/libsystemd/sd-journal/journal-send.c +++ b/src/libsystemd/sd-journal/journal-send.c @@ -2,7 +2,6 @@
meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +17 -141
480 lines not on this page · raw message
meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +12 -17
@@ -23,8 +23,6 @@ Signed-off-by: Scott Murray <[email protected]> src/tmpfiles/tmpfiles.c | 10 ++++++++++ 3 files changed, 38 insertions(+) -diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c -index e026b29478..815e56ef68 100644 --- a/src/basic/glob-util.c +++ b/src/basic/glob-util.c @@ -12,6 +12,12 @@
@@ -48,7 +46,7 @@ index e026b29478..815e56ef68 100644 /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ assert(!(flags & GLOB_ALTDIRFUNC)); -@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { +@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag pglob->gl_lstat = lstat; if (!pglob->gl_stat) pglob->gl_stat = stat;
@@ -63,13 +61,11 @@ index e026b29478..815e56ef68 100644 if (k == GLOB_NOMATCH) return -ENOENT; if (k == GLOB_NOSPACE) -diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c -index ec8b74f48f..d99a6095df 100644 --- a/src/test/test-glob-util.c +++ b/src/test/test-glob-util.c -@@ -13,6 +13,12 @@ - #include "tests.h" - #include "tmpfile-util.h" +@@ -34,6 +34,12 @@ TEST(glob_first) { + assert_se(first == NULL); + } +/* Don't fail if the standard library + * doesn't provide brace expansion */
@@ -80,7 +76,7 @@ index ec8b74f48f..d99a6095df 100644 TEST(glob_exists) { char name[] = "/tmp/test-glob_exists.XXXXXX"; int fd = -1; -@@ -40,11 +46,13 @@ TEST(glob_no_dot) { +@@ -61,11 +67,13 @@ TEST(glob_no_dot) { const char *fn; _cleanup_globfree_ glob_t g = {
@@ -94,7 +90,7 @@ index ec8b74f48f..d99a6095df 100644 }; int r; -@@ -52,11 +60,19 @@ TEST(glob_no_dot) { +@@ -73,11 +81,19 @@ TEST(glob_no_dot) { assert_se(mkdtemp(template)); fn = strjoina(template, "/*");
@@ -114,13 +110,11 @@ index ec8b74f48f..d99a6095df 100644 assert_se(r == GLOB_NOMATCH); (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); -diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c -index fcab51c208..fdef1807ae 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c -@@ -67,6 +67,12 @@ - #include "umask-util.h" +@@ -71,6 +71,12 @@ #include "user-util.h" + #include "virt.h" +/* Don't fail if the standard library + * doesn't provide brace expansion */
@@ -131,7 +125,7 @@ index fcab51c208..fdef1807ae 100644 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates * them in the file system. This is intended to be used to create * properly owned directories beneath /tmp, /var/tmp, /run, which are -@@ -1934,7 +1940,9 @@ finish: +@@ -2174,7 +2180,9 @@ finish: static int glob_item(Item *i, action_t action) { _cleanup_globfree_ glob_t g = {
@@ -140,8 +134,8 @@ index fcab51c208..fdef1807ae 100644 +#endif }; int r = 0, k; - -@@ -1953,7 +1961,9 @@ static int glob_item(Item *i, action_t action) { + +@@ -2194,7 +2202,9 @@ static int glob_item(Item *i, action_t a static int glob_item_recursively(Item *i, fdaction_t action) { _cleanup_globfree_ glob_t g = {
@@ -150,3 +144,4 @@ index fcab51c208..fdef1807ae 100644 +#endif }; int r = 0, k; +
meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch +4 -10
@@ -27,11 +27,9 @@ Signed-off-by: Chen Qi <[email protected]> src/core/execute.c | 4 ++-- 3 files changed, 9 insertions(+), 15 deletions(-) -diff --git a/src/basic/format-util.h b/src/basic/format-util.h -index 8719df3e29..9becc96066 100644 --- a/src/basic/format-util.h +++ b/src/basic/format-util.h -@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t)); +@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32 # error Unknown timex member size #endif
@@ -46,11 +44,9 @@ index 8719df3e29..9becc96066 100644 #if SIZEOF_DEV_T == 8 # define DEV_FMT "%" PRIu64 -diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c -index 33dfde9d6c..e018fd81fd 100644 --- a/src/basic/rlimit-util.c +++ b/src/basic/rlimit-util.c -@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) { +@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, cons fixed.rlim_max == highest.rlim_max) return 0;
@@ -59,7 +55,7 @@ index 33dfde9d6c..e018fd81fd 100644 return RET_NERRNO(setrlimit(resource, &fixed)); } -@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { +@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *r if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) r = free_and_strdup(&s, "infinity"); else if (rl->rlim_cur >= RLIM_INFINITY)
@@ -86,11 +82,9 @@ index 33dfde9d6c..e018fd81fd 100644 return 1; } -diff --git a/src/core/execute.c b/src/core/execute.c -index fccfb9268c..90f00e10a5 100644 --- a/src/core/execute.c +++ b/src/core/execute.c -@@ -5633,9 +5633,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { +@@ -5869,9 +5869,9 @@ void exec_context_dump(const ExecContext for (unsigned i = 0; i < RLIM_NLIMITS; i++) if (c->rlimit[i]) { fprintf(f, "%sLimit%s: " RLIM_FMT "\n",
meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +5 -9
@@ -31,11 +31,9 @@ Signed-off-by: Andre McCurdy <[email protected]> src/shared/base-filesystem.c | 6 +++--- 2 files changed, 23 insertions(+), 4 deletions(-) -diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h -index 0bbb3f6298..3dc494dbfb 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h -@@ -46,8 +46,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); +@@ -47,8 +47,27 @@ int futimens_opath(int fd, const struct int fd_warn_permissions(const char *path, int fd); int stat_warn_permissions(const char *path, const struct stat *st);
@@ -63,12 +61,10 @@ index 0bbb3f6298..3dc494dbfb 100644 + RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), 0)) int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); - int touch(const char *path); -diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c -index 6dacc1d20a..909a6818f6 100644 + --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c -@@ -131,7 +131,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { +@@ -131,7 +131,7 @@ int base_filesystem_create(const char *r return log_error_errno(errno, "Failed to open root file system: %m"); for (size_t i = 0; i < ELEMENTSOF(table); i++) {
@@ -77,7 +73,7 @@ index 6dacc1d20a..909a6818f6 100644 continue; if (table[i].target) { -@@ -139,7 +139,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { +@@ -139,7 +139,7 @@ int base_filesystem_create(const char *r /* check if one of the targets exists */ NULSTR_FOREACH(s, table[i].target) {
@@ -86,7 +82,7 @@ index 6dacc1d20a..909a6818f6 100644 continue; /* check if a specific file exists at the target path */ -@@ -150,7 +150,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { +@@ -150,7 +150,7 @@ int base_filesystem_create(const char *r if (!p) return log_oom();
meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch +3 -5
@@ -14,13 +14,11 @@ Signed-off-by: Khem Raj <[email protected]> src/machine/machine-dbus.c | 5 +++++ 1 file changed, 5 insertions(+) -diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c -index 8f11afd65b..a2b57deb7a 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c -@@ -10,6 +10,11 @@ - #include <libgen.h> - #undef basename +@@ -4,6 +4,11 @@ + #include <sys/mount.h> + #include <sys/wait.h> +#if !defined(__GLIBC__) +#include <string.h>
meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +1 -3
@@ -24,11 +24,9 @@ Signed-off-by: Scott Murray <[email protected]> src/basic/process-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index 6980e0c4f6..45ec26ea45 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c -@@ -1460,7 +1460,7 @@ int set_oom_score_adjust(int value) { +@@ -1466,7 +1466,7 @@ int set_oom_score_adjust(int value) { xsprintf(t, "%i", value); return write_string_file("/proc/self/oom_score_adj", t,
meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +16 -6
@@ -24,11 +24,9 @@ Signed-off-by: Chen Qi <[email protected]> src/libsystemd/sd-journal/journal-send.c | 5 +++++ 2 files changed, 10 insertions(+) -diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c -index bdfa145ab7..61928f4bf3 100644 --- a/src/libsystemd/sd-bus/bus-error.c +++ b/src/libsystemd/sd-bus/bus-error.c -@@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { +@@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_er return; errno = 0;
@@ -41,11 +39,23 @@ index bdfa145ab7..61928f4bf3 100644 if (errno == ERANGE || strlen(x) >= k - 1) { free(m); k *= 2; -diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c -index e6ceba54f9..285ebbc9ef 100644 +@@ -594,8 +599,12 @@ const char* _bus_error_message(const sd_ + + if (e && e->message) + return e->message; +- ++#ifndef __GLIBC__ ++ strerror_r(abs(error), buf, ERRNO_BUF_LEN); ++ return buf; ++#else + return strerror_r(abs(error), buf, ERRNO_BUF_LEN); ++#endif + } + + static bool map_ok(const sd_bus_error_map *map) { --- a/src/libsystemd/sd-journal/journal-send.c +++ b/src/libsystemd/sd-journal/journal-send.c -@@ -370,7 +370,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove +@@ -381,7 +381,12 @@ static int fill_iovec_perror_and_send(co char* j; errno = 0;
meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch +29 -71
327 lines not on this page · raw message
meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch +4 -10
@@ -17,8 +17,6 @@ Signed-off-by: Luca Boccassi <[email protected]> src/shared/userdb.c | 7 ++++++- 3 files changed, 30 insertions(+), 1 deletion(-) -diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c -index 88b8fc2f8f..a819d41bac 100644 --- a/src/shared/user-record-nss.c +++ b/src/shared/user-record-nss.c @@ -331,8 +331,10 @@ int nss_group_to_group_record(
@@ -48,7 +46,7 @@ index 88b8fc2f8f..a819d41bac 100644 r = json_build(&g->json, JSON_BUILD_OBJECT( JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), -@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re +@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct grou assert(ret_sgrp); assert(ret_buffer);
@@ -56,7 +54,7 @@ index 88b8fc2f8f..a819d41bac 100644 for (;;) { _cleanup_free_ char *buf = NULL; struct sgrp sgrp, *result; -@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re +@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct grou buflen *= 2; buf = mfree(buf); }
@@ -122,8 +120,6 @@ index 88b8fc2f8f..a819d41bac 100644 if (r < 0) return r; -diff --git a/src/shared/user-record-nss.h b/src/shared/user-record-nss.h -index 22ab04d6ee..4e52e7a911 100644 --- a/src/shared/user-record-nss.h +++ b/src/shared/user-record-nss.h @@ -2,7 +2,11 @@
@@ -138,11 +134,9 @@ index 22ab04d6ee..4e52e7a911 100644 #include <pwd.h> #include <shadow.h> -diff --git a/src/shared/userdb.c b/src/shared/userdb.c -index 0eddd382e6..d506b8e263 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c -@@ -1046,13 +1046,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { +@@ -1044,13 +1044,15 @@ int groupdb_iterator_get(UserDBIterator if (gr) { _cleanup_free_ char *buffer = NULL; bool incomplete = false;
@@ -159,7 +153,7 @@ index 0eddd382e6..d506b8e263 100644 if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { r = nss_sgrp_for_group(gr, &sgrp, &buffer); if (r < 0) { -@@ -1065,6 +1067,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { +@@ -1063,6 +1065,9 @@ int groupdb_iterator_get(UserDBIterator } r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret);
meta/recipes-core/systemd/systemd_252.bb +4 -1
@@ -25,6 +25,8 @@ SRC_URI += " \ file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ file://0003-implment-systemd-sysv-install-for-OE.patch \ file://0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch \ + file://0001-networkd-ipv4acd.c-Use-net-if.h-for-getting-IFF_LOOP.patch \ + file://0001-test-compile-test-utmp.c-only-if-UTMP-is-enabled.patch \ " # patches needed by musl
@@ -49,6 +51,7 @@ SRC_URI_MUSL = "\ file://0001-pass-correct-parameters-to-getdents64.patch \ file://0002-Add-sys-stat.h-for-S_IFDIR.patch \ file://0001-Adjust-for-musl-headers.patch \ + file://0001-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch \ " PAM_PLUGINS = " \
@@ -109,7 +112,7 @@ PACKAGECONFIG:remove:libc-musl = " \ # https://github.com/seccomp/libseccomp/issues/347 PACKAGECONFIG:remove:mipsarch = "seccomp" -CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 " +TARGET_CC_ARCH:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 -D_LARGEFILE64_SOURCE" # Some of the dependencies are weak-style recommends - if not available at runtime, # systemd won't fail but the library-related feature will be skipped with a warning.
Signature · 1 line
2.38.1
Acked-by Luca Boccassi <[email protected]>