proposal: merge waf build of s4 to master

tridge at samba.org tridge at samba.org
Mon Apr 5 02:58:40 MDT 2010


Hi Volker,

 > Go to an arbitrary default Solaris/AIX/Whatever box (Solaris
 > is most popular for me), download samba-latest.tar.gz, type
 > in ./configure;make and get a (possibly not fancy) smbd.

I presume you wouldn't mind if the non-python version was called
something other than configure?

For stage 2 of the proposed build change, the autotools build would be
./configure. If we decide to go to stage 3 for Samba3 (where the new
build system becomes the default), then I'd suggest that the old
configure script have a different name, so that ./configure gets the
primary build system for the project.

Currently I have used ./autogen-waf.sh for the waf-wip branch. At
stage 3 this would become autogen.sh, and the old autogen.sh would get
a new name (maybe autogen-oldbuild.sh? )

We could do the same for configure.

 > I personally am not really concerned about tdb as a separate
 > package, so I should probably not have stepped into the discussion
 > at this point. Sorry for that.

no worries - I wondered why you were concerned about the standalone
library builds.

In case it is useful, I include below the script I added to the build
farm for adding python on systems that don't have it. It shows that
automating the build/install of python is quite easy. 

While I don't think we need to do this now, if we ended up with nobody
maintaining the old build system at some point then we could include a
script like this in autogen.sh. Something like this:

  if ! which python; then
      echo "Python is needed for samba to build"
      echo "Would you like me to download and install pyton now?"
      read answer
      if [ "$answer" = "yes" ]; then
         script/install_python.sh || exit 1
      fi
  fi

It would need some tweaks for checking python libs etc, so the above
is just to start some discussion on the general idea.

That wouldn't work when you are on a customer site that has no net
access, but I'm guessing you would download the python tarball from
samba.org at the same time as you download the samba tarball.

Cheers, Tridge



-----------
# this script should be . included into the fns file
# of any system that needs an update to its python install

PATH=$HOME/python/bin:$PATH
export PATH

VERSION="Python-2.6.5"

do_install_python() {
   ( 
       mkdir -p python_install || exit 1
       rsync -avz samba.org::ftp/tridge/python/$VERSION.tar python_install || exit 1
       cd python_install || exit 1;
       rm -rf $VERSION || exit 1
       tar -xf $VERSION.tar || exit 1
       cd $VERSION || exit 1
       ./configure --prefix=$HOME/python --disable-ipv6 || exit 1
       make || exit 1
       make install || exit 1
       cd ../.. || exit 1
       rm -rf python_install || exit 1
       rsync install_python.fns $HOME/python || exit 1
   ) > install_python.$host.log 2>&1

   rsync  -c -q --password-file=.password -z --timeout=200 install_python.$host.log $host at build.samba.org::build_farm_data/
}

if ! test -d $HOME/python || ! cmp install_python.fns $HOME/python/install_python.fns; then
   # needs to be installed
   do_install_python
fi


More information about the samba-technical mailing list