deprecate init/repo-init command

In current workflow you need to run setup to run init (because of
repository name), but you need to run init before setup (because of
repository tree rights).

New solution just add `Repo.init()` method call to setup subcommand
after config reload to make sure that repository name has been applied.
In addition chown method as well as setuid method for check_output have
been added.
This commit is contained in:
2022-03-21 00:44:44 +03:00
parent 63e79ec57a
commit 13121298f5
24 changed files with 225 additions and 147 deletions

View File

@ -12,7 +12,6 @@ TL;DR
```shell
yay -S ahriman
sudo -u ahriman ahriman -a x86_64 init
sudo ahriman -a x86_64 repo-setup --packager "ahriman bot <ahriman@example.com>" --repository "repository"
systemctl enable --now ahriman@x86_64.timer
```

View File

@ -5,11 +5,10 @@
3. TL;DR
```shell
sudo -u ahriman ahriman -a x86_64 repo-init
sudo ahriman -a x86_64 repo-setup ...
```
`repo-init` subcommand is required to create the repository tree with correct rights. `repo-setup` literally does the following steps:
`repo-setup` literally does the following steps:
1. Create `/var/lib/ahriman/.makepkg.conf` with `makepkg.conf` overrides if required (at least you might want to set `PACKAGER`):