site  contact  subhomenews

Samba-tng 20100705

July 05, 2010 — BarryK
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.

Comments

Smbspool Missing
Username: perthie
Unless I've missed something, samba-tng does not contain the usual smbspool client program needed to access a Windows shared printer."5 Jul 2010, 22:47"01700"65.93.26.209'Missing smbspool"BarryK"Yeah, I was wondering about that. In that case, how does it support printing? Username: 5 Jul 2010, 23:43
"01700"114.129.167.148'Compiled statically"BarryK"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. Username: 5 Jul 2010, 24:00
"01700"114.129.167.148'Samba-tng printing"BarryK"I looked in the examples given in the samba-tng source tarball. It seems that 'smbclient' can be used for printing. Username: 6 Jul 2010, 8:42
"01700"114.129.167.148'samba nuances"technosaurus"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)"6 Jul 2010, 11:25"01700"96.13.20.206'OT: video converter"Dougal"Barry, this looks like it might be interesting: http://transcoder84.sourceforge.net/ Username: 6 Jul 2010, 16:35
"01700"109.67.5.15'printing with smbclient"perthie"This is just a primitive way of sending raw text to a printer. It is not a replacement for CUPS and smbspool."6 Jul 2010, 21:01"01700"65.95.11.200'Transcoder "aarf"[url=http://www.murga-linux.com/puppy/viewtopic.php?p=432302#432302]Transcoder is a video converter for Linux[/url] success in puppeeerc7"6 Jul 2010, 24:34"01700"118.174.60.160'samba nuances"technosaurus"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)"11 Jul 2010, 12:28"01700"96.13.45.97'

Tags: puppy