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

Copy extra files to chroot environment #34

Open
dangoncalves opened this issue Jun 24, 2021 · 6 comments
Open

Copy extra files to chroot environment #34

dangoncalves opened this issue Jun 24, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@dangoncalves
Copy link

Is your feature request related to a problem? Please describe.
To build my live iso, I need to copy some files to the chroot environment. Currently we can't do that with the script.

Describe the solution you'd like
It could be useful if all files inside a specific directory where copied to the chroot environment.

Describe alternatives you've considered
Maintaining a list with the files to copy can be considered but will be less useful.

Additional context
I'm willing to work on this contribution.

@kgilmer
Copy link
Collaborator

kgilmer commented Jun 25, 2021

Do you need to copy files only to the root of the chroot environment?

@dangoncalves
Copy link
Author

I need to copy them anywhere in the chroot environment and then I can process them inside the customize_image function. In my case, it's a deb package that I need to install to the image.

@mvallim mvallim added the enhancement New feature or request label Jun 25, 2021
@mvallim mvallim pinned this issue Jun 25, 2021
@mvallim
Copy link
Owner

mvallim commented Jun 28, 2021

Is your feature request related to a problem? Please describe.
To build my live iso, I need to copy some files to the chroot environment. Currently we can't do that with the script.

Describe the solution you'd like
It could be useful if all files inside a specific directory where copied to the chroot environment.

Describe alternatives you've considered
Maintaining a list with the files to copy can be considered but will be less useful.

Additional context
I'm willing to work on this contribution.

Hi @dangoncalves,

Please go ahead, with your contribution.

Thanks for all,

@kgilmer
Copy link
Collaborator

kgilmer commented Jun 29, 2021

Hi @dangoncalves , in case it hasn't already occurred to you, another approach would be to host the debian packages in a PPA or debian repository rather than manually installing them on the target image. In this way, you'll be able to provide updates to those packages in the future. The steps are to add the repo to the live host apt configuration and then use apt to install the packages. Here is an example: https://github.com/regolith-linux/regolith-ubuntu-iso-builder/blob/master/scripts/config-focal_standard.sh#L66

@asharrem
Copy link

asharrem commented Jul 1, 2021

Hi @kgilmer & @dangoncalves , I often copy files to the chroot during & after the build script process.
Method 1: build.sh -
After the [run_chroot] process, the script will usually pause waiting for sudo password before running [build_iso]. At this point you can copy files to the chroot. Note copying requires sudo privileges.
Method 2: build-sh build_iso
After first run of build.sh -, copy files to existing chroot (sudo required), then run build.sh build_iso.
Or build.sh run_chroot after copying files will allow you to use your config.sh to install your copied files, followed by build-sh build_iso to regenerate the iso.

In the case of installing an offline .deb I copy the deb as above and use a preseed to install it during install.

ubiquity ubiquity/success_command string \
  in-target dpkg -i /etc/skel/Downloads/nxwitness-client*.deb;

I have a modified [build_iso] function to include generating a preseed.
I hope I have helped & understood what you are trying to achieve.

@dangoncalves
Copy link
Author

Hi,

I opened this PR to reflect what I exepected.

While the workaround provided by @asharrem works, feel free to close the PR if you think it's irrelevant.

@mvallim mvallim removed their assignment Jul 2, 2021
@mvallim mvallim unpinned this issue Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants