Commit graph

27733 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 9258a1cae3 Merge pull request #4686 from poettering/machine-id-app-specific
Add new "khash" API and add new sd_id128_get_machine_app_specific() function
2016-12-08 23:24:28 -05:00
David Michael 1aa68db1ae network: fix const qualifier (#4849)
Follow up for #4809.
2016-12-07 16:42:17 -05:00
Franck Bui 5367354dae nspawn: resolv.conf might not be created initially (#4799)
This might happen that resolv.conf is missing in a minimal rootfs and in this
case the following warning is emitted:

 Failed to mount n/a on /mnt/etc/resolv.conf (MS_BIND ""): No such file or directory

This patch fixes this case.
2016-12-07 21:36:39 +01:00
Lennart Poettering e332833f07 Merge pull request #4843 from joukewitteveen/protocol
Go through stop_post on failure (#4770)
2016-12-07 21:35:07 +01:00
David Michael 618b196e9d network: support negation in matching patterns (#4809) 2016-12-07 19:12:10 +01:00
27o 3e7b9f76f5 dhcp: bind udp sockets to interfaces (#4822) 2016-12-07 02:00:05 +01:00
Peter Hutterer 73e383cc62 Merge pull request #4841 from hadess/oke-barcode-reader
hwdb: Add fixed layout for a few devices
2016-12-07 07:12:13 +10:00
Doug Christman c0df71fa36 calendarspec: always interpret missing seconds as :00 (#4813)
"*:*" should be equivalent to "*-*-* *:*:00" (minutely)
rather than running every microsecond.

Fixes #4804
2016-12-06 20:41:15 +01:00
Jouke Witteveen c3fda31da3 service: go through stop_post on failure (#4770) 2016-12-06 14:02:36 +01:00
Jouke Witteveen a4e26faf33 man: fix $SERVICE_RESULT/$EXIT_CODE/$EXIT_STATUS documentation
Note that any exit code is available through $EXIT_STATUS and not through
$EXIT_CODE. This mimics siginfo.
2016-12-06 13:37:14 +01:00
Susant Sahani 9c77d1079d networkd: Use dhcp correct type for IP port (#4840)
Fixes: #4839
2016-12-06 12:22:33 +01:00
Susant Sahani 10452f7c93 core: introduce parse_ip_port (#4825)
1. Listed in TODO.
2. Tree wide replace safe_atou16 with parse_ip_port incase
   it's used for ports.
2016-12-06 12:21:45 +01:00
Bastien Nocera 993980075f hwdb: Add fixed layout for another Yubikey 2016-12-06 12:14:40 +01:00
Bastien Nocera f8a4ea9fe8 hwdb: Add fixed layout for OKE barcode reader 2016-12-06 11:55:22 +01:00
Lennart Poettering 5efdbf11d1 time-util: accept "µs" as time unit, in addition to "us" (#4836)
Let's accept "µs" as alternative time unit for microseconds. We already accept
"us" and "usec" for them, lets extend on this and accept the proper scientific
unit specification too.

We will never output this as time unit, but it's fine to accept it, after all
we are pretty permissive with time units already.
2016-12-06 10:51:26 +01:00
Kieran Colford 471b9850ee rules: consider MMC device partitions with partition number > 9 (#4831)
Add entries for extra partitions found on MMC devices (common in Chromebooks).
2016-12-06 10:46:13 +01:00
Evgeny Vereshchagin d0569c7e9a Merge pull request #4838 from phomes/misc-cleanup2
Misc cleanups
2016-12-06 06:51:55 +03:00
Thomas Hindoe Paaboel Andersen 8fb242abc9 core: remove unused variable 2016-12-06 00:09:50 +01:00
Thomas Hindoe Paaboel Andersen 11754a3486 udev: remove duplicate flag
One SA_RESTART is enough. Fall out from
e28c7cd066
2016-12-06 00:09:43 +01:00
Martin Ejdestig 95977da98c man: Document return value of event source prepare callback (#4834) 2016-12-05 23:42:41 +01:00
Evgeny Vereshchagin c9fd987279 nspawn: don't hide --bind=/tmp/* mounts (#4824)
Fixes #4789
2016-12-05 18:14:05 +01:00
Susant Sahani e3a7b04848 networkd: link_enter_configured remove assert (#4800)
When we are in link_enter_configured we assume that the
link->state should be LINK_STATE_SETTING_ROUTES but in some
situation it's LINK_STATlE_SETTING_ADDRESSES.

Just ignore the wrong state.

Also since the return value not used any where
make link_enter_configured return type void.

Fixes: #4746
2016-12-05 09:31:48 -05:00
Franck Bui 3099caf2b5 journal: make sure to initially populate the space info cache (#4807)
Make sure to populate the cache in cache_space_refresh() at least once
otherwise it's possible that the system boots fast enough (and the journal
flush service is finished) before the invalidate cache timeout (30 us) has
expired.

Fixes: #4790
2016-12-02 18:40:10 +01:00
Dave Reisner b200489b2b cgroup: properly check for ignore-notfound paths (#4803)
Follow-up to #4687 and e7330dfe14.
2016-12-02 09:23:23 -05:00
Torstein Husebø 06bf09af67 treewide: fix typos (#4802) 2016-12-02 09:20:26 -05:00
Zbigniew Jędrzejewski-Szmek 169f11d5da Merge pull request #4228 from dm0-/coreos-1554
networkd: support marking links unmanaged
2016-12-02 09:14:27 -05:00
Martin Pitt cd66af2274 Merge pull request #4797 from keszybz/pylint
Python cleanups based on pylint advice
2016-12-02 08:48:37 +01:00
Zbigniew Jędrzejewski-Szmek cda39975dc python: use raw strings for regexp patterns
Behaviour is not changed, because "unknown" escapes like \s or \d were not
substituted, but it's much nicer to use raw strings to avoid ambiguity.
2016-12-01 19:11:10 -05:00
Zbigniew Jędrzejewski-Szmek 8d9d1e3af0 hwdb_parse: adjust indentation and imports following pylint advice
(This commit is separate to make it easy to export to libinput.)
2016-12-01 19:10:01 -05:00
Zbigniew Jędrzejewski-Szmek 00d5eaafd1 python: adjust imports, indentation, unused variables following pylint advice 2016-12-01 18:55:23 -05:00
Zbigniew Jędrzejewski-Szmek 644d7e7610 acpi-update.py: there is no "Error" class
Evidently this code path was never hit, because we'd crash with NameError.
The exception message also seems bogus. So just replace the whole thing
with the standard exception for invalid input.
2016-12-01 18:52:57 -05:00
Tobias Stoeckmann cd05bb8baf Spot inconsistent quoting (just one single quote) (#4732)
It is possible to specify only one quote in udev rules, which is not
detected as an invalid quoting (" instead of "" for empty string).

Technically this doesn't lead to a bug, because the string ends in two
terminating nul characters at this position, but a user should still be
reminded that his configuration is invalid.
2016-12-01 18:46:36 -05:00
Susant Sahani 7e3f4e7f3d networkd: VXLAN add better explanation for ARPProxy (#4781)
This closes #4768
2016-12-02 00:05:10 +01:00
David Michael a09dc5467a networkd: support marking links unmanaged 2016-12-01 14:41:51 -08:00
David Michael ec89276c2a networkd-test: define a utility class to simplify tests 2016-12-01 14:25:58 -08:00
Martin Pitt 561d496d0b rules: add persistent links for nbd devices (#4785)
https://bugs.debian.org/837999
2016-12-01 16:22:47 -05:00
Yassine Imounachen b3f76b0d61 Update boot.c (#4780) 2016-12-01 15:58:58 +01:00
Zbigniew Jędrzejewski-Szmek a32ffa161c Merge pull request #4694 from poettering/chase-everywhere
tree-wide: stop using canonicalize_file_name(), use chase_symlinks() …
2016-12-01 09:29:14 -05:00
Martin Pitt b06662e853 Merge pull request #4778 from whot/xkb-fixed-layout
Xkb fixed layout
2016-12-01 14:32:32 +01:00
Lennart Poettering cb638b5e96 util-lib: rename CHASE_NON_EXISTING → CHASE_NONEXISTENT
As suggested by @keszybz
2016-12-01 12:49:55 +01:00
Lennart Poettering ec57bd426a nspawn: improve log messages
When complaining about the inability to resolve a path, show the full path, not
just the relative one.

As suggested by @keszybz.
2016-12-01 12:41:18 +01:00
Lennart Poettering c7a4890ce4 nspawn: optionally, automatically allocated --bind=/--overlay source from /var/tmp
This extends the --bind= and --overlay= syntax so that an empty string as source/upper
directory is taken as request to automatically allocate a temporary directory
below /var/tmp, whose lifetime is bound to the nspawn runtime. In combination
with the "+" path extension this permits a switch "--overlay=+/var::/var" in
order to use the container's shipped /var, combine it with a writable temporary
directory and mount it to the runtime /var of the container.
2016-12-01 12:41:18 +01:00
Lennart Poettering 86c0dd4a71 nspawn: permit prefixing of source paths in --bind= and --overlay= with "+"
If a source path is prefixed with "+" it is taken relative to the container's
root directory instead of the host. This permits easily establishing bind and
overlay mounts based on data from the container rather than the host.

This also reworks custom_mounts_prepare(), and turns it into two functions: one
custom_mount_check_all() that remains in nspawn.c but purely verifies the
validity of the custom mounts configured. And one called
custom_mount_prepare_all() that actually does the preparation step, sorts the
custom mounts, resolves relative paths, and allocates temporary directories as
necessary.
2016-12-01 12:41:18 +01:00
Lennart Poettering e28c7cd066 tree-wide: set SA_RESTART for signal handlers we install
We already set it in most cases, but make sure to set it in all others too, and
document that that's a good idea.
2016-12-01 12:41:17 +01:00
Lennart Poettering 7b4318b6a5 nspawn: add ability to configure overlay mounts to .nspawn files
Fixes: #4634
2016-12-01 12:41:17 +01:00
Peter Hutterer 086c001e29 hwdb: add XKB_FIXED_LAYOUT/VARIANT to the keyboard hwdb
Yubikeys and other pseudo keyboards require that they are in the US layout,
otherwise the data they send is invalid. Add two new keys to signal this to
processes that handles (XKB) layouts.
2016-12-01 20:11:54 +10:00
Peter Hutterer cde43c455b hwdb: fix comment referring to rules file
60-keyboard.rules was renamed to 60-evdev.rules in 51c0c2869

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-12-01 10:54:40 +10:00
Lennart Poettering ad85779a50 nspawn: split out overlayfs argument parsing into a function of its own
Add overlay_mount_parse() similar in style to tmpfs_mount_parse() and
bind_mount_parse().
2016-12-01 00:25:51 +01:00
Lennart Poettering 48cbe5f80b nspawn: use -ENOMEM instead of log_oom() in one case
The function is of the "library" kind and doesn't log ENOMEM in all other
cases, hence fix the one outlier.
2016-12-01 00:25:51 +01:00
Lennart Poettering 8d4aa2bb32 nspawn: make use of CHASE_NON_EXISTING when locking image
If --template= is used on an image, then the image might not exist initially.
We can use CHASE_NON_EXISTING to properly lock the image already before it
exists. Let's do so.
2016-12-01 00:25:51 +01:00