Miguel Medalha
2010-Nov-03 01:35 UTC
[CentOS] Building Samba RPM packages for RHEL/CentOS 5 - Needed corrections to the .spec file
I just built from source the Samba 3.5.6 RPM packages for CentOS 5.x/RHEL5.x. 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 "samba-3.5.6\packaging\RHEL\". 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: --with-cifsumount 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": /usr/share/locale/de/LC_MESSAGES/net.mo %{_includedir}/wbc_async.h %{_mandir}/man5/pam_winbind.conf.5.gz 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: http://www.samba.org/ 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: http://samba.org/~jra/samba-3-5-x-acl-jumbo-patch.tgz 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.
Apparently Analagous Threads
- Building Samba RPM packages for RHEL/CentOS 5 - Needed corrections to the .spec file
- Need help with spec file for Apache-2.4.7
- [Announce] Samba 3.5.7, 3.4.12 and 3.3.15 Security Re leases Available
- samba-3.5.4: compilation fails on RHAS5U5
- compiling 3.2.15: cifs.upcall not found afer RPM build