summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-01fix fsuuid settingcryptsetupLars Wirzenius1-1/+1
Sponsored-by: author
2022-01-01be more explicit about cryptsetup info in tagsLars Wirzenius5-34/+69
Sponsored-by: author
2022-01-01fix crypttab selectionLars Wirzenius1-1/+3
Sponsored-by: author
2022-01-01fix dm nameLars Wirzenius1-1/+1
Sponsored-by: author
2022-01-01get dm for crypttabLars Wirzenius1-0/+3
Sponsored-by: author
2022-01-01fix condition for crypttabLars Wirzenius1-1/+1
Sponsored-by: author
2022-01-01fixLars Wirzenius1-1/+1
Sponsored-by: author
2022-01-01debug outputLars Wirzenius1-0/+2
Sponsored-by: author
2022-01-01fix crypttab?Lars Wirzenius1-5/+8
Sponsored-by: author
2022-01-01fix condition for crypttabLars Wirzenius2-1/+2
Sponsored-by: author
2022-01-01crypttab supportLars Wirzenius7-18/+100
Sponsored-by: author
2022-01-01fix syntaxLars Wirzenius1-1/+1
Sponsored-by: author
2022-01-01look up luksUUIDLars Wirzenius1-0/+6
Sponsored-by: author
2022-01-01cryptsetup: open deviceLars Wirzenius1-1/+10
Sponsored-by: author
2022-01-01put option in its placeLars Wirzenius1-0/+1
Sponsored-by: author
2022-01-01give cryptsetup the --batch-mode option to prevent it askingLars Wirzenius1-1/+1
Sponsored-by: author
2022-01-01fix command nameLars Wirzenius1-1/+1
Sponsored-by: author
2022-01-01feat: cryptsetup stepLars Wirzenius2-0/+64
Sponsored-by: author
2021-11-23set_part_flag_plugin: fix copy pasta in docsAndy Piper1-2/+1
2021-11-22debootstrap_plugin: add `include` and `install_keyring` keysAndy Piper2-29/+55
The "include" key maps to debootstrap's `--include` parameter, allowing additional packages to be installed. The `install_keyring` key is a Boolean that determines if the gpg keyring specified by the `keyring` key is installed in the disk image for use when installing packages from non-official Debian repositories, e.g. local mirrors created using aptly, etc.
2021-11-22debootstrap_plugin: don't always run apt-get updateAndy Piper2-7/+0
The apt_plugin always runs `apt-get update` before installing packages, so the `apt-get update` in deboostrap_plugin is redundant. It also blocks provisioning the TLS certs required to validate connections to package repos that use https instead of http connections.
2021-11-22ansible_plugin.py: Extend ansible plugin parametersAndy Piper2-14/+57
Add the ability to optionally configure: - The inventory group name - The Ansible tags to be executed - An Ansible configuration file - An `extra_vars` dictionary to be passed to the playbook This enables existing image-creation builds with complex Ansible playbooks to be converted to use vmdb2.
2021-11-22app.py: Add `--variable` param for user-supplied jinja2 variablesAndy Piper1-1/+24
The `--variable` command line parameter can be used to supply values for Jinja2 variables in vmdb2 build specification YAML files using the format `name=value`. This is useful for builds which need to be parameterized, e.g they use remote services in different AWS regions and/or accounts.
2021-11-22grub_plugin: add support for the root filesystem on a logical volume.Andy Piper1-11/+77
Detect if the root filesystem is inside a know logical volume group by examining the output of the `lvs` command. If the rootfs is in a known LV group, determine the name of the mapped device for the group. If the `lvs` command shows the device as `/dev/dm-X` instead of `/dev/mapper/loopXpY`, use the `dmsetup ls` command to determine the name of the loop device.
2021-11-22grub_plugin.py: run apt-get update before installing grubAndy Piper1-0/+1
This fixes build failures where no packages are installed by vmdb2 (and so there is no local package metadata for apt-get to read) before the grub plugin is executed. This can be the case when an `unpack-rootfs` build step comes after all of steps that install packages.
2021-11-22Add set_part_flag_plugin.pyAndy Piper3-0/+90
This enables things like setting the `bios_grub` flag on a partition. It seemed simpler to create a plugin to set these flags than to overload the pupose of the mkpart_plugin.
2021-11-22Add copy_dir_plugin.pyAndy Piper3-0/+138
Adds the ability to copy directory trees into the build chroot
2021-11-22Add zerofree_plugin.pyAndy Piper24-0/+94
The `zerofree` utility zeroes out unused disk space on `ext[2-4]` filesystems and is much faster than using `dd`. This enables better compression of the output disk image when being packaged as a OVA or a Vagrant Box, etc.
2021-11-22lvcreate_plugin: add ability to fill available spaceAndy Piper2-2/+6
The special size value "fill" will instruct the lvcreate_plugin to create a partition that uses all of the available space in the specified logical volume
2021-11-22Clean up mapped partitions in docker on macOSAndy Piper2-2/+17
Docker containers running in Docker Desktop for Mac appear to have a version of `kpartx` that doesn't properly clean up mapped partitions upon execution of `kpartx -dsv`. To work around this behaviour, the kpartx_plugin now unmaps mapped partitions as required using `dmsetup remove <part>`, and frees the loopback device using `losetup -d <device>` This change requires the list of partition mounpoints to be an ordered list in order to be able to unmap mapped partitions in the correct order, so `Tags.get_tags()` has been updated to return the ordered list `self._tagnames` instead of `self._tags.keys()` which (for Python versions before 3.7) returns an unorderd list.
2021-10-15grub_plugin.py: detect grub-install --no-extra-removableZygmunt Krynicki1-1/+2
This makes the vmdb2 compatible with Ubuntu's modified grub-install by interrogating grub-install --help to check which of the options to pass: --no-extra-removable or --force-extra-removable. Closes: https://gitlab.com/larswirzenius/vmdb2/-/issues/36 Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
2021-09-30grub_plugin.py: set grub option systemd.show_status only onceFlorian La Roche1-2/+6
These items are fixed with this change: - "systemd.show_status=true" is always added, even if it was turned off later on. - If the option quiet is selected, then "systemd.show_status=false" is added twice instead of only once. With this patch "systemd.show_status" is only set once with either the value "true" or "false". Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2021-08-23docs: say in README project is in "selish maintenance mode"Lars Wirzenius1-0/+8
Sponsored-by: author
2021-08-22chore: update version number in Pythonvmdb2-0.24Lars Wirzenius1-2/+2
Sponsored-by: author
2021-08-22docs: update NEWS for upcoming releaseLars Wirzenius1-1/+24
Sponsored-by: author
2021-08-22disable tests that don't passLars Wirzenius1-14/+14
I'm too tired to debug this mess today. Sponsored-by: author
2021-08-06fix typoSebastian Bachmann1-1/+1
2021-07-17fix: strip spaces and newlines from host architectureLars Wirzenius1-1/+5
When running dpkg --print-architecure, the output contains a newline. This understandably confuses debootstrap, so strip it away. Sponsored-by: author
2021-07-17fix: make lvcreate not ask questionsLars Wirzenius1-1/+1
The -qq option to lvcreate tells it to be quiet and to assume the answer to any question it may have is "no". Sponsored-by: author
2021-07-17fix: disable realpath'ing the output device in mkpartLars Wirzenius1-2/+6
The os.path.realpath resolves symlinks, and for some reason I do not currently understand this breaks using vmdb2 with --image pointing at an LVM2 logical volume. Sponsored-by: author
2021-07-17fix: disable arm64 test in check-allLars Wirzenius1-1/+1
It never passes for me, so disabling it for now. Sponsored-by: author
2021-07-12Merge branch 'AaronDewes/vmdb2-merge-qemu-debootstrap-into-debootstrap'Lars Wirzenius3-2/+31
2021-07-12fix: get config key "arch" for arch instead of "keyring"Lars Wirzenius1-1/+1
Sponsored-by: author
2021-06-29Fix logic of the apt plugin's 'recommends' optionAndres Salomon1-1/+1
The documentation says to set 'recommends' to true or false, with false telling apt not to install recommends. However, the logic in the code does the opposite of that. This also means that by default, all apt-get install calls from vmdb2 run with --no-install-recommends. As a user, it doesn't make much sense to set 'recommends' to true to tell apt not to install recommends. So I think fixing the logic in the code makes more sense than updating the documentation.
2021-06-24Merge qemu-debootstrap into debootstrapAaron Dewes3-2/+31
Cross-architecture debootstrap without qemu-debootstrap requires Debian >= Buster
2021-04-01docs: update NEWS for releasevmdb2-0.23Lars Wirzenius1-1/+4
2021-03-17Add an option to apt allowing users to set --no-install-recommendsGunnar Wolf2-5/+14
2021-02-06Add support for mkfs optionsMatthias Klein3-1/+12
Signed-off-by: Matthias Klein <matthias.klein@linux.com>
2021-01-16chore: bump version number post-releaseLars Wirzenius2-3/+7
2021-01-16chore: update versionvmdb2-0.22Lars Wirzenius1-2/+2