Re: [www/rt] A flavor for LDAP?

2018-03-20 Thread William Leuschner
On 3/10/2018 8:23 AM, Stuart Henderson wrote:
> This shouldn't be CONFIGURE_STYLE=simple - CONFIGURE_STYLE=gnu is
> correct already.

It is?  It seems to work correctly with CONFIGURE_STYLE=simple.  I'm
still sort of new to this, do you mind explaining why?

> Is it actually required to run rt-test-dependencies? I haven't used rt
> for some years but from what I remember it's just a checker and doesn't
> make any actual changes?

Based on Paul's comments, I see now that it is not.  The patch without
that part is below.

─
William Leuschner
wel2...@rit.edu


Index: Makefile
===
RCS file: /cvs/ports/www/rt/Makefile,v
retrieving revision 1.40
diff -u -p -r1.40 Makefile
--- Makefile11 Jan 2018 19:27:12 -  1.40
+++ Makefile20 Mar 2018 15:38:36 -
@@ -4,7 +4,7 @@ COMMENT=industrial-grade ticketing sys

 DISTNAME=  rt-4.4.2
 CATEGORIES=www
-REVISION=  0
+REVISION=  1

 MAINTAINER=Robert Nagy 

Index: pkg/README
===
RCS file: /cvs/ports/www/rt/pkg/README,v
retrieving revision 1.1
diff -u -p -r1.1 README
--- pkg/README  14 Jun 2011 13:19:33 -  1.1
+++ pkg/README  20 Mar 2018 15:38:36 -
@@ -20,3 +20,6 @@ ${PREFIX}/share/doc/rt3/README
 If you are upgrading your installation, don't forget to run:
 # rt-setup-database --dba  --prompt-for-dba-password \
--action upgrade
+
+If you plan to connect your rt installation to an LDAP domain,
+install p5-ldap.



Re: [www/rt] A flavor for LDAP?

2018-03-12 Thread Paul Irofti
> > +
> > +If you plan to connect your rt installation to an LDAP domain,
> > +install p5-ldap and then run
> > +
> > +# rt-test-dependencies
> 
> Is it actually required to run rt-test-dependencies? I haven't used rt
> for some years but from what I remember it's just a checker and doesn't
> make any actual changes?

It is indeed just a checker, I don't know why you would need to run that
fro LDAP.



Re: [www/rt] A flavor for LDAP?

2018-03-10 Thread Stuart Henderson
On 2018/03/08 13:08, William Leuschner wrote:
> Here's a patch that adds a short message to the README explaining how to
> add LDAP support to RT.  Also, when I tested the packaging, I noticed
> that the configure script was being given some GNU-specific arguments
> that it didn't understand, so I changed the configure script style from
> GNU to simple in addition to bumping the revision.

This shouldn't be CONFIGURE_STYLE=simple - CONFIGURE_STYLE=gnu is
correct already.

> diff -u -p -r1.40 Makefile
> --- Makefile  11 Jan 2018 19:27:12 -  1.40
> +++ Makefile  8 Mar 2018 17:50:50 -
> @@ -4,7 +4,7 @@ COMMENT=  industrial-grade ticketing sys
> 
>  DISTNAME=rt-4.4.2
>  CATEGORIES=  www
> -REVISION=0
> +REVISION=1
> 
>  MAINTAINER=  Robert Nagy 
> 
> @@ -107,7 +107,7 @@ NO_BUILD= Yes
> 
>  PKG_ARCH=*
> 
> -CONFIGURE_STYLE= gnu
> +CONFIGURE_STYLE= simple
> 
>  CONFIGURE_ENV+=  LDFLAGS="-L${LOCALBASE}/lib"
> 
> Index: pkg/README
> ===
> RCS file: /cvs/ports/www/rt/pkg/README,v
> retrieving revision 1.1
> diff -u -p -r1.1 README
> --- pkg/README14 Jun 2011 13:19:33 -  1.1
> +++ pkg/README8 Mar 2018 17:50:50 -
> @@ -20,3 +20,8 @@ ${PREFIX}/share/doc/rt3/README
>  If you are upgrading your installation, don't forget to run:
>  # rt-setup-database --dba  --prompt-for-dba-password \
>   --action upgrade
> +
> +If you plan to connect your rt installation to an LDAP domain,
> +install p5-ldap and then run
> +
> +# rt-test-dependencies

