[Samba] Building Samba RPM packages for RHEL/CentOS 5 - Needed corrections to the .spec file
miguelmedalha at sapo.pt
Tue Nov 2 19:35:31 MDT 2010
I just built from source the Samba 3.5.6 RPM packages for CentOS
I found some glitches in the included samba.spec file and I thought
someone else might benefit from my recent experience. The spec file for
RHEL/CentOS resides, on the sources tree, under
1 - The process initially fails due to a dependency problem: missing
"keyutils-devel". Change the respective entry on line 31
(BuildRequires:) to "keyutils-libs-devel" (yum install this file from
the repositories if needed).
2 - Although it is called by the packaging process, the "umount.cifs"
file is not compiled and therefore cannot be found in sources3/bin at
the moment of packaging. Therefore, the RPM build process fails. Either
comment the references to the file from lines 237, 396 and 414, if you
don't need this function, or add the following to the ./configure
command, starting on line 137:
The default for this parameter is "no", and therefore it is not included
in the "configure" process as is.
3 - The RPM build process finally fails because some files, which were
compiled and copied to the temporary tree, are not called by the
packaging process. The following lines must be included on the spec
file, under "Files section":
I suggest you include them close to related lines (same paths) for the
sake of clarity.
After these corrections the build of the RPM packages went on with no
errors and was successful. All the packages installed correctly afterward.
I hope these tips will be useful to someone.
PS - The sources for Samba 3.5.6 are here:
Before building, you might be interested in patching the sources with
the patch provided by Volker Lendecke to improve compliance with Windows
ACLs. The patch is here, thanks to Volker:
patch -b -p1 < jumbo-patch-3-5-6.diff
After applying the patch and modifying the .spec file you can proceed to
the building process. cd to
"/usr/src/redhat/SOURCES/samba-3.5.6/packaging/RHEL" and execute the
"makerpms.sh" script there.
More information about the samba