From d01a35e288e54ef4f88c73b58311018e2165fce6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 3 Oct 2017 10:29:03 +0200 Subject: [PATCH 01/90] Missing import; thanks to crazy on IRC --- src/modules/initramfscfg/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/initramfscfg/main.py b/src/modules/initramfscfg/main.py index d935328d6..aa63e659b 100644 --- a/src/modules/initramfscfg/main.py +++ b/src/modules/initramfscfg/main.py @@ -24,6 +24,8 @@ # along with Calamares. If not, see . import libcalamares + +import inspect import os import shutil From e9e2f2e68c91d0bff361f6241a71ad907aa699ef Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Tue, 3 Oct 2017 06:46:35 -0400 Subject: [PATCH 02/90] [core] Automatic merge of Transifex translations --- lang/calamares_ca.ts | 4 +- lang/calamares_cs_CZ.ts | 426 ++++++++++++++++++++-------------------- lang/calamares_da.ts | 4 +- lang/calamares_fr.ts | 4 +- lang/calamares_gl.ts | 66 +++---- lang/calamares_he.ts | 4 +- lang/calamares_hr.ts | 4 +- lang/calamares_lt.ts | 4 +- lang/calamares_mr.ts | 80 ++++---- lang/calamares_nb.ts | 8 +- lang/calamares_pl.ts | 4 +- lang/calamares_pt_BR.ts | 4 +- lang/calamares_pt_PT.ts | 8 +- lang/calamares_sk.ts | 6 +- lang/calamares_uk.ts | 123 ++++++------ lang/calamares_zh_TW.ts | 4 +- 16 files changed, 382 insertions(+), 371 deletions(-) diff --git a/lang/calamares_ca.ts b/lang/calamares_ca.ts index d9e96930c..82c3fdf81 100644 --- a/lang/calamares_ca.ts +++ b/lang/calamares_ca.ts @@ -2225,12 +2225,12 @@ L'instal·lador es tancarà i tots els canvis es perdran. Password is too short - + La contrasenya és massa curta. Password is too long - + La contrasenya és massa llarga. diff --git a/lang/calamares_cs_CZ.ts b/lang/calamares_cs_CZ.ts index 37040d6d6..7394117c9 100644 --- a/lang/calamares_cs_CZ.ts +++ b/lang/calamares_cs_CZ.ts @@ -4,17 +4,17 @@ The <strong>boot environment</strong> of this system.<br><br>Older x86 systems only support <strong>BIOS</strong>.<br>Modern systems usually use <strong>EFI</strong>, but may also show up as BIOS if started in compatibility mode. - <strong>Zaváděcí prostředí</strong> tohoto systému.<br><br>Starší x86 systémy podporují pouze <strong>BIOS</strong>.<br>Moderní systémy většinou využívají <strong>EFI</strong>, někdy lze toto prostředí přepnout do módu kompatibility a může se jevit jako BIOS. + <strong>Zaváděcí prostředí</strong> tohoto systému.<br><br>Starší x86 systémy podporují pouze <strong>BIOS</strong>.<br>Moderní systémy obvykle používají <strong>EFI</strong>, ale pokud jsou spuštěné v režimu kompatibility, mohou se zobrazovat jako BIOS. This system was started with an <strong>EFI</strong> boot environment.<br><br>To configure startup from an EFI environment, this installer must deploy a boot loader application, like <strong>GRUB</strong> or <strong>systemd-boot</strong> on an <strong>EFI System Partition</strong>. This is automatic, unless you choose manual partitioning, in which case you must choose it or create it on your own. - Systém byl spuštěn se zaváděcím prostředím <strong>EFI</strong>.<br><br>Abyste zaváděli systém prostředím EFI, instalátor musí zavést aplikaci pro zavádění systému, jako <strong>GRUB</strong> nebo <strong>systemd-boot</strong> na <strong>systémovém oddílu EFI</strong>. Proběhne to automaticky, pokud si nezvolíte ruční dělení disku, v tom případě si aplikaci pro zavádění musíte sami zvolit. + Systém byl spuštěn se zaváděcím prostředím <strong>EFI</strong>.<br><br>Aby byl systém zaváděn prostředím EFI je třeba, aby instalátor nasadil na <strong> EFI systémový oddíl</strong>aplikaci pro zavádění systému, jako <strong>GRUB</strong> nebo <strong>systemd-boot</strong>. To proběhne automaticky, tedy pokud si nezvolíte ruční dělení datového úložiště – v takovém případě si EFI systémový oddíl volíte nebo vytváříte sami. This system was started with a <strong>BIOS</strong> boot environment.<br><br>To configure startup from a BIOS environment, this installer must install a boot loader, like <strong>GRUB</strong>, either at the beginning of a partition or on the <strong>Master Boot Record</strong> near the beginning of the partition table (preferred). This is automatic, unless you choose manual partitioning, in which case you must set it up on your own. - Systém byl spuštěn se zaváděcím prostředím <strong>BIOS</strong>.<br><br>Abyste zaváděli systém prostředím BIOS, instalátor musí umístit zavaděč systému, jako <strong>GRUB</strong>, buď na začátek oddílu nebo (lépe) do <strong>Master Boot Record</strong> na začátku tabulky oddílů. Proběhne to automaticky, pokud si nezvolíte ruční dělení disku, v tom případě si zavádění musíte nastavit sami. + Systém byl spuštěn se zaváděcím prostředím <strong>BIOS</strong>.<br><br>Aby byl systém zaváděn prostředím BIOS je třeba, aby instalátor vpravil zavaděč systému, jako <strong>GRUB</strong>, buď na začátek oddílu nebo (lépe) do <strong>hlavního zaváděcího záznamu (MBR)</strong> na začátku tabulky oddílů. To proběhne automaticky, tedy pokud si nezvolíte ruční dělení datového úložiště – v takovém případě si zavádění nastavujete sami. @@ -22,7 +22,7 @@ Master Boot Record of %1 - Master Boot Record %1 + Hlavní zaváděcí záznam (MBR) %1 @@ -37,7 +37,7 @@ Do not install a boot loader - Neinstalovat boot loader + Neinstalovat zavaděč systému @@ -120,31 +120,31 @@ Running command %1 %2 - Spouštím příkaz %1 %2 + Spouštění příkazu %1 %2 External command crashed - Externí příkaz selhal + Vnější příkaz zhavaroval Command %1 crashed. Output: %2 - Příkaz %1 selhal. + Příkaz %1 zhavaroval. Výstup: %2 External command failed to start - Start externího příkazu selhal + Spuštění vnějšího příkazu se nezdařilo Command %1 failed to start. - Spuštění příkazu %1 selhalo. + Spuštění příkazu %1 se nezdařilo. @@ -154,26 +154,26 @@ Výstup: Bad parameters for process job call. - Špatné parametry příkazu. + Chybné parametry volání úlohy procesu.. External command failed to finish - Dokončení externího příkazu selhalo. + Vykonávání vnějšího příkazu se nepodařilo dokončit Command %1 failed to finish in %2s. Output: %3 - Dokončení příkazu %1 selhalo v %2s. + Dokončení příkazu %1 se nezdařilo v %2s. Výstup: %3 External command finished with errors - Externí příkaz skončil s chybami. + Vnější příkaz skončil s chybami. @@ -190,32 +190,32 @@ Výstup: Running %1 operation. - Spouštím %1 operaci. + Spouštění %1 operace. Bad working directory path - Špatná cesta k pracovnímu adresáři. + Chybný popis umístění pracovní složky Working directory %1 for python job %2 is not readable. - Pracovní adresář %1 pro Python skript %2 není čitelný. + Pracovní složku %1 pro Python skript %2 se nedaří otevřít pro čtení. Bad main script file - Špatný hlavní soubor skriptu. + Nesprávný soubor s hlavním skriptem Main script file %1 for python job %2 is not readable. - Hlavní soubor %1 pro Python skript %2 není čitelný. + Hlavní soubor %1 pro Python úlohu %2 se nedaří otevřít pro čtení.. Boost.Python error in job "%1". - Boost.Python chyba ve skriptu "%1". + Boost.Python chyba ve skriptu „%1“. @@ -234,13 +234,13 @@ Výstup: &Cancel - &Zrušit + &Storno Cancel installation without changing the system. - Zrušení instalace bez změny systému. + Zrušení instalace bez provedení změn systému. @@ -277,7 +277,7 @@ Instalační program bude ukončen a všechny změny ztraceny. The %1 installer is about to make changes to your disk in order to install %2.<br/><strong>You will not be able to undo these changes.</strong> - Instalační program %1 provede změny na disku, aby se nainstaloval %2.<br/><strong>Změny nebude možné vrátit zpět.</strong> + Instalátor %1 provede změny na datovém úložišti, aby bylo nainstalováno %2.<br/><strong>Změny nebude možné vrátit zpět.</strong> @@ -297,7 +297,7 @@ Instalační program bude ukončen a všechny změny ztraceny. The installation is complete. Close the installer. - Instalace dokončena. Zavřete instalátor. + Instalace je dokončena. Ukončete instalátor. @@ -307,7 +307,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Installation Failed - Instalace selhala + Instalace se nezdařila @@ -320,12 +320,12 @@ Instalační program bude ukončen a všechny změny ztraceny. unparseable Python error - Chyba při parsování Python skriptu. + Chyba při zpracovávání (parse) Python skriptu. unparseable Python traceback - Chyba při parsování Python skriptu. + Chyba při zpracovávání (parse) Python záznamu volání funkcí (traceback). @@ -338,12 +338,12 @@ Instalační program bude ukončen a všechny změny ztraceny. %1 Installer - %1 Instalátor + %1 instalátor Show debug information - Ukázat ladící informace + Zobrazit ladící informace @@ -351,12 +351,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Checking file system on partition %1. - Kontroluji souborový systém na oddílu %1. + Kontroluje se souborový systém na oddílu %1. The file system check on partition %1 failed. - Kontrola souborového systému na oddílu %1 selhala. + Kontrola souborového systému na oddílu %1 nedopadla dobře. @@ -364,7 +364,7 @@ Instalační program bude ukončen a všechny změny ztraceny. This computer does not satisfy the minimum requirements for installing %1.<br/>Installation cannot continue. <a href="#details">Details...</a> - Počítač nesplňuje minimální požadavky pro instalaci %1.<br/>Instalace nemůže pokračovat <a href="#details">Detaily...</a> + Počítač nesplňuje minimální požadavky pro instalaci %1.<br/>Instalace nemůže pokračovat <a href="#details">Podrobnosti…</a> @@ -374,12 +374,12 @@ Instalační program bude ukončen a všechny změny ztraceny. This program will ask you some questions and set up %2 on your computer. - Tento program Vám bude pokládat otázky a pomůže nainstalovat %2 na Váš počítač. + Tento program vám položí několik dotazů, aby na základě odpovědí příslušně nainstaloval %2 na váš počítač. For best results, please ensure that this computer: - Proces proběhne nejlépe, když tento počítač: + Nejlepších výsledků se dosáhne, pokud tento počítač bude: @@ -402,7 +402,7 @@ Instalační program bude ukončen a všechny změny ztraceny. <strong>Manual partitioning</strong><br/>You can create or resize partitions yourself. - <strong>Ruční rozdělení disku</strong><br/>Můžete si vytvořit a upravit oddíly sami. + <strong>Ruční rozdělení datového úložiště</strong><br/>Oddíly si můžete vytvořit nebo zvětšit/zmenšit stávající sami. @@ -417,7 +417,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Select storage de&vice: - Zvolte paměťové zařízení: + &Vyberte úložné zařízení: @@ -430,37 +430,37 @@ Instalační program bude ukončen a všechny změny ztraceny. Reuse %1 as home partition for %2. - Opakované použití %1 jako domovský oddíl pro %2. + Zrecyklovat %1 na oddíl pro domovské složky %2. <strong>Select a partition to shrink, then drag the bottom bar to resize</strong> - <strong>Vyberte, který oddíl chcete zmenšit, poté tažením spodní lišty můžete změnit jeho velikost.</strong> + <strong>Vyberte oddíl, který chcete zmenšit, poté posouváním na spodní liště změňte jeho velikost.</strong> <strong>Select a partition to install on</strong> - <strong>Vyberte oddíl pro provedení instalace</strong> + <strong>Vyberte oddíl na který nainstalovat</strong> An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1. - Nebyl nalezen žádný systémový EFI oddíl. Prosím, vraťte se zpět a zkuste pro nastavení %1 použít ruční rozdělení disku. + Nebyl nalezen žádný EFI systémový oddíl. Vraťte se zpět a nastavte %1 pomocí ručního rozdělení. The EFI system partition at %1 will be used for starting %2. - Pro zavedení %2 se využije systémový oddíl EFI %1. + Pro zavedení %2 se využije EFI systémový oddíl %1. EFI system partition: - Systémový oddíl EFI: + EFI systémový oddíl: This storage device does not seem to have an operating system on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. - Zdá se, že na tomto úložném zařízení není žádný operační systém. Jak chcete postupovat?<br/>Než se provedou jakékoliv změny nastavení Vašich úložných zařízení, ukáže se Vám přehled změn a budete požádáni o jejich potvrzení. + Zdá se, že na tomto úložném zařízení není žádný operační systém. Jak chcete postupovat?<br/>Než budou provedeny jakékoli změny na úložných zařízeních, bude zobrazen jejich přehled a budete požádáni o jejich potvrzení. @@ -468,12 +468,12 @@ Instalační program bude ukončen a všechny změny ztraceny. <strong>Erase disk</strong><br/>This will <font color="red">delete</font> all data currently present on the selected storage device. - <strong>Vymazat disk</strong><br/>Touto volbou <font color="red">smažete</font> všechna data, která se nyní nachází na vybraném úložišti. + <strong>Vymazat datové úložiště</strong><br/>Touto volbou budou <font color="red">smazána</font> všechna data, která se nyní nachází na vybraném úložišti. This storage device has %1 on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. - Na tomto úložném zařízení jsem našel %1. Jak chcete postupovat?<br/>Než se provedou jakékoliv změny nastavení Vašich úložných zařízení, ukáže se Vám přehled změn a budete požádáni o jejich potvrzení. + Na tomto úložném zařízení bylo nalezeno %1. Jak chcete postupovat?<br/>Než budou provedeny jakékoli změny na úložných zařízeních, bude zobrazen jejich přehled a budete požádáni o jejich potvrzení. @@ -481,7 +481,7 @@ Instalační program bude ukončen a všechny změny ztraceny. <strong>Install alongside</strong><br/>The installer will shrink a partition to make room for %1. - <strong>Instalovat vedle</strong><br/>Instalační program zmenší oddíl a vytvoří místo pro %1. + <strong>Nainstalovat vedle</strong><br/>Instalátor zmenší oddíl a vytvoří místo pro %1. @@ -489,17 +489,17 @@ Instalační program bude ukončen a všechny změny ztraceny. <strong>Replace a partition</strong><br/>Replaces a partition with %1. - <strong>Nahradit oddíl</strong><br/>Původní oddíl nahradí %1. + <strong>Nahradit oddíl</strong><br/>Původní oddíl bude nahrazen %1. This storage device already has an operating system on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. - Na tomto úložném zařízení již je operační systém. Jak chcete postupovat?<br/>Než se provedou jakékoliv změny nastavení Vašich úložných zařízení, ukáže se Vám přehled změn a budete požádáni o jejich potvrzení. + Na tomto úložném zařízení se už nachází operační systém. Jak chcete postupovat?<br/>Než budou provedeny jakékoli změny na úložných zařízeních, bude zobrazen jejich přehled a budete požádáni o jejich potvrzení. This storage device has multiple operating systems on it. What would you like to do?<br/>You will be able to review and confirm your choices before any change is made to the storage device. - Na tomto úložném zařízení již je několik operačních systémů. Jak chcete postupovat?<br/>Než se provedou jakékoliv změny nastavení Vašich úložných zařízení, ukáže se Vám přehled změn a budete požádáni o jejich potvrzení. + Na tomto úložném zařízení se už nachází několik operačních systémů. Jak chcete postupovat?<br/>Než budou provedeny jakékoli změny na úložných zařízeních, bude zobrazen jejich přehled změn a budete požádáni o jejich potvrzení. @@ -507,17 +507,17 @@ Instalační program bude ukončen a všechny změny ztraceny. Clear mounts for partitioning operations on %1 - Odpojit připojené svazky pro potřeby rozdělení oddílů na %1 + Odpojit souborové systémy před zahájením dělení %1 na oddíly Clearing mounts for partitioning operations on %1. - Odpojuji připojené svazky pro potřeby rozdělení oddílů na %1 + Odpojují se souborové systémy před zahájením dělení %1 na oddíly Cleared all mounts for %1 - Odpojeny všechny připojené svazky pro %1 + Všechny souborové systémy na %1 odpojeny @@ -530,17 +530,17 @@ Instalační program bude ukončen a všechny změny ztraceny. Clearing all temporary mounts. - Odpojuji všechny dočasné přípojné body. + Odpojují se všechny dočasné přípojné body. Cannot get list of temporary mounts. - Nelze zjistit dočasné přípojné body. + Nepodařilo se zjistit dočasné přípojné body. Cleared all temporary mounts. - Vyčištěno od všech dočasných přípojných bodů. + Všechny přípojné body odpojeny. @@ -583,7 +583,7 @@ Instalační program bude ukončen a všechny změny ztraceny. &Mount Point: - &Bod připojení: + &Přípojný bod: @@ -613,7 +613,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Mountpoint already in use. Please select another one. - Bod připojení je už používán. Prosím vyberte jiný. + Tento přípojný bod už je používán – vyberte jiný. @@ -631,32 +631,32 @@ Instalační program bude ukončen a všechny změny ztraceny. Creating new %1 partition on %2. - Vytvářím nový %1 oddíl na %2. + Vytváří se nový %1 oddíl na %2. The installer failed to create partition on disk '%1'. - Instalátor selhal při vytváření oddílu na disku '%1'. + Instalátoru se nepodařilo vytvořit oddílu na datovém úložišti „%1“. Could not open device '%1'. - Nelze otevřít zařízení '%1'. + Nepodařilo se otevřít zařízení „%1“. Could not open partition table. - Nelze otevřít tabulku oddílů. + Nepodařilo se otevřít tabulku oddílů. The installer failed to create file system on partition %1. - Instalátor selhal při vytváření souborového systému na oddílu %1. + Instalátoru se nepodařilo vytvořit souborový systém na oddílu %1. The installer failed to update partition table on disk '%1'. - Instalátor selhal při aktualizaci tabulky oddílů na disku '%1'. + Instalátoru se nepodařilo zaktualizovat tabulku oddílů na jednotce „%1“. @@ -669,7 +669,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Creating a new partition table will delete all existing data on the disk. - Vytvoření nové tabulky oddílů vymaže všechna data na disku. + Vytvoření nové tabulky oddílů vymaže všechna stávající data na jednotce. @@ -702,17 +702,17 @@ Instalační program bude ukončen a všechny změny ztraceny. Creating new %1 partition table on %2. - Vytvářím novou %1 tabulku oddílů na %2. + Vytváří se nová %1 tabulka oddílů na %2. The installer failed to create a partition table on %1. - Instalátor selhal při vytváření tabulky oddílů na %1. + Instalátoru se nepodařilo vytvořit tabulku oddílů na %1. Could not open device %1. - Nelze otevřít zařízení %1. + Nepodařilo se otevřít zařízení %1. @@ -730,32 +730,32 @@ Instalační program bude ukončen a všechny změny ztraceny. Creating user %1. - Vytvářím uživatele %1. + Vytváří se účet pro uživatele %1. Sudoers dir is not writable. - Nelze zapisovat do adresáře Sudoers. + Nepodařilo se zapsat do složky sudoers.d. Cannot create sudoers file for writing. - Nelze vytvořit soubor sudoers pro zápis. + Nepodařilo se vytvořit soubor pro sudoers do kterého je třeba zapsat. Cannot chmod sudoers file. - Nelze použít chmod na soubor sudoers. + Nepodařilo se změnit přístupová práva (chmod) na souboru se sudoers. Cannot open groups file for reading. - Nelze otevřít soubor groups pro čtení. + Nepodařilo se otevřít soubor groups pro čtení. Cannot create user %1. - Nelze vytvořit uživatele %1. + Nepodařilo se vytvořit uživatele %1. @@ -765,17 +765,17 @@ Instalační program bude ukončen a všechny změny ztraceny. Cannot add user %1 to groups: %2. - Nelze přidat uživatele %1 do skupin: %2. + Nepodařilo se přidat uživatele %1 do skupin: %2. usermod terminated with error code %1. - usermod ukončen s chybovým kódem %1. + Příkaz usermod ukončen s chybovým kódem %1. Cannot set home directory ownership for user %1. - Nelze nastavit vlastnictví domovského adresáře pro uživatele %1. + Nepodařilo se nastavit vlastnictví domovské složky pro uživatele %1. @@ -803,22 +803,22 @@ Instalační program bude ukončen a všechny změny ztraceny. The installer failed to delete partition %1. - Instalátor selhal při odstraňování oddílu %1. + Instalátoru se nepodařilo odstranit oddíl %1. Partition (%1) and device (%2) do not match. - Oddíl (%1) a zařížení (%2) si neodpovídají. + Neshoda v oddílu (%1) a zařízení (%2). Could not open device %1. - Nelze otevřít zařízení %1. + Nedaří s otevřít zařízení %1. Could not open partition table. - Nelze otevřít tabulka oddílů. + Nedaří se otevřít tabulku oddílů. @@ -826,12 +826,12 @@ Instalační program bude ukončen a všechny změny ztraceny. The type of <strong>partition table</strong> on the selected storage device.<br><br>The only way to change the partition table type is to erase and recreate the partition table from scratch, which destroys all data on the storage device.<br>This installer will keep the current partition table unless you explicitly choose otherwise.<br>If unsure, on modern systems GPT is preferred. - Typ <strong>tabulky oddílů</strong>, který je na vybraném úložném zařízení.<br><br>Jedinou možností změnit typ tabulky oddílů je smazání a znovu vytvoření nové tabulky oddílů, tím se smažou všechna data na daném úložném zařízení.<br>Instalační program zanechá stávající typ tabulky oddílů, pokud si sami nenavolíte jeho změnu.<br>Pokud si nejste jisti, na moderních systémech se upřednostňuje GPT. + Typ <strong>tabulky oddílů</strong>, který je na vybraném úložném zařízení.<br><br>Jedinou možností jak změnit typ tabulky oddílů je smazání a opětovné vytvoření nové tabulky oddílů, tím se smažou všechna data na daném úložném zařízení.<br>Tento instalátor ponechá stávající typ tabulky oddílů, pokud si sami nenavolíte jeho změnu.<br>Pokud si nejste jisti, na moderních systémech se upřednostňuje GPT. This device has a <strong>%1</strong> partition table. - Zařízení má tabulku oddílů <strong>%1</strong>. + Na tomto zařízení je tabulka oddílů <strong>%1</strong>. @@ -841,12 +841,12 @@ Instalační program bude ukončen a všechny změny ztraceny. This installer <strong>cannot detect a partition table</strong> on the selected storage device.<br><br>The device either has no partition table, or the partition table is corrupted or of an unknown type.<br>This installer can create a new partition table for you, either automatically, or through the manual partitioning page. - Instalační program <strong>nedetekoval žádnou tabulku oddílů</strong> na vybraném úložném zařízení.<br><br>Toto zařízení buď žádnou tabulku nemá nebo je porušená nebo neznámeho typu.<br> Instalátor Vám může vytvořit novou tabulku oddílů - buď automaticky nebo přes ruční dělení disku. + Instalační program na zvoleném zařízení <strong>nezjistil žádnou tabulku oddílů</strong>.<br><br>Toto zařízení buď žádnou tabulku nemá nebo je porušená nebo neznámého typu.<br> Instalátor může vytvořit novou tabulku oddílů – buď automaticky nebo přes ruční rozdělení jednotky. <br><br>This is the recommended partition table type for modern systems which start from an <strong>EFI</strong> boot environment. - <br><br>Tohle je doporučený typ tabulky oddílů pro moderní systémy, které se spouští pomocí <strong>EFI</strong> spouštěcího prostředí. + <br><br>Tohle je doporučený typ tabulky oddílů pro moderní systémy, které se spouští pomocí <strong>EFI</strong> zaváděcího prostředí. @@ -859,7 +859,7 @@ Instalační program bude ukončen a všechny změny ztraceny. %1 - %2 (%3) - %1 - %2 (%3) + %1 – %2 (%3) @@ -872,12 +872,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Skip writing LUKS configuration for Dracut: "/" partition is not encrypted - Přeskočit zápis nastavení LUKS pro Dracut: oddíl "/" není šifovaný + Přeskočit zápis nastavení LUKS pro Dracut: oddíl „/“ není šifrovaný Failed to open %1 - Selhalo čtení %1 + Nepodařilo se otevřít %1 @@ -918,7 +918,7 @@ Instalační program bude ukončen a všechny změny ztraceny. &Mount Point: - &Bod připojení: + &Přípojný bod: @@ -943,7 +943,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Mountpoint already in use. Please select another one. - Bod připojení je už používán. Prosím vyberte jiný. + Tento přípojný bod je už používán – vyberte jiný. @@ -961,17 +961,17 @@ Instalační program bude ukončen a všechny změny ztraceny. Passphrase - Heslo: + Heslová fráze Confirm passphrase - Potvrď heslo + Potvrzení heslové fráze Please enter the same passphrase in both boxes. - Zadejte prosím stejné heslo do obou polí. + Zadejte stejnou heslovou frázi do obou kolonek. @@ -979,12 +979,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Set partition information - Nastavit informace oddílu + Nastavit informace o oddílu Install %1 on <strong>new</strong> %2 system partition. - Instalovat %1 na <strong>nový</strong> %2 systémový oddíl. + Nainstalovat %1 na <strong>nový</strong> %2 systémový oddíl. @@ -994,7 +994,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Install %2 on %3 system partition <strong>%1</strong>. - Instalovat %2 na %3 systémový oddíl <strong>%1</strong>. + Nainstalovat %2 na %3 systémový oddíl <strong>%1</strong>. @@ -1004,12 +1004,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Install boot loader on <strong>%1</strong>. - Instalovat zavaděč na <strong>%1</strong>. + Nainstalovat zavaděč do <strong>%1</strong>. Setting up mount points. - Nastavuji přípojné body. + Nastavují se přípojné body. @@ -1027,12 +1027,12 @@ Instalační program bude ukončen a všechny změny ztraceny. <h1>All done.</h1><br/>%1 has been installed on your computer.<br/>You may now restart into your new system, or continue using the %2 Live environment. - <h1>Instalace je u konce.</h1><br/>%1 byl nainstalován na Váš počítač.<br/>Teď můžete počítač restartovat a přejít do čerstvě naistalovaného systému, nebo můžete pokračovat v práci s živým prostředím %2. + <h1>Instalace je u konce.</h1><br/>%1 byl nainstalován na váš počítač.<br/>Nyní ho můžete restartovat a přejít do čerstvě nainstalovaného systému, nebo můžete pokračovat v práci ve stávajícím prostředím %2, spuštěným z instalačního média. <h1>Installation Failed</h1><br/>%1 has not been installed on your computer.<br/>The error message was: %2. - <h1>Instalace selhala</h1><br/>%1 nebyl instalován na váš počítač.<br/>Hlášení o chybě: %2. + <h1>Instalace se nezdařila</h1><br/>%1 nebyl instalován na váš počítač.<br/>Hlášení o chybě: %2. @@ -1068,32 +1068,32 @@ Instalační program bude ukončen a všechny změny ztraceny. Formatting partition %1 with file system %2. - Formátuji oddíl %1 souborovým systémem %2. + Vytváření souborového systému %2 na oddílu %1. The installer failed to format partition %1 on disk '%2'. - Instalátor selhal při formátování oddílu %1 na disku '%2'. + Instalátoru se nepodařilo vytvořit souborový systém na oddílu %1 jednotky datového úložiště „%2“. Could not open device '%1'. - Nelze otevřít zařízení '%1'. + Nedaří se otevřít zařízení „%1“. Could not open partition table. - Nelze otevřít tabulku oddílů. + Nedaří se otevřít tabulku oddílů. The installer failed to create file system on partition %1. - Instalátor selhal při vytváření systému souborů na oddílu %1. + Instalátoru se nezdařilo vytvořit souborový systém na oddílu %1. The installer failed to update partition table on disk '%1'. - Instalátor selhal při aktualizaci tabulky oddílů na disku '%1'. + Instalátoru se nezdařilo aktualizovat tabulku oddílů na jednotce „%1“. @@ -1103,19 +1103,19 @@ Instalační program bude ukončen a všechny změny ztraceny. Konsole not installed - Konsole není nainstalována. + Konsole není nainstalované. Please install the kde konsole and try again! - Prosím naistalujte kde konsoli a zkuste to znovu! + Nainstalujte KDE Konsole a zkuste to znovu! Executing script: &nbsp;<code>%1</code> - Spouštím skript: &nbsp;<code>%1</code> + Spouštění skriptu: &nbsp;<code>%1</code> @@ -1152,17 +1152,17 @@ Instalační program bude ukončen a všechny změny ztraceny. System locale setting - Nastavení locale systému + Místní a jazyková nastavení pro systém The system locale setting affects the language and character set for some command line user interface elements.<br/>The current setting is <strong>%1</strong>. - Nastavené locale systému ovlivňuje jazyk a znakovou sadu pro UI příkazové řádky.<br/>Současné nastavení je <strong>%1</strong>. + Místní a jazykové nastavení systému ovlivňuje jazyk a znakovou sadu některých prvků rozhraní příkazového řádku.<br/>Stávající nastavení je <strong>%1</strong>. &Cancel - &Zrušit + &Storno @@ -1185,7 +1185,7 @@ Instalační program bude ukončen a všechny změny ztraceny. <h1>License Agreement</h1>This setup procedure will install proprietary software that is subject to licensing terms. - <h1>Licenční ujednání</h1>Tato instalace nainstaluje některý proprietární software, který podléhá licenčním podmínkám. + <h1>Licenční ujednání</h1>Tato instalace nainstaluje také proprietární software, který podléhá licenčním podmínkám. @@ -1212,7 +1212,7 @@ Instalační program bude ukončen a všechny změny ztraceny. <strong>%1 graphics driver</strong><br/><font color="Grey">by %2</font> %1 is usually a vendor name, example: Nvidia graphics driver - <strong>%1 graphický ovladač</strong><br/><font color="Grey"> %2</font> + <strong>%1 ovladač grafiky</strong><br/><font color="Grey"> %2</font> @@ -1253,12 +1253,12 @@ Instalační program bude ukončen a všechny změny ztraceny. The system language will be set to %1. - Jazyk systému bude nastaven na 1%. + Jazyk systému bude nastaven na %1. The numbers and dates locale will be set to %1. - Čísla a data národního prostředí budou nastavena na %1. + Formát zobrazení čísel, data a času bude nastaven dle národního prostředí %1. @@ -1274,7 +1274,7 @@ Instalační program bude ukončen a všechny změny ztraceny. &Change... - &Změnit... + &Změnit… @@ -1293,7 +1293,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Loading location data... - Načítání informací o poloze... + Načítání informací o poloze… @@ -1316,22 +1316,22 @@ Instalační program bude ukončen a všechny změny ztraceny. Could not create target for moving file system on partition %1. - Nelze vytvořit cíl pro přesouvaný soubor na oddílu %1. + Nedaří se vytvořit cíl pro přesouvaný souborový systém na oddílu %1. Moving of partition %1 failed, changes have been rolled back. - Posun oddílu %1 selhalo, změny byly vráceny zpět. + Posunutí oddílu %1 se nezdařilo, změny byly vráceny zpět. Moving of partition %1 failed. Roll back of the changes have failed. - Posun oddílu %1 selhalo. Změny nelze vrátit zpět. + Posunutí oddílu %1 se nezdařilo. Změny se nepodařilo vrátit zpět. Updating boot sector after the moving of partition %1 failed. - Aktualizace zaváděcího sektoru po přesunu oddílu %1 selhala. + Aktualizace zaváděcího sektoru po přesunu oddílu %1 se nezdařila. @@ -1347,7 +1347,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Could not open device %1 to rollback copying. - Nelze otevřít zařízení %1 pro zpětné kopírování. + Nelze otevřít zařízení %1 pro vrácení kopírování zpět. @@ -1366,7 +1366,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Network Installation. (Disabled: Unable to fetch package lists, check your network connection) - Síťová instalace. (Zakázáno: Nelze načíst seznamy balíků, zkontrolujte připojení k síti) + Síťová instalace. (Vypnuto: Nedaří se stáhnout seznamy balíčků – zkontrolujte připojení k síti) @@ -1374,7 +1374,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Package selection - Výběr balíků + Výběr balíčků @@ -1382,7 +1382,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Form - Form + Formulář @@ -1392,7 +1392,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Type here to test your keyboard - Pište sem pro test klávesnice + Klávesnici vyzkoušejte psaním sem @@ -1400,7 +1400,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Form - Form + Formulář @@ -1417,7 +1417,7 @@ Instalační program bude ukončen a všechny změny ztraceny. font-weight: normal - font-weight: normal + šířka písma: normální @@ -1432,17 +1432,17 @@ Instalační program bude ukončen a všechny změny ztraceny. <small>Enter the same password twice, so that it can be checked for typing errors. A good password will contain a mixture of letters, numbers and punctuation, should be at least eight characters long, and should be changed at regular intervals.</small> - <small>Vložte stejné heslo dvakrát pro kontrolu překlepů. Dobré heslo se bude skládat z písmen, čísel a interpunkce a mělo by být alespoň osm znaků dlouhé. Heslo byste měli pravidelně měnit.</small> + <small>Zadejte heslo dvakrát stejně pro kontrolu překlepů. Dobré heslo se bude skládat z písmen, čísel a interpunkce a mělo by být alespoň osm znaků dlouhé. Heslo byste měli pravidelně měnit.</small> What is the name of this computer? - Jaké je jméno tohoto počítače? + Jaký je název tohoto počítače? <small>This name will be used if you make the computer visible to others on a network.</small> - <small>Tímto jménem se bude počítač zobrazovat ostatním počítačům v síti.</small> + <small>Pod tímto názvem se bude počítač zobrazovat ostatním počítačům v síti.</small> @@ -1452,12 +1452,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Use the same password for the administrator account. - Použít stejné heslo i pro účet administrátora. + Použít stejné heslo i pro účet správce systému. Choose a password for the administrator account. - Zvolte si heslo pro účet administrátora. + Zvolte si heslo pro účet správce systému. @@ -1470,27 +1470,27 @@ Instalační program bude ukončen a všechny změny ztraceny. Root - Root + Kořenový (root) Home - Home + Složky uživatelů (home) Boot - Boot + Zaváděcí (boot) EFI system - EFI systém + EFI systémový Swap - Swap + Odkládání str. z oper. paměti (swap) @@ -1525,7 +1525,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Name - Jméno + Název @@ -1588,7 +1588,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Are you sure you want to create a new partition table on %1? - Opravdu si přejete vytvořit novou tabulku oddílů na %1? + Opravdu chcete na %1 vytvořit novou tabulku oddílů? @@ -1596,7 +1596,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Gathering system information... - Shromažďuji informace o systému... + Shromažďování informací o systému… @@ -1606,12 +1606,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Install %1 <strong>alongside</strong> another operating system. - Instalovat %1 <strong>vedle</strong> dalšího operačního systému. + Nainstalovat %1 <strong>vedle</strong> dalšího operačního systému. <strong>Erase</strong> disk and install %1. - <strong>Smazat</strong> disk a nainstalovat %1. + <strong>Smazat</strong> obsah jednotky a nainstalovat %1. @@ -1621,37 +1621,37 @@ Instalační program bude ukončen a všechny změny ztraceny. <strong>Manual</strong> partitioning. - <strong>Ruční</strong> dělení disku. + <strong>Ruční</strong> dělení jednotky. Install %1 <strong>alongside</strong> another operating system on disk <strong>%2</strong> (%3). - Instalovat %1 <strong>vedle</strong> dalšího operačního systému na disk <strong>%2</strong> (%3). + Nainstalovat %1 <strong>vedle</strong> dalšího operačního systému na disk <strong>%2</strong> (%3). <strong>Erase</strong> disk <strong>%2</strong> (%3) and install %1. - <strong>Smazat</strong> disk <strong>%2</strong> (%3) a instalovat %1. + <strong>Vymazat</strong> obsah jednotky <strong>%2</strong> (%3) a nainstalovat %1. <strong>Replace</strong> a partition on disk <strong>%2</strong> (%3) with %1. - <strong>Nahradit</strong> oddíl na disku <strong>%2</strong> (%3) %1. + <strong>Nahradit</strong> oddíl na jednotce <strong>%2</strong> (%3) %1. <strong>Manual</strong> partitioning on disk <strong>%1</strong> (%2). - <strong>Ruční</strong> dělení disku <strong>%1</strong> (%2). + <strong>Ruční</strong> dělení jednotky <strong>%1</strong> (%2). Disk <strong>%1</strong> (%2) - Disk <strong>%1</strong> (%2) + Jednotka <strong>%1</strong> (%2) Current: - Současný: + Stávající: @@ -1661,22 +1661,22 @@ Instalační program bude ukončen a všechny změny ztraceny. No EFI system partition configured - Není nakonfigurován žádný EFI systémový oddíl + Není nastavený žádný EFI systémový oddíl An EFI system partition is necessary to start %1.<br/><br/>To configure an EFI system partition, go back and select or create a FAT32 filesystem with the <strong>esp</strong> flag enabled and mount point <strong>%2</strong>.<br/><br/>You can continue without setting up an EFI system partition but your system may fail to start. - Pro spuštění %1 je potřeba systémový oddíl.<br/><br/>Pro nastavení EFI systémového oddílu se vraťte zpět a vyberte nebo vytvořte oddíl typu FAT32 s příznakem <strong>esp</strong> a přípojným bodem <strong>%2</strong>.<br/><br/>Je možné pokračovat bez nastavení systémového oddílu EFI, ale váš systém nemusí jít spustit. + Pro spuštění %1 je potřeba EFI systémový oddíl.<br/><br/>Pro nastavení EFI systémového oddílu se vraťte zpět a vyberte nebo vytvořte oddíl typu FAT32 s příznakem <strong>esp</strong> a přípojným bodem <strong>%2</strong>.<br/><br/>Je možné pokračovat bez nastavení EFI systémového oddílu, ale systém nemusí jít spustit. EFI system partition flag not set - Příznak EFI systémového oddílu není nastaven + Příznak EFI systémového oddílu není nastavený An EFI system partition is necessary to start %1.<br/><br/>A partition was configured with mount point <strong>%2</strong> but its <strong>esp</strong> flag is not set.<br/>To set the flag, go back and edit the partition.<br/><br/>You can continue without setting the flag but your system may fail to start. - Pro spuštění %1 je potřeba systémový oddíl.<br/><br/>Byl nakonfigurován oddíl s přípojným bodem <strong>%2</strong> ale nemá nastaven příznak <strong>esp</strong>.<br/>Pro nastavení příznaku se vraťte zpět a upravte oddíl.<br/><br/>Je možné pokračovat bez nastavení příznaku, ale váš systém nemusí jít spustit. + Pro spuštění %1 je potřeba EFI systémový oddíl.<br/><br/>Byl nastaven oddíl s přípojným bodem <strong>%2</strong> ale nemá nastaven příznak <strong>esp</strong>.<br/>Pro nastavení příznaku se vraťte zpět a upravte oddíl.<br/><br/>Je možné pokračovat bez nastavení příznaku, ale systém nemusí jít spustit. @@ -1778,12 +1778,12 @@ Instalační program bude ukončen a všechny změny ztraceny. <strong>%4</strong><br/><br/>The partition %1 is too small for %2. Please select a partition with capacity at least %3 GiB. - <strong>%4</strong><br/><br/>Oddíl %1 je příliš malý pro %2. Prosím vyberte oddíl s kapacitou alespoň %3 GiB. + <strong>%4</strong><br/><br/>Oddíl %1 je příliš malý pro %2. Vyberte oddíl s kapacitou alespoň %3 GiB. <strong>%2</strong><br/><br/>An EFI system partition cannot be found anywhere on this system. Please go back and use manual partitioning to set up %1. - <strong>%2</strong><br/><br/>Systémový oddíl EFI nenalezen. Prosím vraťte se a zvolte ruční rozdělení disku pro nastavení %1. + <strong>%2</strong><br/><br/>EFI systémový oddíl nenalezen. Vraťte se, zvolte ruční rozdělení jednotky, a nastavte %1. @@ -1795,12 +1795,12 @@ Instalační program bude ukončen a všechny změny ztraceny. The EFI system partition at %1 will be used for starting %2. - Pro zavedení %2 se využije systémový oddíl EFI %1. + Pro zavedení %2 se využije EFI systémový oddíl %1. EFI system partition: - Systémový oddíl EFI: + EFI systémový oddíl: @@ -1808,17 +1808,17 @@ Instalační program bude ukončen a všechny změny ztraceny. Gathering system information... - Shromažďuji informace o systému... + Shromažďování informací o systému… has at least %1 GB available drive space - má minimálně %1 GB dostupného místa na disku. + má minimálně %1 GB dostupného místa na jednotce There is not enough drive space. At least %1 GB is required. - Nedostatek místa na disku. Je potřeba nejméně %1 GB. + Nedostatek místa na úložišti. Je potřeba nejméně %1 GB. @@ -1828,7 +1828,7 @@ Instalační program bude ukončen a všechny změny ztraceny. The system does not have enough working memory. At least %1 GB is required. - Systém nemá dostatek paměti. Je potřeba nejméně %1 GB. + Systém nemá dostatek operační paměti. Je potřeba nejméně %1 GB. @@ -1853,12 +1853,12 @@ Instalační program bude ukončen a všechny změny ztraceny. The installer is not running with administrator rights. - Instalační program není spuštěn s právy administrátora. + Instalační program není spuštěn s právy správce systému. The screen is too small to display the installer. - Obrazovka je příliš malá pro zobrazení instalátoru. + Rozlišení obrazovky je příliš malé pro zobrazení instalátoru. @@ -1866,12 +1866,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Resize file system on partition %1. - Změnit velikost systému souborů na oddílu %1. + Změnit velikost souborového systému na oddílu %1. Parted failed to resize filesystem. - Parted selhal při změně velikosti systému souborů. + Nástroji parted se nezdařilo změnit velikost souborového systému. @@ -1894,18 +1894,18 @@ Instalační program bude ukončen a všechny změny ztraceny. Resizing %2MB partition %1 to %3MB. - Měním velikost %2MB oddílu %1 na %3MB. + Mění se velikost %2MB oddílu %1 na %3MB. The installer failed to resize partition %1 on disk '%2'. - Instalátor selhal při změně velikosti oddílu %1 na disku '%2'. + Instalátoru se nezdařilo změnit velikost oddílu %1 na jednotce „%2“. Could not open device '%1'. - Nelze otevřít zařízení '%1'. + Nedaří se otevřít zařízení „%1“. @@ -1913,12 +1913,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Scanning storage devices... - Skenuji úložná zařízení... + Skenování úložných zařízení… Partitioning - Dělení disku + Dělení jednotky @@ -1926,17 +1926,17 @@ Instalační program bude ukončen a všechny změny ztraceny. Set hostname %1 - Nastavit jméno počítače %1 + Nastavit název počítače %1 Set hostname <strong>%1</strong>. - Nastavit hostname <strong>%1</strong>. + Nastavit název počítače <strong>%1</strong>. Setting hostname %1. - Nastavuji hostname %1. + Nastavuje se název počítače %1. @@ -1948,7 +1948,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Cannot write hostname to target system - Nelze zapsat jméno počítače na cílový systém + Název počítače se nedaří zapsat do cílového systému @@ -1961,24 +1961,24 @@ Instalační program bude ukončen a všechny změny ztraceny. Failed to write keyboard configuration for the virtual console. - Selhal zápis konfigurace klávesnice do virtuální konzole. + Zápis nastavení klávesnice pro virtuální konzoli se nezdařil. Failed to write to %1 - Selhal zápis do %1 + Zápis do %1 se nezdařil Failed to write keyboard configuration for X11. - Selhal zápis konfigurace klávesnice pro X11. + Zápis nastavení klávesnice pro grafický server X11 se nezdařil. Failed to write keyboard configuration to existing /etc/default directory. - Selhal zápis nastavení klávesnice do existující složky /etc/default. + Zápis nastavení klávesnice do existující složky /etc/default se nezdařil. @@ -1986,7 +1986,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Set flags on partition %1. - Nastavit příznak oddílu %1. + Nastavit příznaky na oddílu %1. @@ -1996,22 +1996,22 @@ Instalační program bude ukončen a všechny změny ztraceny. Set flags on new partition. - Nastavit příznak na novém oddílu. + Nastavit příznaky na novém oddílu. Clear flags on partition <strong>%1</strong>. - Smazat příznaky oddílu <strong>%1</strong>. + Vymazat příznaky z oddílu <strong>%1</strong>. Clear flags on %1MB <strong>%2</strong> partition. - Smazat příznaky na %1MB <strong>%2</strong> oddílu. + Vymazat příznaky z %1MB <strong>%2</strong> oddílu. Clear flags on new partition. - Smazat příznaky na novém oddílu. + Vymazat příznaky z nového oddílu. @@ -2046,7 +2046,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Setting flags <strong>%2</strong> on partition <strong>%1</strong>. - Nastavování příznaků <strong>%2</strong> na oddíle <strong>%1</strong>. + Nastavování příznaků <strong>%2</strong> na oddílu <strong>%1</strong>. @@ -2061,22 +2061,22 @@ Instalační program bude ukončen a všechny změny ztraceny. The installer failed to set flags on partition %1. - Instalátor selhal při nastavení příznaku oddílu %1. + Instalátoru se nepodařilo nastavit příznak na oddílu %1 Could not open device '%1'. - Nelze otevřít zařízení '%1'. + Nedaří se otevřít zařízení „%1“. Could not open partition table on device '%1'. - Nelze otevřít tabulku oddílů na zařízení '%1'. + Nedaří se otevřít tabulku oddílů na zařízení „%1“. Could not find partition '%1'. - Oddíl '%1' nebyl nalezen. + Oddíl „%1“ nebyl nalezen. @@ -2089,7 +2089,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Failed to change the geometry of the partition. - Selhala změna geometrie oddílu. + Změna geometrie oddílu se nezdařila. @@ -2102,22 +2102,22 @@ Instalační program bude ukončen a všechny změny ztraceny. Setting password for user %1. - Nastavuji heslo pro uživatele %1. + Nastavuje se heslo pro uživatele %1. Bad destination system path. - Špatná cílová systémová cesta. + Chybný popis cílového umístění systému. rootMountPoint is %1 - rootMountPoint je %1 + Přípojný bod kořenového souborového systému (root) je %1 Cannot disable root account. - Nelze zakázat účet root. + Nelze zakázat účet správce systému (root). @@ -2127,12 +2127,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Cannot set password for user %1. - Nelze nastavit heslo uživatele %1. + Nepodařilo se nastavit heslo uživatele %1. usermod terminated with error code %1. - usermod ukončen s chybovým kódem %1. + Příkaz usermod ukončen s chybovým kódem %1. @@ -2145,12 +2145,12 @@ Instalační program bude ukončen a všechny změny ztraceny. Cannot access selected timezone path. - Není přístup k vybrané cestě časové zóny. + Není přístup k vybranému popisu umístění časové zóny. Bad path: %1 - Špatná cesta: %1 + Chybný popis umístění: %1 @@ -2160,17 +2160,17 @@ Instalační program bude ukončen a všechny změny ztraceny. Link creation failed, target: %1; link name: %2 - Vytváření odkazu selhalo, cíl: %1; jméno odkazu: %2 + Odkaz se nepodařilo vytvořit, cíl: %1; název odkazu: %2 Cannot set timezone, - Nelze nastavit časovou zónu. + Nelze nastavit časovou zónu, Cannot open /etc/timezone for writing - Nelze otevřít /etc/timezone pro zápis + Soubor /etc/timezone se nedaří otevřít pro zápis @@ -2178,7 +2178,7 @@ Instalační program bude ukončen a všechny změny ztraceny. This is an overview of what will happen once you start the install procedure. - Tohle je přehled událostí instalačního procesu. + Toto je přehled událostí které nastanou po spuštění instalačního procesu. @@ -2186,7 +2186,7 @@ Instalační program bude ukončen a všechny změny ztraceny. Summary - Shrnutí + Souhrn @@ -2199,38 +2199,38 @@ Instalační program bude ukončen a všechny změny ztraceny. Your username contains invalid characters. Only lowercase letters and numbers are allowed. - Vaše uživatelské jméno obsahuje neplatné znaky. Jsou povolena pouze malá písmena a čísla. + Vaše uživatelské jméno obsahuje neplatné znaky. Jsou povolena pouze malá písmena a (arabské) číslice. Your hostname is too short. - Vaše hostname je příliš krátké. + Název stroje je příliš krátký. Your hostname is too long. - Vaše hostname je příliš dlouhé. + Název stroje je příliš dlouhý. Your hostname contains invalid characters. Only letters, numbers and dashes are allowed. - Vaše hostname obsahuje neplatné znaky. Jsou povoleny pouze písmena, čísla a pomlčky. + Název stroje obsahuje neplatné znaky. Jsou povoleny pouze písmena, číslice a spojovníky. Your passwords do not match! - Zadaná hesla se neshodují! + Zadání hesla se neshodují! Password is too short - + Heslo je příliš krátké Password is too long - + Heslo je příliš dlouhé @@ -2251,7 +2251,7 @@ Instalační program bude ukončen a všechny změny ztraceny. &Language: - &Jazyk + &Jazyk: @@ -2271,7 +2271,7 @@ Instalační program bude ukončen a všechny změny ztraceny. &About - &O nás + &O projektu @@ -2281,7 +2281,7 @@ Instalační program bude ukončen a všechny změny ztraceny. <h1>Welcome to the Calamares installer for %1.</h1> - <h1>Vítá vás instalační program Calamares pro %1.</h1> + <h1>Vítejte v Calamares, instalačním programu (nejen) pro %1.</h1> diff --git a/lang/calamares_da.ts b/lang/calamares_da.ts index 201a8072c..ed25eb0d1 100644 --- a/lang/calamares_da.ts +++ b/lang/calamares_da.ts @@ -2225,12 +2225,12 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt. Password is too short - + Adgangskoden er for kort Password is too long - + Adgangskoden er for lang diff --git a/lang/calamares_fr.ts b/lang/calamares_fr.ts index fa5db7dad..e661c9a5a 100644 --- a/lang/calamares_fr.ts +++ b/lang/calamares_fr.ts @@ -2225,12 +2225,12 @@ L'installateur se fermera et les changements seront perdus. Password is too short - + Le mot de passe est trop court Password is too long - + Le mot de passe est trop long diff --git a/lang/calamares_gl.ts b/lang/calamares_gl.ts index ecda4fb9c..df05e81c2 100644 --- a/lang/calamares_gl.ts +++ b/lang/calamares_gl.ts @@ -1254,39 +1254,39 @@ O instalador pecharase e perderanse todos os cambios. The system language will be set to %1. - + A linguaxe do sistema será establecida a %1. The numbers and dates locale will be set to %1. - + A localización de números e datas será establecida a %1. Region: - + Rexión: Zone: - + Zona: &Change... - + &Cambio... Set timezone to %1/%2.<br/> - + Establecer a zona de tempo a %1/%2.<br/> %1 (%2) Language (Country) - + %1 (%2) @@ -1294,12 +1294,12 @@ O instalador pecharase e perderanse todos os cambios. Loading location data... - + Cargando datos de localización... Location - + Localización... @@ -1307,48 +1307,48 @@ O instalador pecharase e perderanse todos os cambios. Move file system of partition %1. - + Move-lo sistema de ficheiro da partición %1. Could not open file system on partition %1 for moving. - + Non foi posible abri-lo sistema de ficheiros na partición %1 para move-lo. Could not create target for moving file system on partition %1. - + Non foi posible crea-lo destino para move-lo sistema de ficheiros na partición %1. Moving of partition %1 failed, changes have been rolled back. - + Fallou move-la partición %1, desfixeronse os cambios. Moving of partition %1 failed. Roll back of the changes have failed. - + Fallou move-la partición %1. Non se pudo desface-los cambios. Updating boot sector after the moving of partition %1 failed. - + Actualizando o sector de arranque tra-lo fallo do movimento da partición %1. The logical sector sizes in the source and target for copying are not the same. This is currently unsupported. - + O tamaño do sector lóxico na orixe e no destino para a copia non é o mesmo. Actualmente non é posible face-lo. Source and target for copying do not overlap: Rollback is not required. - + Orixe e destino para copia non se superpoñen: Non cómpre desfacer. Could not open device %1 to rollback copying. - + Non se pudo abrir o dispositivo %1 para copia de respaldo. @@ -1356,18 +1356,18 @@ O instalador pecharase e perderanse todos os cambios. Name - + Nome Description - + Descripción Network Installation. (Disabled: Unable to fetch package lists, check your network connection) - + Installación por rede. (Desactivadas. Non se pudo recupera-la lista de pacotes, comprobe a sua conexión a rede) @@ -1375,7 +1375,7 @@ O instalador pecharase e perderanse todos os cambios. Package selection - + Selección de pacotes. @@ -1388,12 +1388,12 @@ O instalador pecharase e perderanse todos os cambios. Keyboard Model: - + Modelo de teclado. Type here to test your keyboard - + Teclee aquí para comproba-lo seu teclado. @@ -1406,49 +1406,49 @@ O instalador pecharase e perderanse todos os cambios. What is your name? - + Cal é o seu nome? What name do you want to use to log in? - + Cal é o nome que quere usar para entrar? font-weight: normal - + Tamaño de letra: normal <small>If more than one person will use this computer, you can set up multiple accounts after installation.</small> - + <small>Se máis dunha persoa vai usa-lo computador, pode configurar contas múltiples trala instalción.</small> Choose a password to keep your account safe. - + Escolla un contrasinal para mante-la sua conta segura. <small>Enter the same password twice, so that it can be checked for typing errors. A good password will contain a mixture of letters, numbers and punctuation, should be at least eight characters long, and should be changed at regular intervals.</small> - + <small>Entre o mesmo contrasinal dúas veces, deste xeito podese comprobar errores ó teclear. Un bo contrasinal debe conter un conxunto de letras, números e signos de puntuación, deberá ter como mínimo oito carácteres, e debe cambiarse a intervalos de tempo regulares.</small> What is the name of this computer? - + Cal é o nome deste computador? <small>This name will be used if you make the computer visible to others on a network.</small> - + <small>Este nome usarase se fai o computador visible para outros nunha rede.</small> Log in automatically without asking for the password. - + Entrar automáticamente sen preguntar polo contrasinal. diff --git a/lang/calamares_he.ts b/lang/calamares_he.ts index 3f7139804..7e0baed9e 100644 --- a/lang/calamares_he.ts +++ b/lang/calamares_he.ts @@ -2225,12 +2225,12 @@ The installer will quit and all changes will be lost. Password is too short - + הסיסמה קצרה מדי Password is too long - + הסיסמה ארוכה מדי diff --git a/lang/calamares_hr.ts b/lang/calamares_hr.ts index b158a07cb..c0d8be4e6 100644 --- a/lang/calamares_hr.ts +++ b/lang/calamares_hr.ts @@ -2225,12 +2225,12 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. Password is too short - + Lozinka je prekratka Password is too long - + Lozinka je preduga diff --git a/lang/calamares_lt.ts b/lang/calamares_lt.ts index c5872213c..eab33bca6 100644 --- a/lang/calamares_lt.ts +++ b/lang/calamares_lt.ts @@ -2225,12 +2225,12 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. Password is too short - + Slaptažodis yra per trumpas Password is too long - + Slaptažodis yra per ilgas diff --git a/lang/calamares_mr.ts b/lang/calamares_mr.ts index 83acd0002..1d27a6426 100644 --- a/lang/calamares_mr.ts +++ b/lang/calamares_mr.ts @@ -37,12 +37,12 @@ Do not install a boot loader - + आरंभ सूचक अधिष्ठापित करु नका %1 (%2) - + %1 (%2) @@ -115,12 +115,12 @@ Run command %1 %2 - + %1 %2 आज्ञा चालवा Running command %1 %2 - + %1 %2 आज्ञा चालवला जातोय @@ -137,17 +137,17 @@ Output: External command failed to start - + बाह्य आज्ञा सुरु करण्यात अपयश Command %1 failed to start. - + %1 आज्ञा सुरु करण्यात अपयश Internal error when starting command - + आज्ञा सुरु करताना अंतर्गत त्रुटी @@ -157,26 +157,30 @@ Output: External command failed to finish - + बाह्य आज्ञा पूर्ण करताना अपयश Command %1 failed to finish in %2s. Output: %3 - + %1 ही आज्ञा %2s मधे पूर्ण करताना अपयश. +आउटपुट : +%3 External command finished with errors - + बाह्य आज्ञा त्रुट्यांसहित पूर्ण झाली Command %1 finished with exit code %2. Output: %3 - + %1 ही आज्ञा %2 या निर्गम कोडसहित पूर्ण झाली. +आउटपुट : +%3 @@ -184,7 +188,7 @@ Output: Running %1 operation. - + %1 क्रिया चालवला जातोय @@ -217,29 +221,29 @@ Output: &Back - + &मागे &Next - + &पुढे &Cancel - + &रद्द करा Cancel installation without changing the system. - + प्रणालीत बदल न करता अधिष्टापना रद्द करा. Cancel installation? - + अधिष्ठापना रद्द करायचे? @@ -250,17 +254,17 @@ The installer will quit and all changes will be lost. &Yes - + &होय &No - + &नाही &Close - + &बंद करा @@ -275,32 +279,32 @@ The installer will quit and all changes will be lost. &Install now - + &आता अधिष्ठापित करा Go &back - + &मागे जा &Done - + &पूर्ण झाली The installation is complete. Close the installer. - + अधिष्ठापना संपूर्ण झाली. अधिष्ठापक बंद करा. Error - + त्रुटी Installation Failed - + अधिष्ठापना अयशस्वी झाली @@ -331,7 +335,7 @@ The installer will quit and all changes will be lost. %1 Installer - + %1 अधिष्ठापक @@ -344,12 +348,12 @@ The installer will quit and all changes will be lost. Checking file system on partition %1. - + %1 या विभाजनावरील फाइल प्रणाली तपासत आहे. The file system check on partition %1 failed. - + %1 या विभाजनावरील प्रणाली विफल झाली. @@ -377,7 +381,7 @@ The installer will quit and all changes will be lost. System requirements - + प्रणालीची आवशक्यता @@ -418,7 +422,7 @@ The installer will quit and all changes will be lost. Current: - + सद्या : @@ -541,7 +545,7 @@ The installer will quit and all changes will be lost. Create a Partition - + विभाजन निर्माण करा @@ -551,12 +555,12 @@ The installer will quit and all changes will be lost. Partition &Type: - + विभाजन &प्रकार : &Primary - + &प्राथमिक @@ -591,12 +595,12 @@ The installer will quit and all changes will be lost. Logical - + तार्किक Primary - + प्राथमिक @@ -624,7 +628,7 @@ The installer will quit and all changes will be lost. Creating new %1 partition on %2. - + %2 वर %1 हे नवीन विभाजन निर्माण करत आहे @@ -657,7 +661,7 @@ The installer will quit and all changes will be lost. Create Partition Table - + विभाजन कोष्टक निर्माण करा diff --git a/lang/calamares_nb.ts b/lang/calamares_nb.ts index c9708c3cf..815da987b 100644 --- a/lang/calamares_nb.ts +++ b/lang/calamares_nb.ts @@ -37,7 +37,7 @@ Do not install a boot loader - + Ikke installer en oppstartslaster @@ -81,12 +81,12 @@ Interface: - + Grensesnitt: Tools - + Verktøy @@ -99,7 +99,7 @@ Install - + Installer diff --git a/lang/calamares_pl.ts b/lang/calamares_pl.ts index d62796cb6..7a7a3a603 100644 --- a/lang/calamares_pl.ts +++ b/lang/calamares_pl.ts @@ -2225,12 +2225,12 @@ Instalator zostanie zamknięty i wszystkie zmiany zostaną utracone. Password is too short - + Hasło jest zbyt krótkie Password is too long - + Hasło jest zbyt długie diff --git a/lang/calamares_pt_BR.ts b/lang/calamares_pt_BR.ts index 457f98198..9e5f0029b 100644 --- a/lang/calamares_pt_BR.ts +++ b/lang/calamares_pt_BR.ts @@ -2227,12 +2227,12 @@ A instalação pode continuar, mas alguns recursos podem ser desativados. Password is too short - + A senha é muito curta Password is too long - + A senha é muito longa diff --git a/lang/calamares_pt_PT.ts b/lang/calamares_pt_PT.ts index e71697cf6..7f4bcee6a 100644 --- a/lang/calamares_pt_PT.ts +++ b/lang/calamares_pt_PT.ts @@ -1162,12 +1162,12 @@ O instalador será encerrado e todas as alterações serão perdidas. &Cancel - + &Cancelar &OK - + &OK @@ -2225,12 +2225,12 @@ O instalador será encerrado e todas as alterações serão perdidas. Password is too short - + A palavra-passe é demasiado curta Password is too long - + A palavra-passe é demasiado longa diff --git a/lang/calamares_sk.ts b/lang/calamares_sk.ts index d74556162..4d01486d1 100644 --- a/lang/calamares_sk.ts +++ b/lang/calamares_sk.ts @@ -2225,12 +2225,12 @@ Inštalátor sa ukončí a všetky zmeny budú stratené. Password is too short - + Heslo je príliš krátke Password is too long - + Heslo je príliš dlhé @@ -2304,7 +2304,7 @@ Inštalátor sa ukončí a všetky zmeny budú stratené. Welcome - Vitajte + Uvítanie \ No newline at end of file diff --git a/lang/calamares_uk.ts b/lang/calamares_uk.ts index 8a45b51a8..47d83f316 100644 --- a/lang/calamares_uk.ts +++ b/lang/calamares_uk.ts @@ -4,17 +4,17 @@ The <strong>boot environment</strong> of this system.<br><br>Older x86 systems only support <strong>BIOS</strong>.<br>Modern systems usually use <strong>EFI</strong>, but may also show up as BIOS if started in compatibility mode. - + <strong>Завантажувальне середовище</strong> цієї системи.<br><br>Старі x86-системи підтримують тільки <strong>BIOS</strong>.<br>Нові системи зазвичай використовують<strong>EFI</strong>, проте можуть також відображатися як BIOS, якщо запущені у режимі сумісності. This system was started with an <strong>EFI</strong> boot environment.<br><br>To configure startup from an EFI environment, this installer must deploy a boot loader application, like <strong>GRUB</strong> or <strong>systemd-boot</strong> on an <strong>EFI System Partition</strong>. This is automatic, unless you choose manual partitioning, in which case you must choose it or create it on your own. - + Цю систему було запущено із завантажувальним середовищем <strong>EFI</strong>.<br><br>Щоб налаштувати завантаження з середовища EFI, установник повинен встановити на <strong>Системний Розділ EFI</strong> програму-завантажувач таку, як <strong>GRUB</strong> або <strong>systemd-boot</strong>. Це буде зроблено автоматично, якщо ви не обрали розподілення диску вручну. В останньому випадку вам потрібно обрати завантажувач або встановити його власноруч. This system was started with a <strong>BIOS</strong> boot environment.<br><br>To configure startup from a BIOS environment, this installer must install a boot loader, like <strong>GRUB</strong>, either at the beginning of a partition or on the <strong>Master Boot Record</strong> near the beginning of the partition table (preferred). This is automatic, unless you choose manual partitioning, in which case you must set it up on your own. - + Цю систему було запущено із завантажувальним середовищем <strong>BIOS</strong>.<br><br>Щоб налаштувати завантаження з середовища BIOS, установник повинен встановити завантажувач, такий, як <strong>GRUB</strong> або на початку розділу або у <strong>Головний Завантажувальний Запис (Master Boot Record)</strong> біля початку таблиці розділів (рекомендовано). Це буде зроблено автотматично, якщо ви не обрали розподілення диску вручну. В останньому випадку вам потрібно встановити завантажувач власноруч. @@ -22,7 +22,7 @@ Master Boot Record of %1 - + Головний Завантажувальний Запис (Master Boot Record) %1 @@ -37,12 +37,12 @@ Do not install a boot loader - + Не встановлювати завантажувач %1 (%2) - + %1 (%2) @@ -50,48 +50,48 @@ Form - + Форма GlobalStorage - + Глобальне сховище JobQueue - + Черга завдань Modules - + Модулі Type: - + Тип: none - + немає Interface: - + Інтерфейс: Tools - + Інструменти Debug information - + Відлагоджувальна інформація @@ -99,7 +99,7 @@ Install - + Встановити @@ -115,68 +115,74 @@ Run command %1 %2 - + Запустити команду %1 %2 Running command %1 %2 - + Запуск команди %1 %2 External command crashed - + Зовнішня команда завершилася аварією Command %1 crashed. Output: %2 - + Команда %1 завершилася аварією. +Вивід: +%2 External command failed to start - + Не вдалося запустити зовнішню команду Command %1 failed to start. - + Не вдалося запустити команду %1. Internal error when starting command - + Внутрішня помилка під час запуску команди Bad parameters for process job call. - + Неправильні параметри визову завдання обробки. External command failed to finish - + Не вдалося завершити зовнішню команду Command %1 failed to finish in %2s. Output: %3 - + Не вдалося завершити зовнішню команду %1 протягом %2с. +Вивід: +%3 External command finished with errors - + Зовнішня програма завершилася з помилками Command %1 finished with exit code %2. Output: %3 - + Команда %1 завершилася з кодом %2. +Вивід: +%3 @@ -184,32 +190,32 @@ Output: Running %1 operation. - + Запуск операції %1. Bad working directory path - + Неправильний шлях робочого каталогу Working directory %1 for python job %2 is not readable. - + Неможливо прочитати робочу директорію %1 для завдання python %2. Bad main script file - + Неправильний файл головного сценарію Main script file %1 for python job %2 is not readable. - + Неможливо прочитати файл головного сценарію %1 для завдання python %2. Boost.Python error in job "%1". - + Помилка Boost.Python у завданні "%1". @@ -217,90 +223,91 @@ Output: &Back - + &Назад &Next - + &Вперед &Cancel - + &Скасувати Cancel installation without changing the system. - + Скасувати встановлення без змінення системи. Cancel installation? - + Скасувати встановлення? Do you really want to cancel the current install process? The installer will quit and all changes will be lost. - + Чи ви насправді бажаєте скасувати процес встановлення? +Установник закриється і всі зміни буде втрачено. &Yes - + &Так &No - + &Ні &Close - + &Закрити Continue with setup? - + Продовжити встановлення? The %1 installer is about to make changes to your disk in order to install %2.<br/><strong>You will not be able to undo these changes.</strong> - + Установник %1 збирається зробити зміни на вашому диску, щоб встановити %2.<br/><strong>Ці зміни неможливо буде повернути.</strong> &Install now - + &Встановити зараз Go &back - + Перейти &назад &Done - + &Закінчити The installation is complete. Close the installer. - + Встановлення виконано. Закрити установник. Error - + Помилка Installation Failed - + Втановлення завершилося невдачею @@ -308,22 +315,22 @@ The installer will quit and all changes will be lost. Unknown exception type - + Невідомий тип виключної ситуації unparseable Python error - + нерозбірлива помилка Python unparseable Python traceback - + нерозбірливе відстеження помилки Python Unfetchable Python error. - + Помилка Python, інформацію про яку неможливо отримати. @@ -336,7 +343,7 @@ The installer will quit and all changes will be lost. Show debug information - + Показати відлагоджувальну інформацію @@ -344,12 +351,12 @@ The installer will quit and all changes will be lost. Checking file system on partition %1. - + Перевірка файлової системи на розділі %1. The file system check on partition %1 failed. - + Перевірка файлової системи на розділі %1 завершилася невдачею. diff --git a/lang/calamares_zh_TW.ts b/lang/calamares_zh_TW.ts index 92e054339..2f2d6fb85 100644 --- a/lang/calamares_zh_TW.ts +++ b/lang/calamares_zh_TW.ts @@ -2225,12 +2225,12 @@ The installer will quit and all changes will be lost. Password is too short - + 密碼太短 Password is too long - + 密碼太長 From 7fbb68caab7e16f0ddcd75914ae73a4ffe43a83a Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Tue, 3 Oct 2017 06:46:35 -0400 Subject: [PATCH 03/90] [desktop] Automatic merge of Transifex translations --- calamares.desktop | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/calamares.desktop b/calamares.desktop index 29b8ef6d0..f90321523 100644 --- a/calamares.desktop +++ b/calamares.desktop @@ -67,6 +67,10 @@ Name[lt]=Calamares Icon[lt]=calamares GenericName[lt]=Sistemos diegimas į kompiuterį Comment[lt]=Calamares — sistemos diegyklė +Name[nb]=Calamares +Icon[nb]=calamares +GenericName[nb]=Systeminstallatør +Comment[nb]=Calamares-systeminstallatør Name[nl]=Calamares Icon[nl]=calamares GenericName[nl]=Installatieprogramma @@ -81,8 +85,8 @@ GenericName[pt_BR]=Instalador de Sistema Comment[pt_BR]=Calamares — Instalador de Sistema Name[cs_CZ]=Calamares Icon[cs_CZ]=calamares -GenericName[cs_CZ]=Instalační program systému -Comment[cs_CZ]=Calamares - instalační program systému +GenericName[cs_CZ]=Instalátor systému +Comment[cs_CZ]=Calamares – instalátor operačních systémů Name[ru]=Calamares Icon[ru]=calamares GenericName[ru]=Установщик системы From 1eaeb6025f36d8098522e1ec7d22a32d09e690c1 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Tue, 3 Oct 2017 06:46:36 -0400 Subject: [PATCH 04/90] [dummypythonqt] Automatic merge of Transifex translations --- .../lang/cs_CZ/LC_MESSAGES/dummypythonqt.mo | Bin 1011 -> 1015 bytes .../lang/cs_CZ/LC_MESSAGES/dummypythonqt.po | 6 +++--- .../lang/fr/LC_MESSAGES/dummypythonqt.mo | Bin 419 -> 578 bytes .../lang/fr/LC_MESSAGES/dummypythonqt.po | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/modules/dummypythonqt/lang/cs_CZ/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/cs_CZ/LC_MESSAGES/dummypythonqt.mo index ef66ad1d6beedffc2050e9f7cc700e743084764f..7b2ce2547905d139765980919c33c3f4f6e23553 100644 GIT binary patch delta 77 zcmey&{+)e7j;tU9149-w1A`2Zt^v|gKzb&Sb^_8{Hg@VVau``C7#dg^n{3|4xRH_N b$n28T$py^iyu~R;X6KYB delta 73 zcmey){+WG3jw~Mo149-w1A`2Zt_0FjKzbUGb_CKJH+JeWau}E>7+6>tnr+_4xRH@D Xb8<0rInU9Vhu3BwUTCFIUCRIfJCPF5 diff --git a/src/modules/dummypythonqt/lang/cs_CZ/LC_MESSAGES/dummypythonqt.po b/src/modules/dummypythonqt/lang/cs_CZ/LC_MESSAGES/dummypythonqt.po index 40d7f9f95..dde73d534 100644 --- a/src/modules/dummypythonqt/lang/cs_CZ/LC_MESSAGES/dummypythonqt.po +++ b/src/modules/dummypythonqt/lang/cs_CZ/LC_MESSAGES/dummypythonqt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-04 08:16-0400\n" +"POT-Creation-Date: 2017-09-28 10:34-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: pavelrz , 2016\n" "Language-Team: Czech (Czech Republic) (https://www.transifex.com/calamares/teams/20061/cs_CZ/)\n" @@ -20,7 +20,7 @@ msgstr "" #: src/modules/dummypythonqt/main.py:84 msgid "Click me!" -msgstr "Klikni na mě!" +msgstr "Klikněte na mě!" #: src/modules/dummypythonqt/main.py:94 msgid "A new QLabel." @@ -36,7 +36,7 @@ msgstr "Testovací úloha PythonQt" #: src/modules/dummypythonqt/main.py:186 msgid "This is the Dummy PythonQt Job. The dummy job says: {}" -msgstr "Toto je testovací úloha PythonQt. Testovací úloha říká: {}" +msgstr "Toto je testovací úloha PythonQt. Testovací úloha sděluje: {}" #: src/modules/dummypythonqt/main.py:190 msgid "A status message for Dummy PythonQt Job." diff --git a/src/modules/dummypythonqt/lang/fr/LC_MESSAGES/dummypythonqt.mo b/src/modules/dummypythonqt/lang/fr/LC_MESSAGES/dummypythonqt.mo index 2c39ac029d167b53d83fd87aa4b02ed73c602452..2b392393d4c73309fa484da4f4229ef43d28107c 100644 GIT binary patch delta 244 zcmZ3?e2As~o)F7a1|VPtVi_Pd0b*7l_5orLNC0A9AWj5gP9V+);uVYx43$7y2#A%K z7#Mhfv?-7V3WEX2EFc#G92N3X%M}8B5|dJM^cb9TGLy3va#Ix<0*dmpQj;gz2XGi! zC>R=88JkR;ZeUYfq8n0_m{**WSdw34r4W!`2C0F8i51}-1||vy7FLF4 M6R#Ugc4NE)0A>vey#N3J diff --git a/src/modules/dummypythonqt/lang/fr/LC_MESSAGES/dummypythonqt.po b/src/modules/dummypythonqt/lang/fr/LC_MESSAGES/dummypythonqt.po index 7efacecd5..4ccabfae3 100644 --- a/src/modules/dummypythonqt/lang/fr/LC_MESSAGES/dummypythonqt.po +++ b/src/modules/dummypythonqt/lang/fr/LC_MESSAGES/dummypythonqt.po @@ -8,8 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-09-04 08:16-0400\n" +"POT-Creation-Date: 2017-09-28 10:34-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Paul Combal , 2017\n" "Language-Team: French (https://www.transifex.com/calamares/teams/20061/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,11 +20,11 @@ msgstr "" #: src/modules/dummypythonqt/main.py:84 msgid "Click me!" -msgstr "" +msgstr "Cliquez-moi!" #: src/modules/dummypythonqt/main.py:94 msgid "A new QLabel." -msgstr "" +msgstr "Un nouveau QLabel." #: src/modules/dummypythonqt/main.py:97 msgid "Dummy PythonQt ViewStep" From 6f242177da95f5dd6c2ca6b0bd298467a61eb53d Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Tue, 3 Oct 2017 06:46:36 -0400 Subject: [PATCH 05/90] [python] Automatic merge of Transifex translations --- lang/python/cs_CZ/LC_MESSAGES/python.mo | Bin 773 -> 1261 bytes lang/python/cs_CZ/LC_MESSAGES/python.po | 18 +++++++++--------- lang/python/fr/LC_MESSAGES/python.mo | Bin 419 -> 716 bytes lang/python/fr/LC_MESSAGES/python.po | 7 ++++--- lang/python/nb/LC_MESSAGES/python.mo | Bin 431 -> 599 bytes lang/python/nb/LC_MESSAGES/python.po | 5 +++-- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/lang/python/cs_CZ/LC_MESSAGES/python.mo b/lang/python/cs_CZ/LC_MESSAGES/python.mo index aacb33d0e42e65287eea39490fd87f2aef64c678..b75f254a1e97bc73bc979f4309fbb039d611869e 100644 GIT binary patch delta 667 zcmZ{gze~eF6vtn+)rym%_ydPqDlI}3adePw7Qy16C=RCSS<|GslBC5h7D2amDB>nU zHyug`C+ApD@Gq#~e^BsG@Ow1@Yw_Tl&)s|9_wMDc$9fah&*|_jVMU=O=op%W?jX5d zp(*GMnt?uiet|L`2@!38bKnZN1FnJRU>ACX7I3~AC0YdUK?Xj9vqVYiVsnPT7q|`{ zhKWwV8i-mNhawQtGzKBu9~Phy`DtA4SGO(4RZUa3a!gp96;;hpb6lZc@mSm{6%yGX z=O~o6g~lC67WoAZi^t-cC|NFyt1K3G1==RE3EJZYQ66d^M5D0wyEon+meXpPn=C18 zt{FPpEXt#j`8jUo3aV}@nkYQgLIw68e@c|S zrp59cPL@$kuk}*rhC(SvlzuxZ!3crLsK7MPL=0IvZH11CwyMcXYl$djP?UCN> HN<9Vu*61kG diff --git a/lang/python/cs_CZ/LC_MESSAGES/python.po b/lang/python/cs_CZ/LC_MESSAGES/python.po index c586c9410..861ba30d5 100644 --- a/lang/python/cs_CZ/LC_MESSAGES/python.po +++ b/lang/python/cs_CZ/LC_MESSAGES/python.po @@ -10,7 +10,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-09-28 10:35-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: pavelrz , 2017\n" +"Last-Translator: Pavel Borecki , 2017\n" "Language-Team: Czech (Czech Republic) (https://www.transifex.com/calamares/teams/20061/cs_CZ/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,23 +21,23 @@ msgstr "" #: src/modules/packages/main.py:59 #, python-format msgid "Processing packages (%(count)d / %(total)d)" -msgstr "" +msgstr "Zpracovávání balíčků (%(count)d / %(total)d)" #: src/modules/packages/main.py:61 #, python-format msgid "Installing one package." msgid_plural "Installing %(num)d packages." -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "Je instalován jeden balíček." +msgstr[1] "Jsou instalovány %(num)d balíčky." +msgstr[2] "Je instalováno %(num)d balíčků." #: src/modules/packages/main.py:64 #, python-format msgid "Removing one package." msgid_plural "Removing %(num)d packages." -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" +msgstr[0] "Odebírá se jeden balíček." +msgstr[1] "Odebírají se %(num)d balíčky." +msgstr[2] "Odebírá se %(num)d balíčků." #: src/modules/packages/main.py:68 msgid "Install packages." @@ -53,4 +53,4 @@ msgstr "Testovací krok {} python." #: src/modules/machineid/main.py:35 msgid "Generate machine-id." -msgstr "Vytvořit machine-id." +msgstr "Vytvořit identifikátor stroje." diff --git a/lang/python/fr/LC_MESSAGES/python.mo b/lang/python/fr/LC_MESSAGES/python.mo index 00337175aabe9f34f9e75c7189af0314daca179d..ae65ce40579338af76dec93a17fb897a8cb363c2 100644 GIT binary patch delta 364 zcmZ{ey-EW?6op5VJb*#O!eW}hE}HeHQDhOpK(I@ZQjnY7%epu}o0-|#F0G^xY^-d| zb0nqDps(V|3ZjJvKF-X!%$@Vvdha}ZblXn?YJ)wHf)2O=YgJ$yOu-hIfqn1{-Zq3- z!FPe)6k-QHgD3D8IL3`|Z1%U-w;>yL6j*A??#hATewioY+W0_9$%?XjD%dAtr@TbmH)@=*4oVDTo-O+6*$aqD;x^p?ATFEP`C!}Ob6Kf1>Ho;fO zFAGhjN;0c24&=$v@#%c^c{^M#%yQw_$=ZBZ``ZkIoIR>cYYwP~&&ts3{GI>TP<#Oo C$6`2C0F8iHG|qPh`9U019mg AX#fBK diff --git a/lang/python/fr/LC_MESSAGES/python.po b/lang/python/fr/LC_MESSAGES/python.po index 1f34bb39b..7b6b33900 100644 --- a/lang/python/fr/LC_MESSAGES/python.po +++ b/lang/python/fr/LC_MESSAGES/python.po @@ -10,6 +10,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-09-28 10:35-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Paul Combal , 2017\n" "Language-Team: French (https://www.transifex.com/calamares/teams/20061/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,7 +21,7 @@ msgstr "" #: src/modules/packages/main.py:59 #, python-format msgid "Processing packages (%(count)d / %(total)d)" -msgstr "" +msgstr "Traitement des paquets (%(count)d / %(total)d)" #: src/modules/packages/main.py:61 #, python-format @@ -38,7 +39,7 @@ msgstr[1] "" #: src/modules/packages/main.py:68 msgid "Install packages." -msgstr "" +msgstr "Installer des paquets." #: src/modules/dummypython/main.py:44 msgid "Dummy python job." @@ -50,4 +51,4 @@ msgstr "" #: src/modules/machineid/main.py:35 msgid "Generate machine-id." -msgstr "" +msgstr "Générer un machine-id." diff --git a/lang/python/nb/LC_MESSAGES/python.mo b/lang/python/nb/LC_MESSAGES/python.mo index 1b853a2a1d467837a648334e8a5df386f6cf28f8..047be0bf7de5f5ff2187dcf9030c55f49e36b220 100644 GIT binary patch delta 235 zcmZ3_e4VBKo)F7a1|VPtVi_Pd0b*7l_5orLNC09HAWj5gK_D&z;+2dH3>`pP2#AfC zAmXk-8Ym0~KqeS~%w%v+%}XsxEJ;`2C0F8iS7N9y%=8r01rV3 A6aWAK diff --git a/lang/python/nb/LC_MESSAGES/python.po b/lang/python/nb/LC_MESSAGES/python.po index 8177d779b..cbd1f5206 100644 --- a/lang/python/nb/LC_MESSAGES/python.po +++ b/lang/python/nb/LC_MESSAGES/python.po @@ -10,6 +10,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-09-28 10:35-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Tyler Moss , 2017\n" "Language-Team: Norwegian Bokmål (https://www.transifex.com/calamares/teams/20061/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -38,7 +39,7 @@ msgstr[1] "" #: src/modules/packages/main.py:68 msgid "Install packages." -msgstr "" +msgstr "Installer pakker." #: src/modules/dummypython/main.py:44 msgid "Dummy python job." @@ -50,4 +51,4 @@ msgstr "" #: src/modules/machineid/main.py:35 msgid "Generate machine-id." -msgstr "" +msgstr "Generer maskin-ID." From 8d341ed53d59054bc6748fb36c7d07d3b167ca59 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Tue, 3 Oct 2017 18:27:14 -0400 Subject: [PATCH 06/90] use orphaned Branding::ProductLogo as sidebar image --- src/calamares/CalamaresWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index eb3289083..ab24b6db2 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -96,7 +96,7 @@ CalamaresWindow::CalamaresWindow( QWidget* parent ) logoLabel->setAlignment( Qt::AlignCenter ); logoLabel->setFixedSize( 80, 80 ); logoLabel->setPixmap( Calamares::Branding::instance()-> - image( Calamares::Branding::ProductIcon, + image( Calamares::Branding::ProductLogo, logoLabel->size() ) ); logoLayout->addWidget( logoLabel ); logoLayout->addStretch(); From b1bae4152abffaf3e084889edd62360b66b09316 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 3 Oct 2017 10:29:03 +0200 Subject: [PATCH 07/90] Missing import; thanks to crazy on IRC --- src/modules/initramfscfg/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/initramfscfg/main.py b/src/modules/initramfscfg/main.py index d935328d6..aa63e659b 100644 --- a/src/modules/initramfscfg/main.py +++ b/src/modules/initramfscfg/main.py @@ -24,6 +24,8 @@ # along with Calamares. If not, see . import libcalamares + +import inspect import os import shutil From 1491a0280269d2ef9d43fbe13028a0a38549ecc3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 4 Oct 2017 06:37:44 -0400 Subject: [PATCH 08/90] Documentation for the branding variables --- src/branding/default/branding.desc | 37 ++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/src/branding/default/branding.desc b/src/branding/default/branding.desc index c2d868c82..beb236f9b 100644 --- a/src/branding/default/branding.desc +++ b/src/branding/default/branding.desc @@ -8,10 +8,17 @@ componentName: default # same distribution. welcomeStyleCalamares: false -# Should the welcome image (productWelcome, below) be scaled -# up beyond its natural size? -welcomeExpandingLogo: true - +# These are strings shown to the user in the user interface. +# There is no provision for translating them -- since they +# are names, the string is included as-is. +# +# The four Url strings are the Urls used by the buttons in +# the welcome screen, and are not shown to the user. Clicking +# on the "Support" button, for instance, opens the link supportUrl. +# If a Url is empty, the corresponding button is not shown. +# +# bootloaderEntryName is how this installation / distro is named +# in the boot loader (e.g. in the GRUB menu). strings: productName: Generic GNU/Linux shortProductName: Generic @@ -25,11 +32,33 @@ strings: knownIssuesUrl: http://calamares.io/about/ releaseNotesUrl: http://calamares.io/about/ +# Should the welcome image (productWelcome, below) be scaled +# up beyond its natural size? If false, the image does not grow +# with the window but remains the same size throughout (this +# may have surprising effects on HiDPI monitors). +welcomeExpandingLogo: true + +# These images are loaded from the branding module directory. +# +# productIcon is used as the window icon, and will (usually) be used +# by the window manager to represent the application. This image +# should be square, and may be displayed by the window manager +# as small as 32x32 (but possibly larger). +# productLogo is used as the logo at the top of the left-hand column +# which shows the steps to be taken. The image should be square, +# and is displayed at 80x80 pixels (also on HiDPI). +# productWelcome is shown on the welcome page of the application in +# the middle of the window, below the welcome text. It can be +# any size and proportion, and will be scaled to fit inside +# the window. Use `welcomeExpandingLogo` to make it non-scaled. +# Recommended size is 320x150. images: productLogo: "squid.png" productIcon: "squid.png" productWelcome: "languages.png" +# The slideshow is displayed during execution steps (e.g. when the +# installer is actually writing to disk and doing other slow things). slideshow: "show.qml" # Colors for text and background components. From 30e56e15667a451d6244b9a6f13a1987694e511d Mon Sep 17 00:00:00 2001 From: Gabriel C Date: Wed, 4 Oct 2017 13:13:33 +0200 Subject: [PATCH 09/90] finished: use generic shutdown command - it doesn't make any sense to have restartNowCommand and fallback set to the same command. - also fallback should be something generic every init supports --- src/modules/finished/FinishedViewStep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/finished/FinishedViewStep.cpp b/src/modules/finished/FinishedViewStep.cpp index d3beacb82..9aea9feaa 100644 --- a/src/modules/finished/FinishedViewStep.cpp +++ b/src/modules/finished/FinishedViewStep.cpp @@ -178,7 +178,7 @@ FinishedViewStep::setConfigurationMap( const QVariantMap& configurationMap ) configurationMap.value( "restartNowCommand" ).type() == QVariant::String ) m_widget->setRestartNowCommand( configurationMap.value( "restartNowCommand" ).toString() ); else - m_widget->setRestartNowCommand( "systemctl -i reboot" ); + m_widget->setRestartNowCommand( "shutdown -r now" ); } } if ( configurationMap.contains( "notifyOnFinished" ) && From 8599c2800fe4dff344db850ab97d2a0af076c589 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 4 Oct 2017 08:36:07 -0400 Subject: [PATCH 10/90] Document finished.conf some more --- src/modules/finished/finished.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/finished/finished.conf b/src/modules/finished/finished.conf index 6bd8bb2d6..ce9754dab 100644 --- a/src/modules/finished/finished.conf +++ b/src/modules/finished/finished.conf @@ -2,13 +2,17 @@ Configuration for the "finished" page, which is usually shown only at the end of the installation (successful or not). --- # The finished page can hold a "restart system now" checkbox. -# If this is false, no checkbox is show and the system is not restarted +# If this is false, no checkbox is shown and the system is not restarted # when Calamares exits. restartNowEnabled: true -# Initial state of the checkbox "restart now". + +# Initial state of the checkbox "restart now". Only relevant when the +# checkbox is shown by restartNowEnabled. restartNowChecked: false + # If the checkbox is shown, and the checkbox is checked, then when # Calamares exits from the finished-page it will run this command. +# If not set, falls back to "shutdown -r now". restartNowCommand: "systemctl -i reboot" # When the last page is (successfully) reached, send a DBus notification From 27e9852e9d5b496c49814b3a8d89611854ae3704 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 4 Oct 2017 11:13:38 -0400 Subject: [PATCH 11/90] CMake: be more descriptive about squashfs --- CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 473526a9b..2d62fd16b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,11 +265,8 @@ else() endif() # Doesn't list mksquashfs as an optional dep, though, because it # hasn't been sent through the find_package() scheme. -set_package_properties( mksquashfs PROPERTIES - DESCRIPTION "Create squashed filesystems" - URL "http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html" - PURPOSE "Create example distro" - TYPE OPTIONAL +add_feature_info( mksquashfs mksquashfs_FOUND + "Create squashed filesystems for the example distro" ) # add_subdirectory( thirdparty ) From 4912d8a6c2e51311b69b6e51f998603aaff9d0e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 7 Oct 2017 00:42:07 +0100 Subject: [PATCH 12/90] Fix create partition job to work with LVM devices. --- .../partition/gui/CreatePartitionDialog.cpp | 19 +++ .../partition/gui/CreatePartitionDialog.ui | 20 ++- .../partition/jobs/CreatePartitionJob.cpp | 120 +++++++++++------- 3 files changed, 105 insertions(+), 54 deletions(-) diff --git a/src/modules/partition/gui/CreatePartitionDialog.cpp b/src/modules/partition/gui/CreatePartitionDialog.cpp index 90cf92051..7d32b7d33 100644 --- a/src/modules/partition/gui/CreatePartitionDialog.cpp +++ b/src/modules/partition/gui/CreatePartitionDialog.cpp @@ -43,6 +43,8 @@ #include #include #include +#include +#include #include static QSet< FileSystem::Type > s_unmountableFS( @@ -66,6 +68,19 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par m_ui->encryptWidget->setText( tr( "En&crypt" ) ); m_ui->encryptWidget->hide(); + if (m_device->type() == Device::Disk_Device) { + m_ui->lvNameLabel->hide(); + m_ui->lvNameLineEdit->hide(); + } + if (m_device->type() == Device::LVM_Device) { + /* LVM logical volume name can consist of: letters numbers _ . - + + * It cannot start with underscore _ and must not be equal to . or .. or any entry in /dev/ + * QLineEdit accepts QValidator::Intermediate, so we just disable . at the beginning */ + QRegularExpression re(QStringLiteral(R"(^(?!_|\.)[\w\-.+]+)")); + QRegularExpressionValidator *validator = new QRegularExpressionValidator(re, this); + m_ui->lvNameLineEdit->setValidator(validator); + } + QStringList mountPoints = { "/", "/boot", "/home", "/opt", "/usr", "/var" }; if ( PartUtils::isEfiSystem() ) mountPoints << Calamares::JobQueue::instance()->globalStorage()->value( "efiSystemPartition" ).toString(); @@ -227,6 +242,10 @@ CreatePartitionDialog::createPartition() ); } + if (m_device->type() == Device::LVM_Device) { + partition->setPartitionPath(m_device->deviceNode() + QStringLiteral("/") + m_ui->lvNameLineEdit->text().trimmed()); + } + PartitionInfo::setMountPoint( partition, m_ui->mountPointComboBox->currentText() ); PartitionInfo::setFormat( partition, true ); diff --git a/src/modules/partition/gui/CreatePartitionDialog.ui b/src/modules/partition/gui/CreatePartitionDialog.ui index ba457b29c..ac355c880 100644 --- a/src/modules/partition/gui/CreatePartitionDialog.ui +++ b/src/modules/partition/gui/CreatePartitionDialog.ui @@ -146,6 +146,16 @@ + + + LVM LV name + + + + + + + &Mount Point: @@ -155,7 +165,7 @@ - + true @@ -165,21 +175,21 @@ - + - + Flags: - + true @@ -192,7 +202,7 @@ - + Qt::Vertical diff --git a/src/modules/partition/jobs/CreatePartitionJob.cpp b/src/modules/partition/jobs/CreatePartitionJob.cpp index aab032a87..562202e30 100644 --- a/src/modules/partition/jobs/CreatePartitionJob.cpp +++ b/src/modules/partition/jobs/CreatePartitionJob.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -78,51 +79,81 @@ CreatePartitionJob::prettyStatusMessage() const Calamares::JobResult CreatePartitionJob::exec() { - int step = 0; - const qreal stepCount = 4; - + QString partitionPath; + FileSystem *fs; Report report( nullptr ); - QString message = tr( "The installer failed to create partition on disk '%1'." ).arg( m_device->name() ); - progress( step++ / stepCount ); - CoreBackend* backend = CoreBackendManager::self()->backend(); - QScopedPointer backendDevice( backend->openDevice( m_device->deviceNode() ) ); - if ( !backendDevice.data() ) + if (m_device->type() == Device::Disk_Device) { + int step = 0; + const qreal stepCount = 4; + QString message = tr( "The installer failed to create partition on disk '%1'." ).arg( m_device->name() ); + + progress( step++ / stepCount ); + CoreBackend* backend = CoreBackendManager::self()->backend(); + QScopedPointer backendDevice( backend->openDevice( m_device->deviceNode() ) ); + if ( !backendDevice.data() ) + { + return Calamares::JobResult::error( + message, + tr( "Could not open device '%1'." ).arg( m_device->deviceNode() ) + ); + } + + progress( step++ / stepCount ); + QScopedPointer backendPartitionTable( backendDevice->openPartitionTable() ); + if ( !backendPartitionTable.data() ) + { + return Calamares::JobResult::error( + message, + tr( "Could not open partition table." ) + ); + } + + progress( step++ / stepCount ); + partitionPath = backendPartitionTable->createPartition( report, *m_partition ); + if ( partitionPath.isEmpty() ) + { + return Calamares::JobResult::error( + message, + report.toText() + ); + } + m_partition->setPartitionPath( partitionPath ); + backendPartitionTable->commit(); + + progress( step++ / stepCount ); + fs = &m_partition->fileSystem(); + if ( fs->type() == FileSystem::Unformatted || fs->type() == FileSystem::Extended ) + return Calamares::JobResult::ok(); + + if ( !backendPartitionTable->setPartitionSystemType( report, *m_partition ) ) + { + return Calamares::JobResult::error( + tr( "The installer failed to update partition table on disk '%1'." ).arg( m_device->name() ), + report.toText() + ); + } + + backendPartitionTable->commit(); + } + else { - return Calamares::JobResult::error( - message, - tr( "Could not open device '%1'." ).arg( m_device->deviceNode() ) - ); + LvmDevice *dev = dynamic_cast(m_device); + m_partition->setState(Partition::StateNone); + + partitionPath = m_partition->partitionPath(); + QString lvname = partitionPath.right(partitionPath.length() - partitionPath.lastIndexOf(QStringLiteral("/")) - 1); + if ( !LvmDevice::createLV(report, *dev, *m_partition, lvname)) + { + return Calamares::JobResult::error( + tr( "The installer failed to create LVM logical volume %1." ).arg( lvname ), + report.toText() + ); + } + fs = &m_partition->fileSystem(); } - progress( step++ / stepCount ); - QScopedPointer backendPartitionTable( backendDevice->openPartitionTable() ); - if ( !backendPartitionTable.data() ) - { - return Calamares::JobResult::error( - message, - tr( "Could not open partition table." ) - ); - } - - progress( step++ / stepCount ); - QString partitionPath = backendPartitionTable->createPartition( report, *m_partition ); - if ( partitionPath.isEmpty() ) - { - return Calamares::JobResult::error( - message, - report.toText() - ); - } - m_partition->setPartitionPath( partitionPath ); - backendPartitionTable->commit(); - - progress( step++ / stepCount ); - FileSystem& fs = m_partition->fileSystem(); - if ( fs.type() == FileSystem::Unformatted || fs.type() == FileSystem::Extended ) - return Calamares::JobResult::ok(); - - if ( !fs.create( report, partitionPath ) ) + if ( !fs->create( report, partitionPath ) ) { return Calamares::JobResult::error( tr( "The installer failed to create file system on partition %1." ).arg( partitionPath ), @@ -130,15 +161,6 @@ CreatePartitionJob::exec() ); } - if ( !backendPartitionTable->setPartitionSystemType( report, *m_partition ) ) - { - return Calamares::JobResult::error( - tr( "The installer failed to update partition table on disk '%1'." ).arg( m_device->name() ), - report.toText() - ); - } - - backendPartitionTable->commit(); return Calamares::JobResult::ok(); } From 78031636af28467bd3085f9d2c7ef5f9454fc4a8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 9 Oct 2017 13:14:53 -0700 Subject: [PATCH 13/90] Correct for distortion of globe. In the timezone widget, locations in the far north -- Inuvik, Thule, Longyearbyen -- were displayed too far south, because the map location calculation assumes a linear gradient, which places 90 degrees north at about 70 degrees. Change calculation to pretend the world is flat south of 62 degrees north, and then 'bend' the remaining 28 degrees of latitude to the top of the image. This puts most places in the right spot, although Yellowknife is now on the south shore of Great Slave. Fort Nelson should be north of Dawson Creek, too -- the math still needs a little work. While here, put Antarctica in the south, otherwise Rothera keeps showing up in Greenland. --- .../locale/timezonewidget/timezonewidget.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/modules/locale/timezonewidget/timezonewidget.cpp b/src/modules/locale/timezonewidget/timezonewidget.cpp index b8713e107..475815cba 100644 --- a/src/modules/locale/timezonewidget/timezonewidget.cpp +++ b/src/modules/locale/timezonewidget/timezonewidget.cpp @@ -20,8 +20,12 @@ * along with Calamares. If not, see . */ +#include + #include "timezonewidget.h" +constexpr double MATH_PI = 3.14159265; + TimeZoneWidget::TimeZoneWidget(QWidget* parent) : QWidget(parent) { @@ -98,6 +102,17 @@ QPoint TimeZoneWidget::getLocationPosition(double longitude, double latitude) { double x = (width / 2.0 + (width / 2.0) * longitude / 180.0) + MAP_X_OFFSET * width; double y = (height / 2.0 - (height / 2.0) * latitude / 90.0) + MAP_Y_OFFSET * height; + //Far north, the MAP_Y_OFFSET no longer holds, cancel the Y offset; it's noticeable + // from 62 degrees north, so scale those 28 degrees as if the world is flat south + // of there, and we have a funny "rounded" top of the world. In practice the locations + // of the different cities / regions looks ok -- at least Thule ends up in the right + // country, and Inuvik isn't in the ocean. + if (latitude > 62.0) + y -= sin(MATH_PI * (latitude - 62.0) / 56.0) * MAP_Y_OFFSET * height; + // Antarctica isn't shown on the map, but you could try clicking there + if (latitude < -60) + y = height - 1; + if (x < 0) x = width+x; if (x >= width) From 8135aa9a4c99518348385b165f6853aa2ed247ab Mon Sep 17 00:00:00 2001 From: Gabriel C Date: Wed, 11 Oct 2017 23:03:29 +0200 Subject: [PATCH 14/90] finished: fix configuration file syntax - fixes commit 74c19fc02d6f3cdf9693dcc35efc75b837a6e3e9 - fixes #829 --- src/modules/finished/finished.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/finished/finished.conf b/src/modules/finished/finished.conf index ce9754dab..29e5e49b4 100644 --- a/src/modules/finished/finished.conf +++ b/src/modules/finished/finished.conf @@ -1,5 +1,5 @@ -Configuration for the "finished" page, which is usually shown only at -the end of the installation (successful or not). +# Configuration for the "finished" page, which is usually shown only at +# the end of the installation (successful or not). --- # The finished page can hold a "restart system now" checkbox. # If this is false, no checkbox is shown and the system is not restarted From c10d7470bbc4067be5d9d96277db795ce8cbaa8e Mon Sep 17 00:00:00 2001 From: Gabriel C Date: Wed, 11 Oct 2017 23:03:29 +0200 Subject: [PATCH 15/90] finished: fix configuration file syntax - fixes commit 74c19fc02d6f3cdf9693dcc35efc75b837a6e3e9 - fixes #829 --- src/modules/finished/finished.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/finished/finished.conf b/src/modules/finished/finished.conf index 6bd8bb2d6..debeff19b 100644 --- a/src/modules/finished/finished.conf +++ b/src/modules/finished/finished.conf @@ -1,5 +1,5 @@ -Configuration for the "finished" page, which is usually shown only at -the end of the installation (successful or not). +# Configuration for the "finished" page, which is usually shown only at +# the end of the installation (successful or not). --- # The finished page can hold a "restart system now" checkbox. # If this is false, no checkbox is show and the system is not restarted From 00fa7bff1c0d3973972f5162d3e410d77276ee79 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 12 Oct 2017 07:08:21 -0700 Subject: [PATCH 16/90] Code-formatting, add copyright notice --- .../locale/timezonewidget/timezonewidget.cpp | 147 ++++++++++-------- 1 file changed, 79 insertions(+), 68 deletions(-) diff --git a/src/modules/locale/timezonewidget/timezonewidget.cpp b/src/modules/locale/timezonewidget/timezonewidget.cpp index 475815cba..23f21b237 100644 --- a/src/modules/locale/timezonewidget/timezonewidget.cpp +++ b/src/modules/locale/timezonewidget/timezonewidget.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014-2015, Teo Mrnjavac + * Copyright 2017, Adriaan de Groot * * Originally from the Manjaro Installation Framework * by Roland Singer @@ -26,59 +27,64 @@ constexpr double MATH_PI = 3.14159265; -TimeZoneWidget::TimeZoneWidget(QWidget* parent) : - QWidget(parent) +TimeZoneWidget::TimeZoneWidget( QWidget* parent ) : + QWidget( parent ) { - setMouseTracking(false); - setCursor(Qt::PointingHandCursor); + setMouseTracking( false ); + setCursor( Qt::PointingHandCursor ); // Font - font.setPointSize(12); - font.setBold(false); + font.setPointSize( 12 ); + font.setBold( false ); // Images - background = QImage(":/images/bg.png").scaled(X_SIZE, Y_SIZE, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - pin = QImage(":/images/pin.png"); + background = QImage( ":/images/bg.png" ).scaled( X_SIZE, Y_SIZE, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ); + pin = QImage( ":/images/pin.png" ); // Set size - setMinimumSize(background.size()); - setMaximumSize(background.size()); + setMinimumSize( background.size() ); + setMaximumSize( background.size() ); // Zone images - QStringList zones = QString(ZONES).split(" ", QString::SkipEmptyParts); - for (int i = 0; i < zones.size(); ++i) - timeZoneImages.append(QImage(":/images/timezone_" + zones.at(i) + ".png").scaled(X_SIZE, Y_SIZE, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); + QStringList zones = QString( ZONES ).split( " ", QString::SkipEmptyParts ); + for ( int i = 0; i < zones.size(); ++i ) + timeZoneImages.append( QImage( ":/images/timezone_" + zones.at( i ) + ".png" ).scaled( X_SIZE, Y_SIZE, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) ); } -void TimeZoneWidget::setCurrentLocation(QString region, QString zone) { +void TimeZoneWidget::setCurrentLocation( QString region, QString zone ) +{ QHash > hash = LocaleGlobal::getLocations(); - if (!hash.contains(region)) + if ( !hash.contains( region ) ) return; - QList locations = hash.value(region); - for (int i = 0; i < locations.size(); ++i) { - if (locations.at(i).zone == zone) { - setCurrentLocation(locations.at(i)); + QList locations = hash.value( region ); + for ( int i = 0; i < locations.size(); ++i ) + { + if ( locations.at( i ).zone == zone ) + { + setCurrentLocation( locations.at( i ) ); break; } } } - -void TimeZoneWidget::setCurrentLocation(LocaleGlobal::Location location) { +void TimeZoneWidget::setCurrentLocation( LocaleGlobal::Location location ) +{ currentLocation = location; // Set zone - QPoint pos = getLocationPosition(currentLocation.longitude, currentLocation.latitude); + QPoint pos = getLocationPosition( currentLocation.longitude, currentLocation.latitude ); - for (int i = 0; i < timeZoneImages.size(); ++i) { + for ( int i = 0; i < timeZoneImages.size(); ++i ) + { QImage zone = timeZoneImages[i]; // If not transparent set as current - if (zone.pixel(pos) != RGB_TRANSPARENT) { + if ( zone.pixel( pos ) != RGB_TRANSPARENT ) + { currentZoneImage = zone; break; } @@ -95,85 +101,87 @@ void TimeZoneWidget::setCurrentLocation(LocaleGlobal::Location location) { //### -QPoint TimeZoneWidget::getLocationPosition(double longitude, double latitude) { +QPoint TimeZoneWidget::getLocationPosition( double longitude, double latitude ) +{ const int width = this->width(); const int height = this->height(); - double x = (width / 2.0 + (width / 2.0) * longitude / 180.0) + MAP_X_OFFSET * width; - double y = (height / 2.0 - (height / 2.0) * latitude / 90.0) + MAP_Y_OFFSET * height; + double x = ( width / 2.0 + ( width / 2.0 ) * longitude / 180.0 ) + MAP_X_OFFSET * width; + double y = ( height / 2.0 - ( height / 2.0 ) * latitude / 90.0 ) + MAP_Y_OFFSET * height; //Far north, the MAP_Y_OFFSET no longer holds, cancel the Y offset; it's noticeable // from 62 degrees north, so scale those 28 degrees as if the world is flat south // of there, and we have a funny "rounded" top of the world. In practice the locations // of the different cities / regions looks ok -- at least Thule ends up in the right // country, and Inuvik isn't in the ocean. - if (latitude > 62.0) - y -= sin(MATH_PI * (latitude - 62.0) / 56.0) * MAP_Y_OFFSET * height; + if ( latitude > 62.0 ) + y -= sin( MATH_PI * ( latitude - 62.0 ) / 56.0 ) * MAP_Y_OFFSET * height; // Antarctica isn't shown on the map, but you could try clicking there - if (latitude < -60) + if ( latitude < -60 ) y = height - 1; - if (x < 0) + if ( x < 0 ) x = width+x; - if (x >= width) + if ( x >= width ) x -= width; - if (y < 0) + if ( y < 0 ) y = height+y; - if (y >= height) + if ( y >= height ) y -= height; - return QPoint((int)x, (int)y); + return QPoint( ( int )x, ( int )y ); } - -void TimeZoneWidget::paintEvent(QPaintEvent*) { +void TimeZoneWidget::paintEvent( QPaintEvent* ) +{ const int width = this->width(); const int height = this->height(); - QFontMetrics fontMetrics(font); - QPainter painter(this); + QFontMetrics fontMetrics( font ); + QPainter painter( this ); - painter.setRenderHint(QPainter::Antialiasing); - painter.setFont(font); + painter.setRenderHint( QPainter::Antialiasing ); + painter.setFont( font ); // Draw background - painter.drawImage(0, 0, background); + painter.drawImage( 0, 0, background ); // Draw zone image - painter.drawImage(0, 0, currentZoneImage); + painter.drawImage( 0, 0, currentZoneImage ); // Draw pin - QPoint point = getLocationPosition(currentLocation.longitude, currentLocation.latitude); - painter.drawImage(point.x() - pin.width()/2, point.y() - pin.height()/2, pin); + QPoint point = getLocationPosition( currentLocation.longitude, currentLocation.latitude ); + painter.drawImage( point.x() - pin.width()/2, point.y() - pin.height()/2, pin ); // Draw text and box - const int textWidth = fontMetrics.width(LocaleGlobal::Location::pretty(currentLocation.zone)); + const int textWidth = fontMetrics.width( LocaleGlobal::Location::pretty( currentLocation.zone ) ); const int textHeight = fontMetrics.height(); - QRect rect = QRect(point.x() - textWidth/2 - 5, point.y() - textHeight - 8, textWidth + 10, textHeight - 2); + QRect rect = QRect( point.x() - textWidth/2 - 5, point.y() - textHeight - 8, textWidth + 10, textHeight - 2 ); - if (rect.x() <= 5) - rect.moveLeft(5); - if (rect.right() >= width-5) - rect.moveRight(width - 5); - if (rect.y() <= 5) - rect.moveTop(5); - if (rect.y() >= height-5) - rect.moveBottom(height-5); + if ( rect.x() <= 5 ) + rect.moveLeft( 5 ); + if ( rect.right() >= width-5 ) + rect.moveRight( width - 5 ); + if ( rect.y() <= 5 ) + rect.moveTop( 5 ); + if ( rect.y() >= height-5 ) + rect.moveBottom( height-5 ); - painter.setPen(QPen()); // no pen - painter.setBrush(QColor(40, 40, 40)); - painter.drawRoundedRect(rect, 3, 3); - painter.setPen(Qt::white); - painter.drawText(rect.x() + 5, rect.bottom() - 4, LocaleGlobal::Location::pretty(currentLocation.zone)); + painter.setPen( QPen() ); // no pen + painter.setBrush( QColor( 40, 40, 40 ) ); + painter.drawRoundedRect( rect, 3, 3 ); + painter.setPen( Qt::white ); + painter.drawText( rect.x() + 5, rect.bottom() - 4, LocaleGlobal::Location::pretty( currentLocation.zone ) ); painter.end(); } -void TimeZoneWidget::mousePressEvent(QMouseEvent* event) { - if (event->button() != Qt::LeftButton) +void TimeZoneWidget::mousePressEvent( QMouseEvent* event ) +{ + if ( event->button() != Qt::LeftButton ) return; // Set nearest location @@ -182,14 +190,17 @@ void TimeZoneWidget::mousePressEvent(QMouseEvent* event) { QHash > hash = LocaleGlobal::getLocations(); QHash >::iterator iter = hash.begin(); - while (iter != hash.end()) { + while ( iter != hash.end() ) + { QList locations = iter.value(); - for (int i = 0; i < locations.size(); ++i) { + for ( int i = 0; i < locations.size(); ++i ) + { LocaleGlobal::Location loc = locations[i]; - QPoint locPos = getLocationPosition(loc.longitude, loc.latitude); + QPoint locPos = getLocationPosition( loc.longitude, loc.latitude ); - if ((abs(mX - locPos.x()) + abs(mY - locPos.y()) < abs(mX - nX) + abs(mY - nY))) { + if ( ( abs( mX - locPos.x() ) + abs( mY - locPos.y() ) < abs( mX - nX ) + abs( mY - nY ) ) ) + { currentLocation = loc; nX = locPos.x(); nY = locPos.y(); @@ -200,8 +211,8 @@ void TimeZoneWidget::mousePressEvent(QMouseEvent* event) { } // Set zone image and repaint widget - setCurrentLocation(currentLocation); + setCurrentLocation( currentLocation ); // Emit signal - emit locationChanged(currentLocation); + emit locationChanged( currentLocation ); } From 8b76b861ad4d8d75db26d0f042c0d470d5f919ca Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 12 Oct 2017 12:26:50 -0300 Subject: [PATCH 17/90] Code-formatting, add (unused for now) overload of getLocationPosition() --- .../locale/timezonewidget/timezonewidget.h | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/modules/locale/timezonewidget/timezonewidget.h b/src/modules/locale/timezonewidget/timezonewidget.h index 27256fabe..62475e20f 100644 --- a/src/modules/locale/timezonewidget/timezonewidget.h +++ b/src/modules/locale/timezonewidget/timezonewidget.h @@ -48,14 +48,17 @@ class TimeZoneWidget : public QWidget { Q_OBJECT public: - explicit TimeZoneWidget(QWidget* parent = 0); + explicit TimeZoneWidget( QWidget* parent = 0 ); - LocaleGlobal::Location getCurrentLocation() { return currentLocation; } - void setCurrentLocation(QString region, QString zone); - void setCurrentLocation(LocaleGlobal::Location location); + LocaleGlobal::Location getCurrentLocation() + { + return currentLocation; + } + void setCurrentLocation( QString region, QString zone ); + void setCurrentLocation( LocaleGlobal::Location location ); signals: - void locationChanged(LocaleGlobal::Location location); + void locationChanged( LocaleGlobal::Location location ); private: QFont font; @@ -63,10 +66,14 @@ private: QList timeZoneImages; LocaleGlobal::Location currentLocation; - QPoint getLocationPosition(double longitude, double latitude); + QPoint getLocationPosition( const LocaleGlobal::Location& l ) + { + return getLocationPosition( l.longitude, l.latitude ); + } + QPoint getLocationPosition( double longitude, double latitude ); - void paintEvent(QPaintEvent* event); - void mousePressEvent(QMouseEvent* event); + void paintEvent( QPaintEvent* event ); + void mousePressEvent( QMouseEvent* event ); }; #endif // TIMEZONEWIDGET_H From b805a8df7455a4b6b7c88630c800ebafda1ea5f1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 12 Oct 2017 12:33:03 -0300 Subject: [PATCH 18/90] CMake: minor docs, typo's --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80d925b15..0017a29cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,7 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # Clang warnings: doing *everything* is counter-productive, since it warns # about things which we can't fix (e.g. C++98 incompatibilities, but - # Calaares is C++14). + # Calamares is C++14). foreach( CLANG_WARNINGS -Weverything -Wno-c++98-compat @@ -88,6 +88,8 @@ else() set( SUPPRESS_BOOST_WARNINGS "" ) endif() +# Use mark_thirdparty_code() to reduce warnings from the compiler +# on code that we're not going to fix. Call this with a list of files. macro(mark_thirdparty_code) set_source_files_properties( ${ARGV} PROPERTIES From e9205125eacdae6d52a9093e1a0c7e0c13831551 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 12 Oct 2017 12:55:07 -0300 Subject: [PATCH 19/90] Testing: add test to check the shipped config-files for correctness. --- src/modules/CMakeLists.txt | 5 +++ src/modules/test_conf.cpp | 66 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 src/modules/test_conf.cpp diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index 48cda5c72..d48ecd29f 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -1,5 +1,10 @@ include( CMakeColors ) +if( BUILD_TESTING ) + add_executable( test_conf test_conf.cpp ) + target_link_libraries( test_conf ${YAMLCPP_LIBRARY} ) +endif() + file( GLOB SUBDIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*" ) string( REPLACE " " ";" SKIP_LIST "${SKIP_MODULES}" ) foreach( SUBDIRECTORY ${SUBDIRECTORIES} ) diff --git a/src/modules/test_conf.cpp b/src/modules/test_conf.cpp new file mode 100644 index 000000000..d5ac7c6ce --- /dev/null +++ b/src/modules/test_conf.cpp @@ -0,0 +1,66 @@ +/* === This file is part of Calamares - === + * + * Copyright 2017, 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Calamares is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Calamares. If not, see . + */ + +/** + * This is a test-application that just checks the YAML config-file + * shipped with each module for correctness -- well, for parseability. + */ + +#include +#include + +using std::cerr; + +int main(int argc, char** argv) +{ + if (argc != 2) + { + cerr << "Usage: test_conf \n"; + return 1; + } + + try + { + YAML::Node doc = YAML::LoadFile( argv[1] ); + + if ( doc.IsNull() ) + { + // Special case: empty config files are valid, + // but aren't a map. For the example configs, + // this is still an error. + cerr << "WARNING:" << argv[1] << '\n'; + cerr << "WARNING: empty YAML\n"; + return 1; + } + + if ( !doc.IsMap() ) + { + cerr << "WARNING:" << argv[1] << '\n'; + cerr << "WARNING: not-a-YAML-map\n"; + return 1; + } + } + catch ( YAML::Exception& e ) + { + cerr << "WARNING:" << argv[1] << '\n'; + cerr << "WARNING: YAML parser error " << e.what() << '\n'; + return 1; + } + + return 0; +} From 6000cbaae247d14edc09afbe4c2f7eed930df201 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 12 Oct 2017 13:01:53 -0300 Subject: [PATCH 20/90] Testing: test each module's config files --- CMakeModules/CalamaresAddModuleSubdirectory.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeModules/CalamaresAddModuleSubdirectory.cmake b/CMakeModules/CalamaresAddModuleSubdirectory.cmake index 1b60c59a7..66595d269 100644 --- a/CMakeModules/CalamaresAddModuleSubdirectory.cmake +++ b/CMakeModules/CalamaresAddModuleSubdirectory.cmake @@ -39,7 +39,13 @@ function( calamares_add_module_subdirectory ) # message( " ${Green}FILES:${ColorReset} ${MODULE_FILES}" ) message( " ${Green}MODULE_DESTINATION:${ColorReset} ${MODULE_DESTINATION}" ) if( MODULE_CONFIG_FILES ) - if (INSTALL_CONFIG) + if ( BUILD_TESTING ) + foreach( _config_file ${MODULE_CONFIG_FILES} ) + add_test(NAME config-${SUBDIRECTORY} + COMMAND test_conf ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${_config_file} ) + endforeach() + endif() + if ( INSTALL_CONFIG ) message( " ${Green}CONFIGURATION_FILES:${ColorReset} ${MODULE_CONFIG_FILES} => ${MODULE_DATA_DESTINATION}" ) else() message( " ${Green}CONFIGURATION_FILES:${ColorReset} ${MODULE_CONFIG_FILES} => [Skipping installation]" ) From c6c6c2f22f854695299a0c8961329470c4849d87 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 12 Oct 2017 13:37:54 -0300 Subject: [PATCH 21/90] Testing: refactor so that C++ and Python modules all get yaml-config tests --- .../CalamaresAddModuleSubdirectory.cmake | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/CMakeModules/CalamaresAddModuleSubdirectory.cmake b/CMakeModules/CalamaresAddModuleSubdirectory.cmake index 66595d269..caf1b707e 100644 --- a/CMakeModules/CalamaresAddModuleSubdirectory.cmake +++ b/CMakeModules/CalamaresAddModuleSubdirectory.cmake @@ -6,9 +6,12 @@ set( MODULE_DATA_DESTINATION share/calamares/modules ) function( calamares_add_module_subdirectory ) set( SUBDIRECTORY ${ARGV0} ) + set( MODULE_CONFIG_FILES "" ) + # If this subdirectory has a CMakeLists.txt, we add_subdirectory it... if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/CMakeLists.txt" ) add_subdirectory( ${SUBDIRECTORY} ) + file( GLOB MODULE_CONFIG_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY} "${SUBDIRECTORY}/*.conf" ) # ...otherwise, we look for a module.desc. elseif( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/module.desc" ) set( MODULES_DIR ${CMAKE_INSTALL_LIBDIR}/calamares/modules ) @@ -39,12 +42,6 @@ function( calamares_add_module_subdirectory ) # message( " ${Green}FILES:${ColorReset} ${MODULE_FILES}" ) message( " ${Green}MODULE_DESTINATION:${ColorReset} ${MODULE_DESTINATION}" ) if( MODULE_CONFIG_FILES ) - if ( BUILD_TESTING ) - foreach( _config_file ${MODULE_CONFIG_FILES} ) - add_test(NAME config-${SUBDIRECTORY} - COMMAND test_conf ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${_config_file} ) - endforeach() - endif() if ( INSTALL_CONFIG ) message( " ${Green}CONFIGURATION_FILES:${ColorReset} ${MODULE_CONFIG_FILES} => ${MODULE_DATA_DESTINATION}" ) else() @@ -62,9 +59,23 @@ function( calamares_add_module_subdirectory ) RENAME calamares-${SUBDIRECTORY}.mo ) endif() - else() message( "-- ${BoldYellow}Warning:${ColorReset} tried to add module subdirectory ${BoldRed}${SUBDIRECTORY}${ColorReset} which has no CMakeLists.txt or module.desc." ) message( "" ) endif() + + # Check any config files for basic correctness + if ( BUILD_TESTING AND MODULE_CONFIG_FILES ) + set( _count 0 ) + foreach( _config_file ${MODULE_CONFIG_FILES} ) + set( _count_str "-${_count}" ) + if ( _count EQUAL 0 ) + set( _count_str "" ) + endif() + add_test( + NAME config-${SUBDIRECTORY}${_count_str} + COMMAND test_conf ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${_config_file} ) + math( EXPR _count "${_count} + 1" ) + endforeach() + endif() endfunction() From 70573543f24c37807e4207d9d07a4154890ea141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 12 Oct 2017 18:54:43 +0100 Subject: [PATCH 22/90] Use KPMcore NewOperation to create partitions. --- .../partition/jobs/CreatePartitionJob.cpp | 87 ++----------------- 1 file changed, 7 insertions(+), 80 deletions(-) diff --git a/src/modules/partition/jobs/CreatePartitionJob.cpp b/src/modules/partition/jobs/CreatePartitionJob.cpp index 562202e30..efefcae86 100644 --- a/src/modules/partition/jobs/CreatePartitionJob.cpp +++ b/src/modules/partition/jobs/CreatePartitionJob.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include // Qt @@ -79,89 +80,15 @@ CreatePartitionJob::prettyStatusMessage() const Calamares::JobResult CreatePartitionJob::exec() { - QString partitionPath; - FileSystem *fs; Report report( nullptr ); + NewOperation op(*m_device, m_partition); + op.setStatus(Operation::StatusRunning); - if (m_device->type() == Device::Disk_Device) { - int step = 0; - const qreal stepCount = 4; - QString message = tr( "The installer failed to create partition on disk '%1'." ).arg( m_device->name() ); + QString message = tr( "The installer failed to create partition on disk '%1'." ).arg( m_device->name() ); + if (op.execute(report)) + return Calamares::JobResult::ok(); - progress( step++ / stepCount ); - CoreBackend* backend = CoreBackendManager::self()->backend(); - QScopedPointer backendDevice( backend->openDevice( m_device->deviceNode() ) ); - if ( !backendDevice.data() ) - { - return Calamares::JobResult::error( - message, - tr( "Could not open device '%1'." ).arg( m_device->deviceNode() ) - ); - } - - progress( step++ / stepCount ); - QScopedPointer backendPartitionTable( backendDevice->openPartitionTable() ); - if ( !backendPartitionTable.data() ) - { - return Calamares::JobResult::error( - message, - tr( "Could not open partition table." ) - ); - } - - progress( step++ / stepCount ); - partitionPath = backendPartitionTable->createPartition( report, *m_partition ); - if ( partitionPath.isEmpty() ) - { - return Calamares::JobResult::error( - message, - report.toText() - ); - } - m_partition->setPartitionPath( partitionPath ); - backendPartitionTable->commit(); - - progress( step++ / stepCount ); - fs = &m_partition->fileSystem(); - if ( fs->type() == FileSystem::Unformatted || fs->type() == FileSystem::Extended ) - return Calamares::JobResult::ok(); - - if ( !backendPartitionTable->setPartitionSystemType( report, *m_partition ) ) - { - return Calamares::JobResult::error( - tr( "The installer failed to update partition table on disk '%1'." ).arg( m_device->name() ), - report.toText() - ); - } - - backendPartitionTable->commit(); - } - else - { - LvmDevice *dev = dynamic_cast(m_device); - m_partition->setState(Partition::StateNone); - - partitionPath = m_partition->partitionPath(); - QString lvname = partitionPath.right(partitionPath.length() - partitionPath.lastIndexOf(QStringLiteral("/")) - 1); - if ( !LvmDevice::createLV(report, *dev, *m_partition, lvname)) - { - return Calamares::JobResult::error( - tr( "The installer failed to create LVM logical volume %1." ).arg( lvname ), - report.toText() - ); - } - fs = &m_partition->fileSystem(); - } - - if ( !fs->create( report, partitionPath ) ) - { - return Calamares::JobResult::error( - tr( "The installer failed to create file system on partition %1." ).arg( partitionPath ), - report.toText() - ); - } - - return Calamares::JobResult::ok(); + return Calamares::JobResult::error(message, report.toText()); } void From ceba157459f6515dac47f6fb27a2687624e1e735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 12 Oct 2017 18:59:11 +0100 Subject: [PATCH 23/90] Use KPMcore DeleteOperation to delete partitions. --- .../partition/jobs/DeletePartitionJob.cpp | 47 +++---------------- 1 file changed, 7 insertions(+), 40 deletions(-) diff --git a/src/modules/partition/jobs/DeletePartitionJob.cpp b/src/modules/partition/jobs/DeletePartitionJob.cpp index bceffd133..1bed8739f 100644 --- a/src/modules/partition/jobs/DeletePartitionJob.cpp +++ b/src/modules/partition/jobs/DeletePartitionJob.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include DeletePartitionJob::DeletePartitionJob( Device* device, Partition* partition ) @@ -65,48 +66,14 @@ Calamares::JobResult DeletePartitionJob::exec() { Report report( nullptr ); + DeleteOperation op(*m_device, m_partition); + op.setStatus(Operation::StatusRunning); + QString message = tr( "The installer failed to delete partition %1." ).arg( m_partition->devicePath() ); + if (op.execute(report)) + return Calamares::JobResult::ok(); - if ( m_device->deviceNode() != m_partition->devicePath() ) - { - return Calamares::JobResult::error( - message, - tr( "Partition (%1) and device (%2) do not match." ) - .arg( m_partition->devicePath() ) - .arg( m_device->deviceNode() ) - ); - } - - CoreBackend* backend = CoreBackendManager::self()->backend(); - QScopedPointer backendDevice( backend->openDevice( m_device->deviceNode() ) ); - if ( !backendDevice.data() ) - { - return Calamares::JobResult::error( - message, - tr( "Could not open device %1." ).arg( m_device->deviceNode() ) - ); - } - - QScopedPointer backendPartitionTable( backendDevice->openPartitionTable() ); - if ( !backendPartitionTable.data() ) - { - return Calamares::JobResult::error( - message, - tr( "Could not open partition table." ) - ); - } - - bool ok = backendPartitionTable->deletePartition( report, *m_partition ); - if ( !ok ) - { - return Calamares::JobResult::error( - message, - report.toText() - ); - } - - backendPartitionTable->commit(); - return Calamares::JobResult::ok(); + return Calamares::JobResult::error(message, report.toText()); } void From 173f4aba1befc7d1056a87bb4f3c952a335cd34d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 13 Oct 2017 16:37:23 -0300 Subject: [PATCH 24/90] Update release-procedures --- ci/RELEASE.md | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/ci/RELEASE.md b/ci/RELEASE.md index 640a91156..ecd9cd354 100644 --- a/ci/RELEASE.md +++ b/ci/RELEASE.md @@ -2,7 +2,9 @@ The Calamares release process ============================= #### (0) A week in advance -* Run [Coverity scan][coverity], fix what's relevant. The Coverity scan runs + +* (Only releases from master) + Run [Coverity scan][coverity], fix what's relevant. The Coverity scan runs automatically once a week on master. * Build with clang -Weverything, fix what's relevant. ``` @@ -16,8 +18,10 @@ The Calamares release process ``` Note that *all* means all-that-make-sense. The partition-manager tests need an additional environment variable to be set for some tests, which will - destroy an attached disk. This is not always desirable. -* Notify [translators][transifex]. In the dashboard there is an *Announcements* + destroy an attached disk. This is not always desirable. There are some + sample config-files that are empty and which fail the config-tests. +* (Only releases from master) + Notify [translators][transifex]. In the dashboard there is an *Announcements* link that you can use to send a translation announcement. [coverity]: https://scan.coverity.com/projects/calamares-calamares?tab=overview @@ -27,17 +31,24 @@ The Calamares release process * Bump version in `CMakeLists.txt`, *CALAMARES_VERSION* variables, and set RC to a non-zero value (e.g. doing -rc1, -rc2, ...). Push that. -* Check `README.md` and everything in `hacking`, make sure it's all still - relevant. Run `hacking/calamaresstyle` to check the C++ code style. - Python code is checked as part of the Travis CI builds. +* Check `README.md` and everything `ci/HACKING.md`, make sure it's all still + relevant. Run `ci/calamaresstyle` to check the C++ code style. + Run pycodestyle on recently-modified Python modules, fix what makes sense. * Check defaults in `settings.conf` and other configuration files. -* Pull latest translations from Transifex. This is done nightly on Jenkins, - so a manual pull is rarely necessary. -* Update the list of enabled translation languages in `CMakeLists.txt`. +* (Only releases from master) + Pull latest translations from Transifex. We only push / pull translations + from master, so longer-lived branches (e.g. 3.1.x) don't get translation + updates. This is to keep the translation workflow simple. + ``` + sh ci/txpull.sh + ``` +* (Only releases from master) + Update the list of enabled translation languages in `CMakeLists.txt`. Check the [translation site][transifex] for the list of languages with fairly complete translations. #### (2) Tarball + * Create tarball: `git-archive-all -v calamares-1.1-rc1.tar.gz` or without the helper script, ``` @@ -45,9 +56,10 @@ The Calamares release process git archive -o $V.tar.gz --prefix $V/ master ``` Double check that the tarball matches the version number. -* Test tarball. +* Test tarball (e.g. unpack somewhere else and run the tests from step 0). #### (3) Tag + * Set RC to zero in `CMakeLists.txt` if this is the actual release. * `git tag -s v1.1.0` Make sure the signing key is known in GitHub, so that the tag is shown as a verified tag. Do not sign -rc tags. @@ -57,6 +69,7 @@ The Calamares release process * Write release article. #### (4) Release day + * Publish tarball. * Update download page. * Publish release article on `calamares.io`. From a776f9a7b59c472ea132d1c956765098b9dfe301 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Fri, 13 Oct 2017 16:38:48 -0300 Subject: [PATCH 25/90] [core] Automatic merge of Transifex translations --- lang/calamares_cs_CZ.ts | 22 ++++++++--------- lang/calamares_da.ts | 8 +++---- lang/calamares_hr.ts | 2 +- lang/calamares_mr.ts | 52 ++++++++++++++++++++--------------------- lang/calamares_sv.ts | 26 ++++++++++----------- 5 files changed, 55 insertions(+), 55 deletions(-) diff --git a/lang/calamares_cs_CZ.ts b/lang/calamares_cs_CZ.ts index 7394117c9..a4175240f 100644 --- a/lang/calamares_cs_CZ.ts +++ b/lang/calamares_cs_CZ.ts @@ -1152,7 +1152,7 @@ Instalační program bude ukončen a všechny změny ztraceny. System locale setting - Místní a jazyková nastavení pro systém + Místní a jazykové nastavení systému @@ -1180,7 +1180,7 @@ Instalační program bude ukončen a všechny změny ztraceny. I accept the terms and conditions above. - Souhlasím s podmínkami uvedenými výše. + Souhlasím s výše uvedenými podmínkami. @@ -1190,49 +1190,49 @@ Instalační program bude ukončen a všechny změny ztraceny. Please review the End User License Agreements (EULAs) above.<br/>If you do not agree with the terms, the setup procedure cannot continue. - Prosím projděte si End User License Agreements (EULAs) výše.<br/> Pokud s nimi nesouhlasíte, ukončete instalační proces. + Projděte si výše uvedené „licenční smlouvy s koncovým uživatelem“ (EULA).<br/> Pokud s podmínkami v nich nesouhlasíte, ukončete instalační proces. <h1>License Agreement</h1>This setup procedure can install proprietary software that is subject to licensing terms in order to provide additional features and enhance the user experience. - <h1>Licenční ujednání</h1>Tato instalace může nainstalovat některý proprietární software, který podléhá licenčním podmínkám, aby navíc poskytnul některé funkce a zajistil uživatelskou přivětivost. + <h1>Licenční ujednání</h1>Tato instalace může nainstalovat také proprietární software, který podléhá licenčním podmínkám, ale který poskytuje některé další funkce a zlepšuje uživatelskou přivětivost. Please review the End User License Agreements (EULAs) above.<br/>If you do not agree with the terms, proprietary software will not be installed, and open source alternatives will be used instead. - Prosím projděte si End User License Agreements (EULAs) výše.<br/> Pokud s nimi nesouhlasíte, místo proprietárního software budou použity open source alternativy. + Projděte si výše uvedené „licenční smlouvy s koncovým uživatelem“ (EULA).<br/> Pokud s podmínkami v nich nesouhlasíte, místo proprietárního software budou použity open source alternativy. <strong>%1 driver</strong><br/>by %2 %1 is an untranslatable product name, example: Creative Audigy driver - <strong>%1 ovladač</strong><br/> %2 + <strong>%1 ovladač</strong><br/>od %2 <strong>%1 graphics driver</strong><br/><font color="Grey">by %2</font> %1 is usually a vendor name, example: Nvidia graphics driver - <strong>%1 ovladač grafiky</strong><br/><font color="Grey"> %2</font> + <strong>%1 ovladač grafiky</strong><br/><font color="Grey">od %2</font> <strong>%1 browser plugin</strong><br/><font color="Grey">by %2</font> - <strong>%1 doplněk prohlížeče</strong><br/><font color="Grey"> %2</font> + <strong>%1 doplněk prohlížeče</strong><br/><font color="Grey">od %2</font> <strong>%1 codec</strong><br/><font color="Grey">by %2</font> - <strong>%1 kodek</strong><br/><font color="Grey"> %2</font> + <strong>%1 kodek</strong><br/><font color="Grey">od %2</font> <strong>%1 package</strong><br/><font color="Grey">by %2</font> - <strong>%1 balíček</strong><br/><font color="Grey"> %2</font> + <strong>%1 balíček</strong><br/><font color="Grey">od %2</font> <strong>%1</strong><br/><font color="Grey">by %2</font> - <strong>%1</strong><br/><font color="Grey"> %2</font> + <strong>%1</strong><br/><font color="Grey">od %2</font> diff --git a/lang/calamares_da.ts b/lang/calamares_da.ts index ed25eb0d1..9bd7345f8 100644 --- a/lang/calamares_da.ts +++ b/lang/calamares_da.ts @@ -631,7 +631,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt. Creating new %1 partition on %2. - Opretter ny %1 partition på %2. + Opretter ny %1-partition på %2. @@ -692,12 +692,12 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt. Create new %1 partition table on %2. - Opret en ny %1 partitionstabel på %2. + Opret en ny %1-partitionstabel på %2. Create new <strong>%1</strong> partition table on <strong>%2</strong> (%3). - Opret en ny <strong>%1</strong> partitionstabel på <strong>%2</strong> (%3). + Opret en ny <strong>%1</strong>-partitionstabel på <strong>%2</strong> (%3). @@ -984,7 +984,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt. Install %1 on <strong>new</strong> %2 system partition. - Installér %1 på <strong>nye</strong> %2-systempartition. + Installér %1 på <strong>ny</strong> %2-systempartition. diff --git a/lang/calamares_hr.ts b/lang/calamares_hr.ts index c0d8be4e6..054b394ba 100644 --- a/lang/calamares_hr.ts +++ b/lang/calamares_hr.ts @@ -2291,7 +2291,7 @@ Instalacijski program će izaći i sve promjene će biti izgubljene. <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="http://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/>za %3</strong><br/><br/>Autorska prava 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Autorska prava 2017 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Zahvale: Anke Boersma, Aurélien Gâteau, Kevin Kofler, Lisa Vitolo, Philip Müller, Pier Luigi Fiorini, Rohan Garg i <a href="https://www.transifex.com/calamares/calamares/">Calamares timu za prevođenje</a>.<br/><br/><a href="http://calamares.io/">Calamares</a>sponzorira <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. + <h1>%1</h1><br/><strong>%2<br/>za %3</strong><br/><br/>Autorska prava 2014-2017 Teo Mrnjavac &lt;teo@kde.org&gt;<br/>Autorska prava 2017 Adriaan de Groot &lt;groot@kde.org&gt;<br/>Zahvale: Anke Boersma, Aurélien Gâteau, Kevin Kofler, Lisa Vitolo, Philip Müller, Pier Luigi Fiorini, Rohan Garg i <a href="https://www.transifex.com/calamares/calamares/">Calamares timu za prevođenje</a>.<br/><br/><a href="http://calamares.io/">Calamares</a> sponzorira <br/><a href="http://www.blue-systems.com/">Blue Systems</a> - Liberating Software. diff --git a/lang/calamares_mr.ts b/lang/calamares_mr.ts index 1d27a6426..1bcaa1568 100644 --- a/lang/calamares_mr.ts +++ b/lang/calamares_mr.ts @@ -1939,7 +1939,7 @@ The installer will quit and all changes will be lost. Internal Error - + अंतर्गत त्रूटी  @@ -2137,7 +2137,7 @@ The installer will quit and all changes will be lost. Set timezone to %1/%2 - + %1/%2 हा वेळक्षेत्र निश्चित करा @@ -2152,7 +2152,7 @@ The installer will quit and all changes will be lost. Cannot set timezone. - + वेळक्षेत्र निश्चित करु शकत नाही @@ -2162,12 +2162,12 @@ The installer will quit and all changes will be lost. Cannot set timezone, - + वेळक्षेत्र निश्चित करु शकत नाही, Cannot open /etc/timezone for writing - + /etc/timezone लिहिण्याकरिता उघडू शकत नाही @@ -2183,7 +2183,7 @@ The installer will quit and all changes will be lost. Summary - + सारांश @@ -2191,43 +2191,43 @@ The installer will quit and all changes will be lost. Your username is too long. - + तुमचा वापरकर्तानाव खूप लांब आहे Your username contains invalid characters. Only lowercase letters and numbers are allowed. - + तुमच्या वापरकर्तानावात अवैध अक्षरे आहेत. फक्त अक्षरे, अंक आणि डॅश स्वीकारले जातील. Your hostname is too short. - + तुमचा संगणकनाव खूप लहान आहे Your hostname is too long. - + तुमचा संगणकनाव खूप लांब आहे Your hostname contains invalid characters. Only letters, numbers and dashes are allowed. - + तुमच्या संगणकनावात अवैध अक्षरे आहेत. फक्त अक्षरे, अंक आणि डॅश स्वीकारले जातील. Your passwords do not match! - + तुमचा परवलीशब्द जुळत नाही Password is too short - + परवलीशब्द खूप लहान आहे Password is too long - + परवलीशब्द खूप लांब आहे @@ -2235,7 +2235,7 @@ The installer will quit and all changes will be lost. Users - + वापरकर्ते @@ -2243,47 +2243,47 @@ The installer will quit and all changes will be lost. Form - + स्वरुप &Language: - + &भाषा : &Release notes - + &प्रकाशन टिपा &Known issues - + &ज्ञात त्रुटी &Support - + %1 पाठबळ &About - + &विषयी <h1>Welcome to the %1 installer.</h1> - + <h1>‌%1 अधिष्ठापकमधे स्वागत आहे.</h1> <h1>Welcome to the Calamares installer for %1.</h1> - + <h1>‌%1 साठी असलेल्या अधिष्ठापकमध्ये स्वागत आहे.</h1> About %1 installer - + %1 अधिष्ठापक बद्दल @@ -2293,7 +2293,7 @@ The installer will quit and all changes will be lost. %1 support - + %1 पाठबळ @@ -2301,7 +2301,7 @@ The installer will quit and all changes will be lost. Welcome - + स्वागत \ No newline at end of file diff --git a/lang/calamares_sv.ts b/lang/calamares_sv.ts index c9a30d0ce..c5536cb35 100644 --- a/lang/calamares_sv.ts +++ b/lang/calamares_sv.ts @@ -1162,12 +1162,12 @@ Alla ändringar kommer att gå förlorade. &Cancel - + &Avsluta &OK - + &Okej @@ -1185,17 +1185,17 @@ Alla ändringar kommer att gå förlorade. <h1>License Agreement</h1>This setup procedure will install proprietary software that is subject to licensing terms. - + <h1>Licensavtal</h1>Denna installationsprocedur kommer att installera proprietär mjukvara som omfattas av licensvillkor. Please review the End User License Agreements (EULAs) above.<br/>If you do not agree with the terms, the setup procedure cannot continue. - + Läs igenom End User Agreements (EULA:s) ovan.<br/>Om du inte accepterar villkoren kan inte installationsproceduren fortsätta. <h1>License Agreement</h1>This setup procedure can install proprietary software that is subject to licensing terms in order to provide additional features and enhance the user experience. - + <h1>Licensavtal</h1>Denna installationsprocedur kan installera proprietär mjukvara som omfattas av licensvillkor för att tillhandahålla ytterligare funktioner och förbättra användarupplevelsen. @@ -1253,7 +1253,7 @@ Alla ändringar kommer att gå förlorade. The system language will be set to %1. - + Systemspråket kommer ändras till %1. @@ -1285,7 +1285,7 @@ Alla ändringar kommer att gå förlorade. %1 (%2) Language (Country) - + %1 (%2) @@ -1355,18 +1355,18 @@ Alla ändringar kommer att gå förlorade. Name - + Namn Description - + Beskrivning Network Installation. (Disabled: Unable to fetch package lists, check your network connection) - + Nätverksinstallation. (Inaktiverad: Kan inte hämta paketlistor, kontrollera nätverksanslutningen) @@ -1374,7 +1374,7 @@ Alla ändringar kommer att gå förlorade. Package selection - + Paketval @@ -1500,7 +1500,7 @@ Alla ändringar kommer att gå förlorade. New partition - + Ny partition @@ -1858,7 +1858,7 @@ Alla ändringar kommer att gå förlorade. The screen is too small to display the installer. - + Skärmen är för liten för att visa installationshanteraren. From 8424e6ec3b052e73c9ed6a876e8a9c5358dcb6cd Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Fri, 13 Oct 2017 16:38:49 -0300 Subject: [PATCH 26/90] [python] Automatic merge of Transifex translations --- lang/python/da/LC_MESSAGES/python.mo | Bin 1065 -> 1067 bytes lang/python/da/LC_MESSAGES/python.po | 2 +- lang/python/nb/LC_MESSAGES/python.mo | Bin 599 -> 616 bytes lang/python/nb/LC_MESSAGES/python.po | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/python/da/LC_MESSAGES/python.mo b/lang/python/da/LC_MESSAGES/python.mo index 201cefa0ec369fc90731c614ce2daa26a92909c0..8682dd349f5dbc6fa8a587c6956869afd44d29aa 100644 GIT binary patch delta 37 pcmZ3_=1^}HZ2+05d diff --git a/lang/python/da/LC_MESSAGES/python.po b/lang/python/da/LC_MESSAGES/python.po index 522176655..4c14df766 100644 --- a/lang/python/da/LC_MESSAGES/python.po +++ b/lang/python/da/LC_MESSAGES/python.po @@ -28,7 +28,7 @@ msgstr "Forarbejder pakker (%(count)d / %(total)d)" msgid "Installing one package." msgid_plural "Installing %(num)d packages." msgstr[0] "Installerer én pakke." -msgstr[1] "Installer %(num)d pakker." +msgstr[1] "Installerer %(num)d pakker." #: src/modules/packages/main.py:64 #, python-format diff --git a/lang/python/nb/LC_MESSAGES/python.mo b/lang/python/nb/LC_MESSAGES/python.mo index 047be0bf7de5f5ff2187dcf9030c55f49e36b220..2c163b19d77adfa83f28239110ac9cd81791113f 100644 GIT binary patch delta 69 zcmcc4@`7c8iRdmy28Ip>1_mJ@c4lH=5Cqa;6FpxjWacF%mt>ZuYUdrXQriA=q2apZgyZ4X9NI%IuuC& delta 52 zcmaFCa-C&@iRem328Ip>1_mJ@HezC65Cqb$6Fpz>7ZoQul$4ev=H-_p>ZPP^4rCN( F1OP>J4N3q2 diff --git a/lang/python/nb/LC_MESSAGES/python.po b/lang/python/nb/LC_MESSAGES/python.po index cbd1f5206..94ed28e31 100644 --- a/lang/python/nb/LC_MESSAGES/python.po +++ b/lang/python/nb/LC_MESSAGES/python.po @@ -10,7 +10,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-09-28 10:35-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Tyler Moss , 2017\n" +"Last-Translator: Tyler Moss , 2017\n" "Language-Team: Norwegian Bokmål (https://www.transifex.com/calamares/teams/20061/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" From aabcd6ba86c102a15ec50972732b6aeb99573e22 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 13 Oct 2017 16:45:37 -0300 Subject: [PATCH 27/90] 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 bdf8c181261399cb5cbf9dcdc9f9f6fc25e1caaa Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sun, 15 Oct 2017 22:51:37 -0400 Subject: [PATCH 28/90] use private env var for travis IRC notify channel --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0b18d927d..f8788b2cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ services: notifications: irc: - - "chat.freenode.net#calamares" + - "$IRC_NOTIFY_CHANNEL" install: - docker build -t calamares . From 38c3f8bb52773d89a676e2cd08020d884960da61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 20 Oct 2017 20:18:52 +0100 Subject: [PATCH 29/90] Clarify defaultFileSystem documentation. --- src/modules/partition/partition.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/partition.conf b/src/modules/partition/partition.conf index 610fb7b42..62b897e82 100644 --- a/src/modules/partition/partition.conf +++ b/src/modules/partition/partition.conf @@ -26,7 +26,8 @@ drawNestedPartitions: false # Show/hide partition labels on manual partitioning page. alwaysShowPartitionLabels: true -# Default filesystem type, pre-selected in the "Create Partition" dialog. +# Default filesystem type, pre-selected in the "Create Partition" dialog +# in the manual partitioning mode. # The filesystem type selected here is also used for automated install # modes (Erase, Replace and Alongside). # Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs From 5db8a8f65ca0830651cf4f5976b319237003cd26 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 11:53:10 +0200 Subject: [PATCH 30/90] Testing: refactor python-test tool to allow independent use. - Improve documentation - Allow '-' as filename (for empty) --- src/modules/testmodule.py | 79 +++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/src/modules/testmodule.py b/src/modules/testmodule.py index d115694eb..1ce3cf552 100755 --- a/src/modules/testmodule.py +++ b/src/modules/testmodule.py @@ -18,6 +18,15 @@ # # You should have received a copy of the GNU General Public License # along with Calamares. If not, see . +""" +Testing tool to run a single Python module; optionally a +global configuration and module configuration can be read +from YAML files. Give a full path to the module-directory, +and also full paths to the configuration files. An empty +configuration file name, or "-" (a single dash) is used +to indicate that no file should be read -- useful to load +a module configuratioon file without a global configuration. +""" import argparse import os @@ -57,26 +66,10 @@ class Job: print("Job set progress to {}%.".format(progress * 100)) -def main(): - """ +def test_module(moduledir, globalconfigfilename, moduleconfigfilename, lang): + print("Testing module in: " + moduledir) - - :return: - """ - parser = argparse.ArgumentParser() - parser.add_argument("moduledir", - help="Dir containing the Python module.") - parser.add_argument("globalstorage_yaml", nargs="?", - help="A yaml file to initialize GlobalStorage.") - parser.add_argument("configuration_yaml", nargs="?", - help="A yaml file to initialize the Job.") - parser.add_argument("--lang", "-l", nargs="?", default=None, - help="Set translation language.") - args = parser.parse_args() - - print("Testing module in: " + args.moduledir) - - confpath = os.path.join(args.moduledir, "module.desc") + confpath = os.path.join(moduledir, "module.desc") with open(confpath) as f: doc = yaml.load(f) @@ -87,27 +80,27 @@ def main(): # Parameter None creates a new, empty GlobalStorage libcalamares.globalstorage = libcalamares.GlobalStorage(None) libcalamares.globalstorage.insert("testing", True) - if args.lang: - libcalamares.globalstorage.insert("locale", args.lang) - libcalamares.globalstorage.insert("localeConf", {"LANG": args.lang}) + if lang: + libcalamares.globalstorage.insert("locale", lang) + libcalamares.globalstorage.insert("localeConf", {"LANG": lang}) # if a file for simulating globalStorage contents is provided, load it - if args.globalstorage_yaml: - with open(args.globalstorage_yaml) as f: + if globalconfigfilename: + with open(globalconfigfilename) as f: gs_doc = yaml.load(f) for key, value in gs_doc.items(): libcalamares.globalstorage.insert(key, value) cfg_doc = dict() - if args.configuration_yaml: - with open(args.configuration_yaml) as f: + if moduleconfigfilename: + with open(moduleconfigfilename) as f: cfg_doc = yaml.load(f) - libcalamares.job = Job(args.moduledir, doc, cfg_doc) + libcalamares.job = Job(moduledir, doc, cfg_doc) - scriptpath = os.path.abspath(args.moduledir) + scriptpath = os.path.abspath(moduledir) sys.path.append(scriptpath) - import main + import main # Assumed to import main from module itself print("Output from module:") print(main.run()) @@ -115,5 +108,33 @@ def main(): return 0 +def munge_filename(filename): + """ + Maps files "" (empty) and "-" (just a dash) to None, + to simplify processing elsewhere. + """ + if not filename or filename == "-": + return None + return filename + + +def main(): + parser = argparse.ArgumentParser(description=globals()["__doc__"]) + parser.add_argument("moduledir", + help="Dir containing the Python module.") + parser.add_argument("globalstorage_yaml", nargs="?", + help="A yaml file to initialize GlobalStorage.") + parser.add_argument("configuration_yaml", nargs="?", + help="A yaml file to initialize the Job.") + parser.add_argument("--lang", "-l", nargs="?", default=None, + help="Set translation language.") + args = parser.parse_args() + + return test_module(args.moduledir, + munge_filename(args.globalstorage_yaml), + munge_filename(args.configuration_yaml), + args.lang) + + if __name__ == "__main__": sys.exit(main()) From acd2d9f006cf5552a6ff73256db91dab7b7b0ad0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 11:57:11 +0200 Subject: [PATCH 31/90] Testing: be more verbose about what files are loaded. --- src/modules/testmodule.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/testmodule.py b/src/modules/testmodule.py index 1ce3cf552..a25c7bc5d 100755 --- a/src/modules/testmodule.py +++ b/src/modules/testmodule.py @@ -90,11 +90,17 @@ def test_module(moduledir, globalconfigfilename, moduleconfigfilename, lang): gs_doc = yaml.load(f) for key, value in gs_doc.items(): libcalamares.globalstorage.insert(key, value) + print("Global configuration '" + globalconfigfilename + "' loaded.") + else: + print("No global configuration loaded.") cfg_doc = dict() if moduleconfigfilename: with open(moduleconfigfilename) as f: cfg_doc = yaml.load(f) + print("Local configuration '" + moduleconfigfilename + "' loaded.") + else: + print("No module configuration loaded.") libcalamares.job = Job(moduledir, doc, cfg_doc) From e7c51aa00b0cf6c97482cf0f967474b15a66d967 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 06:23:19 -0400 Subject: [PATCH 32/90] Document defaultFileSystemType - this applies to new partitions; existing documentation erroneously said this happens with Replace as well, - follow up on Andrius manual-partition PR with documentation that manual mode doesn't switch to this FS when editing existing partitions. --- src/modules/partition/partition.conf | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/modules/partition/partition.conf b/src/modules/partition/partition.conf index 62b897e82..a5c428e23 100644 --- a/src/modules/partition/partition.conf +++ b/src/modules/partition/partition.conf @@ -26,10 +26,16 @@ drawNestedPartitions: false # Show/hide partition labels on manual partitioning page. alwaysShowPartitionLabels: true -# Default filesystem type, pre-selected in the "Create Partition" dialog -# in the manual partitioning mode. -# The filesystem type selected here is also used for automated install -# modes (Erase, Replace and Alongside). +# Default filesystem type, used when a "new" partition is made. +# +# When replacing a partition, the existing filesystem inside the +# partition is retained. In other cases, e.g. Erase and Alongside, +# as well as when using manual partitioning and creating a new +# partition, this filesystem type is pre-selected. Note that +# editing a partition in manual-creation mode will not automatically +# change the filesystem type to this default value -- it is not +# creating a new partition. +# # Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs # If nothing is specified, Calamares defaults to "ext4". defaultFileSystemType: "ext4" From 174fa98695b556e80e6a078f739019ba388478da Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 06:30:43 -0400 Subject: [PATCH 33/90] Documentation: minor polishing on netinstall --- src/modules/netinstall/README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/netinstall/README.md b/src/modules/netinstall/README.md index 5d199a559..6478a844e 100644 --- a/src/modules/netinstall/README.md +++ b/src/modules/netinstall/README.md @@ -6,6 +6,7 @@ At installation time, the user is presented with the choice to install groups of Calamares will then invoke the correct backend to install the packages. ## Configuration of the packages + Every distribution can choose which groups to display and which packages should be in the groups. The *netinstall.conf* file should have this format: @@ -48,7 +49,8 @@ If you set both *hidden* and *selected* for a group, you are basically creating which will always be installed in the user's system. ## Configuration of the module -Here is the set of instructions to have the module work in your Calamares. As of July 2016, this has been successfully + +Here is the set of instructions to have the module work in your Calamares. As of July 2016, this has been successfully tested using the live installation of Chakra Fermi. First, if the module is used, we need to require a working Internet connection, otherwise the module will be @@ -63,7 +65,8 @@ If not present, add the **packages** job in the **exec** list. This is the job t to install packages. Make sure it is configured to use the correct package manager for your distribution; this is configured in src/modules/packages/packages.conf. -The exec list should be: +The **exec** list in *settings.conf* should contain the following items in +order (it's ok for other jobs to be listed inbetween them, though): - unpackfs - networkcfg @@ -74,10 +77,10 @@ structure; **networkcfg** set ups a working network in the chroot; and finally * in the chroot. ## Common issues + If launching the package manager command returns you negative exit statuses and nothing is actually invoked, this is likely an error in the setup of the chroot; check that the parameter **rootMountPoint** is set to the correct value in the Calamares configuration. If the command is run, but exits with error, check that the network is working in the chroot. Make sure /etc/resolv.conf exists and that it's not empty. - From 286305a9d913a2c335239a72e1e0307666b4c23b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 06:45:42 -0400 Subject: [PATCH 34/90] Travis: fix up weird language setting --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f8788b2cc..f4a11e766 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,4 @@ -language: - - cpp - - python +language: cpp python: - 3.5 From 1969cde5dd2f913c5cf84bf4876c7a73ccf39b89 Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Mon, 23 Oct 2017 07:14:06 -0400 Subject: [PATCH 35/90] [core] Automatic merge of Transifex translations --- lang/calamares_lt.ts | 24 ++++++++++++------------ lang/calamares_tr_TR.ts | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lang/calamares_lt.ts b/lang/calamares_lt.ts index eab33bca6..a8843f071 100644 --- a/lang/calamares_lt.ts +++ b/lang/calamares_lt.ts @@ -240,7 +240,7 @@ Išvestis: Cancel installation without changing the system. - Atsisakyti diegimo, nieko nekeisti sistemoje. + Atsisakyti diegimo, nieko sistemoje nekeičiant. @@ -277,7 +277,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. The %1 installer is about to make changes to your disk in order to install %2.<br/><strong>You will not be able to undo these changes.</strong> - %1 diegimo programa, siekdama įdiegti %2, ketina atlikti pakeitimus diske.<br/><strong>Negalėsite atšaukti šių pakeitimų.</strong> + %1 diegimo programa, siekdama įdiegti %2, ketina atlikti pakeitimus diske.<br/><strong>Šių pakeitimų atšaukti nebegalėsite.</strong> @@ -369,12 +369,12 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. This computer does not satisfy some of the recommended requirements for installing %1.<br/>Installation can continue, but some features might be disabled. - Šis kompiuteris netenkina kai kurių %1 diegimui rekomenduojamų reikalavimų.<br/>Diegti galite, bet kai kurios funkcijos gali būti išjungtos. + Šis kompiuteris netenkina kai kurių %1 diegimui rekomenduojamų reikalavimų.<br/>Diegimą galima tęsti, tačiau kai kurios funkcijos gali būti išjungtos. This program will ask you some questions and set up %2 on your computer. - Programa užduos klausimus ir padės įsidiegti %2. + Programa užduos kelis klausimus ir padės įsidiegti %2. @@ -908,12 +908,12 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. Format - Suženklinti + Formatuoti Warning: Formatting the partition will erase all existing data. - Įspėjimas: suženklinant skaidinį, sunaikinami visi jame esantys duomenys. + Įspėjimas: Formatuojant skaidinį, sunaikinami visi jame esantys duomenys. @@ -1058,22 +1058,22 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. Format partition %1 (file system: %2, size: %3 MB) on %4. - Suženklinti skaidinį %1 (failų sistema: %2, dydis: %3 MB) diske %4. + Formatuoti skaidinį %1 (failų sistema: %2, dydis: %3 MB) diske %4. Format <strong>%3MB</strong> partition <strong>%1</strong> with file system <strong>%2</strong>. - Suženklinti <strong>%3MB</strong> skaidinį <strong>%1</strong> su failų sistema <strong>%2</strong>. + Formatuoti <strong>%3MB</strong> skaidinį <strong>%1</strong> su failų sistema <strong>%2</strong>. Formatting partition %1 with file system %2. - Suženklinamas skaidinys %1 su %2 failų sistema. + Formatuojamas skaidinys %1 su %2 failų sistema. The installer failed to format partition %1 on disk '%2'. - Diegimo programai nepavyko suženklinti „%2“ disko skaidinio %1. + Diegimo programai nepavyko formatuoti „%2“ disko skaidinio %1. @@ -1237,7 +1237,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. <a href="%1">view license agreement</a> - <a href="%1">žiūrėti licenciją</a> + <a href="%1">žiūrėti licencijos sutartį</a> @@ -1578,7 +1578,7 @@ Diegimo programa užbaigs darbą ir visi pakeitimai bus prarasti. &Delete - Ša&linti + Iš&trinti diff --git a/lang/calamares_tr_TR.ts b/lang/calamares_tr_TR.ts index 0503b8518..a378d0b6e 100644 --- a/lang/calamares_tr_TR.ts +++ b/lang/calamares_tr_TR.ts @@ -2230,12 +2230,12 @@ Sistem güç kaynağına bağlı değil. Password is too short - + Şifre çok kısa Password is too long - + Şifre çok uzun From 12dfe5152a5dd649110755b71fb1a3aab044c9ad Mon Sep 17 00:00:00 2001 From: Calamares CI Date: Mon, 23 Oct 2017 07:14:07 -0400 Subject: [PATCH 36/90] [desktop] Automatic merge of Transifex translations --- calamares.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calamares.desktop b/calamares.desktop index f90321523..c4346f679 100644 --- a/calamares.desktop +++ b/calamares.desktop @@ -66,7 +66,7 @@ Comment[ja]=Calamares — システムインストーラー Name[lt]=Calamares Icon[lt]=calamares GenericName[lt]=Sistemos diegimas į kompiuterį -Comment[lt]=Calamares — sistemos diegyklė +Comment[lt]=Calamares — Sistemos diegimo programa Name[nb]=Calamares Icon[nb]=calamares GenericName[nb]=Systeminstallatør From 4314f2c4ad1566d3070db1629724f7eafffb46a6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Oct 2017 11:10:18 -0400 Subject: [PATCH 37/90] 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 38/90] 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 39/90] 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 40/90] 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 41/90] [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 42/90] [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 43/90] [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 44/90] [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 45/90] [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 46/90] 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} ) From 5e101bcbf9eb8f20d0fc36e124068a49cbb9f13e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 24 Oct 2017 12:52:33 -0400 Subject: [PATCH 47/90] Document KPMCore versions that make sense - KPMCore 3.0.2 works, but contains specific bugs --- src/modules/partition/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/partition/CMakeLists.txt b/src/modules/partition/CMakeLists.txt index 1ea69c027..961490bef 100644 --- a/src/modules/partition/CMakeLists.txt +++ b/src/modules/partition/CMakeLists.txt @@ -8,11 +8,15 @@ find_package( KF5 REQUIRED CoreAddons ) # These are needed because KPMcore links publicly against ConfigCore, I18n, IconThemes, KIOCore and Service find_package( KF5 REQUIRED Config I18n IconThemes KIO Service ) +# Compatibility: KPMCore 3.2 has a different API, so detect it +# first and add a define for it; otherwise we need 3.0.3 for NVMe +# support; 3.0.2 works as well, but is buggy (#697) find_package( KPMcore 3.1.50 QUIET ) if ( ${KPMcore_FOUND} ) add_definitions(-DWITH_KPMCORE22) endif() find_package( KPMcore 3.0.3 REQUIRED ) + find_library( atasmart_LIB atasmart ) find_library( blkid_LIB blkid ) if( NOT atasmart_LIB ) From ad2edf4f82fe4f9d27257d92829e90f894bc94c6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 24 Oct 2017 12:50:50 -0400 Subject: [PATCH 48/90] Linking: Reduce library dependencies in welcome module Welcome is only interested in checking partitions, not in resizing them, so stick to one library. This will become moot when the checks move to partitionmanager and KPMCore can do the things. --- src/modules/welcome/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/welcome/CMakeLists.txt b/src/modules/welcome/CMakeLists.txt index f73d8850d..42ce62beb 100644 --- a/src/modules/welcome/CMakeLists.txt +++ b/src/modules/welcome/CMakeLists.txt @@ -12,7 +12,7 @@ set( CHECKER_SOURCES checker/partman_devices.c ) set( CHECKER_LINK_LIBRARIES - ${LIBPARTED_LIBS} + ${LIBPARTED_LIBRARY} Qt5::DBus Qt5::Network ) From fe0cb88d705537fd2ba2326387a6d9e37d49a5a6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 24 Oct 2017 12:53:20 -0400 Subject: [PATCH 49/90] Linking: be a little more relaxed in linking to dependent libs --- src/libcalamaresui/CMakeLists.txt | 3 ++- src/modules/interactiveterminal/CMakeLists.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libcalamaresui/CMakeLists.txt b/src/libcalamaresui/CMakeLists.txt index ccc46f2f3..7c3e8fca2 100644 --- a/src/libcalamaresui/CMakeLists.txt +++ b/src/libcalamaresui/CMakeLists.txt @@ -72,9 +72,10 @@ calamares_add_library( calamaresui EXPORT_MACRO UIDLLEXPORT_PRO LINK_PRIVATE_LIBRARIES ${YAMLCPP_LIBRARY} + ${OPTIONAL_PRIVATE_LIBRARIES} + LINK_LIBRARIES Qt5::Svg Qt5::QuickWidgets - ${OPTIONAL_PRIVATE_LIBRARIES} RESOURCES libcalamaresui.qrc EXPORT CalamaresLibraryDepends VERSION ${CALAMARES_VERSION_SHORT} diff --git a/src/modules/interactiveterminal/CMakeLists.txt b/src/modules/interactiveterminal/CMakeLists.txt index 7b35fae0d..04c5406ce 100644 --- a/src/modules/interactiveterminal/CMakeLists.txt +++ b/src/modules/interactiveterminal/CMakeLists.txt @@ -21,6 +21,7 @@ calamares_add_plugin( interactiveterminal InteractiveTerminalPage.cpp LINK_PRIVATE_LIBRARIES calamaresui + LINK_LIBRARIES KF5::Service KF5::Parts SHARED_LIB From ebb03316729f8f589397ff532c75c1e4797c866d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 24 Oct 2017 12:53:42 -0400 Subject: [PATCH 50/90] CMake: remove unused module --- CMakeModules/IncludeKPMCore.cmake | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 CMakeModules/IncludeKPMCore.cmake diff --git a/CMakeModules/IncludeKPMCore.cmake b/CMakeModules/IncludeKPMCore.cmake deleted file mode 100644 index b06299d91..000000000 --- a/CMakeModules/IncludeKPMCore.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# Shared CMake core for finding KPMCore -# -# This is wrapped into a CMake include file because there's a bunch of -# pre-requisites that need searching for before looking for KPMCore. -# If you just do find_package( KPMCore ) without finding the things -# it links against first, you get CMake errors. -# -# -find_package(ECM 5.10.0 REQUIRED NO_MODULE) -set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH}) - -include(KDEInstallDirs) -include(GenerateExportHeader) -find_package( KF5 REQUIRED CoreAddons ) -find_package( KF5 REQUIRED Config I18n IconThemes KIO Service ) - -find_package( KPMcore 3.0.3 REQUIRED ) From d179a9e3b12083f894aa9e72b944b81df38fc3c1 Mon Sep 17 00:00:00 2001 From: crispg72 Date: Tue, 24 Oct 2017 20:32:15 +0100 Subject: [PATCH 51/90] Tidied up bitness check --- src/modules/bootloader/main.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index ecc305503..7c3684c8c 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -235,10 +235,18 @@ def install_grub(efi_directory, fw_type): # if the kernel is older than 4.0, the UEFI bitness likely isn't # exposed to the userspace so we assume a 64 bit UEFI here efi_bitness = "64" - bitness_translate = {"32": "--target=i386-efi", - "64": "--target=x86_64-efi"} + + if efi_bitness == "32": + efi_target = "i386-efi" + efi_grub_file = "grubia32.efi" + efi_boot_file = "bootia32.efi" + elif efi_bitness == "64": + efi_target = "x86_64-efi" + efi_grub_file = "grubx64.efi" + efi_boot_file = "bootx64.efi" + check_target_env_call([libcalamares.job.configuration["grubInstall"], - bitness_translate[efi_bitness], + "--target=" + efi_target, "--efi-directory=" + efi_directory, "--bootloader-id=" + efi_bootloader_id, "--force"]) @@ -260,19 +268,13 @@ def install_grub(efi_directory, fw_type): os.makedirs(install_efi_boot_directory) # Workaround for some UEFI firmwares - efi_file_source = {"32": os.path.join(install_efi_directory_firmware, - efi_bootloader_id, - "grubia32.efi"), - "64": os.path.join(install_efi_directory_firmware, - efi_bootloader_id, - "grubx64.efi")} + efi_file_source = os.path.join(install_efi_directory_firmware, + efi_bootloader_id, + efi_grub_file), + efi_file_target = os.path.join(install_efi_boot_directory, + efi_boot_file), - 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]) + shutil.copy2(efi_file_source, efi_file_target) else: print("Bootloader: grub (bios)") if libcalamares.globalstorage.value("bootLoader") is None: From 99858242fb75c1a5afb1fda371b12b2633f688bb Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 25 Oct 2017 05:26:04 -0400 Subject: [PATCH 52/90] CI: Replace Jenkins-oriented scripts with Travis-oriented ones --- ci/calamares-coverity.sh | 44 ---------------------------------------- ci/kpmcore-coverity.sh | 30 --------------------------- ci/travis-continuous.sh | 15 ++++++++++++++ ci/travis-coverity.sh | 34 +++++++++++++++++++++++++++++++ ci/travis.sh | 19 +++++++++++++++++ 5 files changed, 68 insertions(+), 74 deletions(-) delete mode 100755 ci/calamares-coverity.sh delete mode 100755 ci/kpmcore-coverity.sh create mode 100755 ci/travis-continuous.sh create mode 100755 ci/travis-coverity.sh create mode 100755 ci/travis.sh diff --git a/ci/calamares-coverity.sh b/ci/calamares-coverity.sh deleted file mode 100755 index c7a6351c5..000000000 --- a/ci/calamares-coverity.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# Make sure we can make git operations from the Calamares Docker+Jenkins environment. -cp ~/jenkins-master/.gitconfig ~ -cp -R ~/jenkins-master/.ssh ~ - -cd "$WORKSPACE" -git config --global http.sslVerify false - -rm -Rf "$WORKSPACE/prefix" -mkdir "$WORKSPACE/prefix" - -git clone git://anongit.kde.org/kpmcore "$WORKSPACE/kpmcore" -cd "$WORKSPACE/kpmcore" -mkdir "$WORKSPACE/kpmcore/build" -cd "$WORKSPACE/kpmcore/build" -cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr .. -nice -n 18 make -j2 -make DESTDIR="$WORKSPACE/prefix" install - -cd "$WORKSPACE" - -wget https://scan.coverity.com/download/cxx/linux64 --no-check-certificate \ - --post-data "token=ll90T04noQ4cORJx_zczKA&project=calamares%2Fcalamares" \ - -O coverity_tool.tar.gz -mkdir "$WORKSPACE/coveritytool" -tar xvf coverity_tool.tar.gz -C "$WORKSPACE/coveritytool" --strip-components 2 -export PATH="$WORKSPACE/coveritytool/bin:$PATH" - -rm -Rf "$WORKSPACE/build" -mkdir "$WORKSPACE/build" -cd "$WORKSPACE/build" - -CMAKE_PREFIX_PATH="$WORKSPACE/prefix/usr" cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr -DWEBVIEW_FORCE_WEBKIT=1 .. -nice -n 18 cov-build --dir cov-int make -j2 - -tar caf calamares-ci.tar.xz cov-int - -curl -k --form token=ll90T04noQ4cORJx_zczKA \ - --form email=teo@kde.org \ - --form file=@calamares-ci.tar.xz \ - --form version="master-`date -u +%Y%m%d`" \ - --form description="master on `date -u`" \ - https://scan.coverity.com/builds?project=calamares%2Fcalamares diff --git a/ci/kpmcore-coverity.sh b/ci/kpmcore-coverity.sh deleted file mode 100755 index 9507fc438..000000000 --- a/ci/kpmcore-coverity.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -#Hack for Coverity build, so the compiler doesn't complain about InheritanceChecker -sudo cp ~/jenkins-master/kpluginfactory.h /usr/include/KF5/KCoreAddons - -cd "$WORKSPACE" -wget https://scan.coverity.com/download/cxx/linux64 --no-check-certificate \ - --post-data "token=cyOjQZx5EOFLdhfo7ZDa4Q&project=KDE+Partition+Manager+Core+Library+-+KPMcore" \ - -O coverity_tool.tar.gz -mkdir "$WORKSPACE/coveritytool" -tar xvf coverity_tool.tar.gz -C "$WORKSPACE/coveritytool" --strip-components 2 -export PATH="$WORKSPACE/coveritytool/bin:$PATH" - -rm -Rf "$WORKSPACE/build" -mkdir "$WORKSPACE/build" -cd "$WORKSPACE/build" - -cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr .. -nice -n 18 cov-build --dir cov-int make -j2 - -tar cavf kpmcore-ci.tar.xz cov-int - -cat cov-int/build-log.txt - -curl -k --form token=cyOjQZx5EOFLdhfo7ZDa4Q \ - --form email=teo@kde.org \ - --form file=@kpmcore-ci.tar.xz \ - --form version="master-`date -u +%Y%m%d`" \ - --form description="master on `date -u`" \ - https://scan.coverity.com/builds?project=KDE+Partition+Manager+Core+Library+-+KPMcore diff --git a/ci/travis-continuous.sh b/ci/travis-continuous.sh new file mode 100755 index 000000000..02994be74 --- /dev/null +++ b/ci/travis-continuous.sh @@ -0,0 +1,15 @@ +#! /bin/sh +# +# Travis CI script for use on every-commit: +# - build and install Calamares +# +test -n "$BUILDDIR" || exit 1 +test -n "$SRCDIR" || exit 1 + +test -d $BUILDDIR || exit 1 +test -d $SRCDIR || exit 1 +test -f $SRCDIR/CMakeLists.txt || exit 1 + +cd $BUILDDIR || exit 1 + +cmake -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON $SRCDIR && make -j2 && make install DESTDIR=/build/INSTALL_ROOT diff --git a/ci/travis-coverity.sh b/ci/travis-coverity.sh new file mode 100755 index 000000000..07da4ce1a --- /dev/null +++ b/ci/travis-coverity.sh @@ -0,0 +1,34 @@ +#! /bin/sh +# +# Travis CI script for weekly (cron) use: +# - use the coverity tool to build and and upload results +# +test -n "$COVERITY_SCAN_TOKEN" || exit 1 +test -n "$BUILDDIR" || exit 1 +test -n "$SRCDIR" || exit 1 + +test -d $BUILDDIR || exit 1 +test -d $SRCDIR || exit 1 +test -f $SRCDIR/CMakeLists.txt || exit 1 + +cd $BUILDDIR || exit 1 + +curl -k -o coverity_tool.tar.gz \ + -d "token=$COVERITY_SCAN_TOKEN&project=calamares%2Fcalamares" \ + https://scan.coverity.com/download/cxx/linux64 || exit 1 +mkdir "$BUILDDIR/coveritytool" +tar xvf coverity_tool.tar.gz -C "$BUILDDIR/coveritytool" --strip-components 2 +export PATH="$BUILDDIR/coveritytool/bin:$PATH" + + +cmake -DCMAKE_BUILD_TYPE=Debug -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON $SRCDIR || exit 1 +cov-build --dir cov-int make -j2 + +tar caf calamares-ci.tar.xz cov-int + +curl -k --form token=$COVERITY_SCAN_TOKEN \ + --form email=groot@kde.org \ + --form file=@calamares-ci.tar.xz \ + --form version="master-`date -u +%Y%m%d`" \ + --form description="master on `date -u`" \ + https://scan.coverity.com/builds?project=calamares%2Fcalamares diff --git a/ci/travis.sh b/ci/travis.sh new file mode 100755 index 000000000..c8ac49f5d --- /dev/null +++ b/ci/travis.sh @@ -0,0 +1,19 @@ +#! /bin/sh +# +# Travis build driver script: +# - the regular CI runs, triggered by commits, run a script that builds +# and installs calamares, and then runs the tests. +# - the cronjob CI runs, triggered weekly, run a script that uses the +# coverity tools to submit a build. This is slightly more resource- +# intensive than the coverity add-on, but works on master. +# +D=`dirname "$0"` +test -d "$D" || exit 1 +test -x "$D/travis-continuous.sh" || exit 1 +test -x "$D/travis-coverity.sh" || exit 1 + +if test "$TRAVIS_EVENT_TYPE" = "cron" ; then + exec "$D/travis-coverity.sh" +else + exec "$D/travis-continuous.sh" +fi From a7ed3147af581faee970fd3ee2e1cd9077bb7d8a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 25 Oct 2017 08:25:48 -0400 Subject: [PATCH 53/90] CI: try to work around build timeouts - started this morning, but also applies now to yesterday's builds when they are restarted. Doesn't seem related to the minor CMake change done today. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cb5b6daaa..f0a3b1bfa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ notifications: - "chat.freenode.net#calamares" install: - - docker build -t calamares . + - travis_wait docker build -t calamares . script: - docker run -v $PWD:/src --tmpfs /build:rw,size=65536k calamares bash -lc "cd /build && cmake -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON /src && make -j2 && make install DESTDIR=/build/INSTALL_ROOT" From 3b30bbde679ce67f6478b537270876f117d19aad Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 25 Oct 2017 08:55:59 -0400 Subject: [PATCH 54/90] Bump version number, pretending 3.1.8-rc1 is pending --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34be91536..fee56b742 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,8 +166,8 @@ 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 7 ) -set( CALAMARES_VERSION_RC 0 ) +set( CALAMARES_VERSION_PATCH 8 ) +set( CALAMARES_VERSION_RC 1 ) set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} ) set( CALAMARES_VERSION_SHORT "${CALAMARES_VERSION}" ) From c2c2793be5b99a3dcf15aeb6ec3adc8f339e0d8a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 25 Oct 2017 08:56:38 -0400 Subject: [PATCH 55/90] [branding] correct documentation of productIcon sizes --- src/branding/default/branding.desc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/branding/default/branding.desc b/src/branding/default/branding.desc index beb236f9b..c3542a9ec 100644 --- a/src/branding/default/branding.desc +++ b/src/branding/default/branding.desc @@ -43,7 +43,7 @@ welcomeExpandingLogo: true # productIcon is used as the window icon, and will (usually) be used # by the window manager to represent the application. This image # should be square, and may be displayed by the window manager -# as small as 32x32 (but possibly larger). +# as small as 16x16 (but possibly larger). # productLogo is used as the logo at the top of the left-hand column # which shows the steps to be taken. The image should be square, # and is displayed at 80x80 pixels (also on HiDPI). From cc6db5b8089f92859ea5823993bd1fd95b5eb14d Mon Sep 17 00:00:00 2001 From: Bezzy1999 Date: Wed, 25 Oct 2017 18:45:58 +0100 Subject: [PATCH 56/90] pep8 --- src/modules/bootloader/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index 7c3684c8c..e64a4c13b 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -269,10 +269,10 @@ def install_grub(efi_directory, fw_type): # Workaround for some UEFI firmwares efi_file_source = os.path.join(install_efi_directory_firmware, - efi_bootloader_id, - efi_grub_file), + efi_bootloader_id, + efi_grub_file), efi_file_target = os.path.join(install_efi_boot_directory, - efi_boot_file), + efi_boot_file), shutil.copy2(efi_file_source, efi_file_target) else: From 17fb91cda5bd7bd3dbf1e9cc8ae345196e7a306b Mon Sep 17 00:00:00 2001 From: Bezzy1999 Date: Wed, 25 Oct 2017 18:47:23 +0100 Subject: [PATCH 57/90] added my name --- src/modules/bootloader/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index e64a4c13b..cb94ae45d 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -13,6 +13,7 @@ # Copyright 2017, Alf Gaida # Copyright 2017, Adriaan de Groot # Copyright 2017, Gabriel Craciunescu +# Copyright 2017, Ben Green # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by From 05a766c3a95a2064b7d31260dfdecfec31ac4496 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 25 Oct 2017 17:28:18 -0400 Subject: [PATCH 58/90] CI: bump timeout some more, against all logic --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f0a3b1bfa..b7e737600 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ notifications: - "chat.freenode.net#calamares" install: - - travis_wait docker build -t calamares . + - travis_wait 30 docker build -t calamares . script: - docker run -v $PWD:/src --tmpfs /build:rw,size=65536k calamares bash -lc "cd /build && cmake -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON /src && make -j2 && make install DESTDIR=/build/INSTALL_ROOT" From 274025d04ef4914fe229f646d64688b4344c2c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 27 Oct 2017 02:28:17 +0100 Subject: [PATCH 59/90] Fix reported partition size. --- src/modules/partition/jobs/ResizePartitionJob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/jobs/ResizePartitionJob.cpp b/src/modules/partition/jobs/ResizePartitionJob.cpp index d3fcb75b4..61e85a999 100644 --- a/src/modules/partition/jobs/ResizePartitionJob.cpp +++ b/src/modules/partition/jobs/ResizePartitionJob.cpp @@ -194,7 +194,7 @@ ResizePartitionJob::prettyDescription() const return tr( "Resize %2MB partition %1 to " "%3MB." ) .arg( partition()->partitionPath() ) - .arg( ( m_oldLastSector - m_oldFirstSector ) * partition()->sectorSize() / 1024 / 1024 ) + .arg( ( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() / 1024 / 1024 ) .arg( ( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() / 1024 / 1024 ); } From a3ab82f475eb5c5dc804c224ea07dd05b6837ee7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 27 Oct 2017 11:20:25 +0200 Subject: [PATCH 60/90] CI: drop silly workarounds now service is restored. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b7e737600..cb5b6daaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ notifications: - "chat.freenode.net#calamares" install: - - travis_wait 30 docker build -t calamares . + - docker build -t calamares . script: - docker run -v $PWD:/src --tmpfs /build:rw,size=65536k calamares bash -lc "cd /build && cmake -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON /src && make -j2 && make install DESTDIR=/build/INSTALL_ROOT" From ff3a40368dffcb7ddc71bc20f4e81a6d71916de7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 27 Oct 2017 11:25:35 +0200 Subject: [PATCH 61/90] CI: defer to Travis driver script --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cb5b6daaa..0885dcd81 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,5 +16,5 @@ install: - docker build -t calamares . script: - - docker run -v $PWD:/src --tmpfs /build:rw,size=65536k calamares bash -lc "cd /build && cmake -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON /src && make -j2 && make install DESTDIR=/build/INSTALL_ROOT" + - docker run -v $PWD:/src --tmpfs /build:rw,size=65536k -e SRCDIR=/src -e BUILDDIR=/build calamares "/src/ci/travis.sh" From fb1522f6caa82de66d8ad692c5bc529f7ba979a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 27 Oct 2017 12:55:09 +0100 Subject: [PATCH 62/90] Use KPMcore Resize Operation. --- src/modules/partition/CMakeLists.txt | 2 - .../partition/jobs/CheckFileSystemJob.cpp | 83 ------ .../partition/jobs/CheckFileSystemJob.h | 38 --- .../partition/jobs/MoveFileSystemJob.cpp | 239 ----------------- .../partition/jobs/MoveFileSystemJob.h | 76 ------ .../partition/jobs/ResizePartitionJob.cpp | 246 ++---------------- .../partition/jobs/ResizePartitionJob.h | 2 - src/modules/partition/tests/CMakeLists.txt | 2 - 8 files changed, 16 insertions(+), 672 deletions(-) delete mode 100644 src/modules/partition/jobs/CheckFileSystemJob.cpp delete mode 100644 src/modules/partition/jobs/CheckFileSystemJob.h delete mode 100644 src/modules/partition/jobs/MoveFileSystemJob.cpp delete mode 100644 src/modules/partition/jobs/MoveFileSystemJob.h diff --git a/src/modules/partition/CMakeLists.txt b/src/modules/partition/CMakeLists.txt index 1ea69c027..3f1493f5d 100644 --- a/src/modules/partition/CMakeLists.txt +++ b/src/modules/partition/CMakeLists.txt @@ -58,7 +58,6 @@ calamares_add_plugin( partition gui/PrettyRadioButton.cpp gui/ScanningDialog.cpp gui/ReplaceWidget.cpp - jobs/CheckFileSystemJob.cpp jobs/ClearMountsJob.cpp jobs/ClearTempMountsJob.cpp jobs/CreatePartitionJob.cpp @@ -66,7 +65,6 @@ calamares_add_plugin( partition jobs/DeletePartitionJob.cpp jobs/FillGlobalStorageJob.cpp jobs/FormatPartitionJob.cpp - jobs/MoveFileSystemJob.cpp jobs/PartitionJob.cpp jobs/ResizePartitionJob.cpp jobs/SetPartitionFlagsJob.cpp diff --git a/src/modules/partition/jobs/CheckFileSystemJob.cpp b/src/modules/partition/jobs/CheckFileSystemJob.cpp deleted file mode 100644 index 3d694f69a..000000000 --- a/src/modules/partition/jobs/CheckFileSystemJob.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014, Aurélien Gâteau - * Copyright 2016, Teo Mrnjavac - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -#include "jobs/CheckFileSystemJob.h" - -#include - -// KPMcore -#include -#include -#include - -#include - -CheckFileSystemJob::CheckFileSystemJob( Partition* partition ) - : PartitionJob( partition ) -{} - -QString -CheckFileSystemJob::prettyName() const -{ - QString path = partition()->partitionPath(); - return tr( "Checking file system on partition %1." ).arg( path ); -} - - -QString -CheckFileSystemJob::prettyStatusMessage() const -{ - return prettyName(); -} - - -Calamares::JobResult -CheckFileSystemJob::exec() -{ - FileSystem& fs = partition()->fileSystem(); - - // if we cannot check, assume everything is fine - if ( fs.supportCheck() != FileSystem::cmdSupportFileSystem ) - return Calamares::JobResult::ok(); - - Report report( nullptr ); - bool ok = fs.check( report, partition()->partitionPath() ); - int retries = 0; - const int MAX_RETRIES = 10; - while ( !ok ) - { - cDebug() << "Partition" << partition()->partitionPath() - << "might not be ready yet, retrying (" << ++retries - << "/" << MAX_RETRIES << ") ..."; - QThread::sleep( 2 /*seconds*/ ); - ok = fs.check( report, partition()->partitionPath() ); - - if ( retries == MAX_RETRIES ) - break; - } - - if ( !ok ) - return Calamares::JobResult::error( - tr( "The file system check on partition %1 failed." ) - .arg( partition()->partitionPath() ), - report.toText() - ); - - return Calamares::JobResult::ok(); -} diff --git a/src/modules/partition/jobs/CheckFileSystemJob.h b/src/modules/partition/jobs/CheckFileSystemJob.h deleted file mode 100644 index 7dba8f493..000000000 --- a/src/modules/partition/jobs/CheckFileSystemJob.h +++ /dev/null @@ -1,38 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014, Aurélien Gâteau - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -#ifndef CHECKFILESYSTEMJOB_H -#define CHECKFILESYSTEMJOB_H - -#include - -/** - * Runs a file system check on an existing partition. - */ -class CheckFileSystemJob : public PartitionJob -{ - Q_OBJECT -public: - CheckFileSystemJob( Partition* partition ); - - QString prettyName() const override; - QString prettyStatusMessage() const override; - Calamares::JobResult exec() override; -}; - -#endif /* CHECKFILESYSTEMJOB_H */ diff --git a/src/modules/partition/jobs/MoveFileSystemJob.cpp b/src/modules/partition/jobs/MoveFileSystemJob.cpp deleted file mode 100644 index fbcc4641c..000000000 --- a/src/modules/partition/jobs/MoveFileSystemJob.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014, Aurélien Gâteau - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -// This class is heavily based on the MoveFileSystemJob class from KDE Partition -// Manager. -// The copyBlock functions come from Partition Manager Job class. -// Original copyright follow: - -/*************************************************************************** - * Copyright (C) 2008 by Volker Lanz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - -#include - -#include - -// KPMcore -#include -#include -#include -#include -#include -#include - -MoveFileSystemJob::MoveFileSystemJob( Device* device, Partition* partition, qint64 oldFirstSector, qint64 newFirstSector, qint64 length ) - : PartitionJob( partition ) - , m_device( device ) - , m_oldFirstSector( oldFirstSector ) - , m_newFirstSector( newFirstSector ) - , m_length( length ) -{} - -QString -MoveFileSystemJob::prettyName() const -{ - return tr( "Move file system of partition %1." ).arg( partition()->partitionPath() ); -} - -Calamares::JobResult -MoveFileSystemJob::exec() -{ - Report report( nullptr ); - QString partitionPath = partition()->partitionPath(); - CopySourceDevice moveSource( *m_device, m_oldFirstSector, m_oldFirstSector + m_length - 1 ); - CopyTargetDevice moveTarget( *m_device, m_newFirstSector, m_newFirstSector + m_length - 1 ); - - if ( !moveSource.open() ) - return Calamares::JobResult::error( - QString(), - tr( "Could not open file system on partition %1 for moving." ).arg( partitionPath ) - ); - - if ( !moveTarget.open() ) - return Calamares::JobResult::error( - QString(), - tr( "Could not create target for moving file system on partition %1." ).arg( partitionPath ) - ); - - bool ok = copyBlocks( report, moveTarget, moveSource ); - if ( !ok ) - { - if ( rollbackCopyBlocks( report, moveTarget, moveSource ) ) - return Calamares::JobResult::error( - QString(), - tr( "Moving of partition %1 failed, changes have been rolled back." ).arg( partitionPath ) - + '\n' + report.toText() - ); - else - return Calamares::JobResult::error( - QString(), - tr( "Moving of partition %1 failed. Roll back of the changes have failed." ).arg( partitionPath ) - + '\n' + report.toText() - ); - } - - FileSystem& fs = partition()->fileSystem(); - fs.setFirstSector( m_newFirstSector ); - fs.setLastSector( m_newFirstSector + m_length - 1 ); - - if ( !fs.updateBootSector( report, partitionPath ) ) - return Calamares::JobResult::error( - QString(), - tr( "Updating boot sector after the moving of partition %1 failed." ).arg( partitionPath ) - + '\n' + report.toText() - ); - - return Calamares::JobResult::ok(); -} - -bool -MoveFileSystemJob::copyBlocks( Report& report, CopyTargetDevice& target, CopySourceDevice& source ) -{ - /** @todo copyBlocks() assumes that source.sectorSize() == target.sectorSize(). */ - - if ( source.sectorSize() != target.sectorSize() ) - { - report.line() << tr( "The logical sector sizes in the source and target for copying are not the same. This is currently unsupported." ); - return false; - } - - bool rval = true; - const qint64 blockSize = 16065 * 8; // number of sectors per block to copy - const qint64 blocksToCopy = source.length() / blockSize; - - qint64 readOffset = source.firstSector(); - qint64 writeOffset = target.firstSector(); - qint32 copyDir = 1; - - if ( target.firstSector() > source.firstSector() ) - { - readOffset = source.firstSector() + source.length() - blockSize; - writeOffset = target.firstSector() + source.length() - blockSize; - copyDir = -1; - } - - qint64 blocksCopied = 0; - - Q_ASSERT( blockSize > 0 ); - Q_ASSERT( source.sectorSize() > 0 ); - Q_ASSERT( blockSize * source.sectorSize() > 0 ); - - void* buffer = malloc( size_t( blockSize * source.sectorSize() ) ); - qint64 percent = 0; - - while ( blocksCopied < blocksToCopy ) - { - rval = source.readSectors( buffer, readOffset + blockSize * blocksCopied * copyDir, blockSize ); - if ( !rval ) - break; - - rval = target.writeSectors( buffer, writeOffset + blockSize * blocksCopied * copyDir, blockSize ); - if ( !rval ) - break; - - if ( ++blocksCopied * 100 / blocksToCopy != percent ) - { - percent = blocksCopied * 100 / blocksToCopy; - progress( percent / 100. ); - } - } - - const qint64 lastBlock = source.length() % blockSize; - - // copy the remainder - if ( rval && lastBlock > 0 ) - { - Q_ASSERT( lastBlock < blockSize ); - - const qint64 lastBlockReadOffset = copyDir > 0 ? readOffset + blockSize * blocksCopied : source.firstSector(); - const qint64 lastBlockWriteOffset = copyDir > 0 ? writeOffset + blockSize * blocksCopied : target.firstSector(); - - rval = source.readSectors( buffer, lastBlockReadOffset, lastBlock ); - - if ( rval ) - rval = target.writeSectors( buffer, lastBlockWriteOffset, lastBlock ); - - if ( rval ) - emit progress( 1.0 ); - } - - free( buffer ); - - return rval; -} - -bool -MoveFileSystemJob::rollbackCopyBlocks( Report& report, CopyTargetDevice& origTarget, CopySourceDevice& origSource ) -{ - if ( !origSource.overlaps( origTarget ) ) - { - report.line() << tr( "Source and target for copying do not overlap: Rollback is not required." ); - return true; - } - - // default: use values as if we were copying from front to back. - qint64 undoSourceFirstSector = origTarget.firstSector(); - qint64 undoSourceLastSector = origTarget.firstSector() + origTarget.sectorsWritten() - 1; - - qint64 undoTargetFirstSector = origSource.firstSector(); - qint64 undoTargetLastSector = origSource.firstSector() + origTarget.sectorsWritten() - 1; - - if ( origTarget.firstSector() > origSource.firstSector() ) - { - // we were copying from back to front - undoSourceFirstSector = origTarget.firstSector() + origSource.length() - origTarget.sectorsWritten(); - undoSourceLastSector = origTarget.firstSector() + origSource.length() - 1; - - undoTargetFirstSector = origSource.lastSector() - origTarget.sectorsWritten() + 1; - undoTargetLastSector = origSource.lastSector(); - } - - CopySourceDevice undoSource( origTarget.device(), undoSourceFirstSector, undoSourceLastSector ); - if ( !undoSource.open() ) - { - report.line() << tr( "Could not open device %1 to rollback copying." ) - .arg( origTarget.device().deviceNode() ); - return false; - } - - CopyTargetDevice undoTarget( origSource.device(), undoTargetFirstSector, undoTargetLastSector ); - if ( !undoTarget.open() ) - { - report.line() << tr( "Could not open device %1 to rollback copying." ) - .arg( origSource.device().deviceNode() ); - return false; - } - - return copyBlocks( report, undoTarget, undoSource ); -} diff --git a/src/modules/partition/jobs/MoveFileSystemJob.h b/src/modules/partition/jobs/MoveFileSystemJob.h deleted file mode 100644 index f2ae6d741..000000000 --- a/src/modules/partition/jobs/MoveFileSystemJob.h +++ /dev/null @@ -1,76 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014, Aurélien Gâteau - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -// This class is heavily based on the MoveFileSystemJob class from KDE Partition -// Manager. Original copyright follow: - -/*************************************************************************** - * Copyright (C) 2008 by Volker Lanz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ -#ifndef MOVEFILESYSTEMJOB_H -#define MOVEFILESYSTEMJOB_H - -#include - -class CopySourceDevice; -class CopyTargetDevice; -class Device; -class Partition; -class Report; - -/** - * This job moves the data of a filesystem from one position on the disk to - * another. - * - * It is used by the ResizePartitionJob. - */ -class MoveFileSystemJob : public PartitionJob -{ - Q_OBJECT -public: - MoveFileSystemJob( Device* device, Partition* partition, qint64 oldFirstSector, qint64 newFirstSector, qint64 length ); - - QString prettyName() const override; - - Calamares::JobResult exec() override; - -private: - Device* m_device; - qint64 m_oldFirstSector; - qint64 m_newFirstSector; - qint64 m_length; - bool copyBlocks( Report& report, CopyTargetDevice& target, CopySourceDevice& source ); - bool rollbackCopyBlocks( Report& report, CopyTargetDevice& origTarget, CopySourceDevice& origSource ); -}; - -#endif /* MOVEFILESYSTEMJOB_H */ diff --git a/src/modules/partition/jobs/ResizePartitionJob.cpp b/src/modules/partition/jobs/ResizePartitionJob.cpp index 61e85a999..41950d4df 100644 --- a/src/modules/partition/jobs/ResizePartitionJob.cpp +++ b/src/modules/partition/jobs/ResizePartitionJob.cpp @@ -2,6 +2,7 @@ * * Copyright 2014, Aurélien Gâteau * Copyright 2015, Teo Mrnjavac + * Copyright 2017, Andrius Štikonas * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,156 +18,12 @@ * along with Calamares. If not, see . */ -// This class is heavily based on the ResizeOperation class from KDE Partition -// Manager. Original copyright follow: - -/*************************************************************************** - * Copyright (C) 2008,2012 by Volker Lanz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - #include "jobs/ResizePartitionJob.h" -#include "jobs/CheckFileSystemJob.h" -#include "jobs/MoveFileSystemJob.h" -#include "utils/Logger.h" - // KPMcore -#include -#include -#include -#include -#include -#include -#include -#include - -// Qt -#include - -//- ResizeFileSystemJob -------------------------------------------------------- -class ResizeFileSystemJob : public Calamares::Job -{ - Q_OBJECT -public: - ResizeFileSystemJob( Device* device, CoreBackendPartitionTable* backendPartitionTable, Partition* partition, qint64 length ) - : m_device( device ) - , m_backendPartitionTable( backendPartitionTable ) - , m_partition( partition ) - , m_length( length ) - {} - - QString prettyName() const override - { - QString path = m_partition->partitionPath(); - return tr( "Resize file system on partition %1." ).arg( path ); - } - - Calamares::JobResult exec() override - { - Report report( nullptr ); - FileSystem& fs = m_partition->fileSystem(); - FileSystem::CommandSupportType support = m_length < fs.length() ? fs.supportShrink() : fs.supportGrow(); - - switch ( support ) - { - case FileSystem::cmdSupportBackend: - if ( !backendResize( &report ) ) - return Calamares::JobResult::error( - QString(), - tr( "Parted failed to resize filesystem." ) + '\n' + report.toText() - ); - break; - case FileSystem::cmdSupportFileSystem: - { - qint64 byteLength = m_device->logicalSize() * m_length; - bool ok = fs.resize( report, m_partition->partitionPath(), byteLength ); - if ( !ok ) - return Calamares::JobResult::error( - QString(), - tr( "Failed to resize filesystem." ) + '\n' + report.toText() - ); - break; - } - default: - break; - } - - fs.setLastSector( fs.firstSector() + m_length - 1 ); - return Calamares::JobResult::ok(); - } - -private: - Device* m_device; - CoreBackendPartitionTable* m_backendPartitionTable; - Partition* m_partition; - qint64 m_length; - - bool backendResize( Report* report ) - { - bool ok = m_backendPartitionTable->resizeFileSystem( *report, *m_partition, m_length ); - if ( !ok ) - return false; - m_backendPartitionTable->commit(); - return true; - } -}; - -//- SetPartGeometryJob --------------------------------------------------------- -class SetPartGeometryJob : public Calamares::Job -{ - Q_OBJECT -public: - SetPartGeometryJob( CoreBackendPartitionTable* backendPartitionTable, Partition* partition, qint64 firstSector, qint64 length ) - : m_backendPartitionTable( backendPartitionTable ) - , m_partition( partition ) - , m_firstSector( firstSector ) - , m_length( length ) - {} - - QString prettyName() const override - { - QString path = m_partition->partitionPath(); - return tr( "Update geometry of partition %1." ).arg( path ); - } - - Calamares::JobResult exec() override - { - Report report( nullptr ); - qint64 lastSector = m_firstSector + m_length - 1; - bool ok = m_backendPartitionTable->updateGeometry( report, *m_partition, m_firstSector, lastSector ); - if ( !ok ) - { - return Calamares::JobResult::error( - QString(), - tr( "Failed to change the geometry of the partition." ) + '\n' + report.toText() ); - } - m_partition->setFirstSector( m_firstSector ); - m_partition->setLastSector( lastSector ); - m_backendPartitionTable->commit(); - return Calamares::JobResult::ok(); - } - -private: - CoreBackendPartitionTable* m_backendPartitionTable; - Partition* m_partition; - qint64 m_firstSector; - qint64 m_length; -}; +#include +#include +#include //- ResizePartitionJob --------------------------------------------------------- ResizePartitionJob::ResizePartitionJob( Device* device, Partition* partition, qint64 firstSector, qint64 lastSector ) @@ -205,7 +62,7 @@ ResizePartitionJob::prettyStatusMessage() const return tr( "Resizing %2MB partition %1 to " "%3MB." ) .arg( partition()->partitionPath() ) - .arg( ( m_oldLastSector - m_oldFirstSector ) * partition()->sectorSize() / 1024 / 1024 ) + .arg( ( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() / 1024 / 1024 ) .arg( ( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() / 1024 / 1024 ); } @@ -213,64 +70,21 @@ ResizePartitionJob::prettyStatusMessage() const Calamares::JobResult ResizePartitionJob::exec() { - qint64 oldLength = m_oldLastSector - m_oldFirstSector + 1; - qint64 newLength = m_newLastSector - m_newFirstSector + 1; - - // Assuming updatePreview() has been called, `partition` uses its new - // position and size. Reset it to the old values: part of the libparted - // backend relies on this (for example: - // LibPartedPartitionTable::updateGeometry()) - // The jobs are responsible for updating the partition back when they are - // done. + Report report (nullptr); + // Restore partition sectors that were modified for preview m_partition->setFirstSector( m_oldFirstSector ); m_partition->setLastSector( m_oldLastSector ); + ResizeOperation op(*m_device, *m_partition, m_newFirstSector, m_newLastSector); + op.setStatus(Operation::StatusRunning); + connect(&op, &Operation::progress, [&](int percent) { emit progress(percent / 100.0); } ); - CoreBackend* backend = CoreBackendManager::self()->backend(); - QScopedPointer backendDevice( backend->openDevice( m_device->deviceNode() ) ); - if ( !backendDevice.data() ) - { - QString errorMessage = tr( "The installer failed to resize partition %1 on disk '%2'." ) - .arg( m_partition->partitionPath() ) - .arg( m_device->name() ); - return Calamares::JobResult::error( - errorMessage, - tr( "Could not open device '%1'." ).arg( m_device->deviceNode() ) - ); - } - QScopedPointer backendPartitionTable( backendDevice->openPartitionTable() ); + QString errorMessage = tr( "The installer failed to resize partition %1 on disk '%2'." ) + .arg( m_partition->partitionPath() ) + .arg( m_device->name() ); + if (op.execute(report)) + return Calamares::JobResult::ok(); - // Create jobs - QList< Calamares::job_ptr > jobs; - jobs << Calamares::job_ptr( new CheckFileSystemJob( partition() ) ); - if ( m_partition->roles().has( PartitionRole::Extended ) ) - jobs << Calamares::job_ptr( new SetPartGeometryJob( backendPartitionTable.data(), m_partition, m_newFirstSector, newLength ) ); - else - { - bool shrink = newLength < oldLength; - bool grow = newLength > oldLength; - bool moveRight = m_newFirstSector > m_oldFirstSector; - bool moveLeft = m_newFirstSector < m_oldFirstSector; - if ( shrink ) - { - jobs << Calamares::job_ptr( new ResizeFileSystemJob( m_device, backendPartitionTable.data(), m_partition, newLength ) ); - jobs << Calamares::job_ptr( new SetPartGeometryJob( backendPartitionTable.data(), m_partition, m_oldFirstSector, newLength ) ); - } - if ( moveRight || moveLeft ) - { - // At this point, we need to set the partition's length to either the resized length, if it has already been - // shrunk, or to the original length (it may or may not then later be grown, we don't care here) - const qint64 length = shrink ? newLength : oldLength; - jobs << Calamares::job_ptr( new SetPartGeometryJob( backendPartitionTable.data(), m_partition, m_newFirstSector, length ) ); - jobs << Calamares::job_ptr( new MoveFileSystemJob( m_device, m_partition, m_oldFirstSector, m_newFirstSector, length ) ); - } - if ( grow ) - { - jobs << Calamares::job_ptr( new SetPartGeometryJob( backendPartitionTable.data(), m_partition, m_newFirstSector, newLength ) ); - jobs << Calamares::job_ptr( new ResizeFileSystemJob( m_device, backendPartitionTable.data(), m_partition, newLength ) ); - } - } - jobs << Calamares::job_ptr( new CheckFileSystemJob( partition() ) ); - return execJobList( jobs ); + return Calamares::JobResult::error(errorMessage, report.toText()); } void @@ -290,31 +104,3 @@ ResizePartitionJob::device() const { return m_device; } - - -Calamares::JobResult -ResizePartitionJob::execJobList( const QList< Calamares::job_ptr >& jobs ) -{ - QString errorMessage = tr( "The installer failed to resize partition %1 on disk '%2'." ) - .arg( m_partition->partitionPath() ) - .arg( m_device->name() ); - - int nbJobs = jobs.size(); - int count = 0; - for ( Calamares::job_ptr job : jobs ) - { - cLog() << "- " + job->prettyName(); - Calamares::JobResult result = job->exec(); - if ( !result ) - { - if ( result.message().isEmpty() ) - result.setMessage( errorMessage ); - return result; - } - ++count; - progress( qreal( count ) / nbJobs ); - } - return Calamares::JobResult::ok(); -} - -#include "ResizePartitionJob.moc" diff --git a/src/modules/partition/jobs/ResizePartitionJob.h b/src/modules/partition/jobs/ResizePartitionJob.h index 9ae31130f..453461d8d 100644 --- a/src/modules/partition/jobs/ResizePartitionJob.h +++ b/src/modules/partition/jobs/ResizePartitionJob.h @@ -51,8 +51,6 @@ private: qint64 m_oldLastSector; qint64 m_newFirstSector; qint64 m_newLastSector; - - Calamares::JobResult execJobList( const QList< Calamares::job_ptr >& jobs ); }; #endif /* RESIZEPARTITIONJOB_H */ diff --git a/src/modules/partition/tests/CMakeLists.txt b/src/modules/partition/tests/CMakeLists.txt index 1917a226b..41f494ba2 100644 --- a/src/modules/partition/tests/CMakeLists.txt +++ b/src/modules/partition/tests/CMakeLists.txt @@ -9,11 +9,9 @@ set( partitionjobtests_SRCS ${PartitionModule_SOURCE_DIR}/core/KPMHelpers.cpp ${PartitionModule_SOURCE_DIR}/core/PartitionInfo.cpp ${PartitionModule_SOURCE_DIR}/core/PartitionIterator.cpp - ${PartitionModule_SOURCE_DIR}/jobs/CheckFileSystemJob.cpp ${PartitionModule_SOURCE_DIR}/jobs/CreatePartitionJob.cpp ${PartitionModule_SOURCE_DIR}/jobs/CreatePartitionTableJob.cpp ${PartitionModule_SOURCE_DIR}/jobs/DeletePartitionJob.cpp - ${PartitionModule_SOURCE_DIR}/jobs/MoveFileSystemJob.cpp ${PartitionModule_SOURCE_DIR}/jobs/PartitionJob.cpp ${PartitionModule_SOURCE_DIR}/jobs/ResizePartitionJob.cpp PartitionJobTests.cpp From d2ea83a0b2157be9db016c70c779448bead4bacd Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Sat, 28 Oct 2017 02:18:36 +0200 Subject: [PATCH 63/90] NetInstallPage.cpp: fix displaying for Name and Description - fixes 1d7ad9e0450d0d069b1496de0c412baab7f7fa96 which sets both header's labels to 0 so 'Name' was always overridden by Description and Description never displayed --- src/modules/netinstall/NetInstallPage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 7bfda320c..030537732 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -3,6 +3,7 @@ * Copyright 2016, Lisa Vitolo * Copyright 2017, Kyle Robbertze * Copyright 2017, Adriaan de Groot + * Copyright 2017, Gabriel Craciunescu * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -77,7 +78,7 @@ NetInstallPage::readGroups( const QByteArray& yamlData ) m_groups = new PackageModel( groups ); CALAMARES_RETRANSLATE( m_groups->setHeaderData( 0, Qt::Horizontal, tr( "Name" ) ); - m_groups->setHeaderData( 0, Qt::Horizontal, tr( "Description" ) ); ) + m_groups->setHeaderData( 1, Qt::Horizontal, tr( "Description" ) ); ) return true; } From b15d97084591f3845a352c158177db6a36be1d33 Mon Sep 17 00:00:00 2001 From: Philip Date: Sat, 28 Oct 2017 03:41:29 -0400 Subject: [PATCH 64/90] [bootloader] fix regression introduced with d179a9e - see also #840 --- src/modules/bootloader/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index cb94ae45d..1759f4500 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -271,9 +271,9 @@ def install_grub(efi_directory, fw_type): # Workaround for some UEFI firmwares efi_file_source = os.path.join(install_efi_directory_firmware, efi_bootloader_id, - efi_grub_file), + efi_grub_file) efi_file_target = os.path.join(install_efi_boot_directory, - efi_boot_file), + efi_boot_file) shutil.copy2(efi_file_source, efi_file_target) else: From a138eb501c37373d6e99f5ce32a7a17bcce1e06e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 30 Oct 2017 06:33:54 -0400 Subject: [PATCH 65/90] Coverity: fix issues reported in QJsonModel - Also reported upstream, in the MIT-licensed version of same. This is a re-hash of b348a458340f59372ba9fa79d8282543246af648, adding memory-leak prevention when load() is called. --- src/libcalamaresui/utils/qjsonitem.cpp | 6 ++---- src/libcalamaresui/utils/qjsonmodel.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/libcalamaresui/utils/qjsonitem.cpp b/src/libcalamaresui/utils/qjsonitem.cpp index 24494f0fd..cdc4b3b13 100644 --- a/src/libcalamaresui/utils/qjsonitem.cpp +++ b/src/libcalamaresui/utils/qjsonitem.cpp @@ -26,11 +26,9 @@ #include "qjsonitem.h" QJsonTreeItem::QJsonTreeItem(QJsonTreeItem *parent) + : mParent( parent ) + , mType( QJsonValue::Type::Null ) { - - mParent = parent; - - } QJsonTreeItem::~QJsonTreeItem() diff --git a/src/libcalamaresui/utils/qjsonmodel.cpp b/src/libcalamaresui/utils/qjsonmodel.cpp index 5ce0cd695..4238bfd6b 100644 --- a/src/libcalamaresui/utils/qjsonmodel.cpp +++ b/src/libcalamaresui/utils/qjsonmodel.cpp @@ -33,14 +33,19 @@ QJsonModel::QJsonModel(QObject *parent) : QAbstractItemModel(parent) + , mRootItem( new QJsonTreeItem ) { - mRootItem = new QJsonTreeItem; mHeaders.append("key"); mHeaders.append("value"); } +QJsonModel::~QJsonModel() +{ + delete mRootItem; +} + bool QJsonModel::load(const QString &fileName) { QFile file(fileName); @@ -66,6 +71,7 @@ bool QJsonModel::loadJson(const QByteArray &json) if (!mDocument.isNull()) { beginResetModel(); + delete mRootItem; if (mDocument.isArray()) { mRootItem = QJsonTreeItem::load(QJsonValue(mDocument.array())); } else { From e09f179d76fd3375357d39843e6642030cbd9797 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 30 Oct 2017 08:43:09 -0400 Subject: [PATCH 66/90] Coverity: repair previous commit --- src/libcalamaresui/utils/qjsonmodel.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcalamaresui/utils/qjsonmodel.h b/src/libcalamaresui/utils/qjsonmodel.h index 6a2399287..0d1b3232d 100644 --- a/src/libcalamaresui/utils/qjsonmodel.h +++ b/src/libcalamaresui/utils/qjsonmodel.h @@ -17,6 +17,7 @@ class QJsonModel : public QAbstractItemModel Q_OBJECT public: explicit QJsonModel(QObject *parent = 0); + ~QJsonModel(); bool load(const QString& fileName); bool load(QIODevice * device); bool loadJson(const QByteArray& json); From 5474dc6d2b1bbe947b71a503253646fb637c9248 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 30 Oct 2017 11:28:47 -0400 Subject: [PATCH 67/90] [partition] allow KPMcore 3.0.2 (with warning) --- src/modules/partition/CMakeLists.txt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/CMakeLists.txt b/src/modules/partition/CMakeLists.txt index 3f1493f5d..ee96c4275 100644 --- a/src/modules/partition/CMakeLists.txt +++ b/src/modules/partition/CMakeLists.txt @@ -9,10 +9,22 @@ find_package( KF5 REQUIRED CoreAddons ) find_package( KF5 REQUIRED Config I18n IconThemes KIO Service ) find_package( KPMcore 3.1.50 QUIET ) -if ( ${KPMcore_FOUND} ) +if ( KPMcore_FOUND ) add_definitions(-DWITH_KPMCORE22) endif() -find_package( KPMcore 3.0.3 REQUIRED ) +find_package( KPMcore 3.0.3 QUIET ) +# 3.0.3 and newer has fixes for NVMe support; allow 3.0.2, but warn +# about it .. needs to use a different feature name because it otherwise +# gets reported as KPMcore (the package). +if ( KPMcore_FOUND ) + message( STATUS "KPMCore supports NVMe operations" ) + add_feature_info( KPMcoreNVMe KPMcore_FOUND "KPMcore with NVMe support" ) +else() + find_package( KPMcore 3.0.2 REQUIRED ) + message( WARNING "KPMCore 3.0.2 is known to have bugs with NVMe devices" ) + add_feature_info( KPMcoreNVMe KPMcore_FOUND "Older KPMcore with no NVMe support" ) +endif() + find_library( atasmart_LIB atasmart ) find_library( blkid_LIB blkid ) if( NOT atasmart_LIB ) From 4ea8b2e6efe698cb6c4f22aef0775cf1f822467e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 30 Oct 2017 11:43:14 -0400 Subject: [PATCH 68/90] CMake: report on the example-distro feature correctly --- CMakeLists.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fee56b742..991343614 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -267,12 +267,9 @@ else() endif() # Doesn't list mksquashfs as an optional dep, though, because it # hasn't been sent through the find_package() scheme. -set_package_properties( mksquashfs PROPERTIES - DESCRIPTION "Create squashed filesystems" - URL "http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html" - PURPOSE "Create example distro" - TYPE OPTIONAL -) +# +# "http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html" +add_feature_info( ExampleDistro ${mksquashfs_FOUND} "Create example-distro target.") # add_subdirectory( thirdparty ) add_subdirectory( src ) From 2e80ab98d72d7752f0aabc02eae1ffc8ab49be85 Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 18:49:03 +0100 Subject: [PATCH 69/90] locale.conf: explain what all the settings are about --- src/modules/locale/locale.conf | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/modules/locale/locale.conf b/src/modules/locale/locale.conf index 824c8abeb..fd8e2ba04 100644 --- a/src/modules/locale/locale.conf +++ b/src/modules/locale/locale.conf @@ -1,7 +1,28 @@ --- +# This settings are used to set your default system time zone. +# Time zones are usually located under /usr/share/zoneinfo and +# provided by the 'tzdata' package of your Distribution. +# +# Distributions using systemd can list available +# time zones by using the timedatectl command. +# timedatectl list-timezones region: "America" zone: "New_York" -# GeoIP settings. Leave commented out to disable GeoIP. -#localeGenPath: "/etc/locale.gen" + +# System locales are detected in the following order: +# +# /usr/share/i18n/SUPPORTED +# localeGenPath ( when set ) +# /etc/locale.gen +# 'locale -a' output +# Enable only when your Distribution is using an +# custom path for locale.gen +#localeGenPath: "PATH_TO/locale.gen" + +# GeoIP based Language settings: +# GeoIP need an working Internet connecion. +# This can be managed from welcome.conf by adding +# internet to the list of required conditions. +# Leave commented out to disable GeoIP. #geoipUrl: "freegeoip.net" From fc53438be973591a433bdaf48442ed3e5f0d08bb Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 19:21:51 +0100 Subject: [PATCH 70/90] locale.conf: fix localeGenPath comment --- src/modules/locale/locale.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/locale/locale.conf b/src/modules/locale/locale.conf index fd8e2ba04..fdff51721 100644 --- a/src/modules/locale/locale.conf +++ b/src/modules/locale/locale.conf @@ -13,8 +13,7 @@ zone: "New_York" # System locales are detected in the following order: # # /usr/share/i18n/SUPPORTED -# localeGenPath ( when set ) -# /etc/locale.gen +# localeGenPath (defaults to /etc/locale.gen if not set) # 'locale -a' output # Enable only when your Distribution is using an # custom path for locale.gen From 71da7b3a48d2e5d9493c636c3a54fd63e2754787 Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 20:11:11 +0100 Subject: [PATCH 71/90] RequirementsChecker.cpp: rearrange cDebug() output --- src/modules/welcome/checker/RequirementsChecker.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/modules/welcome/checker/RequirementsChecker.cpp b/src/modules/welcome/checker/RequirementsChecker.cpp index 3d4e394c4..654434513 100644 --- a/src/modules/welcome/checker/RequirementsChecker.cpp +++ b/src/modules/welcome/checker/RequirementsChecker.cpp @@ -2,6 +2,7 @@ * * Copyright 2014-2017, Teo Mrnjavac * Copyright 2017, Adriaan de Groot + * Copyright 2017, Gabriel Craciunescu * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -99,8 +100,12 @@ RequirementsChecker::RequirementsChecker( QObject* parent ) if ( m_entriesToCheck.contains( "root" ) ) isRoot = checkIsRoot(); - cDebug() << "enoughStorage, enoughRam, hasPower, hasInternet, isRoot: " - << enoughStorage << enoughRam << hasPower << hasInternet << isRoot; + cDebug() << "RequirementsChecker output:" + << " enoughStorage:" << enoughStorage + << " enoughRam:" << enoughRam + << " hasPower:" << hasPower + << " hasInternet:" << hasInternet + << " isRoot:" << isRoot; QList< PrepareEntry > checkEntries; foreach ( const QString& entry, m_entriesToCheck ) From 3749beb4e52297c6be57e67641a8a2c75a73eb41 Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 20:44:51 +0100 Subject: [PATCH 72/90] modules/users: warn when fallback groups is used - Warn here since it may not be what the Distributor want. Having wrong groups may result in broken permissions for created user. - explain what defaultGroups is for in users.conf --- src/modules/users/UsersViewStep.cpp | 2 ++ src/modules/users/users.conf | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/modules/users/UsersViewStep.cpp b/src/modules/users/UsersViewStep.cpp index 73dc98ddc..34c6614f8 100644 --- a/src/modules/users/UsersViewStep.cpp +++ b/src/modules/users/UsersViewStep.cpp @@ -2,6 +2,7 @@ * * Copyright 2014-2015, Teo Mrnjavac * Copyright 2017, Adriaan de Groot + * Copyright 2017, Gabriel Craciunescu * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -131,6 +132,7 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap ) } else { + cDebug() << "WARNING: Using fallback groups. Please check defaultGroups in users.conf"; m_defaultGroups = QStringList{ "lp", "video", "network", "storage", "wheel", "audio" }; } diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index d5466c62f..5e62015a0 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -11,6 +11,8 @@ # These globalconfig keys are set when the jobs for this module # are created. --- +# Used as default groups for the created user. +# Adjust to your Distribution defaults. defaultGroups: - users - lp @@ -19,6 +21,7 @@ defaultGroups: - storage - wheel - audio + autologinGroup: autologin doAutologin: true From 599f9d48ae4e27a0c576be7733fa896926233063 Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 23:20:43 +0100 Subject: [PATCH 73/90] users.conf: document some things --- src/modules/users/users.conf | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index 5e62015a0..41acbc3a4 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -22,13 +22,26 @@ defaultGroups: - wheel - audio +# Some Distributions require a 'autologin' group for the user. +# Autologin causes a user to become automatically logged in to +# the desktop environment on boot. +# Disable when your Distribution does not require such a group. autologinGroup: autologin +# You can control the initial state for the 'autologin checkbox' in UsersViewStep here. +# Possible values are: true to enable or false to disable the checkbox by default doAutologin: true -# remove the following line to avoid creating /etc/sudoers.d/10-installer +# When enabled calamares creates a sudoers file for the user. +# /etc/sudoers.d/10-installer +# Remember to add sudoersGroup to defaultGroups. sudoersGroup: wheel +# Setting this to false , causes the root account to be disabled. setRootPassword: true +# You can control the initial state for the 'root password checkbox' in UsersViewStep here. +# Possible values are: true to enable or false to disable the checkbox by default. +# When enabled the user password is used for the root account too. +# NOTE: doReusePassword requires setRootPassword to be enabled. doReusePassword: true # These are optional password-requirements that a distro can enforce From 477a9855f6cf02058525c93030400f59aab34b2d Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Tue, 31 Oct 2017 13:09:34 +0100 Subject: [PATCH 74/90] users.conf: made requested changes --- src/modules/users/users.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index 41acbc3a4..1f62fc1e5 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -31,9 +31,14 @@ autologinGroup: autologin # Possible values are: true to enable or false to disable the checkbox by default doAutologin: true -# When enabled calamares creates a sudoers file for the user. +# When set to a non-empty string, Calamares creates a sudoers file for the user. # /etc/sudoers.d/10-installer # Remember to add sudoersGroup to defaultGroups. +# +# If your Distribution already sets up a group of sudoers in its packaging, +# remove this setting (delete or comment out the line below). Otherwise, +# the setting will be duplicated in the /etc/sudoers.d/10-installer file, +# potentially confusing users. sudoersGroup: wheel # Setting this to false , causes the root account to be disabled. From d2c91dedf3e2f226b1fd6faaae0f6759588c2a9c Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sat, 28 Oct 2017 01:43:48 -0400 Subject: [PATCH 75/90] add kate temp files to gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 26e8ff869..d67fee190 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,6 @@ CMakeLists.txt.user # Backup files *~ + +# Kate +*.kate-swp From 35f5612ec1d2fa27235ad5a1d621e82e8c5a82ec Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 1 Nov 2017 11:07:18 +0100 Subject: [PATCH 76/90] [locale] Fix GeoIP (reported by demm, crazy) - data has already been read, don't try to read more from the QNM reply - regression introduced in 7e25909e --- src/modules/locale/LocaleViewStep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index 4b4219751..73efc266f 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -120,7 +120,7 @@ LocaleViewStep::fetchGeoIpTimezone() try { - YAML::Node doc = YAML::Load( reply->readAll() ); + YAML::Node doc = YAML::Load( data ); QVariant var = CalamaresUtils::yamlToVariant( doc ); if ( !var.isNull() && From eed207ae2e7417abb073e9c952197e4b8470febf Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 2 Nov 2017 12:38:36 +0100 Subject: [PATCH 77/90] CMake: ensure configuration-test can #include yamlcpp headers --- src/modules/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index d48ecd29f..680a9c12c 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -3,6 +3,7 @@ include( CMakeColors ) if( BUILD_TESTING ) add_executable( test_conf test_conf.cpp ) target_link_libraries( test_conf ${YAMLCPP_LIBRARY} ) + target_include_directories( test_conf PUBLIC ${YAMLCPP_INCLUDE_DIR} ) endif() file( GLOB SUBDIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*" ) From 2d31e987c0607b99412aa7935ed7438ead86fb29 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 3 Nov 2017 10:10:37 -0400 Subject: [PATCH 78/90] [libcalamaresui] Unrelated typedef for JobList --- src/libcalamares/JobQueue.cpp | 6 +++--- src/libcalamares/JobQueue.h | 6 +++--- src/libcalamares/Typedefs.h | 2 ++ src/libcalamaresui/ExecutionViewStep.cpp | 4 ++-- src/libcalamaresui/ExecutionViewStep.h | 2 +- src/libcalamaresui/modulesystem/CppJobModule.cpp | 4 ++-- src/libcalamaresui/modulesystem/CppJobModule.h | 2 +- src/libcalamaresui/modulesystem/Module.h | 4 ++-- src/libcalamaresui/modulesystem/ProcessJobModule.cpp | 4 ++-- src/libcalamaresui/modulesystem/ProcessJobModule.h | 2 +- src/libcalamaresui/modulesystem/PythonJobModule.cpp | 4 ++-- src/libcalamaresui/modulesystem/PythonJobModule.h | 2 +- src/libcalamaresui/modulesystem/PythonQtViewModule.cpp | 2 +- src/libcalamaresui/modulesystem/PythonQtViewModule.h | 2 +- src/libcalamaresui/modulesystem/ViewModule.cpp | 2 +- src/libcalamaresui/modulesystem/ViewModule.h | 2 +- src/libcalamaresui/utils/DebugWindow.cpp | 2 +- src/libcalamaresui/viewpages/PythonQtViewStep.cpp | 4 ++-- src/libcalamaresui/viewpages/PythonQtViewStep.h | 2 +- src/libcalamaresui/viewpages/ViewStep.h | 2 +- 20 files changed, 31 insertions(+), 29 deletions(-) diff --git a/src/libcalamares/JobQueue.cpp b/src/libcalamares/JobQueue.cpp index a1badcf86..86e33a0cd 100644 --- a/src/libcalamares/JobQueue.cpp +++ b/src/libcalamares/JobQueue.cpp @@ -46,7 +46,7 @@ public: #endif } - void setJobs( const QList< job_ptr >& jobs ) + void setJobs( const JobList& jobs ) { m_jobs = jobs; } @@ -73,7 +73,7 @@ public: } private: - QList< job_ptr > m_jobs; + JobList m_jobs; JobQueue* m_queue; int m_jobIndex; @@ -164,7 +164,7 @@ JobQueue::enqueue( const job_ptr& job ) void -JobQueue::enqueue( const QList< job_ptr >& jobs ) +JobQueue::enqueue( const JobList& jobs ) { Q_ASSERT( !m_thread->isRunning() ); m_jobs.append( jobs ); diff --git a/src/libcalamares/JobQueue.h b/src/libcalamares/JobQueue.h index 903783d53..2c1b85ed5 100644 --- a/src/libcalamares/JobQueue.h +++ b/src/libcalamares/JobQueue.h @@ -42,11 +42,11 @@ public: GlobalStorage* globalStorage() const; void enqueue( const job_ptr& job ); - void enqueue( const QList< job_ptr >& jobs ); + void enqueue( const JobList& jobs ); void start(); signals: - void queueChanged( const QList< job_ptr >& jobs ); + void queueChanged( const JobList& jobs ); void progress( qreal percent, const QString& prettyName ); void finished(); void failed( const QString& message, const QString& details ); @@ -54,7 +54,7 @@ signals: private: static JobQueue* s_instance; - QList< job_ptr > m_jobs; + JobList m_jobs; JobThread* m_thread; GlobalStorage* m_storage; }; diff --git a/src/libcalamares/Typedefs.h b/src/libcalamares/Typedefs.h index 8aefcd6af..4ff28e3d7 100644 --- a/src/libcalamares/Typedefs.h +++ b/src/libcalamares/Typedefs.h @@ -19,6 +19,7 @@ #ifndef TYPEDEFS_H #define TYPEDEFS_H +#include #include namespace Calamares @@ -26,6 +27,7 @@ namespace Calamares class Job; typedef QSharedPointer< Job > job_ptr; +using JobList = QList< job_ptr >; enum ModuleAction : char { diff --git a/src/libcalamaresui/ExecutionViewStep.cpp b/src/libcalamaresui/ExecutionViewStep.cpp index 37c2318d0..4c813bbca 100644 --- a/src/libcalamaresui/ExecutionViewStep.cpp +++ b/src/libcalamaresui/ExecutionViewStep.cpp @@ -148,10 +148,10 @@ ExecutionViewStep::onActivate() } -QList< Calamares::job_ptr > +JobList ExecutionViewStep::jobs() const { - return QList< Calamares::job_ptr >(); + return JobList(); } diff --git a/src/libcalamaresui/ExecutionViewStep.h b/src/libcalamaresui/ExecutionViewStep.h index 3101cf479..05b26a436 100644 --- a/src/libcalamaresui/ExecutionViewStep.h +++ b/src/libcalamaresui/ExecutionViewStep.h @@ -52,7 +52,7 @@ public: void onActivate() override; - QList< job_ptr > jobs() const override; + JobList jobs() const override; void appendJobModuleInstanceKey( const QString& instanceKey ); diff --git a/src/libcalamaresui/modulesystem/CppJobModule.cpp b/src/libcalamaresui/modulesystem/CppJobModule.cpp index 6ff846027..e6240b4c9 100644 --- a/src/libcalamaresui/modulesystem/CppJobModule.cpp +++ b/src/libcalamaresui/modulesystem/CppJobModule.cpp @@ -75,10 +75,10 @@ CppJobModule::loadSelf() } -QList< job_ptr > +JobList CppJobModule::jobs() const { - return QList< job_ptr >() << m_job; + return JobList() << m_job; } diff --git a/src/libcalamaresui/modulesystem/CppJobModule.h b/src/libcalamaresui/modulesystem/CppJobModule.h index 46d27bf8b..89cf19e06 100644 --- a/src/libcalamaresui/modulesystem/CppJobModule.h +++ b/src/libcalamaresui/modulesystem/CppJobModule.h @@ -36,7 +36,7 @@ public: Interface interface() const override; void loadSelf() override; - QList< job_ptr > jobs() const override; + JobList jobs() const override; protected: void initFrom( const QVariantMap& moduleDescriptor ) override; diff --git a/src/libcalamaresui/modulesystem/Module.h b/src/libcalamaresui/modulesystem/Module.h index 5f756938f..71390fa83 100644 --- a/src/libcalamaresui/modulesystem/Module.h +++ b/src/libcalamaresui/modulesystem/Module.h @@ -70,7 +70,6 @@ public: ProcessInterface, PythonQtInterface }; - virtual ~Module(); /** * @brief fromDescriptor creates a new Module object of the correct type. @@ -84,6 +83,7 @@ public: const QString& instanceId, const QString& configFileName, const QString& moduleDirectory ); + virtual ~Module(); /** * @brief name returns the name of this module. @@ -159,7 +159,7 @@ public: * @brief jobs returns any jobs exposed by this module. * @return a list of jobs (can be empty). */ - virtual QList< job_ptr > jobs() const = 0; + virtual JobList jobs() const = 0; /** * @brief configurationMap returns the contents of the configuration file for diff --git a/src/libcalamaresui/modulesystem/ProcessJobModule.cpp b/src/libcalamaresui/modulesystem/ProcessJobModule.cpp index aefcbf6f0..989385a18 100644 --- a/src/libcalamaresui/modulesystem/ProcessJobModule.cpp +++ b/src/libcalamaresui/modulesystem/ProcessJobModule.cpp @@ -53,10 +53,10 @@ ProcessJobModule::loadSelf() } -QList< job_ptr > +JobList ProcessJobModule::jobs() const { - return QList< job_ptr >() << m_job; + return JobList() << m_job; } diff --git a/src/libcalamaresui/modulesystem/ProcessJobModule.h b/src/libcalamaresui/modulesystem/ProcessJobModule.h index af9a46bd5..d2c8ba905 100644 --- a/src/libcalamaresui/modulesystem/ProcessJobModule.h +++ b/src/libcalamaresui/modulesystem/ProcessJobModule.h @@ -34,7 +34,7 @@ public: Interface interface() const override; void loadSelf() override; - QList< job_ptr > jobs() const override; + JobList jobs() const override; protected: void initFrom( const QVariantMap& moduleDescriptor ) override; diff --git a/src/libcalamaresui/modulesystem/PythonJobModule.cpp b/src/libcalamaresui/modulesystem/PythonJobModule.cpp index 544f27e1f..3c0a8234e 100644 --- a/src/libcalamaresui/modulesystem/PythonJobModule.cpp +++ b/src/libcalamaresui/modulesystem/PythonJobModule.cpp @@ -53,10 +53,10 @@ PythonJobModule::loadSelf() } -QList< job_ptr > +JobList PythonJobModule::jobs() const { - return QList< job_ptr >() << m_job; + return JobList() << m_job; } diff --git a/src/libcalamaresui/modulesystem/PythonJobModule.h b/src/libcalamaresui/modulesystem/PythonJobModule.h index c82137cb8..b5ae34c07 100644 --- a/src/libcalamaresui/modulesystem/PythonJobModule.h +++ b/src/libcalamaresui/modulesystem/PythonJobModule.h @@ -32,7 +32,7 @@ public: Interface interface() const override; void loadSelf() override; - QList< job_ptr > jobs() const override; + JobList jobs() const override; protected: void initFrom( const QVariantMap& moduleDescriptor ) override; diff --git a/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp b/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp index 96a1ce71c..f4fae4398 100644 --- a/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp +++ b/src/libcalamaresui/modulesystem/PythonQtViewModule.cpp @@ -171,7 +171,7 @@ PythonQtViewModule::loadSelf() } -QList< job_ptr > +JobList PythonQtViewModule::jobs() const { return m_viewStep->jobs(); diff --git a/src/libcalamaresui/modulesystem/PythonQtViewModule.h b/src/libcalamaresui/modulesystem/PythonQtViewModule.h index ba18cfac6..06de7c6e9 100644 --- a/src/libcalamaresui/modulesystem/PythonQtViewModule.h +++ b/src/libcalamaresui/modulesystem/PythonQtViewModule.h @@ -33,7 +33,7 @@ public: Interface interface() const override; void loadSelf() override; - QList< job_ptr > jobs() const override; + JobList jobs() const override; protected: void initFrom( const QVariantMap& moduleDescriptor ) override; diff --git a/src/libcalamaresui/modulesystem/ViewModule.cpp b/src/libcalamaresui/modulesystem/ViewModule.cpp index ba054a8b1..419cad611 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.cpp +++ b/src/libcalamaresui/modulesystem/ViewModule.cpp @@ -76,7 +76,7 @@ ViewModule::loadSelf() } -QList< job_ptr > +JobList ViewModule::jobs() const { return m_viewStep->jobs(); diff --git a/src/libcalamaresui/modulesystem/ViewModule.h b/src/libcalamaresui/modulesystem/ViewModule.h index 6b2e381a2..323315947 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.h +++ b/src/libcalamaresui/modulesystem/ViewModule.h @@ -37,7 +37,7 @@ public: Interface interface() const override; void loadSelf() override; - QList< job_ptr > jobs() const override; + JobList jobs() const override; protected: void initFrom( const QVariantMap& moduleDescriptor ) override; diff --git a/src/libcalamaresui/utils/DebugWindow.cpp b/src/libcalamaresui/utils/DebugWindow.cpp index d4bc74f65..e00c2097b 100644 --- a/src/libcalamaresui/utils/DebugWindow.cpp +++ b/src/libcalamaresui/utils/DebugWindow.cpp @@ -62,7 +62,7 @@ DebugWindow::DebugWindow() // JobQueue page jobQueueText->setReadOnly( true ); connect( JobQueue::instance(), &JobQueue::queueChanged, - this, [ this ]( const QList< Calamares::job_ptr >& jobs ) + this, [ this ]( const JobList& jobs ) { QStringList text; for ( const auto &job : jobs ) diff --git a/src/libcalamaresui/viewpages/PythonQtViewStep.cpp b/src/libcalamaresui/viewpages/PythonQtViewStep.cpp index 78881e337..f5f84eadd 100644 --- a/src/libcalamaresui/viewpages/PythonQtViewStep.cpp +++ b/src/libcalamaresui/viewpages/PythonQtViewStep.cpp @@ -159,10 +159,10 @@ PythonQtViewStep::isAtEnd() const } -QList< Calamares::job_ptr > +JobList PythonQtViewStep::jobs() const { - QList< Calamares::job_ptr > jobs; + JobList jobs; PythonQtObjectPtr jobsCallable = PythonQt::self()->lookupCallable( m_obj, "jobs" ); if ( jobsCallable.isNull() ) diff --git a/src/libcalamaresui/viewpages/PythonQtViewStep.h b/src/libcalamaresui/viewpages/PythonQtViewStep.h index e1f8bd1e5..594af2817 100644 --- a/src/libcalamaresui/viewpages/PythonQtViewStep.h +++ b/src/libcalamaresui/viewpages/PythonQtViewStep.h @@ -46,7 +46,7 @@ public: bool isAtBeginning() const override; bool isAtEnd() const override; - QList< Calamares::job_ptr > jobs() const override; + JobList jobs() const override; void setConfigurationMap( const QVariantMap& configurationMap ) override; diff --git a/src/libcalamaresui/viewpages/ViewStep.h b/src/libcalamaresui/viewpages/ViewStep.h index 617d64fe1..f69f872e2 100644 --- a/src/libcalamaresui/viewpages/ViewStep.h +++ b/src/libcalamaresui/viewpages/ViewStep.h @@ -91,7 +91,7 @@ public: */ virtual void onLeave(); - virtual QList< job_ptr > jobs() const = 0; + virtual JobList jobs() const = 0; void setModuleInstanceKey( const QString& instanceKey ); QString moduleInstanceKey() const From f3eb557fdbdc8104562774ebf388cce82789edf7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 3 Nov 2017 11:01:55 -0400 Subject: [PATCH 79/90] [libcalamares] Provide some convenience functions for extracting configuration data --- src/libcalamares/utils/CalamaresUtils.cpp | 30 +++++++++++++++++++++++ src/libcalamares/utils/CalamaresUtils.h | 16 ++++++++++++ 2 files changed, 46 insertions(+) diff --git a/src/libcalamares/utils/CalamaresUtils.cpp b/src/libcalamares/utils/CalamaresUtils.cpp index db748ec94..ae3a14497 100644 --- a/src/libcalamares/utils/CalamaresUtils.cpp +++ b/src/libcalamares/utils/CalamaresUtils.cpp @@ -326,5 +326,35 @@ crash() *a = 1; } +bool +getBool( const QVariantMap& map, const QString& key, bool d ) +{ + bool result = d; + if ( map.contains( key ) ) + { + auto v = map.value( key ); + if ( v.type() == QVariant::Bool ) + result = v.toBool(); + } + + return result; +} + +QVariantMap +getSubMap( const QVariantMap& map, const QString& key, bool& success ) +{ + success = false; + + if ( map.contains( key ) ) + { + auto v = map.value( key ); + if ( v.type() == QVariant::Map ) + { + success = true; + return v.toMap(); + } + } + return QVariantMap(); +} } diff --git a/src/libcalamares/utils/CalamaresUtils.h b/src/libcalamares/utils/CalamaresUtils.h index 66650ff57..651c6746a 100644 --- a/src/libcalamares/utils/CalamaresUtils.h +++ b/src/libcalamares/utils/CalamaresUtils.h @@ -97,6 +97,22 @@ namespace CalamaresUtils * @brief crash makes Calamares crash immediately. */ DLLEXPORT void crash(); + + /** + * Get a bool value from a mapping with a given key; returns the default + * if no value is stored in the map. + */ + DLLEXPORT bool getBool( const QVariantMap& map, const QString& key, bool d ); + + /** + * Returns a sub-map (i.e. a nested map) from the given mapping with the + * given key. @p success is set to true if the @p key exists + * in @p map and converts to a map, false otherwise. + * + * Returns an empty map if there is no such key or it is not a map-value. + * (e.g. if @p success is false). + */ + DLLEXPORT QVariantMap getSubMap( const QVariantMap& map, const QString& key, bool& success ); } #endif // CALAMARESUTILS_H From 970b6fcb19496eac5a89da31f966d68f8b28a108 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 3 Nov 2017 12:48:16 -0400 Subject: [PATCH 80/90] CMake: find PythonQt better - replace weird distinction between 3.0 and 3.2 by searching once - prefer 3.2 - also look for suffixed versions (PythonXY) besides the Python3 suffix FIXES #857 --- CMakeModules/FindPythonQt.cmake | 74 ++++++++++++++++++++++++++++----- 1 file changed, 64 insertions(+), 10 deletions(-) diff --git a/CMakeModules/FindPythonQt.cmake b/CMakeModules/FindPythonQt.cmake index d016b57b1..0d886902d 100644 --- a/CMakeModules/FindPythonQt.cmake +++ b/CMakeModules/FindPythonQt.cmake @@ -9,6 +9,13 @@ if(NOT PYTHONLIBS_FOUND) message(FATAL_ERROR "error: Python is required to build PythonQt") endif() +string(REGEX REPLACE + "^([0-9][0-9]*)\.([0-9][0-9]*)" + "\\1" + PYTHONLIBS_MAJMIN + ${PYTHONLIBS_VERSION_STRING} +) + if(NOT EXISTS "${PYTHONQT_INSTALL_DIR}") find_path(PYTHONQT_INSTALL_DIR include/PythonQt/PythonQt.h DOC "Directory where PythonQt was installed.") endif() @@ -22,17 +29,58 @@ find_path(PYTHONQT_INCLUDE_DIR PythonQt.h "${PYTHONQT_INSTALL_DIR}/src" DOC "Path to the PythonQt include directory") -# Minimum v3.1 is needed -find_library(PYTHONQT_LIBRARY_RELEASE PythonQt PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "The PythonQt library.") -find_library(PYTHONQT_LIBRARY_DEBUG NAMES PythonQt${CTK_CMAKE_DEBUG_POSTFIX} PythonQt${CMAKE_DEBUG_POSTFIX} PythonQt PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "The PythonQt library.") -find_library(PYTHONQT_QTALL_LIBRARY_RELEASE PythonQt_QtAll PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "Full Qt bindings for the PythonQt library.") -find_library(PYTHONQT_QTALL_LIBRARY_DEBUG NAMES PythonQt_QtAll${CTK_CMAKE_DEBUG_POSTFIX} PythonQt_QtAll${CMAKE_DEBUG_POSTFIX} PythonQt_QtAll PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "Full Qt bindings for the PythonQt library.") +if ( NOT PythonQt_FIND_QUIETLY ) + message( STATUS "Searching for PythonQt (Python ${PYTHONLIBS_MAJMIN}) .." ) + if ( PYTHONQT_INCLUDE_DIR ) + message( STATUS " .. found include ${PYTHONQT_INCLUDE_DIR}" ) + endif() +endif() -# Also check for v3.2+ -find_library(PYTHONQT_LIBRARY_RELEASE PythonQt-Qt5-Python3 PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "The PythonQt library.") -find_library(PYTHONQT_LIBRARY_DEBUG NAMES PythonQt-Qt5-Python3${CTK_CMAKE_DEBUG_POSTFIX} PythonQt-Qt5-Python3${CMAKE_DEBUG_POSTFIX} PythonQt-Qt5-Python3 PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "The PythonQt library.") -find_library(PYTHONQT_QTALL_LIBRARY_RELEASE PythonQt_QtAll-Qt5-Python3 PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "Full Qt bindings for the PythonQt library.") -find_library(PYTHONQT_QTALL_LIBRARY_DEBUG NAMES PythonQt_QtAll-Qt5-Python3${CTK_CMAKE_DEBUG_POSTFIX} PythonQt_QtAll-Qt5-Python3${CMAKE_DEBUG_POSTFIX} PythonQt_QtAll-Qt5-Python3 PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "Full Qt bindings for the PythonQt library.") +# Minimum v3.1 is needed +find_library(PYTHONQT_LIBRARY_RELEASE + NAMES + PythonQt-Qt5-Python${PYTHONLIBS_MAJMIN} + PythonQt-Qt5-Python3 + PythonQt + PATHS "${PYTHONQT_INSTALL_DIR}/lib" + DOC "The PythonQt library." +) +find_library(PYTHONQT_LIBRARY_DEBUG + NAMES + PythonQt-Qt5-Python${PYTHONLIBS_MAJMIN}JMIN${CTK_CMAKE_DEBUG_POSTFIX} + PythonQt-Qt5-Python${PYTHONLIBS_MAJMIN}${CMAKE_DEBUG_POSTFIX} + PythonQt-Qt5-Python${PYTHONLIBS_MAJMIN} + PythonQt-Qt5-Python3${CTK_CMAKE_DEBUG_POSTFIX} + PythonQt-Qt5-Python3${CMAKE_DEBUG_POSTFIX} + PythonQt-Qt5-Python3 + PythonQt${CTK_CMAKE_DEBUG_POSTFIX} + PythonQt${CMAKE_DEBUG_POSTFIX} + PythonQt + PATHS "${PYTHONQT_INSTALL_DIR}/lib" + DOC "The PythonQt library (debug build)." +) +find_library(PYTHONQT_QTALL_LIBRARY_RELEASE + NAMES + PythonQt_QtAll-Qt5-Python${PYTHONLIBS_MAJMIN} + PythonQt_QtAll-Qt5-Python3 + PythonQt_QtAll + PATHS "${PYTHONQT_INSTALL_DIR}/lib" + DOC "Full Qt bindings for the PythonQt library." +) +find_library(PYTHONQT_QTALL_LIBRARY_DEBUG + NAMES + PythonQt_QtAll-Qt5-Python${PYTHONLIBS_MAJMIN}${CTK_CMAKE_DEBUG_POSTFIX} + PythonQt_QtAll-Qt5-Python${PYTHONLIBS_MAJMIN}${CMAKE_DEBUG_POSTFIX} + PythonQt_QtAll-Qt5-Python${PYTHONLIBS_MAJMIN} + PythonQt_QtAll-Qt5-Python3${CTK_CMAKE_DEBUG_POSTFIX} + PythonQt_QtAll-Qt5-Python3${CMAKE_DEBUG_POSTFIX} + PythonQt_QtAll-Qt5-Python3 + PythonQt_QtAll${CTK_CMAKE_DEBUG_POSTFIX} + PythonQt_QtAll${CMAKE_DEBUG_POSTFIX} + PythonQt_QtAll + PATHS "${PYTHONQT_INSTALL_DIR}/lib" + DOC "Full Qt bindings for the PythonQt library (debug build)." +) set(PYTHONQT_LIBRARY) if(PYTHONQT_LIBRARY_RELEASE) @@ -50,6 +98,12 @@ if(PYTHONQT_QTALL_LIBRARY_DEBUG) list(APPEND PYTHONQT_QTALL_LIBRARY debug ${PYTHONQT_QTALL_LIBRARY_DEBUG}) endif() +if ( NOT PythonQt_FIND_QUIETLY ) + message( STATUS " .. found library ${PYTHONQT_LIBRARY}" ) + message( STATUS " .. found qtall ${PYTHONQT_QTALL_LIBRARY}" ) +endif() + + mark_as_advanced(PYTHONQT_INSTALL_DIR) mark_as_advanced(PYTHONQT_INCLUDE_DIR) mark_as_advanced(PYTHONQT_LIBRARY_RELEASE) From ee0b3b85dc2f1f4991d82152b2e15343940b31c3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Nov 2017 05:14:42 -0500 Subject: [PATCH 81/90] [netinstall] Improve 'next' button handling - Document netinstall.conf a little, - Add setting *required* which influences whether next is enabled or not in case of missing or corrupt data, - Enable *next* button only once some (any!) data is received. This can be used to disallow stepping past the netinstall step when there is no data (e.g. internet has failed between the welcome page and the netinstall page). --- src/modules/netinstall/NetInstallPage.cpp | 20 ++++++++++--------- src/modules/netinstall/NetInstallPage.h | 9 +++++++-- src/modules/netinstall/NetInstallViewStep.cpp | 17 ++++++++++++++-- src/modules/netinstall/NetInstallViewStep.h | 3 +++ src/modules/netinstall/netinstall.conf | 11 ++++++++++ 5 files changed, 47 insertions(+), 13 deletions(-) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 030537732..13c0da336 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -57,14 +57,6 @@ NetInstallPage::NetInstallPage( QWidget* parent ) ui->setupUi( this ); } -bool -NetInstallPage::isReady() -{ - // nothing to wait for, the data are immediately ready - // if the user does not select any group nothing is installed - return true; -} - bool NetInstallPage::readGroups( const QByteArray& yamlData ) { @@ -92,10 +84,13 @@ NetInstallPage::readGroups( const QByteArray& yamlData ) void NetInstallPage::dataIsHere( QNetworkReply* reply ) { + // If m_required is *false* then we still say we're ready + // even if the reply is corrupt or missing. if ( reply->error() != QNetworkReply::NoError ) { cDebug() << reply->errorString(); ui->netinst_status->setText( tr( "Network Installation. (Disabled: Unable to fetch package lists, check your network connection)" ) ); + emit checkReady( !m_required ); return; } @@ -104,6 +99,7 @@ NetInstallPage::dataIsHere( QNetworkReply* reply ) 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)" ) ); reply->deleteLater(); + emit checkReady( !m_required ); return; } @@ -112,7 +108,7 @@ NetInstallPage::dataIsHere( QNetworkReply* reply ) ui->groupswidget->header()->setSectionResizeMode( 1, QHeaderView::Stretch ); reply->deleteLater(); - emit checkReady( isReady() ); + emit checkReady( true ); } QList NetInstallPage::selectedPackages() const @@ -139,6 +135,12 @@ void NetInstallPage::loadGroupList() m_networkManager.get( request ); } +void NetInstallPage::setRequired(bool b) +{ + m_required = b; +} + + void NetInstallPage::onActivate() { ui->groupswidget->setFocus(); diff --git a/src/modules/netinstall/NetInstallPage.h b/src/modules/netinstall/NetInstallPage.h index 423c16b8e..f6939cea6 100644 --- a/src/modules/netinstall/NetInstallPage.h +++ b/src/modules/netinstall/NetInstallPage.h @@ -46,13 +46,17 @@ public: void onActivate(); - bool isReady(); - // 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(); + // Sets the "required" state of netinstall data. Influences whether + // corrupt or unavailable data causes checkReady() to be emitted + // true (not-required) or false. + void setRequired( bool ); + bool getRequired() const { return m_required; } + // Returns the list of packages belonging to groups that are // selected in the view in this given moment. No data is cached here, so // this function does not have constant time. @@ -76,6 +80,7 @@ private: QNetworkAccessManager m_networkManager; PackageModel* m_groups; + bool m_required; }; #endif // NETINSTALLPAGE_H diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 347b2bf27..20505cc34 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -2,6 +2,7 @@ * Copyright 2016, Luca Giambonini * Copyright 2016, Lisa Vitolo * Copyright 2017, Kyle Robbertze + * Copyright 2017, 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 @@ -30,11 +31,11 @@ CALAMARES_PLUGIN_FACTORY_DEFINITION( NetInstallViewStepFactory, registerPluginsetRequired( + configurationMap.contains( "required" ) && + configurationMap.value( "required" ).type() == QVariant::Bool && + configurationMap.value( "required" ).toBool() ); + if ( configurationMap.contains( "groupsUrl" ) && configurationMap.value( "groupsUrl" ).type() == QVariant::String ) { @@ -186,3 +192,10 @@ NetInstallViewStep::setConfigurationMap( const QVariantMap& configurationMap ) m_widget->loadGroupList(); } } + +void +NetInstallViewStep::nextIsReady( bool b ) +{ + m_nextEnabled = b; + emit nextStatusChanged( b ); +} diff --git a/src/modules/netinstall/NetInstallViewStep.h b/src/modules/netinstall/NetInstallViewStep.h index d9853f26f..ee53f61ce 100644 --- a/src/modules/netinstall/NetInstallViewStep.h +++ b/src/modules/netinstall/NetInstallViewStep.h @@ -60,6 +60,9 @@ public: void setConfigurationMap( const QVariantMap& configurationMap ) override; +public slots: + void nextIsReady( bool ); + private: NetInstallPage* m_widget; bool m_nextEnabled; diff --git a/src/modules/netinstall/netinstall.conf b/src/modules/netinstall/netinstall.conf index b87aef43e..f5977a267 100644 --- a/src/modules/netinstall/netinstall.conf +++ b/src/modules/netinstall/netinstall.conf @@ -1,2 +1,13 @@ --- +# 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 + +# If the installation can proceed without netinstall (e.g. the Live CD +# can create a working installed system, but netinstall is preferred +# to bring it up-to-date or extend functionality) leave this set to +# false (the default). If set to true, the netinstall data is required. +# +# This only has an effect if the netinstall data cannot be retrieved, +# or is corrupt: having "required" set, means the install cannot proceed. +required: false From f424af36d3f79997a3e630d875e1221e52161805 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Nov 2017 05:25:14 -0500 Subject: [PATCH 82/90] [netinstall] Avoid crash when do groups are available - m_groups is only set to a non-nullptr value when data is received and fully processed, - avoid nullptr dereference when paging *back* from a netinstall page that hasn't loaded groups data. FIXES #859 --- src/modules/netinstall/NetInstallPage.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 13c0da336..0d5bd4049 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -113,7 +113,13 @@ NetInstallPage::dataIsHere( QNetworkReply* reply ) QList NetInstallPage::selectedPackages() const { - return m_groups->getPackages(); + if ( m_groups ) + return m_groups->getPackages(); + else + { + cDebug() << "WARNING: no netinstall groups are available."; + return QList(); + } } void NetInstallPage::loadGroupList() From 91e949f8fc623592ef1c50cabc453d9c217bf0f1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Nov 2017 05:34:57 -0500 Subject: [PATCH 83/90] [netinstall] Apply Calamares C++ style --- src/modules/netinstall/NetInstallPage.cpp | 12 ++++++++---- src/modules/netinstall/NetInstallPage.h | 5 ++++- src/modules/netinstall/NetInstallViewStep.cpp | 6 +++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 0d5bd4049..0e70bde15 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -111,7 +111,8 @@ NetInstallPage::dataIsHere( QNetworkReply* reply ) emit checkReady( true ); } -QList NetInstallPage::selectedPackages() const +QList +NetInstallPage::selectedPackages() const { if ( m_groups ) return m_groups->getPackages(); @@ -122,7 +123,8 @@ QList NetInstallPage::selectedPackages() const } } -void NetInstallPage::loadGroupList() +void +NetInstallPage::loadGroupList() { QString confUrl( Calamares::JobQueue::instance()->globalStorage()->value( @@ -141,13 +143,15 @@ void NetInstallPage::loadGroupList() m_networkManager.get( request ); } -void NetInstallPage::setRequired(bool b) +void +NetInstallPage::setRequired( bool b ) { m_required = b; } -void NetInstallPage::onActivate() +void +NetInstallPage::onActivate() { ui->groupswidget->setFocus(); } diff --git a/src/modules/netinstall/NetInstallPage.h b/src/modules/netinstall/NetInstallPage.h index f6939cea6..5671ac93e 100644 --- a/src/modules/netinstall/NetInstallPage.h +++ b/src/modules/netinstall/NetInstallPage.h @@ -55,7 +55,10 @@ public: // corrupt or unavailable data causes checkReady() to be emitted // true (not-required) or false. void setRequired( bool ); - bool getRequired() const { return m_required; } + bool getRequired() const + { + return m_required; + } // Returns the list of packages belonging to groups that are // selected in the view in this given moment. No data is cached here, so diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 20505cc34..bb1f014cd 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -139,7 +139,7 @@ NetInstallViewStep::onLeave() 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()) + if ( !package.preScript.isEmpty() || !package.postScript.isEmpty() ) { QMap sdetails; sdetails.insert( "pre-script", package.preScript ); @@ -157,14 +157,14 @@ NetInstallViewStep::onLeave() { QMap op; op.insert( "install", QVariant( installPackages ) ); - packageOperations.append(op); + packageOperations.append( op ); cDebug() << " .." << installPackages.length() << "critical packages."; } if ( !tryInstallPackages.empty() ) { QMap op; op.insert( "try_install", QVariant( tryInstallPackages ) ); - packageOperations.append(op); + packageOperations.append( op ); cDebug() << " .." << tryInstallPackages.length() << "non-critical packages."; } From 51c74c6abb4ef2f17c1127bf443f68b3c433c4a9 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Nov 2017 05:42:13 -0500 Subject: [PATCH 84/90] [netinstall] Convenience typedefs --- src/modules/netinstall/NetInstallPage.cpp | 4 ++-- src/modules/netinstall/NetInstallPage.h | 2 +- src/modules/netinstall/NetInstallViewStep.cpp | 2 +- src/modules/netinstall/PackageModel.h | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 0e70bde15..07e0d2397 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -111,7 +111,7 @@ NetInstallPage::dataIsHere( QNetworkReply* reply ) emit checkReady( true ); } -QList +PackageModel::PackageItemDataList NetInstallPage::selectedPackages() const { if ( m_groups ) @@ -119,7 +119,7 @@ NetInstallPage::selectedPackages() const else { cDebug() << "WARNING: no netinstall groups are available."; - return QList(); + return PackageModel::PackageItemDataList(); } } diff --git a/src/modules/netinstall/NetInstallPage.h b/src/modules/netinstall/NetInstallPage.h index 5671ac93e..58308412d 100644 --- a/src/modules/netinstall/NetInstallPage.h +++ b/src/modules/netinstall/NetInstallPage.h @@ -63,7 +63,7 @@ public: // Returns the list of packages belonging to groups that are // selected in the view in this given moment. No data is cached here, so // this function does not have constant time. - QList selectedPackages() const; + PackageModel::PackageItemDataList selectedPackages() const; public slots: void dataIsHere( QNetworkReply* ); diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index bb1f014cd..50e08486b 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -127,7 +127,7 @@ NetInstallViewStep::onLeave() cDebug() << "Leaving netinstall, adding packages to be installed" << "to global storage"; - QList packages = m_widget->selectedPackages(); + PackageModel::PackageItemDataList packages = m_widget->selectedPackages(); QVariantList installPackages; QVariantList tryInstallPackages; QVariantList packageOperations; diff --git a/src/modules/netinstall/PackageModel.h b/src/modules/netinstall/PackageModel.h index 148bd99ab..06d6c0ca1 100644 --- a/src/modules/netinstall/PackageModel.h +++ b/src/modules/netinstall/PackageModel.h @@ -1,3 +1,4 @@ + /* === This file is part of Calamares - === * * Copyright (c) 2017, Kyle Robbertze @@ -28,14 +29,13 @@ #include -// Required forward declarations -class PackageTreeItem; - class PackageModel : public QAbstractItemModel { Q_OBJECT public: + using PackageItemDataList = QList< PackageTreeItem::ItemData >; + explicit PackageModel( const YAML::Node& data, QObject* parent = nullptr ); ~PackageModel() override; @@ -52,7 +52,7 @@ public: QModelIndex parent( const QModelIndex& index ) const override; int rowCount( const QModelIndex& parent = QModelIndex() ) const override; int columnCount( const QModelIndex& parent = QModelIndex() ) const override; - QList getPackages() const; + PackageItemDataList getPackages() const; QList getItemPackages( PackageTreeItem* item ) const; private: From fda4b4e3c2281cb332b264f52c3ec96af895a197 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Nov 2017 06:12:26 -0500 Subject: [PATCH 85/90] CMake: improve searching for PythonQt - don't log when libs not found - log that it's the Python libraries version (not Python itself) - fix RE that was getting the wrong results for maj.min --- CMakeModules/FindPythonQt.cmake | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/CMakeModules/FindPythonQt.cmake b/CMakeModules/FindPythonQt.cmake index 0d886902d..8de40853f 100644 --- a/CMakeModules/FindPythonQt.cmake +++ b/CMakeModules/FindPythonQt.cmake @@ -9,12 +9,19 @@ if(NOT PYTHONLIBS_FOUND) message(FATAL_ERROR "error: Python is required to build PythonQt") endif() +# Cut X.Y[.Z] down to just X.Y string(REGEX REPLACE "^([0-9][0-9]*)\.([0-9][0-9]*)" - "\\1" - PYTHONLIBS_MAJMIN + "\\1.\\2@" + _PYTHONLIBS_MAJMIN ${PYTHONLIBS_VERSION_STRING} ) +string(REGEX REPLACE + "@.*" + "" + PYTHONLIBS_MAJMIN + ${_PYTHONLIBS_MAJMIN} +) if(NOT EXISTS "${PYTHONQT_INSTALL_DIR}") find_path(PYTHONQT_INSTALL_DIR include/PythonQt/PythonQt.h DOC "Directory where PythonQt was installed.") @@ -30,7 +37,7 @@ find_path(PYTHONQT_INCLUDE_DIR PythonQt.h DOC "Path to the PythonQt include directory") if ( NOT PythonQt_FIND_QUIETLY ) - message( STATUS "Searching for PythonQt (Python ${PYTHONLIBS_MAJMIN}) .." ) + message( STATUS "Searching for PythonQt (PythonLibs ${PYTHONLIBS_MAJMIN}) .." ) if ( PYTHONQT_INCLUDE_DIR ) message( STATUS " .. found include ${PYTHONQT_INCLUDE_DIR}" ) endif() @@ -99,8 +106,12 @@ if(PYTHONQT_QTALL_LIBRARY_DEBUG) endif() if ( NOT PythonQt_FIND_QUIETLY ) - message( STATUS " .. found library ${PYTHONQT_LIBRARY}" ) - message( STATUS " .. found qtall ${PYTHONQT_QTALL_LIBRARY}" ) + if ( PYTHONQT_LIBRARY ) + message( STATUS " .. found library ${PYTHONQT_LIBRARY}" ) + endif() + if ( PYTHONQT_QTALL_LIBRARY ) + message( STATUS " .. found qtall ${PYTHONQT_QTALL_LIBRARY}" ) + endif() endif() From b5f2f22a7871caa571287cfe38933fc9673b38ca Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Nov 2017 06:58:05 -0500 Subject: [PATCH 86/90] Documentation: update HACKING --- ci/HACKING.md | 68 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 18 deletions(-) diff --git a/ci/HACKING.md b/ci/HACKING.md index 92d1a5a48..4d84fc33d 100644 --- a/ci/HACKING.md +++ b/ci/HACKING.md @@ -1,9 +1,15 @@ Hacking on Calamares ==================== +These are the guidelines for hacking on Calamares. Except for the licensing, +which **must** be GPLv3+, these are guidelines and -- like PEP8 -- the most +important thing is to know when you can ignore them. + + Licensing --------- -Calamares is released under the terms of the GNU GPL, version 3 or later. Every source file must have a license header, with a list of copyright holders and years. +Calamares is released under the terms of the GNU GPL, version 3 or later. +Every source file must have a license header, with a list of copyright holders and years. Example: ``` @@ -34,9 +40,9 @@ organization, etc. Please add your name to files you touch when making any contribution (even if it's just a typo-fix which might not be copyrightable in all jurisdictions). -Formatting ----------- +Formatting C++ +-------------- This formatting guide applies to C++ code only; for Python modules, we use [pycodestyle][https://github.com/PyCQA/pycodestyle] to apply a check of some PEP8 guidelines. @@ -48,10 +54,10 @@ some PEP8 guidelines. * No space before brackets, except for keywords, for example `function( argument )` but `if ( condition )`. * For pointer and reference variable declarations, put a space before the variable name - and no space between the type and the `*` or `&`. -* `for`, `if`, `else`, `while` and similar statements put the brackets on the next line, - although brackets are not needed for single statements. -* Function and class definitions have their brackets on separate lines. + and no space between the type and the `*` or `&`, e.g. `int* p`. +* `for`, `if`, `else`, `while` and similar statements put the braces on the next line, + if the following block is more than one statement. Use no braces for single statements. +* Function and class definitions have their braces on separate lines. * A function implementation's return type is on its own line. * `CamelCase.{cpp,h}` style file names. @@ -63,8 +69,9 @@ MyClass::myMethod( QStringList list, const QString& name ) if ( list.isEmpty() ) return false; + cDebug() << "Items in list .."; foreach ( const QString& string, list ) - cDebug() << "Current string is " << string; + cDebug() << " .." << string; switch ( m_enumValue ) { @@ -77,7 +84,7 @@ MyClass::myMethod( QStringList list, const QString& name ) } ``` -You can use the `hacking/calamaresstyle` script to run +You can use the `ci/calamaresstyle` script to run [astyle](http://astyle.sf.net) on your code and have it formatted the right way. @@ -85,6 +92,7 @@ way. order to take advantage of this functionality you will need to acquire the [EditorConfig](http://editorconfig.org/#download) plug-in for your editor. + Naming ------ * Use CamelCase for everything. @@ -97,6 +105,7 @@ Naming * If it's a getter for a boolean, prefix with 'is', so `isCondition()`. * A setter is `setVariable( arg )`. + Includes -------- Header includes should be listed in the following order: @@ -109,8 +118,9 @@ Header includes should be listed in the following order: They should also be sorted alphabetically for ease of locating them. -Includes in a header file should be kept to the absolute minimum, as to keep compile times short. This can be achieved by using forward declarations instead of includes, -like `class QListView;`. +Includes in a header file should be kept to the absolute minimum, as to keep +compile times short. This can be achieved by using forward declarations +instead of includes, like `class QListView;`. Example: ``` @@ -129,6 +139,7 @@ Example: Use include guards, not `#pragma once`. + C++ tips -------- All C++11 features are acceptable, and the use of new C++11 features is encouraged when @@ -141,8 +152,8 @@ range-based `for` syntax introduced with C++11 is preferred ([see this blog post When re-implementing a virtual method, always add the `override` keyword. -Try to keep your code const correct. Declare methods const if they don't mutate the -object, and use const variables. It improves safety, and also makes it easier to +Try to keep your code const correct. Declare methods const if they don't mutate the +object, and use const variables. It improves safety, and also makes it easier to understand the code. For the Qt signal-slot system, the new (Qt5) syntax is to be preferred because it allows @@ -160,10 +171,31 @@ connect( m_moduleManager, &Calamares::ModuleManager::modulesLoaded, [this] }); ``` -Debugging ---------- -Use `cDebug()` and `cLog()` from `utils/Logger.h`. - - [1]: http://blog.qt.digia.com/blog/2011/05/26/cpp0x-in-qt/ [2]: http://qt-project.org/wiki/New_Signal_Slot_Syntax + + +Debugging +--------- +Use `cDebug()` and `cLog()` from `utils/Logger.h`. You can pass a debug-level to +either macro (1 is debugging, higher is less important). Use `cLog()` for warning +messages. It is recommended to add *WARNING* as the first part of a warning +message. + +For log messages that are continued across multiple calls to `cDebug()`, +in particular listing things, conventional formatting is as follows: +* End the first debug message with ` ..` +* Indent following lines with ` ..` + + +Commit Messages +--------------- +Keep commit messages short(-ish) and try to describe what is being changed +*as well as why*. Use the commit keywords for GitHub, especially *FIXES:* +to auto-close issues when they are resolved. + +For functional changes to Calamares modules or libraries, try to put +*[modulename]* in front of the first line of the commit message. + +For non-functional changes to infrastructure, try to label the change +with the kind of change, e.g. *CMake* or *i18n* or *Documentation*. From ac14e8a38c274597d974dd8b22cf8af162f34497 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Nov 2017 07:00:44 -0500 Subject: [PATCH 87/90] Documentation: update AUTHORS --- AUTHORS | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index f39b579f4..a1c1bae5b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,2 +1,24 @@ -Teo Mrnjavac -Adriaan de Groot +# MAINTAINER + +Teo Mrnjavac (maintainer -2017) +Adriaan de Groot (maintainer 2017-) + +# CONTRIBUTORS + +Alf Gaida +Allen Welkie +Andrius Štikonas +Bernhard Landauer +Bezzy1999 +bill-auger +crispg72 +demmm +Gabriel Craciunescu +Kai Dohmen +Kevin Kofler +Kyle Robertze +Lisa Vitolo +n3rdopolis +Philip Müller +Ramon Buldó +Rohan Garg From 652ffaedd5a9259bc767e0080a41f8799212d6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 11 Nov 2017 21:34:10 +0000 Subject: [PATCH 88/90] Remove unnecessary kpmcore includes. --- src/modules/partition/jobs/CreatePartitionJob.cpp | 5 ----- src/modules/partition/jobs/CreatePartitionTableJob.cpp | 1 - src/modules/partition/jobs/FormatPartitionJob.cpp | 1 - 3 files changed, 7 deletions(-) diff --git a/src/modules/partition/jobs/CreatePartitionJob.cpp b/src/modules/partition/jobs/CreatePartitionJob.cpp index efefcae86..3b16df2fc 100644 --- a/src/modules/partition/jobs/CreatePartitionJob.cpp +++ b/src/modules/partition/jobs/CreatePartitionJob.cpp @@ -24,11 +24,6 @@ #include "utils/Units.h" // KPMcore -#include -#include -#include -#include -#include #include #include #include diff --git a/src/modules/partition/jobs/CreatePartitionTableJob.cpp b/src/modules/partition/jobs/CreatePartitionTableJob.cpp index e4430134f..5d2df6bc9 100644 --- a/src/modules/partition/jobs/CreatePartitionTableJob.cpp +++ b/src/modules/partition/jobs/CreatePartitionTableJob.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/modules/partition/jobs/FormatPartitionJob.cpp b/src/modules/partition/jobs/FormatPartitionJob.cpp index 162839ce7..bc13946c6 100644 --- a/src/modules/partition/jobs/FormatPartitionJob.cpp +++ b/src/modules/partition/jobs/FormatPartitionJob.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include From 2a785bdf8954003ff502edfb3bfb25c0d831fb4e Mon Sep 17 00:00:00 2001 From: Chantara Tith Date: Mon, 5 Sep 2016 16:05:16 +0700 Subject: [PATCH 89/90] Disable newPartitionTableButton for LVM device. --- src/modules/partition/gui/PartitionPage.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/modules/partition/gui/PartitionPage.cpp b/src/modules/partition/gui/PartitionPage.cpp index 62e7a97a1..88b03ec72 100644 --- a/src/modules/partition/gui/PartitionPage.cpp +++ b/src/modules/partition/gui/PartitionPage.cpp @@ -119,7 +119,7 @@ PartitionPage::~PartitionPage() void PartitionPage::updateButtons() { - bool create = false, edit = false, del = false; + bool create = false, createTable = false, edit = false, del = false; QModelIndex index = m_ui->partitionTreeView->currentIndex(); if ( index.isValid() ) @@ -141,11 +141,18 @@ PartitionPage::updateButtons() edit = !isFree && !isExtended; del = !isFree; } + + if ( m_ui->deviceComboBox->currentIndex() >= 0 ) + { + QModelIndex deviceIndex = m_core->deviceModel()->index( m_ui->deviceComboBox->currentIndex(), 0 ); + if ( m_core->deviceModel()->deviceForIndex( deviceIndex )->type() != Device::LVM_Device ) + createTable = true; + } + m_ui->createButton->setEnabled( create ); m_ui->editButton->setEnabled( edit ); m_ui->deleteButton->setEnabled( del ); - - m_ui->newPartitionTableButton->setEnabled( m_ui->deviceComboBox->currentIndex() >= 0 ); + m_ui->newPartitionTableButton->setEnabled( createTable ); } void From a2e3af2b3db1bda40fa36fe833b0107907090c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 15 Dec 2017 11:37:02 +0000 Subject: [PATCH 90/90] Require KPMcore 3.3 --- src/modules/partition/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/CMakeLists.txt b/src/modules/partition/CMakeLists.txt index 61508c567..1ed986836 100644 --- a/src/modules/partition/CMakeLists.txt +++ b/src/modules/partition/CMakeLists.txt @@ -6,7 +6,7 @@ include(GenerateExportHeader) find_package( Qt5 REQUIRED DBus ) find_package( KF5 REQUIRED Config CoreAddons I18n WidgetsAddons ) -find_package( KPMcore 3.2 REQUIRED ) +find_package( KPMcore 3.3 REQUIRED ) include_directories( ${KPMCORE_INCLUDE_DIR} ) include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )