Page 1 of 1
install into fake root tree for module making
Posted: 23 Sep 2024, 11:21
by rych
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.
install into fake root tree for module making
Posted: 23 Sep 2024, 13:09
by ncmprhnsbl
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.
install into fake root tree for module making
Posted: 16 Dec 2024, 02:29
by dreadbird
ncmprhnsbl wrote: ↑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.
excellent.
some need this as well
./configure --prefix=/usr <----- tells the program thats where it is installed
make install DESTDIR=/tmp/modulename <--- really useful