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

Allow to copy files to the chroot environment and purge these files after the chroot script was executed. #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dangoncalves
Copy link

No description provided.

scripts/README.md Outdated Show resolved Hide resolved
scripts/README.md Outdated Show resolved Hide resolved
scripts/build.sh Outdated Show resolved Hide resolved
@kgilmer
Copy link
Collaborator

kgilmer commented Jul 8, 2021

It would also be helpful to understand how this PR works by providing a sample. The full end-to-end of how this feature is expected to be used.

 * `default_config.sh` and `config.sh` should not be in `chroot_files`
 anymore
 * files in `chroot_files` should specify where they should be placed
 on the chroot image
 * files in `chroot/tmp` will be cleanup after chroot run
 * Update documentation

Update documentation (again)
@asharrem
Copy link

asharrem commented Oct 2, 2022

My solution was to host the files on github and call them in config.sh after the last package.

function customize_image() {
  # install graphics and desktop
    apt-get install -y \
    plymouth-theme-ubuntu-logo \
...

  case $TARGET_UBUNTU_VERSION in
      "focal" | "bionic")
          apt-get install -y cockpit-dashboard
          ;;
      *)
          echo "Package cockpit-dashboard is not needed. Skipping."
          ;;
  esac

  # wget & install nxos-default-settings
  file_name="nxos-default-settings.deb"
  # Hosted Files location
  WebHostFiles="https://asharrem.github.io"
  wget -q "$WebHostFiles/$file_name"
  if [ -f "$file_name" ]; then
    # ugly hack --force-overwrite is required to replace some default files
    dpkg --force-overwrite -i $file_name
    rm $file_name
  fi
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants