public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/dpkg] epel10.2: Do not ship bash completions provided by bash-completion < 2.18
@ 2026-11-02  9:37 Simone Caronni
  0 siblings, 0 replies; only message in thread
From: Simone Caronni @ 2026-11-02  9:37 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/dpkg
            Branch : epel10.2
            Commit : e6278d14e4abda3f96451df3c44de9945beff02b
            Author : Simone Caronni <negativo17@gmail.com>
            Date   : 2026-11-02T10:35:35+01:00
            Stats  : +20/-0 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/dpkg/c/e6278d14e4abda3f96451df3c44de9945beff02b?branch=epel10.2

            Log:
            Do not ship bash completions provided by bash-completion < 2.18

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---
diff --git a/dpkg.spec b/dpkg.spec
index 57a9eab..9c17b69 100644
--- a/dpkg.spec
+++ b/dpkg.spec
@@ -1,6 +1,15 @@
 %global pkgconfdir %{_sysconfdir}/dpkg
 %global pkgdatadir %{_datadir}/dpkg
 
+# bash-completion < 2.18 ships its own completions for dpkg, dpkg-deb,
+# dpkg-query, dpkg-source and dselect. Starting with 2.18 (Fedora 45) they are
+# only used as a fallback when the dpkg ones are not installed.
+%if (0%{?fedora} && 0%{?fedora} < 45) || 0%{?rhel} == 10
+%bcond bash_completion 0
+%else
+%bcond bash_completion 1
+%endif
+
 Name:           dpkg
 Version:        1.23.11
 Release:        %autorelease
@@ -236,6 +245,11 @@ done
 
 rm %{buildroot}%{_libdir}/libdpkg.la
 
+%if %{without bash_completion}
+# Conflicts with the files provided by bash-completion
+rm %{buildroot}%{bash_completions_dir}/{dpkg,dpkg-deb,dpkg-query,dpkg-source,dselect}
+%endif
+
 %check
 make TEST_PARALLEL=%{_smp_build_ncpus} check
 
@@ -270,9 +284,11 @@ make TEST_PARALLEL=%{_smp_build_ncpus} check
 %dir %{_libexecdir}/dpkg
 %{_libexecdir}/dpkg/dpkg-db-backup
 %{_libexecdir}/dpkg/dpkg-db-keeper
+%if %{with bash_completion}
 %{bash_completions_dir}/dpkg
 %{bash_completions_dir}/dpkg-deb
 %{bash_completions_dir}/dpkg-query
+%endif
 %{bash_completions_dir}/start-stop-daemon
 %{_mandir}/man1/dpkg.1*
 %{_mandir}/man1/dpkg-deb.1*
@@ -322,7 +338,9 @@ make TEST_PARALLEL=%{_smp_build_ncpus} check
 %{_bindir}/dpkg-shlibdeps
 %{_bindir}/dpkg-source
 %{_bindir}/dpkg-vendor
+%if %{with bash_completion}
 %{bash_completions_dir}/dpkg-source
+%endif
 %{zsh_completions_dir}/_dpkg-parsechangelog
 %{_mandir}/man1/dpkg-architecture.1*
 %{_mandir}/man1/dpkg-buildapi.1*
@@ -382,7 +400,9 @@ make TEST_PARALLEL=%{_smp_build_ncpus} check
 %files -n dselect -f dselect.lang
 %config(noreplace) %{pkgconfdir}/dselect.cfg
 %{_bindir}/dselect
+%if %{with bash_completion}
 %{bash_completions_dir}/dselect
+%endif
 %{perl_vendorlib}/Dselect
 %{_libexecdir}/dpkg/methods
 %{_localstatedir}/lib/dpkg/methods

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

only message in thread, other threads:[~2026-11-02  9:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02  9:37 [rpms/dpkg] epel10.2: Do not ship bash completions provided by bash-completion < 2.18 Simone Caronni

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