Skip to contentSkip to conversation

fix 2.2.0 build failure when management interface disabled

PATCH In review Matthew L. Creech 4 participants 9 messages May 11, 2011 – May 19, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix 2.2.0 build failure when management interface disabled

Hi,

I just upgraded to 2.2.0, and my build fails with:

ps.c: In function 'port_share_open':
ps.c:778:7: error: 'management' undeclared (first use in this function) ps.c:778:7: note: each undeclared identifier is reported only once for each function it appears in
make[5]: *** [ps.o] Error 1

The attached patch fixed the problem.

Signature · 1 line
Matthew L. Creech
ps.c +2 -0
diff -purN orig/ps.c openvpn-2.2.0/ps.c
@@ -774,8 +774,10 @@ port_share_open (const char *host, const
       /* Let msg know that we forked */
       msg_forked ();
 
+#ifdef MANAGEMENT_ENABLED
       /* Don't interact with management interface */
       management = NULL;
+#endif
 
       /* close all parent fds except our socket back to parent */
       close_fds_except (fd[1]);
#1 lore raw

Hi,

Quoted 7 lines · Matthew L. Creech

I just upgraded to 2.2.0, and my build fails with:

ps.c: In function 'port_share_open':
ps.c:778:7: error: 'management' undeclared (first use in this function) ps.c:778:7: note: each undeclared identifier is reported only once for each function it appears in
make[5]: *** [ps.o] Error 1

Thanks for reporting it. As far as I can see, this problem came in via c7dd80cf45efa (aka 2.1.3s), and that is obviously only needed if management is enabled.

So: ACK from me.

Samuli: we need buildbot variants with/without management, it seems...

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

Am 14.05.2011 14:03, schrieb Gert Doering:

Quoted 11 lines

Hi,

Quoted 7 lines · Matthew L. Creech

I just upgraded to 2.2.0, and my build fails with:

ps.c: In function 'port_share_open':
ps.c:778:7: error: 'management' undeclared (first use in this function) ps.c:778:7: note: each undeclared identifier is reported only once for each function it appears in
make[5]: *** [ps.o] Error 1

Quoted 7 lines

Thanks for reporting it. As far as I can see, this problem came in via c7dd80cf45efa (aka 2.1.3s), and that is obviously only needed if management is enabled.

So: ACK from me.

Samuli: we need buildbot variants with/without management, it seems...

Cutting down complexity (i. e. cutting out branches in the decision and/or option trees) is going to help more than just trying to cure the symptoms.

Signature · 1 line
Matthias Andree
#3 lore raw

Hi,

Quoted 3 lines · Matthias Andree

Cutting down complexity (i. e. cutting out branches in the decision and/or option trees) is going to help more than just trying to cure the symptoms.

Preaching to the choir... I'm all for getting rid of #ifdef variants where possible.

I'm not exactly sure why one would want openvpn without management interface, except for "embedded systems, as small as possible" - and we have "--enable-small" for those already. So maybe one could merge "--disable-management" and "--enable-small"... one less variant.

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]...
#4 lore raw
Quoted 6 lines · Gert Doering

I'm not exactly sure why one would want openvpn without management interface, except for "embedded systems, as small as possible" - and we have "--enable-small" for those already.  So maybe one could merge "--disable-management" and "--enable-small"...  one less variant.

Indeed that's the case here - I'm using OpenVPN on an embedded PPC device to phone back home to a data collection server, so I've got something like:

--disable-plugins --disable-management --disable-debug --enable-small --disable-selinux

Signature · 1 line
Matthew L. Creech
#5 lore raw
In reply to Matthew L. Creech

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

Quoted 11 lines · Matthew L. Creech

Hi,

I just upgraded to 2.2.0, and my build fails with:

ps.c: In function 'port_share_open':
ps.c:778:7: error: 'management' undeclared (first use in this function) ps.c:778:7: note: each undeclared identifier is reported only once for each function it appears in
make[5]: *** [ps.o] Error 1

The attached patch fixed the problem.

Hi,

Thanks a lot for your patch. Your patch is applied to master and cherry-picked for the next 2.2 release.

commit 76ef46144f7e3ecc760dcb9f25a7ecb769d39c59 (master) commit e7fa867d2685e6c455ce49042d4c0cbffdd68ff9 (release/2.2)

Author: Matthew L. Creech <[email protected]...>
Date:   Wed May 11 17:57:28 2011 -0400
    Mailing-list: http://thread.gmane.org/gmane.network.openvpn.devel/4639
    Signed-off-by: Matthew L. Creech <[email protected]...>
    Acked-by: Gert Doering <[email protected]...>
    Signed-off-by: David Sommerseth <[email protected]...>

Next time, please commit your patch to your local tree and mail a patch file generated by 'git format-patch' (or use 'git send-email' directly). That saves the time processing submitted patches. For more info, see our "Git Crash Course" [1].

kind regards,

David Sommerseth

[1] <https://community.openvpn.net/openvpn/wiki/GitCrashCourse>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk3VQlAACgkQDC186MBRfroUTACglKbhoSMlRzlTwg4MY0XiiQx/ RnoAoI6q5pHya/HHqOtlPjRKljQhNaoR
=OFBB
-----END PGP SIGNATURE-----

#6 lore raw

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

Quoted 15 lines · David Sommerseth
Quoted 11 lines · Matthew L. Creech

Hi,

I just upgraded to 2.2.0, and my build fails with:

ps.c: In function 'port_share_open':
ps.c:778:7: error: 'management' undeclared (first use in this function) ps.c:778:7: note: each undeclared identifier is reported only once for each function it appears in
make[5]: *** [ps.o] Error 1

The attached patch fixed the problem.

Hi,

Quoted 7 lines

Thanks a lot for your patch. Your patch is applied to master and cherry-picked for the next 2.2 release.

commit 76ef46144f7e3ecc760dcb9f25a7ecb769d39c59 (master) commit e7fa867d2685e6c455ce49042d4c0cbffdd68ff9 (release/2.2)

Author: Matthew L. Creech <[email protected]...>
Date:   Wed May 11 17:57:28 2011 -0400

Sorry! I need to revert this patch. You use MANAGEMENT_ENABLED, but it should be ENABLE_MANAGEMENT. I just noticed it now. I'm sorry for the noise, I'll fix this and apply it again.

kind regards,

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

iEYEARECAAYFAk3VQy4ACgkQDC186MBRfrocnQCfajQRGiazSBJWdaLEzsA2vyDU besAni8qtMGT/1vKcABt8qQAYs2asf/G
=McOO
-----END PGP SIGNATURE-----

#7 lore raw
Quoted 5 lines · David Sommerseth

Sorry!  I need to revert this patch.  You use MANAGEMENT_ENABLED, but it should be ENABLE_MANAGEMENT.  I just noticed it now.  I'm sorry for the noise, I'll fix this and apply it again.

Oops, sorry about that! Didn't notice it was wrong, since neither one is defined for my build. :)

Thanks David

Signature · 1 line
Matthew L. Creech
#8 lore raw
In reply to David Sommerseth

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

Quoted 19 lines · David Sommerseth
Quoted 17 lines · David Sommerseth
Quoted 11 lines · Matthew L. Creech

Hi,

I just upgraded to 2.2.0, and my build fails with:

ps.c: In function 'port_share_open':
ps.c:778:7: error: 'management' undeclared (first use in this function) ps.c:778:7: note: each undeclared identifier is reported only once for each function it appears in
make[5]: *** [ps.o] Error 1

The attached patch fixed the problem.

Hi,

Thanks a lot for your patch. Your patch is applied to master and cherry-picked for the next 2.2 release.

Quoted 9 lines
Quoted 4 lines

commit 76ef46144f7e3ecc760dcb9f25a7ecb769d39c59 (master) commit e7fa867d2685e6c455ce49042d4c0cbffdd68ff9 (release/2.2)

Author: Matthew L. Creech <[email protected]...>
Date:   Wed May 11 17:57:28 2011 -0400

Sorry! I need to revert this patch. You use MANAGEMENT_ENABLED, but it should be ENABLE_MANAGEMENT. I just noticed it now. I'm sorry for the noise, I'll fix this and apply it again.

Okay, everything is fixed again. Since the time between the push and announcement and when I noticed this mistake, I did rolled back the tree and have pushed out new correct commits.

Correct commit ids are:

commit ca0ed8458a355aea46d26c209984caaf533784ec (master) commit e1f2f5f61e5be20be9abd9c747fa83e8189d34c8 (release/2.2)

kind regards,

David Sommerseth

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

iEYEARECAAYFAk3VSTAACgkQDC186MBRfrpvjACgjes/w2IUcb33c/TpXoOAnj0F x9sAn15CA61YjzHy5o7cLjKitxNi/O54
=2kbf
-----END PGP SIGNATURE-----