chiark / gitweb /
6 years agorun: add a new "-t" mode for invoking a binary on an allocated TTY
Lennart Poettering [Mon, 22 Dec 2014 18:45:32 +0000 (19:45 +0100)]
run: add a new "-t" mode for invoking a binary on an allocated TTY

6 years agoimport: rename 'poll-dck' to 'pull-dkr'
Lennart Poettering [Mon, 22 Dec 2014 18:42:27 +0000 (19:42 +0100)]
import: rename 'poll-dck' to 'pull-dkr'

I figure "pull-dck" is not a good name, given that one could certainly
read the verb in a way that might be funny for 16year-olds. ;-)

Also, don't hardcode the index URL to use, make it runtime and configure
time configurable instead.

6 years agoshared: json - support escaping utf16 surrogate pairs
Tom Gundersen [Mon, 22 Dec 2014 13:53:40 +0000 (14:53 +0100)]
shared: json - support escaping utf16 surrogate pairs

We originally only supported escaping ucs2 encoded characters (as \uxxxx). This
only covers the BMP. Support escaping also utf16 surrogate pairs (on the form
\uxxxx\uyyyy) to cover all of unicode.

6 years agoshared: utf8 - support decoding the full utf16
Tom Gundersen [Mon, 22 Dec 2014 11:57:05 +0000 (12:57 +0100)]
shared: utf8 - support decoding the full utf16

We originally only supported the BMP (i.e., we treated UTF-16 as UCS-2).

6 years agoshared: utf8 - support ucs4 -> utf8
Tom Gundersen [Sun, 21 Dec 2014 23:58:26 +0000 (00:58 +0100)]
shared: utf8 - support ucs4 -> utf8

Originally we only supported ucs2, so move the ucs4 version from libsystemd-terminal to shared
and use that everywhere.

6 years agosd-bus: ignore KDBUS_ITEM_TIMESTAMP in kernel messages
Daniel Mack [Mon, 22 Dec 2014 18:59:53 +0000 (19:59 +0100)]
sd-bus: ignore KDBUS_ITEM_TIMESTAMP in kernel messages

Kernel notifications carry a timestamp now, so make sure
bus_kernel_translate_message() doesn't complain when it stumbles across

6 years agobusname: fix CMD_FREE ioctl
Daniel Mack [Mon, 22 Dec 2014 15:51:15 +0000 (16:51 +0100)]
busname: fix CMD_FREE ioctl

The KDBUS_CMD_FREE ioctl struct has a size field now, which needs to be set.

6 years agoverbs: fix typo in error message
Dave Reisner [Mon, 22 Dec 2014 02:28:49 +0000 (21:28 -0500)]
verbs: fix typo in error message

6 years agohwdb: Lenovo USB mouse MO28UOL DPI data
Frank Theile [Sun, 21 Dec 2014 22:18:55 +0000 (08:18 +1000)]
hwdb: Lenovo USB mouse MO28UOL DPI data

6 years agosd-bus: sync kdbus.h (ABI break)
Daniel Mack [Sat, 20 Dec 2014 18:23:49 +0000 (19:23 +0100)]
sd-bus: sync kdbus.h (ABI break)

Sync kdbus.h with upstream changes:

  * Two optional cancellation points where added for synchronously
    blocking KDBUS_CMD_SEND commands: A sigmask to change the mask
    of accepted signals before the task is put to sleep, and a
    generic file descriptor that can be written to, in order to cancel
    the command. Both methods are currently unused.

  * The KDBUS_CMD_CANCEL ioctl was removed. sd-bus was never using
    that command, so there's no change needed.

  * Some kerneldoc fixes

6 years agobuild: add option to disable hwdb
Umut Tezduyar Lindskog [Fri, 19 Dec 2014 10:47:30 +0000 (11:47 +0100)]
build: add option to disable hwdb

[tomegun: fix, based on fix from Michael Biebl]

6 years agosd-lldp: minor header cleanup
Tom Gundersen [Fri, 19 Dec 2014 21:42:03 +0000 (22:42 +0100)]
sd-lldp: minor header cleanup

 * (potentially) public headers must reside in src/systemd/ (not in
 * some private (not prefixed with sd_) functions moved from sd-lldp.h to
 * introduce lldp-util.h for the cleanup macro, as these should not be public
 * rename the cleanup macro, we always name them _cleanup_foo_, never
 * mark some function arguments as 'const'

6 years agoupdate TODO
Lennart Poettering [Fri, 19 Dec 2014 19:44:49 +0000 (20:44 +0100)]
update TODO

6 years agomachined: add a full bus object for images
Lennart Poettering [Fri, 19 Dec 2014 19:43:18 +0000 (20:43 +0100)]
machined: add a full bus object for images

6 years agomachined: add new GetImage() bus call for retrieving the bus path for an image
Lennart Poettering [Fri, 19 Dec 2014 19:07:23 +0000 (20:07 +0100)]
machined: add new GetImage() bus call for retrieving the bus path for an image

6 years agosysv-generator: properly add Makefile symlink
Lennart Poettering [Fri, 19 Dec 2014 19:04:55 +0000 (20:04 +0100)]
sysv-generator: properly add Makefile symlink

6 years agoutil: rename ignore_file() to hidden_file()
Lennart Poettering [Fri, 19 Dec 2014 19:03:36 +0000 (20:03 +0100)]
util: rename ignore_file() to hidden_file()

hidden_file() is a bit more precise, since dot files usually shouldn't
be ignored, but certainly be considered hidden.

6 years agoupdate TODO
Lennart Poettering [Fri, 19 Dec 2014 18:19:20 +0000 (19:19 +0100)]
update TODO

6 years agomachinectl: port machinectl to new verbs logic
Lennart Poettering [Fri, 19 Dec 2014 18:19:05 +0000 (19:19 +0100)]
machinectl: port machinectl to new verbs logic

6 years agoimport: Verb[] array can be static, too
Lennart Poettering [Fri, 19 Dec 2014 18:18:48 +0000 (19:18 +0100)]
import: Verb[] array can be static, too

6 years agoverbs: when invoking the default verb, pass a faked argv array, with just the verb...
Lennart Poettering [Fri, 19 Dec 2014 18:17:52 +0000 (19:17 +0100)]
verbs: when invoking the default verb, pass a faked argv array, with just the verb in it

That way the dispatcher calls know how they got called.

6 years agomachined/machinectl: add logic to show list of available images
Lennart Poettering [Fri, 19 Dec 2014 17:42:50 +0000 (18:42 +0100)]
machined/machinectl: add logic to show list of available images

This adds a new bus call to machined that enumerates /var/lib/container
and returns all trees stored in it, distuingishing three types:

        - GPT disk images, which are files suffixed with ".gpt"
        - directory trees
        - btrfs subvolumes

6 years agoutil: when creating temporary filename for atomic creation of files, add an extra...
Lennart Poettering [Fri, 19 Dec 2014 17:40:23 +0000 (18:40 +0100)]
util: when creating temporary filename for atomic creation of files, add an extra "#" to the name

That way, we have a simple, somewhat reliable way to detect such
temporary files, by simply checking if they start with ".#".

6 years agojournal: skipping of exhausted journal files is bad if direction changed
Michal Schmidt [Fri, 19 Dec 2014 16:11:22 +0000 (17:11 +0100)]
journal: skipping of exhausted journal files is bad if direction changed

EOF is meaningless if the direction of iteration changes.
Move the EOF optimization under the direction check.

This fixes test-journal-interleaving for me.

Thanks to Filipe Brandenburger for telling me about the failure.

6 years agojournal: make next_with_matches() always use f->current_offset
Michal Schmidt [Fri, 19 Dec 2014 13:42:55 +0000 (14:42 +0100)]
journal: make next_with_matches() always use f->current_offset

next_with_matches() is odd in that its "unit64_t *offset" parameter is
both input and output. In other it's purely for output.

The function is called from two places in next_beyond_location(). In
both of them "&cp" is used as the argument and in both cases cp is
guaranteed to equal f->current_offset.

Let's just have next_with_matches() ignore "*offset" on input and
operate with f->current_offset.

I did not investigate why it is, but it makes my usual benchmark run
reproducibly faster:

$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null

real    0m4.032s
user    0m3.896s
sys     0m0.135s

(Compare to preceding commit, where real was 4.4s.)

6 years agojournal: fix skipping of duplicate entries in iteration
Michal Schmidt [Fri, 19 Dec 2014 14:05:30 +0000 (15:05 +0100)]
journal: fix skipping of duplicate entries in iteration

I accidentally broke the detection of duplicate entries in 7943f42275
"journal: optimize iteration by returning previously found candidate

When we have a known location of a candidate entry, we must not return
from next_beyond_location() immediately. We must go through the
duplicates detection to make sure the candidate differs from the
already iterated entry.

This fix slows down iteration a bit, but it's still faster than it
was before the rework.

$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null

real    0m4.448s
user    0m4.298s
sys     0m0.149s

(Compare with results from commit 7943f42275, where real was 5.3s before
the rework.)

6 years agonetworkd: link - plug leak
Tom Gundersen [Fri, 19 Dec 2014 07:34:04 +0000 (08:34 +0100)]
networkd: link - plug leak

6 years agonetworkctl: lldp - respect arg_legend
Tom Gundersen [Fri, 19 Dec 2014 07:33:46 +0000 (08:33 +0100)]
networkctl: lldp - respect arg_legend

6 years agoLLDP: Add support for networkctl
Susant Sahani [Thu, 11 Dec 2014 04:29:55 +0000 (09:59 +0530)]
LLDP: Add support for networkctl

6 years agonetworkd: integrate LLDP
Susant Sahani [Sun, 23 Nov 2014 04:26:14 +0000 (09:56 +0530)]
networkd: integrate LLDP

This patch integrates LLDP with networkd.

Example conf:
file :



6 years agonetworkd: Introduce Link Layer Discovery Protocol (LLDP)
Susant Sahani [Sun, 23 Nov 2014 04:16:36 +0000 (09:46 +0530)]
networkd: Introduce Link Layer Discovery Protocol (LLDP)

This patch introduces LLDP support to networkd. it implements the
receiver side of the protocol.

The Link Layer Discovery Protocol (LLDP) is an industry-standard,
vendor-neutral method to allow networked devices to advertise
capabilities, identity, and other information onto a LAN. The Layer 2
protocol, detailed in IEEE 802.1AB-2005.LLDP allows network devices
that operate at the lower layers of a protocol stack (such as
Layer 2 bridges and switches) to learn some of the capabilities
and characteristics of LAN devices available to higher
layer protocols.

6 years agonetworkctl: port to verbs helper
Tom Gundersen [Fri, 19 Dec 2014 02:16:45 +0000 (03:16 +0100)]
networkctl: port to verbs helper

6 years agosystemd-hwdb: port to new verbs helper
Tom Gundersen [Fri, 19 Dec 2014 02:01:27 +0000 (03:01 +0100)]
systemd-hwdb: port to new verbs helper

6 years agoimport: dck - fix curl error handling
Tom Gundersen [Fri, 19 Dec 2014 02:00:56 +0000 (03:00 +0100)]
import: dck - fix curl error handling

6 years agoupdate TODO
Lennart Poettering [Fri, 19 Dec 2014 01:07:35 +0000 (02:07 +0100)]
update TODO

6 years agoimport: add new minimal tool "systemd-import" for pulling down foreign containers...
Lennart Poettering [Fri, 19 Dec 2014 00:59:52 +0000 (01:59 +0100)]
import: add new minimal tool "systemd-import" for pulling down foreign containers and install them locally

This adds a simply but powerful tool for downloading container images
from the most popular container solution used today. Use it like

       # systemd-import pull-dck mattdm/fedora
       # systemd-nspawn -M fedora

This will donwload the layers for "mattdm/fedora", and make them
available locally as /var/lib/container/fedora.

The tool is pretty complete, as long as it's only about pulling down
images, or updating them. Pushing or searching is not supported yet.

6 years agoutil: add generalization of verb parsing for command line tools
Lennart Poettering [Fri, 19 Dec 2014 00:48:05 +0000 (01:48 +0100)]
util: add generalization of verb parsing for command line tools

We should move loginctl, timedatectl, machinectl over to use this new
API instead of a manual one.

6 years agoutil: make sure rm_rf() can be called on symlinks (with the effect of deleting it)
Lennart Poettering [Fri, 19 Dec 2014 00:47:19 +0000 (01:47 +0100)]
util: make sure rm_rf() can be called on symlinks (with the effect of deleting it)

6 years agostrv: ass new strv_is_uniq() and strv_reverse() calls
Lennart Poettering [Fri, 19 Dec 2014 00:31:59 +0000 (01:31 +0100)]
strv: ass new strv_is_uniq() and strv_reverse() calls

6 years agoexecute: the runtime directory can only be on tmpfs, hence don't use rm_rf_dangerous...
Lennart Poettering [Fri, 19 Dec 2014 00:31:27 +0000 (01:31 +0100)]
execute: the runtime directory can only be on tmpfs, hence don't use rm_rf_dangerous() needlessly

6 years agonss-myhostname: introduce is_gateway() similar to the existing is_hostname()
Lennart Poettering [Thu, 18 Dec 2014 00:44:34 +0000 (01:44 +0100)]
nss-myhostname: introduce is_gateway() similar to the existing is_hostname()

6 years agoload-fragment: allow quoting in command name and document allowed escapes
Zbigniew Jędrzejewski-Szmek [Thu, 18 Dec 2014 23:08:13 +0000 (18:08 -0500)]
load-fragment: allow quoting in command name and document allowed escapes

The handling of the command name and other arguments is unified. This
simplifies things and should make them more predictable for users.
Incidentally, this makes ExecStart handling match the .desktop file
specification, apart for the requirment for an absolute path.

6 years agoTreat a trailing backslash as an error
Zbigniew Jędrzejewski-Szmek [Thu, 18 Dec 2014 22:51:38 +0000 (17:51 -0500)]
Treat a trailing backslash as an error

Commit a2a5291b3f5 changed the parser to reject unfinished quoted
strings. Unfortunately it introduced an error where a trailing
backslash would case an infinite loop. Of course this must fixed, but
the question is what to to instead. Allowing trailing backslashes and
treating them as normal characters would be one option, but this seems
suboptimal. First, there would be inconsistency between handling of
quoting and of backslashes. Second, a trailing backslash is most
likely an error, at it seems better to point it out to the user than
to try to continue.

Updated rules:
ExecStart=/bin/echo \\ → OK, prints a backslash
ExecStart=/bin/echo \ → error
ExecStart=/bin/echo "x → error
ExecStart=/bin/echo "x"y → error

6 years agotest-strv: use STRV_MAKE
Zbigniew Jędrzejewski-Szmek [Thu, 18 Dec 2014 22:01:42 +0000 (17:01 -0500)]
test-strv: use STRV_MAKE

6 years agotree-wide: make condition_free_list return NULL
Zbigniew Jędrzejewski-Szmek [Thu, 18 Dec 2014 17:33:05 +0000 (12:33 -0500)]
tree-wide: make condition_free_list return NULL

6 years agocore: make exec_command_free_list return NULL
Zbigniew Jędrzejewski-Szmek [Thu, 18 Dec 2014 17:29:24 +0000 (12:29 -0500)]
core: make exec_command_free_list return NULL

6 years agohwdb: move Logitech mouse to the right spot
Zbigniew Jędrzejewski-Szmek [Thu, 18 Dec 2014 23:42:04 +0000 (18:42 -0500)]
hwdb: move Logitech mouse to the right spot

6 years agohwdb: Logitech, Inc. RX 250 Optical Mouse DPI data
Erik Auerswald [Thu, 18 Dec 2014 23:46:29 +0000 (18:46 -0500)]
hwdb: Logitech, Inc. RX 250 Optical Mouse DPI data

6 years agohwdb: Logitech, Inc. RX 300 Optical Mouse DPI data
Tim JP [Thu, 18 Dec 2014 23:40:44 +0000 (18:40 -0500)]
hwdb: Logitech, Inc. RX 300 Optical Mouse DPI data

6 years agotest-cap-list: allow mismatch in case
Zbigniew Jędrzejewski-Szmek [Thu, 18 Dec 2014 22:40:32 +0000 (17:40 -0500)]
test-cap-list: allow mismatch in case

6 years agopath-util: fix breakage in path_is_mount_point
Dave Reisner [Thu, 18 Dec 2014 23:10:46 +0000 (18:10 -0500)]
path-util: fix breakage in path_is_mount_point

This fixes 2 problems introduced by 6feeeab0bc:

1) If name_to_handle_at returns ENOSYS for the child, we'll wrongly
return -ENOSYS when it returns the same for the parent. Immediately
jump to the fallback logic when we get ENOSYS.

2) If name_to_handle_at returns EOPNOTSUPP for the child but suceeds
for the parent, we'll be comparing an uninitialized value (mount_id) to
an initialized value (mount_id_parent). Initialize the mount_id
variables to invalid mount_ids to avoid this.

6 years agosystemd-hwdb: introduce new tool
Tom Gundersen [Mon, 15 Dec 2014 23:48:24 +0000 (00:48 +0100)]
systemd-hwdb: introduce new tool

This pulls out the hwdb managment from udevadm into an independent tool.

The old code is left in place for backwards compatibility, and easy of
testing, but all documentation is dropped to encourage use of the new
tool instead.

6 years agonetworkd: add FDB support
Alin Rauta [Wed, 17 Dec 2014 15:35:36 +0000 (07:35 -0800)]
networkd: add FDB support

6 years agojournal: next_with_matches() now does not need a mapped object as input
Michal Schmidt [Wed, 17 Dec 2014 14:46:30 +0000 (15:46 +0100)]
journal: next_with_matches() now does not need a mapped object as input

Now that journal_file_next_entry() does not need a pointer to the
current object, next_with_matches() does not need it either.

6 years agojournal: journal_file_next_entry() does not need pointer to current Object
Michal Schmidt [Wed, 17 Dec 2014 14:45:10 +0000 (15:45 +0100)]
journal: journal_file_next_entry() does not need pointer to current Object

The current offset is sufficient information.

6 years agojournal: optimize iteration by returning previously found candidate entry
Michal Schmidt [Wed, 17 Dec 2014 14:07:25 +0000 (15:07 +0100)]
journal: optimize iteration by returning previously found candidate entry

In next_beyond_location() when the JournalFile's location type is
LOCATION_SEEK, it means there's nothing to do, because we already have
the location of the candidate entry. Do an early return. Note that now
next_beyond_location() does not anymore guarantee on return that the
entry is mapped, but previous patches made sure the caller does not

This optimization is at least as good as "journal: optimize iteration:
skip files that cannot improve current candidate entry" was.

Timing results on my workstation, using:
$ time ./journalctl -q --since=2014-06-01 --until=2014-07-01 > /dev/null

Before "Revert "journal: optimize iteration: skip files that cannot
improve current candidate entry":

real    0m5.349s
user    0m5.166s
sys     0m0.181s


real    0m3.901s
user    0m3.724s
sys     0m0.176s

6 years agojournal: optimize iteration by skipping exhausted files
Michal Schmidt [Thu, 18 Dec 2014 13:21:55 +0000 (14:21 +0100)]
journal: optimize iteration by skipping exhausted files

If from a previous iteration we know we are at the end of a journal
file, don't bother looking into the file again. This is complicated by
the fact that the EOF does not have to be permanent (think of
"journalctl -f"). So we also check if the number of entries in the
journal file changed.

This optimization has a similar effect as "journal: optimize iteration:
skip whole files behind current location" had.

6 years agojournal: drop unnecessary parameters of next_beyond_location()
Michal Schmidt [Wed, 17 Dec 2014 14:37:52 +0000 (15:37 +0100)]
journal: drop unnecessary parameters of next_beyond_location()

offset is redundant, because the caller can rely on f->current_offset.
The object pointer the function saves in *ret is thrown away by the caller.

6 years agojournal: remove redundant variable new_offset
Michal Schmidt [Thu, 18 Dec 2014 08:56:04 +0000 (09:56 +0100)]
journal: remove redundant variable new_offset

The file's current_offset is already updated at this point, so let's use

6 years agojournal: compare candidate entries using JournalFiles' locations
Michal Schmidt [Wed, 17 Dec 2014 13:06:28 +0000 (14:06 +0100)]
journal: compare candidate entries using JournalFiles' locations

When comparing the locations of candidate entries, we can rely on the
location information stored in struct JournalFile.

6 years agojournal: simplify set_location()
Michal Schmidt [Tue, 16 Dec 2014 21:38:09 +0000 (22:38 +0100)]
journal: simplify set_location()

set_location() is called from real_journal_next() when a winning entry
has been picked from among the candidates in journal files.

The location type is always set to LOCATION_DISCRETE. No need to pass
it as a parameter.
The per-JournalFile location information is already updated at this
point. No need for having the direction and offset here.

