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

Fixed: resolved issue with pip not being able to install package due missing ssl #6081

Conversation

HeikoBoettger
Copy link

@HeikoBoettger HeikoBoettger commented Apr 24, 2024

Description

The current package 3.10.13-19 and probably earlier shows an error during installation that it cannot install pip packages due to openssl (libssl) not being included. This change adds libssl as dependency in the build process to support ssl.

Fixes #6078

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Bug fix
  • New Package
  • Package update
  • Includes small framework changes
  • This change requires a documentation update (e.g. Wiki)

…to missing libssl (no module 'ssl' found)

Changed: updated version suffix from 19 to 20
@HeikoBoettger
Copy link
Author

Tested installation on DS413j. The installation log () of the python package no longer lists the following installation errors:

2024/04/22 20:05:16     Could not fetch URL https://pypi.org/simple/urllib3/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/urllib3/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
2024/04/22 20:05:24     WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/setuptools/
2024/04/22 20:05:24     WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/setuptools/
2024/04/22 20:05:25     WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/setuptools/
2024/04/22 20:05:27     WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/setuptools/
2024/04/22 20:05:31     WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/setuptools/

Further more this bug prevented the borg backup package to install the borg binary which is no installed correctly again.

@hgy59
Copy link
Contributor

hgy59 commented Apr 24, 2024

python310 already includes openssl (cross/openssl3) via cross/cryptography.

python310 does not include the _ssl module when depending on cross/openssl3 for ARMv5 archs.
we fixed this for python311 in #6025 but we did not fix it for python310 (we did not create an updated python310 package with the openssl3 fix).

Do you really need python310?
We do not update python310 anymore and highly recommend to use python311.

We already provide a borgbackup package that uses python311, so you don't have to manually install borg backup.
Unfortunately the latest published borgbackup package still has dropped the support for ARMv5, but you can locally build the current borgbackup package for ARMv5 (or wait until an updated package is published).

You must not add cross/openssl to python310. A rebuilt of python310 should fix it (since openssl3 is patched for ARMv5 and OLD_PPC archs since #6025)

@th0ma7
Copy link
Contributor

th0ma7 commented Apr 24, 2024

Thnx for your fix proposal but sadly this isn't entirely the issue. With the recent switch to openssl3 (rather to v1 using openssl which is no longer supported) - it appears that armv5 architecture is no longer being properly supported.

If you further look into the Makefile it has:

DEPENDS  = cross/$(SPK_NAME)

which leads to building the dependency called cross/python310 which in turns has a dependency over to cross/openssl3. Adding cross/openssl in the spk folder's makefile then conflicts with its internal existing dependency, resulting in applying both openssl v1 + v3 over the build.

@hgy59 I'm lagging behind a bit and may have lost track on this. Was updated python packages rebuilt and published for armv5 relatively to openssl3 support (#6025)? Besides not considering my WIP #6040 which I intent to pursue shortly?

EDIT: @hgy59 you got there faster :)

@th0ma7
Copy link
Contributor

th0ma7 commented Apr 24, 2024

@hgy59 armv5 package for python311 isn't available online. This may explain that? https://synocommunity.com/package/python311

@HeikoBoettger
Copy link
Author

Hi,

python 3.10 was a dependency of borg backup. I only needed it run that package. When I remember correctly the after uninstalling this package the installation of borg backup asked me to install the pythen 3.10 package again. But may be I wrong, I will check.

@HeikoBoettger
Copy link
Author

I checked. I confirm there is no python311 for dsm413j/armv5. I will try what you proposed and build both packages.

@hgy59
Copy link
Contributor

hgy59 commented Apr 25, 2024

Hi,

python 3.10 was a dependency of borg backup. I only needed it run that package. When I remember correctly the after uninstalling this package the installation of borg backup asked me to install the pythen 3.10 package again. But may be I wrong, I will check.

@HeikoBoettger ok, you're right, we had some troubles with ARMv5 when updating python310 to opensssl3 and didn't publish python310 for ARMv5.
This will be fixed with #6082.

The next step will be to publish python311 with openssl3 for ARMv5 (#6040) and then borgbackup with dependency of python311 for ARMv5...

@hgy59 hgy59 closed this Apr 25, 2024
@hgy59
Copy link
Contributor

hgy59 commented Apr 25, 2024

done by #6082

@HeikoBoettger
Copy link
Author

@hgy59 @th0ma7 Thank you for the awesome support.

@HeikoBoettger HeikoBoettger deleted the branch/fix/build-python3-with-libssl branch April 25, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

python 3.10 on latest DSM 6.2 doesn't install correctly due to no module _ssl found breaking borg installation
3 participants