From bdf8c181261399cb5cbf9dcdc9f9f6fc25e1caaa Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sun, 15 Oct 2017 22:51:37 -0400 Subject: [PATCH 1/9] 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 2/9] 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 3/9] 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 4/9] 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 5/9] 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 6/9] 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 7/9] 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 8/9] [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 9/9] [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