Build process does not error out for --enable-avahi when libs not present

Warwick Chapman w at rwick.com
Sun Apr 8 10:41:12 UTC 2018


Hi All

4.8.0 RELEASE NOTES say:

<snip>
Time Machine Support with vfs_fruit

Samba can be configured as a Time Machine target for Apple Mac devices
through the vfs_fruit module. *When enabling a share for Time Machine
support the relevant Avahi records to support discovery will be published
for installations that have been built against the Avahi client library.*

Shares can be designated as a Time Machine share with the following setting:

  'fruit:time machine = yes'
</snip>

(Also informed by @omor1's comment of 7 Aug 2017 at
https://github.com/samba-team/samba/pull/64)

I compiled with --enable-avahi (even though default=yes) but as soon as I
removed the /etc/avahi/service/samba.service file, the share is no longer
viewable in from Finder or Time Machine.

I then established (smbd -b) that Avahi support had *not* been compiled in
because the libraries were not present.  Surely, since the compile flag was
specified (--enable-avahi), the configure process should error out?

On Ubuntu 16.04, installing libavahi-common-dev and libavahi-client-dev and
the running configure again produced the desired result.

smbd -b | grep -i avahi:

```
   HAVE_AVAHI_CLIENT_CLIENT_H
   HAVE_AVAHI_COMMON_WATCH_H
   HAVE_AVAHI_CLIENT_NEW
   HAVE_AVAHI_STRERROR
   HAVE_LIBAVAHI_CLIENT
   HAVE_LIBAVAHI_COMMON
   WITH_AVAHI_SUPPORT
```

/opt/samba4/etc/smb.conf:

```
[global]
map to guest = Bad User
vfs objects = catia fruit streams_xattr
log file = /var/log/samba/%m
log level = 2

# Time Machine
fruit:veto_appledouble = no
fruit:encoding = native
fruit:metadata = stream

# Security
server min protocol = SMB2

[Time Machine]
fruit:time machine = yes
path = /media/backup
guest only = yes
writeable = yes
```


Warwick Bruce Chapman | +27 83 7797 094 | http://wa.rwick.com


More information about the samba-technical mailing list