From 0cfa03b828c085eca1f215d9145902109e7665f1 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Thu, 22 Nov 2018 11:40:23 -0500 Subject: [PATCH] Backport fix to detect swap partition type correctly --- ...ional-for-swap-check-mountpoint-also.patch | 25 +++++++++++++++++++ appliance-tools.spec | 6 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0001-fstype-is-optional-for-swap-check-mountpoint-also.patch diff --git a/0001-fstype-is-optional-for-swap-check-mountpoint-also.patch b/0001-fstype-is-optional-for-swap-check-mountpoint-also.patch new file mode 100644 index 0000000..301eaee --- /dev/null +++ b/0001-fstype-is-optional-for-swap-check-mountpoint-also.patch @@ -0,0 +1,25 @@ +From 52ca919e15e246324d084f2a9d03884aa9bfb81f Mon Sep 17 00:00:00 2001 +From: Pablo Greco +Date: Thu, 22 Nov 2018 13:35:04 -0300 +Subject: [PATCH] fstype is optional for swap, check mountpoint also + +--- + appcreate/partitionedfs.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/appcreate/partitionedfs.py b/appcreate/partitionedfs.py +index 3cc09c1..b738b80 100644 +--- a/appcreate/partitionedfs.py ++++ b/appcreate/partitionedfs.py +@@ -110,7 +110,7 @@ class PartitionedMount(Mount): + logging.debug("Add %s part at %d of size %d" % (p['type'], p['start'], p['size'])) + if p['fstype'].startswith('ext'): + fstype = 'ext2' +- if p['fstype'].startswith('swap'): ++ if p['fstype'].startswith('swap') or p['mountpoint'].startswith('swap'): + fstype = 'linux-swap' + if p['fstype'] == 'vfat': + fstype = 'fat32' +-- +2.17.2 + diff --git a/appliance-tools.spec b/appliance-tools.spec index d04c379..84179a1 100644 --- a/appliance-tools.spec +++ b/appliance-tools.spec @@ -12,7 +12,7 @@ Name: appliance-tools Summary: Tools for building Appliances Version: 009.0 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base URL: https://pagure.io/appliance-tools @@ -20,6 +20,7 @@ URL: https://pagure.io/appliance-tools Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.bz2 # Patches backported from upstream +Patch0001: 0001-fstype-is-optional-for-swap-check-mountpoint-also.patch # Ensure system deps are installed (rhbz#1409536) Requires: python%{python_pkgversion}-imgcreate >= 1:25.0-2 @@ -64,6 +65,9 @@ rm -rf %{buildroot}%{_datadir}/doc/%{name} %{python_sitelib}/ec2convert/ %changelog +* Thu Nov 22 2018 Neal Gompa - 009.0-4 +- Backport fix to detect swap partition type correctly + * Thu Nov 22 2018 Neal Gompa - 009.0-3 - Add missing dep for python-future