chiark / gitweb /
9 years agounit: link up getty configuration from man page and unit files
Lennart Poettering [Tue, 20 Nov 2012 19:09:38 +0000 (20:09 +0100)]
unit: link up getty configuration from man page and unit files

9 years agocatalog: add mission statement
Lennart Poettering [Tue, 20 Nov 2012 01:18:47 +0000 (02:18 +0100)]
catalog: add mission statement

9 years agobuild-sys: make loadable module support optional
Tom Gundersen [Tue, 20 Nov 2012 00:24:32 +0000 (01:24 +0100)]
build-sys: make loadable module support optional

kmod is unecessary if loadable module support is disabled in the kernel,
so make the dependency optional.

9 years agobuild-sys: fix sysvcompat handling in distcheck
Tom Gundersen [Tue, 20 Nov 2012 17:19:44 +0000 (18:19 +0100)]
build-sys: fix sysvcompat handling in distcheck

Distcheck would fail due to sysvinit dir being set,
but not sysvrcnd dir:

 # ./configure --enable-gtk-doc --with-sysvrcd-path=/etc/rc.d
 # --with-sysvinit-path=/etc/rc.d
 # make distcheck
 configure: error: *** You need both --with-sysvinit-path=PATH and
--with-sysvrcd-path=PATH to enable SysV compatibility support, or both
empty to disable it.
make: *** [distcheck] Error 1

This also allows sysvcompat support to be disabled from distcheck.

9 years agoupdate TODO
Lennart Poettering [Tue, 20 Nov 2012 18:13:54 +0000 (19:13 +0100)]
update TODO

9 years agoupdate TODO
Lennart Poettering [Tue, 20 Nov 2012 18:11:55 +0000 (19:11 +0100)]
update TODO

9 years agodbus-common: Add helper method to handle no-reply messages
Colin Walters [Tue, 30 Oct 2012 19:38:32 +0000 (15:38 -0400)]
dbus-common: Add helper method to handle no-reply messages

[Tested in latest gnome-ostree; if accepted, I'll look at a followup
 patch which fixes the other dbus_connection_send(reply, ...) calls
 besides logind]

DBus messages can have a flag NO_REPLY associated that means "I don't
need a reply".  This is for efficiency reasons - for one-off requests
that can't return an error, etc.

However, it's up to users to manually check
dbus_message_get_no_reply() from a message.  libdbus will happily send
out a reply if you don't.

Unfortunately, doing so is not just less efficient - it also triggers
a security error, for complex reasons.  This is something that will
eventually be fixed in dbus, but it's also correct to handle it in
client applications.

This new helper API is slightly nicer in that you don't have to pass
NULL to say you don't want a reply serial for your reply.

This patch also tweaks logind to use the API - there are more areas of
the code that need this treatment too.

9 years agoudev: net - add device naming properties
Kay Sievers [Tue, 20 Nov 2012 17:10:45 +0000 (18:10 +0100)]
udev: net - add device naming properties

9 years agoshell-completion: udev - add net_id
Kay Sievers [Tue, 20 Nov 2012 17:08:48 +0000 (18:08 +0100)]
shell-completion: udev - add net_id

9 years agolibudev: do not resolve $attr{device} symlinks
Kay Sievers [Tue, 20 Nov 2012 17:07:57 +0000 (18:07 +0100)]
libudev: do not resolve $attr{device} symlinks

9 years agoudev: fix whitespace
Kay Sievers [Tue, 20 Nov 2012 17:07:14 +0000 (18:07 +0100)]
udev: fix whitespace

9 years agohwdb: update
Kay Sievers [Tue, 20 Nov 2012 01:07:02 +0000 (02:07 +0100)]
hwdb: update

9 years agocatalog: Spell out microseconds
Nis Martensen [Sat, 17 Nov 2012 13:40:05 +0000 (14:40 +0100)]
catalog: Spell out microseconds

Also fix some English in a German translation

9 years agojournald: fix bad memory access
Lennart Poettering [Mon, 19 Nov 2012 23:19:27 +0000 (00:19 +0100)]
journald: fix bad memory access

