HomeFreeBSD

contrib: bash_completion.d: make install destination vendor dependent

Description

contrib: bash_completion.d: make install destination vendor dependent

Certain Linux distributions (Debian/Ubuntu at least) expect
bash-completion snippets to be installed in
/usr/share/bash-completion/completions instead of
/etc/bash_completion.d.

This patch sets the bashcompletiondir variable based on the vendor,
inspired by similar settings for initdir and initconfdir.

It seems that commit 612b8dff5bc3d827efb864a199a62bda1a419254
caused the file to be installed in the first-place (thus the error
when building debian packages only became apparent when testing a
2.2.0-rc4 build)

The change only sets the variable in Makefile context - the
rpm/zfs.spec.in file has the path hardcoded as
%{_sysconfdir}/bash_completion.d/zfs, but since running

./configure --sysconfdir=/myetc  ; make rpm

also results in all relevant files to be installed in /etc instead of
/myetc I assume this can remain as is.

Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Closes #15304

Details

Provenance
Stoiko Ivanov <s.ivanov@proxmox.com>Authored on Sep 20 2023, 5:33 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 3 2023, 4:06 PM
Parents
rG0d870a17750f: Fix invalid pointer access in trace_dbuf.h
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGdb5c3b4c767f: contrib: bash_completion.d: make install destination vendor dependent (authored by Stoiko Ivanov <s.ivanov@proxmox.com>).Oct 3 2023, 4:06 PM