chiark / gitweb /
elogind.git
5 years agobus: add sd_bus_emit_object_{added/removed}()
David Herrmann [Tue, 30 Dec 2014 10:37:35 +0000 (11:37 +0100)]
bus: add sd_bus_emit_object_{added/removed}()

This implements two new helpers, discussed on systemd-devel about 1 year
ago:
    sd_bus_emit_object_added()
    sd_bus_emit_object_removed()

Both calls are equivalent to their respective counterpart
sd_bus_emit_interfaces_{added/removed}(), but can figure out the list of
interfaces themselves, instead of requiring the caller to provide them.
Furthermore, both calls properly deal with builtin interfaces provided via
org.freedesktop.DBus.* and alike.

Both calls simply traverse a node and all its parent nodes to figure out a
list of all interfaces registered as vtable or fallback. It then appends
each of them, similar to the interfaces_{added/removed}() helpers.

Note that interfaces_{added/removed}() runs a parent traversal for *each*
passed interface. Therefore, it can simply bail out, once it found a
parent node that implements a given interface.
With object_{added/removed}() we cannot know the registered interfaces in
advance, thus, we cannot run one traversal per node. Instead, we run a
single traversal and remember all interfaces that we added. Therefore, a
child-interface overrides all conflicting parent-interfaces. We keep a
"Set *s" context to track those while climbing up the tree.

5 years agobus: fix capabilities on big-endian
David Herrmann [Tue, 30 Dec 2014 08:09:41 +0000 (09:09 +0100)]
bus: fix capabilities on big-endian

The kernel provides capabilities as a u32 array, sd-bus uses an u8 array.
This works fine on little-endian as both are encoded the same way.
However, this fails on big-endian if we do not perform sufficient
byte-swapping on each u32 entry.

This patch makes sd-bus use u32, too. We avoid changing any kernel
provided data so we can keep pointing into kdbus pool buffers which
contain u32 arrays.

5 years agobus: drop creds->capability_size
David Herrmann [Tue, 30 Dec 2014 07:42:53 +0000 (08:42 +0100)]
bus: drop creds->capability_size

The number of available caps can be read from
/proc/sys/kernel/cap_last_cap during runtime. Our helper cap_last_cap()
does that, so there's no reason to remember the size of any capability
cache. We can just pre-allocate arrays with a suitable size for all
available caps and reject any higher caps.

The kernel capability API uses u32 as base so make sure we do the same.
Note that this is specified by POSIX, so it's unlikely to change.

5 years agomacro: add DIV_ROUND_UP()
David Herrmann [Mon, 29 Dec 2014 16:51:36 +0000 (17:51 +0100)]
macro: add DIV_ROUND_UP()

This macro calculates A / B but rounds up instead of down. We explicitly
do *NOT* use:
        (A + B - 1) / A
as it suffers from an integer overflow, even though the passed values are
properly tested against overflow. Our test-cases show this behavior.

Instead, we use:
        A / B + !!(A % B)

Note that on "Real CPUs" this does *NOT* result in two divisions. Instead,
instructions like idivl@x86 provide both, the quotient and the remainder.
Therefore, both algorithms should perform equally well (I didn't verify
this, though).

5 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Mon, 29 Dec 2014 19:47:04 +0000 (20:47 +0100)]
hwdb: Update database of Bluetooth company identifiers

5 years agoupdate TODO
Lennart Poettering [Mon, 29 Dec 2014 19:18:04 +0000 (20:18 +0100)]
update TODO

5 years agoRevert "machined: don't force terminate registered machines"
Lennart Poettering [Mon, 29 Dec 2014 19:00:01 +0000 (20:00 +0100)]
Revert "machined: don't force terminate registered machines"

This reverts commit 206e7a5f7b55ac61188efd895e65ab26e478cbb2.

We actually want to allow shutting down containers that use
RegisterMachine() rather than CreateMachine() to register their own
unit. It should be safe to do so, since the primary usecase for
RegisterMachine() are container managers that run only a single
container within their own unit, such as systemd-nspawn.

5 years agomachined: ignore spurious error
Lennart Poettering [Mon, 29 Dec 2014 18:08:50 +0000 (19:08 +0100)]
machined: ignore spurious error

5 years agonspawn: report back to systemd only very late whether we are OK
Lennart Poettering [Mon, 29 Dec 2014 16:54:04 +0000 (17:54 +0100)]
nspawn: report back to systemd only very late whether we are OK

That way, systemd can actually figure out if everything is OK with
nspawn.

5 years agopreset: enable machines.target by default
Lennart Poettering [Mon, 29 Dec 2014 16:36:57 +0000 (17:36 +0100)]
preset: enable machines.target by default

5 years agoUpdate TODO
Lennart Poettering [Mon, 29 Dec 2014 13:06:25 +0000 (14:06 +0100)]
Update TODO

5 years agomachinectl: add "enable" and "disable" verbs for enabling/disabling systemd-nspawn...
Lennart Poettering [Mon, 29 Dec 2014 13:05:17 +0000 (14:05 +0100)]
machinectl: add "enable" and "disable" verbs for enabling/disabling systemd-nspawn for containers

This is basically just a shortcut for "systemctl enable
systemd-nspawn@<foobar>.service", but does escaping.

5 years agomachinectl: add new "start" verb to start a container as a service in nspawn
Lennart Poettering [Mon, 29 Dec 2014 11:41:26 +0000 (12:41 +0100)]
machinectl: add new "start" verb to start a container as a service in nspawn

5 years agounits: rework systemd-nspawn@.service unit
Lennart Poettering [Mon, 29 Dec 2014 11:38:26 +0000 (12:38 +0100)]
units: rework systemd-nspawn@.service unit

- Unescape instance name so that we can take almost anything as instance
  name.

- Introduce "machines.target" which consists of all enabled nspawns and
  can be used to start/stop them altogether

- Look for container directory using -M instead of harcoding the path in
  /var/lib/container

5 years agounits: make graphical.target dependencies more complete and similar to those of multi...
Lennart Poettering [Mon, 29 Dec 2014 11:34:50 +0000 (12:34 +0100)]
units: make graphical.target dependencies more complete and similar to those of multi-user.target

5 years agobus-proxy: fix sd_bus_reply_*() usage
David Herrmann [Mon, 29 Dec 2014 14:43:57 +0000 (15:43 +0100)]
bus-proxy: fix sd_bus_reply_*() usage

We *must* not use sd_bus_reply_*() as it does not set the sender field
correctly. Use the synthetic_reply_*() helpers instead!

5 years agocapability: use /proc/sys/kernel/cap_last_cap
David Herrmann [Mon, 29 Dec 2014 12:24:35 +0000 (13:24 +0100)]
capability: use /proc/sys/kernel/cap_last_cap

This file was introduced with linux-3.2, use it instead of probing for it
via prctl(PR_CAPBSET_READ).

For now, keep the old code for backwards compat. We can drop it once 3.2
is our lowest requirement.

The test-cap-list code is extended to verify cap_last_cap() is the same as
we'd get via prctl probing and /proc.

5 years agocore: loopback - correctly fail the loopback_check if somehow the rtnl calls fail
Tom Gundersen [Mon, 29 Dec 2014 12:05:45 +0000 (13:05 +0100)]
core: loopback - correctly fail the loopback_check if somehow the rtnl calls fail

5 years agobus: fix typo
David Herrmann [Tue, 23 Dec 2014 16:10:54 +0000 (17:10 +0100)]
bus: fix typo

Drop spurious 'we'.

5 years agortnl: recv_message - don't enforce sender uid
Tom Gundersen [Mon, 29 Dec 2014 01:18:21 +0000 (02:18 +0100)]
rtnl: recv_message - don't enforce sender uid

All we care about is that the kernel (pid==0) sent the message. Verifying the sender uid
seems to break when using userns.

Reported by Stéphane Graber.

5 years agotest: loopback - parse logging env var
Tom Gundersen [Mon, 29 Dec 2014 00:58:25 +0000 (01:58 +0100)]
test: loopback - parse logging env var

5 years agosd-rtnl: rtnl_call - don't dispatch wqueue after timeout has passed
Tom Gundersen [Mon, 29 Dec 2014 00:54:04 +0000 (01:54 +0100)]
sd-rtnl: rtnl_call - don't dispatch wqueue after timeout has passed

Only a minor change as the timeout would be hit soon thereafetr at the next loop.

5 years agosd-rtnl: rtnl_poll - fix typo
Tom Gundersen [Mon, 29 Dec 2014 00:50:07 +0000 (01:50 +0100)]
sd-rtnl: rtnl_poll - fix typo

This caused rtnl_poll to always return true immediately in sd_rtnl_call().

5 years agosd-rtnl: recv_message - drop message when peeking fails
Tom Gundersen [Sun, 28 Dec 2014 23:24:00 +0000 (00:24 +0100)]
sd-rtnl: recv_message - drop message when peeking fails

Read the message form the socket or we will loop trying to read the
same message repeatedly.

5 years agosd-rtnl: recv_message - don't fail on interrupt
Tom Gundersen [Mon, 29 Dec 2014 00:49:06 +0000 (01:49 +0100)]
sd-rtnl: recv_message - don't fail on interrupt

We should just try again instead.

5 years agosd-rtnl: recv_message - log when dropping message
Tom Gundersen [Sun, 28 Dec 2014 23:19:36 +0000 (00:19 +0100)]
sd-rtnl: recv_message - log when dropping message

We drop messages received from the wrong uid/pid, log this at debug level.

5 years agocore: loopback - simplify check_loopback()
Tom Gundersen [Sun, 28 Dec 2014 12:38:23 +0000 (13:38 +0100)]
core: loopback - simplify check_loopback()

We no longer configure the addresses on the loopback interface, but simply bring it up
and let the kernel do the rest. Also change the check to only check if the interface
is up, rather than checking for the IPv4 loopback address.

5 years agomachined: Fix MarkReadOnly method's name on bus
Sylvain Plantefève [Sun, 28 Dec 2014 11:52:15 +0000 (12:52 +0100)]
machined: Fix MarkReadOnly method's name on bus

5 years agolibsystemd: Fix minor typo in comment
Sylvain Plantefève [Sun, 28 Dec 2014 11:52:14 +0000 (12:52 +0100)]
libsystemd: Fix minor typo in comment

5 years agomachined: don't look for images on each property get, but cache the image object...
Lennart Poettering [Sun, 28 Dec 2014 01:44:37 +0000 (02:44 +0100)]
machined: don't look for images on each property get, but cache the image object inbetween

5 years agoupdate TODO
Lennart Poettering [Sat, 27 Dec 2014 16:45:30 +0000 (17:45 +0100)]
update TODO

5 years agoutil: treat -1 as special size in format_bytes()
Lennart Poettering [Sun, 28 Dec 2014 01:07:32 +0000 (02:07 +0100)]
util: treat -1 as special size in format_bytes()

5 years agomachined: add support for reporting image size via btrfs quota
Lennart Poettering [Sun, 28 Dec 2014 01:05:28 +0000 (02:05 +0100)]
machined: add support for reporting image size via btrfs quota

5 years agotmpfiles.d: upgrade a couple of directories we create at boot to subvolumes
Lennart Poettering [Sat, 27 Dec 2014 17:47:17 +0000 (18:47 +0100)]
tmpfiles.d: upgrade a couple of directories we create at boot to subvolumes

In particular we upgrade /var/lib/container, /var/tmp and /tmp to
subvolumes.

5 years agotmpfiles: add new line type 'v' for creating btrfs subvolumes
Lennart Poettering [Sat, 27 Dec 2014 17:46:36 +0000 (18:46 +0100)]
tmpfiles: add new line type 'v' for creating btrfs subvolumes

5 years agomachinectl/machined: implement "rename", "clone", "read-only" verbs for machine images
Lennart Poettering [Sat, 27 Dec 2014 16:44:04 +0000 (17:44 +0100)]
machinectl/machined: implement "rename", "clone", "read-only" verbs for machine images

5 years agomachined: add "machinectl remove" for removing images
Lennart Poettering [Sat, 27 Dec 2014 01:35:47 +0000 (02:35 +0100)]
machined: add "machinectl remove" for removing images

5 years agonspawn: use the same image discovery logic in nspawn as in machined
Lennart Poettering [Sat, 27 Dec 2014 01:07:29 +0000 (02:07 +0100)]
nspawn: use the same image discovery logic in nspawn as in machined

5 years agomachined: Move image discovery logic into src/shared, so that we can make use of...
Lennart Poettering [Sat, 27 Dec 2014 00:57:03 +0000 (01:57 +0100)]
machined: Move image discovery logic into src/shared, so that we can make use of it from nspawn

5 years agoFix check_loopback()
Stéphane Graber [Sat, 27 Dec 2014 18:17:39 +0000 (19:17 +0100)]
Fix check_loopback()

Add missing htonl() so that check_loopback() actually tests for 127.0.0.1
instead of 1.0.0.127 on little-endian machines.

5 years agologinctl: reindent --help text
Lennart Poettering [Fri, 26 Dec 2014 19:10:01 +0000 (20:10 +0100)]
loginctl: reindent --help text

5 years agologinctl: add more --help sections
Lennart Poettering [Fri, 26 Dec 2014 19:09:21 +0000 (20:09 +0100)]
loginctl: add more --help sections

5 years agomachinectl: add status commands
Lennart Poettering [Fri, 26 Dec 2014 19:09:04 +0000 (20:09 +0100)]
machinectl: add status commands

5 years agomachined: fix search patch magic for '.host' image
Lennart Poettering [Fri, 26 Dec 2014 19:05:11 +0000 (20:05 +0100)]
machined: fix search patch magic for '.host' image

5 years agomachined: make image read-only check indepenednt on own privs
Lennart Poettering [Fri, 26 Dec 2014 18:36:25 +0000 (19:36 +0100)]
machined: make image read-only check indepenednt on own privs

5 years agomachinectl: mark read-only images when listing in red
Lennart Poettering [Fri, 26 Dec 2014 18:32:55 +0000 (19:32 +0100)]
machinectl: mark read-only images when listing in red

5 years agoupdate TODO
Lennart Poettering [Fri, 26 Dec 2014 16:11:03 +0000 (17:11 +0100)]
update TODO

5 years agoimport: make image root directory configurable, instead of hardcoding /var/lib/container
Lennart Poettering [Fri, 26 Dec 2014 18:21:09 +0000 (19:21 +0100)]
import: make image root directory configurable, instead of hardcoding /var/lib/container

5 years agomachined: when discovering images, implicitly add ".host" as pseudo image referring...
Lennart Poettering [Fri, 26 Dec 2014 17:59:26 +0000 (18:59 +0100)]
machined: when discovering images, implicitly add ".host" as pseudo image referring to the host's own directory tree

5 years agomachined: fix image search path iteration
Lennart Poettering [Fri, 26 Dec 2014 17:19:47 +0000 (18:19 +0100)]
machined: fix image search path iteration

5 years agomachined: let's also check machine directories in /usr and /usr/local
Lennart Poettering [Fri, 26 Dec 2014 17:19:22 +0000 (18:19 +0100)]
machined: let's also check machine directories in /usr and /usr/local

5 years agoimport: properly remove pre-existing images if --force is used
Lennart Poettering [Fri, 26 Dec 2014 17:18:47 +0000 (18:18 +0100)]
import: properly remove pre-existing images if --force is used

5 years agoimport: beef up gpt importer to optionally make writable copy of read-only vendor...
Lennart Poettering [Fri, 26 Dec 2014 16:10:31 +0000 (17:10 +0100)]
import: beef up gpt importer to optionally make writable copy of read-only vendor image

5 years agoimport: minor improvements to dkr importer
Lennart Poettering [Fri, 26 Dec 2014 16:10:05 +0000 (17:10 +0100)]
import: minor improvements to dkr importer

5 years agoutil: always override crtime xattr
Lennart Poettering [Fri, 26 Dec 2014 16:03:01 +0000 (17:03 +0100)]
util: always override crtime xattr

5 years agomachinectl: left-align times
Lennart Poettering [Fri, 26 Dec 2014 16:01:00 +0000 (17:01 +0100)]
machinectl: left-align times

5 years agocopy: try top copy atime/time/xattrs when copying files
Lennart Poettering [Fri, 26 Dec 2014 16:00:39 +0000 (17:00 +0100)]
copy: try top copy atime/time/xattrs when copying files

5 years agotest: improve btrfs test case
Lennart Poettering [Fri, 26 Dec 2014 15:59:53 +0000 (16:59 +0100)]
test: improve btrfs test case

5 years agomachined: be more thorough when checking whether an image is writable or not
Lennart Poettering [Fri, 26 Dec 2014 15:44:15 +0000 (16:44 +0100)]
machined: be more thorough when checking whether an image is writable or not

5 years agojournald: always allocate space for object fields
Zbigniew Jędrzejewski-Szmek [Fri, 26 Dec 2014 14:02:01 +0000 (09:02 -0500)]
journald: always allocate space for object fields

If OBJECT_PID= came as the last field, we would not reallocate the iovec to bigger size,
and fail the assertion later on in dispatch_message_real().

5 years agojournald: fix off by one in native transport
Zbigniew Jędrzejewski-Szmek [Fri, 26 Dec 2014 13:34:18 +0000 (08:34 -0500)]
journald: fix off by one in native transport

https://bugzilla.redhat.com/show_bug.cgi?id=1177184

5 years agohwdb: mouse - add Razer Abyssus
Tom Gundersen [Thu, 25 Dec 2014 23:20:48 +0000 (00:20 +0100)]
hwdb: mouse - add Razer Abyssus

5 years agoman: mark hwdb related man pages as conditional
Michael Biebl [Thu, 25 Dec 2014 23:04:19 +0000 (00:04 +0100)]
man: mark hwdb related man pages as conditional

Follow-up fix for commit fe659612e40e6a0cf91a73b10aa45eea958b747e.

5 years agoman: typo in sd_watchdog_enabled notes
Manuel Mendez [Thu, 25 Dec 2014 16:59:08 +0000 (11:59 -0500)]
man: typo in sd_watchdog_enabled notes

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

5 years agotest: wait for cloned thread to exit
Filipe Brandenburger [Thu, 25 Dec 2014 16:40:46 +0000 (11:40 -0500)]
test: wait for cloned thread to exit

In test_raw_clone, make sure the cloned thread calls _exit() and in the parent
thread call waitpid(..., __WCLONE) to wait for the child thread to terminate,
otherwise there is a race condition where the child thread will log to the
console after the test process has already exited and the assertion from the
child thread might not be enforced.

The absence of this patch might also create problems for other tests that would
be added after this one, since potentially both parent and child would run
those tests as the child would continue running.

Tested by confirming that the logs from the child are printed before the test
terminates and that a false assertion in the child aborts the test with a core
dump.

[zj: also add check for the return value.]

5 years agotest: only use assert_se in test_raw_clone
Filipe Brandenburger [Tue, 23 Dec 2014 18:14:46 +0000 (10:14 -0800)]
test: only use assert_se in test_raw_clone

The asserts used in the tests should never be allowed to be optimized away.

