[PATCH] build: Drop execute permissions on virsh bash completion command
jfehlig at suse.com
Fri Jan 31 16:01:41 UTC 2020
On 1/31/20 8:39 AM, Michal Privoznik wrote:
> On 1/31/20 3:38 PM, Jim Fehlig wrote:
>> rpmlint complains about "script-without-shebang" due to the execute
>> permissions on /usr/share/bash-completion/completions/vsh. Use
>> INSTALL_DATA instead of INSTALL_SCRIPT to avoid the unnecessary
>> execute permissions.
>> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
>> BTW, of the nearly 800 files in /usr/share/bash-completion/completions/
>> on my installation, only vsh has execute permissions set.
>> tools/Makefile.am | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/tools/Makefile.am b/tools/Makefile.am
>> index 426a6ba661..d9d1a2f43f 100644
>> --- a/tools/Makefile.am
>> +++ b/tools/Makefile.am
>> @@ -357,7 +357,7 @@ libvirt-guests.service: libvirt-guests.service.in
>> if WITH_BASH_COMPLETION
>> $(MKDIR_P) "$(DESTDIR)$(BASH_COMPLETIONS_DIR)"
>> - $(INSTALL_SCRIPT) $(srcdir)/bash-completion/vsh \
>> + $(INSTALL_DATA) $(srcdir)/bash-completion/vsh \
>> ( cd $(DESTDIR)$(BASH_COMPLETIONS_DIR) && \
>> rm -f virsh virt-admin && \
> Frankly, I don't know why I wanted it to be executable. Perhaps I thought that
> if it wasn't bash would not load it, but apparently, that's not true. BTW, I
> have another executable file there, but the majority isn't.
I should have been as precise :-). Turns out there are a lot of links in that
> # find /usr/share/bash-completion/completions/ -type f -executable
> # find /usr/share/bash-completion/completions/ -type f \! -executable | wc -l
> Reviewed-by: Michal Privoznik <mprivozn at redhat.com>
More information about the libvir-list