Is it actually required to run rt-test-dependencies? I haven't used rt
for some years but from what I remember it's just a checker and doesn't
make any actual changes?



Re: [www/rt] A flavor for LDAP?

2018-03-08 Thread William Leuschner
Here's a patch that adds a short message to the README explaining how to
add LDAP support to RT.  Also, when I tested the packaging, I noticed
that the configure script was being given some GNU-specific arguments
that it didn't understand, so I changed the configure script style from
GNU to simple in addition to bumping the revision.

─
William Leuschner
wel2...@rit.edu

Index: Makefile
===
RCS file: /cvs/ports/www/rt/Makefile,v
retrieving revision 1.40
diff -u -p -r1.40 Makefile
--- Makefile11 Jan 2018 19:27:12 -  1.40
+++ Makefile8 Mar 2018 17:50:50 -
@@ -4,7 +4,7 @@ COMMENT=industrial-grade ticketing sys

 DISTNAME=  rt-4.4.2
 CATEGORIES=www
-REVISION=  0
+REVISION=  1

 MAINTAINER=Robert Nagy 

@@ -107,7 +107,7 @@ NO_BUILD=   Yes

 PKG_ARCH=  *

-CONFIGURE_STYLE=   gnu
+CONFIGURE_STYLE=   simple

 CONFIGURE_ENV+=LDFLAGS="-L${LOCALBASE}/lib"

Index: pkg/README
===
RCS file: /cvs/ports/www/rt/pkg/README,v
retrieving revision 1.1
diff -u -p -r1.1 README
--- pkg/README  14 Jun 2011 13:19:33 -  1.1
+++ pkg/README  8 Mar 2018 17:50:50 -
@@ -20,3 +20,8 @@ ${PREFIX}/share/doc/rt3/README
 If you are upgrading your installation, don't forget to run:
 # rt-setup-database --dba  --prompt-for-dba-password \
--action upgrade
+
+If you plan to connect your rt installation to an LDAP domain,
+install p5-ldap and then run
+
+# rt-test-dependencies


On 3/7/2018 8:12 PM, Stuart Henderson wrote:
> On 2018/03/07 20:01, William Leuschner wrote:
>>
>>> On 7 Mar, 2018, at 19:09, Stuart Henderson  wrote:
>>>
>>>
>>> That is --enable-externalauth, isn't it?
>>
>> Yup, that’s the one.
>>
>>> i.e. the only thing it does is set a default in rt-test-dependencies
>>> which you can override with "rt-test-dependencies --with-externalauth"
>>> anyway. It doesn't turn any of the rest of the code on or off.
>>
>> Oh, I didn’t know that — I just looked at the configure script to see what 
>> option I had to pass to get it to enable LDAP.  I’ll give that a try.
>>
>> Would it be helpful for me to provide a patch that explains this in the 
>> post-install message, so that other people who want to do the same thing 
>> don’t have to rediscover all this?
>>
>> - William
> 
> pkg/README would be the place to add it - this is the file that gets
> installed to /usr/local/share/doc/pkg-readmes/rt-$VERSION which is
> mentioned by pkg_add post-install.
> 
> Changing this would also need REVISION www/rt/Makefile to be bumped.
> 



Re: [www/rt] A flavor for LDAP?

2018-03-07 Thread William Leuschner

> On 7 Mar, 2018, at 19:09, Stuart Henderson  wrote:
> 
> 
> That is --enable-externalauth, isn't it?

Yup, that’s the one.

> i.e. the only thing it does is set a default in rt-test-dependencies
> which you can override with "rt-test-dependencies --with-externalauth"
> anyway. It doesn't turn any of the rest of the code on or off.

Oh, I didn’t know that — I just looked at the configure script to see what 
option I had to pass to get it to enable LDAP.  I’ll give that a try.

Would it be helpful for me to provide a patch that explains this in the 
post-install message, so that other people who want to do the same thing don’t 
have to rediscover all this?

- William



Re: [www/rt] A flavor for LDAP?

2018-03-07 Thread Stuart Henderson
On 2018/03/07 20:01, William Leuschner wrote:
> 
> > On 7 Mar, 2018, at 19:09, Stuart Henderson  wrote:
> > 
> > 
> > That is --enable-externalauth, isn't it?
> 
> Yup, that’s the one.
> 
> > i.e. the only thing it does is set a default in rt-test-dependencies
> > which you can override with "rt-test-dependencies --with-externalauth"
> > anyway. It doesn't turn any of the rest of the code on or off.
> 
> Oh, I didn’t know that — I just looked at the configure script to see what 
> option I had to pass to get it to enable LDAP.  I’ll give that a try.
> 
> Would it be helpful for me to provide a patch that explains this in the 
> post-install message, so that other people who want to do the same thing 
> don’t have to rediscover all this?
> 
> - William

pkg/README would be the place to add it - this is the file that gets
installed to /usr/local/share/doc/pkg-readmes/rt-$VERSION which is
mentioned by pkg_add post-install.

Changing this would also need REVISION www/rt/Makefile to be bumped.



Re: [www/rt] A flavor for LDAP?

2018-03-07 Thread Stuart Henderson
On 2018/03/07 18:44, William Leuschner wrote:
> 
> On Mar 7, 2018, at 17:46, Stuart Henderson  wrote:
> 
> RT isn't compiled, it's interpreted, and it looks very much like the
> relevant files are included already.
> 
> 
> Ah, sorry. I just used “compiled” as an imprecise (and incorrect) shorthand 
> for the process of
> downloading the source files and running the provided configure/make scripts.
> 
> 
> Does pkg_add p5-ldap get it working for you?
> 
> 
> No, RT requires a command-line option at ./configure time to tell it to look 
> for the other Perl
> libraries necessary to talk to LDAP. I wish it was as easy as installing 
> p5-ldap.
> 
> ─
> William Leuschner
> wel2...@rit.edu


That is --enable-externalauth, isn't it?

Diffing the install directories the only changes made by setting this
are the configure command-line string embedded in a comment, and this:

--- fake1/usr/local/sbin/rt-test-dependencies   Wed Mar  7 23:53:57 2018
+++ rt-4.4.2/fake-amd64/usr/local/sbin/rt-test-dependencies Wed Mar  7 
23:55:26 2018
@@ -100,7 +100,7 @@ my %default = (
 'with-SMIME'=> 1,
 'with-GRAPHVIZ' => 1,
 'with-GD'   => 1,
-'with-EXTERNALAUTH' => 0,
+'with-EXTERNALAUTH' => 1,
 'with-S3'   => (uc(q{database}) eq 'S3'),
 'with-DROPBOX'  => (uc(q{database}) eq 'DROPBOX'),
 );

i.e. the only thing it does is set a default in rt-test-dependencies
which you can override with "rt-test-dependencies --with-externalauth"
anyway. It doesn't turn any of the rest of the code on or off.

(The check in rt-test-dependencies is a bit wrong anyway, it looks for
Net::SSLeay when it should look for IO::Socket::SSL). 

If you've tried it and it doesn't work, we'll need more information
about how it's not working, adding a flavour that basically has no
effect other than adding a dependency is not how ports does things.



Re: [www/rt] A flavor for LDAP?

2018-03-07 Thread Stuart Henderson
On 2018/03/07 13:55, William Leuschner wrote:
> Hello ports@,
> 
> My use-case for www/rt needs LDAP integration.  RT supports this, but
> there's no way to make it happen on OpenBSD without recompiling RT
> myself.  Would anyone be interested if I submitted a patch for www/rt
> that adds a FLAVOR for LDAP integration?
> 
> ─
> William Leuschner
> wel2...@rit.edu
> 

RT isn't compiled, it's interpreted, and it looks very much like the
relevant files are included already.

Does pkg_add p5-ldap get it working for you?