Prep v221: Update and clean up build system to sync with upstream This commit replays the moving around of source files that have been done between systemd-219 and systemd-221. Further the Makefile.am is synchronized with the upstream version and then "re-cleaned". A lot of functions, that are not used anywhere in elogind have been coated into #if 0/#endif directives to further shorten the list of dependencies. All unneeded files have been removed.
util: when creating temporary file names, allow including extra id string in it This adds a "char *extra" parameter to tempfn_xxxxxx(), tempfn_random(), tempfn_ranomd_child(). If non-NULL this string is included in the middle of the newly created file name. This is useful for being able to distuingish the kind of temporary file when we see one. This also adds tests for the three call. For now, we don't make use of this at all, but port all users over.
util: Introduce unquote_first_word_and_warn It will try to unquot_first_word, but if it runs into escaping problems it will retry it adding UNQUOTE_CUNESCAPE_RELAX to the flags. If it succeeds on the second try, it will log a warning about it. If it fails both times, it will log an error. Add test cases to confirm it behaves as expected.
util: New flag UNQUOTE_UNESCAPE_RELAX for unquote_first_word The new flag UNQUOTE_UNESCAPE_RELAX preserves unrecognized escape sequences verbatim in unquote_first_word, either when it's a trailing backslash (similar to UNQUOTE_RELAX, but in this case keep the extra backslash in the output) or in the middle of a sequence string. Add unit test cases to ensure the new flag works as expected and to prevent regressions from being introduced. Tested with a follow up commit converting config_parse_exec() to start using unquote_first_word, in which case this flags makes it possible to preserve unrecognized escape sequences. Relevant bug: https://bugs.freedesktop.org/show_bug.cgi?id=90794
util: split out signal-util.[ch] from util.[ch] No functional changes.
Compiling.
util: an array with one entry is always ordered
util: introduce PERSONALITY_INVALID as macro for 0xffffffffLU
util: introduce reset_uid_gid() for resetting all uids and gids to 0
core,nspawn: unify code that moves the root dir
util: split all hostname related calls into hostname-util.c
nspawn: allow access to device nodes listed in --bind= and --bind-ro= switches https://bugs.freedesktop.org/show_bug.cgi?id=90385
util: introduce memmem_safe() and make use of it GNU memmem() requires a nonnull first parameter. Let's introduce memmem_safe() that removes this restriction for zero-length parameters, and make use of it where appropriate. http://lists.freedesktop.org/archives/systemd-devel/2015-May/031705.html
util: use GNU comparison function prototype for qsort_safe()
nspawn: skip symlink to a combined cgroup hierarchy if it already exists If a symlink to a combined cgroup hierarchy already exists and points to the right path, skip it. This avoids an error when the cgroups are set manually before calling nspawn.
lockfile-util.[ch]: Split out from util.[ch] Continuing the general trend of splitting up util.[ch]. I specifically want to reuse this code in https://github.com/GNOME/libglnx and having it split up will make future copy-pasting easier.
shared: move replace_env* from util to env-util
shared: add terminal-util.[ch]
shared: add random-util.[ch]
shared: add formats-util.h