Arch PKGBUILDs for https://tangled.org/@tangled.org/core
arch pkgbuild

use strict variable expansion and don't provide defaults

Signed-off-by: tjh <did:plc:65gha4t3avpfpzmvpbwovss7>

tjh.dev a22102c2 ffb31bcd

verified
+1
src/README.md.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/README.md 3 4 # pkgs 4 5
+3 -2
src/knotserver-git/README.md.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/README.md 3 4 # knotserver-git 4 5 ··· 10 11 ## SSH 11 12 12 13 SSH access is required to push to repositories. To enable, use the sshd_config.d drop-in, and give the 13 - \`${knotserver_user:-git}\` user a shell and a home directory: 14 + \`${knotserver_user}\` user a shell and a home directory: 14 15 15 16 \`\`\`bash 16 17 ln -s /usr/lib/systemd/sshd_config.d/knotserver.conf /etc/ssh/sshd_config.d/30-knotserver.conf 17 - usermod -s /usr/bin/bash -d ${knotserver_repo_path} ${knotserver_user:-git} 18 + usermod -s /usr/bin/bash -d ${knotserver_repo_path} ${knotserver_user} 18 19 \`\`\` 19 20 20 21 EOF
+3 -2
src/knotserver-shared/install.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/knotserver.install 3 4 post_install() { 4 5 echo 5 - echo knotserver installed, with repositories stored in: ${knotserver_repo_path:-/var/lib/tangled/repositories} 6 + echo knotserver installed, with repositories stored in: ${knotserver_repo_path} 6 7 echo 7 8 echo Use "systemctl edit knotserver.service" to set "KNOT_SERVER_OWNER" to the DID of the knot owner, 8 9 echo and override "KNOT_SERVER_HOSTNAME" if 'hostname' does not return the FQDN echo of your knot. 9 10 echo 10 11 echo To enable git push over ssh for tangled repositories, run: 11 12 echo " ln -s /usr/lib/systemd/sshd_config.d/knotserver.conf /etc/ssh/sshd_config.d/30-knotserver.conf" 12 - echo " usermod -s /usr/bin/bash -d ${knotserver_repo_path:-/var/lib/tangled/repositories} ${knotserver_user:-git}" 13 + echo " usermod -s /usr/bin/bash -d ${knotserver_repo_path} ${knotserver_user}" 13 14 echo 14 15 echo and reload sshd 15 16 echo
+7 -6
src/knotserver-shared/service.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/knotserver.service 3 4 [Unit] 4 5 Description=tangled knot server 5 6 After=network.target network-online.target 6 7 Wants=network-online.target 7 - AssertPathExists=${knotserver_path:-/var/lib/tangled} 8 - AssertPathExists=${knotserver_repo_path:-/var/lib/tangled/repositories} 8 + AssertPathExists=${knotserver_path} 9 + AssertPathExists=${knotserver_repo_path} 9 10 10 11 [Service] 11 12 Environment="KNOT_SERVER_HOSTNAME=%H" 12 13 Environment="KNOT_SERVER_LISTEN_ADDR=127.0.0.1:5555" 13 - Environment="KNOT_REPO_SCAN_PATH=${knotserver_repo_path:-/var/lib/tangled/repositories}" 14 - WorkingDirectory=${knotserver_path:-/var/lib/tangled} 14 + Environment="KNOT_REPO_SCAN_PATH=${knotserver_repo_path}" 15 + WorkingDirectory=${knotserver_path} 15 16 ExecStart=/usr/bin/knot server 16 17 Restart=always 17 - User=${knotserver_user:-git} 18 - Group=${knotserver_group:-git} 18 + User=${knotserver_user} 19 + Group=${knotserver_group} 19 20 20 21 StandardOutput=journal 21 22 StandardError=journal
+3 -2
src/knotserver-shared/sshd.conf.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/knotserver-sshd.conf 3 - Match User ${knotserver_user:-git} 4 - AuthorizedKeysCommand /usr/bin/knot keys -output authorized-keys -git-dir ${knotserver_repo_path:-/var/lib/tangled/repositories} -log-path ${knotserver_log_directory:-/var/log/knotserver}/keyfetch.log 4 + Match User ${knotserver_user} 5 + AuthorizedKeysCommand /usr/bin/knot keys -output authorized-keys -git-dir ${knotserver_repo_path} -log-path ${knotserver_log_directory}/keyfetch.log 5 6 AuthorizedKeysCommandUser nobody 6 7 EOF
+3 -2
src/knotserver-shared/tmpfiles.conf.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/knotserver-tmpfiles.conf 3 4 d /etc/tangled 700 root root 4 - d ${knotserver_path:-/var/lib/tangled} 755 ${knotserver_user:-git} ${knotserver_group:-git} - 5 - d ${knotserver_repo_path:-/var/lib/tangled/repositories} 755 ${knotserver_user:-git} ${knotserver_group:-git} - 5 + d ${knotserver_path} 755 ${knotserver_user} ${knotserver_group} - 6 + d ${knotserver_repo_path} 755 ${knotserver_user} ${knotserver_group} - 6 7 EOF
+1
src/knotserver/PKGBUILD.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/PKGBUILD 3 4 _pkgname=knotserver 4 5 _pkgver=${tag}
+3 -2
src/knotserver/README.md.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/README.md 3 4 # knotserver 4 5 ··· 10 11 ## SSH 11 12 12 13 SSH access is required to push to repositories. To enable, use the sshd_config.d drop-in, and give the 13 - \`${knotserver_user:-git}\` user a shell and a home directory: 14 + \`${knotserver_user}\` user a shell and a home directory: 14 15 15 16 \`\`\`bash 16 17 ln -s /usr/lib/systemd/sshd_config.d/knotserver.conf /etc/ssh/sshd_config.d/30-knotserver.conf 17 - usermod -s /usr/bin/bash -d ${knotserver_repo_path} ${knotserver_user:-git} 18 + usermod -s /usr/bin/bash -d ${knotserver_repo_path} ${knotserver_user} 18 19 \`\`\` 19 20 20 21 EOF
+1
src/spindle/PKGBUILD.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/PKGBUILD 3 4 _pkgname=spindle 4 5 _pkgver=${tag}
+5 -4
src/spindle/service.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/spindle.service 3 4 [Unit] 4 5 Description=tangled spindle server 5 6 After=network.target network-online.target docker.service 6 7 Wants=network-online.target 7 - AssertPathExists=${spindle_path:-/var/lib/spindle} 8 + AssertPathExists=${spindle_path} 8 9 9 10 [Service] 10 11 Environment="SPINDLE_SERVER_HOSTNAME=%H" 11 12 Environment="SPINDLE_SERVER_LISTEN_ADDR=127.0.0.1:6555" 12 - WorkingDirectory=${spindle_path:-/var/lib/spindle} 13 + WorkingDirectory=${spindle_path} 13 14 ExecStart=/usr/bin/spindle 14 15 Restart=always 15 - User=${spindle_user:-root} 16 - Group=${spindle_group:-root} 16 + User=${spindle_user} 17 + Group=${spindle_group} 17 18 StandardOutput=journal 18 19 StandardError=journal 19 20 LimitNOFILE=65536
+2 -1
src/spindle/tmpfiles.conf.sh
··· 1 1 #!/usr/bin/bash 2 + set -eu 2 3 cat << EOF > ${pkgbuild_path}/spindle-tmpfiles.conf 3 - d ${spindle_path:-/var/lib/tangled} 755 ${spindle_user:-root} ${spindle_group:-root} - 4 + d ${spindle_path} 755 ${spindle_user} ${spindle_group} - 4 5 EOF
+1
update.sh
··· 1 1 #!/usr/bin/env bash 2 + set -eu 2 3 3 4 source ./conf.sh 4 5