Run of fresh-releases for vmdb2

Try this locally (using the package):

debcheckout vmdb2
cd vmdb2
new-upstream --refresh-patches

Summary

Merged new upstream version: 0.23 (was: 0.22).

Diff

Branch: main

diff --git a/NEWS b/NEWS
index 55d433d..e1a111d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,16 @@
 NEWS for vmdb2, the Debian disk image builder
 =============================================================================
 
-Version 0.22, not yet released
+Version 0.23, released 2021-04-01
+-----------------------------------------------------------------------------
+
+* Matthias Klein added the optional `options` field to the `mkfs`
+  step to set aditional options for mkfs.
+  
+* Gunnar Wolf added support for not installing recommended packages in
+  the `apt` step in a .vmdb file.
+
+Version 0.22, released 2021-01-16
 -----------------------------------------------------------------------------
 
 * This release has a lot of changes from Ryutaroh Matsumoto and
diff --git a/debian/changelog b/debian/changelog
index 9802905..dfc3002 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-vmdb2 (0.22-2) UNRELEASED; urgency=medium
+vmdb2 (0.23-1) UNRELEASED; urgency=medium
 
+  [ Gunnar Wolf ]
   * Add build-dependency on lmodern (Closes: #982354)
 
- -- Gunnar Wolf <gwolf@debian.org>  Tue, 09 Feb 2021 10:32:52 -0600
+  [ Debian Janitor ]
+  * New upstream release.
+
+ -- Gunnar Wolf <gwolf@debian.org>  Sat, 05 Jun 2021 05:42:42 -0000
 
 vmdb2 (0.22-1) unstable; urgency=medium
 
diff --git a/vmdb/plugins/apt.mdwn b/vmdb/plugins/apt.mdwn
index a05922a..e66454c 100644
--- a/vmdb/plugins/apt.mdwn
+++ b/vmdb/plugins/apt.mdwn
@@ -12,6 +12,10 @@ Step keys:
 
 * `packages` &mdash; REQUIRED; value is a list of packages to install.
 
+* `recommends` &mdash; OPTIONAL; defaults to true. Setting value to a
+  false (i.e. `0`, `null`, `false`) asks apt-get to run with the
+  `--no-install-recommends` option set.
+
 Example (in the .vmdb file):
 
     - apt: install
diff --git a/vmdb/plugins/apt_plugin.py b/vmdb/plugins/apt_plugin.py
index 09b8902..5f11855 100644
--- a/vmdb/plugins/apt_plugin.py
+++ b/vmdb/plugins/apt_plugin.py
@@ -28,7 +28,7 @@ class AptPlugin(vmdb.Plugin):
 
 class AptStepRunner(vmdb.StepRunnerInterface):
     def get_key_spec(self):
-        return {"apt": str, "packages": [], "tag": "", "fs-tag": "", "clean": True}
+        return {"apt": str, "packages": [], "tag": "", "fs-tag": "", "clean": True, "recommends": True}
 
     def run(self, values, settings, state):
         operation = values["apt"]
@@ -36,15 +36,16 @@ class AptStepRunner(vmdb.StepRunnerInterface):
             raise Exception('"apt" must always have value "install"')
 
         packages = values["packages"]
+        recommends = values["recommends"]
         tag = values.get("tag") or None
         if tag is None:
             tag = values["fs-tag"]
         mount_point = state.tags.get_builder_mount_point(tag)
 
         if not self.got_eatmydata(state):
-            self.install_packages(mount_point, [], ["eatmydata"])
+            self.install_packages(mount_point, [], recommends, ["eatmydata"])
             state.got_eatmydata = True
-        self.install_packages(mount_point, ["eatmydata"], packages)
+        self.install_packages(mount_point, ["eatmydata"], recommends, packages)
 
         if values["clean"]:
             self.clean_cache(mount_point)
@@ -52,15 +53,19 @@ class AptStepRunner(vmdb.StepRunnerInterface):
     def got_eatmydata(self, state):
         return hasattr(state, "got_eatmydata") and getattr(state, "got_eatmydata")
 
-    def install_packages(self, mount_point, argv_prefix, packages):
+    def install_packages(self, mount_point, argv_prefix, recommends, packages):
         env = os.environ.copy()
         env["DEBIAN_FRONTEND"] = "noninteractive"
 
         vmdb.runcmd_chroot(mount_point, argv_prefix + ["apt-get", "update"], env=env)
 
+        rec = ''
+        if recommends:
+            rec = '--no-install-recommends'
+
         vmdb.runcmd_chroot(
             mount_point,
-            argv_prefix + ["apt-get", "-y", "--no-show-progress", "install"] + packages,
+            argv_prefix + ["apt-get", "-y", "--no-show-progress", rec, "install"] + packages,
             env=env,
         )
 
diff --git a/vmdb/plugins/mkfs.mdwn b/vmdb/plugins/mkfs.mdwn
index fed8609..7c24f43 100644
--- a/vmdb/plugins/mkfs.mdwn
+++ b/vmdb/plugins/mkfs.mdwn
@@ -9,7 +9,10 @@ Step keys:
 
 * `partition` &mdash; REQUIRED; tag for the block device to use.
 
+* `options` &mdash; OPTIONAL; aditional options for mkfs.
+
 Example (in the .vmdb file):
 
     - mkfs: ext4
       partition: root
+      options: -O ^64bit,^metadata_csum
diff --git a/vmdb/plugins/mkfs_plugin.py b/vmdb/plugins/mkfs_plugin.py
index e204fa6..83c6aff 100644
--- a/vmdb/plugins/mkfs_plugin.py
+++ b/vmdb/plugins/mkfs_plugin.py
@@ -26,7 +26,7 @@ class MkfsPlugin(vmdb.Plugin):
 
 class MkfsStepRunner(vmdb.StepRunnerInterface):
     def get_key_spec(self):
-        return {"mkfs": str, "partition": str, "label": ""}
+        return {"mkfs": str, "partition": str, "label": "", "options": ""}
 
     def run(self, values, settings, state):
         fstype = values["mkfs"]
@@ -50,6 +50,12 @@ class MkfsStepRunner(vmdb.StepRunnerInterface):
             else:
                 cmd.append("-L")
             cmd.append(label)
+
+        options = values["options"] or None
+        if options:
+            for opt in options.split(' '):
+                cmd.append(opt)
+
         cmd.append(device)
         vmdb.runcmd(cmd)
 
diff --git a/vmdb/version.py b/vmdb/version.py
index 1198e37..e27a7f2 100644
--- a/vmdb/version.py
+++ b/vmdb/version.py
@@ -1,2 +1,2 @@
-__version__ = "0.22"
-__version_info__ = (0, 22)
+__version__ = "0.22+git"
+__version_info__ = (0, 22, "+git")

Branch: pristine-tar

diff --git a/vmdb2_0.23.orig.tar.gz.delta b/vmdb2_0.23.orig.tar.gz.delta
new file mode 100644
index 0000000..c29c3a4
Binary files /dev/null and b/vmdb2_0.23.orig.tar.gz.delta differ
diff --git a/vmdb2_0.23.orig.tar.gz.id b/vmdb2_0.23.orig.tar.gz.id
new file mode 100644
index 0000000..51bb3aa
--- /dev/null
+++ b/vmdb2_0.23.orig.tar.gz.id
@@ -0,0 +1 @@
+940c27a09df126bb62b6b5a2980445ac00c9c058

Branch: upstream

Tag: upstream/0.23
Unable to retrieve diff; error 400

Resulting package

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t unstable vmdb2

Lintian Result

Full worker log Full build log