From aabcd6ba86c102a15ec50972732b6aeb99573e22 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 13 Oct 2017 16:45:37 -0300 Subject: [PATCH 01/11] Bump version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0017a29cf..0ca5efb80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,7 +166,7 @@ set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX ### Bump version here set( CALAMARES_VERSION_MAJOR 3 ) set( CALAMARES_VERSION_MINOR 1 ) -set( CALAMARES_VERSION_PATCH 5 ) +set( CALAMARES_VERSION_PATCH 6 ) set( CALAMARES_VERSION_RC 0 ) set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} ) From 4314f2c4ad1566d3070db1629724f7eafffb46a6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 11:10:18 -0400 Subject: [PATCH 02/11] Netinstall: fix datatype passed to packages module - Each element of the (list) packageOperations needs to be a package operation, which is a dictionary with keys (identifying actions) and lists of packages (which may be strings or script-info dictionaries). --- src/modules/netinstall/NetInstallViewStep.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index c714418df..2909af79a 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -126,10 +126,11 @@ NetInstallViewStep::onLeave() cDebug() << "Leaving netinstall, adding packages to be installed" << "to global storage"; - QMap packagesWithOperation; QList packages = m_widget->selectedPackages(); QVariantList installPackages; QVariantList tryInstallPackages; + QVariantList packageOperations; + cDebug() << "Processing"; for ( auto package : packages ) @@ -145,14 +146,22 @@ NetInstallViewStep::onLeave() } if ( !installPackages.empty() ) - packagesWithOperation.insert( "install", QVariant( installPackages ) ); + { + QMap op; + op.insert( "install", QVariant( installPackages ) ); + packageOperations.append(op); + } if ( !tryInstallPackages.empty() ) - packagesWithOperation.insert( "try_install", QVariant( tryInstallPackages ) ); + { + QMap op; + op.insert( "try_install", QVariant( tryInstallPackages ) ); + packageOperations.append(op); + } - if ( !packagesWithOperation.isEmpty() ) + if ( !packageOperations.isEmpty() ) { Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - gs->insert( "packageOperations", QVariant( packagesWithOperation ) ); + gs->insert( "packageOperations", QVariant( packageOperations ) ); } } From 58414666c87aac8aae685323bc8585cdf1f1089b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 11:15:19 -0400 Subject: [PATCH 03/11] Netinstall: optimize structure for packages - If there's no scripts involved in a package for netinstall, just name it without the scripts; this lets the packages module optimize to fewer package manager calls. --- src/modules/netinstall/NetInstallViewStep.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 2909af79a..63f1bb6f6 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -135,10 +135,17 @@ NetInstallViewStep::onLeave() for ( auto package : packages ) { - QMap details; - details.insert( "pre-script", package.preScript ); - details.insert( "package", package.packageName ); - details.insert( "post-script", package.postScript ); + QVariant details( package.packageName ); + // If it's a package with a pre- or post-script, replace + // with the more complicated datastructure. + if (!package.preScript.isEmpty() || !package.postScript.isEmpty()) + { + QMap sdetails; + sdetails.insert( "pre-script", package.preScript ); + sdetails.insert( "package", package.packageName ); + sdetails.insert( "post-script", package.postScript ); + details = sdetails; + } if ( package.isCritical ) installPackages.append( details ); else From 36a711c87fb7e58d76552302614a4956c6d7fee2 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 11:44:39 -0400 Subject: [PATCH 04/11] Netinstall: fix misleading message (thanks to @abucodonosor) --- src/modules/netinstall/NetInstallPage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 7bfda320c..f0bc9d93d 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -101,7 +101,7 @@ NetInstallPage::dataIsHere( QNetworkReply* reply ) if ( !readGroups( reply->readAll() ) ) { cDebug() << "Netinstall groups data was received, but invalid."; - ui->netinst_status->setText( tr( "Network Installation. (Disabled: Unable to fetch package lists, check your network connection)" ) ); + ui->netinst_status->setText( tr( "Network Installation. (Disabled: Received invalid groups data)" ) ); reply->deleteLater(); return; } From 9b5772c4820f3bda81e0ec3680162261cfc16185 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 11:48:54 -0400 Subject: [PATCH 05/11] Keyboard: warn about missing ckbcomp, thanks @abucodonosor --- src/modules/keyboard/keyboard.conf | 2 ++ src/modules/keyboard/keyboardwidget/keyboardpreview.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/modules/keyboard/keyboard.conf b/src/modules/keyboard/keyboard.conf index 9f8f27524..ee97c3939 100644 --- a/src/modules/keyboard/keyboard.conf +++ b/src/modules/keyboard/keyboard.conf @@ -1,3 +1,5 @@ +# NOTE: you must have ckbcomp installed and runnable +# on the live system, for keyboard layout previews. --- # The name of the file to write X11 keyboard settings to # The default value is the name used by upstream systemd-localed. diff --git a/src/modules/keyboard/keyboardwidget/keyboardpreview.cpp b/src/modules/keyboard/keyboardwidget/keyboardpreview.cpp index f9fdf72e8..2916cbdf4 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardpreview.cpp +++ b/src/modules/keyboard/keyboardwidget/keyboardpreview.cpp @@ -20,6 +20,7 @@ * along with Calamares. If not, see . */ +#include "utils/Logger.h" #include "keyboardpreview.h" KeyBoardPreview::KeyBoardPreview( QWidget* parent ) @@ -113,10 +114,16 @@ bool KeyBoardPreview::loadCodes() { process.setEnvironment(QStringList() << "LANG=C" << "LC_MESSAGES=C"); process.start("ckbcomp", param); if (!process.waitForStarted()) + { + cDebug() << "WARNING: ckbcomp not found , keyboard preview disabled"; return false; + } if (!process.waitForFinished()) + { + cDebug() << "WARNING: ckbcomp failed, keyboard preview disabled"; return false; + } // Clear codes codes.clear(); From 10ede796f80a1655dde9de993e25e14de3defc27 Mon Sep 17 00:00:00 2001 From: Philip Date: Mon, 23 Oct 2017 12:52:40 -0400 Subject: [PATCH 06/11] [bootloader] use generic file names instead of grub - this fixes #839 --- src/modules/bootloader/main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index c2cdc1108..ecc305503 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -8,7 +8,7 @@ # Copyright 2014, Daniel Hillenbrand # Copyright 2014, Benjamin Vaudour # Copyright 2014, Kevin Kofler -# Copyright 2015, Philip Mueller +# Copyright 2015-2017, Philip Mueller # Copyright 2016-2017, Teo Mrnjavac # Copyright 2017, Alf Gaida # Copyright 2017, Adriaan de Groot @@ -266,7 +266,13 @@ def install_grub(efi_directory, fw_type): "64": os.path.join(install_efi_directory_firmware, efi_bootloader_id, "grubx64.efi")} - shutil.copy2(efi_file_source[efi_bitness], install_efi_boot_directory) + + efi_file_target = {"32": os.path.join(install_efi_boot_directory, + "bootia32.efi"), + "64": os.path.join(install_efi_boot_directory, + "bootx64.efi")} + + shutil.copy2(efi_file_source[efi_bitness], efi_file_target[efi_bitness]) else: print("Bootloader: grub (bios)") if libcalamares.globalstorage.value("bootLoader") is None: From df84208abcbfd948da975602c9226f92cbb210a5 Mon Sep 17 00:00:00 2001 From: Philip Date: Mon, 23 Oct 2017 12:52:40 -0400 Subject: [PATCH 07/11] [bootloader] use generic file names instead of grub - this fixes #839 --- src/modules/bootloader/main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index c2cdc1108..ecc305503 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -8,7 +8,7 @@ # Copyright 2014, Daniel Hillenbrand # Copyright 2014, Benjamin Vaudour # Copyright 2014, Kevin Kofler -# Copyright 2015, Philip Mueller +# Copyright 2015-2017, Philip Mueller # Copyright 2016-2017, Teo Mrnjavac # Copyright 2017, Alf Gaida # Copyright 2017, Adriaan de Groot @@ -266,7 +266,13 @@ def install_grub(efi_directory, fw_type): "64": os.path.join(install_efi_directory_firmware, efi_bootloader_id, "grubx64.efi")} - shutil.copy2(efi_file_source[efi_bitness], install_efi_boot_directory) + + efi_file_target = {"32": os.path.join(install_efi_boot_directory, + "bootia32.efi"), + "64": os.path.join(install_efi_boot_directory, + "bootx64.efi")} + + shutil.copy2(efi_file_source[efi_bitness], efi_file_target[efi_bitness]) else: print("Bootloader: grub (bios)") if libcalamares.globalstorage.value("bootLoader") is None: From e37460d3d3824693018ef820beb8d5b7c80b15a6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 16:22:25 -0400 Subject: [PATCH 08/11] [ci] Revert bdf8c18126, can't use env-vars in notification step --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f4a11e766..cb5b6daaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ services: notifications: irc: - - "$IRC_NOTIFY_CHANNEL" + - "chat.freenode.net#calamares" install: - docker build -t calamares . From 41f17892d61c27d8c5e3cd49fcce334eca65c2d7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 16:41:12 -0400 Subject: [PATCH 09/11] [packages] Document run_operations() some more --- src/modules/packages/main.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/modules/packages/main.py b/src/modules/packages/main.py index 48caae6bd..bbee9c32d 100644 --- a/src/modules/packages/main.py +++ b/src/modules/packages/main.py @@ -344,10 +344,18 @@ def subst_locale(plist): def run_operations(pkgman, entry): """ - Call package manager with given parameters. + Call package manager with suitable parameters for the given + package actions. - :param pkgman: - :param entry: + :param pkgman: PackageManager + This is the manager that does the actual work. + :param entry: dict + Keys are the actions -- e.g. "install" -- to take, and the values + are the (list of) packages to apply the action to. The actions are + not iterated in a specific order, so it is recommended to use only + one action per dictionary. The list of packages may be package + names (strings) or package information dictionaries with pre- + and post-scripts. """ global group_packages, completed_packages, mode_packages From e6e1e2226c523d0f0f11601f9af137c3f7707db6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 16:46:03 -0400 Subject: [PATCH 10/11] [netinstall] logging about the number of packages to process --- src/modules/netinstall/NetInstallViewStep.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 63f1bb6f6..347b2bf27 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -131,7 +131,7 @@ NetInstallViewStep::onLeave() QVariantList tryInstallPackages; QVariantList packageOperations; - cDebug() << "Processing"; + cDebug() << "Processing" << packages.length() << "packages from netinstall."; for ( auto package : packages ) { @@ -157,12 +157,14 @@ NetInstallViewStep::onLeave() QMap op; op.insert( "install", QVariant( installPackages ) ); packageOperations.append(op); + cDebug() << " .." << installPackages.length() << "critical packages."; } if ( !tryInstallPackages.empty() ) { QMap op; op.insert( "try_install", QVariant( tryInstallPackages ) ); packageOperations.append(op); + cDebug() << " .." << tryInstallPackages.length() << "non-critical packages."; } if ( !packageOperations.isEmpty() ) From a64e6efb85675777da2a48001c948f9ea6d26746 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 24 Oct 2017 07:46:03 -0400 Subject: [PATCH 11/11] Bump version number --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ca5efb80..34be91536 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,7 +166,7 @@ set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX ### Bump version here set( CALAMARES_VERSION_MAJOR 3 ) set( CALAMARES_VERSION_MINOR 1 ) -set( CALAMARES_VERSION_PATCH 6 ) +set( CALAMARES_VERSION_PATCH 7 ) set( CALAMARES_VERSION_RC 0 ) set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} )