The example service files are placed into /etc/avahi/services when we
run `make install` for avahi. This results in ssh and sftp-ssh services
being announced by default even if no ssh server is installed in an
image.

These example files should be moved away to another location such as
/usr/share/doc/avahi (taking inspiration from Arch Linux).

Signed-off-by: Paul Barker <pbar...@konsulko.com>
---
 meta/recipes-connectivity/avahi/avahi.inc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-connectivity/avahi/avahi.inc 
b/meta/recipes-connectivity/avahi/avahi.inc
index 94fe6a16b6..6acedb5412 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -77,6 +77,11 @@ do_install() {
        rm -rf ${D}${datadir}/dbus-1/interfaces
        test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty 
${D}${datadir}/dbus-1
        rm -rf ${D}${libdir}/avahi
+
+       # Move example service files out of /etc/avahi/services so we don't
+       # advertise ssh & sftp-ssh by default
+       install -d ${D}${docdir}/avahi
+       mv ${D}${sysconfdir}/avahi/services/* ${D}${docdir}/avahi
 }
 
 PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", 
"libavahi-compat-libdnssd", "", d)}"
-- 
2.26.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138626): 
https://lists.openembedded.org/g/openembedded-core/message/138626
Mute This Topic: https://lists.openembedded.org/mt/74425792/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to