Skip to contentSkip to conversation

package/avahi: use upstream-provided systemd files

PATCH New André Erdmann 4 participants 7 messages Oct 17, 2014 – Oct 19, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/avahi: use upstream-provided systemd files

When using the buildroot-provided avahi-daemon.service file, bootup never finishes, because multi-user.target is waiting for avahi-daemon to exit, which is caused by "Type=oneshot" (in avahi-daemon.service).

Upstream's systemd files get already installed to /lib/systemd. They're not an exact copy of S50avahi-daemon, but work flawlessly, so use these units:

* avahi-daemon.service, auto-enabled (ln -fs in AVAHI_INSTALL_INIT_SYSTEMD)
* avahi-daemon.socket,
not auto-enabled, but a dependency of avahi-daemon.service
* avahi-dnsconfd.service, auto-enabled

---
With "Type=oneshot", systemd waits for avahi-daemon to exit, which does not happen (unless killed):

$ systemctl --no-pager status avahi-daemon.service
* avahi-daemon.service - Avahi daemon
   Loaded: loaded (/etc/systemd/system/avahi-daemon.service; enabled)
   Active: activating (start) since Wed 2014-10-15 21:26:49 CEST; 56s ago
 Main PID: 190 (avahi-daemon)
   CGroup: /system.slice/avahi-daemon.service
           |-190 avahi-daemon: running [buildroot.local]
           |-192 avahi-daemon: chroot helper
Oct 15 21:26:49 buildroot avahi-daemon[190]: Network interface enumeration completed.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Registering HINFO record with values 'X86_64'/'LINUX'.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Server startup complete. Host name is buildroot.local. Local service c...3347.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Service "buildroot" (/services/ssh.service) successfully established.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Service "buildroot" (/services/sftp-ssh.service) successfully established.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Joining mDNS multicast group on interface br0.IPv4 with address 192.168.3.114.
Oct 15 21:26:49 buildroot avahi-daemon[190]: New relevant interface br0.IPv4 for mDNS.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Registering new address record for 192.168.3.114 on br0.IPv4.
Oct 15 21:26:50 buildroot avahi-daemon[190]: Registering new address record for fe80::5054:ff:feb1:f19a on eth0.*.
Oct 15 21:26:50 buildroot avahi-daemon[190]: Registering new address record for fe80::bcbb:86ff:fe4a:14d6 on br0.*.

Hint: Some lines were ellipsized, use -l to show in full. (EOF)

The result is that the boot process never reaches "multi-user.target":

$ systemctl --no-pager list-jobs
JOB UNIT                 TYPE  STATE
  1 multi-user.target    start waiting
 57 avahi-daemon.service start running

2 jobs listed.
(EOF)

---
 package/avahi/avahi-daemon.service | 15 ---------------
 package/avahi/avahi.mk             |  8 ++++----
 2 files changed, 4 insertions(+), 19 deletions(-)
 delete mode 100644 package/avahi/avahi-daemon.service
package/avahi/avahi-daemon.service deleted +0 -15
deleted file mode 100644
index c9b7b1f..0000000
@@ -1,15 +0,0 @@
-[Unit]
-Description=Avahi daemon
-Requires=dbus.target
-After=syslog.target network.target auditd.service
-
-[Service]
-Type=oneshot
-RemainAfterExit=ye
-ExecStart=/usr/sbin/avahi-daemon -s
-ExecReload=/usr/sbin/avahi-daemon -r
-ExecStop=/usr/sbin/avahi-daemon -k
-Restart=restart-always
-
-[Install]
-WantedBy=multi-user.target
package/avahi/avahi.mk +4 -4
index 706561f..609d89c 100644
@@ -164,14 +164,14 @@ endif
 ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
 
 define AVAHI_INSTALL_INIT_SYSTEMD
-  $(INSTALL) -D -m 644 package/avahi/avahi-daemon.service \
-    $(TARGET_DIR)/etc/systemd/system/avahi-daemon.service
-
   mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 