5 years agoconfigure.ac: keep posix compat for string tests
Dave Reisner [Thu, 25 Dec 2014 16:41:06 +0000 (11:41 -0500)]
configure.ac: keep posix compat for string tests

'==' and '=' are equivalent in /bin/bash, but POSIX compliant shells do
not understand '==.'

5 years agoman: add a note why %U,%h,%s are mostly useless
Zbigniew Jędrzejewski-Szmek [Thu, 25 Dec 2014 16:12:54 +0000 (11:12 -0500)]
man: add a note why %U,%h,%s are mostly useless

The reasons were already given in the description of %U, but the
are easy to overlook, and it's better to be explicit to avoid
confusion.

5 years agorun: uninitialized variable
Zbigniew Jędrzejewski-Szmek [Thu, 25 Dec 2014 15:52:38 +0000 (10:52 -0500)]
run: uninitialized variable

5 years agoata_id: remove temp variable to kill warning
Zbigniew Jędrzejewski-Szmek [Thu, 25 Dec 2014 15:44:34 +0000 (10:44 -0500)]
ata_id: remove temp variable to kill warning

src/udev/ata_id/ata_id.c:503:24: warning: assignment from incompatible pointer type
         identify_words = &identify.wyde;
                        ^

5 years agoata_id: modernize
Zbigniew Jędrzejewski-Szmek [Thu, 25 Dec 2014 15:42:23 +0000 (10:42 -0500)]
ata_id: modernize

5 years agopam_systemd: remove spurious include of <sys/capability.h>
Filipe Brandenburger [Tue, 23 Dec 2014 18:38:48 +0000 (10:38 -0800)]
pam_systemd: remove spurious include of <sys/capability.h>

It does not use any functions or constants from libcap directly.

Tested that "pam_systemd.la" builds cleanly and works after this change.

5 years agotimedated: remove spurious include of <sys/capability.h>
Filipe Brandenburger [Tue, 23 Dec 2014 18:38:47 +0000 (10:38 -0800)]
timedated: remove spurious include of <sys/capability.h>

It does not use any functions from libcap directly. The CAP_SYS_TIME constant
in use by this file comes from <linux/capability.h> imported through "missing.h".

Tested that "systemd-timedated" builds cleanly and works after this change.

5 years agolocaled: remove spurious include of <sys/capability.h>
Filipe Brandenburger [Tue, 23 Dec 2014 18:38:46 +0000 (10:38 -0800)]
localed: remove spurious include of <sys/capability.h>

It does not use any functions from libcap directly. The CAP_SYS_ADMIN constant
in use by this file comes from <linux/capability.h> imported through "missing.h".

Tested that "systemd-localed" builds cleanly and works after this change.

5 years agobus: remove spurious include of <sys/capability.h>
Filipe Brandenburger [Tue, 23 Dec 2014 18:38:50 +0000 (10:38 -0800)]
bus: remove spurious include of <sys/capability.h>

They do not use any functions from libcap directly. The CAP_SYS_ADMIN constant
in use by bus-objects.c comes from <linux/capability.h> imported through
"missing.h". The "missing.h" header is imported through "util.h" which gets
imported in "bus-util.h".

Tested that everything builds cleanly after this change.

5 years agomachined: remove spurious include of <sys/capability.h>
Filipe Brandenburger [Tue, 23 Dec 2014 18:38:49 +0000 (10:38 -0800)]
machined: remove spurious include of <sys/capability.h>

They do not use any functions from libcap directly. The CAP_KILL constant in
use by these files comes from <linux/capability.h> imported through
"missing.h".

Tested that "systemd-machined" builds cleanly and works after this change.

5 years agohostnamed: remove spurious include of <sys/capability.h>
Filipe Brandenburger [Tue, 23 Dec 2014 18:38:45 +0000 (10:38 -0800)]
hostnamed: remove spurious include of <sys/capability.h>

It does not use any functions from libcap directly. The CAP_SYS_ADMIN constant
in use by this file comes from <linux/capability.h> imported through "missing.h".

