From ba081955fc57bf54b6a0434a8ea270d6729d21e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 15 Apr 2021 09:45:48 +0200 Subject: [PATCH 1/4] meson: reindent --- meson.build | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/meson.build b/meson.build index fa929370bd..69d4854e32 100644 --- a/meson.build +++ b/meson.build @@ -1232,7 +1232,7 @@ 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') + required : want_tpm2 == 'true') have = tpm2.found() else have = false @@ -2329,7 +2329,7 @@ if conf.get('ENABLE_HOMED') == 1 endif foreach alias : (['halt', 'poweroff', 'reboot', 'shutdown'] + - (conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : [])) + (conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : [])) meson.add_install_script(meson_make_symlink, join_paths(rootbindir, 'systemctl'), join_paths(rootsbindir, alias)) @@ -2750,14 +2750,14 @@ if conf.get('ENABLE_OOMD') == 1 install_dir : rootlibexecdir) public_programs += executable( - 'oomctl', - oomctl_sources, - include_directories : includes, - link_with : [libshared], - dependencies : [], - install_rpath : rootlibexecdir, - install : true, - install_dir : rootbindir) + 'oomctl', + oomctl_sources, + include_directories : includes, + link_with : [libshared], + dependencies : [], + install_rpath : rootlibexecdir, + install : true, + install_dir : rootbindir) endif if conf.get('ENABLE_BINFMT') == 1 @@ -3313,9 +3313,9 @@ custom_target( 'systemd-runtest.env', output : 'systemd-runtest.env', command : ['sh', '-c', '{ ' + - 'echo SYSTEMD_TEST_DATA=@0@; '.format(join_paths(project_source_root, 'test')) + - 'echo SYSTEMD_CATALOG_DIR=@0@; '.format(join_paths(project_build_root, 'catalog')) + - '} >@OUTPUT@'], + 'echo SYSTEMD_TEST_DATA=@0@; '.format(join_paths(project_source_root, 'test')) + + 'echo SYSTEMD_CATALOG_DIR=@0@; '.format(join_paths(project_build_root, 'catalog')) + + '} >@OUTPUT@'], build_by_default : true) # We intentionally do not do inline initializations with definitions for @@ -3814,9 +3814,9 @@ foreach tuple : [ ['pstore'], ['oomd'], ['polkit'], - ['legacy pkla', install_polkit_pkla], + ['legacy pkla', install_polkit_pkla], ['efi'], - ['gnu-efi', have_gnu_efi], + ['gnu-efi', have_gnu_efi], ['kmod'], ['xkbcommon'], ['pcre2'], @@ -3829,28 +3829,28 @@ foreach tuple : [ ['nss-systemd'], ['hwdb'], ['tpm'], - ['man pages', want_man], - ['html pages', want_html], - ['man page indices', want_man and have_lxml], + ['man pages', want_man], + ['html pages', want_html], + ['man page indices', want_man and have_lxml], ['SysV compat'], ['utmp'], ['ldconfig'], ['hibernate'], - ['adm group', get_option('adm-group')], - ['wheel group', get_option('wheel-group')], + ['adm group', get_option('adm-group')], + ['wheel group', get_option('wheel-group')], ['gshadow'], ['debug hashmap'], ['debug mmap cache'], ['debug siphash'], - ['valgrind', conf.get('VALGRIND') == 1], - ['trace logging', conf.get('LOG_TRACE') == 1], - ['install tests', install_tests], + ['valgrind', conf.get('VALGRIND') == 1], + ['trace logging', conf.get('LOG_TRACE') == 1], + ['install tests', install_tests], ['link-udev-shared', get_option('link-udev-shared')], ['link-systemctl-shared', get_option('link-systemctl-shared')], ['link-networkd-shared', get_option('link-networkd-shared')], ['link-timesyncd-shared', get_option('link-timesyncd-shared')], ['kernel-install', get_option('kernel-install')], - ['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1], + ['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1], ['fexecve'], ['standalone-binaries', get_option('standalone-binaries')], ] From c716c2537ff6d11d60a3ceee0752ff8b9f647ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 15 Apr 2021 09:56:06 +0200 Subject: [PATCH 2/4] meson: fold static libsystemd and libudev into the generic status line It's a very specialized feature and we don't need to devote a separate line to it. --- meson.build | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 69d4854e32..da0e71fe1f 100644 --- a/meson.build +++ b/meson.build @@ -3724,10 +3724,6 @@ alt_time_epoch = run_command('date', '-Is', '-u', '-d', status += [ 'time epoch: @0@ (@1@)'.format(time_epoch, alt_time_epoch)] -status += [ - 'static libsystemd: @0@'.format(static_libsystemd), - 'static libudev: @0@'.format(static_libudev)] - # TODO: # CFLAGS: ${OUR_CFLAGS} ${CFLAGS} # CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS} @@ -3869,6 +3865,18 @@ foreach tuple : [ endif endforeach +if static_libsystemd == 'false' + missing += 'static-libsystemd' +else + found += 'static-libsystemd(@0@)'.format(static_libsystemd) +endif + +if static_libudev == 'false' + missing += 'static-libudev' +else + found += 'static-libudev(@0@)'.format(static_libudev) +endif + status += [ '', 'enabled features: @0@'.format(', '.join(found)), From 56d68e715b7eaed3fff9980349409f74e22b6cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 15 Apr 2021 10:59:03 +0200 Subject: [PATCH 3/4] meson: reorder the "features" list Try to make this more manageable by reording: - dependencies / inputs (with subcategory of compression libraries) - major components / outputs - optional features / conditionals that don't fit into the two above categories The division isn't well defined, because libraries often correspond one-to-one to feature, but not always. --- meson.build | 139 +++++++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 66 deletions(-) diff --git a/meson.build b/meson.build index da0e71fe1f..8a11e09189 100644 --- a/meson.build +++ b/meson.build @@ -3746,92 +3746,101 @@ found = [] missing = [] foreach tuple : [ - ['libcryptsetup'], - ['PAM'], - ['pwquality'], - ['libfdisk'], - ['p11kit'], - ['libfido2'], - ['tpm2'], + # dependencies + ['ACL'], ['AUDIT'], - ['IMA'], ['AppArmor'], - ['SELinux'], + ['IMA'], + ['PAM'], ['SECCOMP'], + ['SELinux'], ['SMACK'], - ['zlib'], - ['xz'], + ['blkid'], + ['elfutils'], + ['gcrypt'], + ['gnutls'], + ['libcryptsetup'], + ['libcurl'], + ['libfdisk'], + ['libfido2'], + ['libidn'], + ['libidn2'], + ['libiptc'], + ['microhttpd'], + ['openssl'], + ['p11kit'], + ['pcre2'], + ['pwquality'], + ['qrencode'], + ['tpm2'], + ['xkbcommon'], + + # compression libs ['zstd'], ['lz4'], + ['xz'], + ['zlib'], ['bzip2'], - ['ACL'], - ['gcrypt'], - ['qrencode'], - ['microhttpd'], - ['gnutls'], - ['openssl'], - ['libcurl'], - ['idn'], - ['initrd'], - ['compat-mutable-uid-boundaries'], - ['nscd'], - ['libidn2'], - ['libidn'], - ['libiptc'], - ['elfutils'], - ['binfmt'], - ['repart'], - ['vconsole'], - ['quotacheck'], - ['tmpfiles'], - ['environment.d'], - ['sysusers'], - ['firstboot'], - ['randomseed'], + + # components ['backlight'], - ['rfkill'], - ['xdg-autostart'], - ['logind'], - ['machined'], - ['portabled'], - ['sysext'], - ['userdb'], - ['homed'], - ['importd'], - ['hostnamed'], - ['timedated'], - ['timesyncd'], - ['localed'], - ['networkd'], - ['resolve'], - ['DNS-over-TLS(gnutls)', conf.get('DNS_OVER_TLS_USE_GNUTLS') == 1], - ['DNS-over-TLS(openssl)', conf.get('DNS_OVER_TLS_USE_OPENSSL') == 1], + ['binfmt'], ['coredump'], - ['pstore'], - ['oomd'], - ['polkit'], - ['legacy pkla', install_polkit_pkla], + ['environment.d'], ['efi'], ['gnu-efi', have_gnu_efi], - ['kmod'], - ['xkbcommon'], - ['pcre2'], - ['blkid'], - ['dbus'], - ['glib'], + ['firstboot'], + ['hibernate'], + ['homed'], + ['hostnamed'], + ['hwdb'], + ['importd'], + ['initrd'], + ['kernel-install', get_option('kernel-install')], + ['localed'], + ['logind'], + ['machined'], + ['networkd'], ['nss-myhostname'], ['nss-mymachines'], ['nss-resolve'], ['nss-systemd'], - ['hwdb'], + ['oomd'], + ['portabled'], + ['pstore'], + ['quotacheck'], + ['randomseed'], + ['repart'], + ['resolve'], + ['rfkill'], + ['sysext'], + ['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1], + ['sysusers'], + ['timedated'], + ['timesyncd'], + ['tmpfiles'], + ['userdb'], + ['vconsole'], + ['xdg-autostart'], + + # optional features + ['DNS-over-TLS(gnutls)', conf.get('DNS_OVER_TLS_USE_GNUTLS') == 1], + ['DNS-over-TLS(openssl)', conf.get('DNS_OVER_TLS_USE_OPENSSL') == 1], + ['idn'], + ['polkit'], + ['nscd'], + ['legacy-pkla', install_polkit_pkla], + ['kmod'], + ['dbus'], + ['glib'], ['tpm'], ['man pages', want_man], ['html pages', want_html], ['man page indices', want_man and have_lxml], ['SysV compat'], + ['compat-mutable-uid-boundaries'], ['utmp'], ['ldconfig'], - ['hibernate'], ['adm group', get_option('adm-group')], ['wheel group', get_option('wheel-group')], ['gshadow'], @@ -3845,8 +3854,6 @@ foreach tuple : [ ['link-systemctl-shared', get_option('link-systemctl-shared')], ['link-networkd-shared', get_option('link-networkd-shared')], ['link-timesyncd-shared', get_option('link-timesyncd-shared')], - ['kernel-install', get_option('kernel-install')], - ['systemd-analyze', conf.get('ENABLE_ANALYZE') == 1], ['fexecve'], ['standalone-binaries', get_option('standalone-binaries')], ] From 237f2da9d4190f448ac955c593cbd085ea0d0f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 15 Apr 2021 11:04:14 +0200 Subject: [PATCH 4/4] meson: output one "item" for DNS-over-TLS --- meson.build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 8a11e09189..bf9b343090 100644 --- a/meson.build +++ b/meson.build @@ -3824,8 +3824,6 @@ foreach tuple : [ ['xdg-autostart'], # optional features - ['DNS-over-TLS(gnutls)', conf.get('DNS_OVER_TLS_USE_GNUTLS') == 1], - ['DNS-over-TLS(openssl)', conf.get('DNS_OVER_TLS_USE_OPENSSL') == 1], ['idn'], ['polkit'], ['nscd'], @@ -3884,6 +3882,14 @@ else found += 'static-libudev(@0@)'.format(static_libudev) endif +if conf.get('DNS_OVER_TLS_USE_GNUTLS') == 1 + found += 'DNS-over-TLS(gnutls)' +elif conf.get('DNS_OVER_TLS_USE_OPENSSL') == 1 + found += 'DNS-over-TLS(openssl)' +else + missing += 'DNS-over-TLS' +endif + status += [ '', 'enabled features: @0@'.format(', '.join(found)),