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

Fix: Python2 Paths for Legacy Kernel v5.10 with Edge Release #4818

Merged
merged 2 commits into from Feb 12, 2023

Conversation

Torndeco
Copy link
Contributor

@Torndeco Torndeco commented Feb 6, 2023

I encountered some python path issues when using legacy kernel with edge release.
Rock5b Legacy Kernel v5.10 & Ubuntu Lunar.

Debian Bullseye (not tested) & Ubuntu Lunar
Don't have a /usr/bin/python symlink that points to python2, due to deprecation of Python 2 (https://wiki.debian.org/Python)
This breaks some old python scripts etc in linux-headers deb

There is also a python-is-python3 that creates a /usr/bin/python symlink pointing to python3
So better to patch the legacy kernel incase cause issues later on.

The patchfile is based off radxa kernel linux-5.10-gen-rkr3.4

Note: Any legacy kernel build (version 5.10 and previous) will be effected on a edge release.


Sorry if not implemented in correct place or patchfile name, first time using armbian build system & bash scripting etc
Thanks

@rpardini
Copy link
Member

rpardini commented Feb 7, 2023

This is handled differently in armbian-next. We inject a PATH entry containing Armbian-managed python symlink pointing to python2 if available. That way any u-boot / kernel work without requiring patches.
The removal of python2 from sid / bookworm / lunar is a separate problem, though. Some stuff might work with a fake python3 link, some won't (specially u-boot).

@Torndeco can you test armbian-next branch, without this patch?

@Torndeco
Copy link
Contributor Author

Torndeco commented Feb 11, 2023

I haven't had time to look at changes to armbian-next
I assume its a rewrite of the build system and possible configs to make more manageable

Are you talking about managing the python symlink in the build system or target os / image.
If the latter do you have a link to were this implemented? (I don't mind getting another sdcard to use for testing if so)

i.e
I can build packages fine, running the build system on a stable branch.
This pull request is to fix installing legacy linux-headers deb package on a Rock5b running Lunar.
As that is broken due to python paths due to deb postinst running make etc

@rpardini
Copy link
Member

python paths due to deb postinst running make etc

Ahn ok I had missed that. Indeed I'll have to handle this: postinst will also need to inject a PATH/symlink before running make. Its not gonna be practical to patch 30+ kernels for this...

Copy link
Member

@igorpecovnik igorpecovnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request is to fix installing legacy linux-headers deb package on a Rock5b running Lunar.

This is good enough argument for me.

@igorpecovnik igorpecovnik added the Ready to merge Reviewed, tested and ready for merge label Feb 12, 2023
Copy link
Member

@lanefu lanefu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed my /usr/bin/python symlink and worked building rock5 kernel. saw python2 execute

@igorpecovnik igorpecovnik merged commit 66ceaf3 into armbian:master Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge Reviewed, tested and ready for merge
Development

Successfully merging this pull request may close these issues.

None yet

4 participants