[systemd-devel] [PATCH] systemd-delta: add support for drop-in snippets

2013-04-30 Thread Lukas Nykryn
---
 TODO  |   3 -
 src/delta/delta.c | 179 ++
 2 files changed, 166 insertions(+), 16 deletions(-)

diff --git a/TODO b/TODO
index 9adec5e..96d90d8 100644
--- a/TODO
+++ b/TODO
@@ -95,9 +95,6 @@ Features:
kmod static-nodes
   call kmod as an early service, and drop CAP_MKNOD from udevd.service
 
-* systemd-delta needs to be made aware of *.d/*.conf drop-in files for
-  units.
-
 * seems that when we follow symlinks to units we prefer the symlink
   destination path over /etc and /usr. We shouldn't do that. Instead
   /etc should always override /run+/usr and also any symlink
diff --git a/src/delta/delta.c b/src/delta/delta.c
index aec3dc8..0ccb76c 100644
--- a/src/delta/delta.c
+++ b/src/delta/delta.c
@@ -41,9 +41,10 @@ static enum {
 SHOW_REDIRECTED = 1  2,
 SHOW_OVERRIDDEN = 1  3,
 SHOW_UNCHANGED = 1  4,
+SHOW_EXTENDED = 1  5,
 
 SHOW_DEFAULTS =
-(SHOW_MASKED | SHOW_EQUIVALENT | SHOW_REDIRECTED | SHOW_OVERRIDDEN)
+(SHOW_MASKED | SHOW_EQUIVALENT | SHOW_REDIRECTED | SHOW_OVERRIDDEN | 
SHOW_EXTENDED)
 } arg_flags = 0;
 
 static int equivalent(const char *a, const char *b) {
@@ -92,6 +93,14 @@ static int notify_override_overridden(const char *top, const 
char *bottom) {
 return 1;
 }
 
+static int notify_override_extended(const char *top, const char *bottom) {
+if (!(arg_flags  SHOW_EXTENDED))
+   return 0;
+
+printf(ANSI_HIGHLIGHT_ON [EXTENDED] ANSI_HIGHLIGHT_OFF%s → 
%s\n, top, bottom);
+return 1;
+}
+
 static int notify_override_unchanged(const char *f) {
 if (!(arg_flags  SHOW_UNCHANGED))
 return 0;
@@ -148,11 +157,124 @@ static int found_override(const char *top, const char 
*bottom) {
 return 0;
 }
 
-static int enumerate_dir(Hashmap *top, Hashmap *bottom, const char *path) {
+static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, 
const char *toppath, const char *drop) {
+_cleanup_closedir_ DIR *dir;
+_cleanup_free_ char *conf = NULL;
+_cleanup_free_ char *path = NULL;
+char *c;
+
+path = strjoin(toppath, /, drop, NULL);
+if (!path)
+return -ENOMEM;
+
+path_kill_slashes(path);
+
+conf = strdup(drop);
+if (!conf)
+return -ENOMEM;
+
+c = strrchr(conf, '.');
+if(!c)
+return -EINVAL;
+*c = 0;
+
+dir = opendir(path);
+if (!dir) {
+if (errno == ENOENT)
+return 0;
+
+log_error(Failed to enumerate %s: %m, path);
+return -errno;
+}
+
+for (;;) {
+Hashmap *h;
+struct dirent *de;
+union dirent_storage buf;
+int k;
+char *p;
+char *d;
+
+k = readdir_r(dir, buf.de, de);
+if (k != 0)
+return -k;
+
+if (!de)
+break;
+
+if (!dirent_is_file_with_suffix(de, .conf))
+continue;
+
+p = strjoin(path, /, de-d_name, NULL);
+if (!p)
+return -ENOMEM;
+
+path_kill_slashes(p);
+
+d = strrchr(p, '/');
+if (!d || d == p) {
+free(p);
+return -EINVAL;
+}
+d --;
+d = strrchr(p, '/');
+
+if (!d || d == p) {
+free(p);
+return -EINVAL;
+}
+
+k = hashmap_put(top, d, p);
+if (k = 0) {
+p = strdup(p);
+if (!p)
+return -ENOMEM;
+d = strrchr(p, '/');
+d --;
+d = strrchr(p, '/');
+} else if (k != -EEXIST) {
+free(p);
+return k;
+}
+
+free(hashmap_remove(bottom, d));
+k = hashmap_put(bottom, d, p);
+if (k  0) {
+free(p);
+return k;
+}
+
+h = hashmap_get(drops, conf);
+if (!h) {
+h = hashmap_new(string_hash_func, string_compare_func);
+if (!h)
+return -ENOMEM;
+hashmap_put(drops, conf, h);
+conf = strdup(conf);
+if (!conf)
+return -ENOMEM;
+}
+
+p = strdup(p);
+if (!p)
+return -ENOMEM;
+
+k = hashmap_put(h, 

Re: [systemd-devel] [PATCH] kernel-install: Clean up

2013-04-30 Thread Harald Hoyer
On 04/25/2013 07:59 PM, Mantas Mikulėnas wrote:
 - Consistent use of $VAR vs ${VAR}
 - Consistent use of  vs 'if'
 - Add error checking to some places
 - Consistent error messages (Can't vs Cannot, etc.)
 - Function declarations at the top
 - Miscellaneous adjustments
 ---
  src/kernel-install/kernel-install | 137 
 +-
  1 file changed, 75 insertions(+), 62 deletions(-)

pushed, thanks!

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


[systemd-devel] [RFC PATCH] journal: Set the default keep free value to 15% (up from 5%)

2013-04-30 Thread Colin Guthrie
As some SSDs are still seeing performance degredation when
reaching 85% usage the default value of 5% seems a little low.

Set this to 15% by default.
---

So I'm really not sure or educated enough about this one,
but we're recently had a user complain about the disk space
used by the journal.

I argued that the defaults were automagic and this should be
fine generally and even if it does use more disk space by default,
it should clear itself out automatically when under pressure.

One comment in reply to my argument mentioned SSD performance. While
this is arguably something that should be fixed elsewhere, should
we be more concervative with things and leave say, 15% free by default?

Col

 man/journald.conf.xml  | 2 +-
 src/journal/journal-file.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index 0b9de65..6d54c94 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -246,7 +246,7 @@
 configured in
 varnameSystemMaxUse=/varname and
 varnameRuntimeMaxUse=/varname is
-available. Defaults to 5% of the size
+available. Defaults to 15% of the size
 of the respective file
 system. varnameSystemMaxFileSize=/varname
 and
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index a44e126..bfe2951 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -2769,7 +2769,7 @@ void journal_default_metrics(JournalMetrics *m, int fd) {
 if (m-keep_free == (uint64_t) -1) {
 
 if (fs_size  0) {
-m-keep_free = PAGE_ALIGN(fs_size / 20); /* 5% of file 
system size */
+m-keep_free = PAGE_ALIGN(fs_size * 3 / 20); /* 15% of 
file system size */
 
 if (m-keep_free  DEFAULT_KEEP_FREE_UPPER)
 m-keep_free = DEFAULT_KEEP_FREE_UPPER;
