summaryrefslogtreecommitdiff
path: root/fsmgr.hs
AgeCommit message (Collapse)Author
2021-03-13allow / in debs to specify package version in "packages:" section by debian ↵Andrew Cady
release codename
2021-03-13use buster on target if host is stretchAndrew Cady
2021-03-13prefer linux-image version from /vmlinuz symlink to $(uname -r)Andrew Cady
2021-02-28fsmgr: fix .deb installsAndrew Cady
2021-02-28config option "unit-files:" for systemd unit filesAndrew Cady
2020-10-26ignoreError for btrfs fs devSteven
2020-10-25buster compatGordon GECOS
2020-10-13This is the correct way to prevent the mount failureAndrew Cady
2020-10-12fix the shrinkage to support shrinking the seeded seedAndrew Cady
2020-10-12factorAndrew Cady
2020-10-12avoid setting seed until we name the seedAndrew Cady
2020-10-12build shrunken .seed.btrfs images internallyAndrew Cady
2020-10-12hacks and fixes, features and fixtures, axes and facksesAndrew Cady
2020-10-12Change btfrs uuid all the timeAndrew Cady
This is a workaround for a kernel bug that happens when you try to mount the image file after creating it with cp. It acts as if the same UUID is already mounted, even though it isn't (anymore). Changing the UUID on the image allows mounting it. Can't use 'btrfstune -m' here because (for the time being) it doesn't work on seed images. So that means that the operation is slow. It is done more than necessary because it is done wherever made necessary by existing code. TODO: Change the actual behavior of the program to wait until the very end to set seed property. Only set -S1 when creating the patchfs or creating the uplevel image.
2020-10-11shake "need" debsAndrew Cady
2020-06-19insert TODOAndrew Cady
2020-06-10avoid hard-coded codenameAndrew Cady
2020-05-31always run setupLoopDevices before mount -t btrfsAndrew Cady
2020-05-30force rebuilds when files referenced in '*.yaml' changeAndrew Cady
2020-05-30Do not hardcode "stretch"Andrew Cady
Instead, get codename (used to determine versions for all the packages) from '/etc/os-release' This should be specifiable (and inherited) in the yaml config file too. The *.devices mechanism shows the need to create inheritable "settings." Perhaps they should be in Haskell not through the filesystem.
2020-05-30implement "apt-update" to install apt listsAndrew Cady
presently this hard-codes stretch & amd64
2020-05-30run losetup on parent seed imagesAndrew Cady
currently using some rather brutal force here
2020-05-29track devices in multi-device btrfs images, in file *.btrfs.devices.txtAndrew Cady
2020-05-29more verbose loggingAndrew Cady
2020-05-29allow binaries to be specified as absolute pathsAndrew Cady
2020-05-29fixAndrew Cady
2020-05-29enable fancy output from shakeAndrew Cady
2020-05-28remove spurious commentAndrew Cady
2020-05-28Begin support for "seeded images."Andrew Cady
A seeded image keeps its parent image as a read-only "seed" device that joins the seeded image in a multi-device btrfs filesystem. That means that to mount such an image, the parent image must be made available as a block device (e.g. using losetup, or dd to an existing block device and run btfrs device scan). Such support had been added to the Samizdat Makefile, but more properly belongs here. This is the sequence of commands used by sami.git's Makefile to accomplish the effect: rm -f $@~tmp touch $@~tmp fallocate -l $(samizdat_btrfs_patch_size) $@~tmp test -d $@.mnt || mkdir $@.mnt ! mountpoint -q $@.mnt || umount $@.mnt mount -o compress,ro -t btrfs $< $@.mnt a=$(get_loop_dev); [ -z "$$a" ] || losetup -d $$a losetup -f $@~tmp btrfs device add $(get_loop_dev) $@.mnt mount -o compress,rw,remount $@.mnt The Makefile also defines: get_loop_dev="$$(sudo losetup -n -O name -j $@~tmp)" The same basic sequence is carried out here. The config file format is modified so that to get a seeded image you specify "seedme: <bytes>" where <bytes> is the size of the seeded image. This feature is complete enough to create a seeded image (i.e., to replace the Makefile), but children of a seeded image seem impossible to work because there is no code yet to run losetup on seed images of parents. Thus it can be expected that deriving from a parent with a seed will fail when fsmgr tries to mount the parent.
2020-05-27handle case where $SUDO_USER is not setAndrew Cady
2019-10-15improved error reportingAndrew Cady
2019-10-15implement 'binaries-optional:' and 'skel-files-optional:' sectionsAndrew Cady
2019-10-15$(debarch) supportAndrew Cady
2019-10-04save dpkg -l output in _build/name.pkgs.txtAndrew Cady
2019-10-04allow $(karch) in deb filenamesAndrew Cady
2019-10-04Revert "debugging" (partially)Andrew Cady
This reverts commit 135be7235bc04af43ca7e3749096a4d1e00c3823.
2019-10-04factor out string functionsAndrew Cady
most of these were copied from MissingH
2019-10-04enable $(karch) in package namesAndrew Cady
2019-10-04hide spurious errorAndrew Cady
2019-10-04avoid optimization to debugAndrew Cady
2019-10-03debuggingwipAndrew Cady
2019-06-25call dpkg only once for many debsAndrew Cady
2019-06-21call dpkg with different optionsAndrew Cady
2019-06-19support for skel-filesAndrew Cady
2019-06-19remove created files/dirs on exception in initial disk image creationAndrew Cady
2019-06-19styleAndrew Cady
2019-06-18save snapshot of unmodified root before first mountAndrew Cady
2018-08-12escape spacesAndrew Cady
2018-07-16fail early on a few conditionsAndrew Cady
2018-07-16better error handlingAndrew Cady