Tested that "systemd-hostnamed" builds cleanly and works after this change.

5 years agotmpfiles: remove spurious include of <sys/capability.h>
Filipe Brandenburger [Tue, 23 Dec 2014 18:38:44 +0000 (10:38 -0800)]
tmpfiles: remove spurious include of <sys/capability.h>

It does not use any functions from libcap directly. The CAP_MKNOD constant in
use by this file comes from <linux/capability.h> imported through "missing.h".

Tested that "systemd-tmpfiles" builds cleanly and works after this change.

5 years agologind: remove spurious include of <sys/capability.h>
Filipe Brandenburger [Tue, 23 Dec 2014 18:38:43 +0000 (10:38 -0800)]
logind: remove spurious include of <sys/capability.h>

They do not use any functions from libcap directly. The CAP_* constants in use
through these files come from "missing.h" which will import <linux/capability.h>
and complement it with CAP_* constants not defined by the current kernel
headers. The "missing.h" header is imported through "util.h" which gets
imported in "logind.h".

Tested that "systemd-logind" builds cleanly and works after this change.

5 years agonspawn: remove spurious include of <sys/capability.h>
Filipe Brandenburger [Tue, 23 Dec 2014 18:38:42 +0000 (10:38 -0800)]
nspawn: remove spurious include of <sys/capability.h>

It does not use any functions from libcap directly. The CAP_* constants in use
through this file come from "missing.h" which will import <linux/capability.h>
and complement it with CAP_* constants not defined by the current kernel
headers.

Add an explicit import of our "capability.h" since it does use the function
capability_bounding_set_drop from that header file. Previously, that header was
implicitly imported through through "cap-list.h".

Tested that "systemd-nspawn" builds cleanly and works after this change.

5 years agodoc: os-release: mention all shell characters that must be escaped
Mantas Mikulėnas [Wed, 24 Dec 2014 12:46:20 +0000 (14:46 +0200)]
doc: os-release: mention all shell characters that must be escaped

Since the manpage already talks about shell-compatibility, it should be
more accurate about what needs to be escaped and how.

5 years agobuild-sys: remove references to dbusinterfacedir
Filipe Brandenburger [Tue, 23 Dec 2014 18:59:15 +0000 (10:59 -0800)]
build-sys: remove references to dbusinterfacedir

This directory is not used by systemd.

Tested by running a full build, running `make install` and comparing the file
list in the target trees and making sure that `make distcheck` still works.

5 years agobuild-sys: do not use pkgconfig dbus-1.pc to find dbus directories
Filipe Brandenburger [Tue, 23 Dec 2014 18:59:14 +0000 (10:59 -0800)]
build-sys: do not use pkgconfig dbus-1.pc to find dbus directories

Do not use the dbus-1.pc pkgconfig settings to determine dbus directories. Use
directories relative to ${sysconfdir} and ${datadir} instead.

This approach was suggested by Simon McVittie in:
http://lists.freedesktop.org/archives/systemd-devel/2014-October/024388.html

Tested by building and installing systemd without the dbus-devel installed.
Without this patch, the dbus files and directories end up in the root of the
filesystem. With this patch, they end up in the same locations as previously
(assuming default ${sysconfdir} and ${datadir}) whether dbus-devel is present
or not. Also made sure that `make check` works without dbus-devel installed.

5 years agotimesync: remove square(), use pow instead
Cristian Rodríguez [Tue, 23 Dec 2014 20:52:51 +0000 (17:52 -0300)]
timesync: remove square(), use pow instead

In any case, the compiler generates the same code inline and never
actually calls the library function.

5 years agotest: do not use last cap from kernel in test-cap-list
Filipe Brandenburger [Tue, 23 Dec 2014 21:51:40 +0000 (13:51 -0800)]
test: do not use last cap from kernel in test-cap-list

