index-0 / librewolf-void

LibreWolf package for Void Linux (XBPS)
51 stars 4 forks source link

Documentation for repository incorrect #20

Closed ACR-Jeff closed 6 months ago

ACR-Jeff commented 6 months ago

https://github.com/index-0/librewolf-void?tab=readme-ov-file#installing-through-the-repository

Installing through the repository If you want to update LibreWolf along with your distribution packages, just run the following commands once: echo 'repository=https://github.com/index-0/librewolf-void/releases/latest/download/' > /etc/xbps.d/20-librewolf.conf xbps-install -Su librewolf

https://github.com/index-0/librewolf-void/releases/latest/download/ doesn't lead to anything other than a 404 page not found

Also if I am correct it should be the below code to properly write to a root file? sudo sh -c "echo 'repository=https://github.com/index-0/librewolf-void/releases/latest/download/' >> /etc/xbps.d/20-librewolf.conf"

ACR-Jeff commented 6 months ago

I just realized there was a previous request for a repository, https://github.com/index-0/librewolf-void/issues/18

index-0 commented 6 months ago

The documentation is fine, but it could be clearer. I've left out 'sudo' for users who don't use it. Instead, I've added the right procedure in commit b61a3902a3f4cf0812fdb2c7444fbda2e1f076bf.

ACR-Jeff commented 6 months ago

The documentation is fine, but it could be clearer. I've left out 'sudo' for users who don't use it. Instead, I've added the right procedure in commit b61a390.

The documentation isn't fine if the link is dead, It won't provide any output to your repo, It won't download anything and it won't update anything with a dead link that doesn't follow the proper path to your files. Adding your repo as a dead link only causes an issue with xbps.

ACR-Jeff commented 6 months ago

Also the way you have your code will not write to the file, It only throws an error, This includes while using su or sudo echo 'repository=https://github.com/index-0/librewolf-void/releases/latest/download/' > /etc/xbps.d/20-librewolf.conf

bash: /etc/xbps.d/20-librewolf.conf: Permission denied

Yet this works sh -c "echo 'repository=https://github.com/index-0/librewolf-void/releases/latest/download/' >> /etc/xbps.d/20-librewolf.conf"

ACR-Jeff commented 6 months ago

I stand corrected on your original code to add the repository, It does work with su yet not sudo strange none the less, Yet there is also my posted code if you're wanting to add it as an option for those that use sudo. Thank you

index-0 commented 6 months ago

The '#' symbol before a command means you're executing it as root, which is how Void Linux does it in their official documentation. I don't mention 'sudo' in the documentation because it's not used by everyone. Other common practices are using 'doas' or elevating privileges with 'su' first. The last one is a coreutils command that's included in most (if not all) distributions. Whereas 'sudo' is a standalone tool that's not necessary for the administration of a Linux distribution. I don't even have it installed on my systems because I think it's a security risk for my use cases.

I know this can be confusing, especially for less experienced users who don't know that using 'sudo' before a redirector or pipe doesn't automatically give you permission to create a document in a directory afterwards. Here the solution you provide of using # sh -c '...' is correct, but also is elevating privileges beforehand with 'su'.

If you get a 404 error when you click on the link, don't worry. That's normal because we're not talking about a directory on an FTP or WebDAV server. What matters is getting the binaries, repodata, and signatures from the URL. As a proof that it works, the repository is working in my system as intended, and the numbers in the GitHub release stats page says that it's working as intended in other people's systems.