Skip to content

Make host directory visible from target #86

Open

Description

@Salamandar

Would it be possible to bind mount a directory on the host to make it visible on the target ?
Right now I have a wrapper around build_dist that copies a bunch of files from my git repo (containing the custom OS definitions) before building the image.
I can't find any trick to do that properly.

Activity

  1. guysoft commented on Dec 1, 2020

    @guysoft
    Owner

    Not really.
    The mount code is here and its mostly hard-coded in aspect of what goes where:
    https://github.com/guysoft/CustomPiOS/blob/devel/src/common.sh#L162

    If you can share what your code is doing exactly it might help me understand what changes could be done.
    The idea is to have all the data in the same context and folder so it easy to encapsulate. But perhaps there are changes possible.

  2. Salamandar commented on Dec 1, 2020

    @Salamandar
    ContributorAuthor

    I understand.
    If there was a before_chroot_script inside which I could do the copy, I could do without a bind mount.
    For now, I have an acceptable solution : I edited the build_dist script :

    #!/usr/bin/env bash
    DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
    
    export DIST_PATH=${DIR}
    export CUSTOM_PI_OS_PATH="$DIR/../CustomPiOS/src"
    export PATH=$PATH:$CUSTOM_PI_OS_PATH
    
    rsync -av --delete \
        "$DIR/../../StrangerFamily" \
        "$DIR/modules/strangerpi/filesystem/home/pi"
    
    "$CUSTOM_PI_OS_PATH/build_custom_os" "$@"
    
  3. guysoft commented on Dec 1, 2020

    @guysoft
    Owner

    That should not be too hard to add.
    It could be added here:
    https://github.com/guysoft/CustomPiOS/blob/devel/src/custompios#L147
    It will have to be though one script for the whole distro and not one per-module. I think it would make more sense that way.

  4. umlaeute commented on Sep 14, 2023

    @umlaeute
    Contributor

    i guess this should have read

    # execute the base chroot script

    (clicking on the ellipsis besides a line of code, the pull down menu has an entry "Copy permalink" which will make the reference usable even when the line-numbers change)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions