Hello community, here is the log from the commit of package systemd for openSUSE:Factory checked in at 2017-10-10 11:37:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/systemd (Old) and /work/SRC/openSUSE:Factory/.systemd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "systemd" Tue Oct 10 11:37:40 2017 rev:263 rq:532104 version:234 Changes: -------- --- /work/SRC/openSUSE:Factory/systemd/systemd-mini.changes 2017-09-29 11:49:54.385167280 +0200 +++ /work/SRC/openSUSE:Factory/.systemd.new/systemd-mini.changes 2017-10-10 11:37:43.057347484 +0200 @@ -1,0 +2,31 @@ +Fri Oct 6 07:44:38 UTC 2017 - [email protected] + +- Damn forgot to drop 0001-Revert-core-device-Use-JobRunningTimeoutSec-for-devi.patch in + the spec file + +------------------------------------------------------------------- +Fri Oct 6 07:30:01 UTC 2017 - [email protected] + +- Import commit 6dea894131d78b20b9e0482f75afa6ee4dec8627 + + 1cdd944b0 unit: when JobTimeoutSec= is turned off, implicitly turn off JobRunningTimeoutSec= too (bsc#1004995) + + This make 0001-Revert-core-device-Use-JobRunningTimeoutSec-for-devi.patch + not needed anymore. + +------------------------------------------------------------------- +Thu Oct 5 12:24:35 UTC 2017 - [email protected] + +- Import commit 93688f8e53b4e482a55a7d4aba2d927ddedebdde + + c53522be3 compat-rules: allow to specify the generation number through the kernel cmdline + +------------------------------------------------------------------- +Wed Oct 4 15:44:14 UTC 2017 - [email protected] + +- Import commit c1e8af7d1e8b09c2878a5b17f513bfc41ae46dc6 + + 982754275 build-sys: make sure 61-persitent-storage-compat.rules is installed with meson + 9ac2e8b9b udev: proc_cmdline_get_key() FTW! (#6925) + +------------------------------------------------------------------- systemd.changes: same change Old: ---- 0001-Revert-core-device-Use-JobRunningTimeoutSec-for-devi.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ systemd-mini.spec ++++++ --- /var/tmp/diff_new_pack.WvV63J/_old 2017-10-10 11:37:45.629234607 +0200 +++ /var/tmp/diff_new_pack.WvV63J/_new 2017-10-10 11:37:45.629234607 +0200 @@ -163,7 +163,6 @@ # patches are temporary and should be removed as soon as a fix is # merged by upstream. Patch1: 0001-core-disable-session-keyring-per-system-sevice-entir.patch -Patch2: 0001-Revert-core-device-Use-JobRunningTimeoutSec-for-devi.patch %description Systemd is a system and service manager, compatible with SysV and LSB systemd.spec: same change ++++++ systemd-234.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-234/rules/61-persistent-storage-compat.rules new/systemd-234/rules/61-persistent-storage-compat.rules --- old/systemd-234/rules/61-persistent-storage-compat.rules 2017-09-26 12:13:06.000000000 +0200 +++ new/systemd-234/rules/61-persistent-storage-compat.rules 2017-10-06 09:35:03.000000000 +0200 @@ -9,6 +9,12 @@ # relevant paths with the new ones (symlinks generated by # 60-persistent-storage.rules). # +# You might check if your system relies on one of those compat symlinks +# by disabling their creation at boot time. To do so, append +# "udev.compat_symlink_generation=0" to the kernel command line. If +# your system works flawlessly, there's a good chance that your system +# doesn't rely on them and they could be disabled permanently. +# # Thanks ! ACTION=="remove", GOTO="persistent_storage_end" @@ -20,11 +26,22 @@ TEST=="whole_disk", GOTO="persistent_storage_end" # +# The compat symlink generation number can be specified through the kernel +# command line and in that case it will take precedence. +# +# Note: any non-supported values (including "0") will disable all generations +# whereas no values specified will be equivalent to a value "1" and therefore +# will request the creation of all compat symlinks (whatever their age). +# +IMPORT{cmdline}="udev.compat_symlink_generation" +ENV{COMPAT_SYMLINK_GENERATION}="$env{udev.compat_symlink_generation}" + +# # Systems without the compat-symlinks-generation file are systems # installed before compat rules were created. They might be using # one of those compat symlinks (can be any generation). # -IMPORT{file}="/usr/lib/udev/compat-symlink-generation" +ENV{COMPAT_SYMLINK_GENERATION}!="?*", IMPORT{file}="/usr/lib/udev/compat-symlink-generation" ENV{COMPAT_SYMLINK_GENERATION}!="?*", ENV{COMPAT_SYMLINK_GENERATION}="1" # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-234/rules/meson.build new/systemd-234/rules/meson.build --- old/systemd-234/rules/meson.build 2017-09-26 12:13:06.000000000 +0200 +++ new/systemd-234/rules/meson.build 2017-10-06 09:35:03.000000000 +0200 @@ -11,6 +11,7 @@ 60-persistent-v4l.rules 60-sensor.rules 60-serial.rules + 61-persistent-storage-compat.rules 64-btrfs.rules 70-mouse.rules 70-touchpad.rules diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-234/src/basic/time-util.c new/systemd-234/src/basic/time-util.c --- old/systemd-234/src/basic/time-util.c 2017-09-26 12:13:06.000000000 +0200 +++ new/systemd-234/src/basic/time-util.c 2017-10-06 09:35:03.000000000 +0200 @@ -1010,7 +1010,11 @@ } int parse_sec_fix_0(const char *t, usec_t *usec) { + assert(t); + assert(usec); + t += strspn(t, WHITESPACE); + if (streq(t, "0")) { *usec = USEC_INFINITY; return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-234/src/core/load-fragment-gperf.gperf.m4 new/systemd-234/src/core/load-fragment-gperf.gperf.m4 --- old/systemd-234/src/core/load-fragment-gperf.gperf.m4 2017-09-26 12:13:06.000000000 +0200 +++ new/systemd-234/src/core/load-fragment-gperf.gperf.m4 2017-10-06 09:35:03.000000000 +0200 @@ -193,8 +193,8 @@ Unit.OnFailureIsolate, config_parse_job_mode_isolate, 0, offsetof(Unit, on_failure_job_mode) Unit.IgnoreOnIsolate, config_parse_bool, 0, offsetof(Unit, ignore_on_isolate) Unit.IgnoreOnSnapshot, config_parse_warn_compat, DISABLED_LEGACY, 0 -Unit.JobTimeoutSec, config_parse_sec_fix_0, 0, offsetof(Unit, job_timeout) -Unit.JobRunningTimeoutSec, config_parse_sec_fix_0, 0, offsetof(Unit, job_running_timeout) +Unit.JobTimeoutSec, config_parse_job_timeout_sec, 0, 0 +Unit.JobRunningTimeoutSec, config_parse_job_running_timeout_sec, 0, 0 Unit.JobTimeoutAction, config_parse_emergency_action, 0, offsetof(Unit, job_timeout_action) Unit.JobTimeoutRebootArgument, config_parse_unit_string_printf, 0, offsetof(Unit, job_timeout_reboot_arg) Unit.StartLimitIntervalSec, config_parse_sec, 0, offsetof(Unit, start_limit.interval) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-234/src/core/load-fragment.c new/systemd-234/src/core/load-fragment.c --- old/systemd-234/src/core/load-fragment.c 2017-09-26 12:13:06.000000000 +0200 +++ new/systemd-234/src/core/load-fragment.c 2017-10-06 09:35:03.000000000 +0200 @@ -4178,6 +4178,78 @@ return 0; } +int config_parse_job_timeout_sec( + const char* unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { + + Unit *u = data; + usec_t usec; + int r; + + assert(filename); + assert(lvalue); + assert(rvalue); + assert(u); + + r = parse_sec_fix_0(rvalue, &usec); + if (r < 0) { + log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse JobTimeoutSec= parameter, ignoring: %s", rvalue); + return 0; + } + + /* If the user explicitly changed JobTimeoutSec= also change JobRunningTimeoutSec=, for compatibility with old + * versions. If JobRunningTimeoutSec= was explicitly set, avoid this however as whatever the usec picked should + * count. */ + + if (!u->job_running_timeout_set) + u->job_running_timeout = usec; + + u->job_timeout = usec; + + return 0; +} + +int config_parse_job_running_timeout_sec( + const char* unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { + + Unit *u = data; + usec_t usec; + int r; + + assert(filename); + assert(lvalue); + assert(rvalue); + assert(u); + + r = parse_sec_fix_0(rvalue, &usec); + if (r < 0) { + log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse JobRunningTimeoutSec= parameter, ignoring: %s", rvalue); + return 0; + } + + u->job_running_timeout = usec; + u->job_running_timeout_set = true; + + return 0; +} + #define FOLLOW_MAX 8 static int open_follow(char **filename, FILE **_f, Set *names, char **_final) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-234/src/core/load-fragment.h new/systemd-234/src/core/load-fragment.h --- old/systemd-234/src/core/load-fragment.h 2017-09-26 12:13:06.000000000 +0200 +++ new/systemd-234/src/core/load-fragment.h 2017-10-06 09:35:03.000000000 +0200 @@ -118,6 +118,8 @@ int config_parse_user_group_strv(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_restrict_namespaces(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_bind_paths(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); +int config_parse_job_timeout_sec(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); +int config_parse_job_running_timeout_sec(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); /* gperf prototypes */ const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, GPERF_LEN_TYPE length); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-234/src/core/unit.h new/systemd-234/src/core/unit.h --- old/systemd-234/src/core/unit.h 2017-09-26 12:13:06.000000000 +0200 +++ new/systemd-234/src/core/unit.h 2017-10-06 09:35:03.000000000 +0200 @@ -115,6 +115,7 @@ /* Job timeout and action to take */ usec_t job_timeout; usec_t job_running_timeout; + bool job_running_timeout_set:1; EmergencyAction job_timeout_action; char *job_timeout_reboot_arg; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-234/src/udev/udev-rules.c new/systemd-234/src/udev/udev-rules.c --- old/systemd-234/src/udev/udev-rules.c 2017-09-26 12:13:06.000000000 +0200 +++ new/systemd-234/src/udev/udev-rules.c 2017-10-06 09:35:03.000000000 +0200 @@ -36,6 +36,7 @@ #include "fs-util.h" #include "glob-util.h" #include "path-util.h" +#include "proc-cmdline.h" #include "stat-util.h" #include "stdio-util.h" #include "strbuf.h" @@ -1728,6 +1729,7 @@ struct token *rule; enum escape_type esc = ESCAPE_UNSET; bool can_set_name; + int r; if (rules->tokens == NULL) return; @@ -2038,37 +2040,25 @@ break; } case TK_M_IMPORT_CMDLINE: { - _cleanup_fclose_ FILE *f = NULL; + _cleanup_free_ char *value = NULL; bool imported = false; + const char *key; - f = fopen("/proc/cmdline", "re"); - if (f != NULL) { - char cmdline[4096]; - - if (fgets(cmdline, sizeof(cmdline), f) != NULL) { - const char *key = rules_str(rules, cur->key.value_off); - char *pos; - - pos = strstr(cmdline, key); - if (pos != NULL) { - imported = true; - pos += strlen(key); - if (pos[0] == '\0' || isspace(pos[0])) - /* we import simple flags as 'FLAG=1' */ - udev_device_add_property(event->dev, key, "1"); - else if (pos[0] == '=') { - const char *value; - - pos++; - value = pos; - while (pos[0] != '\0' && !isspace(pos[0])) - pos++; - pos[0] = '\0'; - udev_device_add_property(event->dev, key, value); - } - } - } + key = rules_str(rules, cur->key.value_off); + + r = proc_cmdline_get_key(key, PROC_CMDLINE_VALUE_OPTIONAL, &value); + if (r < 0) + log_debug_errno(r, "Failed to read %s from /proc/cmdline, ignoring: %m", key); + else if (r > 0) { + imported = true; + + if (value) + udev_device_add_property(event->dev, key, value); + else + /* we import simple flags as 'FLAG=1' */ + udev_device_add_property(event->dev, key, "1"); } + if (!imported && cur->key.op != OP_NOMATCH) goto nomatch; break; @@ -2108,7 +2098,6 @@ case TK_A_OWNER: { char owner[UTIL_NAME_SIZE]; const char *ow = owner; - int r; if (event->owner_final) break; @@ -2130,7 +2119,6 @@ case TK_A_GROUP: { char group[UTIL_NAME_SIZE]; const char *gr = group; - int r; if (event->group_final) break; @@ -2381,7 +2369,6 @@ case TK_A_SYSCTL: { char filename[UTIL_PATH_SIZE]; char value[UTIL_NAME_SIZE]; - int r; udev_event_apply_format(event, rules_str(rules, cur->key.attr_off), filename, sizeof(filename), false); sysctl_normalize(filename);
