summaryrefslogtreecommitdiff
path: root/fsmgr.hs
AgeCommit message (Collapse)Author
2023-11-22be sure to build all subvolumesHEADmasterGordon GECOS
2023-11-22non-effectful cleanupsGordon GECOS
2023-11-22support for separate _filesystem build dirGordon GECOS
2023-11-17bookworm+ only from here onu
2023-07-01new btrfs subvolume gets ownership/permissions from its parent dirAndrew Cady
2023-06-25Store all btrfs images in local subvolumesAndrew Cady
Most btrfs images were stored in `_build`, but some were stored in the yaml source directory. Those in the yaml source directory are moved to the yaml source directory subdirectory `_filesystem`. The code that creates `_filesystem` creates a btrfs subvolume. The code to create the `_build` directory has been changed to create a subvolume as well. Using subvolumes for image file directories allows them to be excluded from backup snapshots, which is highly desirable for these very large files.
2022-01-11Merge commit 'db4130d'Andrew Cady
2022-01-11ignore more errorsAndrew Cady
2022-01-10new fsmgr .yaml config directive: "files"Andrew Cady
2022-01-10fix long-standing bug where skel-files did not worku
2022-01-10fixes for Debian "bullseye" compatibilityu
2021-03-13include sid in generated sources.listAndrew Cady
2021-03-13pass --release to selfstrap based on /etc/os-releaseAndrew Cady
2021-03-13Ensure apt is updated before dpkg tries to install our deb packagesAndrew Cady
(When option 'apt-update' is true.) This with other changes being committed today allows .deb files to depend on packages from sid.
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.