summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--src/fossil-test@.service12
2 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 38f8130..eef184c 100644
--- a/Makefile
+++ b/Makefile
@@ -44,7 +44,7 @@ unit_files = $(addprefix src/fossil-user,@.service .socket) src/fossil-test@.ser
44units = $(filter-out %@.service,$(notdir $(unit_files))) 44units = $(filter-out %@.service,$(notdir $(unit_files)))
45executables = src/endofossil 45executables = src/endofossil
46bindir = /usr/local/bin 46bindir = /usr/local/bin
47dependencies = socat fossil ssh 47dependencies = socat fossil ssh fakeroot
48 48
49SSH_USERNAME != if [ "$$SUDO_USER" ]; then echo "$$SUDO_USER"; else id -u; fi 49SSH_USERNAME != if [ "$$SUDO_USER" ]; then echo "$$SUDO_USER"; else id -u; fi
50 50
diff --git a/src/fossil-test@.service b/src/fossil-test@.service
index c1ad063..8498733 100644
--- a/src/fossil-test@.service
+++ b/src/fossil-test@.service
@@ -3,10 +3,16 @@ Description = Test Endofossil by attempting a clone
3 3
4[Service] 4[Service]
5Type = oneshot 5Type = oneshot
6DynamicUser = yes
7User = fossil-test-user-%i
8PrivateUsers = yes
6RuntimeDirectory = fossil-test-%i 9RuntimeDirectory = fossil-test-%i
7WorkingDirectory = /run/fossil-test-%i 10WorkingDirectory = /run/fossil-test-%i
11Environment = HOME=/run/fossil-test-%i
12BindPaths = /run/fossil-test-%i:/root
13
8ExecStart = sh -xc 'mkdir .ssh' 14ExecStart = sh -xc 'mkdir .ssh'
9ExecStart = sh -xc 'ssh-keygen -t ed25519 -f .ssh/id_ed25519 -N ""' 15ExecStart = sh -xc 'fakeroot ssh-keygen -t ed25519 -f .ssh/id_ed25519 -N ""'
10ExecStart = sh -xc 'HOME=. ssh %i@localhost fossil test-http src/fossil/db' 16ExecStart = sh -xc 'fakeroot ssh -o UserKnownHostsFile=.ssh/known_hosts -o StrictHostKeyChecking=accept-new -i .ssh/id_ed25519 %i@localhost fossil test-http src/fossil/db'
11ExecStart = sh -xc 'HOME=. fossil clone ssh://%i@localhost/src/fossil/db db~$(date -Ins).fossil' 17ExecStart = sh -xc 'fakeroot fossil clone ssh://%i@localhost/src/fossil/db db~$(date -Ins).fossil'
12 18