From 67a25d726e09cce0d287806e0f8721f5cd6165fc Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 12 Jun 2022 20:47:23 +0200 Subject: [PATCH] Use user `buildservice-git` in README The setup instructions also use the `buildservice-git` package so it makes sense to use `buildservice-git` as user as well. --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 863de43..2cf0318 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ cp /usr/share/buildservice-git/skel/presets-example.json /etc/buildservice-git/p systemctl enable --now buildservice-git.service ``` +The service will run as user `buildservice-git`. + ### Setting up a working directory The server needs a place to temporarily store PKGBUILDs, cache files and other stuff. Just create a directory at any place with enough disk space and set the permissions so the @@ -109,7 +111,7 @@ The server obviously needs write permissions to add packages to repositories. In setup I've just add it as group and set permissions accordingly: ``` -sudo chown -R martchus:buildservice $local_db_path +sudo chown -R martchus:buildservice-git $local_db_path find $local_db_path -type d -exec chmod 775 {} \+ find $local_db_path -type f -exec chmod 664 {} \+ ``` @@ -161,7 +163,7 @@ to configure the databases used during the build. It relies on the configuration the `config-*` directories for that and needs permissions to update them: ``` -sudo chown buildservice:buildservice /the/chroot/directory/arch-x86_64/root/etc/{pacman,makepkg}.conf +sudo chown buildservice-git:buildservice-git /the/chroot/directory/arch-x86_64/root/etc/{pacman,makepkg}.conf ``` ### sudo configuration @@ -170,7 +172,7 @@ server with is allowed to use `sudo`. Currently it is not possible to supply the automatically so one has to allow access without password like this: ``` -buildservice ALL=(ALL) NOPASSWD:ALL +buildservice-git ALL=(ALL) NOPASSWD:ALL ``` ### Sample NGINX config @@ -220,10 +222,10 @@ configure errors can be confusing. Internally the server is mounting that direct described in [the wiki](https://wiki.archlinux.org/index.php/Ccache#makechrootpkg). If you want to use the existing `ccache` directory owned by your current user, you could do -the following to grant the `buildservice` user access to it: +the following to grant the `buildservice-git` user access to it: 1. Add new group for accessing the cache and add the users to it: - `sudo groupadd ccache`, `sudo usermod -a -G ccache "$USER"`, `sudo usermod -a -G ccache buildservice` + `sudo groupadd ccache`, `sudo usermod -a -G ccache "$USER"`, `sudo usermod -a -G ccache buildservice-git` 2. Set group ownership: `sudo chown -R $USER:ccache $ccache_dir` 3. Ensure dirs are readable by the group and that the group is inherited: `sudo find "$ccache_dir" -type d -exec chmod 2775 {} \+`