-- 
1.8.1.5

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


[systemd-devel] EFI boot generator failing to detect I'm actually booting on EFI

2013-04-30 Thread Léo Gillot-Lamure
Hi.

I run an EFI system with gentoo, gummiboot and systemd 202 (and no initramfs).
I'm expecting my ESP to be mounted on /boot thanks to the
systemd-efi-boot-generator, however it is not. By stracting it for the
open syscall, I can see that the last call is this one, before
EXIT_SUCCESSing :

 open(/sys/firmware/efi/efivars/LoaderDevicePartUUID-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f,
  O_RDONLY|O_NOCTTY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

Thus the failing call is efi_get_loader_device_part_uuid at line 58 of
efi-boot-generator.c not finding the LoaderDevicePartUUID variable.
Is my firmware buggy ? Could the generator be modified to work anyway ?

Thanks.

Léo Gillot-Lamure.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [systemd-commits] 10 commits - Makefile.am TODO man/sd_id128_to_string.xml man/systemd.unit.xml src/core src/cryptsetup src/libsystemd-id128 src/nspawn src/nss-myhostname src/share

2013-04-30 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Apr 30, 2013 at 04:36:11AM -0700, Lennart Poettering wrote:
 commit 5f1dac6bf605871615b35891a3966fa474db5b20
 Author: Lennart Poettering lenn...@poettering.net
 Date:   Mon Apr 29 19:57:29 2013 -0300
 
 cryptsetup: warn if keyfiles are world-readable
Hi,

this part is understandable...

 commit 8973790ee6f62132b1b57de15c4edaef2c097004
 Author: Lennart Poettering lenn...@poettering.net
 Date:   Mon Apr 29 19:48:03 2013 -0300
 
 cryptsetup: warn if /etc/crypttab is world-readable
...but this one not. Majority of crypttabs out there contain stuff
like 'part_crypt /dev/part none luks' and the content can be inferred
from 'ls -l /dev/mapper' and distribution defaults. Passwords cannot
be stored in /etc/crypttab... No need to force people to hide
crypttab for no good reason.

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


Re: [systemd-devel] EFI boot generator failing to detect I'm actually booting on EFI

2013-04-30 Thread Léo Gillot-Lamure
My module is built in the kernel (actually modules support is disabled
on my kernel), and the /sys/firmware/efi/ is here and properly usable
(for example efibootmgr works).
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] EFI boot generator failing to detect I'm actually booting on EFI

2013-04-30 Thread Kay Sievers
On Tue, Apr 30, 2013 at 6:59 PM, Léo Gillot-Lamure
leo.gil...@navaati.net wrote:
 My module is built in the kernel (actually modules support is disabled
 on my kernel), and the /sys/firmware/efi/ is here and properly usable
 (for example efibootmgr works).

You need:
  /sys/firmware/efi/efivars/
You have that?

Not only:
  /sys/firmware/efi/vars/
which is used by efibootmgr.

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


[systemd-devel] [PATCH 1/2] util: Add _sentinel_ to strextend()

2013-04-30 Thread Colin Walters
Since it must be NULL terminated.
---
 src/shared/util.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


From 73f531d65356ecf58c945f316ddcee2201078978 Mon Sep 17 00:00:00 2001
From: Colin Walters walt...@verbum.org
Date: Tue, 30 Apr 2013 13:01:45 -0400
Subject: [PATCH 1/2] util: Add _sentinel_ to strextend()

Since it must be NULL terminated.
---
 src/shared/util.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/shared/util.h b/src/shared/util.h
index 5d1b0b1..eee66cc 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -633,7 +633,7 @@ static inline void *mempset(void *s, int c, size_t n) {
 char *hexmem(const void *p, size_t l);
 void *unhexmem(const char *p, size_t l);
 
-char *strextend(char **x, ...);
+char *strextend(char **x, ...) _sentinel_;
 char *strrep(const char *s, unsigned n);
 
 void* greedy_realloc(void **p, size_t *allocated, size_t need);
-- 
1.7.1

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


[systemd-devel] [PATCH 2/2] coredump: Handle programs with spaces in COMM

2013-04-30 Thread Colin Walters
This patch makes systemd-coredump handle processes that have
whitespace in their COMM fields.

fs/coredump.c when given %e (as systemd-coredump uses), will end up
joining the process arguments into a string (along with the other
fields), then will split the entire thing up on whitespace, and use
it as the arguments to the coredump pipe handler.

Previously, systemd-coredump would then reject them as having too many
arguments.
---
 src/journal/coredump.c |   25 ++---
 1 files changed, 18 insertions(+), 7 deletions(-)



From 5dddf91172edfdbe21e5135fa0f14a9e44c5a1d6 Mon Sep 17 00:00:00 2001
From: Colin Walters walt...@verbum.org
Date: Tue, 30 Apr 2013 13:06:03 -0400
Subject: [PATCH 2/2] coredump: Handle programs with spaces in COMM

This patch makes systemd-coredump handle processes that have
whitespace in their COMM fields.

fs/coredump.c when given %e (as systemd-coredump uses), will end up
joining the process arguments into a string (along with the other
fields), then will split the entire thing up on whitespace, and use
it as the arguments to the coredump pipe handler.

Previously, systemd-coredump would then reject them as having too many
arguments.
---
 src/journal/coredump.c |   25 ++---
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/journal/coredump.c b/src/journal/coredump.c
index fd03e38..8f5c17f 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -49,9 +49,9 @@ enum {
 ARG_GID,
 ARG_SIGNAL,
 ARG_TIMESTAMP,
-ARG_COMM,
-_ARG_MAX
+ARG_COMM_START
 };
+#define _ARG_MIN (ARG_COMM_START+1)
 
 static int divert_coredump(void) {
 _cleanup_fclose_ FILE *f = NULL;
@@ -98,6 +98,7 @@ static int divert_coredump(void) {
 }
 
 int main(int argc, char* argv[]) {
+int i;
 int r, j = 0;
 char *t;
 ssize_t n;
@@ -106,17 +107,18 @@ int main(int argc, char* argv[]) {
 gid_t gid;
 struct iovec iovec[14];
 size_t coredump_bufsize, coredump_size;
+const char *comm_joined_str = NULL;
 _cleanup_free_ char *core_pid = NULL, *core_uid = NULL, *core_gid = NULL, *core_signal = NULL,
 *core_timestamp = NULL, *core_comm = NULL, *core_exe = NULL, *core_unit = NULL,
 *core_session = NULL, *core_message = NULL, *core_cmdline = NULL, *coredump_data = NULL;
 
 prctl(PR_SET_DUMPABLE, 0);
 
-if (argc != _ARG_MAX) {
+if (argc  _ARG_MIN) {
 log_set_target(LOG_TARGET_JOURNAL_OR_KMSG);
 log_open();
 
-log_error(Invalid number of arguments passed from kernel.);
+log_error(Expected at least %u arguments passed from kernel, received %u, _ARG_MIN, argc);
 r = -EINVAL;
 goto finish;
 }
@@ -182,9 +184,18 @@ int main(int argc, char* argv[]) {
 if (core_signal)
 IOVEC_SET_STRING(iovec[j++], core_signal);
 
-core_comm = strappend(COREDUMP_COMM=, argv[ARG_COMM]);
-if (core_comm)
+core_comm = strappend(COREDUMP_COMM=, argv[ARG_COMM_START]);
+if (core_comm) {
+for (i = ARG_COMM_START+1; i  argc; i++) {
+strextend(core_comm,  , argv[i], NULL);
+if (!core_comm)
+break;
+}
+}
+if (core_comm) {
 IOVEC_SET_STRING(iovec[j++], core_comm);
+comm_joined_str = core_comm + strlen(COREDUMP_COMM=);
+}
 
 #ifdef HAVE_LOGIND
 if (sd_pid_get_session(pid, t) = 0) {
@@ -220,7 +231,7 @@ int main(int argc, char* argv[]) {
 IOVEC_SET_STRING(iovec[j++], MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1);
 IOVEC_SET_STRING(iovec[j++], PRIORITY=2);
 
-core_message = strjoin(MESSAGE=Process , argv[ARG_PID],  (, argv[ARG_COMM], ) dumped core., NULL);
+core_message = strjoin(MESSAGE=Process , argv[ARG_PID],  (, comm_joined_str, ) dumped core., NULL);
 if (core_message)
 IOVEC_SET_STRING(iovec[j++], core_message);
 
-- 
1.7.1

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


Re: [systemd-devel] [PATCH 2/2] coredump: Handle programs with spaces in COMM

2013-04-30 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Apr 30, 2013 at 01:12:19PM -0400, Colin Walters wrote:
 This patch makes systemd-coredump handle processes that have
 whitespace in their COMM fields.
 
 fs/coredump.c when given %e (as systemd-coredump uses), will end up
 joining the process arguments into a string (along with the other
 fields), then will split the entire thing up on whitespace, and use
 it as the arguments to the coredump pipe handler.
 
 Previously, systemd-coredump would then reject them as having too many
 arguments.
 ---
That's a workaround for a bug in the kernel. I think it makes sense, but
it'd be nice to fix the kernel too.

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


Re: [systemd-devel] [PATCH 1/2] util: Add _sentinel_ to strextend()

2013-04-30 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Apr 30, 2013 at 01:11:49PM -0400, Colin Walters wrote:
 Since it must be NULL terminated.
 ---
  src/shared/util.h |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
Applied.

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


Re: [systemd-devel] EFI boot generator failing to detect I'm actually booting on EFI

2013-04-30 Thread Léo Gillot-Lamure
Yup, I have both.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/2] coredump: Handle programs with spaces in COMM

2013-04-30 Thread Colin Walters
On Tue, 2013-04-30 at 19:47 +0200, Zbigniew Jędrzejewski-Szmek wrote:
 On Tue, Apr 30, 2013 at 01:12:19PM -0400, Colin Walters wrote:
  This patch makes systemd-coredump handle processes that have
  whitespace in their COMM fields.
  
  fs/coredump.c when given %e (as systemd-coredump uses), will end up
  joining the process arguments into a string (along with the other
  fields), then will split the entire thing up on whitespace, and use
  it as the arguments to the coredump pipe handler.
  
  Previously, systemd-coredump would then reject them as having too many
  arguments.
  ---
 That's a workaround for a bug in the kernel. I think it makes sense, but
 it'd be nice to fix the kernel too.

To do what though?  Add a new coredump format specifier that gives you
a string-escaped version as one argument?  That'd probably make sense,
but then we'd have to test the kernel version before installing a
specifier.

Oddly, abrt doesn't seem to have this problem, but I also don't see how
the current code handles it.  More oddly, its core pattern is:
|/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e
I don't understand how the lack of % for the 'e' works.

Oh, wait it doesn't actually use that format code, it just
parses /proc/pid/exe.  That's kind of funny =)

Although it does have some neat code to handle sparseness in cores and
attempt page-aligned IO.

Anyways, CC'd some of the people that appear in git log fs/coredump.c
for comments on the semantics of %e and whitespace in kernel arguments.


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


[systemd-devel] [PATCH] udev/rules: Add default user access and permissions for vfio

2013-04-30 Thread Alex Williamson
The /dev/vfio/vfio device file is intended to be an unprivileged
interface.  Only by attaching it to a group (/dev/vfio/$GROUP) does
it allow privileged access.  The group is therefore used to grant
access and /dev/vfio/vfio can be used by anyone.  Update the udev
rules to provide this.

Signed-off-by: Alex Williamson alex.william...@redhat.com
---
 rules/50-udev-default.rules |2 ++
 src/login/70-uaccess.rules  |3 +++
 2 files changed, 5 insertions(+)

diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules
index f764789..a5b6492 100644
--- a/rules/50-udev-default.rules
+++ b/rules/50-udev-default.rules
@@ -68,4 +68,6 @@ KERNEL==tun, MODE=0666, OPTIONS+=static_node=net/tun
 
 KERNEL==fuse, MODE=0666, OPTIONS+=static_node=fuse
 
+SUBSYSTEM==vfio, KERNEL==vfio, MODE=0666
+
 LABEL=default_permissions_end
diff --git a/src/login/70-uaccess.rules b/src/login/70-uaccess.rules
index a118f8e..a6f5507 100644
--- a/src/login/70-uaccess.rules
+++ b/src/login/70-uaccess.rules
@@ -71,4 +71,7 @@ ENV{DDC_DEVICE}==*?, TAG+=uaccess
 # media player raw devices (for user-mode drivers, Android SDK, etc.)
 SUBSYSTEM==usb, ENV{ID_MEDIA_PLAYER}==?*, TAG+=uaccess
 
+# VFIO
+SUBSYSTEM==vfio, KERNEL==vfio, TAG+=uaccess
+
 LABEL=uaccess_end

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


[systemd-devel] [PATCH] [RFCv6] Optionally save core dumps as plain files

2013-04-30 Thread Oleksii Shevchuk
Introduce configuration file: /etc/systemd/coredump.conf with
configurable uid/gid parameters, optional backends to journal
and files, per storage size limits

Default filestorage choosed as /run/log/coredump or /var/log/coredump
with next reason:
1. These files produced with systemd component
2. These files registered with journal
---
 Makefile-man.am  |   1 +
 Makefile.am  |  13 +-
 man/coredump.conf.xml| 142 ++
 src/core/manager.c   |   1 +
 src/journal/coredump-gperf.gperf |  22 ++
 src/journal/coredump.c   | 567 +++
 src/journal/coredump.conf|  15 ++
 src/journal/coredump.h   |  51 
 src/journal/journald-server.h|   2 +-
 9 files changed, 703 insertions(+), 111 deletions(-)
 create mode 100644 man/coredump.conf.xml
 create mode 100644 src/journal/coredump-gperf.gperf
 create mode 100644 src/journal/coredump.conf
 create mode 100644 src/journal/coredump.h

diff --git a/Makefile-man.am b/Makefile-man.am
index 4f14a6a..c442201 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -8,6 +8,7 @@ MANPAGES += \
man/hostname.5 \
man/journalctl.1 \
man/journald.conf.5 \
+   man/coredump.conf.5 \
man/kernel-command-line.7 \
man/kernel-install.8 \
man/locale.conf.5 \
diff --git a/Makefile.am b/Makefile.am
index 9e0f5fb..e985bb6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2881,7 +2881,8 @@ nodist_systemunit_DATA += \
units/systemd-journal-flush.service
 
 dist_pkgsysconf_DATA += \
-   src/journal/journald.conf
+   src/journal/journald.conf \
+   src/journal/coredump.conf
 
 pkgconfiglib_DATA += \
src/journal/libsystemd-journal.pc
@@ -2900,10 +2901,12 @@ EXTRA_DIST += \
src/journal/libsystemd-journal.sym \
units/systemd-journald.service.in \
units/systemd-journal-flush.service.in \
-   src/journal/journald-gperf.gperf
+   src/journal/journald-gperf.gperf \
+   src/journal/coredump-gperf.gperf
 
 CLEANFILES += \
-   src/journal/journald-gperf.c
+   src/journal/journald-gperf.c \
+   src/journal/coredump-gperf.c
 
 # 
--
 if HAVE_MICROHTTPD
@@ -2948,10 +2951,12 @@ EXTRA_DIST += \
 # 
--
 if ENABLE_COREDUMP
 systemd_coredump_SOURCES = \
-   src/journal/coredump.c
+   src/journal/coredump.c \
+   src/journal/coredump-gperf.c
 
 systemd_coredump_LDADD = \
libsystemd-journal-internal.la \
+   libsystemd-id128-internal.la \
libsystemd-label.la \
libsystemd-shared.la
 
diff --git a/man/coredump.conf.xml b/man/coredump.conf.xml
new file mode 100644
index 000..8ab92c1
--- /dev/null
+++ b/man/coredump.conf.xml
@@ -0,0 +1,142 @@
+?xml version='1.0'? !--*-nxml-*--
+?xml-stylesheet type=text/xsl 
href=http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl;?
+!DOCTYPE refentry PUBLIC -//OASIS//DTD DocBook XML V4.2//EN
+http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd;
+
+!--
+  This file is part of systemd.
+
+  Copyright 2013 Lennart Poettering
+ Oleksii Shevchuk
+
+  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/.
+--
+
+refentry id=coredump.conf
+refentryinfo
+titlecoredump.conf/title
+productnamesystemd/productname
+
+authorgroup
+author
+contribDeveloper/contrib
+firstnameLennart/firstname
+surnamePoettering/surname
+emaillenn...@poettering.net/email
+/author
+author
+contribDeveloper/contrib
+firstnameOleksii/firstname
+surnameShevchuk/surname
+emailalx...@gmail.com/email
+/author
+/authorgroup
+/refentryinfo
+
+refmeta
+refentrytitlecoredump.conf/refentrytitle
+manvolnum5/manvolnum
+/refmeta
+
+refnamediv
+refnamecoredump.conf/refname
+  

Re: [systemd-devel] [PATCH] [RFCv6] Optionally save core dumps as plain files

2013-04-30 Thread Colin Walters
Since I've been submitting minor bandaid fixes for
src/journal/coredump.c, let me say that while I haven't looked at this
patch in detail, the idea and the outlines of the code make a lot of
sense to me, and I'd be very happy if it landed.

If it needs review, I could probably do that sometime this week.  Or is
it blocked on the large binary blobs should go in the journal issue?




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


Re: [systemd-devel] [PATCH] [RFCv6] Optionally save core dumps as plain files

2013-04-30 Thread Oleksii Shevchuk
 If it needs review, I could probably do that sometime this week.  Or is
 it blocked on the large binary blobs should go in the journal issue?

I don't think it's really blocked, so I will be glad to have review :)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] udev/rules: Add default user access and permissions for vfio

2013-04-30 Thread Kay Sievers
On Tue, Apr 30, 2013 at 9:16 PM, Alex Williamson
alex.william...@redhat.com wrote:
 The /dev/vfio/vfio device file is intended to be an unprivileged
 interface.

If that is common, and not subject to system policy, the kernel driver
should request that right away, and better not rely on udev rules to
adjust that. Like it is done here:
  
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/tty_io.c#n3494

New stuff should go into udev only if it is subject of necessary
configurability or if the kernel has more use cases which should not
work that way, and therefore the kernel cannot carry out the policy on
its own.

 Only by attaching it to a group (/dev/vfio/$GROUP) does
 it allow privileged access.  The group is therefore used to grant
 access and /dev/vfio/vfio can be used by anyone.  Update the udev
 rules to provide this.

 +SUBSYSTEM==vfio, KERNEL==vfio, MODE=0666

 +SUBSYSTEM==vfio, KERNEL==vfio, TAG+=uaccess

Hmm, I don't understand, 0666 is open to anybody, all the time. What
would an additional ACL do here?

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


Re: [systemd-devel] [PATCH] udev/rules: Add default user access and permissions for vfio

2013-04-30 Thread Alex Williamson
On Tue, 2013-04-30 at 22:44 +0200, Kay Sievers wrote:
 On Tue, Apr 30, 2013 at 9:16 PM, Alex Williamson
 alex.william...@redhat.com wrote:
  The /dev/vfio/vfio device file is intended to be an unprivileged
  interface.
 
 If that is common, and not subject to system policy, the kernel driver
 should request that right away, and better not rely on udev rules to
 adjust that. Like it is done here:
   
 http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/tty_io.c#n3494
 
 New stuff should go into udev only if it is subject of necessary
 configurability or if the kernel has more use cases which should not
 work that way, and therefore the kernel cannot carry out the policy on
 its own.

Oh, I didn't notice I had control here.  Thanks, I'll fix it in the
kernel!

Alex

  Only by attaching it to a group (/dev/vfio/$GROUP) does
  it allow privileged access.  The group is therefore used to grant
  access and /dev/vfio/vfio can be used by anyone.  Update the udev
  rules to provide this.
 
  +SUBSYSTEM==vfio, KERNEL==vfio, MODE=0666
 
  +SUBSYSTEM==vfio, KERNEL==vfio, TAG+=uaccess
 
 Hmm, I don't understand, 0666 is open to anybody, all the time. What
 would an additional ACL do here?
 
 Kay



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


Re: [systemd-devel] [PATCH] python-systemd: add version number

2013-04-30 Thread Steven Hiscocks

On 30/04/13 03:33, Zbigniew Jędrzejewski-Szmek wrote:

On Tue, Apr 23, 2013 at 08:11:03PM +0100, Steven Hiscocks wrote:

From: Steven Hiscocks ste...@hiscocks.me.uk

---
Hi,

I thought it would be useful to have a version number in the python systemd 
module.

Hi,
I haven't replied to this before because of one reservation. Namely,
right now all systemd modules are independent, and could be packaged
separately, with systemd being an implicit namespace package à la
PEP 420. I think that this makes a lot of sense, since systemd itself
is composed of many loosely linked parts and and we're unlikely to
ever put any functionality in systemd package itself. But adding
systemd.__version__ and encouraging people to use it will make such
a step harder. OTOH, adding __version__ to individual packages would
definitely be worthwhile. As an additional bonus, all those packages
have compiled components, so __version__ could be added without any
sed postprocessing.

Zbyszek



Zbyszek,

That seems fair to me and I agree it would be worthwhile adding version 
numbers to the individual packages. :-)


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


[systemd-devel] Fwd: EFI boot generator failing to detect I'm actually booting on EFI

2013-04-30 Thread Léo Gillot-Lamure
Aaaah, crap, that was it : too old gummiboot, I think I was using
version 7 or 10...
Now (I've stolen a binary from f19 package because I couldn't build
it) it works and I've even got firmware time information in
systemd-analyze (a 30s spent in firmware…).

Thanks for the help and the good job !
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] zsh_completion: fix udevadm monitor flags

2013-04-30 Thread Daniel Wallace
The brackets in the _arguments description of udevadm monitor need to be
escaped.
---
 shell-completion/systemd-zsh-completion.zsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shell-completion/systemd-zsh-completion.zsh 
b/shell-completion/systemd-zsh-completion.zsh
index 73db378..5cbddfe 100644
--- a/shell-completion/systemd-zsh-completion.zsh
+++ b/shell-completion/systemd-zsh-completion.zsh
@@ -969,7 +969,7 @@ _udevadm_monitor(){
 '--kernel[Print the kernel uevents.]' \
 '--udev[Print the udev event after the rule processing.]' \
 '--property[Also print the properties of the event.]' \
-'--subsystem-match=[Filter events by subsystem[/devtype].]' \
+'--subsystem-match=[Filter events by subsystem/\[devtype\].]' \
 '--tag-match=[Filter events by property.]' \
 '--help[Print help text.]'
 }
-- 
1.8.2.2

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


[systemd-devel] [PATCH] Annotate some functions as _const_

2013-04-30 Thread Cristian Rodríguez
hexchar,unhexchar,octchar,unoctchar,decchar,undecchar are
all const functions.
---
 src/shared/util.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/shared/util.h b/src/shared/util.h
index eee66cc..eb82ff4 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -211,12 +211,12 @@ int get_process_exe(pid_t pid, char **name);
 int get_process_uid(pid_t pid, uid_t *uid);
 int get_process_gid(pid_t pid, gid_t *gid);
 
-char hexchar(int x);
-int unhexchar(char c);
-char octchar(int x);
-int unoctchar(char c);
-char decchar(int x);
-int undecchar(char c);
+char hexchar(int x) _const_;
+int unhexchar(char c) _const_;
+char octchar(int x) _const_;
+int unoctchar(char c) _const_;
+char decchar(int x) _const_;
+int undecchar(char c) _const_;
 
 char *cescape(const char *s);
 char *cunescape(const char *s);
-- 
1.8.2.1

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