Opened 10 years ago

Closed 10 years ago

#44456 closed enhancement (fixed)

htcondor: Optionally disable kerberos5 dependency

Reported by: michael-lists@… Owned by: lpsinger (Leo Singer)
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc: michael-lists@…
Port: htcondor

Description

I'd like to be able to install HTCondor without Kerberos support if I don't need it. That way, I don't have to install the kerberos5 port which comes with versions of klist etc. not fully compatible with the ones shipped with OS X (see e.g. #34906).

Below is a patch that adds a variant nokerberos.

--- /Users/admin/Desktop/htcondor	2014-07-27 11:33:02.000000000 +0200
+++ /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/htcondor/Portfile	2014-07-27 11:33:13.000000000 +0200
@@ -84,6 +84,10 @@
                         port:openssl \
                         port:pcre
 
+variant nokerberos description {disable Kerberos5 support} {
+	depends_lib-delete port:kerberos5
+}
+
 license_noconflict      latex2html
 
 # FIXME: For some reason, Condor uses install_name_tool to have dynamic links

Change History (8)

comment:1 Changed 10 years ago by michael-lists@…

Cc: michael-lists@… added
Last edited 10 years ago by michael-lists@… (previous) (diff)

comment:2 Changed 10 years ago by cooljeanius (Eric Gallager)

MacPorts variants are not supposed to start with no any more. The way to do this instead would be to disable kerberos support by default in the port, then add kerberos support as a variant, and then make +kerberos a default variant.

comment:3 in reply to:  2 Changed 10 years ago by michael-lists@…

How about this Portfile patch then?

--- /Users/admin/Desktop/htcondor	2014-07-27 11:33:02.000000000 +0200
+++ /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/htcondor/Portfile	2014-07-27 15:06:04.000000000 +0200
@@ -26,7 +26,7 @@
   ultimately informs the user upon completion.
 homepage                http://research.cs.wisc.edu/htcondor
 
-default_variants        +personal +python27
+default_variants        +personal +python27 +kerberos
 
 variant personal \
   description "configure your computer as a one-node personal Condor pool" {
@@ -80,10 +80,13 @@
 
 depends_lib-append      port:boost \
                         port:expat \
-                        port:kerberos5 \
                         port:openssl \
                         port:pcre
 
+variant kerberos description {enable Kerberos5 support} {
+	depends_lib-append port:kerberos5
+}
+
 license_noconflict      latex2html
 
 # FIXME: For some reason, Condor uses install_name_tool to have dynamic links

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Just adding or removing a dependency is not enough. You must ensure that the port does not use the kerberos functionality if the kerberos variant has not been selected, even if the kerberos5 port is already installed.

comment:5 Changed 10 years ago by michael-lists@…

Hmm true. So what about this? I couldn't execute it yet because my HTCondor currently has running jobs, but based on the code and comparing it to the Python stuff in the Portfile, it should work:

--- /Users/admin/Desktop/htcondor	2014-07-27 11:33:02.000000000 +0200
+++ /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/htcondor/Portfile	2014-07-27 15:51:21.000000000 +0200
@@ -26,7 +26,7 @@
   ultimately informs the user upon completion.
 homepage                http://research.cs.wisc.edu/htcondor
 
-default_variants        +personal +python27
+default_variants        +personal +python27 +kerberos
 
 variant personal \
   description "configure your computer as a one-node personal Condor pool" {
@@ -80,10 +80,15 @@
 
 depends_lib-append      port:boost \
                         port:expat \
-                        port:kerberos5 \
                         port:openssl \
                         port:pcre
 
+configure.args-append   -DWITH_KRB5:BOOL="0"
+variant kerberos description {enable Kerberos5 support} {
+	depends_lib-append port:kerberos5
+	configure.args-strsed   s/-DWITH_KRB5:BOOL="0"/-DWITH_KRB5:BOOL="1"/
+}
+
 license_noconflict      latex2html
 
 # FIXME: For some reason, Condor uses install_name_tool to have dynamic links

comment:6 Changed 10 years ago by lpsinger (Leo Singer)

Owner: changed from macports-tickets@… to aronnax@…

Outside of the variant, you need to set -DWITH_KRB5:BOOL="0" so that the configure.args-strsed line has something to replace. You could add it to the configure.args-append command on line 51.

comment:7 Changed 10 years ago by michael-lists@…

Ok, I moved the -DWITH_KRB5 to line 51:

--- /Users/admin/Desktop/htcondor	2014-07-27 11:33:02.000000000 +0200
+++ /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/htcondor/Portfile	2014-07-29 14:32:00.000000000 +0200
@@ -26,7 +26,7 @@
   ultimately informs the user upon completion.
 homepage                http://research.cs.wisc.edu/htcondor
 
-default_variants        +personal +python27
+default_variants        +personal +python27 +kerberos
 
 variant personal \
   description "configure your computer as a one-node personal Condor pool" {
@@ -48,7 +48,7 @@
 
 conflicts_build     ${name}
 
-configure.args-append   -DWITH_PYTHON_BINDINGS:BOOL="0"
+configure.args-append   -DWITH_PYTHON_BINDINGS:BOOL="0" -DWITH_KRB5:BOOL="0"
 
 foreach s ${pythons_suffixes} {
     set p python${s}
@@ -80,10 +80,14 @@
 
 depends_lib-append      port:boost \
                         port:expat \
-                        port:kerberos5 \
                         port:openssl \
                         port:pcre
 
+variant kerberos description {enable Kerberos5 support} {
+	depends_lib-append port:kerberos5
+	configure.args-strsed   s/-DWITH_KRB5:BOOL="0"/-DWITH_KRB5:BOOL="1"/
+}
+
 license_noconflict      latex2html
 
 # FIXME: For some reason, Condor uses install_name_tool to have dynamic links

comment:8 Changed 10 years ago by lpsinger (Leo Singer)

Resolution: fixed
Status: newclosed

Committed as r122797. Thanks for your patch.

Note: See TracTickets for help on using tickets.