9 years agosocket: improve error message when we cannot spawn the socket's service unit
Lennart Poettering [Mon, 19 Nov 2012 23:19:00 +0000 (00:19 +0100)]
socket: improve error message when we cannot spawn the socket's service unit

9 years agoupdate TODO
Lennart Poettering [Mon, 19 Nov 2012 23:18:22 +0000 (00:18 +0100)]
update TODO

9 years agoupdate TODO
Lennart Poettering [Sun, 18 Nov 2012 22:32:09 +0000 (23:32 +0100)]
update TODO

9 years agocore/load-fragment: fix (potential) bad memory access
Zbigniew Jędrzejewski-Szmek [Mon, 19 Nov 2012 15:36:38 +0000 (16:36 +0100)]
core/load-fragment: fix (potential) bad memory access

strncmp() could be used with size bigger then the size of the string,
because MAX was used instead of MIN.

If failing, print just the offending mount flag.

9 years agocore/load-fragment: be more precise in error messages
Zbigniew Jędrzejewski-Szmek [Mon, 19 Nov 2012 15:02:45 +0000 (16:02 +0100)]
core/load-fragment: be more precise in error messages

Whenever a message fails, mention the offending word, instead
of just giving the whole line. If one bad word causes just this
word to be rejected, print only the word. If one bad word causes
the whole line to be rejected, print the whole line too.

9 years agoshared/utils: systemd-cgls shows 'n/a' when piping output
Anders Olofsson [Mon, 19 Nov 2012 14:25:36 +0000 (15:25 +0100)]
shared/utils: systemd-cgls shows 'n/a' when piping output

-1 was used to signal failure, but the type was unsigned.

9 years agojournalctl: add option to forgo ellipsization
Zbigniew Jędrzejewski-Szmek [Sat, 17 Nov 2012 14:27:59 +0000 (15:27 +0100)]
journalctl: add option to forgo ellipsization

Sometimes it is better to see messages in full, and the existing
set of options didn't allow this easily. E.g. now

  journalctl -f --full

will behave like

  tail -f /var/log/messages

of yore.

Long option only for now, since small letters are becoming
scarce, and this doesn't feel like a capital-letter-option.
'-u' would be nice, and the above command would be spelled

  journalctl -fu

9 years agohwdb: revert hwdb.bin back to /etc/udev
Zbigniew Jędrzejewski-Szmek [Sat, 17 Nov 2012 00:48:06 +0000 (01:48 +0100)]
hwdb: revert hwdb.bin back to /etc/udev

> Kay:
udev is early boot without /var. /var is entirely taboo for udev.

This partially reverts commit ee623f0d0c04a9c8da4953ddc29862c8c4945458
(moving hwdb.bin is reverted, but the uninstall hook and cosmetic
changes remain).

9 years agocatalog: typo fixes
Thomas Hindoe Paaboel Andersen [Sat, 17 Nov 2012 00:31:47 +0000 (01:31 +0100)]
catalog: typo fixes

9 years agoshell-completion: add catalog options
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2012 22:41:58 +0000 (23:41 +0100)]
shell-completion: add catalog options

9 years agorpm: udevadm is actually in bindir
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2012 22:19:35 +0000 (23:19 +0100)]
rpm: udevadm is actually in bindir

9 years agohwdb: use $(localstatedir)/lib/udev/hwdb.bin for the binary database
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2012 22:10:13 +0000 (23:10 +0100)]
hwdb: use $(localstatedir)/lib/udev/hwdb.bin for the binary database

It's not configuration, so it doesn't belong in udev.

Also, remove the catalog when uninstalling udev.

9 years agojournal: use $(localstatedir)/lib/systemd/catalog for the catalog
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2012 22:08:27 +0000 (23:08 +0100)]
journal: use $(localstatedir)/lib/systemd/catalog for the catalog

The path doesn't change in the standard configuration.

Also, give full path to the journalctl binary in the hook,
since it might be installed outside of $PATH.

Also, add uninstall hook to remove the binary catalog.

9 years agojournal, shared: fix warnings during compilation on 32 bits
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2012 16:17:21 +0000 (17:17 +0100)]
journal, shared: fix warnings during compilation on 32 bits

