From patchwork Fri Dec 4 17:45:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Larysch X-Patchwork-Id: 1411196 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=n621.de Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=n621.de header.i=@n621.de header.a=rsa-sha256 header.s=dkim header.b=K2QG2LT8; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CngKj692xz9sW0 for ; Sat, 5 Dec 2020 04:53:13 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8BC4087529; Fri, 4 Dec 2020 17:53:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YDmUw8zUKQow; Fri, 4 Dec 2020 17:53:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id AB54A8755D; Fri, 4 Dec 2020 17:53:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 269851BF2F8 for ; Fri, 4 Dec 2020 17:53:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1D67887D68 for ; Fri, 4 Dec 2020 17:53:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0rKwU2rVZYgc for ; Fri, 4 Dec 2020 17:53:04 +0000 (UTC) X-Greylist: delayed 00:05:57 by SQLgrey-1.7.6 Received: from nyx.n621.de (nyx.n621.de [176.9.182.227]) by whitealder.osuosl.org (Postfix) with ESMTPS id D2CB987D45 for ; Fri, 4 Dec 2020 17:53:03 +0000 (UTC) Received: from eos.home.n621.de (localhost [127.0.0.1]) by nyx.n621.de (Postfix) with ESMTP id B790AE0010E; Fri, 4 Dec 2020 18:47:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=n621.de; s=dkim; t=1607104021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=jIBtEqXwF+PkmMs5rdJzpWlAnVBerr/I0r3OoQ0n4lY=; b=K2QG2LT8HKXZ5/uS3QVGe5k1ErdrV+88wxbpUKyCLJFywK3Z4gcn2jnMCRg9RRwyeJoUnA H/83Uiq+WNbpw2grXyP/FN4igpwY9ebFbSD7FhGaS7j/PjOhaRAe3n+6nfevcYEqtZpIR1 gTGomooU60V0+V+xDrLYGbhMPdNIJYw= From: Florian Larysch To: buildroot@buildroot.org Date: Fri, 4 Dec 2020 18:45:08 +0100 Message-Id: <20201204174507.8483-1-fl@n621.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/avahi: allow disabling default services X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Larysch Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" By default, Avahi installs service definitions for SSH and SFTP, but those might not be present on all systems. Add an option for disabling them. As there is no way to tell the Avahi package not to install the service files in the first place, we have to manually remove them from the target directory. Signed-off-by: Florian Larysch --- package/avahi/Config.in | 8 ++++++++ package/avahi/avahi.mk | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/package/avahi/Config.in b/package/avahi/Config.in index 5e303d044e..4a000dd676 100644 --- a/package/avahi/Config.in +++ b/package/avahi/Config.in @@ -42,6 +42,14 @@ config BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY Enable the libdns_sd (Bonjour) compatibility library support for legacy applications. +config BR2_PACKAGE_AVAHI_DEFAULT_SERVICES + bool "install default service definitions" + depends on BR2_PACKAGE_AVAHI_DAEMON + default y + help + Install the SSH/SFTP service definitions included with the Avahi + daemon by default. + endif comment "avahi needs a toolchain w/ threads" diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk index eef05f0d2f..b8aea90fcc 100644 --- a/package/avahi/avahi.mk +++ b/package/avahi/avahi.mk @@ -184,4 +184,13 @@ endef AVAHI_POST_INSTALL_STAGING_HOOKS += AVAHI_STAGING_INSTALL_LIBDNSSD_LINK endif +ifeq (${BR2_PACKAGE_AVAHI_DEFAULT_SERVICES},) +define AVAHI_REMOVE_DEFAULT_SERVICES + for service in ssh sftp-ssh; do \ + $(RM) -f $(TARGET_DIR)/etc/avahi/services/$${service}.service; \ + done +endef +AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_DEFAULT_SERVICES +endif + $(eval $(autotools-package))