Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 594130 - [patch] net-fs/samba-4.5.0 (& 4.4) USE=addc solution
Summary: [patch] net-fs/samba-4.5.0 (& 4.4) USE=addc solution
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-17 21:40 UTC by Denis Kaganovich
Modified: 2018-10-26 09:52 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
samba-4.5.0-addc.patch (samba-4.5.0-addc.patch,2.00 KB, patch)
2016-09-17 21:42 UTC, Denis Kaganovich
Details | Diff
ebuild patch to include bundled heimdal WITHOUT making samba build include things automatically (samba-4.5.1.ebuild.patch,3.33 KB, patch)
2016-12-04 13:59 UTC, David Williams
Details | Diff
patch to stop the build attempting to use the compile_et from e2fsprogs-libs (samba-4.5.1-compile_et_fix.patch,800 bytes, patch)
2016-12-04 14:01 UTC, David Williams
Details | Diff
Attempted (failed) fix to build addc against system heimdal (samba-4.5.1-heimdal_compile_fix.patch,631 bytes, patch)
2016-12-04 14:03 UTC, David Williams
Details | Diff
ebuild patch to include bundled heimdal WITHOUT making samba build include things automatically (samba-4.5.1.ebuild.patch,3.31 KB, patch)
2016-12-04 14:16 UTC, David Williams
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Kaganovich 2016-09-17 21:40:03 UTC
Trying to build net-fs/samba-4.5.0 with budled heimdal, I found:
1) It build fine (+gpgme dependence & fix);
2) It have no visible collisions with system-side heimdal or mit-krb5.

So, IMHO it may be solution against broken USE=addc. Next attaching patch with: USE=addc -> bundled heimdal; USE=-addc -> old behaviour (system kerberos).

Also it can be backported (or just applied?) to 4.4.5, but I see no reason.

Reproducible: Always
Comment 1 Denis Kaganovich 2016-09-17 21:42:03 UTC
Created attachment 446224 [details, diff]
samba-4.5.0-addc.patch
Comment 2 Douglas Paul 2016-09-20 12:25:22 UTC
Possible duplicate of bug 591212.
Comment 3 David Williams 2016-12-04 13:59:40 UTC
Created attachment 455068 [details, diff]
ebuild patch to include bundled heimdal WITHOUT making samba build include things automatically
Comment 4 David Williams 2016-12-04 14:01:54 UTC
Created attachment 455070 [details, diff]
patch to stop the build attempting to use the compile_et from e2fsprogs-libs
Comment 5 David Williams 2016-12-04 14:03:16 UTC
Created attachment 455072 [details, diff]
Attempted (failed) fix to build addc against system heimdal
Comment 6 David Williams 2016-12-04 14:16:25 UTC
Created attachment 455074 [details, diff]
ebuild patch to include bundled heimdal WITHOUT making samba build include things automatically
Comment 7 David Williams 2016-12-04 14:35:55 UTC
Unfortunately Denis' version makes the Samba build go into automatic and include any missing dependencies from it's bundled libraries. I've attached a version that only includes the bundled Heimdal. I also corrected the tevent dependency to 0.9.29. 

I added system-heimdal and internal-heimdal use flags rather than just change the addc behaviour. 

Also attached is a patch to stop the build trying to use the compile_et from e2fsprogs-libs to compile the error tables leading to a later compile error. 

Finally I did try to fix the addc compile error against system-heimdal by modifying the 4.2.3-heimdal patch. It got a bit further but then struck another error. 

The new error referred to an undefined Heimdal error type HDB_ERR_WRONG_REALM. I rebuilt Heimdal with hdb-ldap support but no change, I then searched the Heimdal code for the error type without success. It looks like the samba team have made changes to Heimdal that haven't got into the released version so it looks like if you want addc then you need the bundled Heimdal.
Comment 8 David Williams 2016-12-10 20:39:49 UTC
Still the same in samba-4.5.2
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-01-19 02:45:18 UTC
commit 4e557b9116160c188cd2ca685e69aea4844bf47a
Author: Lars Wendler <polynomial-c@gentoo.org>
Date:   Thu Jan 19 03:15:30 2017

    net-fs/samba: Bump to versions 4.5.4 and 4.6.0_rc1

    Added possibility to build AD Domain Controller against bundled heimdal.
    Thanks to Denis Kaganovich and David Williams for providing patches in
    Gentoo bug #594130.

    Package-Manager: Portage-2.3.3, Repoman-2.3.1
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-01-19 16:53:00 UTC
Reopening as I got reports that samba automatically prefers system-heimdal over bundled heimdal if app-crypt/heimdal is installed.
Can you guys please look into this?
Comment 11 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-10-26 09:52:08 UTC
Should no longer be an issue...