Re: [systemd-devel] [PATCH] Propagate reload from RELOADING=1 notifications

2015-01-01 Thread Jouke Witteveen
On Thu, Jan 1, 2015 at 7:15 PM, Zbigniew Jędrzejewski-Szmek
 wrote:
> On Tue, Dec 30, 2014 at 08:22:27PM +0100, Jouke Witteveen wrote:
>> ---
>>
>> This fixes #87251
>
> This is actually important information that should be included in the
> commit message (i.e. above not below "---"). We usually include the
> full url, since we also use distribution bug trackers and having the full
> url makes things easier to click. In this case:
>
> https://bugs.freedesktop.org/show_bug.cgi?id=87251

Will do. For consistency it is also better to not abort propagation if
one unit fails to reload, so I have a second version ready already.

>>  static void service_enter_reload_by_notify(Service *s) {
>> +_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
>> +int r;
>> +
>>  assert(s);
>>
>>  if (s->timeout_start_usec > 0)
>>  service_arm_timer(s, s->timeout_start_usec);
>>
>> +r = manager_propagate_reload(UNIT(s)->manager, UNIT(s), 
>> JOB_REPLACE, false, &error);
>> +if(r < 0)
>> +log_unit_warning(UNIT(s)->id, "%s failed to schedule 
>> propagation of reload: %s", UNIT(s)->id, bus_error_message(&error, -r));
>> +
>
> Let's say that a.service has PropagateReloadsTo=b.service, and a.service 
> provides
> the RELOADING=1 notification during a reload.
> What happens if a reload is requested with 'systemctl reload a', and systemd
> schedules a reload of a and b. Is it possible for b to be reloaded a second 
> time
> as a result of notification of a? This should not happen, have you verified 
> that
> this will not happen?

Isn't that just bad behavior? Sending a RELOADING=1 notification after
a reload is initiated? I guess if both service_enter_reload() and
service_enter_reload_by_notify() are called it is justified to
propagate two reloads. Before testing it might be nice to know what we
want :-).

Regards,
- Jouke
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] Clarify path escaping and reference systemd-escape

2015-01-01 Thread Chris Atkinson
See Bug 87688 (https://bugs.freedesktop.org/show_bug.cgi?id=87688).
This patch adds more detail to the description of how path escaping
operates and provides a pointer to the systemd-escape program. Either
would serve to answer the question raised in the bug report, so
hopefully this will allow it to be closed.

Regards>From 84fd39e106a13ec8a546c7d8ecc114f2901d1d82 Mon Sep 17 00:00:00 2001
From: Chris Atkinson 
Date: Thu, 1 Jan 2015 16:16:56 -0500
Subject: [PATCH 2/2] Clarify path escaping and reference systemd-escape

---
 man/systemd.unit.xml | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 1afa600..39ea429 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -229,12 +229,17 @@
 the file system namespace. If this applies, a special
 way to escape the path name is used, so that the
 result is usable as part of a filename. Basically,
-given a path, "/" is replaced by "-", and all
-unprintable characters and the "-" are replaced by
-C-style "\x2d" escapes. The root directory "/" is
-encoded as single dash, while otherwise the initial
-and ending "/" is removed from all paths during
-transformation. This escaping is reversible.
+given a path, "/" is replaced by "-" and all other
+characters which are not ASCII alphanumerics are
+replaced by C-style "\x2d" escapes (except that "_"
+is never replaced and "." is only replaced when it
+would be the first character in the escaped path).
+The root directory "/" is encoded as single dash,
+while otherwise the initial and ending "/" are removed
+from all paths during transformation. This escaping
+is reversible. Properly escaped paths can be generated
+using the systemd-escape1
+command.
 
 Optionally, units may be instantiated from a
 template file at runtime. This allows creation of
-- 
2.2.1

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH v2] Do not clear parent mount flags when setting up namespaces

2015-01-01 Thread Topi Miettinen
Copy parent directory mount flags when setting up a namespace and
don't accidentally clear mount flags later.
---
 src/core/namespace.c |  4 ++--
 src/shared/util.c| 19 +--
 src/shared/util.h|  2 ++
 3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/src/core/namespace.c b/src/core/namespace.c
index 4b8dbdd..6859b6a 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -159,7 +159,7 @@ static int mount_dev(BindMount *m) {
 
 dev = strappenda(temporary_mount, "/dev");
 (void)mkdir(dev, 0755);
-if (mount("tmpfs", dev, "tmpfs", MS_NOSUID|MS_STRICTATIME, "mode=755") 
< 0) {
+if (mount("tmpfs", dev, "tmpfs", 
get_mount_flags("/dev")|MS_NOSUID|MS_STRICTATIME, "mode=755") < 0) {
 r = -errno;
 goto fail;
 }
@@ -282,7 +282,7 @@ static int mount_kdbus(BindMount *m) {
 
 root = strappenda(temporary_mount, "/kdbus");
 (void)mkdir(root, 0755);
-if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_STRICTATIME, 
"mode=777") < 0) {
+if (mount("tmpfs", root, "tmpfs", 
get_mount_flags("/sys/fs/kdbus")|MS_NOSUID|MS_STRICTATIME, "mode=777") < 0) {
 r = -errno;
 goto fail;
 }
diff --git a/src/shared/util.c b/src/shared/util.c
index dfaf7f7..8ff5073 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 #undef basename
 
 #ifdef HAVE_SYS_AUXV_H
@@ -6858,6 +6859,15 @@ int umount_recursive(const char *prefix, int flags) {
 return r ? r : n;
 }
 
+unsigned long get_mount_flags(const char *path) {
+struct statvfs buf;
+
+if (statvfs(path, &buf) < 0)
+return 0;
+
+return buf.f_flag;
+}
+
 int bind_remount_recursive(const char *prefix, bool ro) {
 _cleanup_set_free_free_ Set *done = NULL;
 _cleanup_free_ char *cleaned = NULL;
@@ -6892,6 +6902,7 @@ int bind_remount_recursive(const char *prefix, bool ro) {
 _cleanup_set_free_free_ Set *todo = NULL;
 bool top_autofs = false;
 char *x;
+unsigned long orig_flags;
 
 todo = set_new(&string_hash_ops);
 if (!todo)
@@ -6969,7 +6980,9 @@ int bind_remount_recursive(const char *prefix, bool ro) {
 if (mount(cleaned, cleaned, NULL, MS_BIND|MS_REC, 
NULL) < 0)
 return -errno;
 
-if (mount(NULL, prefix, NULL, MS_BIND|MS_REMOUNT|(ro ? 
MS_RDONLY : 0), NULL) < 0)
+orig_flags = get_mount_flags(prefix);
+orig_flags &= ~MS_RDONLY;
+if (mount(NULL, prefix, NULL, 
orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0)
 return -errno;
 
 x = strdup(cleaned);
@@ -6989,7 +7002,9 @@ int bind_remount_recursive(const char *prefix, bool ro) {
 if (r < 0)
 return r;
 
-if (mount(NULL, x, NULL, MS_BIND|MS_REMOUNT|(ro ? 
MS_RDONLY : 0), NULL) < 0) {
+orig_flags = get_mount_flags(x);
+orig_flags &= ~MS_RDONLY;
+if (mount(NULL, x, NULL, 
orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0) {
 
 /* Deal with mount points that are
  * obstructed by a later mount */
diff --git a/src/shared/util.h b/src/shared/util.h
index a131a3c..4b3070a 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -1021,6 +1021,8 @@ union file_handle_union {
 
 int update_reboot_param_file(const char *param);
 
+unsigned long get_mount_flags(const char *path);
+
 int umount_recursive(const char *target, int flags);
 
 int bind_remount_recursive(const char *prefix, bool ro);
-- 
2.1.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] util: Fix signedness error in lines(), match implementations

2015-01-01 Thread Colin Walters
On Thu, Jan 1, 2015, at 03:21 PM, Zbigniew Jędrzejewski-Szmek wrote:

> Is there an actual regression? Afaict, your patch does not change
> the behaviour in any way...

I can't think of an actual real world regression.  I could have said
"error introduced by" or something?  It only fixes the case where
the ioctl(fd, TIOCGWINSZ, &ws) fails for some reason - we would
end up thinking the screen had some very large number of lines.

(I only noticed this as I was copying the code)

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] util: Fix signedness error in lines(), match implementations

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jan 01, 2015 at 03:05:15PM -0500, Colin Walters wrote:
> 

> From a74befe02b8a8141a2ffc5613372ef8082a2c6d2 Mon Sep 17 00:00:00 2001
> From: Colin Walters 
> Date: Thu, 1 Jan 2015 14:57:08 -0500
> Subject: [PATCH] util: Fix signedness error in lines(), match implementations
> 
> Regression introduced by ed757c0cb03eef50e8d9aeb4682401c3e9486f0b
Is there an actual regression? Afaict, your patch does not change
the behaviour in any way...

Zbyszek

> Mirror the implementation of columns(), since the fd_columns()
> functions returns a negative integer for errors.
> 
> Also fix columns() to return the unsigned variable instead of the
> signed intermediary (they're the same, but better to be explicit).
> ---
>  src/shared/util.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/shared/util.c b/src/shared/util.c
> index dfaf7f7..390ad1d 100644
> --- a/src/shared/util.c
> +++ b/src/shared/util.c
> @@ -3456,7 +3456,7 @@ unsigned columns(void) {
>  c = 80;
>  
>  cached_columns = c;
> -return c;
> +return cached_columns;
>  }
>  
>  int fd_lines(int fd) {
> @@ -3473,7 +3473,7 @@ int fd_lines(int fd) {
>  
>  unsigned lines(void) {
>  const char *e;
> -unsigned l;
> +int l;
>  
>  if (_likely_(cached_lines > 0))
>  return cached_lines;
> @@ -3481,7 +3481,7 @@ unsigned lines(void) {
>  l = 0;
>  e = getenv("LINES");
>  if (e)
> -(void) safe_atou(e, &l);
> +(void) safe_atoi(e, &l);
>  
>  if (l <= 0)
>  l = fd_lines(STDOUT_FILENO);
> -- 
> 1.8.3.1
> 

> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] util: Fix signedness error in lines(), match implementations

2015-01-01 Thread Colin Walters

From a74befe02b8a8141a2ffc5613372ef8082a2c6d2 Mon Sep 17 00:00:00 2001
From: Colin Walters 
Date: Thu, 1 Jan 2015 14:57:08 -0500
Subject: [PATCH] util: Fix signedness error in lines(), match implementations

Regression introduced by ed757c0cb03eef50e8d9aeb4682401c3e9486f0b

Mirror the implementation of columns(), since the fd_columns()
functions returns a negative integer for errors.

Also fix columns() to return the unsigned variable instead of the
signed intermediary (they're the same, but better to be explicit).
---
 src/shared/util.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/shared/util.c b/src/shared/util.c
index dfaf7f7..390ad1d 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -3456,7 +3456,7 @@ unsigned columns(void) {
 c = 80;
 
 cached_columns = c;
-return c;
+return cached_columns;
 }
 
 int fd_lines(int fd) {
@@ -3473,7 +3473,7 @@ int fd_lines(int fd) {
 
 unsigned lines(void) {
 const char *e;
-unsigned l;
+int l;
 
 if (_likely_(cached_lines > 0))
 return cached_lines;
@@ -3481,7 +3481,7 @@ unsigned lines(void) {
 l = 0;
 e = getenv("LINES");
 if (e)
-(void) safe_atou(e, &l);
+(void) safe_atoi(e, &l);
 
 if (l <= 0)
 l = fd_lines(STDOUT_FILENO);
-- 
1.8.3.1

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Type of mount(2) flags is unsigned long

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jan 01, 2015 at 07:40:07PM +0200, Topi Miettinen wrote:
> Signed-off-by: Topi Miettinen 
We don't use signed-off-by.

Applied.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] improve help/usage for some more programs

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jan 01, 2015 at 06:11:22PM +0100, Robert Milasan wrote:
> From 9cd266590dbf1d22b1a7fc184ecc8c3868f280f9 Mon Sep 17 00:00:00 2001
> From: Robert Milasan 
> Date: Wed, 31 Dec 2014 13:17:23 +0100
> Subject: [PATCH] improve help/usage for some more programs
Applied.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] po: update French translation

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jan 01, 2015 at 06:02:54PM +0100, Sylvain Plantefève wrote:
> ---
>  po/fr.po | 33 -
>  1 file changed, 16 insertions(+), 17 deletions(-)
Applied.

The strings changed in the meanwhile. I fixed up the po file, so
everything should be fine, but please check.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Update Russian translation

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jan 01, 2015 at 09:42:47PM +0300, Sergey Ptashnick wrote:
> By analogy with commit 4038d7502f.
Applied.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] Update Russian translation

2015-01-01 Thread Sergey Ptashnick
By analogy with commit 4038d7502f.
>From 71095ae994209cfed8bb12821bc4ff905e90f697 Mon Sep 17 00:00:00 2001
From: Sergey Ptashnick <0comff...@inbox.ru>
Date: Thu, 1 Jan 2015 21:31:29 +0300
Subject: [PATCH] po: update Russian translation

---
 po/ru.po |   30 +++---
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/po/ru.po b/po/ru.po
index 5319e1d..23002cd 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,13 +1,13 @@
 # translation of ru.po to Rissian
 # Julia Dronova , 2013.
-# Sergey Ptashnick <0comff...@inbox.ru>, 2013-2014.
+# Sergey Ptashnick <0comff...@inbox.ru>, 2013-2015.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: systemd\n"
 "Report-Msgid-Bugs-To: 0comff...@inbox.ru\n"
 "POT-Creation-Date: 2013-03-24 19:22+0300\n"
-"PO-Revision-Date: 2014-08-29 19:29+0400\n"
+"PO-Revision-Date: 2015-01-01 21:29+0300\n"
 "Last-Translator: Sergey Ptashnick <0comff...@inbox.ru>\n"
 "Language: ru\n"
 "MIME-Version: 1.0\n"
@@ -246,6 +246,14 @@ msgstr "Перевести систему в спящий режим, несмо
 msgid "Authentication is required for hibernating the system while an application asked to inhibit it."
 msgstr "Чтобы перевести систему в спящий режим, несмотря на то, что приложение запросило блокировку, необходимо пройти аутентификацию."
 
+#: ../src/machine/org.freedesktop.machine1.policy.in.h:1
+msgid "Log into a local container"
+msgstr "Зайти в локальный контейнер"
+
+#: ../src/machine/org.freedesktop.machine1.policy.in.h:2
+msgid "Authentication is required to log into a local container."
+msgstr "Чтобы зайти в локальный контейнер, необходимо пройти аутентификацию."
+
 #: ../src/timedate/org.freedesktop.timedate1.policy.in.h:1
 msgid "Set system time"
 msgstr "Настроить системное время"
@@ -287,33 +295,25 @@ msgid "Authentication is required to send the entered passphrase back to the sys
 msgstr "Чтобы отправить пароль системе, необходимо пройти аутентификацию."
 
 #: ../src/core/org.freedesktop.systemd1.policy.in.in.h:3
-msgid "Privileged system and service manager access"
-msgstr "Привилегированный доступ к системному менеджеру"
-
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4
-msgid "Authentication is required to access the system and service manager."
-msgstr "Для привилегированного доступа к системному менеджеру необходимо пройти аутентификацию."
-
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:5
 msgid "Manage system services or units"
 msgstr "Управление системными службами и юнитами"
 
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:6
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4
 msgid "Authentication is required to manage system services or units."
 msgstr "Для управления системными службами и юнитами, необходимо пройти аутентификацию."
 
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:7
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:5
 msgid "Manage system service or unit files"
 msgstr "Управление файлами конфигурации системных служб и юнитов"
 
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:8
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:6
 msgid "Authentication is required to manage system service or unit files."
 msgstr "Для управления файлами конфигурации системных служб и юнитов, необходимо пройти аутентификацию."
 
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:9
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:7
 msgid "Reload the systemd state"
 msgstr "Перечитать конфигурацию systemd"
 
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:10
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:8
 msgid "Authentication is required to reload the systemd state."
 msgstr "Чтобы заставить systemd перечитать конфигурацию, необходимо пройти аутентификацию."
-- 
1.7.2.5

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Do not clear parent mount flags when setting up namespaces

2015-01-01 Thread Topi Miettinen
On 01/01/15 18:08, Dave Reisner wrote:
> On Thu, Jan 01, 2015 at 04:49:04PM +0200, Topi Miettinen wrote:
>> Copy parent directory mount flags when setting up a namespace and
>> don't accidentally clear mount flags later.
>>
>> Signed-off-by: Topi Miettinen 
>> ---
>>  src/core/namespace.c |  4 ++--
>>  src/shared/util.c| 20 ++--
>>  src/shared/util.h|  2 ++
>>  3 files changed, 22 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/core/namespace.c b/src/core/namespace.c
>> index 5b408e0..400bc50 100644
>> --- a/src/core/namespace.c
>> +++ b/src/core/namespace.c
>> @@ -159,7 +159,7 @@ static int mount_dev(BindMount *m) {
>>  
>>  dev = strappenda(temporary_mount, "/dev");
>>  (void)mkdir(dev, 0755);
>> -if (mount("tmpfs", dev, "tmpfs", MS_NOSUID|MS_STRICTATIME, 
>> "mode=755") < 0) {
>> +if (mount("tmpfs", dev, "tmpfs", 
>> get_mount_flags("/dev")|MS_NOSUID|MS_STRICTATIME, "mode=755") < 0) {
>>  r = -errno;
>>  goto fail;
>>  }
>> @@ -282,7 +282,7 @@ static int mount_kdbus(BindMount *m) {
>>  
>>  root = strappenda(temporary_mount, "/kdbus");
>>  (void)mkdir(root, 0755);
>> -if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_STRICTATIME, 
>> "mode=777") < 0) {
>> +if (mount("tmpfs", root, "tmpfs", 
>> get_mount_flags("/kdbus")|MS_NOSUID|MS_STRICTATIME, "mode=777") < 0) {
> 
> Shouldn't this be /sys/fs/bus/kdbus? We certainly don't mount kdbusfs in
> the root...

Probably. I don't have kdbus here (sorry) and I don't quite get what the
function is supposed to do.

> 
>>  r = -errno;
>>  goto fail;
>>  }
>> diff --git a/src/shared/util.c b/src/shared/util.c
>> index dfaf7f7..31fbb68 100644
>> --- a/src/shared/util.c
>> +++ b/src/shared/util.c
>> @@ -61,6 +61,7 @@
>>  #include 
>>  #include 
>>  #include 
>> +#include 
>>  #undef basename
>>  
>>  #ifdef HAVE_SYS_AUXV_H
>> @@ -6858,6 +6859,16 @@ int umount_recursive(const char *prefix, int flags) {
>>  return r ? r : n;
>>  }
>>  
>> +unsigned long get_mount_flags(const char *path)
>> +{
> 
> Reigning style says to put the opening { at the end of the first line.

OK.

Thanks for the review.

> 
>> +struct statvfs buf;
>> +
>> +if (statvfs(path, &buf) < 0)
>> +return 0;
>> +
>> +return buf.f_flag;
>> +}
>> +
>>  int bind_remount_recursive(const char *prefix, bool ro) {
>>  _cleanup_set_free_free_ Set *done = NULL;
>>  _cleanup_free_ char *cleaned = NULL;
>> @@ -6892,6 +6903,7 @@ int bind_remount_recursive(const char *prefix, bool 
>> ro) {
>>  _cleanup_set_free_free_ Set *todo = NULL;
>>  bool top_autofs = false;
>>  char *x;
>> +unsigned long orig_flags;
>>  
>>  todo = set_new(&string_hash_ops);
>>  if (!todo)
>> @@ -6969,7 +6981,9 @@ int bind_remount_recursive(const char *prefix, bool 
>> ro) {
>>  if (mount(cleaned, cleaned, NULL, MS_BIND|MS_REC, 
>> NULL) < 0)
>>  return -errno;
>>  
>> -if (mount(NULL, prefix, NULL, 
>> MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0)
>> +orig_flags = get_mount_flags(prefix);
>> +orig_flags &= ~MS_RDONLY;
>> +if (mount(NULL, prefix, NULL, 
>> orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0)
>>  return -errno;
>>  
>>  x = strdup(cleaned);
>> @@ -6989,7 +7003,9 @@ int bind_remount_recursive(const char *prefix, bool 
>> ro) {
>>  if (r < 0)
>>  return r;
>>  
>> -if (mount(NULL, x, NULL, MS_BIND|MS_REMOUNT|(ro ? 
>> MS_RDONLY : 0), NULL) < 0) {
>> +orig_flags = get_mount_flags(x);
>> +orig_flags &= ~MS_RDONLY;
>> +if (mount(NULL, x, NULL, 
>> orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0) {
>>  
>>  /* Deal with mount points that are
>>   * obstructed by a later mount */
>> diff --git a/src/shared/util.h b/src/shared/util.h
>> index a131a3c..4b3070a 100644
>> --- a/src/shared/util.h
>> +++ b/src/shared/util.h
>> @@ -1021,6 +1021,8 @@ union file_handle_union {
>>  
>>  int update_reboot_param_file(const char *param);
>>  
>> +unsigned long get_mount_flags(const char *path);
>> +
>>  int umount_recursive(const char *target, int flags);
>>  
>>  int bind_remount_recursive(const char *prefix, bool ro);
>> -- 
>> 2.1.4
>>
>> ___
>> systemd-devel mailing list
>> systemd-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel

___
systemd-deve

Re: [systemd-devel] systemd coredumps

2015-01-01 Thread Markus Moeller

Oh. I see I need to ask OpenSuse to fix or get a newer OpenSuse version.

Thank you
Markus

"ZbigniewJędrzejewski-Szmek"  wrote in message 
news:20150101181747.gl18...@in.waw.pl...


On Thu, Jan 01, 2015 at 01:13:30PM -0500, Dave Reisner wrote:
On Thu, Jan 01, 2015 at 07:05:04PM +0100, Zbigniew Jędrzejewski-Szmek 
wrote:

> On Thu, Jan 01, 2015 at 05:57:43PM -, Markus Moeller wrote:
> > Hi,
> >
> >  How can I find out why systemd core dumps  and requires system
> > reboot :-( ?
> >
> > I just did
> >
> > # systemctl status sockd-1.5.0
> > Failed to issue method call: Did not receive a reply. Possible
> > causes include: the remote application did not send a reply, the
> > message bus security policy blocked the reply, the reply timeout
> > expired, or the network connection was broken.
> > # systemctl status sockd-1.5.0
> > Failed to get D-Bus connection: Failed to connect to socket
> > /run/systemd/private: Connection refused
> >
> > 2015-01-01T17:52:01.625495+00:00 opensuse12 systemd[1]: Accepted
> > connection on private bus.
> > 2015-01-01T17:52:01.626333+00:00 opensuse12 systemd[1]: Running GC...
> > 2015-01-01T17:52:01.627976+00:00 opensuse12 systemd[1]: Got D-Bus
> > request: org.freedesktop.DBus.Properties.GetAll() on
> > /org/freedesktop/systemd1/unit/sockd_2d1_2e5_2e0
> > 2015-01-01T17:52:01.636546+00:00 opensuse12 systemd[1]: Assertion
> > 'endswith(path, ".service")' failed at src/core/service.c:1077,
> > function service_load_sysv_name(). Aborting.
> The reason is given right here. A failed assertion, i.e. a programming
> error.
>
> Please open a bug on bugs.freedesktop.org and attach the core if you can
> and describe the steps to trigger this.

Hrmm? The OP is using a build of systemd v195. It's unlikely this is
reproducible at HEAD, or any recent release. The referenced function was
removed in v214 (see commit 817e224bbce3ed) when sysv unit handling was
moved off to a generator.

Good point, I didn't look at the version. Indeed, the bug is long fixed.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel 



___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd coredumps

2015-01-01 Thread Markus Moeller
OK I logged it as https://bugs.freedesktop.org/show_bug.cgi?id=87943 .  I 
can't seem to get a core dump file.


Markus

"ZbigniewJędrzejewski-Szmek"  wrote in message 
news:20150101180504.gj18...@in.waw.pl...


On Thu, Jan 01, 2015 at 05:57:43PM -, Markus Moeller wrote:

Hi,

 How can I find out why systemd core dumps  and requires system
reboot :-( ?

I just did

# systemctl status sockd-1.5.0
Failed to issue method call: Did not receive a reply. Possible
causes include: the remote application did not send a reply, the
message bus security policy blocked the reply, the reply timeout
expired, or the network connection was broken.
# systemctl status sockd-1.5.0
Failed to get D-Bus connection: Failed to connect to socket
/run/systemd/private: Connection refused

2015-01-01T17:52:01.625495+00:00 opensuse12 systemd[1]: Accepted
connection on private bus.
2015-01-01T17:52:01.626333+00:00 opensuse12 systemd[1]: Running GC...
2015-01-01T17:52:01.627976+00:00 opensuse12 systemd[1]: Got D-Bus
request: org.freedesktop.DBus.Properties.GetAll() on
/org/freedesktop/systemd1/unit/sockd_2d1_2e5_2e0
2015-01-01T17:52:01.636546+00:00 opensuse12 systemd[1]: Assertion
'endswith(path, ".service")' failed at src/core/service.c:1077,
function service_load_sysv_name(). Aborting.

The reason is given right here. A failed assertion, i.e. a programming
error.

Please open a bug on bugs.freedesktop.org and attach the core if you can
and describe the steps to trigger this.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel 



___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd coredumps

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jan 01, 2015 at 01:13:30PM -0500, Dave Reisner wrote:
> On Thu, Jan 01, 2015 at 07:05:04PM +0100, Zbigniew Jędrzejewski-Szmek wrote:
> > On Thu, Jan 01, 2015 at 05:57:43PM -, Markus Moeller wrote:
> > > Hi,
> > > 
> > >  How can I find out why systemd core dumps  and requires system
> > > reboot :-( ?
> > > 
> > > I just did
> > > 
> > > # systemctl status sockd-1.5.0
> > > Failed to issue method call: Did not receive a reply. Possible
> > > causes include: the remote application did not send a reply, the
> > > message bus security policy blocked the reply, the reply timeout
> > > expired, or the network connection was broken.
> > > # systemctl status sockd-1.5.0
> > > Failed to get D-Bus connection: Failed to connect to socket
> > > /run/systemd/private: Connection refused
> > > 
> > > 2015-01-01T17:52:01.625495+00:00 opensuse12 systemd[1]: Accepted
> > > connection on private bus.
> > > 2015-01-01T17:52:01.626333+00:00 opensuse12 systemd[1]: Running GC...
> > > 2015-01-01T17:52:01.627976+00:00 opensuse12 systemd[1]: Got D-Bus
> > > request: org.freedesktop.DBus.Properties.GetAll() on
> > > /org/freedesktop/systemd1/unit/sockd_2d1_2e5_2e0
> > > 2015-01-01T17:52:01.636546+00:00 opensuse12 systemd[1]: Assertion
> > > 'endswith(path, ".service")' failed at src/core/service.c:1077,
> > > function service_load_sysv_name(). Aborting.
> > The reason is given right here. A failed assertion, i.e. a programming
> > error.
> > 
> > Please open a bug on bugs.freedesktop.org and attach the core if you can
> > and describe the steps to trigger this.
> 
> Hrmm? The OP is using a build of systemd v195. It's unlikely this is
> reproducible at HEAD, or any recent release. The referenced function was
> removed in v214 (see commit 817e224bbce3ed) when sysv unit handling was
> moved off to a generator.
Good point, I didn't look at the version. Indeed, the bug is long fixed.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Propagate reload from RELOADING=1 notifications

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Dec 30, 2014 at 08:22:27PM +0100, Jouke Witteveen wrote:
> ---
> 
> This fixes #87251

This is actually important information that should be included in the
commit message (i.e. above not below "---"). We usually include the
full url, since we also use distribution bug trackers and having the full
url makes things easier to click. In this case:

https://bugs.freedesktop.org/show_bug.cgi?id=87251

>  static void service_enter_reload_by_notify(Service *s) {
> +_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
> +int r;
> +
>  assert(s);
>  
>  if (s->timeout_start_usec > 0)
>  service_arm_timer(s, s->timeout_start_usec);
>  
> +r = manager_propagate_reload(UNIT(s)->manager, UNIT(s), JOB_REPLACE, 
> false, &error);
> +if(r < 0)
> +log_unit_warning(UNIT(s)->id, "%s failed to schedule 
> propagation of reload: %s", UNIT(s)->id, bus_error_message(&error, -r));
> +

Let's say that a.service has PropagateReloadsTo=b.service, and a.service 
provides
the RELOADING=1 notification during a reload.
What happens if a reload is requested with 'systemctl reload a', and systemd
schedules a reload of a and b. Is it possible for b to be reloaded a second time
as a result of notification of a? This should not happen, have you verified that
this will not happen?

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd coredumps

2015-01-01 Thread Dave Reisner
On Thu, Jan 01, 2015 at 07:05:04PM +0100, Zbigniew Jędrzejewski-Szmek wrote:
> On Thu, Jan 01, 2015 at 05:57:43PM -, Markus Moeller wrote:
> > Hi,
> > 
> >  How can I find out why systemd core dumps  and requires system
> > reboot :-( ?
> > 
> > I just did
> > 
> > # systemctl status sockd-1.5.0
> > Failed to issue method call: Did not receive a reply. Possible
> > causes include: the remote application did not send a reply, the
> > message bus security policy blocked the reply, the reply timeout
> > expired, or the network connection was broken.
> > # systemctl status sockd-1.5.0
> > Failed to get D-Bus connection: Failed to connect to socket
> > /run/systemd/private: Connection refused
> > 
> > 2015-01-01T17:52:01.625495+00:00 opensuse12 systemd[1]: Accepted
> > connection on private bus.
> > 2015-01-01T17:52:01.626333+00:00 opensuse12 systemd[1]: Running GC...
> > 2015-01-01T17:52:01.627976+00:00 opensuse12 systemd[1]: Got D-Bus
> > request: org.freedesktop.DBus.Properties.GetAll() on
> > /org/freedesktop/systemd1/unit/sockd_2d1_2e5_2e0
> > 2015-01-01T17:52:01.636546+00:00 opensuse12 systemd[1]: Assertion
> > 'endswith(path, ".service")' failed at src/core/service.c:1077,
> > function service_load_sysv_name(). Aborting.
> The reason is given right here. A failed assertion, i.e. a programming
> error.
> 
> Please open a bug on bugs.freedesktop.org and attach the core if you can
> and describe the steps to trigger this.

Hrmm? The OP is using a build of systemd v195. It's unlikely this is
reproducible at HEAD, or any recent release. The referenced function was
removed in v214 (see commit 817e224bbce3ed) when sysv unit handling was
moved off to a generator.

dR
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Do not clear parent mount flags when setting up namespaces

2015-01-01 Thread Dave Reisner
On Thu, Jan 01, 2015 at 04:49:04PM +0200, Topi Miettinen wrote:
> Copy parent directory mount flags when setting up a namespace and
> don't accidentally clear mount flags later.
> 
> Signed-off-by: Topi Miettinen 
> ---
>  src/core/namespace.c |  4 ++--
>  src/shared/util.c| 20 ++--
>  src/shared/util.h|  2 ++
>  3 files changed, 22 insertions(+), 4 deletions(-)
> 
> diff --git a/src/core/namespace.c b/src/core/namespace.c
> index 5b408e0..400bc50 100644
> --- a/src/core/namespace.c
> +++ b/src/core/namespace.c
> @@ -159,7 +159,7 @@ static int mount_dev(BindMount *m) {
>  
>  dev = strappenda(temporary_mount, "/dev");
>  (void)mkdir(dev, 0755);
> -if (mount("tmpfs", dev, "tmpfs", MS_NOSUID|MS_STRICTATIME, 
> "mode=755") < 0) {
> +if (mount("tmpfs", dev, "tmpfs", 
> get_mount_flags("/dev")|MS_NOSUID|MS_STRICTATIME, "mode=755") < 0) {
>  r = -errno;
>  goto fail;
>  }
> @@ -282,7 +282,7 @@ static int mount_kdbus(BindMount *m) {
>  
>  root = strappenda(temporary_mount, "/kdbus");
>  (void)mkdir(root, 0755);
> -if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_STRICTATIME, 
> "mode=777") < 0) {
> +if (mount("tmpfs", root, "tmpfs", 
> get_mount_flags("/kdbus")|MS_NOSUID|MS_STRICTATIME, "mode=777") < 0) {

Shouldn't this be /sys/fs/bus/kdbus? We certainly don't mount kdbusfs in
the root...

>  r = -errno;
>  goto fail;
>  }
> diff --git a/src/shared/util.c b/src/shared/util.c
> index dfaf7f7..31fbb68 100644
> --- a/src/shared/util.c
> +++ b/src/shared/util.c
> @@ -61,6 +61,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #undef basename
>  
>  #ifdef HAVE_SYS_AUXV_H
> @@ -6858,6 +6859,16 @@ int umount_recursive(const char *prefix, int flags) {
>  return r ? r : n;
>  }
>  
> +unsigned long get_mount_flags(const char *path)
> +{

Reigning style says to put the opening { at the end of the first line.

> +struct statvfs buf;
> +
> +if (statvfs(path, &buf) < 0)
> +return 0;
> +
> +return buf.f_flag;
> +}
> +
>  int bind_remount_recursive(const char *prefix, bool ro) {
>  _cleanup_set_free_free_ Set *done = NULL;
>  _cleanup_free_ char *cleaned = NULL;
> @@ -6892,6 +6903,7 @@ int bind_remount_recursive(const char *prefix, bool ro) 
> {
>  _cleanup_set_free_free_ Set *todo = NULL;
>  bool top_autofs = false;
>  char *x;
> +unsigned long orig_flags;
>  
>  todo = set_new(&string_hash_ops);
>  if (!todo)
> @@ -6969,7 +6981,9 @@ int bind_remount_recursive(const char *prefix, bool ro) 
> {
>  if (mount(cleaned, cleaned, NULL, MS_BIND|MS_REC, 
> NULL) < 0)
>  return -errno;
>  
> -if (mount(NULL, prefix, NULL, MS_BIND|MS_REMOUNT|(ro 
> ? MS_RDONLY : 0), NULL) < 0)
> +orig_flags = get_mount_flags(prefix);
> +orig_flags &= ~MS_RDONLY;
> +if (mount(NULL, prefix, NULL, 
> orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0)
>  return -errno;
>  
>  x = strdup(cleaned);
> @@ -6989,7 +7003,9 @@ int bind_remount_recursive(const char *prefix, bool ro) 
> {
>  if (r < 0)
>  return r;
>  
> -if (mount(NULL, x, NULL, MS_BIND|MS_REMOUNT|(ro ? 
> MS_RDONLY : 0), NULL) < 0) {
> +orig_flags = get_mount_flags(x);
> +orig_flags &= ~MS_RDONLY;
> +if (mount(NULL, x, NULL, 
> orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0) {
>  
>  /* Deal with mount points that are
>   * obstructed by a later mount */
> diff --git a/src/shared/util.h b/src/shared/util.h
> index a131a3c..4b3070a 100644
> --- a/src/shared/util.h
> +++ b/src/shared/util.h
> @@ -1021,6 +1021,8 @@ union file_handle_union {
>  
>  int update_reboot_param_file(const char *param);
>  
> +unsigned long get_mount_flags(const char *path);
> +
>  int umount_recursive(const char *target, int flags);
>  
>  int bind_remount_recursive(const char *prefix, bool ro);
> -- 
> 2.1.4
> 
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd coredumps

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jan 01, 2015 at 05:57:43PM -, Markus Moeller wrote:
> Hi,
> 
>  How can I find out why systemd core dumps  and requires system
> reboot :-( ?
> 
> I just did
> 
> # systemctl status sockd-1.5.0
> Failed to issue method call: Did not receive a reply. Possible
> causes include: the remote application did not send a reply, the
> message bus security policy blocked the reply, the reply timeout
> expired, or the network connection was broken.
> # systemctl status sockd-1.5.0
> Failed to get D-Bus connection: Failed to connect to socket
> /run/systemd/private: Connection refused
> 
> 2015-01-01T17:52:01.625495+00:00 opensuse12 systemd[1]: Accepted
> connection on private bus.
> 2015-01-01T17:52:01.626333+00:00 opensuse12 systemd[1]: Running GC...
> 2015-01-01T17:52:01.627976+00:00 opensuse12 systemd[1]: Got D-Bus
> request: org.freedesktop.DBus.Properties.GetAll() on
> /org/freedesktop/systemd1/unit/sockd_2d1_2e5_2e0
> 2015-01-01T17:52:01.636546+00:00 opensuse12 systemd[1]: Assertion
> 'endswith(path, ".service")' failed at src/core/service.c:1077,
> function service_load_sysv_name(). Aborting.
The reason is given right here. A failed assertion, i.e. a programming
error.

Please open a bug on bugs.freedesktop.org and attach the core if you can
and describe the steps to trigger this.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] systemd coredumps

2015-01-01 Thread Markus Moeller

Hi,

 How can I find out why systemd core dumps  and requires system reboot 
:-( ?


I just did

# systemctl status sockd-1.5.0
Failed to issue method call: Did not receive a reply. Possible causes 
include: the remote application did not send a reply, the message bus 
security policy blocked the reply, the reply timeout expired, or the network 
connection was broken.

# systemctl status sockd-1.5.0
Failed to get D-Bus connection: Failed to connect to socket 
/run/systemd/private: Connection refused


2015-01-01T17:52:01.625495+00:00 opensuse12 systemd[1]: Accepted connection 
on private bus.

2015-01-01T17:52:01.626333+00:00 opensuse12 systemd[1]: Running GC...
2015-01-01T17:52:01.627976+00:00 opensuse12 systemd[1]: Got D-Bus request: 
org.freedesktop.DBus.Properties.GetAll() on 
/org/freedesktop/systemd1/unit/sockd_2d1_2e5_2e0
2015-01-01T17:52:01.636546+00:00 opensuse12 systemd[1]: Assertion 
'endswith(path, ".service")' failed at src/core/service.c:1077, function 
service_load_sysv_name(). Aborting.
2015-01-01T17:52:01.686714+00:00 opensuse12 systemd[1]: Caught , 
dumped core as pid 2925.

2015-01-01T17:52:01.687538+00:00 opensuse12 systemd[1]: Freezing execution.


I am running Opensuse 12.3

# rpm -q -f /sbin/init
systemd-sysvinit-195-13.45.1.x86_64

# systemd --version
systemd 195
suse
+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ



Thank you
Markus


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-sysv-generator question

2015-01-01 Thread Markus Moeller

Thank you
Markus

"Mantas Mikulėnas"  wrote in message 
news:capwny8vgpomx8nfym+k84-w5sf8-5+yo2zuzuqx3__thoq2...@mail.gmail.com...


On Wed, Dec 31, 2014 at 4:31 PM, Markus Moeller  
wrote:

Hi,

  I am knew to systemd and wonder how to use it correctly.

  I have a simple /etc/init.d/squid startup script which works with 
systemd.
I now copied it to /etc/init.d/mysquid and updated the content 
accordingly.
Now /etc/init.d/mysquid start fails saying the services fail is missing. 
I

check the starndard squid package installer and it also does not contain a
services file.  I only saw update-rc which I run, but no change.

 After long search of my filesystem I found
/run/systemd/generator.late/squid.service with a comment:

 # Automatically generated by systemd-sysv-generator

 Reading about systemd-sysv-generator it says it is run early in the boot
process so after a reboot I also got
/run/systemd/generator.late/mysquid.service

 How can I run the service file creation manually instead of forcing a
system reboot ?


Use `systemctl daemon-reload`.

--
Mantas Mikulėnas 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel 



___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] Type of mount(2) flags is unsigned long

2015-01-01 Thread Topi Miettinen
Signed-off-by: Topi Miettinen 
---
 src/core/namespace.c | 2 +-
 src/core/namespace.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/namespace.c b/src/core/namespace.c
index 400bc50..19a7590 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -422,7 +422,7 @@ int setup_namespace(
 bool private_dev,
 ProtectHome protect_home,
 ProtectSystem protect_system,
-unsigned mount_flags) {
+unsigned long mount_flags) {
 
 BindMount *m, *mounts = NULL;
 unsigned n;
diff --git a/src/core/namespace.h b/src/core/namespace.h
index 1f9d067..42b92e7 100644
--- a/src/core/namespace.h
+++ b/src/core/namespace.h
@@ -50,7 +50,7 @@ int setup_namespace(char **read_write_dirs,
 bool private_dev,
 ProtectHome protect_home,
 ProtectSystem protect_system,
-unsigned mount_flags);
+unsigned long mount_flags);
 
 int setup_tmp_dirs(const char *id,
   char **tmp_dir,
-- 
2.1.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] improve help/usage for some more programs

2015-01-01 Thread Robert Milasan
On Thu, 1 Jan 2015 18:07:59 +0100
"Zbigniew J*drzejewski-Szmek"  wrote:

> Patch is wrapped. Please resend, (git send-email preferably,
> as an attachment otherwise).
> 
> Zbyszek
> 

-- 
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmila...@suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A
>From 9cd266590dbf1d22b1a7fc184ecc8c3868f280f9 Mon Sep 17 00:00:00 2001
From: Robert Milasan 
Date: Wed, 31 Dec 2014 13:17:23 +0100
Subject: [PATCH] improve help/usage for some more programs

---
 src/udev/ata_id/ata_id.c |  4 ++--
 src/udev/cdrom_id/cdrom_id.c | 10 +-
 src/udev/collect/collect.c   | 10 ++
 src/udev/scsi_id/scsi_id.c   |  2 +-
 src/udev/v4l_id/v4l_id.c |  2 +-
 5 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c
index e6344f9..31bc167 100644
--- a/src/udev/ata_id/ata_id.c
+++ b/src/udev/ata_id/ata_id.c
@@ -450,8 +450,8 @@ int main(int argc, char *argv[])
 break;
 case 'h':
 printf("Usage: ata_id [--export] [--help] \n"
-   "  --exportprint values as environment keys\n"
-   "  --help  print this help text\n\n");
+   "  -x,--exportprint values as environment keys\n"
+   "  -h,--help  print this help text\n\n");
 return 0;
 }
 }
diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
index 8a41c4f..6052f6a 100644
--- a/src/udev/cdrom_id/cdrom_id.c
+++ b/src/udev/cdrom_id/cdrom_id.c
@@ -891,11 +891,11 @@ int main(int argc, char *argv[])
 break;
 case 'h':
 printf("Usage: cdrom_id [options] \n"
-   "  --lock-medialock the media (to enable eject request events)\n"
-   "  --unlock-media  unlock the media\n"
-   "  --eject-media   eject the media\n"
-   "  --debug debug to stderr\n"
-   "  --help  print this help text\n\n");
+   "  -l,--lock-medialock the media (to enable eject request events)\n"
+   "  -u,--unlock-media  unlock the media\n"
+   "  -e,--eject-media   eject the media\n"
+   "  -d,--debug debug to stderr\n"
+   "  -h,--help  print this help text\n\n");
 goto exit;
 default:
 rc = 1;
diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
index 16675fb..11a618c 100644
--- a/src/udev/collect/collect.c
+++ b/src/udev/collect/collect.c
@@ -68,15 +68,17 @@ noreturn static void sig_alrm(int signo)
 
 static void usage(void)
 {
-printf("usage: collect [--add|--remove] [--debug]   \n"
-   "\n"
+printf("Usage: collect [options]   \n"
+   "  -a,--add add ID  to the list \n"
+   "  -r,--remove  remove ID  from the list \n"
+   "  -d,--debug   debug to stderr\n"
+   "  -h,--helpprint this help text\n\n"
"  Adds ID  to the list governed by .\n"
"   must be part of the list .\n"
"  If all IDs given by  are listed (ie collect has been\n"
"  invoked for each ID in ) collect returns 0, the\n"
"  number of missing IDs otherwise.\n"
-   "  On error a negative number is returned.\n"
-   "\n");
+   "  On error a negative number is returned.\n\n");
 }
 
 /*
diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
index 27adb09..5270233 100644
--- a/src/udev/scsi_id/scsi_id.c
+++ b/src/udev/scsi_id/scsi_id.c
@@ -313,7 +313,7 @@ static void help(void) {
"  -g,--whitelisted treat device as whitelisted\n"
"  -u,--replace-whitespace  replace all whitespace by underscores\n"
"  -v,--verbose verbose logging\n"
-   " --version print version\n"
+   "  -V,--version print version\n"
"  -x,--export  print values as environment keys\n"
"  -h,--helpprint this help text\n\n");
 
diff --git a/src/udev/v4l_id/v4l_id.c b/src/udev/v4l_id/v4l_id.c
index d5463b2..08d3efa 100644
--- a/src/udev/v4l_id/v4l_id.c
+++ b/src/udev/v4l_id/v4l_id.c
@@ -45,7 +45,7 @@ int main (int argc, char *argv[])
 
 switch (option) {
 case 'h':
-printf("Usage: v4l_id [--help] \n\n");
+   

Re: [systemd-devel] [PATCH] improve help/usage for some more programs

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Dec 31, 2014 at 01:18:55PM +0100, Robert Milasan wrote:
> ---
>  src/udev/ata_id/ata_id.c |  4 ++--
>  src/udev/cdrom_id/cdrom_id.c | 10 +-
>  src/udev/collect/collect.c   | 10 ++
>  src/udev/scsi_id/scsi_id.c   |  2 +-
>  src/udev/v4l_id/v4l_id.c |  2 +-
>  5 files changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c
> index e6344f9..31bc167 100644
> --- a/src/udev/ata_id/ata_id.c
> +++ b/src/udev/ata_id/ata_id.c
> @@ -450,8 +450,8 @@ int main(int argc, char *argv[])
>  break;
>  case 'h':
>  printf("Usage: ata_id [--export] [--help]
> \n"
> -   "  --exportprint values as
> environment keys\n"
> -   "  --help  print this help
> text\n\n");
> +   "  -x,--exportprint values as
> environment keys\n"
> +   "  -h,--help  print this help
> text\n\n"); return 0;
Patch is wrapped. Please resend, (git send-email preferably,
as an attachment otherwise).

Zbyszek

>  }
>  }
> diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
> index 8a41c4f..6052f6a 100644
> --- a/src/udev/cdrom_id/cdrom_id.c
> +++ b/src/udev/cdrom_id/cdrom_id.c
> @@ -891,11 +891,11 @@ int main(int argc, char *argv[])
>  break;
>  case 'h':
>  printf("Usage: cdrom_id [options] \n"
> -   "  --lock-medialock the media (to
> enable eject request events)\n"
> -   "  --unlock-media  unlock the media\n"
> -   "  --eject-media   eject the media\n"
> -   "  --debug debug to stderr\n"
> -   "  --help  print this help
> text\n\n");
> +   "  -l,--lock-medialock the media
> (to enable eject request events)\n"
> +   "  -u,--unlock-media  unlock the
> media\n"
> +   "  -e,--eject-media   eject the media\n"
> +   "  -d,--debug debug to stderr\n"
> +   "  -h,--help  print this help
> text\n\n"); goto exit;
>  default:
>  rc = 1;
> diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
> index 16675fb..11a618c 100644
> --- a/src/udev/collect/collect.c
> +++ b/src/udev/collect/collect.c
> @@ -68,15 +68,17 @@ noreturn static void sig_alrm(int signo)
>  
>  static void usage(void)
>  {
> -printf("usage: collect [--add|--remove] [--debug] 
>  \n"
> -   "\n"
> +printf("Usage: collect [options]   \n"
> +   "  -a,--add add ID  to the list \n"
> +   "  -r,--remove  remove ID  from the list
> \n"
> +   "  -d,--debug   debug to stderr\n"
> +   "  -h,--helpprint this help text\n\n"
> "  Adds ID  to the list governed by .\n"
> "   must be part of the list .\n"
> "  If all IDs given by  are listed (ie collect
> has been\n" "  invoked for each ID in ) collect returns 0,
> the\n" "  number of missing IDs otherwise.\n"
> -   "  On error a negative number is returned.\n"
> -   "\n");
> +   "  On error a negative number is returned.\n\n");
>  }
>  
>  /*
> diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
> index 27adb09..5270233 100644
> --- a/src/udev/scsi_id/scsi_id.c
> +++ b/src/udev/scsi_id/scsi_id.c
> @@ -313,7 +313,7 @@ static void help(void) {
> "  -g,--whitelisted treat device as
> whitelisted\n" "  -u,--replace-whitespace  replace all
> whitespace by underscores\n" "  -v,--verbose
> verbose logging\n"
> -   " --version print version\n"
> +   "  -V,--version print version\n"
> "  -x,--export  print values as
> environment keys\n" "  -h,--helpprint this help
> text\n\n"); 
> diff --git a/src/udev/v4l_id/v4l_id.c b/src/udev/v4l_id/v4l_id.c
> index d5463b2..08d3efa 100644
> --- a/src/udev/v4l_id/v4l_id.c
> +++ b/src/udev/v4l_id/v4l_id.c
> @@ -45,7 +45,7 @@ int main (int argc, char *argv[])
>  
>  switch (option) {
>  case 'h':
> -printf("Usage: v4l_id [--help]  file>\n\n");
> +printf("Usage: v4l_id [-h,--help]  file>\n\n"); return 0;
>  default:
>  return 1;
> -- 
> 1.8.4.5
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/system

[systemd-devel] [PATCH] po: update French translation

2015-01-01 Thread Sylvain Plantefève
---
 po/fr.po | 33 -
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index 243465c..6b577fb 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: systemd\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-11-14 17:49+0100\n"
-"PO-Revision-Date: 2014-04-29 09:17+0300\n"
+"POT-Creation-Date: 2014-12-28 13:02+0100\n"
+"PO-Revision-Date: 2014-12-28 13:04+0100\n"
 "Last-Translator: Sylvain Plantefève \n"
 "Language-Team: French\n"
 "Language: fr\n"
@@ -334,6 +334,15 @@ msgstr ""
 "Authentification requise pour mettre le système en hibernation alors qu'une "
 "application a demandé de l'empêcher."
 
+#: ../src/machine/org.freedesktop.machine1.policy.in.h:1
+msgid "Login into a local container"
+msgstr "Connexion dans un conteneur local"
+
+#: ../src/machine/org.freedesktop.machine1.policy.in.h:2
+msgid "Authentication is required to allow login into a local container."
+msgstr ""
+"Authentification requise pour permettre la connexion dans un conteneur local."
+
 #: ../src/timedate/org.freedesktop.timedate1.policy.in.h:1
 msgid "Set system time"
 msgstr "Définir l'heure du système"
@@ -387,37 +396,27 @@ msgstr ""
 "Authentification requise pour renvoyer la phrase secrète au système."
 
 #: ../src/core/org.freedesktop.systemd1.policy.in.in.h:3
-msgid "Privileged system and service manager access"
-msgstr "Accès privilégié au gestionnaire du système et des services"
-
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4
-msgid "Authentication is required to access the system and service manager."
-msgstr ""
-"Authentification requise pour accéder au gestionnaire du système et des "
-"services."
-
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:5
 msgid "Manage system services or units"
 msgstr "Gérer les services système ou les unités"
 
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:6
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4
 msgid "Authentication is required to manage system services or units."
 msgstr ""
 "Authentification requise pour gérer les services système ou les unités."
 
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:7
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:5
 msgid "Manage system service or unit files"
 msgstr "Gérer le service système ou ses fichiers unités"
 
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:8
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:6
 msgid "Authentication is required to manage system service or unit files."
 msgstr ""
 "Authentification requise pour gérer le service système ou ses fichiers 
unités."
 
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:9
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:7
 msgid "Reload the systemd state"
 msgstr "Recharger l'état de systemd"
 
-#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:10
+#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:8
 msgid "Authentication is required to reload the systemd state."
 msgstr "Authentification requise pour recharger l'état de systemd"
-- 
2.1.0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Fix install location of systemd.pc

2015-01-01 Thread Martin Pitt
Hey Zbyszek,

Zbigniew Jędrzejewski-Szmek [2015-01-01 15:14 +0100]:
> Yeah, you can find out the libdir in other ways, but having it in the .pc
> file is convenient. Martin, please push the patch.

Ack, done. And happy new year everyone!

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: Digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Do not clear parent mount flags when setting up namespaces

2015-01-01 Thread Topi Miettinen
On 01/01/15 14:49, Topi Miettinen wrote:
> Copy parent directory mount flags when setting up a namespace and
> don't accidentally clear mount flags later.

The problem here is that flags noexec, nosuid and nodev are cleared, so
the mounts always have exec, suid, dev flags enabled. With the patch
applied, namespace mounts keep what parent had, for example:

# grep /etc /proc/`pidof acpid`/mounts
/dev/sdb1 /etc ext4
ro,nosuid,nodev,noatime,discard,errors=remount-ro,data=ordered 0 0

-Topi Miettinen

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] Do not clear parent mount flags when setting up namespaces

2015-01-01 Thread Topi Miettinen
Copy parent directory mount flags when setting up a namespace and
don't accidentally clear mount flags later.

Signed-off-by: Topi Miettinen 
---
 src/core/namespace.c |  4 ++--
 src/shared/util.c| 20 ++--
 src/shared/util.h|  2 ++
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/core/namespace.c b/src/core/namespace.c
index 5b408e0..400bc50 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -159,7 +159,7 @@ static int mount_dev(BindMount *m) {
 
 dev = strappenda(temporary_mount, "/dev");
 (void)mkdir(dev, 0755);
-if (mount("tmpfs", dev, "tmpfs", MS_NOSUID|MS_STRICTATIME, "mode=755") 
< 0) {
+if (mount("tmpfs", dev, "tmpfs", 
get_mount_flags("/dev")|MS_NOSUID|MS_STRICTATIME, "mode=755") < 0) {
 r = -errno;
 goto fail;
 }
@@ -282,7 +282,7 @@ static int mount_kdbus(BindMount *m) {
 
 root = strappenda(temporary_mount, "/kdbus");
 (void)mkdir(root, 0755);
-if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_STRICTATIME, 
"mode=777") < 0) {
+if (mount("tmpfs", root, "tmpfs", 
get_mount_flags("/kdbus")|MS_NOSUID|MS_STRICTATIME, "mode=777") < 0) {
 r = -errno;
 goto fail;
 }
diff --git a/src/shared/util.c b/src/shared/util.c
index dfaf7f7..31fbb68 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 #undef basename
 
 #ifdef HAVE_SYS_AUXV_H
@@ -6858,6 +6859,16 @@ int umount_recursive(const char *prefix, int flags) {
 return r ? r : n;
 }
 
+unsigned long get_mount_flags(const char *path)
+{
+struct statvfs buf;
+
+if (statvfs(path, &buf) < 0)
+return 0;
+
+return buf.f_flag;
+}
+
 int bind_remount_recursive(const char *prefix, bool ro) {
 _cleanup_set_free_free_ Set *done = NULL;
 _cleanup_free_ char *cleaned = NULL;
@@ -6892,6 +6903,7 @@ int bind_remount_recursive(const char *prefix, bool ro) {
 _cleanup_set_free_free_ Set *todo = NULL;
 bool top_autofs = false;
 char *x;
+unsigned long orig_flags;
 
 todo = set_new(&string_hash_ops);
 if (!todo)
@@ -6969,7 +6981,9 @@ int bind_remount_recursive(const char *prefix, bool ro) {
 if (mount(cleaned, cleaned, NULL, MS_BIND|MS_REC, 
NULL) < 0)
 return -errno;
 
-if (mount(NULL, prefix, NULL, MS_BIND|MS_REMOUNT|(ro ? 
MS_RDONLY : 0), NULL) < 0)
+orig_flags = get_mount_flags(prefix);
+orig_flags &= ~MS_RDONLY;
+if (mount(NULL, prefix, NULL, 
orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0)
 return -errno;
 
 x = strdup(cleaned);
@@ -6989,7 +7003,9 @@ int bind_remount_recursive(const char *prefix, bool ro) {
 if (r < 0)
 return r;
 
-if (mount(NULL, x, NULL, MS_BIND|MS_REMOUNT|(ro ? 
MS_RDONLY : 0), NULL) < 0) {
+orig_flags = get_mount_flags(x);
+orig_flags &= ~MS_RDONLY;
+if (mount(NULL, x, NULL, 
orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0) {
 
 /* Deal with mount points that are
  * obstructed by a later mount */
diff --git a/src/shared/util.h b/src/shared/util.h
index a131a3c..4b3070a 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -1021,6 +1021,8 @@ union file_handle_union {
 
 int update_reboot_param_file(const char *param);
 
+unsigned long get_mount_flags(const char *path);
+
 int umount_recursive(const char *target, int flags);
 
 int bind_remount_recursive(const char *prefix, bool ro);
-- 
2.1.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/2] libsystemd-network : Fix resource leaks in test-lldp

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Dec 31, 2014 at 04:16:03PM +0200, Philippe De Swert wrote:
> Fix some resources leaks in test-lldp found with coverity:
> CID#1261388, CID#1261385, CID#1261383
> ---
>  src/libsystemd-network/test-lldp.c | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/src/libsystemd-network/test-lldp.c 
> b/src/libsystemd-network/test-lldp.c
> index e9d5d7b..5f9eba3 100644
> --- a/src/libsystemd-network/test-lldp.c
> +++ b/src/libsystemd-network/test-lldp.c
> @@ -131,7 +131,8 @@ static int lldp_parse_chassis_tlv(tlv_packet *m, uint8_t 
> *type) {
>  }
>  
>  static int lldp_parse_port_id_tlv(tlv_packet *m) {
> -char *str = NULL, *p;
> +char *str = NULL;
> +_cleanup_free_ char *p;
>  uint16_t length;
>  uint8_t subtype;
>  
> @@ -158,7 +159,7 @@ static int lldp_parse_port_id_tlv(tlv_packet *m) {
>  }
>  
>  static int lldp_parse_system_name_tlv(tlv_packet *m) {
> -char *str = NULL, *p;
> +_cleanup_free_ char *str = NULL, *p;
>  uint16_t length;
>  
>  assert_se(lldp_tlv_packet_enter_container(m, LLDP_TYPE_SYSTEM_NAME) 
> >= 0);
> @@ -175,7 +176,7 @@ static int lldp_parse_system_name_tlv(tlv_packet *m) {
>  }
>  
>  static int lldp_parse_system_desc_tlv(tlv_packet *m) {
> -char *str = NULL, *p;
> +_cleanup_free_ char *str = NULL, *p;
>  uint16_t length;
>  
>  assert_se(lldp_tlv_packet_enter_container(m, 
> LLDP_TYPE_SYSTEM_DESCRIPTION) >= 0);

David pushed some fixes to this code yesterday, but it is all unnecessary imo.
Could you update your patch to use strncmp() and kill all the useless
string copying?

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 1/2] machine: machinectl, remove some dead code

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Dec 31, 2014 at 04:16:02PM +0200, Philippe De Swert wrote:
> The variable r is already checked one time before and the same error returned.
> So the second check is unneeded.
> ---
>  src/machine/machinectl.c | 4 
>  1 file changed, 4 deletions(-)
> 
> diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
> index 0abc251..951b3cc 100644
> --- a/src/machine/machinectl.c
> +++ b/src/machine/machinectl.c
> @@ -250,10 +250,6 @@ static int list_images(int argc, char *argv[], void 
> *userdata) {
> (int) max_mtime, strna(format_timestamp(mtime_buf, 
> sizeof(mtime_buf), images[j].mtime)));
>  }
>  
> -if (r < 0)
> -return bus_log_parse_error(r);
> -
> -
David pushed the same change yesterday.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Fix install location of systemd.pc

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Dec 31, 2014 at 08:44:35PM +0100, Michael Biebl wrote:
> Am 31.12.2014 12:54 schrieb "Simon Peeters" :
> >
> > 2014-12-31 11:12 GMT+00:00 Martin Pitt :
> > > Simon Peeters [2014-12-29 15:01 +]:
> > >> I have no preference between the 2, but moving the pc file to
> > >> $libdir/pkgconfig just does not make sense.
> > >
> > > Why not? pkg-config looks in both /usr/share and /usr/lib, so it
> > > doesn't care. And you can't install systemd for multiple architectures
> > > in parallel anyway, so you'd only ever have one version installed.
> >
> > Let me rephrase what I wrote above that quote:
> >
> > If I understand lennarts commit message, the only reason for libdir to
> > be in the pc file is to find the libdir for the primary arch.
> > moving this pc file into $libdir/pkgconfig would require you to know
> > the libdir for the primary arch (or at least the one systemd was
> > compiled for) in order to read it
> 
> I don't think this is true. Usually one doesn't parse .pc files directly
> but instead you use pkg-config. So you don't need to know the libdir for
> the primary arch.

Yeah, you can find out the libdir in other ways, but having it in the .pc
file is convenient. Martin, please push the patch.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH v2] Makefile.am : Fix build issue with machines.target

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Dec 31, 2014 at 06:02:12PM +0200, Philippe De Swert wrote:
> When doing "make clean" the unit/machines.target file gets deleted.
> This causes a build error later on when trying to rebuild systemd.
> V2: The file probably belongs to dist_systemunit_DATA
> ---
Applied.

Zbyszek

>  Makefile.am | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 28d2e4b..5f80306 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -506,7 +506,8 @@ dist_systemunit_DATA = \
>   units/systemd-udevd-control.socket \
>   units/systemd-udevd-kernel.socket \
>   units/system-update.target \
> - units/initrd-switch-root.target
> + units/initrd-switch-root.target \
> + units/machines.target
>  
>  if ENABLE_KDBUS
>  dist_systemunit_DATA += \
> @@ -549,7 +550,6 @@ nodist_systemunit_DATA = \
>   units/initrd-udevadm-cleanup-db.service \
>   units/initrd-switch-root.service \
>   units/systemd-nspawn@.service \
> - units/machines.target \
>   units/systemd-update-done.service
>  
>  if HAVE_UTMP
> -- 
> 2.1.4
> 
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Clarify effect when both calendar day and date are listed in timer

2015-01-01 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Dec 31, 2014 at 09:59:16PM -0500, Chris Atkinson wrote:
> See bug 87859 (https://bugs.freedesktop.org/show_bug.cgi?id=87859). Bug
> reporter found the language describing the effect of specifying both a
> day and date unclear; hopefully the attached patch will clarify and
> allow the bug to be closed.
Applied.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel