Samba 3.0.22 Porting by Vidya Sagar

16
shell/iX> pwd
/SAMBA/SMB3022/src
shell/iX> /usr/local/bin/diff -ruN samba-3.0.22/source samba-3.0.22-mpe/source
>./diff.txt
The diff -r option says to recursively compare two directory trees. The -u option says to generate output in the
"unified" format. The -N option says to generate entries to create files that exist only in the second directory tree.
The generated diff.txt file looks something like this:
diff -ruN samba-3.0.22/source/Makefile.in samba-3.0.22-mpe/source/Makefile.in
--- samba-3.0.22/source/Makefile.in Mon Feb 20 13:33:23 2006
+++ samba-3.0.22-mpe/source/Makefile.in Wed Nov 8 22:49:02 2006
@@ -36,8 +36,12 @@
LDAP_LIBS=@LDAP_LIBS@
INSTALLCMD=@INSTALL@
-INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@
-INSTALLLIBCMD_A=@INSTALLLIBCMD_A@
Since some source files in the Samba distribution are dynamically generated, you will want to remove those
entries from the diff file after you have generated it. These files are:
source/configure
include/proto.h
Few more files which you can find by looking for keyword “creating” in the
Samba-3.0.22 build document
[8] under “make proto” and “configure” section.
Note that if these files entries are not removed there will be no harm as these files will be recreated while building
the application. However it is expected that the diff entries that remain include the files used to dynamically
generate the above files.
The same procedure can be used to apply a patch (bug fix) released by Samba organization. You should apply
the patch on vanilla source tree, followed by applying the bug-fix and finally apply the source diff of previous
ported version.
Once you are done with applying patch and manually modifying the files corresponding to *.rej files, next is to
adjust and run the script configure.
3.5 Adjusting and Running configure script
As we discussed earlier, configure is the script responsible for checking system parameters and availability of
various assorted routines and libraries. You should note here that configure checks for the available supported
routines/headers on the host machine (MPE/iX) only by compiling tiny programs that calls/includes the specific
routine/header. In MPE/iX many routines are available in header files which are not yet implemented. This script
configure does not bother about the linker error, eventually reports many routines available and usable, which
is incorrect. We will discuss how to overcome this later in this section.
configure is generated by GNU autoconf from template file configure.in(configure.ac). For some
POSIX applications you may find a script autogen.sh which invokes autoconf which performs checking of
required version and other parameters. The Samba package has autogen.sh script included and you should
run this script after modifying configure.in to generate script configure.
I would like to remind you that applying the source diff in last step already have modified the configure.in. Still
a thorough check is useful. Changes in configure.in for Samba are as shown below:
.
.
.
case "$host_os" in
# MPE/iX needs several defines.