6 years agojournal: keep per-JournalFile location info during iteration
Michal Schmidt [Tue, 16 Dec 2014 20:03:36 +0000 (21:03 +0100)]
journal: keep per-JournalFile location info during iteration

In next_beyond_location() when we find a candidate entry in a journal
file, save its location information in struct JournalFile.

The purpose of remembering the locations of candidate entries is to be
able to save work in the next iteration. This patch does only the
remembering part.

LOCATION_SEEK means the location identifies a candidate entry.
When a winner is picked from among candidates, it becomes
LOCATION_TAIL here signifies we've iterated the file to the end (or the
beginning in the case of reversed direction).

6 years agojournal: abstract the resetting of JournalFile's location
Michal Schmidt [Tue, 16 Dec 2014 19:54:56 +0000 (20:54 +0100)]
journal: abstract the resetting of JournalFile's location

6 years agojournal: move definition of LocationType to journal-file.h
Michal Schmidt [Tue, 16 Dec 2014 19:51:58 +0000 (20:51 +0100)]
journal: move definition of LocationType to journal-file.h

In preparation for individual JournalFiles maintaining a location
of their own.

6 years agoRevert "journal: optimize iteration: skip whole files behind current location"
Michal Schmidt [Tue, 16 Dec 2014 19:32:41 +0000 (20:32 +0100)]
Revert "journal: optimize iteration: skip whole files behind current location"

This reverts commit b7c88ab8cc7d55a43450bf3dea750f95f2e910d6.

This optimization will be made redundant by the following patches.

6 years agoRevert "journal: optimize iteration: skip files that cannot improve current candidate...
Michal Schmidt [Tue, 16 Dec 2014 19:32:34 +0000 (20:32 +0100)]
Revert "journal: optimize iteration: skip files that cannot improve current candidate entry"

This reverts commit f8b5a3b75fb55f0acb85c21424b3893c822742e9.

This optimization will be made redundant by the following patches.

6 years agojournal: delete unused function journal_file_skip_entry()
Michal Schmidt [Tue, 16 Dec 2014 14:47:01 +0000 (15:47 +0100)]
journal: delete unused function journal_file_skip_entry()

Its only caller is a test.

6 years agojournal: delete unused function journal_file_move_to_entry_by_offset()
Michal Schmidt [Tue, 16 Dec 2014 18:06:30 +0000 (19:06 +0100)]
journal: delete unused function journal_file_move_to_entry_by_offset()

6 years agocore: use raw_clone instead of fork in signal handler
Zbigniew Jędrzejewski-Szmek [Wed, 17 Dec 2014 04:53:23 +0000 (23:53 -0500)]
core: use raw_clone instead of fork in signal handler

fork() is not async-signal-safe and calling it from the signal handler
could result in a deadlock when at_fork() handlers are called. Using
the raw clone() syscall sidesteps that problem.

The tricky part is that raise() does not work, since getpid() does not
work. Add raw_getpid() to get the real pid, and use kill() instead of

6 years agotest-unit-file: add test for semicolon escaping
Zbigniew Jędrzejewski-Szmek [Thu, 18 Dec 2014 05:52:28 +0000 (00:52 -0500)]
test-unit-file: add test for semicolon escaping

6 years agoload-fragment: properly unescape \;
tomsod-m ya ru [Thu, 18 Dec 2014 04:01:06 +0000 (23:01 -0500)]
load-fragment: properly unescape \;

6 years agopath: make the check for unsupported name_to_handle_at symmetric
Zbigniew Jędrzejewski-Szmek [Thu, 18 Dec 2014 02:05:58 +0000 (21:05 -0500)]
path: make the check for unsupported name_to_handle_at symmetric

If child supports, but the parent does not, or when the child does
not support, but the parent does, assume the child is a mount point.

Only if neither supports use the fallback.

6 years agopath: follow symbolic link for parent path (2)
Umut Tezduyar Lindskog [Thu, 18 Dec 2014 00:43:58 +0000 (19:43 -0500)]
path: follow symbolic link for parent path (2)

c0e57ba9e22ee937722958d8b912ade2a37f206d fixed the fallback path.
We should do the same for name_to_handle_at().

6 years agomachinectl: add new commands for copying files from/to containers
Lennart Poettering [Thu, 18 Dec 2014 00:35:58 +0000 (01:35 +0100)]
machinectl: add new commands for copying files from/to containers

6 years agoutil: in make_stdio() use dup2() rather than dup3()
Lennart Poettering [Wed, 17 Dec 2014 20:54:00 +0000 (21:54 +0100)]
util: in make_stdio() use dup2() rather than dup3()

dup3() allows setting O_CLOEXEC which we are not interested in. However,
it also fails if called with the same fd as input and output, which is
something we don't want. Hence use dup2().

Also, we need to explicitly turn off O_CLOEXEC for the fds, in case the
input fd was O_CLOEXEC and < 3.

6 years agoupdate TODO
Lennart Poettering [Wed, 17 Dec 2014 20:53:54 +0000 (21:53 +0100)]
update TODO

6 years agomachinectl: implement "bind" command to create additional bind mounts from host to...
Lennart Poettering [Wed, 17 Dec 2014 20:51:45 +0000 (21:51 +0100)]
machinectl: implement "bind" command to create additional bind mounts from host to container during runtime

6 years agonspawn: fix invocation of the raw clone() system call on s390 and cris
Ken Werner [Tue, 16 Dec 2014 17:06:41 +0000 (18:06 +0100)]
nspawn: fix invocation of the raw clone() system call on s390 and cris

Since the order of the first and second arguments of the raw clone() system
call is reversed on s390 and cris it needs to be invoked differently.

6 years agohwdb: add Lenovo 3000 N200 special key
Marc Schmitzer [Wed, 17 Dec 2014 03:14:40 +0000 (22:14 -0500)]
hwdb: add Lenovo 3000 N200 special key

6 years agopath: follow symbolic link for parent path
Umut Tezduyar Lindskog [Tue, 16 Dec 2014 20:58:39 +0000 (21:58 +0100)]
path: follow symbolic link for parent path

[zj: When we lstat the target path, symlinks above the last component
     will be followed by both stat and lstat. So when we look at the
     parent, we should follow symlinks.]

6 years agoshared: strv - add strv_clear()
Tom Gundersen [Wed, 17 Dec 2014 00:08:56 +0000 (01:08 +0100)]
shared: strv - add strv_clear()

This frees the elements of the strv without freeing the strv itself.

6 years agoshared: path-util - memory leak
Tom Gundersen [Tue, 16 Dec 2014 21:24:54 +0000 (22:24 +0100)]
shared: path-util - memory leak

6 years agoudev: net_setup - fix warning
Tom Gundersen [Tue, 16 Dec 2014 20:49:06 +0000 (21:49 +0100)]
udev: net_setup - fix warning

6 years agotest-json: use fabs
Thomas Hindoe Paaboel Andersen [Tue, 16 Dec 2014 19:36:40 +0000 (20:36 +0100)]
test-json: use fabs

6 years agofix compiler warning
Susant Sahani [Tue, 16 Dec 2014 03:18:34 +0000 (08:48 +0530)]
fix compiler warning

src/shared/utf8.c:268:13: warning: unused variable 'd'
         int d;

6 years agosystemctl: fix argument handling when invoked as "shutdown"
Jan Synacek [Mon, 15 Dec 2014 09:39:00 +0000 (10:39 +0100)]
systemctl: fix argument handling when invoked as "shutdown"

6 years agonss-myhostname: also recognize "gateway."
Harald Hoyer [Mon, 15 Dec 2014 10:34:24 +0000 (11:34 +0100)]
nss-myhostname: also recognize "gateway."

"gateway." skips adding the domain search path and saves some queries to
the nameserver.

6 years agoUpdate TODO
Zbigniew Jędrzejewski-Szmek [Tue, 16 Dec 2014 05:22:58 +0000 (00:22 -0500)]
Update TODO

6 years agosystemctl: refuse to edit runtime dropins when they already exist in /etc
Zbigniew Jędrzejewski-Szmek [Tue, 16 Dec 2014 04:01:05 +0000 (23:01 -0500)]
systemctl: refuse to edit runtime dropins when they already exist in /etc

The check for existing unit files and dropins is unified.

path_join() is updated to not insert duplicate separators.

6 years agosystemctl: share path lookup between 'cat' and 'edit'
Zbigniew Jędrzejewski-Szmek [Sat, 13 Dec 2014 21:38:35 +0000 (16:38 -0500)]
systemctl: share path lookup between 'cat' and 'edit'

'systemctl cat' now works for templates too.

'systemctl edit' does not refuse to edit units that have changed on
disk. That restriction didn't seem useful, actually editing units that
have changed on disk before they are started is very reasonable.

'edit' with instances and templates works again:


$ build/systemctl edit getty@
Failed to copy /etc/systemd/system/getty@.service.d/override.conf to /etc/systemd/system/getty@.service.d/.override.confdff6290408c86369: Permission denied
$ build/systemctl edit getty@tty3
Failed to create directories for /etc/systemd/system/getty@tty3.service.d/override.conf: Permission denied
$ build/systemctl edit --full getty@tty3
Failed to copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/.getty@tty3.serviced3d175087e7e439b: Permission denied
Failed to create temporary file for /etc/systemd/system/getty@tty3.service: Permission denied
$ build/systemctl edit --full getty@
Failed to copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/.getty@.servicea3caad491c0f2f3d: Permission denied
Failed to create temporary file for /etc/systemd/system/getty@.service: Permission denied

6 years agosystemctl: split out LookupPaths initialization
Zbigniew Jędrzejewski-Szmek [Tue, 16 Dec 2014 05:28:43 +0000 (00:28 -0500)]
systemctl: split out LookupPaths initialization

6 years agosystemctl: move two functions up
Zbigniew Jędrzejewski-Szmek [Tue, 16 Dec 2014 05:28:41 +0000 (00:28 -0500)]
systemctl: move two functions up

No functional change.

6 years agosystemctl: unify warning about unit files changed on disk
Zbigniew Jędrzejewski-Szmek [Tue, 16 Dec 2014 04:28:38 +0000 (23:28 -0500)]
systemctl: unify warning about unit files changed on disk

6 years agosystemctl: do not use -1 for return code
Zbigniew Jędrzejewski-Szmek [Sat, 13 Dec 2014 17:43:07 +0000 (12:43 -0500)]
systemctl: do not use -1 for return code

Also make the error messages more specific to give a hint to the user
how to solve the problem.

6 years agoMove dropin listing to shared
Zbigniew Jędrzejewski-Szmek [Mon, 15 Dec 2014 04:12:40 +0000 (23:12 -0500)]
Move dropin listing to shared

No functional change. This is in preparation for using this in
systemctl in the future.

6 years agohwdb: Logitech MX1000, another Lenovo USB mouse
Peter Hutterer [Tue, 16 Dec 2014 05:08:07 +0000 (15:08 +1000)]
hwdb: Logitech MX1000, another Lenovo USB mouse

Provided by Benjamin Bellec

6 years agohwdb: more an entry for the MS Sculpt Ergonomic
Peter Hutterer [Thu, 11 Dec 2014 07:33:14 +0000 (17:33 +1000)]
hwdb: more an entry for the MS Sculpt Ergonomic

Note that the MS receivers likely work like the Logitech ones, i.e. all
devices connected show up with the same vid/pid/name. Full evidence remains to
be gathered.

6 years agoshared: add minimal JSON tokenizer
Lennart Poettering [Mon, 15 Dec 2014 21:26:56 +0000 (22:26 +0100)]
shared: add minimal JSON tokenizer

6 years agoudev: builtin-hwdb - port to sd-hwdb
Tom Gundersen [Mon, 15 Dec 2014 18:58:25 +0000 (19:58 +0100)]
udev: builtin-hwdb - port to sd-hwdb

6 years agoudevadm: port to sd-hwdb
Tom Gundersen [Mon, 15 Dec 2014 18:48:21 +0000 (19:48 +0100)]
udevadm: port to sd-hwdb