summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
7 daysfeat: be more helpful when --rootfs-tarball hasn't been setHEADmainLars Wirzenius1-1/+3
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
7 daysdocs: clarify that vmdb2 does not support containersLars Wirzenius1-0/+7
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2024-03-23chore: prepare release 0.40vmdb2-0.40Lars Wirzenius2-2/+25
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2024-03-23Pass correct install target to grub-install for grub-ieee1275Victor Westerhuis1-1/+11
2024-03-22cryptsetup_plugin uses logging; import itPeter Palfrader1-0/+1
2023-11-05fix: remove /etc/resolv.conf when the root file system is unmountedLars Wirzenius1-0/+4
debootstrap seems to create it, so that it can resolve DNS names in the chroot. However, we don't want it in the final image. Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-10-08stop using host reslov configurationMatej Kovac1-10/+0
2023-09-09fix(ppc64el.vmdb): fix so that it at least buildsLars Wirzenius1-6/+10
I don't know if it boots, sorry. Sponsored-by: author
2023-09-09fix(README.md): use base.vmdb as an example, not pc.vmdbLars Wirzenius1-5/+5
pc.vmdb is long gone. Reported-by: Simon Josefsson Sponsored-by: author
2023-08-02chore: prepare for 0.28 releasevmdb2-0.28Lars Wirzenius2-2/+84
Sponsored-by: author
2023-07-14tests: exclude lvscan plugin from unit test coverageLars Wirzenius1-0/+1
Sponsored-by: author
2023-07-14reference kpartx docsrtkapiper1-0/+2
2023-07-14lvscan_plugin: support for existing images with logical volumesrtkapiper2-0/+97
The lvscan_plugin is used to detect logical volumes in existing disk images. The volumes are tagged by the plugin, enabling them to be mounted.
2023-07-14virtualfs_plugin: bind-mount build host's /dev to support rootfs in LVMrtkapiper1-9/+9
virtualfs_plugin.py now bind-mounts `/dev` from the build host into the chroot to allow grub_plugin to support grub_install when the root filesystem is inside an LVM volume
2023-07-14grub_plugin.py: mount /proc before calling get_image_loop_devicertkapiper1-1/+1
Update grub_plugin.py to mount the `/proc` filesystem before calling `get_image_loop_device()`, because the `/proc` filesystem is required by the `lvs` command used to probe for a rootfs inside LVM volumes.
2023-07-14Add use-case to plugin documentationrtkapiper1-2/+9
2023-07-14Add support for images with existing partitions and filesystemsrtkapiper3-5/+44
Enable support for running vmdb2 with a disk image that has already been partitioned, with pre-existing filesystems in those partitions. The kpartx_plugin's new "tags" key takes a list of partition/mountpoint tags to use when referring to the partitions later in the vmdb2 spec file. The mount_plugin has been updated to detect the filesystem and uuid if the mountpoint tags for the disk image were defined via the new "tags" kpartx_plugin key, rather than via invoking the mkfs plugin. This allows the mount_plugin to use the fstype to determine if zerofree can be run on a partition when it is unmounted during build teardown.
2023-07-14grub_plugin virtualfs_plugin: only mount virtual filesystems oncertkapiper2-6/+12
The grub_plugin mounts a subset of the filesystems mounted by the virtualfs_plugin. When `vmdb2` is run on Docker for Mac and virtualfs_plugin and grub_plugin are both used, the rootfs cannot be unmounted during teardown because some virtualfs mounts have been mounted twice but only unmounted once. This results in leaked device-mapper entries after each execution of `vmdb2` To fix this issue, these plugins now only mount filesystems that have not already been mounted.
2023-07-14kpartx_plugin: create new loop device if requiredrtkapiper1-1/+7
Fix a kpartx plugin failure when no free loop devices are available: in this scenario, the `kpartx -asv` command can fail. To resolve this, `losetup -f --show <image-file>` is now executed first, which will to create a new loop device if required, before mapping the partitions using `kpartx`.
2023-07-14mount_plugin virtualfs_plugin: normalize mountpoint pathsrtkapiper2-4/+5
Normalizing mountpoint paths fixes a bug where vmdb2 incorrectly determined that mountpoints were not mounted because the (un-normalized) paths in the state object didn't match the (normalized) paths in `/proc/mounts` (the previous attempt to merge this accidentally deleted the for loop on line 57...)
2023-07-14debootstrap_plugin: optionally install TLS Certificate Authority certsrtkapiper2-0/+25
Add an optional `tls_ca_certs` key which takes a list of paths to TLS Certificate Authority (CA) cert files to install in the image after the debootstrap process has completed. This allows the use of package repositories with HTTPS transports that use TLS certificates issued by private CAs. Note that the CA cert files being installed must have a `.crt` suffix in order to be used.
2023-07-13tests: allow check-images to be used in a faster wayLars Wirzenius1-20/+26
Default is to test several Debian releases on several architectures, but sometimes that's not needed, until at the final stages of a merge cycle. When something faster is needed, only specific releases on amd64 are tested. Much speed, very fast. Sponsored-by: author
2023-07-13cache_rootfs_plugin: allow forcing overwrite of existing rootfs tarballrtkapiper2-2/+13
The `force` key enables overwriting of an existing rootfs tarball by `vmdb2`, allowing the tarball to be used as both a build input and a build output. This can be useful in multi-stage build chains where a "common base OS" rootfs filesystem is populated and packaged as a rootfs tarball by `vmdb2`, and this tarball is consumed by multiple downstream `vmdb2` builds that extract the tarball into disk images that have different partition layouts and/or filesystems.
2023-07-13Revert "mount_plugin virtualfs_plugin: normalize mountpoint paths"Lars Wirzenius2-5/+5
This breaks things, so reverting while we figure out a fix.
2023-07-13mount_plugin virtualfs_plugin: normalize mountpoint pathsrtkapiper2-5/+5
Normalizing mountpoint paths fixes a bug where vmdb2 incorrectly determined that mountpoints were not mounted because the (un-normalized) paths in the state object didn't match the (normalized) paths in `/proc/mounts`
2023-07-13unpack_rootfs_plugin: handle `/etc/resolv.conf` symlink in chrootrtkapiper1-1/+6
When `/etc/resolv.conf` is a symlink in the target image (which will be the case for many modern Linuxes that use systemd-resolved), copy the host's `/etc/resolv.conf` to the symlink's target location. This will allow systemd to be able to use the `/etc/resolv.conf` symlink when the image is booted.
2023-07-13fstab_plugin: sort fstab entries by mount pointrtkapiper1-0/+2
Sort entries that are written to `/etc/fstab` by mount_point. This ensures that the entries are listed in dependency order, allowing for all mountpoints to be mounted by `mount -a` in a single pass. For example, this is useful when the mount points `/`, `/boot`, and `/boot/efi` are all defined in `/etc/fstab`
2023-07-13ansible_plugin.py: specify extra_vars inlinertkapiper1-14/+3
Specifying extra_vars inline makes the variables visible in the build output, which in turn makes post-build debugging easier when things go wrong
2023-07-11runcmd.py: show live subprocess output when verbosertkapiper1-7/+42
When executed with `--verbose`, send stdout and stderr data from subprocesses to `sys.stdout` and `sys.stderr` as it is generated to provide better feedback for long-running processes like ansible which produce a lot of output
2023-07-01feat: make zerofree be quietLars Wirzenius1-2/+2
We ran zerofree with -v, which outputs progress percentages, and that's not actually useful. Drop the -v for a cleaner log. Sponsored-by: author
2023-05-31Bugfix /etc/default/grub could end up with remnant of previous contents.Tim Small1-0/+1
Commit 8a9977b introduced a bug whereby if the new /etc/default/grub file contents were shorter in overall length than the original content, then a trailing portion of the previous content would remain in the file. This commit ensures that the new file is truncated to the new length to prevent this.
2023-05-27fix(cryptsetup): bugs introduced by merging with luks pluginLars Wirzenius1-15/+15
Sponsored-by: author
2023-05-12fix: don't set ext4 option in fstab, by defaultLars Wirzenius1-1/+1
Let user modify that via Ansible or something, if they care. Sponsored-by: author
2023-05-12fix(debootstrap): set state.arch from arch field only if emptyLars Wirzenius1-1/+1
Sponsored-by: author
2023-05-12feat: add more debugging to when state.arch is setLars Wirzenius3-8/+18
Sponsored-by: author
2023-05-06fix: --version optionLars Wirzenius5-43/+33
Sponsored-by: author
2023-05-06tests: use SubplotLars Wirzenius5-42/+32
Sponsored-by: author
2023-05-06feat: use argon2id for LUKS key derivationLars Wirzenius1-0/+1
Sponsored-by: author
2023-05-05feat! combine luks and cryptsetup pluginsLars Wirzenius4-161/+127
They were basically doing the same thing. Sponsored-by: author
2023-05-05tests: simplify scripts, put back document formattingLars Wirzenius3-34/+47
Drop attempts to use Subplot. It's not happening now, maybe later. Sponsored-by: author
2023-05-05chore: reformat ./check scriptLars Wirzenius1-53/+45
Sponsored-by: author
2023-05-05tests: rewrite the check-images scriptLars Wirzenius1-64/+34
Sponsored-by: author
2023-05-05chore: delete no-longer useful test suite bits and examplesLars Wirzenius25-1451/+0
Sponsored-by: author
2023-05-04check-one --maybe-boot and refactoringLars Wirzenius1-4/+17
Sponsored-by: author
2023-04-30optionally boot the imageLars Wirzenius1-1/+74
Sponsored-by: author
2023-04-30install system-sysv in base image so that there's an initLars Wirzenius1-0/+2
Sponsored-by: author
2023-04-30ansible in base.vmdbLars Wirzenius4-166/+5
Sponsored-by: author
2023-04-29pick kernel image based on architectureLars Wirzenius1-2/+11
Sponsored-by: author
2023-04-29drop test vmdb files that are obsoleted by check-oneLars Wirzenius4-250/+0
Sponsored-by: author
2023-04-29add base.vmdb for testingLars Wirzenius1-0/+54
Sponsored-by: author