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
Created attachment 5989 [details] patches samba.spec
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
Created attachment 7051 [details] Patch to fix building on RHEL4
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.
Created attachment 7057 [details] Patch for Samba 3.5.12 on RHEL4 This is for Samba 3.5 on RHEL4
Pushed one part of the fixes to autobuild, it will be added to v3-5-test soon.
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.
Created attachment 7113 [details] Proposed (extended) patch
Re-assigning to Björn for patch review. Thanks!
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 ;-)
(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!
Pushed to v3-6-test (f89cdef5 and b0e5fb69) and v3-5-test. Closing out bug report. Thanks for reporting and providing patches!