From patchwork Fri Oct 17 19:10:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Erdmann?= X-Patchwork-Id: 400616 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id E29F0140085 for ; Sat, 18 Oct 2014 06:11:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id EEB3D95995; Fri, 17 Oct 2014 19:11:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V10qX0EAUChz; Fri, 17 Oct 2014 19:10:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B33EE959C4; Fri, 17 Oct 2014 19:10:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E7D001C1E95 for ; Fri, 17 Oct 2014 19:10:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E35D9959C2 for ; Fri, 17 Oct 2014 19:10:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fh4O7L4Stne7 for ; Fri, 17 Oct 2014 19:10:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by hemlock.osuosl.org (Postfix) with ESMTPS id AB31995995 for ; Fri, 17 Oct 2014 19:10:57 +0000 (UTC) Received: by mail-lb0-f176.google.com with SMTP id p9so1173673lbv.21 for ; Fri, 17 Oct 2014 12:10:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerd.de; s=mails; h=sender:from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=8LDF7visudvuK6B0t2bNGYKLEkM2hYuoOtqsZt7Xucc=; b=aC0jVeoTTggLZdsna5dGajgVU9PK9olhqHoH+fQRe4RJ20T8kO/vCAIqelplWSN11f QE/viL0L+qP1LJN4TM+HpDttqksiha69/yZ+SqssnKOexWmnwstYgBM6wW8wRU1cgfiV kBm36L8gqVzV/sppxTD2VHuWjire7Bg6ufxq0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-type:content-transfer-encoding; bh=8LDF7visudvuK6B0t2bNGYKLEkM2hYuoOtqsZt7Xucc=; b=MzafEYaclAEjgN34nNN/JtoiyZHhcna4Nz5oM/5VbjR+mZ5L30WH7FGunAf3Y544P4 pRihFc9DP9e6vsbxPVNtp3QFdPdnKHSXTvFsu1iOa1c+t+XvWky3YSyKDLZrKFVhPeUK QyK/WT2PxRht02BIawHaIbuyXUis482UxQpD+SYnRbsJmnUz+PIS0K37wk0hoBuNi6O1 RhwsKMvMg4mBdgdCs7Elm7e2FZiN8lDuBk1X591f0JWzvL7CVeT2VLemTUVvXpBNITAf vp6ixAsBzcZHcAog9Wt6ZSt1OpmKeNQnD3R4EMu6OICMmvHcrFN7hVm/8Ohhtn9ETCfe cfxg== X-Gm-Message-State: ALoCoQkIdzq8d3KeLGxDWgjWrg7SIRbYW54G2lP7jeFq2MBk2sKCz65jKGKi8s0133Ua7o3zNVkK X-Received: by 10.112.221.226 with SMTP id qh2mr10932135lbc.5.1413573055564; Fri, 17 Oct 2014 12:10:55 -0700 (PDT) Received: from localhost.localdomain (dslb-094-216-104-057.094.216.pools.vodafone-ip.de. [94.216.104.57]) by mx.google.com with ESMTPSA id x6sm686925lbj.40.2014.10.17.12.10.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Oct 2014 12:10:54 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Erdmann?= To: buildroot@buildroot.org Date: Fri, 17 Oct 2014 21:10:42 +0200 Message-Id: <1413573042-6638-1-git-send-email-dywi@mailerd.de> X-Mailer: git-send-email 2.1.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/avahi: use upstream-provided systemd files X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 Signed-off-by: André Erdmann Reviewed-by: "Yann E. MORIN" --- 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 diff --git a/package/avahi/avahi-daemon.service b/package/avahi/avahi-daemon.service deleted file mode 100644 index c9b7b1f..0000000 --- a/package/avahi/avahi-daemon.service +++ /dev/null @@ -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 diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk index 706561f..609d89c 100644 --- a/package/avahi/avahi.mk +++ b/package/avahi/avahi.mk @@ -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 \