Closed Werkov closed 1 year ago
@Werkov were you able to rework your systemd user service changes? I'd really like to get them merged when they're ready.
FWIW I just pushed a couple of minor changes to the system unit which you might also want to incorporate here:
git diff f3d1d9b878d1892f99bd893fdde84c6b8f9962a9^..9eb3da8ea0f98317649eb4ad43af90eb95638927
--- a/systemd/icyci-instance.conf
+++ b/systemd/icyci-instance.conf
...
+# Extra parameters to provide icyci on startup (see icyci -help for details).
+#EXTRA_PARAMS="-source-reference=/git/local-mirror -notes-ns=icyci-riscv"
diff --git a/systemd/icyci@.service b/systemd/icyci@.service
index 452ea04..a852798 100644
--- a/systemd/icyci@.service
+++ b/systemd/icyci@.service
@@ -6,7 +6,8 @@ After=network-online.target
EnvironmentFile=-/etc/sysconfig/icyci
EnvironmentFile=-/etc/icyci/%i.conf
User=icyci
-ExecStart=/bin/icyci --source-repo=${SOURCE_REPO} --source-branch=${SOURCE_BRANCH} --test-script=${TEST_SCRIPT} --results-repo=${RESULTS_REPO} --push-source-to-results=${PUSH_SOURCE_TO_RESULTS} --poll-interval=${POLL_INTERVAL}
+# icyci binary needs to be in PATH
+ExecStart=icyci --source-repo=${SOURCE_REPO} --source-branch=${SOURCE_BRANCH} --test-script=${TEST_SCRIPT} --results-repo=${RESULTS_REPO} --push-source-to-results=${PUSH_SOURCE_TO_RESULTS} --poll-interval=${POLL_INTERVAL} $EXTRA_PARAMS
BTW how is it with long-opts parsing? The systemd unit files have --opt=val
but EXTRA_PARAMS in config file has -opt=val
. (They both seem to work, so should this be unified to one style?)
Thanks for the updated submission. My plan is to have a quick play with it and then merge...
BTW how is it with long-opts parsing? The systemd unit files have
--opt=val
but EXTRA_PARAMS in config file has-opt=val
. (They both seem to work, so should this be unified to one style?)
Yes, both --
and -
work fine. Consistency would be nice and should probably match the usage output (single -
)
As for the PATH resolution -- it'd be evaluated in the environment of user@.service which has the system-wide PATH and I'm not sure a regular user can affect it.
Unprivileged users should be able to change their own PATH, although I've not played around with it in the context of user services... I'd have hoped it might even be possible in the instance config. Anyhow it's not important so will merge as-is for now. Thanks again for the submission!
This adds files strictly under $HOME and expects the user runs icicy without privileged access to the machine.