Commit Graph

3308 Commits

Author SHA1 Message Date
Caio
d15ce56c97 [partition] Initial implementation of VolumeGroupBaseDialog. 2018-06-04 16:31:58 -03:00
Calamares CI
54515688f7 i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-06-04 08:21:59 -04:00
Adriaan de Groot
8430970e71 [preservefiles] Reduce copying by using const-ref into list 2018-06-07 13:47:41 +02:00
Gabriel Craciunescu
41d427e543 [modules]: hwclock fix typo
- methode -> method
2018-06-01 17:45:40 +02:00
Adriaan de Groot
b66d4856e7 [libcalamaresui] Use modern C++ for (auto)deleting failed modules 2018-05-30 07:51:23 -04:00
Adriaan de Groot
40b60abcb3 [locale] Move constants for map-munging
These don't have to be defines at all.
2018-05-29 11:29:44 -04:00
Adriaan de Groot
1ee87c3cde [locale] Drop debugging define 2018-05-29 08:16:43 -04:00
Adriaan de Groot
6b3299e6ff [locale] Adjust the North
- Fudge the numbers in the North, to improve location
   of the pins and lines of latitude.
 - Inuvik, Yellowknife, Cambridge Bay, Resolute look ok
 - Thule, Scoresbysund look ok; Danmarkshavn a pixel or so too far North
 - Reykjavik is a bit too far North
 - Longyearbyen is a bit too far North

Since these places are off by one or two pixels, this becomes
invisible when a large pin + text label is placed on it.
2018-05-29 08:16:43 -04:00
Adriaan de Groot
4bacafb411 [locale] Fix timezone pixel map for Tierra del Fuego region
- Punta Arenas, draw like it's in -4
 - Ushuaia, draw like it's in -3

FIXUP pixel
2018-05-29 08:15:33 -04:00
Adriaan de Groot
b7dbc8cc1f [locale] Name zones when debugging
- When debugging timezones, state their names (e.g. UTC offset)
   and also log the pixel position under consideration.
2018-05-29 06:33:50 -04:00
Adriaan de Groot
2c18ba6ddb [locale] Adjust latitude calculation in the southern hemisphere
The scaling on the map was a little off; the degrees of latitude
are a little wider there than around the equator and Europe.

 - Johannesburg is in the right spot
 - Hobart is no longer a suburb of Melbourne
 - Punta Arenas is in Chile
2018-05-29 06:09:25 -04:00
Adriaan de Groot
9f8f76befc [locale] Introduce timezone-widget debugging
Replace pin and text label with just a dot (to pinpoint where
locations are) and draw latitude lines on the globe when
DEbUG_TIMEZONE is set at compile time. Since there's probably
still timezone-related bugs (in particular in the images that
map points on the globe to timezones), leave this in the codebase.
2018-05-29 06:09:25 -04:00
Adriaan de Groot
eddee7d76a [libcalamaresui] No point in isLoaded() being virtual. 2018-05-29 03:38:17 -04:00
Adriaan de Groot
a04915e6fa [libcalamaresui] Add 'emergency' concept to modules. 2018-05-29 03:37:37 -04:00
Adriaan de Groot
fdda1ef840 [bootloader] Mimic openSUSE's efibootmgr calls 2018-05-28 11:47:47 -04:00
Adriaan de Groot
dad3669eae [bootloader] Take a stab at determining the shim name 2018-05-28 09:26:20 -04:00
Adriaan de Groot
e4bda546cf [bootloader] factor our EFI-platform-bitness discovery 2018-05-28 09:24:43 -04:00
Adriaan de Groot
cbd62fbeb1 Merge branch 'master' into secureboot 2018-05-28 05:04:03 -04:00
udeved
a878c1a610 add openrccfg 2018-05-28 01:31:55 +02:00
Calamares CI
51b50b9366 i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-05-26 07:24:36 -04:00
Adriaan de Groot
50dea6ded3 [interactiveterminal] Make optional if requirements not met
This is orthogonal to the SKIP_* mechanism already documented
for avoiding modules. If the module is enabled, but its dependencies
are not present, don't bother building the module. This follows
e.g. plasmalnf as an "avoidably heavy dependency".

