Samba-tng 20100705

As I reported yesterday, the Samba executables and shared libraries have become enormous. What is particularly deplorable is that even when configured to build shared libraries, the executables are built with them linked-in statically -- we could in theory hack the makefiles to fix that, but it is something that we should not have to do.

I notice that technosaurus has used Samba 3.0.37 in Puppy 4.4alpha -- that's an old 3.0 series but was released late in 2009. In other words, the 3.0 series has continued to be maintained up until late 2009.

However, I remembered something, another project that forked off Samba many years ago, named Samba-tng. I looked it up and found that it is still active:

http://wiki.samba-tng.org/doku.php/start

Interesting, they state that it works with Windows Vista, not Windows 7 though.

So, I got it out of CVS and compiled it. This is how I configured it:

# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=i486-pc-linux-gnu --enable-shared --with-sambaconfdir=/etc/samba --with-privatedir=/etc/samba/private --with-tmpdir=/var/samba/locks --with-logdir=/var/samba/log

Note that smb.conf will reside in /etc/samba. Note also that I configured it without 'smbmount' as that is supposed to be deprecated.

What is really great is how small it is. I decided to put the entire package into Slackpup, not just the client components. The 'samba-tng-20100705.pet' is 1.2MB. If I only wanted the client components then it would be much smaller, but having Samba server capability is interesting.

I was curious. With the unnecessary Xorg servers removed and the much smaller Samba-tng, what size is the Spup iso? Version 0.3 iso is 123.4MB. I reran the build script in Woof and the iso is now 115.1MB! Yippee!

The next thing that I am going to try is compile Samba-tng statically with Dietlibc or uClibc. Some people are interested in having the Samba executables in the initrd.gz.


Posted on 5 Jul 2010, 21:25


Comments:

Posted on 5 Jul 2010, 22:47 by perthie
Smbspool Missing
Unless I've missed something, samba-tng does not contain the usual smbspool client program needed to access a Windows shared printer.


Posted on 5 Jul 2010, 23:43 by BarryK
Missing smbspool
Yeah, I was wondering about that. In that case, how does it support printing?



Posted on 5 Jul 2010, 24:00 by BarryK
Compiled statically
I managed to compile 'smbclient' and 'nmblookup' statically in uClibc. They are quite small, 604KB and 371KB uncompressed. They could be used in the initrd.

If anyone is interested, I have uploaded the PETs, including one with the static client utilities only (samba-tng*):

http://distro.ibiblio.org/pub/linux/distributions/quirky/pet_packages-quirky/

Hmmm, the lack of smbspool is a worry.



Posted on 6 Jul 2010, 8:42 by BarryK
Samba-tng printing
I looked in the examples given in the samba-tng source tarball. It seems that 'smbclient' can be used for printing.



Posted on 6 Jul 2010, 11:25 by technosaurus
samba nuances
By default samba will compile position independent executables which can almost double the size. Even if you tell it to compile as shared, there is still one small, one medium and one large static library (maybe more) that gets linked into each executable (very similar to git binaries and libgit.a)

I didn't have the patience to patch the build files to make a shared library, so I instead disabled all position independent parts of samba (the options went something like without-pic, without-pie? and enable-static disable-shared ... works best with ffunction,fdata,gc-sections gcc flags)


Posted on 6 Jul 2010, 16:35 by Dougal
OT: video converter
Barry, this looks like it might be interesting:
http://transcoder84.sourceforge.net/



Posted on 6 Jul 2010, 21:01 by perthie
printing with smbclient
This is just a primitive way of sending raw text to a printer. It is not a replacement for CUPS and smbspool.


Posted on 6 Jul 2010, 24:34 by aarf
Transcoder
Transcoder is a video converter for Linux
success in puppeeerc7


Posted on 11 Jul 2010, 12:28 by technosaurus
samba nuances
By default samba will compile position independent executables which can almost double the size. Even if you tell it to compile as shared, there is still one small, one medium and one large static library (maybe more) that gets linked into each executable (very similar to git binaries and libgit.a)

I didn't have the patience to patch the build files to make a shared library, so I instead disabled all position independent parts of samba (the options went something like without-pic, without-pie? and enable-static disable-shared ... works best with ffunction,fdata,gc-sections gcc flags)