Some filesystem magics are too big to fit in 31 bits,
and are wrapped to negative. f_type is an int on 32 bits, so
it is signed, and we get a warning on comparison.

9 years agoupdate TODO
Lennart Poettering [Fri, 16 Nov 2012 19:01:50 +0000 (20:01 +0100)]
update TODO

9 years agorpm: update RPM macros to include definitions for more drop-in directories and for...
Lennart Poettering [Fri, 16 Nov 2012 18:54:19 +0000 (19:54 +0100)]
rpm: update RPM macros to include definitions for more drop-in directories and for reloading/rebuilding configuration

More specifically this adds a number of macros that resolve to
directories for udev rules, hwdb entries, tmpfiles and sysctl.

Thsi also includes three new macros for rebuilding the hwbd/catalog
index when a package drops in new files

9 years agojournal: catalog - silent output, it's usually only called by package management
Kay Sievers [Fri, 16 Nov 2012 18:34:53 +0000 (19:34 +0100)]
journal: catalog - silent output, it's usually only called by package management

9 years agoservice: drop support for SysV scripts for the early boot
Lennart Poettering [Fri, 16 Nov 2012 17:46:36 +0000 (18:46 +0100)]
service: drop support for SysV scripts for the early boot

This remove distro-specific support for early-boot SysV init scripts.
(And leaves support for normal SysV scripts untouched).

If distributions wish to continue to allow early-boot SysV scripts in
their distribution-specific way they should either maintain this patch
downstream manually, or write a generator for them, or simply ship all
those scripts with a .service wrapper.

9 years agoumount: always remount read-only before unmounting in final shutdown loop
Lennart Poettering [Fri, 16 Nov 2012 17:36:28 +0000 (18:36 +0100)]
umount: always remount read-only before unmounting in final shutdown loop

9 years agoswitch-root: try pivot_root() before overmounting /
Lennart Poettering [Fri, 16 Nov 2012 17:15:30 +0000 (18:15 +0100)]
switch-root: try pivot_root() before overmounting /

We should always try to umount the old root dir if possible, instead of
overmounting it -- if that's possible.

The initial ("first") kernel rootfs can never be umounted, hence
for the usual nitrd case we never bothered using pivot_root() and
hence with fully unmounting it. However, fedup now tranisitions twice
during boot, and in that case it is highly desirable that the "second"
root dir is entirely unmounted when we switch to the "third". This patch
makes that possible.

The pivot_root() needs a directory in the "third" root dir, to move the
"second" root dir to. We use /mnt for that, under the assumption that
this directory is likely to exist, and is not itself a mount point.

9 years agobuild-sys: udev - create hwdb with make install
Kay Sievers [Fri, 16 Nov 2012 16:58:31 +0000 (17:58 +0100)]
build-sys: udev - create hwdb with make install

9 years agohwdb: update
Kay Sievers [Fri, 16 Nov 2012 16:08:20 +0000 (17:08 +0100)]
hwdb: update

9 years agoudev: firmware - disable firmware loading when firmware file is 0 byte
Umut Tezduyar [Fri, 16 Nov 2012 16:07:19 +0000 (17:07 +0100)]
udev: firmware - disable firmware loading when firmware file is 0 byte

If firmware file is not found in the file system, udev
terminates firmware loading. This is not the case if
firmware file exists in the file system but doesn't have
any data in it.

9 years agobuild-sys: fix catalog-update-hook with older systemd
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2012 12:53:32 +0000 (13:53 +0100)]
build-sys: fix catalog-update-hook with older systemd

The hook would fail if preexisting journalctl doesn't support
--update-catalog. Also, the catalog would be updated before new
catalog files were installed. Both issues are fixed by moving to
INSTALL_DATA_HOOK instead of INSTALL_EXEC_HOOK, since the hook is now
executed after both journalctl and catalog files are installed.

9 years agobuild-sys: update catalog on installation
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2012 10:00:49 +0000 (11:00 +0100)]
build-sys: update catalog on installation