Related to a misplaced comment in ISSUE #956
2018-05-26 07:09:01 -04:00
Adriaan de Groot
ce3e09318a [preservefiles] Improve failure messages 2018-05-24 07:03:19 -04:00
Adriaan de Groot
28a42a7230 Merge branch 'filepreserver' 2018-05-24 06:52:27 -04:00
Adriaan de Groot
cdadc2f003 [libcalamares] Improve error logging during module loading 2018-05-24 06:47:13 -04:00
Adriaan de Groot
182458ad5a [calamares] Need a JobQueue and global storage before running any job.
The 'singleton' instances don't do a very good job of being singletons
or ensuring their own creation.
2018-05-24 06:46:11 -04:00
Adriaan de Groot
48771f968a [calamares] Load and execute the modules
This runs dummyprocess, at least, but the other three dummies coredump.
2018-05-24 06:46:11 -04:00
Adriaan de Groot
308f508c7e [calamares] Add a test-application.
This test-application should load a single module and execute it --
that can be used to quickly test configurations, loading, etc. This
is preparation for loading all sorts of Python modules by PythonQt.

The loader does some internals initialization and gets the module,
but doesn't actually run it yet.
2018-05-24 06:46:11 -04:00
Adriaan de Groot
fdda0e14aa [libcalamaresui] Improve explainYamlException
- overloads for common kinds of label
 - improve error reporting when reading settings and branding files
2018-05-24 06:46:11 -04:00
Adriaan de Groot
e5ca8e091f [libcalamaresui] Use refactored loadYaml 2018-05-24 06:46:11 -04:00
Adriaan de Groot
261c545476 [libcalamaresui] Refactor loading of YAML to QVariantMap 2018-05-24 06:46:11 -04:00
Adriaan de Groot
f26ac63c07 [libcalamaresui] Make Python code const
- This is always loaded into the Python context, so it may as well
   be done only once.
2018-05-24 06:46:02 -04:00
Adriaan de Groot
d3e57e9c9f [shellprocess] Expand tests
These tests run (shell) commands as part of the test; this may be
a security problem, although I've tried to do things safely.
2018-05-23 13:49:23 -04:00
Adriaan de Groot
87b9c42158 [shellprocess] Don't crash test
- May need to create a JobQueue before doing anything internal
 - May need to create global settings
 - Chroot always needs rootMountPath internally
2018-05-23 10:01:31 -04:00
Adriaan de Groot
8b00a03423 [shellprocess] Test command-substitution 2018-05-23 09:29:43 -04:00
Adriaan de Groot
b5d900c1c6 [libcalamares] Allow a @@USER@@ replacement in commands
- Following example in preservefiles module, allow @@USER@@
   in commands (e.g. to do something specific in the home-dir
   of the new user).
2018-05-23 09:25:57 -04:00
Adriaan de Groot
b7890d865f [preservefiles] Save GS, munge destination
- using `from: config` now writes a JSON file
 - using @@ROOT@@ and @@USER@@ in dest does a sensible
   substitution.
2018-05-23 09:09:03 -04:00
Adriaan de Groot
ac287a0ac5 [libcalamares] Add a save() method to global storage
- This is a quick way to dump GS to JSON, which is useful
   for the preservefiles module #928
 - Also useful for, e.g., #466
2018-05-23 08:53:11 -04:00
Adriaan de Groot
dae84d3bb1 [users] Improve explanation of other steps of adding a user 2018-05-23 08:11:49 -04:00
Adriaan de Groot
01ff1efc5d [users] Improve explanation when useradd fails 2018-05-23 07:03:59 -04:00
Adriaan de Groot
0d24c1db6c [users] Introduce userShell setting
- Add a *userShell* key, which can be left out (default, backwards-
   compatible) to retain the old /bin/bash behavior, or explicitly
   set to empty to defer to useradd-configuration, or explicitly
   set to something non-empty to use that shell.
2018-05-23 05:23:46 -04:00
Adriaan de Groot
ed15edabf9 [users] Document passwordRequirements and code 2018-05-23 04:37:18 -04:00
Adriaan de Groot
3a59574128 [users] Factor out command-line to useradd
- This is prep-work for #964, which was caused by #955
 - Original assumption was that distro's would have a working
   useradd configuration; @abucodonosor already pointed out that
   this was probably not the case, but I ignored that.
2018-05-22 11:45:39 -04:00
Adriaan de Groot
6aa5be192b [netinstall] Drop unused includes 2018-05-22 11:43:14 -04:00
Calamares CI
a79e62ac6b i18n: [dummypythonqt] Automatic merge of Transifex translations 2018-05-22 11:37:24 -04:00
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