Ticket #834 (committed new feature)
Building of rootfs doesn't work with file:// repositories
| Reported by: | jekhor | Owned by: | EvanKroske |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.3 |
| Component: | buildsystem | Version: | post-0.2 snapshot |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: |
Description
We need to mount file:// repositories into chroot, probably.
Attachments
Change History
Changed 23 months ago by EvanKroske
-
attachment
enter.patch
added
Simple patch for accessing exterior local repos from chroot dev environment.
comment:4 Changed 23 months ago by EvanKroske
I wrote a simple patch to access local repositories in the main environment from the chroot development environment. It cleans up after itself if the chroot dev environment is exited properly, but it leaves mounted directories if the shell window is closed. I'm working on a more robust version now. Are there any obvious bugs in my patch?
comment:5 Changed 23 months ago by dottedmag
Nice one, clean and simple.
- I'd change removing empty directories to rmdir "$dir" 2>/dev/null || : to avoid relying on ls.
- To make sure everything is cleaned up use trap and handle SIGHUP, SIGTERM etc.
- Add some kind of locking, so subsequent calls won't mount the repositories twice. It is ok to have a racy locking (just test && touch) in this case, as enter is expected to be used interactively.
A bit of nitpicking:
- Please don't quote paths without spaces inside, like "/etc/mtab"
- if foo; then style is a bit more compact
- Variables should be c_sty_le, not camel cased.
Changed 23 months ago by EvanKroske
-
attachment
enter.2.patch
added
Final patch for the enter script. Cleans up mounted local repos if script is interrupted.
comment:6 Changed 23 months ago by EvanKroske
The new patch cleans up the local repositories if the script is exited or user-interrupted (Ctrl + C), but it can't cope if the terminal window is closed or killed. I don't think the KILL signal can be caught by a bash script. This patch also complies with the style guidelines mentioned above.
Changed 23 months ago by EvanKroske
-
attachment
cross-shell.patch
added
cross-shell now mounts local repositories mentioned in the sources.list file of the target fs (the e-reader).
Changed 23 months ago by EvanKroske
-
attachment
shared-mounts.patch
added
Added functions for mounting and unmounting repositories.


Build environment is able to use http://, ftp:// and other networked repositories to fetch the following packages:
Using file:// repositories does not work though, as those repositories are not propagated from outside to chroot and further to inner chroot. This could be fixed by proper mount --binding in enter script and cross-shell.