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 <[email protected]>
---
 meta/recipes-connectivity/avahi/avahi_0.8.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-connectivity/avahi/avahi_0.8.bb 
b/meta/recipes-connectivity/avahi/avahi_0.8.bb
index 3a2c24f9f8..2b0c71159d 100644
--- a/meta/recipes-connectivity/avahi/avahi_0.8.bb
+++ b/meta/recipes-connectivity/avahi/avahi_0.8.bb
@@ -81,6 +81,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 (#138514): 
https://lists.openembedded.org/g/openembedded-core/message/138514
Mute This Topic: https://lists.openembedded.org/mt/74354351/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to