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

[Suggestion] Update Repo Instructions to make them more 'copy&paste-able' #3

Open
populationless opened this issue Dec 22, 2022 · 1 comment

Comments

@populationless
Copy link

Hi Matt, it's me again 😅

I have a small suggestion, like the title says. Currently the Repo Instructions look like this:

apt update && apt install -y curl gnupg
curl https://mydomain.com/repo/public.gpg | gpg --yes --dearmor -o /usr/share/keyrings/openrepo-repo.gpg
echo "deb [arch=any signed-by=/usr/share/keyrings/openrepo-repo.gpg] https://mydomain.com/repo/ stable main" > /etc/apt/sources.list.d/openrepo-repo.list
apt update

I would modify them to add sudo in some choice places, so that the commands can be copy-pasted into a non-root terminal, like so:

sudo apt update && sudo apt install -y curl gnupg
curl https://mydomain.com/repo/public.gpg | sudo gpg --yes --dearmor -o /usr/share/keyrings/openrepo-repo.gpg
echo "deb [arch=any signed-by=/usr/share/keyrings/openrepo-repo.gpg] https://mydomain.com/repo/ stable main" | sudo tee /etc/apt/sources.list.d/openrepo-repo.list
sudo apt update

Since redirecting echo into privileged files doesn't work in a non-root terminal, I pipe to sudo tee instead. For similar reasons I added sudo to the gpg command on line 2. apt should be self-explanatory.

Please let me know what you think and thanks for an awesome project. Already getting some nice use out of it 😊

@matthill
Copy link
Contributor

That's a great suggestion. The sudo command will fail inside Docker unless installed explicitly. However, I think you're right it's probably more common without.

Here's the location where the code needs to be changed:
https://github.com/openkilt/openrepo/blob/master/web/adapters/repo/deb_repo.py#L31

I'll take a look at making this change in the future, unless someone wants to put in a PR beforehand.

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