0

On linux samba4 is about 60MB at least on Slackware.

On Solaris 11 samba4 compiled by myself and installed is 104MB!

So i try strip

solaris original strip

#!/usr/bin/bash
set -e


find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null

gnu strip

#!/usr/bin/bash
set -e

STRIP=/opt/csw/gnu/strip

find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $STRIP --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $STRIP --strip-unneeded 2> /dev/null
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $STRIP -g 2> /dev/null

Before run those scripts

du -sh samba4
106MB

After

du -sh samba4
104MB

Only 2mb? Is normal?

elbarna
  • 12,050
  • 22
  • 92
  • 170

1 Answers1

1

Any reason you're not using the samba package from the repo? It appears it's currently got v4.4.16 which is using ~67mb.

Also, if you're planning on sharing out a CIFS/SMB share, you can do it directly via the ZFS commands.

sleepyweasel
  • 1,013
  • 5
  • 11
  • The samba package from repo give me some problem,the latest samba 4.7 works fine,the only problem is too big in size. – elbarna Dec 20 '17 at 21:19