Commit graph

1834 commits

Author SHA1 Message Date
Lennart Poettering 113b3fc1a8 importd: create a loopback btrfs file system for /var/lib/machines, if necessary
When manipulating container and VM images we need efficient and atomic
directory snapshots and file copies, as well as disk quota. btrfs
provides this, legacy file systems do not. Hence, implicitly create a
loopback file system in /var/lib/machines.raw and mount it to
/var/lib/machines, if that directory is not on btrfs anyway.

This is done implicitly and transparently the first time the user
invokes "machinectl import-xyz".

This allows us to take benefit of btrfs features for container
management without actually having the rest of the system use btrfs.

The loopback is sized 500M initially. Patches to grow it dynamically are
to follow.
2015-02-24 17:27:53 +01:00
Martin Pitt a804d849b3 bootchart: fix default init path
Commit 6e1bf7ab99 used the wrong directory; we need rootlibexecdir, not
rootlibdir, as the latter is something like /lib/x86_64-linux-gnu/ on
multi-arch systems.

https://launchpad.net/bugs/1423867
2015-02-24 14:31:45 +01:00
Marcel Holtmann 563217eb9e build-sys: bootctl depends on HAVE_BLKID 2015-02-22 10:28:34 +01:00
Lennart Poettering d5d8429a12 everywhere: remove configurability of sysv runlevel to target mapping
With this change runlevel 2, 3, 4 are mapped to multi-user.target for
good, and 5 to graphical.target. This was already the previous mapping
but is now no longer reconfigurable, but hard-coded into the core.

This should generally simplify things, but also fix one bug: the
sysv-generator previously generated symlinks to runlevel[2-5].target
units, which possibly weren't picked up if these aliases were otherwise
only referenced by the real names "multi-user.target" and
"graphical.target".

We keep compat aliases "runlevel[2345].target" arround for cases where
this target name is explicitly requested.
2015-02-18 20:20:14 +01:00
Didier Roche 66f2ff06ca Add fsckd service and socket, retarget systemd-fsck
systemd-fsckd can be socket-activated by systemd-fsck process. Reflect that
in the different unit files.
2015-02-18 16:33:46 +01:00
Didier Roche ac6e2f0dfc fsckd daemon for inter-fsckd communication
Add systemd-fsckd multiplexer which accepts multiple systemd-fsck
instances to connect to it and sends progress report. systemd-fsckd then
computes and writes to /dev/console the number of devices currently being
checked and the minimum fsck progress. This will be used for interactive
progress report and cancelling in plymouth.

systemd-fsckd stops on idle when no systemd-fsck is connected.

Make the necessary changes to systemd-fsck to connect to the systemd-fsckd
socket.
2015-02-18 16:33:46 +01:00
Tom Gundersen e7dd673d1e gummiboot/sd-boot/systemd-boot: rename galore
What used to be gummiboot, was renamed sd-boot when it was merged into
systemd. Let's try to be a bit more consistent with the rest of systemd
and rename it again as follows:

The EFI bootloader is now called 'systemd-bootx64.efi', and its sources are in
'src/boot/efi/'. The drop-in directory where bootctl will find EFI loaders
is now /usr/lib/systemd/boot/efi/.
2015-02-18 15:23:23 +01:00
Harald Hoyer 8d4efa540a Makefile.am:efi_cflags compile with gcc v5
Set -std=gnu90 to let efibind.h define the standard types.

[tomegun: retyped the patch as the originl would not apply]
2015-02-18 15:23:23 +01:00
Kay Sievers 484122c345 build-sys: add missing HAVE_GNUEFI condition 2015-02-17 18:01:33 +01:00
Kay Sievers 0974a682d1 bootctl: add sd-boot support 2015-02-17 14:36:59 +01:00
Kay Sievers 0fa2cac4f0 sd-boot: add EFI boot manager and stub loader 2015-02-17 14:36:59 +01:00
Lennart Poettering f9d4ea9e4e build-sys: bump sonames in preparation for next release 2015-02-13 11:07:18 +01:00
Tom Gundersen 3175fcdec5 networkd: add basic org.freedesktop.network1.Network interface 2015-02-08 20:15:37 +01:00
Tom Gundersen 23cb977ac3 build-sys: properly enable the networkd dbus activation 2015-02-08 20:15:37 +01:00
Zbigniew Jędrzejewski-Szmek 4e829d218c localed: add LANGUAGE= fallback when LANG= is specified
For the entries listed in the first column of language-fallback-map,
the entry from the second column will be used for LANGUAGE=, if
LANGUAGE= is not explicitly specified.

