[Samba] RHEL 5 compilation of Samba 3.5.2, termcap library problem, use '--no-as-needed'

Nico Kadel-Garcia nkadel at gmail.com
Thu Apr 15 05:19:58 MDT 2010


On Thu, Apr 15, 2010 at 1:20 AM, Volker Lendecke
<Volker.Lendecke at sernet.de> wrote:
> On Wed, Apr 14, 2010 at 06:48:09PM -0400, Nico Kadel-Garcia wrote:

>> Can you publish the actual SRPM built for RHEL 5, or explain how you
>> were able to compile this package for RHEL 5?
>
> All I can say at this moment is that according to our
> internal procedures, the source RPM I referred you to is the
> one we are building from. I will investigate if something
> went wrong in posting this to the ftp server. We will
> certainly do everything necessary to ship the source code
> for the binaries you can download from our website to comply
> with the GPL.
>
> Can you please post the specific error message you are
> getting? It might be that our BuildRequires: line in the
> specfile is not correct or something else in our build
> environment is different than your host.
>
> Thanks,
>
> Volker

Thanks. I responded to Bjorn about the provenance of your SRPM.

Here are my error messages: This occurs on RHEL 5.4 and CentOS 5.4,
x86_64 architecture, in a normal home directory build and under mock.

$ rpmbuild --rebuild samba3-3.5.2-43.suse91.src.rpm
Installing samba3-3.5.2-43.suse91.src.rpm
warning: InstallSourcePackage: Header V4 DSA signature: NOKEY, key ID f4428b1a
error: Package already exists: %package debuginfo

Looking more deeply, I see your fascinating logic around
'this_is_redhat'., which seems to be failing. I've no idea why it's
failing, but I've previously found group statements to be a bit subtle
and unreliable unless you're very careful to set 'LANG' to something
predictable. In particular, in RHEL 5 with the default en_US.UTF8
setup, grep is case insensitive and should therefore be avoided unless
you set 'LANG=POSIX' or something reliable, first.

I'd like to suggest some cleaner logic for RedHat detection, as
included in this patch:

$ diff -u samba-3.5.spec.default  samba-3.5.spec
--- samba-3.5.spec.default      2010-04-06 06:14:28.000000000 -0400
+++ samba-3.5.spec      2010-04-15 07:10:57.000000000 -0400
@@ -7,7 +7,7 @@
 Url:           http://www.samba.org
 Vendor:                Service Network GmbH, Goettingen
 %define                releasefile     %(ls /etc/SuSE-release
/etc/UnitedLinux-release /etc/sles-release /etc/redhat-release
2>/dev/null | head -n1)
-%define                this_is_redhat  %(echo %{releasefile} | grep
-qi red && echo 1 || echo 0)
+%define                this_is_redhat  %([ -e /etc/redhat-release ]
&& echo 1 || echo 0)
 Distribution:  %(head -n1 < %{releasefile} || echo some SUSE-flavour ... )
 %if %(echo "%{distribution}" | grep -q "UnitedLinux" && echo 1 || echo 0 )
 %define                suse_ver        81

This patch allows compilation. I'm running a complete build right now.


More information about the samba mailing list