Bug 5507 - RPM build errors when building from packaging/RHEL/ for 3.2.0rc1
Summary: RPM build errors when building from packaging/RHEL/ for 3.2.0rc1
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.2.0
Hardware: x86 Linux
: P3 major
Target Milestone: ---
Assignee: Michael Adam
QA Contact: Samba QA Contact
Depends on:
Reported: 2008-05-31 15:24 UTC by D.L. Meyer
Modified: 2008-09-10 05:16 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description D.L. Meyer 2008-05-31 15:24:42 UTC
When working with the 3.2.0rc1 source tarball, and building RPMs for RHEL4 from
the packaging/RHEL/ directory,  and after purging a residual symlink that was causing the 3.2.0rc1 source tree to build using the 3.2.0pre1 tree, and after re-applying my fixes for #5491 & #5492, I encountered the following error during build:


RPM build errors:
    File not found: /var/tmp/samba-3.2.0-root/usr/bin/smbmount
    File not found: /var/tmp/samba-3.2.0-root/usr/bin/smbmnt
    File not found: /var/tmp/samba-3.2.0-root/usr/bin/smbumount
    File not found by glob: /var/tmp/samba-3.2.0-root/usr/share/man/man8/smbmnt.8*
    File not found by glob: /var/tmp/samba-3.2.0-root/usr/share/man/man8/smbmount.8*
    File not found by glob: /var/tmp/samba-3.2.0-root/usr/share/man/man8/smbumount.8*
bash: Done.

The following changes to the spec file allowed the RPM build to proceed past this error.   However, I am unsure as to the status of the missing smbmnt/smbmount/smbumount files -- are they intended to have been removed?  It would seem not to me, since there are a number of symlinks established to these files...

--- packaging/RHEL/samba.spec.tmpl      2008-05-31 16:08:00.000000000 -0500
+++ packaging/RHEL/samba.spec   2008-05-31 17:57:59.000000000 -0500
@@ -430,9 +430,9 @@

@@ -444,9 +444,9 @@


After bypassing this set of missing files during the build, I then encountered an even longer list:

RPM build errors:
    Installed (but unpackaged) file(s) found:

The ldb* files are similar to the error noted in $5494, but I suspect the build in #5494 was being done against the 3.2.0pre1 source tree.   Here, I have ensured that only the 3.2.0rc1 source tree is used.

The following additions to the samba.spec file allowed the RPM build to proceed past these errors, to completion:

--- packaging/RHEL/samba.spec.working   2008-05-31 17:57:59.000000000 -0500
+++ packaging/RHEL/samba.spec   2008-05-31 19:13:39.000000000 -0500
@@ -371,6 +371,8 @@

@@ -461,6 +463,7 @@


@@ -482,6 +485,15 @@

Comment 1 D.L. Meyer 2008-06-01 00:26:47 UTC
Upon installation of these packages, restarting the smb or winbind services yields the following error:

Starting SMB services: smbd: error while loading shared libraries: libtalloc.so.1: cannot open shared object file: no such file or directory

Evidently, the shared libraries are being installed by the spec-built packages at /usr/lib/samba/ instead of /usr/lib/, and the typical symlinks (*.so.1) are not being generated & installed by the spec file.

Comment 2 Michael Adam 2008-08-04 14:48:01 UTC
Hi - thanks for reporting!

There have been numerous changes to the build system,
but the packaging/RHEL folder has not been adapted - Sorry for that.

Please compare the spec file in the packaging/RHEL-CTDB folder:
this _has_ been updated. 

* the smbmount related stuff has vanished - your patch is correct.
* the ldb tools files have been added. one would like to be more
  specific in the files' section though, I guess.
* the several .so and .h files are from the new shared libraries.
  Here "make install" is also still broken in 3.2.X
  (It is fixed in v3-3-test, i.e. will be fixed in 3.3.0, see bug #5592).

  Generally what one has to do in principle (for each lib)
  is the following:
  - rm %{_libdir}/samba/libfoo.so
  - install bin/libfoo.so %{_libdir}/libfoo.so.SOVER
  - ln -s libfoo.so.SOVER %{_libdir}/libfoo.so

  - add %{_libdir}/libfoo.so.SOVER to files section of the package
  - add %{_includedir}/foo.h and %{_libdir}/libfoo.so to the 
    corresponding devel-package

  Here SOVER means the major version number for the library, e.g. it
  is 1 (one) for libtdb and libtalloc.

  Again, please compare the RHEL-CTDB specfile for an idea what to do.

  That the library is installed in /usr/lib/samba instead of /usr/lib
  is why it is not found when you call any binaires. Hence the hack
  above. When you look at the spec file, you see that it already does
  this kind of thing with libsmbclient (since long). Basically, just
  copy that.

Let me see if I find time to fix the packaging/RHEL stuff.
Otherwise, feel free to submit a patch!

Thanks - Michael
Comment 3 Karolin Seeger 2008-09-10 05:16:17 UTC
Fixes will be included in 3.2.4.
Closing out bug report.

Thanks for the report!