systemd: update to systemd-237

Needed to compile with glibc-2.27

No need to build test suite.
This commit is contained in:
MilhouseVH 2018-02-05 08:59:20 +00:00
parent ea75974980
commit 8131c87e21
3 changed files with 3 additions and 103 deletions

View File

@ -17,8 +17,8 @@
################################################################################
PKG_NAME="systemd"
PKG_VERSION="236"
PKG_SHA256="0cadccfa7109232ec2a469d41ca595d5595b83b648b534ea669c15dbca904c43"
PKG_VERSION="237"
PKG_SHA256="c83dabbe1c9de6b9db1dafdb7e04140c7d0535705c68842f6c0768653ba4913c"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.freedesktop.org/wiki/Software/systemd"
@ -33,6 +33,7 @@ PKG_MESON_OPTS_TARGET="--libdir=/usr/lib \
-Dsplit-usr=false \
-Ddefault-hierarchy=hybrid \
-Dtty-gid=5 \
-Dtests=false \
-Dseccomp=false \
-Dselinux=false \
-Dapparmor=false \

View File

@ -1,43 +0,0 @@
From 1ddef8584afe34d0bb8f2629f360bcd02a7e0690 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 18 Dec 2017 10:12:59 +0100
Subject: [PATCH] analyze: use normal bus connection for "plot" verb
We need to connect to hostnamed, so a private bus connection is no good.
It'd be simpler to use the normal bus connection unconditionally, but
that'd mean that e.g. systemd-analyze set-log-level might not work in
emergency mode. So let's keep trying to use the private connection except
for "plot".
Fixes #7667.
---
src/analyze/analyze.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index d45c1dc496..7f35b04c31 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -130,6 +130,13 @@ struct host_info {
char *architecture;
};
+static int acquire_bus(bool need_full_bus, sd_bus **bus) {
+ if (need_full_bus)
+ return bus_connect_transport(arg_transport, arg_host, arg_user, bus);
+ else
+ return bus_connect_transport_systemd(arg_transport, arg_host, arg_user, bus);
+}
+
static int bus_get_uint64_property(sd_bus *bus, const char *path, const char *interface, const char *property, uint64_t *val) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
int r;
@@ -1688,7 +1695,7 @@ int main(int argc, char *argv[]) {
else {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
- r = bus_connect_transport_systemd(arg_transport, arg_host, arg_user, &bus);
+ r = acquire_bus(streq_ptr(argv[optind], "plot"), &bus);
if (r < 0) {
log_error_errno(r, "Failed to create bus connection: %m");
goto finish;

View File

@ -1,58 +0,0 @@
From c2ae95a71d8ceb5e7d7b766569044439ef0bad6b Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Wed, 27 Dec 2017 16:59:04 -0500
Subject: [PATCH] sysctl: use raw file descriptor in sysctl_write
The kernel returns specific error codes which may be lost if we use the
libc buffered io functions.
Fixes: https://github.com/systemd/systemd/issues/7744
---
src/shared/sysctl-util.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c
index 189580e3ed..0bc81aaa56 100644
--- a/src/shared/sysctl-util.c
+++ b/src/shared/sysctl-util.c
@@ -18,9 +18,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <errno.h>
+#include <fcntl.h>
#include <stdio.h>
#include <string.h>
+#include <unistd.h>
+#include "fd-util.h"
#include "fileio.h"
#include "log.h"
#include "macro.h"
@@ -53,6 +57,7 @@ char *sysctl_normalize(char *s) {
int sysctl_write(const char *property, const char *value) {
char *p;
+ _cleanup_close_ int fd = -1;
assert(property);
assert(value);
@@ -60,7 +65,17 @@ int sysctl_write(const char *property, const char *value) {
log_debug("Setting '%s' to '%s'", property, value);
p = strjoina("/proc/sys/", property);
- return write_string_file(p, value, WRITE_STRING_FILE_DISABLE_BUFFER);
+ fd = open(p, O_WRONLY|O_CLOEXEC);
+ if (fd < 0)
+ return -errno;
+
+ if (!endswith(value, "\n"))
+ value = strjoina(value, "\n");
+
+ if (write(fd, value, strlen(value)) < 0)
+ return -errno;
+
+ return 0;
}
int sysctl_read(const char *property, char **content) {