From d44b9e15c50806f4718f45ea76c8dd7af288ebc4 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 27 Feb 2018 17:11:07 +0100 Subject: [PATCH 001/110] workaround bug in gobject-introspection Signed-off-by: Igor Gnatenko --- libmodulemd.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmodulemd.spec b/libmodulemd.spec index 330154c..62dba26 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -38,6 +38,9 @@ Development files for libmodulemd. %build %meson +# ALERT!!! PURE HACK FOR EPEL! +# https://bugzilla.redhat.com/show_bug.cgi?id=1546757 +sed -r -i -e "/g-ir-scanner/s/-l(gobject-2.0|glib-2.0|yaml)//g" %{_vpath_builddir}/build.ninja %meson_build %check From c16a3ce8612be2f347c1a07638b0cf59bd59775e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 14 Mar 2018 14:57:12 -0400 Subject: [PATCH 002/110] Patch EPEL to skip the python tests Signed-off-by: Stephen Gallagher --- ...-Skip-python-tests-where-unsupported.patch | 45 +++++++++++++++++++ libmodulemd.spec | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0001-Skip-python-tests-where-unsupported.patch diff --git a/0001-Skip-python-tests-where-unsupported.patch b/0001-Skip-python-tests-where-unsupported.patch new file mode 100644 index 0000000..134bbfe --- /dev/null +++ b/0001-Skip-python-tests-where-unsupported.patch @@ -0,0 +1,45 @@ +From c118049a734891287c04163617fb4fb994c18a7b Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Wed, 14 Mar 2018 14:46:20 -0400 +Subject: [PATCH] Skip python tests where unsupported + +Some platforms like RHEL 7 do not have python3-gobject + +Signed-off-by: Stephen Gallagher +--- + modulemd/test-modulemd-python.py | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/modulemd/test-modulemd-python.py b/modulemd/test-modulemd-python.py +index ae292ecb7b6a5c6778a0f25db58b55d5172d3e03..83e62055c461f7269482dd2d408a1c7979732879 100755 +--- a/modulemd/test-modulemd-python.py ++++ b/modulemd/test-modulemd-python.py +@@ -1,14 +1,20 @@ + #!/usr/bin/python3 + + import os +-import unittest ++import sys + +-import gi +-gi.require_version('Modulemd', os.getenv('MODULEMD_NSVERSION')) +-from gi.repository import Modulemd +-from gi.repository import GLib ++try: ++ import unittest ++ import gi ++ gi.require_version('Modulemd', os.getenv('MODULEMD_NSVERSION')) ++ from gi.repository import Modulemd ++ from gi.repository import GLib ++except ImportError: ++ # Return error 77 to skip this test on platforms without the necessary ++ # python modules ++ sys.exit (77) + + class TestIssues(unittest.TestCase): + + def test_issue24(self): + # Verify that we can handle boolean variant types +-- +2.14.3 + diff --git a/libmodulemd.spec b/libmodulemd.spec index d59fd8e..33ff88a 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -18,9 +18,9 @@ BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) -BuildRequires: python3-gobject-base # Patches +Patch0001: 0001-Skip-python-tests-where-unsupported.patch %description C Library for manipulating module metadata files. From 644f206f02806895cb06769a06e5297170565acd Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 15 Mar 2018 10:29:10 -0400 Subject: [PATCH 003/110] Drop upstreamed patch --- libmodulemd.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 4a2a193..bba7a6f 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -20,7 +20,6 @@ BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) # Patches -Patch0001: 0001-Skip-python-tests-where-unsupported.patch %description C Library for manipulating module metadata files. From 4d70bb0b9412d2deb374834fe9f4d0409abd4843 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 8 May 2018 08:37:01 -0400 Subject: [PATCH 004/110] Drop upstreamed patch Signed-off-by: Stephen Gallagher --- ...-Skip-python-tests-where-unsupported.patch | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 0001-Skip-python-tests-where-unsupported.patch diff --git a/0001-Skip-python-tests-where-unsupported.patch b/0001-Skip-python-tests-where-unsupported.patch deleted file mode 100644 index 134bbfe..0000000 --- a/0001-Skip-python-tests-where-unsupported.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c118049a734891287c04163617fb4fb994c18a7b Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Wed, 14 Mar 2018 14:46:20 -0400 -Subject: [PATCH] Skip python tests where unsupported - -Some platforms like RHEL 7 do not have python3-gobject - -Signed-off-by: Stephen Gallagher ---- - modulemd/test-modulemd-python.py | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -diff --git a/modulemd/test-modulemd-python.py b/modulemd/test-modulemd-python.py -index ae292ecb7b6a5c6778a0f25db58b55d5172d3e03..83e62055c461f7269482dd2d408a1c7979732879 100755 ---- a/modulemd/test-modulemd-python.py -+++ b/modulemd/test-modulemd-python.py -@@ -1,14 +1,20 @@ - #!/usr/bin/python3 - - import os --import unittest -+import sys - --import gi --gi.require_version('Modulemd', os.getenv('MODULEMD_NSVERSION')) --from gi.repository import Modulemd --from gi.repository import GLib -+try: -+ import unittest -+ import gi -+ gi.require_version('Modulemd', os.getenv('MODULEMD_NSVERSION')) -+ from gi.repository import Modulemd -+ from gi.repository import GLib -+except ImportError: -+ # Return error 77 to skip this test on platforms without the necessary -+ # python modules -+ sys.exit (77) - - class TestIssues(unittest.TestCase): - - def test_issue24(self): - # Verify that we can handle boolean variant types --- -2.14.3 - From dc21c775ad38753e19ef6f8007bcbf2ab56e510a Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 20 Jul 2018 12:20:42 -0400 Subject: [PATCH 005/110] Use pkg-config instead of pkgconf Signed-off-by: Stephen Gallagher --- 0001-Use-pkg-config-for-compatibility.patch | 39 +++++++++++++++++++++ libmodulemd.spec | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 0001-Use-pkg-config-for-compatibility.patch diff --git a/0001-Use-pkg-config-for-compatibility.patch b/0001-Use-pkg-config-for-compatibility.patch new file mode 100644 index 0000000..15190b9 --- /dev/null +++ b/0001-Use-pkg-config-for-compatibility.patch @@ -0,0 +1,39 @@ +From b948ccbc296fd7520817a12c1b0fecfddbcfe7bf Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Fri, 20 Jul 2018 12:04:35 -0400 +Subject: [PATCH] Use pkg-config for compatibility + +Signed-off-by: Stephen Gallagher +--- + modulemd/v1/tests/test-import-headers.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/modulemd/v1/tests/test-import-headers.sh b/modulemd/v1/tests/test-import-headers.sh +index 3277b8d054d55f828b3a3f1c9ad61f124fa2c065..51c9fbc3df0d8f2dbff324042201011b89548458 100755 +--- a/modulemd/v1/tests/test-import-headers.sh ++++ b/modulemd/v1/tests/test-import-headers.sh +@@ -28,17 +28,17 @@ int main (int argc, char **argv) + } + EOF + + cat $header.c + +- echo "gcc \`pkgconf --cflags gobject-2.0\` \ +- \`pkgconf --cflags yaml-0.1\` \ ++ echo "gcc \`pkg-config --cflags gobject-2.0\` \ ++ \`pkg-config --cflags yaml-0.1\` \ + -I `dirname $arg` \ + -o $header.out \ + $header.c" +- gcc `pkgconf --cflags gobject-2.0` \ +- `pkgconf --cflags yaml-0.1` \ ++ gcc `pkg-config --cflags gobject-2.0` \ ++ `pkg-config --cflags yaml-0.1` \ + -I `dirname $arg` \ + -o $header.out \ + $header.c + done + +-- +2.17.1 + diff --git a/libmodulemd.spec b/libmodulemd.spec index a0cbbc7..bb800e5 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -23,7 +23,7 @@ BuildRequires: pkgconfig(gtk-doc) BuildRequires: valgrind # Patches - +Patch0001: 0001-Use-pkg-config-for-compatibility.patch %description C Library for manipulating module metadata files. From cc1ccec72600200c9308077196b52431fc26f320 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 15 Aug 2018 07:17:44 -0400 Subject: [PATCH 006/110] Remove Obsoletes: python-modulemd from EPEL Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 4cc9a05..5719b44 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -6,7 +6,7 @@ Name: libmodulemd Version: %{majorminorversion}%{?patchversion:.%{patchversion}} -Release: 2%{?dist} +Release: 2%{?dist}.1 Summary: Module metadata manipulation library License: MIT @@ -22,9 +22,6 @@ BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) BuildRequires: valgrind -Obsoletes: python2-modulemd < 1.3.4 -Obsoletes: python3-modulemd < 1.3.4 - # Patches Patch0001: 0001-Don-t-return-ModuleStream-objects-from-modulemd_modu.patch %description @@ -94,6 +91,9 @@ export MMD_SKIP_VALGRIND=1 %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Wed Aug 15 2018 Stephen Gallagher - 1.6.2-2.1 +- Remove Obsoletes: python-modulemd from EPEL + * Thu Aug 09 2018 Stephen Gallagher - 1.6.2-2 - Fix backwards-incompatible API change - Resolves: rhbz#1607083 From 5c57b040b5e285059b736991d6e2eeb1e83e051b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 31 Oct 2018 08:30:09 -0400 Subject: [PATCH 007/110] Provided by RHEL 7.6+ --- .gitignore | 26 -- ...te-out-the-ref-for-module-components.patch | 116 ------ 0002-Use-decimal-version-in-NSVC.patch | 35 -- README.md | 5 - dead.package | 1 + libmodulemd.spec | 329 ------------------ sources | 1 - tests/tests.yml | 32 -- 8 files changed, 1 insertion(+), 544 deletions(-) delete mode 100644 .gitignore delete mode 100644 0001-Properly-write-out-the-ref-for-module-components.patch delete mode 100644 0002-Use-decimal-version-in-NSVC.patch delete mode 100644 README.md create mode 100644 dead.package delete mode 100644 libmodulemd.spec delete mode 100644 sources delete mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ef98f2d..0000000 --- a/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -/modulemd-0.1.0.tar.xz -/modulemd-0.2.0.tar.xz -/modulemd-0.2.1.tar.xz -/modulemd-0.2.2.tar.xz -/modulemd-1.0.0.tar.xz -/modulemd-1.0.1.tar.xz -/modulemd-1.0.2.tar.xz -/modulemd-1.0.3.tar.xz -/modulemd-1.0.4.tar.xz -/modulemd-1.1.0.tar.xz -/modulemd-1.1.1.tar.xz -/modulemd-1.1.2.tar.xz -/modulemd-1.1.3.tar.xz -/modulemd-1.2.0.tar.xz -/modulemd-1.3.0.tar.xz -/modulemd-1.4.0.tar.xz -/modulemd-1.4.1.tar.xz -/modulemd-1.5.0.tar.xz -/modulemd-1.5.1.tar.xz -/modulemd-1.5.2.tar.xz -/modulemd-1.6.0.tar.xz -/modulemd-1.6.1.tar.xz -/modulemd-1.6.2.tar.xz -/modulemd-1.6.3.tar.xz -/modulemd-1.6.4.tar.xz -/modulemd-1.7.0.tar.xz diff --git a/0001-Properly-write-out-the-ref-for-module-components.patch b/0001-Properly-write-out-the-ref-for-module-components.patch deleted file mode 100644 index e9723cf..0000000 --- a/0001-Properly-write-out-the-ref-for-module-components.patch +++ /dev/null @@ -1,116 +0,0 @@ -From b873aca640964389935d88a90a657abba89421e3 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Thu, 6 Sep 2018 11:17:41 -0400 -Subject: [PATCH 1/2] Properly write out the ref for module components - -Fixes: https://github.com/fedora-modularity/libmodulemd/issues/85 - -Signed-off-by: Stephen Gallagher ---- - modulemd/v1/modulemd-yaml-emitter-modulemd.c | 2 +- - modulemd/v1/tests/test-modulemd-python.py | 50 +++++++++++++++++++ - modulemd/v1/tests/test-modulemd-translation.c | 2 +- - 3 files changed, 52 insertions(+), 2 deletions(-) - -diff --git a/modulemd/v1/modulemd-yaml-emitter-modulemd.c b/modulemd/v1/modulemd-yaml-emitter-modulemd.c -index 87093813e28f5dd42ab014265874ce2148372c8a..7b0fbfafe1cdb4651f2f9b7147f9c082eb76ee2a 100644 ---- a/modulemd/v1/modulemd-yaml-emitter-modulemd.c -+++ b/modulemd/v1/modulemd-yaml-emitter-modulemd.c -@@ -1353,11 +1353,11 @@ _emit_modulemd_module_components (yaml_emitter_t *emitter, - MMD_YAML_EMIT_STR_STR_DICT ( - &event, name, value, YAML_PLAIN_SCALAR_STYLE); - } - - /* Ref */ -- value = modulemd_component_module_dup_repository (module_component); -+ value = modulemd_component_module_dup_ref (module_component); - if (value) - { - name = g_strdup ("ref"); - MMD_YAML_EMIT_STR_STR_DICT ( - &event, name, value, YAML_PLAIN_SCALAR_STYLE); -diff --git a/modulemd/v1/tests/test-modulemd-python.py b/modulemd/v1/tests/test-modulemd-python.py -index 07823213de9c7f16e16719efe0eccf155117cfa5..596665a6df2e367d0817c08b0bfc651cecd14e6a 100755 ---- a/modulemd/v1/tests/test-modulemd-python.py -+++ b/modulemd/v1/tests/test-modulemd-python.py -@@ -214,10 +214,60 @@ class TestIssues(unittest.TestCase): - yaml_output = mmd_translation.dumps() - except GLib.GError as err: - # A proper exception is expected here - pass - -+ def test_issue85(self): -+ """ -+ Component module refs are lost when dumping to YAML -+ """ -+ mmd = Modulemd.Module().new_from_string(""" -+document: modulemd -+version: 1 -+data: -+ summary: A test module in all its beautiful beauty. -+ description: This module demonstrates how to write simple modulemd files And can be used for testing the build and release pipeline. -+ license: -+ module: [ MIT ] -+ dependencies: -+ buildrequires: -+ platform: el8 -+ requires: -+ platform: el8 -+ references: -+ community: https://fedoraproject.org/wiki/Modularity -+ documentation: https://fedoraproject.org/wiki/Fedora_Packaging_Guidelines_for_Modules -+ tracker: https://taiga.fedorainfracloud.org/project/modularity -+ profiles: -+ default: -+ rpms: -+ - acl -+ api: -+ rpms: -+ - acl -+ components: -+ rpms: -+ acl: -+ rationale: needed -+ ref: rhel-8.0 -+ modules: -+ testmodule: -+ ref: private-x -+ rationale: Testing module inclusion. -+ buildorder: 10 -+""") -+ assert mmd.get_module_components( -+ )['testmodule'].peek_ref() == 'private-x' -+ -+ mmd2 = Modulemd.Module.copy(mmd) -+ assert mmd2.get_module_components( -+ )['testmodule'].peek_ref() == 'private-x' -+ -+ mmd3 = Modulemd.Module.new_from_string(mmd.dumps()) -+ assert mmd3.get_module_components( -+ )['testmodule'].peek_ref() == 'private-x' -+ - - class TestIntent(unittest.TestCase): - - def test_basic(self): - intent = Modulemd.Intent.new("intent_name") -diff --git a/modulemd/v1/tests/test-modulemd-translation.c b/modulemd/v1/tests/test-modulemd-translation.c -index a85ba5131db562aa9be3255fae3db13e9ee66508..dfa07f48d5ada811a5c82f14e7bcf52c7b258b94 100644 ---- a/modulemd/v1/tests/test-modulemd-translation.c -+++ b/modulemd/v1/tests/test-modulemd-translation.c -@@ -350,11 +350,11 @@ modulemd_translation_test_index (TranslationFixture *fixture, - "demonstrates arches and multilib.\n arches: [i686, x86_64]\n " - " multilib: [x86_64]\n xyz:\n rationale: xyz is a bundled " - "dependency of xxx.\n buildorder: 10\n modules:\n " - "includedmodule:\n rationale: Included in the stack, just " - "because.\n repository: https://pagure.io/includedmodule.git\n " -- " ref: https://pagure.io/includedmodule.git\n buildorder: 100\n " -+ " ref: somecoolbranchname\n buildorder: 100\n " - "artifacts:\n rpms:\n - bar-0:1.23-1.module_deadbeef.x86_64\n - " - "bar-devel-0:1.23-1.module_deadbeef.x86_64\n - " - "bar-extras-0:1.23-1.module_deadbeef.x86_64\n - " - "baz-0:42-42.module_deadbeef.x86_64\n - " - "xxx-0:1-1.module_deadbeef.i686\n - xxx-0:1-1.module_deadbeef.x86_64\n " --- -2.19.0.rc0 - diff --git a/0002-Use-decimal-version-in-NSVC.patch b/0002-Use-decimal-version-in-NSVC.patch deleted file mode 100644 index 26f1541..0000000 --- a/0002-Use-decimal-version-in-NSVC.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e69860136a11441a9f952ac97da1040a3219b4d6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= -Date: Wed, 5 Sep 2018 12:20:36 +0200 -Subject: [PATCH 2/2] Use decimal version in NSVC - -Fixes: #82 ---- - modulemd/v1/modulemd-modulestream.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modulemd/v1/modulemd-modulestream.c b/modulemd/v1/modulemd-modulestream.c -index 1ee6e1cffc5cecd19439ca47afc4425e9808aaa4..58317c17564301f85984f7608356002afeb29921 100644 ---- a/modulemd/v1/modulemd-modulestream.c -+++ b/modulemd/v1/modulemd-modulestream.c -@@ -1796,15 +1796,15 @@ modulemd_modulestream_get_nsvc (ModulemdModuleStream *self) - } - - if (context) - { - nsvc = g_strdup_printf ( -- "%s:%s:%" PRIx64 ":%s", name, stream, version, context); -+ "%s:%s:%" PRIu64 ":%s", name, stream, version, context); - } - else - { -- nsvc = g_strdup_printf ("%s:%s:%" PRIx64, name, stream, version); -+ nsvc = g_strdup_printf ("%s:%s:%" PRIu64, name, stream, version); - } - - return nsvc; - } - --- -2.19.0.rc0 - diff --git a/README.md b/README.md deleted file mode 100644 index d5926fb..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# libmodulemd - -C Library for manipulating module metadata files -See https://pagure.io/modulemd for more details. - diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..8a07057 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Provided by RHEL 7.6+ diff --git a/libmodulemd.spec b/libmodulemd.spec deleted file mode 100644 index 3848856..0000000 --- a/libmodulemd.spec +++ /dev/null @@ -1,329 +0,0 @@ -Name: libmodulemd -Version: 1.7.0 -Release: 1%{?dist} -Summary: Module metadata manipulation library - -License: MIT -URL: https://github.com/fedora-modularity/libmodulemd -Source0: %{url}/releases/download/%{name}-%{version}/modulemd-%{version}.tar.xz - -BuildRequires: meson -BuildRequires: pkgconfig -BuildRequires: gcc -BuildRequires: pkgconfig(gobject-2.0) -BuildRequires: pkgconfig(gobject-introspection-1.0) -BuildRequires: pkgconfig(yaml-0.1) -BuildRequires: pkgconfig(gtk-doc) -BuildRequires: valgrind - -# Patches - -%description -C Library for manipulating module metadata files. -See https://github.com/fedora-modularity/libmodulemd/blob/master/README.md for -more details. - - -%package -n python2-%{name} -Summary: Python 2 bindings for %{name} -BuildArch: noarch -Requires: libmodulemd = %{version}-%{release} -Requires: python-gobject-base -Obsoletes: python2-modulemd < 1.3.4 - -%description -n python2-%{name} -Python 2 bindings for %{name} - -%package devel -Summary: Development files for libmodulemd -Requires: %{name}%{?_isa} = %{version}-%{release} - - -%description devel -Development files for libmodulemd. - - -%prep -%autosetup -p1 -n modulemd-%{version} - - -%build -%meson -Ddeveloper_build=false -# ALERT!!! PURE HACK FOR EPEL! -# https://bugzilla.redhat.com/show_bug.cgi?id=1546757 -sed -r -i -e "/g-ir-scanner/s/-l(gobject-2.0|glib-2.0|yaml)//g" %{_vpath_builddir}/build.ninja -%meson_build - - -%check - -export LC_CTYPE=C.utf8 - -%ifarch %{power64} -# Valgrind is broken on ppc64[le] with GCC7: -# https://bugs.kde.org/show_bug.cgi?id=386945 -export MMD_SKIP_VALGRIND=1 -%endif - -%meson_test - - -%install -%meson_install - - -%ldconfig_scriptlets - - -%files -%license COPYING -%doc README.md -%{_bindir}/modulemd-validator -%{_libdir}/%{name}.so.1* -%dir %{_libdir}/girepository-1.0 -%{_libdir}/girepository-1.0/Modulemd-1.0.typelib - - -%files -n python2-%{name} - - -%files devel -%{_libdir}/%{name}.so -%{_libdir}/pkgconfig/modulemd.pc -%{_includedir}/modulemd/ -%dir %{_datadir}/gir-1.0 -%{_datadir}/gir-1.0/Modulemd-1.0.gir -%dir %{_datadir}/gtk-doc -%dir %{_datadir}/gtk-doc/html -%{_datadir}/gtk-doc/html/modulemd-1.0/ - -%changelog -* Fri Oct 26 2018 Stephen Gallagher - 1.7.0-1 -- Update to 1.7.0 -- Enhance YAML parser for use with `fedmod lint` -- Support running unit tests against installed packages -- Include all NSVCs for ModuleStreams in ImprovedModule - -* Tue Sep 18 2018 Stephen Gallagher - 1.6.4-1 -- Update to 1.6.4. -- Add Buildopts to the documentation. -- Deduplicate module streams when merging. -- Drop upstreamed patches. - -* Thu Sep 06 2018 Stephen Gallagher - 1.6.3-2 -- Fix generation of module component YAML -- Output NSVC information using decimal version - -* Tue Sep 04 2018 Stephen Gallagher - 1.6.3-1 -- Update to 1.6.3 -- Drop upstreamed patch -- Don't return ModuleStream objects from modulemd_module_new_all_from_*_ext() -- Ensure that Component buildorder property is signed -- Work around optimization bug -- Don't crash dumping translation events without summary or desc - -* Wed Aug 15 2018 Stephen Gallagher - 1.6.2-2.1 -- Remove Obsoletes: python-modulemd from EPEL - -* Thu Aug 09 2018 Stephen Gallagher - 1.6.2-2 -- Fix backwards-incompatible API change -- Resolves: rhbz#1607083 - -* Tue Aug 07 2018 Stephen Gallagher - 1.6.2-1 -- Update to 1.6.2 -- Make buildorder a signed integer to match modulemd specification - -* Mon Jul 23 2018 Stephen Gallagher - 1.6.1-2 -- Obsolete unsupported pythonX-modulemd packages - -* Fri Jul 20 2018 Stephen Gallagher - 1.6.1-1 -- Update to 1.6.1 -- Fix header include ordering -- Suppress empty sections from .dump() ordering - -* Wed Jul 18 2018 Stephen Gallagher - 1.6.0-1 -- Update to 1.6.0 -- Adds Modulemd.ModuleStream object, deprecating Modulemd.Module -- Adds Modulemd.Translation and Modulemd.TranslationEntry objects -- Adds Modulemd.ImprovedModule object that collects streams, defaults and - translations together -- Adds new Modulemd.index_from_*() funtions to get a hash table of - Modulemd.ImprovedModule objects for easier searching -- Moves function documentation to the public headers -- Corrects the license headers to MIT (they were incorrectly listed as MITNFA - in previous releases) -- Makes the "eol" field optional for Modulemd.ServiceLevel -- Clean up HTML documentation -- Fixes a type error on 32-bit systems - -* Fri Jul 13 2018 Fedora Release Engineering - 1.5.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Sat Jun 23 2018 Stephen Gallagher - 1.5.2-1 -- Update to libdmodulemd 1.5.2 -- Don't free uninitialized memory - -* Fri Jun 22 2018 Stephen Gallagher - 1.5.1-2 -- Fix buildopts property not being initialized - -* Tue Jun 19 2018 Stephen Gallagher - 1.5.1-1 -- Update to version 1.5.1 -- Re-enable build-time tests - -* Mon Jun 18 2018 Stephen Gallagher - 1.5.0-2 -- Temporarily disable build-time tests - -* Mon Jun 18 2018 Stephen Gallagher - 1.5.0-1 -- Update to version 1.5.0 -- Adds support for "intents" in Modulemd.Defaults -- Adds `Modulemd.get_version()` -- Adds support for RPM whitelists in the buildopts -- Adds a new object: Modulemd.Buildopts -- Deprecates Modulemd.Module.get_rpm_buildopts() -- Deprecates Modulemd.Module.set_rpm_buildopts() -- Fixes some missing license blurbs - -* Tue May 08 2018 Stephen Gallagher - 1.4.1-1 -- Update to version 1.4.1 -- Improve output from modulemd-validator -- Drop upstreamed patches - -* Wed Apr 25 2018 Stephen Gallagher - 1.4.0-2 -- Fix pointer math error -- Fix compilation failure in Fedora build system - -* Wed Apr 25 2018 Stephen Gallagher - 1.4.0-1 -- Update to version 1.4.0 -- Adds new API for returning failed YAML subdocuments -- Stop emitting log messages by default (polluting consumer logs) -- Validate RPM artifacts for proper NEVRA format -- Improve the validator tool -- Drop upstreamed patch - -* Mon Apr 16 2018 Stephen Gallagher - 1.3.0-2 -- Fix serious error in modulemd-defaults emitter - -* Fri Apr 13 2018 Stephen Gallagher - 1.3.0-1 -- Update to version 1.3.0 -- New Public Objects: - * Modulemd.Prioritizer - tool to merge module defaults -- New Public Functions: - * Modulemd.SimpleSet.is_equal() - * Modulemd.Defaults.copy() - * Modulemd.Defaults.merge() - -* Wed Apr 04 2018 Stephen Gallagher - 1.2.0-1 -- Update to version 1.2.0 -- New Functions: - * Modulemd.objects_from_file() - * Modulemd.objects_from_string() - * Modulemd.dump() - * Modulemd.dumps() - * Modulemd.Defaults.new_from_file() - * Modulemd.Defaults.new_from_string() -- Deprecated Functions: - * Modulemd.Module.new_all_from_file() - * Modulemd.Module.new_all_from_file_ext() - * Modulemd.Module.new_all_from_string() - * Modulemd.Module.new_all_from_string_ext() - * Modulemd.Module.dump_all() - * Modulemd.Module.dumps_all() -- Bugfixes - * Properly use G_BEGIN_DECLS and G_END_DECLS in headers - * Assorted fixes for memory ownership in GObject Introspection - -* Fri Mar 23 2018 Stephen Gallagher - 1.1.3-2 -- Fix missing G_END_DECL from public headers - -* Mon Mar 19 2018 Stephen Gallagher - 1.1.3-1 -- Fix numerous memory leaks -- Drop upstreamed patch - -* Thu Mar 15 2018 Stephen Gallagher - 1.1.2-1 -- Update to version 1.1.2 -- Revert backwards-incompatible API change -- Fix version string in pkgconfig file - -* Thu Mar 15 2018 Stephen Gallagher - 1.1.1-1 -- Update to version 1.1.1 -- Make default stream and profiles optional -- Fixes: https://github.com/fedora-modularity/libmodulemd/issues/25 -- Fixes: https://github.com/fedora-modularity/libmodulemd/issues/26 -- Fixes: https://github.com/fedora-modularity/libmodulemd/issues/27 - -* Wed Mar 14 2018 Stephen Gallagher - 1.1.0-1 -- Update to version 1.1.0 -- Adds support for handling modulemd-defaults YAML documents -- Adds peek()/dup() routines to all object properties -- Adds Modulemd.Module.dup_nsvc() to retrieve the canonical form of the unique module identifier. -- Adds support for boolean types in the XMD section -- Revert obsoletion of pythonX-modulemd packages for now - -* Tue Mar 13 2018 Igor Gnatenko - 1.0.4-2 -- Obsolete unsupported pythonX-modulemd packages - -* Tue Feb 27 2018 Stephen Gallagher - 1.0.4-1 -- Update to 1.0.4 -- Rework version autodetection -- Avoid infinite loop on unparseable YAML - -* Sun Feb 25 2018 Stephen Gallagher - 1.0.3-1 -- RPM components are properly emitted when no module components exist -- Parser works around late determination of modulemd version - -* Fri Feb 16 2018 Stephen Gallagher - 1.0.2-1 -- Be more strict with certain parser edge-cases -- Replace popt argument processing with glib -- Drop upstreamed patches - -* Thu Feb 15 2018 Stephen Gallagher - 1.0.1-2 -- Handle certain unlikely format violations - -* Thu Feb 15 2018 Stephen Gallagher - 1.0.1-1 -- Support modulemd v2 -- Add tool to do quick validation of modulemd -- Fix memory management -- Warn and ignore unparseable sub-documents in the YAML -- Fix several memory issues detected by Coverity scan - -* Tue Feb 06 2018 Stephen Gallagher - 0.2.2-1 -- Update to libmodulemd 0.2.2 -- Fix numerous minor memory leaks -- Fix issues with EOL/SL dates - -* Tue Feb 06 2018 Igor Gnatenko - 0.2.1-3 -- Own appropriate directories - -* Fri Feb 02 2018 Igor Gnatenko - 0.2.1-2 -- Switch to %%ldconfig_scriptlets - -* Fri Jan 05 2018 Stephen Gallagher - 0.2.1-1 -- Update to libmodulemd 0.2.1 -- Add 'name' property for Profiles - -* Thu Oct 05 2017 Stephen Gallagher - 0.2.0-2 -- Add missing BuildRequires for gtk-doc - -* Thu Oct 05 2017 Stephen Gallagher - 0.2.0-1 -- Update to libmodulemd 0.2.0 -- Adds gtk-doc generated documentation -- (ABI-break) Makes all optional properties accept NULL as a value to clear - them -- (ABI-break) Modulemd.SimpleSet takes a STRV (char **) instead of a - GLib.PtrArray -- Fixes a bug where the name was not always set for components -- Adds support for dumping YAML from the introspected API -- Includes add/remove routines for profiles - -* Sat Sep 30 2017 Igor Gnatenko - 0.1.0-5 -- Use %%_isa in Requires for main package from devel - -* Mon Sep 18 2017 Stephen Gallagher - 0.1.0-4 -- Correct the license to MIT - -* Mon Sep 18 2017 Stephen Gallagher - 0.1.0-3 -- Modifications requested during package review - -* Fri Sep 15 2017 Stephen Gallagher - 0.1.0-2 -- First public release - diff --git a/sources b/sources deleted file mode 100644 index 239b181..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (modulemd-1.7.0.tar.xz) = 6bdf5c77a25ae0d1bf583e5b5fd1ab6ac609c3c3893f66529cb09fcec08479afc3765048abf03bb6afee531119fa6f2bc9ebb51ac388751ea4f59ce64434104e diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index c3eda17..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 python2-libselinux libmodulemd-devel - - name: Copy spec file to remote machine - copy: - src: "{{ playbook_dir }}/../libmodulemd.spec" - dest: /tmp/libmodulemd.spec - - name: Install build deps - shell: dnf -y build-dep /tmp/libmodulemd.spec - -- hosts: localhost - tags: - - classic - roles: - - role: standard-test-basic - tests: - - build: - dir: . - run: meson -Dtest_installed_lib=true -Ddeveloper_build=false source - - unittests: - dir: . - run: ninja test From 5500b7840fa40b2fb6c21269f823dc40f37d4d66 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 11 Dec 2018 22:01:29 -0500 Subject: [PATCH 008/110] Update to 2.0.0beta2 Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 113 ++++++++++++++++++++++++++++++++++++++++------- sources | 2 +- 3 files changed, 99 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index ef98f2d..1dead76 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /modulemd-1.6.3.tar.xz /modulemd-1.6.4.tar.xz /modulemd-1.7.0.tar.xz +/modulemd-2.0.0beta2.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index 0c2d989..df4db56 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,24 +1,31 @@ +%global libmodulemd_version 2.0.0 +%global libmodulemd_v1_version 1.8.0 + Name: libmodulemd -Version: 1.7.0 -Release: 1%{?dist} +Version: %{libmodulemd_version} +Release: 0.beta2%{?dist} Summary: Module metadata manipulation library License: MIT URL: https://github.com/fedora-modularity/libmodulemd -Source0: %{url}/releases/download/%{name}-%{version}/modulemd-%{version}.tar.xz +Source0: %{url}/releases/download/%{name}-%{version}/modulemd-%{version}beta2.tar.xz -BuildRequires: meson +BuildRequires: meson >= 0.45.1-3 BuildRequires: pkgconfig BuildRequires: gcc +BuildRequires: gcc-c++ BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) +BuildRequires: python3-devel BuildRequires: python3-gobject-base +%ifarch %{valgrind_arches} BuildRequires: valgrind +%endif Obsoletes: python2-modulemd < 1.3.4 - +Obsoletes: python3-modulemd < 1.3.4 # Patches @@ -39,8 +46,6 @@ Obsoletes: python3-modulemd < 1.3.4 %description -n python3-%{name} Python 3 bindings for %{name} -Also provides utility module ModulemdUtils. - %package devel Summary: Development files for libmodulemd @@ -51,12 +56,48 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Development files for libmodulemd. +%package -n libmodulemd1 +Summary: Compatibility package for libmodulemd 1.x +Version: %{libmodulemd_v1_version} +Obsoletes: libmodulemd < 2 +Provides: libmodulemd = %{libmodulemd_v1_version}-%{release} +Provides: libmodulemd%{?_isa} = %{libmodulemd_v1_version}-%{release} + +%description -n libmodulemd1 +Compatibility library for libmodulemd 1.x + + +%package -n libmodulemd1-devel +Summary: Compatibility development package for libmodulemd 1.x +Version: %{libmodulemd_v1_version} +Requires: libmodulemd1%{?_isa} = %{libmodulemd_v1_version}-%{release} +Conflicts: %{name}-devel +Obsoletes: libmodulemd-devel < 2 +Provides: libmodulemd-devel = %{libmodulemd_v1_version}-%{release} +RemovePathPostfixes: .compat + + +%description -n libmodulemd1-devel +Development files for libmodulemd 1.x + + +%package -n python3-libmodulemd1 +Summary: Python 3 bindings for %{name}1 +Version: %{libmodulemd_v1_version} +BuildArch: noarch +Requires: libmodulemd1 = %{libmodulemd_v1_version}-%{release} +Requires: python3-gobject-base + +%description -n python3-libmodulemd1 +Python 3 bindings for libmodulemd1 + + %prep -%autosetup -p1 -n modulemd-%{version} +%autosetup -p1 -n modulemd-%{libmodulemd_version} %build -%meson -Ddeveloper_build=false +%meson -Ddeveloper_build=false -Dbuild_api_v1=true -Dbuild_api_v2=true %meson_build @@ -69,6 +110,9 @@ export LC_CTYPE=C.utf8 # https://bugs.kde.org/show_bug.cgi?id=386945 export MMD_SKIP_VALGRIND=1 %endif +%ifnarch %{valgrind_arches} +export MMD_SKIP_VALGRIND=1 +%endif %meson_test @@ -76,24 +120,47 @@ export MMD_SKIP_VALGRIND=1 %install %meson_install - -%ldconfig_scriptlets +ln -s libmodulemd.so.%{libmodulemd_v1_version} \ + %{buildroot}%{_libdir}/%{name}.so.compat %files %license COPYING %doc README.md +%{_libdir}/%{name}.so.2* +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/Modulemd-2.0.typelib +%{python3_sitearch}/gi/overrides/ + + +%files devel +%{_libdir}/%{name}.so +%{_libdir}/pkgconfig/modulemd-2.0.pc +%{_includedir}/modulemd-2.0/ +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/Modulemd-2.0.gir +%dir %{_datadir}/gtk-doc +%dir %{_datadir}/gtk-doc/html +%{_datadir}/gtk-doc/html/modulemd-2.0/ + + +%files -n python3-%{name} + + +%files -n python3-libmodulemd1 + + +%files -n libmodulemd1 +%license COPYING +%doc README.md %{_bindir}/modulemd-validator %{_libdir}/%{name}.so.1* %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Modulemd-1.0.typelib -%files -n python3-%{name} - - -%files devel -%{_libdir}/%{name}.so +%files -n libmodulemd1-devel +%{_libdir}/%{name}.so.compat %{_libdir}/pkgconfig/modulemd.pc %{_includedir}/modulemd/ %dir %{_datadir}/gir-1.0 @@ -103,6 +170,20 @@ export MMD_SKIP_VALGRIND=1 %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Tue Dec 11 2018 Stephen Gallagher - 2.0.0-0.beta2 +- Update to 2.0.0beta2 +- Better validation of stored content during read and write operations +- ModuleIndex now returns FALSE if any subdocument fails +- Fix tests on 32-bit platforms +- Make unknown keys in YAML maps non-fatal for libmodulemd1 +- Make unknown keys in YAML maps optionally fatal for libmodulemd 2.x +- Fix RPM version requirements for libmodulemd1 + +* Mon Dec 10 2018 Stephen Gallagher - 2.0.0-0.beta1 +- Update to 2.0.0beta1 +- Total rewrite to 2.0 API +- https://sgallagh.fedorapeople.org/docs/libmodulemd/2.0/ + * Fri Oct 26 2018 Stephen Gallagher - 1.7.0-1 - Update to 1.7.0 - Enhance YAML parser for use with `fedmod lint` diff --git a/sources b/sources index 239b181..8f29c30 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-1.7.0.tar.xz) = 6bdf5c77a25ae0d1bf583e5b5fd1ab6ac609c3c3893f66529cb09fcec08479afc3765048abf03bb6afee531119fa6f2bc9ebb51ac388751ea4f59ce64434104e +SHA512 (modulemd-2.0.0beta2.tar.xz) = de136912ab2c5a238783265b193c18b6addaaa7f31b402bc19ace16d3551b874e787d1b12cda7563a5a1905875dc57186ee09355c26e4ba35a73af0640e72266 From 88a95b7d8e04a5c9c9cb86aa241f7a406aa44ddc Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 12 Dec 2018 08:30:50 -0500 Subject: [PATCH 009/110] Don't run valgrind on s390x Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index df4db56..6eaf9a4 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -105,7 +105,7 @@ Python 3 bindings for libmodulemd1 export LC_CTYPE=C.utf8 -%ifarch %{power64} +%ifarch %{power64} s390x # Valgrind is broken on ppc64[le] with GCC7: # https://bugs.kde.org/show_bug.cgi?id=386945 export MMD_SKIP_VALGRIND=1 From dd26c4a31aeb6c654d747c74669c3846fdf99ed7 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 13 Dec 2018 11:53:14 -0500 Subject: [PATCH 010/110] Update to 2.0.0 final - Assorted fixes for validation - Add modulemd-validator tool based on v2 code - Fix a crash when merging defaults Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 13 ++++++++++--- sources | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 1dead76..9570acc 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /modulemd-1.6.4.tar.xz /modulemd-1.7.0.tar.xz /modulemd-2.0.0beta2.tar.xz +/modulemd-2.0.0.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index 6eaf9a4..93bdfe0 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -3,12 +3,12 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 0.beta2%{?dist} +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT URL: https://github.com/fedora-modularity/libmodulemd -Source0: %{url}/releases/download/%{name}-%{version}/modulemd-%{version}beta2.tar.xz +Source0: %{url}/releases/download/%{name}-%{version}/modulemd-%{version}.tar.xz BuildRequires: meson >= 0.45.1-3 BuildRequires: pkgconfig @@ -127,6 +127,7 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %files %license COPYING %doc README.md +%{_bindir}/modulemd-validator %{_libdir}/%{name}.so.2* %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Modulemd-2.0.typelib @@ -153,7 +154,7 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %files -n libmodulemd1 %license COPYING %doc README.md -%{_bindir}/modulemd-validator +%{_bindir}/modulemd-validator-v1 %{_libdir}/%{name}.so.1* %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Modulemd-1.0.typelib @@ -170,6 +171,12 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Thu Dec 13 2018 Stephen Gallagher - 2.0.0-1 +- Update to 2.0.0 final +- Assorted fixes for validation +- Add modulemd-validator tool based on v2 code +- Fix a crash when merging defaults + * Tue Dec 11 2018 Stephen Gallagher - 2.0.0-0.beta2 - Update to 2.0.0beta2 - Better validation of stored content during read and write operations diff --git a/sources b/sources index 8f29c30..ea8a861 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.0.0beta2.tar.xz) = de136912ab2c5a238783265b193c18b6addaaa7f31b402bc19ace16d3551b874e787d1b12cda7563a5a1905875dc57186ee09355c26e4ba35a73af0640e72266 +SHA512 (modulemd-2.0.0.tar.xz) = 6069d10fdf92e6e906693972bef55d1342e2eb1e092cb651b24d3ca7bb98c802b53dc5aa6a8206ca791697b6eb919f28a5ca36cb864433e3c34b914f9871c05e From ac437b4983e2023a2a4ba204e9d9ac0e18918d4c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 11 Jan 2019 10:58:16 -0500 Subject: [PATCH 011/110] Fix issue reading modified value for defaults from YAML streams Signed-off-by: Stephen Gallagher --- ...-value-when-copying-Defaults-objects.patch | 106 ++++++++++++++++ ...te-out-the-ref-for-module-components.patch | 116 ------------------ 0002-Use-decimal-version-in-NSVC.patch | 35 ------ libmodulemd.spec | 7 +- 4 files changed, 111 insertions(+), 153 deletions(-) create mode 100644 0001-Include-modified-value-when-copying-Defaults-objects.patch delete mode 100644 0001-Properly-write-out-the-ref-for-module-components.patch delete mode 100644 0002-Use-decimal-version-in-NSVC.patch diff --git a/0001-Include-modified-value-when-copying-Defaults-objects.patch b/0001-Include-modified-value-when-copying-Defaults-objects.patch new file mode 100644 index 0000000..ad3ee96 --- /dev/null +++ b/0001-Include-modified-value-when-copying-Defaults-objects.patch @@ -0,0 +1,106 @@ +From f66d185dd5c2c1750b3626c2e0bdfeab63e427b6 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Fri, 11 Jan 2019 08:36:11 -0500 +Subject: [PATCH] Include modified value when copying Defaults objects + +The symptom of this was that any defaults object read from a YAML +stream would end up stored in the ModuleIndex with the a zero for +the modified value. + +Signed-off-by: Stephen Gallagher +--- + modulemd/v2/modulemd-defaults.c | 7 ++++-- + modulemd/v2/tests/ModulemdTests/defaults.py | 25 +++++++++++++++++++++ + 2 files changed, 30 insertions(+), 2 deletions(-) + +diff --git a/modulemd/v2/modulemd-defaults.c b/modulemd/v2/modulemd-defaults.c +index 9e5c31b499704ae7a8543c91b9ea3bbf0dbf981d..c577d4a0c3db45319c8e0582b4cc07f3943836fa 100644 +--- a/modulemd/v2/modulemd-defaults.c ++++ b/modulemd/v2/modulemd-defaults.c +@@ -91,14 +91,18 @@ modulemd_defaults_copy (ModulemdDefaults *self) + + + static ModulemdDefaults * + modulemd_defaults_default_copy (ModulemdDefaults *self) + { ++ g_autoptr (ModulemdDefaults) copy = NULL; + g_return_val_if_fail (MODULEMD_IS_DEFAULTS (self), NULL); + +- return modulemd_defaults_new (modulemd_defaults_get_mdversion (self), ++ copy = modulemd_defaults_new (modulemd_defaults_get_mdversion (self), + modulemd_defaults_get_module_name (self)); ++ modulemd_defaults_set_modified (copy, modulemd_defaults_get_modified (self)); ++ ++ return g_steal_pointer (©); + } + + + gboolean + modulemd_defaults_validate (ModulemdDefaults *self, GError **error) +@@ -214,11 +218,10 @@ modulemd_defaults_set_modified (ModulemdDefaults *self, guint64 modified) + { + g_return_if_fail (MODULEMD_IS_DEFAULTS (self)); + + ModulemdDefaultsPrivate *priv = + modulemd_defaults_get_instance_private (self); +- + priv->modified = modified; + } + + + guint64 +diff --git a/modulemd/v2/tests/ModulemdTests/defaults.py b/modulemd/v2/tests/ModulemdTests/defaults.py +index ddac23bbed573b3725feb8cb0090fb878a1f4f22..9a783d25617fc53f59448bc32a68c6e2755dd034 100644 +--- a/modulemd/v2/tests/ModulemdTests/defaults.py ++++ b/modulemd/v2/tests/ModulemdTests/defaults.py +@@ -10,11 +10,13 @@ + # This program is free software. + # For more information on the license, see COPYING. + # For more information on free software, see + # . + ++import os + import sys ++ + try: + import unittest + import gi + gi.require_version('Modulemd', '2.0') + from gi.repository import Modulemd +@@ -92,10 +94,33 @@ class TestDefaults(TestBase): + + # Ensure we cannot set the module_name + with self.expect_signal(): + defs.props.module_name = None + ++ def test_modified(self): ++ defs = Modulemd.Defaults.new( ++ Modulemd.DefaultsVersionEnum.LATEST, 'foo') ++ self.assertIsNotNone(defs) ++ ++ self.assertEqual(defs.get_modified(), 0) ++ ++ defs.set_modified(201901110830) ++ ++ self.assertEqual(defs.get_modified(), 201901110830) ++ ++ # Load a defaults object into an Index ++ index = Modulemd.ModuleIndex.new() ++ index.update_from_file("%s/mod-defaults/spec.v1.yaml" % ( ++ os.getenv('MESON_SOURCE_ROOT')), True) ++ module_names = index.get_module_names() ++ self.assertEqual(len(module_names), 1) ++ ++ defs = index.get_module(index.get_module_names()[0]).get_defaults() ++ self.assertIsNotNone(defs) ++ ++ self.assertEqual(defs.get_modified(), 201812071200) ++ + def test_validate(self): + defs = Modulemd.Defaults.new( + Modulemd.DefaultsVersionEnum.LATEST, 'foo') + assert defs + +-- +2.20.1 + diff --git a/0001-Properly-write-out-the-ref-for-module-components.patch b/0001-Properly-write-out-the-ref-for-module-components.patch deleted file mode 100644 index e9723cf..0000000 --- a/0001-Properly-write-out-the-ref-for-module-components.patch +++ /dev/null @@ -1,116 +0,0 @@ -From b873aca640964389935d88a90a657abba89421e3 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Thu, 6 Sep 2018 11:17:41 -0400 -Subject: [PATCH 1/2] Properly write out the ref for module components - -Fixes: https://github.com/fedora-modularity/libmodulemd/issues/85 - -Signed-off-by: Stephen Gallagher ---- - modulemd/v1/modulemd-yaml-emitter-modulemd.c | 2 +- - modulemd/v1/tests/test-modulemd-python.py | 50 +++++++++++++++++++ - modulemd/v1/tests/test-modulemd-translation.c | 2 +- - 3 files changed, 52 insertions(+), 2 deletions(-) - -diff --git a/modulemd/v1/modulemd-yaml-emitter-modulemd.c b/modulemd/v1/modulemd-yaml-emitter-modulemd.c -index 87093813e28f5dd42ab014265874ce2148372c8a..7b0fbfafe1cdb4651f2f9b7147f9c082eb76ee2a 100644 ---- a/modulemd/v1/modulemd-yaml-emitter-modulemd.c -+++ b/modulemd/v1/modulemd-yaml-emitter-modulemd.c -@@ -1353,11 +1353,11 @@ _emit_modulemd_module_components (yaml_emitter_t *emitter, - MMD_YAML_EMIT_STR_STR_DICT ( - &event, name, value, YAML_PLAIN_SCALAR_STYLE); - } - - /* Ref */ -- value = modulemd_component_module_dup_repository (module_component); -+ value = modulemd_component_module_dup_ref (module_component); - if (value) - { - name = g_strdup ("ref"); - MMD_YAML_EMIT_STR_STR_DICT ( - &event, name, value, YAML_PLAIN_SCALAR_STYLE); -diff --git a/modulemd/v1/tests/test-modulemd-python.py b/modulemd/v1/tests/test-modulemd-python.py -index 07823213de9c7f16e16719efe0eccf155117cfa5..596665a6df2e367d0817c08b0bfc651cecd14e6a 100755 ---- a/modulemd/v1/tests/test-modulemd-python.py -+++ b/modulemd/v1/tests/test-modulemd-python.py -@@ -214,10 +214,60 @@ class TestIssues(unittest.TestCase): - yaml_output = mmd_translation.dumps() - except GLib.GError as err: - # A proper exception is expected here - pass - -+ def test_issue85(self): -+ """ -+ Component module refs are lost when dumping to YAML -+ """ -+ mmd = Modulemd.Module().new_from_string(""" -+document: modulemd -+version: 1 -+data: -+ summary: A test module in all its beautiful beauty. -+ description: This module demonstrates how to write simple modulemd files And can be used for testing the build and release pipeline. -+ license: -+ module: [ MIT ] -+ dependencies: -+ buildrequires: -+ platform: el8 -+ requires: -+ platform: el8 -+ references: -+ community: https://fedoraproject.org/wiki/Modularity -+ documentation: https://fedoraproject.org/wiki/Fedora_Packaging_Guidelines_for_Modules -+ tracker: https://taiga.fedorainfracloud.org/project/modularity -+ profiles: -+ default: -+ rpms: -+ - acl -+ api: -+ rpms: -+ - acl -+ components: -+ rpms: -+ acl: -+ rationale: needed -+ ref: rhel-8.0 -+ modules: -+ testmodule: -+ ref: private-x -+ rationale: Testing module inclusion. -+ buildorder: 10 -+""") -+ assert mmd.get_module_components( -+ )['testmodule'].peek_ref() == 'private-x' -+ -+ mmd2 = Modulemd.Module.copy(mmd) -+ assert mmd2.get_module_components( -+ )['testmodule'].peek_ref() == 'private-x' -+ -+ mmd3 = Modulemd.Module.new_from_string(mmd.dumps()) -+ assert mmd3.get_module_components( -+ )['testmodule'].peek_ref() == 'private-x' -+ - - class TestIntent(unittest.TestCase): - - def test_basic(self): - intent = Modulemd.Intent.new("intent_name") -diff --git a/modulemd/v1/tests/test-modulemd-translation.c b/modulemd/v1/tests/test-modulemd-translation.c -index a85ba5131db562aa9be3255fae3db13e9ee66508..dfa07f48d5ada811a5c82f14e7bcf52c7b258b94 100644 ---- a/modulemd/v1/tests/test-modulemd-translation.c -+++ b/modulemd/v1/tests/test-modulemd-translation.c -@@ -350,11 +350,11 @@ modulemd_translation_test_index (TranslationFixture *fixture, - "demonstrates arches and multilib.\n arches: [i686, x86_64]\n " - " multilib: [x86_64]\n xyz:\n rationale: xyz is a bundled " - "dependency of xxx.\n buildorder: 10\n modules:\n " - "includedmodule:\n rationale: Included in the stack, just " - "because.\n repository: https://pagure.io/includedmodule.git\n " -- " ref: https://pagure.io/includedmodule.git\n buildorder: 100\n " -+ " ref: somecoolbranchname\n buildorder: 100\n " - "artifacts:\n rpms:\n - bar-0:1.23-1.module_deadbeef.x86_64\n - " - "bar-devel-0:1.23-1.module_deadbeef.x86_64\n - " - "bar-extras-0:1.23-1.module_deadbeef.x86_64\n - " - "baz-0:42-42.module_deadbeef.x86_64\n - " - "xxx-0:1-1.module_deadbeef.i686\n - xxx-0:1-1.module_deadbeef.x86_64\n " --- -2.19.0.rc0 - diff --git a/0002-Use-decimal-version-in-NSVC.patch b/0002-Use-decimal-version-in-NSVC.patch deleted file mode 100644 index 26f1541..0000000 --- a/0002-Use-decimal-version-in-NSVC.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e69860136a11441a9f952ac97da1040a3219b4d6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= -Date: Wed, 5 Sep 2018 12:20:36 +0200 -Subject: [PATCH 2/2] Use decimal version in NSVC - -Fixes: #82 ---- - modulemd/v1/modulemd-modulestream.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modulemd/v1/modulemd-modulestream.c b/modulemd/v1/modulemd-modulestream.c -index 1ee6e1cffc5cecd19439ca47afc4425e9808aaa4..58317c17564301f85984f7608356002afeb29921 100644 ---- a/modulemd/v1/modulemd-modulestream.c -+++ b/modulemd/v1/modulemd-modulestream.c -@@ -1796,15 +1796,15 @@ modulemd_modulestream_get_nsvc (ModulemdModuleStream *self) - } - - if (context) - { - nsvc = g_strdup_printf ( -- "%s:%s:%" PRIx64 ":%s", name, stream, version, context); -+ "%s:%s:%" PRIu64 ":%s", name, stream, version, context); - } - else - { -- nsvc = g_strdup_printf ("%s:%s:%" PRIx64, name, stream, version); -+ nsvc = g_strdup_printf ("%s:%s:%" PRIu64, name, stream, version); - } - - return nsvc; - } - --- -2.19.0.rc0 - diff --git a/libmodulemd.spec b/libmodulemd.spec index 93bdfe0..a4dc681 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -3,7 +3,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -28,7 +28,7 @@ Obsoletes: python2-modulemd < 1.3.4 Obsoletes: python3-modulemd < 1.3.4 # Patches - +Patch0001: 0001-Include-modified-value-when-copying-Defaults-objects.patch %description C Library for manipulating module metadata files. @@ -171,6 +171,9 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Fri Jan 11 2019 Stephen Gallagher - 2.0.0-2 +- Fix issue reading modified value for defaults from YAML streams + * Thu Dec 13 2018 Stephen Gallagher - 2.0.0-1 - Update to 2.0.0 final - Assorted fixes for validation From fbc6b4e25766f72b9a1ddfa0f0003ceceb45fe93 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 11 Jan 2019 11:27:34 -0500 Subject: [PATCH 012/110] Fix ordering issue with dependencies Use glib2 suppression file when running valgrind tests Signed-off-by: Stephen Gallagher --- 0002-Always-sort-the-dependencies.patch | 230 ++++++++++++++++++ ...-Use-glib2-valgrind-suppression-file.patch | 38 +++ libmodulemd.spec | 8 +- 3 files changed, 275 insertions(+), 1 deletion(-) create mode 100644 0002-Always-sort-the-dependencies.patch create mode 100644 0003-Use-glib2-valgrind-suppression-file.patch diff --git a/0002-Always-sort-the-dependencies.patch b/0002-Always-sort-the-dependencies.patch new file mode 100644 index 0000000..170108c --- /dev/null +++ b/0002-Always-sort-the-dependencies.patch @@ -0,0 +1,230 @@ +From f8fd49a9aefffdaa24f6d4b24268ac3cd5f3d090 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Mon, 7 Jan 2019 10:22:30 -0500 +Subject: [PATCH 2/3] Always sort the dependencies + +This will make sure that the output is always consistent. This +patch fixes both the ordering of the module names as well as the +stream names. + +Signed-off-by: Stephen Gallagher +--- + .../modulemd-2.0/private/modulemd-yaml.h | 30 ++++--- + modulemd/v2/modulemd-dependencies.c | 85 ++----------------- + .../v2/tests/test-modulemd-modulestream.c | 14 +-- + 3 files changed, 36 insertions(+), 93 deletions(-) + +diff --git a/modulemd/v2/include/modulemd-2.0/private/modulemd-yaml.h b/modulemd/v2/include/modulemd-2.0/private/modulemd-yaml.h +index e426fe6f1d9c43c7ad13420edc481eba46ae3fda..cca84590d6b29fe2f7d20fb91e7205fa21a38533 100644 +--- a/modulemd/v2/include/modulemd-2.0/private/modulemd-yaml.h ++++ b/modulemd/v2/include/modulemd-2.0/private/modulemd-yaml.h +@@ -655,12 +655,30 @@ skip_unknown_yaml (yaml_parser_t *parser, GError **error); + MODULEMD_YAML_ERROR_EMIT, \ + "String set for key %s was empty on emit", \ + key); \ + return FALSE; \ + } \ ++ EMIT_STRING_SET_FULL ( \ ++ emitter, error, key, table, YAML_BLOCK_SEQUENCE_STYLE); \ ++ } \ ++ while (0) ++ ++#define EMIT_STRING_SET_IF_NON_EMPTY(emitter, error, key, table) \ ++ do \ ++ { \ ++ if (NON_EMPTY_TABLE (table)) \ ++ { \ ++ EMIT_STRING_SET (emitter, error, key, table); \ ++ } \ ++ } \ ++ while (0) ++ ++#define EMIT_STRING_SET_FULL(emitter, error, key, table, sequence_style) \ ++ do \ ++ { \ + EMIT_SCALAR (emitter, error, key); \ +- EMIT_SEQUENCE_START (emitter, error); \ ++ EMIT_SEQUENCE_START_WITH_STYLE (emitter, error, sequence_style); \ + gsize i; \ + g_autoptr (GPtrArray) keys = \ + modulemd_ordered_str_keys (table, modulemd_strcmp_sort); \ + for (i = 0; i < keys->len; i++) \ + { \ +@@ -668,20 +686,10 @@ skip_unknown_yaml (yaml_parser_t *parser, GError **error); + } \ + EMIT_SEQUENCE_END (emitter, error); \ + } \ + while (0) + +-#define EMIT_STRING_SET_IF_NON_EMPTY(emitter, error, key, table) \ +- do \ +- { \ +- if (NON_EMPTY_TABLE (table)) \ +- { \ +- EMIT_STRING_SET (emitter, error, key, table); \ +- } \ +- } \ +- while (0) +- + #define EMIT_ARRAY_VALUES(emitter, error, key, array, emitfn) \ + do \ + { \ + if (!NON_EMPTY_ARRAY (array)) \ + { \ +diff --git a/modulemd/v2/modulemd-dependencies.c b/modulemd/v2/modulemd-dependencies.c +index f71bebe9fbc852fa6df729ce80bd0e0375e023bd..ee918e02a87dfdee04a5a6af7dc96e949159a046 100644 +--- a/modulemd/v2/modulemd-dependencies.c ++++ b/modulemd/v2/modulemd-dependencies.c +@@ -470,73 +470,22 @@ modulemd_dependencies_parse_yaml (yaml_parser_t *parser, + } + return g_steal_pointer (&d); + } + + +-static gboolean +-modulemd_dependencies_emit_yaml_nested_set_value (GHashTable *values, +- yaml_emitter_t *emitter, +- yaml_sequence_style_t style, +- GError **error) +-{ +- MODULEMD_INIT_TRACE (); +- int ret; +- g_autoptr (GError) nested_error = NULL; +- MMD_INIT_YAML_EVENT (event); +- GHashTableIter iter; +- gpointer key; +- +- ret = mmd_emitter_start_sequence (emitter, style, &nested_error); +- if (!ret) +- { +- g_propagate_prefixed_error ( +- error, +- g_steal_pointer (&nested_error), +- "Failed to start dependencies nested mapping values: "); +- return FALSE; +- } +- +- g_hash_table_iter_init (&iter, values); +- while (g_hash_table_iter_next (&iter, &key, NULL)) +- { +- ret = mmd_emitter_scalar ( +- emitter, (const gchar *)key, YAML_PLAIN_SCALAR_STYLE, &nested_error); +- if (!ret) +- { +- g_propagate_prefixed_error ( +- error, +- g_steal_pointer (&nested_error), +- "Failed to start dependencies nested mapping entry: "); +- return FALSE; +- } +- } +- +- ret = mmd_emitter_end_sequence (emitter, &nested_error); +- if (!ret) +- { +- g_propagate_prefixed_error ( +- error, +- g_steal_pointer (&nested_error), +- "Failed to end dependencies nested mapping values: "); +- return FALSE; +- } +- +- return TRUE; +-} +- +- + static gboolean + modulemd_dependencies_emit_yaml_nested_set (GHashTable *table, + yaml_emitter_t *emitter, + GError **error) + { + MODULEMD_INIT_TRACE (); + int ret; + g_autoptr (GError) nested_error = NULL; + MMD_INIT_YAML_EVENT (event); +- GHashTableIter iter; +- gpointer key, value; ++ g_autoptr (GPtrArray) keys = NULL; ++ GHashTable *dep = NULL; ++ gchar *key = NULL; + + ret = mmd_emitter_start_mapping ( + emitter, YAML_BLOCK_MAPPING_STYLE, &nested_error); + if (!ret) + { +@@ -545,34 +494,18 @@ modulemd_dependencies_emit_yaml_nested_set (GHashTable *table, + g_steal_pointer (&nested_error), + "Failed to start dependencies nested mapping: "); + return FALSE; + } + +- g_hash_table_iter_init (&iter, table); +- while (g_hash_table_iter_next (&iter, &key, &value)) ++ keys = modulemd_ordered_str_keys (table, modulemd_strcmp_sort); ++ for (gint i = 0; i < keys->len; i++) + { +- ret = mmd_emitter_scalar ( +- emitter, (const gchar *)key, YAML_PLAIN_SCALAR_STYLE, &nested_error); +- if (!ret) +- { +- g_propagate_prefixed_error ( +- error, +- g_steal_pointer (&nested_error), +- "Failed to emit dependencies nested key: "); +- return FALSE; +- } ++ key = g_ptr_array_index (keys, i); ++ dep = g_hash_table_lookup (table, key); + +- ret = modulemd_dependencies_emit_yaml_nested_set_value ( +- (GHashTable *)value, emitter, YAML_FLOW_SEQUENCE_STYLE, &nested_error); +- if (!ret) +- { +- g_propagate_prefixed_error ( +- error, +- g_steal_pointer (&nested_error), +- "Failed to emit dependencies nested sequence: "); +- return FALSE; +- } ++ EMIT_STRING_SET_FULL ( ++ emitter, error, key, dep, YAML_FLOW_SEQUENCE_STYLE); + } + + ret = mmd_emitter_end_mapping (emitter, &nested_error); + if (!ret) + { +diff --git a/modulemd/v2/tests/test-modulemd-modulestream.c b/modulemd/v2/tests/test-modulemd-modulestream.c +index 8136b6ec626b3648339840c7cd667423c3ea1cc9..b68f4a650e15535d606aae031afc90a41bb4bcec 100644 +--- a/modulemd/v2/tests/test-modulemd-modulestream.c ++++ b/modulemd/v2/tests/test-modulemd-modulestream.c +@@ -308,19 +308,21 @@ module_stream_v2_test_parse_dump (ModuleStreamFixture *fixture, + "Beerware\n - GPLv2+\n - zlib\n xmd:\n some_key: some_data\n " + "dependencies:\n - buildrequires:\n platform: [-epel7, -f27, " + "-f28]\n " + " requires:\n platform: [-epel7, -f27, -f28]\n - buildrequires:\n " + " " +- "compatible: [v3]\n platform: [f27]\n buildtools: [v1, v2]\n " ++ "buildtools: [v1, v2]\n compatible: [v3]\n platform: [f27]\n " + "requires:\n compatible: [v3, v4]\n " + "platform: [f27]\n - buildrequires:\n platform: [f28]\n " + "requires:\n platform: [f28]\n runtime: [a, b]\n - " +- "buildrequires:\n extras: []\n platform: [epel7]\n " +- "moreextras: [foo, bar]\n " +- "requires:\n extras: []\n platform: [epel7]\n " +- "moreextras: [foo, bar]\n references:\n community: " +- "http://www.example.com/\n documentation: http://www.example.com/\n " ++ "buildrequires:\n extras: []\n moreextras: [bar, foo]\n " ++ "platform: [epel7]\n " ++ "requires:\n extras: []\n " ++ "moreextras: [bar, foo]\n platform: [epel7]\n references:\n " ++ "community: " ++ "http://www.example.com/\n documentation: " ++ "http://www.example.com/\n " + "tracker: http://www.example.com/\n profiles:\n buildroot:\n " + "rpms:\n - bar-devel\n container:\n rpms:\n - bar\n " + " - bar-devel\n default:\n rpms:\n - bar\n - " + "bar-extras\n - baz\n minimal:\n description: Minimal " + "profile installing only the bar package.\n rpms:\n - bar\n " +-- +2.20.1 + diff --git a/0003-Use-glib2-valgrind-suppression-file.patch b/0003-Use-glib2-valgrind-suppression-file.patch new file mode 100644 index 0000000..c6d5e83 --- /dev/null +++ b/0003-Use-glib2-valgrind-suppression-file.patch @@ -0,0 +1,38 @@ +From 430fddbaae4c9e8ae8b3b43d9a792c71d93256dd Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Mon, 7 Jan 2019 14:46:30 -0500 +Subject: [PATCH 3/3] Use glib2 valgrind suppression file + +Make sure to filter out known issues with glib2 so our tests don't +fail for situations we cannot control (or may be false-positives). + +Signed-off-by: Stephen Gallagher +--- + modulemd/common/tests/test-valgrind.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modulemd/common/tests/test-valgrind.py b/modulemd/common/tests/test-valgrind.py +index 94bf6e0dc5b437751189b0f5ea2eb27660a13227..9f193207ceff1cc85b34ec2dd8fe19d21a5bfd73 100644 +--- a/modulemd/common/tests/test-valgrind.py ++++ b/modulemd/common/tests/test-valgrind.py +@@ -46,14 +46,16 @@ for test in unfiltered_tests: + continue + tests.append(test) + + with tempfile.TemporaryDirectory(prefix="libmodulemd_valgrind_") as tmpdirname: + for test in tests: ++ # TODO: auto-detect the location of the suppression file + valgrind_command = "/usr/bin/valgrind " \ + "--leak-check=full " \ ++ "--suppressions=/usr/share/glib-2.0/valgrind/glib.supp " \ + "--xml=yes " \ +- "--xml-file=%s/%s.xml" % (tmpdirname, test) ++ "--xml-file=%s/%s.xml " % (tmpdirname, test) + proc_result = subprocess.run( + [ + 'meson', + 'test', + '-t', '10', +-- +2.20.1 + diff --git a/libmodulemd.spec b/libmodulemd.spec index a4dc681..8cff3ae 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -3,7 +3,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Module metadata manipulation library License: MIT @@ -29,6 +29,8 @@ Obsoletes: python3-modulemd < 1.3.4 # Patches Patch0001: 0001-Include-modified-value-when-copying-Defaults-objects.patch +Patch0002: 0002-Always-sort-the-dependencies.patch +Patch0003: 0003-Use-glib2-valgrind-suppression-file.patch %description C Library for manipulating module metadata files. @@ -171,6 +173,10 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Fri Jan 11 2019 Stephen Gallagher - 2.0.0-3 +- Fix ordering issue with dependencies +- Use glib2 suppression file when running valgrind tests + * Fri Jan 11 2019 Stephen Gallagher - 2.0.0-2 - Fix issue reading modified value for defaults from YAML streams From ed17745b6d84e9def3e76507eefcd37d3615d4f7 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Sat, 26 Jan 2019 16:00:23 -0500 Subject: [PATCH 013/110] Update to libmodulemd 2.1.0 and 1.8.2 Drop upstreamed patches Add new API ModuleStream.depends_on_stream() and ModuleStream.build_depends_on_stream() to help support auto-detection of when a module stream may need to be rebuilt when its dependencies change. Don't fail merges when default streams differ, treat it as "no default for this module" Fix error message Copy modified value when copying Modulemd.Defaults objects Fixes discovered by clang and coverity static analysis tools Test improvements Signed-off-by: Stephen Gallagher --- .gitignore | 1 + ...-value-when-copying-Defaults-objects.patch | 106 -------- 0002-Always-sort-the-dependencies.patch | 230 ------------------ ...-Use-glib2-valgrind-suppression-file.patch | 38 --- libmodulemd.spec | 22 +- sources | 2 +- 6 files changed, 18 insertions(+), 381 deletions(-) delete mode 100644 0001-Include-modified-value-when-copying-Defaults-objects.patch delete mode 100644 0002-Always-sort-the-dependencies.patch delete mode 100644 0003-Use-glib2-valgrind-suppression-file.patch diff --git a/.gitignore b/.gitignore index 9570acc..e09460b 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ /modulemd-1.7.0.tar.xz /modulemd-2.0.0beta2.tar.xz /modulemd-2.0.0.tar.xz +/modulemd-2.1.0.tar.xz diff --git a/0001-Include-modified-value-when-copying-Defaults-objects.patch b/0001-Include-modified-value-when-copying-Defaults-objects.patch deleted file mode 100644 index ad3ee96..0000000 --- a/0001-Include-modified-value-when-copying-Defaults-objects.patch +++ /dev/null @@ -1,106 +0,0 @@ -From f66d185dd5c2c1750b3626c2e0bdfeab63e427b6 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Fri, 11 Jan 2019 08:36:11 -0500 -Subject: [PATCH] Include modified value when copying Defaults objects - -The symptom of this was that any defaults object read from a YAML -stream would end up stored in the ModuleIndex with the a zero for -the modified value. - -Signed-off-by: Stephen Gallagher ---- - modulemd/v2/modulemd-defaults.c | 7 ++++-- - modulemd/v2/tests/ModulemdTests/defaults.py | 25 +++++++++++++++++++++ - 2 files changed, 30 insertions(+), 2 deletions(-) - -diff --git a/modulemd/v2/modulemd-defaults.c b/modulemd/v2/modulemd-defaults.c -index 9e5c31b499704ae7a8543c91b9ea3bbf0dbf981d..c577d4a0c3db45319c8e0582b4cc07f3943836fa 100644 ---- a/modulemd/v2/modulemd-defaults.c -+++ b/modulemd/v2/modulemd-defaults.c -@@ -91,14 +91,18 @@ modulemd_defaults_copy (ModulemdDefaults *self) - - - static ModulemdDefaults * - modulemd_defaults_default_copy (ModulemdDefaults *self) - { -+ g_autoptr (ModulemdDefaults) copy = NULL; - g_return_val_if_fail (MODULEMD_IS_DEFAULTS (self), NULL); - -- return modulemd_defaults_new (modulemd_defaults_get_mdversion (self), -+ copy = modulemd_defaults_new (modulemd_defaults_get_mdversion (self), - modulemd_defaults_get_module_name (self)); -+ modulemd_defaults_set_modified (copy, modulemd_defaults_get_modified (self)); -+ -+ return g_steal_pointer (©); - } - - - gboolean - modulemd_defaults_validate (ModulemdDefaults *self, GError **error) -@@ -214,11 +218,10 @@ modulemd_defaults_set_modified (ModulemdDefaults *self, guint64 modified) - { - g_return_if_fail (MODULEMD_IS_DEFAULTS (self)); - - ModulemdDefaultsPrivate *priv = - modulemd_defaults_get_instance_private (self); -- - priv->modified = modified; - } - - - guint64 -diff --git a/modulemd/v2/tests/ModulemdTests/defaults.py b/modulemd/v2/tests/ModulemdTests/defaults.py -index ddac23bbed573b3725feb8cb0090fb878a1f4f22..9a783d25617fc53f59448bc32a68c6e2755dd034 100644 ---- a/modulemd/v2/tests/ModulemdTests/defaults.py -+++ b/modulemd/v2/tests/ModulemdTests/defaults.py -@@ -10,11 +10,13 @@ - # This program is free software. - # For more information on the license, see COPYING. - # For more information on free software, see - # . - -+import os - import sys -+ - try: - import unittest - import gi - gi.require_version('Modulemd', '2.0') - from gi.repository import Modulemd -@@ -92,10 +94,33 @@ class TestDefaults(TestBase): - - # Ensure we cannot set the module_name - with self.expect_signal(): - defs.props.module_name = None - -+ def test_modified(self): -+ defs = Modulemd.Defaults.new( -+ Modulemd.DefaultsVersionEnum.LATEST, 'foo') -+ self.assertIsNotNone(defs) -+ -+ self.assertEqual(defs.get_modified(), 0) -+ -+ defs.set_modified(201901110830) -+ -+ self.assertEqual(defs.get_modified(), 201901110830) -+ -+ # Load a defaults object into an Index -+ index = Modulemd.ModuleIndex.new() -+ index.update_from_file("%s/mod-defaults/spec.v1.yaml" % ( -+ os.getenv('MESON_SOURCE_ROOT')), True) -+ module_names = index.get_module_names() -+ self.assertEqual(len(module_names), 1) -+ -+ defs = index.get_module(index.get_module_names()[0]).get_defaults() -+ self.assertIsNotNone(defs) -+ -+ self.assertEqual(defs.get_modified(), 201812071200) -+ - def test_validate(self): - defs = Modulemd.Defaults.new( - Modulemd.DefaultsVersionEnum.LATEST, 'foo') - assert defs - --- -2.20.1 - diff --git a/0002-Always-sort-the-dependencies.patch b/0002-Always-sort-the-dependencies.patch deleted file mode 100644 index 170108c..0000000 --- a/0002-Always-sort-the-dependencies.patch +++ /dev/null @@ -1,230 +0,0 @@ -From f8fd49a9aefffdaa24f6d4b24268ac3cd5f3d090 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Mon, 7 Jan 2019 10:22:30 -0500 -Subject: [PATCH 2/3] Always sort the dependencies - -This will make sure that the output is always consistent. This -patch fixes both the ordering of the module names as well as the -stream names. - -Signed-off-by: Stephen Gallagher ---- - .../modulemd-2.0/private/modulemd-yaml.h | 30 ++++--- - modulemd/v2/modulemd-dependencies.c | 85 ++----------------- - .../v2/tests/test-modulemd-modulestream.c | 14 +-- - 3 files changed, 36 insertions(+), 93 deletions(-) - -diff --git a/modulemd/v2/include/modulemd-2.0/private/modulemd-yaml.h b/modulemd/v2/include/modulemd-2.0/private/modulemd-yaml.h -index e426fe6f1d9c43c7ad13420edc481eba46ae3fda..cca84590d6b29fe2f7d20fb91e7205fa21a38533 100644 ---- a/modulemd/v2/include/modulemd-2.0/private/modulemd-yaml.h -+++ b/modulemd/v2/include/modulemd-2.0/private/modulemd-yaml.h -@@ -655,12 +655,30 @@ skip_unknown_yaml (yaml_parser_t *parser, GError **error); - MODULEMD_YAML_ERROR_EMIT, \ - "String set for key %s was empty on emit", \ - key); \ - return FALSE; \ - } \ -+ EMIT_STRING_SET_FULL ( \ -+ emitter, error, key, table, YAML_BLOCK_SEQUENCE_STYLE); \ -+ } \ -+ while (0) -+ -+#define EMIT_STRING_SET_IF_NON_EMPTY(emitter, error, key, table) \ -+ do \ -+ { \ -+ if (NON_EMPTY_TABLE (table)) \ -+ { \ -+ EMIT_STRING_SET (emitter, error, key, table); \ -+ } \ -+ } \ -+ while (0) -+ -+#define EMIT_STRING_SET_FULL(emitter, error, key, table, sequence_style) \ -+ do \ -+ { \ - EMIT_SCALAR (emitter, error, key); \ -- EMIT_SEQUENCE_START (emitter, error); \ -+ EMIT_SEQUENCE_START_WITH_STYLE (emitter, error, sequence_style); \ - gsize i; \ - g_autoptr (GPtrArray) keys = \ - modulemd_ordered_str_keys (table, modulemd_strcmp_sort); \ - for (i = 0; i < keys->len; i++) \ - { \ -@@ -668,20 +686,10 @@ skip_unknown_yaml (yaml_parser_t *parser, GError **error); - } \ - EMIT_SEQUENCE_END (emitter, error); \ - } \ - while (0) - --#define EMIT_STRING_SET_IF_NON_EMPTY(emitter, error, key, table) \ -- do \ -- { \ -- if (NON_EMPTY_TABLE (table)) \ -- { \ -- EMIT_STRING_SET (emitter, error, key, table); \ -- } \ -- } \ -- while (0) -- - #define EMIT_ARRAY_VALUES(emitter, error, key, array, emitfn) \ - do \ - { \ - if (!NON_EMPTY_ARRAY (array)) \ - { \ -diff --git a/modulemd/v2/modulemd-dependencies.c b/modulemd/v2/modulemd-dependencies.c -index f71bebe9fbc852fa6df729ce80bd0e0375e023bd..ee918e02a87dfdee04a5a6af7dc96e949159a046 100644 ---- a/modulemd/v2/modulemd-dependencies.c -+++ b/modulemd/v2/modulemd-dependencies.c -@@ -470,73 +470,22 @@ modulemd_dependencies_parse_yaml (yaml_parser_t *parser, - } - return g_steal_pointer (&d); - } - - --static gboolean --modulemd_dependencies_emit_yaml_nested_set_value (GHashTable *values, -- yaml_emitter_t *emitter, -- yaml_sequence_style_t style, -- GError **error) --{ -- MODULEMD_INIT_TRACE (); -- int ret; -- g_autoptr (GError) nested_error = NULL; -- MMD_INIT_YAML_EVENT (event); -- GHashTableIter iter; -- gpointer key; -- -- ret = mmd_emitter_start_sequence (emitter, style, &nested_error); -- if (!ret) -- { -- g_propagate_prefixed_error ( -- error, -- g_steal_pointer (&nested_error), -- "Failed to start dependencies nested mapping values: "); -- return FALSE; -- } -- -- g_hash_table_iter_init (&iter, values); -- while (g_hash_table_iter_next (&iter, &key, NULL)) -- { -- ret = mmd_emitter_scalar ( -- emitter, (const gchar *)key, YAML_PLAIN_SCALAR_STYLE, &nested_error); -- if (!ret) -- { -- g_propagate_prefixed_error ( -- error, -- g_steal_pointer (&nested_error), -- "Failed to start dependencies nested mapping entry: "); -- return FALSE; -- } -- } -- -- ret = mmd_emitter_end_sequence (emitter, &nested_error); -- if (!ret) -- { -- g_propagate_prefixed_error ( -- error, -- g_steal_pointer (&nested_error), -- "Failed to end dependencies nested mapping values: "); -- return FALSE; -- } -- -- return TRUE; --} -- -- - static gboolean - modulemd_dependencies_emit_yaml_nested_set (GHashTable *table, - yaml_emitter_t *emitter, - GError **error) - { - MODULEMD_INIT_TRACE (); - int ret; - g_autoptr (GError) nested_error = NULL; - MMD_INIT_YAML_EVENT (event); -- GHashTableIter iter; -- gpointer key, value; -+ g_autoptr (GPtrArray) keys = NULL; -+ GHashTable *dep = NULL; -+ gchar *key = NULL; - - ret = mmd_emitter_start_mapping ( - emitter, YAML_BLOCK_MAPPING_STYLE, &nested_error); - if (!ret) - { -@@ -545,34 +494,18 @@ modulemd_dependencies_emit_yaml_nested_set (GHashTable *table, - g_steal_pointer (&nested_error), - "Failed to start dependencies nested mapping: "); - return FALSE; - } - -- g_hash_table_iter_init (&iter, table); -- while (g_hash_table_iter_next (&iter, &key, &value)) -+ keys = modulemd_ordered_str_keys (table, modulemd_strcmp_sort); -+ for (gint i = 0; i < keys->len; i++) - { -- ret = mmd_emitter_scalar ( -- emitter, (const gchar *)key, YAML_PLAIN_SCALAR_STYLE, &nested_error); -- if (!ret) -- { -- g_propagate_prefixed_error ( -- error, -- g_steal_pointer (&nested_error), -- "Failed to emit dependencies nested key: "); -- return FALSE; -- } -+ key = g_ptr_array_index (keys, i); -+ dep = g_hash_table_lookup (table, key); - -- ret = modulemd_dependencies_emit_yaml_nested_set_value ( -- (GHashTable *)value, emitter, YAML_FLOW_SEQUENCE_STYLE, &nested_error); -- if (!ret) -- { -- g_propagate_prefixed_error ( -- error, -- g_steal_pointer (&nested_error), -- "Failed to emit dependencies nested sequence: "); -- return FALSE; -- } -+ EMIT_STRING_SET_FULL ( -+ emitter, error, key, dep, YAML_FLOW_SEQUENCE_STYLE); - } - - ret = mmd_emitter_end_mapping (emitter, &nested_error); - if (!ret) - { -diff --git a/modulemd/v2/tests/test-modulemd-modulestream.c b/modulemd/v2/tests/test-modulemd-modulestream.c -index 8136b6ec626b3648339840c7cd667423c3ea1cc9..b68f4a650e15535d606aae031afc90a41bb4bcec 100644 ---- a/modulemd/v2/tests/test-modulemd-modulestream.c -+++ b/modulemd/v2/tests/test-modulemd-modulestream.c -@@ -308,19 +308,21 @@ module_stream_v2_test_parse_dump (ModuleStreamFixture *fixture, - "Beerware\n - GPLv2+\n - zlib\n xmd:\n some_key: some_data\n " - "dependencies:\n - buildrequires:\n platform: [-epel7, -f27, " - "-f28]\n " - " requires:\n platform: [-epel7, -f27, -f28]\n - buildrequires:\n " - " " -- "compatible: [v3]\n platform: [f27]\n buildtools: [v1, v2]\n " -+ "buildtools: [v1, v2]\n compatible: [v3]\n platform: [f27]\n " - "requires:\n compatible: [v3, v4]\n " - "platform: [f27]\n - buildrequires:\n platform: [f28]\n " - "requires:\n platform: [f28]\n runtime: [a, b]\n - " -- "buildrequires:\n extras: []\n platform: [epel7]\n " -- "moreextras: [foo, bar]\n " -- "requires:\n extras: []\n platform: [epel7]\n " -- "moreextras: [foo, bar]\n references:\n community: " -- "http://www.example.com/\n documentation: http://www.example.com/\n " -+ "buildrequires:\n extras: []\n moreextras: [bar, foo]\n " -+ "platform: [epel7]\n " -+ "requires:\n extras: []\n " -+ "moreextras: [bar, foo]\n platform: [epel7]\n references:\n " -+ "community: " -+ "http://www.example.com/\n documentation: " -+ "http://www.example.com/\n " - "tracker: http://www.example.com/\n profiles:\n buildroot:\n " - "rpms:\n - bar-devel\n container:\n rpms:\n - bar\n " - " - bar-devel\n default:\n rpms:\n - bar\n - " - "bar-extras\n - baz\n minimal:\n description: Minimal " - "profile installing only the bar package.\n rpms:\n - bar\n " --- -2.20.1 - diff --git a/0003-Use-glib2-valgrind-suppression-file.patch b/0003-Use-glib2-valgrind-suppression-file.patch deleted file mode 100644 index c6d5e83..0000000 --- a/0003-Use-glib2-valgrind-suppression-file.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 430fddbaae4c9e8ae8b3b43d9a792c71d93256dd Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Mon, 7 Jan 2019 14:46:30 -0500 -Subject: [PATCH 3/3] Use glib2 valgrind suppression file - -Make sure to filter out known issues with glib2 so our tests don't -fail for situations we cannot control (or may be false-positives). - -Signed-off-by: Stephen Gallagher ---- - modulemd/common/tests/test-valgrind.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modulemd/common/tests/test-valgrind.py b/modulemd/common/tests/test-valgrind.py -index 94bf6e0dc5b437751189b0f5ea2eb27660a13227..9f193207ceff1cc85b34ec2dd8fe19d21a5bfd73 100644 ---- a/modulemd/common/tests/test-valgrind.py -+++ b/modulemd/common/tests/test-valgrind.py -@@ -46,14 +46,16 @@ for test in unfiltered_tests: - continue - tests.append(test) - - with tempfile.TemporaryDirectory(prefix="libmodulemd_valgrind_") as tmpdirname: - for test in tests: -+ # TODO: auto-detect the location of the suppression file - valgrind_command = "/usr/bin/valgrind " \ - "--leak-check=full " \ -+ "--suppressions=/usr/share/glib-2.0/valgrind/glib.supp " \ - "--xml=yes " \ -- "--xml-file=%s/%s.xml" % (tmpdirname, test) -+ "--xml-file=%s/%s.xml " % (tmpdirname, test) - proc_result = subprocess.run( - [ - 'meson', - 'test', - '-t', '10', --- -2.20.1 - diff --git a/libmodulemd.spec b/libmodulemd.spec index 8cff3ae..e16077a 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,9 +1,9 @@ -%global libmodulemd_version 2.0.0 -%global libmodulemd_v1_version 1.8.0 +%global libmodulemd_version 2.1.0 +%global libmodulemd_v1_version 1.8.2 Name: libmodulemd Version: %{libmodulemd_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -28,9 +28,6 @@ Obsoletes: python2-modulemd < 1.3.4 Obsoletes: python3-modulemd < 1.3.4 # Patches -Patch0001: 0001-Include-modified-value-when-copying-Defaults-objects.patch -Patch0002: 0002-Always-sort-the-dependencies.patch -Patch0003: 0003-Use-glib2-valgrind-suppression-file.patch %description C Library for manipulating module metadata files. @@ -173,6 +170,19 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Sat Jan 26 2019 Stephen Gallagher - 2.1.0-1 +- Update to libmodulemd 2.1.0 and 1.8.2 +- Drop upstreamed patches +- Add new API ModuleStream.depends_on_stream() and + ModuleStream.build_depends_on_stream() to help support auto-detection of + when a module stream may need to be rebuilt when its dependencies change. +- Don't fail merges when default streams differ, treat it as "no default for + this module" +- Fix error message +- Copy modified value when copying Modulemd.Defaults objects +- Fixes discovered by clang and coverity static analysis tools +- Test improvements + * Fri Jan 11 2019 Stephen Gallagher - 2.0.0-3 - Fix ordering issue with dependencies - Use glib2 suppression file when running valgrind tests diff --git a/sources b/sources index ea8a861..b0ba3e1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.0.0.tar.xz) = 6069d10fdf92e6e906693972bef55d1342e2eb1e092cb651b24d3ca7bb98c802b53dc5aa6a8206ca791697b6eb919f28a5ca36cb864433e3c34b914f9871c05e +SHA512 (modulemd-2.1.0.tar.xz) = 565a248ed32b64e31419efd023defe12a9799b584b7dc21139453ad46a96799d5018a0aefb4f2b356d61cbf16ebe17381548f13c49db61643690ef9b8090f2ee From 12035159714ea0149ea240306506f148a25e539c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 07:40:05 +0000 Subject: [PATCH 014/110] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_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 e16077a..8ec02a3 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -3,7 +3,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -170,6 +170,9 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 2.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sat Jan 26 2019 Stephen Gallagher - 2.1.0-1 - Update to libmodulemd 2.1.0 and 1.8.2 - Drop upstreamed patches From 6d5b8af223de4402372abb06f68164d5777a0054 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 1 Mar 2019 08:25:59 -0500 Subject: [PATCH 015/110] Have python3-libmodulemd1 properly Obsolete libmodulemd and python3-libmodulemd < 2. Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 8ec02a3..c5c1b5f 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -3,7 +3,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Module metadata manipulation library License: MIT @@ -87,6 +87,9 @@ BuildArch: noarch Requires: libmodulemd1 = %{libmodulemd_v1_version}-%{release} Requires: python3-gobject-base +Obsoletes: python3-libmodulemd < 2 +Provides: python3-libmodulemd = %{libmodulemd_v1_version}-%{release} + %description -n python3-libmodulemd1 Python 3 bindings for libmodulemd1 @@ -170,6 +173,10 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Fri Mar 01 2019 Stephen Gallagher - 2.1.0-3 +- Have python3-libmodulemd1 properly Obsolete libmodulemd and + python3-libmodulemd < 2. + * Fri Feb 01 2019 Fedora Release Engineering - 2.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 3f8ef7d4676eb7c46cfa3e3330c94030e9b2eaba Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 1 Mar 2019 10:35:32 -0500 Subject: [PATCH 016/110] Don't run tests on 32-bit ARM due to performance issues causing timeouts Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index c5c1b5f..38b8cb1 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -3,7 +3,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Module metadata manipulation library License: MIT @@ -116,7 +116,11 @@ export MMD_SKIP_VALGRIND=1 export MMD_SKIP_VALGRIND=1 %endif +# Don't run tests on armv7 for now. There are problems with +# performance on the builders and often these time out. +%ifnarch %{arm} %meson_test +%endif %install @@ -173,6 +177,9 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Fri Mar 01 2019 Stephen Gallagher - 2.1.0-4 +- Don't run tests on 32-bit ARM due to performance issues causing timeouts + * Fri Mar 01 2019 Stephen Gallagher - 2.1.0-3 - Have python3-libmodulemd1 properly Obsolete libmodulemd and python3-libmodulemd < 2. From 7dd607862feaaf2ca58bc2d36e9048be20225d7a Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 26 Mar 2019 13:52:48 -0400 Subject: [PATCH 017/110] Update to libmodulemd 2.2.0 * Support for RPM checksums * Adds a new directive: "buildafter" for specifying build dependencies * Adds a new directive: "buildonly" to indicate that a component's built artifacts should be listed in the "filter" field. * Deprecate lookup functions by NSVC in favor of NSVCA (including the architecture. Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 15 ++++++++++++--- sources | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e09460b..bf22b1f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ /modulemd-2.0.0beta2.tar.xz /modulemd-2.0.0.tar.xz /modulemd-2.1.0.tar.xz +/modulemd-2.2.0.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index 38b8cb1..0797dec 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,9 +1,9 @@ -%global libmodulemd_version 2.1.0 -%global libmodulemd_v1_version 1.8.2 +%global libmodulemd_version 2.2.0 +%global libmodulemd_v1_version 1.8.3 Name: libmodulemd Version: %{libmodulemd_version} -Release: 4%{?dist} +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -177,6 +177,15 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Tue Mar 26 2019 Stephen Gallagher - 2.2.0-1 +- Update to libmodulemd 2.2.0 +- Support for RPM checksums +- Adds a new directive: "buildafter" for specifying build dependencies +- Adds a new directive: "buildonly" to indicate that a component's built + artifacts should be listed in the "filter" field. +- Deprecate lookup functions by NSVC in favor of NSVCA (including the + architecture. + * Fri Mar 01 2019 Stephen Gallagher - 2.1.0-4 - Don't run tests on 32-bit ARM due to performance issues causing timeouts diff --git a/sources b/sources index b0ba3e1..f1a9f28 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.1.0.tar.xz) = 565a248ed32b64e31419efd023defe12a9799b584b7dc21139453ad46a96799d5018a0aefb4f2b356d61cbf16ebe17381548f13c49db61643690ef9b8090f2ee +SHA512 (modulemd-2.2.0.tar.xz) = 46df5781f10ec6877641dec2c2d87f90aaaeb6aa9c30c7e0c19f02a71756350e99977ef644ecf3e6731e9aaa80b095815f8904e88e190001fec743656426090e From f5342728300ab37f537633a36f9caee084a23f92 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 26 Mar 2019 20:50:16 -0400 Subject: [PATCH 018/110] Update to libmodulemd 2.2.1 * Fixes builds on i686 * Fixes an accidental API error Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 9 +++++++-- sources | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bf22b1f..5ba2ab2 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ /modulemd-2.0.0.tar.xz /modulemd-2.1.0.tar.xz /modulemd-2.2.0.tar.xz +/modulemd-2.2.1.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index 0797dec..ea6688b 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,5 +1,5 @@ -%global libmodulemd_version 2.2.0 -%global libmodulemd_v1_version 1.8.3 +%global libmodulemd_version 2.2.1 +%global libmodulemd_v1_version 1.8.4 Name: libmodulemd Version: %{libmodulemd_version} @@ -177,6 +177,11 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Tue Mar 26 2019 Stephen Gallagher - 2.2.1-1 +- Update to libmodulemd 2.2.1 +- Fixes builds on i686 +- Fixes an accidental API error + * Tue Mar 26 2019 Stephen Gallagher - 2.2.0-1 - Update to libmodulemd 2.2.0 - Support for RPM checksums diff --git a/sources b/sources index f1a9f28..a65dea9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.2.0.tar.xz) = 46df5781f10ec6877641dec2c2d87f90aaaeb6aa9c30c7e0c19f02a71756350e99977ef644ecf3e6731e9aaa80b095815f8904e88e190001fec743656426090e +SHA512 (modulemd-2.2.1.tar.xz) = cd25a2c89325324215623958e3b5143013561cddcf022f0a8467296fe842d60468bf0d6187ae49a8fb1b027ed7284929760aa34b6a1a576af6b7602f3c0de670 From ae46f72052b80ec5a90f8276f1ff4613dfecc6ca Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 27 Mar 2019 09:21:18 -0400 Subject: [PATCH 019/110] Fix meson buildrequires Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index ea6688b..88b4a3a 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -10,7 +10,7 @@ License: MIT URL: https://github.com/fedora-modularity/libmodulemd Source0: %{url}/releases/download/%{name}-%{version}/modulemd-%{version}.tar.xz -BuildRequires: meson >= 0.45.1-3 +BuildRequires: meson >= 0.47 BuildRequires: pkgconfig BuildRequires: gcc BuildRequires: gcc-c++ From a1c7344d3a48f55aaa039df482ae0c30fa053174 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 27 Mar 2019 14:45:27 -0400 Subject: [PATCH 020/110] Update to libmodulemd 2.2.2 * Add support for python2 on RHEL and Fedora < 31 * Make python subpackages archful for GObject overrides Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 73 ++++++++++++++++++++++++++++++++++++++++++------ sources | 2 +- 3 files changed, 66 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 5ba2ab2..358f1e6 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ /modulemd-2.1.0.tar.xz /modulemd-2.2.0.tar.xz /modulemd-2.2.1.tar.xz +/modulemd-2.2.2.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index 88b4a3a..7fdbe57 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,5 +1,14 @@ -%global libmodulemd_version 2.2.1 -%global libmodulemd_v1_version 1.8.4 +%global libmodulemd_version 2.2.2 +%global libmodulemd_v1_version 1.8.5 + +# Python 2 is dead on F31+ +%if 0%{fedora} < 31 + %global meson_override_flags -Dwith_py3_overrides=true -Dwith_py2_overrides=true + %global build_python2 1 +%else + %global meson_override_flags -Dwith_py3_overrides=true -Dwith_py2_overrides=false + %global build_python2 0 +%endif Name: libmodulemd Version: %{libmodulemd_version} @@ -18,27 +27,42 @@ BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) +BuildRequires: python2-devel +BuildRequires: python-gobject-base BuildRequires: python3-devel BuildRequires: python3-gobject-base %ifarch %{valgrind_arches} BuildRequires: valgrind %endif -Obsoletes: python2-modulemd < 1.3.4 -Obsoletes: python3-modulemd < 1.3.4 +# Make sure we upgrade libmodulemd1 to match +Conflicts: libmodulemd1 < %{libmodulemd_v1_version}-%{release} + # Patches + %description C Library for manipulating module metadata files. See https://github.com/fedora-modularity/libmodulemd/blob/master/README.md for more details. +%if %{build_python2} +%package -n python2-%{name} +Summary: Python 2 bindings for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python-gobject-base +Obsoletes: python2-modulemd < 1.3.4 + +%description -n python2-%{name} +Python 3 bindings for %{name} +%endif + + %package -n python3-%{name} Summary: Python 3 bindings for %{name} -BuildArch: noarch -Requires: libmodulemd = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python3-gobject-base Obsoletes: python3-modulemd < 1.3.4 @@ -80,10 +104,25 @@ RemovePathPostfixes: .compat Development files for libmodulemd 1.x +%if %{build_python2} +%package -n python2-libmodulemd1 +Summary: Python 2 bindings for %{name}1 +Version: %{libmodulemd_v1_version} +Requires: libmodulemd1 = %{libmodulemd_v1_version}-%{release} +Requires: python-gobject-base + +Obsoletes: python2-libmodulemd < 2 +Provides: python2-libmodulemd = %{libmodulemd_v1_version}-%{release} + + +%description -n python2-libmodulemd1 +Python 2 bindings for libmodulemd1 +%endif + + %package -n python3-libmodulemd1 Summary: Python 3 bindings for %{name}1 Version: %{libmodulemd_v1_version} -BuildArch: noarch Requires: libmodulemd1 = %{libmodulemd_v1_version}-%{release} Requires: python3-gobject-base @@ -99,7 +138,7 @@ Python 3 bindings for libmodulemd1 %build -%meson -Ddeveloper_build=false -Dbuild_api_v1=true -Dbuild_api_v2=true +%meson -Ddeveloper_build=false -Dbuild_api_v1=true -Dbuild_api_v2=true %{meson_override_flags} %meson_build @@ -137,7 +176,6 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_libdir}/%{name}.so.2* %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Modulemd-2.0.typelib -%{python3_sitearch}/gi/overrides/ %files devel @@ -151,7 +189,19 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-2.0/ +%if %{build_python2} +%files -n python2-%{name} +%{python2_sitearch}/gi/overrides/ +%endif + + %files -n python3-%{name} +%{python3_sitearch}/gi/overrides/ + + +%if %{build_python2} +%files -n python2-libmodulemd1 +%endif %files -n python3-libmodulemd1 @@ -177,6 +227,11 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Wed Mar 27 2019 Stephen Gallagher - 2.2.2-1 +- Update to libmodulemd 2.2.2 +- Add support for python2 on RHEL and Fedora < 31 +- Make python subpackages archful for GObject overrides + * Tue Mar 26 2019 Stephen Gallagher - 2.2.1-1 - Update to libmodulemd 2.2.1 - Fixes builds on i686 diff --git a/sources b/sources index a65dea9..3624306 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.2.1.tar.xz) = cd25a2c89325324215623958e3b5143013561cddcf022f0a8467296fe842d60468bf0d6187ae49a8fb1b027ed7284929760aa34b6a1a576af6b7602f3c0de670 +SHA512 (modulemd-2.2.2.tar.xz) = c3f28327a00196d52fa9df0b7b31367e5136b52281826d28167b618d9e051c135b174a1dc3218c1f19fc464884545d16bc86bfc57a3840a73338c002db9e38f1 From cf16e8f73e529f33d63b994c9e2fa236756b8cb3 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 27 Mar 2019 15:07:46 -0400 Subject: [PATCH 021/110] Don't run tests on armv7hl/aarch64 since they have timeout problems Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 7fdbe57..49e42fe 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -12,7 +12,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -155,9 +155,9 @@ export MMD_SKIP_VALGRIND=1 export MMD_SKIP_VALGRIND=1 %endif -# Don't run tests on armv7 for now. There are problems with +# Don't run tests on ARM for now. There are problems with # performance on the builders and often these time out. -%ifnarch %{arm} +%ifnarch %{arm} aarch64 %meson_test %endif @@ -227,6 +227,9 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Wed Mar 27 2019 Stephen Gallagher - 2.2.2-2 +- Don't run tests on armv7hl/aarch64 since they have timeout problems + * Wed Mar 27 2019 Stephen Gallagher - 2.2.2-1 - Update to libmodulemd 2.2.2 - Add support for python2 on RHEL and Fedora < 31 From a0feddd7a15d8074268b34118b3387d169597f5b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 1 Apr 2019 14:07:35 -0400 Subject: [PATCH 022/110] Update to 2.2.3 and 1.8.6 Fix header issue with ModulemdRpmMapEntry Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 12 +++++++++--- sources | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 358f1e6..887c209 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ /modulemd-2.2.0.tar.xz /modulemd-2.2.1.tar.xz /modulemd-2.2.2.tar.xz +/modulemd-2.2.3.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index 49e42fe..82a371e 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,5 +1,5 @@ -%global libmodulemd_version 2.2.2 -%global libmodulemd_v1_version 1.8.5 +%global libmodulemd_version 2.2.3 +%global libmodulemd_v1_version 1.8.6 # Python 2 is dead on F31+ %if 0%{fedora} < 31 @@ -12,7 +12,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -27,8 +27,10 @@ BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) +%if %{build_python2} BuildRequires: python2-devel BuildRequires: python-gobject-base +%endif BuildRequires: python3-devel BuildRequires: python3-gobject-base %ifarch %{valgrind_arches} @@ -227,6 +229,10 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Mon Apr 01 2019 Stephen Gallagher - 2.2.3-1 +- Update to 2.2.3 and 1.8.6 +- Fix header issue with ModulemdRpmMapEntry + * Wed Mar 27 2019 Stephen Gallagher - 2.2.2-2 - Don't run tests on armv7hl/aarch64 since they have timeout problems diff --git a/sources b/sources index 3624306..8769dca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.2.2.tar.xz) = c3f28327a00196d52fa9df0b7b31367e5136b52281826d28167b618d9e051c135b174a1dc3218c1f19fc464884545d16bc86bfc57a3840a73338c002db9e38f1 +SHA512 (modulemd-2.2.3.tar.xz) = 5a8313c95279c76c01bd0b07e4fe766eff988e44ca0d4f439f163854ba942c0bf4e881043371eb08da12826f6b54224039cd55a59220c3aefab438deaf457664 From 49160525f24624e4509ff1c9364fcdaa3565bf3c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 3 Apr 2019 08:57:21 -0400 Subject: [PATCH 023/110] Fix accidental ABI break Signed-off-by: Stephen Gallagher --- 0001-Fix-accidental-ABI-break.patch | 37 +++++++++++++++++++++++++++++ libmodulemd.spec | 6 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-accidental-ABI-break.patch diff --git a/0001-Fix-accidental-ABI-break.patch b/0001-Fix-accidental-ABI-break.patch new file mode 100644 index 0000000..f9f91a5 --- /dev/null +++ b/0001-Fix-accidental-ABI-break.patch @@ -0,0 +1,37 @@ +From bf5c2f76f6d4fe8510e8a2e1b24db72c5b53c846 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Wed, 3 Apr 2019 08:54:19 -0400 +Subject: [PATCH] Fix accidental ABI break + +When we added the .equals() functions for ModulemdDefaults and +ModulemdComponent, we did not decrease the padding value, which +resulted in the structure being enlarged. + +Signed-off-by: Stephen Gallagher +--- + modulemd/v2/include/modulemd-2.0/modulemd-defaults.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modulemd/v2/include/modulemd-2.0/modulemd-defaults.h b/modulemd/v2/include/modulemd-2.0/modulemd-defaults.h +index 4794c2f65ea1990f5dc36c80df0804e0320b7730..5da77fb2aead0f8b2c5e8d9dd667a4aaca526d52 100644 +--- a/modulemd/v2/include/modulemd-2.0/modulemd-defaults.h ++++ b/modulemd/v2/include/modulemd-2.0/modulemd-defaults.h +@@ -63,13 +63,13 @@ struct _ModulemdDefaultsClass + + guint64 (*get_mdversion) (ModulemdDefaults *self); + + gboolean (*equals) (ModulemdDefaults *self_1, ModulemdDefaults *self_2); + +- /* Padding to allow adding up to 10 new virtual functions without ++ /* Padding to allow adding up to 9 new virtual functions without + * breaking ABI. */ +- gpointer padding[10]; ++ gpointer padding[9]; + }; + + + /** + * modulemd_defaults_new: +-- +2.21.0 + diff --git a/libmodulemd.spec b/libmodulemd.spec index 82a371e..06b368b 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -12,7 +12,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -42,6 +42,7 @@ Conflicts: libmodulemd1 < %{libmodulemd_v1_version}-%{release} # Patches +Patch0001: 0001-Fix-accidental-ABI-break.patch %description @@ -229,6 +230,9 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Wed Apr 03 2019 Stephen Gallagher - 2.2.3-2 +- Fix accidental ABI break + * Mon Apr 01 2019 Stephen Gallagher - 2.2.3-1 - Update to 2.2.3 and 1.8.6 - Fix header issue with ModulemdRpmMapEntry From 1f307b7efe2b189109a25351472ba9a7ce0d9297 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 16 Apr 2019 11:40:51 -0700 Subject: [PATCH 024/110] Rebuild with Meson fix for #1699099 --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 06b368b..5e49a68 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -12,7 +12,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Module metadata manipulation library License: MIT @@ -230,6 +230,9 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Tue Apr 16 2019 Adam Williamson - 2.2.3-3 +- Rebuild with Meson fix for #1699099 + * Wed Apr 03 2019 Stephen Gallagher - 2.2.3-2 - Fix accidental ABI break From 7270c6bae75d018209cf1f2e126a60cab7d88649 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 22 Apr 2019 20:34:35 -0400 Subject: [PATCH 025/110] Update to 2.3.0 Add ModuleIndex.update_from_custom() Add ModuleIndex.dump_to_custom() Add Component.equals() Add Module.remove_streams_by_NSVCA() Fix bug with emitting lists of scalars in XMD Fix bug with deduplication in the ModuleIndexMerger Fix serious memory leak Signed-off-by: Stephen Gallagher --- .gitignore | 1 + 0001-Fix-accidental-ABI-break.patch | 37 ----------------------------- libmodulemd.spec | 20 ++++++++++++---- sources | 2 +- 4 files changed, 17 insertions(+), 43 deletions(-) delete mode 100644 0001-Fix-accidental-ABI-break.patch diff --git a/.gitignore b/.gitignore index 887c209..5da57b9 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ /modulemd-2.2.1.tar.xz /modulemd-2.2.2.tar.xz /modulemd-2.2.3.tar.xz +/modulemd-2.3.0.tar.xz diff --git a/0001-Fix-accidental-ABI-break.patch b/0001-Fix-accidental-ABI-break.patch deleted file mode 100644 index f9f91a5..0000000 --- a/0001-Fix-accidental-ABI-break.patch +++ /dev/null @@ -1,37 +0,0 @@ -From bf5c2f76f6d4fe8510e8a2e1b24db72c5b53c846 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Wed, 3 Apr 2019 08:54:19 -0400 -Subject: [PATCH] Fix accidental ABI break - -When we added the .equals() functions for ModulemdDefaults and -ModulemdComponent, we did not decrease the padding value, which -resulted in the structure being enlarged. - -Signed-off-by: Stephen Gallagher ---- - modulemd/v2/include/modulemd-2.0/modulemd-defaults.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modulemd/v2/include/modulemd-2.0/modulemd-defaults.h b/modulemd/v2/include/modulemd-2.0/modulemd-defaults.h -index 4794c2f65ea1990f5dc36c80df0804e0320b7730..5da77fb2aead0f8b2c5e8d9dd667a4aaca526d52 100644 ---- a/modulemd/v2/include/modulemd-2.0/modulemd-defaults.h -+++ b/modulemd/v2/include/modulemd-2.0/modulemd-defaults.h -@@ -63,13 +63,13 @@ struct _ModulemdDefaultsClass - - guint64 (*get_mdversion) (ModulemdDefaults *self); - - gboolean (*equals) (ModulemdDefaults *self_1, ModulemdDefaults *self_2); - -- /* Padding to allow adding up to 10 new virtual functions without -+ /* Padding to allow adding up to 9 new virtual functions without - * breaking ABI. */ -- gpointer padding[10]; -+ gpointer padding[9]; - }; - - - /** - * modulemd_defaults_new: --- -2.21.0 - diff --git a/libmodulemd.spec b/libmodulemd.spec index 5e49a68..d819cd7 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,5 +1,5 @@ -%global libmodulemd_version 2.2.3 -%global libmodulemd_v1_version 1.8.6 +%global libmodulemd_version 2.3.0 +%global libmodulemd_v1_version 1.8.7 # Python 2 is dead on F31+ %if 0%{fedora} < 31 @@ -12,7 +12,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -42,7 +42,6 @@ Conflicts: libmodulemd1 < %{libmodulemd_v1_version}-%{release} # Patches -Patch0001: 0001-Fix-accidental-ABI-break.patch %description @@ -56,10 +55,11 @@ more details. Summary: Python 2 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python-gobject-base +Requires: python-six Obsoletes: python2-modulemd < 1.3.4 %description -n python2-%{name} -Python 3 bindings for %{name} +Python 2 bindings for %{name} %endif @@ -67,6 +67,7 @@ Python 3 bindings for %{name} Summary: Python 3 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python3-gobject-base +Requires: %{py3_dist six} Obsoletes: python3-modulemd < 1.3.4 %description -n python3-%{name} @@ -230,6 +231,15 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Mon Apr 22 2019 Stephen Gallagher - 2.3.0-1 +- Add ModuleIndex.update_from_custom() +- Add ModuleIndex.dump_to_custom() +- Add Component.equals() +- Add Module.remove_streams_by_NSVCA() +- Fix bug with emitting lists of scalars in XMD +- Fix bug with deduplication in the ModuleIndexMerger +- Fix serious memory leak + * Tue Apr 16 2019 Adam Williamson - 2.2.3-3 - Rebuild with Meson fix for #1699099 diff --git a/sources b/sources index 8769dca..a035103 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.2.3.tar.xz) = 5a8313c95279c76c01bd0b07e4fe766eff988e44ca0d4f439f163854ba942c0bf4e881043371eb08da12826f6b54224039cd55a59220c3aefab438deaf457664 +SHA512 (modulemd-2.3.0.tar.xz) = b34328332c14175616e18c8c74750d5e77fca2b502c31d94242cb496d414ab9642ec5b88fc7a4232229d9c6b386589a11cacb4df5c2288a968fc116e80294dd4 From dc05c6f9b822c4b53d7b1d7fbdaa74a001857382 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 3 May 2019 08:34:25 -0400 Subject: [PATCH 026/110] Update to 2.3.1 - Make Modulemd.Component.set_*() functions accept NULL - Fix segmentation fault in XMD code due to improper memory management - Fix incompatibility in python2-libmodulemd GObject overrides - Fix assorted documentation issues Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 11 +++++++++-- sources | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5da57b9..6529df7 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ /modulemd-2.2.2.tar.xz /modulemd-2.2.3.tar.xz /modulemd-2.3.0.tar.xz +/modulemd-2.3.1.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index d819cd7..e53f2f7 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,5 +1,5 @@ -%global libmodulemd_version 2.3.0 -%global libmodulemd_v1_version 1.8.7 +%global libmodulemd_version 2.3.1 +%global libmodulemd_v1_version 1.8.8 # Python 2 is dead on F31+ %if 0%{fedora} < 31 @@ -231,6 +231,13 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Fri May 03 2019 Stephen Gallagher - 2.3.1-1 +- Update to 2.3.1 +- Make Modulemd.Component.set_*() functions accept NULL +- Fix segmentation fault in XMD code due to improper memory management +- Fix incompatibility in python2-libmodulemd GObject overrides +- Fix assorted documentation issues + * Mon Apr 22 2019 Stephen Gallagher - 2.3.0-1 - Add ModuleIndex.update_from_custom() - Add ModuleIndex.dump_to_custom() diff --git a/sources b/sources index a035103..e61f3bd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.3.0.tar.xz) = b34328332c14175616e18c8c74750d5e77fca2b502c31d94242cb496d414ab9642ec5b88fc7a4232229d9c6b386589a11cacb4df5c2288a968fc116e80294dd4 +SHA512 (modulemd-2.3.1.tar.xz) = 84730cf1cf7061e25ed60bf43bc89b5cdf1f53bb58c51187330bd44f2009e63f360e7073d937bb207a3c2dca9880aebd6d9f2de2c5d38a9d223bb395bfd03acd From 7bd30467bd386866cedbf595f2cf379753e3710c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 13 May 2019 10:04:19 -0400 Subject: [PATCH 027/110] Update to 2.4.0 and 1.8.10 - Add ModuleStreamV2.clear_dependencies() and .remove_dependencies() - Fix bugs and memory issues with the XMD python bindings - Assorted documentation enhancements Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 12 +++++++++--- sources | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6529df7..ebd7d54 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ /modulemd-2.2.3.tar.xz /modulemd-2.3.0.tar.xz /modulemd-2.3.1.tar.xz +/modulemd-2.4.0.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index e53f2f7..b0e60c1 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,8 +1,8 @@ -%global libmodulemd_version 2.3.1 -%global libmodulemd_v1_version 1.8.8 +%global libmodulemd_version 2.4.0 +%global libmodulemd_v1_version 1.8.10 # Python 2 is dead on F31+ -%if 0%{fedora} < 31 +%if ( 0%{?fedora} && 0%{?fedora} <= 30 ) || ( 0%{?rhel} && 0%{?rhel} <= 7) %global meson_override_flags -Dwith_py3_overrides=true -Dwith_py2_overrides=true %global build_python2 1 %else @@ -231,6 +231,12 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Mon May 13 2019 Stephen Gallagher - 2.4.0-1 +- Update to 2.4.0 and 1.8.10 +- Add ModuleStreamV2.clear_dependencies() and .remove_dependencies() +- Fix bugs and memory issues with the XMD python bindings +- Assorted documentation enhancements + * Fri May 03 2019 Stephen Gallagher - 2.3.1-1 - Update to 2.3.1 - Make Modulemd.Component.set_*() functions accept NULL diff --git a/sources b/sources index e61f3bd..b2313fb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.3.1.tar.xz) = 84730cf1cf7061e25ed60bf43bc89b5cdf1f53bb58c51187330bd44f2009e63f360e7073d937bb207a3c2dca9880aebd6d9f2de2c5d38a9d223bb395bfd03acd +SHA512 (modulemd-2.4.0.tar.xz) = d2c93d274bf3bae291bea8f5ce99138e6a457c2045e14c219c0fa00d0a27e83b0ff60d1e920e561102e60898706eba02c28e86ace40825483476782a620f2daa From fef22fef99e98416dcdda15eeb1ecb43701e4fb5 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 22 May 2019 16:58:38 -0400 Subject: [PATCH 028/110] Update to 2.5.0 and 1.8.11 Ensure that XMD is always emitted in the same order Add .clear_*() functions for all .add_*() functions Add ModuleStream.equals() Add ModuleIndex.get_default_streams() Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 11 +++++++++-- sources | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ebd7d54..d36b077 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ /modulemd-2.3.0.tar.xz /modulemd-2.3.1.tar.xz /modulemd-2.4.0.tar.xz +/modulemd-2.5.0.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index b0e60c1..5cbd9ad 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,5 +1,5 @@ -%global libmodulemd_version 2.4.0 -%global libmodulemd_v1_version 1.8.10 +%global libmodulemd_version 2.5.0 +%global libmodulemd_v1_version 1.8.11 # Python 2 is dead on F31+ %if ( 0%{?fedora} && 0%{?fedora} <= 30 ) || ( 0%{?rhel} && 0%{?rhel} <= 7) @@ -231,6 +231,13 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Wed May 22 2019 Stephen Gallagher - 2.5.0-1 +- Update to 2.5.0 and 1.8.11 +- Ensure that XMD is always emitted in the same order +- Add .clear_*() functions for all .add_*() functions +- Add ModuleStream.equals() +- Add ModuleIndex.get_default_streams() + * Mon May 13 2019 Stephen Gallagher - 2.4.0-1 - Update to 2.4.0 and 1.8.10 - Add ModuleStreamV2.clear_dependencies() and .remove_dependencies() diff --git a/sources b/sources index b2313fb..7c3cf5f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.4.0.tar.xz) = d2c93d274bf3bae291bea8f5ce99138e6a457c2045e14c219c0fa00d0a27e83b0ff60d1e920e561102e60898706eba02c28e86ace40825483476782a620f2daa +SHA512 (modulemd-2.5.0.tar.xz) = 78e9a523cbe0fccf4a39c3824397a4383eec58d688558f44dc05d4c34cce3b08b307b489ea8d68403607fb9f11efad76dd2bbbecfae6a102c0929acb95d05c65 From 9ada74e700421fe02cf992641126075378954bc6 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 29 May 2019 16:34:09 -0400 Subject: [PATCH 029/110] Fix memory issue with Module.search_streams() in the python bindings Signed-off-by: Stephen Gallagher --- 0001-Double-valgrind-timeout.patch | 29 ++++ 0002-Parallelize-the-valgrind-tests.patch | 136 ++++++++++++++++ ...nsfer-type-for-Module.search_streams.patch | 150 ++++++++++++++++++ 0004-Extend-timeout-for-header-test.patch | 31 ++++ libmodulemd.spec | 9 +- 5 files changed, 354 insertions(+), 1 deletion(-) create mode 100644 0001-Double-valgrind-timeout.patch create mode 100644 0002-Parallelize-the-valgrind-tests.patch create mode 100644 0003-Fix-transfer-type-for-Module.search_streams.patch create mode 100644 0004-Extend-timeout-for-header-test.patch diff --git a/0001-Double-valgrind-timeout.patch b/0001-Double-valgrind-timeout.patch new file mode 100644 index 0000000..e7f128a --- /dev/null +++ b/0001-Double-valgrind-timeout.patch @@ -0,0 +1,29 @@ +From 1a7bf143761ff8e3f4f6585b82c0be4dbd511fca Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Thu, 23 May 2019 14:00:36 -0400 +Subject: [PATCH 1/3] Double valgrind timeout + +On some architectures under heavy load, the valgrind check on v2 +is taking a long time. + +Signed-off-by: Stephen Gallagher +--- + modulemd/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modulemd/meson.build b/modulemd/meson.build +index 47bd1f58e6401d2634d8ff737c2b347f5ebc6bf5..e49c7a9df76dcf37a18ddeba3150d6c914aa4e25 100644 +--- a/modulemd/meson.build ++++ b/modulemd/meson.build +@@ -313,7 +313,7 @@ endif + if valgrind.found() + modulemd_valgrind_scripts = files('common/tests/test-valgrind.py') + test ('valgrind', python3, + env : test_env, + args : modulemd_valgrind_scripts, +- timeout : 600) ++ timeout : 1200) + endif +-- +2.21.0 + diff --git a/0002-Parallelize-the-valgrind-tests.patch b/0002-Parallelize-the-valgrind-tests.patch new file mode 100644 index 0000000..ba160a5 --- /dev/null +++ b/0002-Parallelize-the-valgrind-tests.patch @@ -0,0 +1,136 @@ +From d9b41f72d4b2d545b2600aff7bd8a27ed0093750 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Wed, 29 May 2019 11:33:57 -0400 +Subject: [PATCH 2/3] Parallelize the valgrind tests + +This considerably reduces the time needed to perform the valgrind +memory tests on systems with multiple available processors. In the +case of my laptop, the duration was reduced from ~200s to 90s. + +Signed-off-by: Stephen Gallagher +--- + modulemd/common/tests/test-valgrind.py | 74 ++++++++++++++------------ + 1 file changed, 41 insertions(+), 33 deletions(-) + +diff --git a/modulemd/common/tests/test-valgrind.py b/modulemd/common/tests/test-valgrind.py +index 9be72c705fde79aa305d831eaa4f31f7e2cc663f..9349749658ccca0529776f3d534664d614c1cb4d 100644 +--- a/modulemd/common/tests/test-valgrind.py ++++ b/modulemd/common/tests/test-valgrind.py +@@ -16,13 +16,16 @@ import os + import sys + import subprocess + import tempfile + import xml.etree.ElementTree as ET + ++from multiprocessing import Pool, TimeoutError ++ + if os.getenv('MMD_SKIP_VALGRIND'): + sys.exit(77) + ++ + failed = False + + # Get the list of tests to run + proc_result = subprocess.run(['meson', 'test', '--list'], + stdout=subprocess.PIPE, +@@ -47,13 +50,13 @@ for test in unfiltered_tests: + test == 'test_dirty_repo' or + test == 'valgrind'): + continue + tests.append(test) + ++ + with tempfile.TemporaryDirectory(prefix="libmodulemd_valgrind_") as tmpdirname: +- for test in tests: +- # TODO: auto-detect the location of the suppression file ++ def exec_valgrind(test): + valgrind_command = "/usr/bin/valgrind " \ + "--leak-check=full " \ + "--suppressions=/usr/share/glib-2.0/valgrind/glib.supp " \ + "--xml=yes " \ + "--xml-file=%s/%s.xml " % (tmpdirname, test) +@@ -64,45 +67,50 @@ with tempfile.TemporaryDirectory(prefix="libmodulemd_valgrind_") as tmpdirname: + '-t', '10', + '--logbase=%s' % test, + '--wrap=%s' % valgrind_command, + test]) + +- if proc_result.returncode != 0: +- print("Valgrind exited with an error on %s" % test, +- file=sys.stderr) +- failed = True +- continue ++ return proc_result.returncode, test + +- # Process the XML for leaks +- tree = ET.parse('%s/%s.xml' % (tmpdirname, test)) +- root = tree.getroot() ++ with Pool() as pool: ++ for returncode, test in pool.map(exec_valgrind, tests): ++ if returncode != 0: ++ print("Valgrind exited with an error on %s" % test, ++ file=sys.stderr) ++ failed = True ++ continue + +- for root_child in root: +- if (root_child.tag == "error"): +- for error_child in root_child: +- if error_child.tag == 'kind': +- if error_child.text == 'Leak_DefinitelyLost': +- print("Memory leak detected in %s" % test, +- file=sys.stderr) +- failed = True ++ # Process the XML for leaks ++ tree = ET.parse('%s/%s.xml' % (tmpdirname, test)) ++ root = tree.getroot() + +- elif error_child.text == 'InvalidFree': +- print("Invalid free() detected in %s" % test, +- file=sys.stderr) +- failed = True ++ for root_child in root: ++ if (root_child.tag == "error"): ++ for error_child in root_child: ++ if error_child.tag == 'kind': ++ if error_child.text == 'Leak_DefinitelyLost': ++ print("Memory leak detected in %s" % test, ++ file=sys.stderr) ++ failed = True + +- elif error_child.text == 'InvalidRead': +- print("Invalid read detected in %s" % test, +- file=sys.stderr) +- failed = True ++ elif error_child.text == 'InvalidFree': ++ print("Invalid free() detected in %s" % test, ++ file=sys.stderr) ++ failed = True + +- elif error_child.text == 'UninitCondition': +- print("Uninitialized usage detected in %s" % test, +- file=sys.stderr) +- failed = True +- if failed: +- with open('%s/%s.xml' % (tmpdirname, test), 'r') as xml: +- print(xml.read()) ++ elif error_child.text == 'InvalidRead': ++ print("Invalid read detected in %s" % test, ++ file=sys.stderr) ++ failed = True ++ ++ elif error_child.text == 'UninitCondition': ++ print( ++ "Uninitialized usage detected in %s" % ++ test, file=sys.stderr) ++ failed = True ++ if failed: ++ with open('%s/%s.xml' % (tmpdirname, test), 'r') as xml: ++ print(xml.read()) + + + if failed: + sys.exit(1) +-- +2.21.0 + diff --git a/0003-Fix-transfer-type-for-Module.search_streams.patch b/0003-Fix-transfer-type-for-Module.search_streams.patch new file mode 100644 index 0000000..40ba286 --- /dev/null +++ b/0003-Fix-transfer-type-for-Module.search_streams.patch @@ -0,0 +1,150 @@ +From 340e316bd6384562086b4e381c8cd42b1ccd0781 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Tue, 28 May 2019 14:28:30 -0400 +Subject: [PATCH 3/3] Fix transfer type for Module.search_streams() + +Technically this is an API-breaking change, but no one is using it +yet and it was always expected to be managed this way. + +Fixes: https://github.com/fedora-modularity/libmodulemd/issues/308 + +Signed-off-by: Stephen Gallagher +--- + modulemd/meson.build | 1 + + .../v2/include/modulemd-2.0/modulemd-module.h | 4 +- + modulemd/v2/meson.build | 17 ++++++- + modulemd/v2/tests/ModulemdTests/module.py | 46 +++++++++++++++++++ + 4 files changed, 65 insertions(+), 3 deletions(-) + create mode 100644 modulemd/v2/tests/ModulemdTests/module.py + +diff --git a/modulemd/meson.build b/modulemd/meson.build +index e49c7a9df76dcf37a18ddeba3150d6c914aa4e25..e5912d4041ba3e427d13b98c0eeca5217d48244b 100644 +--- a/modulemd/meson.build ++++ b/modulemd/meson.build +@@ -229,10 +229,11 @@ test_v2_python_scripts = files( + 'v2/tests/ModulemdTests/componentrpm.py', + 'v2/tests/ModulemdTests/defaults.py', + 'v2/tests/ModulemdTests/defaultsv1.py', + 'v2/tests/ModulemdTests/dependencies.py', + 'v2/tests/ModulemdTests/merger.py', ++ 'v2/tests/ModulemdTests/module.py', + 'v2/tests/ModulemdTests/moduleindex.py', + 'v2/tests/ModulemdTests/modulestream.py', + 'v2/tests/ModulemdTests/profile.py', + 'v2/tests/ModulemdTests/rpmmap.py', + 'v2/tests/ModulemdTests/servicelevel.py', +diff --git a/modulemd/v2/include/modulemd-2.0/modulemd-module.h b/modulemd/v2/include/modulemd-2.0/modulemd-module.h +index 45be9c0ae96e203707da61d84f18c71c4a826035..0219cfe227652813d20bdf736f9033782084c5ad 100644 +--- a/modulemd/v2/include/modulemd-2.0/modulemd-module.h ++++ b/modulemd/v2/include/modulemd-2.0/modulemd-module.h +@@ -129,12 +129,12 @@ modulemd_module_get_stream_by_NSVC (ModulemdModule *self, + * @context: (nullable): The context of the stream to retrieve. If NULL, the + * context is not included in the search. + * @arch: (nullable): The processor architecture of the stream to retrieve. If + * NULL, the architecture is not included in the search. + * +- * Returns: (transfer full) (element-type ModulemdModuleStream): The list of +- * stream objects matching the requested parameters. This function cannot ++ * Returns: (transfer container) (element-type ModulemdModuleStream): The list ++ * of stream objects matching the requested parameters. This function cannot + * fail, but it may return a zero-length list if no matches were found. The + * returned streams will be in a predictable order, sorted first by stream + * name, then by version (highest to lowest), then by context and finally by + * architecture. + * +diff --git a/modulemd/v2/meson.build b/modulemd/v2/meson.build +index 3f45db2c4e0e9a8996c74dffd949d5276082dc6f..e8a5a38f0528c4f860f0b84ef63609ff5fd89caa 100644 +--- a/modulemd/v2/meson.build ++++ b/modulemd/v2/meson.build +@@ -390,20 +390,35 @@ test ('dependencies_python2_debug', python2, + args : dependencies_python_script) + test ('dependencies_python2_release', python2, + env : py_test_release_env, + args : dependencies_python_script) + ++# -- Test Modulemd.Module (Python) -- # ++module_python_script = files('tests/ModulemdTests/module.py') ++test ('module_python3_debug', python3, ++ env : py_test_env, ++ args : module_python_script) ++test ('module_python3_release', python3, ++ env : py_test_release_env, ++ args : module_python_script) ++ ++test ('module_python2_debug', python2, ++ env : py_test_env, ++ args : module_python_script) ++test ('module_python2_release', python2, ++ env : py_test_release_env, ++ args : module_python_script) ++ + # -- Test Modulemd.ModuleIndex (Python) -- # + moduleindex_python_script = files('tests/ModulemdTests/moduleindex.py') + test ('moduleindex_python3_debug', python3, + env : py_test_env, + args : moduleindex_python_script) + test ('moduleindex_python3_release', python3, + env : py_test_release_env, + args : moduleindex_python_script) + +-moduleindex_python_script = files('tests/ModulemdTests/moduleindex.py') + test ('moduleindex_python2_debug', python2, + env : py_test_env, + args : moduleindex_python_script) + test ('moduleindex_python2_release', python2, + env : py_test_release_env, +diff --git a/modulemd/v2/tests/ModulemdTests/module.py b/modulemd/v2/tests/ModulemdTests/module.py +new file mode 100644 +index 0000000000000000000000000000000000000000..b604d9c9b357c4a5211d3ba5b4d0aba08c3a42bd +--- /dev/null ++++ b/modulemd/v2/tests/ModulemdTests/module.py +@@ -0,0 +1,46 @@ ++#!/usr/bin/python3 ++ ++# This file is part of libmodulemd ++# Copyright (C) 2017-2018 Stephen Gallagher ++# ++# Fedora-License-Identifier: MIT ++# SPDX-2.0-License-Identifier: MIT ++# SPDX-3.0-License-Identifier: MIT ++# ++# This program is free software. ++# For more information on the license, see COPYING. ++# For more information on free software, see ++# . ++ ++from os import path ++import sys ++try: ++ import unittest ++ import gi ++ gi.require_version('Modulemd', '2.0') ++ from gi.repository import Modulemd ++ from gi.repository.Modulemd import ModuleIndex ++ from gi.repository import GLib ++except ImportError: ++ # Return error 77 to skip this test on platforms without the necessary ++ # python modules ++ sys.exit(77) ++ ++from base import TestBase ++ ++ ++class TestModule(TestBase): ++ ++ def test_search_streams(self): ++ idx = Modulemd.ModuleIndex.new() ++ idx.update_from_file(path.join(self.source_root, ++ "modulemd/v2/tests/test_data/f29.yaml"), ++ True) ++ module = idx.get_module('nodejs') ++ ++ self.assertEquals(len(module.search_streams('8', 0)), 1) ++ self.assertEquals(len(module.search_streams('10', 0)), 1) ++ ++ ++if __name__ == '__main__': ++ unittest.main() +-- +2.21.0 + diff --git a/0004-Extend-timeout-for-header-test.patch b/0004-Extend-timeout-for-header-test.patch new file mode 100644 index 0000000..b4ba12c --- /dev/null +++ b/0004-Extend-timeout-for-header-test.patch @@ -0,0 +1,31 @@ +From 82e56d78e46504aab5917b606eae67e1a3b54603 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Wed, 29 May 2019 16:18:30 -0400 +Subject: [PATCH 4/4] Extend timeout for header test + +Signed-off-by: Stephen Gallagher +--- + modulemd/meson.build | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modulemd/meson.build b/modulemd/meson.build +index e5912d4041ba3e427d13b98c0eeca5217d48244b..0741736a12b4457559ade0a5372ff4b25743fce3 100644 +--- a/modulemd/meson.build ++++ b/modulemd/meson.build +@@ -306,11 +306,12 @@ endif + if build_api_v2 + subdir('v2') + import_header_script = find_program('common/tests/test-import-headers.sh') + test ('test_v2_import_headers', import_header_script, + env : test_env, +- args : modulemd_v2_hdrs) ++ args : modulemd_v2_hdrs, ++ timeout : 300) + endif + + if valgrind.found() + modulemd_valgrind_scripts = files('common/tests/test-valgrind.py') + test ('valgrind', python3, +-- +2.21.0 + diff --git a/libmodulemd.spec b/libmodulemd.spec index 5cbd9ad..eb136d9 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -12,7 +12,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -42,6 +42,10 @@ Conflicts: libmodulemd1 < %{libmodulemd_v1_version}-%{release} # Patches +Patch0001: 0001-Double-valgrind-timeout.patch +Patch0002: 0002-Parallelize-the-valgrind-tests.patch +Patch0003: 0003-Fix-transfer-type-for-Module.search_streams.patch +Patch0004: 0004-Extend-timeout-for-header-test.patch %description @@ -231,6 +235,9 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Wed May 29 2019 Stephen Gallagher - 2.5.0-2 +- Fix memory issue with Module.search_streams() in the python bindings + * Wed May 22 2019 Stephen Gallagher - 2.5.0-1 - Update to 2.5.0 and 1.8.11 - Ensure that XMD is always emitted in the same order From 82042cbbaf6bbe0f2622ced05d70d39d91ac4d5c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 3 Jul 2019 16:33:18 -0400 Subject: [PATCH 030/110] Update to 2.6.0 - Update to 2.6.0 - New function ModuleIndexMerger.resolve_ext() allowing for strict merging - Profile.get_description() now properly returns available translations - Numerous documentation fixes - Test improvements Signed-off-by: Stephen Gallagher --- .gitignore | 1 + 0001-Double-valgrind-timeout.patch | 29 ---- 0002-Parallelize-the-valgrind-tests.patch | 136 ---------------- ...nsfer-type-for-Module.search_streams.patch | 150 ------------------ 0004-Extend-timeout-for-header-test.patch | 31 ---- libmodulemd.spec | 17 +- sources | 2 +- 7 files changed, 12 insertions(+), 354 deletions(-) delete mode 100644 0001-Double-valgrind-timeout.patch delete mode 100644 0002-Parallelize-the-valgrind-tests.patch delete mode 100644 0003-Fix-transfer-type-for-Module.search_streams.patch delete mode 100644 0004-Extend-timeout-for-header-test.patch diff --git a/.gitignore b/.gitignore index d36b077..ba892d4 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ /modulemd-2.3.1.tar.xz /modulemd-2.4.0.tar.xz /modulemd-2.5.0.tar.xz +/modulemd-2.6.0.tar.xz diff --git a/0001-Double-valgrind-timeout.patch b/0001-Double-valgrind-timeout.patch deleted file mode 100644 index e7f128a..0000000 --- a/0001-Double-valgrind-timeout.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1a7bf143761ff8e3f4f6585b82c0be4dbd511fca Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Thu, 23 May 2019 14:00:36 -0400 -Subject: [PATCH 1/3] Double valgrind timeout - -On some architectures under heavy load, the valgrind check on v2 -is taking a long time. - -Signed-off-by: Stephen Gallagher ---- - modulemd/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modulemd/meson.build b/modulemd/meson.build -index 47bd1f58e6401d2634d8ff737c2b347f5ebc6bf5..e49c7a9df76dcf37a18ddeba3150d6c914aa4e25 100644 ---- a/modulemd/meson.build -+++ b/modulemd/meson.build -@@ -313,7 +313,7 @@ endif - if valgrind.found() - modulemd_valgrind_scripts = files('common/tests/test-valgrind.py') - test ('valgrind', python3, - env : test_env, - args : modulemd_valgrind_scripts, -- timeout : 600) -+ timeout : 1200) - endif --- -2.21.0 - diff --git a/0002-Parallelize-the-valgrind-tests.patch b/0002-Parallelize-the-valgrind-tests.patch deleted file mode 100644 index ba160a5..0000000 --- a/0002-Parallelize-the-valgrind-tests.patch +++ /dev/null @@ -1,136 +0,0 @@ -From d9b41f72d4b2d545b2600aff7bd8a27ed0093750 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Wed, 29 May 2019 11:33:57 -0400 -Subject: [PATCH 2/3] Parallelize the valgrind tests - -This considerably reduces the time needed to perform the valgrind -memory tests on systems with multiple available processors. In the -case of my laptop, the duration was reduced from ~200s to 90s. - -Signed-off-by: Stephen Gallagher ---- - modulemd/common/tests/test-valgrind.py | 74 ++++++++++++++------------ - 1 file changed, 41 insertions(+), 33 deletions(-) - -diff --git a/modulemd/common/tests/test-valgrind.py b/modulemd/common/tests/test-valgrind.py -index 9be72c705fde79aa305d831eaa4f31f7e2cc663f..9349749658ccca0529776f3d534664d614c1cb4d 100644 ---- a/modulemd/common/tests/test-valgrind.py -+++ b/modulemd/common/tests/test-valgrind.py -@@ -16,13 +16,16 @@ import os - import sys - import subprocess - import tempfile - import xml.etree.ElementTree as ET - -+from multiprocessing import Pool, TimeoutError -+ - if os.getenv('MMD_SKIP_VALGRIND'): - sys.exit(77) - -+ - failed = False - - # Get the list of tests to run - proc_result = subprocess.run(['meson', 'test', '--list'], - stdout=subprocess.PIPE, -@@ -47,13 +50,13 @@ for test in unfiltered_tests: - test == 'test_dirty_repo' or - test == 'valgrind'): - continue - tests.append(test) - -+ - with tempfile.TemporaryDirectory(prefix="libmodulemd_valgrind_") as tmpdirname: -- for test in tests: -- # TODO: auto-detect the location of the suppression file -+ def exec_valgrind(test): - valgrind_command = "/usr/bin/valgrind " \ - "--leak-check=full " \ - "--suppressions=/usr/share/glib-2.0/valgrind/glib.supp " \ - "--xml=yes " \ - "--xml-file=%s/%s.xml " % (tmpdirname, test) -@@ -64,45 +67,50 @@ with tempfile.TemporaryDirectory(prefix="libmodulemd_valgrind_") as tmpdirname: - '-t', '10', - '--logbase=%s' % test, - '--wrap=%s' % valgrind_command, - test]) - -- if proc_result.returncode != 0: -- print("Valgrind exited with an error on %s" % test, -- file=sys.stderr) -- failed = True -- continue -+ return proc_result.returncode, test - -- # Process the XML for leaks -- tree = ET.parse('%s/%s.xml' % (tmpdirname, test)) -- root = tree.getroot() -+ with Pool() as pool: -+ for returncode, test in pool.map(exec_valgrind, tests): -+ if returncode != 0: -+ print("Valgrind exited with an error on %s" % test, -+ file=sys.stderr) -+ failed = True -+ continue - -- for root_child in root: -- if (root_child.tag == "error"): -- for error_child in root_child: -- if error_child.tag == 'kind': -- if error_child.text == 'Leak_DefinitelyLost': -- print("Memory leak detected in %s" % test, -- file=sys.stderr) -- failed = True -+ # Process the XML for leaks -+ tree = ET.parse('%s/%s.xml' % (tmpdirname, test)) -+ root = tree.getroot() - -- elif error_child.text == 'InvalidFree': -- print("Invalid free() detected in %s" % test, -- file=sys.stderr) -- failed = True -+ for root_child in root: -+ if (root_child.tag == "error"): -+ for error_child in root_child: -+ if error_child.tag == 'kind': -+ if error_child.text == 'Leak_DefinitelyLost': -+ print("Memory leak detected in %s" % test, -+ file=sys.stderr) -+ failed = True - -- elif error_child.text == 'InvalidRead': -- print("Invalid read detected in %s" % test, -- file=sys.stderr) -- failed = True -+ elif error_child.text == 'InvalidFree': -+ print("Invalid free() detected in %s" % test, -+ file=sys.stderr) -+ failed = True - -- elif error_child.text == 'UninitCondition': -- print("Uninitialized usage detected in %s" % test, -- file=sys.stderr) -- failed = True -- if failed: -- with open('%s/%s.xml' % (tmpdirname, test), 'r') as xml: -- print(xml.read()) -+ elif error_child.text == 'InvalidRead': -+ print("Invalid read detected in %s" % test, -+ file=sys.stderr) -+ failed = True -+ -+ elif error_child.text == 'UninitCondition': -+ print( -+ "Uninitialized usage detected in %s" % -+ test, file=sys.stderr) -+ failed = True -+ if failed: -+ with open('%s/%s.xml' % (tmpdirname, test), 'r') as xml: -+ print(xml.read()) - - - if failed: - sys.exit(1) --- -2.21.0 - diff --git a/0003-Fix-transfer-type-for-Module.search_streams.patch b/0003-Fix-transfer-type-for-Module.search_streams.patch deleted file mode 100644 index 40ba286..0000000 --- a/0003-Fix-transfer-type-for-Module.search_streams.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 340e316bd6384562086b4e381c8cd42b1ccd0781 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Tue, 28 May 2019 14:28:30 -0400 -Subject: [PATCH 3/3] Fix transfer type for Module.search_streams() - -Technically this is an API-breaking change, but no one is using it -yet and it was always expected to be managed this way. - -Fixes: https://github.com/fedora-modularity/libmodulemd/issues/308 - -Signed-off-by: Stephen Gallagher ---- - modulemd/meson.build | 1 + - .../v2/include/modulemd-2.0/modulemd-module.h | 4 +- - modulemd/v2/meson.build | 17 ++++++- - modulemd/v2/tests/ModulemdTests/module.py | 46 +++++++++++++++++++ - 4 files changed, 65 insertions(+), 3 deletions(-) - create mode 100644 modulemd/v2/tests/ModulemdTests/module.py - -diff --git a/modulemd/meson.build b/modulemd/meson.build -index e49c7a9df76dcf37a18ddeba3150d6c914aa4e25..e5912d4041ba3e427d13b98c0eeca5217d48244b 100644 ---- a/modulemd/meson.build -+++ b/modulemd/meson.build -@@ -229,10 +229,11 @@ test_v2_python_scripts = files( - 'v2/tests/ModulemdTests/componentrpm.py', - 'v2/tests/ModulemdTests/defaults.py', - 'v2/tests/ModulemdTests/defaultsv1.py', - 'v2/tests/ModulemdTests/dependencies.py', - 'v2/tests/ModulemdTests/merger.py', -+ 'v2/tests/ModulemdTests/module.py', - 'v2/tests/ModulemdTests/moduleindex.py', - 'v2/tests/ModulemdTests/modulestream.py', - 'v2/tests/ModulemdTests/profile.py', - 'v2/tests/ModulemdTests/rpmmap.py', - 'v2/tests/ModulemdTests/servicelevel.py', -diff --git a/modulemd/v2/include/modulemd-2.0/modulemd-module.h b/modulemd/v2/include/modulemd-2.0/modulemd-module.h -index 45be9c0ae96e203707da61d84f18c71c4a826035..0219cfe227652813d20bdf736f9033782084c5ad 100644 ---- a/modulemd/v2/include/modulemd-2.0/modulemd-module.h -+++ b/modulemd/v2/include/modulemd-2.0/modulemd-module.h -@@ -129,12 +129,12 @@ modulemd_module_get_stream_by_NSVC (ModulemdModule *self, - * @context: (nullable): The context of the stream to retrieve. If NULL, the - * context is not included in the search. - * @arch: (nullable): The processor architecture of the stream to retrieve. If - * NULL, the architecture is not included in the search. - * -- * Returns: (transfer full) (element-type ModulemdModuleStream): The list of -- * stream objects matching the requested parameters. This function cannot -+ * Returns: (transfer container) (element-type ModulemdModuleStream): The list -+ * of stream objects matching the requested parameters. This function cannot - * fail, but it may return a zero-length list if no matches were found. The - * returned streams will be in a predictable order, sorted first by stream - * name, then by version (highest to lowest), then by context and finally by - * architecture. - * -diff --git a/modulemd/v2/meson.build b/modulemd/v2/meson.build -index 3f45db2c4e0e9a8996c74dffd949d5276082dc6f..e8a5a38f0528c4f860f0b84ef63609ff5fd89caa 100644 ---- a/modulemd/v2/meson.build -+++ b/modulemd/v2/meson.build -@@ -390,20 +390,35 @@ test ('dependencies_python2_debug', python2, - args : dependencies_python_script) - test ('dependencies_python2_release', python2, - env : py_test_release_env, - args : dependencies_python_script) - -+# -- Test Modulemd.Module (Python) -- # -+module_python_script = files('tests/ModulemdTests/module.py') -+test ('module_python3_debug', python3, -+ env : py_test_env, -+ args : module_python_script) -+test ('module_python3_release', python3, -+ env : py_test_release_env, -+ args : module_python_script) -+ -+test ('module_python2_debug', python2, -+ env : py_test_env, -+ args : module_python_script) -+test ('module_python2_release', python2, -+ env : py_test_release_env, -+ args : module_python_script) -+ - # -- Test Modulemd.ModuleIndex (Python) -- # - moduleindex_python_script = files('tests/ModulemdTests/moduleindex.py') - test ('moduleindex_python3_debug', python3, - env : py_test_env, - args : moduleindex_python_script) - test ('moduleindex_python3_release', python3, - env : py_test_release_env, - args : moduleindex_python_script) - --moduleindex_python_script = files('tests/ModulemdTests/moduleindex.py') - test ('moduleindex_python2_debug', python2, - env : py_test_env, - args : moduleindex_python_script) - test ('moduleindex_python2_release', python2, - env : py_test_release_env, -diff --git a/modulemd/v2/tests/ModulemdTests/module.py b/modulemd/v2/tests/ModulemdTests/module.py -new file mode 100644 -index 0000000000000000000000000000000000000000..b604d9c9b357c4a5211d3ba5b4d0aba08c3a42bd ---- /dev/null -+++ b/modulemd/v2/tests/ModulemdTests/module.py -@@ -0,0 +1,46 @@ -+#!/usr/bin/python3 -+ -+# This file is part of libmodulemd -+# Copyright (C) 2017-2018 Stephen Gallagher -+# -+# Fedora-License-Identifier: MIT -+# SPDX-2.0-License-Identifier: MIT -+# SPDX-3.0-License-Identifier: MIT -+# -+# This program is free software. -+# For more information on the license, see COPYING. -+# For more information on free software, see -+# . -+ -+from os import path -+import sys -+try: -+ import unittest -+ import gi -+ gi.require_version('Modulemd', '2.0') -+ from gi.repository import Modulemd -+ from gi.repository.Modulemd import ModuleIndex -+ from gi.repository import GLib -+except ImportError: -+ # Return error 77 to skip this test on platforms without the necessary -+ # python modules -+ sys.exit(77) -+ -+from base import TestBase -+ -+ -+class TestModule(TestBase): -+ -+ def test_search_streams(self): -+ idx = Modulemd.ModuleIndex.new() -+ idx.update_from_file(path.join(self.source_root, -+ "modulemd/v2/tests/test_data/f29.yaml"), -+ True) -+ module = idx.get_module('nodejs') -+ -+ self.assertEquals(len(module.search_streams('8', 0)), 1) -+ self.assertEquals(len(module.search_streams('10', 0)), 1) -+ -+ -+if __name__ == '__main__': -+ unittest.main() --- -2.21.0 - diff --git a/0004-Extend-timeout-for-header-test.patch b/0004-Extend-timeout-for-header-test.patch deleted file mode 100644 index b4ba12c..0000000 --- a/0004-Extend-timeout-for-header-test.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 82e56d78e46504aab5917b606eae67e1a3b54603 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Wed, 29 May 2019 16:18:30 -0400 -Subject: [PATCH 4/4] Extend timeout for header test - -Signed-off-by: Stephen Gallagher ---- - modulemd/meson.build | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modulemd/meson.build b/modulemd/meson.build -index e5912d4041ba3e427d13b98c0eeca5217d48244b..0741736a12b4457559ade0a5372ff4b25743fce3 100644 ---- a/modulemd/meson.build -+++ b/modulemd/meson.build -@@ -306,11 +306,12 @@ endif - if build_api_v2 - subdir('v2') - import_header_script = find_program('common/tests/test-import-headers.sh') - test ('test_v2_import_headers', import_header_script, - env : test_env, -- args : modulemd_v2_hdrs) -+ args : modulemd_v2_hdrs, -+ timeout : 300) - endif - - if valgrind.found() - modulemd_valgrind_scripts = files('common/tests/test-valgrind.py') - test ('valgrind', python3, --- -2.21.0 - diff --git a/libmodulemd.spec b/libmodulemd.spec index eb136d9..5fe31b7 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,5 +1,5 @@ -%global libmodulemd_version 2.5.0 -%global libmodulemd_v1_version 1.8.11 +%global libmodulemd_version 2.6.0 +%global libmodulemd_v1_version 1.8.13 # Python 2 is dead on F31+ %if ( 0%{?fedora} && 0%{?fedora} <= 30 ) || ( 0%{?rhel} && 0%{?rhel} <= 7) @@ -12,7 +12,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -42,10 +42,6 @@ Conflicts: libmodulemd1 < %{libmodulemd_v1_version}-%{release} # Patches -Patch0001: 0001-Double-valgrind-timeout.patch -Patch0002: 0002-Parallelize-the-valgrind-tests.patch -Patch0003: 0003-Fix-transfer-type-for-Module.search_streams.patch -Patch0004: 0004-Extend-timeout-for-header-test.patch %description @@ -235,6 +231,13 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Wed Jul 03 2019 Stephen Gallagher - 2.6.0-1 +- Update to 2.6.0 +- New function ModuleIndexMerger.resolve_ext() allowing for strict merging +- Profile.get_description() now properly returns available translations +- Numerous documentation fixes +- Test improvements + * Wed May 29 2019 Stephen Gallagher - 2.5.0-2 - Fix memory issue with Module.search_streams() in the python bindings diff --git a/sources b/sources index 7c3cf5f..6bf11cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.5.0.tar.xz) = 78e9a523cbe0fccf4a39c3824397a4383eec58d688558f44dc05d4c34cce3b08b307b489ea8d68403607fb9f11efad76dd2bbbecfae6a102c0929acb95d05c65 +SHA512 (modulemd-2.6.0.tar.xz) = 70ff6cb8c4f4ee8619cae96fc62280460f32872b166bf4db87d80827149825cdb1aa9d9bdc85ef68d2caddb1f9569003e218523d0d1e7f59367e53046628e7fb From 478cf914f5a03c5b2a8342b681772c2f4c778799 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 13:49:02 +0000 Subject: [PATCH 031/110] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_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 5fe31b7..fac9e72 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -12,7 +12,7 @@ Name: libmodulemd Version: %{libmodulemd_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -231,6 +231,9 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-1.0/ %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 2.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Wed Jul 03 2019 Stephen Gallagher - 2.6.0-1 - Update to 2.6.0 - New function ModuleIndexMerger.resolve_ext() allowing for strict merging From d99905d75caca3ccc128438bc75b32f08f4813df Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 15 Aug 2019 08:20:11 -0400 Subject: [PATCH 032/110] Update to 2.7.0 Drop libmodulemd1 subpackage which is now packaged separately Add support for 'buildroot' and 'srpm-buildroot' arguments to components Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 104 ++++------------------------------------------- sources | 2 +- 3 files changed, 11 insertions(+), 96 deletions(-) diff --git a/.gitignore b/.gitignore index ba892d4..4f5ac54 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ /modulemd-2.4.0.tar.xz /modulemd-2.5.0.tar.xz /modulemd-2.6.0.tar.xz +/modulemd-2.7.0.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index fac9e72..ffa516b 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,6 +1,3 @@ -%global libmodulemd_version 2.6.0 -%global libmodulemd_v1_version 1.8.13 - # Python 2 is dead on F31+ %if ( 0%{?fedora} && 0%{?fedora} <= 30 ) || ( 0%{?rhel} && 0%{?rhel} <= 7) %global meson_override_flags -Dwith_py3_overrides=true -Dwith_py2_overrides=true @@ -11,8 +8,8 @@ %endif Name: libmodulemd -Version: %{libmodulemd_version} -Release: 2%{?dist} +Version: 2.7.0 +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -37,10 +34,6 @@ BuildRequires: python3-gobject-base BuildRequires: valgrind %endif -# Make sure we upgrade libmodulemd1 to match -Conflicts: libmodulemd1 < %{libmodulemd_v1_version}-%{release} - - # Patches @@ -83,66 +76,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Development files for libmodulemd. -%package -n libmodulemd1 -Summary: Compatibility package for libmodulemd 1.x -Version: %{libmodulemd_v1_version} -Obsoletes: libmodulemd < 2 -Provides: libmodulemd = %{libmodulemd_v1_version}-%{release} -Provides: libmodulemd%{?_isa} = %{libmodulemd_v1_version}-%{release} - -%description -n libmodulemd1 -Compatibility library for libmodulemd 1.x - - -%package -n libmodulemd1-devel -Summary: Compatibility development package for libmodulemd 1.x -Version: %{libmodulemd_v1_version} -Requires: libmodulemd1%{?_isa} = %{libmodulemd_v1_version}-%{release} -Conflicts: %{name}-devel -Obsoletes: libmodulemd-devel < 2 -Provides: libmodulemd-devel = %{libmodulemd_v1_version}-%{release} -RemovePathPostfixes: .compat - - -%description -n libmodulemd1-devel -Development files for libmodulemd 1.x - - -%if %{build_python2} -%package -n python2-libmodulemd1 -Summary: Python 2 bindings for %{name}1 -Version: %{libmodulemd_v1_version} -Requires: libmodulemd1 = %{libmodulemd_v1_version}-%{release} -Requires: python-gobject-base - -Obsoletes: python2-libmodulemd < 2 -Provides: python2-libmodulemd = %{libmodulemd_v1_version}-%{release} - - -%description -n python2-libmodulemd1 -Python 2 bindings for libmodulemd1 -%endif - - -%package -n python3-libmodulemd1 -Summary: Python 3 bindings for %{name}1 -Version: %{libmodulemd_v1_version} -Requires: libmodulemd1 = %{libmodulemd_v1_version}-%{release} -Requires: python3-gobject-base - -Obsoletes: python3-libmodulemd < 2 -Provides: python3-libmodulemd = %{libmodulemd_v1_version}-%{release} - -%description -n python3-libmodulemd1 -Python 3 bindings for libmodulemd1 - - %prep -%autosetup -p1 -n modulemd-%{libmodulemd_version} +%autosetup -p1 -n modulemd-%{version} %build -%meson -Ddeveloper_build=false -Dbuild_api_v1=true -Dbuild_api_v2=true %{meson_override_flags} +%meson -Ddeveloper_build=false %{meson_override_flags} %meson_build @@ -169,9 +108,6 @@ export MMD_SKIP_VALGRIND=1 %install %meson_install -ln -s libmodulemd.so.%{libmodulemd_v1_version} \ - %{buildroot}%{_libdir}/%{name}.so.compat - %files %license COPYING @@ -203,34 +139,12 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{python3_sitearch}/gi/overrides/ -%if %{build_python2} -%files -n python2-libmodulemd1 -%endif - - -%files -n python3-libmodulemd1 - - -%files -n libmodulemd1 -%license COPYING -%doc README.md -%{_bindir}/modulemd-validator-v1 -%{_libdir}/%{name}.so.1* -%dir %{_libdir}/girepository-1.0 -%{_libdir}/girepository-1.0/Modulemd-1.0.typelib - - -%files -n libmodulemd1-devel -%{_libdir}/%{name}.so.compat -%{_libdir}/pkgconfig/modulemd.pc -%{_includedir}/modulemd/ -%dir %{_datadir}/gir-1.0 -%{_datadir}/gir-1.0/Modulemd-1.0.gir -%dir %{_datadir}/gtk-doc -%dir %{_datadir}/gtk-doc/html -%{_datadir}/gtk-doc/html/modulemd-1.0/ - %changelog +* Thu Aug 15 2019 Stephen Gallagher - 2.7.0-1 +- Update to 2.7.0 +- Drop libmodulemd1 subpackage which is now packaged separately +- Add support for 'buildroot' and 'srpm-buildroot' arguments to components + * Thu Jul 25 2019 Fedora Release Engineering - 2.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 6bf11cf..dd6665e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.6.0.tar.xz) = 70ff6cb8c4f4ee8619cae96fc62280460f32872b166bf4db87d80827149825cdb1aa9d9bdc85ef68d2caddb1f9569003e218523d0d1e7f59367e53046628e7fb +SHA512 (modulemd-2.7.0.tar.xz) = 5872a7ca70e046a95f779e54cd6d78d994c7227561349fd6ec909dc5cae16eb0ae4aa59707398427aeeeb28d9d86d5977e54580ef2af8e64114cf6455643fd5a From ac46535dd444116ab3f2134bf9527730d6667297 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 15 Aug 2019 08:31:39 -0400 Subject: [PATCH 033/110] Add missing BuildRequires Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/libmodulemd.spec b/libmodulemd.spec index ffa516b..3f08755 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,6 +24,7 @@ BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) +BuildRequires: glib2-doc %if %{build_python2} BuildRequires: python2-devel BuildRequires: python-gobject-base From 26e12907ca1ee4483ef75c3cc0423dc9bf945349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 19 Aug 2019 08:49:36 +0200 Subject: [PATCH 034/110] Rebuilt for Python 3.8 --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 3f08755..9b7280f 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -9,7 +9,7 @@ Name: libmodulemd Version: 2.7.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -141,6 +141,9 @@ export MMD_SKIP_VALGRIND=1 %changelog +* Mon Aug 19 2019 Miro Hrončok - 2.7.0-2 +- Rebuilt for Python 3.8 + * Thu Aug 15 2019 Stephen Gallagher - 2.7.0-1 - Update to 2.7.0 - Drop libmodulemd1 subpackage which is now packaged separately From 8daa4da18f88a6bf830c108574ae43f73a169084 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 3 Sep 2019 22:02:02 -0400 Subject: [PATCH 035/110] Update to 2.8.0 - API Changes * Add Modulemd.Module.get_translation() - Retrieve the translations associated with a Modulemd.Module * Add ModuleIndex.update_from_defaults_directory() - Import defaults from a directory of yaml documents, such as fedora-module-defaults, optionally providing a second path containing overrides. - Enhancements * Modulemd.ModuleIndex.update_from_file() now supports reading files compressed with gzip, bzip2 or xz. (Issue: #208) * Documentation updates - Bugfixes * Assorted minor issues discovered by static analysis tools. Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 21 +++++++++++++++++++-- sources | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4f5ac54..ac109db 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /modulemd-2.5.0.tar.xz /modulemd-2.6.0.tar.xz /modulemd-2.7.0.tar.xz +/modulemd-2.8.0.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index 9b7280f..5b5af88 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -8,8 +8,8 @@ %endif Name: libmodulemd -Version: 2.7.0 -Release: 2%{?dist} +Version: 2.8.0 +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -25,6 +25,8 @@ BuildRequires: pkgconfig(gobject-introspection-1.0) 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 @@ -141,6 +143,21 @@ export MMD_SKIP_VALGRIND=1 %changelog +* Wed Sep 04 2019 Stephen Gallagher - 2.8.0-1 +- Update to 2.8.0 +- API Changes + * Add Modulemd.Module.get_translation() - Retrieve the translations + associated with a Modulemd.Module + * Add ModuleIndex.update_from_defaults_directory() - Import defaults from a + directory of yaml documents, such as fedora-module-defaults, optionally + providing a second path containing overrides. +- Enhancements + * Modulemd.ModuleIndex.update_from_file() now supports reading files + compressed with gzip, bzip2 or xz. (Issue: #208) + * Documentation updates +- Bugfixes + * Assorted minor issues discovered by static analysis tools. + * Mon Aug 19 2019 Miro Hrončok - 2.7.0-2 - Rebuilt for Python 3.8 diff --git a/sources b/sources index dd6665e..c2bc6a3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.7.0.tar.xz) = 5872a7ca70e046a95f779e54cd6d78d994c7227561349fd6ec909dc5cae16eb0ae4aa59707398427aeeeb28d9d86d5977e54580ef2af8e64114cf6455643fd5a +SHA512 (modulemd-2.8.0.tar.xz) = 0eee1b57b122f1fe3860f42d380a8ce3b39801f69124537d9cb4464990981c32636d0c40f1879fcfc15550aa067190d2a406ee7fec85b00048dc44dbc62ab129 From 2e530f24c2470dc019f8c1b388b1da866d24e1f2 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 18 Sep 2019 16:01:08 -0400 Subject: [PATCH 036/110] Improvements to ModuleIndex.update_from_defaults_directory() * Import each file in the directory as a merge rather than an overwrite so we can detect conflicts. * Modify the meaning of the 'strict' argument to fail if the merge would result in a conflict in the default stream setting of a module. Signed-off-by: Stephen Gallagher --- ...ModuleIndex.update_from_defaults_dir.patch | 395 ++++++++++++++++++ libmodulemd.spec | 13 +- 2 files changed, 407 insertions(+), 1 deletion(-) create mode 100644 0001-Improvements-to-ModuleIndex.update_from_defaults_dir.patch diff --git a/0001-Improvements-to-ModuleIndex.update_from_defaults_dir.patch b/0001-Improvements-to-ModuleIndex.update_from_defaults_dir.patch new file mode 100644 index 0000000..61ce19f --- /dev/null +++ b/0001-Improvements-to-ModuleIndex.update_from_defaults_dir.patch @@ -0,0 +1,395 @@ +From c0bee1d95d628f12fa0e1e61eaad28b24d4416bc Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Wed, 18 Sep 2019 10:26:25 -0400 +Subject: [PATCH] Improvements to ModuleIndex.update_from_defaults_dir() + +- Import each file in the directory as a merge rather than an an overwrite so we +can detect conflicts. +- Modify the meaning of the 'strict' argument to mean that it should fail if the +merge would result in a conflict in the default stream setting for a module. +- Reduce the opportunities for a failure to corrupt the index. + +Fixes: https://github.com/fedora-modularity/libmodulemd/issues/366 + +Signed-off-by: Stephen Gallagher +--- + .../modulemd-2.0/modulemd-module-index.h | 2 +- + .../private/modulemd-rpm-map-entry-private.h | 4 +- + modulemd/modulemd-module-index.c | 122 ++++++++++++------ + modulemd/tests/test-modulemd-moduleindex.c | 69 +++++++++- + .../tests/test_data/bad_defaults/meson-2.yaml | 7 + + .../tests/test_data/bad_defaults/meson.yaml | 7 + + .../tests/test_data/bad_defaults/ninja.yaml | 7 + + .../tests/test_data/bad_defaults/nodejs.yaml | 9 ++ + 8 files changed, 183 insertions(+), 44 deletions(-) + create mode 100644 modulemd/tests/test_data/bad_defaults/meson-2.yaml + create mode 100644 modulemd/tests/test_data/bad_defaults/meson.yaml + create mode 100644 modulemd/tests/test_data/bad_defaults/ninja.yaml + create mode 100644 modulemd/tests/test_data/bad_defaults/nodejs.yaml + +diff --git a/modulemd/include/modulemd-2.0/modulemd-module-index.h b/modulemd/include/modulemd-2.0/modulemd-module-index.h +index 483a82f1e0292232181a39a78089b6d715c57805..d899f8223aecdac13b3fab0ad849350bffa09c65 100644 +--- a/modulemd/include/modulemd-2.0/modulemd-module-index.h ++++ b/modulemd/include/modulemd-2.0/modulemd-module-index.h +@@ -251,7 +251,7 @@ modulemd_module_index_update_from_custom (ModulemdModuleIndex *self, + * @self: This #ModulemdModuleIndex object. + * @path: (in): The path to a directory containing defaults documents. + * @strict: (in): Whether the parser should return failure if it encounters an +- * unknown mapping key or if it should ignore it. ++ * unknown mapping key or a conflict in module default streams. + * @overrides_path: (in) (nullable): If non-NULL, the path to a directory + * containing defaults documents that should override those in @path. + * @error: (out): A #GError indicating why this function failed. +diff --git a/modulemd/include/private/modulemd-rpm-map-entry-private.h b/modulemd/include/private/modulemd-rpm-map-entry-private.h +index a9cff19929037e3eaa0f14a999587af1e3b8f7bc..3f9945821dea63ba722736036e9f4daf803401be 100644 +--- a/modulemd/include/private/modulemd-rpm-map-entry-private.h ++++ b/modulemd/include/private/modulemd-rpm-map-entry-private.h +@@ -37,8 +37,8 @@ + */ + ModulemdRpmMapEntry * + modulemd_rpm_map_entry_parse_yaml (yaml_parser_t *parser, +- gboolean strict, +- GError **error); ++ gboolean strict, ++ GError **error); + + + /** +diff --git a/modulemd/modulemd-module-index.c b/modulemd/modulemd-module-index.c +index af0c8e96291d9b3e1534cfeac80dbc8abe262330..ab81bf421b38554e813dec6e3767ac9c8a2baf35 100644 +--- a/modulemd/modulemd-module-index.c ++++ b/modulemd/modulemd-module-index.c +@@ -671,76 +671,124 @@ modulemd_module_index_update_from_custom (ModulemdModuleIndex *self, + } + + +-gboolean +-modulemd_module_index_update_from_defaults_directory ( +- ModulemdModuleIndex *self, +- const gchar *path, +- gboolean strict, +- const gchar *overrides_path, +- GError **error) ++/* ++ * modules_from_directory: ++ * @path: A directory containing one or more modulemd YAML documents ++ * @file_suffix: A file suffix to limit the files to be read. Pass "" if you ++ * need to read all files. ++ * @strict: Whether to fail on unknown fields ++ * @strict_default_streams: Whether to fail on default stream merges. ++ * @error: Error return value ++ */ ++static ModulemdModuleIndex * ++modules_from_directory (const gchar *path, ++ const gchar *file_suffix, ++ gboolean strict, ++ gboolean strict_default_streams, ++ GError **error) + { + const gchar *filename = NULL; ++ g_autoptr (GDir) dir = NULL; + g_autofree gchar *filepath = NULL; +- g_autoptr (GDir) defdir = NULL; +- g_autoptr (GDir) overridedir = NULL; ++ g_autoptr (ModulemdModuleIndex) index = NULL; ++ g_autoptr (ModulemdModuleIndex) intermediate = NULL; + g_autoptr (GPtrArray) failures = NULL; +- g_autoptr (ModulemdModuleIndex) override_idx = NULL; ++ g_autoptr (GError) nested_error = NULL; + +- /* Read the regular path first */ +- defdir = g_dir_open (path, 0, error); +- if (!defdir) ++ index = modulemd_module_index_new (); ++ ++ /* Open the directory */ ++ dir = g_dir_open (path, 0, &nested_error); ++ if (!dir) + { ++ g_propagate_error (error, g_steal_pointer (&nested_error)); + return FALSE; + } + +- while ((filename = g_dir_read_name (defdir)) != NULL) ++ while ((filename = g_dir_read_name (dir)) != NULL) + { +- if (g_str_has_suffix (filename, MMD_YAML_SUFFIX)) ++ if (g_str_has_suffix (filename, file_suffix)) + { ++ intermediate = modulemd_module_index_new (); ++ + filepath = g_build_path ("/", path, filename, NULL); +- g_debug ("Reading defaults from %s", filepath); ++ g_debug ("Reading modulemd from %s", filepath); + if (!modulemd_module_index_update_from_file ( +- self, filepath, strict, &failures, error)) ++ intermediate, filepath, strict, &failures, error)) + { + return FALSE; + } ++ ++ if (!modulemd_module_index_merge (intermediate, ++ index, ++ FALSE, ++ strict_default_streams, ++ &nested_error)) ++ { ++ g_propagate_error (error, g_steal_pointer (&nested_error)); ++ return FALSE; ++ } ++ + g_clear_pointer (&failures, g_ptr_array_unref); + g_clear_pointer (&filepath, g_free); ++ g_clear_object (&intermediate); + } + } + ++ return g_steal_pointer (&index); ++} ++ ++ ++gboolean ++modulemd_module_index_update_from_defaults_directory ( ++ ModulemdModuleIndex *self, ++ const gchar *path, ++ gboolean strict, ++ const gchar *overrides_path, ++ GError **error) ++{ ++ g_autoptr (ModulemdModuleIndex) defaults_idx = NULL; ++ g_autoptr (ModulemdModuleIndex) override_idx = NULL; ++ g_autoptr (GError) nested_error = NULL; ++ ++ /* Read the regular path first */ ++ defaults_idx = modules_from_directory ( ++ path, MMD_YAML_SUFFIX, strict, strict, &nested_error); ++ if (!defaults_idx) ++ { ++ g_propagate_error (error, g_steal_pointer (&nested_error)); ++ return FALSE; ++ } ++ ++ /* If an override path was provided, use that too */ + if (overrides_path) + { +- overridedir = g_dir_open (overrides_path, 0, error); +- if (!overridedir) ++ override_idx = modules_from_directory ( ++ overrides_path, MMD_YAML_SUFFIX, strict, strict, &nested_error); ++ if (!override_idx) + { ++ g_propagate_error (error, g_steal_pointer (&nested_error)); + return FALSE; + } + +- override_idx = modulemd_module_index_new (); +- while ((filename = g_dir_read_name (overridedir)) != NULL) +- { +- if (g_str_has_suffix (filename, MMD_YAML_SUFFIX)) +- { +- filepath = g_build_path ("/", overrides_path, filename, NULL); +- g_debug ("Reading default overrides from %s", filepath); +- if (!modulemd_module_index_update_from_file ( +- override_idx, filepath, strict, &failures, error)) +- { +- return FALSE; +- } +- g_clear_pointer (&failures, g_ptr_array_unref); +- g_clear_pointer (&filepath, g_free); +- } +- } +- + if (!modulemd_module_index_merge ( +- override_idx, self, TRUE, FALSE, error)) ++ override_idx, defaults_idx, TRUE, strict, &nested_error)) + { ++ g_propagate_error (error, g_steal_pointer (&nested_error)); + return FALSE; + } + } + ++ /* Now that we've verified that the content in the two paths is compatible, ++ * attempt to merge it into the existing index. ++ */ ++ if (!modulemd_module_index_merge ( ++ defaults_idx, self, TRUE, strict, &nested_error)) ++ { ++ g_propagate_error (error, g_steal_pointer (&nested_error)); ++ return FALSE; ++ } ++ + + return TRUE; + } +diff --git a/modulemd/tests/test-modulemd-moduleindex.c b/modulemd/tests/test-modulemd-moduleindex.c +index 03db9de9c707d0c6c96d7f21ed5aabddf315fbba..2fc1237ff0006a329abd2f0f311b7743d8dbba31 100644 +--- a/modulemd/tests/test-modulemd-moduleindex.c ++++ b/modulemd/tests/test-modulemd-moduleindex.c +@@ -1193,6 +1193,8 @@ test_module_index_read_def_dir (void) + g_autoptr (GError) error = NULL; + g_autofree gchar *path = + g_build_path ("/", g_getenv ("TEST_DATA_PATH"), "defaults", NULL); ++ g_autofree gchar *bad_path = ++ g_build_path ("/", g_getenv ("TEST_DATA_PATH"), "bad_defaults", NULL); + g_autofree gchar *overrides_path = + g_build_path ("/", path, "overrides", NULL); + g_auto (GStrv) module_names = NULL; +@@ -1213,8 +1215,6 @@ test_module_index_read_def_dir (void) + module_names = modulemd_module_index_get_module_names_as_strv (idx); + g_assert_nonnull (module_names); + +- g_assert_cmpint (g_strv_length (module_names), ==, 3); +- + g_assert_true ( + g_strv_contains ((const gchar *const *)module_names, "meson")); + g_assert_true ( +@@ -1222,6 +1222,8 @@ test_module_index_read_def_dir (void) + g_assert_true ( + g_strv_contains ((const gchar *const *)module_names, "nodejs")); + ++ g_assert_cmpint (g_strv_length (module_names), ==, 3); ++ + defaultdict = + modulemd_module_index_get_default_streams_as_hash_table (idx, NULL); + g_assert_nonnull (defaultdict); +@@ -1248,8 +1250,6 @@ test_module_index_read_def_dir (void) + module_names = modulemd_module_index_get_module_names_as_strv (idx); + g_assert_nonnull (module_names); + +- g_assert_cmpint (g_strv_length (module_names), ==, 4); +- + g_assert_true ( + g_strv_contains ((const gchar *const *)module_names, "meson")); + g_assert_true ( +@@ -1259,6 +1259,8 @@ test_module_index_read_def_dir (void) + g_assert_true ( + g_strv_contains ((const gchar *const *)module_names, "testmodule")); + ++ g_assert_cmpint (g_strv_length (module_names), ==, 4); ++ + defaultdict = + modulemd_module_index_get_default_streams_as_hash_table (idx, NULL); + g_assert_nonnull (defaultdict); +@@ -1284,6 +1286,65 @@ test_module_index_read_def_dir (void) + idx, path, TRUE, "nonexistent", &error)); + g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT); + g_clear_error (&error); ++ ++ ++ g_clear_object (&idx); ++ idx = modulemd_module_index_new (); ++ g_assert_nonnull (idx); ++ ++ /* Base directory contains two defaults with conflicting streams for the ++ * same module in separate files. Strict mode. ++ */ ++ g_assert_false (modulemd_module_index_update_from_defaults_directory ( ++ idx, bad_path, TRUE, NULL, &error)); ++ g_assert_error (error, MODULEMD_ERROR, MODULEMD_ERROR_VALIDATE); ++ g_clear_error (&error); ++ ++ /* Verify that the index has not been modified as a side-effect */ ++ module_names = modulemd_module_index_get_module_names_as_strv (idx); ++ g_assert_cmpint (g_strv_length (module_names), ==, 0); ++ ++ g_clear_pointer (&module_names, g_strfreev); ++ g_clear_object (&idx); ++ idx = modulemd_module_index_new (); ++ g_assert_nonnull (idx); ++ ++ /* Base directory contains two defaults with conflicting streams for the ++ * same module in separate files. Non-strict mode. ++ */ ++ g_assert_true (modulemd_module_index_update_from_defaults_directory ( ++ idx, bad_path, FALSE, NULL, &error)); ++ g_assert_no_error (error); ++ ++ ++ /* There should be three modules in the index now: ++ * - meson ++ * - ninja ++ * - nodejs ++ */ ++ module_names = modulemd_module_index_get_module_names_as_strv (idx); ++ g_assert_nonnull (module_names); ++ ++ g_assert_true ( ++ g_strv_contains ((const gchar *const *)module_names, "meson")); ++ g_assert_true ( ++ g_strv_contains ((const gchar *const *)module_names, "ninja")); ++ g_assert_true ( ++ g_strv_contains ((const gchar *const *)module_names, "nodejs")); ++ ++ g_assert_cmpint (g_strv_length (module_names), ==, 3); ++ ++ defaultdict = ++ modulemd_module_index_get_default_streams_as_hash_table (idx, NULL); ++ g_assert_nonnull (defaultdict); ++ ++ /* Make sure that in non-strict mode, meson's default is reset to NULL */ ++ g_assert_cmpstr (g_hash_table_lookup (defaultdict, "meson"), ==, NULL); ++ g_assert_cmpstr (g_hash_table_lookup (defaultdict, "ninja"), ==, "latest"); ++ g_assert_cmpstr (g_hash_table_lookup (defaultdict, "nodejs"), ==, NULL); ++ ++ g_clear_pointer (&module_names, g_strfreev); ++ g_clear_pointer (&defaultdict, g_hash_table_unref); + } + + +diff --git a/modulemd/tests/test_data/bad_defaults/meson-2.yaml b/modulemd/tests/test_data/bad_defaults/meson-2.yaml +new file mode 100644 +index 0000000000000000000000000000000000000000..9ebec5ed3de80307bd19c46e1a776a9e782ce56d +--- /dev/null ++++ b/modulemd/tests/test_data/bad_defaults/meson-2.yaml +@@ -0,0 +1,7 @@ ++document: modulemd-defaults ++version: 1 ++data: ++ module: meson ++ stream: old ++ profiles: ++ latest: [default] +diff --git a/modulemd/tests/test_data/bad_defaults/meson.yaml b/modulemd/tests/test_data/bad_defaults/meson.yaml +new file mode 100644 +index 0000000000000000000000000000000000000000..65c892223f41faf103db47698136b44e6543631d +--- /dev/null ++++ b/modulemd/tests/test_data/bad_defaults/meson.yaml +@@ -0,0 +1,7 @@ ++document: modulemd-defaults ++version: 1 ++data: ++ module: meson ++ stream: latest ++ profiles: ++ latest: [default] +diff --git a/modulemd/tests/test_data/bad_defaults/ninja.yaml b/modulemd/tests/test_data/bad_defaults/ninja.yaml +new file mode 100644 +index 0000000000000000000000000000000000000000..a7ecb6e58c0125bcd957c4bb9c9fd4a375d80bb6 +--- /dev/null ++++ b/modulemd/tests/test_data/bad_defaults/ninja.yaml +@@ -0,0 +1,7 @@ ++document: modulemd-defaults ++version: 1 ++data: ++ module: ninja ++ stream: latest ++ profiles: ++ latest: [default] +diff --git a/modulemd/tests/test_data/bad_defaults/nodejs.yaml b/modulemd/tests/test_data/bad_defaults/nodejs.yaml +new file mode 100644 +index 0000000000000000000000000000000000000000..9d2b38d52ce0136a2df34f145a54f33b15015767 +--- /dev/null ++++ b/modulemd/tests/test_data/bad_defaults/nodejs.yaml +@@ -0,0 +1,9 @@ ++document: modulemd-defaults ++version: 1 ++data: ++ modified: 201906261200 ++ module: nodejs ++ profiles: ++ 8: [default] ++ 10: [default] ++ 12: [default] +-- +2.23.0 + diff --git a/libmodulemd.spec b/libmodulemd.spec index 5b5af88..c3f4c75 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -9,7 +9,7 @@ Name: libmodulemd Version: 2.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -39,6 +39,10 @@ BuildRequires: valgrind # Patches +# Upstream patch to improve ModuleIndex.update_from_defaults_dir() +# https://github.com/fedora-modularity/libmodulemd/issues/366 +Patch0001: 0001-Improvements-to-ModuleIndex.update_from_defaults_dir.patch + %description C Library for manipulating module metadata files. @@ -143,6 +147,13 @@ export MMD_SKIP_VALGRIND=1 %changelog +* Wed Sep 18 2019 Stephen Gallagher - 2.8.0-2 +- Improvements to ModuleIndex.update_from_defaults_directory() + * Import each file in the directory as a merge rather than an overwrite so + we can detect conflicts. + * Modify the meaning of the 'strict' argument to fail if the merge would + result in a conflict in the default stream setting of a module. + * Wed Sep 04 2019 Stephen Gallagher - 2.8.0-1 - Update to 2.8.0 - API Changes From f2978a99c7994566b1f5efedf1d77ae253ae1642 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 15 Oct 2019 11:08:27 -0400 Subject: [PATCH 037/110] Improve the merge logic to handle third-party repos more sanely Signed-off-by: Stephen Gallagher --- ...ModuleIndex.update_from_defaults_dir.patch | 395 ------------------ libmodulemd.spec | 11 +- 2 files changed, 5 insertions(+), 401 deletions(-) delete mode 100644 0001-Improvements-to-ModuleIndex.update_from_defaults_dir.patch diff --git a/0001-Improvements-to-ModuleIndex.update_from_defaults_dir.patch b/0001-Improvements-to-ModuleIndex.update_from_defaults_dir.patch deleted file mode 100644 index 61ce19f..0000000 --- a/0001-Improvements-to-ModuleIndex.update_from_defaults_dir.patch +++ /dev/null @@ -1,395 +0,0 @@ -From c0bee1d95d628f12fa0e1e61eaad28b24d4416bc Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Wed, 18 Sep 2019 10:26:25 -0400 -Subject: [PATCH] Improvements to ModuleIndex.update_from_defaults_dir() - -- Import each file in the directory as a merge rather than an an overwrite so we -can detect conflicts. -- Modify the meaning of the 'strict' argument to mean that it should fail if the -merge would result in a conflict in the default stream setting for a module. -- Reduce the opportunities for a failure to corrupt the index. - -Fixes: https://github.com/fedora-modularity/libmodulemd/issues/366 - -Signed-off-by: Stephen Gallagher ---- - .../modulemd-2.0/modulemd-module-index.h | 2 +- - .../private/modulemd-rpm-map-entry-private.h | 4 +- - modulemd/modulemd-module-index.c | 122 ++++++++++++------ - modulemd/tests/test-modulemd-moduleindex.c | 69 +++++++++- - .../tests/test_data/bad_defaults/meson-2.yaml | 7 + - .../tests/test_data/bad_defaults/meson.yaml | 7 + - .../tests/test_data/bad_defaults/ninja.yaml | 7 + - .../tests/test_data/bad_defaults/nodejs.yaml | 9 ++ - 8 files changed, 183 insertions(+), 44 deletions(-) - create mode 100644 modulemd/tests/test_data/bad_defaults/meson-2.yaml - create mode 100644 modulemd/tests/test_data/bad_defaults/meson.yaml - create mode 100644 modulemd/tests/test_data/bad_defaults/ninja.yaml - create mode 100644 modulemd/tests/test_data/bad_defaults/nodejs.yaml - -diff --git a/modulemd/include/modulemd-2.0/modulemd-module-index.h b/modulemd/include/modulemd-2.0/modulemd-module-index.h -index 483a82f1e0292232181a39a78089b6d715c57805..d899f8223aecdac13b3fab0ad849350bffa09c65 100644 ---- a/modulemd/include/modulemd-2.0/modulemd-module-index.h -+++ b/modulemd/include/modulemd-2.0/modulemd-module-index.h -@@ -251,7 +251,7 @@ modulemd_module_index_update_from_custom (ModulemdModuleIndex *self, - * @self: This #ModulemdModuleIndex object. - * @path: (in): The path to a directory containing defaults documents. - * @strict: (in): Whether the parser should return failure if it encounters an -- * unknown mapping key or if it should ignore it. -+ * unknown mapping key or a conflict in module default streams. - * @overrides_path: (in) (nullable): If non-NULL, the path to a directory - * containing defaults documents that should override those in @path. - * @error: (out): A #GError indicating why this function failed. -diff --git a/modulemd/include/private/modulemd-rpm-map-entry-private.h b/modulemd/include/private/modulemd-rpm-map-entry-private.h -index a9cff19929037e3eaa0f14a999587af1e3b8f7bc..3f9945821dea63ba722736036e9f4daf803401be 100644 ---- a/modulemd/include/private/modulemd-rpm-map-entry-private.h -+++ b/modulemd/include/private/modulemd-rpm-map-entry-private.h -@@ -37,8 +37,8 @@ - */ - ModulemdRpmMapEntry * - modulemd_rpm_map_entry_parse_yaml (yaml_parser_t *parser, -- gboolean strict, -- GError **error); -+ gboolean strict, -+ GError **error); - - - /** -diff --git a/modulemd/modulemd-module-index.c b/modulemd/modulemd-module-index.c -index af0c8e96291d9b3e1534cfeac80dbc8abe262330..ab81bf421b38554e813dec6e3767ac9c8a2baf35 100644 ---- a/modulemd/modulemd-module-index.c -+++ b/modulemd/modulemd-module-index.c -@@ -671,76 +671,124 @@ modulemd_module_index_update_from_custom (ModulemdModuleIndex *self, - } - - --gboolean --modulemd_module_index_update_from_defaults_directory ( -- ModulemdModuleIndex *self, -- const gchar *path, -- gboolean strict, -- const gchar *overrides_path, -- GError **error) -+/* -+ * modules_from_directory: -+ * @path: A directory containing one or more modulemd YAML documents -+ * @file_suffix: A file suffix to limit the files to be read. Pass "" if you -+ * need to read all files. -+ * @strict: Whether to fail on unknown fields -+ * @strict_default_streams: Whether to fail on default stream merges. -+ * @error: Error return value -+ */ -+static ModulemdModuleIndex * -+modules_from_directory (const gchar *path, -+ const gchar *file_suffix, -+ gboolean strict, -+ gboolean strict_default_streams, -+ GError **error) - { - const gchar *filename = NULL; -+ g_autoptr (GDir) dir = NULL; - g_autofree gchar *filepath = NULL; -- g_autoptr (GDir) defdir = NULL; -- g_autoptr (GDir) overridedir = NULL; -+ g_autoptr (ModulemdModuleIndex) index = NULL; -+ g_autoptr (ModulemdModuleIndex) intermediate = NULL; - g_autoptr (GPtrArray) failures = NULL; -- g_autoptr (ModulemdModuleIndex) override_idx = NULL; -+ g_autoptr (GError) nested_error = NULL; - -- /* Read the regular path first */ -- defdir = g_dir_open (path, 0, error); -- if (!defdir) -+ index = modulemd_module_index_new (); -+ -+ /* Open the directory */ -+ dir = g_dir_open (path, 0, &nested_error); -+ if (!dir) - { -+ g_propagate_error (error, g_steal_pointer (&nested_error)); - return FALSE; - } - -- while ((filename = g_dir_read_name (defdir)) != NULL) -+ while ((filename = g_dir_read_name (dir)) != NULL) - { -- if (g_str_has_suffix (filename, MMD_YAML_SUFFIX)) -+ if (g_str_has_suffix (filename, file_suffix)) - { -+ intermediate = modulemd_module_index_new (); -+ - filepath = g_build_path ("/", path, filename, NULL); -- g_debug ("Reading defaults from %s", filepath); -+ g_debug ("Reading modulemd from %s", filepath); - if (!modulemd_module_index_update_from_file ( -- self, filepath, strict, &failures, error)) -+ intermediate, filepath, strict, &failures, error)) - { - return FALSE; - } -+ -+ if (!modulemd_module_index_merge (intermediate, -+ index, -+ FALSE, -+ strict_default_streams, -+ &nested_error)) -+ { -+ g_propagate_error (error, g_steal_pointer (&nested_error)); -+ return FALSE; -+ } -+ - g_clear_pointer (&failures, g_ptr_array_unref); - g_clear_pointer (&filepath, g_free); -+ g_clear_object (&intermediate); - } - } - -+ return g_steal_pointer (&index); -+} -+ -+ -+gboolean -+modulemd_module_index_update_from_defaults_directory ( -+ ModulemdModuleIndex *self, -+ const gchar *path, -+ gboolean strict, -+ const gchar *overrides_path, -+ GError **error) -+{ -+ g_autoptr (ModulemdModuleIndex) defaults_idx = NULL; -+ g_autoptr (ModulemdModuleIndex) override_idx = NULL; -+ g_autoptr (GError) nested_error = NULL; -+ -+ /* Read the regular path first */ -+ defaults_idx = modules_from_directory ( -+ path, MMD_YAML_SUFFIX, strict, strict, &nested_error); -+ if (!defaults_idx) -+ { -+ g_propagate_error (error, g_steal_pointer (&nested_error)); -+ return FALSE; -+ } -+ -+ /* If an override path was provided, use that too */ - if (overrides_path) - { -- overridedir = g_dir_open (overrides_path, 0, error); -- if (!overridedir) -+ override_idx = modules_from_directory ( -+ overrides_path, MMD_YAML_SUFFIX, strict, strict, &nested_error); -+ if (!override_idx) - { -+ g_propagate_error (error, g_steal_pointer (&nested_error)); - return FALSE; - } - -- override_idx = modulemd_module_index_new (); -- while ((filename = g_dir_read_name (overridedir)) != NULL) -- { -- if (g_str_has_suffix (filename, MMD_YAML_SUFFIX)) -- { -- filepath = g_build_path ("/", overrides_path, filename, NULL); -- g_debug ("Reading default overrides from %s", filepath); -- if (!modulemd_module_index_update_from_file ( -- override_idx, filepath, strict, &failures, error)) -- { -- return FALSE; -- } -- g_clear_pointer (&failures, g_ptr_array_unref); -- g_clear_pointer (&filepath, g_free); -- } -- } -- - if (!modulemd_module_index_merge ( -- override_idx, self, TRUE, FALSE, error)) -+ override_idx, defaults_idx, TRUE, strict, &nested_error)) - { -+ g_propagate_error (error, g_steal_pointer (&nested_error)); - return FALSE; - } - } - -+ /* Now that we've verified that the content in the two paths is compatible, -+ * attempt to merge it into the existing index. -+ */ -+ if (!modulemd_module_index_merge ( -+ defaults_idx, self, TRUE, strict, &nested_error)) -+ { -+ g_propagate_error (error, g_steal_pointer (&nested_error)); -+ return FALSE; -+ } -+ - - return TRUE; - } -diff --git a/modulemd/tests/test-modulemd-moduleindex.c b/modulemd/tests/test-modulemd-moduleindex.c -index 03db9de9c707d0c6c96d7f21ed5aabddf315fbba..2fc1237ff0006a329abd2f0f311b7743d8dbba31 100644 ---- a/modulemd/tests/test-modulemd-moduleindex.c -+++ b/modulemd/tests/test-modulemd-moduleindex.c -@@ -1193,6 +1193,8 @@ test_module_index_read_def_dir (void) - g_autoptr (GError) error = NULL; - g_autofree gchar *path = - g_build_path ("/", g_getenv ("TEST_DATA_PATH"), "defaults", NULL); -+ g_autofree gchar *bad_path = -+ g_build_path ("/", g_getenv ("TEST_DATA_PATH"), "bad_defaults", NULL); - g_autofree gchar *overrides_path = - g_build_path ("/", path, "overrides", NULL); - g_auto (GStrv) module_names = NULL; -@@ -1213,8 +1215,6 @@ test_module_index_read_def_dir (void) - module_names = modulemd_module_index_get_module_names_as_strv (idx); - g_assert_nonnull (module_names); - -- g_assert_cmpint (g_strv_length (module_names), ==, 3); -- - g_assert_true ( - g_strv_contains ((const gchar *const *)module_names, "meson")); - g_assert_true ( -@@ -1222,6 +1222,8 @@ test_module_index_read_def_dir (void) - g_assert_true ( - g_strv_contains ((const gchar *const *)module_names, "nodejs")); - -+ g_assert_cmpint (g_strv_length (module_names), ==, 3); -+ - defaultdict = - modulemd_module_index_get_default_streams_as_hash_table (idx, NULL); - g_assert_nonnull (defaultdict); -@@ -1248,8 +1250,6 @@ test_module_index_read_def_dir (void) - module_names = modulemd_module_index_get_module_names_as_strv (idx); - g_assert_nonnull (module_names); - -- g_assert_cmpint (g_strv_length (module_names), ==, 4); -- - g_assert_true ( - g_strv_contains ((const gchar *const *)module_names, "meson")); - g_assert_true ( -@@ -1259,6 +1259,8 @@ test_module_index_read_def_dir (void) - g_assert_true ( - g_strv_contains ((const gchar *const *)module_names, "testmodule")); - -+ g_assert_cmpint (g_strv_length (module_names), ==, 4); -+ - defaultdict = - modulemd_module_index_get_default_streams_as_hash_table (idx, NULL); - g_assert_nonnull (defaultdict); -@@ -1284,6 +1286,65 @@ test_module_index_read_def_dir (void) - idx, path, TRUE, "nonexistent", &error)); - g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT); - g_clear_error (&error); -+ -+ -+ g_clear_object (&idx); -+ idx = modulemd_module_index_new (); -+ g_assert_nonnull (idx); -+ -+ /* Base directory contains two defaults with conflicting streams for the -+ * same module in separate files. Strict mode. -+ */ -+ g_assert_false (modulemd_module_index_update_from_defaults_directory ( -+ idx, bad_path, TRUE, NULL, &error)); -+ g_assert_error (error, MODULEMD_ERROR, MODULEMD_ERROR_VALIDATE); -+ g_clear_error (&error); -+ -+ /* Verify that the index has not been modified as a side-effect */ -+ module_names = modulemd_module_index_get_module_names_as_strv (idx); -+ g_assert_cmpint (g_strv_length (module_names), ==, 0); -+ -+ g_clear_pointer (&module_names, g_strfreev); -+ g_clear_object (&idx); -+ idx = modulemd_module_index_new (); -+ g_assert_nonnull (idx); -+ -+ /* Base directory contains two defaults with conflicting streams for the -+ * same module in separate files. Non-strict mode. -+ */ -+ g_assert_true (modulemd_module_index_update_from_defaults_directory ( -+ idx, bad_path, FALSE, NULL, &error)); -+ g_assert_no_error (error); -+ -+ -+ /* There should be three modules in the index now: -+ * - meson -+ * - ninja -+ * - nodejs -+ */ -+ module_names = modulemd_module_index_get_module_names_as_strv (idx); -+ g_assert_nonnull (module_names); -+ -+ g_assert_true ( -+ g_strv_contains ((const gchar *const *)module_names, "meson")); -+ g_assert_true ( -+ g_strv_contains ((const gchar *const *)module_names, "ninja")); -+ g_assert_true ( -+ g_strv_contains ((const gchar *const *)module_names, "nodejs")); -+ -+ g_assert_cmpint (g_strv_length (module_names), ==, 3); -+ -+ defaultdict = -+ modulemd_module_index_get_default_streams_as_hash_table (idx, NULL); -+ g_assert_nonnull (defaultdict); -+ -+ /* Make sure that in non-strict mode, meson's default is reset to NULL */ -+ g_assert_cmpstr (g_hash_table_lookup (defaultdict, "meson"), ==, NULL); -+ g_assert_cmpstr (g_hash_table_lookup (defaultdict, "ninja"), ==, "latest"); -+ g_assert_cmpstr (g_hash_table_lookup (defaultdict, "nodejs"), ==, NULL); -+ -+ g_clear_pointer (&module_names, g_strfreev); -+ g_clear_pointer (&defaultdict, g_hash_table_unref); - } - - -diff --git a/modulemd/tests/test_data/bad_defaults/meson-2.yaml b/modulemd/tests/test_data/bad_defaults/meson-2.yaml -new file mode 100644 -index 0000000000000000000000000000000000000000..9ebec5ed3de80307bd19c46e1a776a9e782ce56d ---- /dev/null -+++ b/modulemd/tests/test_data/bad_defaults/meson-2.yaml -@@ -0,0 +1,7 @@ -+document: modulemd-defaults -+version: 1 -+data: -+ module: meson -+ stream: old -+ profiles: -+ latest: [default] -diff --git a/modulemd/tests/test_data/bad_defaults/meson.yaml b/modulemd/tests/test_data/bad_defaults/meson.yaml -new file mode 100644 -index 0000000000000000000000000000000000000000..65c892223f41faf103db47698136b44e6543631d ---- /dev/null -+++ b/modulemd/tests/test_data/bad_defaults/meson.yaml -@@ -0,0 +1,7 @@ -+document: modulemd-defaults -+version: 1 -+data: -+ module: meson -+ stream: latest -+ profiles: -+ latest: [default] -diff --git a/modulemd/tests/test_data/bad_defaults/ninja.yaml b/modulemd/tests/test_data/bad_defaults/ninja.yaml -new file mode 100644 -index 0000000000000000000000000000000000000000..a7ecb6e58c0125bcd957c4bb9c9fd4a375d80bb6 ---- /dev/null -+++ b/modulemd/tests/test_data/bad_defaults/ninja.yaml -@@ -0,0 +1,7 @@ -+document: modulemd-defaults -+version: 1 -+data: -+ module: ninja -+ stream: latest -+ profiles: -+ latest: [default] -diff --git a/modulemd/tests/test_data/bad_defaults/nodejs.yaml b/modulemd/tests/test_data/bad_defaults/nodejs.yaml -new file mode 100644 -index 0000000000000000000000000000000000000000..9d2b38d52ce0136a2df34f145a54f33b15015767 ---- /dev/null -+++ b/modulemd/tests/test_data/bad_defaults/nodejs.yaml -@@ -0,0 +1,9 @@ -+document: modulemd-defaults -+version: 1 -+data: -+ modified: 201906261200 -+ module: nodejs -+ profiles: -+ 8: [default] -+ 10: [default] -+ 12: [default] --- -2.23.0 - diff --git a/libmodulemd.spec b/libmodulemd.spec index c3f4c75..20f09a3 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -8,8 +8,8 @@ %endif Name: libmodulemd -Version: 2.8.0 -Release: 2%{?dist} +Version: 2.8.1 +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -39,10 +39,6 @@ BuildRequires: valgrind # Patches -# Upstream patch to improve ModuleIndex.update_from_defaults_dir() -# https://github.com/fedora-modularity/libmodulemd/issues/366 -Patch0001: 0001-Improvements-to-ModuleIndex.update_from_defaults_dir.patch - %description C Library for manipulating module metadata files. @@ -147,6 +143,9 @@ export MMD_SKIP_VALGRIND=1 %changelog +* Tue Oct 15 2019 Stephen Gallagher - 2.8.1-1 +- Improve the merge logic to handle third-party repos more sanely + * Wed Sep 18 2019 Stephen Gallagher - 2.8.0-2 - Improvements to ModuleIndex.update_from_defaults_directory() * Import each file in the directory as a merge rather than an overwrite so From 8122fb9a17dc0bd586a60b97ecf2895846f22bf9 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 15 Oct 2019 11:18:52 -0400 Subject: [PATCH 038/110] Add source tarball Signed-off-by: Stephen Gallagher --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ac109db..9fd1da9 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ /modulemd-2.6.0.tar.xz /modulemd-2.7.0.tar.xz /modulemd-2.8.0.tar.xz +/modulemd-2.8.1.tar.xz diff --git a/sources b/sources index c2bc6a3..93f884d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.8.0.tar.xz) = 0eee1b57b122f1fe3860f42d380a8ce3b39801f69124537d9cb4464990981c32636d0c40f1879fcfc15550aa067190d2a406ee7fec85b00048dc44dbc62ab129 +SHA512 (modulemd-2.8.1.tar.xz) = 61bea7e28dba8dbe5881a9d8ad164ab9afe8cd37c4f62ae880535a5e58ab6ab212882623dc4b3d6350d6516a86f2c8a139ddbd655babd60bcd1b02e5d8eebf73 From abb5f5424a22e43203a0c84ea64c9f64dffa9760 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 24 Oct 2019 14:52:14 -0400 Subject: [PATCH 039/110] Update to 2.8.2 Use safer version of dup() Fix loading of YAML module stream with no module or stream name Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 7 ++++++- sources | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9fd1da9..317b6db 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ /modulemd-2.7.0.tar.xz /modulemd-2.8.0.tar.xz /modulemd-2.8.1.tar.xz +/modulemd-2.8.2.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index 20f09a3..44316bc 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -8,7 +8,7 @@ %endif Name: libmodulemd -Version: 2.8.1 +Version: 2.8.2 Release: 1%{?dist} Summary: Module metadata manipulation library @@ -143,6 +143,11 @@ export MMD_SKIP_VALGRIND=1 %changelog +* Thu Oct 24 2019 Stephen Gallagher - 2.8.2-1 +- Update to 2.8.2 +- Use safer version of dup() +- Fix loading of YAML module stream with no module or stream name + * Tue Oct 15 2019 Stephen Gallagher - 2.8.1-1 - Improve the merge logic to handle third-party repos more sanely diff --git a/sources b/sources index 93f884d..3fb372d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.8.1.tar.xz) = 61bea7e28dba8dbe5881a9d8ad164ab9afe8cd37c4f62ae880535a5e58ab6ab212882623dc4b3d6350d6516a86f2c8a139ddbd655babd60bcd1b02e5d8eebf73 +SHA512 (modulemd-2.8.2.tar.xz) = 281d7550aa1d2d1978454ff8d79d4e94e0f809086e41e8a0bb493a4b488801b5b7cf249fcd648526d7d22bf5deb970a6e93a5095f3318d70f67b968ac9187171 From eb1c39db8a495b96c877d2db3b84582516c9fb58 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 9 Jan 2020 12:31:07 -0500 Subject: [PATCH 040/110] Update to 2.8.3 Fix compilation issue with glib >= 2.63.3 Improved modulemd document validation Numerous test enhancements Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 8 +++++++- sources | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 317b6db..7a6cda5 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ /modulemd-2.8.0.tar.xz /modulemd-2.8.1.tar.xz /modulemd-2.8.2.tar.xz +/modulemd-2.8.3.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index 44316bc..3d872c7 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -8,7 +8,7 @@ %endif Name: libmodulemd -Version: 2.8.2 +Version: 2.8.3 Release: 1%{?dist} Summary: Module metadata manipulation library @@ -143,6 +143,12 @@ export MMD_SKIP_VALGRIND=1 %changelog +* Thu Jan 09 2020 Stephen Gallagher - 2.8.3-1 +- Update to 2.8.3 +- Fix compilation issue with glib >= 2.63.3 +- Improved modulemd document validation +- Numerous test enhancements + * Thu Oct 24 2019 Stephen Gallagher - 2.8.2-1 - Update to 2.8.2 - Use safer version of dup() diff --git a/sources b/sources index 3fb372d..abc5414 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.8.2.tar.xz) = 281d7550aa1d2d1978454ff8d79d4e94e0f809086e41e8a0bb493a4b488801b5b7cf249fcd648526d7d22bf5deb970a6e93a5095f3318d70f67b968ac9187171 +SHA512 (modulemd-2.8.3.tar.xz) = 79bf7c1008cebe7cfae0ab3dc2ae74b43c7c78747c63154416700dd5b974dcb4a2c441361b9d8e497bc7f132e2bd735cfa2c6acfd3d8422e207e3517329f3c65 From 4c5612dd024053708d3fe340fba05cf12754ee1d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 09:45:21 +0000 Subject: [PATCH 041/110] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_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 3d872c7..fb4b8a6 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -9,7 +9,7 @@ Name: libmodulemd Version: 2.8.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -143,6 +143,9 @@ export MMD_SKIP_VALGRIND=1 %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 2.8.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Jan 09 2020 Stephen Gallagher - 2.8.3-1 - Update to 2.8.3 - Fix compilation issue with glib >= 2.63.3 From 0cc560d9a9e761d7d1b067d837abc06664541ccf Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 12 Feb 2020 22:50:24 +0000 Subject: [PATCH 042/110] 2.9.0 upstream release Upstream tag: libmodulemd-2.9.0 Upstream commit: af8f03df Signed-off-by: Stephen Gallagher --- .gitignore | 1 + .make_packit_specfile.sh | 23 ++++++++++++++++++++ .packit.yml | 25 +++++++++++++++++++++ README.packit | 3 +++ libmodulemd.spec | 47 ++++++++++++++++++++++++++++++---------- sources | 2 +- 6 files changed, 88 insertions(+), 13 deletions(-) create mode 100755 .make_packit_specfile.sh create mode 100644 .packit.yml create mode 100644 README.packit diff --git a/.gitignore b/.gitignore index 7a6cda5..1a174ad 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ /modulemd-2.8.1.tar.xz /modulemd-2.8.2.tar.xz /modulemd-2.8.3.tar.xz +/modulemd-2.9.0.tar.xz diff --git a/.make_packit_specfile.sh b/.make_packit_specfile.sh new file mode 100755 index 0000000..bef12c9 --- /dev/null +++ b/.make_packit_specfile.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +pushd $SCRIPT_DIR + +date=$(date +%Y%m%d) +version_desc=$(git describe --tags --match "*.*") +version=$(echo $version_desc | cut -d '-' -f2) +patch_count=$(echo $version_desc | cut -d '-' -f3) +hash=$(echo $version_desc | cut -d '-' -f4) + +if [ x$patch_count != x ]; then + release=0.${date}.${patch_count}git${hash}%{?dist} +else + release=0.${date}%{?dist} +fi + +./spec_tmpl.sh version=$version release=$release template=libmodulemd.spec.in > libmodulemd.spec + +popd diff --git a/.packit.yml b/.packit.yml new file mode 100644 index 0000000..7514322 --- /dev/null +++ b/.packit.yml @@ -0,0 +1,25 @@ +specfile_path: libmodulemd.spec +upstream_package_name: libmodulemd +downstream_package_name: libmodulemd +upstream_tag_template: libmodulemd-{version} +current_version_command: + - ./.packit_version.sh + +synced_files: + - .packit.yml + - .make_packit_specfile.sh + - libmodulemd.spec + +actions: + post-upstream-clone: ./.make_packit_specfile.sh + +jobs: +- job: copr_build + trigger: pull_request + metadata: + targets: fedora-all + +- job: propose_downstream + trigger: release + metadata: + dist-git-branch: fedora-all diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..19936d7 --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 0.8.1. diff --git a/libmodulemd.spec b/libmodulemd.spec index fb4b8a6..777d5db 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,15 +1,15 @@ # Python 2 is dead on F31+ %if ( 0%{?fedora} && 0%{?fedora} <= 30 ) || ( 0%{?rhel} && 0%{?rhel} <= 7) - %global meson_override_flags -Dwith_py3_overrides=true -Dwith_py2_overrides=true + %global meson_python_flags -Dwith_py2=true %global build_python2 1 %else - %global meson_override_flags -Dwith_py3_overrides=true -Dwith_py2_overrides=false + %global meson_python_flags -Dwith_py2=false %global build_python2 0 %endif Name: libmodulemd -Version: 2.8.3 -Release: 2%{?dist} +Version: 2.9.0 +Release: 0.20200212%{?dist} Summary: Module metadata manipulation library License: MIT @@ -36,6 +36,7 @@ BuildRequires: python3-gobject-base %ifarch %{valgrind_arches} BuildRequires: valgrind %endif +BuildRequires: help2man # Patches @@ -59,15 +60,15 @@ Python 2 bindings for %{name} %endif -%package -n python3-%{name} +%package -n python%{python3_pkgversion}-%{name} Summary: Python 3 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: python3-gobject-base +Requires: python%{python3_pkgversion}-gobject-base Requires: %{py3_dist six} -Obsoletes: python3-modulemd < 1.3.4 +Obsoletes: python%{python3_pkgversion}-modulemd < 1.3.4 -%description -n python3-%{name} -Python 3 bindings for %{name} +%description -n python%{python3_pkgversion}-%{name} +Python %{python3_pkgversion} bindings for %{name} %package devel @@ -84,7 +85,10 @@ Development files for libmodulemd. %build -%meson -Ddeveloper_build=false %{meson_override_flags} +%meson -Ddeveloper_build=false \ + -Dskip_formatters=true \ + %{meson_python_flags} + %meson_build @@ -104,18 +108,34 @@ export MMD_SKIP_VALGRIND=1 # Don't run tests on ARM for now. There are problems with # performance on the builders and often these time out. %ifnarch %{arm} aarch64 -%meson_test +# The tests sometimes time out in CI, so give them a little extra time +%{__meson} test -C %{_vpath_builddir} %{?_smp_mesonflags} --print-errorlogs -t 5 %endif %install %meson_install +%if ( 0%{?rhel} && 0%{?rhel} <= 7) +# Don't conflict with modulemd-validator from 1.x included in the official +# RHEL 7 repos +mv %{buildroot}%{_bindir}/modulemd-validator \ + %{buildroot}%{_bindir}/modulemd-validator2 +%endif + + +%ldconfig_scriptlets + %files %license COPYING %doc README.md +%if ( 0%{?rhel} && 0%{?rhel} <= 7) +%{_bindir}/modulemd-validator2 +%else %{_bindir}/modulemd-validator +%endif +%{_mandir}/man1/modulemd-validator.1* %{_libdir}/%{name}.so.2* %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Modulemd-2.0.typelib @@ -138,11 +158,14 @@ export MMD_SKIP_VALGRIND=1 %endif -%files -n python3-%{name} +%files -n python%{python3_pkgversion}-%{name} %{python3_sitearch}/gi/overrides/ %changelog +* Wed Feb 12 2020 Stephen Gallagher - 2.9.0-0.20200212 +- new upstream release: 2.9.0 + * Wed Jan 29 2020 Fedora Release Engineering - 2.8.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index abc5414..01d47e2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.8.3.tar.xz) = 79bf7c1008cebe7cfae0ab3dc2ae74b43c7c78747c63154416700dd5b974dcb4a2c441361b9d8e497bc7f132e2bd735cfa2c6acfd3d8422e207e3517329f3c65 +SHA512 (modulemd-2.9.0.tar.xz) = ef44829b078f1a7ce807edbd043b9964005765c36ff0d7f896d85c7850a02c1414844a60d96ca6fa45efa064407cf62d417fa9100455e656327322f06b814759 From 217e04a860f5b292493d73fd1c9f031b97d2c81e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 12 Feb 2020 22:00:06 -0500 Subject: [PATCH 043/110] Fix release field Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 777d5db..334bfe5 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -9,7 +9,7 @@ Name: libmodulemd Version: 2.9.0 -Release: 0.20200212%{?dist} +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -163,7 +163,7 @@ mv %{buildroot}%{_bindir}/modulemd-validator \ %changelog -* Wed Feb 12 2020 Stephen Gallagher - 2.9.0-0.20200212 +* Wed Feb 12 2020 Stephen Gallagher - 2.9.0-1 - new upstream release: 2.9.0 * Wed Jan 29 2020 Fedora Release Engineering - 2.8.3-2 From 26c80918da8ea8ae0b1014bc04e956d6e8d21c91 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 14 Feb 2020 12:40:11 -0500 Subject: [PATCH 044/110] Don't break tests on systems without py2 Signed-off-by: Stephen Gallagher --- tests/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.yml b/tests/tests.yml index c3eda17..afbcca6 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 python2-libselinux libmodulemd-devel + shell: dnf -y install fedpkg python{2,3}-libselinux libmodulemd-devel --skip-broken - name: Copy spec file to remote machine copy: src: "{{ playbook_dir }}/../libmodulemd.spec" From 17fc7849e20d7354041e8d80de31ad46fa9a7c7b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 14 Feb 2020 12:45:13 -0500 Subject: [PATCH 045/110] [packit] 2.9.1 upstream release Upstream tag: libmodulemd-2.9.1 Upstream commit: b78d1baa Signed-off-by: Stephen Gallagher --- .gitignore | 1 + .make_packit_specfile.sh | 2 +- libmodulemd.spec | 5 ++++- sources | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1a174ad..19b06bc 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ /modulemd-2.8.2.tar.xz /modulemd-2.8.3.tar.xz /modulemd-2.9.0.tar.xz +/modulemd-2.9.1.tar.xz diff --git a/.make_packit_specfile.sh b/.make_packit_specfile.sh index bef12c9..092c9d0 100755 --- a/.make_packit_specfile.sh +++ b/.make_packit_specfile.sh @@ -15,7 +15,7 @@ hash=$(echo $version_desc | cut -d '-' -f4) if [ x$patch_count != x ]; then release=0.${date}.${patch_count}git${hash}%{?dist} else - release=0.${date}%{?dist} + release=1%{?dist} fi ./spec_tmpl.sh version=$version release=$release template=libmodulemd.spec.in > libmodulemd.spec diff --git a/libmodulemd.spec b/libmodulemd.spec index 334bfe5..967055a 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -8,7 +8,7 @@ %endif Name: libmodulemd -Version: 2.9.0 +Version: 2.9.1 Release: 1%{?dist} Summary: Module metadata manipulation library @@ -163,6 +163,9 @@ mv %{buildroot}%{_bindir}/modulemd-validator \ %changelog +* Fri Feb 14 2020 Stephen Gallagher - 2.9.1-1 +- new upstream release: 2.9.1 + * Wed Feb 12 2020 Stephen Gallagher - 2.9.0-1 - new upstream release: 2.9.0 diff --git a/sources b/sources index 01d47e2..ff18530 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.9.0.tar.xz) = ef44829b078f1a7ce807edbd043b9964005765c36ff0d7f896d85c7850a02c1414844a60d96ca6fa45efa064407cf62d417fa9100455e656327322f06b814759 +SHA512 (modulemd-2.9.1.tar.xz) = 9f32bcea4f020edc4bc3de747c4cd588efc80a28922b075185907289bfd88d7436717908594b0709c04ae5dc578b0097591c7fb0f61acad32f4f56e74b3bc375 From 30ae62e232c4f4d7c87a46d5abacd838b9b3ecb5 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 11 Mar 2020 16:37:28 -0400 Subject: [PATCH 046/110] [packit] 2.9.2 upstream release Upstream tag: libmodulemd-2.9.2 Upstream commit: 780750ea Signed-off-by: Stephen Gallagher --- .gitignore | 1 + .packit.yml | 4 +++- libmodulemd.spec | 51 ++++++++++++++++++++++++++++++++---------------- sources | 2 +- 4 files changed, 39 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 19b06bc..f709060 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ /modulemd-2.8.3.tar.xz /modulemd-2.9.0.tar.xz /modulemd-2.9.1.tar.xz +/modulemd-2.9.2.tar.xz diff --git a/.packit.yml b/.packit.yml index 7514322..f445248 100644 --- a/.packit.yml +++ b/.packit.yml @@ -17,7 +17,9 @@ jobs: - job: copr_build trigger: pull_request metadata: - targets: fedora-all + targets: + - fedora-all + - epel-7 - job: propose_downstream trigger: release diff --git a/libmodulemd.spec b/libmodulemd.spec index 967055a..c0da9c6 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -7,14 +7,20 @@ %global build_python2 0 %endif -Name: libmodulemd -Version: 2.9.1 -Release: 1%{?dist} +%global upstream_name libmodulemd + +%if (0%{?rhel} && 0%{?rhel} <= 7) + %global v2_suffix 2 +%endif + +Name: %{upstream_name}%{?v2_suffix} +Version: 2.9.2 +Release: 0.20200311.1gitg31bbd4e%{?dist} Summary: Module metadata manipulation library License: MIT URL: https://github.com/fedora-modularity/libmodulemd -Source0: %{url}/releases/download/%{name}-%{version}/modulemd-%{version}.tar.xz +Source0: %{url}/releases/download/%{upstream_name}-%{version}/modulemd-%{version}.tar.xz BuildRequires: meson >= 0.47 BuildRequires: pkgconfig @@ -31,13 +37,14 @@ BuildRequires: file-devel BuildRequires: python2-devel BuildRequires: python-gobject-base %endif -BuildRequires: python3-devel -BuildRequires: python3-gobject-base +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-gobject-base %ifarch %{valgrind_arches} BuildRequires: valgrind %endif BuildRequires: help2man + # Patches @@ -53,7 +60,6 @@ Summary: Python 2 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python-gobject-base Requires: python-six -Obsoletes: python2-modulemd < 1.3.4 %description -n python2-%{name} Python 2 bindings for %{name} @@ -64,8 +70,13 @@ Python 2 bindings for %{name} Summary: Python 3 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python%{python3_pkgversion}-gobject-base + +%if (0%{?rhel} && 0%{?rhel} <= 7) +# The py3_dist macro on EPEL 7 doesn't work right at the moment +Requires: python3.6dist(six) +%else Requires: %{py3_dist six} -Obsoletes: python%{python3_pkgversion}-modulemd < 1.3.4 +%endif %description -n python%{python3_pkgversion}-%{name} Python %{python3_pkgversion} bindings for %{name} @@ -74,6 +85,10 @@ Python %{python3_pkgversion} bindings for %{name} %package devel Summary: Development files for libmodulemd Requires: %{name}%{?_isa} = %{version}-%{release} +%if (0%{?rhel} && 0%{?rhel} <= 7) +Conflicts: libmodulemd1-devel +Conflicts: libmodulemd-devel +%endif %description devel @@ -120,7 +135,10 @@ export MMD_SKIP_VALGRIND=1 # Don't conflict with modulemd-validator from 1.x included in the official # RHEL 7 repos mv %{buildroot}%{_bindir}/modulemd-validator \ - %{buildroot}%{_bindir}/modulemd-validator2 + %{buildroot}%{_bindir}/modulemd-validator%{?v2_suffix} + +mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ + %{buildroot}%{_mandir}/man1/modulemd-validator%{?v2_suffix}.1 %endif @@ -130,19 +148,15 @@ mv %{buildroot}%{_bindir}/modulemd-validator \ %files %license COPYING %doc README.md -%if ( 0%{?rhel} && 0%{?rhel} <= 7) -%{_bindir}/modulemd-validator2 -%else -%{_bindir}/modulemd-validator -%endif -%{_mandir}/man1/modulemd-validator.1* -%{_libdir}/%{name}.so.2* +%{_bindir}/modulemd-validator%{?v2_suffix} +%{_mandir}/man1/modulemd-validator%{?v2_suffix}.1* +%{_libdir}/%{upstream_name}.so.2* %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Modulemd-2.0.typelib %files devel -%{_libdir}/%{name}.so +%{_libdir}/%{upstream_name}.so %{_libdir}/pkgconfig/modulemd-2.0.pc %{_includedir}/modulemd-2.0/ %dir %{_datadir}/gir-1.0 @@ -163,6 +177,9 @@ mv %{buildroot}%{_bindir}/modulemd-validator \ %changelog +* Wed Mar 11 2020 Stephen Gallagher - 2.9.2-0.20200311.1gitg31bbd4e +- new upstream release: 2.9.2 + * Fri Feb 14 2020 Stephen Gallagher - 2.9.1-1 - new upstream release: 2.9.1 diff --git a/sources b/sources index ff18530..6c76530 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.9.1.tar.xz) = 9f32bcea4f020edc4bc3de747c4cd588efc80a28922b075185907289bfd88d7436717908594b0709c04ae5dc578b0097591c7fb0f61acad32f4f56e74b3bc375 +SHA512 (modulemd-2.9.2.tar.xz) = 7605f5d0f90a4af0ca2b40a90a5701c71d5ee4c4e276433f440670102100809b2d026c8c676f11adf2b0d50201df5caf326e464b6f4f3c139cb62bc711f3ee28 From 296bee430ebb016595a5547f31d4234efccf1696 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 11 Mar 2020 16:43:33 -0400 Subject: [PATCH 047/110] [packit] 2.9.2 upstream release Upstream tag: libmodulemd-2.9.2 Upstream commit: 780750ea Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmodulemd.spec b/libmodulemd.spec index c0da9c6..c00310f 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -180,6 +180,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ * Wed Mar 11 2020 Stephen Gallagher - 2.9.2-0.20200311.1gitg31bbd4e - new upstream release: 2.9.2 +* Wed Mar 11 2020 Stephen Gallagher - 2.9.2-0.20200311.1gitg31bbd4e +- new upstream release: 2.9.2 + * Fri Feb 14 2020 Stephen Gallagher - 2.9.1-1 - new upstream release: 2.9.1 From efa04b7cb68dbd33443c69e110a632d3686c7ad5 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 11 Mar 2020 16:47:47 -0400 Subject: [PATCH 048/110] [packit] 2.9.2 upstream release Upstream tag: libmodulemd-2.9.2 Upstream commit: 780750ea Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index c00310f..4ad1d65 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -15,7 +15,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.9.2 -Release: 0.20200311.1gitg31bbd4e%{?dist} +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -177,6 +177,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed Mar 11 2020 Stephen Gallagher - 2.9.2-1 +- new upstream release: 2.9.2 + * Wed Mar 11 2020 Stephen Gallagher - 2.9.2-0.20200311.1gitg31bbd4e - new upstream release: 2.9.2 From 566e43aa06dc340e33dca36f3c4e8914f27dbad7 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 11 Mar 2020 17:02:05 -0400 Subject: [PATCH 049/110] Rebuild Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 4ad1d65..75c1677 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -15,7 +15,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.9.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -177,7 +177,7 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog -* Wed Mar 11 2020 Stephen Gallagher - 2.9.2-1 +* Wed Mar 11 2020 Stephen Gallagher - 2.9.2-2 - new upstream release: 2.9.2 * Wed Mar 11 2020 Stephen Gallagher - 2.9.2-0.20200311.1gitg31bbd4e From 2afb480854b634d836c10e45a3522d87ee308fd9 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 1 Apr 2020 09:32:35 -0400 Subject: [PATCH 050/110] Fix build against Python 3.9 Resolves: rhbz#1817665 Signed-off-by: Stephen Gallagher --- ...-valgrind-suppression-for-Python-3.9.patch | 37 +++++++++++++++++++ libmodulemd.spec | 7 +++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0001-additional-valgrind-suppression-for-Python-3.9.patch diff --git a/0001-additional-valgrind-suppression-for-Python-3.9.patch b/0001-additional-valgrind-suppression-for-Python-3.9.patch new file mode 100644 index 0000000..1eafb6b --- /dev/null +++ b/0001-additional-valgrind-suppression-for-Python-3.9.patch @@ -0,0 +1,37 @@ +From b1feeb990f536147d5c49c6d002b04a9436eeea2 Mon Sep 17 00:00:00 2001 +From: Merlin Mathesius +Date: Fri, 27 Mar 2020 13:53:13 -0500 +Subject: [PATCH] additional valgrind suppression for Python 3.9 + +--- + contrib/valgrind/libmodulemd-python.supp | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/contrib/valgrind/libmodulemd-python.supp b/contrib/valgrind/libmodulemd-python.supp +index fe9814d86daa340ec1283becee78514d1d93e3ff..080669825eab28459e032488f348cf8a90455e23 100644 +--- a/contrib/valgrind/libmodulemd-python.supp ++++ b/contrib/valgrind/libmodulemd-python.supp +@@ -54,10 +54,20 @@ + fun:g_malloc + fun:g_strdup + ... + fun:PyObject_SetAttr + } ++{ ++ Handle Python 3.9 PyMalloc confusing valgrind ++ Memcheck:Leak ++ fun:malloc ++ fun:PyThread_allocate_lock ++ ... ++ fun:Py_InitializeFromConfig ++ ... ++ fun:Py_BytesMain ++} + { + Python3 Unicode uninitialized value + Memcheck:Cond + fun:PyUnicode_Decode + ... +-- +2.25.1 + diff --git a/libmodulemd.spec b/libmodulemd.spec index 75c1677..a62f3c9 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -15,7 +15,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.9.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Module metadata manipulation library License: MIT @@ -46,6 +46,7 @@ BuildRequires: help2man # Patches +Patch0001: 0001-additional-valgrind-suppression-for-Python-3.9.patch %description @@ -177,6 +178,10 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed Apr 01 2020 Stephen Gallagher - 2.9.2-3 +- Fix build against Python 3.9 +- Resolves: rhbz#1817665 + * Wed Mar 11 2020 Stephen Gallagher - 2.9.2-2 - new upstream release: 2.9.2 From 35d8ffd6d601bd496a55edbd99a8313a107c2d77 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 1 Apr 2020 10:04:57 -0400 Subject: [PATCH 051/110] Add gating for updates Signed-off-by: Stephen Gallagher --- gating.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..a10084d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,19 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_testing +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} + - !PassingTestCaseRule {test_case_name: dist.rpmdeplint} + - !PassingTestCaseRule {test_case_name: dist.abicheck} + +--- !Policy +product_versions: + - fedora-* +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: dist.rpmdeplint} + - !PassingTestCaseRule {test_case_name: dist.abicheck} From 05f8dde7a257bda1fd466ecfbecf10c67197fe7b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 1 Apr 2020 11:27:54 -0400 Subject: [PATCH 052/110] Skip rpmdeplint from gating due to https://github.com/fedora-infra/bodhi/issues/3944 Signed-off-by: Stephen Gallagher --- gating.yaml | 2 -- libmodulemd.spec | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gating.yaml b/gating.yaml index a10084d..ee84da4 100644 --- a/gating.yaml +++ b/gating.yaml @@ -5,7 +5,6 @@ decision_context: bodhi_update_push_testing subject_type: koji_build rules: - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} - - !PassingTestCaseRule {test_case_name: dist.rpmdeplint} - !PassingTestCaseRule {test_case_name: dist.abicheck} --- !Policy @@ -15,5 +14,4 @@ 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: dist.rpmdeplint} - !PassingTestCaseRule {test_case_name: dist.abicheck} diff --git a/libmodulemd.spec b/libmodulemd.spec index a62f3c9..14fbef2 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -15,7 +15,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.9.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Module metadata manipulation library License: MIT @@ -178,6 +178,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed Apr 01 2020 Stephen Gallagher - 2.9.2-4 +- Skip rpmdeplint from gating due to https://github.com/fedora-infra/bodhi/issues/3944 + * Wed Apr 01 2020 Stephen Gallagher - 2.9.2-3 - Fix build against Python 3.9 - Resolves: rhbz#1817665 From b55b1da4f2a979c7da1453c7bdb21c62b9127615 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 8 Apr 2020 10:45:26 -0400 Subject: [PATCH 053/110] [packit] 2.9.3 upstream release Upstream tag: libmodulemd-2.9.3 Upstream commit: e4a27c0963f45a3d6ae9f98791aeff0597b50c76 Signed-off-by: Stephen Gallagher --- .gitignore | 1 + README.packit | 2 +- libmodulemd.spec | 8 +++++--- sources | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f709060..1a63ee0 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ /modulemd-2.9.0.tar.xz /modulemd-2.9.1.tar.xz /modulemd-2.9.2.tar.xz +/modulemd-2.9.3.tar.xz diff --git a/README.packit b/README.packit index 19936d7..7fa1bff 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.8.1. +The file was generated using packit 0.7.1. diff --git a/libmodulemd.spec b/libmodulemd.spec index 14fbef2..8d682c7 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -14,8 +14,8 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.9.2 -Release: 4%{?dist} +Version: 2.9.3 +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -46,7 +46,6 @@ BuildRequires: help2man # Patches -Patch0001: 0001-additional-valgrind-suppression-for-Python-3.9.patch %description @@ -178,6 +177,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed Apr 08 2020 Stephen Gallagher - 2.9.3-1 +- new upstream release: 2.9.3 + * Wed Apr 01 2020 Stephen Gallagher - 2.9.2-4 - Skip rpmdeplint from gating due to https://github.com/fedora-infra/bodhi/issues/3944 diff --git a/sources b/sources index 6c76530..c160d1f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.9.2.tar.xz) = 7605f5d0f90a4af0ca2b40a90a5701c71d5ee4c4e276433f440670102100809b2d026c8c676f11adf2b0d50201df5caf326e464b6f4f3c139cb62bc711f3ee28 +SHA512 (modulemd-2.9.3.tar.xz) = 48f09210a42ac6e8ee25cc4c1cf4ac527339ec4fa580f0f98766243d53d7b71e45d3a63d32be2efa9143d2d145652ea7cb12f8f0135e886304350c8210d7c884 From 84f2ca4ce507a8b4f9213789018cfcd906736106 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 8 Apr 2020 12:13:57 -0400 Subject: [PATCH 054/110] Drop upstreamed patch Signed-off-by: Stephen Gallagher --- ...-valgrind-suppression-for-Python-3.9.patch | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 0001-additional-valgrind-suppression-for-Python-3.9.patch diff --git a/0001-additional-valgrind-suppression-for-Python-3.9.patch b/0001-additional-valgrind-suppression-for-Python-3.9.patch deleted file mode 100644 index 1eafb6b..0000000 --- a/0001-additional-valgrind-suppression-for-Python-3.9.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b1feeb990f536147d5c49c6d002b04a9436eeea2 Mon Sep 17 00:00:00 2001 -From: Merlin Mathesius -Date: Fri, 27 Mar 2020 13:53:13 -0500 -Subject: [PATCH] additional valgrind suppression for Python 3.9 - ---- - contrib/valgrind/libmodulemd-python.supp | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/contrib/valgrind/libmodulemd-python.supp b/contrib/valgrind/libmodulemd-python.supp -index fe9814d86daa340ec1283becee78514d1d93e3ff..080669825eab28459e032488f348cf8a90455e23 100644 ---- a/contrib/valgrind/libmodulemd-python.supp -+++ b/contrib/valgrind/libmodulemd-python.supp -@@ -54,10 +54,20 @@ - fun:g_malloc - fun:g_strdup - ... - fun:PyObject_SetAttr - } -+{ -+ Handle Python 3.9 PyMalloc confusing valgrind -+ Memcheck:Leak -+ fun:malloc -+ fun:PyThread_allocate_lock -+ ... -+ fun:Py_InitializeFromConfig -+ ... -+ fun:Py_BytesMain -+} - { - Python3 Unicode uninitialized value - Memcheck:Cond - fun:PyUnicode_Decode - ... --- -2.25.1 - From 0bc81ec0ad231bb45db99eae499c7d01936c7d88 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 20 May 2020 15:40:22 -0400 Subject: [PATCH 055/110] [packit] 2.9.4 upstream release Upstream tag: libmodulemd-2.9.4 Upstream commit: c7254db0 Signed-off-by: Stephen Gallagher --- .gitignore | 1 + README.packit | 2 +- libmodulemd.spec | 23 ++++++----------------- sources | 2 +- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 1a63ee0..75e3b62 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ /modulemd-2.9.1.tar.xz /modulemd-2.9.2.tar.xz /modulemd-2.9.3.tar.xz +/modulemd-2.9.4.tar.xz diff --git a/README.packit b/README.packit index 7fa1bff..c3895b5 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.7.1. +The file was generated using packit 0.10.1. diff --git a/libmodulemd.spec b/libmodulemd.spec index 8d682c7..9bd3da9 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,5 +1,4 @@ -# Python 2 is dead on F31+ -%if ( 0%{?fedora} && 0%{?fedora} <= 30 ) || ( 0%{?rhel} && 0%{?rhel} <= 7) +%if 0%{?rhel} && 0%{?rhel} <= 7 %global meson_python_flags -Dwith_py2=true %global build_python2 1 %else @@ -14,8 +13,8 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.9.3 -Release: 1%{?dist} +Version: 2.9.4 +Release: 2.9.300520.1gitgc19757c%{?dist} Summary: Module metadata manipulation library License: MIT @@ -39,9 +38,6 @@ BuildRequires: python-gobject-base %endif BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-gobject-base -%ifarch %{valgrind_arches} -BuildRequires: valgrind -%endif BuildRequires: help2man @@ -101,7 +97,6 @@ Development files for libmodulemd. %build %meson -Ddeveloper_build=false \ - -Dskip_formatters=true \ %{meson_python_flags} %meson_build @@ -111,15 +106,6 @@ Development files for libmodulemd. export LC_CTYPE=C.utf8 -%ifarch %{power64} s390x -# Valgrind is broken on ppc64[le] with GCC7: -# https://bugs.kde.org/show_bug.cgi?id=386945 -export MMD_SKIP_VALGRIND=1 -%endif -%ifnarch %{valgrind_arches} -export MMD_SKIP_VALGRIND=1 -%endif - # Don't run tests on ARM for now. There are problems with # performance on the builders and often these time out. %ifnarch %{arm} aarch64 @@ -177,6 +163,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed May 20 2020 Stephen Gallagher - 2.9.4-2.9.300520.1gitgc19757c +- new upstream release: 2.9.4 + * Wed Apr 08 2020 Stephen Gallagher - 2.9.3-1 - new upstream release: 2.9.3 diff --git a/sources b/sources index c160d1f..113935d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.9.3.tar.xz) = 48f09210a42ac6e8ee25cc4c1cf4ac527339ec4fa580f0f98766243d53d7b71e45d3a63d32be2efa9143d2d145652ea7cb12f8f0135e886304350c8210d7c884 +SHA512 (modulemd-2.9.4.tar.xz) = f1feec56507cf294ce01a24b77fb851671d331408ecf7dd453eb2b39dc5eb5548b6376b6b1b8e5ccbc75503e1260651e8c1995e2d3b29830e1c322451f861a11 From 3949089b57411443617630aa2fa65df3d6707bfc Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 20 May 2020 15:47:32 -0400 Subject: [PATCH 056/110] [packit] 2.9.4 upstream release Upstream tag: libmodulemd-2.9.4 Upstream commit: c7254db0 Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 9bd3da9..de09399 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -14,7 +14,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.9.4 -Release: 2.9.300520.1gitgc19757c%{?dist} +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -163,6 +163,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed May 20 2020 Stephen Gallagher - 2.9.4-1 +- new upstream release: 2.9.4 + * Wed May 20 2020 Stephen Gallagher - 2.9.4-2.9.300520.1gitgc19757c - new upstream release: 2.9.4 From eb87df0d9fbc1253291ea5c9391f6380b2c52588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 25 May 2020 12:29:56 +0200 Subject: [PATCH 057/110] Rebuilt for Python 3.9 --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index de09399..3b5f5a1 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -14,7 +14,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.9.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -163,6 +163,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Mon May 25 2020 Miro Hrončok - 2.9.4-2 +- Rebuilt for Python 3.9 + * Wed May 20 2020 Stephen Gallagher - 2.9.4-1 - new upstream release: 2.9.4 From 94668302f27d30bbbc8b431bd3a37b12dac8ba9e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 05:07:03 +0000 Subject: [PATCH 058/110] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_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 3b5f5a1..e934197 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -14,7 +14,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.9.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Module metadata manipulation library License: MIT @@ -163,6 +163,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 2.9.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Mon May 25 2020 Miro Hrončok - 2.9.4-2 - Rebuilt for Python 3.9 From fd693ae0d16655c4f9da9d01af9b6e41c12211c1 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 6 Aug 2020 11:19:17 -0400 Subject: [PATCH 059/110] Update .gitignore file Signed-off-by: Stephen Gallagher --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 75e3b62..094ed8b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ +/.build*.log +*~ +*.swp +*.rpm +/modulemd-*/ /modulemd-0.1.0.tar.xz /modulemd-0.2.0.tar.xz /modulemd-0.2.1.tar.xz From c50987c78dded6f69754bfd7e7924965abb6d605 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 20 Nov 2020 15:39:07 -0500 Subject: [PATCH 060/110] Release 2.10.0 https://github.com/fedora-modularity/libmodulemd/releases/tag/libmodulemd-2.10.0 Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 094ed8b..a8f831b 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ /modulemd-2.9.2.tar.xz /modulemd-2.9.3.tar.xz /modulemd-2.9.4.tar.xz +/modulemd-2.10.0.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index e934197..736e1c7 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -13,8 +13,8 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.9.4 -Release: 3%{?dist} +Version: 2.10.0 +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -163,6 +163,10 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Fri Nov 20 2020 Stephen Gallagher - 2.10.0-1 +- Release 2.10.0 +- https://github.com/fedora-modularity/libmodulemd/releases/tag/libmodulemd-2.10.0 + * Tue Jul 28 2020 Fedora Release Engineering - 2.9.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 113935d..83fc3e0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.9.4.tar.xz) = f1feec56507cf294ce01a24b77fb851671d331408ecf7dd453eb2b39dc5eb5548b6376b6b1b8e5ccbc75503e1260651e8c1995e2d3b29830e1c322451f861a11 +SHA512 (modulemd-2.10.0.tar.xz) = 543480867c98c0d46b4a48040ae08936c9e501875a7f95250a9d97466d00cad8d6e00c8220c32f503c0c3559cc6767ab1a85b13a9861761f1679a83e408ad4b2 From 5b0762224fd54b2534cbafa87d5556c11b94a42b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 20 Nov 2020 16:37:55 -0500 Subject: [PATCH 061/110] Fix integer size issue on 32-bit platforms Signed-off-by: Stephen Gallagher --- ...teger-size-issue-on-32-bit-platforms.patch | 108 ++++++++++++++++++ libmodulemd.spec | 6 +- 2 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-integer-size-issue-on-32-bit-platforms.patch diff --git a/0001-Fix-integer-size-issue-on-32-bit-platforms.patch b/0001-Fix-integer-size-issue-on-32-bit-platforms.patch new file mode 100644 index 0000000..dad3472 --- /dev/null +++ b/0001-Fix-integer-size-issue-on-32-bit-platforms.patch @@ -0,0 +1,108 @@ +From 3b77fdc0ee3c74d258d0a92f7ae0e8354239d8ee Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Fri, 20 Nov 2020 15:52:27 -0500 +Subject: [PATCH] Fix integer size issue on 32-bit platforms + +Signed-off-by: Stephen Gallagher +--- + modulemd/modulemd-module.c | 6 +++--- + modulemd/modulemd-obsoletes.c | 7 ++++--- + modulemd/modulemd-util.c | 2 +- + 3 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/modulemd/modulemd-module.c b/modulemd/modulemd-module.c +index 8cc79952a209392a1e51ecf61145499207e58e4c..1b1ee71eaf01d0ab53dcfa839fda1177d73a5628 100644 +--- a/modulemd/modulemd-module.c ++++ b/modulemd/modulemd-module.c +@@ -875,12 +875,12 @@ modulemd_module_add_obsoletes (ModulemdModule *self, + modulemd_obsoletes_get_module_context (temp_obsoletes))) + { + continue; + } + g_info ( +- "Overriding existing obsolete because of idenical stream: %s, " +- "context: %s and modified time: %lu.", ++ "Overriding existing obsolete because of identical stream: %s, " ++ "context: %s and modified time: %" PRIu64 ".", + modulemd_obsoletes_get_module_stream (obsoletes), + modulemd_obsoletes_get_module_context (obsoletes), + modulemd_obsoletes_get_modified (obsoletes)); + g_ptr_array_remove (self->obsoletes, temp_obsoletes); + break; +@@ -965,11 +965,11 @@ modulemd_module_add_obsoletes (ModulemdModule *self, + current_obsoletes)) + { + g_info ( + "Multiple obsoletes for module: %s, stream: %s, context: " + "%s " +- "with identical modified time: %lu", ++ "with identical modified time: %" PRIu64, + modulemd_module_get_module_name (self), + stream_str, + context_str, + new_obsoletes_mod); + } +diff --git a/modulemd/modulemd-obsoletes.c b/modulemd/modulemd-obsoletes.c +index 46bbc435309542208ddb3d45fca5c95fe07651d4..ceb7682d423a99f129aae401d9dfd40349c3320e 100644 +--- a/modulemd/modulemd-obsoletes.c ++++ b/modulemd/modulemd-obsoletes.c +@@ -1090,11 +1090,11 @@ modulemd_obsoletes_emit_yaml (ModulemdObsoletes *self, + { + g_set_error ( + error, + MODULEMD_ERROR, + MMD_ERROR_VALIDATE, +- "Cannot convert modified date: %lu to iso8601 date.", ++ "Cannot convert modified date: %" PRIu64 " to iso8601 date.", + modulemd_obsoletes_get_modified (MODULEMD_OBSOLETES (self))); + return FALSE; + } + if (!mmd_emitter_scalar ( + emitter, modified_string, YAML_PLAIN_SCALAR_STYLE, error)) +@@ -1164,11 +1164,12 @@ modulemd_obsoletes_emit_yaml (ModulemdObsoletes *self, + if (eol_date_string == NULL) + { + g_set_error (error, + MODULEMD_ERROR, + MMD_ERROR_VALIDATE, +- "Cannot convert eol_date: %lu to iso8601 date.", ++ "Cannot convert eol_date: %" PRIu64 ++ " to iso8601 date.", + eol_date); + return FALSE; + } + EMIT_KEY_VALUE (emitter, error, "eol_date", eol_date_string); + } +@@ -1229,11 +1230,11 @@ modulemd_obsoletes_is_active (ModulemdObsoletes *self) + time (&rawtime); + tm = gmtime (&rawtime); + + char buf[255]; + strftime (buf, sizeof (buf), "%Y%m%d%H%M", tm); +- guint64 now = atol (buf); ++ guint64 now = g_ascii_strtoull (buf, NULL, 0); + + if (now >= modulemd_obsoletes_get_eol_date (self)) + { + return TRUE; + } +diff --git a/modulemd/modulemd-util.c b/modulemd/modulemd-util.c +index 2a50bb598e53da707bfc0a6acc1d68d1dd4213ab..7c4c891e8c65b7d83e34880b16a08a2fcb80e49e 100644 +--- a/modulemd/modulemd-util.c ++++ b/modulemd/modulemd-util.c +@@ -519,11 +519,11 @@ modulemd_iso8601date_to_guint64 (const gchar *iso8601) + } + + char buf[32]; + strftime (buf, sizeof (buf), "%Y%m%d%H%M", &tm); + +- return atol (buf); ++ return g_ascii_strtoull (buf, NULL, 0); + } + + + gchar * + modulemd_guint64_to_iso8601date (guint64 date) +-- +2.28.0 + diff --git a/libmodulemd.spec b/libmodulemd.spec index 736e1c7..fc1b00f 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -14,7 +14,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.10.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -42,6 +42,7 @@ BuildRequires: help2man # Patches +Patch0001: 0001-Fix-integer-size-issue-on-32-bit-platforms.patch %description @@ -163,6 +164,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Fri Nov 20 2020 Stephen Gallagher - 2.10.0-2 +- Fix integer size issue on 32-bit platforms + * Fri Nov 20 2020 Stephen Gallagher - 2.10.0-1 - Release 2.10.0 - https://github.com/fedora-modularity/libmodulemd/releases/tag/libmodulemd-2.10.0 From 2f84cc068f3f0f5b64c3364374acc035a3ecc9a3 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 10 Dec 2020 13:22:46 -0500 Subject: [PATCH 062/110] Release 2.11.0 Signed-off-by: Stephen Gallagher --- .gitignore | 1 + ...teger-size-issue-on-32-bit-platforms.patch | 108 ------------------ libmodulemd.spec | 8 +- sources | 2 +- 4 files changed, 7 insertions(+), 112 deletions(-) delete mode 100644 0001-Fix-integer-size-issue-on-32-bit-platforms.patch diff --git a/.gitignore b/.gitignore index a8f831b..d8d3cd9 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ /modulemd-2.9.3.tar.xz /modulemd-2.9.4.tar.xz /modulemd-2.10.0.tar.xz +/modulemd-2.11.0.tar.xz diff --git a/0001-Fix-integer-size-issue-on-32-bit-platforms.patch b/0001-Fix-integer-size-issue-on-32-bit-platforms.patch deleted file mode 100644 index dad3472..0000000 --- a/0001-Fix-integer-size-issue-on-32-bit-platforms.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 3b77fdc0ee3c74d258d0a92f7ae0e8354239d8ee Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Fri, 20 Nov 2020 15:52:27 -0500 -Subject: [PATCH] Fix integer size issue on 32-bit platforms - -Signed-off-by: Stephen Gallagher ---- - modulemd/modulemd-module.c | 6 +++--- - modulemd/modulemd-obsoletes.c | 7 ++++--- - modulemd/modulemd-util.c | 2 +- - 3 files changed, 8 insertions(+), 7 deletions(-) - -diff --git a/modulemd/modulemd-module.c b/modulemd/modulemd-module.c -index 8cc79952a209392a1e51ecf61145499207e58e4c..1b1ee71eaf01d0ab53dcfa839fda1177d73a5628 100644 ---- a/modulemd/modulemd-module.c -+++ b/modulemd/modulemd-module.c -@@ -875,12 +875,12 @@ modulemd_module_add_obsoletes (ModulemdModule *self, - modulemd_obsoletes_get_module_context (temp_obsoletes))) - { - continue; - } - g_info ( -- "Overriding existing obsolete because of idenical stream: %s, " -- "context: %s and modified time: %lu.", -+ "Overriding existing obsolete because of identical stream: %s, " -+ "context: %s and modified time: %" PRIu64 ".", - modulemd_obsoletes_get_module_stream (obsoletes), - modulemd_obsoletes_get_module_context (obsoletes), - modulemd_obsoletes_get_modified (obsoletes)); - g_ptr_array_remove (self->obsoletes, temp_obsoletes); - break; -@@ -965,11 +965,11 @@ modulemd_module_add_obsoletes (ModulemdModule *self, - current_obsoletes)) - { - g_info ( - "Multiple obsoletes for module: %s, stream: %s, context: " - "%s " -- "with identical modified time: %lu", -+ "with identical modified time: %" PRIu64, - modulemd_module_get_module_name (self), - stream_str, - context_str, - new_obsoletes_mod); - } -diff --git a/modulemd/modulemd-obsoletes.c b/modulemd/modulemd-obsoletes.c -index 46bbc435309542208ddb3d45fca5c95fe07651d4..ceb7682d423a99f129aae401d9dfd40349c3320e 100644 ---- a/modulemd/modulemd-obsoletes.c -+++ b/modulemd/modulemd-obsoletes.c -@@ -1090,11 +1090,11 @@ modulemd_obsoletes_emit_yaml (ModulemdObsoletes *self, - { - g_set_error ( - error, - MODULEMD_ERROR, - MMD_ERROR_VALIDATE, -- "Cannot convert modified date: %lu to iso8601 date.", -+ "Cannot convert modified date: %" PRIu64 " to iso8601 date.", - modulemd_obsoletes_get_modified (MODULEMD_OBSOLETES (self))); - return FALSE; - } - if (!mmd_emitter_scalar ( - emitter, modified_string, YAML_PLAIN_SCALAR_STYLE, error)) -@@ -1164,11 +1164,12 @@ modulemd_obsoletes_emit_yaml (ModulemdObsoletes *self, - if (eol_date_string == NULL) - { - g_set_error (error, - MODULEMD_ERROR, - MMD_ERROR_VALIDATE, -- "Cannot convert eol_date: %lu to iso8601 date.", -+ "Cannot convert eol_date: %" PRIu64 -+ " to iso8601 date.", - eol_date); - return FALSE; - } - EMIT_KEY_VALUE (emitter, error, "eol_date", eol_date_string); - } -@@ -1229,11 +1230,11 @@ modulemd_obsoletes_is_active (ModulemdObsoletes *self) - time (&rawtime); - tm = gmtime (&rawtime); - - char buf[255]; - strftime (buf, sizeof (buf), "%Y%m%d%H%M", tm); -- guint64 now = atol (buf); -+ guint64 now = g_ascii_strtoull (buf, NULL, 0); - - if (now >= modulemd_obsoletes_get_eol_date (self)) - { - return TRUE; - } -diff --git a/modulemd/modulemd-util.c b/modulemd/modulemd-util.c -index 2a50bb598e53da707bfc0a6acc1d68d1dd4213ab..7c4c891e8c65b7d83e34880b16a08a2fcb80e49e 100644 ---- a/modulemd/modulemd-util.c -+++ b/modulemd/modulemd-util.c -@@ -519,11 +519,11 @@ modulemd_iso8601date_to_guint64 (const gchar *iso8601) - } - - char buf[32]; - strftime (buf, sizeof (buf), "%Y%m%d%H%M", &tm); - -- return atol (buf); -+ return g_ascii_strtoull (buf, NULL, 0); - } - - - gchar * - modulemd_guint64_to_iso8601date (guint64 date) --- -2.28.0 - diff --git a/libmodulemd.spec b/libmodulemd.spec index fc1b00f..c9f80a4 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -13,8 +13,8 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.10.0 -Release: 2%{?dist} +Version: 2.11.0 +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -42,7 +42,6 @@ BuildRequires: help2man # Patches -Patch0001: 0001-Fix-integer-size-issue-on-32-bit-platforms.patch %description @@ -164,6 +163,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Dec 10 2020 Stephen Gallagher - 2.11.0-1 +- Release 2.11.0 + * Fri Nov 20 2020 Stephen Gallagher - 2.10.0-2 - Fix integer size issue on 32-bit platforms diff --git a/sources b/sources index 83fc3e0..4aefce4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.10.0.tar.xz) = 543480867c98c0d46b4a48040ae08936c9e501875a7f95250a9d97466d00cad8d6e00c8220c32f503c0c3559cc6767ab1a85b13a9861761f1679a83e408ad4b2 +SHA512 (modulemd-2.11.0.tar.xz) = ebd07892cfb08fcb9fac53c4d5db22cea843a9129f604485953731dcdebf363fc7368379888fd7e5ce4142695e91affdae4cc53b5c76b3db0057a556f603f8c5 From 95b41cf3d5e5127cc2b930a2607d4c8ea33ba509 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 17 Dec 2020 12:28:45 -0500 Subject: [PATCH 063/110] Release 2.11.1 Ignore Packager documents when running ModuleIndex.update_from_*() Add python overrides for XMD in PackagerV3 Add python override to ignore the GType return when reading packager files Add PackagerV3.get_mdversion() Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 9 ++++++++- sources | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d8d3cd9..c9b910b 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ /modulemd-2.9.4.tar.xz /modulemd-2.10.0.tar.xz /modulemd-2.11.0.tar.xz +/modulemd-2.11.1.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index c9f80a4..9ce4fe8 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -13,7 +13,7 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.11.0 +Version: 2.11.1 Release: 1%{?dist} Summary: Module metadata manipulation library @@ -163,6 +163,13 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Dec 17 2020 Stephen Gallagher - 2.11.1-1 +- Release 2.11.1 +- Ignore Packager documents when running ModuleIndex.update_from_*() +- Add python overrides for XMD in PackagerV3 +- Add python override to ignore the GType return when reading packager files +- Add PackagerV3.get_mdversion() + * Thu Dec 10 2020 Stephen Gallagher - 2.11.0-1 - Release 2.11.0 diff --git a/sources b/sources index 4aefce4..4c5e946 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.11.0.tar.xz) = ebd07892cfb08fcb9fac53c4d5db22cea843a9129f604485953731dcdebf363fc7368379888fd7e5ce4142695e91affdae4cc53b5c76b3db0057a556f603f8c5 +SHA512 (modulemd-2.11.1.tar.xz) = 025fdd2b9add9ad6a28cbea34ebe18ba326ca8b5cb7bdf4ea2dc05bccac8b081927a1232bde43541922664792137cc75742526bf05e18906f9443531d5d4ee80 From 6dde83e7fa2249d0be9fe16e56248293f0eefffc Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 17 Dec 2020 12:50:20 -0500 Subject: [PATCH 064/110] Drop nonexistent ABI test Signed-off-by: Stephen Gallagher --- gating.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/gating.yaml b/gating.yaml index ee84da4..f075ad7 100644 --- a/gating.yaml +++ b/gating.yaml @@ -5,7 +5,6 @@ decision_context: bodhi_update_push_testing subject_type: koji_build rules: - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} - - !PassingTestCaseRule {test_case_name: dist.abicheck} --- !Policy product_versions: @@ -14,4 +13,3 @@ 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: dist.abicheck} From c95513481174ed980275d7615f7c114b6e78670e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 7 Jan 2021 20:21:28 -0500 Subject: [PATCH 065/110] Release 2.11.2 Extend read_packager_[file|string]() to support overriding the module name and stream. Signed-off-by: Stephen Gallagher --- .gitignore | 1 + libmodulemd.spec | 7 ++++++- sources | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c9b910b..c8267dc 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ /modulemd-2.10.0.tar.xz /modulemd-2.11.0.tar.xz /modulemd-2.11.1.tar.xz +/modulemd-2.11.2.tar.xz diff --git a/libmodulemd.spec b/libmodulemd.spec index 9ce4fe8..8e14739 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -13,7 +13,7 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.11.1 +Version: 2.11.2 Release: 1%{?dist} Summary: Module metadata manipulation library @@ -163,6 +163,11 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jan 07 2021 Stephen Gallagher - 2.11.2-1 +- Release 2.11.2 +- Extend read_packager_[file|string]() to support overriding the module name + and stream. + * Thu Dec 17 2020 Stephen Gallagher - 2.11.1-1 - Release 2.11.1 - Ignore Packager documents when running ModuleIndex.update_from_*() diff --git a/sources b/sources index 4c5e946..323d1f4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.11.1.tar.xz) = 025fdd2b9add9ad6a28cbea34ebe18ba326ca8b5cb7bdf4ea2dc05bccac8b081927a1232bde43541922664792137cc75742526bf05e18906f9443531d5d4ee80 +SHA512 (modulemd-2.11.2.tar.xz) = 1430273a48abea390890871f796f3fe329149d7e404e4508d0486bbebb9cd06edb1136fa639a73ef85dd12002e470c868de05a8d2b816ed8fb5c7ed6be31e785 From d64a0948084f1f4493494a7a9b3744ff534ee68b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 12 Jan 2021 10:29:14 -0500 Subject: [PATCH 066/110] Fix issue with ModuleIndex when input contains only Obsoletes documents Fix import issue when built with Python 2 support Signed-off-by: Stephen Gallagher --- ...Add-missing-staticmethod-for-python2.patch | 31 ++++ ...letes-ensure-index-has-stream-mdvers.patch | 154 ++++++++++++++++++ libmodulemd.spec | 8 +- 3 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 0001-Add-missing-staticmethod-for-python2.patch create mode 100644 0002-When-adding-obsoletes-ensure-index-has-stream-mdvers.patch diff --git a/0001-Add-missing-staticmethod-for-python2.patch b/0001-Add-missing-staticmethod-for-python2.patch new file mode 100644 index 0000000..27d62bc --- /dev/null +++ b/0001-Add-missing-staticmethod-for-python2.patch @@ -0,0 +1,31 @@ +From d8722735c4c5198a0a11ddaebf011034f677aa7f Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Mon, 11 Jan 2021 15:25:03 -0500 +Subject: [PATCH 1/2] Add missing @staticmethod for python2 + +Fixes: https://github.com/fedora-modularity/libmodulemd/issues/537 + +Signed-off-by: Stephen Gallagher +--- + bindings/python/gi/overrides/Modulemd.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/bindings/python/gi/overrides/Modulemd.py b/bindings/python/gi/overrides/Modulemd.py +index 9e6d1c212e663c4d1392ce9c8d4ea66abbc9f7ac..23d5218cbe37c9d08f9d88debb541f6467b68404 100644 +--- a/bindings/python/gi/overrides/Modulemd.py ++++ b/bindings/python/gi/overrides/Modulemd.py +@@ -26,10 +26,11 @@ Modulemd = get_introspection_module("Modulemd") + + __all__ = [] + + + class ModulemdUtil(object): ++ @staticmethod + def strip_gtype(method): + @functools.wraps(method) + def wrapped(*args, **kwargs): + ret = method(*args, **kwargs) + if len(ret) == 2: +-- +2.29.2 + diff --git a/0002-When-adding-obsoletes-ensure-index-has-stream-mdvers.patch b/0002-When-adding-obsoletes-ensure-index-has-stream-mdvers.patch new file mode 100644 index 0000000..4991b19 --- /dev/null +++ b/0002-When-adding-obsoletes-ensure-index-has-stream-mdvers.patch @@ -0,0 +1,154 @@ +From 8606b0c341a9a3b13add67e7b42c57ef36ad3fec Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= +Date: Tue, 12 Jan 2021 09:55:39 +0100 +Subject: [PATCH 2/2] When adding obsoletes ensure index has stream mdversion + at least 2 + +Signed-off-by: Stephen Gallagher +--- + modulemd/modulemd-module-index.c | 13 +++++ + modulemd/tests/test-modulemd-merger.c | 83 +++++++++++++++++++++++++++ + 2 files changed, 96 insertions(+) + +diff --git a/modulemd/modulemd-module-index.c b/modulemd/modulemd-module-index.c +index 82ae1e168d2443c7c54bb94d39b233ad62ef887b..dd5a777e0f30deec1c42e6e3eaaab661ba97ff92 100644 +--- a/modulemd/modulemd-module-index.c ++++ b/modulemd/modulemd-module-index.c +@@ -1288,15 +1288,28 @@ modulemd_module_index_add_obsoletes (ModulemdModuleIndex *self, + GError **error) + { + g_autoptr (GError) nested_error = NULL; + + g_return_val_if_fail (MODULEMD_IS_MODULE_INDEX (self), FALSE); ++ g_return_val_if_fail (MODULEMD_IS_OBSOLETES (obsoletes), FALSE); + + modulemd_module_add_obsoletes ( + get_or_create_module (self, + modulemd_obsoletes_get_module_name (obsoletes)), + obsoletes); ++ ++ /* Obsoletes need at least MD_MODULESTREAM_VERSION_TWO */ ++ if (self->stream_mdversion < MD_MODULESTREAM_VERSION_TWO) ++ { ++ if (!modulemd_module_index_upgrade_streams ( ++ self, MD_MODULESTREAM_VERSION_TWO, &nested_error)) ++ { ++ g_propagate_error (error, g_steal_pointer (&nested_error)); ++ return FALSE; ++ } ++ } ++ + return TRUE; + } + + + GHashTable * +diff --git a/modulemd/tests/test-modulemd-merger.c b/modulemd/tests/test-modulemd-merger.c +index 34b14e75ef60e037d9cef371e0ae033874e62a70..cd5379838832ec3c9d487e96b81b2259d97649fa 100644 +--- a/modulemd/tests/test-modulemd-merger.c ++++ b/modulemd/tests/test-modulemd-merger.c +@@ -774,10 +774,90 @@ merger_test_obsoletes_incompatible (void) + GPtrArray *obsoletes = NULL; + obsoletes = modulemd_module_get_obsoletes (module); + g_assert_cmpint (obsoletes->len, ==, 1); + } + ++static void ++merger_test_obsoletes_lone_obsolete (void) ++{ ++ // clang-format off ++ g_autofree gchar *obsolete_str = g_strdup( ++"---\n" ++"document: modulemd-obsoletes\n" ++"version: 1\n" ++"data:\n" ++" modified: 2020-05-01T00:00Z\n" ++" module: nodejs\n" ++" context: 6c81f848\n" ++" stream: 5\n" ++" message: \"obsoleting obsoletes\"\n" ++" obsoleted_by:\n" ++" module: nodejs\n" ++" stream: 10\n" ++"...\n"); ++ // clang-format on ++ ++ // clang-format off ++ g_autofree gchar *stream_str = g_strdup( ++"---\n" ++"document: modulemd\n" ++"version: 2\n" ++"data:\n" ++" name: nodejs\n" ++" stream: 5\n" ++" version: 99\n" ++" context: 6c81f848\n" ++" arch: x86_64\n" ++" summary: Javascript runtime\n" ++" description: >-\n" ++" Node.js is a platform built on Chrome''s JavaScript runtime.\n" ++" license:\n" ++" module:\n" ++" - MIT\n" ++"...\n"); ++ // clang-format on ++ ++ g_autoptr (GPtrArray) failures = NULL; ++ g_autoptr (GError) error = NULL; ++ g_autoptr (ModulemdModuleIndex) obsolete_idx = modulemd_module_index_new (); ++ g_autoptr (ModulemdModuleIndex) stream_idx = modulemd_module_index_new (); ++ g_autoptr (ModulemdModuleIndex) merged_idx = NULL; ++ g_autoptr (ModulemdModuleIndexMerger) merger = ++ modulemd_module_index_merger_new (); ++ gboolean ret; ++ ++ ret = modulemd_module_index_update_from_string ( ++ obsolete_idx, obsolete_str, TRUE, &failures, &error); ++ modulemd_subdocument_info_debug_dump_failures (failures); ++ g_assert_no_error (error); ++ g_assert_true (ret); ++ ++ ret = modulemd_module_index_update_from_string ( ++ stream_idx, stream_str, TRUE, &failures, &error); ++ modulemd_subdocument_info_debug_dump_failures (failures); ++ g_assert_no_error (error); ++ g_assert_true (ret); ++ ++ modulemd_module_index_merger_associate_index (merger, obsolete_idx, 0); ++ modulemd_module_index_merger_associate_index (merger, stream_idx, 0); ++ merged_idx = modulemd_module_index_merger_resolve (merger, &error); ++ ++ g_assert_nonnull (merged_idx); ++ g_assert_no_error (error); ++ ++ g_autoptr (ModulemdModuleStream) stream = NULL; ++ stream = g_object_ref (modulemd_module_get_stream_by_NSVCA ( ++ modulemd_module_index_get_module (merged_idx, "nodejs"), ++ "5", ++ 99, ++ NULL, ++ NULL, ++ &error)); ++ g_assert_nonnull (stream); ++ g_assert_no_error (error); ++} ++ + + int + main (int argc, char *argv[]) + { + setlocale (LC_ALL, ""); +@@ -819,7 +899,10 @@ main (int argc, char *argv[]) + merger_test_obsoletes_priority); + + g_test_add_func ("/modulemd/module/index/merger/obsoletes/incompatibility", + merger_test_obsoletes_incompatible); + ++ g_test_add_func ("/modulemd/module/index/merger/obsoletes/lone_obsolete", ++ merger_test_obsoletes_lone_obsolete); ++ + return g_test_run (); + } +-- +2.29.2 + diff --git a/libmodulemd.spec b/libmodulemd.spec index 8e14739..728f146 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -14,7 +14,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.11.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -42,6 +42,8 @@ BuildRequires: help2man # Patches +Patch0001: 0001-Add-missing-staticmethod-for-python2.patch +Patch0002: 0002-When-adding-obsoletes-ensure-index-has-stream-mdvers.patch %description @@ -163,6 +165,10 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Tue Jan 12 2021 Stephen Gallagher - 2.11.2-2 +- Fix issue with ModuleIndex when input contains only Obsoletes documents +- Fix import issue when built with Python 2 support + * Thu Jan 07 2021 Stephen Gallagher - 2.11.2-1 - Release 2.11.2 - Extend read_packager_[file|string]() to support overriding the module name From 1647405f050303c8fe6cd42b46d62a56e2f2d285 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 14 Jan 2021 21:22:21 -0500 Subject: [PATCH 067/110] Add support for 'buildorder' to Packager documents Signed-off-by: Stephen Gallagher --- .gitignore | 1 + ...Add-missing-staticmethod-for-python2.patch | 31 ---- ...letes-ensure-index-has-stream-mdvers.patch | 154 ------------------ libmodulemd.spec | 9 +- sources | 2 +- 5 files changed, 7 insertions(+), 190 deletions(-) delete mode 100644 0001-Add-missing-staticmethod-for-python2.patch delete mode 100644 0002-When-adding-obsoletes-ensure-index-has-stream-mdvers.patch diff --git a/.gitignore b/.gitignore index c8267dc..fc15bef 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ /modulemd-2.11.0.tar.xz /modulemd-2.11.1.tar.xz /modulemd-2.11.2.tar.xz +/modulemd-2.12.0.tar.xz diff --git a/0001-Add-missing-staticmethod-for-python2.patch b/0001-Add-missing-staticmethod-for-python2.patch deleted file mode 100644 index 27d62bc..0000000 --- a/0001-Add-missing-staticmethod-for-python2.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d8722735c4c5198a0a11ddaebf011034f677aa7f Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Mon, 11 Jan 2021 15:25:03 -0500 -Subject: [PATCH 1/2] Add missing @staticmethod for python2 - -Fixes: https://github.com/fedora-modularity/libmodulemd/issues/537 - -Signed-off-by: Stephen Gallagher ---- - bindings/python/gi/overrides/Modulemd.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/bindings/python/gi/overrides/Modulemd.py b/bindings/python/gi/overrides/Modulemd.py -index 9e6d1c212e663c4d1392ce9c8d4ea66abbc9f7ac..23d5218cbe37c9d08f9d88debb541f6467b68404 100644 ---- a/bindings/python/gi/overrides/Modulemd.py -+++ b/bindings/python/gi/overrides/Modulemd.py -@@ -26,10 +26,11 @@ Modulemd = get_introspection_module("Modulemd") - - __all__ = [] - - - class ModulemdUtil(object): -+ @staticmethod - def strip_gtype(method): - @functools.wraps(method) - def wrapped(*args, **kwargs): - ret = method(*args, **kwargs) - if len(ret) == 2: --- -2.29.2 - diff --git a/0002-When-adding-obsoletes-ensure-index-has-stream-mdvers.patch b/0002-When-adding-obsoletes-ensure-index-has-stream-mdvers.patch deleted file mode 100644 index 4991b19..0000000 --- a/0002-When-adding-obsoletes-ensure-index-has-stream-mdvers.patch +++ /dev/null @@ -1,154 +0,0 @@ -From 8606b0c341a9a3b13add67e7b42c57ef36ad3fec Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= -Date: Tue, 12 Jan 2021 09:55:39 +0100 -Subject: [PATCH 2/2] When adding obsoletes ensure index has stream mdversion - at least 2 - -Signed-off-by: Stephen Gallagher ---- - modulemd/modulemd-module-index.c | 13 +++++ - modulemd/tests/test-modulemd-merger.c | 83 +++++++++++++++++++++++++++ - 2 files changed, 96 insertions(+) - -diff --git a/modulemd/modulemd-module-index.c b/modulemd/modulemd-module-index.c -index 82ae1e168d2443c7c54bb94d39b233ad62ef887b..dd5a777e0f30deec1c42e6e3eaaab661ba97ff92 100644 ---- a/modulemd/modulemd-module-index.c -+++ b/modulemd/modulemd-module-index.c -@@ -1288,15 +1288,28 @@ modulemd_module_index_add_obsoletes (ModulemdModuleIndex *self, - GError **error) - { - g_autoptr (GError) nested_error = NULL; - - g_return_val_if_fail (MODULEMD_IS_MODULE_INDEX (self), FALSE); -+ g_return_val_if_fail (MODULEMD_IS_OBSOLETES (obsoletes), FALSE); - - modulemd_module_add_obsoletes ( - get_or_create_module (self, - modulemd_obsoletes_get_module_name (obsoletes)), - obsoletes); -+ -+ /* Obsoletes need at least MD_MODULESTREAM_VERSION_TWO */ -+ if (self->stream_mdversion < MD_MODULESTREAM_VERSION_TWO) -+ { -+ if (!modulemd_module_index_upgrade_streams ( -+ self, MD_MODULESTREAM_VERSION_TWO, &nested_error)) -+ { -+ g_propagate_error (error, g_steal_pointer (&nested_error)); -+ return FALSE; -+ } -+ } -+ - return TRUE; - } - - - GHashTable * -diff --git a/modulemd/tests/test-modulemd-merger.c b/modulemd/tests/test-modulemd-merger.c -index 34b14e75ef60e037d9cef371e0ae033874e62a70..cd5379838832ec3c9d487e96b81b2259d97649fa 100644 ---- a/modulemd/tests/test-modulemd-merger.c -+++ b/modulemd/tests/test-modulemd-merger.c -@@ -774,10 +774,90 @@ merger_test_obsoletes_incompatible (void) - GPtrArray *obsoletes = NULL; - obsoletes = modulemd_module_get_obsoletes (module); - g_assert_cmpint (obsoletes->len, ==, 1); - } - -+static void -+merger_test_obsoletes_lone_obsolete (void) -+{ -+ // clang-format off -+ g_autofree gchar *obsolete_str = g_strdup( -+"---\n" -+"document: modulemd-obsoletes\n" -+"version: 1\n" -+"data:\n" -+" modified: 2020-05-01T00:00Z\n" -+" module: nodejs\n" -+" context: 6c81f848\n" -+" stream: 5\n" -+" message: \"obsoleting obsoletes\"\n" -+" obsoleted_by:\n" -+" module: nodejs\n" -+" stream: 10\n" -+"...\n"); -+ // clang-format on -+ -+ // clang-format off -+ g_autofree gchar *stream_str = g_strdup( -+"---\n" -+"document: modulemd\n" -+"version: 2\n" -+"data:\n" -+" name: nodejs\n" -+" stream: 5\n" -+" version: 99\n" -+" context: 6c81f848\n" -+" arch: x86_64\n" -+" summary: Javascript runtime\n" -+" description: >-\n" -+" Node.js is a platform built on Chrome''s JavaScript runtime.\n" -+" license:\n" -+" module:\n" -+" - MIT\n" -+"...\n"); -+ // clang-format on -+ -+ g_autoptr (GPtrArray) failures = NULL; -+ g_autoptr (GError) error = NULL; -+ g_autoptr (ModulemdModuleIndex) obsolete_idx = modulemd_module_index_new (); -+ g_autoptr (ModulemdModuleIndex) stream_idx = modulemd_module_index_new (); -+ g_autoptr (ModulemdModuleIndex) merged_idx = NULL; -+ g_autoptr (ModulemdModuleIndexMerger) merger = -+ modulemd_module_index_merger_new (); -+ gboolean ret; -+ -+ ret = modulemd_module_index_update_from_string ( -+ obsolete_idx, obsolete_str, TRUE, &failures, &error); -+ modulemd_subdocument_info_debug_dump_failures (failures); -+ g_assert_no_error (error); -+ g_assert_true (ret); -+ -+ ret = modulemd_module_index_update_from_string ( -+ stream_idx, stream_str, TRUE, &failures, &error); -+ modulemd_subdocument_info_debug_dump_failures (failures); -+ g_assert_no_error (error); -+ g_assert_true (ret); -+ -+ modulemd_module_index_merger_associate_index (merger, obsolete_idx, 0); -+ modulemd_module_index_merger_associate_index (merger, stream_idx, 0); -+ merged_idx = modulemd_module_index_merger_resolve (merger, &error); -+ -+ g_assert_nonnull (merged_idx); -+ g_assert_no_error (error); -+ -+ g_autoptr (ModulemdModuleStream) stream = NULL; -+ stream = g_object_ref (modulemd_module_get_stream_by_NSVCA ( -+ modulemd_module_index_get_module (merged_idx, "nodejs"), -+ "5", -+ 99, -+ NULL, -+ NULL, -+ &error)); -+ g_assert_nonnull (stream); -+ g_assert_no_error (error); -+} -+ - - int - main (int argc, char *argv[]) - { - setlocale (LC_ALL, ""); -@@ -819,7 +899,10 @@ main (int argc, char *argv[]) - merger_test_obsoletes_priority); - - g_test_add_func ("/modulemd/module/index/merger/obsoletes/incompatibility", - merger_test_obsoletes_incompatible); - -+ g_test_add_func ("/modulemd/module/index/merger/obsoletes/lone_obsolete", -+ merger_test_obsoletes_lone_obsolete); -+ - return g_test_run (); - } --- -2.29.2 - diff --git a/libmodulemd.spec b/libmodulemd.spec index 728f146..2816129 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -13,8 +13,8 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.11.2 -Release: 2%{?dist} +Version: 2.12.0 +Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT @@ -42,8 +42,6 @@ BuildRequires: help2man # Patches -Patch0001: 0001-Add-missing-staticmethod-for-python2.patch -Patch0002: 0002-When-adding-obsoletes-ensure-index-has-stream-mdvers.patch %description @@ -165,6 +163,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jan 14 2021 Stephen Gallagher - 2.12.0-1 +- Add support for 'buildorder' to Packager documents + * Tue Jan 12 2021 Stephen Gallagher - 2.11.2-2 - Fix issue with ModuleIndex when input contains only Obsoletes documents - Fix import issue when built with Python 2 support diff --git a/sources b/sources index 323d1f4..2ae70ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modulemd-2.11.2.tar.xz) = 1430273a48abea390890871f796f3fe329149d7e404e4508d0486bbebb9cd06edb1136fa639a73ef85dd12002e470c868de05a8d2b816ed8fb5c7ed6be31e785 +SHA512 (modulemd-2.12.0.tar.xz) = 8dda8bf92a0e1ad4578bf15099443bc1ef42b4a0609a635b2e7a885c878994ce64c1670ffb75ab566ac6ce08f87e0b2807149d08fe3b701abd0ef4a4a9569f88 From 88cd0dc170cc0f535611fec0c978db77d5ae2ab7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 17:31:59 +0000 Subject: [PATCH 068/110] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_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 2816129..8cabda3 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -14,7 +14,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.12.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -163,6 +163,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 2.12.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Thu Jan 14 2021 Stephen Gallagher - 2.12.0-1 - Add support for 'buildorder' to Packager documents From 8cc66e7e53d4e2a8228f5424ad052b643fe85ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 3 May 2021 15:50:48 +0200 Subject: [PATCH 069/110] 2.12.1 bump --- .gitignore | 2 ++ ...-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg | Bin 0 -> 2895 bytes libmodulemd.spec | 11 +++++++++-- sources | 3 ++- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg diff --git a/.gitignore b/.gitignore index fc15bef..3dc62ef 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,5 @@ /modulemd-2.11.1.tar.xz /modulemd-2.11.2.tar.xz /modulemd-2.12.0.tar.xz +/modulemd-2.12.1.tar.xz +/modulemd-2.12.1.tar.xz.asc diff --git a/gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg b/gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg new file mode 100644 index 0000000000000000000000000000000000000000..3cbbce4a35934919221753bbf487140def1ea837 GIT binary patch literal 2895 zcmb8wX*3j!0><%~F=7xJ`|>i9XeP@rNR|xQQfA0flAXpIV;PK)HM<(h8j+o>g@o)& zVK5kF-?L3JWJ$Jr?tRZa_uen}-23VI^nClD^GgSv1>0QtjR$f9wxJ1MlLv2)&5qlg zjASL@VJtC}5M;&S1E8dORI5xbcCe3YRX|6K1CICj?U9kRtC0Vb7O~B)Gkf#wYk{P^ zPlp=(q=}_G$c*Aidzegy@tmT{G?(6oGY{D=QRT&gE^^phIjfP@jjTItQut-nWqRd- z*yHToF?)6WVG~T%8}QZ(v3-VNqw>1IGq<1%oa?uL5TJ=uJ_D)Mr|7YdAcF1D?oYmm zna(`-t}ddgGkYTJnnl~?SEeB~9qG5go^z|k88)?g&K~t%MD{-;5uXBdqzZG6&YF|R z5`LgJ%0_C}j*y&G!k`rJJ2{)icQYPK|7Crj6wdKNL+)UFt472>e8Tt*7s{DbXkw%J zv3Gr;VB)PjX|SD|vm?=*9HJvrGq_v0Z5q04ANwnJNXaHz(`c*N-61{>f}bt)e|6sI z#ymr0&TTq=YQw?#@(^-%`cSAzVD|NwF9%B{fcsND(KffOOp`o8A$|Fi{bp{B7<}DE z1HaY+({fgdsVt6r=! z$J4uzf_isw3+!GW>*_jaq91sAk5y3ind%>_S1UoO7nuo{V zSJTVM5ohNua{-wF8oXlQ#U0rJ9-Le;!=2?d%uq##lI4C2Bgp2;?@f>p z10w`VW&kj5kD$&DXur1*nkN>cXRIRhQJdB~Ow1TKqn?gv1`d*N$f^rzEjEC?Pgvy27$; zCc0+-_)%8Gl~B2+etM1~nBM}Jh}l~IEp7D?}><$;59M4Y~w?d zmwMJ~%-mxY8|ClSR!x2oL_hRsX%zp!O9xa9;EFqCR3x<#8c_M&P;RvgoK_)|UY`Yj zrTG?UJQzuoq%}jnwW$rFy4}nUEBENnPmU=+Mej`P3jG4w9Y?nc$FWbS^#un;0v}ON zxp_oedN$qNYoM43Gws8Bus@-|66$Y z|0_JFIgZmCo{SX*7AS%Awa zwY3OtFN#swyA2h$o$e>F_!Z^0H0MGU!ph}-9zn;BLTjHo&HDkbX$n$I01I_4*IHn% ziw!kbSs0u<#hKG|91><+EA@820L3ltrwxL`FX+Hbx) zO=SDYVUHd&T4DSZpYon)c|rPs#VB<8B(+!3-SyMMZg|7!j$KZsowjr8nCEpwcmapA z*}~JA!5VdD7p29~XhU?1k`b(K9JD<&-_wosuTjq9GP|)?a79F*`oy=Hf*JSp0rlO{ zHK0s7KXwXG&qlGYa#I=!&y>{2MWSqaWx(OLOf#Ly{C^x|#M|lwEXkX1?jn1OOQmO* zz5RsO+*0-gLoK8}vmfs z$gRRdc=ck?UX)-tS`HeiXP#Ird|uVS(v1CFT-OqzT?7Q7WlXv2IQX=3|zitoW~fwakIm5BO!_?92S7&UWMJ-z182H_QPh?FvPXy;O^? zC3~I`gLS)l$rb)!)^0~cXN8xps__rx<)X=qCM8;aF`N*=4A;YZW)L;KCm`r_L!oD1 zn=5xt-GppK)hb=H=u!8Rny2xFF4ii4?GUX`sf^5gPPgia|oU5nr09ij&jEv33ibK_$i z^*4R$l{xqy9Cg=dU`yUh_98{Ra}$7q%F#qz+3g->^|n|&kN5S!nXqOGhSkAt{s_Cb z_0*cl=XeEX^|c-U$$W#m_NjkJ{&Viy*v}@XsmTdXAK4slwvmw1p7sCmF9xIr<_9tZ zF8(*)@E{?!zkK_5$4p{50TYFApTZy?vtTRUTYMy?yDRg-!hEW%nW*CrP}9y3fmj97o$Qz>`K)TGggCVhDv;jz)|&p5ytA)VZ1>>-Shc+%Dy0 z%yU_U4FlhuQyM*x?}`@9M1MJ4GSH}Af#&stEP9CLj-=*F$ic-O`S$4>w%e$dWOA=* zwwu{28Is_7D5W3>S5MCxh`~b6HnW6SSLL1hfXRI5++OL?yHC#@M@bpfTScw32&87} z>`wo3T6$wujn!pk{@A5kZ+u*`G@HEMQ&vXGOEr|!B}-0!&kE}nubjM~Ta8SXR0=q) z9Vm9K#`_2MWf;*mZ8A(O;x+M2eq71K-ITsfeEi9f*<)#r z@t#RsHZ%|2ev?(YMsC#1t{wznmIP`~*s7mRPfS3OAMQwd+2hMP^ z6fIENQH= 0.47 BuildRequires: pkgconfig BuildRequires: gcc @@ -92,6 +95,7 @@ Development files for libmodulemd. %prep +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %autosetup -p1 -n modulemd-%{version} @@ -163,6 +167,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Mon May 03 2021 Petr Pisar - 2.12.1-1 +- 2.12.1 bump + * Tue Jan 26 2021 Fedora Release Engineering - 2.12.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 2ae70ad..9e0fc7c 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (modulemd-2.12.0.tar.xz) = 8dda8bf92a0e1ad4578bf15099443bc1ef42b4a0609a635b2e7a885c878994ce64c1670ffb75ab566ac6ce08f87e0b2807149d08fe3b701abd0ef4a4a9569f88 +SHA512 (modulemd-2.12.1.tar.xz) = 2bd4242f0f1aea561a5b899678237f7390652987e02c46652b72eadebde60d7cfb82d93e0a720e3c070261a7449245b9319b9fd755aba1c6f354660a959373b3 +SHA512 (modulemd-2.12.1.tar.xz.asc) = 072141c83a991ac7f1177d2e3ccf2b050c2d644453c5e815ad826b8fe4a994954d0754c9da5279727ccc74f182c193f89d5f227ff0580b0a8ab3e730ab52b287 From 9b2beab4279a70ffd931289b94450aca3ae5b460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 6 May 2021 13:27:49 +0200 Subject: [PATCH 070/110] Correct source addresses 2.12.1 was released from "2.12.1" tag. Also document a source of the PGP keyring as required by the packaging guidelines. --- libmodulemd.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index ef77f02..0051684 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -19,8 +19,9 @@ Summary: Module metadata manipulation library License: MIT URL: https://github.com/fedora-modularity/libmodulemd -Source0: %{url}/releases/download/%{upstream_name}-%{version}/modulemd-%{version}.tar.xz -Source1: %{url}/releases/download/%{upstream_name}-%{version}/modulemd-%{version}.tar.xz.asc +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 BuildRequires: gnupg2 From efaa141247498cfdb25b14f904e12ddfdf0b6d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 11 May 2021 11:31:20 +0200 Subject: [PATCH 071/110] Document licenses --- libmodulemd.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libmodulemd.spec b/libmodulemd.spec index 0051684..f360ba6 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -17,6 +17,10 @@ Version: 2.12.1 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 License: MIT URL: https://github.com/fedora-modularity/libmodulemd Source0: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz From 7bc296f67b201fbe797953226b9440d95e1688a1 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 17:22:03 +0200 Subject: [PATCH 072/110] Rebuilt for Python 3.10 --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index f360ba6..77525a2 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -14,7 +14,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.12.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -172,6 +172,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Fri Jun 04 2021 Python Maint - 2.12.1-2 +- Rebuilt for Python 3.10 + * Mon May 03 2021 Petr Pisar - 2.12.1-1 - 2.12.1 bump From f5554ca43666459b3be6b88378d8d71defc6986e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 9 Jul 2021 13:28:12 +0200 Subject: [PATCH 073/110] 2.13.0 bump --- .gitignore | 2 ++ libmodulemd.spec | 66 ++++++++++++++++++++++++++++-------------------- sources | 4 +-- 3 files changed, 42 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index 3dc62ef..2d27b90 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,5 @@ /modulemd-2.12.0.tar.xz /modulemd-2.12.1.tar.xz /modulemd-2.12.1.tar.xz.asc +/modulemd-2.13.0.tar.xz +/modulemd-2.13.0.tar.xz.asc diff --git a/libmodulemd.spec b/libmodulemd.spec index 77525a2..747f84f 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -1,9 +1,12 @@ %if 0%{?rhel} && 0%{?rhel} <= 7 - %global meson_python_flags -Dwith_py2=true + # There is no python3-gobject-base in RHEL 7. But it exists in EPEL 7. + %global meson_python_flags -Dwith_py2=true -Dwith_py3=true %global build_python2 1 + %global build_python3 1 %else - %global meson_python_flags -Dwith_py2=false + %global meson_python_flags -Dwith_py2=false -Dwith_py3=true %global build_python2 0 + %global build_python3 1 %endif %global upstream_name libmodulemd @@ -13,8 +16,8 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.12.1 -Release: 2%{?dist} +Version: 2.13.0 +Release: 1%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -44,8 +47,10 @@ BuildRequires: file-devel BuildRequires: python2-devel BuildRequires: python-gobject-base %endif +%if %{build_python3} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-gobject-base +%endif BuildRequires: help2man @@ -53,37 +58,38 @@ BuildRequires: help2man %description -C Library for manipulating module metadata files. +C library for manipulating module metadata files. See https://github.com/fedora-modularity/libmodulemd/blob/master/README.md for more details. %if %{build_python2} %package -n python2-%{name} -Summary: Python 2 bindings for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: python-gobject-base -Requires: python-six +Summary: Python 2 bindings for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python-gobject-base +Requires: python-six %description -n python2-%{name} -Python 2 bindings for %{name} +Python 2 bindings for %{name}. %endif +%if %{build_python3} %package -n python%{python3_pkgversion}-%{name} -Summary: Python 3 bindings for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: python%{python3_pkgversion}-gobject-base - +Summary: Python 3 bindings for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python%{python3_pkgversion}-gobject-base %if (0%{?rhel} && 0%{?rhel} <= 7) # The py3_dist macro on EPEL 7 doesn't work right at the moment -Requires: python3.6dist(six) +Requires: python3.6dist(six) %else -Requires: %{py3_dist six} +Requires: %{py3_dist six} %endif %description -n python%{python3_pkgversion}-%{name} -Python %{python3_pkgversion} bindings for %{name} +Python %{python3_pkgversion} bindings for %{name}. +%endif %package devel @@ -96,7 +102,7 @@ Conflicts: libmodulemd-devel %description devel -Development files for libmodulemd. +Development files for %{name}. %prep @@ -105,22 +111,21 @@ Development files for libmodulemd. %build -%meson -Ddeveloper_build=false \ - %{meson_python_flags} - +%meson \ + -Dlibmagic=enabled \ + -Drpmio=enabled \ + -Dskip_introspection=false \ + -Dtest_installed_lib=false \ + -Dwith_docs=true \ + -Dwith_manpages=enabled \ + %{meson_python_flags} %meson_build %check - export LC_CTYPE=C.utf8 - -# Don't run tests on ARM for now. There are problems with -# performance on the builders and often these time out. -%ifnarch %{arm} aarch64 # The tests sometimes time out in CI, so give them a little extra time %{__meson} test -C %{_vpath_builddir} %{?_smp_mesonflags} --print-errorlogs -t 5 -%endif %install @@ -142,7 +147,7 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %files %license COPYING -%doc README.md +%doc NEWS README.md %{_bindir}/modulemd-validator%{?v2_suffix} %{_mandir}/man1/modulemd-validator%{?v2_suffix}.1* %{_libdir}/%{upstream_name}.so.2* @@ -167,11 +172,16 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %endif +%if %{build_python3} %files -n python%{python3_pkgversion}-%{name} %{python3_sitearch}/gi/overrides/ +%endif %changelog +* Fri Jul 09 2021 Petr Pisar - 2.13.0-1 +- 2.13.0 bump + * Fri Jun 04 2021 Python Maint - 2.12.1-2 - Rebuilt for Python 3.10 diff --git a/sources b/sources index 9e0fc7c..4fa392a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (modulemd-2.12.1.tar.xz) = 2bd4242f0f1aea561a5b899678237f7390652987e02c46652b72eadebde60d7cfb82d93e0a720e3c070261a7449245b9319b9fd755aba1c6f354660a959373b3 -SHA512 (modulemd-2.12.1.tar.xz.asc) = 072141c83a991ac7f1177d2e3ccf2b050c2d644453c5e815ad826b8fe4a994954d0754c9da5279727ccc74f182c193f89d5f227ff0580b0a8ab3e730ab52b287 +SHA512 (modulemd-2.13.0.tar.xz) = b2a4fa4120d4dca714ef724a9e8f805d4f8a306a950e670f86f6184467c070ddb93360fff3bb079eb3a442b52024fe796ceb1195800d62bbb1f5cb67f8889e05 +SHA512 (modulemd-2.13.0.tar.xz.asc) = f588c1333b91db297ab5ec7e67f1d62884d4f58032a75feed1b3c3ff2ae67eb0f13a4209605f4a32d00fe6ccb3561b6fab81c2196f1d4439222b0e141f541ff6 From 91e1569e7cb81720195bb56e716f8ff08d8cf99e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 11:51:55 +0000 Subject: [PATCH 074/110] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_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 747f84f..57d00c8 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -17,7 +17,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.13.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -179,6 +179,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 2.13.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri Jul 09 2021 Petr Pisar - 2.13.0-1 - 2.13.0 bump From a09554e4b815ff1f2a5ca42d92c1b0dafaaaa98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 14 Sep 2021 14:32:10 +0200 Subject: [PATCH 075/110] Accept an invalid buildorder 18446744073709551615 found in RHEL 8 repositories --- libmodulemd.spec | 18 +- ...73709551615-buildorder-if-accept_ove.patch | 192 ++++++++++++++++++ tests/tests.yml | 2 +- 3 files changed, 210 insertions(+), 2 deletions(-) create mode 100644 modulemd-2.13.0-Accept-18446744073709551615-buildorder-if-accept_ove.patch diff --git a/libmodulemd.spec b/libmodulemd.spec index 57d00c8..399817e 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -9,6 +9,13 @@ %global build_python3 1 %endif +%if (0%{?fedora} && 0%{?fedora} <= 50) || (0%{?rhel} && 0%{?rhel} <= 10) + # Support RHEL 8 module builds with an invalid buildorder. + %global meson_accept_overflowed_buildorder_flag -Daccept_overflowed_buildorder=true +%else + %global meson_accept_overflowed_buildorder_flag -Daccept_overflowed_buildorder=false +%endif + %global upstream_name libmodulemd %if (0%{?rhel} && 0%{?rhel} <= 7) @@ -17,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.13.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -30,6 +37,10 @@ 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 +# Accept invalid, but existing buildorder 18446744073709551615 when loading +# modulemd-v2 documents, bug #1984402, , +# in upstream after 2.13.0 +Patch0: modulemd-2.13.0-Accept-18446744073709551615-buildorder-if-accept_ove.patch BuildRequires: gnupg2 BuildRequires: meson >= 0.47 @@ -112,6 +123,7 @@ Development files for %{name}. %build %meson \ + %{meson_accept_overflowed_buildorder_flag} \ -Dlibmagic=enabled \ -Drpmio=enabled \ -Dskip_introspection=false \ @@ -179,6 +191,10 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Tue Sep 14 2021 Petr Pisar - 2.13.0-3 +- Accept an invalid buildorder 18446744073709551615 found in RHEL 8 repositories + (https://pagure.io/koji/issue/3025) + * Thu Jul 22 2021 Fedora Release Engineering - 2.13.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/modulemd-2.13.0-Accept-18446744073709551615-buildorder-if-accept_ove.patch b/modulemd-2.13.0-Accept-18446744073709551615-buildorder-if-accept_ove.patch new file mode 100644 index 0000000..2e54628 --- /dev/null +++ b/modulemd-2.13.0-Accept-18446744073709551615-buildorder-if-accept_ove.patch @@ -0,0 +1,192 @@ +From b0dd663edd6ab66ec26c48ff34a52afa040694e6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 22 Jul 2021 15:23:55 +0200 +Subject: [PATCH] Accept 18446744073709551615 buildorder if + accept_overflowed_buildorder build boolean is true +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +7c0158bcec05b692d27e37ff46a134f4e294d957 commit (Reject invalid signed +integers (rpm buildorder), as found in 2.13.0 release, fortified +parsing signed integers. + +It turned out that RHEL 8 delivers a few modules: + +container-tools:rhel8:8020120200601155013:ffd2803a +container-tools:rhel8:8030020200923153805:2a301c24 +container-tools:rhel8:8030020201124131330:830d479e +container-tools:rhel8:8030120210208205200:c127ee91 + +which contain an invalid buildorder value 18446744073709551615. DNF +then warned on loading them into an index and ignored them: + + # dnf module list --repoid pulp-appstream + Last metadata expiration check: 3:59:10 ago on Wed 21 Jul 2021 12:38:00 PM CEST. + Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 118 col 9] + Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 118 col 9] + Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 107 col 9] + Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 114 col 9] + Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 118 col 9] + Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 118 col 9] + Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 107 col 9] + Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 114 col 9] + +Those were probably built with a broken MBS/libmodulemd which +loaded -1 and serialized it as an 64-bit unsigned integer +18446744073709551615. + +Because the distributor does not change once-released builds, it +became impossible to process them with libmodulemd-2.13.0. + +This patch adds an accept_overflowed_buildorder build option (disabled +by default) which enables a workaround to accept 18446744073709551615 +string as -1 integer when parsing 64-bit signed integers. (The type is +used only in buildorder field now). + +(Originally, I developed a more complicated patch only affecting +loading while keeping validation strict. But that was not enough for +DNF, creareterepo_c and probably many other tools. Thus I prepared +even more complicated patch affecting both loading and validation of +modulemd formats only (cf. modulemd-packager-v3) and that helped DNF. +But the patch ugglified to code to much and considering it's only +a temporary hack, I decided for this simple patch which affects +loading and validation of all formats.) + +Petr Písař: Ported to 2.13.0 from +37a688cc12d7fbab67fda95c47a4605405d7a154. + +Signed-off-by: Petr Písař +--- + meson.build | 1 + + meson_options.txt | 3 +++ + modulemd/meson.build | 2 ++ + modulemd/modulemd-yaml-util.c | 11 +++++++++++ + modulemd/tests/test-modulemd-parse_int64.c | 15 ++++++++++++++- + 5 files changed, 31 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 37792b3..bbb56ba 100644 +--- a/meson.build ++++ b/meson.build +@@ -215,6 +215,7 @@ if meson.version().version_compare('>=0.53') + 'Python 2 Support': get_option('with_py2'), + 'Python 3 Support': get_option('with_py3'), + 'Skip Introspection': get_option('skip_introspection'), ++ 'Accept overflowed buildorder': get_option('accept_overflowed_buildorder'), + 'Test Installed Library': get_option('test_installed_lib'), + }, section: 'Build Configuration') + endif +diff --git a/meson_options.txt b/meson_options.txt +index 7873d42..3d84459 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -11,6 +11,9 @@ + # + # REMEMBER TO UPDATE THE SUMMARY() IN meson.build when adding options here + ++option('accept_overflowed_buildorder', type : 'boolean', value: 'false', ++ description : 'Accept overflowed 18446744073709551615 buildorder as -1. This breaks a specification, but some RHEL 8 module builds look like that.') ++ + option('verbose_tests', type : 'boolean', value : true, + description : 'Tests that are run under the "debug" configuration will print all debug messages. Disable this option for valgrind checks, as it speeds it up substantially.') + +diff --git a/modulemd/meson.build b/modulemd/meson.build +index 2a60364..0b74818 100644 +--- a/modulemd/meson.build ++++ b/modulemd/meson.build +@@ -14,6 +14,7 @@ + test_installed_lib = get_option('test_installed_lib') + skip_introspection = get_option('skip_introspection') + verbose_tests = get_option('verbose_tests') ++accept_overflowed_buildorder = get_option('accept_overflowed_buildorder') + clang_simple_version_script = find_program ('clang_simple_version.sh') + + +@@ -144,6 +145,7 @@ cdata.set('HAVE_RPMIO', rpm.found()) + cdata.set('HAVE_LIBMAGIC', magic.found()) + cdata.set('HAVE_GDATE_AUTOPTR', has_gdate_autoptr) + cdata.set('HAVE_EXTEND_AND_STEAL', has_extend_and_steal) ++cdata.set('HAVE_OVERFLOWED_BUILDORDER', accept_overflowed_buildorder) + configure_file( + output : 'config.h', + configuration : cdata +diff --git a/modulemd/modulemd-yaml-util.c b/modulemd/modulemd-yaml-util.c +index 6cbf4cc..ad0bd3c 100644 +--- a/modulemd/modulemd-yaml-util.c ++++ b/modulemd/modulemd-yaml-util.c +@@ -11,6 +11,7 @@ + * For more information on free software, see . + */ + ++#include "config.h" + #include "modulemd-errors.h" + #include "private/modulemd-subdocument-info-private.h" + #include "private/modulemd-util.h" +@@ -441,6 +442,16 @@ modulemd_yaml_parse_int64 (yaml_parser_t *parser, GError **error) + + if ((value == G_MAXINT64 && errno == ERANGE)) + { ++#ifdef HAVE_OVERFLOWED_BUILDORDER ++ /* A temporary hack. Remove when RHEL 8 goes end of life. */ ++ if (g_str_equal ((const gchar *)event.data.scalar.value, ++ "18446744073709551615")) ++ { ++ g_debug ("Coercing an invalid signed 64-bit integer to -1: %s", ++ (const gchar *)event.data.scalar.value); ++ return -1; ++ } ++#endif + g_set_error (error, + MODULEMD_YAML_ERROR, + MODULEMD_ERROR_VALIDATE, +diff --git a/modulemd/tests/test-modulemd-parse_int64.c b/modulemd/tests/test-modulemd-parse_int64.c +index 2ccfb53..8759c21 100644 +--- a/modulemd/tests/test-modulemd-parse_int64.c ++++ b/modulemd/tests/test-modulemd-parse_int64.c +@@ -11,6 +11,7 @@ + * For more information on free software, see . + */ + ++#include "config.h" + #include + #include + #include +@@ -36,7 +37,7 @@ test (const char *input, gint64 expected_value, gboolean expected_error) + g_assert_nonnull (error); + else + g_assert_null (error); +- g_assert_cmpuint (parsed, ==, expected_value); ++ g_assert_cmpint (parsed, ==, expected_value); + } + + static void +@@ -69,6 +70,16 @@ test_int64_invalid_too_big (void) + test ("9223372036854775808", 0, TRUE); + } + ++static void ++test_int64_invalid_overflowed (void) ++{ ++#ifdef HAVE_OVERFLOWED_BUILDORDER ++ test ("18446744073709551615", -1, FALSE); ++#else ++ test ("18446744073709551615", 0, TRUE); ++#endif ++} ++ + static void + test_int64_invalid_too_small (void) + { +@@ -143,6 +154,8 @@ main (int argc, char *argv[]) + test_int64_invalid_too_big); + g_test_add_func ("/modulemd/v2/int64/yaml/parse/invalid_too_small", + test_int64_invalid_too_small); ++ g_test_add_func ("/modulemd/v2/int64/yaml/parse/invalid_overflowed", ++ test_int64_invalid_overflowed); + + g_test_add_func ("/modulemd/v2/uint64/yaml/parse/valid", test_uint64_valid); + g_test_add_func ("/modulemd/v2/uint64/yaml/parse/invalid_no_digit", +-- +2.31.1 + diff --git a/tests/tests.yml b/tests/tests.yml index afbcca6..bab8cae 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -26,7 +26,7 @@ tests: - build: dir: . - run: meson -Dtest_installed_lib=true -Ddeveloper_build=false source + run: meson -Daccept_overflowed_buildorder=true -Dlibmagic=enabled -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true -Ddeveloper_build=false source - unittests: dir: . run: ninja test From 782f8cac931eb8bcde9cdc79f712ee4143f0018b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 16:43:15 +0000 Subject: [PATCH 076/110] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_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 399817e..5c92052 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.13.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -191,6 +191,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 2.13.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Tue Sep 14 2021 Petr Pisar - 2.13.0-3 - Accept an invalid buildorder 18446744073709551615 found in RHEL 8 repositories (https://pagure.io/koji/issue/3025) From 09a83465837c978bb9722f3ca60d09b10878287f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 4 Feb 2022 15:37:28 +0100 Subject: [PATCH 077/110] 2.14.0 bump --- .gitignore | 2 + libmodulemd.spec | 15 +- ...73709551615-buildorder-if-accept_ove.patch | 192 ------------------ sources | 4 +- 4 files changed, 9 insertions(+), 204 deletions(-) delete mode 100644 modulemd-2.13.0-Accept-18446744073709551615-buildorder-if-accept_ove.patch diff --git a/.gitignore b/.gitignore index 2d27b90..7077c03 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,5 @@ /modulemd-2.12.1.tar.xz.asc /modulemd-2.13.0.tar.xz /modulemd-2.13.0.tar.xz.asc +/modulemd-2.14.0.tar.xz +/modulemd-2.14.0.tar.xz.asc diff --git a/libmodulemd.spec b/libmodulemd.spec index 5c92052..cbd60ff 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -23,8 +23,8 @@ %endif Name: %{upstream_name}%{?v2_suffix} -Version: 2.13.0 -Release: 4%{?dist} +Version: 2.14.0 +Release: 1%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -37,10 +37,6 @@ 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 -# Accept invalid, but existing buildorder 18446744073709551615 when loading -# modulemd-v2 documents, bug #1984402, , -# in upstream after 2.13.0 -Patch0: modulemd-2.13.0-Accept-18446744073709551615-buildorder-if-accept_ove.patch BuildRequires: gnupg2 BuildRequires: meson >= 0.47 @@ -62,10 +58,6 @@ BuildRequires: python-gobject-base BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-gobject-base %endif -BuildRequires: help2man - - -# Patches %description @@ -191,6 +183,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Fri Feb 04 2022 Petr Pisar - 2.14.0-1 +- 2.14.0 bump + * Thu Jan 20 2022 Fedora Release Engineering - 2.13.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/modulemd-2.13.0-Accept-18446744073709551615-buildorder-if-accept_ove.patch b/modulemd-2.13.0-Accept-18446744073709551615-buildorder-if-accept_ove.patch deleted file mode 100644 index 2e54628..0000000 --- a/modulemd-2.13.0-Accept-18446744073709551615-buildorder-if-accept_ove.patch +++ /dev/null @@ -1,192 +0,0 @@ -From b0dd663edd6ab66ec26c48ff34a52afa040694e6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Thu, 22 Jul 2021 15:23:55 +0200 -Subject: [PATCH] Accept 18446744073709551615 buildorder if - accept_overflowed_buildorder build boolean is true -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -7c0158bcec05b692d27e37ff46a134f4e294d957 commit (Reject invalid signed -integers (rpm buildorder), as found in 2.13.0 release, fortified -parsing signed integers. - -It turned out that RHEL 8 delivers a few modules: - -container-tools:rhel8:8020120200601155013:ffd2803a -container-tools:rhel8:8030020200923153805:2a301c24 -container-tools:rhel8:8030020201124131330:830d479e -container-tools:rhel8:8030120210208205200:c127ee91 - -which contain an invalid buildorder value 18446744073709551615. DNF -then warned on loading them into an index and ignored them: - - # dnf module list --repoid pulp-appstream - Last metadata expiration check: 3:59:10 ago on Wed 21 Jul 2021 12:38:00 PM CEST. - Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 118 col 9] - Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 118 col 9] - Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 107 col 9] - Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 114 col 9] - Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 118 col 9] - Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 118 col 9] - Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 107 col 9] - Module yaml error: Failed to parse buildorder in component: 18446744073709551615: The integer value is larger than 9223372036854775807 [line 114 col 9] - -Those were probably built with a broken MBS/libmodulemd which -loaded -1 and serialized it as an 64-bit unsigned integer -18446744073709551615. - -Because the distributor does not change once-released builds, it -became impossible to process them with libmodulemd-2.13.0. - -This patch adds an accept_overflowed_buildorder build option (disabled -by default) which enables a workaround to accept 18446744073709551615 -string as -1 integer when parsing 64-bit signed integers. (The type is -used only in buildorder field now). - -(Originally, I developed a more complicated patch only affecting -loading while keeping validation strict. But that was not enough for -DNF, creareterepo_c and probably many other tools. Thus I prepared -even more complicated patch affecting both loading and validation of -modulemd formats only (cf. modulemd-packager-v3) and that helped DNF. -But the patch ugglified to code to much and considering it's only -a temporary hack, I decided for this simple patch which affects -loading and validation of all formats.) - -Petr Písař: Ported to 2.13.0 from -37a688cc12d7fbab67fda95c47a4605405d7a154. - -Signed-off-by: Petr Písař ---- - meson.build | 1 + - meson_options.txt | 3 +++ - modulemd/meson.build | 2 ++ - modulemd/modulemd-yaml-util.c | 11 +++++++++++ - modulemd/tests/test-modulemd-parse_int64.c | 15 ++++++++++++++- - 5 files changed, 31 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 37792b3..bbb56ba 100644 ---- a/meson.build -+++ b/meson.build -@@ -215,6 +215,7 @@ if meson.version().version_compare('>=0.53') - 'Python 2 Support': get_option('with_py2'), - 'Python 3 Support': get_option('with_py3'), - 'Skip Introspection': get_option('skip_introspection'), -+ 'Accept overflowed buildorder': get_option('accept_overflowed_buildorder'), - 'Test Installed Library': get_option('test_installed_lib'), - }, section: 'Build Configuration') - endif -diff --git a/meson_options.txt b/meson_options.txt -index 7873d42..3d84459 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -11,6 +11,9 @@ - # - # REMEMBER TO UPDATE THE SUMMARY() IN meson.build when adding options here - -+option('accept_overflowed_buildorder', type : 'boolean', value: 'false', -+ description : 'Accept overflowed 18446744073709551615 buildorder as -1. This breaks a specification, but some RHEL 8 module builds look like that.') -+ - option('verbose_tests', type : 'boolean', value : true, - description : 'Tests that are run under the "debug" configuration will print all debug messages. Disable this option for valgrind checks, as it speeds it up substantially.') - -diff --git a/modulemd/meson.build b/modulemd/meson.build -index 2a60364..0b74818 100644 ---- a/modulemd/meson.build -+++ b/modulemd/meson.build -@@ -14,6 +14,7 @@ - test_installed_lib = get_option('test_installed_lib') - skip_introspection = get_option('skip_introspection') - verbose_tests = get_option('verbose_tests') -+accept_overflowed_buildorder = get_option('accept_overflowed_buildorder') - clang_simple_version_script = find_program ('clang_simple_version.sh') - - -@@ -144,6 +145,7 @@ cdata.set('HAVE_RPMIO', rpm.found()) - cdata.set('HAVE_LIBMAGIC', magic.found()) - cdata.set('HAVE_GDATE_AUTOPTR', has_gdate_autoptr) - cdata.set('HAVE_EXTEND_AND_STEAL', has_extend_and_steal) -+cdata.set('HAVE_OVERFLOWED_BUILDORDER', accept_overflowed_buildorder) - configure_file( - output : 'config.h', - configuration : cdata -diff --git a/modulemd/modulemd-yaml-util.c b/modulemd/modulemd-yaml-util.c -index 6cbf4cc..ad0bd3c 100644 ---- a/modulemd/modulemd-yaml-util.c -+++ b/modulemd/modulemd-yaml-util.c -@@ -11,6 +11,7 @@ - * For more information on free software, see . - */ - -+#include "config.h" - #include "modulemd-errors.h" - #include "private/modulemd-subdocument-info-private.h" - #include "private/modulemd-util.h" -@@ -441,6 +442,16 @@ modulemd_yaml_parse_int64 (yaml_parser_t *parser, GError **error) - - if ((value == G_MAXINT64 && errno == ERANGE)) - { -+#ifdef HAVE_OVERFLOWED_BUILDORDER -+ /* A temporary hack. Remove when RHEL 8 goes end of life. */ -+ if (g_str_equal ((const gchar *)event.data.scalar.value, -+ "18446744073709551615")) -+ { -+ g_debug ("Coercing an invalid signed 64-bit integer to -1: %s", -+ (const gchar *)event.data.scalar.value); -+ return -1; -+ } -+#endif - g_set_error (error, - MODULEMD_YAML_ERROR, - MODULEMD_ERROR_VALIDATE, -diff --git a/modulemd/tests/test-modulemd-parse_int64.c b/modulemd/tests/test-modulemd-parse_int64.c -index 2ccfb53..8759c21 100644 ---- a/modulemd/tests/test-modulemd-parse_int64.c -+++ b/modulemd/tests/test-modulemd-parse_int64.c -@@ -11,6 +11,7 @@ - * For more information on free software, see . - */ - -+#include "config.h" - #include - #include - #include -@@ -36,7 +37,7 @@ test (const char *input, gint64 expected_value, gboolean expected_error) - g_assert_nonnull (error); - else - g_assert_null (error); -- g_assert_cmpuint (parsed, ==, expected_value); -+ g_assert_cmpint (parsed, ==, expected_value); - } - - static void -@@ -69,6 +70,16 @@ test_int64_invalid_too_big (void) - test ("9223372036854775808", 0, TRUE); - } - -+static void -+test_int64_invalid_overflowed (void) -+{ -+#ifdef HAVE_OVERFLOWED_BUILDORDER -+ test ("18446744073709551615", -1, FALSE); -+#else -+ test ("18446744073709551615", 0, TRUE); -+#endif -+} -+ - static void - test_int64_invalid_too_small (void) - { -@@ -143,6 +154,8 @@ main (int argc, char *argv[]) - test_int64_invalid_too_big); - g_test_add_func ("/modulemd/v2/int64/yaml/parse/invalid_too_small", - test_int64_invalid_too_small); -+ g_test_add_func ("/modulemd/v2/int64/yaml/parse/invalid_overflowed", -+ test_int64_invalid_overflowed); - - g_test_add_func ("/modulemd/v2/uint64/yaml/parse/valid", test_uint64_valid); - g_test_add_func ("/modulemd/v2/uint64/yaml/parse/invalid_no_digit", --- -2.31.1 - diff --git a/sources b/sources index 4fa392a..2a13e90 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (modulemd-2.13.0.tar.xz) = b2a4fa4120d4dca714ef724a9e8f805d4f8a306a950e670f86f6184467c070ddb93360fff3bb079eb3a442b52024fe796ceb1195800d62bbb1f5cb67f8889e05 -SHA512 (modulemd-2.13.0.tar.xz.asc) = f588c1333b91db297ab5ec7e67f1d62884d4f58032a75feed1b3c3ff2ae67eb0f13a4209605f4a32d00fe6ccb3561b6fab81c2196f1d4439222b0e141f541ff6 +SHA512 (modulemd-2.14.0.tar.xz) = 90439cba83f4a8711095f1b9b92ba9135bade202703d698d192d066955ae8df3f53226fcd5fc73cd2873e5599822272f00a5b536cf62e3e51c37bbca32b7f756 +SHA512 (modulemd-2.14.0.tar.xz.asc) = a742c177084b2f1445704583ea43c09b479502432b62c1880ca4917dfa7550b6dfc3aef2498a5afdba61323451878b6ede7fdfba37d433982f0cc3925811668f From 2be5d00978f63843643ed7112a06350505c26746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 8 Feb 2022 10:52:39 +0100 Subject: [PATCH 078/110] Drop removed meson -D developer_build option This was removed from libmodulemd-2.12.0. Now meson in Fedora CI errors on unknown options. --- tests/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.yml b/tests/tests.yml index bab8cae..9066e9b 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 -Ddeveloper_build=false source + run: meson -Daccept_overflowed_buildorder=true -Dlibmagic=enabled -Drpmio=enabled -Dskip_introspection=false -Dtest_installed_lib=true -Dwith_py2=false -Dwith_py3=true source - unittests: dir: . run: ninja test From d9908420cd2b5a43c4ed94bf31c8a70d022d98fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 8 Feb 2022 11:16:59 +0100 Subject: [PATCH 079/110] Drop removed meson -D developer_build option from CI tests --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index cbd60ff..018e4e9 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.14.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -183,6 +183,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Tue Feb 08 2022 Petr Pisar - 2.14.0-2 +- Drop removed meson -D developer_build option from CI tests + * Fri Feb 04 2022 Petr Pisar - 2.14.0-1 - 2.14.0 bump From 241787c3b077298a21b10f6ad37fe4e4d92c535b Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 20:59:32 +0200 Subject: [PATCH 080/110] Rebuilt for Python 3.11 --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 018e4e9..65e0e57 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.14.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -183,6 +183,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Mon Jun 13 2022 Python Maint - 2.14.0-3 +- Rebuilt for Python 3.11 + * Tue Feb 08 2022 Petr Pisar - 2.14.0-2 - Drop removed meson -D developer_build option from CI tests From 26ffe78488a44682338d02514f2a444525b299c3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 18:23:59 +0000 Subject: [PATCH 081/110] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_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 65e0e57..7090c5e 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.14.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -183,6 +183,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 2.14.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 2.14.0-3 - Rebuilt for Python 3.11 From 5da1cc7ad8b543d4a94b8acab71771585d92dc40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 22 Jul 2022 18:57:49 +0200 Subject: [PATCH 082/110] Update an out-dated URI in a description --- libmodulemd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 7090c5e..bf4f0a7 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -62,7 +62,7 @@ BuildRequires: python%{python3_pkgversion}-gobject-base %description C library for manipulating module metadata files. -See https://github.com/fedora-modularity/libmodulemd/blob/master/README.md for +See https://github.com/fedora-modularity/libmodulemd/blob/main/README.md for more details. From ca231d35885b125928a57bf4854752c10aca617c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 16:53:48 +0000 Subject: [PATCH 083/110] 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 084/110] 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 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 085/110] 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 086/110] 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 087/110] 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 088/110] 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 089/110] 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 090/110] 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 091/110] 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 092/110] 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 093/110] 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 094/110] 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 095/110] 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 096/110] 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 097/110] 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 098/110] 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 099/110] 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 100/110] 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 101/110] 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 102/110] 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 103/110] 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 104/110] 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 105/110] 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 106/110] 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 107/110] 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 108/110] 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 109/110] 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 110/110] 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 +