Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chmod 644 /etc/bash_completion.d/argbash ? #116

Closed
salim-b opened this issue Feb 28, 2020 · 5 comments
Closed

chmod 644 /etc/bash_completion.d/argbash ? #116

salim-b opened this issue Feb 28, 2020 · 5 comments
Assignees

Comments

@salim-b
Copy link
Contributor

salim-b commented Feb 28, 2020

After installing argbash to /usr/bin/ following the official installation instructions and including bash completion, i.e.:

sudo make install PREFIX=/usr INSTALL_COMPLETION=yes

I noticed that the bash completion file /etc/bash_completion.d/argbash has executable bits set while all the other files in the same folder don't.:

$ ls -1l /etc/bash_completion.d

-rw-r--r-- 1 root root  6636 Mär 31  2016 apport_completion
-rwxr-xr-x 1 root root  1370 Feb 28 00:32 argbash
-rw-r--r-- 1 root root   408 Aug 21  2015 cryptdisks
-rw-r--r-- 1 root root   323 Mär 18  2016 desktop-file-validate
-rw-r--r-- 1 root root  2384 Aug 12  2010 dkms
-rw-r--r-- 1 root root   439 Jun 13  2016 git-prompt
-rw-r--r-- 1 root root 11144 Apr 16  2016 grub
-rw-r--r-- 1 root root   736 Mai  7  2013 insserv
-rw-r--r-- 1 root root  6596 Jun 28  2016 libreoffice.sh
-rw-r--r-- 1 root root 20902 Nov 19  2015 maven
-rw-r--r-- 1 root root   553 Feb  2  2016 openvpn

Therefore I wonder if it would make sense to chmod 644 the file /etc/bash_completion.d/argbash in the Makefile. I'm running Ubuntu 16.04 and I don't know if the bash completion scripts need to be executable in other distros.

@matejak matejak self-assigned this Jul 8, 2020
@matejak
Copy link
Owner

matejak commented Jul 8, 2020

Could you please confirm that this is still an issue in github master? I hope that it got resolved already as #104

@salim-b
Copy link
Contributor Author

salim-b commented Jul 9, 2020

Well, I just realized another thing: The path construction in resources/Makefile is pretty much broken 😒

You set the following defaults:

PREFIX ?= $(HOME)/.local
PREFIXED_LIBDIR ?= $(PREFIX)/lib
SYSCONFDIR ?= /etc
BASH_COMPLETION_DIRECTORY ?= $(SYSCONFDIR)/bash_completion.d
ROOT ?= /

And then construct paths like this:

mkdir -p "$(ROOT)/$(PREFIX)/bin"

This cannot work... and will (in my case) result in the attempt to

mkdir -p "///home/salim/.local/bin"

I've now succesfully installed the argbash on user-level (Ubuntu 20.04) using:

make install ROOT="" PREFIX=home/salim/.local BASH_COMPLETION_DIRECTORY=home/salim/.local/share/bash-completion INSTALL_COMPLETION=yes

(~/.local/share/bash-completion is the default user-level bash-completion dir if $XDG_DATA_HOME is unset, at least for bash-completion 2.9+, see Q. Where should I install my own local completions?).

Remaining issue: man argbash gives me an empty manpage...


Could you please confirm that this is still an issue in github master? I hope that it got resolved already as #104

I have no idea (I only tested the latest version 2.8.1) and I don't feel like cluttering up my system anymore with files that have been installed bypassing proper package managers, sorry.

The bash-completion file installed on user-level by the above command has exection bits set (but that's probably not what you wanted to know):

$ ls -1la /home/salim/.local/share/bash-completion/argbash 
-rwxrwxr-x 1 salim salim 1370 Jul  9 18:59 /home/salim/.local/share/bash-completion/argbash

@matejak
Copy link
Owner

matejak commented Jul 10, 2020

What's wrong with ///home/salim/.local/bin besides that it looks weird? It is the same as /home/salim/.local/bin which is the directory to install user software, as you are already on board with.

@salim-b
Copy link
Contributor Author

salim-b commented Jul 11, 2020

What's wrong with ///home/salim/.local/bin besides that it looks weird? It is the same as /home/salim/.local/bin which is the directory to install user software, as you are already on board with.

Ah crap, you're right. 🤐 Didn't realize that, thanks.

@matejak
Copy link
Owner

matejak commented Jul 12, 2020

I close this as duplicate of #104, as a new version will be released later this month, you can reopen if you still see the issue.

@matejak matejak closed this as completed Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants