Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openvpn3 FTBFS on fedora-39[beta] #204

Open
ojab opened this issue Sep 8, 2023 · 7 comments
Open

openvpn3 FTBFS on fedora-39[beta] #204

ojab opened this issue Sep 8, 2023 · 7 comments
Assignees
Labels
bug distribution-support Support for new distributions or distribution versions

Comments

@ojab
Copy link

ojab commented Sep 8, 2023

My fork of dsommers/openvpn3 copr (here) fails with

make[4]: Entering directory '/builddir/build/BUILD/openvpn3-linux-20/src/python'
 /usr/bin/mkdir -p '/builddir/build/BUILDROOT/openvpn3-20-2.fc39.x86_64/usr/bin'
 /usr/bin/install -p openvpn2 openvpn3-as '/builddir/build/BUILDROOT/openvpn3-20-2.fc39.x86_64/usr/bin'
 /usr/bin/mkdir -p '/builddir/build/BUILDROOT/openvpn3-20-2.fc39.x86_64/usr/sbin'
 /usr/bin/install -p openvpn3-autoload '/builddir/build/BUILDROOT/openvpn3-20-2.fc39.x86_64/usr/sbin'
  GEN      openvpn3/constants.py
touch --reference=../../src/python/openvpn3/gen-python-constants.cpp openvpn3/constants.py
 /usr/bin/mkdir -p '/builddir/build/BUILDROOT/openvpn3-20-2.fc39.x86_64/usr/lib/python3.12/site-packages/openvpn3'
 /usr/bin/install -p -m 644 openvpn3/constants.py '/builddir/build/BUILDROOT/openvpn3-20-2.fc39.x86_64/usr/lib/python3.12/site-packages/openvpn3'
Traceback (most recent call last):
  File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'imp'
make[4]: *** [Makefile:568: install-nodist_pkgopenvpn3PYTHON] Error 1
make[4]: Leaving directory '/builddir/build/BUILD/openvpn3-linux-20/src/python'
make[3]: *** [Makefile:753: install-am] Error 2
make[3]: Leaving directory '/builddir/build/BUILD/openvpn3-linux-20/src/python'
make[2]: *** [Makefile:746: install] Error 2
make[2]: Leaving directory '/builddir/build/BUILD/openvpn3-linux-20/src/python'
make[1]: *** [Makefile:4291: install-recursive] Error 1
make[1]: Leaving directory '/builddir/build/BUILD/openvpn3-linux-20'
make: *** [Makefile:4770: install] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.usLVnq (%install)
    %patchN is deprecated (1 usages found), use %patch N (or %patch -P N)
    Bad exit status from /var/tmp/rpm-tmp.usLVnq (%install)

imp module is deprecated in Python-3.4 in favor of importlib and was removed in Python-3.12, which is used in Fedora-39 (beta is going to be released next week or following week).

@ojab
Copy link
Author

ojab commented Sep 11, 2023

The fix https://gitlab.com/ojab/copr-openvpn3/-/compare/master...master?from_project_id=5398816 (I can't find a button to make a merge request there), test run https://copr.fedorainfracloud.org/coprs/ojab/openvpn3/build/6393948/

@dsommers
Copy link
Member

This is quite surprising, but I see that the autotools' provided py-compile pulls in the imp module.

Perhaps it's time to redo the Python packaging completely. I can plan that for a coming v22_dev which will be targeting non-stable/LTS distros (basically Fedora, Ubuntu 23.04/23.10, etc). The next v21 release will be only be stable/LTS distros (Debian, Ubuntu LTS 22.04, RHEL with clones). This split is due to issues related glib2-2.76 (tracked in issue #171) and newer.

For some time I have pondered on moving the ./src/python code into a separate git repository, using the standard python tool chain for building, packaging and distribution. The .deb and .rpm packaging can pull in both releases when doing the build, so we can still have the distribution somewhat like it is today.

