Accepting request 908832 from Base:System

OBS-URL: https://build.opensuse.org/request/show/908832
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/parted?expand=0&rev=133
This commit is contained in:
Dominique Leuenberger 2021-07-30 21:21:52 +00:00 committed by Git OBS Bridge
commit 97a50a5f15
13 changed files with 131 additions and 176 deletions

View File

@ -23,7 +23,7 @@ Index: parted-3.3/libparted/labels/dos.c
if ( (!table->boot_code[0]) ||
( table->boot_code[0] == (char) 0xc9 &&
@@ -1297,6 +1303,7 @@ msdos_write (const PedDisk* disk)
memset (table->boot_code, 0, 512);
memset (table, 0, 512);
memcpy (table->boot_code, MBR_BOOT_CODE, sizeof (MBR_BOOT_CODE));
}
+#endif

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:57e2b4bd87018625c515421d4524f6e3b55175b472302056391c5f7eccb83d44
size 1757432

View File

@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQFDBAABCgAtFiEEtMa0UeT6i0IyyhkeEX6MFo7+On8FAl2fxMwPHGJjbEByZWRo
YXQuY29tAAoJEBF+jBaO/jp/bygH/ReO2REK9e3YvbNmJmI4jRsiS6KHJ7ufVHAW
DwFHE6TvD8c0EG5RcZNwJUNB2rLUs+RlZCVxU/qzN+nPlZJNXVqjpIZOwNn9H9op
vqLk/Ja6FzvIDPeyes3HTZFojdLZSLvJ5WUnFf/ZKiiJCM2Qgxy3bp/mmBL9niQb
jEr3UUHzVxfMHBFIqnY81+HriBZGCD+vmcKPZ5iMtb4LhHl+WeiFXByS3j4ZrVcg
NvnyjDQgPJj7oKFGgTfbaZs/d9LCE9XAudYUUTszlEajN2JsNEud4jse19EHeLzd
Gd7gR4NFK0k1qhOvi9GaBReMiW7YzX6xey3oxBKdNRHmu8wGhSA=
=i81F
-----END PGP SIGNATURE-----

3
parted-3.4.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e1298022472da5589b7f2be1d5ee3c1b66ec3d96dfbad03dc642afd009da5342
size 1860300

11
parted-3.4.tar.xz.sig Normal file
View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQFDBAABCgAtFiEEtMa0UeT6i0IyyhkeEX6MFo7+On8FAmASBNUPHGJjbEByZWRo
YXQuY29tAAoJEBF+jBaO/jp/blAH+gNmum3xO2/fZhwRUo1mmb+qP9MlAexjt9VJ
KX79/5ICIFSubVLxzsJTN5g3hZQUoui3qcgdJhnp14bK3hSsvBKtvAAUp+myB+1t
9aypzK+qvw32aaCtPfS00qe4Re2ry6LyuW7hsATPIvcQWF/Xc76FLzG6ilzshxS0
iftCM/NSp3aGBcNa4Ru3TkbQ1vFtuKYkt24hItODtrYAMGb2IQzSPHCbZw1kfV/J
pypllYB7A6ykr9xqhXPW30d3hERmvcJS0LoUzzEmHRf4YYkYk2N0BQoa4KYI1ULX
rlpG+iJSc0RN8EgHwecdHfPN3umE2UXn3aYCS5GX2Dn9xPsjaSM=
=HdSF
-----END PGP SIGNATURE-----

View File

@ -1,31 +0,0 @@
From: Brian C. Lane <bcl@redhat.com>
Date: Tue Apr 23 13:52:25 2019 -0700
Subject: Fix end_input usage in do_resizepart
Patch-mainline: v4.4
Git-commit: ca845aeeddb17343c9289816833ca352f7c0d87b
Fix end_input usage in do_resizepart
It needs to be set to NULL, since it may not get set by the call to
command_line_get_sector
Index: parted-3.3/parted/parted.c
===================================================================
--- parted-3.3.orig/parted/parted.c
+++ parted-3.3/parted/parted.c
@@ -1667,6 +1667,7 @@ do_resizepart (PedDevice** dev, PedDisk*
const int end_idx = 2;
const bool danger_if_busy = false;
int rc = 0;
+ char* end_input = NULL;
if (!disk) {
disk = ped_disk_new (*dev);
@@ -1688,7 +1689,6 @@ do_resizepart (PedDevice** dev, PedDisk*
start = part->geom.start;
end = oldend = part->geom.end;
- char *end_input;
if (!command_line_get_sector (_("End?"), *dev, &end, &range_end, &end_input))
goto error;
_adjust_end_if_iec(&start, &end, range_end, end_input);

View File

@ -65,18 +65,18 @@ Index: parted-3.3/parted/parted.c
+ const int end_idx = 2;
+ const bool danger_if_busy = false;
int rc = 0;
if (!disk) {
char* end_input = NULL;
char* end_size = NULL;
@@ -1671,7 +1682,8 @@ do_resizepart (PedDevice** dev, PedDisk*
}
if (!command_line_get_partition (_("Partition number?"), disk, &part))
goto error;
/* If the partition is busy this may clear the command_line and prompt the user */
- if (!_partition_warn_busy (part))
+ /* warn early if the partition end is not provided on cmdline */
+ if (cmdline_words <= part_idx && !_partition_warn_busy (part, danger_if_busy))
goto error;
start = part->geom.start;
/* Push the End value back onto the command_line, if it exists */
@@ -1681,19 +1693,32 @@ do_resizepart (PedDevice** dev, PedDisk*
goto error;
_adjust_end_if_iec(&start, &end, range_end, end_input);

View File

@ -1,26 +0,0 @@
From: Petr Uzel <petr.uzel@suse.cz>
Subject: parted: Add an "resize" alias for "resizepart"
Patch-mainline: no, compatibility for parted < 3.0 syntax
---
parted/parted.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: parted-3.3/parted/parted.c
===================================================================
--- parted-3.3.orig/parted/parted.c
+++ parted-3.3/parted/parted.c
@@ -2111,9 +2111,11 @@ NULL),
command_register (commands, command_create (
str_list_create_unique ("resize", _("resize"), NULL),
- do_resize,
- NULL,
- str_list_create (_(N_("The resize command was removed in parted 3.0\n")), NULL), 1));
+ do_resizepart,
+ str_list_create (
+_("resizepart NUMBER END resize partition NUMBER"),
+NULL),
+ str_list_create (_(number_msg), _(end_msg), NULL), 1));
command_register (commands, command_create (
str_list_create_unique ("resizepart", _("resizepart"), NULL),

View File

@ -16,16 +16,16 @@ Index: parted-3.3/include/parted/disk.in.h
===================================================================
--- parted-3.3.orig/include/parted/disk.in.h
+++ parted-3.3/include/parted/disk.in.h
@@ -75,10 +75,11 @@ enum _PedPartitionFlag {
PED_PARTITION_LEGACY_BOOT=15,
PED_PARTITION_MSFT_DATA=16,
@@ -78,10 +78,11 @@
PED_PARTITION_IRST=17,
- PED_PARTITION_ESP=18
+ PED_PARTITION_ESP=18,
+ PED_PARTITION_TYPE=19
PED_PARTITION_ESP=18,
PED_PARTITION_CHROMEOS_KERNEL=19,
- PED_PARTITION_BLS_BOOT=20
+ PED_PARTITION_BLS_BOOT=20,
+ PED_PARTITION_TYPE=21
};
#define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT
-#define PED_PARTITION_LAST_FLAG PED_PARTITION_ESP
-#define PED_PARTITION_LAST_FLAG PED_PARTITION_BLS_BOOT
+#define PED_PARTITION_LAST_FLAG PED_PARTITION_TYPE
enum _PedDiskTypeFeature {

View File

@ -21,6 +21,6 @@ Index: parted-3.3/libparted/labels/dos.c
+ table->boot_code[2] == (char) 0xd4 &&
+ table->boot_code[3] == (char) 0xc1)
+ ) {
memset (table->boot_code, 0, 512);
memset (table, 0, 512);
memcpy (table->boot_code, MBR_BOOT_CODE, sizeof (MBR_BOOT_CODE));
}

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Mon Jul 26 16:50:36 CEST 2021 - aschnell@suse.com
- update to version 3.4:
* Add new partition type flags chromeos_kernel and bls_boot.
* Add support for the F2FS filesystem.
refreshed patches:
- dummy-bootcode-only-for-x86.patch
- parted-fix-resizepart-and-rm-command.patch
- parted-type.patch
- parted-wipeaix.patch
- tests-adapt-to-SUSE.patch
removed patches:
- parted-fix-end_input-usage.patch
- parted-resize-alias-to-resizepart.patch
-------------------------------------------------------------------
Fri Mar 19 13:51:01 UTC 2021 - jeffm@suse.com
@ -1838,4 +1854,3 @@ Thu Nov 9 09:58:25 CET 2000 - ro@suse.de
Tue Oct 10 15:56:16 MEST 2000 - tom@suse.de
- initial version, GNU parted 1.2.9

View File

@ -17,7 +17,7 @@
Name: parted
Version: 3.3
Version: 3.4
Release: 0
Summary: GNU partitioner
License: GPL-3.0-or-later
@ -43,8 +43,6 @@ Patch16: parted-mac.patch
Patch17: libparted-use-BLKRRPART-for-DASD.patch.patch
Patch18: libparted-make-BLKRRPART-more-robust.patch
Patch19: libparted-dasd-implicit-partition-disk-flag.patch
# Remove following compatibility patch once bnc#931765 is resolved
Patch20: parted-resize-alias-to-resizepart.patch
Patch21: libparted-avoid-libdevice-mapper-warnings.patch
# Patch31 dropped for bsc#1058667
Patch22: libparted-open-the-device-RO-and-lazily-switch-to-RW.patch
@ -62,7 +60,6 @@ Patch31: parted-add-ignore-busy-option.patch
Patch32: parted-fix-resizepart-and-rm-command.patch
Patch33: libparted-use-BLKRRPART-only-when-needed.patch
Patch34: libparted-canonicalize-dev-md-paths.patch
Patch35: parted-fix-end_input-usage.patch
# bsc#1168756
Patch36: libparted-linux-pmem-path.patch
@ -80,6 +77,7 @@ Patch157: tests-add-dev-md-check-to-t6100.patch
# SUSE tests patches
Patch200: tests-adapt-to-SUSE.patch
BuildRequires: check-devel
BuildRequires: device-mapper-devel >= 1.02.33
BuildRequires: libblkid-devel >= 2.17
@ -124,6 +122,7 @@ This package contains all necessary include files and libraries needed
to develop applications that require these.
%lang_package
%prep
%setup -a 4
%patch1 -p1
@ -137,7 +136,6 @@ to develop applications that require these.
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
@ -152,7 +150,6 @@ to develop applications that require these.
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch64 -p1

View File

@ -47,11 +47,11 @@ Index: parted-3.3/tests/t3200-resize-partition.sh
parted -m -s $dev u s p > out 2>&1 || fail=1
sed -n 3p out > k && mv k out || fail=1
-printf "1:$default_start:$new_end:3073s:::$ms;\n" > exp || fail=1
+printf "1:$default_start:$new_end:3073s:::type=83;\n" > exp || fail=1
-printf "1:$default_start:$new_end:3073s:ext2::$ms;\n" > exp || fail=1
+printf "1:$default_start:$new_end:3073s:ext2::type=83;\n" > exp || fail=1
compare exp out || fail=1
# Remove the partition explicitly, so that mklabel doesn't evoke a warning.
umount "${dev}1" || fail=1
Index: parted-3.3/tests/t3300-palo-prep.sh
===================================================================
--- parted-3.3.orig/tests/t3300-palo-prep.sh