Hello community, here is the log from the commit of package systemd for openSUSE:Factory checked in at 2018-04-25 09:58:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/systemd (Old) and /work/SRC/openSUSE:Factory/.systemd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "systemd" Wed Apr 25 09:58:40 2018 rev:277 rq:599906 version:237 Changes: -------- --- /work/SRC/openSUSE:Factory/systemd/systemd-mini.changes 2018-04-07 20:47:08.859909661 +0200 +++ /work/SRC/openSUSE:Factory/.systemd.new/systemd-mini.changes 2018-04-25 09:58:46.484515069 +0200 @@ -1,0 +2,31 @@ +Mon Apr 23 07:45:32 UTC 2018 - f...@suse.com + +- Import commit d8196805089566ecd846b7c627ff2f3c42588c50 + + 621b247f3 device: skip deserialization of device units when udevd is not running + a7da5bdbc device: make sure to always retroactively start device dependencies (bsc#1088052) + 303624f6f systemd-udevd: limit children-max by available memory (#8668) (bsc#1086785 bsc#1066422) + 76acf3ae9 tmpfiles: fix directory removal with force symlink (#8619) + +------------------------------------------------------------------- +Fri Apr 20 08:27:41 UTC 2018 - f...@suse.com + +- Ship 99-sysctl.conf instead of creating it during package installation/update (bsc#1088769) + + Previously this symlink was created in /etc/sysctl.d during %post + which made the symlink not owned and more importantly it was created + only if /etc/sysctl.conf is already installed which is not always + the case during the installation process it seems. + + So ship the symlink unconditionally and put it in /usr/lib/sysctl.d + instead since it's a distro default behavior that might be overriden + by sysadmin later. + +------------------------------------------------------------------- +Mon Apr 9 09:42:16 UTC 2018 - f...@suse.com + +- Be consistent in 60-io-scheduler.rules + + And use "?*" when checking for the non empty string (instead of "*?"). + +------------------------------------------------------------------- @@ -63,0 +95,12 @@ + +------------------------------------------------------------------- +Tue Mar 27 20:14:41 UTC 2018 - devel...@develop7.info + +- Enhance IO scheduler tweaking rules to support blk-mq as well + + * Set optimal blk-mq schedulers (bfq and mq-deadline for HDD and + SSD respectively) + * Explicitly set CFQ for rotational disks when no `elevator` + is specified + * Verbose comments explaining what is going on + * Rename the rules file since it is not ssd-only anymore systemd.changes: same change Old: ---- 60-ssd-scheduler.rules systemd-v237+suse.52.g14b3e00c3.tar.xz New: ---- 60-io-scheduler.rules systemd-v237+suse.57.gd81968050.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ systemd-mini.spec ++++++ --- /var/tmp/diff_new_pack.VP466Z/_old 2018-04-25 09:58:52.788283811 +0200 +++ /var/tmp/diff_new_pack.VP466Z/_new 2018-04-25 09:58:52.792283664 +0200 @@ -26,7 +26,7 @@ ##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! ##### %define mini -mini %define min_kernel_version 4.5 -%define suse_version +suse.52.g14b3e00c3 +%define suse_version +suse.57.gd81968050 %bcond_with gnuefi %if 0%{?bootstrap} @@ -152,7 +152,7 @@ Source102: scripts-systemd-migrate-sysconfig-i18n.sh Source200: scripts-udev-convert-lib-udev-path.sh -Source1000: 60-ssd-scheduler.rules +Source1000: 60-io-scheduler.rules Source1001: 80-hotplug-cpu-mem.rules Source1002: 99-wakeup-from-idle.rules @@ -497,7 +497,7 @@ install -m0755 -D %{S:12} %{buildroot}/%{_prefix}/lib/systemd/systemd-sysv-install # The rules that we shouldn't maintain -install -m0644 -D %{S:1000} %{buildroot}%{_udevrulesdir}/60-ssd-scheduler.rules +install -m0644 -D %{S:1000} %{buildroot}%{_udevrulesdir}/60-io-scheduler.rules install -m0644 -D %{S:1001} %{buildroot}%{_udevrulesdir}/80-hotplug-cpu-mem.rules install -m0644 -D %{S:1002} %{buildroot}%{_udevrulesdir}/99-wakeup-from-idle.rules @@ -546,6 +546,11 @@ # aaa_base (in procps for now) rm -f %{buildroot}%{_sysctldir}/50-default.conf +# since v207 /etc/sysctl.conf is no longer parsed (commit +# 04bf3c1a60d82791), however backward compatibility is provided by +# /usr/lib/sysctl.d/99-sysctl.conf. +ln -s ../../../etc/sysctl.conf %{buildroot}%{_sysctldir}/99-sysctl.conf + # The definition of the basic users/groups are defined by system-user # on SUSE (bsc#1006978). rm -f %{buildroot}%{_sysusersdir}/basic.conf @@ -1007,6 +1012,7 @@ %dir %{_sysctldir} %dir %{_sysconfdir}/sysctl.d +%{_sysctldir}/99-sysctl.conf %dir %{_sysconfdir}/X11/xinit %dir %{_sysconfdir}/X11/xinit/xinitrc.d ++++++ systemd.spec ++++++ --- /var/tmp/diff_new_pack.VP466Z/_old 2018-04-25 09:58:52.836282050 +0200 +++ /var/tmp/diff_new_pack.VP466Z/_new 2018-04-25 09:58:52.840281903 +0200 @@ -24,7 +24,7 @@ %define bootstrap 0 %define mini %nil %define min_kernel_version 4.5 -%define suse_version +suse.52.g14b3e00c3 +%define suse_version +suse.57.gd81968050 %bcond_with gnuefi %if 0%{?bootstrap} @@ -150,7 +150,7 @@ Source102: scripts-systemd-migrate-sysconfig-i18n.sh Source200: scripts-udev-convert-lib-udev-path.sh -Source1000: 60-ssd-scheduler.rules +Source1000: 60-io-scheduler.rules Source1001: 80-hotplug-cpu-mem.rules Source1002: 99-wakeup-from-idle.rules @@ -495,7 +495,7 @@ install -m0755 -D %{S:12} %{buildroot}/%{_prefix}/lib/systemd/systemd-sysv-install # The rules that we shouldn't maintain -install -m0644 -D %{S:1000} %{buildroot}%{_udevrulesdir}/60-ssd-scheduler.rules +install -m0644 -D %{S:1000} %{buildroot}%{_udevrulesdir}/60-io-scheduler.rules install -m0644 -D %{S:1001} %{buildroot}%{_udevrulesdir}/80-hotplug-cpu-mem.rules install -m0644 -D %{S:1002} %{buildroot}%{_udevrulesdir}/99-wakeup-from-idle.rules @@ -544,6 +544,11 @@ # aaa_base (in procps for now) rm -f %{buildroot}%{_sysctldir}/50-default.conf +# since v207 /etc/sysctl.conf is no longer parsed (commit +# 04bf3c1a60d82791), however backward compatibility is provided by +# /usr/lib/sysctl.d/99-sysctl.conf. +ln -s ../../../etc/sysctl.conf %{buildroot}%{_sysctldir}/99-sysctl.conf + # The definition of the basic users/groups are defined by system-user # on SUSE (bsc#1006978). rm -f %{buildroot}%{_sysusersdir}/basic.conf @@ -1005,6 +1010,7 @@ %dir %{_sysctldir} %dir %{_sysconfdir}/sysctl.d +%{_sysctldir}/99-sysctl.conf %dir %{_sysconfdir}/X11/xinit %dir %{_sysconfdir}/X11/xinit/xinitrc.d ++++++ 60-io-scheduler.rules ++++++ # Set optimal IO schedulers for HDD and SSD ACTION!="add", GOTO="scheduler_end" SUBSYSTEM!="block", GOTO="scheduler_end" # Do not change scheduler if `elevator` cmdline parameter is set IMPORT{cmdline}="elevator" ENV{elevator}=="?*", GOTO="scheduler_end" # Determine if BLK-MQ is enabled TEST=="%S%p/mq", ENV{.IS_MQ}="1" # MQ: BFQ scheduler for HDD ENV{.IS_MQ}=="1", ATTR{queue/rotational}!="0", ATTR{queue/scheduler}="bfq" # MQ: deadline scheduler for SSD ENV{.IS_MQ}=="1", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline" # Non-MQ: CFQ scheduler for HDD ENV{.IS_MQ}!="1", ATTR{queue/rotational}!="0", ATTR{queue/scheduler}="cfq" # Non-MQ: deadline scheduler for SSD ENV{.IS_MQ}!="1", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline" LABEL="scheduler_end" ++++++ scripts-systemd-upgrade-from-pre-210.sh ++++++ --- /var/tmp/diff_new_pack.VP466Z/_old 2018-04-25 09:58:53.024275152 +0200 +++ /var/tmp/diff_new_pack.VP466Z/_new 2018-04-25 09:58:53.028275006 +0200 @@ -22,12 +22,6 @@ ln -s /usr/lib/systemd/system/runlevel${runlevel}.target /etc/systemd/system/default.target fi -# since v207 /etc/sysctl.conf is no longer parsed, however -# backward compatibility is provided by /etc/sysctl.d/99-sysctl.conf -if [ ! -L /etc/sysctl.d/99-sysctl.conf -a -e /etc/sysctl.conf ]; then - ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf -fi - # migrate any symlink which may refer to the old path for f in $(find /etc/systemd/system -type l -xtype l); do new_target="/usr$(readlink $f)" ++++++ systemd-v237+suse.52.g14b3e00c3.tar.xz -> systemd-v237+suse.57.gd81968050.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-v237+suse.52.g14b3e00c3/.gitignore new/systemd-v237+suse.57.gd81968050/.gitignore --- old/systemd-v237+suse.52.g14b3e00c3/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/systemd-v237+suse.57.gd81968050/.gitignore 2018-04-23 09:40:12.000000000 +0200 @@ -0,0 +1,34 @@ +*.a +*.cache +*.gch +*.log +*.o +*.plist +*.py[co] +*.stamp +*.swp +*.trs +*~ +.config.args +.deps/ +/*.gcda +/*.gcno +/*.tar.bz2 +/*.tar.gz +/*.tar.xz +/GPATH +/GRTAGS +/GSYMS +/GTAGS +/TAGS +/ID +/build* +/coverage/ +/image.raw +/image.raw.cache-pre-dev +/image.raw.cache-pre-inst +/install-tree +/mkosi.builddir/ +/mkosi.output/ +/tags +__pycache__/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-v237+suse.52.g14b3e00c3/hwdb/.gitignore new/systemd-v237+suse.57.gd81968050/hwdb/.gitignore --- old/systemd-v237+suse.52.g14b3e00c3/hwdb/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/systemd-v237+suse.57.gd81968050/hwdb/.gitignore 2018-04-23 09:40:12.000000000 +0200 @@ -0,0 +1 @@ +/20-acpi-vendor.hwdb.base diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-v237+suse.52.g14b3e00c3/src/core/device.c new/systemd-v237+suse.57.gd81968050/src/core/device.c --- old/systemd-v237+suse.52.g14b3e00c3/src/core/device.c 2018-03-28 14:27:49.000000000 +0200 +++ new/systemd-v237+suse.57.gd81968050/src/core/device.c 2018-04-23 09:40:12.000000000 +0200 @@ -30,6 +30,7 @@ #include "parse-util.h" #include "path-util.h" #include "stat-util.h" +#include "string-table.h" #include "string-util.h" #include "swap.h" #include "udev-util.h" @@ -145,6 +146,13 @@ assert(d); assert(d->state == DEVICE_DEAD); + /* This should happen only when we reexecute PID1 from an old version + * which didn't serialize d->found. In this case simply assume that the + * device was in plugged state right before we started reexecuting which + * might be a wrong assumption. */ + if (d->found == DEVICE_FOUND_UDEV_DB) + d->found = DEVICE_FOUND_UDEV; + if (d->found & DEVICE_FOUND_UDEV) /* If udev says the device is around, it's around */ device_set_state(d, DEVICE_PLUGGED); @@ -165,6 +173,7 @@ assert(fds); unit_serialize_item(u, f, "state", device_state_to_string(d->state)); + unit_serialize_item(u, f, "found", device_found_to_string(d->found)); return 0; } @@ -177,6 +186,18 @@ assert(value); assert(fds); + /* The device was known at the time units were serialized but it's not + * anymore at the time units are deserialized. This happens when PID1 is + * re-executed after having switched to the new rootfs: devices were + * enumerated but udevd wasn't running yet thus the list of devices + * (handled by systemd) to initialize was empty. In such case we wait + * for the device events to be re-triggered by udev so device units are + * properly re-initialized. */ + if (d->found == DEVICE_NOT_FOUND) { + assert(d->sysfs == NULL); + return 0; + } + if (streq(key, "state")) { DeviceState state; @@ -185,6 +206,16 @@ log_unit_debug(u, "Failed to parse state value: %s", value); else d->deserialized_state = state; + + } else if (streq(key, "found")) { + DeviceFound found; + + found = device_found_from_string(value); + if (found < 0) + log_unit_debug(u, "Failed to parse found value: %s", value); + else + d->found = found; + } else log_unit_debug(u, "Unknown serialization key: %s", key); @@ -749,7 +780,7 @@ (void) device_process_new(m, dev); - device_update_found_by_sysfs(m, sysfs, true, DEVICE_FOUND_UDEV, false); + device_update_found_by_sysfs(m, sysfs, true, DEVICE_FOUND_UDEV_DB, false); } return; @@ -921,6 +952,16 @@ return DEVICE(device)->bind_mounts; } +static const char* const device_found_table[] = { + [DEVICE_NOT_FOUND] = "not-found", + [DEVICE_FOUND_UDEV] = "found-udev", + [DEVICE_FOUND_UDEV_DB] = "found-udev-db", + [DEVICE_FOUND_MOUNT] = "found-mount", + [DEVICE_FOUND_SWAP] = "found-swap", +}; + +DEFINE_STRING_TABLE_LOOKUP(device_found, DeviceFound); + const UnitVTable device_vtable = { .object_size = sizeof(Device), .sections = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-v237+suse.52.g14b3e00c3/src/core/device.h new/systemd-v237+suse.57.gd81968050/src/core/device.h --- old/systemd-v237+suse.52.g14b3e00c3/src/core/device.h 2018-03-28 14:27:49.000000000 +0200 +++ new/systemd-v237+suse.57.gd81968050/src/core/device.h 2018-04-23 09:40:12.000000000 +0200 @@ -23,10 +23,11 @@ typedef struct Device Device; typedef enum DeviceFound { - DEVICE_NOT_FOUND = 0, - DEVICE_FOUND_UDEV = 1, - DEVICE_FOUND_MOUNT = 2, - DEVICE_FOUND_SWAP = 4, + DEVICE_NOT_FOUND = 0, + DEVICE_FOUND_UDEV = 1 << 1, + DEVICE_FOUND_UDEV_DB = 1 << 2, + DEVICE_FOUND_MOUNT = 1 << 3, + DEVICE_FOUND_SWAP = 1 << 4, } DeviceFound; struct Device { @@ -49,3 +50,6 @@ int device_found_node(Manager *m, const char *node, bool add, DeviceFound found, bool now); bool device_shall_be_bound_by(Unit *device, Unit *u); + +const char *device_found_to_string(DeviceFound f) _const_; +DeviceFound device_found_from_string(const char *s) _pure_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-v237+suse.52.g14b3e00c3/src/tmpfiles/tmpfiles.c new/systemd-v237+suse.57.gd81968050/src/tmpfiles/tmpfiles.c --- old/systemd-v237+suse.52.g14b3e00c3/src/tmpfiles/tmpfiles.c 2018-03-28 14:27:49.000000000 +0200 +++ new/systemd-v237+suse.57.gd81968050/src/tmpfiles/tmpfiles.c 2018-04-23 09:40:12.000000000 +0200 @@ -1583,7 +1583,7 @@ r = symlink_atomic(i->argument, i->path); mac_selinux_create_file_clear(); - if (IN_SET(r, -EEXIST, -ENOTEMPTY)) { + if (IN_SET(r, -EISDIR, -EEXIST, -ENOTEMPTY)) { r = rm_rf(i->path, REMOVE_ROOT|REMOVE_PHYSICAL); if (r < 0) return log_error_errno(r, "rm -fr %s failed: %m", i->path); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-v237+suse.52.g14b3e00c3/src/udev/udevd.c new/systemd-v237+suse.57.gd81968050/src/udev/udevd.c --- old/systemd-v237+suse.52.g14b3e00c3/src/udev/udevd.c 2018-03-28 14:27:49.000000000 +0200 +++ new/systemd-v237+suse.57.gd81968050/src/udev/udevd.c 2018-04-23 09:40:12.000000000 +0200 @@ -1676,12 +1676,16 @@ if (arg_children_max == 0) { cpu_set_t cpu_set; + unsigned long mem_limit; arg_children_max = 8; if (sched_getaffinity(0, sizeof(cpu_set), &cpu_set) == 0) arg_children_max += CPU_COUNT(&cpu_set) * 64; + mem_limit = physical_memory() / (128LU*1024*1024); + arg_children_max = MAX(10U, MIN(arg_children_max, mem_limit)); + log_debug("set children_max to %u", arg_children_max); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/systemd-v237+suse.52.g14b3e00c3/test/.gitignore new/systemd-v237+suse.57.gd81968050/test/.gitignore --- old/systemd-v237+suse.52.g14b3e00c3/test/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/systemd-v237+suse.57.gd81968050/test/.gitignore 2018-04-23 09:40:12.000000000 +0200 @@ -0,0 +1,5 @@ +.testdir +test.log +/dev +/run +/sys