public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/appstream-generator] rawhide: Rebase to 1.0.0
@ 2026-11-13 0:36 Neal Gompa
0 siblings, 0 replies; only message in thread
From: Neal Gompa @ 2026-11-13 0:36 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/appstream-generator
Branch : rawhide
Commit : 4eb90fbf2dbadec49864ebf63bf370a343f4e5fe
Author : Neal Gompa <ngompa@fedoraproject.org>
Date : 2026-11-12T19:36:39-05:00
Stats : +197/-161 in 7 file(s)
URL : https://src.fedoraproject.org/rpms/appstream-generator/c/4eb90fbf2dbadec49864ebf63bf370a343f4e5fe?branch=rawhide
Log:
Rebase to 1.0.0
- Modernize spec file
---
diff --git a/.gitignore b/.gitignore
index b9e1851..8581ca9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@
/appstream-generator-4d2ebc3880ac443376f21358a30b2e1edc62a714.tar.gz
/appstream-generator-0.9.1.tar.gz
/appstream-generator-0.10.1.tar.gz
+/appstream-generator-1.0.0.tar.gz
diff --git a/0001-tests-Combine-results-and-registry-tests-to-make-the.patch b/0001-tests-Combine-results-and-registry-tests-to-make-the.patch
deleted file mode 100644
index a83290b..0000000
--- a/0001-tests-Combine-results-and-registry-tests-to-make-the.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 43bba5d450f91f59e7408c7ddf25c9557ca9cef2 Mon Sep 17 00:00:00 2001
-From: Matthias Klumpp <matthias@tenstral.net>
-Date: Mon, 3 Nov 2025 22:53:44 +0100
-Subject: [PATCH] tests: Combine results and registry tests to make them
- order-independent
-
-The tests had an implicit pseudo-dependency on each other, and somehow
-the order randomly changed on recent Fedora releases (apparently the
-compiler changed declaration order within the file? Even though that
-shouldn't be possible...)
-
-This patch removes the dependency, which hopefully addresses the test
-failure.
-
-(cherry picked from commit 20010e3c85bc150cfa7c97dbb8802e758f656dcf)
----
- tests/tests-misc.cpp | 21 ++++++++++-----------
- 1 file changed, 10 insertions(+), 11 deletions(-)
-
-diff --git a/tests/tests-misc.cpp b/tests/tests-misc.cpp
-index 438cd95..af05289 100644
---- a/tests/tests-misc.cpp
-+++ b/tests/tests-misc.cpp
-@@ -324,9 +324,11 @@ TEST_CASE("Image size operations", "[utils][imagesize]")
- }
- }
-
--TEST_CASE("HintRegistry functionality", "[hintregistry]")
-+TEST_CASE("GeneratorResult functionality", "[result]")
- {
-- using namespace ASGenerator;
-+ /**
-+ * HINTS REGISTRY
-+ */
-
- SECTION("Load hints registry")
- {
-@@ -407,14 +409,16 @@ TEST_CASE("HintRegistry functionality", "[hintregistry]")
- // Clean up
- fs::remove(tempFile);
- }
--}
-
--TEST_CASE("GeneratorResult functionality", "[result]")
--{
-- using namespace ASGenerator;
-+ /**
-+ * GENERATOR RESULT
-+ */
-
- auto pkg = std::make_shared<DummyPackage>("foobar", "1.0.0", "amd64");
-
-+ // Ensure hints registry is loaded
-+ REQUIRE_NOTHROW(loadHintsRegistry());
-+
- SECTION("Basic GeneratorResult operations")
- {
- GeneratorResult result(pkg);
-@@ -431,9 +435,6 @@ TEST_CASE("GeneratorResult functionality", "[result]")
- {
- GeneratorResult result(pkg);
-
-- // Ensure hints registry is loaded
-- loadHintsRegistry();
--
- // Add a hint with component ID
- std::unordered_map<std::string, std::string> vars = {
- {"icon_fname", "test.png" },
-@@ -456,7 +457,6 @@ TEST_CASE("GeneratorResult functionality", "[result]")
- SECTION("Generate hints JSON")
- {
- GeneratorResult result(pkg);
-- loadHintsRegistry();
-
- // Add some hints
- const std::unordered_map<std::string, std::string> &vars = {
-@@ -489,7 +489,6 @@ TEST_CASE("GeneratorResult functionality", "[result]")
- SECTION("Move semantics")
- {
- GeneratorResult result1(pkg);
-- loadHintsRegistry();
- result1.addHint("test.component", "icon-not-found");
-
- // Test move constructor
---
-2.51.1
-
diff --git a/069ccce39dc5c849e16d832e2d5964eca94b4db5.patch b/069ccce39dc5c849e16d832e2d5964eca94b4db5.patch
new file mode 100644
index 0000000..c3bdae8
--- /dev/null
+++ b/069ccce39dc5c849e16d832e2d5964eca94b4db5.patch
@@ -0,0 +1,63 @@
+From 069ccce39dc5c849e16d832e2d5964eca94b4db5 Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Mon, 9 Nov 2026 10:12:23 +0100
+Subject: [PATCH] tests: Use /etc/hosts for archive-escape tests
+
+Turns out machine-id was *also* not present everywhere...
+---
+ tests/tests-misc.cpp | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/tests/tests-misc.cpp b/tests/tests-misc.cpp
+index d5aa901..633196e 100644
+--- a/tests/tests-misc.cpp
++++ b/tests/tests-misc.cpp
+@@ -264,24 +264,24 @@ TEST_CASE("Symlinks in archives resolve within the archive", "[zarchive]")
+ const std::string padding(25 * 1024 * 1024, 'x');
+
+ std::vector<TestArchiveEntry> entries = {
+- {"etc/", AE_IFDIR, {} },
+- {"etc/machine-id", AE_IFREG, "8f1_inArchive_1d370d045bbbe093e4\n"},
+- {"usr/share/data/", AE_IFDIR, {} },
+- {"usr/share/data/real.txt", AE_IFREG, "real data\n" },
+- {"usr/bin/", AE_IFDIR, {} },
++ {"etc/", AE_IFDIR, {} },
++ {"etc/hosts", AE_IFREG, "in-archive\n" },
++ {"usr/share/data/", AE_IFDIR, {} },
++ {"usr/share/data/real.txt", AE_IFREG, "real data\n" },
++ {"usr/bin/", AE_IFDIR, {} },
+ // an absolute symlink must resolve against the archive root, never against
+ // the filesystem of the machine we are running on
+- {"usr/bin/link-absolute", AE_IFLNK, "/etc/machine-id" },
++ {"usr/bin/link-absolute", AE_IFLNK, "/etc/hosts" },
+ // an ordinary relative symlink
+- {"usr/bin/link-relative", AE_IFLNK, "../share/data/real.txt" },
++ {"usr/bin/link-relative", AE_IFLNK, "../share/data/real.txt" },
+ // a relative symlink with more ".." than there is depth: it must be clamped
+ // to the archive root instead of escaping it
+- {"usr/bin/link-escaping", AE_IFLNK, "../../../../../etc/machine-id"},
++ {"usr/bin/link-escaping", AE_IFLNK, "../../../../../etc/hosts"},
+ };
+
+- // sanity check: the host must have a different /etc/machine-id than the archive,
++ // sanity check: the host must have a different /etc/hosts than the archive,
+ // otherwise this test can not tell the two apart
+- REQUIRE(fs::exists("/etc/machine-id"));
++ REQUIRE(fs::exists("/etc/hosts"));
+
+ auto checkArchive = [&](const std::string &archive, bool optimizeReads) {
+ ArchiveDecompressor ar;
+@@ -289,10 +289,10 @@ TEST_CASE("Symlinks in archives resolve within the archive", "[zarchive]")
+ ar.open(archive, fs::path(tmpdir) / (optimizeReads ? "extract-opt" : "extract-direct"));
+
+ REQUIRE(asString(ar.readData("/usr/share/data/real.txt")) == "real data\n");
+- REQUIRE(asString(ar.readData("/etc/machine-id")) == "8f1_inArchive_1d370d045bbbe093e4\n");
++ REQUIRE(asString(ar.readData("/etc/hosts")) == "in-archive\n");
+ REQUIRE(asString(ar.readData("/usr/bin/link-relative")) == "real data\n");
+- REQUIRE(asString(ar.readData("/usr/bin/link-absolute")) == "8f1_inArchive_1d370d045bbbe093e4\n");
+- REQUIRE(asString(ar.readData("/usr/bin/link-escaping")) == "8f1_inArchive_1d370d045bbbe093e4\n");
++ REQUIRE(asString(ar.readData("/usr/bin/link-absolute")) == "in-archive\n");
++ REQUIRE(asString(ar.readData("/usr/bin/link-escaping")) == "in-archive\n");
+ };
+
+ SECTION("Reading directly from the archive")
diff --git a/0e63c36a321bd715ea92f9227910822b40545135.patch b/0e63c36a321bd715ea92f9227910822b40545135.patch
new file mode 100644
index 0000000..78a1fca
--- /dev/null
+++ b/0e63c36a321bd715ea92f9227910822b40545135.patch
@@ -0,0 +1,42 @@
+From 0e63c36a321bd715ea92f9227910822b40545135 Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Sat, 29 Aug 2026 21:29:47 +0200
+Subject: [PATCH] Fix build with libfyaml 0.9.6
+
+---
+ src/yaml-utils.h | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/src/yaml-utils.h b/src/yaml-utils.h
+index 71b0b2cb..d59b207a 100644
+--- a/src/yaml-utils.h
++++ b/src/yaml-utils.h
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (C) 2018-2025 Matthias Klumpp <matthias@tenstral.net>
++ * Copyright (C) 2018-2026 Matthias Klumpp <matthias@tenstral.net>
+ *
+ * Licensed under the GNU Lesser General Public License Version 3
+ *
+@@ -22,6 +22,21 @@
+ #include <string>
+ #include <vector>
+ #include <memory>
++
++/* Workaround for libfyaml 0.9.6: When libfyaml.h is included from C++,
++ * libfyaml does not detect <stdatomic.h> (it only checks __STDC_VERSION__)
++ * and falls back to hand-written atomic macros which fail to compile.
++ * Both GCC and Clang ship a C++-usable <stdatomic.h>, so we pull it in here
++ * and point libfyaml at its standard code path instead. This is a no-op with
++ * libfyaml versions that get the detection right by themselves. */
++#include <stdatomic.h>
++#ifndef FY_HAVE_STDATOMIC_H
++#define FY_HAVE_STDATOMIC_H
++#endif
++#ifndef FY_HAVE_C11_ATOMICS
++#define FY_HAVE_C11_ATOMICS
++#endif
++
+ #include <libfyaml.h>
+
+ namespace ASGenerator
diff --git a/13b25cd209d47e42c8df96691dfbdb6648be6845.patch b/13b25cd209d47e42c8df96691dfbdb6648be6845.patch
new file mode 100644
index 0000000..0cc6366
--- /dev/null
+++ b/13b25cd209d47e42c8df96691dfbdb6648be6845.patch
@@ -0,0 +1,63 @@
+From 13b25cd209d47e42c8df96691dfbdb6648be6845 Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Mon, 9 Nov 2026 04:23:48 +0100
+Subject: [PATCH] tests: Use /etc/machine-id for archive-escape tests
+
+Apparently, some build environments do not have /etc/hostname, but do
+have a machine-id.
+---
+ tests/tests-misc.cpp | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/tests/tests-misc.cpp b/tests/tests-misc.cpp
+index cb1b034..d5aa901 100644
+--- a/tests/tests-misc.cpp
++++ b/tests/tests-misc.cpp
+@@ -264,24 +264,24 @@ TEST_CASE("Symlinks in archives resolve within the archive", "[zarchive]")
+ const std::string padding(25 * 1024 * 1024, 'x');
+
+ std::vector<TestArchiveEntry> entries = {
+- {"etc/", AE_IFDIR, {} },
+- {"etc/hostname", AE_IFREG, "in-archive\n" },
+- {"usr/share/data/", AE_IFDIR, {} },
+- {"usr/share/data/real.txt", AE_IFREG, "real data\n" },
+- {"usr/bin/", AE_IFDIR, {} },
++ {"etc/", AE_IFDIR, {} },
++ {"etc/machine-id", AE_IFREG, "8f1_inArchive_1d370d045bbbe093e4\n"},
++ {"usr/share/data/", AE_IFDIR, {} },
++ {"usr/share/data/real.txt", AE_IFREG, "real data\n" },
++ {"usr/bin/", AE_IFDIR, {} },
+ // an absolute symlink must resolve against the archive root, never against
+ // the filesystem of the machine we are running on
+- {"usr/bin/link-absolute", AE_IFLNK, "/etc/hostname" },
++ {"usr/bin/link-absolute", AE_IFLNK, "/etc/machine-id" },
+ // an ordinary relative symlink
+ {"usr/bin/link-relative", AE_IFLNK, "../share/data/real.txt" },
+ // a relative symlink with more ".." than there is depth: it must be clamped
+ // to the archive root instead of escaping it
+- {"usr/bin/link-escaping", AE_IFLNK, "../../../../../etc/hostname"},
++ {"usr/bin/link-escaping", AE_IFLNK, "../../../../../etc/machine-id"},
+ };
+
+- // sanity check: the host must have a different /etc/hostname than the archive,
++ // sanity check: the host must have a different /etc/machine-id than the archive,
+ // otherwise this test can not tell the two apart
+- REQUIRE(fs::exists("/etc/hostname"));
++ REQUIRE(fs::exists("/etc/machine-id"));
+
+ auto checkArchive = [&](const std::string &archive, bool optimizeReads) {
+ ArchiveDecompressor ar;
+@@ -289,10 +289,10 @@ TEST_CASE("Symlinks in archives resolve within the archive", "[zarchive]")
+ ar.open(archive, fs::path(tmpdir) / (optimizeReads ? "extract-opt" : "extract-direct"));
+
+ REQUIRE(asString(ar.readData("/usr/share/data/real.txt")) == "real data\n");
+- REQUIRE(asString(ar.readData("/etc/hostname")) == "in-archive\n");
++ REQUIRE(asString(ar.readData("/etc/machine-id")) == "8f1_inArchive_1d370d045bbbe093e4\n");
+ REQUIRE(asString(ar.readData("/usr/bin/link-relative")) == "real data\n");
+- REQUIRE(asString(ar.readData("/usr/bin/link-absolute")) == "in-archive\n");
+- REQUIRE(asString(ar.readData("/usr/bin/link-escaping")) == "in-archive\n");
++ REQUIRE(asString(ar.readData("/usr/bin/link-absolute")) == "8f1_inArchive_1d370d045bbbe093e4\n");
++ REQUIRE(asString(ar.readData("/usr/bin/link-escaping")) == "8f1_inArchive_1d370d045bbbe093e4\n");
+ };
+
+ SECTION("Reading directly from the archive")
diff --git a/appstream-generator.spec b/appstream-generator.spec
index f47895b..101ccf4 100644
--- a/appstream-generator.spec
+++ b/appstream-generator.spec
@@ -1,29 +1,25 @@
-%global appstream_minver 1.1.0
+%global appstream_minver 1.2.0
%global glib2_minver 2.80
%global asgen_jsdir %{_datadir}/appstream/templates/default/static/js
-# missing js dependencies
-## TODO: One day, fix this?
-%bcond_without vendored_js
-
Name: appstream-generator
-Version: 0.10.1
-Release: 5%{?dist}
+Version: 1.0.0
+Release: 1%{?dist}
Summary: Fast AppStream metadata generator
License: LGPL-3.0-or-later AND MIT
URL: https://github.com/ximion/%{name}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
-# Generated by running the following commands
-# $ tar xvf %{name}-%{version}.tar.gz
-# $ cd %{name}-%{version}/contrib/setup
-# $ yarn install --no-bin-links --prod --no-lockfile --non-interactive
-# $ cd ../../ && tar czvf %{name}-nodemodules.tar.gz contrib/setup/node_modules
-Source1: %{name}-nodemodules.tar.gz
# Backports from upstream
-Patch0001: 0001-tests-Combine-results-and-registry-tests-to-make-the.patch
+## Fix with libfyaml 0.9.6
+Patch0: https://github.com/ximion/appstream-generator/commit/0e63c36a321bd715ea92f9227910822b40545135.patch
+## Fix tests
+Patch1: https://github.com/ximion/appstream-generator/commit/13b25cd209d47e42c8df96691dfbdb6648be6845.patch
+Patch2: https://github.com/ximion/appstream-generator/commit/069ccce39dc5c849e16d832e2d5964eca94b4db5.patch
+
+BuildSystem: meson
BuildRequires: gcc-c++ >= 14.0
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_minver}
@@ -34,34 +30,26 @@ BuildRequires: pkgconfig(appstream-compose) >= %{appstream_minver}
BuildRequires: pkgconfig(lmdb) >= 0.9.22
BuildRequires: pkgconfig(libarchive) >= 3.2
BuildRequires: pkgconfig(libcurl)
-BuildRequires: pkgconfig(libfyaml)
+BuildRequires: pkgconfig(libfyaml) >= 0.9.6
+BuildRequires: pkgconfig(quill) >= 11.1
BuildRequires: pkgconfig(tbb)
BuildRequires: pkgconfig(icu-uc)
-BuildRequires: pkgconfig(inja)
+BuildRequires: pkgconfig(inja) >= 3.5.0
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(catch2-with-main)
-BuildRequires: meson >= 1.0
+BuildRequires: meson >= 1.6
# For man pages
BuildRequires: %{_bindir}/xsltproc
BuildRequires: docbook-dtds
BuildRequires: docbook-style-xsl
-%if %{with vendored_js}
-Provides: bundled(npm(Flot)) = 0.8.3
-Provides: bundled(js-highlight) = 9.16.2
-Provides: bundled(js-jquery) = 3.4.1
-%else
-BuildRequires: npm(Flot)
-BuildRequires: js-highlight
-BuildRequires: js-jquery
-# For nodejs macros
-BuildRequires: nodejs-packaging
-# For JS macros
-BuildRequires: web-assets-devel
-Requires: npm(Flot)
-Requires: js-highlight
-Requires: js-jquery
-%endif
+# For tests
+BuildRequires: ffmpeg-free
+BuildRequires: optipng
+
+# Included in the source tarball
+Provides: bundled(js-highlight) = 11.12.0
+Provides: bundled(js-uplot) = 1.6.32
Recommends: ffmpeg-free
Recommends: optipng
@@ -78,45 +66,7 @@ such as software centers. It will also generate issue reports
as JSON documents and HTML pages.
%prep
-%setup -q
-%if %{with vendored_js}
-%setup -q -T -D -a 1
-%endif
-%autopatch -p1
-
-sed -r -i "/unordered_map/a #include <mutex>" src/backends/freebsd/fbsdpkg.h
-
-%conf
-%meson -Ddownload-js=false
-
-
-%build
-%meson_build
-
-
-%install
-%meson_install
-
-%if ! %{with vendored_js}
-# link in JavaScript libraries...
-mkdir -p %{buildroot}%{asgen_jsdir}/jquery
-ln -srf %{buildroot}%{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{asgen_jsdir}/jquery/jquery.min.js
-mkdir -p %{buildroot}%{asgen_jsdir}/highlight
-ln -srf %{buildroot}%{_jsdir}/highlight.js/highlight.pack.js %{buildroot}%{asgen_jsdir}/highlight/highlight.pack.js
-ln -srf %{buildroot}%{nodejs_sitelib}/flot/ %{buildroot}%{asgen_jsdir}/flot
-%else
-# install vendored JavaScript libraries
-mkdir -p %{buildroot}%{asgen_jsdir}/jquery
-install contrib/setup/node_modules/jquery/dist/*.min.js -t %{buildroot}%{asgen_jsdir}/jquery
-mkdir -p %{buildroot}%{asgen_jsdir}/highlight
-install contrib/setup/node_modules/highlightjs/*.js -t %{buildroot}%{asgen_jsdir}/highlight
-mkdir -p %{buildroot}%{asgen_jsdir}/flot
-install contrib/setup/node_modules/jquery-flot/jquery.flot*.js -t %{buildroot}%{asgen_jsdir}/flot
-%endif
-
-
-%check
-%meson_test
+%autosetup -C -p1
%files
@@ -127,7 +77,12 @@ install contrib/setup/node_modules/jquery-flot/jquery.flot*.js -t %{buildroot}%{
%{_datadir}/appstream/
%{_datadir}/metainfo/org.freedesktop.appstream.generator.metainfo.xml
+
%changelog
+* Thu Nov 12 2026 Neal Gompa <ngompa@fedoraproject.org> - 1.0.0-1
+- Rebase to 1.0.0
+- Modernize spec file
+
* Thu Sep 10 2026 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.10.1-5
- Rebuilt for libxml-2.5.4
diff --git a/sources b/sources
index 0f20a00..4307160 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-SHA512 (appstream-generator-0.10.1.tar.gz) = ed36195981187dcb345d153378071c40edba49495ba56971aeee25e7482a0fa179f4ef36932c75a49b7327a12b25531c89049e803c0bffb1a6eaf4bc7b52e550
-SHA512 (appstream-generator-nodemodules.tar.gz) = 723cc10816ca38b02c1ca8257b7d128772c049f2f39e2d0717aae4790f61e61696f585024de5be6cc7aa448e8f7db4e1d28ecc52d24995941d3d8bd5b1bf9eeb
+SHA512 (appstream-generator-1.0.0.tar.gz) = 598f53c5a67051af61ad8adcce836c51f69e805253e9cd3ac249b21bf773a8fad30d2d206f4d32be149f51416f18b3aa4453cb06279932dfef41d00463fd1d8c
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-13 0:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13 0:36 [rpms/appstream-generator] rawhide: Rebase to 1.0.0 Neal Gompa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox