View Single Post
Posts: 252 | Thanked: 282 times | Joined on Oct 2021 @ Poland
#1
Hello

I recently had some fun compiling modern CLI things for Nokia N9.
So far I did:

- Python 3.9.18 (CPython) compiled against OpenSSL 1.1.0h. This resulted in Python having all modules except tkinker (although some cmath / float tests failed during optimizing - but only few. Modules itself work.). Even with working ssl (TLS 1.2) and pip.

./configure arguments used:

Code:
--prefix=/opt/python.3.9.18 --enable-shared --enable-optimizations --with-ensurepip=install --with-openssl=/opt/openssl.1.1.0h --with-ssl-default-suites=openssl
- OpenSSL 1.1.0h. TLS 1.2 supported, but there are no any certs yet, so curl / wget rejects downloading, unless --insecure / --no-check-certificate specified.

./config arguments used:

[CODE]shared --prefix=/opt/openssl.1.1.0h --openssldir=/opt/openssl.1.1.0h -Wl,-rpath=/opt/openssl.1.1.0h/lib

- Curl 8.3.0 against OpenSSL 1.1.0h. postinst adds insecure to config so it won't check certs - temporary workaround.

./configure arguments used:

Code:
--prefix=/opt/curl.8.3.0 --with-ssl=/opt/openssl.1.1.0h
- diffutils 3.10 - to provide cmp and diff often used in makefiles / configure.

./configure arguments used:

Code:
--prefix=/opt/diffutils.3.10
- Bash 5.2.15

./configure arguments used:

Code:
--prefix=/opt/bash.5.2.15
- Viu (terminal image viewer)

Compiled using cross (Viu is written in Rust) with
Code:
armv7-unknown-linux-musleabihf
as target.

- OpenSSH 9.3p2 Compiled against OpenSSL 1.1.0h.

-------------------------------------

What I use for compiling? An old 2017 X1 Carbon running Arch Linux and QEMU User Static. I mount Harmattan SDK, bind-mount a directory in my /home to SDK so I have much space.

I use what SDK provided with Thecust repo mirror. GCC 4.4. If I need more libs, I try to compile them too - usually works.

Now the important part - how to package the program properly? For now I do it as following:

- compile with /opt/<package>.<version> prefix
- right after make install I do
Code:
tar cvzf package-ready.tgz /opt/<package>.<version>
. If there are more steps like generating ssh keys in OpenSSH - I search how they are done in Makefile and add to postinst.
- I make symlinks. I.e. everything in /opt/<package>.<version>/lib to /opt/lib, /opt/<package>.<version>/bin to /opt/bin. I made an Optified PATH package which adds them to PATH.
- package into DEB with N9-specific things like digsigsums, md5sums, etc. Using
Code:
dpkg-deb -b -Zgzip --root-owner-group
.

But I believe it's not the right way to do so. Packages should be in one /opt/<dir> directory. But how to package them, then? Checkinstall seems to be very outdated and better not to be used - but in past it was used to exactly the same thing.

Also what is the best way to edit environment variables on N9? /etc/profile doesn't seem to be always sourced by ash.

Anyway, you can grab current results here:

http://wunderwungiel.pl/MeeGo/apt-repo/pool/testing/

In addition, I packaged pfetch and neofetch for MeeGo
My next goal is to build new GCC and BusyBox.

Thanks for all tips!
__________________
My Telegram group (Maemo / MeeGo / Sailfish):
https://t.me/linuxmobile_world
Channel for Maemo/MeeGo:
https://t.me/maemomeegoapps
 

The Following 3 Users Say Thank You to dredlok706 For This Useful Post: