diff --git a/Makefile.builder b/Makefile.builder index 7c64daf..66e6d6d 100644 --- a/Makefile.builder +++ b/Makefile.builder @@ -11,10 +11,13 @@ endif source-debian-quilt-copy-in: VERSION = $(shell cat $(ORIG_SRC)/version) source-debian-quilt-copy-in: ORIG_FILE = "$(CHROOT_DIR)/$(DIST_SRC)/../qubes-core-agent_$(VERSION).orig.tar.gz" +ifneq ($(filter $(DIST), jessie stretch),) +source-debian-quilt-copy-in: series_ext = -$(DIST) +endif source-debian-quilt-copy-in: if [ $(DIST) == bionic ] ; then \ sed -i /initscripts/d $(CHROOT_DIR)/$(DIST_SRC)/debian/control ;\ fi - -$(shell $(ORIG_SRC)/debian-quilt $(ORIG_SRC)/series-debian-vm.conf $(CHROOT_DIR)/$(DIST_SRC)/debian/patches) + -$(shell $(ORIG_SRC)/debian-quilt $(ORIG_SRC)/series-debian$(series_ext)-vm.conf $(CHROOT_DIR)/$(DIST_SRC)/debian/patches) # vim: filetype=make diff --git a/patches.debian/0001-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch b/patches.debian/0001-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch new file mode 100644 index 0000000..acbd960 --- /dev/null +++ b/patches.debian/0001-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch @@ -0,0 +1,41 @@ +From f372cd46df94d5a67286aee923b9908d1326e040 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= + +Date: Sun, 24 Feb 2019 03:58:11 +0100 +Subject: [PATCH] Revert "Use sfdisk instead of parted to resize root partition + table" +Organization: Invisible Things Lab +Cc: Marek Marczykowski-Górecki + +util-linux in Debian is too old for this, because the bug +karelzak/util-linux#532, which is fixed only in util-linux 2.31.1+ +(Debian stretch has 2.29.2). + +This reverts commit 9792438b3f02161e03d89dfd527ca2459092b478. +--- + misc/resize-rootfs | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/misc/resize-rootfs b/misc/resize-rootfs +index 1c2fca3c..bebf1011 100755 +--- a/misc/resize-rootfs ++++ b/misc/resize-rootfs +@@ -8,8 +8,13 @@ case "$(stat -Lc %t:%T /dev/mapper/dmroot)" in + # nothing needed, xvda used directly + ;; + ca:3) +- # resize partition table itself and xda3 partition +- echo ',+' | sfdisk --no-reread -q -N 3 /dev/xvda ++ # resize partition table itself ++ # use undocumented ---pretend-input-tty (yes, three '-') to ++ # force unattended operation, otherwise it aborts on first ++ # prompt, even with '-s' option ++ echo fix | parted ---pretend-input-tty /dev/xvda print >/dev/null ++ # then resize 3rd partition, even though it is mounted ++ echo yes 100% | parted ---pretend-input-tty /dev/xvda resizepart 3 + # and reload partition table; prefer partprobe over blockdev + # --rereadpt, as it works on mounted partitions + partprobe /dev/xvda +-- +2.17.2 + diff --git a/series-debian-jessie-vm.conf b/series-debian-jessie-vm.conf new file mode 100644 index 0000000..a628b37 --- /dev/null +++ b/series-debian-jessie-vm.conf @@ -0,0 +1,2 @@ +patches.debian/01_add_anacron.patch +patches.debian/0001-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch diff --git a/series-debian-stretch-vm.conf b/series-debian-stretch-vm.conf new file mode 120000 index 0000000..741dd52 --- /dev/null +++ b/series-debian-stretch-vm.conf @@ -0,0 +1 @@ +series-debian-jessie-vm.conf \ No newline at end of file