9 years agojournalctl: better error messages for --update-catalog
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2012 09:28:06 +0000 (10:28 +0100)]
journalctl: better error messages for --update-catalog

Also add informational message about catalog size.

9 years agocatalog: fix typo
Lennart Poettering [Fri, 16 Nov 2012 02:04:56 +0000 (03:04 +0100)]
catalog: fix typo

9 years agoman: link up journalctl man page with developer documenation
Lennart Poettering [Fri, 16 Nov 2012 02:04:08 +0000 (03:04 +0100)]
man: link up journalctl man page with developer documenation

9 years agojournal: recommend journalctl -x more often
Lennart Poettering [Fri, 16 Nov 2012 02:03:54 +0000 (03:03 +0100)]
journal: recommend journalctl -x more often

9 years agoupdate TODO
Lennart Poettering [Fri, 16 Nov 2012 02:03:30 +0000 (03:03 +0100)]
update TODO

9 years agocatalog: add catalog entries for all of systemd's own journal messages
Lennart Poettering [Fri, 16 Nov 2012 02:03:22 +0000 (03:03 +0100)]
catalog: add catalog entries for all of systemd's own journal messages

9 years agoupdate TODO
Lennart Poettering [Fri, 16 Nov 2012 00:36:29 +0000 (01:36 +0100)]
update TODO

9 years agojournal: extend catalog header to 64bit for all fields, just to be safe and follow...
Lennart Poettering [Fri, 16 Nov 2012 00:34:53 +0000 (01:34 +0100)]
journal: extend catalog header to 64bit for all fields, just to be safe and follow the rest of the file formats

9 years agoshutdown: readd explicit sync() when shutting down
Lennart Poettering [Fri, 16 Nov 2012 00:30:29 +0000 (01:30 +0100)]
shutdown: readd explicit sync() when shutting down

As it turns out reboot() doesn't actually imply a file system sync, but
only a disk sync. Accordingly, readd explicit sync() invocations
immediately before we invoke reboot().

This is much less dramatic than it might sounds as we umount all
disks/read-only remount them anyway before going down.

9 years agoudev: make blkid optional
Anders Olofsson [Fri, 16 Nov 2012 00:17:18 +0000 (01:17 +0100)]
udev: make blkid optional

I'm building systemd for an embedded system and we would prefer not having
to include the entire util-linux package just to get a libblkid whose
functionality we don't need.

9 years agojournal: implement message catalog
Lennart Poettering [Thu, 15 Nov 2012 22:03:31 +0000 (23:03 +0100)]
journal: implement message catalog

The message catalog can be used to attach short help texts to log lines,
keyed by their MESSAGE_ID= fields. This is useful to help the
administrator understand the context and cause of a message, find
possible solutions and find further related documentation.

Since this is keyed off MESSAGE_ID= this will only work for native
journal messages.

The message catalog supports i18n, and is useful to augment english
language system messages with explanations in the local language.

This commit only includes short explanatory messages for a few example
message IDs, we'll add more complete documentation for the relevant
systemd messages later on.

9 years agohostnamectl: fix parsing of --no-ask-password
Lennart Poettering [Thu, 15 Nov 2012 21:47:04 +0000 (22:47 +0100)]
hostnamectl: fix parsing of --no-ask-password

9 years agoUpdate TODO
Lennart Poettering [Thu, 15 Nov 2012 21:46:50 +0000 (22:46 +0100)]
Update TODO

9 years agopolkit: if PK is not around, consider this a permission denied error
Lennart Poettering [Thu, 15 Nov 2012 21:45:49 +0000 (22:45 +0100)]
polkit: if PK is not around, consider this a permission denied error

Uninstalling PK should cleanly disable PK authorization but not result
in further runtime errors.

9 years agoudev: hwdb - properly handle a missing database
Kay Sievers [Thu, 15 Nov 2012 16:30:03 +0000 (17:30 +0100)]
udev: hwdb - properly handle a missing database

