]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - meson.build
network: Allow to configure VLan egress qos maps
[thirdparty/systemd.git] / meson.build
index 75eb6fc1dc55d035583b0363f5314585f8d14b52..aedde9b94e9dc289b858650c04f3ccc00577bef0 100644 (file)
@@ -517,7 +517,7 @@ foreach ident : [
                                  #include <sys/stat.h>
                                  #include <unistd.h>'''],
         ['explicit_bzero' ,   '''#include <string.h>'''],
-        ['reallocarray',      '''#include <malloc.h>'''],
+        ['reallocarray',      '''#include <stdlib.h>'''],
         ['set_mempolicy',     '''#include <stdlib.h>
                                  #include <unistd.h>'''],
         ['get_mempolicy',     '''#include <stdlib.h>
@@ -667,9 +667,6 @@ if fallback_hostname == '' or fallback_hostname[0] == '.' or fallback_hostname[0
 endif
 conf.set_quoted('FALLBACK_HOSTNAME', fallback_hostname)
 
-conf.set10('ENABLE_COMPAT_GATEWAY_HOSTNAME', get_option('compat-gateway-hostname'))
-gateway_hostnames = ['_gateway'] + (conf.get('ENABLE_COMPAT_GATEWAY_HOSTNAME') == 1 ? ['gateway'] : [])
-
 default_hierarchy = get_option('default-hierarchy')
 conf.set_quoted('DEFAULT_HIERARCHY_NAME', default_hierarchy,
                 description : 'default cgroup hierarchy as string')
@@ -1059,6 +1056,8 @@ if want_libcryptsetup != 'false' and not skip_deps
                    have and cc.has_function('crypt_set_metadata_size', dependencies : libcryptsetup))
         conf.set10('HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY',
                    have and cc.has_function('crypt_activate_by_signed_key', dependencies : libcryptsetup))
+        conf.set10('HAVE_CRYPT_TOKEN_MAX',
+                   have and cc.has_function('crypt_token_max', dependencies : libcryptsetup))
 else
         have = false
         libcryptsetup = []
@@ -1117,6 +1116,7 @@ conf.set10('HAVE_LIBIPTC', have)
 want_qrencode = get_option('qrencode')
 if want_qrencode != 'false' and not skip_deps
         libqrencode = dependency('libqrencode',
+                                 version : '>= 4',
                                  required : want_qrencode == 'true')
         have = libqrencode.found()
 else
@@ -1187,6 +1187,17 @@ else
 endif
 conf.set10('HAVE_LIBFIDO2', have)
 
+want_tpm2 = get_option('tpm2')
+if want_tpm2 != 'false' and not skip_deps
+        tpm2 = dependency('tss2-esys tss2-rc tss2-mu',
+                              required : want_tpm2 == 'true')
+        have = tpm2.found()
+else
+        have = false
+        tpm2 = []
+endif
+conf.set10('HAVE_TPM2', have)
+
 want_elfutils = get_option('elfutils')
 if want_elfutils != 'false' and not skip_deps
         libdw = dependency('libdw',
@@ -1460,6 +1471,7 @@ foreach term : ['analyze',
                 'ima',
                 'initrd',
                 'compat-mutable-uid-boundaries',
+                'nscd',
                 'ldconfig',
                 'localed',
                 'logind',
@@ -1578,7 +1590,6 @@ includes = include_directories('src/basic',
                                'src/libsystemd/sd-netlink',
                                'src/libsystemd/sd-network',
                                'src/libsystemd/sd-resolve',
-                               'src/libudev',
                                'src/login',
                                'src/nspawn',
                                'src/resolve',
@@ -2273,8 +2284,7 @@ if conf.get('ENABLE_HOMED') == 1
                                 libcrypt,
                                 libopenssl,
                                 libfdisk,
-                                libp11kit,
-                                libfido2],
+                                libp11kit],
                 install_rpath : rootlibexecdir,
                 install : true,
                 install_dir : rootlibexecdir)
@@ -2300,7 +2310,6 @@ if conf.get('ENABLE_HOMED') == 1
                                 libcrypt,
                                 libopenssl,
                                 libp11kit,
-                                libfido2,
                                 libdl],
                 install_rpath : rootlibexecdir,
                 install : true,
@@ -2371,9 +2380,11 @@ executable(
 
 if conf.get('HAVE_LIBCRYPTSETUP') == 1
         systemd_cryptsetup_sources = files('''
-                src/cryptsetup/cryptsetup-pkcs11.h
+                src/cryptsetup/cryptsetup-fido2.h
                 src/cryptsetup/cryptsetup-keyfile.c
                 src/cryptsetup/cryptsetup-keyfile.h
+                src/cryptsetup/cryptsetup-pkcs11.h
+                src/cryptsetup/cryptsetup-tpm2.h
                 src/cryptsetup/cryptsetup.c
 '''.split())
 
@@ -2381,6 +2392,14 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                 systemd_cryptsetup_sources += files('src/cryptsetup/cryptsetup-pkcs11.c')
         endif
 
+        if conf.get('HAVE_LIBFIDO2') == 1
+                systemd_cryptsetup_sources += files('src/cryptsetup/cryptsetup-fido2.c')
+        endif
+
+        if conf.get('HAVE_TPM2') == 1
+                systemd_cryptsetup_sources += files('src/cryptsetup/cryptsetup-tpm2.c')
+        endif
+
         executable(
                 'systemd-cryptsetup',
                 systemd_cryptsetup_sources,
@@ -2419,6 +2438,47 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                 install_rpath : rootlibexecdir,
                 install : true,
                 install_dir : systemgeneratordir)
+
+        systemd_cryptenroll_sources = files('''
+                src/cryptenroll/cryptenroll-fido2.h
+                src/cryptenroll/cryptenroll-list.c
+                src/cryptenroll/cryptenroll-list.h
+                src/cryptenroll/cryptenroll-password.c
+                src/cryptenroll/cryptenroll-password.h
+                src/cryptenroll/cryptenroll-pkcs11.h
+                src/cryptenroll/cryptenroll-recovery.c
+                src/cryptenroll/cryptenroll-recovery.h
+                src/cryptenroll/cryptenroll-tpm2.h
+                src/cryptenroll/cryptenroll-wipe.c
+                src/cryptenroll/cryptenroll-wipe.h
+                src/cryptenroll/cryptenroll.c
+                src/cryptenroll/cryptenroll.h
+'''.split())
+
+        if conf.get('HAVE_P11KIT') == 1 and conf.get('HAVE_OPENSSL') == 1
+                systemd_cryptenroll_sources += files('src/cryptenroll/cryptenroll-pkcs11.c')
+        endif
+
+        if conf.get('HAVE_LIBFIDO2') == 1
+                systemd_cryptenroll_sources += files('src/cryptenroll/cryptenroll-fido2.c')
+        endif
+
+        if conf.get('HAVE_TPM2') == 1
+                systemd_cryptenroll_sources += files('src/cryptenroll/cryptenroll-tpm2.c')
+        endif
+
+        executable(
+                'systemd-cryptenroll',
+                systemd_cryptenroll_sources,
+                include_directories : includes,
+                link_with : [libshared],
+                dependencies : [libcryptsetup,
+                                libdl,
+                                libopenssl,
+                                libp11kit],
+                install_rpath : rootlibexecdir,
+                install : true,
+                install_dir : bindir)
 endif
 
 if conf.get('HAVE_SYSV_COMPAT') == 1
@@ -3163,7 +3223,7 @@ if conf.get('ENABLE_HWDB') == 1
                 'src/hwdb/hwdb.c',
                 'src/libsystemd/sd-hwdb/hwdb-internal.h',
                 include_directories : includes,
-                link_with : [libudev_static],
+                link_with : udev_link_with,
                 install_rpath : udev_rpath,
                 install : true,
                 install_dir : rootbindir)
@@ -3195,8 +3255,7 @@ public_programs += executable(
         udevadm_sources,
         c_args : '-DLOG_REALM=LOG_REALM_UDEV',
         include_directories : includes,
-        link_with : [libudev_core,
-                     libudev_static],
+        link_with : [libudevd_core],
         dependencies : [versiondep,
                         threads,
                         libkmod,
@@ -3275,7 +3334,6 @@ if conf.get('ENABLE_NETWORKD') == 1
                 include_directories : network_include_dir,
                 link_with : [libnetworkd_core,
                              libsystemd_network,
-                             libudev_static,
                              networkd_link_with],
                 dependencies : [threads],
                 install_rpath : rootlibexecdir,
@@ -3413,7 +3471,7 @@ endif
 exe = executable(
         'test-libudev-sym',
         test_libudev_sym_c,
-        include_directories : includes,
+        include_directories : libudev_includes,
         c_args : '-Wno-deprecated-declarations',
         link_with : [libudev],
         build_by_default : want_tests != 'false',
@@ -3426,7 +3484,7 @@ endif
 exe = executable(
         'test-libudev-static-sym',
         test_libudev_sym_c,
-        include_directories : includes,
+        include_directories : libudev_includes,
         c_args : '-Wno-deprecated-declarations',
         link_with : [install_libudev_static],
         build_by_default : want_tests != 'false' and static_libudev_pic,
@@ -3593,10 +3651,11 @@ endforeach
 
 if git.found()
         all_files = run_command(
+                'env', '-u', 'GIT_WORK_TREE',
                 git,
-                ['--git-dir=@0@/.git'.format(project_source_root),
-                 'ls-files',
-                 ':/*.[ch]'])
+                '--git-dir=@0@/.git'.format(project_source_root),
+                'ls-files', ':/*.[ch]')
+
         all_files = files(all_files.stdout().split())
 
         custom_target(
@@ -3686,7 +3745,6 @@ status = [
         'nobody user name:                  @0@'.format(nobody_user),
         'nobody group name:                 @0@'.format(nobody_group),
         'fallback hostname:                 @0@'.format(get_option('fallback-hostname')),
-        'symbolic gateway hostnames:        @0@'.format(', '.join(gateway_hostnames)),
 
         'default DNSSEC mode:               @0@'.format(default_dnssec),
         'default DNS-over-TLS mode:         @0@'.format(default_dns_over_tls),
@@ -3742,6 +3800,7 @@ foreach tuple : [
         ['libfdisk'],
         ['p11kit'],
         ['libfido2'],
+        ['tpm2'],
         ['AUDIT'],
         ['IMA'],
         ['AppArmor'],
@@ -3763,6 +3822,7 @@ foreach tuple : [
         ['idn'],
         ['initrd'],
         ['compat-mutable-uid-boundaries'],
+        ['nscd'],
         ['libidn2'],
         ['libidn'],
         ['libiptc'],