Compare commits
No commits in common. 'c9' and 'i10cs' have entirely different histories.
@ -1,2 +1,2 @@
|
||||
SOURCES/gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg
|
||||
SOURCES/modulemd-2.13.0.tar.xz
|
||||
SOURCES/modulemd-2.15.0.tar.xz
|
||||
|
@ -1,2 +1,2 @@
|
||||
75e05794a210a4ed87d361925fc520d5e11fa582 SOURCES/gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg
|
||||
e83886f374922ecf6fa728c6c588d697d0748b99 SOURCES/modulemd-2.13.0.tar.xz
|
||||
37141fb36ea218d8ee0c40e8a7e3ce60ac124539 SOURCES/modulemd-2.15.0.tar.xz
|
||||
|
@ -1,192 +0,0 @@
|
||||
From b0dd663edd6ab66ec26c48ff34a52afa040694e6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
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ř <ppisar@redhat.com>
|
||||
---
|
||||
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 <https://www.gnu.org/philosophy/free-sw.en.html>.
|
||||
*/
|
||||
|
||||
+#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 <https://www.gnu.org/philosophy/free-sw.en.html>.
|
||||
*/
|
||||
|
||||
+#include "config.h"
|
||||
#include <glib.h>
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
@@ -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
|
||||
|
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEE4/QvzhVoMKgDWObpT9GuwzZa978FAmDoGDoACgkQT9GuwzZa
|
||||
9788qhAAzVLc75gZydzaygm4lZ39Z330JrmZVOddzsw7qyrtbWoAXLvBda2X+ckM
|
||||
lnEcIaUp0suReysH7SjBumYg0IADkeGPHTr41OPQneUE5w0UvPfks2+Tvo50GUAv
|
||||
7+yTPcF5gudyRJJTzHW8jOuqnWWqdGg41sPD8qFj7XTP2ndtUINHi1EBg7u3HApI
|
||||
vRmD6AY7YYjnDQo7ugT+uIGcqCCtkOq40lc8wQEfgM9kWTwf8BbQMavrXfRjgzEe
|
||||
0BR41LTaVTkXtn7+5/IkUF7Iq5zW4KzD0LxHck+eYc98AYlhf/MyquARpjkG53Nn
|
||||
lehky9mQQsJHg3JkeGWJlDqnaFlbYcOpRhsA/xrBkQyO8kbl9pEDuzP7EXouKdp4
|
||||
1rrnsO9DFAznqfUV95h6SSfvm7KOB6/ac/iAl1FyvErxNUek6KxwWrSJsRQzaDf3
|
||||
Ao6HygX7eAOLjS6BFbzUzL5aQVDPKu+cJfkVlOguPYvNRAnFOH9Fx3TKv6kYeaZZ
|
||||
1pHbc+7yQuM2Fy/Xj/N0Dwy5pvks+UCP3v294BPlqdW3HR/Bskjba3thg5bMMJ5H
|
||||
Yq4wit8JWem76MMvHDXM2IgHpJhpg7DDxaKOd6qBN4dcOnOwCg680jFQ90rg3oVE
|
||||
8qVBnYHtcut1XiSqqNE3/Zz0ISbhjv/BOor8zjYspEf0vipFjA0=
|
||||
=AlDP
|
||||
-----END PGP SIGNATURE-----
|
@ -0,0 +1,96 @@
|
||||
From 9d2809090cc0cccd7bab67453dc00cf43a289082 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
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ř <ppisar@redhat.com>
|
||||
---
|
||||
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
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 29c339a31b1c753dcdef041e5c2e0e600e48b59d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
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ř <ppisar@redhat.com>
|
||||
---
|
||||
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
|
||||
|
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEE4/QvzhVoMKgDWObpT9GuwzZa978FAmRblZgACgkQT9GuwzZa
|
||||
978CuQ//d9376juHZ83f+E8bzqouzqPgfvkz4WP6g/gloGWd1/7fKaktpyx0zbfT
|
||||
IDxwEkA4HLG6M8JP/RAzsVFrFyilxuErkfjaa6LMl08B15bFsw8zZXW4ZvxymhGe
|
||||
EuzZNcSzqAm6VRnjDKqCBtTI6vvhMQMtPw61lmWlECb1cfGs1EX3k+r9gkorJPqL
|
||||
Yn7/N4urU+YeyT0xSCW3bz4YrCHbaAN/njvgM2lPi9DCC05jw2qaC0RngdkNGIiw
|
||||
s5qKUIgEFNm9/Sm9nwXxMBdlMK0T9GhZRy0T+z/wMy3Fwv0Sthmw6ED8PlwnNO3W
|
||||
rHN3jURbU4Yk0RHx3nJZqHI20MQ15MxPI0QeJaZSOgYxhVPcaszqGVpmMn74J+Kr
|
||||
fg6WAgYqVViBlyNReUHm/rvGSCDL5FQd7/SpX3yKnaAAUOmaSqEt94SeRbDoWZow
|
||||
KjW7F997kMhd64AfbdHj0Tp9+7mVgENOcDc+lTtTLDJrSTUbIeePVAM25FfQXSBB
|
||||
4kL5y6rjBcmNFPoNXVrNj5f1Op5Zzd4/dpU7eE6ihKNOJ5IHC9NO6pl3LEzD1Lbt
|
||||
xZtW8t5AZT6OYN3I+MZwBZUk3kvlPPJKUhbmcw3RdXLLgMhfUaDvIEgaT5Os2HKE
|
||||
dxQaX710hXIz0Nwmdo41VfTKOwI3Ms2xQ5NhKsNQRAgIFLkGC5w=
|
||||
=oY7q
|
||||
-----END PGP SIGNATURE-----
|
Loading…
Reference in new issue