From 84e5d828d124be1ba59e79428e88d6b0d5a10eb3 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 16 Jun 2025 21:19:19 +0200 Subject: [PATCH] Use RPM macros for shell completions and clean up directory ownership ... as recommended by the Fedora packaging guidelines [1,2]. This was made possible by two recent developments. First, the parent directories for shell completions are now owned by the filesystem RPM [3,4]. So, there won't be any unowned directories, if the toolbox RPM doesn't own them without depending on some other package that owns those directories. Second, there are now RPM macros for the parent directories for shell completions [5]. There's no need to do a build just for this. [1] https://docs.fedoraproject.org/es/packaging-guidelines/ShellCompletions/ [2] https://docs.fedoraproject.org/es/packaging-guidelines/UnownedDirectories/ [3] Fedora filesystem commit 47d37ac94192f792 https://src.fedoraproject.org/rpms/filesystem/c/47d37ac94192f792 https://bugzilla.redhat.com/show_bug.cgi?id=1312594 [4] Fedora filesystem commit 4c45982cd067557e https://src.fedoraproject.org/rpms/filesystem/c/4c45982cd067557e https://bugzilla.redhat.com/show_bug.cgi?id=1504616 [5] Fedora redhat-rpm-config commit 483a3b89d74c6f0b https://src.fedoraproject.org/rpms/redhat-rpm-config/c/483a3b89d74c6f0b Resolves: RHEL-95210 --- toolbox.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toolbox.spec b/toolbox.spec index 0950133..084d00b 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -162,14 +162,14 @@ export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_ %meson \ %if 0%{?rhel} - -Dfish_completions_dir=%{_datadir}/fish/vendor_completions.d \ + -Dfish_completions_dir=%{fish_completions_dir} \ %if 0%{?rhel} <= 9 -Dmigration_path_for_coreos_toolbox=true \ %endif %endif -Dprofile_dir=%{_sysconfdir}/profile.d \ -Dtmpfiles_dir=%{_tmpfilesdir} \ - -Dzsh_completions_dir=%{_datadir}/zsh/site-functions + -Dzsh_completions_dir=%{zsh_completions_dir} %meson_build @@ -192,15 +192,15 @@ install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf %doc CODE-OF-CONDUCT.md CONTRIBUTING.md GOALS.md NEWS README.md SECURITY.md %license COPYING %{?rhel:src/vendor/modules.txt} %{_bindir}/%{name} -%{_datadir}/bash-completion -%{_datadir}/fish -%{_datadir}/zsh %{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}-*.1* %{_mandir}/man5/%{name}.conf.5* %config(noreplace) %{_sysconfdir}/containers/%{name}.conf %{_sysconfdir}/profile.d/%{name}.sh %{_tmpfilesdir}/%{name}.conf +%{bash_completions_dir}/%{name}.bash +%{fish_completions_dir}/%{name}.fish +%{zsh_completions_dir}/_%{name} %files tests