import cloud-utils-growpart-0.31-2.el8

This commit is contained in:
CentOS Sources 2021-06-11 18:19:59 +00:00 committed by Andrew Lukoshko
parent 2546a0ad06
commit d3e5b48a2d
2 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,52 @@
From af0f5f012eef5f4728e92a0f02610e31b58a725c Mon Sep 17 00:00:00 2001
From: Eduardo Otubo <otubo@redhat.com>
Date: Mon, 29 Mar 2021 13:42:12 +0200
Subject: [PATCH] growpart: Use LANG=C to parse sfdisk output
RH-Author: Eduardo Otubo <otubo@redhat.com>
RH-MergeRequest: 1: growpart: Use LANG=C to parse sfdisk output
RH-Commit: [1/1] c61f16c69c76c3a8604a6fdcf8543f860207de46
RH-Bugzilla: 1933768
commit 3cde8344f64118c723b40ecff7066c2ff8c51013 (upstream/master)
Author: Nicolas Chauvet <kwizart@gmail.com>
Date: Fri Feb 26 17:15:44 2021 +0100
growpart: Use LANG=C to parse sfdisk output
This will prevent failure to parse output of in non-C locales leading to
failure to resize partition.
Alternative would be to use sfdisk --dump, but this misses some
importants informations such as the sectors size
Reported in:
https://bugs.launchpad.net/cloud-utils/+bug/1860479
This was tested on centos7 with sfdisk 2.23.2 and
centos8 with sfdisk 2.32.1
Reported-by: https://launchpad.net/~pickadi
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
---
bin/growpart | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/growpart b/bin/growpart
index 446f63b..e815e4e 100755
--- a/bin/growpart
+++ b/bin/growpart
@@ -212,7 +212,7 @@ resize_sfdisk() {
local pt_start pt_size pt_end max_end new_size change_info dpart
local sector_num sector_size disk_size tot out
- rqe sfd_list sfdisk --list --unit=S "$DISK" >"$tmp" ||
+ LANG=C rqe sfd_list sfdisk --list --unit=S "$DISK" >"$tmp" ||
fail "failed: sfdisk --list $DISK"
if [ "${SFDISK_VERSION}" -lt ${SFDISK_2_26} ]; then
# exected output contains: Units: sectors of 512 bytes, ...
--
2.27.0

View File

@ -1,6 +1,6 @@
Name: cloud-utils-growpart
Version: 0.31
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv3
Group: System Environment/Base
Source0: cloud-utils-0.31.tar.gz
@ -9,6 +9,9 @@ Source1: LICENSE
BuildArch: noarch
# BZ 1933768 - cloud-utils-growpart: Wrong parsing of sfdisk output in french locale
Patch1: cu-growpart-Use-LANG-C-to-parse-sfdisk-output.patch
Summary: Script for growing a partition
Requires: gawk
@ -45,6 +48,11 @@ cp man/growpart.* $RPM_BUILD_ROOT/%{_mandir}/man1/
%doc %{_mandir}/man1/growpart.*
%changelog
* Wed Jun 02 2021 Miroslav Rezanina <mrezanin@redhat.com> - 0.31-2
- cu-growpart-Use-LANG-C-to-parse-sfdisk-output.patch [bz#1933768]
- Resolves: bz#1933768
(cloud-utils-growpart: Wrong parsing of sfdisk output in french locale)
* Tue Jun 23 2020 Miroslav Rezanina <mrezanin@redhat.com> - 0.31-1
- Rebase to 0.31 [bz#1846246]
- Resolves: #bz#1846246