geo_c wrote: ↑Sat Sep 23, 2023 11:36 pmwiak wrote: ↑Sat Sep 23, 2023 11:09 pmI create and maintain the main actual build root filesystem scriipt, which is build_firstrib_rootfs.sh (and that does the tricky chroot stuff for the user), and
the FR skeleton initrd, which provides all the overlayfs frugal install functionality, and
in the build_firstrib_rootfs I provide a 'hook' in the form that during its internal chroot it looks for and processes the:f_plug, which is something the user/builder/distro-creator needs to provide.
Thanks, let's see if I have it straight:
At the point that the f_plug is envoked in the build script, the build script has already done the chroot, so references that I make to /root are pointing to the buildrootfs/root, and not the host distro where the build is taking place.
Assuming I have it correct, that raises the question of copying files to the chroot/rootfs, if those files I want to copy into the build chroot/rootfs using a command in the f_plug like
Code: Select all
cp /mnt/sda1/GEO'sFILES/somefile /root/.config/
will /mnt/sda1 be a valid location in the chroot?
You have it correct except /mnt/sda1 won't be 'seen' by the chroot commands since can't access files on host during build when in chroot except for those in firstrib_rootfs.
However, build_firstrib_rootfs.sh script includes workaround: ANY file that you give a filename starting with the two chars f_ gets copied into location firstrib/tmp and since firstrib dir is all accessible by the chroot, such files are all seen as being in /tmp (note, from chroot point of view it becomes /tmp, not firstrib_rootfs/tmp).