sys-auth/ssh-ldap-pubkey: selectively install LPK schema file
authorRobin H. Johnson <robbat2@gentoo.org>
Wed, 14 Nov 2018 07:03:52 +0000 (23:03 -0800)
committerRobin H. Johnson <robbat2@gentoo.org>
Wed, 14 Nov 2018 07:06:29 +0000 (23:06 -0800)
The LPK schema file is only needed on LDAP servers, and otherwise causes
this package to block the OpenSSH upgrade everywhere. By making it
optional and not enabled by default, the OpenSSH upgrade is much
smoother.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.10

sys-auth/ssh-ldap-pubkey/metadata.xml
sys-auth/ssh-ldap-pubkey/ssh-ldap-pubkey-1.3.0-r1.ebuild
sys-auth/ssh-ldap-pubkey/ssh-ldap-pubkey-1.3.0.ebuild

index 798419df9115a5e445e1ce6beaf0e3784a3ae8c6..d01451ddfccd3567eaa9056547fff82c573730a5 100644 (file)
@@ -9,4 +9,7 @@
                <bugs-to>https://github.com/jirutka/ssh-ldap-pubkey/issues</bugs-to>
                <remote-id type="github">jirutka/ssh-ldap-pubkey</remote-id>
        </upstream>
+       <use>
+               <flag name="schema">Install a copy of the LPK schema, only needed on LDAP servers.</flag>
+       </use>
 </pkgmetadata>
index 628ee8f4f193032daf60ad5dfc71fe7ed8adf64c..33d171a2c2b0574a7ea4a5948f19a3aa129868dd 100644 (file)
@@ -20,7 +20,7 @@ fi
 
 LICENSE="MIT"
 SLOT="0"
-IUSE="test"
+IUSE="schema test"
 RESTRICT="!test? ( test )"
 
 MY_CDEPEND="
@@ -40,7 +40,7 @@ DEPEND="
 # We need to block previous net-misc/openssh packages
 # to avoid file collision on "/etc/openldap/schema/openssh-lpk.schema"
 RDEPEND="${MY_CDEPEND}
-       !net-misc/openssh[ldap]"
+       schema? ( !net-misc/openssh[ldap] )"
 
 DOCS=( README.md CHANGELOG.adoc )
 
@@ -56,8 +56,10 @@ python_test() {
 python_install_all() {
        distutils-r1_python_install_all
 
-       insinto /etc/openldap/schema
-       doins etc/openssh-lpk.schema
+       if use schema; then
+               insinto /etc/openldap/schema
+               doins etc/openssh-lpk.schema
+       fi
 
        local MY_DOCDIR="/usr/share/doc/${PF}/examples"
        insinto "${MY_DOCDIR}"
index 1c422cf550fa2c12dcfbd4392ee05465d8add652..7d04c5fd30091c11122c626a335631c8d721e9a4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -20,7 +20,7 @@ fi
 
 LICENSE="MIT"
 SLOT="0"
-IUSE="test"
+IUSE="schema test"
 RESTRICT="!test? ( test )"
 
 MY_CDEPEND="
@@ -40,7 +40,7 @@ DEPEND="
 # We need to block previous net-misc/openssh packages
 # to avoid file collision on "/etc/openldap/schema/openssh-lpk.schema"
 RDEPEND="${MY_CDEPEND}
-       !net-misc/openssh[ldap]"
+       schema? ( !net-misc/openssh[ldap] )"
 
 DOCS=( README.md CHANGELOG.adoc )
 
@@ -51,8 +51,10 @@ python_test() {
 python_install_all() {
        distutils-r1_python_install_all
 
-       insinto /etc/openldap/schema
-       doins etc/openssh-lpk.schema
+       if use schema; then
+               insinto /etc/openldap/schema
+               doins etc/openssh-lpk.schema
+       fi
 
        local MY_DOCDIR="/usr/share/doc/${PF}/examples"
        insinto "${MY_DOCDIR}"