Commit 80293286 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Upgraded systemd to 245

parent 5fdfd712
target all: LC_ALL=$(SYSTEM_LOCALE)
all: systemd-user-sessions network-config
tar xf systemd-243.tar.gz
patch -Np1 -d systemd-243 < systemd-243-consolidated_fixes-1.patch
tar xf systemd-245.tar.gz
patch -Np1 -d systemd-245 < systemd-245-gcc_10-fixes-2.patch
ln -s /tools/bin/true /usr/bin/xsltproc
cd systemd-243 && tar xf ../systemd-man-pages-243.tar.xz
cd systemd-243 && sed -i 's/GROUP="render", //' rules/50-udev-default.rules.in
cd systemd-243 && mkdir -p build
cd systemd-243/build && meson --prefix=/usr --sysconfdir=/etc --localstatedir=/var -Dblkid=true -Dbuildtype=release -Ddefault-dnssec=no -Dfirstboot=false -Dinstall-tests=false -Dkmod-path=/bin/kmod -Dldconfig=false -Dmount-path=/bin/mount -Drootprefix= -Drootlibdir=/lib -Dsplit-usr=true -Dsulogin-path=/sbin/sulogin -Dsysusers=false -Dumount-path=/bin/umount -Db_lto=false -Drpmmacrosdir=no ..
cd systemd-243/build && ninja
cd systemd-243/build && ninja install
cd systemd-245 && tar xf ../systemd-man-pages-245.tar.xz
cd systemd-245 && sed -i 's/GROUP="render", //' rules.d/50-udev-default.rules.in
cd systemd-245 && mkdir -p build
cd systemd-245/build && meson --prefix=/usr --sysconfdir=/etc --localstatedir=/var -Dblkid=true -Dbuildtype=release -Ddefault-dnssec=no -Dfirstboot=false -Dinstall-tests=false -Dkmod-path=/bin/kmod -Dldconfig=false -Dmount-path=/bin/mount -Drootprefix= -Drootlibdir=/lib -Dsplit-usr=true -Dsulogin-path=/sbin/sulogin -Dsysusers=false -Dumount-path=/bin/umount -Db_lto=false -Drpmmacrosdir=no -Dhomed=false -Duserdb=false -Dman=true ..
cd systemd-245/build && ninja
cd systemd-245/build && ninja install
rm -rfv /usr/lib/rpm
for tool in runlevel reboot shutdown poweroff halt telinit; do \
ln -sfv /bin/systemctl /sbin/$$tool ; \
......@@ -24,15 +24,13 @@ all: systemd-user-sessions network-config
ln -sfv /lib/systemd/resolv.conf /etc/resolv.conf
tests:
ln -s /tools/bin/true /usr/bin/xsltproc
-if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \
cd systemd-243/build ; \
cd systemd-245/build ; \
ninja test ; \
fi
rm -f /usr/bin/xsltproc
-umount systemd-243/build/test/tmpfs
-umount systemd-245/build/test/tmpfs
$(MAKE) -C .. success
rm -rf system-243
rm -rf system-245
systemd-user-sessions:
define SYSTEMD_USER_SESSIONS
......
This diff is collapsed.
Submitted By: Douglas R. Reno <renodr at linuxfromscratch dot org>
Date: 2020-06-03
Updated Date: 2020-06-22
Initial Package Version: 245
Origin: Upstream
Upstream Status: Applied
Description: Fixes the build of systemd to work with gcc-10.
Also fixes a segfault in bringing up systemd-udevd on
i686 (might apply to ARM too).
diff -Naurp systemd-245.orig/meson.build systemd-245/meson.build
--- systemd-245.orig/meson.build 2020-03-06 06:38:52.000000000 -0600
+++ systemd-245/meson.build 2020-06-22 15:03:52.429129206 -0500
@@ -423,6 +423,9 @@ add_project_arguments(cc.get_supported_a
add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')
add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language : 'c')
+have = cc.has_argument('-Wzero-length-bounds')
+conf.set10('HAVE_ZERO_LENGTH_BOUNDS', have)
+
if cc.compiles('''
#include <time.h>
#include <inttypes.h>
diff -Naurp systemd-245.orig/src/core/path.c systemd-245/src/core/path.c
--- systemd-245.orig/src/core/path.c 2020-03-06 06:38:52.000000000 -0600
+++ systemd-245/src/core/path.c 2020-06-22 15:03:52.429129206 -0500
@@ -223,11 +223,10 @@ static void path_spec_mkdir(PathSpec *s,
}
static void path_spec_dump(PathSpec *s, FILE *f, const char *prefix) {
- fprintf(f,
- "%s%s: %s\n",
- prefix,
- path_type_to_string(s->type),
- s->path);
+ const char *type;
+
+ assert_se(type = path_type_to_string(s->type));
+ fprintf(f, "%s%s: %s\n", prefix, type, s->path);
}
void path_spec_done(PathSpec *s) {
@@ -607,14 +606,16 @@ static int path_serialize(Unit *u, FILE
(void) serialize_item(f, "result", path_result_to_string(p->result));
LIST_FOREACH(spec, s, p->specs) {
+ const char *type;
_cleanup_free_ char *escaped = NULL;
escaped = cescape(s->path);
if (!escaped)
return log_oom();
+ assert_se(type = path_type_to_string(s->type));
(void) serialize_item_format(f, "path-spec", "%s %i %s",
- path_type_to_string(s->type),
+ type,
s->previous_exists,
s->path);
}
diff -Naurp systemd-245.orig/src/shared/ethtool-util.c systemd-245/src/shared/ethtool-util.c
--- systemd-245.orig/src/shared/ethtool-util.c 2020-03-06 06:38:52.000000000 -0600
+++ systemd-245/src/shared/ethtool-util.c 2020-06-22 15:03:52.429129206 -0500
@@ -256,8 +256,13 @@ int ethtool_get_permanent_macaddr(int *e
if (epaddr.addr.size != 6)
return -EOPNOTSUPP;
+#pragma GCC diagnostic push
+#if HAVE_ZERO_LENGTH_BOUNDS
+#pragma GCC diagnostic ignored "-Wzero-length-bounds"
+#endif
for (size_t i = 0; i < epaddr.addr.size; i++)
ret->ether_addr_octet[i] = epaddr.addr.data[i];
+#pragma GCC diagnostic pop
return 0;
}
@@ -479,7 +484,12 @@ static int get_stringset(int ethtool_fd,
if (!buffer.info.sset_mask)
return -EINVAL;
+#pragma GCC diagnostic push
+#if HAVE_ZERO_LENGTH_BOUNDS
+#pragma GCC diagnostic ignored "-Wzero-length-bounds"
+#endif
len = buffer.info.data[0];
+#pragma GCC diagnostic pop
strings = malloc0(sizeof(struct ethtool_gstrings) + len * ETH_GSTRING_LEN);
if (!strings)
diff -Naurp systemd-245.orig/src/udev/net/link-config.c systemd-245/src/udev/net/link-config.c
--- systemd-245.orig/src/udev/net/link-config.c 2020-03-06 06:38:52.000000000 -0600
+++ systemd-245/src/udev/net/link-config.c 2020-06-22 15:04:13.951128446 -0500
@@ -490,7 +490,7 @@ int link_config_apply(link_config_ctx *c
if (config->alternative_names_policy)
for (NamePolicy *p = config->alternative_names_policy; *p != _NAMEPOLICY_INVALID; p++) {
- const char *n;
+ const char *n = NULL;
switch (*p) {
case NAMEPOLICY_DATABASE:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment