Bug 834603

Summary: Correct samba spec file for DC-enabled builds
Product: [Fedora] Fedora Reporter: Giuseppe Ragusa <giuseppe.ragusa>
Component: sambaAssignee: Andreas Schneider <asn>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: abokovoy, asn, christian.tosta, dpal, gdeschner, rmainz, sbose, ssorce, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 14:18:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed spec file
none
Proposed DC SysVinit control script
none
Spec patch versus latest (58beta2) package release
none
Spec patch versus latest (59beta2) package release
none
Spec patch versus latest (133.beta5) package release
none
Spec patch versus latest (133.beta5) package release
none
Spec patch versus latest (137.beta7) package release
none
Spec patch versus latest (137.beta7) package release
none
Spec patch versus latest (138.beta8) package release
none
Spec patch versus latest (139.rc1) package release
none
Spec patch versus latest (140.rc1) package release
none
Spec patch versus latest (150.rc1) package release
none
Spec patch versus latest (151.rc2) package release
none
Patch against latest samba.spec
none
Corrected version of previous patch none

Description Giuseppe Ragusa 2012-06-22 14:41:07 UTC
Description of problem:
The spec file does not correctly identifies all buildtime/runtime differences between various Fedora releases and current (6) / future RHEL.
The specified beta2 bundled version number for tevent is incorrect.
Furthermore, spec file must be manually edited to enable DC functionality support (I understand the README.dc argument, but in a dedicated, server-only setup it is immensely useful and long waited for) and even then no SysVinit/Systemd support for samba binary startup is included.

Version-Release number of selected component (if applicable):
4.0.0-56beta2

How reproducible:
Try to simply rebuild package under RHEL6.

Steps to Reproduce:
1.rpmbuild --rebuild samba4-4.0.0-56beta2.fc18.src.rpm
2.
3.
  
Actual results:
Build aborts with dependency errors (missing iniparser and python-tevent)

Expected results:
Builds and installs/runs conforming to distro release standards.

Additional info:
I'm attaching a revised spec and a SysVinit control script (from Samba Wiki, partially modified); please note that Systemd support is included in Samba4 and already used by the attached modified spec.
I further modified the logic to make the enabling of dc functionality automatically disable system MIT Kerberos5 support (actual tests pending).

Comment 1 Giuseppe Ragusa 2012-06-22 14:42:04 UTC
Created attachment 593770 [details]
Proposed spec file

Comment 2 Giuseppe Ragusa 2012-06-22 14:43:08 UTC
Created attachment 593771 [details]
Proposed DC SysVinit control script

Comment 3 Giuseppe Ragusa 2012-06-25 14:00:36 UTC
Modified spec file attachment into a "diff -Naur" patch versus latest package release (58beta2) which still exhibits the aforementioned problems

Comment 4 Giuseppe Ragusa 2012-06-25 14:02:46 UTC
Created attachment 594194 [details]
Spec patch versus latest (58beta2) package release

Comment 5 Alexander Bokovoy 2012-06-29 13:46:18 UTC
I see your reasons and fixing things like that is OK. However, please think about following scenario because this is what will happen in some mid- to long- term perspective.

In future we'll want to get back to a single samba package instead of samba and samba4 split. Samba 4 contains the same daemons and public libraries as in samba (3.x) packages so functionality-wise this will work fine.

However, when doing AD/Heimdal and MIT Krb5 build, all other subpackages will be affected as well, changing their libraries' ABI. In particular, libsmbclient will be linked with internal Heimdal version which would then cause issues for packages linked against libsmbclient. Your rebuilt samba-4.x package would not be able to be installed as replacement of samba-4.x package provided by default (with MIT Krb5 build).

We need to solve this issue somehow before giving a promise on dual-build.

Comment 6 Giuseppe Ragusa 2012-07-01 18:38:00 UTC
How about modifying the spec so that when enabling dc we make a second configure without-dc and with-mit-krb5, then build (both in a separate tree) and finally we install hand-picking only the client side bits (overwriting the Heimdal-based ones)?

Comment 7 Giuseppe Ragusa 2012-07-01 18:39:43 UTC
Created attachment 595555 [details]
Spec patch versus latest (59beta2) package release

Comment 8 Alexander Bokovoy 2012-07-02 06:05:13 UTC
I don't think it will help as dependencies for each version spread over the whole code base. You are welcome to experiment and demonstrate that this approach would work.

What is needed is a package, where dc version is built and installed into its own sandbox, lets say, %_libdir/sambadc where the whole install tree would be there. One particular issue with this approach is that you'll need to force generated ABI dependencies within dc subpackage dropped or otherwise there will mess of multiple libfoobars provided. Also path searching for python code would need to be modified to not clash with mitkrb5 version.

Comment 9 Giuseppe Ragusa 2012-08-04 09:57:47 UTC
Created attachment 602237 [details]
Spec patch versus latest (133.beta5) package release

Comment 10 Giuseppe Ragusa 2012-08-04 10:14:26 UTC
I tried to adapt my private old "isolated -tree" samba4 spec (I was installing into /opt around alpha17), but satisfying all the requirements which were rightly  mentioned goes beyond my available time at the moment.

Reading the latest discussions on samba-technical and the rationale around latest Fedora 18 samba4 announcements, I propose to simply modify the spec along the lines of my latest submitted patch:

*) ensure package is actually able to rebuild on stock RHEL6 (I reverted the tdb/talloc/tevent building mods as RHEL has too old versions for the time being; furthermore iniparser is not available and neither is python-tevent)

*) make sure that paths and support files for latest Fedora features/conventions are correctly managed under RHEL6/older Fedora (usrmove, volatile /run in place of /var/run, tmpfiles.d)

*) leave DC support off by default, but make sure that someone who manually modifies the spec to build it has all the remaining parts already in place (for RHEL6 too): he must "manually" ensure not to mix the resulting packages with standard but ABI-conflicting packages; if we can add Conflicts lines to the DC subpackages it would be nice but I lack the knowledge to that myself, to the point that I don't even know if it is feasible.

Comment 11 Giuseppe Ragusa 2012-08-04 12:56:39 UTC
Created attachment 602245 [details]
Spec patch versus latest (133.beta5) package release

Corrected "with_dc" option erroneously left to enabled by default.

Comment 12 Andreas Schneider 2012-08-20 13:19:46 UTC
I might add some things from the patch in future but can't do it right now. The spec file correctly builds for RHEL 6.4, RHEL 7.0 and Fedora. Applying your patch would break RHEL 6.4.

Comment 13 Giuseppe Ragusa 2012-09-04 08:59:18 UTC
I infer from comment #12 that RHEL 6.4 will have the tdb/talloc/tevent packages rebased, bringing in also the required python-tevent (and iniparser too).

I tested only on RHEL (actually CentOS) 6.3 fully up-to-date, but I would really like to reduce my patch to the bare minimum that could eventually be accepted (maybe only in the future) so I will assume that those dependencies are met and I will rework the patch.

Could someone please confirm/reject the following assumptions (sorry for insisting :> ):

1) the move to a "volatile" /var/run under /run (and the associated tmpfiles.d mechanism) happened in Fedora 15 and won't appear in RHEL until 7.0 (henceforth the need to conditionally modify the various references to /var/run and /run and the including of /etc/tmpfiles.d/* support files)

2) SysVinit control scripts usually have 755 permissions, sometimes 555, but never 644 except for "include-style" support files (henceforth the need to modify the install permissions)

The remaining part of my patch (barring some overzealous corrections on my part that I will promptly remove) deals with AD DC support and its SysVinit/Systemd resources and comes into play only manually enabling the %with_dc global (but if there's something incorrect or dubious in this part I'd like to know it).

Many thanks for your attention.

Comment 14 Giuseppe Ragusa 2012-09-04 09:59:18 UTC
Created attachment 609612 [details]
Spec patch versus latest (137.beta7) package release

Comment 15 Giuseppe Ragusa 2012-09-04 10:06:35 UTC
Created attachment 609614 [details]
Spec patch versus latest (137.beta7) package release

Corrected copy'n paste typo.

Comment 16 Giuseppe Ragusa 2012-09-11 07:10:30 UTC
Created attachment 611674 [details]
Spec patch versus latest (138.beta8) package release

Updated patch to latest Rawhide package, removed some erroneous corrections and fixed changelog entry.

Comment 17 Giuseppe Ragusa 2012-09-18 11:41:11 UTC
Created attachment 613981 [details]
Spec patch versus latest (139.rc1) package release

Updated to latest spec and modified dc post/postun/preun scriptlets to use new systemd-rpm macros for F18 and RHEL7.

Comment 18 Giuseppe Ragusa 2012-09-24 08:02:03 UTC
Created attachment 616403 [details]
Spec patch versus latest (140.rc1) package release

Updated to latest spec from Rawhide.

Comment 19 Giuseppe Ragusa 2012-09-28 14:27:19 UTC
Looking at latest Rawhide sources I see that samba4 package has been renamed as samba and the spec "rebased" on the latest samba 3.6.x version without any RHEL6 compatibility logic (I suppose that this is the way forward for Fedora 19 and RHEL 8).

If the previous package release (140) is the supposed way forward for RHEL 6/7 then I'd like to change product to RHEL on this bug and maybe incorporate some tweakings from the latest Rawhide (like enabling cluster support and maybe lib{smb,wb}client) but still using that (140) spec as reference.

Can anyone from RHEL team comment on this?

Many thanks.

Comment 20 Andreas Schneider 2012-10-01 11:55:28 UTC
The current samba package in rawhide and f18 are only supporting f18 and newer versions. There will be a samba4 package version 4.0.0rc1 in rhel6. So the spec file for this packages has been fixed for rhel6 especially.

Comment 21 Dmitri Pal 2012-10-01 20:15:02 UTC
This version is targeted for RHEL7 not RHEL8 and it is an official converged version upstream. If you need some special backporting to 3.6 in RHEL6.x please open separate RHEL RFEs and we will se what we can do. A lot has changed in Samba between 3.6.x and 4.0 so most likely some of the features would be very hard to backport.

Comment 22 Giuseppe Ragusa 2012-10-01 20:51:52 UTC
I understand comment #20 as a (partial) confirmation of my comment #19 and comment #21 as a further clarification adding that RHEL 7 too will use the converged samba package based on Samba4

Regarding comment #21 I must clarify that I do not have here any interest in the line of code of Samba 3.6.x (nor backports of any sort), but:

*) I (as a side note) suppose that RHEL6 too (as RHEL5) will switch to Samba 3.6.x as the fully supported stable samba version (actually the samba3x optional package, speaking of RHEL5)

*) I suppose that the samba4 package will remain "separate as this" for the life of RHEL6 (much like tha samba3x in RHEL5)

*) the officially provided samba4 packages in RHEL6 will have the sole stated purpose of supporting OpenChange and maybe FreeIPA

*) the samba4 package in RHEL6 will soon (maybe in RHEL6.4) be rebased to the (at least initially) RC1 Samba4 release (with no DC functionality compiled in)

Given the above points (which you are obviously free to confute), I suppose that the latest samba package in Rawhide sources no longer reflects the samba4 package that will be in RHEL6 (but only the Fedora18/RHEL7 samba one), so that if I want to maintain a patch / discuss changes (with the hope of seeing them [albeit partially] integrated in the future) I do not have a reference src.rpm any more (i.e. where is the RHEL6 samba4 package referred to in comment #20 ?)

Do I need to wait for a future RHEL6.x beta or can we continue discussing it here referencing the last relevant samba4 spec (the 140.rc1 one)?
If so, doesn't it make more sense if we change product to RHEL on this bug?

Comment 23 Dmitri Pal 2012-10-01 22:45:47 UTC
(In reply to comment #22)
> I understand comment #20 as a (partial) confirmation of my comment #19 and
> comment #21 as a further clarification adding that RHEL 7 too will use the
> converged samba package based on Samba4
> 
> Regarding comment #21 I must clarify that I do not have here any interest in
> the line of code of Samba 3.6.x (nor backports of any sort), but:
> 
> *) I (as a side note) suppose that RHEL6 too (as RHEL5) will switch to Samba
> 3.6.x as the fully supported stable samba version (actually the samba3x
> optional package, speaking of RHEL5)
> 
> *) I suppose that the samba4 package will remain "separate as this" for the
> life of RHEL6 (much like tha samba3x in RHEL5)
> 
> *) the officially provided samba4 packages in RHEL6 will have the sole
> stated purpose of supporting OpenChange and maybe FreeIPA
> 
> *) the samba4 package in RHEL6 will soon (maybe in RHEL6.4) be rebased to
> the (at least initially) RC1 Samba4 release (with no DC functionality
> compiled in)
> 

Those are correct statements.

> Given the above points (which you are obviously free to confute), I suppose
> that the latest samba package in Rawhide sources no longer reflects the
> samba4 package that will be in RHEL6 (but only the Fedora18/RHEL7 samba
> one), so that if I want to maintain a patch / discuss changes (with the hope
> of seeing them [albeit partially] integrated in the future) I do not have a
> reference src.rpm any more (i.e. where is the RHEL6 samba4 package referred
> to in comment #20 ?)


The new samba in rawhide has everything other than DC. AFAIU for what you are trying to accomplish you need to port your features to the package available in rawhide.
Then if you want to see the same issue addressed for RHEL 6 you can open a separate BZ and attach the current patch you have there.
A bit of double maintenance but unfortunately there is no other way.

Comment 24 Giuseppe Ragusa 2012-10-02 09:16:32 UTC
(In reply to comment #23)

...

> The new samba in rawhide has everything other than DC. AFAIU for what you
> are trying to accomplish you need to port your features to the package
> available in rawhide.

I'm including a revised patch for DC functionalities only, referring to latest Rawhide sources.

> Then if you want to see the same issue addressed for RHEL 6 you can open a
> separate BZ and attach the current patch you have there.
> A bit of double maintenance but unfortunately there is no other way.

I've opened bug 862194 to keep working on RHEL6 version, changing subject here accordingly (the RHEL6 support issues are not pertinent here anymore).

Comment 25 Giuseppe Ragusa 2012-10-02 09:17:58 UTC
Created attachment 620199 [details]
Spec patch versus latest (150.rc1) package release

Comment 26 Giuseppe Ragusa 2012-10-02 09:18:42 UTC
Comment on attachment 593771 [details]
Proposed DC SysVinit control script

No more relevant (unused in Fedora).

Comment 27 Giuseppe Ragusa 2012-10-05 15:56:18 UTC
Created attachment 622289 [details]
Spec patch versus latest (151.rc2) package release

Removed version/changelog parts to keep the patch more compatible to future package releases.

Comment 28 Fedora End Of Life 2013-04-03 13:45:42 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 29 Christian Tosta 2014-10-08 17:41:27 UTC
Created attachment 945120 [details]
Patch against latest samba.spec

Changing the package name to append a "4" when building with DC support permits differentiate samba AD/DC enabled/disabled packages:

samba-dc: DC is disabled
samba4-dc: DC is enabled

On this way, fedora can provide the two build variants.

Comment 30 Christian Tosta 2014-10-08 18:02:37 UTC
Created attachment 945127 [details]
Corrected version of previous patch

Comment 31 Fedora End Of Life 2015-01-09 17:12:46 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 32 Fedora End Of Life 2015-02-17 14:18:25 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.