Compare commits

...

No commits in common. "c9-beta" and "c10s" have entirely different histories.

10 changed files with 239 additions and 64 deletions

View File

@ -1 +0,0 @@
14ddaa7b429e804a1f8d05f0806e98f369eaf5d7 SOURCES/AppStream-0.16.1.tar.xz

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

17
.gitignore vendored
View File

@ -1 +1,16 @@
SOURCES/AppStream-0.16.1.tar.xz
/AppStream-0.14.1.tar.xz
/AppStream-0.14.2.tar.xz
/AppStream-0.14.3.tar.xz
/AppStream-0.14.4.tar.xz
/AppStream-0.14.5.tar.xz
/AppStream-0.14.6.tar.xz
/AppStream-0.15.1.tar.xz
/AppStream-0.15.2.tar.xz
/AppStream-0.15.3.tar.xz
/AppStream-0.15.4.tar.xz
/AppStream-0.15.5.tar.xz
/AppStream-0.16.1.tar.xz
/appstream-d88ed03cb5b3b1803bdee3528c9b99d528ceb065.tar.gz
/AppStream-1.0.0.tar.xz
/AppStream-1.0.1.tar.xz
/AppStream-1.0.2.tar.xz

View File

@ -1,53 +1,49 @@
# Vala/Vapi support ( upstream disabled by default, probably explains why it the build breaks often )
%global vala 1
Summary: Utilities to generate, maintain and access the AppStream database
Name: appstream
Version: 0.16.1
Release: 1%{?dist}
Version: 1.0.2
Release: 5%{?dist}
# lib LGPLv2+, tools GPLv2+
License: GPLv2+ and LGPLv2+
License: GPL-2.0-or-later AND LGPL-2.1-or-later
#URL: http://www.freedesktop.org/wiki/Distributions/AppStream
URL: https://github.com/ximion/appstream
Source0: http://www.freedesktop.org/software/appstream/releases/AppStream-%{version}.tar.xz
## upstream patches (lookaside cache)
# upstream patches
# https://github.com/PackageKit/PackageKit/issues/720
Patch0: utils-explicitly-set-format-style-when-installing-catalog-metadata.patch
## upstreamable patches
## downstream patches
# upstreamable patches
# needed for cmake auto-provides
BuildRequires: cmake
BuildRequires: meson >= 0.62
BuildRequires: gettext
BuildRequires: git-core
BuildRequires: gperf
BuildRequires: gtk-doc
BuildRequires: intltool
BuildRequires: itstool
BuildRequires: libstemmer-devel
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(gi-docgen) >= 2021.1
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libsoup-2.4)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(lmdb)
BuildRequires: pkgconfig(packagekit-glib2)
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(protobuf-lite)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(xmlb) >= 0.3.6
BuildRequires: pkgconfig(Qt6Core) >= 6.2.4
BuildRequires: pkgconfig(xmlb) >= 0.3.14
BuildRequires: pkgconfig(yaml-0.1)
# lrelease
BuildRequires: qt5-linguist
BuildRequires: qt6-linguist
BuildRequires: sed
BuildRequires: vala
BuildRequires: xmlto
@ -81,7 +77,7 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%{summary}.
%package qt
Summary: Qt5 bindings for %{name}
Summary: Qt6 bindings for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description qt
%{summary}.
@ -89,20 +85,21 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%package qt-devel
Summary: Development files for %{name}-qt bindings
Requires: %{name}-qt%{?_isa} = %{version}-%{release}
Requires: pkgconfig(Qt5Core)
Requires: pkgconfig(Qt6Core) >= 6.2.4
%description qt-devel
%{summary}.
%prep
%autosetup -n AppStream-%{version} -p1
%autosetup -n AppStream-%{version} -S git_am
%build
%{meson} \
-Dcompose=true \
-Dqt=true \
-Dvapi=%{?vala:true}%{!?vala:false}
-Dvapi=true \
-Dstemming=false
%{meson_build}
@ -110,8 +107,8 @@ Requires: pkgconfig(Qt5Core)
%install
%{meson_install}
mkdir -p %{buildroot}/var/cache/app-info/{icons,gv,xmls}
touch %{buildroot}/var/cache/app-info/cache.watch
mkdir -p %{buildroot}/var/cache/swcatalog/{icons,gv,xml}
touch %{buildroot}/var/cache/swcatalog/cache.watch
%find_lang appstream
@ -127,15 +124,13 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \
%{meson_test} ||:
%ldconfig_scriptlets
%posttrans
%{_bindir}/appstreamcli refresh --force >& /dev/null ||:
%transfiletriggerin -- %{_datadir}/app-info/xmls
%transfiletriggerin -- %{_datadir}/swcatalog/xml
%{_bindir}/appstreamcli refresh --force >& /dev/null ||:
%transfiletriggerpostun -- %{_datadir}/app-info/xmls
%transfiletriggerpostun -- %{_datadir}/swcatalog/xml
%{_bindir}/appstreamcli refresh --force >& /dev/null ||:
%files -f appstream.lang
@ -143,19 +138,19 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \
%license COPYING
%{_bindir}/appstreamcli
%{_mandir}/man1/appstreamcli.1*
%config(noreplace) %{_sysconfdir}/appstream.conf
%{_datadir}/appstream/
%dir %{_libdir}/girepository-1.0/
%{_libdir}/girepository-1.0/AppStream-1.0.typelib
%{_libdir}/libappstream.so.4*
%{_libdir}/libappstream.so.5
%{_libdir}/libappstream.so.%{version}
%{_metainfodir}/org.freedesktop.appstream.cli.*.xml
# put in -devel? -- rex
%{_datadir}/gettext/its/metainfo.*
%ghost /var/cache/app-info/cache.watch
%dir /var/cache/app-info/
%dir /var/cache/app-info/icons/
%dir /var/cache/app-info/gv/
%dir /var/cache/app-info/xmls/
%ghost /var/cache/swcatalog/cache.watch
%dir /var/cache/swcatalog/
%dir /var/cache/swcatalog/icons/
%dir /var/cache/swcatalog/gv/
%dir /var/cache/swcatalog/xml/
%files devel
%{_includedir}/appstream/
@ -163,12 +158,10 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \
%{_libdir}/pkgconfig/appstream.pc
%dir %{_datadir}/gir-1.0/
%{_datadir}/gir-1.0/AppStream-1.0.gir
%if 0%{?vala}
%dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/appstream.deps
%{_datadir}/vala/vapi/appstream.vapi
%endif
%{_docdir}/appstream/html/
## symlink pointing to ^^, but need to take care, since rpm has
## trouble replacing dirs with symlinks, omit it for now -- rex
@ -176,12 +169,10 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \
# Maybe this should be split out? -- ngompa
%{_datadir}/installed-tests/appstream/metainfo-validate.test
%ldconfig_scriptlets compose
%files compose
%{_libexecdir}/appstreamcli-compose
%{_mandir}/man1/appstreamcli-compose.1*
%{_libdir}/libappstream-compose.so.0*
%{_libdir}/libappstream-compose.so.0
%{_libdir}/libappstream-compose.so.%{version}
%{_libdir}/girepository-1.0/AppStreamCompose-1.0.typelib
%{_metainfodir}/org.freedesktop.appstream.compose.metainfo.xml
@ -195,10 +186,8 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \
%dir %{_datadir}/gtk-doc/html/
%{_datadir}/gtk-doc/html/appstream-compose
%ldconfig_scriptlets qt
%files qt
%{_libdir}/libAppStreamQt.so.2*
%{_libdir}/libAppStreamQt.so.3
%{_libdir}/libAppStreamQt.so.%{version}
%files qt-devel
@ -206,31 +195,95 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \
%{_libdir}/cmake/AppStreamQt/
%{_libdir}/libAppStreamQt.so
%changelog
* Sat Feb 11 2023 Neal Gompa <ngompa@centosproject.org> - 0.16.1-1
- Rebase to 0.16.1
Resolves: rhbz#2169103
- Drop unneeded downstream hacks to build with older Meson
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.0.2-5
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Tue Nov 15 2022 Neal Gompa <ngompa@centosproject.org> - 0.15.5-2
- Create symlinks manually to make it build
(the symlinks were not created because of reverting the patch to
upgrade to Meson 0.62)
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.0.2-4
- Bump release for June 2024 mass rebuild
* Fri Oct 14 2022 Neal Gompa <ngompa@centosproject.org> - 0.15.5-1
- Rebase to 0.15.5
Resolves: rhbz#2134785
* Wed Jun 19 2024 Mike FABIAN <mfabian@redhat.com> - 1.0.2-3
- Resolves: RHEL-43437 Disable stemming support and remove build requirement "libstemmer-devel"
* Sun Aug 29 2021 Neal Gompa <ngompa@centosproject.org> - 0.14.5-1
- Rebase to 0.14.5
Resolves: rhbz#1998881
* Sat Mar 09 2024 Alessandro Astone <ales.astone@gmail.com> - 1.0.2-2
- Backport patch to fix installing swcatalog
- Resolves: RHEL-31497 (Backport latest build from Fedora 40)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.14.3-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Sun Feb 25 2024 Neal Gompa <ngompa@fedoraproject.org> - 1.0.2-1
- Update to 1.0.2
- Clean up some pre-1.0 scriptlet cruft
- Resolves: RHEL-31497 (Backport latest bulid from Fedora 40)
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 0.14.3-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 03 2024 Steve Cossette <farchord@gmail.com> - 1.0.1-1
- Update to 1.0.1
* Fri Nov 17 2023 Neal Gompa <ngompa@fedoraproject.org> - 1.0.0-1
- Update to 1.0.0 final
* Thu Nov 02 2023 Neal Gompa <ngompa@fedoraproject.org> - 1.0.0~git20231102.d88ed03-1
- Rebase to 1.0.0 git snapshot
* Mon Aug 21 2023 Parag Nemade <pnemade AT fedoraproject DOT org> - 0.16.1-4
- Migrate to SPDX license expression
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Jun 19 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 0.16.1-2
- Disable Qt5 in RHEL 10 builds
- Remove obsolete BuildRequires
* Sat Feb 11 2023 Neal Gompa <ngompa@fedoraproject.org> - 0.16.1-1
- Update to 0.16.1
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Sep 6 2022 Amit Shah <amitshah@fedoraproject.org> - 0.15.5-2
- Make qt deps and builds conditional
* Fri Sep 02 2022 Rex Dieter <rdieter@gmail.com> - 0.15.5-1
- 0.15.5
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jun 07 2022 Rex Dieter <rdieter@fedoraproject.org> - 0.15.4-1
- 0.15.4
* Tue Apr 19 2022 Rex Dieter <rdieter@fedoraproject.org> 0.15.3-1
- 0.15.3
* Wed Feb 23 2022 Rex Dieter <rdieter@fedoraproject.org> - 0.15.2-1
- 0.15.2
- support only filetriggers
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Dec 29 2021 Rex Dieter <rdieter@fedoraproject.org> - 0.15.1-1
- 0.15.1 (#2028696)
- update triggers to consistently use --force flag on 'appstreamcli refresh' calls
* Tue Oct 12 2021 Rex Dieter <rdieter@fedoraproject.org> - 0.14.6-1
- 0.14.6
* Sat Aug 28 2021 Neal Gompa <ngompa@fedoraproject.org> - 0.14.5-1
- Update to 0.14.5
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jun 29 2021 Rex Dieter <rdieter@fedoraproject.org> - 0.14.4-1
- 0.14.4
* Sat Apr 03 2021 Neal Gompa <ngompa13@gmail.com> - 0.14.3-2
- Build appstream-compose library for appstream-generator >= 0.8.4

7
gating.yaml Normal file
View File

@ -0,0 +1,7 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

5
plans/basic.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (AppStream-1.0.2.tar.xz) = e5c109c383e3bf3af3693bfb3146663767c2c61fac0bd421f2ce52242fe7b869effeacc4d207987321dfeb4ab0ba77ece6c1c6eea054a7365204cd955426517a

5
tests/main.fmf Normal file
View File

@ -0,0 +1,5 @@
require:
- appstream
- ibus-typing-booster
test: python3 test_appstream.py -v
framework: shell

66
tests/test_appstream.py Normal file
View File

@ -0,0 +1,66 @@
import unittest
import sys
import subprocess
class TestAppstream(unittest.TestCase):
def test_dummy(self):
self.assertEqual(True, True)
@unittest.expectedFailure
def test_expected_failure(self):
self.assertEqual(False, True)
def test_appstreamcli_search(self):
cp = subprocess.run(
['env LC_ALL=en_US.UTF-8 appstreamcli search ibus-typing-booster'],
encoding='UTF-8',
text=True,
shell=True,
capture_output=True)
print('----------------------------------------')
print(cp.stdout)
print('----------------------------------------')
output_lines = cp.stdout.split('\n')
result_dict = {}
identifier = ''
for line in output_lines:
if line == '---' or ':' not in line:
continue
key, value = map(str.strip, line.split(':', maxsplit=1))
if key == 'Identifier':
identifier = value
result_dict[identifier] = {}
result_dict[identifier][key] = value
print('----------------------------------------')
print(result_dict)
print('----------------------------------------')
typing_booster_identifier = (
'org.freedesktop.ibus.engine.typing_booster [inputmethod]')
print(f'Assert that {typing_booster_identifier} in {result_dict.keys()}')
self.assertTrue(
typing_booster_identifier
in result_dict.keys())
expected_dict = {
typing_booster_identifier: {
'Identifier': typing_booster_identifier,
'Name': 'Typing Booster',
'Summary': 'Predictive input method',
# The 'Package' section seems to be not always there,
# better do not test for this:
# 'Package': 'ibus-typing-booster',
'Homepage': 'https://mike-fabian.github.io/ibus-typing-booster/',
'Icon': 'org.freedesktop.ibus.engine.typing_booster.png',
}
}
for result_key, result_value in result_dict.items():
if result_key == typing_booster_identifier:
for expected_key, expected_value in (
expected_dict[typing_booster_identifier].items()):
print(f'Assert that {expected_key} is {expected_value}:')
self.assertEqual(
result_dict[result_key][expected_key],
expected_value)
if __name__ == "__main__":
unittest.main()

View File

@ -0,0 +1,23 @@
From 36e54f831324c8ad441ef66b49b2149edd752ea9 Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <matthias@tenstral.net>
Date: Sat, 9 Mar 2024 20:07:32 +0100
Subject: [PATCH] utils: Explicitly set format style when installing catalog
metadata
CC: https://github.com/PackageKit/PackageKit/issues/720
---
src/as-utils.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/as-utils.c b/src/as-utils.c
index 5efa237f..218f1774 100644
--- a/src/as-utils.c
+++ b/src/as-utils.c
@@ -2481,6 +2481,7 @@ as_utils_install_metadata_file_internal (const gchar *filename,
if (origin != NULL && !is_yaml) {
g_autoptr(AsMetadata) mdata = as_metadata_new ();
as_metadata_set_locale (mdata, "ALL");
+ as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
if (!as_metadata_parse_file (mdata, file_dest, AS_FORMAT_KIND_XML, error))
return FALSE;
as_metadata_set_origin (mdata, origin);