The package rpms/libmodulemd.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/libmodulemd.git/commit/?id=5500b7...
https://src.fedoraproject.org/cgit/rpms/libmodulemd.git/commit/?id=88a95b....
Change:
+%ifnarch %{valgrind_arches}
+%ifarch %{power64} s390x
Thanks.
Full change:
============
commit ed17745b6d84e9def3e76507eefcd37d3615d4f7
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Sat Jan 26 16:00:23 2019 -0500
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 <sgallagh(a)redhat.com>
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 <sgallagh(a)redhat.com>
-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 <sgallagh(a)redhat.com>
----
- 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
- # <
https://www.gnu.org/philosophy/free-sw.en.html>.
-
-+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 <sgallagh(a)redhat.com>
-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 <sgallagh(a)redhat.com>
----
- .../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 <sgallagh(a)redhat.com>
-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 <sgallagh(a)redhat.com>
----
- 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 <sgallagh(a)redhat.com> - 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 <sgallagh(a)redhat.com> - 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
commit fbc6b4e25766f72b9a1ddfa0f0003ceceb45fe93
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Fri Jan 11 11:27:34 2019 -0500
Fix ordering issue with dependencies
Use glib2 suppression file when running valgrind tests
Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
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 <sgallagh(a)redhat.com>
+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 <sgallagh(a)redhat.com>
+---
+ .../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 <sgallagh(a)redhat.com>
+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 <sgallagh(a)redhat.com>
+---
+ 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 <sgallagh(a)redhat.com> - 2.0.0-3
+- Fix ordering issue with dependencies
+- Use glib2 suppression file when running valgrind tests
+
* Fri Jan 11 2019 Stephen Gallagher <sgallagh(a)redhat.com> - 2.0.0-2
- Fix issue reading modified value for defaults from YAML streams
commit ac437b4983e2023a2a4ba204e9d9ac0e18918d4c
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Fri Jan 11 10:58:16 2019 -0500
Fix issue reading modified value for defaults from YAML streams
Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
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 <sgallagh(a)redhat.com>
+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 <sgallagh(a)redhat.com>
+---
+ 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
+ # <
https://www.gnu.org/philosophy/free-sw.en.html>.
+
++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 <sgallagh(a)redhat.com>
-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 <sgallagh(a)redhat.com>
----
- 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?= <lsedlar(a)redhat.com>
-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 <sgallagh(a)redhat.com> - 2.0.0-2
+- Fix issue reading modified value for defaults from YAML streams
+
* Thu Dec 13 2018 Stephen Gallagher <sgallagh(a)redhat.com> - 2.0.0-1
- Update to 2.0.0 final
- Assorted fixes for validation
commit dd26c4a31aeb6c654d747c74669c3846fdf99ed7
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Thu Dec 13 11:53:14 2018 -0500
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 <sgallagh(a)redhat.com>
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 <sgallagh(a)redhat.com> - 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 <sgallagh(a)redhat.com> - 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
commit 88a95b7d8e04a5c9c9cb86aa241f7a406aa44ddc
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Wed Dec 12 08:30:50 2018 -0500
Don't run valgrind on s390x
Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
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
commit 5500b7840fa40b2fb6c21269f823dc40f37d4d66
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Tue Dec 11 22:01:29 2018 -0500
Update to 2.0.0beta2
Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
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
-%{_bindir}/modulemd-validator
-%{_libdir}/%{name}.so.1*
+%{_libdir}/%{name}.so.2*
%dir %{_libdir}/girepository-1.0
-%{_libdir}/girepository-1.0/Modulemd-1.0.typelib
+%{_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 devel
-%{_libdir}/%{name}.so
+%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 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 <sgallagh(a)redhat.com> - 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 <sgallagh(a)redhat.com> - 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 <sgallagh(a)redhat.com> - 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