rebuilt with patch for glib 2.80.1 [release 2.15.0-3mamba;Wed May 15 2024]

This commit is contained in:
Silvan Calarco 2024-05-18 19:50:46 +02:00
parent 6e01d9bce5
commit 04b85a6cec
5 changed files with 221 additions and 89 deletions

View File

@ -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

View File

@ -0,0 +1,46 @@
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] doc: Adapt GLib documentation path to GLib 2.79.0
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
---
meson.build | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 0b32f4d0..61086491 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)

View File

@ -0,0 +1,64 @@
From f3336199b4e69af3305f156abc7533bed9e9a762 Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dimstar@opensuse.org>
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 doesnt 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ř <ppisar@redhat.com>
---
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

View File

@ -1,6 +1,6 @@
Name: libmodulemd
Version: 2.15.0
Release: 1mamba
Release: 3mamba
Summary: C Library for manipulating module metadata files
Group: System/Libraries
Vendor: openmamba
@ -8,7 +8,9 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/fedora-modularity/libmodulemd
Source: https://github.com/fedora-modularity/libmodulemd.git/%{version}/libmodulemd-%{version}.tar.bz2
Patch0: modulemd-2.10.0-upstream-fix-build-on-32bit-archs.patch
Patch0: libmodulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch
Patch1: libmodulemd-2.15.0-glib-2.79.patch
Patch2: libmodulemd-2.15.0-glib-2.80.1.patch
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -18,7 +20,7 @@ BuildRequires: librpm-devel
BuildRequires: libyaml-devel
## AUTOBUILDREQ-END
BuildRequires: python3 >= 3.11
BuildRequires: librpm-devel >= 4.16.1.2-1mamba
BuildRequires: librpm-devel >= 4.19.1.1
BuildRequires: python-autopep8-py3
BuildRequires: pygobject-py3
BuildRequires: pycodestyle-py3
@ -50,22 +52,21 @@ This package contains the tools provided with %{name}.
%prep
%setup -q
#%patch0 -p1
%define _default_patch_fuzz 2
%patch 0 -p1 -b .build-Move-computing-gtk-doc-module-paths-to-the-che
%patch 1 -p1 -b .glib-2.79
%patch 2 -p1 -b .glib-2.80.1
%build
%meson \
-Dpython_name=%{__python3}
# -Dbuild_api_v1=true \
%meson_build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%meson_install
#sed -i "s|lmodulemd|l:libmodulemd.so.1|" %{buildroot}%{_libdir}/pkgconfig/modulemd.pc
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -96,6 +97,12 @@ This package contains the tools provided with %{name}.
%{_mandir}/man1/modulemd-validator.1*
%changelog
* Wed May 15 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2.15.0-3mamba
- rebuilt with patch for glib 2.80.1
* Mon May 13 2024 Automatic Build System <autodist@openmamba.org> 2.15.0-2mamba
- rebuilt with rpm 4.19.1.1
* Wed Oct 18 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.15.0-1mamba
- update to 2.15.0
- source renamed from modulemd to libmodulemd

View File

@ -1,81 +0,0 @@
From 05afb01e3a6de8f09ac664f2d93c3aac9be1e99e Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Fri, 20 Nov 2020 15:52:27 -0500
Subject: [PATCH] Fix integer size issue on 32-bit platforms
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
---
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 8cc79952..1b1ee71e 100644
--- a/modulemd/modulemd-module.c
+++ b/modulemd/modulemd-module.c
@@ -877,8 +877,8 @@ modulemd_module_add_obsoletes (ModulemdModule *self,
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));
@@ -967,7 +967,7 @@ modulemd_module_add_obsoletes (ModulemdModule *self,
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,
diff --git a/modulemd/modulemd-obsoletes.c b/modulemd/modulemd-obsoletes.c
index 46bbc435..ceb7682d 100644
--- a/modulemd/modulemd-obsoletes.c
+++ b/modulemd/modulemd-obsoletes.c
@@ -1092,7 +1092,7 @@ modulemd_obsoletes_emit_yaml (ModulemdObsoletes *self,
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;
}
@@ -1166,7 +1166,8 @@ modulemd_obsoletes_emit_yaml (ModulemdObsoletes *self,
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;
}
@@ -1231,7 +1232,7 @@ modulemd_obsoletes_is_active (ModulemdObsoletes *self)
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))
{
diff --git a/modulemd/modulemd-util.c b/modulemd/modulemd-util.c
index 2a50bb59..7c4c891e 100644
--- a/modulemd/modulemd-util.c
+++ b/modulemd/modulemd-util.c
@@ -521,7 +521,7 @@ 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);
}