Commit Graph

3314 Commits

Author SHA1 Message Date
Adriaan de Groot
3133e759d0
Merge pull request #958 from bill-auger/patch-2
avoid pinging hard-coded server for netinstall.yaml
2018-05-22 12:08:01 +02:00
bill auger
b6673f6324 move thisModule->isLoaded assert to after it's warning message 2018-05-22 03:39:16 -04:00
bill auger
d7b1811e56 avoid pinging hard-coded server for netinstall.yaml
groupsUrl is optional and should be commented out by default
also this URL is 404
also only chakra would ever want to ping the chakra server anyways
2018-05-21 18:43:57 -04:00
Adriaan de Groot
fb94c227f6 Merge branch 'netinstall' 2018-05-21 11:00:40 -04:00
Adriaan de Groot
ba85fc760a [netinstall] Remove data-indirection
- There is no need to move data around between two parts of the
   same module via global storage.
2018-05-21 10:58:57 -04:00
Adriaan de Groot
3160bd7a54 [netinstall] Simplify getting configuration
- Use convenience methods for getting bools and strings from
   the configuration map. Ignore empty groupsUrls.
2018-05-21 10:49:47 -04:00
Adriaan de Groot
6779a44991 [preservefiles] New module preservefiles
- more flexible way to keep (all kinds of) files from the host
   system, into the target system.
 - WIP: substitutions like in shellprocess (@@ROOT@@, @@HOME@@ probably)
 - WIP: creating a JSON file from global settings
2018-05-21 06:30:54 -04:00
Adriaan de Groot
6c87747a5d [libcalamares] Make it possible to get the logfile name 2018-05-21 06:30:54 -04:00
Adriaan de Groot
5bcd6eaef8 [partition] Reduce warnings by removing unused code 2018-05-21 06:30:54 -04:00
bill auger
4826af97a9 consistent indentation in src/modules/netinstall/page_netinst.ui
this file has 1 space char indentation except for these lines
2018-05-19 19:04:24 -04:00
Calamares CI
6b02da9e9e i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-05-17 11:04:13 -04:00
Frede H
f2677b0879
Update CreateUserJob.cpp
Removal of the hardcoded shell, letting the `/etc/default/useradd` be responsible for the shell.
2018-05-17 12:52:09 +02:00
Adriaan de Groot
65d00ccc37 Merge branch 'partition-flags'
Extensive go-over on the partitioning code. #622 is maybe "possibly fixed",
but there's no real indication of what constitutes an invalid combination
of flags.

FIXES #884 FIXES #951 FIXES #953 FIXES #622
2018-05-16 11:37:27 -04:00
Adriaan de Groot
c73d6e80f6 [libcalamares] Switch @@ROOT@@ magic around
The substitution of @@ROOT@@ should happen when running in the
host, not in the target, system. Also only complain about it
if @@ROOT@@ is actually used in the commands.

FIXES #954
2018-05-16 11:20:40 -04:00
Calamares CI
6d1f5433b4 i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-05-16 11:02:48 -04:00
Adriaan de Groot
90a2e482be [partition] Check for available partition type before creating
- Avoid situation where you make 5 or more primaries in an
   MSDOS partition table.

FIXES #953
2018-05-16 10:56:06 -04:00
Adriaan de Groot
bd57f1f2f1 [partition] Fix re-editing a newly created partition
- If there is a partition already (newly) created, then pass that
   to the dialog so that it can use the setings previously applied
   (e.g. mount point and flags).
 - This avoids the case where you create or format a partition,
   then click on it again to edit it and the previous settings are lost.
2018-05-16 09:14:50 -04:00
Adriaan de Groot
ca03dad67b [partition] Refactor setting the flags UI
- Setup the lsit of flags consistently, by providing the available
   and to-be-checked flags.
 - In CreatePartitionDialog, assume that ~0 is all the flags.
2018-05-16 09:07:45 -04:00
Adriaan de Groot
4f451eece5 [partition] Refactor getting the checked flags 2018-05-16 08:41:47 -04:00
Adriaan de Groot
950cc9070d [partition] Rename MountPoints to PartitionDialogHelpers
This file is full of helper functions for the partition-editing
dialogs. At first it was just mount-point helper functions,
but there is other functionality that can be refactored.
2018-05-16 08:34:33 -04:00
Adriaan de Groot
336b8c758a [partition] Consider the future flags when checking EFI bootability
- If we're changing the flags to enable EFI boot, then that's
   enough to satisfy the (future) EFI bootability check.
   This is for issue #622 as well. Fixes #884.
2018-05-16 07:33:04 -04:00
Adriaan de Groot
0df304b206 [partition] Preserve desired partition flags
- Use the desired (future) flags, if set, to initialize the
   flags checkboxes. If there are no future flags set, this
   returns active flags as before.
 - This fixes the situation where editing a partition, changing
   flags, then editing it *again* re-starts with the original
   flags instead of the modified flags.
2018-05-16 07:19:34 -04:00
Adriaan de Groot
6739b81c2a [partition] Tell PartitionInfo about desired flags
- When creating a partition, or changing flags, tell
   the PartitionInfo about those desired flags.
2018-05-16 07:13:35 -04:00
Adriaan de Groot
7df143f64a [partition] Add flags to PartitionInfo
- PartitionInfo maintains information on "what is desired" for
   a given Partition. Now we can set desired flags, alongside
   the flags already supported by Partition (where activeFlags()
   gives you the flags currently set on that partition).
2018-05-16 06:53:35 -04:00
Adriaan de Groot
5b4668822d [partition] Also update combo box index when setting up
- Avoids case where you edit a partition with a mountpoint
   set; previously, calling setText() would update the text
   but leave the selected index unchanged (usually 0), so that
   later calling selectedMountPoint() would return empty.
2018-05-16 06:15:33 -04:00
Adriaan de Groot
323d20d1a5 [partition] Avoid sneaking an empty string into the mount points combo 2018-05-15 08:26:01 -04:00
Adriaan de Groot
255a99d714 [partition] Drop now-unneeded debugging 2018-05-15 08:13:15 -04:00
Adriaan de Groot
310555f16b [partition] Add /srv to standard mount-points list. 2018-05-15 08:06:45 -04:00
Adriaan de Groot
4402198b37 [partition] Centralize setting-of-mountpoint
- map empty to the 0'th index
 - add new entries as needed

This avoids having selected index 0, but a different text.
2018-05-15 08:01:18 -04:00
Adriaan de Groot
a49c39bb53 [partition] Unmap mount-point special strings
- Reverse "(no mount point)" to the empty string
 - Provide convenience pointer-taking function
2018-05-15 06:30:18 -04:00
Adriaan de Groot
a4997c4be8 [partition] Convenience for selecting default mount point
- map blank to the "(no mount point)" string for UI purposes
2018-05-15 06:13:19 -04:00
Adriaan de Groot
fda2e54e0f [partition] Refactor filling combobox with moint points
- Move to one place which handles the standard mount points
 - While here, introduce explicit "(no mount point)" string
   into the combo box. This is prep-work for issue #951.
2018-05-15 05:40:52 -04:00
Adriaan de Groot
39bf2eb9aa [welcome] Fix display of unsupported locales
- Some locales have no nativeLanguageName(), so instead display
   the locale id (e.g. "eo") and the resulting language in English
   (which, if it is really unsupported, will be "C").
2018-05-14 06:28:57 -04:00
Calamares CI
03c2329093 i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-05-14 06:28:57 -04:00
Adriaan de Groot
29848e0279
Merge pull request #950 from cjlcarvalho/master
[partition] Only bootloader model should ignore devices that are not of Disk_Device type
2018-05-14 10:47:57 +02:00
Caio Carvalho
f72f7bd8fe [partition] Only bootloader model should ignore devices that are not of Disk_Device type. 2018-05-10 18:37:37 -03:00
Adriaan de Groot
ccdfe53201
Merge pull request #945 from cjlcarvalho/master
- Switch to enum types
 - Ignore LVM
 - Check LUKS support

Builds locally in my Manjaro test-box and kpmcore 3.3.0
2018-05-10 13:39:58 +02:00
Adriaan de Groot
2da09f7648 [libcalamaresui] Fix build
- Include all headers for types that need to be fully-defined
   (e.g. return types). This guards against uses in contexts where
   those headers have not been implicitly or previously included.

FIXES #948
2018-05-10 05:39:22 -04:00
Caio Carvalho
77d2667b53 [partition] Checking if there is LUKS creation support and if partition is not Extended before enabling encryption in CreatePartitionDialog. 2018-05-08 01:30:41 -03:00
Adriaan de Groot
96887e754c i18n: drop es_ES, add tooling 2018-05-07 09:14:18 -04:00
Adriaan de Groot
ff43752f47 i18n: pl_PL has merged into pl 2018-05-07 05:58:04 -04:00
Adriaan de Groot
a38a2a54f7 [locale] Check all XML TimeZone elements if needed
- reduce warnings about loop-executed-only-once
 - if there is more than one TimeZone element, use the virst valid one
 - warn if nothing is found
2018-05-07 05:18:35 -04:00
Calamares CI
0fc30d6cd6 i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-05-07 05:01:49 -04:00
Caio Carvalho
f561f04591 [partition] Changing PartUtils::getDevices to ignore devices that aren't of Disk_Device type. 2018-05-03 14:50:13 -03:00
Caio Carvalho
8726b70574 [partition] Ignoring LVM devices in PartUtils::getDevices to prevent installing bootloader in LVM VG. 2018-04-30 00:40:54 -03:00
Adriaan de Groot
42f5ed5d41 [welcome] Fix build, reduce redundancy
- constexpr isn't applicable because of non-trivial destructor
 - May as well only create " (%1)" once.

FIXES #938
2018-04-23 10:47:31 -04:00
Adriaan de Groot
e5b599fbe3 [welcome] Drop accidental logging 2018-04-19 09:24:59 -04:00
Adriaan de Groot
0c5590c2e4 Merge branch 'language-selection'
Display the name of each translation in the language of that translation.

FIXES #935
2018-04-19 09:14:29 -04:00
Adriaan de Groot
a47b3f8d14 [libcalamares] Document special-case translations 2018-04-19 09:10:13 -04:00
Adriaan de Groot
b9ed96d4f8 [libcalamares] Special case sr@latin
QLocale::name() doesn't include script information, and if it did
it would probably use sr_RS@Latin; when searching for translation
files it won't consider dropping just the country.
2018-04-19 09:04:29 -04:00
Adriaan de Groot
a9ffd3351d [welcome] Support sr@latin
- The QLocale constructor which takes a string (locale name) doesn't
   understand sr@latin, and returns the Cyrillic locale. Fix that
   by creating locales ourselves for @latin locales.
 - sr and sr@latin now display correctly in the right script in the
   native language dropdown.
2018-04-19 08:40:04 -04:00
Adriaan de Groot
7cc2b222d9 [welcome] Present RTL (country) annotations better
- The (RTL) text "Arabiy (Misr)" should be entirely RTL, so
   make the parenthetical insert -- which would otherwise be LTR
   and so mess up the placing of those parenthesis around the country --
   explicitly RTL.
 - Since there are no RTL languages in Calamares right now with
   country-local translations, this isn't visible.
2018-04-19 07:42:43 -04:00
Adriaan de Groot
7c944760fc [welcome] Only show (country) in list if the locale suggests it
- A locale suggests it is country-specific by having the form <lang>_<country>
 - This mostly fixes locale "ar" being presented as "Arabiy (Misr)" when
   there is no need to (and the RTL is messed up then, too).
2018-04-19 07:19:10 -04:00
Adriaan de Groot
59537d86d6 [welcome] Present languages in native format
- Introduce intermediate data class for building up the list
   of languages to present.
 - Sort on the English names, with en_US at the top (ugh).
 - Show the native names.
