Skip to contentSkip to conversation

build: plugins: set default to no in Windows

PATCH In review Alon Bar-Lev 4 participants 17 messages Jun 26, 2012 – Jun 27, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: plugins: set default to no in Windows

Both plugins cannot be compiled on Windows anyway.

---
 configure.ac |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)
configure.ac +14 -4
index db19d4a..7235a87 100644
@@ -195,16 +195,26 @@ AC_ARG_ENABLE(
 
 AC_ARG_ENABLE(
 	[plugin-auth-pam],
-	[AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes@:>@])],
+	[AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes for POSIX@:>@])],
 	,
-	[enable_plugin_auth_pam="yes"]
+	[
+		case "$host" in
+			*-mingw*) enable_plugin_auth_pam="no";;
+			*) enable_plugin_auth_pam="yes";;
+		esac
+	]
 )
 
 AC_ARG_ENABLE(
 	[plugin-down-root],
-	[AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes@:>@])],
+	[AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes for POSIX@:>@])],
 	,
-	[enable_plugin_down_root="yes"]
+	[
+		case "$host" in
+			*-mingw*) enable_plugin_down_root="no";;
+			*) enable_plugin_down_root="yes";;
+		esac
+	]
 )
 
 AC_ARG_ENABLE(
Signature · 1 line
1.7.3.4
#1 lore raw

Hi,

Quoted 1 line · Alon Bar-Lev

Both plugins cannot be compiled on Windows anyway.

Can you auto-disable plugin-auth-pam for OpenBSD as well, please?

We ran into this on the OpenBSD buildslave today - OpenBSD has no PAM whatsoever, so it would be nice to not have to care.

(Leaving the ACK on the windows patch to Samuli - looks good to me, but I can't test right now)

thanks.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#2 lore raw

This is exactly the reason why *ALL* plugins should be disabled by default. We are left with only Linux enabled... and distro maintainer can take care of that anyway.
But again... my opinion is not matter, right... sending a new patch.

Quoted 21 lines · Gert Doering

Hi,

Quoted 1 line · Alon Bar-Lev

Both plugins cannot be compiled on Windows anyway.

Can you auto-disable plugin-auth-pam for OpenBSD as well, please?

We ran into this on the OpenBSD buildslave today - OpenBSD has no PAM whatsoever, so it would be nice to not have to care.

(Leaving the ACK on the windows patch to Samuli - looks good to me, but I can't test right now)

thanks.

gert
--
USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...

#3 lore raw

PATCH 1/1 build: plugins: set defaults using a complex logic

pam cannot be compiled on *BSD and Windows.
down-root cannot be compiled on Windows.

---
 configure.ac |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)
configure.ac +14 -4
index db19d4a..9fb24ad 100644
@@ -195,16 +195,26 @@ AC_ARG_ENABLE(
 
 AC_ARG_ENABLE(
 	[plugin-auth-pam],
-	[AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes@:>@])],
+	[AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes for Linux@:>@])],
 	,
-	[enable_plugin_auth_pam="yes"]
+	[
+		case "$host" in
+			*-*-linux*) enable_plugin_auth_pam="yes";;
+			*) enable_plugin_auth_pam="no";;
+		esac
+	]
 )
 
 AC_ARG_ENABLE(
 	[plugin-down-root],
-	[AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes@:>@])],
+	[AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes for POSIX@:>@])],
 	,
-	[enable_plugin_down_root="yes"]
+	[
+		case "$host" in
+			*-mingw*) enable_plugin_down_root="no";;
+			*) enable_plugin_down_root="yes";;
+		esac
+	]
 )
 
 AC_ARG_ENABLE(
Signature · 1 line
1.7.3.4
#4 lore raw

Re: [Openvpn-devel] [PATCH] build: plugins: set defaults using a complex logic

Hi,

Quoted 1 line · Alon Bar-Lev

pam cannot be compiled on *BSD and Windows.

*Open*BSD. Not *BSD.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#5 lore raw

PATCH 1/1 build: plugins: set defaults using a complex logic

pam cannot be compiled on OpenBSD and Windows.
down-root cannot be compiled on Windows.

---
 configure.ac |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)
configure.ac +15 -4
index db19d4a..b1140f8 100644
@@ -195,16 +195,27 @@ AC_ARG_ENABLE(
 
 AC_ARG_ENABLE(
 	[plugin-auth-pam],
-	[AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes@:>@])],
+	[AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes for Linux@:>@])],
 	,
-	[enable_plugin_auth_pam="yes"]
+	[
+		case "$host" in
+			*-*-openbsd*) enable_plugin_auth_pam="no";;
+			*-mingw*) enable_plugin_auth_pam="no";;
+			*) enable_plugin_auth_pam="yes";;
+		esac
+	]
 )
 
 AC_ARG_ENABLE(
 	[plugin-down-root],
-	[AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes@:>@])],
+	[AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes for POSIX@:>@])],
 	,
-	[enable_plugin_down_root="yes"]
+	[
+		case "$host" in
+			*-mingw*) enable_plugin_down_root="no";;
+			*) enable_plugin_down_root="yes";;
+		esac
+	]
 )
 
 AC_ARG_ENABLE(
Signature · 1 line
1.7.3.4
#6 lore raw

Re: [Openvpn-devel] [PATCH] build: plugins: set defaults using a complex logic

If anyone here is opened minded - still.
This shows that default should be "no" for all plugins. Distro maintainer should decide what to switch on. Anyway, this is my recommendation.

Quoted 47 lines · Alon Bar-Lev

pam cannot be compiled on OpenBSD and Windows.
down-root cannot be compiled on Windows.

---
 configure.ac |   21 ++++++++++++++++-----

 1 files changed, 16 insertions(+), 5 deletions(-)
configure.ac +0 -0
index db19d4a..b1140f8 100644
@@ -195,16 +195,27 @@ AC_ARG_ENABLE(
 

 AC_ARG_ENABLE(
       [plugin-auth-pam],
-       [AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes@:>@])],
+       [AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes for Linux@:>@])], ,
-       [enable_plugin_auth_pam="yes"]
+       [
+               case "$host" in
+                       *-*-openbsd*) enable_plugin_auth_pam="no";;
+                       *-mingw*) enable_plugin_auth_pam="no";;
+                       *) enable_plugin_auth_pam="yes";;
+               esac
+       ]
 )

 AC_ARG_ENABLE(
       [plugin-down-root],
-       [AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes@:>@])],
+       [AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes for POSIX@:>@])], ,
-       [enable_plugin_down_root="yes"]
+       [
+               case "$host" in
+                       *-mingw*) enable_plugin_down_root="no";;
+                       *) enable_plugin_down_root="yes";;
+               esac
+       ]
 )

 AC_ARG_ENABLE(
--
1.7.3.4

#7 lore raw

PATCH 1/1 build: plugins: set defaults using a complex logic

pam cannot be compiled on OpenBSD and Windows.
down-root cannot be compiled on Windows.

---
 configure.ac |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)
configure.ac +15 -4
index db19d4a..d3d974d 100644
@@ -195,16 +195,27 @@ AC_ARG_ENABLE(
 
 AC_ARG_ENABLE(
 	[plugin-auth-pam],
-	[AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes@:>@])],
+	[AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=platform specific@:>@])],
 	,
-	[enable_plugin_auth_pam="yes"]
+	[
+		case "$host" in
+			*-*-openbsd*) enable_plugin_auth_pam="no";;
+			*-mingw*) enable_plugin_auth_pam="no";;
+			*) enable_plugin_auth_pam="yes";;
+		esac
+	]
 )
 
 AC_ARG_ENABLE(
 	[plugin-down-root],
-	[AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes@:>@])],
+	[AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=platform specific@:>@])],
 	,
-	[enable_plugin_down_root="yes"]
+	[
+		case "$host" in
+			*-mingw*) enable_plugin_down_root="no";;
+			*) enable_plugin_down_root="yes";;
+		esac
+	]
 )
 
 AC_ARG_ENABLE(
Signature · 1 line
1.7.3.4
#8 lore raw

Re: [Openvpn-devel] [PATCH] build: plugins: set defaults using a complex logic

This removes the Linux from the help string.

Quoted 47 lines · Alon Bar-Lev

pam cannot be compiled on OpenBSD and Windows.
down-root cannot be compiled on Windows.

---
 configure.ac |   21 ++++++++++++++++-----

 1 files changed, 16 insertions(+), 5 deletions(-)
configure.ac +0 -0
index db19d4a..d3d974d 100644
@@ -195,16 +195,27 @@ AC_ARG_ENABLE(
 

 AC_ARG_ENABLE(
       [plugin-auth-pam],
-       [AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes@:>@])],
+       [AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=platform specific@:>@])], ,
-       [enable_plugin_auth_pam="yes"]
+       [
+               case "$host" in
+                       *-*-openbsd*) enable_plugin_auth_pam="no";;
+                       *-mingw*) enable_plugin_auth_pam="no";;
+                       *) enable_plugin_auth_pam="yes";;
+               esac
+       ]
 )

 AC_ARG_ENABLE(
       [plugin-down-root],
-       [AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes@:>@])],
+       [AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=platform specific@:>@])], ,
-       [enable_plugin_down_root="yes"]
+       [
+               case "$host" in
+                       *-mingw*) enable_plugin_down_root="no";;
+                       *) enable_plugin_down_root="yes";;
+               esac
+       ]
 )

 AC_ARG_ENABLE(
--
1.7.3.4

#9 lore raw

Re: [Openvpn-devel] [PATCH] build: plugins: set defaults using a complex logic

In reply to Alon Bar-Lev

Hi,

configure.ac

Quoted 10 lines · Alon Bar-Lev

pam cannot be compiled on OpenBSD and Windows.
down-root cannot be compiled on Windows.

---
 configure.ac |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)
configure.ac +0 -0
index db19d4a..d3d974d 100644

Thanks, this looks good to me. (Yes, it's complex, but since my much simpler proposal of "if you can't find libpam, don't build the plugin" is unacceptable to you, this is how it will have to be)

ACK for OpenBSD, but Samuli, please test for Windows.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#10 lore raw

Re: [Openvpn-devel] [PATCH] build: plugins: set defaults using a complex logic

In reply to Alon Bar-Lev

Without this patch cross-compiling for Windows on Linux failed because --enable-plugin-pam/-down-root was on by default. With this patch building succeeded.

ACK.

Signature · 5 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock
Quoted 44 lines

pam cannot be compiled on OpenBSD and Windows.
down-root cannot be compiled on Windows.

---
 configure.ac |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)
configure.ac +15 -4
index db19d4a..d3d974d 100644
@@ -195,16 +195,27 @@ AC_ARG_ENABLE(
 
 AC_ARG_ENABLE(
 	[plugin-auth-pam],
-	[AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=yes@:>@])],
+	[AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=platform specific@:>@])],
 	,
-	[enable_plugin_auth_pam="yes"]
+	[
+		case "$host" in
+			*-*-openbsd*) enable_plugin_auth_pam="no";;
+			*-mingw*) enable_plugin_auth_pam="no";;
+			*) enable_plugin_auth_pam="yes";;
+		esac
+	]
 )
 
 AC_ARG_ENABLE(
 	[plugin-down-root],
-	[AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=yes@:>@])],
+	[AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=platform specific@:>@])],
 	,
-	[enable_plugin_down_root="yes"]
+	[
+		case "$host" in
+			*-mingw*) enable_plugin_down_root="no";;
+			*) enable_plugin_down_root="yes";;
+		esac
+	]
 )
 
 AC_ARG_ENABLE(
#11 lore raw

Re: [Openvpn-devel] [PATCH] build: plugins: set defaults using a complex logic

In reply to Alon Bar-Lev
Quoted 8 lines · Alon Bar-Lev

pam cannot be compiled on OpenBSD and Windows.
down-root cannot be compiled on Windows.

---
 configure.ac |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

Applied to master.

commit 5a57e201223f7265af0a56859b00aOn 26/06/12 16:03, Alon Bar-Lev wrote:
594b0d98f5b

Author: Alon Bar-Lev <[email protected]...>
Date:   Tue Jun 26 17:03:26 2012 +0300
    build: plugins: set defaults based on platform
    
    pam cannot be compiled on OpenBSD and Windows.
    down-root cannot be compiled on Windows.
    
    Signed-off-by: Alon Bar-Lev <[email protected]...>
    Acked-by: Gert Doering <[email protected]...>
    Acked-by: Samuli Seppänen <[email protected]...>
    Message-Id: [email protected]...
    URL: http://article.gmane.org/gmane.network.openvpn.devel/6795
    Signed-off-by: David Sommerseth <[email protected]...>

kind regards,

David Sommerseth

#12 lore raw
In reply to Alon Bar-Lev

Hi,

Quoted 4 lines · Alon Bar-Lev

This is exactly the reason why *ALL* plugins should be disabled by default. We are left with only Linux enabled... and distro maintainer can take care of that anyway.
But again... my opinion is not matter, right... sending a new patch.

FreeBSD, NetBSD and OpenSolaris have PAM and build just fine, it's just OpenBSD that does not.

(*My* opinion wasn't taken into account either - I proposed to auto-build if possible, and if libraries are not found, just don't make a fuzz and do not build the corresponding plugin, instead of erroring out - but I'm not feeling strongly about this, so I'll accept what's there, and not enter a lengthy discussion)

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#13 lore raw
Quoted 8 lines · Gert Doering

Hi,

Quoted 4 lines · Alon Bar-Lev

This is exactly the reason why *ALL* plugins should be disabled by default. We are left with only Linux enabled... and distro maintainer can take care of that anyway.
But again... my opinion is not matter, right... sending a new patch.

Quoted 9 lines

FreeBSD, NetBSD and OpenSolaris have PAM and build just fine, it's just OpenBSD that does not.

(*My* opinion wasn't taken into account either - I proposed to auto-build if possible, and if libraries are not found, just don't make a fuzz and do not build the corresponding plugin, instead of erroring out - but I'm not feeling strongly about this, so I'll accept what's there, and not enter a lengthy discussion)

You are more than welcome to maintain the build system and do whatever you like.

Alon.

#14 lore raw

Hi,

Quoted 1 line · Alon Bar-Lev

You are more than welcome to maintain the build system and do whatever you like.

I'm not exactly sure what I did wrong this time - I particularily did *not* want to start a fight.

You offered to rewrite the build system, so please accept feedback if something is not working the way people envision it to work - and please accept if the majority of developers agree about a certain way how configure should behave, even if it's not the way you would have done it.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#15 lore raw
Quoted 5 lines · Gert Doering

Hi,

Quoted 1 line · Alon Bar-Lev

You are more than welcome to maintain the build system and do whatever you like.

Quoted 7 lines

I'm not exactly sure what I did wrong this time - I particularily did *not* want to start a fight.

You offered to rewrite the build system, so please accept feedback if something is not working the way people envision it to work - and please accept if the majority of developers agree about a certain way how configure should behave, even if it's not the way you would have done it.

Yes.
You get this wrong.

Majority != wisdom.
Maintainer = credit.

Alon.

#16 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines · Alon Bar-Lev
Quoted 9 lines · Gert Doering

Hi,

Quoted 2 lines · Alon Bar-Lev

You are more than welcome to maintain the build system and do whatever you like.

I'm not exactly sure what I did wrong this time - I particularily did *not* want to start a fight.

Quoted 7 lines
Quoted 5 lines

You offered to rewrite the build system, so please accept feedback if something is not working the way people envision it to work - and please accept if the majority of developers agree about a certain way how configure should behave, even if it's not the way you would have done it.

Yes. You get this wrong.

"Whoever undertakes to set himself up as a judge of Truth and
Knowledge is shipwrecked by the laughter of the gods." (Albert Einstein)

Quoted 1 line

Majority != wisdom. Maintainer = credit.

"Try not to become a man of success, but rather try to become a man of value." (Albert Einstein)

- ---

Seriously. This kind of argumentation is really not going to be productive. Can we please discuss *why* something is wrong instead of just *blaming* people for being wrong? Then we can all learn something. Throwing crap at each other will just be make things messier. Having a humble attitude will always open up doors, while being arrogant closes them.

I have higher expectations of this community than what such responses contains. Most of us here is not here to receive credits. We are here because we want to make things better - through co-operation! And to co-operate, we need to show each other respect. Then we, as a group, can get wiser and the result will be better.

kind regards,

David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/p59UACgkQDC186MBRfroxhACfd9hJI0MXTbnX/O3+WYlry4UG tXIAnjXS8bREAiks8TNQ7gFyAainRwLs
=2ieZ
-----END PGP SIGNATURE-----