From 00d7568e4f2590af8d7947ca222c9451ada5c2ff Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 17 Jun 2019 16:52:36 +0100 Subject: [PATCH 01/10] build: Remove unsupported `install` directives We're using the `install` argument for configure_file() all over the place. The support for an `install` argument for configure_file() was added in Meson 0.50, but we haven't bumped the minimum version of Meson we require, yet; which means we're getting compatibility warnings when using recent versions of Meson, and undefined behaviour when using older versions. The configure_file() object defaults to `install: false`, unless an install directory is used. This means that all instances of an `install` argument with an explicit `true` or `false` value can be removed, whereas all instances of `install` with a value determined from a configuration option must be turned into an explicit conditional. --- gio/gdbus-2.0/codegen/meson.build | 3 --- gio/meson.build | 2 +- gio/tests/meson.build | 23 +++++++++++++++-------- glib/meson.build | 5 ++--- gobject/meson.build | 5 ++--- meson.build | 1 - 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build index 24d2527bc..121e9e6bb 100644 --- a/gio/gdbus-2.0/codegen/meson.build +++ b/gio/gdbus-2.0/codegen/meson.build @@ -16,7 +16,6 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir) # Install gdbus-codegen executable gdbus_codegen = configure_file(input : 'gdbus-codegen.in', output : 'gdbus-codegen', - install : true, install_dir : get_option('bindir'), configuration : gdbus_codegen_conf ) @@ -28,7 +27,6 @@ codegen_dir = join_paths(get_option('datadir'), 'glib-2.0/codegen') gdbus_codegen_built_files = [] gdbus_codegen_built_files += configure_file(input : 'config.py.in', output : 'config.py', - install : true, install_dir : codegen_dir, configuration : gdbus_codegen_conf) @@ -36,7 +34,6 @@ foreach f : gdbus_codegen_files # Copy these into the builddir so that gdbus-codegen can be used uninstalled # and then install it too so that it can be used after installation gdbus_codegen_built_files += configure_file(input : f, output : f, - install : true, install_dir : codegen_dir, copy : true) endforeach diff --git a/gio/meson.build b/gio/meson.build index b17ab8148..987d0f4c6 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -996,7 +996,7 @@ if enable_systemtap output : '@0@.stp'.format(libgio.full_path().split('/').get(-1)), configuration : stp_cdata, install_dir : tapset_install_dir, - install : true) + ) endif subdir('fam') diff --git a/gio/tests/meson.build b/gio/tests/meson.build index aea8b4aba..3a6b50bb5 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -424,13 +424,20 @@ else endif foreach appinfo_test_desktop_file : appinfo_test_desktop_files - configure_file( - input: appinfo_test_desktop_file + '.in', - output: appinfo_test_desktop_file, - install_dir: installed_tests_execdir, - install: installed_tests_enabled, - configuration: cdata, - ) + if installed_tests_enabled + configure_file( + input: appinfo_test_desktop_file + '.in', + output: appinfo_test_desktop_file, + install_dir: installed_tests_execdir, + configuration: cdata, + ) + else + configure_file( + input: appinfo_test_desktop_file + '.in', + output: appinfo_test_desktop_file, + configuration: cdata, + ) + endif endforeach if installed_tests_enabled @@ -558,7 +565,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() test_generated_txt = configure_file(input : 'test1.txt', output : 'test-generated.txt', copy : true, - install : false) + ) resources_extra_sources = [ test_gresource, diff --git a/glib/meson.build b/glib/meson.build index 5acd0b9ee..6bf678247 100644 --- a/glib/meson.build +++ b/glib/meson.build @@ -1,5 +1,4 @@ configure_file(input : 'glibconfig.h.in', output : 'glibconfig.h', - install : true, install_dir : join_paths(get_option('libdir'), 'glib-2.0/include'), configuration : glibconfig_conf) @@ -456,11 +455,11 @@ if enable_systemtap output : '@0@.stp'.format(libglib.full_path().split('/').get(-1)), configuration : stp_cdata, install_dir : tapset_install_dir, - install : true) + ) endif # Don’t build the tests unless we can run them (either natively or in an exe wrapper) build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper()) if build_tests subdir('tests') -endif \ No newline at end of file +endif diff --git a/gobject/meson.build b/gobject/meson.build index 81dcffda5..c7805c556 100644 --- a/gobject/meson.build +++ b/gobject/meson.build @@ -75,7 +75,6 @@ foreach tool: python_tools input : tool + '.in', output : tool, configuration : python_tools_conf, - install : true, install_dir : glib_bindir, ) @@ -163,11 +162,11 @@ if enable_systemtap output : '@0@.stp'.format(libgobject.full_path().split('/').get(-1)), configuration : stp_cdata, install_dir : tapset_install_dir, - install : true) + ) endif # Don’t build the tests unless we can run them (either natively or in an exe wrapper) build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper()) if build_tests subdir('tests') -endif \ No newline at end of file +endif diff --git a/meson.build b/meson.build index 1a1455298..9313f3a8e 100644 --- a/meson.build +++ b/meson.build @@ -2068,7 +2068,6 @@ if have_sh gettextize_conf.set('datarootdir', glib_datadir) gettextize_conf.set('datadir', glib_datadir) configure_file(input : 'glib-gettextize.in', - install : true, install_dir : glib_bindir, output : 'glib-gettextize', configuration : gettextize_conf) From 9fdc27657de0500551ca20121dd33761d9c5cc3e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Jul 2019 12:43:12 +0100 Subject: [PATCH 02/10] ci: Update Debian's Docker image New stable release of Debian is out, and we need to bump the version of Meson to match our requirements. --- .gitlab-ci/debian-stable.Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/debian-stable.Dockerfile b/.gitlab-ci/debian-stable.Dockerfile index f10ebc071..faaaae039 100644 --- a/.gitlab-ci/debian-stable.Dockerfile +++ b/.gitlab-ci/debian-stable.Dockerfile @@ -1,9 +1,9 @@ -FROM debian:stretch +FROM debian:buster RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \ bindfs \ clang \ - clang-tools-4.0 \ + clang-tools-7 \ dbus \ desktop-file-utils \ elfutils \ @@ -61,7 +61,7 @@ RUN locale-gen de_DE.UTF-8 \ ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 -RUN pip3 install meson==0.48.0 +RUN pip3 install meson==0.49.2 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} From 14d2c4872e09b59504f88832bf2a6f197a3c7bfb Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Jul 2019 12:43:52 +0100 Subject: [PATCH 03/10] ci: Update Fedora's Docker image Match the version of Meson we install with the one we require. --- .gitlab-ci/fedora.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/fedora.Dockerfile b/.gitlab-ci/fedora.Dockerfile index debec6812..1c0a39d8b 100644 --- a/.gitlab-ci/fedora.Dockerfile +++ b/.gitlab-ci/fedora.Dockerfile @@ -52,7 +52,7 @@ RUN dnf -y install \ zlib-devel \ && dnf clean all -RUN pip3 install meson==0.48.0 +RUN pip3 install meson==0.49.2 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} From ed7c2589963c3248a1bf12b0aefed44efb49591e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Jul 2019 12:52:45 +0100 Subject: [PATCH 04/10] ci: Update the Android NDK Docker image --- .gitlab-ci/android-ndk.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/android-ndk.Dockerfile b/.gitlab-ci/android-ndk.Dockerfile index 0f8840168..9d85a9dfb 100644 --- a/.gitlab-ci/android-ndk.Dockerfile +++ b/.gitlab-ci/android-ndk.Dockerfile @@ -63,7 +63,7 @@ RUN ./android-setup-env.sh arm64 21 RUN ./android-setup-env.sh arm64 28 RUN rm -rf $ANDROID_NDK_PATH -RUN pip3 install meson==0.48.0 +RUN pip3 install meson==0.49.2 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} From f6b4012c9d19c62fb3ff6d8c1177eb26848c9c29 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Jul 2019 12:52:57 +0100 Subject: [PATCH 05/10] ci: Update the MingW Docker image --- .gitlab-ci/mingw.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/mingw.Dockerfile b/.gitlab-ci/mingw.Dockerfile index 6bc5c5dd0..19a061a1c 100644 --- a/.gitlab-ci/mingw.Dockerfile +++ b/.gitlab-ci/mingw.Dockerfile @@ -58,7 +58,7 @@ RUN dnf -y install \ WORKDIR /opt COPY cross_file_mingw64.txt /opt -RUN pip3 install meson==0.48.0 +RUN pip3 install meson==0.49.2 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} From 772a6e326280e14fcf0fad93fe85f732a12d48ba Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Jul 2019 12:53:12 +0100 Subject: [PATCH 06/10] ci: Update the MSVC build script --- .gitlab-ci/test-msvc.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index b2de2baf4..ea1870eab 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -5,7 +5,7 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary @echo on :: FIXME: make warnings fatal -pip3 install --upgrade --user meson==0.48.0 || goto :error +pip3 install --upgrade --user meson==0.49.2 || goto :error meson _build || goto :error ninja -C _build || goto :error From fa6f2d4516a3327d086cc45f492aafdbc9ecab41 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Jul 2019 12:53:25 +0100 Subject: [PATCH 07/10] ci: Update the MSYS2 build script --- .gitlab-ci/test-msys2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index 25a7a1297..34953d545 100755 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -33,7 +33,7 @@ mkdir -p _coverage mkdir -p _ccache export CCACHE_BASEDIR="$(pwd)" export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache" -pip3 install --upgrade --user meson==0.48.0 +pip3 install --upgrade --user meson==0.49.2 export PATH="$HOME/.local/bin:$PATH" export CFLAGS="-coverage -ftest-coverage -fprofile-arcs" DIR="$(pwd)" From f0d713e50d6eaf8609772dfcaccec91a9f96144e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Jul 2019 12:44:34 +0100 Subject: [PATCH 08/10] ci: Use the new Docker images --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f1643191..0a1286544 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ variables: MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings" fedora-x86_64: - image: registry.gitlab.gnome.org/gnome/glib/fedora:v1 + image: registry.gitlab.gnome.org/gnome/glib/fedora:v2 stage: build except: - tags @@ -55,7 +55,7 @@ fedora-x86_64: - "_coverage" debian-stable-x86_64: - image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v1 + image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v3 stage: build except: - tags @@ -84,7 +84,7 @@ debian-stable-x86_64: - "_build/${CI_JOB_NAME}-report.xml" G_DISABLE_ASSERT: - image: registry.gitlab.gnome.org/gnome/glib/fedora:v1 + image: registry.gitlab.gnome.org/gnome/glib/fedora:v2 stage: build except: - tags From 85dc45e548f431b3d4ac79a9c42880aae9833af0 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 17 Jun 2019 16:55:24 +0100 Subject: [PATCH 09/10] build: Bump up the required version of Meson We cannot bump to the latest stable version of Meson, even if it would make our life easier. We can, though, use the version of Meson shipped by the next, soon to be released Debian stable. --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 9313f3a8e..9efc5a52c 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,7 @@ project('glib', 'c', 'cpp', version : '2.61.2', - meson_version : '>= 0.48.0', + # NOTE: We keep this pinned at 0.49 because that's what Debian 10 ships + meson_version : '>= 0.49.2', default_options : [ 'buildtype=debugoptimized', 'warning_level=1', From bd372e3174f76f375202216ccbf013fbbda2aded Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Jul 2019 13:32:55 +0100 Subject: [PATCH 10/10] ci: Fix non-build jobs All non-build jobs must share the same Docker image with the Fedora build job. --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a1286544..b65d80020 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -255,7 +255,7 @@ freebsd-12-x86_64: - "_build/${CI_JOB_NAME}-report.xml" coverage: - image: registry.gitlab.gnome.org/gnome/glib/fedora:v1 + image: registry.gitlab.gnome.org/gnome/glib/fedora:v2 stage: coverage except: - tags @@ -268,7 +268,7 @@ coverage: coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/' scan-build: - image: registry.gitlab.gnome.org/gnome/glib/fedora:v1 + image: registry.gitlab.gnome.org/gnome/glib/fedora:v2 stage: analysis except: - tags @@ -301,7 +301,7 @@ pages: - public dist-job: - image: registry.gitlab.gnome.org/gnome/glib/fedora:v1 + image: registry.gitlab.gnome.org/gnome/glib/fedora:v2 stage: build only: - tags