You are not logged in.
Pages: 1
Hi all,
After spending 7 hours compiling chromium-dev, I found out how amazingly simple it is to create a repo and have my aur helper, aura, automatically put compiled packages there! It's actually pretty cool having my own AUR repo (for select packages, of course), but the problem is I don't want to run the repo-add command every time. So I wrote up a quick .path file:
[Unit]
Description=Watch the aur repo for changes
[Path]
PathModified=/srv/http/aur
[Install]
WantedBy=multi-user.target
And a corresponding service file:
[Unit]
Description=Monitors the AUR repo for changes
[Service]
ExecStart=/usr/bin/repo-add -n /srv/http/aur/steelrepo.db.tar.gz /srv/http/aur/*.pkg.tar.xz
Restart=on-failure
[Install]
WantedBy=multi-user.target
At first, after starting and enabling repo-add.path, I got the error for the service that the start request repeated too quickly. I added the restart on failure line, but now I see
Mar 12 08:17:33 steelhorse systemd[1]: repoadd.service failed.
Mar 12 08:17:33 steelhorse repo-add[4262]: ==> Extracting database to a temporary location...
Mar 12 08:17:33 steelhorse repo-add[4262]: ==> ERROR: File '/srv/http/aur/*.pkg.tar.xz' not found.
Mar 12 08:17:33 steelhorse repo-add[4262]: ==> No packages modified, nothing to do.
Mar 12 08:17:33 steelhorse repo-add[4284]: ==> Extracting database to a temporary location...
Mar 12 08:17:33 steelhorse repo-add[4284]: ==> ERROR: File '/srv/http/aur/*.pkg.tar.xz' not found.
Mar 12 08:17:33 steelhorse repo-add[4284]: ==> No packages modified, nothing to do.
Mar 12 08:17:33 steelhorse systemd[1]: repoadd.service: main process exited, code=exited, status=1/FAILURE
Mar 12 08:17:33 steelhorse systemd[1]: Unit repoadd.service entered failed state.
Mar 12 08:17:33 steelhorse systemd[1]: repoadd.service failed.
This was when I ran aura to add a package. The command I placed in the service file worked just fine in the terminal, so I don't know why systemd is having trouble with it. Any suggestions? Better solutions? Thanks!
Last edited by steelcowboy (2015-03-12 16:45:45)
Offline
Systemd services do not run in a shell. systemd will call the binary with the given arguments without globs or anything else. The * will not expand like in a shell environment.
Offline
Ah, that makes sense. What can I do then to make it add all new packages?
Offline
You can create a shell script and execute that instead of /usr/bin/repo-add
https://wiki.archlinux.org/index.php/Sy … process.3F
Last edited by mychris (2015-03-12 16:31:23)
Offline
That worked perfectly! Thank you very much for your help!
Last edited by steelcowboy (2015-03-12 16:45:20)
Offline
Not a Sysadmin issue, moving to NC...
Offline
Pages: 1