mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 10:25:37 +03:00
Merge pull request #8876 from yuwata/meson-0.46
meson: bump minimum required version to 0.46
This commit is contained in:
commit
ae1d4a70a6
10
.lgtm.yml
Normal file
10
.lgtm.yml
Normal file
@ -0,0 +1,10 @@
|
||||
extraction:
|
||||
cpp:
|
||||
prepare:
|
||||
packages:
|
||||
- python3-pip
|
||||
- python3-setuptools
|
||||
- python3-wheel
|
||||
after_prepare:
|
||||
- pip3 install meson
|
||||
- export PATH="$HOME/.local/bin/:$PATH"
|
2
README
2
README
@ -162,7 +162,7 @@ REQUIREMENTS:
|
||||
docbook-xsl (optional, required for documentation)
|
||||
xsltproc (optional, required for documentation)
|
||||
python-lxml (optional, required to build the indices)
|
||||
python >= 3.4, meson >= 0.44, ninja
|
||||
python >= 3.5, meson >= 0.46, ninja
|
||||
gcc, awk, sed, grep, m4, and similar tools
|
||||
|
||||
During runtime, you need the following additional
|
||||
|
62
meson.build
62
meson.build
@ -9,7 +9,7 @@ project('systemd', 'c',
|
||||
'sysconfdir=/etc',
|
||||
'localstatedir=/var',
|
||||
],
|
||||
meson_version : '>= 0.44',
|
||||
meson_version : '>= 0.46',
|
||||
)
|
||||
|
||||
libsystemd_version = '0.23.0'
|
||||
@ -362,6 +362,7 @@ if get_option('buildtype') != 'debug'
|
||||
endif
|
||||
|
||||
add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')
|
||||
add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language : 'c')
|
||||
|
||||
# "negative" arguments: gcc on purpose does not return an error for "-Wno-"
|
||||
# arguments, just emits a warning. So test for the "positive" version instead.
|
||||
@ -389,18 +390,6 @@ if cc.compiles('''
|
||||
add_project_arguments('-Werror=shadow', language : 'c')
|
||||
endif
|
||||
|
||||
link_test_c = files('tools/meson-link-test.c')
|
||||
|
||||
foreach arg : possible_link_flags
|
||||
have = run_command(check_compilation_sh,
|
||||
cc.cmd_array(), '-x', 'c', arg,
|
||||
'-include', link_test_c).returncode() == 0
|
||||
message('Linking with @0@ supported: @1@'.format(arg, have ? 'yes' : 'no'))
|
||||
if have
|
||||
add_project_link_arguments(arg, language : 'c')
|
||||
endif
|
||||
endforeach
|
||||
|
||||
cpp = ' '.join(cc.cmd_array()) + ' -E'
|
||||
|
||||
#####################################################################
|
||||
@ -635,50 +624,51 @@ else
|
||||
endif
|
||||
|
||||
time_epoch = get_option('time-epoch')
|
||||
if time_epoch == ''
|
||||
if time_epoch == -1
|
||||
NEWS = files('NEWS')
|
||||
time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout()
|
||||
time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout().to_int()
|
||||
endif
|
||||
time_epoch = time_epoch.to_int()
|
||||
conf.set('TIME_EPOCH', time_epoch)
|
||||
|
||||
system_uid_max = get_option('system-uid-max')
|
||||
if system_uid_max == ''
|
||||
if system_uid_max == -1
|
||||
system_uid_max = run_command(
|
||||
awk,
|
||||
'/^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }',
|
||||
'/etc/login.defs').stdout().strip()
|
||||
if system_uid_max == ''
|
||||
system_uid_max = '999'
|
||||
system_uid_max = 999
|
||||
else
|
||||
system_uid_max = system_uid_max.to_int()
|
||||
endif
|
||||
endif
|
||||
system_uid_max = system_uid_max.to_int()
|
||||
conf.set('SYSTEM_UID_MAX', system_uid_max)
|
||||
substs.set('systemuidmax', system_uid_max)
|
||||
|
||||
system_gid_max = get_option('system-gid-max')
|
||||
if system_gid_max == ''
|
||||
if system_gid_max == -1
|
||||
system_gid_max = run_command(
|
||||
awk,
|
||||
'/^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }',
|
||||
'/etc/login.defs').stdout().strip()
|
||||
if system_gid_max == ''
|
||||
system_gid_max = '999'
|
||||
system_gid_max = 999
|
||||
else
|
||||
system_gid_max = system_gid_max.to_int()
|
||||
endif
|
||||
endif
|
||||
system_gid_max = system_gid_max.to_int()
|
||||
conf.set('SYSTEM_GID_MAX', system_gid_max)
|
||||
substs.set('systemgidmax', system_gid_max)
|
||||
|
||||
dynamic_uid_min = get_option('dynamic-uid-min').to_int()
|
||||
dynamic_uid_max = get_option('dynamic-uid-max').to_int()
|
||||
dynamic_uid_min = get_option('dynamic-uid-min')
|
||||
dynamic_uid_max = get_option('dynamic-uid-max')
|
||||
conf.set('DYNAMIC_UID_MIN', dynamic_uid_min)
|
||||
conf.set('DYNAMIC_UID_MAX', dynamic_uid_max)
|
||||
substs.set('dynamicuidmin', dynamic_uid_min)
|
||||
substs.set('dynamicuidmax', dynamic_uid_max)
|
||||
|
||||
container_uid_base_min = get_option('container-uid-base-min').to_int()
|
||||
container_uid_base_max = get_option('container-uid-base-max').to_int()
|
||||
container_uid_base_min = get_option('container-uid-base-min')
|
||||
container_uid_base_max = get_option('container-uid-base-max')
|
||||
conf.set('CONTAINER_UID_BASE_MIN', container_uid_base_min)
|
||||
conf.set('CONTAINER_UID_BASE_MAX', container_uid_base_max)
|
||||
substs.set('containeruidbasemin', container_uid_base_min)
|
||||
@ -742,12 +732,8 @@ conf.set('TTY_GID', tty_gid)
|
||||
substs.set('TTY_GID', tty_gid)
|
||||
|
||||
# Ensure provided GID argument is numeric, otherwise fallback to default assignment
|
||||
if get_option('users-gid') != ''
|
||||
users_gid = get_option('users-gid').to_int()
|
||||
else
|
||||
users_gid = '-'
|
||||
endif
|
||||
substs.set('USERS_GID', users_gid)
|
||||
users_gid = get_option('users-gid')
|
||||
substs.set('USERS_GID', users_gid < 0 ? '-' : users_gid)
|
||||
|
||||
conf.set10('ENABLE_ADM_GROUP', get_option('adm-group'))
|
||||
conf.set10('ENABLE_WHEEL_GROUP', get_option('wheel-group'))
|
||||
@ -1302,7 +1288,7 @@ if get_option('efi')
|
||||
have = true
|
||||
conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
|
||||
|
||||
conf.set('SD_TPM_PCR', get_option('tpm-pcrindex').to_int())
|
||||
conf.set('SD_TPM_PCR', get_option('tpm-pcrindex'))
|
||||
else
|
||||
have = false
|
||||
endif
|
||||
@ -2771,13 +2757,7 @@ foreach tuple : sanitizers
|
||||
sanitizer = tuple[0]
|
||||
build = tuple[1]
|
||||
|
||||
have = run_command(check_compilation_sh,
|
||||
cc.cmd_array(), '-x', 'c',
|
||||
'-fsanitize=@0@'.format(sanitizer),
|
||||
'-include', link_test_c).returncode() == 0
|
||||
message('@0@ sanitizer supported: @1@'.format(sanitizer, have ? 'yes' : 'no'))
|
||||
|
||||
if have
|
||||
if cc.has_link_argument('-fsanitize=@0@'.format(sanitizer))
|
||||
prev = ''
|
||||
foreach p : fuzz_regression_tests
|
||||
b = p.split('/')[-2]
|
||||
@ -2898,7 +2878,7 @@ status = [
|
||||
'debug shell: @0@ @ @1@'.format(get_option('debug-shell'),
|
||||
get_option('debug-tty')),
|
||||
'TTY GID: @0@'.format(tty_gid),
|
||||
'users GID: @0@'.format(users_gid),
|
||||
'users GID: @0@'.format(substs.get('USERS_GID')),
|
||||
'maximum system UID: @0@'.format(system_uid_max),
|
||||
'maximum system GID: @0@'.format(system_gid_max),
|
||||
'minimum dynamic UID: @0@'.format(dynamic_uid_min),
|
||||
|
@ -150,28 +150,23 @@ option('compat-gateway-hostname', type : 'boolean', value : 'false',
|
||||
option('default-hierarchy', type : 'combo',
|
||||
choices : ['legacy', 'hybrid', 'unified'], value : 'hybrid',
|
||||
description : 'default cgroup hierarchy')
|
||||
option('time-epoch', type : 'string',
|
||||
option('time-epoch', type : 'integer', value : '-1',
|
||||
description : 'time epoch for time clients')
|
||||
option('system-uid-max', type : 'string',
|
||||
option('system-uid-max', type : 'integer', value : '-1',
|
||||
description : 'maximum system UID')
|
||||
option('system-gid-max', type : 'string',
|
||||
option('system-gid-max', type : 'integer', value : '-1',
|
||||
description : 'maximum system GID')
|
||||
option('dynamic-uid-min', type : 'string',
|
||||
description : 'minimum dynamic UID',
|
||||
value : '61184') # That's → 0x0000EF00 in hex
|
||||
option('dynamic-uid-max', type : 'string',
|
||||
description : 'maximum dynamic UID',
|
||||
value : '65519') # That's → 0x0000FFEF in hex
|
||||
option('container-uid-base-min', type : 'string',
|
||||
description : 'minimum container UID base',
|
||||
value : '524288') # That's → 0x00080000 in hex
|
||||
option('container-uid-base-max', type : 'string',
|
||||
description : 'maximum container UID base',
|
||||
value : '1878982656') # That's → 0x6FFF0000 in hex
|
||||
option('tty-gid', type : 'string',
|
||||
description : 'the numeric GID of the "tty" group',
|
||||
value : '5')
|
||||
option('users-gid', type : 'string',
|
||||
option('dynamic-uid-min', type : 'integer', value : 0x0000EF00,
|
||||
description : 'minimum dynamic UID')
|
||||
option('dynamic-uid-max', type : 'integer', value : 0x0000FFEF,
|
||||
description : 'maximum dynamic UID')
|
||||
option('container-uid-base-min', type : 'integer', value : 0x00080000,
|
||||
description : 'minimum container UID base')
|
||||
option('container-uid-base-max', type : 'integer', value : 0x6FFF0000,
|
||||
description : 'maximum container UID base')
|
||||
option('tty-gid', type : 'integer', value : 5,
|
||||
description : 'the numeric GID of the "tty" group')
|
||||
option('users-gid', type : 'integer', value : '-1',
|
||||
description : 'the numeric GID of the "users" group')
|
||||
option('adm-group', type : 'boolean',
|
||||
description : 'the ACL for adm group should be added')
|
||||
@ -291,7 +286,7 @@ option('efi-ldsdir', type : 'string',
|
||||
description : 'path to the EFI lds directory')
|
||||
option('efi-includedir', type : 'string', value : '/usr/include/efi',
|
||||
description : 'path to the EFI header directory')
|
||||
option('tpm-pcrindex', type : 'string', value : '8',
|
||||
option('tpm-pcrindex', type : 'integer', value : 8,
|
||||
description : 'TPM PCR register number to use')
|
||||
|
||||
option('bashcompletiondir', type : 'string',
|
||||
|
@ -1 +0,0 @@
|
||||
int main(void) {return 0;}
|
Loading…
Reference in New Issue
Block a user