diff -Nru systemd-219/debian/changelog systemd-219/debian/changelog --- systemd-219/debian/changelog 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/changelog 2015-07-03 11:01:27.000000000 +0000 @@ -1,3 +1,58 @@ +systemd (219-7ubuntu6vividtouch1) vivid; urgency=medium + + * Add fix-touch-screen-detection.patch to fix touch screen detection. + Backported from upstream trunk, thanks Andreas Pokorny! + + -- Martin Pitt Fri, 03 Jul 2015 13:00:29 +0200 + +systemd (219-7ubuntu6) vivid; urgency=medium + + * Fix assertion crash with empty Exec*= paths. (LP: #1454173) + * systemd-fsckd autopkgtest: Stop assuming that + /etc/default/grub.d/90-autopkgtest.cfg exists. + * systemd-fsckd autopkgtest: Add missing plymouth test dependency. + * debian/tests/boot-smoke: Allow 10 seconds for systemd jobs to settle down. + * Fix "tentative" state of devices which are not in /dev (mostly in + containers), and avoid overzealous cleanup unmounting of mounts from them. + (LP: #1444402) + * journal: Gracefully handle failure to bind to audit socket, which is known + to fail in namespaces (containers) with current kernels. Also + conditionalize systemd-journald-audit.socket on CAP_AUDIT_READ. + (LP: #1457054) + * Add sigpwr-container-shutdown.service: Power off when receiving SIGPWR in + a container. This makes lxc-stop work for systemd containers. + (LP: #1457321) + + -- Martin Pitt Thu, 21 May 2015 14:47:46 +0200 + +systemd (219-7ubuntu5) vivid; urgency=medium + + * Revert upstream commit 743970d which immediately SIGKILLs units during + shutdown. This leads to problems like bash not being able to write its + history, mosh not saving its state, and similar failed cleanup actions. + (LP: #1448259) + * ifup@.service: Set IgnoreOnIsolate, so that "systemctl default" does not + shut down network interfaces. (LP: #1449380). Add PartOf=network.target, + so that stopping network.target also stops network interfaces. + * 75-persistent-net-generator.rules: Fix rules for ibmveth (it's a driver, + not a subsystem). (LP: #1437375) + * debian/tests/unit-config: Add tests for systemctl enable/disable on a + SysV-only unit. Reproduces LP #1447807. + * Fix systemctl enable for SysV scripts without a native unit. We must not + try and enable the nonexisting unit then. (LP: #1447807) + + -- Martin Pitt Thu, 07 May 2015 07:45:34 +0200 + +systemd (219-7ubuntu4) vivid; urgency=medium + + * hwdb: Fix wireless switch on Dell Latitude (LP: #1441849) + * Fix assertion crash when reading a service file with missing ' and + trailing space. (LP: #1447243) + * Fix double free crash in "systemctl enable" when calling update-rc.d and + the latter fails. (LP: #1426588) + + -- Martin Pitt Thu, 23 Apr 2015 11:14:16 +0100 + systemd (219-7ubuntu3) vivid; urgency=medium * logind autopkgtest: Add test for suspending on lid switch close. diff -Nru systemd-219/debian/extra/60-keyboard.hwdb systemd-219/debian/extra/60-keyboard.hwdb --- systemd-219/debian/extra/60-keyboard.hwdb 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/extra/60-keyboard.hwdb 2015-05-21 12:47:59.000000000 +0000 @@ -250,6 +250,7 @@ # Dell Touchpad keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:pvr* + KEYBOARD_KEY_88=! # wireless switch KEYBOARD_KEY_9e=!f21 # Dell XPS diff -Nru systemd-219/debian/extra/rules/75-persistent-net-generator.rules systemd-219/debian/extra/rules/75-persistent-net-generator.rules --- systemd-219/debian/extra/rules/75-persistent-net-generator.rules 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/extra/rules/75-persistent-net-generator.rules 2015-05-21 12:47:59.000000000 +0000 @@ -102,7 +102,7 @@ LABEL="globally_administered_whitelist" # ibmveth interfaces have stable locally administered MAC addresses -SUBSYSTEMS=="ibmveth", ENV{MATCHADDR}="$attr{address}" +DRIVERS=="ibmveth", ENV{MATCHADDR}="$attr{address}" # S/390 interfaces are matched only by id SUBSYSTEMS=="ccwgroup", \ @@ -123,7 +123,7 @@ ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct}" SUBSYSTEMS=="ccwgroup", \ ENV{COMMENT}="S/390 device at $id" -SUBSYSTEMS=="ibmveth", \ +DRIVERS=="ibmveth", \ ENV{COMMENT}="LPAR virtual device at $id" SUBSYSTEMS=="ieee1394", \ ENV{COMMENT}="Firewire device $attr{host_id}" diff -Nru systemd-219/debian/extra/units/ifup@.service systemd-219/debian/extra/units/ifup@.service --- systemd-219/debian/extra/units/ifup@.service 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/extra/units/ifup@.service 2015-05-21 12:47:59.000000000 +0000 @@ -1,9 +1,11 @@ [Unit] Description=ifup for %I After=local-fs.target network-pre.target apparmor.service systemd-tmpfiles-setup.service +PartOf=network.target Before=network.target BindsTo=sys-subsystem-net-devices-%i.device DefaultDependencies=no +IgnoreOnIsolate=yes [Service] # only fail if ifupdown knows about the iface AND it's not up diff -Nru systemd-219/debian/extra/units/sigpwr-container-shutdown.service systemd-219/debian/extra/units/sigpwr-container-shutdown.service --- systemd-219/debian/extra/units/sigpwr-container-shutdown.service 1970-01-01 00:00:00.000000000 +0000 +++ systemd-219/debian/extra/units/sigpwr-container-shutdown.service 2015-05-21 12:47:59.000000000 +0000 @@ -0,0 +1,7 @@ +[Unit] +Description=Shut down containers on SIGPWR +ConditionVirtualization=container + +[Service] +Type=oneshot +ExecStart=/bin/systemctl --no-block poweroff diff -Nru systemd-219/debian/gbp.conf systemd-219/debian/gbp.conf --- systemd-219/debian/gbp.conf 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/gbp.conf 2015-05-21 12:47:59.000000000 +0000 @@ -1,5 +1,5 @@ [DEFAULT] pristine-tar = True patch-numbers = False -debian-branch = ubuntu +debian-branch = ubuntu-vivid debian-tag = ubuntu/%(version)s diff -Nru systemd-219/debian/patches/Add-run-initctl-support-to-SysV-compat-tools.patch systemd-219/debian/patches/Add-run-initctl-support-to-SysV-compat-tools.patch --- systemd-219/debian/patches/Add-run-initctl-support-to-SysV-compat-tools.patch 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/patches/Add-run-initctl-support-to-SysV-compat-tools.patch 2015-05-21 12:47:59.000000000 +0000 @@ -11,10 +11,10 @@ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index 86e9ea8..bc56c5f 100644 +index 9a44839..af5ff69 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c -@@ -7049,18 +7049,23 @@ static int talk_initctl(void) { +@@ -7071,18 +7071,23 @@ static int talk_initctl(void) { request.runlevel = rl; diff -Nru systemd-219/debian/patches/core-Fix-assertion-with-empty-Exec-paths.patch systemd-219/debian/patches/core-Fix-assertion-with-empty-Exec-paths.patch --- systemd-219/debian/patches/core-Fix-assertion-with-empty-Exec-paths.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-219/debian/patches/core-Fix-assertion-with-empty-Exec-paths.patch 2015-05-21 12:47:59.000000000 +0000 @@ -0,0 +1,74 @@ +From: Martin Pitt +Date: Thu, 14 May 2015 09:06:40 +0200 +Subject: core: Fix assertion with empty Exec*= paths + +An Exec*= line with whitespace after modifiers, like + + ExecStart=- /bin/true + +is considered to have an empty command path. This is as specified, but causes +systemd to crash with + + Assertion 'skip < l' failed at ../src/core/load-fragment.c:607, function config_parse_exec(). Aborting. + Aborted (core dumped) + +Fix this by logging an error instead and ignoring the invalid line. + +Add corresponding test cases. Also add a test case for a completely empty value +which resets the command list. + +https://launchpad.net/bugs/1454173 +--- + src/core/load-fragment.c | 6 +++++- + src/test/test-unit-file.c | 21 +++++++++++++++++++++ + 2 files changed, 26 insertions(+), 1 deletion(-) + +diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c +index f17a82f..ec4cf4e 100644 +--- a/src/core/load-fragment.c ++++ b/src/core/load-fragment.c +@@ -604,7 +604,11 @@ int config_parse_exec(const char *unit, + skip = separate_argv0 + ignore; + + /* skip special chars in the beginning */ +- assert(skip < l); ++ if (l <= skip) { ++ log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Empty path in command line, ignoring: %s", rvalue); ++ r = 0; ++ goto fail; ++ } + + } else if (strneq(word, ";", MAX(l, 1U))) + /* new commandline */ +diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c +index 9f3e3a2..5500983 100644 +--- a/src/test/test-unit-file.c ++++ b/src/test/test-unit-file.c +@@ -318,6 +318,27 @@ static void test_config_parse_exec(void) { + assert_se(r == 0); + assert_se(c1->command_next == NULL); + ++ log_info("/* invalid space between modifiers */"); ++ r = config_parse_exec(NULL, "fake", 4, "section", 1, ++ "LValue", 0, "- /path", ++ &c, NULL); ++ assert_se(r == 0); ++ assert_se(c1->command_next == NULL); ++ ++ log_info("/* only modifiers, no path */"); ++ r = config_parse_exec(NULL, "fake", 4, "section", 1, ++ "LValue", 0, "-", ++ &c, NULL); ++ assert_se(r == 0); ++ assert_se(c1->command_next == NULL); ++ ++ log_info("/* empty argument, reset */"); ++ r = config_parse_exec(NULL, "fake", 4, "section", 1, ++ "LValue", 0, "", ++ &c, NULL); ++ assert_se(r == 0); ++ assert_se(c == NULL); ++ + exec_command_free_list(c); + } + diff -Nru systemd-219/debian/patches/core-mount-ensure-that-we-parse-proc-self-mountinfo.patch systemd-219/debian/patches/core-mount-ensure-that-we-parse-proc-self-mountinfo.patch --- systemd-219/debian/patches/core-mount-ensure-that-we-parse-proc-self-mountinfo.patch 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/patches/core-mount-ensure-that-we-parse-proc-self-mountinfo.patch 2015-05-21 12:47:59.000000000 +0000 @@ -29,7 +29,7 @@ 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/mount.c b/src/core/mount.c -index 3ae0eb4..a472f84 100644 +index a829cf7..b07d35a 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -1570,7 +1570,11 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) { diff -Nru systemd-219/debian/patches/device-create-units-with-intended-found-value.patch systemd-219/debian/patches/device-create-units-with-intended-found-value.patch --- systemd-219/debian/patches/device-create-units-with-intended-found-value.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-219/debian/patches/device-create-units-with-intended-found-value.patch 2015-05-21 12:47:59.000000000 +0000 @@ -0,0 +1,129 @@ +From: Martin Pitt +Date: Sun, 17 May 2015 15:07:47 +0200 +Subject: device: create units with intended "found" value + +Change device_found_node() to also create a .device unit if a device is not +known by udev; this is the case for "tentative" devices picked up by mountinfo +(DEVICE_FOUND_MOUNT). With that we can record the "found" attribute on the +unit. + +Change device_setup_unit() to also accept a NULL udev_device, and don't +add the extra udev information in that case. + +Previously device_found_node() would not create a .device unit, and +unit_add_node_link() would then create a "dead" stub one via +manager_load_unit(), so we lost the "found" attribute and unmounted everything +from that device. + +https://launchpad.net/bugs/1444402 +http://lists.freedesktop.org/archives/systemd-devel/2015-May/031658.html +--- + src/core/device.c | 61 +++++++++++++++++++++++++++++++------------------------ + 1 file changed, 34 insertions(+), 27 deletions(-) + +diff --git a/src/core/device.c b/src/core/device.c +index cc4ebd2..246bee6 100644 +--- a/src/core/device.c ++++ b/src/core/device.c +@@ -262,18 +262,19 @@ static int device_add_udev_wants(Unit *u, struct udev_device *dev) { + + static int device_setup_unit(Manager *m, struct udev_device *dev, const char *path, bool main) { + _cleanup_free_ char *e = NULL; +- const char *sysfs; ++ const char *sysfs = NULL; + Unit *u = NULL; + bool delete; + int r; + + assert(m); +- assert(dev); + assert(path); + +- sysfs = udev_device_get_syspath(dev); +- if (!sysfs) +- return 0; ++ if (dev) { ++ sysfs = udev_device_get_syspath(dev); ++ if (!sysfs) ++ return 0; ++ } + + e = unit_name_from_path(path, ".device"); + if (!e) +@@ -282,6 +283,7 @@ static int device_setup_unit(Manager *m, struct udev_device *dev, const char *pa + u = manager_get_unit(m, e); + + if (u && ++ sysfs && + DEVICE(u)->sysfs && + !path_equal(DEVICE(u)->sysfs, sysfs)) { + log_unit_error(u->id, "Device %s appeared twice with different sysfs paths %s and %s", e, DEVICE(u)->sysfs, sysfs); +@@ -306,17 +308,19 @@ static int device_setup_unit(Manager *m, struct udev_device *dev, const char *pa + /* If this was created via some dependency and has not + * actually been seen yet ->sysfs will not be + * initialized. Hence initialize it if necessary. */ ++ if (sysfs) { ++ r = device_set_sysfs(DEVICE(u), sysfs); ++ if (r < 0) ++ goto fail; + +- r = device_set_sysfs(DEVICE(u), sysfs); +- if (r < 0) +- goto fail; ++ (void) device_update_description(u, dev, path); + +- (void) device_update_description(u, dev, path); ++ /* The additional systemd udev properties we only interpret ++ * for the main object */ ++ if (main) ++ (void) device_add_udev_wants(u, dev); ++ } + +- /* The additional systemd udev properties we only interpret +- * for the main object */ +- if (main) +- (void) device_add_udev_wants(u, dev); + + /* Note that this won't dispatch the load queue, the caller + * has to do that if needed and appropriate */ +@@ -735,23 +739,26 @@ int device_found_node(Manager *m, const char *node, bool add, DeviceFound found, + if (!path_startswith(node, "/dev")) + return 0; + +- if (stat(node, &st) < 0) { +- if (errno == ENOENT) ++ /* We make an extra check here, if the device node ++ * actually exists. If it's missing, then this is an ++ * indication that device was unplugged but is still ++ * referenced in /proc/swaps or ++ * /proc/self/mountinfo. Note that this check doesn't ++ * really cover all cases where a device might be gone ++ * away, since drives that can have a medium inserted ++ * will still have a device node even when the medium ++ * is not there... */ ++ ++ if (stat(node, &st) >= 0) { ++ if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode)) + return 0; + +- return log_error_errno(errno, "Failed to stat device node file %s: %m", node); +- } +- +- if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode)) +- return 0; +- +- dev = udev_device_new_from_devnum(m->udev, S_ISBLK(st.st_mode) ? 'b' : 'c', st.st_rdev); +- if (!dev) { +- if (errno == ENOENT) +- return 0; ++ dev = udev_device_new_from_devnum(m->udev, S_ISBLK(st.st_mode) ? 'b' : 'c', st.st_rdev); ++ if (!dev && errno != ENOENT) ++ return log_error_errno(errno, "Failed to get udev device from devnum %u:%u: %m", major(st.st_rdev), minor(st.st_rdev)); + +- return log_oom(); +- } ++ } else if (errno != ENOENT) ++ return log_error_errno(errno, "Failed to stat device node file %s: %m", node); + + /* If the device is known in the kernel and newly + * appeared, then we'll create a device unit for it, diff -Nru systemd-219/debian/patches/Don-t-enable-audit-by-default.patch systemd-219/debian/patches/Don-t-enable-audit-by-default.patch --- systemd-219/debian/patches/Don-t-enable-audit-by-default.patch 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/patches/Don-t-enable-audit-by-default.patch 2015-05-21 12:47:59.000000000 +0000 @@ -14,10 +14,10 @@ 1 file changed, 5 deletions(-) diff --git a/src/journal/journald-audit.c b/src/journal/journald-audit.c -index 46eb82f..e2b077d 100644 +index 0e739a2..0492c8f 100644 --- a/src/journal/journald-audit.c +++ b/src/journal/journald-audit.c -@@ -546,10 +546,5 @@ int server_open_audit(Server *s) { +@@ -551,10 +551,5 @@ int server_open_audit(Server *s) { if (r < 0) return log_error_errno(r, "Failed to add audit fd to event loop: %m"); diff -Nru systemd-219/debian/patches/fix-touch-screen-detection.patch systemd-219/debian/patches/fix-touch-screen-detection.patch --- systemd-219/debian/patches/fix-touch-screen-detection.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-219/debian/patches/fix-touch-screen-detection.patch 2015-07-03 10:59:58.000000000 +0000 @@ -0,0 +1,178 @@ +From 17547059e984bcb138d806e7ba4a6deef29e9a1c Mon Sep 17 00:00:00 2001 +From: Andreas Pokorny +Date: Fri, 3 Jul 2015 12:12:13 +0200 +Subject: [PATCH] fix touch screen detection + +refactor device detection +fix devices with all the axes.. + +Signed-off-by: Andreas Pokorny +--- + src/udev/udev-builtin-input_id.c | 124 +++++++++++++++++++++++++++------------ + 1 file changed, 85 insertions(+), 39 deletions(-) + +diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c +index 46f1c53..919a91c 100644 +--- a/src/udev/udev-builtin-input_id.c ++++ b/src/udev/udev-builtin-input_id.c +@@ -131,57 +131,101 @@ static void test_pointers (struct udev_device *dev, + const unsigned long* bitmask_abs, + const unsigned long* bitmask_key, + const unsigned long* bitmask_rel, ++ const unsigned long* bitmask_props, + bool test) { +- int is_mouse = 0; +- int is_touchpad = 0; ++ bool has_abs_coordinates = false; ++ bool has_rel_coordinates = false; ++ bool has_mt_coordinates = false; ++ bool has_joystick_axes_or_buttons = false; ++ bool is_direct = false; ++ bool has_touch = false; ++ bool has_3d_coordinates = false; ++ bool has_keys = false; ++ bool stylus_or_pen = false; ++ bool finger_but_no_pen = false; ++ bool has_mouse_button = false; ++ bool is_mouse = false; ++ bool is_touchpad = false; ++ bool is_touchscreen = false; ++ bool is_tablet = false; ++ bool is_joystick = false; ++ bool is_accelerometer = false; ++ bool is_pointing_stick= false; + +- if (!test_bit (EV_KEY, bitmask_ev)) { +- if (test_bit (EV_ABS, bitmask_ev) && +- test_bit (ABS_X, bitmask_abs) && +- test_bit (ABS_Y, bitmask_abs) && +- test_bit (ABS_Z, bitmask_abs)) +- udev_builtin_add_property(dev, test, "ID_INPUT_ACCELEROMETER", "1"); ++ has_keys = test_bit(EV_KEY, bitmask_ev); ++ has_abs_coordinates = test_bit(ABS_X, bitmask_abs) && test_bit(ABS_Y, bitmask_abs); ++ has_3d_coordinates = has_abs_coordinates && test_bit(ABS_Z, bitmask_abs); ++#ifdef INPUT_PROP_ACCELEROMETER ++ is_accelerometer = test_bit(INPUT_PROP_ACCELEROMETER, bitmask_props); ++#endif ++ ++ if (!has_keys && has_3d_coordinates) ++ is_accelerometer = true; ++ ++ if (is_accelerometer) { ++ udev_builtin_add_property(dev, test, "ID_INPUT_ACCELEROMETER", "1"); + return; + } + +- if (test_bit (EV_ABS, bitmask_ev) && +- test_bit (ABS_X, bitmask_abs) && test_bit (ABS_Y, bitmask_abs)) { +- if (test_bit (BTN_STYLUS, bitmask_key) || test_bit (BTN_TOOL_PEN, bitmask_key)) +- udev_builtin_add_property(dev, test, "ID_INPUT_TABLET", "1"); +- else if (test_bit (BTN_TOOL_FINGER, bitmask_key) && !test_bit (BTN_TOOL_PEN, bitmask_key)) +- is_touchpad = 1; +- else if (test_bit (BTN_MOUSE, bitmask_key)) ++ is_pointing_stick = test_bit(INPUT_PROP_POINTING_STICK, bitmask_props); ++ stylus_or_pen = test_bit(BTN_STYLUS, bitmask_key) || test_bit(BTN_TOOL_PEN, bitmask_key); ++ finger_but_no_pen = test_bit(BTN_TOOL_FINGER, bitmask_key) && !test_bit(BTN_TOOL_PEN, bitmask_key); ++ has_mouse_button = test_bit(BTN_LEFT, bitmask_key); ++ has_rel_coordinates = test_bit(EV_REL, bitmask_ev) && test_bit(REL_X, bitmask_rel) && test_bit(REL_Y, bitmask_rel); ++ has_mt_coordinates = test_bit(ABS_MT_POSITION_X, bitmask_abs) && test_bit(ABS_MT_POSITION_Y, bitmask_abs); ++ ++ /* unset has_mt_coordinates if devices claims to have all abs axis */ ++ if(has_mt_coordinates && test_bit(ABS_MT_SLOT, bitmask_abs) && test_bit(ABS_MT_SLOT - 1, bitmask_abs)) ++ has_mt_coordinates = false; ++ is_direct = test_bit(INPUT_PROP_DIRECT, bitmask_props); ++ has_touch = test_bit(BTN_TOUCH, bitmask_key); ++ /* joysticks don't necessarily have buttons; e. g. ++ * rudders/pedals are joystick-like, but buttonless; they have ++ * other fancy axes */ ++ has_joystick_axes_or_buttons = test_bit(BTN_TRIGGER, bitmask_key) || ++ test_bit(BTN_A, bitmask_key) || ++ test_bit(BTN_1, bitmask_key) || ++ test_bit(ABS_RX, bitmask_abs) || ++ test_bit(ABS_RY, bitmask_abs) || ++ test_bit(ABS_RZ, bitmask_abs) || ++ test_bit(ABS_THROTTLE, bitmask_abs) || ++ test_bit(ABS_RUDDER, bitmask_abs) || ++ test_bit(ABS_WHEEL, bitmask_abs) || ++ test_bit(ABS_GAS, bitmask_abs) || ++ test_bit(ABS_BRAKE, bitmask_abs); ++ ++ if (has_abs_coordinates) { ++ if (stylus_or_pen) ++ is_tablet = true; ++ else if (finger_but_no_pen && !is_direct) ++ is_touchpad = true; ++ else if (has_mouse_button) + /* This path is taken by VMware's USB mouse, which has + * absolute axes, but no touch/pressure button. */ +- is_mouse = 1; +- else if (test_bit (BTN_TOUCH, bitmask_key)) +- udev_builtin_add_property(dev, test, "ID_INPUT_TOUCHSCREEN", "1"); +- /* joysticks don't necessarily have to have buttons; e. g. +- * rudders/pedals are joystick-like, but buttonless; they have +- * other fancy axes */ +- else if (test_bit (BTN_TRIGGER, bitmask_key) || +- test_bit (BTN_A, bitmask_key) || +- test_bit (BTN_1, bitmask_key) || +- test_bit (ABS_RX, bitmask_abs) || +- test_bit (ABS_RY, bitmask_abs) || +- test_bit (ABS_RZ, bitmask_abs) || +- test_bit (ABS_THROTTLE, bitmask_abs) || +- test_bit (ABS_RUDDER, bitmask_abs) || +- test_bit (ABS_WHEEL, bitmask_abs) || +- test_bit (ABS_GAS, bitmask_abs) || +- test_bit (ABS_BRAKE, bitmask_abs)) +- udev_builtin_add_property(dev, test, "ID_INPUT_JOYSTICK", "1"); ++ is_mouse = true; ++ else if (has_touch) ++ is_touchscreen = true; ++ else if (has_joystick_axes_or_buttons) ++ is_joystick = true; + } ++ if (has_mt_coordinates && is_direct) ++ is_touchscreen = true; + +- if (test_bit (EV_REL, bitmask_ev) && +- test_bit (REL_X, bitmask_rel) && test_bit (REL_Y, bitmask_rel) && +- test_bit (BTN_MOUSE, bitmask_key)) +- is_mouse = 1; ++ if (has_rel_coordinates && has_mouse_button) ++ is_mouse = true; + ++ if (is_pointing_stick) ++ udev_builtin_add_property(dev, test, "ID_INPUT_POINTINGSTICK", "1"); + if (is_mouse) + udev_builtin_add_property(dev, test, "ID_INPUT_MOUSE", "1"); + if (is_touchpad) +- udev_builtin_add_property(dev, test, "ID_INPUT_TOUCHPAD", "1"); ++ udev_builtin_add_property(dev, test, "ID_INPUT_TOUCHPAD", "1"); ++ if (is_touchscreen) ++ udev_builtin_add_property(dev, test, "ID_INPUT_TOUCHSCREEN", "1"); ++ if (is_joystick) ++ udev_builtin_add_property(dev, test, "ID_INPUT_JOYSTICK", "1"); ++ if (is_tablet) ++ udev_builtin_add_property(dev, test, "ID_INPUT_TABLET", "1"); + } + + /* key like devices */ +@@ -232,6 +276,7 @@ static int builtin_input_id(struct udev_device *dev, int argc, char *argv[], boo + unsigned long bitmask_abs[NBITS(ABS_MAX)]; + unsigned long bitmask_key[NBITS(KEY_MAX)]; + unsigned long bitmask_rel[NBITS(REL_MAX)]; ++ unsigned long bitmask_props[NBITS(INPUT_PROP_MAX)]; + const char *sysname, *devnode; + + /* walk up the parental chain until we find the real input device; the +@@ -248,7 +293,8 @@ static int builtin_input_id(struct udev_device *dev, int argc, char *argv[], boo + get_cap_mask(dev, pdev, "capabilities/abs", bitmask_abs, sizeof(bitmask_abs), test); + get_cap_mask(dev, pdev, "capabilities/rel", bitmask_rel, sizeof(bitmask_rel), test); + get_cap_mask(dev, pdev, "capabilities/key", bitmask_key, sizeof(bitmask_key), test); +- test_pointers(dev, bitmask_ev, bitmask_abs, bitmask_key, bitmask_rel, test); ++ get_cap_mask(dev, pdev, "properties", bitmask_props, sizeof(bitmask_props), test); ++ test_pointers(dev, bitmask_ev, bitmask_abs, bitmask_key, bitmask_rel, bitmask_props, test); + test_key(dev, bitmask_ev, bitmask_key, test); + } + +-- +2.1.4 + diff -Nru systemd-219/debian/patches/journald-handle-more-gracefully-when-bind-fails-on-a.patch systemd-219/debian/patches/journald-handle-more-gracefully-when-bind-fails-on-a.patch --- systemd-219/debian/patches/journald-handle-more-gracefully-when-bind-fails-on-a.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-219/debian/patches/journald-handle-more-gracefully-when-bind-fails-on-a.patch 2015-05-21 12:47:59.000000000 +0000 @@ -0,0 +1,30 @@ +From: Lennart Poettering +Date: Wed, 20 May 2015 14:37:21 +0200 +Subject: journald: handle more gracefully when bind() fails on audit sockets + +--- + src/journal/journald-audit.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/journal/journald-audit.c b/src/journal/journald-audit.c +index 46eb82f..0e739a2 100644 +--- a/src/journal/journald-audit.c ++++ b/src/journal/journald-audit.c +@@ -532,9 +532,14 @@ int server_open_audit(Server *s) { + return 0; + } + +- r = bind(s->audit_fd, &sa.sa, sizeof(sa.nl)); +- if (r < 0) +- return log_error_errno(errno, "Failed to join audit multicast group: %m"); ++ if (bind(s->audit_fd, &sa.sa, sizeof(sa.nl)) < 0) { ++ log_warning_errno(errno, ++ "Failed to join audit multicast group. " ++ "The kernel is probably too old or multicast reading is not supported. " ++ "Ignoring: %m"); ++ s->audit_fd = safe_close(s->audit_fd); ++ return 0; ++ } + } else + fd_nonblock(s->audit_fd, 1); + diff -Nru systemd-219/debian/patches/Make-systemctl-enable-disable-call-update-rc.d-for-s.patch systemd-219/debian/patches/Make-systemctl-enable-disable-call-update-rc.d-for-s.patch --- systemd-219/debian/patches/Make-systemctl-enable-disable-call-update-rc.d-for-s.patch 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/patches/Make-systemctl-enable-disable-call-update-rc.d-for-s.patch 2015-05-21 12:47:59.000000000 +0000 @@ -10,7 +10,7 @@ 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index 4ec0cff..bf6c5db 100644 +index 4ec0cff..278f2f9 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -5117,7 +5117,7 @@ static int import_environment(sd_bus *bus, char **args) { @@ -43,7 +43,7 @@ char **k; int j; pid_t pid; -@@ -5180,15 +5181,53 @@ static int enable_sysv_units(const char *verb, char **args) { +@@ -5180,17 +5181,55 @@ static int enable_sysv_units(const char *verb, char **args) { if (!found_sysv) continue; @@ -74,7 +74,6 @@ + } + + log_info("Executing %s", l); -+ free(l); + + pid = fork(); + if (pid < 0) { @@ -102,4 +101,7 @@ + argv[c-1] = verb; argv[c] = NULL; ++ free(l); l = strv_join((char**)argv, " "); + if (!l) + return log_oom(); diff -Nru systemd-219/debian/patches/mount-don-t-claim-a-device-is-gone-from-proc-self-mo.patch systemd-219/debian/patches/mount-don-t-claim-a-device-is-gone-from-proc-self-mo.patch --- systemd-219/debian/patches/mount-don-t-claim-a-device-is-gone-from-proc-self-mo.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-219/debian/patches/mount-don-t-claim-a-device-is-gone-from-proc-self-mo.patch 2015-05-21 12:47:59.000000000 +0000 @@ -0,0 +1,92 @@ +From: Lennart Poettering +Date: Tue, 19 May 2015 13:50:36 +0200 +Subject: mount: don't claim a device is gone from /proc/self/mountinfo before + it is gone from *all* lines + +Devices might be referenced by multiple mount points in +/proc/self/mountinfo, hence we should consider them unmounted only after +they disappeared from all lines, not just from one. + +http://lists.freedesktop.org/archives/systemd-devel/2015-May/032026.html +--- + src/core/mount.c | 39 ++++++++++++++++++++++++++++++++++----- + 1 file changed, 34 insertions(+), 5 deletions(-) + +diff --git a/src/core/mount.c b/src/core/mount.c +index 3ae0eb4..a829cf7 100644 +--- a/src/core/mount.c ++++ b/src/core/mount.c +@@ -1696,7 +1696,10 @@ fail: + } + + static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata) { ++ _cleanup_set_free_ Set *around = NULL, *gone = NULL; + Manager *m = userdata; ++ const char *what; ++ Iterator i; + Unit *u; + int r; + +@@ -1763,6 +1766,19 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents, + + if (!mount->is_mounted) { + ++ /* A mount point is not around right now. It ++ * might be gone, or might never have ++ * existed. */ ++ ++ if (mount->from_proc_self_mountinfo && ++ mount->parameters_proc_self_mountinfo.what) { ++ ++ /* Remember that this device might just have disappeared */ ++ if (set_ensure_allocated(&gone, &string_hash_ops) < 0 || ++ set_put(gone, mount->parameters_proc_self_mountinfo.what) < 0) ++ log_oom(); /* we don't care too much about OOM here... */ ++ } ++ + mount->from_proc_self_mountinfo = false; + + switch (mount->state) { +@@ -1778,13 +1794,9 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents, + break; + } + +- if (mount->parameters_proc_self_mountinfo.what) +- (void) device_found_node(m, mount->parameters_proc_self_mountinfo.what, false, DEVICE_FOUND_MOUNT, true); +- +- + } else if (mount->just_mounted || mount->just_changed) { + +- /* New or changed mount entry */ ++ /* A mount point was added or changed */ + + switch (mount->state) { + +@@ -1811,10 +1823,27 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents, + } + } + ++ if (mount->is_mounted && ++ mount->from_proc_self_mountinfo && ++ mount->parameters_proc_self_mountinfo.what) { ++ ++ if (set_ensure_allocated(&around, &string_hash_ops) < 0 || ++ set_put(around, mount->parameters_proc_self_mountinfo.what) < 0) ++ log_oom(); ++ } ++ + /* Reset the flags for later calls */ + mount->is_mounted = mount->just_mounted = mount->just_changed = false; + } + ++ SET_FOREACH(what, gone, i) { ++ if (set_contains(around, what)) ++ continue; ++ ++ /* Let the device units know that the device is no longer mounted */ ++ (void) device_found_node(m, what, false, DEVICE_FOUND_MOUNT, true); ++ } ++ + return 0; + } + diff -Nru systemd-219/debian/patches/Provide-shutdown-fallback-for-upstart.patch systemd-219/debian/patches/Provide-shutdown-fallback-for-upstart.patch --- systemd-219/debian/patches/Provide-shutdown-fallback-for-upstart.patch 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/patches/Provide-shutdown-fallback-for-upstart.patch 2015-05-21 12:47:59.000000000 +0000 @@ -17,7 +17,7 @@ 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index bc56c5f..f70a3c6 100644 +index af5ff69..23040d8 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -34,6 +34,7 @@ @@ -28,7 +28,7 @@ #include #include #include -@@ -7070,6 +7071,41 @@ static int talk_initctl(void) { +@@ -7092,6 +7093,41 @@ static int talk_initctl(void) { return 1; } @@ -70,7 +70,7 @@ static int systemctl_main(sd_bus *bus, int argc, char *argv[], int bus_error) { static const struct { -@@ -7307,11 +7343,15 @@ static int start_with_fallback(sd_bus *bus) { +@@ -7329,11 +7365,15 @@ static int start_with_fallback(sd_bus *bus) { goto done; } diff -Nru systemd-219/debian/patches/Revert-core-one-step-back-again-for-nspawn-we-actual.patch systemd-219/debian/patches/Revert-core-one-step-back-again-for-nspawn-we-actual.patch --- systemd-219/debian/patches/Revert-core-one-step-back-again-for-nspawn-we-actual.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-219/debian/patches/Revert-core-one-step-back-again-for-nspawn-we-actual.patch 2015-05-21 12:47:59.000000000 +0000 @@ -0,0 +1,32 @@ +From: Martin Pitt +Date: Mon, 27 Apr 2015 15:29:13 +0200 +Subject: Revert "core: one step back again, + for nspawn we actually can't wait for cgroups running empty since + systemd will get exactly zero notifications about it" + +This reverts commit 743970d2ea6d08aa7c7bff8220f6b7702f2b1db7. +--- + src/core/unit.c | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/src/core/unit.c b/src/core/unit.c +index 93487d8..1ddd105 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -3542,15 +3542,7 @@ int unit_kill_context( + log_unit_warning_errno(u->id, r, "Failed to kill control group: %m"); + } else if (r > 0) { + +- /* FIXME: For now, we will not wait for the +- * cgroup members to die, simply because +- * cgroup notification is unreliable. It +- * doesn't work at all in containers, and +- * outside of containers it can be confused +- * easily by leaving directories in the +- * cgroup. */ +- +- /* wait_for_exit = true; */ ++ wait_for_exit = true; + + if (c->send_sighup && k != KILL_KILL) { + set_free(pid_set); diff -Nru systemd-219/debian/patches/series systemd-219/debian/patches/series --- systemd-219/debian/patches/series 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/patches/series 2015-07-03 11:00:15.000000000 +0000 @@ -5,6 +5,13 @@ units-move-After-systemd-hwdb-update.service-depende.patch timesyncd-enable-timesyncd-in-virtual-machines.patch login-make-hold-off-timeout-configurable.patch +util-Fix-assertion-in-split-on-missing.patch +core-Fix-assertion-with-empty-Exec-paths.patch +device-create-units-with-intended-found-value.patch +mount-don-t-claim-a-device-is-gone-from-proc-self-mo.patch +journald-handle-more-gracefully-when-bind-fails-on-a.patch +units-conditionalize-audit-multicast-socket-on-CAP_A.patch +fix-touch-screen-detection.patch ## Debian specific patches Add-back-support-for-Debian-specific-config-files.patch @@ -65,6 +72,7 @@ fsckd-daemon-for-inter-fsckd-communication.patch Add-fsckd-po-files.patch cryptsetup-Implement-offset-and-skip-options.patch +Revert-core-one-step-back-again-for-nspawn-we-actual.patch ## Ubuntu patches: Support-system-image-read-only-etc.patch diff -Nru systemd-219/debian/patches/systemctl-Don-t-forward-telinit-u-to-upstart.patch systemd-219/debian/patches/systemctl-Don-t-forward-telinit-u-to-upstart.patch --- systemd-219/debian/patches/systemctl-Don-t-forward-telinit-u-to-upstart.patch 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/patches/systemctl-Don-t-forward-telinit-u-to-upstart.patch 2015-05-21 12:47:59.000000000 +0000 @@ -17,10 +17,10 @@ 1 file changed, 7 insertions(+) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index f70a3c6..d34b5f1 100644 +index 23040d8..7e414ce 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c -@@ -6998,6 +6998,13 @@ static int parse_argv(int argc, char *argv[]) { +@@ -7020,6 +7020,13 @@ static int parse_argv(int argc, char *argv[]) { * request to it. For now we simply * guess that it is Upstart. */ diff -Nru systemd-219/debian/patches/systemctl-don-t-skip-native-units-when-enabling-disa.patch systemd-219/debian/patches/systemctl-don-t-skip-native-units-when-enabling-disa.patch --- systemd-219/debian/patches/systemctl-don-t-skip-native-units-when-enabling-disa.patch 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/patches/systemctl-don-t-skip-native-units-when-enabling-disa.patch 2015-05-21 12:47:59.000000000 +0000 @@ -7,48 +7,24 @@ e. g. it does not create Alias= symlinks. Thus always install/enable units ourselves even if update-rc.d handled the corresponding SysV unit. --- - src/systemctl/systemctl.c | 26 ++------------------------ - 1 file changed, 2 insertions(+), 24 deletions(-) + src/systemctl/systemctl.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index bf6c5db..86e9ea8 100644 +index 278f2f9..9a44839 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c -@@ -5141,10 +5141,9 @@ static int enable_sysv_units(const char *verb, char **args) { - while (args[f]) { - const char *name; - _cleanup_free_ char *p = NULL, *q = NULL, *l = NULL; -- bool found_native = false, found_sysv; -+ bool found_sysv; - unsigned c = 1; - const char *argv[6] = { "/usr/sbin/update-rc.d", NULL, NULL, NULL, NULL }; -- char **k; - int j; - pid_t pid; - siginfo_t status; -@@ -5157,21 +5156,6 @@ static int enable_sysv_units(const char *verb, char **args) { - if (path_is_absolute(name)) - continue; +@@ -5169,9 +5169,6 @@ static int enable_sysv_units(const char *verb, char **args) { + break; + } -- STRV_FOREACH(k, paths.unit_path) { -- _cleanup_free_ char *path = NULL; -- -- path = path_join(arg_root, *k, name); -- if (!path) -- return log_oom(); -- -- found_native = access(path, F_OK) >= 0; -- if (found_native) -- break; -- } -- - if (found_native) - continue; - p = path_join(arg_root, SYSTEM_SYSVINIT_PATH, name); if (!p) return log_oom(); -@@ -5181,7 +5165,7 @@ static int enable_sysv_units(const char *verb, char **args) { +@@ -5181,7 +5178,7 @@ static int enable_sysv_units(const char *verb, char **args) { if (!found_sysv) continue; @@ -57,16 +33,13 @@ if (!isempty(arg_root) && !streq(arg_root, "/")) { log_error("Can not run update-rc.d when a root directory other than / is specified"); -@@ -5267,12 +5251,6 @@ static int enable_sysv_units(const char *verb, char **args) { - return -EINVAL; +@@ -5268,6 +5265,9 @@ static int enable_sysv_units(const char *verb, char **args) { } else return -EPROTO; -- -- /* Remove this entry, so that we don't try enabling it as native unit */ -- assert(f > 0); -- f--; -- assert(args[f] == name); -- strv_remove(args, name); - } - #endif ++ if (found_native) ++ continue; ++ + /* Remove this entry, so that we don't try enabling it as native unit */ + assert(f > 0); + f--; diff -Nru systemd-219/debian/patches/units-conditionalize-audit-multicast-socket-on-CAP_A.patch systemd-219/debian/patches/units-conditionalize-audit-multicast-socket-on-CAP_A.patch --- systemd-219/debian/patches/units-conditionalize-audit-multicast-socket-on-CAP_A.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-219/debian/patches/units-conditionalize-audit-multicast-socket-on-CAP_A.patch 2015-05-21 12:47:59.000000000 +0000 @@ -0,0 +1,22 @@ +From: Lennart Poettering +Date: Wed, 20 May 2015 17:40:05 +0200 +Subject: units: conditionalize audit multicast socket on CAP_AUDIT_READ + +The multicast logic can only work if the capability is available, hence +require it. +--- + units/systemd-journald-audit.socket | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/units/systemd-journald-audit.socket b/units/systemd-journald-audit.socket +index 35397aa..541f2cf 100644 +--- a/units/systemd-journald-audit.socket ++++ b/units/systemd-journald-audit.socket +@@ -11,6 +11,7 @@ Documentation=man:systemd-journald.service(8) man:journald.conf(5) + DefaultDependencies=no + Before=sockets.target + ConditionSecurity=audit ++ConditionCapability=CAP_AUDIT_READ + + [Socket] + Service=systemd-journald.service diff -Nru systemd-219/debian/patches/util-Add-hidden-suffixes-for-ucf.patch systemd-219/debian/patches/util-Add-hidden-suffixes-for-ucf.patch --- systemd-219/debian/patches/util-Add-hidden-suffixes-for-ucf.patch 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/patches/util-Add-hidden-suffixes-for-ucf.patch 2015-05-21 12:47:59.000000000 +0000 @@ -8,10 +8,10 @@ 1 file changed, 3 insertions(+) diff --git a/src/shared/util.c b/src/shared/util.c -index 63d4722..bf9b78d 100644 +index 9d365ec..b98f989 100644 --- a/src/shared/util.c +++ b/src/shared/util.c -@@ -1550,6 +1550,9 @@ _pure_ static bool hidden_file_allow_backup(const char *filename) { +@@ -1549,6 +1549,9 @@ _pure_ static bool hidden_file_allow_backup(const char *filename) { endswith(filename, ".dpkg-bak") || endswith(filename, ".dpkg-backup") || endswith(filename, ".dpkg-remove") || diff -Nru systemd-219/debian/patches/util-Fix-assertion-in-split-on-missing.patch systemd-219/debian/patches/util-Fix-assertion-in-split-on-missing.patch --- systemd-219/debian/patches/util-Fix-assertion-in-split-on-missing.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-219/debian/patches/util-Fix-assertion-in-split-on-missing.patch 2015-05-21 12:47:59.000000000 +0000 @@ -0,0 +1,76 @@ +From: Martin Pitt +Date: Wed, 22 Apr 2015 23:09:43 +0100 +Subject: util: Fix assertion in split() on missing ' + +When parsing a unit with a trailing slash after an escaped line break, like + + ExecStart=/bin/echo 'foo \ + bar' + +the split() function (through config_parse()) asserted and crashed pid 1: + + Assertion 'current[*l + 1] == quotechars[0]' failed at ../src/shared/util.c:583, function split(). Aborting. + +Fix this by returning an error in this case ("trailing garbage"). + +Add corresponding test case. Also fix the missing "unit" argument of +config_parse_exec() in the comment. + +https://launchpad.net/bugs/1447243 +--- + src/shared/util.c | 3 +-- + src/test/test-unit-file.c | 15 +++++++++++++++ + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/src/shared/util.c b/src/shared/util.c +index 63d4722..9d365ec 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -574,13 +574,12 @@ const char* split(const char **state, size_t *l, const char *separator, bool quo + char quotechars[2] = {*current, '\0'}; + + *l = strcspn_escaped(current + 1, quotechars); +- if (current[*l + 1] == '\0' || ++ if (current[*l + 1] == '\0' || current[*l + 1] != quotechars[0] || + (current[*l + 2] && !strchr(separator, current[*l + 2]))) { + /* right quote missing or garbage at the end */ + *state = current; + return NULL; + } +- assert(current[*l + 1] == quotechars[0]); + *state = current++ + *l + 2; + } else if (quoted) { + *l = strcspn_escaped(current, separator); +diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c +index e517f57..9f3e3a2 100644 +--- a/src/test/test-unit-file.c ++++ b/src/test/test-unit-file.c +@@ -92,6 +92,7 @@ static void check_execcommand(ExecCommand *c, + + static void test_config_parse_exec(void) { + /* int config_parse_exec( ++ const char *unit, + const char *filename, + unsigned line, + const char *section, +@@ -303,6 +304,20 @@ static void test_config_parse_exec(void) { + assert_se(r == 0); + assert_se(c1->command_next == NULL); + ++ log_info("/* missing ending ' */"); ++ r = config_parse_exec(NULL, "fake", 4, "section", 1, ++ "LValue", 0, "/path 'foo", ++ &c, NULL); ++ assert_se(r == 0); ++ assert_se(c1->command_next == NULL); ++ ++ log_info("/* missing ending ' with trailing backslash */"); ++ r = config_parse_exec(NULL, "fake", 4, "section", 1, ++ "LValue", 0, "/path 'foo\\", ++ &c, NULL); ++ assert_se(r == 0); ++ assert_se(c1->command_next == NULL); ++ + exec_command_free_list(c); + } + diff -Nru systemd-219/debian/systemd.links systemd-219/debian/systemd.links --- systemd-219/debian/systemd.links 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/systemd.links 2015-05-21 12:47:59.000000000 +0000 @@ -77,6 +77,7 @@ # Enable Debian specific units /lib/systemd/system/debian-fixup.service /lib/systemd/system/sysinit.target.wants/debian-fixup.service /lib/systemd/system/getty-static.service /lib/systemd/system/getty.target.wants/getty-static.service +/lib/systemd/system/sigpwr-container-shutdown.service /lib/systemd/system/sigpwr.target.wants/sigpwr-container-shutdown.service # Compat symlink /lib/systemd/systemd /bin/systemd diff -Nru systemd-219/debian/tests/boot-smoke systemd-219/debian/tests/boot-smoke --- systemd-219/debian/tests/boot-smoke 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/tests/boot-smoke 2015-05-21 12:47:59.000000000 +0000 @@ -29,7 +29,13 @@ pidof polkitd echo "checking that there are no running jobs" - assert_eq "$(systemctl --no-pager --no-legend list-jobs || true)" "" + TIMEOUT=10 + while [ $TIMEOUT -ge 0 ]; do + running="$(systemctl --no-pager --no-legend list-jobs || true)" + [ -n "$running" ] || break + TIMEOUT=$((TIMEOUT - 1)) + done + assert_eq "$running" "" fi if [ "$ADT_REBOOT_MARK" -ge 20 ]; then diff -Nru systemd-219/debian/tests/control systemd-219/debian/tests/control --- systemd-219/debian/tests/control 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/tests/control 2015-05-21 12:47:59.000000000 +0000 @@ -38,5 +38,5 @@ Restrictions: needs-recommends, needs-root, isolation-container, allow-stderr Tests: systemd-fsckd -Depends: systemd, systemd-sysv, python3, lightdm +Depends: systemd, systemd-sysv, python3, lightdm, plymouth Restrictions: needs-root, isolation-machine, needs-recommends, breaks-testbed diff -Nru systemd-219/debian/tests/systemd-fsckd systemd-219/debian/tests/systemd-fsckd --- systemd-219/debian/tests/systemd-fsckd 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/tests/systemd-fsckd 2015-05-21 12:47:59.000000000 +0000 @@ -223,15 +223,18 @@ '''ensure plymouth is enabled in grub config (doesn't reboot)''' plymouth_enabled = 'splash' in open('/boot/grub/grub.cfg').read() if enable and not plymouth_enabled: - shutil.copy2(GRUB_AUTOPKGTEST_CONFIG_PATH, TEST_AUTOPKGTEST_CONFIG_PATH) - for line in fileinput.input([TEST_AUTOPKGTEST_CONFIG_PATH], inplace=True): - if line.startswith("GRUB_CMDLINE_LINUX_DEFAULT"): - print(line[:line.rfind('"')] + ' splash quiet"\n') - subprocess.check_call(['update-grub'], stderr=subprocess.DEVNULL) + if os.path.exists(GRUB_AUTOPKGTEST_CONFIG_PATH): + shutil.copy2(GRUB_AUTOPKGTEST_CONFIG_PATH, TEST_AUTOPKGTEST_CONFIG_PATH) + for line in fileinput.input([TEST_AUTOPKGTEST_CONFIG_PATH], inplace=True): + if line.startswith("GRUB_CMDLINE_LINUX_DEFAULT"): + print(line[:line.rfind('"')] + ' splash quiet"\n') + else: + with open(TEST_AUTOPKGTEST_CONFIG_PATH, 'w') as f: + f.write('GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0 splash quiet"\n') elif not enable and plymouth_enabled: with suppress(FileNotFoundError): os.remove(TEST_AUTOPKGTEST_CONFIG_PATH) - subprocess.check_call(['update-grub'], stderr=subprocess.DEVNULL) + subprocess.check_call(['update-grub'], stderr=subprocess.DEVNULL) def boot_with_systemd_distro(): diff -Nru systemd-219/debian/tests/unit-config systemd-219/debian/tests/unit-config --- systemd-219/debian/tests/unit-config 2015-04-18 16:06:16.000000000 +0000 +++ systemd-219/debian/tests/unit-config 2015-05-21 12:47:59.000000000 +0000 @@ -266,6 +266,27 @@ self.assertEnabled(False) + def test_sysv_enable(self): + '''only sysv: enable''' + + self.create_sysv() + subprocess.check_call(['systemctl', 'enable', 'test_enable']) + + # enabled the sysv script + l = glob('/etc/rc2.d/S??test_enable') + self.assertEqual(len(l), 1, 'expect one symlink in %s' % repr(l)) + self.assertEqual(os.readlink(l[0]), '../init.d/test_enable') + + def test_sysv_disable(self): + '''only sysv: disable''' + + self.create_sysv(enable=True) + subprocess.check_call(['systemctl', 'disable', 'test_enable']) + + # disabled the sysv script + l = glob('/etc/rc2.d/S??test_enable') + self.assertEqual(l, []) + if __name__ == '__main__': unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout,