forked from rpms/python-blivet
		
	Set partition flags after setting parted fs (#2033875)
This commit is contained in:
		
							parent
							
								
									2279349a9f
								
							
						
					
					
						commit
						b65d61442d
					
				
							
								
								
									
										34
									
								
								0002-set-partition-flags.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								0002-set-partition-flags.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,34 @@ | |||||||
|  | From 92b18b7d7e05f2bde979f2e85888b820000d8214 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Vojtech Trefny <vtrefny@redhat.com> | ||||||
|  | Date: Mon, 14 Feb 2022 15:57:51 +0100 | ||||||
|  | Subject: [PATCH] Set partition flags after setting parted filesystem | ||||||
|  |  (#2033875) | ||||||
|  | 
 | ||||||
|  | With latest parted setting the parted filesystem property changes | ||||||
|  | the GPT type set by the flags to the default type for the fs, e.g. | ||||||
|  | to "Microsoft basic data" for FAT instead of "EFI System" which | ||||||
|  | is set with the boot flag on GPT. | ||||||
|  | ---
 | ||||||
|  |  blivet/deviceaction.py | 6 +++--- | ||||||
|  |  1 file changed, 3 insertions(+), 3 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/blivet/deviceaction.py b/blivet/deviceaction.py
 | ||||||
|  | index 15c3bc622..f7e99e9d1 100644
 | ||||||
|  | --- a/blivet/deviceaction.py
 | ||||||
|  | +++ b/blivet/deviceaction.py
 | ||||||
|  | @@ -630,12 +630,12 @@ def execute(self, callbacks=None):
 | ||||||
|  |                      continue | ||||||
|  |                  self.device.unset_flag(flag) | ||||||
|  |   | ||||||
|  | -            if self.format.parted_flag is not None:
 | ||||||
|  | -                self.device.set_flag(self.format.parted_flag)
 | ||||||
|  | -
 | ||||||
|  |              if self.format.parted_system is not None: | ||||||
|  |                  self.device.parted_partition.system = self.format.parted_system | ||||||
|  |   | ||||||
|  | +            if self.format.parted_flag is not None:
 | ||||||
|  | +                self.device.set_flag(self.format.parted_flag)
 | ||||||
|  | +
 | ||||||
|  |              self.device.disk.format.commit_to_disk() | ||||||
|  |              udev.settle() | ||||||
|  |   | ||||||
| @ -23,7 +23,7 @@ Version: 3.4.3 | |||||||
| 
 | 
 | ||||||
| #%%global prerelease .b2 | #%%global prerelease .b2 | ||||||
| # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 | # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 | ||||||
| Release: 1%{?prerelease}%{?dist} | Release: 2%{?prerelease}%{?dist} | ||||||
| Epoch: 1 | Epoch: 1 | ||||||
| License: LGPLv2+ | License: LGPLv2+ | ||||||
| %global realname blivet | %global realname blivet | ||||||
| @ -35,6 +35,8 @@ Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realver | |||||||
| Patch0: 0001-remove-btrfs-plugin.patch | Patch0: 0001-remove-btrfs-plugin.patch | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
|  | Patch1: 0002-set-partition-flags.patch | ||||||
|  | 
 | ||||||
| # Versions of required components (done so we make sure the buildrequires | # Versions of required components (done so we make sure the buildrequires | ||||||
| # match the requires versions of things). | # match the requires versions of things). | ||||||
| %global partedver 1.8.1 | %global partedver 1.8.1 | ||||||
| @ -196,6 +198,9 @@ configuration. | |||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Tue Feb 15 2022 Jan Pokorny <japokorn@redhat.com> - 3.4.3-2 | ||||||
|  | - Set partition flags after setting parted filesystem (#2033875) (vtrefny) | ||||||
|  | 
 | ||||||
| * Tue Feb 01 2022 Vojtech Trefny <vtrefny@redhat.com> - 3.4.3-1 | * Tue Feb 01 2022 Vojtech Trefny <vtrefny@redhat.com> - 3.4.3-1 | ||||||
| - Make sure we mount the top level subvolume when mounting btrfs (vtrefny) | - Make sure we mount the top level subvolume when mounting btrfs (vtrefny) | ||||||
| - README: Fix API documentation link (vtrefny) | - README: Fix API documentation link (vtrefny) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user