From 359b496f66179f4cf56e13202f7149f6fc348859 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 25 Nov 2017 20:35:24 +0900 Subject: [PATCH 1/2] meson: remove abbreviations in status --- meson.build | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/meson.build b/meson.build index fd38923b0d..6926880b29 100644 --- a/meson.build +++ b/meson.build @@ -2444,23 +2444,23 @@ endif status = [ '@0@ @1@'.format(meson.project_name(), meson.project_version()), - 'prefix: @0@'.format(prefixdir), - 'rootprefix: @0@'.format(rootprefixdir), - 'sysconf dir: @0@'.format(sysconfdir), - 'includedir: @0@'.format(includedir), - 'lib dir: @0@'.format(libdir), - 'rootlib dir: @0@'.format(rootlibdir), + 'prefix directory: @0@'.format(prefixdir), + 'rootprefix directory: @0@'.format(rootprefixdir), + 'sysconf directory: @0@'.format(sysconfdir), + 'include directory: @0@'.format(includedir), + 'lib directory: @0@'.format(libdir), + 'rootlib directory: @0@'.format(rootlibdir), 'SysV init scripts: @0@'.format(sysvinit_path), 'SysV rc?.d directories: @0@'.format(sysvrcnd_path), - 'PAM modules dir: @0@'.format(pamlibdir), - 'PAM configuration dir: @0@'.format(pamconfdir), - 'RPM macros dir: @0@'.format(rpmmacrosdir), - 'modprobe.d dir: @0@'.format(modprobedir), - 'D-Bus policy dir: @0@'.format(dbuspolicydir), - 'D-Bus session dir: @0@'.format(dbussessionservicedir), - 'D-Bus system dir: @0@'.format(dbussystemservicedir), - 'bash completions dir: @0@'.format(bashcompletiondir), - 'zsh completions dir: @0@'.format(zshcompletiondir), + 'PAM modules directory: @0@'.format(pamlibdir), + 'PAM configuration directory: @0@'.format(pamconfdir), + 'RPM macros directory: @0@'.format(rpmmacrosdir), + 'modprobe.d directory: @0@'.format(modprobedir), + 'D-Bus policy directory: @0@'.format(dbuspolicydir), + 'D-Bus session directory: @0@'.format(dbussessionservicedir), + 'D-Bus system directory: @0@'.format(dbussystemservicedir), + 'bash completions directory: @0@'.format(bashcompletiondir), + 'zsh completions directory: @0@'.format(zshcompletiondir), 'extra start script: @0@'.format(get_option('rc-local')), 'extra stop script: @0@'.format(get_option('halt-local')), 'debug shell: @0@ @ @1@'.format(get_option('debug-shell'), @@ -2470,7 +2470,7 @@ status = [ 'maximum system GID: @0@'.format(system_gid_max), '/dev/kvm access mode: @0@'.format(get_option('dev-kvm-mode')), 'render group access mode: @0@'.format(get_option('group-render-mode')), - 'certificate root: @0@'.format(get_option('certificate-root')), + 'certificate root directory: @0@'.format(get_option('certificate-root')), 'support URL: @0@'.format(support_url), 'nobody user name: @0@'.format(get_option('nobody-user')), 'nobody group name: @0@'.format(get_option('nobody-group')), @@ -2505,9 +2505,9 @@ if conf.get('ENABLE_EFI') == 1 status += [ 'EFI machine type: @0@'.format(EFI_MACHINE_TYPE_NAME), 'EFI CC @0@'.format(efi_cc), - 'EFI libdir: @0@'.format(efi_libdir), - 'EFI ldsdir: @0@'.format(efi_ldsdir), - 'EFI includedir: @0@'.format(efi_incdir)] + 'EFI lib directory: @0@'.format(efi_libdir), + 'EFI lds directory: @0@'.format(efi_ldsdir), + 'EFI include directory: @0@'.format(efi_incdir)] endif endif From 62b1e758d33c8e05ee695097f94c44f576813233 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 25 Nov 2017 21:11:04 +0900 Subject: [PATCH 2/2] nspawn: adjust path to static resolv.conf to support split usr Fixes #7302. --- src/nspawn/nspawn.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index d6e4ec2e3c..63a55e85ac 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -108,6 +108,12 @@ #include "user-util.h" #include "util.h" +#if HAVE_SPLIT_USR +#define STATIC_RESOLV_CONF "/lib/systemd/resolv.conf" +#else +#define STATIC_RESOLV_CONF "/usr/lib/systemd/resolv.conf" +#endif + /* nspawn is listening on the socket at the path in the constant nspawn_notify_socket_path * nspawn_notify_socket_path is relative to the container * the init process in the container pid can send messages to nspawn following the sd_notify(3) protocol */ @@ -1406,7 +1412,7 @@ static int setup_resolv_conf(const char *dest) { return 0; } - if (access("/usr/lib/systemd/resolv.conf", F_OK) >= 0 && + if (access(STATIC_RESOLV_CONF, F_OK) >= 0 && resolved_listening() > 0) { /* resolved is enabled on the host. In this, case bind mount its static resolv.conf file into the @@ -1418,7 +1424,7 @@ static int setup_resolv_conf(const char *dest) { if (found == 0) /* missing? */ (void) touch(resolved); - r = mount_verbose(LOG_DEBUG, "/usr/lib/systemd/resolv.conf", resolved, NULL, MS_BIND, NULL); + r = mount_verbose(LOG_DEBUG, STATIC_RESOLV_CONF, resolved, NULL, MS_BIND, NULL); if (r >= 0) return mount_verbose(LOG_ERR, NULL, resolved, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY|MS_NOSUID|MS_NODEV, NULL); }