install into fake root tree for module making

Technical issues/questions of an intermediate or advanced nature.
rych
Warlord
Warlord
Posts: 716
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

install into fake root tree for module making

Post#1 by rych » 23 Sep 2024, 11:21

How do the package-managers/module-makers actually make xzm modules without contaminating a live filesystem during make install?

Do they temporary change the filesystem root, i.e. something like:

Code: Select all

chroot /tmp/modulename make install
In my case, I'm installing an App that writes into many places in the system like /usr/share, /usr/bin, and so on. I want to collect all those writes under one subtree to make it into a module. Currently, I have to carefully examine what changed in the /mnt/live/memory/changes to find all those amendments of the new installation and copy it under /tmp/modulename, i.g., /tmp/modulename/usr/share, /tmp/modulename/usr/bin. That feels silly, there must be a cleaner way.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4090
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

install into fake root tree for module making

Post#2 by ncmprhnsbl » 23 Sep 2024, 13:09

rych wrote:
23 Sep 2024, 11:21
How do the package-managers/module-makers actually make xzm modules without contaminating a live filesystem during make install?
if it's a slackware package just:

Code: Select all

installpkg --root /tmp/modulename your-package.txz
or ROOT=/tmp/modulename installpkg your-package.txz
in the case of a compiler it's usually DESTDIR=
eg.

Code: Select all

make install DESTDIR=/tmp/modulename
or DESTDIR=/tmp/modulename ninja install
exact syntax might depend on the compiler used.
here: http://www.porteus.org/faq/desktop-faq.html#twenty9 covers this to some extent, dead links notwithstanding. also mentions changes-time to gather files installed to the live system.
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

Post Reply