diff --git a/CHANGES-3.2 b/CHANGES-3.2 index 2c5e0bdcd..068b68aae 100644 --- a/CHANGES-3.2 +++ b/CHANGES-3.2 @@ -8,6 +8,12 @@ contributors are listed. Note that Calamares does not have a historical changelog -- this log starts with version 3.2.0. The release notes on the website will have to do for older versions. +# 3.2.58.1 (2022-05-20) + +This is a hot-fix release for a regression in the *partition* module where +it was impossible to proceed unless *Encrypt system* was checked. + + # 3.2.58 (2022-05-18) # This release contains contributions from (alphabetically by first name): diff --git a/CMakeLists.txt b/CMakeLists.txt index 13f63ecc9..34f5f71f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ # TODO:3.3: Require CMake 3.12 cmake_minimum_required( VERSION 3.3 FATAL_ERROR ) project( CALAMARES - VERSION 3.2.58 + VERSION 3.2.58.1 LANGUAGES C CXX ) diff --git a/ci/RELEASE.sh b/ci/RELEASE.sh index e46ca2cc2..38e108d72 100755 --- a/ci/RELEASE.sh +++ b/ci/RELEASE.sh @@ -7,8 +7,6 @@ # # Release script for Calamares # -# NOTE: this script contains Linuxisms (in particular, expects GNU mktemp(1)) -# # This attempts to perform the different steps of the RELEASE.md # document automatically. It's not tested on other machines or # setups other than [ade]'s development VM. @@ -29,11 +27,13 @@ # * `-B` do not build (before tagging) # * `-P` do not package (tag, sign, tarball) # * `-T` do not respect string freeze +# * '-b' do not build-and-test tarball # # The build / package settings can be influenced via environment variables: # * BUILD_DEFAULT set to `false` to avoid first build with gcc # * BUILD_CLANG set to `false` to avoid second build with clang # * BUILD_ONLY set to `true` to break after building +# * TEST_TARBALL set to 'false' to skip build-and-test phase after tarring # ### END USAGE @@ -45,9 +45,10 @@ which cmake > /dev/null 2>&1 || { echo "No cmake(1) available." ; exit 1 ; } test -z "$BUILD_DEFAULT" && BUILD_DEFAULT=true test -z "$BUILD_CLANG" && BUILD_CLANG=true test -z "$BUILD_ONLY" && BUILD_ONLY=false +test -z "$TEST_TARBALL" && TEST_TARBALL=true STRING_FREEZE=true -while getopts "hBPT" opt ; do +while getopts "hBbPT" opt ; do case "$opt" in h|\?) sed -e '1,/USAGE/d' -e '/END.USAGE/,$d' < "$0" @@ -57,6 +58,9 @@ while getopts "hBPT" opt ; do BUILD_DEFAULT=false BUILD_CLANG=false ;; + b) + TEST_TARBALL=false + ;; P) BUILD_ONLY=true ;; @@ -74,7 +78,7 @@ fi ### Setup # # -BUILDDIR=$(mktemp -d --suffix=-build --tmpdir=.) +BUILDDIR=$(mktemp -d ./cala-tmp-XXXXXX) KEY_ID="328D742D8807A435" # Try to make gpg cache the signing key, so we can leave the process @@ -144,12 +148,14 @@ SHA256=$(sha256sum "$TAR_FILE" | cut -d" " -f1) ### Build the tarball # # -D=$(date +%Y%m%d-%H%M%S) -TMPDIR=$(mktemp -d --suffix="-calamares-$D") -test -d "$TMPDIR" || { echo "Could not create tarball-build directory." ; exit 1 ; } -tar xzf "$TAR_FILE" -C "$TMPDIR" || { echo "Could not unpack tarball." ; exit 1 ; } -test -d "$TMPDIR/$TAR_V" || { echo "Tarball did not contain source directory." ; exit 1 ; } -( cd "$TMPDIR/$TAR_V" && cmake . && make -j4 && make test ) || { echo "Tarball build failed in $TMPDIR ." ; exit 1 ; } +if test "x$TEST_TARBALL" = "xtrue" ; then + D=$(date +%Y%m%d-%H%M%S) + TMPDIR=$(mktemp -d ./cala-tar-XXXXXX) + test -d "$TMPDIR" || { echo "Could not create tarball-build directory." ; exit 1 ; } + tar xzf "$TAR_FILE" -C "$TMPDIR" || { echo "Could not unpack tarball." ; exit 1 ; } + test -d "$TMPDIR/$TAR_V" || { echo "Tarball did not contain source directory." ; exit 1 ; } + ( cd "$TMPDIR/$TAR_V" && cmake . && make -j4 && make test ) || { echo "Tarball build failed in $TMPDIR ." ; exit 1 ; } +fi gpg -s -u $KEY_ID --detach --armor $TAR_FILE # Sign the tarball ### Cleanup diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 781cef325..882be1022 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -125,6 +125,8 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent ) m_encryptWidget->hide(); m_reuseHomeCheckBox->hide(); gs->insert( "reuseHome", false ); + + updateNextEnabled(); } @@ -478,6 +480,7 @@ ChoicePage::onActionChanged() m_encryptWidget->show(); } } + updateNextEnabled(); } void @@ -1205,6 +1208,8 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice ) m_beforePartitionBarsView->setSelectionMode( previewSelectionMode ); m_beforePartitionLabelsView->setSelectionMode( previewSelectionMode ); + + updateNextEnabled(); } @@ -1610,35 +1615,27 @@ ChoicePage::isNextEnabled() const bool ChoicePage::calculateNextEnabled() const { - bool enabled = false; auto sm_p = m_beforePartitionBarsView ? m_beforePartitionBarsView->selectionModel() : nullptr; switch ( m_config->installChoice() ) { case InstallChoice::NoChoice: - cDebug() << "No partitioning choice"; + cDebug() << "No partitioning choice has been made yet"; return false; case InstallChoice::Replace: case InstallChoice::Alongside: if ( !( sm_p && sm_p->currentIndex().isValid() ) ) { - cDebug() << "No partition selected"; + cDebug() << "No partition selected for alongside or replace"; return false; } - enabled = true; break; case InstallChoice::Erase: case InstallChoice::Manual: - enabled = true; + // Nothing to check for these + break; } - if ( !enabled ) - { - cDebug() << "No valid choice made"; - return false; - } - - if ( m_isEfi && ( m_config->installChoice() == InstallChoice::Alongside || m_config->installChoice() == InstallChoice::Replace ) ) @@ -1655,7 +1652,7 @@ ChoicePage::calculateNextEnabled() const switch ( m_encryptWidget->state() ) { case EncryptWidget::Encryption::Unconfirmed: - cDebug() << "No passphrase provided"; + cDebug() << "No passphrase provided or passphrase mismatch."; return false; case EncryptWidget::Encryption::Disabled: case EncryptWidget::Encryption::Confirmed: diff --git a/src/modules/partition/gui/EncryptWidget.cpp b/src/modules/partition/gui/EncryptWidget.cpp index 41272bc4b..7c17de7af 100644 --- a/src/modules/partition/gui/EncryptWidget.cpp +++ b/src/modules/partition/gui/EncryptWidget.cpp @@ -85,7 +85,26 @@ EncryptWidget::reset( bool checkVisible ) EncryptWidget::Encryption EncryptWidget::state() const { - return m_state; + Encryption newState = Encryption::Unconfirmed; + + if ( m_ui->m_encryptCheckBox->isChecked() || !m_ui->m_encryptCheckBox->isVisible() ) + { + if ( !m_ui->m_passphraseLineEdit->text().isEmpty() + && m_ui->m_passphraseLineEdit->text() == m_ui->m_confirmLineEdit->text() ) + { + newState = Encryption::Confirmed; + } + else + { + newState = Encryption::Unconfirmed; + } + } + else + { + newState = Encryption::Disabled; + } + + return newState; } @@ -148,23 +167,7 @@ EncryptWidget::updateState() } } - Encryption newState; - if ( m_ui->m_encryptCheckBox->isChecked() || !m_ui->m_encryptCheckBox->isVisible() ) - { - if ( !m_ui->m_passphraseLineEdit->text().isEmpty() - && m_ui->m_passphraseLineEdit->text() == m_ui->m_confirmLineEdit->text() ) - { - newState = Encryption::Confirmed; - } - else - { - newState = Encryption::Unconfirmed; - } - } - else - { - newState = Encryption::Disabled; - } + Encryption newState = state(); if ( newState != m_state ) { diff --git a/src/modules/users/TestSetHostNameJob.cpp b/src/modules/users/TestSetHostNameJob.cpp index d1a556824..38b1f2cdb 100644 --- a/src/modules/users/TestSetHostNameJob.cpp +++ b/src/modules/users/TestSetHostNameJob.cpp @@ -140,7 +140,7 @@ UsersTests::testHostnamed() // then this one should, also; or, if the previous one failed, then this // changes to whatever-the-hostname-is, and systemd dbus seems to call that // a success, as well (since nothing changes). So no failure-expectation here. - // QEXPECT_FAIL( "", "Hostname changes are access-controlled (restore)", Continue ); + QEXPECT_FAIL( "", "Hostname changes are access-controlled (restore)", Continue ); QVERIFY( setSystemdHostname( m_originalHostName ) ); } }