4.19.2011

Build Samba RPM from Source (samba-3.5.8)

Environment:
OS: CentOS 5.6
Kernel: 2.6.18-238.5.1.el5
Unofficial RPM Build for RHEL link
  1. install development tools "yum -y groupinstall 'Development Tools' "
  2. Download Samba Source Link
  3. Extract source file (samba-3.5.8.tar.gz)
  4. cd amba-3.5.8/packaging/RHEL
  5. nano samba.spec
  6. Search the line "BuildRequires" update "keyutils-devel" to "keyutils-libs-devel"
  7. Search the line "cc="$cc" CLFLAGS= [..skipped..]   ./configure" and add this new line "--with-cifsumount \"
  8. run "sh makerpms.sh &>/root/samba.build.log"
  9. When the end of the process has shown "error: Installed (but unpackaged) file(s) found:", please add those mentioned file in the "samba.spec" file at the end of "%files" section, and then repeat step 8.
  10. Now the new rpm files should built in "/usr/src/redhat/RPMS/i386"
  11. You need to uninstall the installed samba please run "rpm -e samba-common samba samba-client --nodeps"
  12. And you need to uninstall some dependent files, please run "rpm -e libsmbclient libtdb libtalloc --nodeps"
  13. Install new the samba rpms run "rpm -ivh samba*"