The new test-cap-list introduced in commit 2822da4fb7f891 uses the included
table of capabilities. However, it uses cap_last_cap() which probes the kernel
for the last available capability. On an older kernel (e.g. 3.10 from RHEL 7)
that causes the test to fail with the following message:

    Assertion '!capability_to_name(cap_last_cap()+1)' failed at src/test/test-cap-list.c:30, function main(). Aborting.

Fix it by exporting the size of the static table and using it in the test
instead of the dynamic one from the current kernel.

Tested by successfully running ./test-cap-list and the whole `make check` test
suite with this patch on a RHEL 7 host.

5 years agoudev: fix another strict aliasing issue
Shawn Paul Landden [Tue, 23 Dec 2014 23:04:37 +0000 (15:04 -0800)]
udev: fix another strict aliasing issue

5 years agolibudev: fix strict aliasing violation
Shawn Paul Landden [Tue, 23 Dec 2014 23:04:36 +0000 (15:04 -0800)]
libudev: fix strict aliasing violation

5 years agobuild-sys: update path in reference to sd-lldp.h
Filipe Brandenburger [Tue, 23 Dec 2014 23:03:21 +0000 (15:03 -0800)]
build-sys: update path in reference to sd-lldp.h

The file was moved from src/libsystemd-network to src/systemd in commit
7a6f1457462840 ("sd-lldp: minor header cleanup").

This fixes "make distcheck".

5 years agomachined: add org.freedesktop.machine1.policy.in to POTFILES.in
Filipe Brandenburger [Tue, 23 Dec 2014 23:02:14 +0000 (15:02 -0800)]
machined: add org.freedesktop.machine1.policy.in to POTFILES.in

The new polkit file was introduced in commit d04c1fb8e21560 ("machined:
introduce polkit for OpenLogin() call").

5 years agoupdate TODO
Lennart Poettering [Thu, 25 Dec 2014 02:20:20 +0000 (03:20 +0100)]
update TODO

5 years agomachined: beef up machined image listing with creation/modification times of subvolumes
Lennart Poettering [Thu, 25 Dec 2014 02:19:19 +0000 (03:19 +0100)]
machined: beef up machined image listing with creation/modification times of subvolumes

We make use of the btrfs subvol crtime for this, and for gpt images of a
manually managed xattr, if we can.

5 years agoimport: prefer usec_t over time_t
Lennart Poettering [Thu, 25 Dec 2014 02:14:09 +0000 (03:14 +0100)]
import: prefer usec_t over time_t

5 years agoupdate TODO
Lennart Poettering [Wed, 24 Dec 2014 15:55:03 +0000 (16:55 +0100)]
update TODO

5 years agoupdate TODO
Lennart Poettering [Wed, 24 Dec 2014 15:52:20 +0000 (16:52 +0100)]
update TODO

5 years agoimport: add a new "pull-gpt" verb for downloading GPT disk images from the internet
Lennart Poettering [Wed, 24 Dec 2014 15:44:56 +0000 (16:44 +0100)]
import: add a new "pull-gpt" verb for downloading GPT disk images from the internet

5 years agoimport: three minor fixes
Lennart Poettering [Wed, 24 Dec 2014 15:43:46 +0000 (16:43 +0100)]
import: three minor fixes

5 years agoimport: print friendly error messages on errors
Lennart Poettering [Wed, 24 Dec 2014 15:43:20 +0000 (16:43 +0100)]
import: print friendly error messages on errors

5 years agoimport: remember when we were finished importing
Lennart Poettering [Wed, 24 Dec 2014 15:42:41 +0000 (16:42 +0100)]
import: remember when we were finished importing

5 years agoimport: make the dkr import URL a part of the import object, not the import name...
Lennart Poettering [Wed, 24 Dec 2014 15:41:51 +0000 (16:41 +0100)]
import: make the dkr import URL a part of the import object, not the import name object

5 years agomachined: fix writability check for GPT images
Lennart Poettering [Wed, 24 Dec 2014 15:40:30 +0000 (16:40 +0100)]
machined: fix writability check for GPT images