diff options
author | Eric Anderson | 2018-03-01 07:46:10 -0800 |
---|---|---|
committer | Eric Anderson | 2018-03-01 07:46:10 -0800 |
commit | 98d647cb6a1101df86f23c45808771be0165dfd2 (patch) | |
tree | 1998b29a76d3ee11cf7df37359ea61aa030abc2a | |
parent | 52c5480cb8a7f1f00980549af57b4607cfabbe74 (diff) | |
download | aur-98d647cb6a1101df86f23c45808771be0165dfd2.tar.gz |
Add service dep on avahi-daemon
When dbus activation is working the After=avahi-daemon should not be
necessary. However, it appears that dbus activation is only correctly
configured when avahi-daemon is enabled as that's when the appropriate
symlink is created. It would fail with:
Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service not found.
While Requires=avahi-daemon needs to be present for the same reason as
After=, pkgdistcache-daemon does not currently notice if avahi-daemon is
restarted. When Avahi restarts it forgets the previous publishes. So I
work around that by having pkgdistcached restart when avahi-daemon
restarts via Requires=. While I could make pkgdistcache-daemon notice
the restart, it doesn't gain us anything because of the dbus activation
issue.
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | pkgdistcache.install | 3 | ||||
-rw-r--r-- | pkgdistcached.service | 2 |
4 files changed, 8 insertions, 7 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Wed Jan 17 05:56:53 UTC 2018 +# Thu Mar 1 15:44:56 UTC 2018 pkgbase = pkgdistcache pkgdesc = A distributed local-network cache for pacman packages pkgver = 0.5.0 - pkgrel = 1 + pkgrel = 2 url = http://venator.ath.cx/dw/doku.php?id=linux:pkgdistcache install = pkgdistcache.install arch = any @@ -22,7 +22,7 @@ pkgbase = pkgdistcache sha256sums = bef0809d86e151a4551a122b29f4c90d2f06ab34459a8ff91a37a29a6fd2a3f7 sha256sums = 10379b95265e7aa3c6334197ef255327281e35b958c3c062ae893dd3a646a66e sha256sums = 5628cf4d81adaf7a3dd7243f51af1a30fff73a31b421615a7c0051280618f457 - sha256sums = b5fb3b3d40b31af92a1676364dfc42a35f564067988697ea4d56fd71b4b414e3 + sha256sums = b98bccb089bc0025b0f9b4b949b691e5564b0e40778a263a5bb6ffa5f01d04a2 pkgname = pkgdistcache @@ -3,7 +3,7 @@ pkgname=pkgdistcache pkgver=0.5.0 -pkgrel=1 +pkgrel=2 pkgdesc='A distributed local-network cache for pacman packages' arch=('any') url='http://venator.ath.cx/dw/doku.php?id=linux:pkgdistcache' @@ -17,7 +17,7 @@ source=('pkgdistcache-client' sha256sums=('bef0809d86e151a4551a122b29f4c90d2f06ab34459a8ff91a37a29a6fd2a3f7' '10379b95265e7aa3c6334197ef255327281e35b958c3c062ae893dd3a646a66e' '5628cf4d81adaf7a3dd7243f51af1a30fff73a31b421615a7c0051280618f457' - 'b5fb3b3d40b31af92a1676364dfc42a35f564067988697ea4d56fd71b4b414e3') + 'b98bccb089bc0025b0f9b4b949b691e5564b0e40778a263a5bb6ffa5f01d04a2') package() { install -d "${pkgdir}/usr/bin/" diff --git a/pkgdistcache.install b/pkgdistcache.install index 3e6c98264c62..d2891aa35ed5 100644 --- a/pkgdistcache.install +++ b/pkgdistcache.install @@ -5,8 +5,7 @@ post_install() { *** SERVER MODE *** Start and enable service: - $ sudo systemctl start pkgdistcached - $ sudo systemctl enable pkgdistcached + $ sudo systemctl enable --now pkgdistcached *** CLIENT MODE *** 1) Make sure avahi-daemon is enabled: diff --git a/pkgdistcached.service b/pkgdistcached.service index 09f9ce3bdc00..db1303fa3c7a 100644 --- a/pkgdistcached.service +++ b/pkgdistcached.service @@ -1,5 +1,7 @@ [Unit] Description=Distributed pacman package cache +Requires=avahi-daemon.service +After=avahi-daemon.service [Service] ExecStart=/usr/lib/pkgdistcache/pkgdistcache-daemon |