public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/sparse] f45: Move test-inspect into a subpackage
@ 2026-11-05 15:34 Michal Schmidt
  0 siblings, 0 replies; only message in thread
From: Michal Schmidt @ 2026-11-05 15:34 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/sparse
            Branch : f45
            Commit : 9aed8b0a1efab591f2b44565f9f76d5aaaf7fc05
            Author : Michal Schmidt <mschmidt@redhat.com>
            Date   : 2026-11-05T08:20:34-07:00
            Stats  : +22/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/sparse/c/9aed8b0a1efab591f2b44565f9f76d5aaaf7fc05?branch=f45

            Log:
            Move test-inspect into a subpackage

test-inspect is the only part of the package that needs GTK. Moving
it to a separate sparse-test-inspect subpackage allows installing
sparse without pulling in the GTK stack.

Per the One-to-Many Replacement scenario from the packaging
guidelines, both sparse and sparse-test-inspect obsolete sparse from
before the split, so that an upgrade from an old sparse installs
sparse-test-inspect instead of silently dropping the tool. The
versioned bound ensures the subpackage is not pulled in again once
the user removed it.

---
diff --git a/sparse.spec b/sparse.spec
index a69f354..3ba8aac 100644
--- a/sparse.spec
+++ b/sparse.spec
@@ -13,6 +13,14 @@ License:    MIT
 URL:        https://sparse.wiki.kernel.org
 Source0:    https://git.kernel.org/pub/scm/devel/sparse/sparse.git/snapshot/sparse-%{commit}.tar.gz
 
+# test-inspect was part of the main package before it was split into the
+# sparse-test-inspect subpackage. Both packages obsolete the pre-split
+# sparse so that an upgrade pulls in the subpackage instead of silently
+# dropping the tool ("One-to-Many Replacement" in the packaging
+# guidelines). Drop these tags once no supported Fedora release ships
+# a pre-split sparse.
+Obsoletes:  sparse < 0.6.5~rc1^20261022.84ec0658c8
+
 BuildRequires:  gcc
 BuildRequires:  make
 BuildRequires:  gtk3-devel
@@ -35,6 +43,16 @@ that the grouping implies.
 
 Sparse is primarily used in the development and debugging of the Linux kernel.
 
+%package test-inspect
+Summary:    GTK tool to inspect sparse's abstract syntax trees
+Obsoletes:  sparse < 0.6.5~rc1^20261022.84ec0658c8
+
+%description test-inspect
+test-inspect parses source files with sparse and displays the
+resulting abstract syntax tree in a GTK+ tree view. It is mainly
+useful for debugging sparse itself. Installing it pulls in the
+GTK libraries, which the main sparse package does not require.
+
 %prep
 %autosetup -p1 -n sparse-%{commit}
 
@@ -54,8 +72,11 @@ Sparse is primarily used in the development and debugging of the Linux kernel.
 %{_bindir}/semind
 %{_bindir}/cgcc
 %{_bindir}/c2xml
-%{_bindir}/test-inspect
 %{_mandir}/man1/*
 
+%files test-inspect
+%license LICENSE
+%{_bindir}/test-inspect
+
 %changelog
 %autochangelog

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-05 15:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 15:34 [rpms/sparse] f45: Move test-inspect into a subpackage Michal Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox