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

exp/tcz : postinstall scripts are not executed (usr/local/tce.installed/*) #2665

Open
tlaurion opened this issue Apr 27, 2023 · 5 comments
Open
Labels
Bug Stuff that's wrong

Comments

@tlaurion
Copy link

tlaurion commented Apr 27, 2023

Describe the bug
Under tinycore, tce-load -wi python3.9 provides interpreter and configurator under /usr/local/bin/python3.9 and /usr/local/bin/python3.9-config respectively (as expected)

exp/tcz doesn't.

To Reproduce
tcz -v 14.x -d python3.9
(or tcz python to use current 8.x hardcoded download path to tinycore x86_64 8.x release tcz files: no python 2.7 either under /usr/local/bin)

Expected behavior
Have python under /usr/local/bin/python3.9 as under tinycore

Additional context
none

@tlaurion tlaurion added the Bug Stuff that's wrong label Apr 27, 2023
@tlaurion
Copy link
Author

Interestingly enough, everything exp/tcz and tce-load are symlinks to loop mounted squashfs files.
But not python3.9 nor python3.9-config.

Those are binaries copied directly over rootfs in ram.

@tlaurion
Copy link
Author

Found it....


~ # tar zxvf /TinyCorePackages/tcloop/python3.9/usr/local/share/python3.9/files/
files.tar.gz 
usr/
usr/local/
usr/local/bin/
usr/local/bin/python3.9
usr/local/bin/pip3.9
usr/local/bin/pip3
usr/local/bin/easy_install-3.9
usr/local/bin/2to3
usr/local/bin/pydoc3
usr/local/bin/idle3
usr/local/bin/python3-config
usr/local/bin/python3
usr/local/bin/pydoc3.9
usr/local/bin/idle3.9
usr/local/bin/2to3-3.9
usr/local/bin/python3.9-config

How does tce-load knows that it needs to extract compressed tgz over rootfs?

@tlaurion
Copy link
Author

tlaurion commented Apr 27, 2023

Found it.

There is a "final deployment scripts" which instructs of final package installation steps, deployed under /usr/local/tce.installed

Example:

~ # ls /usr/local/tce.installed/
openssl-1.1.1  python3.9
~ # cat /TinyCorePackages/tcloop/python3.9/usr/local/tce.installed/python3.9 
#!/bin/sh
tar xzf /usr/local/share/python3.9/files/files.tar.gz -C /
~ # cat /usr/local/tce.installed/openssl-1.1.1 
#!/bin/sh
[  -d /usr/local/etc/ssl/certs ] || mkdir -p /usr/local/etc/ssl/certs
[  -d /usr/local/etc/ssl/private ] || mkdir -p /usr/local/etc/ssl/private
[  -d /usr/local/etc/ssl/crl ] || mkdir -p /usr/local/etc/ssl/crl
[  -d /usr/local/etc/ssl/newcerts ] || mkdir -p /usr/local/etc/ssl/newcerts
[  -f /usr/local/etc/ssl/index.txt ] || touch /usr/local/etc/ssl/index.txt
[  -f /usr/local/etc/ssl/serial ] || echo "01" > /usr/local/etc/ssl/serial
[  -f /usr/local/etc/ssl/crlnumber ] || echo "01" > /usr/local/etc/ssl/crlnumber

Now, question is how to process them properly in go under exp/tcz after package install?

@tlaurion
Copy link
Author

Someone looking into this might want to change 8.x to 14.x into exp/tcz doing so.

@tlaurion tlaurion changed the title exp/tcz : installing python doesn't provide interpreter under /usr/local/bin exp/tcz : postinstall scripts are not executed (usr/local/tce.installed/*) Apr 27, 2023
tlaurion added a commit to tlaurion/heads that referenced this issue Apr 27, 2023
Whole goal from Heads desires into tinycore would be:
- cryptsetup-reencrypt (not avail)
- thin-provisioning-tools (nice to have, but might dodge it by choosing brtfs or xfs. wyng has now support for it)
- lvm2 tools (requires proper dm mods that are kernel versioned, and not dealt with under u-root either as of now)
- gpg2 toolstack (present)
- tinycore providing system libraries into a seperate tcz (otherwise check what is packed currently under u-root.cpio under modules/u-root: this is now 2.5mb compressed by xz. That won't fly)
- u-root cannot be easily compiled by tinygo as of now: not avail under debian-11 nor debian-12....

I talked a bit on tinycore channel, tried to register to forum, now got a link to hack the registration form at:https://forum.tinycorelinux.net/index.php/topic,25947.msg168262.html#msg168262

All of this is not a really good sign for a healthy inclusion if goal is not to deduplicate work and contribute to tinycore for package updates...
Vibe for the moment is: meh.

Alternatives?
- check for nix package caches, see how complicated it would be to wrap around this...
- which goes back again into why not building Heads into NixOS, just like ownerboot is doing, but using caches of already verified reproducible binares...
@tlaurion
Copy link
Author

tlaurion commented May 3, 2023

This was crosslinked from tinycore forum to here. Let's see if synergies can happen.
http://forum.tinycorelinux.net/index.php?topic=26241.msg168791#msg168791

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Stuff that's wrong
Projects
None yet
Development

No branches or pull requests

1 participant