From 4826af97a943ee9c702bd0390a296f2146fbc59f Mon Sep 17 00:00:00 2001 From: bill auger Date: Sat, 19 May 2018 18:59:18 -0400 Subject: [PATCH 01/13] consistent indentation in src/modules/netinstall/page_netinst.ui this file has 1 space char indentation except for these lines --- src/modules/netinstall/page_netinst.ui | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/netinstall/page_netinst.ui b/src/modules/netinstall/page_netinst.ui index 15d27cfb4..3aa4e57ec 100644 --- a/src/modules/netinstall/page_netinst.ui +++ b/src/modules/netinstall/page_netinst.ui @@ -35,9 +35,9 @@ - - 11 - + + 11 + From 3160bd7a54ad17fcbbc9802de3a86b77d929d040 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 21 May 2018 10:49:47 -0400 Subject: [PATCH 02/13] [netinstall] Simplify getting configuration - Use convenience methods for getting bools and strings from the configuration map. Ignore empty groupsUrls. --- src/modules/netinstall/NetInstallViewStep.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 50e08486b..5744891cc 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -22,6 +22,8 @@ #include "JobQueue.h" #include "GlobalStorage.h" + +#include "utils/CalamaresUtils.h" #include "utils/Logger.h" #include "NetInstallPage.h" @@ -179,16 +181,12 @@ NetInstallViewStep::onLeave() void NetInstallViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { - m_widget->setRequired( - configurationMap.contains( "required" ) && - configurationMap.value( "required" ).type() == QVariant::Bool && - configurationMap.value( "required" ).toBool() ); + m_widget->setRequired( CalamaresUtils::getBool( configurationMap, "required", false ) ); - if ( configurationMap.contains( "groupsUrl" ) && - configurationMap.value( "groupsUrl" ).type() == QVariant::String ) + QString groupsUrl = CalamaresUtils::getString( configurationMap, "groupsUrl" ); + if ( !groupsUrl.isEmpty() ) { - Calamares::JobQueue::instance()->globalStorage()->insert( - "groupsUrl", configurationMap.value( "groupsUrl" ).toString() ); + Calamares::JobQueue::instance()->globalStorage()->insert( "groupsUrl", groupsUrl ); m_widget->loadGroupList(); } } From ba85fc760a884fa51c302bce7d5e79002d506d85 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 21 May 2018 10:58:57 -0400 Subject: [PATCH 03/13] [netinstall] Remove data-indirection - There is no need to move data around between two parts of the same module via global storage. --- src/modules/netinstall/NetInstallPage.cpp | 8 ++------ src/modules/netinstall/NetInstallPage.h | 13 ++++++++----- src/modules/netinstall/NetInstallViewStep.cpp | 4 +++- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index b7bcdd457..37c489135 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -24,8 +24,8 @@ #include "PackageModel.h" #include "ui_page_netinst.h" -#include "GlobalStorage.h" #include "JobQueue.h" + #include "utils/Logger.h" #include "utils/Retranslator.h" #include "utils/YamlUtils.h" @@ -128,12 +128,8 @@ NetInstallPage::selectedPackages() const } void -NetInstallPage::loadGroupList() +NetInstallPage::loadGroupList( const QString& confUrl ) { - QString confUrl( - Calamares::JobQueue::instance()->globalStorage()->value( - "groupsUrl" ).toString() ); - QNetworkRequest request; request.setUrl( QUrl( confUrl ) ); // Follows all redirects except unsafe ones (https to http). diff --git a/src/modules/netinstall/NetInstallPage.h b/src/modules/netinstall/NetInstallPage.h index 58308412d..3dc8ee46e 100644 --- a/src/modules/netinstall/NetInstallPage.h +++ b/src/modules/netinstall/NetInstallPage.h @@ -25,13 +25,14 @@ #include "PackageTreeItem.h" #include "Typedefs.h" -#include #include #include +#include // required forward declarations class QByteArray; class QNetworkReply; +class QString; namespace Ui { @@ -46,10 +47,12 @@ public: void onActivate(); - // Retrieves the groups, with name, description and packages, from - // the remote URL configured in the settings. Assumes the URL is already - // in the global storage. This should be called before displaying the page. - void loadGroupList(); + /** @brief Retrieves the groups, with name, description and packages + * + * Loads data from the given URL. This should be called before + * displaying the page. + */ + void loadGroupList( const QString& url ); // Sets the "required" state of netinstall data. Influences whether // corrupt or unavailable data causes checkReady() to be emitted diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 5744891cc..de4480cbb 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -186,8 +186,10 @@ NetInstallViewStep::setConfigurationMap( const QVariantMap& configurationMap ) QString groupsUrl = CalamaresUtils::getString( configurationMap, "groupsUrl" ); if ( !groupsUrl.isEmpty() ) { + // Keep putting groupsUrl into the global storage, + // even though it's no longer used for in-module data-passing. Calamares::JobQueue::instance()->globalStorage()->insert( "groupsUrl", groupsUrl ); - m_widget->loadGroupList(); + m_widget->loadGroupList( groupsUrl ); } } From d7b1811e5605f2a63fdefb57bd18088edd3d7d37 Mon Sep 17 00:00:00 2001 From: bill auger Date: Sat, 19 May 2018 19:13:46 -0400 Subject: [PATCH 04/13] avoid pinging hard-coded server for netinstall.yaml groupsUrl is optional and should be commented out by default also this URL is 404 also only chakra would ever want to ping the chakra server anyways --- src/modules/netinstall/netinstall.conf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/netinstall/netinstall.conf b/src/modules/netinstall/netinstall.conf index f5977a267..fe99eb2be 100644 --- a/src/modules/netinstall/netinstall.conf +++ b/src/modules/netinstall/netinstall.conf @@ -1,7 +1,10 @@ --- # This is the URL that is retrieved to get the netinstall groups-and-packages -# data (which should be in the format described in netinstall.yaml). -groupsUrl: http://chakraos.org/netinstall.php +# data (which should be in the format described in netinstall.yaml), e.g.: +# groupsUrl: http://example.org/netinstall.php +# or it can be a locally installed file: +# groupsUrl: file:///usr/share/calamares/netinstall.yaml +# groupsUrl: file:///usr/share/calamares/netinstall.yaml # If the installation can proceed without netinstall (e.g. the Live CD # can create a working installed system, but netinstall is preferred From b6673f6324a2137da9fc3ab046ff4d7da9438149 Mon Sep 17 00:00:00 2001 From: bill auger Date: Tue, 22 May 2018 03:29:01 -0400 Subject: [PATCH 05/13] move thisModule->isLoaded assert to after it's warning message --- src/libcalamaresui/modulesystem/ModuleManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcalamaresui/modulesystem/ModuleManager.cpp b/src/libcalamaresui/modulesystem/ModuleManager.cpp index 7afe5eef8..cbee61129 100644 --- a/src/libcalamaresui/modulesystem/ModuleManager.cpp +++ b/src/libcalamaresui/modulesystem/ModuleManager.cpp @@ -290,10 +290,10 @@ ModuleManager::loadModules() // If it's a ViewModule, it also appends the ViewStep to the ViewManager. thisModule->loadSelf(); m_loadedModulesByInstanceKey.insert( instanceKey, thisModule ); - Q_ASSERT( thisModule->isLoaded() ); if ( !thisModule->isLoaded() ) { cWarning() << "Module" << moduleName << "loading FAILED"; + Q_ASSERT( thisModule->isLoaded() ); continue; } } From a43b87c6365b94a67315dda482fea1530c692f3c Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Tue, 22 May 2018 11:37:23 -0400 Subject: [PATCH 06/13] i18n: [calamares] Automatic merge of Transifex translations --- lang/calamares_ca.ts | 10 +-- lang/calamares_cs_CZ.ts | 6 +- lang/calamares_de.ts | 181 ++++++++++++++++++++-------------------- lang/calamares_hr.ts | 6 +- lang/calamares_ru.ts | 4 +- 5 files changed, 105 insertions(+), 102 deletions(-) diff --git a/lang/calamares_ca.ts b/lang/calamares_ca.ts index 84bc809bb..2048f6af5 100644 --- a/lang/calamares_ca.ts +++ b/lang/calamares_ca.ts @@ -484,7 +484,7 @@ L'instal·lador es tancarà i tots els canvis es perdran. The command runs in the host environment and needs to know the root path, but no rootMountPoint is defined. - + L'odre s'executa a l'entorn de l'amfitrió i necessita saber el camí de l'arrel, però no hi ha definit el punt de muntatge de l'arrel. @@ -730,12 +730,12 @@ L'instal·lador es tancarà i tots els canvis es perdran. Deleting partition %1. - Eliminant la partició %1. + Suprimint la partició %1. The installer failed to delete partition %1. - L'instal·lador no ha pogut eliminar la partició %1. + L'instal·lador no ha pogut suprimir la partició %1. @@ -1674,7 +1674,7 @@ L'instal·lador es tancarà i tots els canvis es perdran. &Delete - &Suprimeix + E&limina @@ -1694,7 +1694,7 @@ L'instal·lador es tancarà i tots els canvis es perdran. The partition table on %1 already has %2 primary partitions, and no more can be added. Please remove one primary partition and add an extended partition, instead. - + La taula de particions de %1 ja té %2 particions primàries i no se n'hi poden afegir més. Si us plau, suprimiu una partició primària i afegiu-hi una partició ampliada. diff --git a/lang/calamares_cs_CZ.ts b/lang/calamares_cs_CZ.ts index a506e76d9..28a88e874 100644 --- a/lang/calamares_cs_CZ.ts +++ b/lang/calamares_cs_CZ.ts @@ -484,7 +484,7 @@ Instalační program bude ukončen a všechny změny ztraceny. The command runs in the host environment and needs to know the root path, but no rootMountPoint is defined. - + Příkaz bude spuštěn v prostředí hostitele a potřebuje znát popis umístění kořene souborového systému. rootMountPoint ale není zadaný. @@ -1689,12 +1689,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Can not create new partition - + Nevytvářet nový oddíl The partition table on %1 already has %2 primary partitions, and no more can be added. Please remove one primary partition and add an extended partition, instead. - + Tabulka oddílů na %1 už obsahuje %2 hlavních oddílů a proto už není možné přidat další. Odeberte jeden z hlavních oddílů a namísto něj vytvořte rozšířený oddíl. diff --git a/lang/calamares_de.ts b/lang/calamares_de.ts index 63de0898d..a19100da1 100644 --- a/lang/calamares_de.ts +++ b/lang/calamares_de.ts @@ -184,7 +184,7 @@ &Install - + &Installieren @@ -479,12 +479,12 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. Could not run command. - + Befehl konnte nicht ausgeführt werden. The command runs in the host environment and needs to know the root path, but no rootMountPoint is defined. - + Dieser Befehl wird im installierten System ausgeführt und muss daher den Root-Pfad kennen, jedoch wurde kein rootMountPoint definiert. @@ -492,7 +492,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. Contextual Processes Job - + Job für kontextuale Prozesse @@ -530,7 +530,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. LVM LV name - + LVM LV Name @@ -939,7 +939,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. <html><head/><body><p>When this box is checked, your system will restart immediately when you click on <span style=" font-style:italic;">Done</span> or close the installer.</p></body></html> - + <html><head/><body><p>Wenn diese Option aktiviert ist, genügt zum Neustart des Systems ein Klick auf <span style=" font-style:italic;">Fertig</span> oder das Schließen des Installationsprogramms.</p></body></html> @@ -1245,232 +1245,232 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. Password is too weak - + Das Passwort ist zu schwach Memory allocation error when setting '%1' - + Fehler bei der Speicherzuweisung beim Einrichten von '%1' Memory allocation error - + Fehler bei der Speicherzuweisung The password is the same as the old one - + Das Passwort ist dasselbe wie das alte The password is a palindrome - + Das Passwort ist ein Palindrom The password differs with case changes only - + Das Passwort unterscheidet sich nur durch Groß- und Kleinschreibung The password is too similar to the old one - + Das Passwort ist dem alten zu ähnlich The password contains the user name in some form - + Das Passwort enthält eine Form des Benutzernamens The password contains words from the real name of the user in some form - + Das Passwort enthält Teile des Klarnamens des Benutzers The password contains forbidden words in some form - + Das Passwort enthält verbotene Wörter The password contains less than %1 digits - + Das Passwort hat weniger als %1 Stellen The password contains too few digits - + Das Passwort hat zu wenige Stellen The password contains less than %1 uppercase letters - + Das Passwort enthält weniger als %1 Großbuchstaben The password contains too few uppercase letters - + Das Passwort enthält zu wenige Großbuchstaben The password contains less than %1 lowercase letters - + Das Passwort enthält weniger als %1 Kleinbuchstaben The password contains too few lowercase letters - + Das Passwort enthält zu wenige Kleinbuchstaben The password contains less than %1 non-alphanumeric characters - + Das Passwort enthält weniger als %1 nicht-alphanumerische Zeichen The password contains too few non-alphanumeric characters - + Das Passwort enthält zu wenige nicht-alphanumerische Zeichen The password is shorter than %1 characters - + Das Passwort hat weniger als %1 Stellen The password is too short - + Das Passwort ist zu kurz The password is just rotated old one - + Das Passwort wurde schon einmal verwendet The password contains less than %1 character classes - + Das Passwort enthält weniger als %1 verschiedene Zeichenarten The password does not contain enough character classes - + Das Passwort enthält nicht genügend verschiedene Zeichenarten The password contains more than %1 same characters consecutively - + Das Passwort enthält mehr als %1 gleiche Zeichen am Stück The password contains too many same characters consecutively - + Das Passwort enthält zu viele gleiche Zeichen am Stück The password contains more than %1 characters of the same class consecutively - + Das Passwort enthält mehr als %1 gleiche Zeichenarten am Stück The password contains too many characters of the same class consecutively - + Das Passwort enthält zu viele gleiche Zeichenarten am Stück The password contains monotonic sequence longer than %1 characters - + Das Passwort enthält eine gleichartige Sequenz von mehr als %1 Zeichen The password contains too long of a monotonic character sequence - + Das Passwort enthält eine gleichartige Sequenz von zu großer Länge No password supplied - + Kein Passwort angegeben Cannot obtain random numbers from the RNG device - + Zufallszahlen konnten nicht vom Zufallszahlengenerator abgerufen werden Password generation failed - required entropy too low for settings - + Passwortgeneration fehlgeschlagen - Zufallszahlen zu schwach für die gewählten Einstellungen The password fails the dictionary check - %1 - + Das Passwort besteht den Wörterbuch-Test nicht - %1 The password fails the dictionary check - + Das Passwort besteht den Wörterbuch-Test nicht Unknown setting - %1 - + Unbekannte Einstellung - %1 Unknown setting - + Unbekannte Einstellung Bad integer value of setting - %1 - + Fehlerhafter Integerwert der Einstellung - %1 Bad integer value - + Fehlerhafter Integerwert Setting %1 is not of integer type - + Die Einstellung %1 ist kein Integerwert Setting is not of integer type - + Die Einstellung ist kein Integerwert Setting %1 is not of string type - + Die Einstellung %1 ist keine Zeichenkette Setting is not of string type - + Die Einstellung ist keine Zeichenkette Opening the configuration file failed - + Öffnen der Konfigurationsdatei fehlgeschlagen The configuration file is malformed - + Die Konfigurationsdatei ist falsch strukturiert Fatal failure - + Fataler Fehler Unknown error - + Unbekannter Fehler @@ -1689,12 +1689,12 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. Can not create new partition - + Neue Partition kann nicht erstellt werden The partition table on %1 already has %2 primary partitions, and no more can be added. Please remove one primary partition and add an extended partition, instead. - + Die Partitionstabelle auf %1 hat bereits %2 primäre Partitionen und weitere können nicht hinzugefügt werden. Bitte entfernen Sie eine primäre Partition und fügen Sie stattdessen eine erweiterte Partition hinzu. @@ -1800,13 +1800,13 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. Plasma Look-and-Feel Job - + Job für das Erscheinungsbild von Plasma Could not select KDE Plasma Look-and-Feel package - + Das Paket für das Erscheinungsbild von KDE Plasma konnte nicht ausgewählt werden @@ -1824,7 +1824,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. Please choose a look-and-feel for the KDE Plasma Desktop. You can also skip this step and configure the look-and-feel once the system is installed. Clicking on a look-and-feel selection will give you a live preview of that look-and-feel. - + Bitte wählen Sie das Erscheinungsbild für den KDE Plasma Desktop. Sie können diesen Schritt auch überspringen und das Erscheinungsbild festlegen, sobald das System installiert ist. Per Klick auf einen Eintrag können Sie sich eine Vorschau dieses Erscheinungsbildes anzeigen lassen. @@ -1832,7 +1832,7 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. Look-and-Feel - + Erscheinungsbild @@ -1841,39 +1841,42 @@ Dies wird das Installationsprogramm beenden und alle Änderungen gehen verloren. There was no output from the command. - + +Dieser Befehl hat keine Ausgabe erzeugt. Output: - + +Ausgabe: + External command crashed. - + Externes Programm abgestürzt. Command <i>%1</i> crashed. - + Programm <i>%1</i> abgestürzt. External command failed to start. - + Externes Programm konnte nicht gestartet werden. Command <i>%1</i> failed to start. - + Das Programm <i>%1</i> konnte nicht gestartet werden. Internal error when starting command. - + Interner Fehler beim Starten des Programms. @@ -1883,22 +1886,22 @@ Output: External command failed to finish. - + Externes Programm konnte nicht abgeschlossen werden. Command <i>%1</i> failed to finish in %2 seconds. - + Programm <i>%1</i> konnte nicht innerhalb von %2 Sekunden abgeschlossen werden. External command finished with errors. - + Externes Programm mit Fehlern beendet. Command <i>%1</i> finished with exit code %2. - + Befehl <i>%1</i> beendet mit Exit-Code %2. @@ -2338,7 +2341,7 @@ Output: Shell Processes Job - + Job für Shell-Prozesse @@ -2347,7 +2350,7 @@ Output: %L1 / %L2 slide counter, %1 of %2 (numeric) - + %L1 / %L2 @@ -2371,22 +2374,22 @@ Output: Installation feedback - Installationsrückmeldung + Rückmeldungen zur Installation Sending installation feedback. - Senden der Installationsrückmeldung + Senden der Rückmeldungen zur Installation. Internal error in install-tracking. - + Interner Fehler bei der Überwachung der Installation. HTTP request timed out. - + Zeitüberschreitung bei HTTP-Anfrage @@ -2394,28 +2397,28 @@ Output: Machine feedback - + Rückinformationen zum Computer Configuring machine feedback. - + Konfiguriere Rückmeldungen zum Computer. Error in machine feedback configuration. - + Fehler bei der Konfiguration der Rückmeldungen zum Computer Could not configure machine feedback correctly, script error %1. - + Rückmeldungen zum Computer konnten nicht korrekt konfiguriert werden, Skriptfehler %1. Could not configure machine feedback correctly, Calamares error %1. - + Rückmeldungen zum Computer konnten nicht korrekt konfiguriert werden, Calamares-Fehler %1. @@ -2433,14 +2436,14 @@ Output: <html><head/><body><p>By selecting this, you will send <span style=" font-weight:600;">no information at all</span> about your installation.</p></body></html> - + <html><head/><body><p>Ist diese Option aktiviert, werden <span style=" font-weight:600;">keinerlei Informationen</span> über Ihre Installation gesendet.</p></body></html> TextLabel - Text Label + TextLabel @@ -2452,27 +2455,27 @@ Output: <html><head/><body><p><a href="placeholder"><span style=" text-decoration: underline; color:#2980b9;">Click here for more information about user feedback</span></a></p></body></html> - + <html><head/><body><p><a href="placeholder"><span style=" text-decoration: underline; color:#2980b9;">Klicken sie hier für weitere Informationen über Benutzer-Rückmeldungen</span></a></p></body></html> Install tracking helps %1 to see how many users they have, what hardware they install %1 to and (with the last two options below), get continuous information about preferred applications. To see what will be sent, please click the help icon next to each area. - + Rückinformationen über die Installation helfen %1 festzustellen, wieviele Menschen es benutzen und auf welcher Hardware sie %1 installieren. Mit den beiden letzten Optionen gestatten Sie die Erhebung kontinuierlicher Informationen über Ihre bevorzugte Software. Um zu prüfen, welche Informationen gesendet werden, klicken Sie bitte auf das Hilfesymbol neben dem jeweiligen Abschnitt. By selecting this you will send information about your installation and hardware. This information will <b>only be sent once</b> after the installation finishes. - Wenn Sie diese Option auswählen, senden Sie Informationen zu Ihrer Installation und Hardware. Diese Informationen werden nur einmal nach Abschluss der Installation gesendet. + Wenn Sie diese Option auswählen, senden Sie Informationen zu Ihrer Installation und Hardware. Diese Informationen werden <b>nur einmalig</b> nach Abschluss der Installation gesendet. By selecting this you will <b>periodically</b> send information about your installation, hardware and applications, to %1. - Wenn Sie dies auswählen, senden Sie regelmäßig Informationen zu Ihrer Installation, Hardware und Anwendungen an %1. + Wenn Sie diese Option auswählen, senden Sie <b>regelmäßig</b> Informationen zu Installation, Hardware und Anwendungen an %1. By selecting this you will <b>regularly</b> send information about your installation, hardware, applications and usage patterns, to %1. - Wenn Sie dies auswählen, senden Sie regelmäßig Informationen über Ihre Installation, Hardware, Anwendungen und Nutzungsmuster an %1. + Wenn Sie diese Option auswählen, senden Sie <b>regelmäßig</b> Informationen zu Installation, Hardware, Anwendungen und Nutzungsmuster an %1. @@ -2480,7 +2483,7 @@ Output: Feedback - Feedback + Rückmeldung @@ -2575,7 +2578,7 @@ Output: <h1>%1</h1><br/><strong>%2<br/>for %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Thanks to: Anke Boersma, Aurélien Gâteau, Kevin Kofler, Lisa Vitolo, Philip Müller, Pier Luigi Fiorini, Rohan Garg and the <a href="https://www.transifex.com/calamares/calamares/">Calamares translators team</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> development is sponsored by <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. - + <h1>%1</h1><br/><strong>%2<br/>für %3</strong><br/><br/>Copyright 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Copyright 2017 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Dank an: Anke Boersma, Aurélien Gâteau, Kevin Kofler, Lisa Vitolo, Philip Müller, Pier Luigi Fiorini, Rohan Garg und das <a href="https://www.transifex.com/calamares/calamares/">Calamares Übersetzerteam</a>.<br/><br/><a href="https://calamares.io/">Calamares</a> wird unterstützt von <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. diff --git a/lang/calamares_hr.ts b/lang/calamares_hr.ts index 7d70ee86f..267fbe127 100644 --- a/lang/calamares_hr.ts +++ b/lang/calamares_hr.ts @@ -484,7 +484,7 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. The command runs in the host environment and needs to know the root path, but no rootMountPoint is defined. - + Naredba se pokreće u okruženju domaćina i treba znati korijenski put, međutim, rootMountPoint nije definiran. @@ -1689,12 +1689,12 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. Can not create new partition - + Ne mogu stvoriti novu particiju The partition table on %1 already has %2 primary partitions, and no more can be added. Please remove one primary partition and add an extended partition, instead. - + Particijska tablica %1 već ima %2 primarne particije i nove se više ne mogu dodati. Molimo vas da uklonite jednu primarnu particiju i umjesto nje dodate proširenu particiju. diff --git a/lang/calamares_ru.ts b/lang/calamares_ru.ts index d84de4f44..db81fb3f4 100644 --- a/lang/calamares_ru.ts +++ b/lang/calamares_ru.ts @@ -1688,12 +1688,12 @@ The installer will quit and all changes will be lost. Can not create new partition - + Не удалось создать новый раздел The partition table on %1 already has %2 primary partitions, and no more can be added. Please remove one primary partition and add an extended partition, instead. - + В таблице разделов на %1 уже %2 первичных разделов, больше добавить нельзя. Удалите один из первичных разделов и добавьте расширенный раздел. From a79e62ac6baa0ed8b00cb3a63fad5ca2ea269acc Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Tue, 22 May 2018 11:37:24 -0400 Subject: [PATCH 07/13] i18n: [dummypythonqt] Automatic merge of Transifex translations --- .../lang/eo/LC_MESSAGES/dummypythonqt.mo | Bin 968 -> 975 bytes .../lang/eo/LC_MESSAGES/dummypythonqt.po | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/dummypythonqt/lang/eo/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/eo/LC_MESSAGES/dummypythonqt.mo index 8eac3bf2f2cec83824eaa6c5c2472ab7b7bcdfc3..f06ac012c94042c363f936ce595fba997eb565e9 100644 GIT binary patch delta 100 zcmX@Xex7|oi0K+e28IM6=3!u9;ALiD&;im?KpMn%2hx&2Is`~d0qHy-?FytjH+JeW pau}K^7#doc7);*BXfNnpT2!Lon3tWQ5Rj3dnwMFznVsn%BLL+a5~~0J delta 93 zcmX@leu8~Mi0M*B28IM6=3!u9U}I)r&;ioIKpMn%0Me2`+80Pm0qJxg?FyuuHg@VV iau}E^7+6{vnoQouXwOwrl$cVQotRgWznPEeAR_=|n-F{e diff --git a/src/modules/dummypythonqt/lang/eo/LC_MESSAGES/dummypythonqt.po b/src/modules/dummypythonqt/lang/eo/LC_MESSAGES/dummypythonqt.po index 4fcdcfd71..495a42896 100644 --- a/src/modules/dummypythonqt/lang/eo/LC_MESSAGES/dummypythonqt.po +++ b/src/modules/dummypythonqt/lang/eo/LC_MESSAGES/dummypythonqt.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-07 09:14-0400\n" +"POT-Creation-Date: 2018-05-16 11:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: tradukanto , 2018\n" +"Last-Translator: Kurt Ankh Phoenix , 2018\n" "Language-Team: Esperanto (https://www.transifex.com/calamares/teams/20061/eo/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" From 42d64f063062cf687c283eeef0b0b55ad2663d59 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Tue, 22 May 2018 11:37:24 -0400 Subject: [PATCH 08/13] i18n: [python] Automatic merge of Transifex translations --- lang/python/de/LC_MESSAGES/python.mo | Bin 1059 -> 1130 bytes lang/python/de/LC_MESSAGES/python.po | 4 ++-- lang/python/eo/LC_MESSAGES/python.mo | Bin 1161 -> 1168 bytes lang/python/eo/LC_MESSAGES/python.po | 2 +- lang/python/he/LC_MESSAGES/python.mo | Bin 1302 -> 1366 bytes lang/python/he/LC_MESSAGES/python.po | 2 ++ 6 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lang/python/de/LC_MESSAGES/python.mo b/lang/python/de/LC_MESSAGES/python.mo index 3b9a54b24b6d6527159e61c438226b8725a45eef..85b9b49f0ce6ab6cf16831f6e6b00c622115ea4e 100644 GIT binary patch delta 287 zcmZ3?@rtAVo)F7a1|Z-BVi_P#0b*VtUIWA+@BoMff%qX1ivaOwD9ynL5tjwhCO|QL zAgv9gQ-HJqke&dfMS=7|AUz+5uLH3FkYCQsz#tB!JAgD$K8|4lkO4Ay8;}NRJPo8Z zf%G3Btp%jjSQr>2fOH^`2AaXZ0mMu|3<4lWvjZ_Jhyw*cWnci*&cHVD=o8`4yxjcK zyb^`9%$!t(;>zNZ)ZER>7}b~<^(LQX4wH0AEJ@9T2&XC}mKJ9mUXqudny1GA0ED?I AegFUf delta 217 zcmaFGv6!R&o)F7a1|Z-7Vi_Qg0b*_-o&&@nZ~}-0f%qg4ivaO$DE$FQgTz@G85m4} zv^bE~2GTx2+5kvb0O|Qayb_27fP7D8pc)_@1*AoRbP8ez x)&kN$fHY7q13M720x^)wzy`!DKn!v$2rxk?28M}upKQL)sLaHuF!?ug7yxoA7K{J@ diff --git a/lang/python/de/LC_MESSAGES/python.po b/lang/python/de/LC_MESSAGES/python.po index 4dec5011e..ac9777c23 100644 --- a/lang/python/de/LC_MESSAGES/python.po +++ b/lang/python/de/LC_MESSAGES/python.po @@ -20,7 +20,7 @@ msgstr "" #: src/modules/umount/main.py:40 msgid "Unmount file systems." -msgstr "" +msgstr "Dateisysteme aushängen." #: src/modules/dummypython/main.py:44 msgid "Dummy python job." @@ -48,7 +48,7 @@ msgstr "Pakete installieren " msgid "Installing one package." msgid_plural "Installing %(num)d packages." msgstr[0] "Installiere ein Paket" -msgstr[1] "Installiere %(num)dPakete " +msgstr[1] "Installiere %(num)dPakete." #: src/modules/packages/main.py:69 #, python-format diff --git a/lang/python/eo/LC_MESSAGES/python.mo b/lang/python/eo/LC_MESSAGES/python.mo index ad2749b80d22215acbaf6ac75975537b74b81cfb..968d29e203c4e6b50831cad674a59b2d07178a16 100644 GIT binary patch delta 103 zcmeC=oWMCD#dQrM1H*M77Gq#wXklhx5C_t;fwUBm-VCG#f%G{bZ33hp0BKzyEy}{c pU<9O{fwUx$F59^BG^3z*X;F!SV_tTKLO@1-YF=i=<~k;BCIC^e6Ab_W delta 96 zcmbQh*~vK}#dRqo1H*M77Gq#wsAXng5C_szfV32lUIU~Bf%I`8Z33ik0%=_!&BwyP iU<9OXfV3o#&fmE5G$U6@QDRDIc4A&h{^nLDZYBWA7!b$+ diff --git a/lang/python/eo/LC_MESSAGES/python.po b/lang/python/eo/LC_MESSAGES/python.po index b93015618..b0622a9aa 100644 --- a/lang/python/eo/LC_MESSAGES/python.po +++ b/lang/python/eo/LC_MESSAGES/python.po @@ -10,7 +10,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-05-16 11:40-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: tradukanto , 2018\n" +"Last-Translator: Kurt Ankh Phoenix , 2018\n" "Language-Team: Esperanto (https://www.transifex.com/calamares/teams/20061/eo/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/lang/python/he/LC_MESSAGES/python.mo b/lang/python/he/LC_MESSAGES/python.mo index fa1a277e8e95e59d62d24370983c6c09b1761a30..ca254403fb4b52bd33e9a5bba8c1a8faf6fdf050 100644 GIT binary patch delta 40 scmbQnb&YF6i)aG_1A_qz1A{h@-Uy^Cfb`vsGk-BpE@D|S`8$g|0LdE*Gynhq delta 36 ocmcb{HH~XRi)cIp1A_qz1A{h@o&cmHf%Kk@Gk-Bp-onxh0G1*NCIA2c diff --git a/lang/python/he/LC_MESSAGES/python.po b/lang/python/he/LC_MESSAGES/python.po index c98599da2..43a0b9ae2 100644 --- a/lang/python/he/LC_MESSAGES/python.po +++ b/lang/python/he/LC_MESSAGES/python.po @@ -50,6 +50,7 @@ msgid_plural "Installing %(num)d packages." msgstr[0] "מתקין חבילה אחת." msgstr[1] "מתקין %(num)d חבילות." msgstr[2] "מתקין %(num)d חבילות." +msgstr[3] "מתקין %(num)d חבילות." #: src/modules/packages/main.py:69 #, python-format @@ -58,3 +59,4 @@ msgid_plural "Removing %(num)d packages." msgstr[0] "מסיר חבילה אחת." msgstr[1] "מסיר %(num)d חבילות." msgstr[2] "מסיר %(num)d חבילות." +msgstr[3] "מסיר %(num)d חבילות." From 6aa5be192b04edbaab45ef494db4f5ef5fb9fa6f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 22 May 2018 11:43:14 -0400 Subject: [PATCH 09/13] [netinstall] Drop unused includes --- src/modules/netinstall/NetInstallPage.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 37c489135..5272d83fd 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -30,19 +30,11 @@ #include "utils/Retranslator.h" #include "utils/YamlUtils.h" -#include -#include -#include - #include #include #include #include -#include -#include -#include -#include #include From 3a59574128fb37f58a836f572264d9a27930cb88 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 22 May 2018 11:45:39 -0400 Subject: [PATCH 10/13] [users] Factor out command-line to useradd - This is prep-work for #964, which was caused by #955 - Original assumption was that distro's would have a working useradd configuration; @abucodonosor already pointed out that this was probably not the case, but I ignored that. --- src/modules/users/CreateUserJob.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/modules/users/CreateUserJob.cpp b/src/modules/users/CreateUserJob.cpp index d4d299e39..96b14c365 100644 --- a/src/modules/users/CreateUserJob.cpp +++ b/src/modules/users/CreateUserJob.cpp @@ -146,13 +146,12 @@ CreateUserJob::exec() } } - int ec = CalamaresUtils::System::instance()-> - targetEnvCall( { "useradd", - "-m", - "-U", - "-c", - m_fullName, - m_userName } ); + QStringList useradd{ "useradd", "-m", "-U" }; + // TODO: shell-settings + useradd << "-c" << m_fullName; + useradd << m_userName; + + int ec = CalamaresUtils::System::instance()->targetEnvCall( useradd ); if ( ec ) return Calamares::JobResult::error( tr( "Cannot create user %1." ) .arg( m_userName ), From ed15edabf9be0b1a68c9521068c31ebfc8578322 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 23 May 2018 03:30:51 -0400 Subject: [PATCH 11/13] [users] Document passwordRequirements and code --- src/modules/users/UsersPage.h | 6 ++++++ src/modules/users/users.conf | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/users/UsersPage.h b/src/modules/users/UsersPage.h index 5990d8693..817f73d0b 100644 --- a/src/modules/users/UsersPage.h +++ b/src/modules/users/UsersPage.h @@ -52,6 +52,12 @@ public: void setAutologinDefault( bool checked ); void setReusePasswordDefault( bool checked ); + /** @brief Process entries in the passwordRequirements config entry + * + * Called once for each item in the config entry, which should + * be a key-value pair. What makes sense as a value depends on + * the key. Supported keys are documented in users.conf. + */ void addPasswordCheck( const QString& key, const QVariant& value ); protected slots: diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index 6111a6e80..be0221c8b 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -72,5 +72,5 @@ passwordRequirements: minLength: -1 # Password at least this many characters maxLength: -1 # Password at most this many characters libpwquality: - - minlen=8 - - minclass=2 + - minlen=0 + - minclass=0 From 0d24c1db6ce843392e5dab672bb0a0b4d3bc7b64 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 23 May 2018 05:23:46 -0400 Subject: [PATCH 12/13] [users] Introduce userShell setting - Add a *userShell* key, which can be left out (default, backwards- compatible) to retain the old /bin/bash behavior, or explicitly set to empty to defer to useradd-configuration, or explicitly set to something non-empty to use that shell. --- src/modules/users/CreateUserJob.cpp | 4 +++- src/modules/users/UsersViewStep.cpp | 11 ++++++++++- src/modules/users/users.conf | 9 +++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/modules/users/CreateUserJob.cpp b/src/modules/users/CreateUserJob.cpp index 96b14c365..7d4ded545 100644 --- a/src/modules/users/CreateUserJob.cpp +++ b/src/modules/users/CreateUserJob.cpp @@ -147,7 +147,9 @@ CreateUserJob::exec() } QStringList useradd{ "useradd", "-m", "-U" }; - // TODO: shell-settings + QString shell = gs->value( "userShell" ).toString(); + if ( !shell.isEmpty() ) + useradd << "-s" << shell; useradd << "-c" << m_fullName; useradd << m_userName; diff --git a/src/modules/users/UsersViewStep.cpp b/src/modules/users/UsersViewStep.cpp index 015d7e997..37d86819e 100644 --- a/src/modules/users/UsersViewStep.cpp +++ b/src/modules/users/UsersViewStep.cpp @@ -22,9 +22,11 @@ #include "UsersPage.h" +#include "utils/CalamaresUtils.h" #include "utils/Logger.h" -#include "JobQueue.h" + #include "GlobalStorage.h" +#include "JobQueue.h" CALAMARES_PLUGIN_FACTORY_DEFINITION( UsersViewStepFactory, registerPlugin(); ) @@ -181,5 +183,12 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap ) m_widget->addPasswordCheck( i.key(), i.value() ); } } + + QString shell( QLatin1Literal( "/bin/bash" ) ); // as if it's not set at all + if ( configurationMap.contains( "userShell" ) ) + shell = CalamaresUtils::getString( configurationMap, "userShell" ); + // Now it might be explicitly set to empty, which is ok + + Calamares::JobQueue::instance()->globalStorage()->insert( "userShell", shell ); } diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index be0221c8b..0c40faeff 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -74,3 +74,12 @@ passwordRequirements: libpwquality: - minlen=0 - minclass=0 + +# Shell to be used for the regular user of the target system. +# There are three possible kinds of settings: +# - unset (i.e. commented out, the default), act as if set to /bin/bash +# - empty (explicit), don't pass shell information to useradd at all +# and rely on a correct configuration file in /etc/default/useradd +# - set, non-empty, use that path as shell. No validation is done +# that the shell actually exists or is executable. +# userShell: /bin/bash From 01ff1efc5dc2b054db1c4bd5ccdc8f1bef269795 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 23 May 2018 07:03:59 -0400 Subject: [PATCH 13/13] [users] Improve explanation when useradd fails --- src/modules/users/CreateUserJob.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/modules/users/CreateUserJob.cpp b/src/modules/users/CreateUserJob.cpp index 7d4ded545..119028059 100644 --- a/src/modules/users/CreateUserJob.cpp +++ b/src/modules/users/CreateUserJob.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014-2016, Teo Mrnjavac + * Copyright 2018, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -153,14 +154,14 @@ CreateUserJob::exec() useradd << "-c" << m_fullName; useradd << m_userName; - int ec = CalamaresUtils::System::instance()->targetEnvCall( useradd ); - if ( ec ) - return Calamares::JobResult::error( tr( "Cannot create user %1." ) - .arg( m_userName ), - tr( "useradd terminated with error code %1." ) - .arg( ec ) ); + auto pres = CalamaresUtils::System::instance()->targetEnvCommand( useradd ); + if ( pres.getExitCode() ) + { + cError() << "useradd failed" << pres.getExitCode(); + return pres.explainProcess( useradd, 10 /* bogus timeout */ ); + } - ec = CalamaresUtils::System::instance()-> + int ec = CalamaresUtils::System::instance()-> targetEnvCall( { "usermod", "-aG", defaultGroups,