]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - meson.build
machine: ignore containers which disable private user namespace in MapToMachine{User...
[thirdparty/systemd.git] / meson.build
index 48851d4af2eab4f4392f7875cbea5ea29cd63247..c62d2afccd8a0407ccf2133f484557a3238d0f21 100644 (file)
@@ -302,7 +302,6 @@ possible_cc_flags = [
         '-Wold-style-definition',
         '-Wpointer-arith',
         '-Winit-self',
-        '-Wdeclaration-after-statement',
         '-Wfloat-equal',
         '-Wsuggest-attribute=noreturn',
         '-Werror=missing-prototypes',
@@ -320,6 +319,8 @@ possible_cc_flags = [
         '-Wstrict-aliasing=2',
         '-Wwrite-strings',
         '-Werror=overflow',
+        '-Werror=shift-count-overflow',
+        '-Werror=shift-overflow=2',
         '-Wdate-time',
         '-Wnested-externs',
         '-ffast-math',
@@ -365,7 +366,7 @@ endif
 add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')
 
 # "negative" arguments: gcc on purpose does not return an error for "-Wno-"
-# arguments, just emits a warnings. So test for the "positive" version instead.
+# arguments, just emits a warning. So test for the "positive" version instead.
 foreach arg : ['unused-parameter',
                'missing-field-initializers',
                'unused-result',
@@ -1136,6 +1137,18 @@ conf.set('DEFAULT_DNSSEC_MODE',
          'DNSSEC_' + default_dnssec.underscorify().to_upper())
 substs.set('DEFAULT_DNSSEC_MODE', default_dnssec)
 
+default_private_dns = get_option('default-private-dns')
+if fuzzer_build
+        default_private_dns = 'no'
+endif
+if default_private_dns != 'no' and conf.get('HAVE_GNUTLS') == 0
+        message('default-private-dns cannot be set to strict or opportunistic when gnutls is disabled. Setting default-private-dns to no.')
+        default_private_dns = 'no'
+endif
+conf.set('DEFAULT_PRIVATE_DNS_MODE',
+         'PRIVATE_DNS_' + default_private_dns.underscorify().to_upper())
+substs.set('DEFAULT_PRIVATE_DNS_MODE', default_private_dns)
+
 want_importd = get_option('importd')
 if want_importd != 'false'
         have = (conf.get('HAVE_LIBCURL') == 1 and
@@ -1258,6 +1271,8 @@ includes = include_directories('src/basic',
                                'src/shared',
                                'src/systemd',
                                'src/journal',
+                               'src/journal-remote',
+                               'src/nspawn',
                                'src/resolve',
                                'src/timesync',
                                'src/time-wait-sync',
@@ -1582,6 +1597,7 @@ if conf.get('ENABLE_RESOLVE') == 1
                                 libbasic_gcrypt,
                                 libsystemd_resolve_core],
                    dependencies : [threads,
+                                   libgnutls,
                                    libgpg_error,
                                    libm,
                                    libidn],
@@ -1706,9 +1722,19 @@ exe = executable('systemd-socket-activate', 'src/activate/activate.c',
                  install : true)
 public_programs += [exe]
 
+
+if get_option('link-systemctl-shared')
+        systemctl_link_with = [libshared]
+else
+        systemctl_link_with = [libsystemd_static,
+                               libshared_static,
+                               libjournal_client,
+                               libbasic_gcrypt]
+endif
+
 exe = executable('systemctl', 'src/systemctl/systemctl.c',
                  include_directories : includes,
-                 link_with : [libshared],
+                 link_with : systemctl_link_with,
                  dependencies : [threads,
                                  libcap,
                                  libselinux,
@@ -2006,7 +2032,8 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
         s_j_remote = executable('systemd-journal-remote',
                                 systemd_journal_remote_sources,
                                 include_directories : includes,
-                                link_with : [libshared],
+                                link_with : [libshared,
+                                             libsystemd_journal_remote],
                                 dependencies : [threads,
                                                 libmicrohttpd,
                                                 libgnutls,
@@ -2461,12 +2488,10 @@ exe = executable('systemd-nspawn',
                  'src/core/mount-setup.h',
                  'src/core/loopback-setup.c',
                  'src/core/loopback-setup.h',
-                 include_directories : [includes, include_directories('src/nspawn')],
-                 link_with : [libshared],
-                 dependencies : [libacl,
-                                 libblkid,
-                                 libseccomp,
-                                 libselinux],
+                 include_directories : includes,
+                 link_with : [libnspawn_core,
+                              libshared],
+                 dependencies : [libblkid],
                  install_rpath : rootlibexecdir,
                  install : true)
 public_programs += [exe]
@@ -2845,6 +2870,7 @@ status = [
         'symbolic gateway hostnames:        @0@'.format(', '.join(gateway_hostnames)),
 
         'default DNSSEC mode:               @0@'.format(default_dnssec),
+        'default private DNS mode:          @0@'.format(default_private_dns),
         'default cgroup hierarchy:          @0@'.format(default_hierarchy),
         'default KillUserProcesses setting: @0@'.format(kill_user_processes)]