[Samba] The sad state of samba 4 adaption for home/small business routers.

Jeremy Allison jra at samba.org
Fri Mar 11 18:53:06 UTC 2016

On Fri, Mar 11, 2016 at 05:04:50PM +0000, Andy Walsh wrote:
> 1) Waf's cross-compile approach/requirements are simply not feasible,
> clearly understandable for most package maintainers.
> The problem is that most maintainers can not test/create the required
> qemu/crossanswer files for all the targets, that Waf relies on. As far as i
> know samba4 is the only package in openWRT/buildroot that requires such a
> special cross compile handling. So while i have a arm32 version running on
> my AC1200, thats based on a fork of openWRT. We can not create/submit a
> general package, since we lack the confidence to create crossanswer files
> for all the different target platforms and creating a valid qemu host
> package per target is also problematic, since no package did ever require
> such a workflow.

I've helped some OEMs create waf x-compilation files for S4.

It's a little tricky, but not so bad and doesn't require qemu hosts. Hopefully
more experience will make this easier with time.

> 2) The size of the final waf bin/lib install, even if stripped down to the
> bare minimum of smbd/nmbd/smbpasswd is unsuitable for most older routers
> that have just 8MB nvram and problematic for 16/32 MB more recent routers,
> depending on what other packages are added to the firmware.
> The smallest samba 4.3 package we could manage to build is around 9-12MB or
> 4.9MB lzma compressed using this makefile + some multicall/static linking
> hacks/patches:
> https://github.com/wongsyrone/openwrt-1/tree/master/package/external
> /samba43related/samba43
> In contrast Samba 3.6 can be stripped down to around 900kb (lzma), which is
> not a problem for 8MB nvram targets.

Trouble is, S4 does more than S3 did - mainly the SMB2 engine,
which will soon be required for real-world useage.

I'm not unsympathetic, just that cutting this down for
router usage is a lower priority than adding the features
that enterprise, NAS and cloud-gateway vendors need.

I'm happy to review any changes you might suggest.

More information about the samba mailing list