Difference between pages "FLOP:Kerberos V implementations" and "Talk:Intel64-haswell"

(Difference between pages)
(FLOP on krb5 impls)
 
(Suggestion to add the "LZCNT" flag to CPU_FLAGS_X86)
 
Line 1: Line 1:
{{FLOP
+
Should the CPU_FLAGS suggested on this page include "lzcnt"?
|Created on=2015/02/06
+
As listed here [1] lzcnt was adopted in Intel Haswell.
|Summary=Funtoo supports two binary-incompatible Kerberos V implementations: MIT and Heimdal. Ebuilds supporting both need to properly depend on them to ensure rebuilds.
+
|Author=Mgorny,
+
|FLOP Status=Pending Review
+
|Reference Bug=FL-2093
+
}}
+
== Overview ==
+
There are currently two Kerberos V implementations in Funtoo:
+
* MIT Kerberos V ({{Package|app-crypt/mit-krb5}}),
+
* Heimdal ({{Package|app-crypt/heimdal}}).
+
  
Both implementations use the same library names and a partially compatible API. However, they are binary incompatible and use different (non-colliding) SONAMEs.
+
Or is there a special reason that LZCNT was not listed on this page?
  
Many of Kerberos V applications support both implementations. In this case, the relevant packages depend on {{Package|virtual/krb5}}. Some applications support only one of the implementations, depending on it directly.
+
[1] http://www.funtoo.org/CPU_FLAGS
 
+
 
+
== Issues with the current solution ==
+
Virtuals are based on assumption that the providers can be switched at runtime. However, since the krb5 implementations are binary-incompatible, switching them at runtime is incorrect and results in the reverse dependencies being broken. Instead, implementation switch needs to be followed by automatic reverse dependency rebuild.
+
 
+
Furthermore, the lack of explicit implementation control will be an issue if installing both implementations in parallel becomes possible in the future. This could be desired since there are both packages supporting only mit-krb5, as well as packages supporting only heimdal.
+
 
+
 
+
== Suggested solution ==
+
The simplest solution seems to be introducing a USE flag in all reverse dependencies that support both mit-krb5 and heimdal. The flag would decide which of the two implementation is used.
+
 
+
An example reverse dependency would look like:
+
{{File|name=example-1.ebuild|body=
+
IUSE="heimdal"
+
RDEPEND="
+
    heimdal? ( app-crypt/heimdal:0= )
+
    !heimdal? ( app-crypt/mit-krb5:0= )"
+
}}
+
 
+
If Kerberos V support is optional, the flags would be combined with the ''kerberos'' feature flag:
+
{{File|name=example-1.ebuild|body=
+
IUSE="heimdal kerberos"
+
RDEPEND="
+
    kerberos? (
+
        heimdal? ( app-crypt/heimdal:0= )
+
        !heimdal? ( app-crypt/mit-krb5:0= )
+
    )"
+
}}
+
 
+
This implementation implies that:
+
# user is given an explicit choice of Kerberos V implementation.
+
# Switch of a Kerberos V implementation would cause a rebuild through ''--changed-use'', therefore resolving breakage caused by ABI change.
+
{{FLOPFooter}}
+

Revision as of 19:24, May 9, 2015

Should the CPU_FLAGS suggested on this page include "lzcnt"? As listed here [1] lzcnt was adopted in Intel Haswell.

Or is there a special reason that LZCNT was not listed on this page?

[1] http://www.funtoo.org/CPU_FLAGS