2018-04-19 07:15:25 -04:00
Adriaan de Groot
b8b607c421 [locale] Fix QString-vs-char* confusion 2018-04-18 18:28:37 -04:00
Andrius Štikonas
1b21668bff [partition] Switch to scoped Device enums. 2018-04-18 23:59:15 +03:00
Adriaan de Groot
6930400b67 DEBUG logging 2018-04-18 11:34:09 -04:00
Adriaan de Groot
4b7465696d [welcome] Refactor the code that picks a locale to use
- Much like std::find_if, but slightly muddled because there's
   no iterator that we can sensibly use.
 - Scan the ComboBox for a locale that matches a predicate.
 - Log more as the search for a good locale progresses.
 - Don't mix matching the locale with filling the ComboBox
   (even though that's slightly more efficient).
2018-04-18 11:33:49 -04:00
Adriaan de Groot
522adf766a [locale] Switch HTTP GET test to KDE servers
- Use the official name of the KDE GeoIP service
 - Log the URL *before* the check, in case one fails
2018-04-17 07:45:27 -04:00
Adriaan de Groot
5acf67a057 [locale] Fix tests with spaces in zone names
- "North Dakota" -> "North_Dakota" following the change that fixes up
   dodgy names automatically.
2018-04-17 07:40:38 -04:00
Adriaan de Groot
b4e4b691fd [locale] Accomodate more dodgy GeoIP providers
- Force spaces to _
 - Document the bits

FIXES #933
2018-04-17 07:32:27 -04:00
Adriaan de Groot
3ef0fbe892 [locale] Add tests for a bunch of GeoIP providers
- Since these tests use network resources, they are not enabled by default.
   Set the environment variable TEST_HTTP_GET to actually do them.
 - Do one request for each provider and check that they are all consistent.
   (This works for me, yielding Europe/Amsterdam for all).
2018-04-16 09:17:18 -04:00
Adriaan de Groot
0f5e061c4a [locale] Support multi-level selection from JSON data
- Some providers don't provide a single flat JSON object
   (e.g. "{time_zone: foo}") but a nested structure
   (e.g. "{location: {time_zone: foo}}"), so allow dots
   in the selector to do multi-level selection.
2018-04-16 09:13:06 -04:00
Adriaan de Groot
6545d5d022 Merge branch 'expand-geoip'
- Allow configurable TZ selector string, to allow for more variation in providers
2018-04-16 07:53:25 -04:00
Adriaan de Groot
d04e243c4e [locale] Auto-clean up time zone data
- Some providers return weirdly escaped data; strip out useless
   escaping before splitting (there are no characters in correct
   time zone names that need escaping)
 - Add some tests for TZ splitting
2018-04-16 05:49:08 -04:00
Adriaan de Groot
fa5d40006c [locale] Fix interpretation of configured selector
- In GeoIP handler constructors that take a string (to configure the
   selector to use), interpret the empty string (which generally isn't
   a meaningful selector) as meaning "use the default".
 - Drop the no-argument constructors in favor of a default-argument
   which is empty.
2018-04-16 05:32:22 -04:00
Adriaan de Groot
352b385b12 [locale] Make the selector configurable via the config file 2018-04-16 05:32:22 -04:00
Adriaan de Groot
b1b59b27b2 [locale] Expand tests for alternate selectors
- Check that the alternate selectors are used
2018-04-16 05:32:22 -04:00
Adriaan de Groot
fe20416a54 [locale] Make the selector configurable
- GeoIP gets a string selector; the interpretation is up to derived classes.
 - GeoIPXML and GeoIPJSON use the selector to select an element by tag
   or an attribute, respectively.
2018-04-16 04:55:37 -04:00
Adriaan de Groot
79a6d7ccbd [locale] Make file and class consistent GeoIPXML
- Rename the class to match the filename.
2018-04-16 04:35:32 -04:00
Adriaan de Groot
2cd4461b57 [locale] Rename JSON handler
- The handler for JSON data should be called that, not named
   specially after the original provider it was implemented for.
 - Make filename and classname consistent, GeoIPJSON.
2018-04-16 04:32:49 -04:00
Calamares CI
8ba4de6d0a i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-04-13 10:25:38 -04:00
Adriaan de Groot
ec113e3df3 [locale] Log GeoIP attempt URL, use possibly-modified form 2018-04-13 09:42:28 -04:00
Adriaan de Groot
d6f082752d [locale] On GeoIP failure, log URL 2018-04-13 09:36:39 -04:00
Adriaan de Groot
47b7040897 [locale] Adjust to Calamares 3.2 idiom 2018-04-13 09:24:59 -04:00
Adriaan de Groot
3ea5a06157 Merge branch '3.1.x-stable' 2018-04-13 08:50:17 -04:00
Adriaan de Groot
14fcc2fad6 [plasmalnf] Continue fighting with layout
- The screenshot stays one size, but different ThemeWidgets may overlap
   partially when you shrink the screen or have more than three / four
   themes listed.
 - Probably needs work in the surrounding container and overall better
   page-scrollbar support.
2018-04-13 08:44:02 -04:00
Adriaan de Groot
c9928c99c8 Merge remote-tracking branch 'origin/3.1.x-stable' into 3.1.x-stable 2018-04-12 17:13:34 -04:00
Adriaan de Groot
1340613ef5 [locale] Additional test application for GeoIP processing 2018-04-12 16:55:24 -04:00
Adriaan de Groot
76e37402b3 [locale] Extend tests with negative results 2018-04-12 16:23:54 -04:00
Adriaan de Groot
0c1453ff18 [locale] Fix string value handled by XML parser 2018-04-12 16:23:54 -04:00
Adriaan de Groot
eea421f499 [locale] Add tests for GeoIP handlers
- One sample JSON result
 - Two sample XML results
2018-04-12 16:23:54 -04:00
Adriaan de Groot
6b7c8a694a [locale] Make the style of GeoIP retrieval selectable
- Unchanged config files will continue to use the weird addition
   of /json, and interpret JSON data.
 - Allow to specify full URL with data format through one of
     geoipStyle: json
     geoipStyle: xml
 - XML support is optional
2018-04-12 14:37:38 -04:00
Adriaan de Groot
5b98e58ae7 [locale] Refactor GeoIP handlers
- Read the data in the caller of the handler, instead of in the callers
2018-04-12 12:22:43 -04:00
Adriaan de Groot
939cdff93b [locale] Add alternate GeoIP data format 2018-04-12 12:18:43 -04:00
Adriaan de Groot
aaae1507cd [locale] Convenience function for TZ splitting 2018-04-12 11:51:50 -04:00
Adriaan de Groot
3636226425 [locale] Document change to the way GeoIPURL is handled. 2018-04-12 10:18:15 -04:00
Adriaan de Groot
fe98b789f0 [locale] Document the settings in locale.conf
- The geoipUrl is weird, because it is not a complete URL.
   Document that, and what kind of data is expected.

FIXES #920
2018-04-12 10:15:19 -04:00
Adriaan de Groot
d5623af8ef [locale] Refactor geoip handling
- Configuration **must** be a complete URL. The implementation no
   longer appends /json to the URL.
2018-04-12 10:11:48 -04:00
Adriaan de Groot
c0d5a153d4 [locale] Refactor GeoIP handler
- Move GeoIP to its own cpp file
 - Provide a default implementation of the URL mangler
2018-04-12 09:54:22 -04:00
Adriaan de Groot
445f181cc3 [locale] Start refactoring geoip handling
- Introduce a handler interface for GeoIP providers
 - Move the implementation of FreeGeoIP into a struct of its own
2018-04-12 09:45:48 -04:00
Adriaan de Groot
fa933b9a16 [plasmalnf] Search for theme screenshots
- Search in branding dir, and ., for relative paths,
 - Absolute paths used as-is.
 - Document search as such.
2018-04-10 08:54:47 -04:00
Adriaan de Groot
bfb37e6b37 [plasmalnf] Avoid use of 'uint' 2018-04-09 11:39:45 -04:00
Adriaan de Groot
cb616ec1bb [plasmalnf] Keep fixed size of screenshots (relative to font size) 2018-04-09 11:39:05 -04:00
Adriaan de Groot
5ab01eba9f [plasmalnf] Don't even try to load an empty filename for screenshot.
- Avoid one attempt-to-load if the filename is empty, and one
   re-creating of the Pixmap.
2018-04-09 11:26:43 -04:00
Adriaan de Groot
00a5baa3d9 [libcalamares] Improve process logging
- Don't insert a space before the output of a process
 - To do this, suppress space and quoting on the output, and to do
   that move the labeling-output for warnings and errors into
   the constructor (so that an idiomatic .nospace() does the right thing).
2018-04-05 05:17:21 -04:00
Adriaan de Groot
b5c3fc8cf6 [libcalamares] Improve process logging
- Log output on crash
 - If debugging is on (-d) then also log output on success

FIXES #925
2018-04-05 04:51:51 -04:00
Adriaan de Groot
4d459f7fc0 [libcalamares] Move non-UI stuff from libcalamaresui
- Settings is just a settings class, no UI involved, so
   move to libcalamares where it can be used also from
   system helpers.
 - YAML utilities are useful at a lower level of the stack, too.
2018-04-05 04:31:13 -04:00
Adriaan de Groot
7e5c91aae6 [locale] Reduce debugging bla bla 2018-04-04 11:42:38 -04:00
Adriaan de Groot
032b33f56f [libcalamaresui] Improve logging.
- Put the (constant) 'Calamares will now quit' on its own debug line.
 - Tell the user what the search paths are if a module is not found
   (prompted by a mis-configuration in a Neon live image).
2018-04-04 11:25:28 -04:00
Adriaan de Groot
ddbb9eaebc Merge branch 'improve-logging' 2018-04-04 11:10:51 -04:00
Adriaan de Groot
9fe85e592f Merge branch '3.1.x-stable' 2018-04-04 11:10:34 -04:00
Adriaan de Groot
b8e6144553 [locale] Document how the locale entry in Global Storage works.
- Make the BCP47 value explicitly lower-case.
 - Add some constness and encapsulation.
 - Fix up documentation in the packages module explaining the
   format of the ${LOCALE} replacement (now forced to lower-case,
   but it is also only the language part, not e.g. en-UK).

FIXES #922
2018-04-03 13:07:36 -04:00
Adriaan de Groot
4c04260b97 [packages] Don't change the global package list.
- Count only the packages that will be changed, given the current
   locale settings.
 - Preserve global storage unchanged (don't remove any locale-packages).
2018-04-03 08:28:29 -04:00
Adriaan de Groot
36aede52ef [packages] Example configuration installs a localization package 2018-04-03 08:20:01 -04:00
Adriaan de Groot
fd1279dbe3 [welcome] Make the example configuration less strict 2018-04-03 08:19:45 -04:00
Adriaan de Groot
9cdb6734bf [packages] If locale is empty, pretend it is 'en'.
- Otherwise packages like vi-$LOCALE will be retained in the
   package list, which will cause install problems.
2018-04-03 08:02:16 -04:00
Adriaan de Groot
240efd30f1 [libcalamares] Add support for formatted, table-like output
- Use DebugRow for one-row-at-a-time output with continuations.
 - Use DebugList for one-item-per-line with continuations.
 - Use DebugMap for one-row-at-a-time output of a QVariantMap.
2018-03-30 17:18:45 -04:00
Adriaan de Groot
20e9c2c8e3 Merge branch '3.1.x-stable' 2018-03-29 17:35:36 -04:00
Adriaan de Groot
32a1c84935 [locale] Document the settings in locale.conf
- The geoipUrl is weird, because it is not a complete URL.
   Document that, and what kind of data is expected.

FIXES #920
2018-03-29 16:50:02 -04:00
Adriaan de Groot
fb93a8288e [plasmalnf] Simplify showAll handling
- Only need the showAll parameter once, when passing in the list
   of themes to show.
2018-03-29 10:09:45 -04:00
Adriaan de Groot
b0828faadb [plasmalnf] New setting to show all installed LnF themes
- This enables working in three modes:
   - No themes listed; all are shown without screenshots,
   - Themes listed, showAll false; only those are shown,
   - Themes listed, showAll true; the installed-but-not-listed
     themes are shown after the listed ones, and have limited info.
2018-03-29 09:57:19 -04:00
Adriaan de Groot
c2efae765d [plasmalnf] Add auto-detection of Plasma theme.
- Although it's not necessarily accurate for an extensively-modified
   Plasma configuration, we can read the Look-and-Feel from the
   configuration files. Allows auto-detection.
2018-03-29 08:49:22 -04:00
Adriaan de Groot
11652c5856 [plasmalnf] Add pre-selected theme
- For OEM modes where there is already a theme, add a preselect:
   key to pick a specific theme and have that one come up as already-
   selected in the list.
 - Don't re-run the lnftool if an already-selected theme is clicked
   again. Use toggled() instead of clicked().
2018-03-29 07:59:16 -04:00
Adriaan de Groot
94000b6847 [plasmalnf] Improve wording of LnF explanation. 2018-03-29 04:33:55 -04:00
Adriaan de Groot
6bb72d173d [libcalamares] Drop generic cLog()
- Use cWarning or cError() for errors
 - Use cDebug(level) for other uses (but there aren't any)
2018-03-28 09:31:45 -04:00
Adriaan de Groot
ad6227ce21 [libcalamares] Remove internal functions from the logging API 2018-03-28 09:27:11 -04:00
Adriaan de Groot
3e30bb682e [libcalamaresui] Use cError() for logging errors, not cLog() 2018-03-28 09:22:37 -04:00
Adriaan de Groot
e2b8fb0afe [welcome] Log if no translations matched at all 2018-03-28 07:47:13 -04:00
Adriaan de Groot
cdf80615b8 [libcalamares] Rename the log file 2018-03-28 07:20:19 -04:00
Adriaan de Groot
0f289e2552 [calamares]: Improve startup logging
- Don't bother with the address of the main thread
 - Do put a marker on restart into the log file
 - Do put the Calamares version into the log file (previously, the version
   was printed through cDebug() before the log file was opened, so it was
   lost to the on-disk log).
2018-03-28 05:01:07 -04:00
Adriaan de Groot
789bbe48f8 Merge branch 'master' into secureboot 2018-03-12 10:19:26 -04:00
Calamares CI
1791ac2d43 i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-03-09 11:34:30 -05:00
Adriaan de Groot
70fe023347 Merge branch 'branding'
Documentation lives both in Calamares and in the calamares-branding
repo. Whether a slideshow has navigation arrows or not is up to the
slideshow / branding component author, but Calamares now ships some
support QML to make that easy.

FIXES #841
FIXES #904
2018-03-09 11:24:50 -05:00
Adriaan de Groot
2f66aa9b07 [plasmalnf] Change to IgnoreAspectRatio
It is the distro's responsibility to produce screenshots that look
good; previously I chose to preserve the aspect ratio on the grounds
that this would keep the look of the screenshot even if the distro
had done one in a weird size. This makes the screenshot part
of the LNF selection look weird, though, since then you get
blank parts.

Switch to ignoring the aspect ration; distro's should produce
screenshots in a 12x8 (i.e. 3:2) aspect ratio, preferrably at
least 120x80 pixels -- but keep in mind hiDPI and the default
font sizes of the distro, which may make other sizes look better.

(this follows discussion with BlueStar Linux)
2018-03-09 11:24:41 -05:00
Adriaan de Groot
986c5f5a9a CMake: improve branding component macros
- document preferred component layout
 - simplify parameters to the branding macros
 - allow structured branding components with SUBDIRECTORIES
2018-03-09 11:03:42 -05:00
Adriaan de Groot
f29da8e39e Branding: document preference for standalone branding 2018-03-09 08:48:24 -05:00
Adriaan de Groot
25b9663a40 Branding: remove fancy/ and samegame/ examples
The examples of branding have moved to the calamares-branding repo.
2018-03-09 08:44:20 -05:00
Adriaan de Groot
e4cca9b830 Branding: document how to translate branding 2018-03-09 07:22:36 -05:00
Adriaan de Groot
75df6a4f88 Branding: add example translations to fancy/ 2018-03-09 07:22:30 -05:00
Adriaan de Groot
f8bc195fb4 [libcalamaresui] Improve warning when branding has no translation 2018-03-09 07:21:16 -05:00
Adriaan de Groot
c1bb5e708b QML: apply translation to the slide counter 2018-03-09 07:21:16 -05:00
Adriaan de Groot
97eff28383 QML: Remove binding for quit key in presentation 2018-03-09 07:21:16 -05:00
Adriaan de Groot
8125698696 Branding: expand documentation
- Auto-advance the default presentation
 - Add more example slides to the fancy presentation
 - Expand README.md explaining what the default classes can do
2018-03-08 12:57:50 +01:00
Adriaan de Groot
e7849c5ed0 Branding: fix reference error 2018-03-08 12:19:02 +01:00
Adriaan de Groot
3b8673fb99 Branding: update example, use NavButtons 2018-03-08 12:14:45 +01:00
Adriaan de Groot
7ab79a944b Branding: add example SVGs from Quassel 2018-03-08 12:14:44 +01:00
Adriaan de Groot
b6fd8de126 QML: Use QtQuick 2.5 consistently 2018-03-08 12:14:44 +01:00
Adriaan de Groot
3d89828fe1 QML: drop potentially confusing shortcuts
Removed these features that make sense in a presentation slideshow
(e.g. during a talk) but that are potentially confusing during
a passive slideshow like Calamares has:
 - Using 'c' blanks the slideshow.
 - Entering a slide number + enter changes slides.
2018-03-08 12:14:44 +01:00
Adriaan de Groot
c116dba2e8 QML: add navigation items
- Add a NavButton, which shows a directional arrow, and fades in on hover.
   It can be used left- or right- by setting an image source
   and click handler.
 - Specialize NavButton to Forward and BackButton.
 - Add a SlideCounter navigation aid.
2018-03-08 12:13:44 +01:00
Adriaan de Groot
74080c31f5 Branding: add a fancy branding example 2018-03-07 06:18:18 -05:00
Adriaan de Groot
1e0ecbcc18 [contextualprocess] Warnings-- by dropping destructor 2018-03-06 16:24:12 +01:00
Adriaan de Groot
583cc06f7c [keyboard] Warnings-- for nullptr 2018-03-06 16:23:44 +01:00
Adriaan de Groot
51ccd6be4d [license] Warnings-- by making the one default case explicit 2018-03-06 16:23:29 +01:00
Adriaan de Groot
e2f6d160f8 [tracking] Reduce compile warnings
The fallthrough construction in a switch is a bit confusing
to read, and generates compile warnings too, so break it up.
2018-03-06 16:11:50 +01:00
Adriaan de Groot
defc7d4df8 [welcome] Compile warnings-- 2018-03-06 16:10:53 +01:00
Adriaan de Groot
a9e751bb31 [users] Compile warnings-- 2018-03-06 16:10:31 +01:00
Adriaan de Groot
903e77a908 [bootloader] Adjust documentation 2018-03-06 07:11:10 -05:00
AlmAck
58952b685c the first character must be a comment
to original code would match both lines:
zen_US.UTF-8 UTF-8
#en_US.UTF-8 UTF-8

introducing "#" should check only the commented lines
2018-03-03 14:30:08 +01:00
AlmAck
382c193afa Enable the correct language in the locale.gen list
the original code does not distinguish the document comments inside the locale.gen file from the real locale list. The language was then enabled from the header comments of the file instead of the correct value in the list.

The new code verify tha the complete locale string is just after the first character of the string, enablig only the correct value of the locale list.
An example:
#  en_US.UTF-8 UTF-8 --> document header, should not be enabled
#en_US.UTF-8 UTF-8 --> correct section to enable

Related to this request:
https://code.chakralinux.org/tools/calamares-chakra/issues/2
2018-03-03 12:56:03 +01:00
Calamares CI
1762d5e5d6 i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-03-01 15:42:24 +01:00
Adriaan de Groot
09f30194d7 CMake: revert un-versioning of libcalamares*.so
The install-bits branch commit 83639b182b
dropped .so-versioning for libcalamares and the creation of the Python-
support symlink. This broke KDE Neon dev-unstable because the embedded
Python can no longer find libcalamares.

Installing unversioned .so's straight to LIBDIR is also not a good thing
(according to Debian), so revert to the original scheme with versioned
.so and a Python-support symlink.

Medium-term fix is to install unversioned straight into LIBDIR/calamares
and fix up the RPATH for the executable.
2018-03-01 12:37:52 +01:00
Adriaan de Groot
73a5e0bbcd [libcalamares] Fix up debugging
Using plain cLog() is weird, it doesn't attach a debugging level
so it seems like it's level 0, beyond-critical.
2018-02-27 01:09:43 +01:00
Adriaan de Groot
36ef4556b4 Merge branch 'install-bits'
FIXES #729
2018-02-21 10:15:58 -05:00
Adriaan de Groot
56ce22908e CMake: drop empty calamaresUi
- Empty variable and some unused wrappings doing nothing.
2018-02-21 10:01:23 -05:00
Adriaan de Groot
db0c1ffd6d CMake: just install unversioned .so
- Applies to libcalamares and libcalamaresui.so, install with no
   version, just the bare .so. Since Calamares doesn't do versioning
   anyway, and its plugins should be re-compiled for any change,
   putting them in lib as unversioned .so's should make Calamares
   happy and silence lintian.
2018-02-21 09:52:56 -05:00
Adriaan de Groot
06536b6a66 [bootloader] Refactor method for safe efi label 2018-02-20 10:47:14 -05:00
Adriaan de Groot
de1710a9f3 [calamares] Refactor argument-handling
- Move parameter handling out of main
 - Give -D an argument (log level)
2018-02-20 07:47:06 -05:00
Adriaan de Groot
a1cbb161ee [libcalamares] Make setup of log-level explicit
- Replace the implicit setting of a logging level
   (the first time logging is called) with explicit
   setupLogLevel().
2018-02-20 07:47:06 -05:00
Adriaan de Groot
7f53e970fc [bootloader] Add secure-boot efiBootLoader
- add configuration option
 - check for sensible combinations of firmware, bootloader,
   and complain if it isn't.
2018-02-20 05:10:32 -05:00
Adriaan de Groot
247a0e3a56 [umount] Make a pretty_name() 2018-02-20 04:49:51 -05:00
Adriaan de Groot
060990bdd0 Python: use warning() method in modules 2018-02-20 04:42:56 -05:00
Adriaan de Groot
84d599625f [libcalamares] Give Python jobs a warning()
- Add libcalamares.utils.warning() alongside debug() for
   Python modules to output warnings.
2018-02-20 04:28:45 -05:00
Adriaan de Groot
dbbec4f76d [libcalamares] Use cDebug, polish messages 2018-02-19 17:23:05 -05:00
Adriaan de Groot
d62c7b93c6 [libcalamares] Polish weird namespace use 2018-02-19 17:17:03 -05:00
Adriaan de Groot
0c16bf1179 [finished] Remove useless debugging 2018-02-19 16:55:34 -05:00
Adriaan de Groot
092529da45 [partition] WIP: EFI partition search
- Add some logging (not even sure it compiles) because
   my openSUSE Krypton Secureboot-enabled VM says
   "no EFI system partitions found".
2018-02-19 10:25:00 -05:00
Adriaan de Groot
cf02f7aab5 [libcalamares] Avoid nullptr crashes
- The Python testmodule script can end up calling in to System
   methods (via System::instance()). This is unusual, and the
   System instance has not been created at that point.
   Now, create an instance and warn about it.
2018-02-19 09:47:15 -05:00
Adriaan de Groot
94014a52d4 Merge branch 'context-wildcard'
FIXES #906
2018-02-19 07:04:43 -05:00
Adriaan de Groot
713add5795 [contextualprocess] Add tests
- Tests showed issues with memory management, fixed in previous commits.
2018-02-19 07:04:21 -05:00
Adriaan de Groot
f0ec6c02a3 [shellprocess] ECM has already been searched-for 2018-02-19 07:03:43 -05:00
Adriaan de Groot
23a23a01f1 [contextualprocess] Cleanup destructors
- ValueCheck shouldn't own the pointer, since it's just a QPair
   and there are temporary copies made (e.g. in
   ContextualProcessBinding::append() ) and we get double-deletes.
 - Do deletion by hand; going full unique_ptr would be a bit overkill.
2018-02-19 06:58:42 -05:00
Adriaan de Groot
87e2f13dc2 [contextualprocess] Helper methods for counting checks 2018-02-19 06:42:13 -05:00
Adriaan de Groot
8664400ee9 [contextualprocess] Warn if (global) variable not found. 2018-02-19 06:34:52 -05:00
Adriaan de Groot
699b42a756 [contextualprocess] Add wildcard
- Re-build the structures for doing value-checks, is now more tree-like.
 - Document pointer ownership.
 - Introduce wildcard matches ("*")
 - Don't drop empty command-lists, since they can be used to avoid
   wildcard matches. (E.g. "in this case, do nothing, but don't
   fall through to wildcard").
2018-02-19 06:18:08 -05:00
Adriaan de Groot
2fa6361d63 [branding] Expand documentation
- Make CMakeLists a little more resilient
 - Format docs source
 - Add documentation for the examples
2018-02-19 05:10:17 -05:00
Adriaan de Groot
04de4a0b02 [plasmalnf] Properly scale the image
- Since the image size isn't known a priori (due to sizing based on fonts),
   load the image and then resize in all code paths.
 - Use the right resizing flags.
 - .. and actually use the resulting scaled pixmap.

Thanks to Jeff Hodd.
2018-02-14 11:23:53 -05:00
Adriaan de Groot
83639b182b CMake: try installing outside of regular lib/
- Install unversioned libraries
 - Install to lib/calamares instead of directly to lib/
2018-02-14 08:55:30 -05:00
Adriaan de Groot
958aee1d41 [libcalamaresui] Switch text on 'next' button
- If the next step will be an install-step (e.g. hit the optional
   confirmation step) then change the text on the 'next' button to
   'install'.
 - Do a little refactoring to make that more pleasant.

FIXES #905
2018-02-13 08:11:11 -05:00
Adriaan de Groot
e9d9efce20 Merge branch 'sanitize-logging' 2018-02-13 12:00:17 +01:00
Adriaan de Groot
3ae126f589 [modules] Use cError() as well
- Switch KPMHelpers to using Calamares logging instead of qDebug()
2018-02-13 11:59:38 +01:00
Calamares CI
b33e3294e1 i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-02-13 11:28:28 +01:00
Adriaan de Groot
3315df5df1 [modules] Use new convenience logging methods across the board 2018-02-13 11:07:12 +01:00
Adriaan de Groot
3f77fb1d16 [modules] Use new convenience logging methods 2018-02-12 11:58:34 -05:00
Adriaan de Groot
60f440f72b [libcalamaresui] Use new convenience logging methods
- Remove a few confusing Q_FUNCINFO
2018-02-12 11:58:34 -05:00
Adriaan de Groot
df0d9dcb88 [libcalamares] Provide convenience functions for warning and error 2018-02-12 11:58:34 -05:00
Adriaan de Groot
79d81700b3 [libcalamares] Use -D for just debug-level setting
- Original flag -d sets debugging but also changes behavior
 - New -D just sets debugging
 - Simplify QStringList (use C++ 11)
2018-02-12 10:39:09 -05:00
Adriaan de Groot
ae5511c2f3 [libcalamares] Rationalize logging
- Move logging-levels to an enum
 - (re-)Order logging-levels so that the normal debug statement is
   not the most-important (lowest level).
 - Drop using namespace std;
2018-02-12 10:37:25 -05:00
Adriaan de Groot
6693f81375 [plasmalnf] Document configuration
- Improve documentation, explain necessity of theme: and image: keys
 - Scale screenshot up with font size (numbers picked arbitrarily)
2018-02-12 10:24:33 +01:00
Adriaan de Groot
874514a4e4 i18n: drop orphaned #undefs (thanks Kevin Kofler) 2018-02-08 10:33:40 +01:00
Adriaan de Groot
f49e0f6d92 i18n: update extracted English message files 2018-02-08 10:10:33 +01:00
Adriaan de Groot
0b03d56a40 i18n: Massage code to help lupdate understand 2018-02-07 17:43:26 +01:00
Adriaan de Groot
d27675d660 i18n: drop superfluous QObject* parent
These additional pointers were introduced for translations,
and needed their own tricks to get lupdate to recognize the
strings. Using QCoreApplication::translate() removes the
need to a QObject to provide context. Drop the now-unneeded
parameters.
2018-02-07 17:43:26 +01:00
Adriaan de Groot
c71385e93f i18n: fix broken translation in CommandList 2018-02-07 17:43:26 +01:00
Adriaan de Groot
f954496acf i18n: avoid translation tricks, use QCoreApplication::translate
Instead of using tr and some macro hacks to get lupdate to
recognize the translation, instead use QCoreApplication::translate()
which takes its own context for translation.
2018-02-07 17:43:26 +01:00
Calamares CI
7c8a70c9a1 [dummypythonqt] Automatic merge of Transifex translations 2018-02-07 13:44:18 +01:00
Adriaan de Groot
ad89dd7cc4 [interactiveterminal] Document config 2018-02-07 12:03:13 +01:00
Adriaan de Groot
051edb462f [packages] Add pisi package manager (based on some guesses) 2018-02-01 09:14:54 +01:00
Adriaan de Groot
533031b3ca [bootloader] print() does not log
- use the right logging method; print just vanishes.
2018-01-30 11:26:29 +01:00
Adriaan de Groot
f869a0f263 [bootloader] Log the EFI fallback action 2018-01-30 11:22:36 +01:00
Adriaan de Groot
78108c5cda [bootloader] Allow skipping the EFI fallback 2018-01-29 22:55:07 +01:00
Adriaan de Groot
aed904e3b4 Merge branch 'i897-timeout'
FIXES #897
2018-01-29 22:12:36 +01:00
Adriaan de Groot
9a7e766391 Merge branch 'i895-setroot-context'
FIXES #895
2018-01-29 22:12:23 +01:00
Adriaan de Groot
c2aca1f5c6 [shellprocess] Implement timeout setting
- For both shellprocess and contextualprocess, add a top-level key
   "timeout" that defaults to 10 seconds (which it already did).
 - Allows setting "global" timeout for command-lists, while still
   allowing individual timeouts per-command.
 - Setting timeout per global variable in contextualprocess is not
   supported; that would restrict the possible space of comparisions,
   while not supporting a global setting timeout seems reasonable enough.
   Use instances if you need wildly variable timeouts and don't want to
   set them individually.
2018-01-29 22:08:12 +01:00
Adriaan de Groot
2da430fa36 [libcalamares] Allow CommandLine to have unset timeout
- Introduce enum for the appropriate constant
 - If the timeout isn't set, then defer to the timeout set
   on the commandlist when running the commands.
2018-01-29 21:25:18 +01:00
Adriaan de Groot
c641f5dec6 [libcalamares] Implement object-style command line
- handle command: and timeout: entries
 - test for setting the values
2018-01-29 21:08:42 +01:00
Adriaan de Groot
72bac332be FIXUP document 2018-01-29 20:59:58 +01:00
Adriaan de Groot
4917b5c778 [shellprocess] Add test for future feature
- proposed syntax for command+timeout configuration, both for single-
   entry and for lists.
 - test it already
2018-01-29 17:40:29 +01:00
Adriaan de Groot
fe2be46d3f [libcalamares] Extend command-list with timeouts
- Replace plain StringList with a list of <String, timeout> pairs,
   and run that instead. All code paths still use the default 10sec
   timeout and there's no way to change that.
2018-01-29 17:10:56 +01:00
Adriaan de Groot
ea179eaef4 [contextualprocess] Document command lists
- Show that a command list is also allowed, not just a single
   command. Refer to shellprocess for more documentation.
2018-01-29 17:10:56 +01:00
Adriaan de Groot
6335084aa3 [libcalamares] Determine what's checked and what's required first.
- warn for required checks that are not carried out.
2018-01-29 15:29:25 +01:00
Adriaan de Groot
778feb50e8 [libcalamares] Additional convenience for doubles 2018-01-29 14:45:42 +01:00
Adriaan de Groot
54a9bbb949 [libcalamares] Don't eat output on timeout.
- Copy stdout from timed-out process into the output variable,
   instead of just dumping it into the log file. This will
   improve the user experience, too, because they will get some
   feedback / explanation of what the process has done.
2018-01-26 18:19:38 +01:00
Adriaan de Groot
d6731efdfd [packages] fix typo in docs 2018-01-25 10:44:48 +01:00
Adriaan de Groot
1d6dca062c [users] Make state of 'reuse password for root' available in globals. 2018-01-24 16:19:41 +01:00
Adriaan de Groot
26dfd56f6d [libcalamares] Additional convenience function extracting int 2018-01-24 16:19:22 +01:00
Adriaan de Groot
188a434a10 [dummycpp] more verbose debug log 2018-01-24 16:19:22 +01:00
Adriaan de Groot
b828580464 Merge remote-tracking branch 'origin/simplify-plugin' 2018-01-24 14:22:35 +01:00
Adriaan de Groot
32b10f72e9 Merge branch 'i896-password-quality'
FIXES #896
2018-01-24 14:21:59 +01:00
Adriaan de Groot
b0fe7b0682 i18n: apply some more tricks to make lupdate / transifex happy 2018-01-24 14:13:50 +01:00
Adriaan de Groot
399256ba99 [users] Use explanation of password error from libpwquality
- add license file from libpwquality for provenance
 - translate pwquality_strerror() into the PWSettingsHolder convenience class
 - use Qt translations, since we'd otherwise also have to wire up, and
   wire in, libpwquality gettext translations.
2018-01-24 14:13:50 +01:00
Adriaan de Groot
ed58d540b3 [users] Implement password checking through libpwquality
- Use shared_ptr and a helper class to hide away raw pointer use
   from libpwquality. Provide a convenience C++ API.
 - Simplify configuration through helper class.
2018-01-24 14:13:50 +01:00
Adriaan de Groot
354cb79cb1 [users] sample config and stub function for libpwquality 2018-01-24 14:13:50 +01:00
Adriaan de Groot
27e1de6548 [users] Use libpwquality for additional password checks
- add cmake module to find libpwquality
 - move checking functions to their own file
 - some Transifex hackery
 - stub out the libpwquality check
2018-01-24 14:13:50 +01:00
Adriaan de Groot
eae52a3e65 CMake: build modules alphabetically 2018-01-24 14:13:13 +01:00
Adriaan de Groot
9a9c6da6db i18n: try to trick Transifex into recognizing these strings 2018-01-23 12:11:34 +01:00
Adriaan de Groot
9c9486bb78 [libcalamares] When ViewManager is destroyed, reset instance pointer 2018-01-17 09:17:40 -05:00
Adriaan de Groot
845986d48f [libcalamaresui] Mark virtual QObject destructors override 2018-01-17 09:17:40 -05:00
Adriaan de Groot
97fb83c743 [libcalamares] Change debug logging of how job name is derived 2018-01-17 09:17:36 -05:00
Adriaan de Groot
abc6914528 [libcalamares] Enforce singleton-ness of CalamaresPython::Helper
- unset instance pointer on destruction
 - make constructor private, and the instance accessor
   should create an instance if there isn't one.
2018-01-17 06:18:43 -05:00
Adriaan de Groot
3b3e80b334 [branding] Add a totally different branding example
Use the samegame example from the Qt Quick demos as a branding "slideshow".
Instead of watching slides go by, you can play samegame! Click on
"new game" to start, and then click on groups of same-colored balls to make
them go away -- at least two same-colored balls must be touching.

Once the exec step is done, the game vanishes automatically.

This is an additional example for #841
2018-01-16 17:05:29 +01:00
Adriaan de Groot
86b899566e [libcalamares] Silence compiler warnings about PluginFactories
- d_ptr shadows QObject d_ptr, which clang complains about
 - rename, and don't use Q_D and similar because it messes with internals.
2018-01-16 13:23:51 +01:00
Adriaan de Groot
510af704d8 [libcalamares] Improve documentation
- reference to _WITH_JSON is bogus copy-replace from other code
 - fix style of sample code.
2018-01-16 13:23:51 +01:00
Adriaan de Groot
0020fd885c [libcalamares] Remove unused extern declaration 2018-01-16 13:23:51 +01:00
Adriaan de Groot
a2bdc12f25 [libcalamares] Drop unused plugin defines
- Remove some superfluous intermediate defines
 - baseFactory was not used (always Calamares::PluginFactory)
 - Move DECLARATION and DEFINITIONS apart
 - CALAMARES_PLUGIN_FACTORY_DEFINITION was redefined (identically)
 - CALAMARES_PLUGIN_FACTORY_DECLARATION was redefined (identically)
 - __VA_ARGS__ was constant
2018-01-16 13:23:09 +01:00
Calamares CI
8f1f397c95 [dummypythonqt] Automatic merge of Transifex translations 2018-01-15 10:55:42 -05:00
Adriaan de Groot
be45171638 [finished] Make the *restart now* checkbox more visible.
- Issue asks to make the setting more visible, which seems sensible to
   me. It **is** kind of hidden away for those distro's that make
   the setting visible (not everyone does).
 - While here, add a tooltip explaining what it does.

FIXES #893
2018-01-15 09:33:33 -05:00
Adriaan de Groot
15d4245074 Merge branch 'scripting' 2018-01-15 09:05:30 -05:00
Adriaan de Groot
d6cbda5ed7 [contextualprocess] Implement contextual processes
Allow running one or more commands based on the value of
a global configuration variable. This could, of course,
be done in a Python module with some custom code,
but for simple cases this is more straightforward
to configure through module instances.

Uses the CommandList developed for the ShellProcess
module to do the actual work.

FIXES #874
2018-01-15 08:57:34 -05:00
Adriaan de Groot
f01c7cda6b [libcalamares] Fix debug output classname 2018-01-15 08:41:24 -05:00
Adriaan de Groot
913690650f [libcalamares] Move CommandList into libcalamares
- Move CommandList so it can be used from more modules than
   just ShellProcess
 - Allow a CommandList to run itself. This centralizes
   code for executing one or more commands and simplifies
   the ShellProcess module.

Various small cleanups:
 - mention instance id in log message
 - code formatting / style
2018-01-15 06:52:55 -05:00
Adriaan de Groot
60f4dd7b3b [libcalamares] Improve explanation of failed processes. 2018-01-15 05:51:58 -05:00
Adriaan de Groot
8571fd800e [shellprocess] Make explicit that an error code has been ignored, by logging it. 2018-01-15 05:26:20 -05:00
Adriaan de Groot
e48767eaa6 [shellprocess] Make CommandList chroot-aware
This is prep-work for moving commandlist to libcalamares, where
it can be re-used by more modules.
2018-01-15 04:57:41 -05:00
Adriaan de Groot
8bd40fdcd5 [shellprocess] Warn when there's no script 2018-01-15 04:20:37 -05:00
Adriaan de Groot
2bc394656d [welcome] Make libparted optional
- This turns off the space-available check in the welcome module;
   without libparted, always fail that check.
 - Allows running the welcome module on OS without libparted.
2018-01-13 21:41:07 +01:00
Adriaan de Groot
b0c4fbc1bb Clang: reduce warnings
- mark some things override
 - make conversion of 0 to flags explicit
2018-01-13 21:40:46 +01:00
Adriaan de Groot
fdb3fc1ef8 [shellprocess] Execute the command list 2018-01-12 10:38:40 -05:00
Adriaan de Groot
b7fb24837a [shellprocess] Improve CommandList
- Also allow a single string instead of a list
 - Add count() method to CommandList
 - Drop over-engineering, add more logging
 - Expand tests with some more examples
2018-01-12 10:38:01 -05:00
Adriaan de Groot
5f8fb655c4 [shellprocess] Stub of a shell process module.
This is basically dummyprocess, except with an expanded configuration
interface so you can run 1 or more shell commands in the live
or target system with a suitable configuration file and instance
of shellprocess in settings.conf.

It can replace downstream modules that implement their own
process modules with a command, by an instance of shellprocess.
2018-01-12 10:33:51 -05:00