https://bugzilla.redhat.com/show_bug.cgi?id=624158
2015-02-06 09:13:12 -05:00
Zbigniew Jędrzejewski-Szmek a08d90d6b3 build-sys: remove reference to long gone file
Interesting that automake doesn't complain about this at all.
That file was removed in 3fb97a58fa.
2015-02-06 09:13:12 -05:00
Tom Gundersen e331e24649 networkd: add basic dbus API
Only the very basics, more to come.

For now:

$ busctl tree org.freedesktop.network1
└─/org/freedesktop/network1
  └─/org/freedesktop/network1/link
    ├─/org/freedesktop/network1/link/1
    ├─/org/freedesktop/network1/link/2
    ├─/org/freedesktop/network1/link/3
    ├─/org/freedesktop/network1/link/4
    ├─/org/freedesktop/network1/link/5
    ├─/org/freedesktop/network1/link/6
    ├─/org/freedesktop/network1/link/7
    ├─/org/freedesktop/network1/link/8
    └─/org/freedesktop/network1/link/9

$ busctl introspect org.freedesktop.network1 /org/freedesktop/network1
NAME                                TYPE      SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.network1.Manager    interface -         -            -
.OperationalState                   property  s         "carrier" emits-change

$ busctl introspect org.freedesktop.network1 /org/freedesktop/network1/link/1
NAME                                TYPE      SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.network1.Link       interface -         -            -
.AdministrativeState                property  s         "unmanaged" emits-change
.OperationalState                   property  s         "carrier" emits-change
2015-02-05 11:50:34 +01:00
Martin Pitt 53d90f9582 tests: don't hardcode systemctl path
Get it from type -P instead, to support --enable-split-usr.
2015-02-03 09:50:45 +01:00
Zbigniew Jędrzejewski-Szmek 36c957959d build-sys: distribute systemd-networkd.socket 2015-02-02 22:59:22 -05:00
Tom Gundersen 5544ee8516 networkd: support socket activation
Still keep the non-socket activation code around for starting from the commandline, but
will likely drop that too in the future.
2015-02-02 11:57:52 +01:00
Peter Hutterer 001a247324 hwdb: add a touchpad hwdb
Currently used to tag devices in the new Lenovo *50 series and the X1 Carbon
3rd. These laptops re-introduced the physical trackpoint buttons that were
missing from the *40 series but those buttons are now wired up to the
touchpad.

The touchpad now sends BTN_0, BTN_1 and BTN_2 for the trackpoint. The same
button codes were used in older touchpads that had dedicated scroll up/down
buttons. Input drivers need to work around this and thus know what they're
dealing with.

For the previous gen we introduced INPUT_PROP_TOPBUTTONPAD in the kernel, but
the resulting mess showed that these per-device quirks should really live in
userspace.

The list currently includes the X1 Carbon 3rd PNPID, others will be added as
get to know which PNPID they have.
2015-01-29 13:06:04 +10:00
Peter Hutterer ebb90c83ea Fix ordering of the 70-mouse.rule in the Makefile 2015-01-29 11:52:07 +10:00
Zbigniew Jędrzejewski-Szmek 78eb158a20 build-sys: add check for --help width 2015-01-27 21:48:12 -05:00
Zbigniew Jędrzejewski-Szmek 10bc4cd469 build-sys: unbundle unifont
We should prefer the unifont.hex file from the system, instead of our
own. Upstream has made a few releases since our version was included,
and we should follow upstream changes. But adding 2.6MB to our source
repo every time upstream releases is not nice.
2015-01-26 23:56:34 -05:00
Cristian Rodríguez 66b0e0e0e3 build-sys: lookup for sulogin, it might not be in /sbin 2015-01-23 19:09:37 +01:00
Lennart Poettering 7079cfeffb importd: when listing transfers, show progress percentage
With this change the pull protocol implementation processes will pass
progress data to importd which then passes this information on via the
bus. We use sd_notify() as generic transport for this communication,
making importd listen to them, while matching the incoming messages to
the right transfer.
2015-01-23 01:17:55 +01:00
Lennart Poettering 57d8a552af importd: fix path to download binary 2015-01-22 18:38:51 +01:00
Lennart Poettering ff828763c4 importd: try to minimize confusion by renaming "systemd-import" binary to "systemd-pull"
This way "systemd-importd" is the daemon that uses "systemd-pull" as
backend worker.
2015-01-22 17:50:50 +01:00
Zbigniew Jędrzejewski-Szmek f8eeeaf9b7 tmpfiles: add 'a' type to set ACLs 2015-01-22 01:14:53 -05:00
Lennart Poettering 3d7415f43f import: introduce new mini-daemon systemd-importd, and make machinectl a client to it
The old "systemd-import" binary is now an internal tool. We still use it
as asynchronous backend for systemd-importd. Since the import tool might
require some IO and CPU resources (due to qcow2 explosion, and
decompression), and because we might want to run it with more minimal
priviliges we still keep it around as the worker binary to execute as
child process of importd.

machinectl now has verbs for pulling down images, cancelling them and
listing them.
2015-01-22 04:02:07 +01:00
Tom Gundersen cfb5b38057 network: dhcp - split out dhcp_identifier_set_{iaid,duid_en} from dhcp6-client
This will also be used in dhcp4-client.
2015-01-21 22:57:55 +01:00
Lennart Poettering 8af3cf74df import: support downloading bzip2-encoded images
This way, we can import CoreOS images unmodified.
2015-01-21 13:44:29 +01:00
Martin Pitt e28aa588f0 test: add integration test for systemd-sysv-generator
This covers the general functionality as well as regression tests for recent
fixes like commits b7e718 and 1ed0c19.
2015-01-21 08:07:07 +01:00
Lennart Poettering 3576d6315f import: add image verification using gpg
This also adds an initial keyring for the verification, that contains
Ubuntu's and Fedora's key. We should probably add more entries sooner or
later.
2015-01-21 04:03:54 +01:00
Martin Pitt 72521ab9fd test: eliminate shell wrapper for Python test
Use the parallel test runner's TEST_EXTENSIONS/*_LOG_COMPILER feature
(https://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html)
to run *.py tests through $(PYTHON), and only if we have python
available/enabled.

This eliminates the need of having shell wrappers, thus drop
test/rules-test.sh.
2015-01-20 21:26:35 +01:00
Lennart Poettering 85dbc41dc6 import: add a simple scheme for validating the SHA256 sums of downloaded raw files 2015-01-20 15:06:58 +01:00
Lennart Poettering 56ebfaf1ca import: add support for pulling raw tar balls as containers
Ubuntu provides their cloud images optionally as tarball, hence also
support downloading those.
2015-01-20 15:06:58 +01:00
Martin Pitt 6c8f2e7d78 test: Use configured Python
Don't hardcode "python" or /usr/bin/python, but use the configured $(PYTHON).
2015-01-20 12:49:08 +01:00
Tom Gundersen c4a5ddc9f2 networkd: netdev - add ipvlan support 2015-01-19 23:25:16 +01:00
Lennart Poettering 1c7dd82563 qcow2: when dissecting qcow2, use btrfs clone ioctls for reflinking blocks to target 2015-01-19 20:24:09 +01:00
David Herrmann c4bc1a8434 bus-proxy: share policy between threads
This implements a shared policy cache with read-write locks. We no longer
parse the XML policy in each thread.

This will allow us to easily implement ReloadConfig().
2015-01-17 18:27:23 +01:00
David Herrmann b58d857136 build: move stdio-bridge into $PATH
Make sure stdio-bridge can be found in $PATH. Otherwise, "xyzctl -H"
fails.
2015-01-17 18:27:23 +01:00
David Herrmann a8a1a43f48 bus-proxy: turn into multi-threaded daemon
Instead of using Accept=true and running one proxy for each connection, we
now run one proxy-daemon with a thread per connection. This will enable us
to share resources like policies in the future.
2015-01-17 14:00:19 +01:00
David Herrmann f299e3e430 bus-proxy: bring back systemd-stdio-bridge
Now that we want to make bus-proxy multi-threaded, we have to bring back
the systemd-stdio-bridge for our TCP use-cases.
2015-01-17 11:55:14 +01:00
David Herrmann c0395aeb90 bus-proxy: extract proxy into Proxy object
Move all the proxy code into a "struct Proxy" object that can be used
from multiple binaries.

We now dropped SMACK as we have to refactor it to work properly. We can
introduce it later on.
2015-01-17 11:55:14 +01:00
Lennart Poettering edce2aed3a import: support importing qcow2 images
With this change the import tool will now unpack qcow2 images into
normal raw disk images, suitable for usage with nspawn.

This allows has the benefit of also allowing importing Ubuntu Cloud
images for usage with nspawn.
2015-01-16 20:09:33 +01:00
Lennart Poettering 49bb233bb7 import: support downloading .xz compressed images
That way we can download fedora cloud raw images as-is and decompress
them on-the-fly.
2015-01-16 20:09:33 +01:00
Kay Sievers 6ca5708aa9 build-sys: add libsystemd-fw where needed 2015-01-16 15:35:42 +01:00
Kay Sievers 8d09b6deae build-sys: add missing HAVE_LIBIPTC 2015-01-16 15:22:16 +01:00
David Herrmann 244477333a udev: merge evdev_id into input_id
There is no reason to keep both separated. We want to avoid API specific
tools and instead keep generic terms like 'input'.
2015-01-15 14:13:49 +01:00