diff --git a/CHANGES b/CHANGES index 0ecaafb51..db5b75f82 100644 --- a/CHANGES +++ b/CHANGES @@ -3,7 +3,19 @@ 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.19 (unreleased) # +# 3.2.20 (unreleased) # + +This release contains contributions from (alphabetically by first name): + - No external contributors yet + +## Core ## + - No core changes yet + +## Modules ## + - No module changes yet + + +# 3.2.19 (2020-02-21) # This release contains contributions from (alphabetically by first name): - Anke Boersma @@ -39,6 +51,10 @@ This release contains contributions from (alphabetically by first name): Previously, a netinstall module would overwrite all of the package configuration done by other netinstall modules. Translations can be provided in the configuration file, `netinstall.conf`. #1303 + - The *fstab* module no longer "claims" all the swap partitions it finds + on disk. It only uses swap specified for the current installation. + This means that "replace" and "alongside" installations will have + no swap configured in the target system. # 3.2.18 (2020-01-28) # diff --git a/CMakeLists.txt b/CMakeLists.txt index 6097225b5..db8fab382 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ cmake_minimum_required( VERSION 3.3 FATAL_ERROR ) project( CALAMARES - VERSION 3.2.18.2 + VERSION 3.2.19 LANGUAGES C CXX ) set( CALAMARES_VERSION_RC 0 ) # Set to 0 during release cycle, 1 during development diff --git a/ci/RELEASE.md b/ci/RELEASE.md index 5293abf6b..524a67a65 100644 --- a/ci/RELEASE.md +++ b/ci/RELEASE.md @@ -120,3 +120,16 @@ text *not released yet*. * Commit and push that, usually with the message *Changes: post-release housekeeping*. + +``` +# 3.2.XX (unreleased) # + +This release contains contributions from (alphabetically by first name): + - No external contributors yet + +## Core ## + - No core changes yet + +## Modules ## + - No module changes yet +``` diff --git a/src/libcalamares/locale/Tests.cpp b/src/libcalamares/locale/Tests.cpp index b63eb9e18..bf71fb0a2 100644 --- a/src/libcalamares/locale/Tests.cpp +++ b/src/libcalamares/locale/Tests.cpp @@ -128,8 +128,8 @@ LocaleTests::testTranslatableConfig1() QCOMPARE( ts1.count(), 1 ); QVERIFY( !ts1.isEmpty() ); - QCOMPARE( ts1.get(), "Hello" ); - QCOMPARE( ts1.get( QLocale( "nl" ) ), "Hello" ); + QCOMPARE( ts1.get(), QStringLiteral( "Hello" ) ); + QCOMPARE( ts1.get( QLocale( "nl" ) ), QStringLiteral( "Hello" ) ); QVariantMap map; map.insert( "description", "description (no language)" ); @@ -137,8 +137,8 @@ LocaleTests::testTranslatableConfig1() QCOMPARE( ts2.count(), 1 ); QVERIFY( !ts2.isEmpty() ); - QCOMPARE( ts2.get(), "description (no language)" ); - QCOMPARE( ts2.get( QLocale( "nl" ) ), "description (no language)" ); + QCOMPARE( ts2.get(), QStringLiteral( "description (no language)" ) ); + QCOMPARE( ts2.get( QLocale( "nl" ) ), QStringLiteral( "description (no language)" ) ); } /** @bref Test strings with translations. @@ -173,8 +173,8 @@ LocaleTests::testTranslatableConfig2() QCOMPARE( ts1.count(), someLanguages().count() + 1 ); QVERIFY( !ts1.isEmpty() ); - QCOMPARE( ts1.get(), "description (no language)" ); // it wasn't set - QCOMPARE( ts1.get( QLocale( "nl" ) ), "description (language nl)" ); + QCOMPARE( ts1.get(), QStringLiteral( "description (no language)" ) ); // it wasn't set + QCOMPARE( ts1.get( QLocale( "nl" ) ), QStringLiteral( "description (language nl)" ) ); for ( const auto& language : someLanguages() ) { // Skip Serbian (latin) because QLocale() constructed with it @@ -188,7 +188,7 @@ LocaleTests::testTranslatableConfig2() language ); } QCOMPARE( ts1.get( QLocale( QLocale::Language::Serbian, QLocale::Script::LatinScript, QLocale::Country::Serbia ) ), - "description (language sr@latin)" ); + QStringLiteral( "description (language sr@latin)" ) ); CalamaresUtils::Locale::TranslatedString ts2( map, "name" ); // We skipped dutch this time diff --git a/src/libcalamares/utils/Tests.cpp b/src/libcalamares/utils/Tests.cpp index 34701a940..d50abef39 100644 --- a/src/libcalamares/utils/Tests.cpp +++ b/src/libcalamares/utils/Tests.cpp @@ -162,7 +162,7 @@ LibCalamaresTests::testUmask() // m gets the previous value of the mask (depends on the environment the // test is run in, might be 002, might be 077), .. mode_t m = CalamaresUtils::setUMask( 022 ); - QCOMPARE( CalamaresUtils::setUMask( m ), 022 ); // But now most recently set was 022 + QCOMPARE( CalamaresUtils::setUMask( m ), mode_t( 022 ) ); // But now most recently set was 022 for ( mode_t i = 0; i <= 0777 /* octal! */; ++i ) { @@ -178,7 +178,7 @@ LibCalamaresTests::testUmask() QCOMPARE( unlink( name ), 0 ); } QCOMPARE( CalamaresUtils::setUMask( 022 ), m ); - QCOMPARE( CalamaresUtils::setUMask( m ), 022 ); + QCOMPARE( CalamaresUtils::setUMask( m ), mode_t( 022 ) ); } void @@ -219,7 +219,7 @@ LibCalamaresTests::testPrintableEntropy() for ( QChar c : s ) { QVERIFY( c.isPrint() ); - QCOMPARE( c.row(), 0 ); + QCOMPARE( c.row(), uchar( 0 ) ); QVERIFY( c.cell() > 32 ); // ASCII SPACE QVERIFY( c.cell() < 127 ); } @@ -245,7 +245,7 @@ LibCalamaresTests::testOddSizedPrintable() for ( QChar c : s ) { QVERIFY( c.isPrint() ); - QCOMPARE( c.row(), 0 ); + QCOMPARE( c.row(), uchar( 0 ) ); QVERIFY( c.cell() > 32 ); // ASCII SPACE QVERIFY( c.cell() < 127 ); } diff --git a/src/modules/initramfs/Tests.cpp b/src/modules/initramfs/Tests.cpp index a9e0ce44c..04910f724 100644 --- a/src/modules/initramfs/Tests.cpp +++ b/src/modules/initramfs/Tests.cpp @@ -79,7 +79,7 @@ void InitramfsTests::testCreateTargetFile() QFileInfo fi( path ); QVERIFY( fi.exists() ); - QCOMPARE( fi.size(), sizeof( contents )-1 ); // don't count trailing NUL + QCOMPARE( ulong( fi.size() ), sizeof( contents )-1 ); // don't count trailing NUL QFile::remove( path ); diff --git a/src/modules/locale/Tests.cpp b/src/modules/locale/Tests.cpp index b8e471339..83a2d42ff 100644 --- a/src/modules/locale/Tests.cpp +++ b/src/modules/locale/Tests.cpp @@ -48,13 +48,13 @@ LocaleTests::testDefaultLocaleConfiguration() { LocaleConfiguration lc( "en_US.UTF-8" ); QVERIFY( !lc.isEmpty() ); - QCOMPARE( lc.language(), "en_US.UTF-8" ); - QCOMPARE( lc.toBcp47(), "en" ); + QCOMPARE( lc.language(), QStringLiteral( "en_US.UTF-8" ) ); + QCOMPARE( lc.toBcp47(), QStringLiteral( "en" ) ); LocaleConfiguration lc2( "de_DE.UTF-8" ); QVERIFY( !lc2.isEmpty() ); - QCOMPARE( lc2.language(), "de_DE.UTF-8" ); - QCOMPARE( lc2.toBcp47(), "de" ); + QCOMPARE( lc2.language(), QStringLiteral( "de_DE.UTF-8" ) ); + QCOMPARE( lc2.toBcp47(), QStringLiteral( "de" ) ); } void @@ -62,18 +62,18 @@ LocaleTests::testSplitLocaleConfiguration() { LocaleConfiguration lc( "en_US.UTF-8", "de_DE.UTF-8" ); QVERIFY( !lc.isEmpty() ); - QCOMPARE( lc.language(), "en_US.UTF-8" ); - QCOMPARE( lc.toBcp47(), "en" ); + QCOMPARE( lc.language(), QStringLiteral( "en_US.UTF-8" ) ); + QCOMPARE( lc.toBcp47(), QStringLiteral( "en" ) ); QCOMPARE( lc.lc_numeric, QStringLiteral( "de_DE.UTF-8" ) ); LocaleConfiguration lc2( "de_DE.UTF-8", "da_DK.UTF-8" ); QVERIFY( !lc2.isEmpty() ); - QCOMPARE( lc2.language(), "de_DE.UTF-8" ); - QCOMPARE( lc2.toBcp47(), "de" ); - QCOMPARE( lc2.lc_numeric, "da_DK.UTF-8" ); + QCOMPARE( lc2.language(), QStringLiteral( "de_DE.UTF-8" ) ); + QCOMPARE( lc2.toBcp47(), QStringLiteral( "de" ) ); + QCOMPARE( lc2.lc_numeric, QStringLiteral( "da_DK.UTF-8" ) ); LocaleConfiguration lc3( "da_DK.UTF-8", "de_DE.UTF-8" ); QVERIFY( !lc3.isEmpty() ); - QCOMPARE( lc3.toBcp47(), "da" ); - QCOMPARE( lc3.lc_numeric, "de_DE.UTF-8" ); + QCOMPARE( lc3.toBcp47(), QStringLiteral( "da" ) ); + QCOMPARE( lc3.lc_numeric, QStringLiteral( "de_DE.UTF-8" ) ); } diff --git a/src/modules/machineid/Tests.cpp b/src/modules/machineid/Tests.cpp index 4600633b0..2b6a9b1d1 100644 --- a/src/modules/machineid/Tests.cpp +++ b/src/modules/machineid/Tests.cpp @@ -108,6 +108,10 @@ MachineIdTests::testJob() { Logger::setupLogLevel( Logger::LOGDEBUG ); + QTemporaryDir tempRoot( QDir::tempPath() + QStringLiteral( "/test-job-XXXXXX" ) ); + tempRoot.setAutoRemove( false ); + cDebug() << "Temporary files as" << QDir::tempPath(); + // Ensure we have a system object, expect it to be a "bogus" one CalamaresUtils::System* system = CalamaresUtils::System::instance(); QVERIFY( system ); @@ -122,7 +126,7 @@ MachineIdTests::testJob() Calamares::GlobalStorage* gs = Calamares::JobQueue::instance() ? Calamares::JobQueue::instance()->globalStorage() : nullptr; QVERIFY( gs ); - gs->insert( "rootMountPoint", "/tmp" ); + gs->insert( "rootMountPoint", tempRoot.path() ); // Prepare part of the target filesystem { @@ -143,7 +147,7 @@ MachineIdTests::testJob() { auto r = job.exec(); QVERIFY( !r ); // It's supposed to fail, because no dbus-uuidgen executable exists - QVERIFY( QFile::exists( "/tmp/var/lib/dbus" ) ); // but the target dir exists + QVERIFY( QFile::exists( tempRoot.filePath( "var/lib/dbus" ) ) ); // but the target dir exists } config.insert( "dbus-symlink", true ); @@ -151,7 +155,7 @@ MachineIdTests::testJob() { auto r = job.exec(); QVERIFY( !r ); // It's supposed to fail, because no dbus-uuidgen executable exists - QVERIFY( QFile::exists( "/tmp/var/lib/dbus" ) ); // but the target dir exists + QVERIFY( QFile::exists( tempRoot.filePath( "var/lib/dbus" ) ) ); // but the target dir exists // These all (would) fail, because the chroot isn't viable #if 0 @@ -163,6 +167,7 @@ MachineIdTests::testJob() QCOMPARE( fi.size(), 5); #endif } + tempRoot.setAutoRemove( true ); // All tests succeeded } QTEST_GUILESS_MAIN( MachineIdTests ) diff --git a/src/modules/packagechooser/Tests.cpp b/src/modules/packagechooser/Tests.cpp index 639d06d65..da355dc96 100644 --- a/src/modules/packagechooser/Tests.cpp +++ b/src/modules/packagechooser/Tests.cpp @@ -71,21 +71,21 @@ PackageChooserTests::testAppData() #ifdef HAVE_XML PackageItem p1 = fromAppData( m ); QVERIFY( p1.isValid() ); - QCOMPARE( p1.id, "io.calamares.calamares.desktop" ); - QCOMPARE( p1.name.get(), "Calamares" ); + QCOMPARE( p1.id, QStringLiteral( "io.calamares.calamares.desktop" ) ); + QCOMPARE( p1.name.get(), QStringLiteral( "Calamares" ) ); // The entry has precedence - QCOMPARE( p1.description.get(), "Calamares is an installer program for Linux distributions." ); + QCOMPARE( p1.description.get(), QStringLiteral( "Calamares is an installer program for Linux distributions." ) ); // .. but en_GB doesn't have an entry in description, so uses - QCOMPARE( p1.description.get( QLocale( "en_GB" ) ), "Calamares Linux Installer" ); - QCOMPARE( p1.description.get( QLocale( "nl" ) ), "Calamares is een installatieprogramma voor Linux distributies." ); + QCOMPARE( p1.description.get( QLocale( "en_GB" ) ), QStringLiteral( "Calamares Linux Installer" ) ); + QCOMPARE( p1.description.get( QLocale( "nl" ) ), QStringLiteral( "Calamares is een installatieprogramma voor Linux distributies." ) ); QVERIFY( p1.screenshot.isNull() ); m.insert( "id", "calamares" ); m.insert( "screenshot", ":/images/calamares.png" ); PackageItem p2 = fromAppData( m ); QVERIFY( p2.isValid() ); - QCOMPARE( p2.id, "calamares" ); - QCOMPARE( p2.description.get( QLocale( "nl" ) ), "Calamares is een installatieprogramma voor Linux distributies." ); + QCOMPARE( p2.id, QStringLiteral( "calamares" ) ); + QCOMPARE( p2.description.get( QLocale( "nl" ) ), QStringLiteral( "Calamares is een installatieprogramma voor Linux distributies." ) ); QVERIFY( !p2.screenshot.isNull() ); #endif } diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index d3a7198e9..b08315968 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -133,7 +133,7 @@ def file_copy(source, entry, progress_cb): args.extend(["--exclude", f]) args.extend(['--progress', source, dest]) process = subprocess.Popen( - args, env=at_env, universal_newlines=True, bufsize=1, + args, env=at_env, stdout=subprocess.PIPE, close_fds=ON_POSIX ) # last_num_files_copied trails num_files_copied, and whenever at least 100 more