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 run action to bind mount additional directories #527

Open
oSoMoN opened this issue Jan 1, 2025 · 4 comments
Open

Allow run action to bind mount additional directories #527

oSoMoN opened this issue Jan 1, 2025 · 4 comments

Comments

@oSoMoN
Copy link

oSoMoN commented Jan 1, 2025

When run in chroot, the run action will bind mount the script's parent directory to /tmp/script inside the chroot.

In some cases, it might be useful to allow bind mounting additional subdirectories of the recipe.

One use case is a script that optionally installs locally-built packages. This is currently possible but one has to put these packages under (a subdirectory of) the script's parent directory, which might not be ideal if one wants to keep the scripts in one place and local artifacts in a separate place.

@obbardc
Copy link
Member

obbardc commented Jan 1, 2025

$RECIPEDIR and $ARTIFACTDIR should also be mounted for a run action. Can you check if I am remembering correctly?

@oSoMoN
Copy link
Author

oSoMoN commented Jan 1, 2025

That's only when chroot == false, afaict.

@obbardc
Copy link
Member

obbardc commented Jan 1, 2025

That's only when chroot == false, afaict.

Right, thought so. It'd be trivial to add that functionality.

@oSoMoN
Copy link
Author

oSoMoN commented Jan 1, 2025

I could give it a go. Do you suggest bind mounting the entire $RECIPEDIR always, or going with my initial suggestion to add an optional property to the action for callers to selectively list directories to mount?

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

No branches or pull requests

2 participants