#1202 Add revised packaging guidelines for shell completions
Opened 2 years ago by gotmax23. Modified a year ago

As of https://src.fedoraproject.org/rpms/redhat-rpm-config/c/483a3b89d74c6f0b18f49c5b2e4aafa14a98f841?branch=rawhide there are new macros for shell completions in Fedora. @pmatilai merged my PR to add that, but it was not built. I also have outstanding PRs to backport the changes to the older Fedora releases.

The three new macros are:

  • %bash_completions_dir
  • %zsh_completions_dir
  • %fish_completions_dir

I think there should be a new guideline saying that these MUST (at least SHOULD) be used instead of hard-coding the paths.

As of https://pagure.io/filesystem/c/1ab3d19e771134d8a3fed312b91546120d3a3b3e, filesystem owns these directories. This commit has been built in all current Fedora releases except Fedora 35. @mosvald said they were planning to build it in f35 after it was in the newer releases for some time.

Therefore, packages SHOULD NOT own these directories themselves.

I don't think these proposed guidelines should be added until the necessary changes are available on all releases, but I wanted to get the discussion started.


My inner demon who likes consistency is annoyed that the macros don't start with a leading underscore, i.e. they don't mirror %_bindir, %_libdir, %_datadir, etc.

Other than that, having those is a nice addition.

My inner demon who likes consistency is annoyed that the macros don't start with a leading underscore, i.e. they don't mirror %_bindir, %_libdir, %_datadir, etc.

I was going to name them like that, but I was told not to on packaging@, and the redhat-rpm-config maintainers seemed to agree.

Other than that, having those is a nice addition.

Thanks :).

+1 for MUST use, SHOULD not own

The new redhat-rpm-config with these macros has been submitted to Bodhi for f35 and f36:

https://bodhi.fedoraproject.org/updates/FEDORA-2022-5c5e12d1bd
https://bodhi.fedoraproject.org/updates/FEDORA-2022-3e63844f24

@mosvald, do you think the updated filesystem is ready to be pushed to f35? Maybe you can just backport https://pagure.io/filesystem/c/1ab3d19e771134d8a3fed312b91546120d3a3b3e?branch=master?

+1 for MUST, and the draft overall.

Sure. I can submit a PR. Any suggestions on where to put this? Should I just add a == Shell Completions section to the end of the main Packaging Guidelines page?

I'd prefer if it were added as a short, seperate page under "Domain-specific Guidelines". The main "Packaging Guidelines" page is already much too big :(

Login to comment on this ticket.

Metadata