summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix using different terms for chroot nameHEADmasterWilliam Holland2015-05-201-1/+1
| | | | Change-Id: I84a2ad8d7b88e379ec282b0e57d99b76fe097375
* Refuse to delete chroots which are in useSam Thursfield2015-05-191-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that `manage-baserock rm` can delete data from filesystems that are mounted in a chroot directory. This is most likely to happen if the chroot is active (and schroot created the mounts), so let's check that there are no active sessions before deleting. You now get a message like this if you try to remove a chroot with active sessions: I found the following active sessions for chroot '15.19': session:baserock-15.19-4ef616d2-fdbf-4796-bcee-7132b989a2f8 session:baserock-15.19-e0f00498-190a-44be-9d29-cce057cbb259 You might lose data in mounted filesystems if I were to recursively delete path /opt/baserock/chroots/15.19. If you think these sessions are stale, you can run the following command to end ALL schroot sessions: schroot --end-session --all-sessions I found that on my laptop there were a lot of stale sessions, probably from when my computer had crashed while an 'schroot' session was open so the session didn't get automatically ended. Stale sessions now will prevent the user from being able to use `manage-baserock rm` so we need to tell them about them. Change-Id: I90aa19717d8e7007fb6aced9a8e9422967ddc64f
* schroot.conf: Use 'profile' instead deprecated 'script-config'Javier Jardón2015-03-301-3/+3
| | | | Change-Id: I8d3cf06cabf7fc2cae2fd9752bf288294787ce84
* Quote shell variable expanions in previous patch seriesSam Thursfield2014-06-171-4/+4
|
* Merge branch 'sam/niceties'Sam Thursfield2014-06-171-3/+27
|\ | | | | | | Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
| * Give helpful error when URL doesn't existSam Thursfield2014-06-161-0/+4
| | | | | | | | | | | | | | | | | | | | It's slightly confusing that this script doesn't parse file:// URLs, but this is an improvement. Previously the error given was: ln: failed to create symbolic link ‘/opt/baserock/chroots/tmp.P46u6ZxYQC/tarball’ -> ‘’: No such file or directory Sorry, could not link foo into place
| * Fix strange error when /opt/baserock/chroots directory is missingSam Thursfield2014-06-161-0/+2
| | | | | | | | | | | | | | Create the directory if missing to avoid this when doing `manage-baserock add` mktemp: failed to create directory via template ‘/opt/baserock/chroots/tmp.XXXXXXXXXX’: No such file or directory
| * Give helpful error when `manage-baserock add` is not given a URLSam Thursfield2014-06-161-1/+6
| |
| * Raise an error when system name is invalidSam Thursfield2014-06-161-2/+15
| | | | | | | | | | | | This is better than proceeding to add a system with a different name to the one the user specified, without telling them that the name was mangled.
| * Allow '.' in chroot namesSam Thursfield2014-06-121-1/+1
|/ | | | Baserock version numbers contain '.', so it's common to want to use it.
* Merge branch 'sam/btrfs-on-load'Sam Thursfield2014-06-111-0/+8
|\ | | | | | | Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
| * Load btrfs kernel module when entering chrootSam Thursfield2014-06-111-0/+8
|/ | | | | | | | | | | | | Otherwise, weird errors occur when deploying to rawdisk: Error creating disk image2014-06-10 16:00:40 [devel-system-x86_64-generic][my-raw-disk-image][rawdisk.write]Failure to create disk image at /src/tmp/testdev.img ERROR: Command failed: mount -o loop /src/tmp/testdev.img /src/tmp/deployments/tmpQ7wXO1/tmp4lVDcu/tmpvHSzDE mount: mounting /dev/loop0 on /src/tmp/deployments/tmpQ7wXO1/tmp4lVDcu/tmpvHSzDE failed: Device or resource busy
* Enable shared /srcDaniel Silverstone2014-03-314-1/+14
| | | | | | | | | | This adds a shared /src mounted from /opt/baserock/src This allows chroots to share /src and also provides a persistent src space in the face of adding and removing chroots. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk> Reviewed-by: Sam Thursfield <sam.thursfield@codethink.co.uk>
* Merge branch 'baserock/danielsilverstone/forward-ssh-agent'Daniel Silverstone2014-03-263-2/+25
|\ | | | | | | | | Reviewed-By: Richard Maw <richard.maw@codethink.co.uk> Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
| * Update Debian packaging for socat dependency.baserock/danielsilverstone/forward-ssh-agentDaniel Silverstone2014-03-262-1/+8
| |
| * Forward SSH authentication agent and enable ssh in chroot.Daniel Silverstone2014-03-261-1/+17
|/ | | | | | | The SSH authentication agent is supported by a pairing of a socket and an environment variable. This patch ensures that no matter where the agent socket might be, a new socket in /tmp (always shared with the chroot) is made and forwarded into the chroot's environment via 'env'
* Fix a typo or threeDaniel Silverstone2014-03-201-2/+2
|
* Add packaging rule to MakefileDaniel Silverstone2014-03-051-0/+3
|
* Add Debian-style packaging rulesDaniel Silverstone2014-03-057-0/+47
|
* Add a makefileDaniel Silverstone2014-03-051-0/+14
|
* Add GPLv2 headers to top of scriptsDaniel Silverstone2014-03-053-0/+54
|
* Add tool to simplify managing baserock chrootsDaniel Silverstone2014-03-051-0/+118
|
* Add tool to simplify entering baserock chrootsDaniel Silverstone2014-03-051-0/+23
|
* Add chroot sync toolDaniel Silverstone2014-03-051-0/+99
|
* Add a bunch of git ignoresDaniel Silverstone2014-02-281-0/+5
|
* Initial readme and GPLv2Daniel Silverstone2014-02-252-0/+345