1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 18:27:04 +03:00
Commit Graph

18940 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
8facc3498e Fix some format strings for enums, they are signed 2015-01-22 00:39:30 -05:00
Zbigniew Jędrzejewski-Szmek
213c305a2f shared/util: use signed printf format for PIDs
gcc 5 started warning about this.
2015-01-22 00:39:30 -05:00
Lennart Poettering
da36017e05 update TODO 2015-01-22 04:02:07 +01: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
Lennart Poettering
f4c135bf2f impot: minor cleanups 2015-01-22 04:02:07 +01:00
Lennart Poettering
aca83a53ee log: add new log output mode, that prints to console, but prefixes with syslog priority
This is useful when we execute our own programs, reading output from its
STDERR, and want to retain priority information.
2015-01-22 04:02:07 +01:00
Tom Gundersen
07e10d1a7c networkd: plug lldp leak 2015-01-21 23:02:22 +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
Tom Gundersen
764aad6258 network: dhcp - split out the duid structure into a new header file
We will use the same in both dhcp4 and dhcp6.
2015-01-21 22:57:55 +01:00
Lennart Poettering
7687f85ea6 update TODO 2015-01-21 20:05:31 +01:00
Lennart Poettering
ff2670ad11 import: simplify dkr importer, by making use of generic import-job logic, used by the raw and tar importers
This gets us progress output as well xz/bzip2 support.
2015-01-21 20:05:31 +01:00
Lennart Poettering
8b71fce8c2 import: minor cleanups for the tar and raw importers 2015-01-21 20:05:31 +01:00
Martin Pitt
91ca5bf0b6 build: Add parallel-tests automake option
We use PY_LOG_COMPILER in Makefile.am for running *.py tests, which requires
automake's parallel test runner. This has only been the default from 1.13 on.
As we only require automake 1.11, add it as an option explicitly.
2015-01-21 17:10:20 +01:00
Martin Pitt
77354c7e6f sysv-generator: Replace Provides: symlinks with real units
Since commit b7e7184 the SysV generator creates symlinks for all "Provides:" in
the LSB header. However, this is too greedy; there are cases where the
creation of a unit .service file fails because of an already existing
symlink with the same name:

 - Backup files such as /etc/init.d/foo.bak still have "Provides: foo", and
   thus get a foo.service -> foo.bak.service link. foo.bak would not be enabled
   in rcN.d/, but we (deliberately) create units for all executables in init.d/
   so that a manual "systemctl start" works. If foo.bak is processed before,
   the symlink already exists.

 - init.d/bar has "Provides: foo", while there also is a real init.d/foo. The
   former would create a link foo.service -> bar.service, while the latter
   would fail to create the real foo.service.

If we encounter an existing symlink, just remove it before writing a real unit.

Note that two init.d scripts "foo" and "bar" which both provide the same name
"common" already work. The first processed init script wins and creates the
"common.service" symlink, and the second just fails to create the symlink
again. Thus create an additional test case for this to ensure that it keeps
working sensibly.

https://bugs.debian.org/775404
2015-01-21 17:01:00 +01:00
Martin Pitt
d816e2b790 systemd-sysv-generator test: test scripts with hidden suffixes
We don't expect any unit generated from temporary package manager, swap, and
similar files.
2015-01-21 15:30:01 +01:00
Martin Pitt
c7088e4999 util: Add some missing hidden_file() suffixes
dpkg itself also uses *.dpkg-dist, while .dpkg-{bak,backup,remove} are being
used by dpkg-maintscript-helper.
2015-01-21 15:29:37 +01:00
Martin Pitt
29e0e6d8c1 sysv-generator: Handle .sh suffixes when translating Provides:
When deciding whether the provided name equals the file name in
sysv_translate_facility(), also consider them equal if the file name has a
".sh" suffix.

This was uncovered by commit b7e7184 which then created a symlink
"<name>.service" to itself for ".sh" suffixed init.d scripts.

For additional robustness, refuse to create symlinks to itself in add_alias().

Add test case which reproduces the bug.

https://bugs.debian.org/775889
2015-01-21 14:53:38 +01:00
Lennart Poettering
9cba813191 update TODO 2015-01-21 13:45:07 +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
Christian Seiler
ccf23ad5fa journal: Fix syslog forwarding without CAP_SYS_ADMIN
In case CAP_SYS_ADMIN is missing (like in containers), one cannot fake pid in
struct ucred (uid/gid are fine if CAP_SETUID/CAP_SETGID are present).

Ensure that journald will try again to forward the messages to syslog without
faking the SCM_CREDENTIALS pid (which isn't guaranteed to succeed anyway, since
it also does the same thing if the process has already exited).

With this patch, journald will no longer silently discard messages
that are supposed to be sent to syslog in these situations.

