From ca231d35885b125928a57bf4854752c10aca617c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 16:53:48 +0000 Subject: [PATCH 01/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index bf4f0a7..084fd0e 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.14.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -183,6 +183,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 2.14.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 2.14.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 8bdb2b1d1b5dc3e5eb8695b282a8e551ad21c62f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 10 May 2023 16:04:28 +0200 Subject: [PATCH 02/31] 2.15.0 bump --- .gitignore | 2 ++ libmodulemd.spec | 13 +++++++------ sources | 4 ++-- tests/tests.yml | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 7077c03..6034ec3 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,5 @@ /modulemd-2.13.0.tar.xz.asc /modulemd-2.14.0.tar.xz /modulemd-2.14.0.tar.xz.asc +/modulemd-2.15.0.tar.xz +/modulemd-2.15.0.tar.xz.asc diff --git a/libmodulemd.spec b/libmodulemd.spec index 084fd0e..ab80ac0 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -23,14 +23,14 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.14.0 -Release: 5%{?dist} +Version: 2.15.0 +Release: 1%{?dist} Summary: Module metadata manipulation library # COPYING: MIT ## not in any binary package -# contrib/coverity-modeling.c: GPLv2+ -# contrib/release-tools/semver: GPLv3 +# contrib/coverity-modeling.c: GPL-2.0-or-later +# contrib/release-tools/semver: GPL-3.0-only License: MIT URL: https://github.com/fedora-modularity/libmodulemd Source0: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz @@ -49,7 +49,6 @@ BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) BuildRequires: glib2-doc BuildRequires: rpm-devel -BuildRequires: file-devel %if %{build_python2} BuildRequires: python2-devel BuildRequires: python-gobject-base @@ -116,7 +115,6 @@ Development files for %{name}. %build %meson \ %{meson_accept_overflowed_buildorder_flag} \ - -Dlibmagic=enabled \ -Drpmio=enabled \ -Dskip_introspection=false \ -Dtest_installed_lib=false \ @@ -183,6 +181,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed May 10 2023 Petr Pisar - 2.15.0-1 +- 2.15.0 bump + * Thu Jan 19 2023 Fedora Release Engineering - 2.14.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 2a13e90..344f925 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (modulemd-2.14.0.tar.xz) = 90439cba83f4a8711095f1b9b92ba9135bade202703d698d192d066955ae8df3f53226fcd5fc73cd2873e5599822272f00a5b536cf62e3e51c37bbca32b7f756 -SHA512 (modulemd-2.14.0.tar.xz.asc) = a742c177084b2f1445704583ea43c09b479502432b62c1880ca4917dfa7550b6dfc3aef2498a5afdba61323451878b6ede7fdfba37d433982f0cc3925811668f +SHA512 (modulemd-2.15.0.tar.xz) = 79032eb591cd3b778cb348040150ec4d1ccb8e2890d02c7b7a04f9b1bd376d32c5ae0e2c6dfb8056595fae5e54ea8365de06fe969a0f04b979abad3ff0882033 +SHA512 (modulemd-2.15.0.tar.xz.asc) = 07439efcd7d7ca1e67110a13902f2abd978c93872c383dcfde8d78accf9471787877d69fef8dc06ce65fbde3463b7e5201c7d550acbb530062d9990713d8c63a diff --git a/tests/tests.yml b/tests/tests.yml index 9066e9b..0d73a2f 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -26,7 +26,7 @@ tests: - build: dir: . - run: meson -Daccept_overflowed_buildorder=true -Dlibmagic=enabled -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true source + run: meson -Daccept_overflowed_buildorder=true -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true source - unittests: dir: . run: ninja test From b6d1947147899550010279ead3bbae963432b4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 10 May 2023 16:04:28 +0200 Subject: [PATCH 03/31] 2.15.0 bump --- .gitignore | 2 ++ libmodulemd.spec | 13 +++++++------ sources | 4 ++-- tests/tests.yml | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 7077c03..6034ec3 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,5 @@ /modulemd-2.13.0.tar.xz.asc /modulemd-2.14.0.tar.xz /modulemd-2.14.0.tar.xz.asc +/modulemd-2.15.0.tar.xz +/modulemd-2.15.0.tar.xz.asc diff --git a/libmodulemd.spec b/libmodulemd.spec index bf4f0a7..078dd71 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -23,14 +23,14 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.14.0 -Release: 4%{?dist} +Version: 2.15.0 +Release: 1%{?dist} Summary: Module metadata manipulation library # COPYING: MIT ## not in any binary package -# contrib/coverity-modeling.c: GPLv2+ -# contrib/release-tools/semver: GPLv3 +# contrib/coverity-modeling.c: GPL-2.0-or-later +# contrib/release-tools/semver: GPL-3.0-only License: MIT URL: https://github.com/fedora-modularity/libmodulemd Source0: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz @@ -49,7 +49,6 @@ BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) BuildRequires: glib2-doc BuildRequires: rpm-devel -BuildRequires: file-devel %if %{build_python2} BuildRequires: python2-devel BuildRequires: python-gobject-base @@ -116,7 +115,6 @@ Development files for %{name}. %build %meson \ %{meson_accept_overflowed_buildorder_flag} \ - -Dlibmagic=enabled \ -Drpmio=enabled \ -Dskip_introspection=false \ -Dtest_installed_lib=false \ @@ -183,6 +181,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed May 10 2023 Petr Pisar - 2.15.0-1 +- 2.15.0 bump + * Thu Jul 21 2022 Fedora Release Engineering - 2.14.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 2a13e90..344f925 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (modulemd-2.14.0.tar.xz) = 90439cba83f4a8711095f1b9b92ba9135bade202703d698d192d066955ae8df3f53226fcd5fc73cd2873e5599822272f00a5b536cf62e3e51c37bbca32b7f756 -SHA512 (modulemd-2.14.0.tar.xz.asc) = a742c177084b2f1445704583ea43c09b479502432b62c1880ca4917dfa7550b6dfc3aef2498a5afdba61323451878b6ede7fdfba37d433982f0cc3925811668f +SHA512 (modulemd-2.15.0.tar.xz) = 79032eb591cd3b778cb348040150ec4d1ccb8e2890d02c7b7a04f9b1bd376d32c5ae0e2c6dfb8056595fae5e54ea8365de06fe969a0f04b979abad3ff0882033 +SHA512 (modulemd-2.15.0.tar.xz.asc) = 07439efcd7d7ca1e67110a13902f2abd978c93872c383dcfde8d78accf9471787877d69fef8dc06ce65fbde3463b7e5201c7d550acbb530062d9990713d8c63a diff --git a/tests/tests.yml b/tests/tests.yml index 9066e9b..0d73a2f 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -26,7 +26,7 @@ tests: - build: dir: . - run: meson -Daccept_overflowed_buildorder=true -Dlibmagic=enabled -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true source + run: meson -Daccept_overflowed_buildorder=true -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true source - unittests: dir: . run: ninja test From 27262aa7e12caa44b2537ed59540125c6edc3a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 10 May 2023 17:16:59 +0200 Subject: [PATCH 04/31] Adapt STI tests to current meson Meson now requires a build directory out of source tree. Setting STI dir to "{{ tenv_workdir }}source" does not work. It expands to "/var/str/var/str/source" instead of "var/str/source". Hence this patch passes to meson an explicit path to the directory with libmodulemd sources. --- libmodulemd.spec | 5 ++++- tests/tests.yml | 14 +++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index ab80ac0..93ad2e5 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -181,6 +181,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed May 10 2023 Petr Pisar - 2.15.0-2 +- Adapt STI tests to current meson + * Wed May 10 2023 Petr Pisar - 2.15.0-1 - 2.15.0 bump diff --git a/tests/tests.yml b/tests/tests.yml index 0d73a2f..d711be0 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,17 +1,17 @@ --- - hosts: localhost tags: - - classic + - classic roles: - role: standard-test-source - hosts: localhost tags: - - classic + - classic tasks: - name: Make sure fedpkg and selinux bindings are installed shell: dnf -y install fedpkg python{2,3}-libselinux libmodulemd-devel --skip-broken - - name: Copy spec file to remote machine + - name: Copy a spec file to /tmp copy: src: "{{ playbook_dir }}/../libmodulemd.spec" dest: /tmp/libmodulemd.spec @@ -24,9 +24,9 @@ roles: - role: standard-test-basic tests: + - configure: + run: meson setup -Daccept_overflowed_buildorder=true -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true /tmp/build "{{ tenv_workdir }}source" - build: - dir: . - run: meson -Daccept_overflowed_buildorder=true -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true source + run: ninja -C /tmp/build - unittests: - dir: . - run: ninja test + run: meson test -C /tmp/build From b672dea89696470ba6c1821b7a1f61204c734077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 11 May 2023 09:14:11 +0200 Subject: [PATCH 05/31] packit: Migrate from a deprecated current_version_command to actions/get-current-version https://github.com/fedora-modularity/libmodulemd/issues/553 --- .packit.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.packit.yml b/.packit.yml index f445248..16c03ed 100644 --- a/.packit.yml +++ b/.packit.yml @@ -2,8 +2,9 @@ specfile_path: libmodulemd.spec upstream_package_name: libmodulemd downstream_package_name: libmodulemd upstream_tag_template: libmodulemd-{version} -current_version_command: - - ./.packit_version.sh + +actions: + get-current-version: ./.packit_version.sh synced_files: - .packit.yml From 3c83baf5657ced9a0732e3f1744b5b37445e8296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 10 May 2023 17:16:59 +0200 Subject: [PATCH 06/31] Adapt STI tests to current meson Meson now requires a build directory out of source tree. Setting STI dir to "{{ tenv_workdir }}source" does not work. It expands to "/var/str/var/str/source" instead of "var/str/source". Hence this patch passes to meson an explicit path to the directory with libmodulemd sources. --- libmodulemd.spec | 5 ++++- tests/tests.yml | 14 +++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 078dd71..0c2991e 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -181,6 +181,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed May 10 2023 Petr Pisar - 2.15.0-2 +- Adapt STI tests to current meson + * Wed May 10 2023 Petr Pisar - 2.15.0-1 - 2.15.0 bump diff --git a/tests/tests.yml b/tests/tests.yml index 0d73a2f..d711be0 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,17 +1,17 @@ --- - hosts: localhost tags: - - classic + - classic roles: - role: standard-test-source - hosts: localhost tags: - - classic + - classic tasks: - name: Make sure fedpkg and selinux bindings are installed shell: dnf -y install fedpkg python{2,3}-libselinux libmodulemd-devel --skip-broken - - name: Copy spec file to remote machine + - name: Copy a spec file to /tmp copy: src: "{{ playbook_dir }}/../libmodulemd.spec" dest: /tmp/libmodulemd.spec @@ -24,9 +24,9 @@ roles: - role: standard-test-basic tests: + - configure: + run: meson setup -Daccept_overflowed_buildorder=true -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true /tmp/build "{{ tenv_workdir }}source" - build: - dir: . - run: meson -Daccept_overflowed_buildorder=true -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true source + run: ninja -C /tmp/build - unittests: - dir: . - run: ninja test + run: meson test -C /tmp/build From d5c9909c615df3d0f247af25bbfb311a96acb25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 11 May 2023 09:14:11 +0200 Subject: [PATCH 07/31] packit: Migrate from a deprecated current_version_command to actions/get-current-version https://github.com/fedora-modularity/libmodulemd/issues/553 --- .packit.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.packit.yml b/.packit.yml index f445248..16c03ed 100644 --- a/.packit.yml +++ b/.packit.yml @@ -2,8 +2,9 @@ specfile_path: libmodulemd.spec upstream_package_name: libmodulemd downstream_package_name: libmodulemd upstream_tag_template: libmodulemd-{version} -current_version_command: - - ./.packit_version.sh + +actions: + get-current-version: ./.packit_version.sh synced_files: - .packit.yml From 0c7a9dc71964b836de69669a3c8e95176f366f56 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Wed, 10 May 2023 15:52:25 +0200 Subject: [PATCH 08/31] Rebuild for rpm-4.18.90 --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 93ad2e5..96929fc 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -181,6 +181,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed May 10 2023 Florian Festi - 2.15.0-3 +- Rebuild for rpm-4.18.90 + * Wed May 10 2023 Petr Pisar - 2.15.0-2 - Adapt STI tests to current meson From 94ab733609716ab7379adfab23cfda785151f3e2 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 15 Jun 2023 17:00:27 +0200 Subject: [PATCH 09/31] Rebuilt for Python 3.12 --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 96929fc..0892c63 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -181,6 +181,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jun 15 2023 Python Maint - 2.15.0-4 +- Rebuilt for Python 3.12 + * Wed May 10 2023 Florian Festi - 2.15.0-3 - Rebuild for rpm-4.18.90 From 3ea1c45a241890d60a967e765b4379d45bac1486 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 11:28:48 +0000 Subject: [PATCH 10/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 0892c63..f0ad27a 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -181,6 +181,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 2.15.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Jun 15 2023 Python Maint - 2.15.0-4 - Rebuilt for Python 3.12 From 4d0466eccc5290025a9b3e06e0a52b9df449f0b0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 04:42:17 +0000 Subject: [PATCH 11/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index f0ad27a..8d5bc20 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -181,6 +181,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 2.15.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jul 20 2023 Fedora Release Engineering - 2.15.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 36f1a0169f11ab47572138cac2066065f7af80f4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 02:54:26 +0000 Subject: [PATCH 12/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 8d5bc20..a157580 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -181,6 +181,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 2.15.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 2.15.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 59d02d0db605e0f077cebe1a30b5b3293f0d6249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 29 Jan 2024 16:38:47 +0100 Subject: [PATCH 13/31] Fix building with glib2-doc 2.79.0 --- libmodulemd.spec | 8 +- ...ting-gtk-doc-module-paths-to-the-che.patch | 96 +++++++++++++++++++ ...ib-documentation-path-to-GLib-2.79.0.patch | 53 ++++++++++ 3 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch create mode 100644 modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch diff --git a/libmodulemd.spec b/libmodulemd.spec index a157580..fb4221c 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -37,6 +37,9 @@ Source0: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz Source1: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz.asc # Key exported from Petr Pisar's keyring Source2: gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg +# Fix building with glib2-doc 2.79.0, in upstream after 2.15.0 +Patch0: modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch +Patch1: modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch BuildRequires: gnupg2 BuildRequires: meson >= 0.47 @@ -181,6 +184,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Mon Jan 29 2024 Petr Pisar - 2.15.0-8 +- Fix building with glib2-doc 2.79.0 + * Thu Jan 25 2024 Fedora Release Engineering - 2.15.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch b/modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch new file mode 100644 index 0000000..8ab92f1 --- /dev/null +++ b/modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch @@ -0,0 +1,96 @@ +From 9d2809090cc0cccd7bab67453dc00cf43a289082 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 26 Jan 2024 15:44:39 +0100 +Subject: [PATCH 1/2] build: Move computing gtk-doc module paths to the check + place +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +A checks and an application of extra directories for gtkdoc-fixxref +were computed independetly. This patch removes the code duplication. +It also adds the discovered path to a "meson setup" summary output. + +Signed-off-by: Petr Písař +--- + meson.build | 25 ++++++++++++------------- + modulemd/meson.build | 9 +++++---- + 2 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/meson.build b/meson.build +index a5d1330..0b32f4d 100644 +--- a/meson.build ++++ b/meson.build +@@ -67,23 +67,21 @@ sed = find_program('sed') + test = find_program('test') + + with_docs = get_option('with_docs') ++gtk_doc_referred_paths = [] + if with_docs + gtkdoc = dependency('gtk-doc') + glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') + +- glib_index_path = join_paths(glib_docpath, 'glib/index.html') +- ret = run_command ([test, '-e', glib_index_path], +- check: false) +- if ret.returncode() != 0 +- error('Missing documentation for GLib: @0@'.format(glib_index_path)) +- endif +- +- gobject_index_path = join_paths(glib_docpath, 'gobject/index.html') +- ret = run_command ([test, '-e', gobject_index_path], +- check: false) +- if ret.returncode() != 0 +- error('Missing documentation for GObject: @0@'.format(gobject_index_path)) +- endif ++ foreach referred_module : [ 'glib', 'gobject' ] ++ doc_module_path = join_paths(glib_docpath, referred_module) ++ doc_index_file = join_paths(doc_module_path, 'index.html') ++ ret = run_command ([test, '-e', doc_index_file], ++ check: false) ++ if ret.returncode() != 0 ++ error('Missing GTK documentation for @0@: @1@'.format(referred_module, doc_index_file)) ++ endif ++ gtk_doc_referred_paths += [ doc_module_path ] ++ endforeach + endif + + # Keep with_manpages option a tristate feature for backward compatibility. +@@ -198,6 +196,7 @@ summary({'prefix': get_option('prefix'), + 'datadir': get_option('datadir'), + 'Python 2 GObject Overrides': gobject_overrides_dir_py2, + 'Python 3 GObject Overrides': gobject_overrides_dir_py3, ++ 'GTK-Doc Referred Paths': gtk_doc_referred_paths, + }, section: 'Directories') + + summary({'Custom Python': get_option('python_name'), +diff --git a/modulemd/meson.build b/modulemd/meson.build +index a816e13..844f135 100644 +--- a/modulemd/meson.build ++++ b/modulemd/meson.build +@@ -256,6 +256,10 @@ configure_file( + # --- Documenatation --- # + + if with_docs ++ fixxref_args = [] ++ foreach path : gtk_doc_referred_paths ++ fixxref_args += [ '--extra-dir=@0@'.format(path) ] ++ endforeach + gnome.gtkdoc( + 'modulemd-2.0', + install_dir: 'modulemd-2.0', +@@ -265,10 +269,7 @@ if with_docs + dependencies : [ + modulemd_dep, + ], +- fixxref_args: [ +- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')), +- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')), +- ], ++ fixxref_args: [ fixxref_args ], + install : true, + ) + endif +-- +2.43.0 + diff --git a/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch b/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch new file mode 100644 index 0000000..1d9c7dd --- /dev/null +++ b/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch @@ -0,0 +1,53 @@ +From 29c339a31b1c753dcdef041e5c2e0e600e48b59d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 26 Jan 2024 17:09:11 +0100 +Subject: [PATCH 2/2] doc: Adapt GLib documentation path to GLib 2.79.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GLib 2.79.0 switched from gtk-doc to gi-docgen, whose format and +installation location are both not compatible. The libmodulemd build +script reported an error because of the new location. + +This patch fixes the build failure by using the new location if GLib +is 2.79.0 or greater. + +Although the libmodulemd documentation references to GLib remain +unresolved now (i.e. names of the functions and the types are not +hyperlinks), we keep using the new location because the new GLib +*.devhelp2 indices remain there and they can only improve over the +time. + +If this expection does not fulfill, libmodulemd will either migrate to +gi-docgen, or drop the hard build-time dependency on GLib +documentation. + +Reimplements: #611 +Signed-off-by: Petr Písař +--- + meson.build | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 0b32f4d..6108649 100644 +--- a/meson.build ++++ b/meson.build +@@ -70,7 +70,13 @@ with_docs = get_option('with_docs') + gtk_doc_referred_paths = [] + if with_docs + gtkdoc = dependency('gtk-doc') +- glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') ++ ++ if glib.version().version_compare('<2.79.0') ++ glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') ++ else ++ glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0') ++ warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.') ++ endif + + foreach referred_module : [ 'glib', 'gobject' ] + doc_module_path = join_paths(glib_docpath, referred_module) +-- +2.43.0 + From 9fff9ef002e198422f95d2452c7391a88e143bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 27 Feb 2024 15:30:26 +0100 Subject: [PATCH 14/31] Require glib2 version with g_once_init_enter_pointer symbol glib2-2.79.0-2.fc40 added g_once_init_enter_pointer symbol and started to implant a reference on the symbol into applications via macros/in-lined functions included from glib2 header files. As a result, people upgrading to libmodulemd built against new glib2 but not upgrading glib2 at the same time will break dynamic linking of libmodulemd: # dnf5 install NetworkManager dnf5: symbol lookup error: /lib64/libmodulemd.so.2: undefined symbol: g_once_init_leave_pointer If glib2 versioned its symbols, rpm-build would inject an RPM dependency on the new glib2 versioned SONAME. However, this is not true, so we need to add a dependency on a minimal glib2 version manually. Because this issue is specific to not fully upgraded Fedora 40--41, I will not post it to the upstream. This issue materializes in real life when mock installs a new libdnf into a bootstrap image based on a container image created before glib2-2.79.0-2.fc40 (bug #2265336). --- libmodulemd.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index fb4221c..321b9db 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -60,6 +60,10 @@ BuildRequires: python-gobject-base BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-gobject-base %endif +%if 0%{?fedora} >= 40 && 0%{?fedora} < 42 +# glib2 version with g_once_init_enter_pointer symbol, bug #2265336 +Requires: glib2 >= 2.79.0-2 +%endif %description @@ -184,6 +188,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Tue Feb 27 2024 Petr Pisar - 2.15.0-9 +- Require glib2 version with g_once_init_enter_pointer symbol (bug #2265336) + * Mon Jan 29 2024 Petr Pisar - 2.15.0-8 - Fix building with glib2-doc 2.79.0 From 54cce88d5cd9e926d19cc9ac25381352fe0daf3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 3 Apr 2024 10:41:56 +0200 Subject: [PATCH 15/31] Note licenses of the tests in a spec file comment --- libmodulemd.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmodulemd.spec b/libmodulemd.spec index 321b9db..62d7f5d 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -31,6 +31,9 @@ Summary: Module metadata manipulation library ## not in any binary package # contrib/coverity-modeling.c: GPL-2.0-or-later # contrib/release-tools/semver: GPL-3.0-only +# modulemd/tests/test_data/f29.yaml: Apache-2.0 +# modulemd/tests/test_data/f29-updates.yaml: Apache-2.0 +# xml_specs/reduced/tests/good/module_stream_build_license.xml: MIT AND (MIT AND GPL-3.0-or-later) License: MIT URL: https://github.com/fedora-modularity/libmodulemd Source0: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz From dda060e3adebfd66f2153e1d3abfcab8749bc02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 15 May 2024 16:21:16 +0200 Subject: [PATCH 16/31] Fix building with glib2-doc 2.80.1 --- libmodulemd.spec | 8 ++- ...ib-documentation-path-to-GLib-2.80.1.patch | 64 +++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch diff --git a/libmodulemd.spec b/libmodulemd.spec index 62d7f5d..5c980e8 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -43,6 +43,9 @@ Source2: gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg # Fix building with glib2-doc 2.79.0, in upstream after 2.15.0 Patch0: modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch Patch1: modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch +# Fix building with glib2-doc 2.80.1, in upstream after 2.15.0, +# . +Patch2: modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch BuildRequires: gnupg2 BuildRequires: meson >= 0.47 @@ -191,6 +194,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed May 15 2024 Petr Pisar - 2.15.0-10 +- Fix building with glib2-doc 2.80.1 (upstream bug #619) + * Tue Feb 27 2024 Petr Pisar - 2.15.0-9 - Require glib2 version with g_once_init_enter_pointer symbol (bug #2265336) diff --git a/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch b/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch new file mode 100644 index 0000000..70a6786 --- /dev/null +++ b/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch @@ -0,0 +1,64 @@ +From f3336199b4e69af3305f156abc7533bed9e9a762 Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger +Date: Wed, 15 May 2024 08:35:00 +0200 +Subject: [PATCH] doc: Adapt GLib documentation path to GLib 2.80.1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With GLib 2.80.1 (commit 548ec9f1), the installation paths for the documentation +have changed once again: + + The `gi-docgen` tool is not designed to be used like that. In + particular, when nesting documentation directories, the generated + `*.devhelp2` files (needed by Devhelp to show the documentation) are + nested one directory level too deep for Devhelp to find them, and hence + are useless, and the documentation doesn’t show up in this common + documentation viewer. + + So, change the installed documentation directory hierarchy: + * `${PREFIX}/share/doc/glib-2.0/gio` → `${PREFIX}/share/doc/gio-2.0` + * `${PREFIX}/share/doc/glib-2.0/glib-unix` → + `${PREFIX}/share/doc/glib-unix-2.0` + * `${PREFIX}/share/doc/glib-2.0/gobject` → + `${PREFIX}/share/doc/gobject-2.0` + * etc. + * `${PREFIX}/share/doc/glib-2.0/glib` → `${PREFIX}/share/doc/glib-2.0` + +https://gitlab.gnome.org/GNOME/glib/-/issues/3287 +Reimplements #618 + +Signed-off-by: Petr Písař +--- + meson.build | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 6108649..fab704f 100644 +--- a/meson.build ++++ b/meson.build +@@ -73,12 +73,19 @@ if with_docs + + if glib.version().version_compare('<2.79.0') + glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') ++ glib_modules = ['glib', 'gobject' ] + else +- glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0') + warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.') ++ if glib.version().version_compare('<2.80.1') ++ glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0') ++ glib_modules = ['glib', 'gobject' ] ++ else ++ glib_docpath = join_paths(glib_prefix, 'share', 'doc') ++ glib_modules = ['glib-2.0', 'gobject-2.0' ] ++ endif + endif + +- foreach referred_module : [ 'glib', 'gobject' ] ++ foreach referred_module : glib_modules + doc_module_path = join_paths(glib_docpath, referred_module) + doc_index_file = join_paths(doc_module_path, 'index.html') + ret = run_command ([test, '-e', doc_index_file], +-- +2.45.0 + From f96a22b6ce53ac1b0d07175415939dfd3058deed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 15 May 2024 17:50:49 +0200 Subject: [PATCH 17/31] Do not install Python 2 packages in Fedora STI tests --- libmodulemd.spec | 5 ++++- tests/tests.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 5c980e8..d13b122 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -194,6 +194,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed May 15 2024 Petr Pisar - 2.15.0-11 +- Do not install Python 2 packages in Fedora STI tests + * Wed May 15 2024 Petr Pisar - 2.15.0-10 - Fix building with glib2-doc 2.80.1 (upstream bug #619) diff --git a/tests/tests.yml b/tests/tests.yml index d711be0..e9da1a6 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,7 +10,7 @@ - classic tasks: - name: Make sure fedpkg and selinux bindings are installed - shell: dnf -y install fedpkg python{2,3}-libselinux libmodulemd-devel --skip-broken + shell: dnf -y install fedpkg python3-libselinux libmodulemd-devel --skip-broken - name: Copy a spec file to /tmp copy: src: "{{ playbook_dir }}/../libmodulemd.spec" From 8e9d3641655edc1b0a95b86e94480226d1826b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 16 May 2024 09:00:54 +0200 Subject: [PATCH 18/31] Use canonical "dnf builddep" command in STI tests --- libmodulemd.spec | 5 ++++- tests/tests.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index d13b122..6141003 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -194,6 +194,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu May 16 2024 Petr Pisar - 2.15.0-12 +- Use canonical "dnf builddep" command in STI tests + * Wed May 15 2024 Petr Pisar - 2.15.0-11 - Do not install Python 2 packages in Fedora STI tests diff --git a/tests/tests.yml b/tests/tests.yml index e9da1a6..14858e3 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -16,7 +16,7 @@ src: "{{ playbook_dir }}/../libmodulemd.spec" dest: /tmp/libmodulemd.spec - name: Install build deps - shell: dnf -y build-dep /tmp/libmodulemd.spec + shell: dnf -y builddep /tmp/libmodulemd.spec - hosts: localhost tags: From 04b1fb0eebff8a8ad157284ee9fe03212683c874 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 14:09:43 +0200 Subject: [PATCH 19/31] Rebuilt for Python 3.13 --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 6141003..e48e996 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -194,6 +194,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Fri Jun 07 2024 Python Maint - 2.15.0-13 +- Rebuilt for Python 3.13 + * Thu May 16 2024 Petr Pisar - 2.15.0-12 - Use canonical "dnf builddep" command in STI tests From 6ca8623b29d8fd755c01164293f14867050a2d03 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 14:28:56 +0000 Subject: [PATCH 20/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index e48e996..3949374 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -194,6 +194,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 2.15.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Python Maint - 2.15.0-13 - Rebuilt for Python 3.13 From 126a862656f84cfb21ef7a580d51af3cb9b7296c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 12:05:55 +0000 Subject: [PATCH 21/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 3949374..67c401b 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -194,6 +194,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 2.15.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Jul 18 2024 Fedora Release Engineering - 2.15.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From b2e2ef5320e1f0a786736eac64574d74b68fc36b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 20 Jan 2025 07:35:47 +0000 Subject: [PATCH 22/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 67c401b..244f751 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -194,6 +194,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Mon Jan 20 2025 Fedora Release Engineering - 2.15.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Jan 17 2025 Fedora Release Engineering - 2.15.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From f747988a41a0ff3ebdbbf2679f4d15b662d6a814 Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Mon, 20 Jan 2025 14:53:24 +0000 Subject: [PATCH 23/31] Update .packit.yml to support new packit release 1.0.0 `synced_files` has been substituted by [files_to_sync](https://packit.dev/docs/configuration#files_to_sync). --- .packit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.packit.yml b/.packit.yml index 16c03ed..9ec5237 100644 --- a/.packit.yml +++ b/.packit.yml @@ -6,7 +6,7 @@ upstream_tag_template: libmodulemd-{version} actions: get-current-version: ./.packit_version.sh -synced_files: +files_to_sync: - .packit.yml - .make_packit_specfile.sh - libmodulemd.spec From c87c812c4e8febc30d03d3bc003a3081cec900fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 9 May 2025 13:41:13 +0200 Subject: [PATCH 24/31] 2.15.1 bump --- .gitignore | 2 + libmodulemd.spec | 16 ++-- ...ting-gtk-doc-module-paths-to-the-che.patch | 96 ------------------- ...ib-documentation-path-to-GLib-2.79.0.patch | 53 ---------- ...ib-documentation-path-to-GLib-2.80.1.patch | 64 ------------- sources | 4 +- 6 files changed, 11 insertions(+), 224 deletions(-) delete mode 100644 modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch delete mode 100644 modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch delete mode 100644 modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch diff --git a/.gitignore b/.gitignore index 6034ec3..51131ca 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,5 @@ /modulemd-2.14.0.tar.xz.asc /modulemd-2.15.0.tar.xz /modulemd-2.15.0.tar.xz.asc +/modulemd-2.15.1.tar.xz +/modulemd-2.15.1.tar.xz.asc diff --git a/libmodulemd.spec b/libmodulemd.spec index 244f751..f5c81ea 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -23,8 +23,8 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.15.0 -Release: 16%{?dist} +Version: 2.15.1 +Release: 1%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -33,19 +33,14 @@ Summary: Module metadata manipulation library # contrib/release-tools/semver: GPL-3.0-only # modulemd/tests/test_data/f29.yaml: Apache-2.0 # modulemd/tests/test_data/f29-updates.yaml: Apache-2.0 -# xml_specs/reduced/tests/good/module_stream_build_license.xml: MIT AND (MIT AND GPL-3.0-or-later) +# xml_specs/reduced/tests/good/module_stream_build_license.xml: MIT AND GPL-3.0-or-later License: MIT +SourceLicense: %{license} AND GPL-3.0-only AND GPL-3.0-or-later AND GPL-2.0-or-later AND Apache-2.0 URL: https://github.com/fedora-modularity/libmodulemd Source0: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz Source1: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz.asc # Key exported from Petr Pisar's keyring Source2: gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg -# Fix building with glib2-doc 2.79.0, in upstream after 2.15.0 -Patch0: modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch -Patch1: modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch -# Fix building with glib2-doc 2.80.1, in upstream after 2.15.0, -# . -Patch2: modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch BuildRequires: gnupg2 BuildRequires: meson >= 0.47 @@ -194,6 +189,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Fri May 09 2025 Petr Pisar - 2.15.1-1 +- 2.15.1 bump + * Mon Jan 20 2025 Fedora Release Engineering - 2.15.0-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch b/modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch deleted file mode 100644 index 8ab92f1..0000000 --- a/modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9d2809090cc0cccd7bab67453dc00cf43a289082 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Fri, 26 Jan 2024 15:44:39 +0100 -Subject: [PATCH 1/2] build: Move computing gtk-doc module paths to the check - place -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -A checks and an application of extra directories for gtkdoc-fixxref -were computed independetly. This patch removes the code duplication. -It also adds the discovered path to a "meson setup" summary output. - -Signed-off-by: Petr Písař ---- - meson.build | 25 ++++++++++++------------- - modulemd/meson.build | 9 +++++---- - 2 files changed, 17 insertions(+), 17 deletions(-) - -diff --git a/meson.build b/meson.build -index a5d1330..0b32f4d 100644 ---- a/meson.build -+++ b/meson.build -@@ -67,23 +67,21 @@ sed = find_program('sed') - test = find_program('test') - - with_docs = get_option('with_docs') -+gtk_doc_referred_paths = [] - if with_docs - gtkdoc = dependency('gtk-doc') - glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') - -- glib_index_path = join_paths(glib_docpath, 'glib/index.html') -- ret = run_command ([test, '-e', glib_index_path], -- check: false) -- if ret.returncode() != 0 -- error('Missing documentation for GLib: @0@'.format(glib_index_path)) -- endif -- -- gobject_index_path = join_paths(glib_docpath, 'gobject/index.html') -- ret = run_command ([test, '-e', gobject_index_path], -- check: false) -- if ret.returncode() != 0 -- error('Missing documentation for GObject: @0@'.format(gobject_index_path)) -- endif -+ foreach referred_module : [ 'glib', 'gobject' ] -+ doc_module_path = join_paths(glib_docpath, referred_module) -+ doc_index_file = join_paths(doc_module_path, 'index.html') -+ ret = run_command ([test, '-e', doc_index_file], -+ check: false) -+ if ret.returncode() != 0 -+ error('Missing GTK documentation for @0@: @1@'.format(referred_module, doc_index_file)) -+ endif -+ gtk_doc_referred_paths += [ doc_module_path ] -+ endforeach - endif - - # Keep with_manpages option a tristate feature for backward compatibility. -@@ -198,6 +196,7 @@ summary({'prefix': get_option('prefix'), - 'datadir': get_option('datadir'), - 'Python 2 GObject Overrides': gobject_overrides_dir_py2, - 'Python 3 GObject Overrides': gobject_overrides_dir_py3, -+ 'GTK-Doc Referred Paths': gtk_doc_referred_paths, - }, section: 'Directories') - - summary({'Custom Python': get_option('python_name'), -diff --git a/modulemd/meson.build b/modulemd/meson.build -index a816e13..844f135 100644 ---- a/modulemd/meson.build -+++ b/modulemd/meson.build -@@ -256,6 +256,10 @@ configure_file( - # --- Documenatation --- # - - if with_docs -+ fixxref_args = [] -+ foreach path : gtk_doc_referred_paths -+ fixxref_args += [ '--extra-dir=@0@'.format(path) ] -+ endforeach - gnome.gtkdoc( - 'modulemd-2.0', - install_dir: 'modulemd-2.0', -@@ -265,10 +269,7 @@ if with_docs - dependencies : [ - modulemd_dep, - ], -- fixxref_args: [ -- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')), -- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')), -- ], -+ fixxref_args: [ fixxref_args ], - install : true, - ) - endif --- -2.43.0 - diff --git a/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch b/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch deleted file mode 100644 index 1d9c7dd..0000000 --- a/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 29c339a31b1c753dcdef041e5c2e0e600e48b59d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Fri, 26 Jan 2024 17:09:11 +0100 -Subject: [PATCH 2/2] doc: Adapt GLib documentation path to GLib 2.79.0 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -GLib 2.79.0 switched from gtk-doc to gi-docgen, whose format and -installation location are both not compatible. The libmodulemd build -script reported an error because of the new location. - -This patch fixes the build failure by using the new location if GLib -is 2.79.0 or greater. - -Although the libmodulemd documentation references to GLib remain -unresolved now (i.e. names of the functions and the types are not -hyperlinks), we keep using the new location because the new GLib -*.devhelp2 indices remain there and they can only improve over the -time. - -If this expection does not fulfill, libmodulemd will either migrate to -gi-docgen, or drop the hard build-time dependency on GLib -documentation. - -Reimplements: #611 -Signed-off-by: Petr Písař ---- - meson.build | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 0b32f4d..6108649 100644 ---- a/meson.build -+++ b/meson.build -@@ -70,7 +70,13 @@ with_docs = get_option('with_docs') - gtk_doc_referred_paths = [] - if with_docs - gtkdoc = dependency('gtk-doc') -- glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') -+ -+ if glib.version().version_compare('<2.79.0') -+ glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') -+ else -+ glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0') -+ warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.') -+ endif - - foreach referred_module : [ 'glib', 'gobject' ] - doc_module_path = join_paths(glib_docpath, referred_module) --- -2.43.0 - diff --git a/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch b/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch deleted file mode 100644 index 70a6786..0000000 --- a/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch +++ /dev/null @@ -1,64 +0,0 @@ -From f3336199b4e69af3305f156abc7533bed9e9a762 Mon Sep 17 00:00:00 2001 -From: Dominique Leuenberger -Date: Wed, 15 May 2024 08:35:00 +0200 -Subject: [PATCH] doc: Adapt GLib documentation path to GLib 2.80.1 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -With GLib 2.80.1 (commit 548ec9f1), the installation paths for the documentation -have changed once again: - - The `gi-docgen` tool is not designed to be used like that. In - particular, when nesting documentation directories, the generated - `*.devhelp2` files (needed by Devhelp to show the documentation) are - nested one directory level too deep for Devhelp to find them, and hence - are useless, and the documentation doesn’t show up in this common - documentation viewer. - - So, change the installed documentation directory hierarchy: - * `${PREFIX}/share/doc/glib-2.0/gio` → `${PREFIX}/share/doc/gio-2.0` - * `${PREFIX}/share/doc/glib-2.0/glib-unix` → - `${PREFIX}/share/doc/glib-unix-2.0` - * `${PREFIX}/share/doc/glib-2.0/gobject` → - `${PREFIX}/share/doc/gobject-2.0` - * etc. - * `${PREFIX}/share/doc/glib-2.0/glib` → `${PREFIX}/share/doc/glib-2.0` - -https://gitlab.gnome.org/GNOME/glib/-/issues/3287 -Reimplements #618 - -Signed-off-by: Petr Písař ---- - meson.build | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/meson.build b/meson.build -index 6108649..fab704f 100644 ---- a/meson.build -+++ b/meson.build -@@ -73,12 +73,19 @@ if with_docs - - if glib.version().version_compare('<2.79.0') - glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') -+ glib_modules = ['glib', 'gobject' ] - else -- glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0') - warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.') -+ if glib.version().version_compare('<2.80.1') -+ glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0') -+ glib_modules = ['glib', 'gobject' ] -+ else -+ glib_docpath = join_paths(glib_prefix, 'share', 'doc') -+ glib_modules = ['glib-2.0', 'gobject-2.0' ] -+ endif - endif - -- foreach referred_module : [ 'glib', 'gobject' ] -+ foreach referred_module : glib_modules - doc_module_path = join_paths(glib_docpath, referred_module) - doc_index_file = join_paths(doc_module_path, 'index.html') - ret = run_command ([test, '-e', doc_index_file], --- -2.45.0 - diff --git a/sources b/sources index 344f925..9affb37 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (modulemd-2.15.0.tar.xz) = 79032eb591cd3b778cb348040150ec4d1ccb8e2890d02c7b7a04f9b1bd376d32c5ae0e2c6dfb8056595fae5e54ea8365de06fe969a0f04b979abad3ff0882033 -SHA512 (modulemd-2.15.0.tar.xz.asc) = 07439efcd7d7ca1e67110a13902f2abd978c93872c383dcfde8d78accf9471787877d69fef8dc06ce65fbde3463b7e5201c7d550acbb530062d9990713d8c63a +SHA512 (modulemd-2.15.1.tar.xz) = 5658c5ee9c80427bb2fce46109a80fab55ae39dcd9564c185a7605b4a80d703ee3817099a54f6311ce2c02f298c1afd112ffd24e8f88b34a514537066fecc92c +SHA512 (modulemd-2.15.1.tar.xz.asc) = 45e5fd6ed121b78d0c18bb2656dc333784f93c708f5aff297154d0988a71c181d914402546e805ba6211e4078ea516856935baf3258c77e730335d4f613c18b8 From 37ece006753344d82a4c020167c51083ebd93419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 9 May 2025 14:36:22 +0200 Subject: [PATCH 25/31] Rewrite CI tests from STI to TMT --- .fmf/version | 1 + gating.yaml | 9 +++++---- plans/sanity.fmf | 5 +++++ tests/tests.yml | 32 -------------------------------- tests/upstream-tests.fmf | 15 +++++++++++++++ tests/upstream-tests.sh | 26 ++++++++++++++++++++++++++ 6 files changed, 52 insertions(+), 36 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/sanity.fmf delete mode 100644 tests/tests.yml create mode 100644 tests/upstream-tests.fmf create mode 100755 tests/upstream-tests.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml index f075ad7..c778f75 100644 --- a/gating.yaml +++ b/gating.yaml @@ -1,15 +1,16 @@ --- !Policy product_versions: - - fedora-* -decision_context: bodhi_update_push_testing + - fedora-rawhide +decision_context: bodhi_update_push_stable subject_type: koji_build rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} - + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} --- !Policy product_versions: - fedora-* decision_context: bodhi_update_push_stable subject_type: koji_build rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/plans/sanity.fmf b/plans/sanity.fmf new file mode 100644 index 0000000..a72ded4 --- /dev/null +++ b/plans/sanity.fmf @@ -0,0 +1,5 @@ +summary: Sanity tests +discover: + how: fmf +execute: + how: tmt diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 14858e3..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -- hosts: localhost - tags: - - classic - roles: - - role: standard-test-source - -- hosts: localhost - tags: - - classic - tasks: - - name: Make sure fedpkg and selinux bindings are installed - shell: dnf -y install fedpkg python3-libselinux libmodulemd-devel --skip-broken - - name: Copy a spec file to /tmp - copy: - src: "{{ playbook_dir }}/../libmodulemd.spec" - dest: /tmp/libmodulemd.spec - - name: Install build deps - shell: dnf -y builddep /tmp/libmodulemd.spec - -- hosts: localhost - tags: - - classic - roles: - - role: standard-test-basic - tests: - - configure: - run: meson setup -Daccept_overflowed_buildorder=true -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true /tmp/build "{{ tenv_workdir }}source" - - build: - run: ninja -C /tmp/build - - unittests: - run: meson test -C /tmp/build diff --git a/tests/upstream-tests.fmf b/tests/upstream-tests.fmf new file mode 100644 index 0000000..2dd09c9 --- /dev/null +++ b/tests/upstream-tests.fmf @@ -0,0 +1,15 @@ +summary: Upstream tests +component: libmodulemd +require: + - bash + - dnf5 + - dnf5-command(builddep) + - fedpkg + - libmodulemd + - koji + - meson + - ninja + - rpm + - rpmdevtools +duration: 10m +test: ./upstream-tests.sh diff --git a/tests/upstream-tests.sh b/tests/upstream-tests.sh new file mode 100755 index 0000000..0d701d8 --- /dev/null +++ b/tests/upstream-tests.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -ex +DIR=$(mktemp -d) +pushd "$DIR" + +SRCRPM=$(rpm -q --qf '%{sourcerpm}' libmodulemd) +koji download-build -a src "$SRCRPM" +rpmdev-extract "$SRCRPM" + +NAME=$(rpm -q --qf %{name} "$SRCRPM") +VERSION=$(rpm -q --qf %{version} "$SRCRPM") +pushd "${SRCRPM//.rpm}" +dnf -y builddep "$NAME".spec +fedpkg prep + +meson setup -Daccept_overflowed_buildorder=true -Drpmio=enabled \ + -Dskip_introspection=false -Dtest_installed_lib=true \ + -Dwith_py2=false -Dwith_py3=true \ + ./build "${NAME}-${VERSION}-build/modulemd-${VERSION}" +ninja -C ./build +meson test -C ./build + +popd + +popd +rm -r "$DIR" From a8720d4a2824296c2ad212b7dd56b82e6f991979 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 14:08:45 +0200 Subject: [PATCH 26/31] Rebuilt for Python 3.14 --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index f5c81ea..c4d3fad 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -189,6 +189,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Tue Jun 03 2025 Python Maint - 2.15.1-2 +- Rebuilt for Python 3.14 + * Fri May 09 2025 Petr Pisar - 2.15.1-1 - 2.15.1 bump From 905725e65a29f5f6a227ee42aa94286078a71337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 18 Jun 2025 10:05:51 +0200 Subject: [PATCH 27/31] 2.15.2 bump --- .gitignore | 2 ++ libmodulemd.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 51131ca..78e14ea 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,5 @@ /modulemd-2.15.0.tar.xz.asc /modulemd-2.15.1.tar.xz /modulemd-2.15.1.tar.xz.asc +/modulemd-2.15.2.tar.xz +/modulemd-2.15.2.tar.xz.asc diff --git a/libmodulemd.spec b/libmodulemd.spec index c4d3fad..063f982 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -23,8 +23,8 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.15.1 -Release: 2%{?dist} +Version: 2.15.2 +Release: 1%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -189,6 +189,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed Jun 18 2025 Petr Pisar - 2.15.2-1 +- 2.15.2 bump + * Tue Jun 03 2025 Python Maint - 2.15.1-2 - Rebuilt for Python 3.14 diff --git a/sources b/sources index 9affb37..a912538 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (modulemd-2.15.1.tar.xz) = 5658c5ee9c80427bb2fce46109a80fab55ae39dcd9564c185a7605b4a80d703ee3817099a54f6311ce2c02f298c1afd112ffd24e8f88b34a514537066fecc92c -SHA512 (modulemd-2.15.1.tar.xz.asc) = 45e5fd6ed121b78d0c18bb2656dc333784f93c708f5aff297154d0988a71c181d914402546e805ba6211e4078ea516856935baf3258c77e730335d4f613c18b8 +SHA512 (modulemd-2.15.2.tar.xz) = d1785f6982ed19292103d741e3e94581e9789737be6f8e90d19218296f3aeb87d6589f3247744f8eab4f714d298d1508312b119624a8c32086c720becfa4cdc5 +SHA512 (modulemd-2.15.2.tar.xz.asc) = 282ff35f15418e95aae09d9bff8084aa0b6f2732cea3934a84a1bd4ddd8e50c8375466acb6a39a6e632f4bbbefd49735b7f56e9304d52521786e245f52feae24 From acf474286f1b0f76738c4ee4ee05047be139d508 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 20:00:39 +0000 Subject: [PATCH 28/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 063f982..5d80e64 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -189,6 +189,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 2.15.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Jun 18 2025 Petr Pisar - 2.15.2-1 - 2.15.2 bump From d5da44ade017dc515478366495c803bb5869fef5 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 12:56:22 +0200 Subject: [PATCH 29/31] Rebuilt for Python 3.14.0rc2 bytecode --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 5d80e64..c92909a 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -189,6 +189,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Fri Aug 15 2025 Python Maint - 2.15.2-3 +- Rebuilt for Python 3.14.0rc2 bytecode + * Thu Jul 24 2025 Fedora Release Engineering - 2.15.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From c05d8536fad769dbd27a1ac1a8bd2fcb5d174358 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:27:02 +0200 Subject: [PATCH 30/31] Rebuilt for Python 3.14.0rc3 bytecode --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index c92909a..bb70a63 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -189,6 +189,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Fri Sep 19 2025 Python Maint - 2.15.2-4 +- Rebuilt for Python 3.14.0rc3 bytecode + * Fri Aug 15 2025 Python Maint - 2.15.2-3 - Rebuilt for Python 3.14.0rc2 bytecode From a9a3403052d90cd0c2102cfa496ca371c95016c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 14 Jan 2026 16:48:48 +0100 Subject: [PATCH 31/31] Adapt tests to glib2-2.87.0 --- libmodulemd.spec | 7 +- ...md-2.15.2-tests-Adapt-to-glib-2.87.0.patch | 2104 +++++++++++++++++ 2 files changed, 2110 insertions(+), 1 deletion(-) create mode 100644 modulemd-2.15.2-tests-Adapt-to-glib-2.87.0.patch diff --git a/libmodulemd.spec b/libmodulemd.spec index bb70a63..e33c76a 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -41,6 +41,8 @@ Source0: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz Source1: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz.asc # Key exported from Petr Pisar's keyring Source2: gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg +# Adapt tests to glib2-2.87.0, in upstream after 2.15.2, bug #2423153 +Patch0: modulemd-2.15.2-tests-Adapt-to-glib-2.87.0.patch BuildRequires: gnupg2 BuildRequires: meson >= 0.47 @@ -189,6 +191,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed Jan 14 2026 Petr Pisar - 2.15.2-5 +- Adapt tests to glib2-2.87.0 (bug #2423153) + * Fri Sep 19 2025 Python Maint - 2.15.2-4 - Rebuilt for Python 3.14.0rc3 bytecode diff --git a/modulemd-2.15.2-tests-Adapt-to-glib-2.87.0.patch b/modulemd-2.15.2-tests-Adapt-to-glib-2.87.0.patch new file mode 100644 index 0000000..8e86b58 --- /dev/null +++ b/modulemd-2.15.2-tests-Adapt-to-glib-2.87.0.patch @@ -0,0 +1,2104 @@ +From 89d4afb3d018250427d4d87840ae57aab3903361 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 8 Dec 2025 13:39:29 +0100 +Subject: [PATCH] tests: Adapt to glib 2.87.0 + +After upgrading glib from 2.86.1 to 2.87.0, tests which expect catching +SIGTRAP started to fail like this: + + [...]/redhat-linux-build/modulemd/component_module + TAP version 14 + # random seed: R02S501b6bd02413a2980133f197dab99416 + 1..6 + # Start of modulemd tests + # Start of v2 tests + # Start of component tests + # Start of module tests + not ok /modulemd/v2/component/module/construct - libmodulemd-FATAL-CRITICAL: modulemd_component_set_key: assertion 'name' failed + Bail out! + Aborted (core dumped) LD_LIBRARY_PATH=/home/test/libmodulemd-devel/redhat-linux-build/modulemd MESON_BUILD_ROOT=/home/test/libmodulemd-devel/redhat-linux-build TEST_DATA_PATH=/home/test/libmodulemd-devel/modulemd/tests/test_data UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 LC_ALL=C MESON_TEST_ITERATION=1 MESON_SOURCE_ROOT=/home/test/libmodulemd-devel MALLOC_PERTURB_=115 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 /home/test/libmodulemd-devel/redhat-linux-build/modulemd/component_module + +The tests passed a NULL pointer to libmodulemd object constructors and +checked that glib raised a SIGTRAP signal. The new glib fixed + and as a side +effect changed how the process is terminated: If the process runs +under a debugger, a breakpoint trap is invoked or SIGTRAP raised, +depending on the architecture. If the process does not run under +a debugger, abort() is called, which raises SIGABRT and then after +returning to glib SIGABRT disposition is reset and SIGABRT raised +again to finally terminate the process. That means that catching +signals is pointless because the process will be terminated +nevertheless. + +This patch adapts the tests by using a glib-sanctioned way of checking +whether a process terminated abnormally instead of depending on +a way a particular glib version implements. + +This patch moves the trapping subtests into standalone tests because +g_test_trap_subprocess() cannot handle multiple subtests in a single +test function. It also removes pointless checks for a return value of +a function which has just exited the process. + +The same goes for Python tests (with +G_DEBUG=fatal-warnings,fatal-criticals) which originally went as far +as checking whether and which signal was raised. This patch makes the +Python tests passing regardless of G_DEBUG setting. + +Implementation note: Python does not support annoymous block and +context managers are not compatible with fork, hence this patch moves +the blocks into named callables to be exectuted in a subprocess. + +Implementation note: Glib provides G_TEST_SUBPROCESS_DEFAULT constant +since 2.74. This patch adds a fallback definition instead of +hard-coding 0 literal. + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2423153 +--- + meson.build | 8 + + modulemd/include/private/glib-extensions.h | 4 + + modulemd/include/private/test-utils.h | 1 + + modulemd/meson.build | 1 + + modulemd/tests/ModulemdTests/base.py | 25 +++ + modulemd/tests/ModulemdTests/defaults.py | 31 ++- + modulemd/tests/ModulemdTests/dependencies.py | 26 ++- + modulemd/tests/ModulemdTests/profile.py | 21 +- + modulemd/tests/ModulemdTests/servicelevel.py | 21 +- + .../tests/ModulemdTests/translationentry.py | 21 +- + modulemd/tests/test-modulemd-common.c | 68 +++--- + .../tests/test-modulemd-component-module.c | 82 ++++--- + modulemd/tests/test-modulemd-defaults-v1.c | 87 ++++--- + modulemd/tests/test-modulemd-defaults.c | 79 ++++--- + modulemd/tests/test-modulemd-dependencies.c | 212 ++++++++++++++---- + modulemd/tests/test-modulemd-module.c | 72 ++++-- + modulemd/tests/test-modulemd-obsoletes.c | 79 ++++--- + modulemd/tests/test-modulemd-profile.c | 105 ++++++--- + modulemd/tests/test-modulemd-service-level.c | 117 ++++++---- + .../tests/test-modulemd-translation-entry.c | 113 ++++++---- + modulemd/tests/test-modulemd-translation.c | 108 +++++---- + 21 files changed, 873 insertions(+), 408 deletions(-) + +diff --git a/meson.build b/meson.build +index f28e410..df6e5ae 100644 +--- a/meson.build ++++ b/meson.build +@@ -128,6 +128,14 @@ has_g_spawn_check_wait_status = cc.has_function( + 'g_spawn_check_wait_status', + dependencies : [ glib ]) + ++# Check whether glib2 has G_TEST_SUBPROCESS_DEFAULT enum member. ++has_g_test_subprocess_default = cc.compiles( ++ '''#include ++ int foo = G_TEST_SUBPROCESS_DEFAULT; ++ ''', ++ dependencies : [ glib ], ++ name : 'G_TEST_SUBPROCESS_DEFAULT') ++ + with_py3 = get_option('with_py3') + if with_py3 + if get_option('skip_introspection') +diff --git a/modulemd/include/private/glib-extensions.h b/modulemd/include/private/glib-extensions.h +index 29e9c84..00081be 100644 +--- a/modulemd/include/private/glib-extensions.h ++++ b/modulemd/include/private/glib-extensions.h +@@ -23,6 +23,10 @@ + G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDate, g_date_free) + #endif + ++/* G_TEST_SUBPROCESS_DEFAULT was added in Glib 2.74. */ ++#ifndef HAVE_G_TEST_SUBPROCESS_DEFAULT ++#define G_TEST_SUBPROCESS_DEFAULT 0 ++#endif + + #ifndef HAVE_EXTEND_AND_STEAL + +diff --git a/modulemd/include/private/test-utils.h b/modulemd/include/private/test-utils.h +index 2643ca1..320cf99 100644 +--- a/modulemd/include/private/test-utils.h ++++ b/modulemd/include/private/test-utils.h +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include "glib-extensions.h" + + G_BEGIN_DECLS + +diff --git a/modulemd/meson.build b/modulemd/meson.build +index 1c75002..e41bcc5 100644 +--- a/modulemd/meson.build ++++ b/modulemd/meson.build +@@ -145,6 +145,7 @@ cdata.set('HAVE_RPMIO', rpm.found()) + cdata.set('HAVE_GDATE_AUTOPTR', has_gdate_autoptr) + cdata.set('HAVE_EXTEND_AND_STEAL', has_extend_and_steal) + cdata.set('HAVE_G_SPAWN_CHECK_WAIT_STATUS', has_g_spawn_check_wait_status) ++cdata.set('HAVE_G_TEST_SUBPROCESS_DEFAULT', has_g_test_subprocess_default) + cdata.set('HAVE_OVERFLOWED_BUILDORDER', accept_overflowed_buildorder) + configure_file( + output : 'config.h', +diff --git a/modulemd/tests/ModulemdTests/base.py b/modulemd/tests/ModulemdTests/base.py +index 1b46470..55ac742 100644 +--- a/modulemd/tests/ModulemdTests/base.py ++++ b/modulemd/tests/ModulemdTests/base.py +@@ -52,6 +52,21 @@ class TestBase(unittest.TestCase): + elif self._caught_signal and not expect_signal: + raise AssertionError("Signal caught in non-warning state") + ++ def assertProcessFailure(self, callable, *args): ++ """Calls the callable in a subprocess and checks whether the process was ++ killed with a signal depending on Glib warning fatality.""" ++ pid = os.fork() ++ if pid == 0: ++ callable(*args) ++ os._exit(0) ++ _, status = os.waitpid(pid, 0) ++ if self.warnings_fatal: ++ if not os.WIFSIGNALED(status): ++ raise AssertionError("Child process was not aborted") ++ else: ++ if os.WIFSIGNALED(status): ++ raise AssertionError("Child process was unexpectedly aborted") ++ + @property + def warnings_fatal(self): + gdebug = os.getenv("G_DEBUG", "").split(",") +@@ -67,3 +82,13 @@ class TestBase(unittest.TestCase): + return super(TestBase, self).assertRaisesRegex(*args, **kwargs) + except AttributeError: + return self.assertRaisesRegexp(*args, **kwargs) ++ ++ def assertRaisesRegexOrDies(self, callable, *args, **kwargs): ++ """Checks that the callable terminates a process if Glib warnings are ++ fatal. Otherwise, that the callable raised a given exception type with ++ the given value matching a regular expression.""" ++ if self.warnings_fatal: ++ self.assertProcessFailure(callable) ++ else: ++ with self.assertRaisesRegex(*args, **kwargs): ++ callable() +diff --git a/modulemd/tests/ModulemdTests/defaults.py b/modulemd/tests/ModulemdTests/defaults.py +index c162bf3..3a1b9fe 100644 +--- a/modulemd/tests/ModulemdTests/defaults.py ++++ b/modulemd/tests/ModulemdTests/defaults.py +@@ -29,6 +29,20 @@ except ImportError: + from base import TestBase + + ++def _zero_mdversion(): ++ defs = Modulemd.Defaults.new(0, "foo") ++ ++ ++def _unknown_mdversion(): ++ defs = Modulemd.Defaults.new( ++ Modulemd.DefaultsVersionEnum.LATEST + 1, "foo" ++ ) ++ ++ ++def _set_module_name_to_none(defs): ++ defs.props.module_name = None ++ ++ + class TestDefaults(TestBase): + def test_constructors(self): + # Test that the new() function works +@@ -48,16 +62,14 @@ class TestDefaults(TestBase): + Modulemd.Defaults() + + # Test with a zero mdversion +- with self.assertRaisesRegex(TypeError, "constructor returned NULL"): +- with self.expect_signal(): +- defs = Modulemd.Defaults.new(0, "foo") ++ self.assertRaisesRegexOrDies( ++ _zero_mdversion, TypeError, "constructor returned NULL" ++ ) + + # Test with an unknown mdversion +- with self.assertRaisesRegex(TypeError, "constructor returned NULL"): +- with self.expect_signal(): +- defs = Modulemd.Defaults.new( +- Modulemd.DefaultsVersionEnum.LATEST + 1, "foo" +- ) ++ self.assertRaisesRegexOrDies( ++ _unknown_mdversion, TypeError, "constructor returned NULL" ++ ) + + # Test with no name + with self.assertRaisesRegex( +@@ -99,8 +111,7 @@ class TestDefaults(TestBase): + assert defs.get_module_name() == "foo" + + # Ensure we cannot set the module_name +- with self.expect_signal(): +- defs.props.module_name = None ++ self.assertProcessFailure(_set_module_name_to_none, defs) + + def test_modified(self): + defs = Modulemd.Defaults.new( +diff --git a/modulemd/tests/ModulemdTests/dependencies.py b/modulemd/tests/ModulemdTests/dependencies.py +index a190134..c776e23 100644 +--- a/modulemd/tests/ModulemdTests/dependencies.py ++++ b/modulemd/tests/ModulemdTests/dependencies.py +@@ -28,38 +28,40 @@ except ImportError: + from base import TestBase + + ++def _get_buildtime_streams(modulemd_dependecies, stream_name): ++ modulemd_dependecies.get_buildtime_streams(stream_name) ++ ++ ++def _get_runtime_streams(modulemd_dependecies, stream_name): ++ modulemd_dependecies.get_runtime_streams(stream_name) ++ ++ + class TestDependencies(TestBase): + def test_constructor(self): + # Test that the new() function works + d = Modulemd.Dependencies.new() + assert d + assert d.get_buildtime_modules() == [] +- with self.expect_signal(only_on_fatal_warnings=True): +- d.get_buildtime_streams("foobar123") ++ self.assertProcessFailure(_get_buildtime_streams, d, "foobar123") + assert d.get_runtime_modules() == [] +- with self.expect_signal(only_on_fatal_warnings=True): +- d.get_runtime_streams("foobar123") ++ self.assertProcessFailure(_get_runtime_streams, d, "foobar123") + + # Test that keyword name is accepted + d = Modulemd.Dependencies() + assert d + assert d.get_buildtime_modules() == [] +- with self.expect_signal(only_on_fatal_warnings=True): +- d.get_buildtime_streams("foobar123") ++ self.assertProcessFailure(_get_buildtime_streams, d, "foobar123") + assert d.get_runtime_modules() == [] +- with self.expect_signal(only_on_fatal_warnings=True): +- d.get_runtime_streams("foobar123") ++ self.assertProcessFailure(_get_runtime_streams, d, "foobar123") + + def test_copy(self): + d_orig = Modulemd.Dependencies() + d = d_orig.copy() + assert d + assert d.get_buildtime_modules() == [] +- with self.expect_signal(only_on_fatal_warnings=True): +- d.get_buildtime_streams("foobar123") ++ self.assertProcessFailure(_get_buildtime_streams, d, "foobar123") + assert d.get_runtime_modules() == [] +- with self.expect_signal(only_on_fatal_warnings=True): +- d.get_runtime_streams("foobar123") ++ self.assertProcessFailure(_get_runtime_streams, d, "foobar123") + + d_orig.add_buildtime_stream("buildmod1", "stream2") + d_orig.add_buildtime_stream("buildmod1", "stream1") +diff --git a/modulemd/tests/ModulemdTests/profile.py b/modulemd/tests/ModulemdTests/profile.py +index 1de57c6..765c57d 100644 +--- a/modulemd/tests/ModulemdTests/profile.py ++++ b/modulemd/tests/ModulemdTests/profile.py +@@ -28,6 +28,18 @@ except ImportError: + from base import TestBase + + ++def construct_without_arguments(): ++ Modulemd.Profile() ++ ++ ++def construct_with_none_name(): ++ Modulemd.Profile(name=None) ++ ++ ++def _set_props_name(modulemd_profile, value): ++ modulemd_profile.props.name = value ++ ++ + class TestProfile(TestBase): + def test_constructor(self): + # Test that the new() function works +@@ -51,11 +63,9 @@ class TestProfile(TestBase): + Modulemd.Profile.new(None) + assert "does not allow None as a value" in cm.exception.__str__() + +- with self.expect_signal(): +- Modulemd.Profile() ++ self.assertProcessFailure(construct_without_arguments) + +- with self.expect_signal(): +- Modulemd.Profile(name=None) ++ self.assertProcessFailure(construct_with_none_name) + + def test_copy(self): + p_orig = Modulemd.Profile(name="testprofile") +@@ -84,8 +94,7 @@ class TestProfile(TestBase): + assert p.get_name() == "testprofile" + assert p.props.name == "testprofile" + +- with self.expect_signal(): +- p.props.name = "notadrill" ++ self.assertProcessFailure(_set_props_name, p, "notadrill") + + def test_get_set_description(self): + p = Modulemd.Profile(name="testprofile") +diff --git a/modulemd/tests/ModulemdTests/servicelevel.py b/modulemd/tests/ModulemdTests/servicelevel.py +index f244b01..fc9c648 100644 +--- a/modulemd/tests/ModulemdTests/servicelevel.py ++++ b/modulemd/tests/ModulemdTests/servicelevel.py +@@ -30,6 +30,18 @@ from base import TestBase + import datetime + + ++def _construct_without_arguments(): ++ Modulemd.ServiceLevel() ++ ++ ++def _construct_with_none_name(): ++ Modulemd.ServiceLevel(name=None) ++ ++ ++def _set_props_name(modulemd_servicelevel, value): ++ modulemd_servicelevel.props.name = value ++ ++ + class TestServiceLevel(TestBase): + def test_constructors(self): + # Test that the new() function works +@@ -56,12 +68,10 @@ class TestServiceLevel(TestBase): + assert "does not allow None as a value" in e.__str__() + + # Test that we fail if object is instantiated without a name +- with self.expect_signal(): +- sl = Modulemd.ServiceLevel() ++ self.assertProcessFailure(_construct_without_arguments) + + # Test that we fail if object is instantiated with a None name +- with self.expect_signal(): +- sl = Modulemd.ServiceLevel(name=None) ++ self.assertProcessFailure(_construct_with_none_name) + + def test_copy(self): + sl = Modulemd.ServiceLevel.new("foo") +@@ -93,8 +103,7 @@ class TestServiceLevel(TestBase): + assert sl.props.name == "foo" + + # This property is not writable, make sure it fails to attempt it +- with self.expect_signal(): +- sl.props.name = "bar" ++ self.assertProcessFailure(_set_props_name, sl, "bar") + + def test_get_set_eol(self): + sl = Modulemd.ServiceLevel.new("foo") +diff --git a/modulemd/tests/ModulemdTests/translationentry.py b/modulemd/tests/ModulemdTests/translationentry.py +index c53e64b..9fce443 100644 +--- a/modulemd/tests/ModulemdTests/translationentry.py ++++ b/modulemd/tests/ModulemdTests/translationentry.py +@@ -29,6 +29,18 @@ except ImportError: + from base import TestBase + + ++def _instantiate_without_locale(): ++ Modulemd.TranslationEntry() ++ ++ ++def _instantiate_with_none_local(): ++ Modulemd.TranslationEntry(locale=None) ++ ++ ++def _set_locale(te): ++ te.props.locale = "en_GB" ++ ++ + class TestTranslationEntry(TestBase): + def test_constructors(self): + # Test that the new() function works +@@ -118,12 +130,10 @@ class TestTranslationEntry(TestBase): + assert "does not allow None as a value" in e.__str__() + + # Test that we fail if object is instantiated without a locale +- with self.expect_signal(): +- Modulemd.TranslationEntry() ++ self.assertProcessFailure(_instantiate_without_locale) + + # Test that we fail if object is instantiated with a None locale +- with self.expect_signal(): +- Modulemd.TranslationEntry(locale=None) ++ self.assertProcessFailure(_instantiate_with_none_local) + + def test_copy(self): + te_orig = Modulemd.TranslationEntry(locale="en_US") +@@ -162,8 +172,7 @@ class TestTranslationEntry(TestBase): + assert te.get_locale() == "en_US" + assert te.props.locale == "en_US" + +- with self.expect_signal(): +- te.props.locale = "en_GB" ++ self.assertProcessFailure(_set_locale, te) + + def test_get_set_summary(self): + te = Modulemd.TranslationEntry(locale="en_US") +diff --git a/modulemd/tests/test-modulemd-common.c b/modulemd/tests/test-modulemd-common.c +index 97e477f..6895e34 100644 +--- a/modulemd/tests/test-modulemd-common.c ++++ b/modulemd/tests/test-modulemd-common.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd.h" + +@@ -83,7 +82,7 @@ test_modulemd_load_file (void) + + + static void +-test_modulemd_load_string (void) ++test_modulemd_load_string_regular (void) + { + const gchar *yaml_string = NULL; + g_autoptr (GError) error = NULL; +@@ -122,16 +121,6 @@ test_modulemd_load_string (void) + g_assert_nonnull (output); + + +- /* NULL string should raise an exception */ +- g_clear_error (&error); +- g_clear_object (&idx); +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- idx = modulemd_load_string (NULL, &error); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- g_assert_null (idx); +- +- + /* An empty string is valid YAML, so it returns a non-NULL but empty index. */ + g_clear_error (&error); + g_clear_object (&idx); +@@ -151,6 +140,22 @@ test_modulemd_load_string (void) + } + + ++/* NULL string should raise an exception */ ++static void ++test_modulemd_load_string_null (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (GError) error = NULL; ++ g_autoptr (ModulemdModuleIndex) idx = NULL; ++ idx = modulemd_load_string (NULL, &error); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ + static void + test_packager_read_file (void) + { +@@ -353,7 +358,7 @@ test_packager_read_file (void) + + + static void +-test_packager_read_string (void) ++test_packager_read_string_regular (void) + { + const gchar *yaml_string = NULL; + g_autoptr (GError) error = NULL; +@@ -531,16 +536,6 @@ test_packager_read_string (void) + ==, + "streamname-override"); + +- /* NULL string should raise an exception */ +- g_clear_error (&error); +- g_clear_object (&object); +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- otype = modulemd_read_packager_string (NULL, &object, &error); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- g_assert_cmpint (otype, ==, G_TYPE_INVALID); +- g_assert_null (object); +- + /* An empty string is not a valid packager format */ + g_clear_error (&error); + g_clear_object (&object); +@@ -559,6 +554,21 @@ test_packager_read_string (void) + } + + ++/* NULL string should raise an exception */ ++static void ++test_packager_read_string_null (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (GError) error = NULL; ++ g_autoptr (GObject) object = NULL; ++ (void)modulemd_read_packager_string (NULL, &object, &error); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ + /* + * Empty profiles are legal. Parser misinterpreted them as a list of one + * package with an empty package name. +@@ -617,13 +627,17 @@ main (int argc, char *argv[]) + test_modulemd_get_version); + + g_test_add_func ("/modulemd/v2/common/load_file", test_modulemd_load_file); +- g_test_add_func ("/modulemd/v2/common/load_string", +- test_modulemd_load_string); ++ g_test_add_func ("/modulemd/v2/common/load_string/regular", ++ test_modulemd_load_string_regular); ++ g_test_add_func ("/modulemd/v2/common/load_string/null", ++ test_modulemd_load_string_null); + + g_test_add_func ("/modulemd/v2/common/packager/read_file", + test_packager_read_file); +- g_test_add_func ("/modulemd/v2/common/packager/read_string", +- test_packager_read_string); ++ g_test_add_func ("/modulemd/v2/common/packager/read_string/regular", ++ test_packager_read_string_regular); ++ g_test_add_func ("/modulemd/v2/common/packager/read_string/null", ++ test_packager_read_string_null); + + g_test_add_func ("/modulemd/v2/common/empty_profile", test_empty_profile); + +diff --git a/modulemd/tests/test-modulemd-component-module.c b/modulemd/tests/test-modulemd-component-module.c +index 20e7881..683c774 100644 +--- a/modulemd/tests/test-modulemd-component-module.c ++++ b/modulemd/tests/test-modulemd-component-module.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd-component-module.h" + #include "modulemd-component.h" +@@ -28,16 +27,8 @@ typedef struct _ComponentModuleFixture + { + } ComponentModuleFixture; + +-gboolean signaled = FALSE; +- +-static void +-sigtrap_handler (int UNUSED (sig_num)) +-{ +- signaled = TRUE; +-} +- + static void +-component_module_test_construct (void) ++component_module_test_construct_regular (void) + { + g_autoptr (ModulemdComponentModule) m = NULL; + ModulemdComponent *mc = NULL; +@@ -84,29 +75,49 @@ component_module_test_construct (void) + modulemd_component_module_get_repository (m), ==, "somerepo"); + mc = NULL; + g_clear_object (&m); ++} + +- /* Test that we abort with a NULL name to new() */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- m = modulemd_component_module_new (NULL); +- g_assert_true (signaled); +- g_clear_object (&m); +- +- /* Test that init fails without name */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- m = g_object_new (MODULEMD_TYPE_COMPONENT_MODULE, NULL); +- g_assert_true (signaled); +- g_clear_object (&m); ++/* Test that we abort with a NULL name to new() */ ++static void ++component_module_test_construct_new_null_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdComponentModule) m = NULL; ++ m = modulemd_component_module_new (NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + +- /* Test that init fails with a NULL name */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- m = g_object_new (MODULEMD_TYPE_COMPONENT_MODULE, "name", NULL, NULL); +- g_assert_true (signaled); +- g_clear_object (&m); ++/* Test that init fails without name */ ++static void ++component_module_test_construct_init_without_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdComponentModule) m = NULL; ++ m = g_object_new (MODULEMD_TYPE_COMPONENT_MODULE, NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + ++/* Test that init fails with a NULL name */ ++static void ++component_module_test_construct_init_null_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdComponentModule) m = NULL; ++ m = g_object_new (MODULEMD_TYPE_COMPONENT_MODULE, "name", NULL, NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + + static void + component_module_test_equals (void) +@@ -421,8 +432,17 @@ main (int argc, char *argv[]) + g_test_bug_base ("https://bugzilla.redhat.com/show_bug.cgi?id="); + + // Define the tests. +- g_test_add_func ("/modulemd/v2/component/module/construct", +- component_module_test_construct); ++ g_test_add_func ("/modulemd/v2/component/module/construct/regular", ++ component_module_test_construct_regular); ++ ++ g_test_add_func ("/modulemd/v2/component/module/construct/new_null_name", ++ component_module_test_construct_new_null_name); ++ ++ g_test_add_func ("/modulemd/v2/component/module/construct/init_without_name", ++ component_module_test_construct_init_without_name); ++ ++ g_test_add_func ("/modulemd/v2/component/module/construct/init_null_name", ++ component_module_test_construct_init_null_name); + + g_test_add_func ("/modulemd/v2/component/module/equals", + component_module_test_equals); +diff --git a/modulemd/tests/test-modulemd-defaults-v1.c b/modulemd/tests/test-modulemd-defaults-v1.c +index c4fe235..2daa295 100644 +--- a/modulemd/tests/test-modulemd-defaults-v1.c ++++ b/modulemd/tests/test-modulemd-defaults-v1.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd-defaults-v1.h" + #include "private/glib-extensions.h" +@@ -26,7 +25,7 @@ + + + static void +-defaults_test_construct (void) ++defaults_test_construct_regular (void) + { + g_autoptr (ModulemdDefaultsV1) defaults = NULL; + +@@ -37,13 +36,6 @@ defaults_test_construct (void) + g_assert_true (MODULEMD_IS_DEFAULTS_V1 (defaults)); + g_clear_object (&defaults); + +- /* Test new() with a NULL module_name */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- defaults = modulemd_defaults_v1_new (NULL); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- g_clear_object (&defaults); +- + + /* Test object instantiation with a valid module name */ + // clang-format off +@@ -55,26 +47,57 @@ defaults_test_construct (void) + g_assert_true (MODULEMD_IS_DEFAULTS (defaults)); + g_assert_true (MODULEMD_IS_DEFAULTS_V1 (defaults)); + g_clear_object (&defaults); ++} + +- /* Test object instantiation with a NULL module name */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- // clang-format off +- defaults = g_object_new (MODULEMD_TYPE_DEFAULTS_V1, +- "module-name", NULL, +- NULL); +- // clang-format on +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- g_clear_object (&defaults); + +- /* Test object instantiation without specifying the module name */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- // clang-format off +- defaults = g_object_new (MODULEMD_TYPE_DEFAULTS_V1, NULL); +- // clang-format on +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- g_clear_object (&defaults); ++/* Test new() with a NULL module_name */ ++static void ++defaults_test_construct_new_null_module_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDefaultsV1) defaults = NULL; ++ defaults = modulemd_defaults_v1_new (NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ ++/* Test object instantiation without specifying the module name */ ++static void ++defaults_test_construct_init_no_module_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDefaultsV1) defaults = NULL; ++ // clang-format off ++ defaults = g_object_new (MODULEMD_TYPE_DEFAULTS_V1, NULL); ++ // clang-format on ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ ++/* Test object instantiation with a NULL module name */ ++static void ++defaults_test_construct_init_null_module_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDefaultsV1) defaults = NULL; ++ // clang-format off ++ defaults = g_object_new (MODULEMD_TYPE_DEFAULTS_V1, ++ "module-name", NULL, ++ NULL); ++ // clang-format on ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + +@@ -820,8 +843,14 @@ main (int argc, char *argv[]) + // Define the tests. + g_test_add_func ("/modulemd/v2/defaults/v1/equals", defaults_test_equals); + +- g_test_add_func ("/modulemd/v2/defaults/v1/construct", +- defaults_test_construct); ++ g_test_add_func ("/modulemd/v2/defaults/v1/construct/regular", ++ defaults_test_construct_regular); ++ g_test_add_func ("/modulemd/v2/defaults/v1/construct/new_null_module_name", ++ defaults_test_construct_new_null_module_name); ++ g_test_add_func ("/modulemd/v2/defaults/v1/construct/init_no_module_name", ++ defaults_test_construct_init_no_module_name); ++ g_test_add_func ("/modulemd/v2/defaults/v1/construct/init_null_module_name", ++ defaults_test_construct_init_null_module_name); + + g_test_add_func ("/modulemd/v2/defaults/v1/copy", defaults_test_copy); + +diff --git a/modulemd/tests/test-modulemd-defaults.c b/modulemd/tests/test-modulemd-defaults.c +index 2a46774..562e4fe 100644 +--- a/modulemd/tests/test-modulemd-defaults.c ++++ b/modulemd/tests/test-modulemd-defaults.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd-defaults-v1.h" + #include "modulemd-defaults.h" +@@ -24,7 +23,7 @@ + #include "private/test-utils.h" + + static void +-defaults_test_construct (void) ++defaults_test_construct_regular (void) + { + g_autoptr (ModulemdDefaults) defaults = NULL; + +@@ -34,30 +33,51 @@ defaults_test_construct (void) + g_assert_true (MODULEMD_IS_DEFAULTS (defaults)); + g_assert_true (MODULEMD_IS_DEFAULTS_V1 (defaults)); + g_clear_object (&defaults); ++} + +- /* Test new() with a zero mdversion */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- defaults = modulemd_defaults_new (0, "foo"); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- g_assert_null (defaults); +- +- /* Test new() with a too-high mdversion */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- defaults = modulemd_defaults_new (MD_DEFAULTS_VERSION_LATEST + 1, "foo"); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- g_assert_null (defaults); +- +- /* Test new() with a NULL module_name */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- defaults = modulemd_defaults_new (MD_DEFAULTS_VERSION_ONE, NULL); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- /* If we trap the error, defaults actually returns a value here, so free +- * it +- */ +- g_clear_object (&defaults); ++ ++/* Test new() with a zero mdversion */ ++static void ++defaults_test_construct_zero_mdversion (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDefaults) defaults = NULL; ++ defaults = modulemd_defaults_new (0, "foo"); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ ++/* Test new() with a too-high mdversion */ ++static void ++defaults_test_construct_too_high_mdversion (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDefaults) defaults = NULL; ++ defaults = modulemd_defaults_new (MD_DEFAULTS_VERSION_LATEST + 1, "foo"); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ ++/* Test new() with a NULL module_name */ ++static void ++defaults_test_new_with_null_module_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDefaults) defaults = NULL; ++ defaults = modulemd_defaults_new (MD_DEFAULTS_VERSION_ONE, NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + +@@ -203,7 +223,14 @@ main (int argc, char *argv[]) + g_test_bug_base ("https://bugzilla.redhat.com/show_bug.cgi?id="); + + // Define the tests. +- g_test_add_func ("/modulemd/v2/defaults/construct", defaults_test_construct); ++ g_test_add_func ("/modulemd/v2/defaults/construct/regular", ++ defaults_test_construct_regular); ++ g_test_add_func ("/modulemd/v2/defaults/construct/zero_mdversion", ++ defaults_test_construct_zero_mdversion); ++ g_test_add_func ("/modulemd/v2/defaults/construct/too_high_mdversion", ++ defaults_test_construct_too_high_mdversion); ++ g_test_add_func ("/modulemd/v2/defaults/new/with_null_module_name", ++ defaults_test_new_with_null_module_name); + + g_test_add_func ("/modulemd/v2/defaults/copy", defaults_test_copy); + +diff --git a/modulemd/tests/test-modulemd-dependencies.c b/modulemd/tests/test-modulemd-dependencies.c +index bae0f46..d126dba 100644 +--- a/modulemd/tests/test-modulemd-dependencies.c ++++ b/modulemd/tests/test-modulemd-dependencies.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd-dependencies.h" + #include "private/glib-extensions.h" +@@ -27,14 +26,6 @@ typedef struct _DependenciesFixture + { + } DependenciesFixture; + +-gboolean signaled = FALSE; +- +-static void +-sigtrap_handler (int UNUSED (sig_num)) +-{ +- signaled = TRUE; +-} +- + static void + dependencies_test_construct (void) + { +@@ -60,7 +51,7 @@ dependencies_test_construct (void) + + + static void +-dependencies_test_dependencies (void) ++dependencies_test_dependencies_regular (void) + { + g_autoptr (ModulemdDependencies) d = NULL; + g_auto (GStrv) list = NULL; +@@ -73,10 +64,6 @@ dependencies_test_dependencies (void) + g_assert_nonnull (list); + g_assert_cmpint (g_strv_length (list), ==, 0); + g_clear_pointer (&list, g_strfreev); +- signal (SIGTRAP, sigtrap_handler); +- list = modulemd_dependencies_get_buildtime_streams_as_strv (d, "buildmod1"); +- g_assert_null (list); +- g_clear_pointer (&list, g_strfreev); + + /* Add some deps */ + modulemd_dependencies_add_buildtime_stream (d, "buildmod1", "stream1"); +@@ -102,10 +89,6 @@ dependencies_test_dependencies (void) + g_assert_nonnull (list); + g_assert_cmpint (g_strv_length (list), ==, 0); + g_clear_pointer (&list, g_strfreev); +- signal (SIGTRAP, sigtrap_handler); +- list = modulemd_dependencies_get_runtime_streams_as_strv (d, "buildmod1"); +- g_assert_null (list); +- g_clear_pointer (&list, g_strfreev); + + list = modulemd_dependencies_get_runtime_modules_as_strv (d); + g_assert_nonnull (list); +@@ -117,10 +100,6 @@ dependencies_test_dependencies (void) + g_assert_nonnull (list); + g_assert_cmpint (g_strv_length (list), ==, 0); + g_clear_pointer (&list, g_strfreev); +- signal (SIGTRAP, sigtrap_handler); +- list = modulemd_dependencies_get_runtime_streams_as_strv (d, "buildmod1"); +- g_assert_null (list); +- g_clear_pointer (&list, g_strfreev); + list = modulemd_dependencies_get_runtime_streams_as_strv (d, "runmod1"); + g_assert_nonnull (list); + g_assert_cmpint (g_strv_length (list), ==, 2); +@@ -130,6 +109,57 @@ dependencies_test_dependencies (void) + } + + ++static void ++dependencies_test_dependencies_nonexistent_buildtime_stream (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDependencies) d = NULL; ++ g_auto (GStrv) list = NULL; ++ ++ d = modulemd_dependencies_new (); ++ g_assert_nonnull (d); ++ g_assert_true (MODULEMD_IS_DEPENDENCIES (d)); ++ ++ list = ++ modulemd_dependencies_get_buildtime_streams_as_strv (d, "buildmod1"); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ ++static void ++dependencies_test_dependencies_nonexistent_runtime_stream (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDependencies) d = NULL; ++ g_auto (GStrv) list = NULL; ++ ++ d = modulemd_dependencies_new (); ++ g_assert_nonnull (d); ++ g_assert_true (MODULEMD_IS_DEPENDENCIES (d)); ++ ++ /* Add some deps */ ++ modulemd_dependencies_add_buildtime_stream (d, "buildmod1", "stream1"); ++ modulemd_dependencies_add_runtime_stream (d, "runmod1", "stream2"); ++ modulemd_dependencies_add_runtime_stream (d, "runmod1", "stream1"); ++ modulemd_dependencies_set_empty_buildtime_dependencies_for_module ( ++ d, "defbuild"); ++ modulemd_dependencies_set_empty_runtime_dependencies_for_module ( ++ d, "defrun"); ++ ++ list = ++ modulemd_dependencies_get_runtime_streams_as_strv (d, "buildmod1"); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ + static void + dependencies_test_equals (void) + { +@@ -298,7 +328,7 @@ dependencies_test_equals (void) + + + static void +-dependencies_test_copy (void) ++dependencies_test_copy_regular (void) + { + g_autoptr (ModulemdDependencies) d = NULL; + g_autoptr (ModulemdDependencies) d_copy = NULL; +@@ -311,10 +341,6 @@ dependencies_test_copy (void) + g_assert_nonnull (list); + g_assert_cmpint (g_strv_length (list), ==, 0); + g_clear_pointer (&list, g_strfreev); +- signal (SIGTRAP, sigtrap_handler); +- list = modulemd_dependencies_get_buildtime_streams_as_strv (d, "module1"); +- g_assert_null (list); +- g_clear_pointer (&list, g_strfreev); + + d_copy = modulemd_dependencies_copy (d); + g_assert_nonnull (d_copy); +@@ -323,10 +349,6 @@ dependencies_test_copy (void) + g_assert_nonnull (list); + g_assert_cmpint (g_strv_length (list), ==, 0); + g_clear_pointer (&list, g_strfreev); +- signal (SIGTRAP, sigtrap_handler); +- list = modulemd_dependencies_get_buildtime_streams_as_strv (d, "module1"); +- g_assert_null (list); +- g_clear_pointer (&list, g_strfreev); + g_clear_object (&d_copy); + + modulemd_dependencies_add_buildtime_stream (d, "buildmod1", "stream2"); +@@ -347,11 +369,7 @@ dependencies_test_copy (void) + g_assert_cmpstr (list[0], ==, "builddef"); + g_assert_cmpstr (list[1], ==, "buildmod1"); + g_clear_pointer (&list, g_strfreev); +- signal (SIGTRAP, sigtrap_handler); +- list = modulemd_dependencies_get_buildtime_streams_as_strv (d_copy, +- "nosuchmodule"); +- g_assert_null (list); +- g_clear_pointer (&list, g_strfreev); ++ + list = + modulemd_dependencies_get_buildtime_streams_as_strv (d_copy, "buildmod1"); + g_assert_nonnull (list); +@@ -371,11 +389,6 @@ dependencies_test_copy (void) + g_assert_cmpstr (list[0], ==, "rundef"); + g_assert_cmpstr (list[1], ==, "runmod1"); + g_clear_pointer (&list, g_strfreev); +- signal (SIGTRAP, sigtrap_handler); +- list = +- modulemd_dependencies_get_runtime_streams_as_strv (d_copy, "nosuchmodule"); +- g_assert_null (list); +- g_clear_pointer (&list, g_strfreev); + list = modulemd_dependencies_get_runtime_streams_as_strv (d_copy, "runmod1"); + g_assert_nonnull (list); + g_assert_cmpint (g_strv_length (list), ==, 2); +@@ -388,6 +401,101 @@ dependencies_test_copy (void) + g_clear_pointer (&list, g_strfreev); + } + ++ ++static void ++dependencies_test_copy_empty_nonexsitent_buildtime_stream (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDependencies) d = NULL; ++ g_autoptr (ModulemdDependencies) d_copy = NULL; ++ g_auto (GStrv) list = NULL; ++ ++ d = modulemd_dependencies_new (); ++ g_assert_nonnull (d); ++ g_assert_true (MODULEMD_IS_DEPENDENCIES (d)); ++ ++ d_copy = modulemd_dependencies_copy (d); ++ g_assert_nonnull (d_copy); ++ g_assert_true (MODULEMD_IS_DEPENDENCIES (d_copy)); ++ ++ list = ++ modulemd_dependencies_get_buildtime_streams_as_strv (d, "module1"); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ ++static void ++dependencies_test_copy_full_nonexsitent_buildtime_stream (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDependencies) d = NULL; ++ g_autoptr (ModulemdDependencies) d_copy = NULL; ++ g_auto (GStrv) list = NULL; ++ ++ d = modulemd_dependencies_new (); ++ g_assert_nonnull (d); ++ g_assert_true (MODULEMD_IS_DEPENDENCIES (d)); ++ ++ modulemd_dependencies_add_buildtime_stream (d, "buildmod1", "stream2"); ++ modulemd_dependencies_add_buildtime_stream (d, "buildmod1", "stream1"); ++ modulemd_dependencies_set_empty_buildtime_dependencies_for_module ( ++ d, "builddef"); ++ modulemd_dependencies_add_runtime_stream (d, "runmod1", "stream3"); ++ modulemd_dependencies_add_runtime_stream (d, "runmod1", "stream4"); ++ modulemd_dependencies_set_empty_runtime_dependencies_for_module ( ++ d, "rundef"); ++ ++ d_copy = modulemd_dependencies_copy (d); ++ g_assert_nonnull (d_copy); ++ g_assert_true (MODULEMD_IS_DEPENDENCIES (d_copy)); ++ list = modulemd_dependencies_get_buildtime_streams_as_strv ( ++ d_copy, "nosuchmodule"); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ ++static void ++dependencies_test_copy_full_nonexsitent_runtime_stream (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdDependencies) d = NULL; ++ g_autoptr (ModulemdDependencies) d_copy = NULL; ++ g_auto (GStrv) list = NULL; ++ ++ d = modulemd_dependencies_new (); ++ g_assert_nonnull (d); ++ g_assert_true (MODULEMD_IS_DEPENDENCIES (d)); ++ ++ modulemd_dependencies_add_buildtime_stream (d, "buildmod1", "stream2"); ++ modulemd_dependencies_add_buildtime_stream (d, "buildmod1", "stream1"); ++ modulemd_dependencies_set_empty_buildtime_dependencies_for_module ( ++ d, "builddef"); ++ modulemd_dependencies_add_runtime_stream (d, "runmod1", "stream3"); ++ modulemd_dependencies_add_runtime_stream (d, "runmod1", "stream4"); ++ modulemd_dependencies_set_empty_runtime_dependencies_for_module ( ++ d, "rundef"); ++ ++ d_copy = modulemd_dependencies_copy (d); ++ g_assert_nonnull (d_copy); ++ g_assert_true (MODULEMD_IS_DEPENDENCIES (d_copy)); ++ list = modulemd_dependencies_get_runtime_streams_as_strv ( ++ d_copy, "nosuchmodule"); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ + static void + dependencies_test_parse_yaml (void) + { +@@ -631,13 +739,29 @@ main (int argc, char *argv[]) + g_test_add_func ("/modulemd/v2/dependencies/construct", + dependencies_test_construct); + +- g_test_add_func ("/modulemd/v2/dependencies/dependencies", +- dependencies_test_dependencies); ++ g_test_add_func ("/modulemd/v2/dependencies/dependencies/regular", ++ dependencies_test_dependencies_regular); ++ g_test_add_func ( ++ "/modulemd/v2/dependencies/dependencies/nonexistent_buildtime_stream", ++ dependencies_test_dependencies_nonexistent_buildtime_stream); ++ g_test_add_func ( ++ "/modulemd/v2/dependencies/dependencies/nonexistent_runtime_stream", ++ dependencies_test_dependencies_nonexistent_runtime_stream); + + g_test_add_func ("/modulemd/v2/dependencies/equals", + dependencies_test_equals); + +- g_test_add_func ("/modulemd/v2/dependencies/copy", dependencies_test_copy); ++ g_test_add_func ("/modulemd/v2/dependencies/copy/regular", ++ dependencies_test_copy_regular); ++ g_test_add_func ( ++ "/modulemd/v2/dependencies/copy/empty_nonexsitent_buildtime_stream", ++ dependencies_test_copy_empty_nonexsitent_buildtime_stream); ++ g_test_add_func ( ++ "/modulemd/v2/dependencies/copy/full_nonexsitent_buildtime_stream", ++ dependencies_test_copy_full_nonexsitent_buildtime_stream); ++ g_test_add_func ( ++ "/modulemd/v2/dependencies/copy/full_nonexsitent_rundtime_stream", ++ dependencies_test_copy_full_nonexsitent_runtime_stream); + + g_test_add_func ("/modulemd/v2/dependencies/yaml/parse", + dependencies_test_parse_yaml); +diff --git a/modulemd/tests/test-modulemd-module.c b/modulemd/tests/test-modulemd-module.c +index c083c96..7759b37 100644 +--- a/modulemd/tests/test-modulemd-module.c ++++ b/modulemd/tests/test-modulemd-module.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd-defaults.h" + #include "modulemd-module-index-merger.h" +@@ -38,7 +37,7 @@ typedef struct _ModuleFixture + + + static void +-module_test_construct (void) ++module_test_construct_regular (void) + { + g_autoptr (ModulemdModule) m = NULL; + g_autoptr (GPtrArray) list = NULL; +@@ -66,27 +65,51 @@ module_test_construct (void) + g_assert_true (MODULEMD_IS_MODULE (m)); + g_assert_cmpstr (modulemd_module_get_module_name (m), ==, "testmodule"); + g_clear_object (&m); ++} + +- /* Test that we abort with a NULL name to new() */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- m = modulemd_module_new (NULL); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- g_clear_object (&m); + +- /* Test that we abort if we instantiate without a name */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- m = g_object_new (MODULEMD_TYPE_MODULE, NULL); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- g_clear_object (&m); ++/* Test that we abort with a NULL name to new() */ ++static void ++module_test_construct_new_null_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdModule) m = NULL; ++ m = modulemd_module_new (NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + +- /* test that we abort if we instantiate with a NULL name */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- m = g_object_new (MODULEMD_TYPE_MODULE, "module-name", NULL, NULL); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- g_clear_object (&m); ++ ++/* Test that we abort if we instantiate without a name */ ++static void ++module_test_construct_init_no_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdModule) m = NULL; ++ m = g_object_new (MODULEMD_TYPE_MODULE, NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ ++/* test that we abort if we instantiate with a NULL name */ ++static void ++module_test_construct_init_null_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdModule) m = NULL; ++ m = g_object_new (MODULEMD_TYPE_MODULE, "module-name", NULL, NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + +@@ -801,7 +824,14 @@ main (int argc, char *argv[]) + + // Define the tests. + +- g_test_add_func ("/modulemd/v2/module/construct", module_test_construct); ++ g_test_add_func ("/modulemd/v2/module/construct/regular", ++ module_test_construct_regular); ++ g_test_add_func ("/modulemd/v2/module/construct/new_null_name", ++ module_test_construct_new_null_name); ++ g_test_add_func ("/modulemd/v2/module/construct/init_no_name", ++ module_test_construct_init_no_name); ++ g_test_add_func ("/modulemd/v2/module/construct/init_null_name", ++ module_test_construct_init_null_name); + + g_test_add_func ("/modulemd/v2/module/defaults", module_test_defaults); + +diff --git a/modulemd/tests/test-modulemd-obsoletes.c b/modulemd/tests/test-modulemd-obsoletes.c +index f3e90d3..d4ced3c 100644 +--- a/modulemd/tests/test-modulemd-obsoletes.c ++++ b/modulemd/tests/test-modulemd-obsoletes.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd-subdocument-info.h" + #include "modulemd-obsoletes.h" +@@ -26,7 +25,7 @@ + #include "private/test-utils.h" + + static void +-obsoletes_test_construct (void) ++obsoletes_test_construct_regular (void) + { + g_autoptr (ModulemdObsoletes) e = NULL; + +@@ -39,33 +38,51 @@ obsoletes_test_construct (void) + g_assert_cmpstr (modulemd_obsoletes_get_module_stream (e), ==, "teststream"); + g_assert_cmpstr (modulemd_obsoletes_get_message (e), ==, "testmessage"); + g_clear_object (&e); ++} + +- /* Test new() with a NULL module_name */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- e = modulemd_obsoletes_new ( +- MD_OBSOLETES_VERSION_ONE, 2, NULL, "teststream", "testmessage"); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- /* If we trap the error, obsoletes actually returns a value here, so free it */ +- g_clear_object (&e); ++/* Test new() with a NULL module_name */ ++static void ++obsoletes_test_construct_null_module_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdObsoletes) e = NULL; ++ e = modulemd_obsoletes_new ( ++ MD_OBSOLETES_VERSION_ONE, 2, NULL, "teststream", "testmessage"); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + +- /* Test new() with a NULL module_context */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- e = modulemd_obsoletes_new ( +- MD_OBSOLETES_VERSION_ONE, 2, "testmodule", NULL, "testmessage"); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- /* If we trap the error, obsoletes actually returns a value here, so free it */ +- g_clear_object (&e); ++/* Test new() with a NULL module_context */ ++static void ++obsoletes_test_construct_null_module_context (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdObsoletes) e = NULL; ++ e = modulemd_obsoletes_new ( ++ MD_OBSOLETES_VERSION_ONE, 2, "testmodule", NULL, "testmessage"); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + +- /* Test new() with a NULL message */ +- modulemd_test_signal = 0; +- signal (SIGTRAP, modulemd_test_signal_handler); +- e = modulemd_obsoletes_new ( +- MD_OBSOLETES_VERSION_ONE, 2, "testmodule", "teststream", NULL); +- g_assert_cmpint (modulemd_test_signal, ==, SIGTRAP); +- /* If we trap the error, obsoletes actually returns a value here, so free it */ +- g_clear_object (&e); ++/* Test new() with a NULL message */ ++static void ++obsoletes_test_construct_null_message (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdObsoletes) e = NULL; ++ e = modulemd_obsoletes_new ( ++ MD_OBSOLETES_VERSION_ONE, 2, "testmodule", "teststream", NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + static void +@@ -496,8 +513,14 @@ main (int argc, char *argv[]) + + // Define the tests. + +- g_test_add_func ("/modulemd/v2/obsoletes/construct", +- obsoletes_test_construct); ++ g_test_add_func ("/modulemd/v2/obsoletes/construct/regular", ++ obsoletes_test_construct_regular); ++ g_test_add_func ("/modulemd/v2/obsoletes/construct/null_module_name", ++ obsoletes_test_construct_null_module_name); ++ g_test_add_func ("/modulemd/v2/obsoletes/construct/null_module_context", ++ obsoletes_test_construct_null_module_context); ++ g_test_add_func ("/modulemd/v2/obsoletes/construct/null_message", ++ obsoletes_test_construct_null_message); + + g_test_add_func ("/modulemd/v2/obsoletes/copy", obsoletes_test_copy); + +diff --git a/modulemd/tests/test-modulemd-profile.c b/modulemd/tests/test-modulemd-profile.c +index 3a730c1..b4bd88f 100644 +--- a/modulemd/tests/test-modulemd-profile.c ++++ b/modulemd/tests/test-modulemd-profile.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd-profile.h" + #include "private/glib-extensions.h" +@@ -26,16 +25,8 @@ typedef struct _ProfileFixture + { + } ProfileFixture; + +-gboolean signaled = FALSE; +- + static void +-sigtrap_handler (int UNUSED (sig_num)) +-{ +- signaled = TRUE; +-} +- +-static void +-profile_test_construct (void) ++profile_test_construct_regular (void) + { + g_autoptr (ModulemdProfile) p = NULL; + g_auto (GStrv) rpms = NULL; +@@ -56,27 +47,52 @@ profile_test_construct (void) + g_assert_true (MODULEMD_IS_PROFILE (p)); + g_assert_cmpstr (modulemd_profile_get_name (p), ==, "testprofile"); + g_clear_object (&p); ++} + +- /* Test that we abort with a NULL name to new() */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- p = modulemd_profile_new (NULL); +- g_assert_true (signaled); +- g_clear_object (&p); + +- /* Test that we abort if we instantiate without a name */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- p = g_object_new (MODULEMD_TYPE_PROFILE, NULL); +- g_assert_true (signaled); +- g_clear_object (&p); ++/* Test that we abort with a NULL name to new() */ ++static void ++profile_test_construct_new_null (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdProfile) p = NULL; ++ p = modulemd_profile_new (NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + +- /* test that we abort if we instantiate with a NULL name */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- p = g_object_new (MODULEMD_TYPE_PROFILE, "name", NULL, NULL); +- g_assert_true (signaled); +- g_clear_object (&p); ++ ++/* Test that we abort if we instantiate without a name */ ++static void ++profile_test_construct_init_no_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdProfile) p = NULL; ++ p = g_object_new (MODULEMD_TYPE_PROFILE, NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} ++ ++ ++/* Test that we abort if we instantiate with a NULL name */ ++static void ++profile_test_construct_init_null_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdProfile) p = NULL; ++ ++ p = g_object_new (MODULEMD_TYPE_PROFILE, "name", NULL, NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + +@@ -353,12 +369,23 @@ profile_test_get_name (void) + + g_object_get (p, "name", &name, NULL); + g_assert_cmpstr (name, ==, "testprofile"); ++} ++ + +- /* Test that name is immutable */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- g_object_set (p, "name", "notatest", NULL); +- g_assert_true (signaled); ++/* Test that name is immutable */ ++static void ++profile_test_name_is_immutable (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdProfile) p = NULL; ++ p = modulemd_profile_new ("testprofile"); ++ ++ g_object_set (p, "name", "notatest", NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + +@@ -576,7 +603,14 @@ main (int argc, char *argv[]) + + // Define the tests. + +- g_test_add_func ("/modulemd/v2/profile/construct", profile_test_construct); ++ g_test_add_func ("/modulemd/v2/profile/construct/regular", ++ profile_test_construct_regular); ++ g_test_add_func ("/modulemd/v2/profile/construct/new_null", ++ profile_test_construct_new_null); ++ g_test_add_func ("/modulemd/v2/profile/construct/init_no_name", ++ profile_test_construct_init_no_name); ++ g_test_add_func ("/modulemd/v2/profile/construct/init_null_name", ++ profile_test_construct_init_null_name); + + g_test_add_func ("/modulemd/v2/profile/equals", profile_test_equals); + +@@ -584,6 +618,9 @@ main (int argc, char *argv[]) + + g_test_add_func ("/modulemd/v2/profile/get_name", profile_test_get_name); + ++ g_test_add_func ("/modulemd/v2/profile/name_is_immutable", ++ profile_test_name_is_immutable); ++ + g_test_add_func ("/modulemd/v2/profile/get_set_description", + profile_test_get_set_description); + +diff --git a/modulemd/tests/test-modulemd-service-level.c b/modulemd/tests/test-modulemd-service-level.c +index d8ee981..961956d 100644 +--- a/modulemd/tests/test-modulemd-service-level.c ++++ b/modulemd/tests/test-modulemd-service-level.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd-service-level.h" + #include "private/glib-extensions.h" +@@ -26,16 +25,8 @@ typedef struct _ServiceLevelFixture + { + } ServiceLevelFixture; + +-gboolean signaled = FALSE; +- +-static void +-sigtrap_handler (int UNUSED (sig_num)) +-{ +- signaled = TRUE; +-} +- + static void +-service_level_test_construct (void) ++service_level_test_construct_regular (void) + { + g_autoptr (ModulemdServiceLevel) sl = NULL; + +@@ -59,34 +50,55 @@ service_level_test_construct (void) + g_assert_cmpstr (modulemd_service_level_get_name (sl), ==, "bar"); + g_assert_null (modulemd_service_level_get_eol (sl)); + g_clear_object (&sl); ++} + + +- /* Test that we abort if we call new() with a NULL name */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- sl = modulemd_service_level_new (NULL); +- g_assert_true (signaled); +- g_clear_object (&sl); ++/* Test that we abort if we call new() with a NULL name */ ++static void ++service_level_test_construct_new_null (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdServiceLevel) sl = NULL; ++ sl = modulemd_service_level_new (NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + + +- /* Test that we abort if we instatiate without a name */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- sl = g_object_new (MODULEMD_TYPE_SERVICE_LEVEL, NULL); +- g_assert_true (signaled); +- g_clear_object (&sl); ++/* Test that we abort if we instatiate without a name */ ++static void ++service_level_test_construct_init_no_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdServiceLevel) sl = NULL; ++ sl = g_object_new (MODULEMD_TYPE_SERVICE_LEVEL, NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + + +- /* Test that we abort if we instatiate with a NULL name */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- // clang-format off +- sl = g_object_new (MODULEMD_TYPE_SERVICE_LEVEL, +- "name", NULL, +- NULL); +- // clang-format on +- g_assert_true (signaled); +- g_clear_object (&sl); ++/* Test that we abort if we instatiate with a NULL name */ ++static void ++service_level_test_construct_init_null_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdServiceLevel) sl = NULL; ++ // clang-format off ++ sl = g_object_new (MODULEMD_TYPE_SERVICE_LEVEL, ++ "name", NULL, ++ NULL); ++ // clang-format on ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + +@@ -249,19 +261,25 @@ service_level_test_get_name (void) + NULL); + // clang-format on + g_assert_cmpstr (name, ==, "foo"); ++} + + +- /* Test that trying to set the name by object properties fails. +- * The name must be immutable for the life of the object. +- */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- // clang-format off +- g_object_set (sl, +- "name", "bar", +- NULL); +- // clang-format on +- g_assert_true (signaled); ++/* ++ * Test that trying to set the name by object properties fails. ++ * The name must be immutable for the life of the object. ++ */ ++static void ++service_level_test_name_is_immutable (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdServiceLevel) sl = NULL; ++ sl = modulemd_service_level_new ("foo"); ++ g_object_set (sl, "name", "bar", NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + +@@ -476,12 +494,21 @@ main (int argc, char *argv[]) + + // Define the tests. + +- g_test_add_func ("/modulemd/v2/servicelevel/construct", +- service_level_test_construct); ++ g_test_add_func ("/modulemd/v2/servicelevel/construct/regular", ++ service_level_test_construct_regular); ++ g_test_add_func ("/modulemd/v2/servicelevel/construct/new_null", ++ service_level_test_construct_new_null); ++ g_test_add_func ("/modulemd/v2/servicelevel/construct/init_no_name", ++ service_level_test_construct_init_no_name); ++ g_test_add_func ("/modulemd/v2/servicelevel/construct/init_null_name", ++ service_level_test_construct_init_null_name); + + g_test_add_func ("/modulemd/v2/servicelevel/get_set_name", + service_level_test_get_name); + ++ g_test_add_func ("/modulemd/v2/servicelevel/name_is_immutable", ++ service_level_test_name_is_immutable); ++ + g_test_add_func ("/modulemd/v2/servicelevel/equals", + service_level_test_equals); + +diff --git a/modulemd/tests/test-modulemd-translation-entry.c b/modulemd/tests/test-modulemd-translation-entry.c +index 858bdfa..ee17940 100644 +--- a/modulemd/tests/test-modulemd-translation-entry.c ++++ b/modulemd/tests/test-modulemd-translation-entry.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd-translation-entry.h" + #include "private/glib-extensions.h" +@@ -26,16 +25,8 @@ typedef struct _TranslationEntryFixture + { + } TranslationEntryFixture; + +-gboolean signaled = FALSE; +- + static void +-sigtrap_handler (int UNUSED (sig_num)) +-{ +- signaled = TRUE; +-} +- +-static void +-translation_entry_test_construct (void) ++translation_entry_test_construct_regular (void) + { + g_autoptr (ModulemdTranslationEntry) te = NULL; + g_auto (GStrv) profile_names = NULL; +@@ -110,34 +101,55 @@ translation_entry_test_construct (void) + g_assert_cmpstr ( + modulemd_translation_entry_get_description (te), ==, "jumped"); + g_clear_object (&te); ++} + + +- /* Test that we abort if we call new() with a NULL locale */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- te = modulemd_translation_entry_new (NULL); +- g_assert_true (signaled); +- g_clear_object (&te); ++/* Test that we abort if we call new() with a NULL locale */ ++static void ++translation_entry_test_construct_new_null (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdTranslationEntry) te = NULL; ++ te = modulemd_translation_entry_new (NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + + +- /* Test that we abort if we instatiate without a locale */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- te = g_object_new (MODULEMD_TYPE_TRANSLATION_ENTRY, NULL); +- g_assert_true (signaled); +- g_clear_object (&te); ++/* Test that we abort if we instatiate without a locale */ ++static void ++translation_entry_test_construct_init_no_locale (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdTranslationEntry) te = NULL; ++ te = g_object_new (MODULEMD_TYPE_TRANSLATION_ENTRY, NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + + +- /* Test that we abort if we instatiate with a NULL locale */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- // clang-format off +- te = g_object_new (MODULEMD_TYPE_TRANSLATION_ENTRY, +- "locale", NULL, +- NULL); +- // clang-format on +- g_assert_true (signaled); +- g_clear_object (&te); ++/* Test that we abort if we instatiate with a NULL locale */ ++static void ++translation_entry_test_construct_init_null_locale (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdTranslationEntry) te = NULL; ++ // clang-format off ++ te = g_object_new (MODULEMD_TYPE_TRANSLATION_ENTRY, ++ "locale", NULL, ++ NULL); ++ // clang-format on ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + +@@ -334,12 +346,26 @@ translation_entry_test_get_locale (void) + + g_object_get (te, "locale", &locale, NULL); + g_assert_cmpstr (locale, ==, "en_US"); ++} ++ + +- /* Test that locale is immutable */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- g_object_set (te, "locale", "en_GB", NULL); +- g_assert_true (signaled); ++/* Test that locale is immutable */ ++static void ++translation_entry_test_locale_is_immutable (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdTranslationEntry) te = NULL; ++ ++ te = modulemd_translation_entry_new ("en_US"); ++ g_assert_nonnull (te); ++ g_assert_true (MODULEMD_IS_TRANSLATION_ENTRY (te)); ++ ++ g_object_set (te, "locale", "en_GB", NULL); ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + +@@ -609,8 +635,14 @@ main (int argc, char *argv[]) + + // Define the tests. + +- g_test_add_func ("/modulemd/v2/translationentry/construct", +- translation_entry_test_construct); ++ g_test_add_func ("/modulemd/v2/translationentry/construct/regular", ++ translation_entry_test_construct_regular); ++ g_test_add_func ("/modulemd/v2/translationentry/construct/new_null", ++ translation_entry_test_construct_new_null); ++ g_test_add_func ("/modulemd/v2/translationentry/construct/init_no_locale", ++ translation_entry_test_construct_init_no_locale); ++ g_test_add_func ("/modulemd/v2/translationentry/construct/init_null_locale", ++ translation_entry_test_construct_init_null_locale); + + g_test_add_func ("/modulemd/v2/translationentry/copy", + translation_entry_test_copy); +@@ -618,6 +650,9 @@ main (int argc, char *argv[]) + g_test_add_func ("/modulemd/v2/translationentry/get_locale", + translation_entry_test_get_locale); + ++ g_test_add_func ("/modulemd/v2/translationentry/locale_is_immutable", ++ translation_entry_test_locale_is_immutable); ++ + g_test_add_func ("/modulemd/v2/translationentry/get_set_summary", + translation_entry_test_get_set_summary); + +diff --git a/modulemd/tests/test-modulemd-translation.c b/modulemd/tests/test-modulemd-translation.c +index 655200f..a67b787 100644 +--- a/modulemd/tests/test-modulemd-translation.c ++++ b/modulemd/tests/test-modulemd-translation.c +@@ -14,7 +14,6 @@ + #include + #include + #include +-#include + + #include "modulemd-subdocument-info.h" + #include "modulemd-translation-entry.h" +@@ -30,17 +29,9 @@ typedef struct _TranslationFixture + { + } TranslationFixture; + +-gboolean signaled = FALSE; + + static void +-sigtrap_handler (int UNUSED (sig_num)) +-{ +- signaled = TRUE; +-} +- +- +-static void +-translation_test_construct (void) ++translation_test_construct_regular (void) + { + g_autoptr (ModulemdTranslation) t = NULL; + g_auto (GStrv) locales = NULL; +@@ -94,41 +85,64 @@ translation_test_construct (void) + g_assert_cmpstr (modulemd_translation_get_module_stream (t), ==, "teststr"); + g_assert_cmpint (modulemd_translation_get_modified (t), ==, modified); + g_clear_object (&t); ++} + +- /* Test that object_new does not work without a version */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- // clang-format off +- t = g_object_new (MODULEMD_TYPE_TRANSLATION, +- "module_name", "testmod", +- "module_stream", "teststr", +- NULL); +- // clang-format on +- g_assert_true (signaled); +- g_clear_object (&t); ++/* Test that object_new does not work without a version */ ++static void ++translation_test_construct_no_version (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ g_autoptr (ModulemdTranslation) t = NULL; ++ // clang-format off ++ t = g_object_new (MODULEMD_TYPE_TRANSLATION, ++ "module_name", "testmod", ++ "module_stream", "teststr", ++ NULL); ++ // clang-format on ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + +- /* Test that object_new does not work without a name */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- // clang-format off +- t = g_object_new (MODULEMD_TYPE_TRANSLATION, +- "version", translation_version, +- "module_stream", "teststr", NULL); +- // clang-format on +- g_assert_true (signaled); +- g_clear_object (&t); ++/* Test that object_new does not work without a name */ ++static void ++translation_test_construct_no_name (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ guint64 translation_version = 1; ++ g_autoptr (ModulemdTranslation) t = NULL; ++ // clang-format off ++ t = g_object_new (MODULEMD_TYPE_TRANSLATION, ++ "version", translation_version, ++ "module_stream", "teststr", NULL); ++ // clang-format on ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); ++} + +- /* Test that object_new does not work without a stream */ +- signaled = FALSE; +- signal (SIGTRAP, sigtrap_handler); +- // clang-format off +- t = g_object_new (MODULEMD_TYPE_TRANSLATION, +- "version", translation_version, +- "module_name", "testmod", +- NULL); +- // clang-format on +- g_assert_true (signaled); +- g_clear_object (&t); ++/* Test that object_new does not work without a stream */ ++static void ++translation_test_construct_no_stream (void) ++{ ++ if (g_test_subprocess ()) ++ { ++ guint64 translation_version = 1; ++ g_autoptr (ModulemdTranslation) t = NULL; ++ // clang-format off ++ t = g_object_new (MODULEMD_TYPE_TRANSLATION, ++ "version", translation_version, ++ "module_name", "testmod", ++ NULL); ++ // clang-format on ++ return; ++ } ++ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT); ++ g_test_trap_assert_failed (); + } + + static void +@@ -416,8 +430,14 @@ main (int argc, char *argv[]) + + // Define the tests. + +- g_test_add_func ("/modulemd/v2/translation/construct", +- translation_test_construct); ++ g_test_add_func ("/modulemd/v2/translation/construct/regular", ++ translation_test_construct_regular); ++ g_test_add_func ("/modulemd/v2/translation/construct/no_version", ++ translation_test_construct_no_version); ++ g_test_add_func ("/modulemd/v2/translation/construct/no_name", ++ translation_test_construct_no_name); ++ g_test_add_func ("/modulemd/v2/translation/construct/no_stream", ++ translation_test_construct_no_stream); + + g_test_add_func ("/modulemd/v2/translation/copy", translation_test_copy); + +-- +2.52.0 +