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

OpenSSL 3 for armv5 #6025

Merged
merged 6 commits into from
Mar 9, 2024
Merged

OpenSSL 3 for armv5 #6025

merged 6 commits into from
Mar 9, 2024

Conversation

hgy59
Copy link
Contributor

@hgy59 hgy59 commented Mar 2, 2024

Description

  • fix openssl3 for ARMv5_ARCHS and OLD_PPC_ARCHS
  • python311: bring back builds for ARMv5_ARCHS (OLD_PPC_ARCHS for python310 only)

python311 and stunnel packages require OpenSSL 3 built with threading (OPENSSL_THREADS).
This can be resolved without the need of libatomic (that is missing for ARMv5_ARCHS and OLD_PPC_ARCHS).
This is achieved by patching openssl configurations to ommit the use of libatomic dependency.

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

@hgy59
Copy link
Contributor Author

hgy59 commented Mar 2, 2024

@th0ma7 while working on an update of stunnel package with update to openssl3, I tried to evaluate the functions imported from libatomic (to probably find a solution by adding the missing functions).

But fortunately the build of cross/openssl3 managed to enable OpenSSL threading despite the lack of libatomic. Then stunnel and python311 could be built for ARMv5 and OLD_PPC.

So I enabled python311 (and cryptography) for those archs.

Probably the build of some cross wheels will fail, but at least we have python311 back.

Is there any user watching with an ARMv5 Model (i.e. DS213air, DS213, DS413j, DS112, DS112+, DS212, DS212+, RS212, RS812, DS212j, DS112j, DS111, DS211, DS211+, DS411slim, DS411, RS411, DS211j, DS411j)?
Any feedback is welcome.

@th0ma7
Copy link
Contributor

th0ma7 commented Mar 4, 2024

Overall looking good. What I'm afraid of is the maintainability but I'm ok at giving this a shot. I do have an armv5 so i can give it a try later this week.

@th0ma7
Copy link
Contributor

th0ma7 commented Mar 4, 2024

Quick testing this morning, installs fine:

admin@DS212j-armv5:/usr/local/bin$ ./python3.11 --version
Python 3.11.5
admin@DS212j-armv5:/usr/local/bin$ ./python3.11 -c "import ssl; print(ssl.OPENSSL_VERSION)"
OpenSSL 3.1.5 30 Jan 2024
admin@DS212j-armv5:/usr/local/bin$ ./python3.11 -c "import sysconfig; print(sysconfig.get_config_var('CONFIG_ARGS'))"
'--host=arm-marvell-linux-gnueabi' '--build=i686-pc-linux' '--prefix=/var/packages/python311/target' '--enable-shared' '--without-static-libpython' '--enable-ipv6' '--without-ensurepip' '--enable-loadable-sqlite-extensions' '--with-computed-gotos=yes' '--with-build-python' '--enable-optimizations' '--with-lto' 'ac_cv_buggy_getaddrinfo=no' 'ac_cv_file__dev_ptmx=no' 'ac_cv_file__dev_ptc=no' 'ac_cv_have_long_long_format=yes' '--with-ssl-default-suites=openssl' '--with-dbmliborder=gdbm:ndbm:bdb' '--with-system-expat' '--with-system-ffi' 'build_alias=i686-pc-linux' 'host_alias=arm-marvell-linux-gnueabi' 'PKG_CONFIG_LIBDIR=/github/workspace/spk/python311/work-88f6281-6.2.4/install//var/packages/python311/target/lib/pkgconfig' 'CC=/github/workspace/toolchain/syno-88f6281-6.2.4/work/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-gcc' 'CFLAGS=-I/github/workspace/toolchain/syno-88f6281-6.2.4/work/arm-marvell-linux-gnueabi/arm-marvell-linux-gnueabi/libc/usr/include -I/github/workspace/spk/python311/work-88f6281-6.2.4/install/var/packages/python311/target/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L /github/workspace/spk/python311/work-88f6281-6.2.4/install/var/packages/python311/target/lib -I /github/workspace/spk/python311/work-88f6281-6.2.4/install/var/packages/python311/target/include' 'LDFLAGS=-L/github/workspace/toolchain/syno-88f6281-6.2.4/work/arm-marvell-linux-gnueabi/arm-marvell-linux-gnueabi/libc/lib -L/github/workspace/spk/python311/work-88f6281-6.2.4/install/var/packages/python311/target/lib -Wl,--rpath-link,/github/workspace/spk/python311/work-88f6281-6.2.4/install/var/packages/python311/target/lib -Wl,--rpath,/var/packages/python311/target/lib ' 'CPPFLAGS=-I/github/workspace/toolchain/syno-88f6281-6.2.4/work/arm-marvell-linux-gnueabi/arm-marvell-linux-gnueabi/libc/usr/include -I/github/workspace/spk/python311/work-88f6281-6.2.4/install/var/packages/python311/target/include ' 'CPP=/github/workspace/toolchain/syno-88f6281-6.2.4/work/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-cpp'

@hgy59
Copy link
Contributor Author

hgy59 commented Mar 4, 2024

@th0ma7 I will have to drop python311 for OLD_PPC_ARCHS (missing c++11 compatible compiler), but will bring back python310 for it (just struggled with #6028)

Another issue of OLD_PPC_ARCHS is lacking rust support. This target will be limitted to cryptography 3.3.2.

Can you remember why the installation of maturin into crossenv is skipped for ARMv5 archs?
Since we have Rust for ARMv5, I'm wondering if Maturin doesn't work for it (cross/python31[01]/Makefile).

- enable openssl3 for toolchains lacking libatomic
- fixes build of openssl 3.x with threads enabled but without libatomic
- enable build of python311 for ARMv5 and OLD_PPC
- enable build of cross/cryptography for ARMv5
- bring back python311 customization for OLD_PPC_ARCHS
- adjust patches for python311 and older toolchains
- disable python311 for OLD_PPC_ARCHS
- avoid wget progress logging for pip download
@th0ma7
Copy link
Contributor

th0ma7 commented Mar 5, 2024

Is there a python spk that can be triggered as well for armv5? Beat, mercurial or backup options? I could then test it on my old nas.

@hgy59
Copy link
Contributor Author

hgy59 commented Mar 5, 2024

Is there a python spk that can be triggered as well for armv5? Beat, mercurial or backup options? I could then test it on my old nas.

The following packages are already triggered to build:

  • borgbackup
  • deluge
  • homeassistant
  • flexget
  • tvheadend

I guess homeassistant will not run on AMRv5 (and would need more than 1h to install). For the others I don't know.

If you need another package, I could build it locally. The github action already runs a long time to complete the build.

EDIT:
oops, didn't look for supported packages: in the list above only thvheadend is built for ARMv5.

- beets
- borgbackup
- mercurial
- octoprint
- rdiff-backup
@hgy59
Copy link
Contributor Author

hgy59 commented Mar 6, 2024

@th0ma7 latest build has now the following packages included:

  • beets
  • borgbackup
  • mercurial
  • octoprint
  • rdiff-backup

@th0ma7
Copy link
Contributor

th0ma7 commented Mar 8, 2024

@hgy59 so i did not forgot you... it's just sooo painful installing packages on armv5 ... it takes hours and i forget to check where I left it last night type thing.

Just saying, the biggest of all octoprint installed ok which is a heck of a good starting point. I believe it's good to merge and publish. I'll try to install other assuming i don't fall asleep while waiting.

@hgy59 hgy59 merged commit 8a45a25 into SynoCommunity:master Mar 9, 2024
17 checks passed
@hgy59 hgy59 deleted the openssl3_for_armv5 branch March 9, 2024 10:22
@hgy59 hgy59 mentioned this pull request Mar 9, 2024
10 tasks
@th0ma7 th0ma7 mentioned this pull request Mar 10, 2024
48 tasks
hgy59 added a commit to hgy59/spksrc that referenced this pull request May 14, 2024
- update octroprint
- ARMv5 packages are availble again, since SynoCommunity#6025
@hgy59 hgy59 mentioned this pull request May 14, 2024
6 tasks
hgy59 added a commit that referenced this pull request May 15, 2024
- update octroprint
- ARMv5 packages are availble again, since #6025
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.

2 participants