mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
meson: use jinja2 for various files in src/core/
This commit is contained in:
parent
ba29ee4cc0
commit
e11a25cadb
@ -21,7 +21,8 @@ libudev_version = '1.7.1'
|
|||||||
# names, sometimes. Not all variables are included in every
|
# names, sometimes. Not all variables are included in every
|
||||||
# set. Ugh, ugh, ugh!
|
# set. Ugh, ugh, ugh!
|
||||||
conf = configuration_data()
|
conf = configuration_data()
|
||||||
conf.set('PROJECT_VERSION', meson.project_version(),
|
conf.set_quoted('PROJECT_URL', 'https://www.freedesktop.org/wiki/Software/systemd')
|
||||||
|
conf.set('PROJECT_VERSION', meson.project_version(),
|
||||||
description : 'Numerical project version (used where a simple number is expected)')
|
description : 'Numerical project version (used where a simple number is expected)')
|
||||||
|
|
||||||
substs = configuration_data()
|
substs = configuration_data()
|
||||||
@ -219,6 +220,7 @@ endif
|
|||||||
memory_accounting_default = get_option('memory-accounting-default')
|
memory_accounting_default = get_option('memory-accounting-default')
|
||||||
status_unit_format_default = get_option('status-unit-format-default')
|
status_unit_format_default = get_option('status-unit-format-default')
|
||||||
|
|
||||||
|
conf.set_quoted('SYSCONF_DIR', sysconfdir)
|
||||||
conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir)
|
conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir)
|
||||||
conf.set_quoted('SYSTEM_CONFIG_UNIT_DIR', join_paths(pkgsysconfdir, 'system'))
|
conf.set_quoted('SYSTEM_CONFIG_UNIT_DIR', join_paths(pkgsysconfdir, 'system'))
|
||||||
conf.set_quoted('SYSTEM_DATA_UNIT_DIR', systemunitdir)
|
conf.set_quoted('SYSTEM_DATA_UNIT_DIR', systemunitdir)
|
||||||
@ -290,6 +292,7 @@ conf.set_quoted('SYSTEMD_USERWORK_PATH', join_paths(rootlib
|
|||||||
conf.set10('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default)
|
conf.set10('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default)
|
||||||
conf.set_quoted('MEMORY_ACCOUNTING_DEFAULT_YES_NO', memory_accounting_default ? 'yes' : 'no')
|
conf.set_quoted('MEMORY_ACCOUNTING_DEFAULT_YES_NO', memory_accounting_default ? 'yes' : 'no')
|
||||||
conf.set('STATUS_UNIT_FORMAT_DEFAULT', 'STATUS_UNIT_FORMAT_' + status_unit_format_default.to_upper())
|
conf.set('STATUS_UNIT_FORMAT_DEFAULT', 'STATUS_UNIT_FORMAT_' + status_unit_format_default.to_upper())
|
||||||
|
conf.set_quoted('STATUS_UNIT_FORMAT_DEFAULT_STR', status_unit_format_default)
|
||||||
|
|
||||||
substs.set('prefix', prefixdir)
|
substs.set('prefix', prefixdir)
|
||||||
substs.set('rootprefix', rootprefixdir)
|
substs.set('rootprefix', rootprefixdir)
|
||||||
|
@ -174,21 +174,23 @@ core_includes = [includes, include_directories('.')]
|
|||||||
|
|
||||||
systemd_sources = files('main.c')
|
systemd_sources = files('main.c')
|
||||||
|
|
||||||
in_files = [['system.conf', pkgsysconfdir],
|
in_files = [['system.conf', pkgsysconfdir],
|
||||||
['user.conf', pkgsysconfdir],
|
['user.conf', pkgsysconfdir],
|
||||||
['systemd.pc', pkgconfigdatadir]]
|
['systemd.pc', pkgconfigdatadir],
|
||||||
|
['org.freedesktop.systemd1.policy', polkitpolicydir]]
|
||||||
|
|
||||||
foreach item : in_files
|
foreach item : in_files
|
||||||
file = item[0]
|
file = item[0]
|
||||||
dir = item[1]
|
dir = item[1]
|
||||||
if install_sysconfdir_samples or dir != pkgsysconfdir
|
|
||||||
configure_file(
|
|
||||||
input : file + '.in',
|
|
||||||
output : file,
|
|
||||||
configuration : substs,
|
|
||||||
install_dir : dir == 'no' ? '' : dir)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
custom_target(
|
||||||
|
file,
|
||||||
|
input : file + '.in',
|
||||||
|
output: file,
|
||||||
|
command : [meson_render_jinja2, config_h, '@INPUT@'],
|
||||||
|
capture : true,
|
||||||
|
install : dir != 'no',
|
||||||
|
install_dir : dir)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
install_data('org.freedesktop.systemd1.conf',
|
install_data('org.freedesktop.systemd1.conf',
|
||||||
@ -196,13 +198,6 @@ install_data('org.freedesktop.systemd1.conf',
|
|||||||
install_data('org.freedesktop.systemd1.service',
|
install_data('org.freedesktop.systemd1.service',
|
||||||
install_dir : dbussystemservicedir)
|
install_dir : dbussystemservicedir)
|
||||||
|
|
||||||
policy = configure_file(
|
|
||||||
input : 'org.freedesktop.systemd1.policy.in',
|
|
||||||
output : 'org.freedesktop.systemd1.policy',
|
|
||||||
configuration : substs)
|
|
||||||
install_data(policy,
|
|
||||||
install_dir : polkitpolicydir)
|
|
||||||
|
|
||||||
meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
|
meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
|
||||||
meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
|
meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
|
||||||
meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
|
meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<allow_inactive>no</allow_inactive>
|
<allow_inactive>no</allow_inactive>
|
||||||
<allow_active>auth_admin_keep</allow_active>
|
<allow_active>auth_admin_keep</allow_active>
|
||||||
</defaults>
|
</defaults>
|
||||||
<annotate key="org.freedesktop.policykit.exec.path">@rootlibexecdir@/systemd-reply-password</annotate>
|
<annotate key="org.freedesktop.policykit.exec.path">{{ROOTLIBEXECDIR}}/systemd-reply-password</annotate>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action id="org.freedesktop.systemd1.manage-units">
|
<action id="org.freedesktop.systemd1.manage-units">
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#NoNewPrivileges=no
|
#NoNewPrivileges=no
|
||||||
#SystemCallArchitectures=
|
#SystemCallArchitectures=
|
||||||
#TimerSlackNSec=
|
#TimerSlackNSec=
|
||||||
#StatusUnitFormat=@STATUS_UNIT_FORMAT_DEFAULT@
|
#StatusUnitFormat={{STATUS_UNIT_FORMAT_DEFAULT_STR}}
|
||||||
#DefaultTimerAccuracySec=1min
|
#DefaultTimerAccuracySec=1min
|
||||||
#DefaultStandardOutput=journal
|
#DefaultStandardOutput=journal
|
||||||
#DefaultStandardError=inherit
|
#DefaultStandardError=inherit
|
||||||
@ -52,7 +52,7 @@
|
|||||||
#DefaultIOAccounting=no
|
#DefaultIOAccounting=no
|
||||||
#DefaultIPAccounting=no
|
#DefaultIPAccounting=no
|
||||||
#DefaultBlockIOAccounting=no
|
#DefaultBlockIOAccounting=no
|
||||||
#DefaultMemoryAccounting=@MEMORY_ACCOUNTING_DEFAULT@
|
#DefaultMemoryAccounting={{ 'yes' if MEMORY_ACCOUNTING_DEFAULT else 'no' }}
|
||||||
#DefaultTasksAccounting=yes
|
#DefaultTasksAccounting=yes
|
||||||
#DefaultTasksMax=15%
|
#DefaultTasksMax=15%
|
||||||
#DefaultLimitCPU=
|
#DefaultLimitCPU=
|
||||||
@ -61,7 +61,7 @@
|
|||||||
#DefaultLimitSTACK=
|
#DefaultLimitSTACK=
|
||||||
#DefaultLimitCORE=
|
#DefaultLimitCORE=
|
||||||
#DefaultLimitRSS=
|
#DefaultLimitRSS=
|
||||||
#DefaultLimitNOFILE=1024:@HIGH_RLIMIT_NOFILE@
|
#DefaultLimitNOFILE=1024:{{HIGH_RLIMIT_NOFILE}}
|
||||||
#DefaultLimitAS=
|
#DefaultLimitAS=
|
||||||
#DefaultLimitNPROC=
|
#DefaultLimitNPROC=
|
||||||
#DefaultLimitMEMLOCK=
|
#DefaultLimitMEMLOCK=
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
# shall have underscores.
|
# shall have underscores.
|
||||||
|
|
||||||
prefix=/usr
|
prefix=/usr
|
||||||
root_prefix=@rootprefix_noslash@
|
root_prefix={{ROOTPREFIX_NOSLASH}}
|
||||||
rootprefix=${root_prefix}
|
rootprefix=${root_prefix}
|
||||||
sysconf_dir=@sysconfdir@
|
sysconf_dir={{SYSCONF_DIR}}
|
||||||
sysconfdir=${sysconf_dir}
|
sysconfdir=${sysconf_dir}
|
||||||
|
|
||||||
systemd_util_dir=${root_prefix}/lib/systemd
|
systemd_util_dir=${root_prefix}/lib/systemd
|
||||||
@ -80,22 +80,22 @@ modulesloaddir=${modules_load_dir}
|
|||||||
catalog_dir=${prefix}/lib/systemd/catalog
|
catalog_dir=${prefix}/lib/systemd/catalog
|
||||||
catalogdir=${catalog_dir}
|
catalogdir=${catalog_dir}
|
||||||
|
|
||||||
system_uid_max=@SYSTEM_UID_MAX@
|
system_uid_max={{SYSTEM_UID_MAX}}
|
||||||
systemuidmax=${system_uid_max}
|
systemuidmax=${system_uid_max}
|
||||||
system_gid_max=@SYSTEM_GID_MAX@
|
system_gid_max={{SYSTEM_GID_MAX}}
|
||||||
systemgidmax=${system_gid_max}
|
systemgidmax=${system_gid_max}
|
||||||
|
|
||||||
dynamic_uid_min=@dynamicuidmin@
|
dynamic_uid_min={{DYNAMIC_UID_MIN}}
|
||||||
dynamicuidmin=${dynamic_uid_min}
|
dynamicuidmin=${dynamic_uid_min}
|
||||||
dynamic_uid_max=@dynamicuidmax@
|
dynamic_uid_max={{DYNAMIC_UID_MAX}}
|
||||||
dynamicuidmax=${dynamic_uid_max}
|
dynamicuidmax=${dynamic_uid_max}
|
||||||
|
|
||||||
container_uid_base_min=@containeruidbasemin@
|
container_uid_base_min={{CONTAINER_UID_BASE_MIN}}
|
||||||
containeruidbasemin=${container_uid_base_min}
|
containeruidbasemin=${container_uid_base_min}
|
||||||
container_uid_base_max=@containeruidbasemax@
|
container_uid_base_max={{CONTAINER_UID_BASE_MAX}}
|
||||||
containeruidbasemax=${container_uid_base_max}
|
containeruidbasemax=${container_uid_base_max}
|
||||||
|
|
||||||
Name: systemd
|
Name: systemd
|
||||||
Description: systemd System and Service Manager
|
Description: systemd System and Service Manager
|
||||||
URL: @PROJECT_URL@
|
URL: {{PROJECT_URL}}
|
||||||
Version: @PROJECT_VERSION@
|
Version: {{PROJECT_VERSION}}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#LogTime=no
|
#LogTime=no
|
||||||
#SystemCallArchitectures=
|
#SystemCallArchitectures=
|
||||||
#TimerSlackNSec=
|
#TimerSlackNSec=
|
||||||
#StatusUnitFormat=@STATUS_UNIT_FORMAT_DEFAULT@
|
#StatusUnitFormat={{STATUS_UNIT_FORMAT_DEFAULT_STR}}
|
||||||
#DefaultTimerAccuracySec=1min
|
#DefaultTimerAccuracySec=1min
|
||||||
#DefaultStandardOutput=inherit
|
#DefaultStandardOutput=inherit
|
||||||
#DefaultStandardError=inherit
|
#DefaultStandardError=inherit
|
||||||
|
Loading…
Reference in New Issue
Block a user