Fix calamares bugs and update requires (#4713)
* Fix calamares bugs and update requires * Add short explanation for the patch fixes * Reword comment, trigger github checks
This commit is contained in:
Родитель
2857179f84
Коммит
dd864e875f
|
@ -7,7 +7,7 @@ Summary: Installer from a live CD/DVD/USB to disk
|
|||
# https://github.com/calamares/calamares/issues/1051
|
||||
Name: calamares
|
||||
Version: 3.2.11
|
||||
Release: 39%{?dist}
|
||||
Release: 40%{?dist}
|
||||
License: GPLv3+
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Mariner
|
||||
|
@ -48,6 +48,14 @@ Patch0: calamares-3.2.11-default-settings.patch
|
|||
Patch1: use-single-job-for-progress-bar-value.patch
|
||||
Patch2: navigation-buttons-autodefault.patch
|
||||
Patch3: round-to-full-disk-size.patch
|
||||
# Due to a race condition, Calamares would crash intermittently when switching
|
||||
# partitioning method or encryption password. Patch4 fixes that bug.
|
||||
Patch4: serialize-read-access.patch
|
||||
# Progress bar would expect a non-false return from a pooled thread, assuming
|
||||
# such result means a critical error. However, depending on timing
|
||||
# the process might return false since it already exited. Patch5 fixes that bug.
|
||||
Patch5: install-progress-bar-fix.patch
|
||||
|
||||
# Compilation tools
|
||||
BuildRequires: cmake
|
||||
BuildRequires: extra-cmake-modules
|
||||
|
@ -81,6 +89,12 @@ BuildRequires: yaml-cpp-devel >= 0.5.1
|
|||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: coreutils
|
||||
Requires: efibootmgr
|
||||
# Partition manipulation
|
||||
Requires: util-linux
|
||||
# LVM / encrypted disk setup
|
||||
Requires: cryptsetup
|
||||
Requires: lvm2
|
||||
|
||||
# Fonts
|
||||
Requires: freefont
|
||||
Requires: grub2
|
||||
|
@ -130,12 +144,12 @@ done
|
|||
mv %{SOURCE20} src/modules/license/license.conf
|
||||
mv %{SOURCE24} src/modules/users/users.conf
|
||||
|
||||
%patch0 -p1 -b .default-settings
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
# delete backup files so they don't get installed
|
||||
rm -f src/modules/*/*.conf.default-settings
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
mkdir -p %{_target_platform}
|
||||
|
@ -217,6 +231,11 @@ install -p -m 644 %{SOURCE53} %{buildroot}%{_sysconfdir}/calamares/mariner-eula
|
|||
%{_libdir}/cmake/Calamares/
|
||||
|
||||
%changelog
|
||||
* Fri Jan 27 2023 Mateusz Malisz <mamalisz@microsoft.com> - 3.2.11-40
|
||||
- Fix application crash when discoverin partitions due to a race condition with serialize-read-access.patch
|
||||
- Fix application crash when the Mariner installer process thread have already exited during progress bar installation view
|
||||
- Update Requires with some runtime dependencies for LVM and encryption support.
|
||||
|
||||
* Mon Jul 25 2022 Minghe Ren <mingheren@microsoft.com> - 3.2.11-39
|
||||
- Modify users.conf to imporve security
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
diff -ruN a/src/modules/users/MarinerInstallerJob.cpp b/src/modules/users/MarinerInstallerJob.cpp
|
||||
--- a/src/modules/users/MarinerInstallerJob.cpp 2023-01-24 14:48:46.464568866 -0800
|
||||
+++ b/src/modules/users/MarinerInstallerJob.cpp 2023-01-27 15:11:08.393214748 -0800
|
||||
@@ -91,7 +91,7 @@
|
||||
// is not filled in completely, sleep for a short duration and keep consuming the
|
||||
// remaining stdout to provide a smooth transition.
|
||||
if (!installerProc.waitForReadyRead(-1)) {
|
||||
- Q_ASSERT(installerProc.waitForFinished(0));
|
||||
+ installerProc.waitForFinished(0);
|
||||
installerFinished = true;
|
||||
QThread::msleep(5);
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
diff -ruN a/src/modules/partition/core/PartitionModel.cpp b/src/modules/partition/core/PartitionModel.cpp
|
||||
--- a/src/modules/partition/core/PartitionModel.cpp 2023-01-27 14:12:11.942298970 -0800
|
||||
+++ b/src/modules/partition/core/PartitionModel.cpp 2023-01-27 14:12:06.786346392 -0800
|
||||
@@ -79,6 +79,7 @@
|
||||
int
|
||||
PartitionModel::rowCount( const QModelIndex& parent ) const
|
||||
{
|
||||
+ QMutexLocker lock(&m_lock);
|
||||
Partition* parentPartition = partitionForIndex( parent );
|
||||
if ( parentPartition )
|
||||
return parentPartition->children().count();
|
||||
@@ -89,6 +90,7 @@
|
||||
QModelIndex
|
||||
PartitionModel::index( int row, int column, const QModelIndex& parent ) const
|
||||
{
|
||||
+ QMutexLocker lock(&m_lock);
|
||||
PartitionNode* parentPartition = parent.isValid()
|
||||
? static_cast< PartitionNode* >( partitionForIndex( parent ) )
|
||||
: static_cast< PartitionNode* >( m_device->partitionTable() );
|
||||
@@ -106,6 +108,7 @@
|
||||
QModelIndex
|
||||
PartitionModel::parent( const QModelIndex& child ) const
|
||||
{
|
||||
+ QMutexLocker lock(&m_lock);
|
||||
if ( !child.isValid() )
|
||||
return QModelIndex();
|
||||
Partition* partition = partitionForIndex( child );
|
||||
@@ -129,6 +132,7 @@
|
||||
QVariant
|
||||
PartitionModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
+ QMutexLocker lock(&m_lock);
|
||||
Partition* partition = partitionForIndex( index );
|
||||
if ( !partition )
|
||||
return QVariant();
|
||||
@@ -277,7 +281,6 @@
|
||||
Partition*
|
||||
PartitionModel::partitionForIndex( const QModelIndex& index ) const
|
||||
{
|
||||
- QMutexLocker lock(&m_lock);
|
||||
if ( !index.isValid() )
|
||||
return nullptr;
|
||||
return reinterpret_cast< Partition* >( index.internalPointer() );
|
Загрузка…
Ссылка в новой задаче