[-]
[+]
|
Added |
_service:tar_git:systemd.changes
|
|
[-]
[+]
|
Added |
_service:tar_git:systemd.spec
^
|
|
[-]
[+]
|
Added |
_service:tar_git:systemd-187-make-readahead-depend-on-sysinit.patch
^
|
@@ -0,0 +1,34 @@
+From 1f62caec04226e99bcc8c70724506e928dd4eb47 Mon Sep 17 00:00:00 2001
+From: Thilo Fromm <kontakt@thilo-fromm.de>
+Date: Sun, 19 Aug 2012 14:14:55 +0000
+Subject: [PATCH] systemd 187 make readahead depend on sysinit
+
+---
+ units/systemd-readahead-collect.service.in | 2 +-
+ units/systemd-readahead-replay.service.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/units/systemd-readahead-collect.service.in b/units/systemd-readahead-collect.service.in
+index c958bd8..6f0da38 100644
+--- a/units/systemd-readahead-collect.service.in
++++ b/units/systemd-readahead-collect.service.in
+@@ -24,5 +24,5 @@ StandardOutput=null
+ OOMScoreAdjust=1000
+
+ [Install]
+-WantedBy=default.target
++WantedBy=sysinit.target
+ Also=systemd-readahead-drop.service
+diff --git a/units/systemd-readahead-replay.service.in b/units/systemd-readahead-replay.service.in
+index 20bba18..e08ebcb 100644
+--- a/units/systemd-readahead-replay.service.in
++++ b/units/systemd-readahead-replay.service.in
+@@ -23,4 +23,4 @@ StandardOutput=null
+ OOMScoreAdjust=1000
+
+ [Install]
+-WantedBy=default.target
++WantedBy=sysinit.target
+--
+1.7.9.5
+
|
[-]
[+]
|
Added |
_service:tar_git:systemd-187-remove-display-manager.service.patch
^
|
@@ -0,0 +1,25 @@
+From 403b44be5216749d57b8cb72ddc455ab81013e1a Mon Sep 17 00:00:00 2001
+From: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
+Date: Mon, 17 Jun 2013 16:06:02 +0300
+Subject: [PATCH] Remove display-manager.service
+
+Signed-off-by: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
+---
+ units/graphical.target | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/units/graphical.target b/units/graphical.target
+index 65f2521..7c6ebd4 100644
+--- a/units/graphical.target
++++ b/units/graphical.target
+@@ -11,7 +11,6 @@ Documentation=man:systemd.special(7)
+ Requires=multi-user.target
+ After=multi-user.target
+ Conflicts=rescue.target
+-Wants=display-manager.service
+ AllowIsolate=yes
+
+ [Install]
+--
+1.7.9.5
+
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-configure-start-limit.patch
^
|
@@ -0,0 +1,152 @@
+commit 3f41e1e5955552a771748225334b3e8a7eb02b8a
+Author: Lukas Nykryn <lnykryn@redhat.com>
+Date: Fri Nov 8 16:01:22 2013 +0100
+
+ manager: configurable StartLimit default values
+
+ https://bugzilla.redhat.com/show_bug.cgi?id=821723
+
+diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
+index 2a0a10c..fd898f7 100644
+--- a/man/systemd-system.conf.xml
++++ b/man/systemd-system.conf.xml
+@@ -115,6 +115,19 @@
+ <varname>TimeoutSec=</varname> value.
+ </para></listitem>
+ </varlistentry>
++ <varlistentry>
++ <term><varname>DefaultStartLimitInterval=</varname></term>
++ <term><varname>DefaultStartLimitBurst=</varname></term>
++
++ <listitem><para>Configure the default start rate
++ limiting, as configured per-service by
++ <varname>StartLimitInterval=</varname> and
++ <varname>StartLimitBurst=</varname>. See
++ <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
++ for details on the per-service
++ settings).
++ </para></listitem>
++ </varlistentry>
+
+ <varlistentry>
+ <term><varname>CPUAffinity=</varname></term>
+diff --git a/man/systemd.service.xml b/man/systemd.service.xml
+index d1f4a2d..22c0d5a 100644
+--- a/man/systemd.service.xml
++++ b/man/systemd.service.xml
+@@ -863,12 +863,15 @@
+ these two options, this rate limiting
+ may be modified. Use
+ <varname>StartLimitInterval=</varname>
+- to configure the checking interval
+- (defaults to 10s, set to 0 to disable
++ to configure the checking interval (defaults to
++ <varname>DefaultStartLimitInterval=</varname> in
++ manager configuration file, set to 0 to disable
+ any kind of rate limiting). Use
+ <varname>StartLimitBurst=</varname> to
+ configure how many starts per interval
+- are allowed (defaults to 5). These
++ are allowed (defaults to
++ <varname>DefaultStartLimitBurst=</varname> in
++ manager configuration file). These
+ configuration options are particularly
+ useful in conjunction with
+ <varname>Restart=</varname>, however
+diff --git a/src/core/main.c b/src/core/main.c
+index 8abad6d..ede1a12 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -93,6 +93,8 @@ static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT;
+ static usec_t arg_default_restart_usec = DEFAULT_RESTART_USEC;
+ static usec_t arg_default_timeout_start_usec = DEFAULT_TIMEOUT_USEC;
+ static usec_t arg_default_timeout_stop_usec = DEFAULT_TIMEOUT_USEC;
++static usec_t arg_default_start_limit_interval = DEFAULT_START_LIMIT_INTERVAL;
++static unsigned arg_default_start_limit_burst = DEFAULT_START_LIMIT_BURST;
+ static usec_t arg_runtime_watchdog = 0;
+ static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE;
+ static char **arg_default_environment = NULL;
+@@ -642,6 +644,8 @@ static int parse_config_file(void) {
+ { "Manager", "DefaultTimeoutStartSec", config_parse_sec, 0, &arg_default_timeout_start_usec },
+ { "Manager", "DefaultTimeoutStopSec", config_parse_sec, 0, &arg_default_timeout_stop_usec },
+ { "Manager", "DefaultRestartSec", config_parse_sec, 0, &arg_default_restart_usec },
++ { "Manager", "DefaultStartLimitInterval", config_parse_sec, 0, &arg_default_start_limit_interval },
++ { "Manager", "DefaultStartLimitBurst", config_parse_unsigned, 0, &arg_default_start_limit_burst },
+ { "Manager", "JoinControllers", config_parse_join_controllers, 0, &arg_join_controllers },
+ { "Manager", "RuntimeWatchdogSec", config_parse_sec, 0, &arg_runtime_watchdog },
+ { "Manager", "ShutdownWatchdogSec", config_parse_sec, 0, &arg_shutdown_watchdog },
+@@ -1551,6 +1555,8 @@ int main(int argc, char *argv[]) {
+ m->default_restart_usec = arg_default_restart_usec;
+ m->default_timeout_start_usec = arg_default_timeout_start_usec;
+ m->default_timeout_stop_usec = arg_default_timeout_stop_usec;
++ m->default_start_limit_interval = arg_default_start_limit_interval;
++ m->default_start_limit_burst = arg_default_start_limit_burst;
+ m->runtime_watchdog = arg_runtime_watchdog;
+ m->shutdown_watchdog = arg_shutdown_watchdog;
+ m->userspace_timestamp = userspace_timestamp;
+diff --git a/src/core/manager.h b/src/core/manager.h
+index c704d0e..f83c008 100644
+--- a/src/core/manager.h
++++ b/src/core/manager.h
+@@ -233,6 +233,9 @@ struct Manager {
+ usec_t default_restart_usec, default_timeout_start_usec,
+ default_timeout_stop_usec;
+
++ usec_t default_start_limit_interval;
++ unsigned default_start_limit_burst;
++
+ struct rlimit *rlimit[RLIMIT_NLIMITS];
+
+ /* non-zero if we are reloading or reexecuting, */
+diff --git a/src/core/service.c b/src/core/service.c
+index d11de79..3da32a1 100644
+--- a/src/core/service.c
++++ b/src/core/service.c
+@@ -143,7 +143,9 @@ static void service_init(Unit *u) {
+ kill_context_init(&s->kill_context);
+ cgroup_context_init(&s->cgroup_context);
+
+- RATELIMIT_INIT(s->start_limit, 10*USEC_PER_SEC, 5);
++ RATELIMIT_INIT(s->start_limit,
++ u->manager->default_start_limit_interval,
++ u->manager->default_start_limit_burst);
+
+ s->control_command_id = _SERVICE_EXEC_COMMAND_INVALID;
+ }
+diff --git a/src/core/system.conf b/src/core/system.conf
+index 3c6cc03..38bbca5 100644
+--- a/src/core/system.conf
++++ b/src/core/system.conf
+@@ -27,6 +27,8 @@
+ #DefaultTimeoutStartSec=90s
+ #DefaultTimeoutStopSec=90s
+ #DefaultRestartSec=100ms
++#DefaultStartLimitInterval=10s
++#DefaultStartLimitBurst=5
+ #DefaultEnvironment=
+ #DefaultLimitCPU=
+ #DefaultLimitFSIZE=
+diff --git a/src/core/user.conf b/src/core/user.conf
+index b030701..923ca66 100644
+--- a/src/core/user.conf
++++ b/src/core/user.conf
+@@ -17,3 +17,5 @@
+ #DefaultTimeoutStartSec=90s
+ #DefaultTimeoutStopSec=90s
+ #DefaultRestartSec=100ms
++#DefaultStartLimitInterval=10s
++#DefaultStartLimitBurst=5
+diff --git a/src/shared/def.h b/src/shared/def.h
+index 46b88a8..d7e077a 100644
+--- a/src/shared/def.h
++++ b/src/shared/def.h
+@@ -27,6 +27,9 @@
+ #define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC)
+ #define DEFAULT_CONFIRM_USEC (30*USEC_PER_SEC)
+
++#define DEFAULT_START_LIMIT_INTERVAL (10*USEC_PER_SEC)
++#define DEFAULT_START_LIMIT_BURST 5
++
+ #define DEFAULT_EXIT_USEC (5*USEC_PER_MINUTE)
+
+ #define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-configure-timeout.patch
^
|
@@ -0,0 +1,277 @@
+commit 1f19a534ea84458670ec011f6d1ba96f76e3f783
+Author: Oleksii Shevchuk <alxchk@gmail.com>
+Date: Mon Nov 4 18:47:43 2013 +0200
+
+ Configurable Timeouts/Restarts default values
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=71132
+
+ Patch adds DefaultTimeoutStartSec, DefaultTimeoutStopSec, DefaultRestartSec
+ configuration options to manager configuration file.
+
+diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
+index e8cf8a9..c1f2648 100644
+--- a/man/systemd-system.conf.xml
++++ b/man/systemd-system.conf.xml
+@@ -61,7 +61,6 @@
+ otherwise <filename>user.conf</filename>. These
+ configuration files contain a few settings controlling
+ basic manager operations.</para>
+-
+ </refsect1>
+
+ <refsect1>
+@@ -95,6 +94,29 @@
+ </varlistentry>
+
+ <varlistentry>
++ <term><varname>DefaultTimeoutStartSec=</varname></term>
++ <term><varname>DefaultTimeoutStopSec=</varname></term>
++ <term><varname>DefaultRestartSec=</varname></term>
++
++ <listitem><para>Configures the default
++ time-outs for starting and stopping of
++ units, as well as the default time to
++ sleep between automatic restarts of a
++ units, as configured per-unit in
++ <varname>TimeoutStartSec=</varname>,
++ <varname>TimeoutStopSec=</varname> and
++ <varname>RestartSec=</varname> (for
++ service units see
++ <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
++ for details on the per-unit
++ settings). For non-service units
++ <varname>DefaultTimeoutStartSec=</varname>
++ sets the default
++ <varname>TimeoutSec=</varname> value.
++ </para></listitem>
++ </varlistentry>
++
++ <varlistentry>
+ <term><varname>CPUAffinity=</varname></term>
+
+ <listitem><para>Configures the initial
+diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml
+index 217289a..bed2975 100644
+--- a/man/systemd.mount.xml
++++ b/man/systemd.mount.xml
+@@ -260,8 +260,8 @@
+ Takes a unit-less value in seconds, or
+ a time span value such as "5min
+ 20s". Pass 0 to disable the timeout
+- logic. Defaults to
+- 90s.</para></listitem>
++ logic. Default value is setted up in manager configuration
++ file via <term><varname>DefaultTimeoutStart=</varname></term>.</para></listitem>
+ </varlistentry>
+ </variablelist>
+
+diff --git a/man/systemd.service.xml b/man/systemd.service.xml
+index b1e3af2..0cb3d9e 100644
+--- a/man/systemd.service.xml
++++ b/man/systemd.service.xml
+@@ -524,7 +524,8 @@
+ Takes a unit-less value in seconds, or a
+ time span value such as "5min
+ 20s". Pass 0 to disable the timeout
+- logic. Defaults to 90s, except when
++ logic. Defaults to <varname>TimeoutStartSec=</varname> in
++ manager configuration file, except when
+ <varname>Type=oneshot</varname> is
+ used in which case the timeout
+ is disabled by default.
+@@ -545,7 +546,8 @@
+ Takes a unit-less value in seconds, or a
+ time span value such as "5min
+ 20s". Pass 0 to disable the timeout
+- logic. Defaults to 90s.
++ logic. Defaults to <varname>TimeoutStartSec=</varname> in
++ manager configuration file.
+ </para></listitem>
+ </varlistentry>
+
+diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
+index 8c88d9f..1c78562 100644
+--- a/man/systemd.socket.xml
++++ b/man/systemd.socket.xml
+@@ -679,8 +679,8 @@
+ Takes a unit-less value in seconds, or
+ a time span value such as "5min
+ 20s". Pass 0 to disable the timeout
+- logic. Defaults to
+- 90s.</para></listitem>
++ logic. Defaults to <varname>TimeoutStartSec=</varname> in
++ manager configuration file.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml
+index 813ae6c..13f6c84 100644
+--- a/man/systemd.swap.xml
++++ b/man/systemd.swap.xml
+@@ -186,8 +186,8 @@
+ Takes a unit-less value in seconds, or
+ a time span value such as "5min
+ 20s". Pass 0 to disable the timeout
+- logic. Defaults to
+- 90s.</para></listitem>
++ logic. Defaults to <varname>TimeoutStartSec=</varname> in
++ manager configuration file.</para></listitem>
+ </varlistentry>
+ </variablelist>
+
+diff --git a/src/core/device.c b/src/core/device.c
+index 0595015..6fc4c95 100644
+--- a/src/core/device.c
++++ b/src/core/device.c
+@@ -70,7 +70,7 @@ static void device_init(Unit *u) {
+ * indefinitely for plugged in devices, something which cannot
+ * happen for the other units since their operations time out
+ * anyway. */
+- UNIT(d)->job_timeout = DEFAULT_TIMEOUT_USEC;
++ UNIT(d)->job_timeout = u->manager->default_timeout_start_usec;
+
+ UNIT(d)->ignore_on_isolate = true;
+ UNIT(d)->ignore_on_snapshot = true;
+diff --git a/src/core/main.c b/src/core/main.c
+index 5d30893..b21fb49 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -90,6 +90,9 @@ static bool arg_switched_root = false;
+ static char ***arg_join_controllers = NULL;
+ static ExecOutput arg_default_std_output = EXEC_OUTPUT_JOURNAL;
+ static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT;
++static usec_t arg_default_restart_usec = DEFAULT_RESTART_USEC;
++static usec_t arg_default_timeout_start_usec = DEFAULT_TIMEOUT_USEC;
++static usec_t arg_default_timeout_stop_usec = DEFAULT_TIMEOUT_USEC;
+ static usec_t arg_runtime_watchdog = 0;
+ static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE;
+ static char **arg_default_environment = NULL;
+@@ -636,6 +639,9 @@ static int parse_config_file(void) {
+ { "Manager", "CPUAffinity", config_parse_cpu_affinity2, 0, NULL },
+ { "Manager", "DefaultStandardOutput", config_parse_output, 0, &arg_default_std_output },
+ { "Manager", "DefaultStandardError", config_parse_output, 0, &arg_default_std_error },
++ { "Manager", "DefaultTimeoutStartSec", config_parse_sec, 0, &arg_default_timeout_start_usec },
++ { "Manager", "DefaultTimeoutStopSec", config_parse_sec, 0, &arg_default_timeout_stop_usec },
++ { "Manager", "DefaultRestartSec", config_parse_sec, 0, &arg_default_restart_usec },
+ { "Manager", "JoinControllers", config_parse_join_controllers, 0, &arg_join_controllers },
+ { "Manager", "RuntimeWatchdogSec", config_parse_sec, 0, &arg_runtime_watchdog },
+ { "Manager", "ShutdownWatchdogSec", config_parse_sec, 0, &arg_shutdown_watchdog },
+@@ -1542,6 +1548,9 @@ int main(int argc, char *argv[]) {
+ m->confirm_spawn = arg_confirm_spawn;
+ m->default_std_output = arg_default_std_output;
+ m->default_std_error = arg_default_std_error;
++ m->default_restart_usec = arg_default_restart_usec;
++ m->default_timeout_start_usec = arg_default_timeout_start_usec;
++ m->default_timeout_stop_usec = arg_default_timeout_stop_usec;
+ m->runtime_watchdog = arg_runtime_watchdog;
+ m->shutdown_watchdog = arg_shutdown_watchdog;
+ m->userspace_timestamp = userspace_timestamp;
+diff --git a/src/core/manager.h b/src/core/manager.h
+index ffcca48..c704d0e 100644
+--- a/src/core/manager.h
++++ b/src/core/manager.h
+@@ -230,6 +230,9 @@ struct Manager {
+
+ ExecOutput default_std_output, default_std_error;
+
++ usec_t default_restart_usec, default_timeout_start_usec,
++ default_timeout_stop_usec;
++
+ struct rlimit *rlimit[RLIMIT_NLIMITS];
+
+ /* non-zero if we are reloading or reexecuting, */
+diff --git a/src/core/mount.c b/src/core/mount.c
+index 88563b3..0c15b99 100644
+--- a/src/core/mount.c
++++ b/src/core/mount.c
+@@ -65,7 +65,7 @@ static void mount_init(Unit *u) {
+ assert(u);
+ assert(u->load_state == UNIT_STUB);
+
+- m->timeout_usec = DEFAULT_TIMEOUT_USEC;
++ m->timeout_usec = u->manager->default_timeout_start_usec;
+ m->directory_mode = 0755;
+
+ exec_context_init(&m->exec_context);
+diff --git a/src/core/scope.c b/src/core/scope.c
+index 50e5dba..41da3b9 100644
+--- a/src/core/scope.c
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-count-only-restarts.patch
^
|
@@ -0,0 +1,62 @@
+From e24b4c602f3e70ee36bf749fd0d51b2740992e0f Mon Sep 17 00:00:00 2001
+From: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
+Date: Tue, 29 Apr 2014 09:34:07 +0300
+Subject: [PATCH] Count restarts when doing restart, not in start
+
+Signed-off-by: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
+---
+ src/core/service.c | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/src/core/service.c b/src/core/service.c
+index 35053be..9d5f4c6 100644
+--- a/src/core/service.c
++++ b/src/core/service.c
+@@ -2267,6 +2267,8 @@ fail:
+ service_enter_dead(s, SERVICE_FAILURE_RESOURCES, true);
+ }
+
++static int service_start_limit_test(Service *s);
++
+ static void service_enter_restart(Service *s) {
+ int r;
+ DBusError error;
+@@ -2286,6 +2288,13 @@ static void service_enter_restart(Service *s) {
+ return;
+ }
+
++ /* Make sure we don't start services too frequently */
++ r = service_start_limit_test(s);
++ if (r < 0) {
++ service_enter_dead(s, SERVICE_FAILURE_START_LIMIT, false);
++ return;
++ }
++
+ /* Any units that are bound to this service must also be
+ * restarted. We use JOB_RESTART (instead of the more obvious
+ * JOB_START) here so that those dependency jobs will be added
+@@ -2489,7 +2498,6 @@ static int service_start_limit_test(Service *s) {
+
+ static int service_start(Unit *u) {
+ Service *s = SERVICE(u);
+- int r;
+
+ assert(s);
+
+@@ -2521,13 +2529,6 @@ static int service_start(Unit *u) {
+
+ assert(s->state == SERVICE_DEAD || s->state == SERVICE_FAILED);
+
+- /* Make sure we don't enter a busy loop of some kind. */
+- r = service_start_limit_test(s);
+- if (r < 0) {
+- service_enter_dead(s, SERVICE_FAILURE_START_LIMIT, false);
+- return r;
+- }
+-
+ s->result = SERVICE_SUCCESS;
+ s->reload_result = SERVICE_SUCCESS;
+ s->main_pid_known = false;
+--
+1.7.9.5
+
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-do-not-pull-4-megs-from-stack-for-journal-send-test.patch
^
|
@@ -0,0 +1,28 @@
+From 74026f8bd1ce3a7fd4eb4f4872ef091fa15b5992 Mon Sep 17 00:00:00 2001
+From: Matti Kosola <matti.kosola@jolla.com>
+Date: Wed, 1 Oct 2014 14:54:22 +0300
+Subject: [PATCH] Do not pull 4 megs from stack for journal send test
+
+Signed-off-by: Matti Kosola <matti.kosola@jolla.com>
+---
+ src/journal/test-journal-send.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/journal/test-journal-send.c b/src/journal/test-journal-send.c
+index 3e986ed..7aa913f 100644
+--- a/src/journal/test-journal-send.c
++++ b/src/journal/test-journal-send.c
+@@ -25,8 +25,9 @@
+
+ #include "log.h"
+
++static char huge[4096*1024];
++
+ int main(int argc, char *argv[]) {
+- char huge[4096*1024];
+
+ log_set_max_level(LOG_DEBUG);
+
+--
+1.9.1
+
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-do-not-wait-accelerometer.patch
^
|
@@ -0,0 +1,73 @@
+From a545c6e1aa31b4d7e80c9d3609d9fc4fc9921498 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Tue, 8 Jul 2014 18:29:06 +0200
+Subject: accelerometer: Don't wait for new data from the sensor
+
+Instead of waiting for new data from the sensor, which might be
+a long time coming, depending on the sensor device, ask the kernel
+for the last state for that particular input device.
+
+diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c
+index 925d38d..32adf27 100644
+--- a/src/udev/accelerometer/accelerometer.c
++++ b/src/udev/accelerometer/accelerometer.c
+@@ -180,7 +180,7 @@ get_prev_orientation(struct udev_device *dev)
+ return string_to_orientation(value);
+ }
+
+-#define SET_AXIS(axis, code_) if (ev[i].code == code_) { if (got_##axis == 0) { axis = ev[i].value; got_##axis = true; } }
++#define READ_AXIS(axis, var) { memzero(&abs_info, sizeof(abs_info)); r = ioctl(fd, EVIOCGABS(axis), &abs_info); if (r < 0) return; var = abs_info.value; }
+
+ /* accelerometers */
+ static void test_orientation(struct udev *udev,
+@@ -189,10 +189,9 @@ static void test_orientation(struct udev *udev,
+ {
+ OrientationUp old, new;
+ _cleanup_close_ int fd = -1;
+- struct input_event ev[64];
+- bool got_syn = false;
+- bool got_x = false, got_y = false, got_z = false;
++ struct input_absinfo abs_info;
+ int x = 0, y = 0, z = 0;
++ int r;
+ char text[64];
+
+ old = get_prev_orientation(dev);
+@@ -201,30 +200,10 @@ static void test_orientation(struct udev *udev,
+ if (fd < 0)
+ return;
+
+- while (1) {
+- int i, r;
+-
+- r = read(fd, ev, sizeof(struct input_event) * 64);
+-
+- if (r < (int) sizeof(struct input_event))
+- return;
+-
+- for (i = 0; i < r / (int) sizeof(struct input_event); i++) {
+- if (got_syn) {
+- if (ev[i].type == EV_ABS) {
+- SET_AXIS(x, ABS_X);
+- SET_AXIS(y, ABS_Y);
+- SET_AXIS(z, ABS_Z);
+- }
+- }
+- if (ev[i].type == EV_SYN && ev[i].code == SYN_REPORT)
+- got_syn = true;
+- if (got_x && got_y && got_z)
+- goto read_dev;
+- }
+- }
++ READ_AXIS(ABS_X, x);
++ READ_AXIS(ABS_Y, y);
++ READ_AXIS(ABS_Z, z);
+
+-read_dev:
+ new = orientation_calc(old, x, y, z);
+ snprintf(text, sizeof(text),
+ "ID_INPUT_ACCELEROMETER_ORIENTATION=%s", orientation_to_string(new));
+--
+cgit v0.10.2
+
+
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-fix-restart.patch
^
|
@@ -0,0 +1,203 @@
+This is combination of multiple git commits taken from latest systemd-212 to fix
+systemd-208 restart problem
+
+commit e10c9985bbc3cf79f12f9ec7317adfe697fa8214
+Author: Yuxuan Shui <yshuiv7@gmail.com>
+Date: Sat Feb 15 02:38:50 2014 +0800
+
+ core: fix detection of dead processes
+
+ Commit 5ba6985b moves the UNIT_VTABLE(u)->sigchld_event before systemd
+ actually reaps the zombie. Which leads to service_load_pid_file accepting
+ zombie as a valid pid.
+
+ This fixes timeouts like:
+ [ 2746.602243] systemd[1]: chronyd.service stop-sigterm timed out. Killing.
+ [ 2836.852545] systemd[1]: chronyd.service still around after SIGKILL. Ignoring.
+ [ 2927.102187] systemd[1]: chronyd.service stop-final-sigterm timed out. Killing.
+ [ 3017.352560] systemd[1]: chronyd.service still around after final SIGKILL. Entering failed mode.
+
+commit bc6aed7b8b17901ef46c3af9513ae63372b7b413
+Author: Lennart Poettering <lennart@poettering.net>
+Date: Wed Jan 29 20:12:18 2014 +0100
+
+ core: in containers, don't wait for cgroup empty notifications which will never come
+
+diff --git a/configure.ac b/configure.ac
+index 4f26092..64ade0d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -172,6 +172,9 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
+ -Wl,-z,now])
+ AC_SUBST([OUR_LDFLAGS], "$with_ldflags $address_sanitizer_ldflags")
+
++AC_CHECK_SIZEOF(pid_t)
++AC_CHECK_SIZEOF(uid_t)
++
+ # ------------------------------------------------------------------------------
+ # we use python to build the man page index, and for systemd-python
+ have_python=no
+diff --git a/src/core/service.c b/src/core/service.c
+index a646b61..35053be 100644
+--- a/src/core/service.c
++++ b/src/core/service.c
+@@ -1429,6 +1429,14 @@ static int service_load_pid_file(Service *s, bool may_warn) {
+ return -ESRCH;
+ }
+
++ if (get_process_state(pid) == 'Z') {
++ if (may_warn)
++ log_info_unit(UNIT(s)->id,
++ "PID "PID_FMT" read from file %s is a zombie.",
++ pid, s->pid_file);
++ return -ESRCH;
++ }
++
+ if (s->main_pid_known) {
+ if (pid == s->main_pid)
+ return 0;
+diff --git a/src/core/unit.c b/src/core/unit.c
+index 4b97710..61fa0ea 100644
+--- a/src/core/unit.c
++++ b/src/core/unit.c
+@@ -48,6 +48,7 @@
+ #include "label.h"
+ #include "fileio-label.h"
+ #include "bus-errors.h"
++#include "virt.h"
+
+ const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
+ [UNIT_SERVICE] = &service_vtable,
+@@ -2962,7 +2963,7 @@ int unit_kill_context(
+ pid_t control_pid,
+ bool main_pid_alien) {
+
+- int sig, wait_for_exit = 0, r;
++ int sig, wait_for_exit = false, r;
+
+ assert(u);
+ assert(c);
+@@ -2982,7 +2983,8 @@ int unit_kill_context(
+ log_warning_unit(u->id, "Failed to kill main process %li (%s): %s",
+ (long) main_pid, strna(comm), strerror(-r));
+ } else {
+- wait_for_exit = !main_pid_alien;
++ if (!main_pid_alien)
++ wait_for_exit = true;
+
+ if (c->send_sighup)
+ kill(main_pid, SIGHUP);
+@@ -3020,8 +3022,17 @@ int unit_kill_context(
+ if (r != -EAGAIN && r != -ESRCH && r != -ENOENT)
+ log_warning_unit(u->id, "Failed to kill control group: %s", strerror(-r));
+ } else if (r > 0) {
+- wait_for_exit = true;
+- if (c->send_sighup) {
++
++ /* FIXME: Now, this is a terrible hack: in
++ * containers cgroup empty notifications don't
++ * work. Hence we'll not wait for them to run
++ * empty for now, since there is no way to
++ * detect when a service ends with no main PID
++ * known... */
++
++ /* wait_for_exit = true; */
++
++ if (c->send_sighup && !sigkill) {
+ set_free(pid_set);
+
+ pid_set = unit_pid_set(main_pid, control_pid);
+diff --git a/src/shared/time-util.h b/src/shared/time-util.h
+index 7660fe1..33f2ffb 100644
+--- a/src/shared/time-util.h
++++ b/src/shared/time-util.h
+@@ -27,6 +27,9 @@
+ typedef uint64_t usec_t;
+ typedef uint64_t nsec_t;
+
++#define NSEC_FMT "%" PRIu64
++#define USEC_FMT "%" PRIu64
++
+ #include "macro.h"
+
+ typedef struct dual_timestamp {
+diff --git a/src/shared/util.c b/src/shared/util.c
+index 9be6acf..eb69e24 100644
+--- a/src/shared/util.c
++++ b/src/shared/util.c
+@@ -552,6 +552,31 @@ char *truncate_nl(char *s) {
+ return s;
+ }
+
++int get_process_state(pid_t pid) {
++ const char *p;
++ char state;
++ int r;
++ _cleanup_free_ char *line = NULL;
++
++ assert(pid >= 0);
++
++ p = procfs_file_alloca(pid, "stat");
++ r = read_one_line_file(p, &line);
++ if (r < 0)
++ return r;
++
++ p = strrchr(line, ')');
++ if (!p)
++ return -EIO;
++
++ p++;
++
++ if (sscanf(p, " %c", &state) != 1)
++ return -EIO;
++
++ return (unsigned char) state;
++}
++
+ int get_process_comm(pid_t pid, char **name) {
+ const char *p;
+
+diff --git a/src/shared/util.h b/src/shared/util.h
+index 1b845b3..3225c90 100644
+--- a/src/shared/util.h
++++ b/src/shared/util.h
+@@ -40,6 +40,22 @@
+ #include <unistd.h>
+ #include <locale.h>
+
++#if SIZEOF_PID_T == 4
++# define PID_FMT "%" PRIu32
++#elif SIZEOF_PID_T == 2
++# define PID_FMT "%" PRIu16
++#else
++# error Unknown pid_t size
++#endif
++
++#if SIZEOF_UID_T == 4
++# define UID_FMT "%" PRIu32
++#elif SIZEOF_UID_T == 2
++# define UID_FMT "%" PRIu16
++#else
++# error Unknown uid_t size
++#endif
++
+ #include "macro.h"
+ #include "time-util.h"
+
+@@ -215,6 +231,7 @@ char *file_in_same_dir(const char *path, const char *filename);
+
+ int rmdir_parents(const char *path, const char *stop);
+
++int get_process_state(pid_t pid);
+ int get_process_comm(pid_t pid, char **name);
+ int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char **line);
+ int get_process_exe(pid_t pid, char **name);
+@@ -730,7 +747,7 @@ int unlink_noerrno(const char *path);
+ pid_t _pid_ = (pid); \
+ char *_r_; \
+ _r_ = alloca(sizeof("/proc/") -1 + DECIMAL_STR_MAX(pid_t) + 1 + sizeof(field)); \
+- sprintf(_r_, "/proc/%lu/" field, (unsigned long) _pid_); \
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-ignore-omap-vsync.patch
^
|
@@ -0,0 +1,78 @@
+Description: Ignore VSYNC change uevents from omapfb, as they happen at each vsync and thus keep waking up udevd (including rules processing), upstart, and other parts of the system 60 times a second.
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Forwarded: Heck, don't ever show this embarassing hack to anyone. Except if that anyone is an omapfb author, then please don't stop showing this to them until they fix the driver :-)
+Bug-Ubuntu: https://launchpad.net/bugs/1234743
+
+Index: systemd/src/libudev/libudev-monitor.c
+===================================================================
+--- systemd.orig/src/libudev/libudev-monitor.c 2013-02-20 02:32:41.900839006 +0100
++++ systemd/src/libudev/libudev-monitor.c 2013-10-17 11:38:56.216374114 +0200
+@@ -198,6 +198,9 @@
+ (*i)++;
+ }
+
++/* return uint32_t for the first 4 characters in s */
++#define str2word(s) ((s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3])
++
+ /**
+ * udev_monitor_filter_update:
+ * @udev_monitor: monitor
+@@ -216,6 +219,11 @@
+ int err;
+
+ if (udev_list_get_entry(&udev_monitor->filter_subsystem_list) == NULL &&
++#ifdef __arm__
++ /* we always need a filter chain for kernel monitors to get rid
++ * of the omapfb VSYNC uevents */
++ udev_monitor->snl.nl.nl_groups != UDEV_MONITOR_KERNEL &&
++#endif
+ udev_list_get_entry(&udev_monitor->filter_tag_list) == NULL)
+ return 0;
+
+@@ -224,8 +232,45 @@
+
+ /* load magic in A */
+ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, magic));
++#ifndef __arm__
+ /* jump if magic matches */
+ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, UDEV_MONITOR_MAGIC, 1, 0);
++#else
++ /* jump over our whole omapfb/VSYNC check if magic matches */
++ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, UDEV_MONITOR_MAGIC, 10, 0);
++
++ /* filter out omapfb change VSYNC uevents (LP #1234743); they look like
++change@/devices/platform/omapfb\x00ACTION=change\x00DEVPATH=/devices/platform/omapfb\x00SUBSYSTEM=platform\x00VSYNC=1737775695800\x00DRIVER=omapfb\x00MODALIAS=platform:omapfb\x00SEQNUM=8909\x00
++
++ Matching on the VSYNC attribute is a bit finicky, as its exact
++ position in the packet might not be reliable. The real VSYNC uevents
++ have packets of ~ 170 bytes length (varying with the string length of
++ VSYNC= and SEQNUM), while a simple synthetic
++ "echo change | tee /sys/devices/platform/omapfb/uevent" only has 150.
++ So we instead just compare the length of the packet and use 160 as a divider.
++ As we don't generally care about that device at all, this logic does
++ not need to be rock solid, though -- if we would just ignore all
++ change events from that device nothing should break.
++ */
++
++ /* if the event is shorter than 160 bytes, it can't be omapfb/VSYNC, jump to "pass" */
++ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_LEN, 0);
++ bpf_jmp(ins, &i, BPF_JMP|BPF_JGE|BPF_K, 160, 0, 7);
++
++ /* check if it is a change event; if not, jump to "pass" */
++ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, 0);
++ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, str2word("chan"), 0, 5);
++
++ /* check if it is from omapfb */
++ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, 24);
++ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, str2word("/oma"), 0, 3);
++ bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, 28);
++ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, str2word("pfb\0"), 0, 1);
++
++ /* we found the omapfb change uevent, reject it */
++ bpf_stmt(ins, &i, BPF_RET|BPF_K, 0);
++#endif /* omapfb filter hack on __arm__ */
++
+ /* wrong magic, pass packet */
+ bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff);
+
+
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-install-test-binaries.patch
^
|
@@ -0,0 +1,27 @@
+diff --git a/Makefile.am b/Makefile.am
+index 8d9c587..5622ffa 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -96,6 +96,7 @@ udevrulesdir=$(udevlibexecdir)/rules.d
+ udevhwdbdir=$(udevlibexecdir)/hwdb.d
+ catalogdir=$(prefix)/lib/systemd/catalog
+ kernelinstalldir = $(prefix)/lib/kernel/install.d
++testbindir = /opt/tests/systemd-tests/bin
+
+ # And these are the special ones for /
+ rootprefix=@rootprefix@
+@@ -132,11 +133,12 @@ check_PROGRAMS =
+ check_DATA =
+ tests=
+ manual_tests =
++noinst_PROGRAMS =
+ if ENABLE_TESTS
+-noinst_PROGRAMS = $(manual_tests) $(tests)
++testbin_PROGRAMS = $(manual_tests) $(tests)
+ TESTS = $(tests)
+ else
+-noinst_PROGRAMS =
++testbin_PROGRAMS =
+ TESTS =
+ endif
+ udevlibexec_PROGRAMS =
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-pkgconfigdir.patch
^
|
@@ -0,0 +1,22 @@
+diff --git a/Makefile.am b/Makefile.am
+index 8d9c587..7a91eaa 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -65,7 +65,7 @@ dbussystemservicedir=@dbussystemservicedir@
+ dbusinterfacedir=@dbusinterfacedir@
+ pamlibdir=@pamlibdir@
+ pamconfdir=@pamconfdir@
+-pkgconfigdatadir=$(datadir)/pkgconfig
++pkgconfigdatadir=$(libdir)/pkgconfig
+ pkgconfiglibdir=$(libdir)/pkgconfig
+ polkitpolicydir=$(datadir)/polkit-1/actions
+ bashcompletiondir=@bashcompletiondir@
+@@ -2228,7 +2228,7 @@ udevconfdir = $(sysconfdir)/udev
+ dist_udevconf_DATA = \
+ src/udev/udev.conf
+
+-sharepkgconfigdir = $(datadir)/pkgconfig
++sharepkgconfigdir = $(libdir)/pkgconfig
+ sharepkgconfig_DATA = \
+ src/udev/udev.pc
+
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-support-additional-argument-in-reboot.patch
^
|
@@ -0,0 +1,193 @@
+From 353fc7a7c84108b50945a7b735368f6adc35fa6b Mon Sep 17 00:00:00 2001
+From: Matti Kosola <matti.kosola@jolla.com>
+Date: Fri, 13 Mar 2015 11:01:08 +0200
+Subject: [PATCH] Support additional argument in reboot
+
+Signed-off-by: Matti Kosola <matti.kosola@jolla.com>
+---
+ man/systemctl.xml | 12 +++++++++++-
+ src/core/shutdown.c | 14 +++++++++++---
+ src/shared/def.h | 2 ++
+ src/systemctl/systemctl.c | 30 ++++++++++++++++++++++++------
+ 4 files changed, 48 insertions(+), 10 deletions(-)
+
+diff --git a/man/systemctl.xml b/man/systemctl.xml
+index e789d4b..fb246dd 100644
+--- a/man/systemctl.xml
++++ b/man/systemctl.xml
+@@ -1166,7 +1166,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+- <term><command>reboot</command></term>
++ <term><command>reboot <optional><replaceable>arg</replaceable></optional></command></term>
+
+ <listitem>
+ <para>Shut down and reboot the system. This is mostly
+@@ -1179,6 +1179,16 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
+ specified twice, the operation is immediately executed
+ without terminating any processes or unmounting any file
+ systems. This may result in data loss.</para>
++
++ <para>If the optional argument
++ <replaceable>arg</replaceable> is given, it will be passed
++ as the optional argument to the
++ <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
++ system call. The value is architecture and firmware
++ specific. As an example, <literal>recovery</literal> might
++ be used to trigger system recovery, and
++ <literal>fota</literal> might be used to trigger a
++ <quote>firmware over the air</quote> update.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+diff --git a/src/core/shutdown.c b/src/core/shutdown.c
+index 4709746..f4fbe50 100644
+--- a/src/core/shutdown.c
++++ b/src/core/shutdown.c
+@@ -46,6 +46,7 @@
+ #include "virt.h"
+ #include "watchdog.h"
+ #include "killall.h"
++#include "def.h"
+
+ #define FINALIZE_ATTEMPTS 50
+
+@@ -136,6 +137,7 @@ int main(int argc, char *argv[]) {
+ unsigned retries;
+ bool need_umount = true, need_swapoff = true, need_loop_detach = true, need_dm_detach = true;
+ bool in_container, use_watchdog = false;
++ _cleanup_free_ char *param = NULL;
+ char *arguments[3];
+
+ /* suppress shutdown status output if 'quiet' is used */
+@@ -172,9 +174,11 @@ int main(int argc, char *argv[]) {
+
+ in_container = detect_container(NULL) > 0;
+
+- if (streq(argv[1], "reboot"))
++ if (streq(argv[1], "reboot")) {
+ cmd = RB_AUTOBOOT;
+- else if (streq(argv[1], "poweroff"))
++ /* if this fails, that's OK */
++ read_one_line_file(REBOOT_PARAM_FILE, ¶m);
++ } else if (streq(argv[1], "poweroff"))
+ cmd = RB_POWER_OFF;
+ else if (streq(argv[1], "halt"))
+ cmd = RB_HALT_SYSTEM;
+@@ -327,7 +331,11 @@ int main(int argc, char *argv[]) {
+ cmd = RB_AUTOBOOT;
+ }
+
+- reboot(cmd);
++ if (param)
++ syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
++ LINUX_REBOOT_CMD_RESTART2, param);
++ else
++ reboot(cmd);
+
+ if (errno == EPERM && in_container) {
+ /* If we are in a container, and we lacked
+diff --git a/src/shared/def.h b/src/shared/def.h
+index e4ef735..d7e077a 100644
+--- a/src/shared/def.h
++++ b/src/shared/def.h
+@@ -41,3 +41,5 @@
+ #define LOWERCASE_LETTERS "abcdefghijklmnopqrstuvwxyz"
+ #define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ #define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS
++
++#define REBOOT_PARAM_FILE "/run/systemd/reboot-param"
+diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
+index bb7ada9..a34fddb 100644
+--- a/src/systemctl/systemctl.c
++++ b/src/systemctl/systemctl.c
+@@ -20,6 +20,8 @@
+ ***/
+
+ #include <sys/reboot.h>
++#include <linux/reboot.h>
++#include <sys/syscall.h>
+ #include <stdio.h>
+ #include <getopt.h>
+ #include <locale.h>
+@@ -4815,7 +4817,7 @@ static int systemctl_help(void) {
+ " emergency Enter system emergency mode\n"
+ " halt Shut down and halt the system\n"
+ " poweroff Shut down and power-off the system\n"
+- " reboot Shut down and reboot the system\n"
++ " reboot [ARG] Shut down and reboot the system\n"
+ " kexec Shut down and reboot the system with kexec\n"
+ " exit Request user instance exit\n"
+ " switch-root [ROOT] [INIT] Change to a different root file system\n"
+@@ -4829,7 +4831,7 @@ static int systemctl_help(void) {
+
+ static int halt_help(void) {
+
+- printf("%s [OPTIONS...]\n\n"
++ printf("%s [OPTIONS...]%s\n\n"
+ "%s the system.\n\n"
+ " --help Show this help\n"
+ " --halt Halt the machine\n"
+@@ -4840,6 +4842,7 @@ static int halt_help(void) {
+ " -d --no-wtmp Don't write wtmp record\n"
+ " --no-wall Don't send wall message before halt/power-off/reboot\n",
+ program_invocation_short_name,
++ arg_action == ACTION_REBOOT ? " [ARG]" : "",
+ arg_action == ACTION_REBOOT ? "Reboot" :
+ arg_action == ACTION_POWEROFF ? "Power off" :
+ "Halt");
+@@ -5266,7 +5269,7 @@ static int halt_parse_argv(int argc, char *argv[]) {
+ { NULL, 0, NULL, 0 }
+ };
+
+- int c, runlevel;
++ int c, r, runlevel;
+
+ assert(argc >= 0);
+ assert(argv);
+@@ -5326,7 +5329,14 @@ static int halt_parse_argv(int argc, char *argv[]) {
+ }
+ }
+
+- if (optind < argc) {
++ if (arg_action == ACTION_REBOOT && argc == optind + 1) {
++ r = write_string_file(REBOOT_PARAM_FILE, argv[optind]);
++ if (r < 0) {
++ log_error("Failed to write reboot param to "
++ REBOOT_PARAM_FILE": %s", strerror(-r));
++ return r;
++ }
++ } else if (optind < argc) {
+ log_error("Too many arguments.");
+ return -EINVAL;
+ }
+@@ -5964,6 +5974,8 @@ done:
+
+ static _noreturn_ void halt_now(enum action a) {
+
++ _cleanup_free_ char *param = NULL;
++
+ /* Make sure C-A-D is handled by the kernel from this
+ * point on... */
+ reboot(RB_ENABLE_CAD);
+@@ -5981,8 +5993,14 @@ static _noreturn_ void halt_now(enum action a) {
+ break;
+
+ case ACTION_REBOOT:
+- log_info("Rebooting.");
+- reboot(RB_AUTOBOOT);
++ if (read_one_line_file(REBOOT_PARAM_FILE, ¶m) == 0) {
++ log_info("Rebooting with arg '%s'.", param);
++ syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
++ LINUX_REBOOT_CMD_RESTART2, param);
++ } else {
++ log_info("Rebooting.");
++ reboot(RB_AUTOBOOT);
++ }
+ break;
+
+ default:
+--
+1.9.1
+
|
[-]
[+]
|
Added |
_service:tar_git:systemd-208-video.patch
^
|
@@ -0,0 +1,24 @@
+diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules
+index f764789..7f38a03 100644
+--- a/rules/50-udev-default.rules
++++ b/rules/50-udev-default.rules
+@@ -14,15 +14,15 @@ ACTION!="add", GOTO="default_permissions_end"
+
+ SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666"
+ SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666"
+-SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620"
++SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="video", MODE="0660"
+ SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
+ KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
+
+ SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
+
+-SUBSYSTEM=="input", KERNEL=="mouse*|mice|event*", MODE="0640"
+-SUBSYSTEM=="input", KERNEL=="ts[0-9]*|uinput", MODE="0640"
+-SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0644"
++SUBSYSTEM=="input", KERNEL=="mouse*|mice|event*", MODE="0660", GROUP="video"
++SUBSYSTEM=="input", KERNEL=="ts[0-9]*|uinput", MODE="0660", GROUP="video"
++SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0644", GROUP="video"
+
+ SUBSYSTEM=="video4linux", GROUP="video"
+ SUBSYSTEM=="misc", KERNEL=="agpgart", GROUP="video"
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,6 +2,5 @@
<service name="tar_git">
<param name="url">https://github.com/vakkov/systemd.git</param>
<param name="branch">master</param>
- <param name="dumb">Y</param>
</service>
</services>
|
[-]
[+]
|
Added |
_service:tar_git:systemctl-user
^
|
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# This file is part of systemd.
+#
+# Copyright (C) 2013 Jolla Ltd.
+# Contact: Pekka Lundstrom <pekka.lundstrom@jolla.com>
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+# ------------------------
+#
+# This is helper script that can be used to run systemctl commands on user
+# session when logged in as root
+# It scans all running sessions and runs the command for each user
+# Usage:
+# systemctl-user <any systemctl command with parameters>
+# example:
+# systemctl-user stop myapp.service
+
+# First check that we are running in env where this works
+# (rpm build envs don't have all tools)
+which pidof &> /dev/null && which cut &> /dev/null && which ps &> /dev/null || exit 1
+# Get all running systemd user sessions
+SESSION_PIDS=$(pidof systemd | cut -sd " " -f2-)
+[ -z "$SESSION_PIDS" ] && echo "systemd user session is not running" && exit 1
+MY_ARGS=$@
+for PID in $SESSION_PIDS; do
+ U_NAME=$(ps -o user= $PID)
+ #echo "$U_NAME: systemctl --user $MY_ARGS"
+ su -l $U_NAME -c "systemctl --user $MY_ARGS"
+done
+
+
|
|
Added |
_service:tar_git:systemd-208+master.20150610114537.9.g5108213.tar.xz
^
|
[-]
[+]
|
Added |
_service:tar_git:tests.xml
^
|
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<testdefinition version="1.0">
+ <suite name="systemd-tests" domain="System Control">
+ <set name="Systemd upstream tests" description="Systemd upstream tests" feature="Systemd">
+ <case name="test-bus-chat">
+ <step> /opt/tests/systemd-tests/bin/test-bus-chat </step>
+ </case>
+ <case name="test-bus-marshal">
+ <step> /opt/tests/systemd-tests/bin/test-bus-marshal </step>
+ </case>
+ <case name="test-bus-match">
+ <step> /opt/tests/systemd-tests/bin/test-bus-match </step>
+ </case>
+ <case name="test-bus-server">
+ <step> /opt/tests/systemd-tests/bin/test-bus-server </step>
+ </case>
+ <case name="test-calendarspec">
+ <step> /opt/tests/systemd-tests/bin/test-calendarspec </step>
+ </case>
+ <case name="test-cgroup-util">
+ <step> /opt/tests/systemd-tests/bin/test-cgroup-util </step>
+ </case>
+ <case name="test-daemon">
+ <step> /opt/tests/systemd-tests/bin/test-daemon </step>
+ </case>
+ <case name="test-date">
+ <step> /opt/tests/systemd-tests/bin/test-date </step>
+ </case>
+ <case name="test-device-nodes">
+ <step> /opt/tests/systemd-tests/bin/test-device-nodes </step>
+ </case>
+ <case name="test-fileio">
+ <step> /opt/tests/systemd-tests/bin/test-fileio </step>
+ </case>
+ <case name="test-hashmap">
+ <step> /opt/tests/systemd-tests/bin/test-hashmap </step>
+ </case>
+ <case name="test-hostname">
+ <step> /usr/sbin/run-blts-root /opt/tests/systemd-tests/bin/test-hostname </step>
+ </case>
+ <case name="test-id128">
+ <step> /opt/tests/systemd-tests/bin/test-id128 </step>
+ </case>
+ <case name="test-inhibit">
+ <step> /usr/sbin/run-blts-root /opt/tests/systemd-tests/bin/test-inhibit </step>
+ </case>
+ <case name="test-job-type">
+ <step> /opt/tests/systemd-tests/bin/test-job-type </step>
+ </case>
+ <case name="test-journal">
+ <step> /opt/tests/systemd-tests/bin/test-journal </step>
+ </case>
+ <case name="test-journal-enum">
+ <step> /opt/tests/systemd-tests/bin/test-journal-enum </step>
+ </case>
+ <case name="test-journal-init">
+ <step> /opt/tests/systemd-tests/bin/test-journal-init </step>
+ </case>
+ <case name="test-journal-interleaving">
+ <step> /opt/tests/systemd-tests/bin/test-journal-interleaving </step>
+ </case>
+ <case name="test-journal-match">
+ <step> /opt/tests/systemd-tests/bin/test-journal-match </step>
+ </case>
+ <case name="test-journal-send">
+ <step> /opt/tests/systemd-tests/bin/test-journal-send </step>
+ </case>
+ <case name="test-journal-verify">
+ <step> /opt/tests/systemd-tests/bin/test-journal-verify </step>
+ </case>
+ <case name="test-list">
+ <step> /opt/tests/systemd-tests/bin/test-list </step>
+ </case>
+ <case name="test-login-tables">
+ <step> /opt/tests/systemd-tests/bin/test-login-tables </step>
+ </case>
+ <case name="test-machine-tables">
+ <step> /opt/tests/systemd-tests/bin/test-machine-tables </step>
+ </case>
+ <case name="test-path-util">
+ <step> /opt/tests/systemd-tests/bin/test-path-util </step>
+ </case>
+ <case name="test-replace-var">
+ <step> /opt/tests/systemd-tests/bin/test-replace-var </step>
+ </case>
+ <case name="test-sleep">
+ <step> /opt/tests/systemd-tests/bin/test-sleep </step>
+ </case>
+ <case name="test-strip-tab-ansi">
+ <step> /opt/tests/systemd-tests/bin/test-strip-tab-ansi </step>
+ </case>
+ <case name="test-strv">
+ <step> /opt/tests/systemd-tests/bin/test-strv </step>
+ </case>
+ <case name="test-tables">
+ <step> /opt/tests/systemd-tests/bin/test-tables </step>
+ </case>
+ <case name="test-time">
+ <step> /opt/tests/systemd-tests/bin/test-time </step>
+ </case>
+ <case name="test-unit-file">
+ <step> /opt/tests/systemd-tests/bin/test-unit-file </step>
+ </case>
+ <case name="test-unit-name">
+ <step> /usr/sbin/run-blts-root /opt/tests/systemd-tests/bin/test-unit-name </step>
+ </case>
+ <case name="test-util">
+ <step> /usr/sbin/run-blts-root /opt/tests/systemd-tests/bin/test-util </step>
+ </case>
+ <case name="test-watchdog">
+ <step> /usr/sbin/run-blts-root systemctl stop dsme.service </step>
+ <step> /usr/sbin/run-blts-root /opt/tests/systemd-tests/bin/test-watchdog </step>
+ <step> /usr/sbin/run-blts-root systemctl start dsme.service </step>
+ <step> /usr/sbin/run-blts-root systemctl start mce.service </step>
+ </case>
+ </set>
+ </suite>
+</testdefinition>
|