forked from pool/systemd
.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=812
This commit is contained in:
parent
874b1b67ca
commit
f90c0e1841
36
0001-core-don-t-allow-enabling-if-unit-is-masked.patch
Normal file
36
0001-core-don-t-allow-enabling-if-unit-is-masked.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From f7101b7368dfe41dbc8b7203e06133cccb589c01 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Synacek <jsynacek@redhat.com>
|
||||
Date: Tue, 7 Oct 2014 13:35:41 +0200
|
||||
Subject: [PATCH] core: don't allow enabling if unit is masked
|
||||
|
||||
---
|
||||
src/shared/install.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git src/shared/install.c src/shared/install.c
|
||||
index fa064c2..945bb27 100644
|
||||
--- src/shared/install.c
|
||||
+++ src/shared/install.c
|
||||
@@ -1516,6 +1516,19 @@ int unit_file_enable(
|
||||
return r;
|
||||
|
||||
STRV_FOREACH(i, files) {
|
||||
+ UnitFileState state;
|
||||
+
|
||||
+ state = unit_file_get_state(scope, root_dir, *i);
|
||||
+ if (state < 0) {
|
||||
+ log_error("Failed to get unit file state for %s: %s", *i, strerror(-state));
|
||||
+ return state;
|
||||
+ }
|
||||
+
|
||||
+ if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) {
|
||||
+ log_error("Failed to enable unit: Unit %s is masked", *i);
|
||||
+ return -ENOTSUP;
|
||||
+ }
|
||||
+
|
||||
r = install_info_add_auto(&c, *i);
|
||||
if (r < 0)
|
||||
return r;
|
||||
--
|
||||
1.7.9.2
|
||||
|
25
0002-snapshot-return-error-when-snapshot-exists.patch
Normal file
25
0002-snapshot-return-error-when-snapshot-exists.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 7cabba07745b388497e8c0fc19b61984167fd474 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Tue, 28 Oct 2014 12:36:17 -0400
|
||||
Subject: [PATCH] snapshot: return error when snapshot exists
|
||||
|
||||
---
|
||||
src/core/snapshot.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git src/core/snapshot.c src/core/snapshot.c
|
||||
index 5eed615..c2678cb 100644
|
||||
--- src/core/snapshot.c
|
||||
+++ src/core/snapshot.c
|
||||
@@ -208,7 +208,7 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, sd_bus_error *e,
|
||||
return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Unit name %s lacks snapshot suffix.", name);
|
||||
|
||||
if (manager_get_unit(m, name))
|
||||
- sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
|
||||
+ return sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
|
||||
|
||||
} else {
|
||||
|
||||
--
|
||||
1.7.9.2
|
||||
|
@ -0,0 +1,39 @@
|
||||
From 0ffce503cd6e5a5ff5ba5cd1cc23684cfb8bb9e3 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Reisner <dreisner@archlinux.org>
|
||||
Date: Thu, 30 Oct 2014 20:12:05 -0400
|
||||
Subject: [PATCH] shared/install: avoid prematurely rejecting "missing" units
|
||||
|
||||
f7101b7368df copied some logic to prevent enabling masked units, but
|
||||
also added a check which causes attempts to enable templated units to
|
||||
fail. Since we know the logic beyond this check will properly handle
|
||||
units which truly do not exist, we can rely on the unit file state
|
||||
comparison to suffice for expressing the intent of f7101b7368df.
|
||||
|
||||
ref: https://bugs.archlinux.org/task/42616
|
||||
---
|
||||
src/shared/install.c | 8 +++-----
|
||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git src/shared/install.c src/shared/install.c
|
||||
index 035b44c..cab93e8 100644
|
||||
--- src/shared/install.c
|
||||
+++ src/shared/install.c
|
||||
@@ -1620,12 +1620,10 @@ int unit_file_enable(
|
||||
STRV_FOREACH(i, files) {
|
||||
UnitFileState state;
|
||||
|
||||
+ /* We only want to know if this unit is masked, so we ignore
|
||||
+ * errors from unit_file_get_state, deferring other checks.
|
||||
+ * This allows templated units to be enabled on the fly. */
|
||||
state = unit_file_get_state(scope, root_dir, *i);
|
||||
- if (state < 0) {
|
||||
- log_error("Failed to get unit file state for %s: %s", *i, strerror(-state));
|
||||
- return state;
|
||||
- }
|
||||
-
|
||||
if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) {
|
||||
log_error("Failed to enable unit: Unit %s is masked", *i);
|
||||
return -ENOTSUP;
|
||||
--
|
||||
1.7.9.2
|
||||
|
42
0004-Raise-level-of-Found-dependency.-lines.patch
Normal file
42
0004-Raise-level-of-Found-dependency.-lines.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 14fe721b5f6d8457cc8737fa75f2ed79e7fa534b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 2 Nov 2014 12:10:42 -0500
|
||||
Subject: [PATCH] Raise level of 'Found dependency...' lines
|
||||
|
||||
This way they always show up together with 'Found ordering cycle...'.
|
||||
Ordering cycles are a serious error and a major pain to debug. If
|
||||
quiet is enabled, only the first and the last line of output are
|
||||
shown:
|
||||
|
||||
systemd[1]: Found ordering cycle on basic.target/start
|
||||
systemd[1]: Breaking ordering cycle by deleting job timers.target/start
|
||||
systemd[1]: Job timers.target/start deleted to break ordering cycle starting with basic.target/start
|
||||
|
||||
which isn't particularly enlightening. So just show the whole message
|
||||
at the same level.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1158206
|
||||
---
|
||||
src/core/transaction.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git src/core/transaction.c src/core/transaction.c
|
||||
index 488cb86..bbaa6da 100644
|
||||
--- src/core/transaction.c
|
||||
+++ src/core/transaction.c
|
||||
@@ -376,9 +376,9 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
|
||||
for (k = from; k; k = ((k->generation == generation && k->marker != k) ? k->marker : NULL)) {
|
||||
|
||||
/* logging for j not k here here to provide consistent narrative */
|
||||
- log_info_unit(j->unit->id,
|
||||
- "Found dependency on %s/%s",
|
||||
- k->unit->id, job_type_to_string(k->type));
|
||||
+ log_warning_unit(j->unit->id,
|
||||
+ "Found dependency on %s/%s",
|
||||
+ k->unit->id, job_type_to_string(k->type));
|
||||
|
||||
if (!delete && hashmap_get(tr->jobs, k->unit) &&
|
||||
!unit_matters_to_anchor(k->unit, k)) {
|
||||
--
|
||||
1.7.9.2
|
||||
|
38
0005-units-order-sd-journal-flush-after-sd-remount-fs.patch
Normal file
38
0005-units-order-sd-journal-flush-after-sd-remount-fs.patch
Normal file
@ -0,0 +1,38 @@
|
||||
Based on 1f1926aa5e836caa3bd6df43704aecd606135103 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 2 Nov 2014 21:45:42 -0500
|
||||
Subject: [PATCH] units: order sd-journal-flush after sd-remount-fs
|
||||
|
||||
Otherwise we could attempt to flush the journal while /var/log/ was
|
||||
still ro, and silently skip journal flushing.
|
||||
|
||||
The way that errors in flushing are handled should still be changed to
|
||||
be more transparent and robust.
|
||||
|
||||
Based on 919699ec301ea507edce4a619141ed22e789ac0d Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 31 Oct 2014 16:22:36 +0100
|
||||
Subject: [PATCH] units: don't order journal flushing afte remote-fs.target
|
||||
|
||||
Instead, only depend on the actual file systems we need.
|
||||
|
||||
This should solve dep loops on setups where remote-fs.target is moved
|
||||
into late boot.
|
||||
---
|
||||
units/systemd-journal-flush.service.in | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- units/systemd-journal-flush.service.in
|
||||
+++ units/systemd-journal-flush.service.in 2014-11-10 11:46:22.885518923 +0000
|
||||
@@ -10,8 +10,9 @@ Description=Trigger Flushing of Journal
|
||||
Documentation=man:systemd-journald.service(8) man:journald.conf(5)
|
||||
DefaultDependencies=no
|
||||
Requires=systemd-journald.service
|
||||
-After=systemd-journald.service local-fs.target remote-fs.target
|
||||
-Before=systemd-user-sessions.service
|
||||
+After=systemd-journald.service local-fs.target
|
||||
+After=systemd-remount-fs.service
|
||||
+Before=systemd-user-sessions.service systemd-tmpfiles-setup.service
|
||||
|
||||
[Service]
|
||||
ExecStart=@rootbindir@/systemctl kill --kill-who=main --signal=SIGUSR1 systemd-journald.service
|
24
0006-journald-fix-minor-memory-leak.patch
Normal file
24
0006-journald-fix-minor-memory-leak.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 99d0966e75a984bed4f117c888ecc93e16e7b7b6 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 3 Nov 2014 21:11:16 +0100
|
||||
Subject: [PATCH] journald: fix minor memory leak
|
||||
|
||||
---
|
||||
src/journal/journald-server.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git src/journal/journald-server.c src/journal/journald-server.c
|
||||
index e062427..cf6bbcc 100644
|
||||
--- src/journal/journald-server.c
|
||||
+++ src/journal/journald-server.c
|
||||
@@ -1690,6 +1690,7 @@ void server_done(Server *s) {
|
||||
free(s->buffer);
|
||||
free(s->tty_path);
|
||||
free(s->cgroup_root);
|
||||
+ free(s->hostname_field);
|
||||
|
||||
if (s->mmap)
|
||||
mmap_cache_unref(s->mmap);
|
||||
--
|
||||
1.7.9.2
|
||||
|
@ -0,0 +1,55 @@
|
||||
From 332076b45b8a78f018ade2dfdc7e4279a56d49cc Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 3 Nov 2014 23:10:21 +0100
|
||||
Subject: [PATCH] journald: also check journal file size to deduce if it is
|
||||
empty
|
||||
|
||||
---
|
||||
src/journal/journal-vacuum.c | 22 +++++++++++++++-------
|
||||
1 file changed, 15 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git src/journal/journal-vacuum.c src/journal/journal-vacuum.c
|
||||
index dbf5d22..d141fe0 100644
|
||||
--- src/journal/journal-vacuum.c
|
||||
+++ src/journal/journal-vacuum.c
|
||||
@@ -121,22 +121,30 @@ static void patch_realtime(
|
||||
}
|
||||
|
||||
static int journal_file_empty(int dir_fd, const char *name) {
|
||||
- int r;
|
||||
- le64_t n_entries;
|
||||
_cleanup_close_ int fd;
|
||||
+ struct stat st;
|
||||
+ le64_t n_entries;
|
||||
+ ssize_t n;
|
||||
|
||||
fd = openat(dir_fd, name, O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK);
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
- if (lseek(fd, offsetof(Header, n_entries), SEEK_SET) < 0)
|
||||
+ if (fstat(fd, &st) < 0)
|
||||
return -errno;
|
||||
|
||||
- r = read(fd, &n_entries, sizeof(n_entries));
|
||||
- if (r != sizeof(n_entries))
|
||||
- return r == 0 ? -EINVAL : -errno;
|
||||
+ /* If an offline file doesn't even have a header we consider it empty */
|
||||
+ if (st.st_size < (off_t) sizeof(Header))
|
||||
+ return 1;
|
||||
+
|
||||
+ /* If the number of entries is empty, we consider it empty, too */
|
||||
+ n = pread(fd, &n_entries, sizeof(n_entries), offsetof(Header, n_entries));
|
||||
+ if (n < 0)
|
||||
+ return -errno;
|
||||
+ if (n != sizeof(n_entries))
|
||||
+ return -EIO;
|
||||
|
||||
- return le64toh(n_entries) == 0;
|
||||
+ return le64toh(n_entries) <= 0;
|
||||
}
|
||||
|
||||
int journal_directory_vacuum(
|
||||
--
|
||||
1.7.9.2
|
||||
|
29
0008-journald-fix-memory-leak-on-error-path.patch
Normal file
29
0008-journald-fix-memory-leak-on-error-path.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 26d8ff04914a5208d029e899682cd314b7714bf0 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 3 Nov 2014 23:10:34 +0100
|
||||
Subject: [PATCH] journald: fix memory leak on error path
|
||||
|
||||
---
|
||||
src/journal/journal-vacuum.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git src/journal/journal-vacuum.c src/journal/journal-vacuum.c
|
||||
index d141fe0..80723c4 100644
|
||||
--- src/journal/journal-vacuum.c
|
||||
+++ src/journal/journal-vacuum.c
|
||||
@@ -283,7 +283,11 @@ int journal_directory_vacuum(
|
||||
|
||||
patch_realtime(directory, p, &st, &realtime);
|
||||
|
||||
- GREEDY_REALLOC(list, n_allocated, n_list + 1);
|
||||
+ if (!GREEDY_REALLOC(list, n_allocated, n_list + 1)) {
|
||||
+ free(p);
|
||||
+ r = -ENOMEM;
|
||||
+ goto finish;
|
||||
+ }
|
||||
|
||||
list[n_list].filename = p;
|
||||
list[n_list].usage = 512UL * (uint64_t) st.st_blocks;
|
||||
--
|
||||
1.7.9.2
|
||||
|
27
0009-units-make-systemd-journald.service-Type-notify.patch
Normal file
27
0009-units-make-systemd-journald.service-Type-notify.patch
Normal file
@ -0,0 +1,27 @@
|
||||
Based on a87a38c20196a4aeb56b6ba71d688eefd0b21c30 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 20:28:08 +0100
|
||||
Subject: [PATCH] units: make systemd-journald.service Type=notify
|
||||
|
||||
It already calls sd_notify(), so it looks like an oversight.
|
||||
|
||||
Without it, its ordering to systemd-journal-flush.service is
|
||||
non-deterministic and the SIGUSR1 from flushing may kill journald before
|
||||
it has its signal handlers set up.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=85871
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1159641
|
||||
---
|
||||
units/systemd-journald.service.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- units/systemd-journald.service.in
|
||||
+++ units/systemd-journald.service.in 2014-11-10 12:22:08.461949786 +0000
|
||||
@@ -14,6 +14,7 @@ After=systemd-journald.socket syslog.soc
|
||||
Before=sysinit.target
|
||||
|
||||
[Service]
|
||||
+Type=notify
|
||||
ExecStart=@rootlibexecdir@/systemd-journald
|
||||
Restart=always
|
||||
RestartSec=0
|
@ -0,0 +1,77 @@
|
||||
From 5d20fde4a5c4dff4d7c737b545fbd13582d544c1 Mon Sep 17 00:00:00 2001
|
||||
From: Marcel Holtmann <marcel@holtmann.org>
|
||||
Date: Fri, 31 Oct 2014 20:37:59 +0100
|
||||
Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
|
||||
|
||||
---
|
||||
hwdb/20-bluetooth-vendor-product.hwdb | 57 +++++++++++++++++++++++++++++++++
|
||||
1 file changed, 57 insertions(+)
|
||||
|
||||
diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb
|
||||
index ee2efdf..58ca87d 100644
|
||||
--- hwdb/20-bluetooth-vendor-product.hwdb
|
||||
+++ hwdb/20-bluetooth-vendor-product.hwdb
|
||||
@@ -1166,3 +1166,60 @@ bluetooth:v0181*
|
||||
|
||||
bluetooth:v0182*
|
||||
ID_VENDOR_FROM_DATABASE=HOP Ubiquitous
|
||||
+
|
||||
+bluetooth:v0183*
|
||||
+ ID_VENDOR_FROM_DATABASE=To Be Assigned
|
||||
+
|
||||
+bluetooth:v0184*
|
||||
+ ID_VENDOR_FROM_DATABASE=Nectar
|
||||
+
|
||||
+bluetooth:v0185*
|
||||
+ ID_VENDOR_FROM_DATABASE=bel'apps LLC
|
||||
+
|
||||
+bluetooth:v0186*
|
||||
+ ID_VENDOR_FROM_DATABASE=CORE Lighting Ltd
|
||||
+
|
||||
+bluetooth:v0187*
|
||||
+ ID_VENDOR_FROM_DATABASE=Seraphim Sense Ltd
|
||||
+
|
||||
+bluetooth:v0188*
|
||||
+ ID_VENDOR_FROM_DATABASE=Unico RBC
|
||||
+
|
||||
+bluetooth:v0189*
|
||||
+ ID_VENDOR_FROM_DATABASE=Physical Enterprises Inc.
|
||||
+
|
||||
+bluetooth:v018A*
|
||||
+ ID_VENDOR_FROM_DATABASE=Able Trend Technology Limited
|
||||
+
|
||||
+bluetooth:v018B*
|
||||
+ ID_VENDOR_FROM_DATABASE=Konica Minolta, Inc.
|
||||
+
|
||||
+bluetooth:v018C*
|
||||
+ ID_VENDOR_FROM_DATABASE=Wilo SE
|
||||
+
|
||||
+bluetooth:v018D*
|
||||
+ ID_VENDOR_FROM_DATABASE=Extron Design Services
|
||||
+
|
||||
+bluetooth:v018E*
|
||||
+ ID_VENDOR_FROM_DATABASE=Fitbit, Inc.
|
||||
+
|
||||
+bluetooth:v018F*
|
||||
+ ID_VENDOR_FROM_DATABASE=Fireflies Systems
|
||||
+
|
||||
+bluetooth:v0190*
|
||||
+ ID_VENDOR_FROM_DATABASE=Intelletto Technologies Inc.
|
||||
+
|
||||
+bluetooth:v0191*
|
||||
+ ID_VENDOR_FROM_DATABASE=FDK CORPORATION
|
||||
+
|
||||
+bluetooth:v0192*
|
||||
+ ID_VENDOR_FROM_DATABASE=Cloudleaf, Inc
|
||||
+
|
||||
+bluetooth:v0193*
|
||||
+ ID_VENDOR_FROM_DATABASE=Maveric Automation LLC
|
||||
+
|
||||
+bluetooth:v0194*
|
||||
+ ID_VENDOR_FROM_DATABASE=Acoustic Stream Corporation
|
||||
+
|
||||
+bluetooth:v0195*
|
||||
+ ID_VENDOR_FROM_DATABASE=Zuli
|
||||
--
|
||||
1.7.9.2
|
||||
|
67
1092-libudev-do-not-accept-invalid-log-levels.patch
Normal file
67
1092-libudev-do-not-accept-invalid-log-levels.patch
Normal file
@ -0,0 +1,67 @@
|
||||
Based on ee7122c0ec6aa11f02e9e8d94254b353f12d2c14 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sat, 1 Nov 2014 12:06:41 -0400
|
||||
Subject: [PATCH] libudev: do not accept invalid log levels
|
||||
|
||||
Invalid log levels lead to a assert failure later on.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=85657
|
||||
---
|
||||
src/libudev/libudev-util.c | 10 +++++++---
|
||||
src/libudev/libudev.c | 19 ++++++++++++++++---
|
||||
2 files changed, 23 insertions(+), 6 deletions(-)
|
||||
|
||||
--- src/libudev/libudev-util.c
|
||||
+++ src/libudev/libudev-util.c 2014-11-10 11:33:26.269519209 +0000
|
||||
@@ -255,9 +255,13 @@ int util_log_priority(const char *priori
|
||||
char *endptr;
|
||||
int prio;
|
||||
|
||||
- prio = strtol(priority, &endptr, 10);
|
||||
- if (endptr[0] == '\0' || isspace(endptr[0]))
|
||||
- return prio;
|
||||
+ prio = strtoul(priority, &endptr, 10);
|
||||
+ if (endptr[0] == '\0' || isspace(endptr[0])) {
|
||||
+ if (prio >= 0 && prio <= 7)
|
||||
+ return prio;
|
||||
+ else
|
||||
+ return -ERANGE;
|
||||
+ }
|
||||
if (startswith(priority, "err"))
|
||||
return LOG_ERR;
|
||||
if (startswith(priority, "info"))
|
||||
--- src/libudev/libudev.c
|
||||
+++ src/libudev/libudev.c
|
||||
@@ -193,7 +193,13 @@ _public_ struct udev *udev_new(void)
|
||||
}
|
||||
|
||||
if (streq(key, "udev_log")) {
|
||||
- udev_set_log_priority(udev, util_log_priority(val));
|
||||
+ int prio;
|
||||
+
|
||||
+ prio = util_log_priority(val);
|
||||
+ if (prio < 0)
|
||||
+ udev_err(udev, "/etc/udev/udev.conf:%u: invalid logging level '%s', ignoring.\n", line_nr, val);
|
||||
+ else
|
||||
+ udev_set_log_priority(udev, prio);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -201,8 +207,15 @@ _public_ struct udev *udev_new(void)
|
||||
|
||||
/* environment overrides config */
|
||||
env = secure_getenv("UDEV_LOG");
|
||||
- if (env != NULL)
|
||||
- udev_set_log_priority(udev, util_log_priority(env));
|
||||
+ if (env != NULL) {
|
||||
+ int prio;
|
||||
+
|
||||
+ prio = util_log_priority(env);
|
||||
+ if (prio < 0)
|
||||
+ udev_err(udev, "$UDEV_LOG specifies invalid logging level '%s', ignoring.\n", env);
|
||||
+ else
|
||||
+ udev_set_log_priority(udev, prio);
|
||||
+ }
|
||||
|
||||
return udev;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
Based on f671774f52838d35d78e62ddcb781b5b65b3373f Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 23:45:15 +0000
|
||||
Subject: [PATCH] udev: Fix parsing of udev.event-timeout kernel parameter.
|
||||
|
||||
---
|
||||
src/udev/udevd.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- src/udev/udevd.c
|
||||
+++ src/udev/udevd.c 2014-11-10 12:28:20.385559165 +0000
|
||||
@@ -1011,9 +1011,9 @@ static void kernel_cmdline_options(struc
|
||||
if (r < 0)
|
||||
log_warning("Invalid udev.exec-delay ignored: %s", opt + 16);
|
||||
} else if (startswith(opt, "udev.event-timeout=")) {
|
||||
- r = safe_atou64(opt + 16, &event_timeout_usec);
|
||||
+ r = safe_atou64(opt + 19, &event_timeout_usec);
|
||||
if (r < 0) {
|
||||
- log_warning("Invalid udev.event-timeout ignored: %s", opt + 16);
|
||||
+ log_warning("Invalid udev.event-timeout ignored: %s", opt + 19);
|
||||
break;
|
||||
}
|
||||
event_timeout_usec *= USEC_PER_SEC;
|
@ -0,0 +1,58 @@
|
||||
Based on cfe2061add5479710f6597899d632e64c54e62ef Mon Sep 17 00:00:00 2001
|
||||
From: David Herrmann <dh.herrmann@gmail.com>
|
||||
Date: Wed, 5 Nov 2014 12:56:49 +0100
|
||||
Subject: [PATCH] udev: avoid magic constants in kernel-cmdline parsers
|
||||
|
||||
Lets recognize the fact that startswith() returns a pointer to the tail on
|
||||
success. Use it instead of hard-coding string-lengths as magic constants.
|
||||
---
|
||||
src/udev/udevd.c | 24 ++++++++++++------------
|
||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
--- src/udev/udevd.c
|
||||
+++ src/udev/udevd.c 2014-11-10 12:31:15.745519116 +0000
|
||||
@@ -984,7 +984,7 @@ static void kernel_cmdline_options(struc
|
||||
return;
|
||||
|
||||
FOREACH_WORD_QUOTED(w, l, line, state) {
|
||||
- char *s, *opt;
|
||||
+ char *s, *opt, *value;
|
||||
|
||||
s = strndup(w, l);
|
||||
if (!s)
|
||||
@@ -996,24 +996,24 @@ static void kernel_cmdline_options(struc
|
||||
else
|
||||
opt = s;
|
||||
|
||||
- if (startswith(opt, "udev.log-priority=")) {
|
||||
+ if ((value = startswith(opt, "udev.log-priority="))) {
|
||||
int prio;
|
||||
|
||||
- prio = util_log_priority(opt + 18);
|
||||
+ prio = util_log_priority(value);
|
||||
log_set_max_level(prio);
|
||||
udev_set_log_priority(udev, prio);
|
||||
- } else if (startswith(opt, "udev.children-max=")) {
|
||||
- r = safe_atoi(opt + 18, &children_max);
|
||||
+ } else if ((value = startswith(opt, "udev.children-max="))) {
|
||||
+ r = safe_atoi(value, &children_max);
|
||||
if (r < 0)
|
||||
- log_warning("Invalid udev.children-max ignored: %s", opt + 18);
|
||||
- } else if (startswith(opt, "udev.exec-delay=")) {
|
||||
- r = safe_atoi(opt + 16, &exec_delay);
|
||||
+ log_warning("Invalid udev.children-max ignored: %s", value);
|
||||
+ } else if ((value = startswith(opt, "udev.exec-delay="))) {
|
||||
+ r = safe_atoi(value, &exec_delay);
|
||||
if (r < 0)
|
||||
- log_warning("Invalid udev.exec-delay ignored: %s", opt + 16);
|
||||
- } else if (startswith(opt, "udev.event-timeout=")) {
|
||||
- r = safe_atou64(opt + 19, &event_timeout_usec);
|
||||
+ log_warning("Invalid udev.exec-delay ignored: %s", value);
|
||||
+ } else if ((value = startswith(opt, "udev.event-timeout="))) {
|
||||
+ r = safe_atou64(value, &event_timeout_usec);
|
||||
if (r < 0) {
|
||||
- log_warning("Invalid udev.event-timeout ignored: %s", opt + 19);
|
||||
+ log_warning("Invalid udev.event-timeout ignored: %s", value);
|
||||
break;
|
||||
}
|
||||
event_timeout_usec *= USEC_PER_SEC;
|
@ -1,3 +1,26 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 10 12:39:35 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstream patches
|
||||
0001-core-don-t-allow-enabling-if-unit-is-masked.patch
|
||||
0002-snapshot-return-error-when-snapshot-exists.patch
|
||||
0003-shared-install-avoid-prematurely-rejecting-missing-u.patch
|
||||
0004-Raise-level-of-Found-dependency.-lines.patch
|
||||
0005-units-order-sd-journal-flush-after-sd-remount-fs.patch
|
||||
0006-journald-fix-minor-memory-leak.patch
|
||||
0007-journald-also-check-journal-file-size-to-deduce-if-i.patch
|
||||
0008-journald-fix-memory-leak-on-error-path.patch
|
||||
0009-units-make-systemd-journald.service-Type-notify.patch
|
||||
0010-hwdb-Update-database-of-Bluetooth-company-identifier.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 10 12:36:34 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstream patches
|
||||
1092-libudev-do-not-accept-invalid-log-levels.patch
|
||||
1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch
|
||||
1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 7 09:45:20 UTC 2014 - werner@suse.de
|
||||
|
||||
|
@ -1008,6 +1008,26 @@ Patch488: 0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch
|
||||
Patch489: 0002-keymap-Ignore-brightness-keys-on-Dell-Inspiron-1520-.patch
|
||||
# PATCH-FIX-SUSE added at 2014/11/05
|
||||
Patch490: watch_resolv.conf_for_become_changed.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch491: 0001-core-don-t-allow-enabling-if-unit-is-masked.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch492: 0002-snapshot-return-error-when-snapshot-exists.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch493: 0003-shared-install-avoid-prematurely-rejecting-missing-u.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch494: 0004-Raise-level-of-Found-dependency.-lines.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch495: 0005-units-order-sd-journal-flush-after-sd-remount-fs.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch496: 0006-journald-fix-minor-memory-leak.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch497: 0007-journald-also-check-journal-file-size-to-deduce-if-i.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch498: 0008-journald-fix-memory-leak-on-error-path.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch499: 0009-units-make-systemd-journald.service-Type-notify.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch500: 0010-hwdb-Update-database-of-Bluetooth-company-identifier.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -1197,6 +1217,12 @@ Patch1089: 1089-fix-cgroup-device-controller.patch
|
||||
Patch1090: 1090-udev-path_id-set-supported_parent-for-well-known-SCS.patch
|
||||
# PATCH-FIX-UPSTREAM 1091-udev-path_id-update-comments.patch
|
||||
Patch1091: 1091-udev-path_id-update-comments.patch
|
||||
# PATCH-FIX-UPSTREAM 1092-libudev-do-not-accept-invalid-log-levels.patch
|
||||
Patch1092: 1092-libudev-do-not-accept-invalid-log-levels.patch
|
||||
# PATCH-FIX-UPSTREAM 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch
|
||||
Patch1093: 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch
|
||||
# PATCH-FIX-UPSTREAM 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch
|
||||
Patch1094: 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch
|
||||
|
||||
%description
|
||||
Systemd is a system and service manager, compatible with SysV and LSB
|
||||
@ -1849,6 +1875,16 @@ cp %{SOURCE7} m4/
|
||||
%patch488 -p0
|
||||
%patch489 -p0
|
||||
%patch490 -p0
|
||||
%patch491 -p0
|
||||
%patch492 -p0
|
||||
%patch493 -p0
|
||||
%patch494 -p0
|
||||
%patch495 -p0
|
||||
%patch496 -p0
|
||||
%patch497 -p0
|
||||
%patch498 -p0
|
||||
%patch499 -p0
|
||||
%patch500 -p0
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
@ -1975,6 +2011,9 @@ cp %{SOURCE7} m4/
|
||||
%patch1090 -p0
|
||||
%patch1091 -p0
|
||||
%endif
|
||||
%patch1092 -p0
|
||||
%patch1093 -p0
|
||||
%patch1094 -p0
|
||||
|
||||
# remove patch backups
|
||||
find -name '*.orig' -exec rm -f '{}' \+
|
||||
|
@ -1,3 +1,26 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 10 12:39:35 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstream patches
|
||||
0001-core-don-t-allow-enabling-if-unit-is-masked.patch
|
||||
0002-snapshot-return-error-when-snapshot-exists.patch
|
||||
0003-shared-install-avoid-prematurely-rejecting-missing-u.patch
|
||||
0004-Raise-level-of-Found-dependency.-lines.patch
|
||||
0005-units-order-sd-journal-flush-after-sd-remount-fs.patch
|
||||
0006-journald-fix-minor-memory-leak.patch
|
||||
0007-journald-also-check-journal-file-size-to-deduce-if-i.patch
|
||||
0008-journald-fix-memory-leak-on-error-path.patch
|
||||
0009-units-make-systemd-journald.service-Type-notify.patch
|
||||
0010-hwdb-Update-database-of-Bluetooth-company-identifier.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 10 12:36:34 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstream patches
|
||||
1092-libudev-do-not-accept-invalid-log-levels.patch
|
||||
1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch
|
||||
1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 7 09:45:20 UTC 2014 - werner@suse.de
|
||||
|
||||
|
39
systemd.spec
39
systemd.spec
@ -1003,6 +1003,26 @@ Patch488: 0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch
|
||||
Patch489: 0002-keymap-Ignore-brightness-keys-on-Dell-Inspiron-1520-.patch
|
||||
# PATCH-FIX-SUSE added at 2014/11/05
|
||||
Patch490: watch_resolv.conf_for_become_changed.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch491: 0001-core-don-t-allow-enabling-if-unit-is-masked.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch492: 0002-snapshot-return-error-when-snapshot-exists.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch493: 0003-shared-install-avoid-prematurely-rejecting-missing-u.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch494: 0004-Raise-level-of-Found-dependency.-lines.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch495: 0005-units-order-sd-journal-flush-after-sd-remount-fs.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch496: 0006-journald-fix-minor-memory-leak.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch497: 0007-journald-also-check-journal-file-size-to-deduce-if-i.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch498: 0008-journald-fix-memory-leak-on-error-path.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch499: 0009-units-make-systemd-journald.service-Type-notify.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/11/07
|
||||
Patch500: 0010-hwdb-Update-database-of-Bluetooth-company-identifier.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -1192,6 +1212,12 @@ Patch1089: 1089-fix-cgroup-device-controller.patch
|
||||
Patch1090: 1090-udev-path_id-set-supported_parent-for-well-known-SCS.patch
|
||||
# PATCH-FIX-UPSTREAM 1091-udev-path_id-update-comments.patch
|
||||
Patch1091: 1091-udev-path_id-update-comments.patch
|
||||
# PATCH-FIX-UPSTREAM 1092-libudev-do-not-accept-invalid-log-levels.patch
|
||||
Patch1092: 1092-libudev-do-not-accept-invalid-log-levels.patch
|
||||
# PATCH-FIX-UPSTREAM 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch
|
||||
Patch1093: 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch
|
||||
# PATCH-FIX-UPSTREAM 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch
|
||||
Patch1094: 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch
|
||||
|
||||
%description
|
||||
Systemd is a system and service manager, compatible with SysV and LSB
|
||||
@ -1844,6 +1870,16 @@ cp %{SOURCE7} m4/
|
||||
%patch488 -p0
|
||||
%patch489 -p0
|
||||
%patch490 -p0
|
||||
%patch491 -p0
|
||||
%patch492 -p0
|
||||
%patch493 -p0
|
||||
%patch494 -p0
|
||||
%patch495 -p0
|
||||
%patch496 -p0
|
||||
%patch497 -p0
|
||||
%patch498 -p0
|
||||
%patch499 -p0
|
||||
%patch500 -p0
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
@ -1970,6 +2006,9 @@ cp %{SOURCE7} m4/
|
||||
%patch1090 -p0
|
||||
%patch1091 -p0
|
||||
%endif
|
||||
%patch1092 -p0
|
||||
%patch1093 -p0
|
||||
%patch1094 -p0
|
||||
|
||||
# remove patch backups
|
||||
find -name '*.orig' -exec rm -f '{}' \+
|
||||
|
Loading…
Reference in New Issue
Block a user