"Leclerc, Sebastien" <sebastien.lecl...@saint-georges.ca> writes:

>> -----Message d'origine-----
>> De : Jeremie Courreges-Anglas [mailto:j...@wxcvbn.org]
>> Envoyé : 18 octobre 2016 15:29
>> 
>> Anyway, is the plugin broken right now, or is that report just about
>> runtime linker warnings?
>
> It is broken, ldap authentication does not work, but is ok with 5.9 amd64.

Does the following patch fix your problem?  Make sure you have the gcc-libs
package installed before rebuilding and testing.

Here, I can now run ''make test'' successfully, and

  openvpn --config /dev/null --plugin /usr/local/lib/openvpn-auth-ldap.so

doesn't print linker warnings any more.


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/openvpn-auth-ldap/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile    1 Oct 2016 11:54:16 -0000       1.7
+++ Makefile    1 Nov 2016 17:07:55 -0000
@@ -3,7 +3,7 @@
 COMMENT =              LDAP authentication plugin for OpenVPN 2.x
 
 VERSION =              2.0.3
-REVISION =             2
+REVISION =             3
 DISTNAME =             auth-ldap-${VERSION}
 PKGNAME =              openvpn-${DISTNAME}
 CATEGORIES =           net security
@@ -22,6 +22,7 @@ MASTER_SITES =                ${MASTER_SITE_GOOGLECODE
 RUN_DEPENDS =          net/openvpn
 LIB_DEPENDS =          databases/openldap
 BUILD_DEPENDS =                ${RUN_DEPENDS} \
+                       devel/check \
                        devel/re2c
 
 SEPARATE_BUILD =       Yes
@@ -29,8 +30,11 @@ SEPARATE_BUILD =     Yes
 CONFIGURE_STYLE =      gnu
 
 CONFIGURE_ARGS += --prefix=${LOCALBASE} \
+                 --with-check=${LOCALBASE} \
                  --with-openldap=${LOCALBASE} \
                  --with-openvpn=${LOCALBASE}/include/openvpn
+
+TEST_TARGET =          test
 
 SAMPLES_DIR =          ${PREFIX}/share/examples/openvpn-auth-ldap
 
Index: patches/patch-src_Makefile_in
===================================================================
RCS file: patches/patch-src_Makefile_in
diff -N patches/patch-src_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Makefile_in       1 Nov 2016 17:07:55 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/Makefile.in.orig       Fri Sep 15 04:45:57 2006
++++ src/Makefile.in    Tue Nov  1 17:52:06 2016
+@@ -37,7 +37,7 @@ TEST_OBJS=   testplugin.o
+ 
+ CFLAGS+=      -fPIC $(LDAP_CFLAGS) $(OPENVPN_CFLAGS)
+ OBJCFLAGS+=   -fPIC $(LDAP_CFLAGS) $(OPENVPN_CFLAGS)
+-LIBS+=                $(LDAP_LIBS) $(OBJC_LIBS) $(FLEX_LIBS)
++LIBS+=                -L/usr/lib $(LDAP_LIBS) $(OBJC_LIBS) $(FLEX_LIBS)
+ 
+ 
+ INSTALL_LIB=          $(INSTALL) -m 755
Index: patches/patch-tests_Makefile_in
===================================================================
RCS file: patches/patch-tests_Makefile_in
diff -N patches/patch-tests_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_Makefile_in     1 Nov 2016 17:07:55 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- tests/Makefile.in.orig     Tue Aug  1 05:51:52 2006
++++ tests/Makefile.in  Tue Nov  1 17:52:23 2016
+@@ -26,7 +26,7 @@ TEST_OBJS=   tests.o \
+ CFLAGS+=      @CHECK_CFLAGS@ -DTEST_DATA=\"${srcdir}/data\"
+ OBJCFLAGS+=   @CHECK_CFLAGS@ -DTEST_DATA=\"${srcdir}/data\"
+ LIBS+=                -lauth-ldap-testing $(OBJC_LIBS) $(LDAP_LIBS) 
@CHECK_LIBS@
+-LDFLAGS+=     -L${top_builddir}src $(LIBS)
++LDFLAGS+=     -L${top_builddir}/src -L/usr/lib $(LIBS)
+ 
+ # Recompile the tests every time
+ all: tests

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to