From ac31dfe8382f9d3709fa8f3d5b7c403c1560568c Mon Sep 17 00:00:00 2001 From: Aaron Rainbolt Date: Wed, 16 Apr 2025 18:26:31 -0500 Subject: [PATCH] Much fix, very fix, wow --- .../pkgselect/PackageSelectViewStep.cpp | 5 ++- common/modules/pkgselect/pkgselect.conf | 4 -- .../pkgselectprocess/PackageSelectProcess.cpp | 43 +++++++++++-------- debian/changelog | 20 ++++++--- debian/control | 1 + kubuntu/modules/pkgselect.conf | 4 -- lubuntu/modules/pkgselect.conf | 4 -- ubuntuunity/modules/pkgselect.conf | 4 -- 8 files changed, 43 insertions(+), 42 deletions(-) diff --git a/common/modules/pkgselect/PackageSelectViewStep.cpp b/common/modules/pkgselect/PackageSelectViewStep.cpp index 0bc6da3..d48edfd 100644 --- a/common/modules/pkgselect/PackageSelectViewStep.cpp +++ b/common/modules/pkgselect/PackageSelectViewStep.cpp @@ -100,7 +100,8 @@ void PackageSelectViewStep::onActivate() bool hasInternet = network.hasInternet(); // Handle network unavailability - if (!hasInternet) { + //if (!hasInternet) { + // Disable almost all fancy features to avoid bugs, revert in 25.10 cycle ui->full_button->setVisible(false); ui->full_text->setVisible(false); @@ -114,7 +115,7 @@ void PackageSelectViewStep::onActivate() ui->extraparty_scroll->setVisible(false); ui->extraparty_text->setVisible(false); ui->mandatory_warning_label->setVisible(false); - } + //} // Dynamically create package checkboxes only once if (m_packageCheckBoxes.isEmpty()) { diff --git a/common/modules/pkgselect/pkgselect.conf b/common/modules/pkgselect/pkgselect.conf index d73df8f..90d6b33 100644 --- a/common/modules/pkgselect/pkgselect.conf +++ b/common/modules/pkgselect/pkgselect.conf @@ -9,10 +9,6 @@ packages: name: "Thunderbird" description: "Email, newsfeed, chat, and calendaring client." snap: true - - id: "virt-manager" - name: "Virtual Machine Manager" - description: "Desktop user interface for managing virtual machines through libvirt." - snap: false - id: "krita" name: "Krita" description: "Graphics editor designed primarily for digital art and 2D animation." diff --git a/common/modules/pkgselectprocess/PackageSelectProcess.cpp b/common/modules/pkgselectprocess/PackageSelectProcess.cpp index 3fa5b91..ce0ec42 100644 --- a/common/modules/pkgselectprocess/PackageSelectProcess.cpp +++ b/common/modules/pkgselectprocess/PackageSelectProcess.cpp @@ -62,9 +62,12 @@ Calamares::JobResult PackageSelectProcess::runAptCommand(const QString& command, QRegularExpression getRegex(R"(Get:\d+\s+[^ ]+\s+[^ ]+\s+(.+?)\s+\S+\s+(\S+)\s+\[(.*?)\])"); connect(&aptProcess, &QProcess::readyReadStandardOutput, this, - [this, &aptProcess, &lineCount, progressPerLine, startProgress, endProgress, verboseProgress, commandHRPrefix, getRegex]() mutable { - while (aptProcess.canReadLine()) { - QString line = QString::fromUtf8(aptProcess.readLine()).trimmed(); + [this, &lineCount, progressPerLine, startProgress, endProgress, verboseProgress, commandHRPrefix, getRegex]() { + QProcess *aptProcess = (QProcess *)(QObject::sender()); + if (aptProcess == NULL) return; + while (aptProcess->canReadLine()) { + QString line = QString::fromUtf8(aptProcess->readLine()).trimmed(); + qDebug() << "Apt log line: " << line; if (line.isEmpty()) { continue; } @@ -145,7 +148,7 @@ Calamares::JobResult PackageSelectProcess::runSnapCommand(const QStringList& sna QString currentDescription; - connect(&snapProcess, &QProcess::readyReadStandardOutput, this, + connect(&snapProcess, &QProcess::readyReadStandardOutput, this, [&snapProcess, this, ¤tDescription, startProgress, endProgress]( ) { while (snapProcess.canReadLine()) { QString line = QString::fromUtf8(snapProcess.readLine()).trimmed(); @@ -281,7 +284,7 @@ Calamares::JobResult PackageSelectProcess::exec() const QVariantMap installationData = gs->value("installation_data").toMap(); const QString installationMode = installationData.value("installation_mode").toString(); - const bool hasInternet = installationData.value("hasInternet").toBool(); + const bool hasInternet = gs->value("hasInternet").toBool(); const bool downloadUpdates = (installationData.value("download_updates").toBool() && hasInternet); const QVariantList packagesToInstall = installationData.value("packages_to_install").toList(); const QVariantList packagesToRemove = installationData.value("packages_to_remove").toList(); @@ -293,6 +296,10 @@ Calamares::JobResult PackageSelectProcess::exec() rootMountPoint = gs->value("rootMountPoint").toString(); } + const QString checkpackage_path = "/usr/libexec/checkpackage-backend"; + const QString chroot_checkpackage_path = rootMountPoint + checkpackage_path; + QFile* cpbe = new QFile(chroot_checkpackage_path); + static const QMap> allocationMap = { { "minimal", { {0.0, 1.0} } }, { "normal", { {0.0, 0.4}, {0.4, 1.0} } }, @@ -389,9 +396,6 @@ Calamares::JobResult PackageSelectProcess::exec() qDebug() << "Progress range: installStart:" << installStart << "installEnd:" << installEnd; if (!debPackages.isEmpty()) { - const QString checkpackage_path = "/usr/libexec/checkpackage-backend"; - const QString chroot_checkpackage_path = rootMountPoint + checkpackage_path; - // Corresponding to the temporary hack in pkgselect adding calamares // and kdialog to the list, we only want those two included in the // final installation if we're actually in OEM mode. Otherwise, they @@ -412,26 +416,25 @@ Calamares::JobResult PackageSelectProcess::exec() // checkpackage-backend needs to be explicitly copied to the chroot // and removed later for systems with stacked squashfses, or the // install command will fail. LP: #2104243 - QFile* cpbe = new QFile(chroot_checkpackage_path); if (!cpbe->exists()) { QFile* parent_cpbe = new QFile(checkpackage_path); if (!parent_cpbe->copy(chroot_checkpackage_path)) { return Calamares::JobResult::error(tr("Internal Error"), tr("Permission denied when copying checkpackage-backend, are you running Calamares correctly?")); } + } - const QString packageList = debPackages.join(" "); - const QString installCommand = QString("DEBIAN_FRONTEND=noninteractive apt-get -y install $(/usr/libexec/checkpackage-backend %1);").arg(packageList); + const QString packageList = debPackages.join(" "); + const QString installCommand = QString("DEBIAN_FRONTEND=noninteractive apt-get -y install $(/usr/libexec/checkpackage-backend %1);").arg(packageList); - Calamares::JobResult installResult = runAptCommand(installCommand, - rootMountPoint, - installStart, - installEnd, - true); - if (!cpbe->remove()) qDebug() << "Warning: failed to clean up /usr/libexec/checkpackage-backend"; - if (!installResult) return std::move(installResult); - } else { + Calamares::JobResult installResult = runAptCommand(installCommand, + rootMountPoint, + installStart, + installEnd, + true); + if (!installResult) { if (!cpbe->remove()) qDebug() << "Warning: failed to clean up /usr/libexec/checkpackage-backend"; + return std::move(installResult); } } else qDebug() << "No packages to install."; @@ -564,5 +567,7 @@ Calamares::JobResult PackageSelectProcess::exec() m_prettyStatus = tr("All selected packages installed successfully."); emit prettyStatusMessageChanged(m_prettyStatus); + if (!cpbe->remove()) qDebug() << "Warning: failed to clean up /usr/libexec/checkpackage-backend"; + return Calamares::JobResult::ok(); } diff --git a/debian/changelog b/debian/changelog index 561222f..981127d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +calamares-settings-ubuntu (1:25.04.27) plucky; urgency=medium + + * Disable virt-manager installation in third-party software options, as the + package is broken when installed by pkgselect. + * Remove full installation and third-party software options from all + flavors. + * Fix segfaults during installation. (LP: #2107486) + + -- Aaron Rainbolt Wed, 16 Apr 2025 18:23:56 -0500 + calamares-settings-ubuntu (1:25.04.26) plucky; urgency=medium * [bootloader] Instead of utilizing a contextualprocess to only bind-mount @@ -87,8 +97,8 @@ calamares-settings-ubuntu (1:25.04.23) plucky; urgency=medium calamares-settings-ubuntu (1:25.04.22) plucky; urgency=medium - * [Unity] Update welcome slide for Plucky. - * [Unity] Set Kvantum theme to KvGnomeDark for Calamares. + * [Unity] Update welcome slide for Plucky. + * [Unity] Set Kvantum theme to KvGnomeDark for Calamares. -- Walter Lapchynski Wed, 26 Mar 2025 00:05:56 +0000 @@ -108,19 +118,19 @@ calamares-settings-ubuntu (1:25.04.19) plucky; urgency=medium * [Lubuntu] Update slides for current applications: * Support: IRC -> Matrix, Lubuntu -> Ubuntu Discourse - * Lightweight: KCalc -> Qalc + * Lightweight: KCalc -> Qalc -- Walter Lapchynski Fri, 07 Mar 2025 03:21:03 +0000 calamares-settings-ubuntu (1:25.04.18) plucky; urgency=medium - * Add python3 as build-dep. + * Add python3 as build-dep. -- Walter Lapchynski Fri, 07 Mar 2025 01:11:36 +0000 calamares-settings-ubuntu (1:25.04.17) plucky; urgency=medium - * [Lubuntu] Update welcome slides for Plucky. + * [Lubuntu] Update welcome slides for Plucky. -- Walter Lapchynski Thu, 06 Mar 2025 10:23:08 +0000 diff --git a/debian/control b/debian/control index 9ce53fa..6cab9dd 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,7 @@ Build-Depends: debhelper-compat (= 13), dh-sequence-qmldeps, cmake, extra-cmake-modules, + fakeroot, intltool, libapt-pkg-dev, libcalamares-dev (>= 3.3.13-0ubuntu4), diff --git a/kubuntu/modules/pkgselect.conf b/kubuntu/modules/pkgselect.conf index 45e89be..821f779 100644 --- a/kubuntu/modules/pkgselect.conf +++ b/kubuntu/modules/pkgselect.conf @@ -5,10 +5,6 @@ packages: name: "Element" description: "Matrix-based end-to-end encrypted messenger and secure collaboration app." snap: true - - id: "virt-manager" - name: "Virtual Machine Manager" - description: "Desktop user interface for managing virtual machines through libvirt." - snap: false - id: "krita" name: "Krita" description: "Graphics editor designed primarily for digital art and 2D animation." diff --git a/lubuntu/modules/pkgselect.conf b/lubuntu/modules/pkgselect.conf index 5f6e613..4184ebe 100644 --- a/lubuntu/modules/pkgselect.conf +++ b/lubuntu/modules/pkgselect.conf @@ -10,10 +10,6 @@ packages: name: "Thunderbird" description: "Email, newsfeed, chat, and calendaring client." snap: true - - id: "virt-manager" - name: "Virtual Machine Manager" - description: "Desktop user interface for managing virtual machines through libvirt." - snap: false - id: "krita" name: "Krita" description: "Graphics editor designed primarily for digital art and 2D animation." diff --git a/ubuntuunity/modules/pkgselect.conf b/ubuntuunity/modules/pkgselect.conf index fe445cb..2533796 100644 --- a/ubuntuunity/modules/pkgselect.conf +++ b/ubuntuunity/modules/pkgselect.conf @@ -9,10 +9,6 @@ packages: name: "Thunderbird" description: "Email, newsfeed, chat, and calendaring client." snap: true - - id: "virt-manager" - name: "Virtual Machine Manager" - description: "Desktop user interface for managing virtual machines through libvirt." - snap: false - id: "krita" name: "Krita" description: "Graphics editor designed primarily for digital art and 2D animation."