https://bugs.debian.org/775067
2015-01-21 12:36:58 +01:00
Wieland Hoffmann
e37b56c735 zsh-completion: Do not interpret escape sequences in _filter_units_by_property
This makes all functions that rely on _filter_units_by_property() (like
_systemctl_{stop,kill,try_restart}) work with unit names that contain backslash
escaped sequences (like automount units with spaces that are escaped to
"\x20").
2015-01-21 10:59:40 +01:00
Martin Pitt
eb89bc1d25 systemd-sysv-generator test: fix enabled check
Fix hardcoded "foo.service", test for the actual unit parameter.
2015-01-21 10:22:10 +01:00
Martin Pitt
56401ac57a systemd-sysv-generator test: don't parse symlinks
Generated services which are symlinks should be tested/handled differently from
files, so ignore them in run_generator()'s result parsing.
2015-01-21 09:45:15 +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
0100b6e1bf import: also add verification support to tar importer 2015-01-21 04:03:54 +01:00
Lennart Poettering
98c3800184 import: make verification code generic, in preparation for using it pull-tar 2015-01-21 04:03:54 +01:00
Lennart Poettering
5a3b1abd0e import: improve logging 2015-01-21 04:03:54 +01:00
Lennart Poettering
90bc083bda import: show download speed while downloading 2015-01-21 04:03:54 +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
Martin Pitt
e8015e6e28 test: simplify rules-test.sh wrapper
Drop globbing of rules/*.rules in the rules-test.sh wrapper and move that logic
into the actual test rule-syntax-check.py. This can still be called with
individual rules files, but when being called without arguments it will now
process all top_builddir/rules/*.rules.

Preparation for dropping the shell wrappers altogether.
2015-01-20 20:52:25 +01:00
Lennart Poettering
c09ef2e4e8 nspawn: work around kernel bug with partition table probing on loopback devices
When we set up a loopback device with partition probing, the udev
"change" event about the configured device is first passed on to
userspace, only the the in-kernel partition prober is started. Since
partition probing fails with EBUSY when somebody has the device open,
the probing frequently fails since udev starts probing/opening the
device as soon as it gets the notification about it, and it might do so
earlier than the kernel probing.

This patch adds a (hopefully temporary) work-around for this, that
compares the number of probed partitions of the kernel with those of
blkid and synchronously asks for reprobing until the numebrs are in
sync.

This really deserves a proper kernel fix.
2015-01-20 20:40:45 +01:00
Lennart Poettering
c660bb0942 import: add a couple of additional suffixes to remove from raw images 2015-01-20 20:40:44 +01:00
Lennart Poettering
8f6950587a import: make image verification optional 2015-01-20 20:40:44 +01:00
Patrik Flykt
950a1705dc sd-dhcp6-client: Remove unnecessary debug printout 2015-01-20 19:39:28 +02: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
88a1aadc48 import: be less aggressive when allocating memory for downloaded payload 2015-01-20 15:06:58 +01:00
Lennart Poettering
68c913fd75 import: improve logging a bit 2015-01-20 15:06:58 +01:00
Lennart Poettering
0d6e763b48 import: port pull-raw to helper tools implemented for pull-tar
This allows us to reuse a lot more code, and simplify pull-raw
drastically.
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
Lennart Poettering
a2e0337875 util: make http url validity checks more generic, and move them to util.c 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
Martin Pitt
c6be83c16d test/rule-syntax-check.py: Fix for Python 3
Make this work with both Python 2 and 3.
2015-01-20 12:18:40 +01:00
Rami Rosen
6fb2f9ab6b networkd: fix a typo in networkd-wait-online-manager.
subscibe->subscribe
2015-01-20 09:45:34 +01:00
Zbigniew Jędrzejewski-Szmek
d9000fd3b3 man: add networkctl(1) 2015-01-19 21:44:53 -05:00
Zbigniew Jędrzejewski-Szmek
12f15e596a man: use one description of --no-legend 2015-01-19 21:44:53 -05:00
Tom Gundersen
4bbfe7ad22 nspawn: add ipvlan support 2015-01-20 00:46:13 +01:00
Tom Gundersen
c4a5ddc9f2 networkd: netdev - add ipvlan support 2015-01-19 23:25:16 +01:00
Zbigniew Jędrzejewski-Szmek
250ba6647b systemctl: do not show dots with --plain
Plain implies a ... "plain" output.

Also do not say "No jobs" with --no-legend. We skip
reporting the number of jobs with --no-legend if there
are any, and 0 is also a number, and should be skipped.
2015-01-19 15:41:03 -05:00
Lennart Poettering
f6c51a8136 nspawn: support dissecting GPT images that contain only a single generic linux partition
This should allow running Ubuntu UEFI GPT Images with nspawn,
unmodified.
2015-01-19 20:24:10 +01:00