On Thu, Nov 15, 2012 at 5:05 PM, Zbigniew Jędrzejewski-Szmek <> wrote:
> Something like this appeared with latest git:
> Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [364] terminated by signal 11 (Segmentation fault)
> Nov 15 16:55:46 fedora-15 [387]: Process 364 (systemd-udevd) dumped core.
> Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [364] failed while handling '/devices/virtual/net/lo'
> Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [360] terminated by signal 11 (Segmentation fault)
> Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [360] failed while handling '/devices/pci0000:00/0000:00:03.0/virtio0/net
> Nov 15 16:55:46 fedora-15 [389]: Process 360 (systemd-udevd) dumped core.
> Core was generated by usr/lib/systemd/systemd-udevd'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x0000000000423c87 in udev_hwdb_get_properties_list_entry (hwdb=0x0, modalias=0x7fffbcd155f0

9 years agodbus-manager: modernize style
Zbigniew Jędrzejewski-Szmek [Thu, 15 Nov 2012 15:30:24 +0000 (16:30 +0100)]
dbus-manager: modernize style

9 years agodbus-manager: fix a fatal dbus abort in bus_manager_message_handler()
Eelco Dolstra [Wed, 31 Oct 2012 10:53:56 +0000 (11:53 +0100)]
dbus-manager: fix a fatal dbus abort in bus_manager_message_handler()

If ListUnitFiles fails, or an OOM occurs, then dbus_message_unref()
will be called twice on "reply", causing systemd to crash.  So remove
the call to dbus_message_unref(); it is unnecessary because of
the cleanup attribute on "reply".

[zj: modified to leave one dbus_message_unref() alone, per Colin
Walters' comment.]

9 years agosched: Only setting CPUSchedulingPriority=rr doesn't work
Holger Hans Peter Freyther [Thu, 1 Nov 2012 17:48:11 +0000 (18:48 +0100)]
sched: Only setting CPUSchedulingPriority=rr doesn't work

A service that only sets the scheduling policy to round-robin
fails to be started. This is because the cpu_sched_priority is
initialized to 0 and is not adjusted when the policy is changed.

Clamp the cpu_sched_priority when the scheduler policy is set. Use
the current policy to validate the new priority.

Change the manual page to state that the given range only applies
to the real-time scheduling policies.

Add a testcase that verifies this change:

$ make test-sched-prio; ./test-sched-prio
[test/sched_idle_bad.service:6] CPU scheduling priority is out of range, ignoring: 1
[test/sched_rr_bad.service:7] CPU scheduling priority is out of range, ignoring: 0
[test/sched_rr_bad.service:8] CPU scheduling priority is out of range, ignoring: 100

9 years agojournalctl: require argument for --priority
Lekensteyn [Thu, 15 Nov 2012 11:17:03 +0000 (12:17 +0100)]
journalctl: require argument for --priority

This fixes a segfault due to a missing value for --priority. -p is
unaffected because it is specified in the getopt_long parameter list.

9 years agoman: update description of ExecStart and friends
Zbigniew Jędrzejewski-Szmek [Thu, 15 Nov 2012 14:54:17 +0000 (15:54 +0100)]
man: update description of ExecStart and friends

Semicolon separated lines are supported for all those commands,
and semicolons can now be escaped.

9 years agocore: lift restriction on order of - and @ in ExecStart
Zbigniew Jędrzejewski-Szmek [Thu, 15 Nov 2012 14:25:05 +0000 (15:25 +0100)]
core: lift restriction on order of - and @ in ExecStart

9 years agocore: interpret \; token in ExecStart as escaped ;
Oleksii Shevchuk [Sat, 3 Nov 2012 19:52:02 +0000 (21:52 +0200)]
core: interpret \; token in ExecStart as escaped ;

Some commands (like 'find') take a semicolon as separate arg. With
current parser implementation there is no way to pass one.

Patch adds token \;

9 years agotests: add tests for config_parse_exec
Zbigniew Jędrzejewski-Szmek [Thu, 15 Nov 2012 13:48:12 +0000 (14:48 +0100)]
tests: add tests for config_parse_exec

9 years agocore/load-fragment-gperf: add missing CONDITION_FILE_NOT_EMPTY
Oleksii Shevchuk [Sat, 3 Nov 2012 19:52:00 +0000 (21:52 +0200)]
core/load-fragment-gperf: add missing CONDITION_FILE_NOT_EMPTY

Unit files couldn't be properly parsed, because of
absent ConditionFileNotEmpty in load-fragment table.

9 years agocore: fix %h, %s, %p handling in templates in user session
Oleksii Shevchuk [Sat, 3 Nov 2012 19:51:59 +0000 (21:51 +0200)]
core: fix %h, %s, %p handling in templates in user session

9 years agosystemd: highlight ordering cycle deletions
Olivier Brunel [Sun, 4 Nov 2012 23:28:45 +0000 (00:28 +0100)]
systemd: highlight ordering cycle deletions

Having unit(s) removed/not started, even if it solved the issue and allowed
to boot successfully, should still be considered an error, as something
clearly isn't right.

This patch elevates the log message from warning to error, and adds a status
message to make things more obvious.

9 years agosystemctl: add help for --type/-t
Zbigniew Jędrzejewski-Szmek [Thu, 15 Nov 2012 10:54:57 +0000 (11:54 +0100)]
systemctl: add help for --type/-t

The list of types and load states if lengthy, so a little reminder
can be sometimes useful.

9 years agosystemctl: remove empty line in case of no units
Zbigniew Jędrzejewski-Szmek [Thu, 15 Nov 2012 10:39:23 +0000 (11:39 +0100)]
systemctl: remove empty line in case of no units

9 years agobuild-sys: store journald code in a noinst library
Zbigniew Jędrzejewski-Szmek [Mon, 12 Nov 2012 16:29:07 +0000 (17:29 +0100)]
build-sys: store journald code in a noinst library

The point is to allow the use of journald functions by other binaries.
Before, journald code was split into multiple files (journald-*.[ch]),
but all those files all required functions from journald.c. And
journald.c has its own main(). Now, it is possible to link against
those functions, e.g. from test binaries.

This constitutes a fix for

The patch does the following:
1. rename journald.h to journald-server.h and move corresponding code
   to journald-server.c.
2. add journald-server.c and other journald-*.c parts to
3. remove journald-syslog.c from test_journal_syslog_SOURCES, since
   it is now contained in libsystemd-journal-internal.
There are no code changes, apart from the removal of a few static's,
to allow function calls between files.

9 years agoman: throw in an example of timedatectl output
Zbigniew Jędrzejewski-Szmek [Fri, 2 Nov 2012 09:55:59 +0000 (10:55 +0100)]
man: throw in an example of timedatectl output

timedatectl is too cool not to advertise it a bit.

9 years agotimedatectl: break line to not exceed 80 columns
Zbigniew Jędrzejewski-Szmek [Wed, 14 Nov 2012 15:38:34 +0000 (16:38 +0100)]
timedatectl: break line to not exceed 80 columns

9 years agolawyerese: add header to make-directive-index
Zbigniew Jędrzejewski-Szmek [Tue, 13 Nov 2012 17:39:18 +0000 (18:39 +0100)]
lawyerese: add header to make-directive-index

9 years agoupdate TODO
Lennart Poettering [Wed, 14 Nov 2012 21:20:51 +0000 (22:20 +0100)]
update TODO

9 years agoshared: add API for replacing @FOO@ style variables in strings
Lennart Poettering [Wed, 14 Nov 2012 21:20:17 +0000 (22:20 +0100)]
shared: add API for replacing @FOO@ style variables in strings

9 years agoutil: add strreplace() to replace a substring by another string
Lennart Poettering [Wed, 14 Nov 2012 21:16:23 +0000 (22:16 +0100)]
util: add strreplace() to replace a substring by another string

9 years agospecifier: minor modernizations
Lennart Poettering [Wed, 14 Nov 2012 21:15:35 +0000 (22:15 +0100)]
specifier: minor modernizations

9 years agopolkit: fix type on comparison
Lennart Poettering [Wed, 14 Nov 2012 21:14:53 +0000 (22:14 +0100)]
polkit: fix type on comparison

9 years agoTODO
Lennart Poettering [Wed, 14 Nov 2012 21:14:17 +0000 (22:14 +0100)]

9 years agoREADME: don't list libgcrypt twice as dep
Lennart Poettering [Wed, 14 Nov 2012 21:13:54 +0000 (22:13 +0100)]
README: don't list libgcrypt twice as dep

9 years fix FTBFS with new glibc
Michal Schmidt [Wed, 14 Nov 2012 13:44:05 +0000 (14:44 +0100)] fix FTBFS with new glibc

glibc moved clock_* functions from librt to the core libc. As a result,
clock_gettime is no more a suitable symbol to use when finding librt.
Look for mq_open instead.

Fixes a FTBFS in Fedora Rawhide.

9 years agodelta.c: fix option '-t'
Thomas Hindoe Paaboel Andersen [Tue, 13 Nov 2012 23:18:02 +0000 (00:18 +0100)]
delta.c: fix option '-t'

Both the help and man page claims that it accepts -t with an argument
so let's do that.

9 years agodelta.c: use _cleanup_
Thomas Hindoe Paaboel Andersen [Tue, 13 Nov 2012 22:45:41 +0000 (23:45 +0100)]
delta.c: use _cleanup_

9 years agopython: add journal backend for the logging framework
Marti Raudsepp [Tue, 9 Oct 2012 15:12:02 +0000 (18:12 +0300)]
python: add journal backend for the logging framework

Supports Python versions 2.6 through 3.3 (tested on 2.7 and 3.2).
See JournalHandler docstring for usage details.

[zj: - use send() instead of using sendv() directly
     - do exception handling like in the logging module
     - bumped min version to python2.6, since the module
       does not work with python2.5 anyway ]

9 years agosystemd-python: use python${PYTHON_VERSION}-config as python-config
Zbigniew Jędrzejewski-Szmek [Thu, 1 Nov 2012 07:58:13 +0000 (08:58 +0100)]
systemd-python: use python${PYTHON_VERSION}-config as python-config

This is the usual setup, where pythonX.Y and pythonX.Y-config go
together. Using python-config with python3 will only lead to

--libs is changed to --ldflags, since the latter also includes other
required flags like -L<dir>.

The tests for HAVE_PYTHON and HAVE_PYTHON_DEVEL are separated. It is
possible to have python development libraries installed without the
binary (or to want to build python modules without using python during
the build).

A line is added to the output, to show what flags will be used for

9 years agosystemd-analyze: use argparse instead of getopt
Zbigniew Jędrzejewski-Szmek [Sat, 3 Nov 2012 17:26:28 +0000 (18:26 +0100)]
systemd-analyze: use argparse instead of getopt

Makes the output way nicer with shorter code. Also brings
systemd-analyze behaviour more in line with other systemd-programs.

Argparse is in Python since 2.6, and is available as a package for
previous versions, if someone is stuck with very old Python.

9 years agosystemd-python: fix nesting of #ifs and #pragmas
Zbigniew Jędrzejewski-Szmek [Wed, 31 Oct 2012 23:10:47 +0000 (00:10 +0100)]
systemd-python: fix nesting of #ifs and #pragmas

9 years agoshared/socket-util: kill gcc warning about uninitialized variable
Zbigniew Jędrzejewski-Szmek [Wed, 31 Oct 2012 20:44:54 +0000 (21:44 +0100)]
shared/socket-util: kill gcc warning about uninitialized variable

The warning was invalid, but distracting.

9 years agoudev: properly handle symlink removal by 'change' event
Kay Sievers [Tue, 13 Nov 2012 01:05:06 +0000 (02:05 +0100)]
udev: properly handle symlink removal by 'change' event

If a 'change' event is supposed to remove created symlinks, we create
a new device structure from the sysfs device and fill it with the list
of links, to compute the delta of the old and new list of links to apply.
If the device is already 'remove'd by the kernel though, udev fails to
create the device structure, so the links are not removed properly.

> From: Neil Brown <>
> Date: Thu, 8 Nov 2012 10:39:06 +0100
> Subject: [PATCH] If a 'change' event does not get handled by udev until
> after the device has subsequently disappeared, udev mis-handles
> it. This can happen with 'md' devices which emit a change
> event and then a remove event when they are stopped. It is
> normally only noticed if udev is very busy (lots of arrays
> being stopped at once) or the machine is otherwise loaded
> and reponding slowly.
> There are two problems.
> 1/ udev_device_new_from_syspath() will refuse to create the device
>    structure if the device does not exist in /sys, and particularly if
>    the uevent file does not exist.
>    If a 'db' file does exist, that is sufficient evidence that the device
>    is genuine and should be created.  Equally if we have just received an
>    event from the kernel about the device, it must be real.
>    This patch just disabled the test for the 'uevent' file, it doesn't
>    try imposing any other tests - it isn't clear that they are really
>    needed.
> 2/ udev_event_execute_rules() calls udev_device_read_db() on a 'device'
>    structure that is largely uninitialised and in particular does not
>    have the 'subsystem' set.  udev_device_read_db() needs the subsystem
>    so it tries to read the 'subsystem' symlink out of sysfs.  If the
>    device is already deleted, this naturally fails.
>    udev_event_execute_rules() knows the subsystem (as it was in the
>    event message) so this patch simply sets the subsystem for the device
>    structure to be loaded to match the subsystem of the device structure
>    that is handling the event.
> With these two changes, deleted handling of change events will still
> correctly remove any symlinks that are not needed any more.

Use udev_device_new() instead of allowing udev_device_new_from_syspath()
to proceed without a sysfs device.

9 years agolibudev: avoid leak during realloc failure
Mauro Dreissig [Mon, 12 Nov 2012 00:07:51 +0000 (22:07 -0200)]
libudev: avoid leak during realloc failure

9 years agoremove duplicate semicolons
Thomas Hindoe Paaboel Andersen [Mon, 12 Nov 2012 21:37:20 +0000 (22:37 +0100)]
remove duplicate semicolons

9 years agosystemd-delta.xml: document default value for --diff
Thomas Hindoe Paaboel Andersen [Mon, 12 Nov 2012 21:34:47 +0000 (22:34 +0100)]
systemd-delta.xml: document default value for --diff

9 years agoutil: nicer tree drawings
Michal Schmidt [Mon, 12 Nov 2012 21:27:48 +0000 (22:27 +0100)]
util: nicer tree drawings

Draw trees more similar to pstree/findmnt/lsblk/...

9 years agoenable localization for common *ctl commands
Dave Reisner [Mon, 12 Nov 2012 19:16:07 +0000 (14:16 -0500)]
enable localization for common *ctl commands

9 years agouse the same email address everywhere
Kay Sievers [Mon, 12 Nov 2012 18:36:23 +0000 (19:36 +0100)]
use the same email address everywhere

9 years agolibudev: update copyright headers
Kay Sievers [Mon, 12 Nov 2012 16:50:33 +0000 (17:50 +0100)]
libudev: update copyright headers

9 years agoTODO: update
Kay Sievers [Sun, 11 Nov 2012 19:47:15 +0000 (20:47 +0100)]
TODO: update

9 years agoudev: use usec_t and now()
Kay Sievers [Sun, 11 Nov 2012 19:45:05 +0000 (20:45 +0100)]
udev: use usec_t and now()

9 years agoman/sd-id128.xml: typo fix
Holger Hans Peter Freyther [Sun, 11 Nov 2012 20:36:21 +0000 (21:36 +0100)]
man/sd-id128.xml: typo fix

9 years agotimedatectl: properly print 30 minutes DST transitions
Kay Sievers [Sun, 11 Nov 2012 15:55:25 +0000 (16:55 +0100)]
timedatectl: properly print 30 minutes DST transitions

9 years agocoredumpctl: add missing -F, --field option to help
Dave Reisner [Fri, 9 Nov 2012 19:14:53 +0000 (14:14 -0500)]
coredumpctl: add missing -F, --field option to help

9 years agobash-completion: add 'gdb' verb for coredumpctl
Dave Reisner [Fri, 9 Nov 2012 17:51:24 +0000 (12:51 -0500)]
bash-completion: add 'gdb' verb for coredumpctl

This also fixes value completion for journal fields, as the completion
for the RHS of the '=' was missing when it was borrowed from journalctl.