-  ln -fs ../avahi-daemon.service \
+  ln -fs ../../../../lib/systemd/system/avahi-daemon.service \
     $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service
 
+  ln -fs ../../../../lib/systemd/system/avahi-dnsconfd.service \
+    $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-dnsconfd.service
+
   mkdir -p $(TARGET_DIR)/usr/lib/tmpfiles.d
 
   $(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \
Signature · 1 line
2.1.2
#1 lore raw

PATCH 1/1 package/avahi: use upstream-provided systemd files

Andr?, All,

On 2014-10-17 21:10 +0200, Andr? Erdmann spake thusly:

Quoted 8 lines

When using the buildroot-provided avahi-daemon.service file, bootup never finishes, because multi-user.target is waiting for avahi-daemon to exit, which is caused by "Type=oneshot" (in avahi-daemon.service).

Upstream's systemd files get already installed to /lib/systemd. They're not an exact copy of S50avahi-daemon, but work flawlessly, so use these units:

Quoted 6 lines

* avahi-daemon.service, auto-enabled (ln -fs in AVAHI_INSTALL_INIT_SYSTEMD)
* avahi-daemon.socket,
not auto-enabled, but a dependency of avahi-daemon.service
* avahi-dnsconfd.service, auto-enabled

Looks like the sane thing to do, indeed.

I'm no systemd expert, so copying Eric, which will probably be able to confirm my:

Regards,
Yann E. MORIN.

Quoted 93 lines

---
With "Type=oneshot", systemd waits for avahi-daemon to exit, which does not happen (unless killed):

$ systemctl --no-pager status avahi-daemon.service
* avahi-daemon.service - Avahi daemon
   Loaded: loaded (/etc/systemd/system/avahi-daemon.service; enabled)
   Active: activating (start) since Wed 2014-10-15 21:26:49 CEST; 56s ago
 Main PID: 190 (avahi-daemon)
   CGroup: /system.slice/avahi-daemon.service
           |-190 avahi-daemon: running [buildroot.local]
           |-192 avahi-daemon: chroot helper
Oct 15 21:26:49 buildroot avahi-daemon[190]: Network interface enumeration completed.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Registering HINFO record with values 'X86_64'/'LINUX'.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Server startup complete. Host name is buildroot.local. Local service c...3347.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Service "buildroot" (/services/ssh.service) successfully established.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Service "buildroot" (/services/sftp-ssh.service) successfully established.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Joining mDNS multicast group on interface br0.IPv4 with address 192.168.3.114.
Oct 15 21:26:49 buildroot avahi-daemon[190]: New relevant interface br0.IPv4 for mDNS.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Registering new address record for 192.168.3.114 on br0.IPv4.
Oct 15 21:26:50 buildroot avahi-daemon[190]: Registering new address record for fe80::5054:ff:feb1:f19a on eth0.*.
Oct 15 21:26:50 buildroot avahi-daemon[190]: Registering new address record for fe80::bcbb:86ff:fe4a:14d6 on br0.*.

Hint: Some lines were ellipsized, use -l to show in full. (EOF)

The result is that the boot process never reaches "multi-user.target":

$ systemctl --no-pager list-jobs
JOB UNIT                 TYPE  STATE
  1 multi-user.target    start waiting
 57 avahi-daemon.service start running

2 jobs listed.
(EOF)

---
 package/avahi/avahi-daemon.service | 15 ---------------
 package/avahi/avahi.mk             |  8 ++++----
 2 files changed, 4 insertions(+), 19 deletions(-)
 delete mode 100644 package/avahi/avahi-daemon.service
package/avahi/avahi-daemon.service deleted +0 -15
deleted file mode 100644
index c9b7b1f..0000000
@@ -1,15 +0,0 @@
-[Unit]
-Description=Avahi daemon
-Requires=dbus.target
-After=syslog.target network.target auditd.service
-
-[Service]
-Type=oneshot
-RemainAfterExit=ye
-ExecStart=/usr/sbin/avahi-daemon -s
-ExecReload=/usr/sbin/avahi-daemon -r
-ExecStop=/usr/sbin/avahi-daemon -k
-Restart=restart-always
-
-[Install]
-WantedBy=multi-user.target
package/avahi/avahi.mk +4 -4
index 706561f..609d89c 100644
@@ -164,14 +164,14 @@ endif
 ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
 
 define AVAHI_INSTALL_INIT_SYSTEMD
-  $(INSTALL) -D -m 644 package/avahi/avahi-daemon.service \
-    $(TARGET_DIR)/etc/systemd/system/avahi-daemon.service
-
   mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 
-  ln -fs ../avahi-daemon.service \
+  ln -fs ../../../../lib/systemd/system/avahi-daemon.service \
     $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service
 
+  ln -fs ../../../../lib/systemd/system/avahi-dnsconfd.service \
+    $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-dnsconfd.service
+
   mkdir -p $(TARGET_DIR)/usr/lib/tmpfiles.d
 
   $(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \
Signature · 6 lines
2.1.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/avahi: use upstream-provided systemd files

Hi Yann, Andr?, all,

Quoted 98 lines · Yann E. MORIN

Andr?, All,

On 2014-10-17 21:10 +0200, Andr? Erdmann spake thusly:

Quoted 8 lines

When using the buildroot-provided avahi-daemon.service file, bootup never finishes, because multi-user.target is waiting for avahi-daemon to exit, which is caused by "Type=oneshot" (in avahi-daemon.service).

Upstream's systemd files get already installed to /lib/systemd. They're not an exact copy of S50avahi-daemon, but work flawlessly, so use these units:

Quoted 6 lines

* avahi-daemon.service, auto-enabled (ln -fs in AVAHI_INSTALL_INIT_SYSTEMD)
* avahi-daemon.socket,
not auto-enabled, but a dependency of avahi-daemon.service
* avahi-dnsconfd.service, auto-enabled

Looks like the sane thing to do, indeed.

I'm no systemd expert, so copying Eric, which will probably be able to confirm my:

Regards,
Yann E. MORIN.

Quoted 70 lines

---
With "Type=oneshot", systemd waits for avahi-daemon to exit, which does not happen (unless killed):

$ systemctl --no-pager status avahi-daemon.service
* avahi-daemon.service - Avahi daemon
   Loaded: loaded (/etc/systemd/system/avahi-daemon.service; enabled)
   Active: activating (start) since Wed 2014-10-15 21:26:49 CEST; 56s ago
 Main PID: 190 (avahi-daemon)
   CGroup: /system.slice/avahi-daemon.service
           |-190 avahi-daemon: running [buildroot.local]
           |-192 avahi-daemon: chroot helper
Oct 15 21:26:49 buildroot avahi-daemon[190]: Network interface enumeration completed.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Registering HINFO record with values 'X86_64'/'LINUX'.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Server startup complete. Host name is buildroot.local. Local service c...3347.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Service "buildroot" (/services/ssh.service) successfully established.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Service "buildroot" (/services/sftp-ssh.service) successfully established.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Joining mDNS multicast group on interface br0.IPv4 with address 192.168.3.114.
Oct 15 21:26:49 buildroot avahi-daemon[190]: New relevant interface br0.IPv4 for mDNS.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Registering new address record for 192.168.3.114 on br0.IPv4.
Oct 15 21:26:50 buildroot avahi-daemon[190]: Registering new address record for fe80::5054:ff:feb1:f19a on eth0.*.
Oct 15 21:26:50 buildroot avahi-daemon[190]: Registering new address record for fe80::bcbb:86ff:fe4a:14d6 on br0.*.

Hint: Some lines were ellipsized, use -l to show in full. (EOF)

The result is that the boot process never reaches "multi-user.target":

$ systemctl --no-pager list-jobs
JOB UNIT                 TYPE  STATE
  1 multi-user.target    start waiting
 57 avahi-daemon.service start running

2 jobs listed.
(EOF)

---
 package/avahi/avahi-daemon.service | 15 ---------------
 package/avahi/avahi.mk             |  8 ++++----
 2 files changed, 4 insertions(+), 19 deletions(-)
 delete mode 100644 package/avahi/avahi-daemon.service
package/avahi/avahi-daemon.service deleted +0 -15
deleted file mode 100644
index c9b7b1f..0000000
@@ -1,15 +0,0 @@
-[Unit]
-Description=Avahi daemon
-Requires=dbus.target
-After=syslog.target network.target auditd.service
-
-[Service]
-Type=oneshot
-RemainAfterExit=ye
-ExecStart=/usr/sbin/avahi-daemon -s
-ExecReload=/usr/sbin/avahi-daemon -r
-ExecStop=/usr/sbin/avahi-daemon -k
-Restart=restart-always
-
-[Install]
-WantedBy=multi-user.target
package/avahi/avahi.mk +0 -0
index 706561f..609d89c 100644
@@ -164,14 +164,14 @@ endif
 ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
 
Quoted 8 lines

package/avahi/avahi.mk endif · line 169

Quoted 8 lines
package/avahi/avahi.mk +1 -4
 define AVAHI_INSTALL_INIT_SYSTEMD
-  $(INSTALL) -D -m 644 package/avahi/avahi-daemon.service \
-    $(TARGET_DIR)/etc/systemd/system/avahi-daemon.service
-
   mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 
-  ln -fs ../avahi-daemon.service \
+  ln -fs ../../../../lib/systemd/system/avahi-daemon.service \

Just an idea, how about doing:
ln -fs /lib/systemd/system/avahi-daemon.service \
Instead of all the ../ ?

Quoted 3 lines

package/avahi/avahi.mk endif · line 172

Quoted 3 lines
package/avahi/avahi.mk +1 -0
     $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service
 
+  ln -fs ../../../../lib/systemd/system/avahi-dnsconfd.service \

Same here.

Quoted 7 lines
Quoted 7 lines
package/avahi/avahi.mk +2 -1
+    $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-dnsconfd.service
+
   mkdir -p $(TARGET_DIR)/usr/lib/tmpfiles.d
 
   $(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \
--

2.1.2

#3 lore raw

PATCH 1/1 package/avahi: use upstream-provided systemd files

2014-10-18 13:39 GMT+02:00 Maxime Hadjinlian <[email protected]>:

Quoted 107 lines

Hi Yann, Andr?, all,

Quoted 104 lines · Yann E. MORIN

Andr?, All,

On 2014-10-17 21:10 +0200, Andr? Erdmann spake thusly:

Quoted 8 lines

When using the buildroot-provided avahi-daemon.service file, bootup never finishes, because multi-user.target is waiting for avahi-daemon to exit, which is caused by "Type=oneshot" (in avahi-daemon.service).

Upstream's systemd files get already installed to /lib/systemd. They're not an exact copy of S50avahi-daemon, but work flawlessly, so use these units:

Quoted 6 lines

* avahi-daemon.service, auto-enabled (ln -fs in AVAHI_INSTALL_INIT_SYSTEMD)
* avahi-daemon.socket,
not auto-enabled, but a dependency of avahi-daemon.service
* avahi-dnsconfd.service, auto-enabled

Looks like the sane thing to do, indeed.

I'm no systemd expert, so copying Eric, which will probably be able to confirm my:

Regards,
Yann E. MORIN.

Quoted 76 lines

---
With "Type=oneshot", systemd waits for avahi-daemon to exit, which does not happen (unless killed):

$ systemctl --no-pager status avahi-daemon.service
* avahi-daemon.service - Avahi daemon
   Loaded: loaded (/etc/systemd/system/avahi-daemon.service; enabled)
   Active: activating (start) since Wed 2014-10-15 21:26:49 CEST; 56s ago
 Main PID: 190 (avahi-daemon)
   CGroup: /system.slice/avahi-daemon.service
           |-190 avahi-daemon: running [buildroot.local]
           |-192 avahi-daemon: chroot helper
Oct 15 21:26:49 buildroot avahi-daemon[190]: Network interface enumeration completed.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Registering HINFO record with values 'X86_64'/'LINUX'.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Server startup complete. Host name is buildroot.local. Local service c...3347.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Service "buildroot" (/services/ssh.service) successfully established.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Service "buildroot" (/services/sftp-ssh.service) successfully established.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Joining mDNS multicast group on interface br0.IPv4 with address 192.168.3.114.
Oct 15 21:26:49 buildroot avahi-daemon[190]: New relevant interface br0.IPv4 for mDNS.
Oct 15 21:26:49 buildroot avahi-daemon[190]: Registering new address record for 192.168.3.114 on br0.IPv4.
Oct 15 21:26:50 buildroot avahi-daemon[190]: Registering new address record for fe80::5054:ff:feb1:f19a on eth0.*.
Oct 15 21:26:50 buildroot avahi-daemon[190]: Registering new address record for fe80::bcbb:86ff:fe4a:14d6 on br0.*.

Hint: Some lines were ellipsized, use -l to show in full. (EOF)

The result is that the boot process never reaches "multi-user.target":

$ systemctl --no-pager list-jobs
JOB UNIT                 TYPE  STATE
  1 multi-user.target    start waiting
 57 avahi-daemon.service start running

2 jobs listed.
(EOF)

---
 package/avahi/avahi-daemon.service | 15 ---------------
 package/avahi/avahi.mk             |  8 ++++----
 2 files changed, 4 insertions(+), 19 deletions(-)
 delete mode 100644 package/avahi/avahi-daemon.service
package/avahi/avahi-daemon.service deleted +0 -15
deleted file mode 100644
index c9b7b1f..0000000
@@ -1,15 +0,0 @@
-[Unit]
-Description=Avahi daemon
-Requires=dbus.target
-After=syslog.target network.target auditd.service
-
-[Service]
-Type=oneshot
-RemainAfterExit=ye
-ExecStart=/usr/sbin/avahi-daemon -s
-ExecReload=/usr/sbin/avahi-daemon -r
-ExecStop=/usr/sbin/avahi-daemon -k
-Restart=restart-always
-
-[Install]
-WantedBy=multi-user.target
package/avahi/avahi.mk +0 -3
index 706561f..609d89c 100644
@@ -164,14 +164,14 @@ endif
 ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
 
 define AVAHI_INSTALL_INIT_SYSTEMD
-  $(INSTALL) -D -m 644 package/avahi/avahi-daemon.service \
-    $(TARGET_DIR)/etc/systemd/system/avahi-daemon.service
-
   mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
 
Quoted 5 lines
Quoted 2 lines

package/avahi/avahi.mk endif · line 169

Quoted 2 lines
package/avahi/avahi.mk +1 -1
-  ln -fs ../avahi-daemon.service \
+  ln -fs ../../../../lib/systemd/system/avahi-daemon.service \

Just an idea, how about doing:
ln -fs /lib/systemd/system/avahi-daemon.service \
Instead of all the ../ ?

+1, I simply had the impression that relative paths were preferred.

Quoted 11 lines
Quoted 3 lines

package/avahi/avahi.mk endif · line 172

Quoted 3 lines
package/avahi/avahi.mk +1 -0
     $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service
 
+  ln -fs ../../../../lib/systemd/system/avahi-dnsconfd.service \

Same here.

Quoted 7 lines
Quoted 7 lines
package/avahi/avahi.mk +2 -1
+    $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-dnsconfd.service
+
   mkdir -p $(TARGET_DIR)/usr/lib/tmpfiles.d
 
   $(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \
--

2.1.2

#4 lore raw

PATCH 1/1 package/avahi: use upstream-provided systemd files

In reply to André Erdmann

Dear Andr? Erdmann,

Quoted 8 lines · Andr? Erdmann

When using the buildroot-provided avahi-daemon.service file, bootup never finishes, because multi-user.target is waiting for avahi-daemon to exit, which is caused by "Type=oneshot" (in avahi-daemon.service).

Upstream's systemd files get already installed to /lib/systemd. They're not an exact copy of S50avahi-daemon, but work flawlessly, so use these units:

Quoted 6 lines

* avahi-daemon.service, auto-enabled (ln -fs in AVAHI_INSTALL_INIT_SYSTEMD)
* avahi-daemon.socket,
not auto-enabled, but a dependency of avahi-daemon.service
* avahi-dnsconfd.service, auto-enabled

Thanks, applied, after changing the symbolic links to use absolute paths instead of relative paths.

Also, I pushed a number of followup commits:

3b4ec0c6a82fc853b00b2a720d0b945dcb2ea67e avahi: do not install S05avahi-setup.sh in systemd setup 6c947771424b139199fc56bb7fff47755a17c6a9 avahi: remove useless 'mkdir -p' in AVAHI_INSTALL_INIT_SYSTEMD d2fd9ef86ee096784c9b326004ba928a16d035ae avahi: fix indentation in AVAHI_INSTALL_INIT_SYSTEMD

In the last commit (first in the list), I raise the following question:

Note: in a systemd configuration, there is no provision to do what S05avahi-setup.sh is doing for sysv init configurations. Maybe this is something that our systemd people should have a look at.

Someone to look into this?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/1 package/avahi: use upstream-provided systemd files

Hi Thomas, all

Quoted 27 lines · Thomas Petazzoni

Dear Andr? Erdmann,

Quoted 8 lines · Andr? Erdmann

When using the buildroot-provided avahi-daemon.service file, bootup never finishes, because multi-user.target is waiting for avahi-daemon to exit, which is caused by "Type=oneshot" (in avahi-daemon.service).

Upstream's systemd files get already installed to /lib/systemd. They're not an exact copy of S50avahi-daemon, but work flawlessly, so use these units:

Quoted 6 lines

* avahi-daemon.service, auto-enabled (ln -fs in AVAHI_INSTALL_INIT_SYSTEMD)
* avahi-daemon.socket,
not auto-enabled, but a dependency of avahi-daemon.service
* avahi-dnsconfd.service, auto-enabled

Thanks, applied, after changing the symbolic links to use absolute paths instead of relative paths.

Also, I pushed a number of followup commits:

3b4ec0c6a82fc853b00b2a720d0b945dcb2ea67e avahi: do not install S05avahi-setup.sh in systemd setup 6c947771424b139199fc56bb7fff47755a17c6a9 avahi: remove useless 'mkdir -p' in AVAHI_INSTALL_INIT_SYSTEMD d2fd9ef86ee096784c9b326004ba928a16d035ae avahi: fix indentation in AVAHI_INSTALL_INIT_SYSTEMD

Quoted 7 lines

In the last commit (first in the list), I raise the following question:

Note: in a systemd configuration, there is no provision to do what S05avahi-setup.sh is doing for sysv init configurations. Maybe this is something that our systemd people should have a look at.

Someone to look into this?

It's already done, look at the avahi_tmpfiles.conf, it's made explicitly for that.
Note that others daemon could benefit for it, like dropbear, I might have some patch about that somewhere.

Quoted 8 lines

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#6 lore raw

PATCH 1/1 package/avahi: use upstream-provided systemd files

Dear Maxime Hadjinlian,

Quoted 3 lines · Maxime Hadjinlian
Quoted 1 line

Someone to look into this?

It's already done, look at the avahi_tmpfiles.conf, it's made explicitly for that.

Aaah, ok. Not easy to spot when you're not a systemd guy :)

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com