From: Florian Larysch <fl@n621.de>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/avahi: allow disabling default services
Date: Fri, 4 Dec 2020 18:45:08 +0100 [thread overview]
Message-ID: <20201204174507.8483-1-fl@n621.de> (raw)
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 <fl@n621.de>
---
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))
--
2.29.2
next reply other threads:[~2020-12-04 17:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 17:45 Florian Larysch [this message]
2021-04-15 9:34 ` [Buildroot] [PATCH 1/1] package/avahi: allow disabling default services Michael Nosthoff
2021-04-15 19:02 ` Arnout Vandecappelle
2021-04-15 19:47 ` Yann E. MORIN
2021-04-15 20:41 ` Arnout Vandecappelle
2022-01-07 21:07 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201204174507.8483-1-fl@n621.de \
--to=fl@n621.de \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.