If anyone is willing to look into this, reach out to me (you'll find my e-mail address in the git log) and we find a way going forward.

@dsommers
Copy link
Member

dsommers commented Sep 12, 2023

The fix https://gitlab.com/ojab/copr-openvpn3/-/compare/master...master?from_project_id=5398816 (I can't find a button to make a merge request there), test run https://copr.fedorainfracloud.org/coprs/ojab/openvpn3/build/6393948/

@ojab Thanks for that patch! I'll pull that in for the copr repos, but that will be tied to the v22_dev release if we don't don't split out the python code into a separate project.

@ojab
Copy link
Author

ojab commented Sep 12, 2023

@dsommers

This split is due to issues related glib2-2.76 (tracked in issue #171) and newer.

TBH I don't get what's the issue, package from my copr fork works here (Fedora-39, glib2-2.77.3-2.fc39.x86_64, openvpn3 session-start --config xx.ovpn connects fine w/ CloudConnexa and I can use the VPN), worked on Fedora-38 before the update as well.

Thanks for that patch! I'll pull that in for the copr repos, but that will be tied to the v22_dev release if we don't don't split out the python code into a separate project.

Does it mean that there wouldn't be v20/v21 packages for Fedora-39? As I wrote, it works fine here, so I could proceed using my copr fork, but would prefer to have more upstream solution (i. e. your copr) for sure.

@dsommers
Copy link
Member

TBH I don't get what's the issue, package from my copr fork works here

Some VPN profiles works, but many configuration profiles makes openvpn3-service-client and openvpn3-service-sessionmgr segfault. It is a higher chance that it works well if the profile does not request any user credentials by the user. If web-based authentication is used, it might work somewhat better too - but not always.

Does it mean that there wouldn't be v20/v21 packages for Fedora-39?

v22_dev is the first planned update for Fedora. The refactored glib2 integration was long over due, and that it might work with the current implementation is no guarantee it will be stable any more. The glib2 libraries has also been through some larger changes since 2.76, which is what triggered the misbehaviour in OpenVPN 3 Linux.

As the refactoring for OpenVPN 3 Linux moved forward, several implementation errors and ugly hacks has been discovered and cleaned up - which also fixes some stray memory pointers and hard to catch memory leaks (some of it may be glib2 internals which valgrind might not quite grasp, but not all of it). It also improves the data passing between the C++ to C to C++ layers using safer mechanisms, and most of the valgrind complaints have improved as well. Performance wise, several locking situations are avoided too.

I understand this waiting is painful. But as I started digging into these issues, it was either to spend lots of time adding more hacks and workarounds where the outcome was not that predictable - or to clean it up more properly. Even though lots of time is spent adding a better C++ API for D-Bus integration, I'm also trying to restrict it to what is really needed to do now to not delay the wait for too long.

@VGerris
Copy link

VGerris commented Dec 3, 2023

just want to confirm the packages from @ojab work for me on Fedora 39. Thank you. Looking forward to the improved version in the dsommers repo, but great to have working openvpn3!

@dsommers dsommers self-assigned this Feb 1, 2024
@dsommers dsommers added bug distribution-support Support for new distributions or distribution versions labels Feb 1, 2024
@dsommers
Copy link
Member

dsommers commented Feb 1, 2024

Realised this one has gone a bit under the radar, and there has been made some progress. But still quite a bit from ready to close it. Most of the related discussions happens in #171.

To summarize:

  • The OpenVPN 3 Linux v22_dev will switch to using Meson as build system instead of autotools
  • The Python code in OpenVPN 3 Linux (essentially the src/python/ directory) will probably be switching to use Python packaging tools (setup/dist tools - I always forget which one is the right one).
  • It is still an open question if the Python code should be moved to a separate sub-project.
  • There are now development builds available for Fedora with code which will end up in the v22_dev release: https://copr.fedorainfracloud.org/coprs/dsommers/openvpn3-devsnapshots/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug distribution-support Support for new distributions or distribution versions
Projects
None yet
Development

No branches or pull requests

3 participants