Merge branch 'install-tag-2' into 'main'

meson: Set install_tag remaining installed files

See merge request GNOME/glib!2905
This commit is contained in:
Marco Trevisan 2022-09-21 10:05:18 +00:00
commit 87b4771d1f
17 changed files with 147 additions and 23 deletions

View File

@ -0,0 +1,25 @@
#!/usr/bin/env python3
"""
This script checks Meson configuration logs to verify no installed file is
missing installation tag.
"""
import argparse
from pathlib import Path
def main():
parser = argparse.ArgumentParser()
parser.add_argument('builddir', type=Path)
args = parser.parse_args()
logfile = args.builddir / 'meson-logs' / 'meson-log.txt'
with logfile.open(encoding='utf-8') as f:
if 'Failed to guess install tag' in f.read():
print(f'Some files are missing install_tag, see {logfile} for details.')
return 1
return 0
if __name__ == "__main__":
exit(main())

View File

@ -1,5 +1,7 @@
#!/bin/bash
./.gitlab-ci/check-missing-install-tag.py _build
meson test \
-C _build \
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \

View File

@ -14,6 +14,7 @@ set args=%args:~1%
:: FIXME: make warnings fatal
pip3 install --upgrade --user meson==0.60.3 || goto :error
meson %args% _build || goto :error
python .gitlab-ci/check-missing-install-tag.py _build || goto :error
ninja -C _build || goto :error
:: FIXME: dont ignore test errors

View File

@ -32,6 +32,7 @@ gdbus_codegen_built_files = []
gdbus_codegen_built_files += configure_file(input : 'config.py.in',
output : 'config.py',
install_dir : codegen_dir,
install_tag : 'bin-devel',
configuration : gdbus_codegen_conf)
foreach f : gdbus_codegen_files
@ -39,5 +40,6 @@ foreach f : gdbus_codegen_files
# and then install it too so that it can be used after installation
gdbus_codegen_built_files += configure_file(input : f, output : f,
install_dir : codegen_dir,
install_tag : 'bin-devel',
copy : true)
endforeach

View File

@ -800,13 +800,15 @@ if have_bash
endif
install_data([
'completion/gapplication',
'completion/gdbus',
'completion/gio',
'completion/gsettings',
'completion/gresource'
],
install_dir: bash_comp_inst_dir)
'completion/gapplication',
'completion/gdbus',
'completion/gio',
'completion/gsettings',
'completion/gresource'
],
install_dir: bash_comp_inst_dir,
install_tag: 'bin',
)
endif
if enable_dtrace
@ -1017,10 +1019,14 @@ executable('gsettings', 'gsettings-tool.c',
link_args : noseh_link_args,
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
install_data('gschema.dtd',
install_dir : join_paths(get_option('datadir'), schemas_subdir))
install_dir : get_option('datadir') / schemas_subdir,
install_tag : 'devel',
)
install_data(['gschema.loc', 'gschema.its'],
install_dir : join_paths(get_option('datadir'), 'gettext/its'))
install_dir : get_option('datadir') / 'gettext' / 'its',
install_tag : 'devel',
)
executable('gdbus', 'gdbus-tool.c',
install : true,

View File

@ -222,6 +222,7 @@ if host_machine.system() != 'windows'
name_prefix : '',
dependencies: libdl_dep,
install_dir : installed_tests_execdir,
install_tag : 'tests',
install: installed_tests_enabled,
)
],
@ -419,6 +420,7 @@ if host_machine.system() != 'windows'
c_args : test_c_args,
dependencies : common_gio_tests_deps,
install_dir : installed_tests_execdir,
install_tag : 'tests',
install : installed_tests_enabled)
gio_tests += {
@ -544,6 +546,7 @@ foreach appinfo_test_desktop_file : appinfo_test_desktop_files
input: appinfo_test_desktop_file + '.in',
output: appinfo_test_desktop_file,
install_dir: installed_tests_execdir,
install_tag: 'tests',
configuration: cdata,
)
else
@ -566,11 +569,24 @@ if installed_tests_enabled
'org.gtk.test.dbusappinfo.flatpak.desktop',
'test1.overlay',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
install_subdir('x-content',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
install_subdir('desktop-files',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
install_subdir('thumbnails',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
install_subdir('cert-tests',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
install_subdir('x-content', install_dir : installed_tests_execdir)
install_subdir('desktop-files', install_dir : installed_tests_execdir)
install_subdir('thumbnails', install_dir : installed_tests_execdir)
install_subdir('cert-tests', install_dir : installed_tests_execdir)
cdata = configuration_data()
cdata.set('installed_tests_dir', installed_tests_execdir)
@ -579,10 +595,17 @@ if installed_tests_enabled
input: installed_tests_template,
output: 'static-link.test',
install_dir: installed_tests_metadir,
install_tag: 'tests',
configuration: cdata
)
install_subdir('static-link', install_dir : installed_tests_execdir)
install_data('static-link.py', install_dir : installed_tests_execdir)
install_subdir('static-link',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
install_data('static-link.py',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
monitor_tests = [
'memory-monitor-dbus',
@ -600,6 +623,7 @@ if installed_tests_enabled
input: installed_tests_template_tap,
output: monitor_test + '.test',
install_dir: installed_tests_metadir,
install_tag: 'tests',
configuration: cdata
)
cdata = configuration_data()
@ -608,6 +632,7 @@ if installed_tests_enabled
input: monitor_test + '.py.in',
output: monitor_test + '.py',
install_dir : installed_tests_execdir,
install_tag : 'tests',
configuration: cdata,
)
endforeach
@ -633,6 +658,7 @@ if meson.can_run_host_binaries()
link_args : export_dynamic_ldflags,
dependencies : common_gio_tests_deps,
install_dir : installed_tests_execdir,
install_tag : 'tests',
install : installed_tests_enabled
)
@ -654,6 +680,7 @@ if meson.can_run_host_binaries()
'--internal',
'@INPUT@'],
install_dir : installed_tests_execdir,
install_tag : 'tests',
install : installed_tests_enabled)
test_resources2_c = custom_target('test_resources2.c',
@ -766,6 +793,7 @@ if meson.can_run_host_binaries()
'--internal',
'@INPUT@'],
install_dir : installed_tests_execdir,
install_tag : 'tests',
install : installed_tests_enabled)
# Create resource data file
@ -847,6 +875,7 @@ foreach test_name, extra_args : gio_tests
input: installed_tests_template_tap,
output: test_name + '.test',
install_dir: installed_tests_metadir,
install_tag: 'tests',
configuration: test_conf
)
endif
@ -856,6 +885,7 @@ foreach test_name, extra_args : gio_tests
dependencies : common_gio_tests_deps + extra_args.get('dependencies', []),
install_rpath : extra_args.get('install_rpath', ''),
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: install,
)
@ -885,6 +915,7 @@ foreach program_name, extra_args : test_extra_programs
c_args : test_c_args,
dependencies : common_gio_tests_deps + extra_args.get('dependencies', []),
install_dir : installed_tests_execdir,
install_tag : 'tests',
install : install,
)
endforeach
@ -902,6 +933,7 @@ foreach test_name : python_tests
install_data(
files(test_name),
install_dir: installed_tests_execdir,
install_tag: 'tests',
install_mode: 'rwxr-xr-x',
)
@ -913,6 +945,7 @@ foreach test_name : python_tests
input: installed_tests_template_tap,
output: test_name + '.test',
install_dir: installed_tests_metadir,
install_tag: 'tests',
configuration: test_conf,
)
endif
@ -923,6 +956,7 @@ if installed_tests_enabled
install_data(
files('taptestrunner.py'),
install_dir: installed_tests_execdir,
install_tag: 'tests',
)
endif

View File

@ -25,6 +25,7 @@ foreach service_file : dbus_service_files
)
install_data(meson.current_build_dir() / service_file + '.to-install',
install_dir: installed_tests_execdir / 'services',
install_tag: 'tests',
rename: [service_file],
)
endif

View File

@ -1,5 +1,6 @@
glibconfig_h = configure_file(input : 'glibconfig.h.in', output : 'glibconfig.h',
install_dir : join_paths(get_option('libdir'), 'glib-2.0/include'),
install_tag : 'devel',
configuration : glibconfig_conf)
subdir('libcharset')
@ -453,7 +454,10 @@ configure_file(
install_mode: 'rwxr-xr-x'
)
install_data('glib_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
install_data('glib_gdb.py',
install_dir : glib_pkgdatadir / 'gdb',
install_tag : 'devel',
)
# This is needed to make gdb find glib_gdb.py
env = environment()
@ -480,6 +484,7 @@ configure_file(
output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
install_dir: gdb_install_dir,
install_tag: 'devel',
install: gdb_install,
)
@ -488,6 +493,7 @@ if enable_systemtap
output : '@0@.stp'.format(libglib.full_path().split('/').get(-1)),
configuration : stp_cdata,
install_dir : tapset_install_dir,
install_tag : 'systemtap',
)
endif

View File

@ -202,6 +202,7 @@ else
name_prefix : '',
dependencies: libdl_dep,
install_dir : installed_tests_execdir,
install_tag : 'tests',
install: installed_tests_enabled,
),
],
@ -230,10 +231,20 @@ if installed_tests_enabled
'NormalizationTest.txt',
'pages.ini',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
install_subdir('bookmarks',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
install_subdir('markups',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
install_subdir('time-zones',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
install_subdir('bookmarks', install_dir : installed_tests_execdir)
install_subdir('markups', install_dir : installed_tests_execdir)
install_subdir('time-zones', install_dir : installed_tests_execdir)
endif
test_env = environment()
@ -258,6 +269,7 @@ foreach test_name, extra_args : glib_tests
input: installed_tests_template_tap,
output: test_name + '.test',
install_dir: installed_tests_metadir,
install_tag: 'tests',
configuration: test_conf
)
endif
@ -267,6 +279,7 @@ foreach test_name, extra_args : glib_tests
link_args : extra_args.get('link_args', []),
dependencies : test_deps + extra_args.get('dependencies', []),
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: install,
)
@ -284,6 +297,7 @@ if installed_tests_enabled
install_data(
'utf8.txt',
install_dir : installed_tests_execdir,
install_tag : 'tests',
)
endif
@ -295,6 +309,7 @@ executable('assert-msg-test', ['assert-msg-test.c'],
c_args : test_cargs,
dependencies : test_deps,
install_dir : installed_tests_execdir,
install_tag : 'tests',
install : installed_tests_enabled,
win_subsystem : extra_args.get('win_subsystem', 'console'),
)
@ -312,6 +327,7 @@ foreach test_name : python_tests
install_data(
files(test_name),
install_dir: installed_tests_execdir,
install_tag: 'tests',
install_mode: 'rwxr-xr-x',
)
@ -323,6 +339,7 @@ foreach test_name : python_tests
input: installed_tests_template_tap,
output: test_name + '.test',
install_dir: installed_tests_metadir,
install_tag: 'tests',
configuration: test_conf,
)
endif
@ -332,6 +349,7 @@ executable('spawn-path-search-helper', 'spawn-path-search-helper.c',
c_args : test_cargs,
dependencies : test_deps,
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: installed_tests_enabled,
)
@ -339,6 +357,7 @@ executable('spawn-test-helper', 'spawn-test-helper.c',
c_args : test_cargs,
dependencies : test_deps,
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: installed_tests_enabled,
)
@ -347,6 +366,7 @@ executable('test-spawn-echo', 'test-spawn-echo.c',
c_args : test_cargs,
dependencies : test_deps,
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: installed_tests_enabled,
)
@ -356,12 +376,14 @@ if host_machine.system() == 'windows'
c_args : test_cargs,
dependencies : test_deps,
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: installed_tests_enabled,
)
executable('spawn-test-win32-gui', 'spawn-test-win32-gui.c',
c_args : test_cargs,
dependencies : test_deps,
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: installed_tests_enabled,
win_subsystem: 'windows',
)
@ -371,6 +393,7 @@ executable('testing-helper', 'testing-helper.c',
c_args : test_cargs,
dependencies : test_deps,
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: installed_tests_enabled,
)

View File

@ -2,5 +2,6 @@ executable('spawn-test-helper', 'spawn-test-helper.c',
c_args : test_cargs,
dependencies : test_deps,
install_dir: join_paths(installed_tests_execdir, 'path-test-subdir'),
install_tag: 'tests',
install: installed_tests_enabled,
)

View File

@ -30,12 +30,14 @@ foreach module : ['moduletestplugin_a', 'moduletestplugin_b']
shared_module(module + '_plugin', 'lib@0@.c'.format(module),
dependencies : [libglib_dep, libgmodule_dep],
install_dir : installed_tests_execdir,
install_tag : 'tests',
install : installed_tests_enabled,
name_suffix : module_suffix
)
shared_library(module + '_library', 'lib@0@.c'.format(module),
dependencies : [libglib_dep, libgmodule_dep],
install_dir : installed_tests_execdir,
install_tag : 'tests',
install : installed_tests_enabled,
name_suffix : module_suffix
)
@ -63,6 +65,7 @@ foreach test_name, extra_args : gmodule_tests
input: installed_tests_template_tap,
output: test_name + '.test',
install_dir: installed_tests_metadir,
install_tag: 'tests',
configuration: test_conf
)
endif
@ -73,6 +76,7 @@ foreach test_name, extra_args : gmodule_tests
dependencies : test_deps + extra_args.get('dependencies', []),
export_dynamic : extra_args.get('export_dynamic', false),
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: install,
)

View File

@ -158,7 +158,10 @@ executable('gobject-query', 'gobject-query.c',
install_tag : 'bin-devel',
dependencies : [libglib_dep, libgobject_dep])
install_data('gobject_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
install_data('gobject_gdb.py',
install_dir : glib_pkgdatadir / 'gdb',
install_tag : 'devel',
)
gdb_conf = configuration_data()
gdb_conf.set('datadir', glib_datadir)
configure_file(
@ -166,6 +169,7 @@ configure_file(
output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
install_dir: gdb_install_dir,
install_tag: 'devel',
install: gdb_install,
)
@ -179,6 +183,7 @@ if enable_systemtap
output : '@0@.stp'.format(libgobject.full_path().split('/').get(-1)),
configuration : stp_cdata,
install_dir : tapset_install_dir,
install_tag : 'systemtap',
)
endif

View File

@ -139,6 +139,7 @@ foreach test_name, extra_args : gobject_tests
input: installed_tests_template_tap,
output: test_name + '.test',
install_dir: installed_tests_metadir,
install_tag: 'tests',
configuration: test_conf
)
endif
@ -147,6 +148,7 @@ foreach test_name, extra_args : gobject_tests
c_args : test_cargs + extra_args.get('c_args', []),
dependencies : test_deps + extra_args.get('dependencies', []),
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: install,
)
@ -175,6 +177,7 @@ foreach test_name : python_tests
install_data(
files(test_name),
install_dir: installed_tests_execdir,
install_tag: 'tests',
install_mode: 'rwxr-xr-x',
)
@ -186,6 +189,7 @@ foreach test_name : python_tests
input: installed_tests_template_tap,
output: test_name + '.test',
install_dir: installed_tests_metadir,
install_tag: 'tests',
configuration: test_conf,
)
endif
@ -196,5 +200,6 @@ if installed_tests_enabled
install_data(
files('taptestrunner.py'),
install_dir: installed_tests_execdir,
install_tag: 'tests',
)
endif

View File

@ -26,6 +26,7 @@ foreach test_name, extra_args : gobject_tests
input: installed_tests_template,
output: test_name + '.test',
install_dir: installed_tests_metadir,
install_tag: 'tests',
configuration: test_conf,
)
endif
@ -34,6 +35,7 @@ foreach test_name, extra_args : gobject_tests
c_args : test_cargs + extra_args.get('c_args', []),
dependencies : test_deps + extra_args.get('dependencies', []),
install_dir: installed_tests_execdir,
install_tag: 'tests',
install: install,
)

View File

@ -2391,7 +2391,9 @@ endif
# Install m4 macros that other projects use
install_data('m4macros/glib-2.0.m4', 'm4macros/glib-gettext.m4', 'm4macros/gsettings.m4',
install_dir : join_paths(get_option('datadir'), 'aclocal'))
install_dir : get_option('datadir') / 'aclocal',
install_tag : 'devel',
)
configure_file(output : 'config.h', configuration : glib_conf)

View File

@ -2,4 +2,7 @@ i18n = import('i18n')
i18n.gettext('glib20', preset: 'glib')
install_data('Makefile.in.in', install_dir : glib_pkgdatadir + '/gettext/po')
install_data('Makefile.in.in',
install_dir : glib_pkgdatadir / 'gettext' / 'po',
install_tag : 'devel',
)

View File

@ -18,5 +18,7 @@ if host_system != 'windows'
# Install Valgrind suppression file (except on Windows,
# as Valgrind is currently not supported on Windows)
install_data('glib.supp',
install_dir : join_paths(get_option('datadir'), 'glib-2.0', 'valgrind'))
install_dir : get_option('datadir') / 'glib-2.0' / 'valgrind',
install_tag : 'devel',
)
endif