Bug 7705 - RHEL samba.spec broken - and fix
Summary: RHEL samba.spec broken - and fix
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 3.5.5
Hardware: All Linux
: P3 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-28 22:05 UTC by Jason Haar
Modified: 2011-11-19 19:03 UTC (History)
1 user (show)

See Also:


Attachments
patches samba.spec (2.92 KB, text/plain)
2010-09-28 22:19 UTC, Jason Haar
no flags Details
Patch to fix building on RHEL4 (2.61 KB, patch)
2011-11-02 13:44 UTC, Daniël van Eeden
no flags Details
Patch for Samba 3.5.12 on RHEL4 (1.49 KB, patch)
2011-11-03 09:58 UTC, Daniël van Eeden
no flags Details
Proposed (extended) patch (1.64 KB, patch)
2011-11-17 20:30 UTC, Karolin Seeger
bjacke: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Haar 2010-09-28 22:05:43 UTC
There are several minor errors in samba.spec under packaging/RHEL  that stop "makerpms.sh" from working.

Attached is my re-vamp. It successfully compiles on CentOS-4.8 and CentOS-5.4 - which should mean RHEL4 and RHEL5

...hmmm how do I attach a file to this? I just posted a message to samba-users Subject "Re: [Samba] samba version to use on CentOS?" with the attachment - you can grab it from there


Jason
Comment 1 Jason Haar 2010-09-28 22:19:55 UTC
Created attachment 5989 [details]
patches samba.spec
Comment 2 Daniël van Eeden 2011-11-02 12:48:42 UTC
Also happens with 3.6.1 on RHEL 4

+ #a total hack - I don't know rpm better :-(
+ %define rhV %(awk '{print $3}' /etc/redhat-release|grep -c ^4)
+ 

This could be changed to an LSB way:
%define rhV %(lsb_release -sr)

The patch only seems to skip /sbin/umount.cifs but should also skip /sbin/mount.cifs
Comment 3 Daniël van Eeden 2011-11-02 13:44:06 UTC
Created attachment 7051 [details]
Patch to fix building on RHEL4
Comment 4 Daniël van Eeden 2011-11-03 09:57:29 UTC
Another way of finding the redhat release:

awk '/Red.*Hat.*release/{ for (i=0; i<NF; i++) { if (prev=="release") print $i; prev=$i }}' /etc/redhat-release

The contents of /etc/redhat-release on my machine is:
Red Hat Enterprise Linux ES release 4 (Nahant Update 8)

This file only has one line.

I still think that using lsb_release is a better solution.
Comment 5 Daniël van Eeden 2011-11-03 09:58:27 UTC
Created attachment 7057 [details]
Patch for Samba 3.5.12 on RHEL4

This is for Samba 3.5 on RHEL4
Comment 6 Karolin Seeger 2011-11-17 20:26:50 UTC
Pushed one part of the fixes to autobuild, it will be added to v3-5-test soon.
Comment 7 Karolin Seeger 2011-11-17 20:29:02 UTC
The main problem is that the spec template is not only for RHEL systems.
That's why I am going to propose an extended version of the proposed patch.
Patch to follow.
Comment 8 Karolin Seeger 2011-11-17 20:30:43 UTC
Created attachment 7113 [details]
Proposed (extended) patch
Comment 9 Karolin Seeger 2011-11-17 20:32:22 UTC
Re-assigning to Björn for patch review.

Thanks!
Comment 10 Björn Jacke 2011-11-18 10:11:39 UTC
Comment on attachment 7113 [details]
Proposed (extended) patch

looks correct (even though I'd personally prefer not to use lsb_release as it requires redhat-lsb to be installed).
I'm still a fan of dropping this packaging stuff from the tar ball. But that's a different story ;-)
Comment 11 Karolin Seeger 2011-11-19 19:01:14 UTC
(In reply to comment #10)
> Comment on attachment 7113 [details]
> Proposed (extended) patch
> 
> looks correct (even though I'd personally prefer not to use lsb_release as it
> requires redhat-lsb to be installed).
> I'm still a fan of dropping this packaging stuff from the tar ball. But that's
> a different story ;-)

Ok, thanks Björn!
Comment 12 Karolin Seeger 2011-11-19 19:03:38 UTC
Pushed to v3-6-test (f89cdef5 and b0e5fb69) and v3-5-test.
Closing out bug report.

Thanks for reporting and providing patches!