5957 Commits (4e75ea8bd05f7dda6cc523658765969c27a36e77)

Author SHA1 Message Date
Adriaan de Groot cac3e042d8 [libcalamares] Improve logging in runCommand() (less chatty) 5 years ago
Adriaan de Groot 3a0155b69d [calamares] Fix up multiple-moc of KDSAG
- was getting multiple definitions of moc-related code due to automoc
  combined with KDSAG having its own #include moc, comment-out the include.
- while here, simplify the CMake bits for building KDSAG
5 years ago
Adriaan de Groot 3227658475 [calamares] Fix up multiple-moc of KDSAG
- was getting multiple definitions of moc-related code due to automoc
  combined with KDSAG having its own #include moc, comment-out the include.
- while here, simplify the CMake bits for building KDSAG
5 years ago
demmm 01f0367459 [localeq] use image instead of theme icon 5 years ago
Adriaan de Groot 483c0a84f8 [libcalamares] Update SPDX in modulesystem/ 5 years ago
Adriaan de Groot 21b4a36a91 [libcalamares] Remove empty .cpp file
- Requirement.cpp was there "just in case" the header grew
  functions that need an implementation, but that seems
  unlikely (the header is just a struct of POD).
5 years ago
Adriaan de Groot d83543d904 Merge branch 'calamares' into issue-1176 5 years ago
Adriaan de Groot a873badf87 [libcalamares] Update SPDX identifiers in locale/ 5 years ago
Adriaan de Groot 296146e4f8 [libcalamares] update SPDX licensing on generated files
- the scripts are BSD-2-clause,
- the generated files are CC0 (I'm not *100%* sure about the
  derived file CountryData_p.cpp, which lists countries and
  country codes -- it **is** extracted from CLDR data which
  is not CC0)
5 years ago
Adriaan de Groot 4a3378d8b9 [libcalamares] Repair tests around save/load YAML round-trip
- QStringList doesn't round-trip correctly; add a test to
  demonstrate that.
- Fix existing test to **not** use QStringList, but QVariantList
  (of strings), which is how other code would use it.

The above is **kind** of moot because nothing uses the YAML-save
function, but it might.

While here, fix another test: YAML-loading can load JSON just fine.
5 years ago
Adriaan de Groot e2bf62a64b [libcalamares] Repair test for old Qt
- Qt 5.11 and early 5.12 just don't support Esperanto at all
5 years ago
Adriaan de Groot f08b4e502a i18n: update English source translations 5 years ago
Adriaan de Groot 62a8ee9708 [libcalamares] Add name-for-partition-type method
- add apidox to all the untranslatedFS() methods
- add the most-basic of untranslatedFS(), which works on a given
  FileSystem::Type; this one can handle special cases where
  Cala needs a different untranslated name than what KPMCore provides.
5 years ago
Adriaan de Groot 537aad1222 [libcalamares] SPDX, DLLEXPORT on partition/FileSystem.h 5 years ago
Adriaan de Groot fe3495ff97 [libcalamares] Expand KPMCore tests
- check on FS names as well
5 years ago
Adriaan de Groot 5e5701363c [libcalamares] Test the spot-patch for Johannesburg
- Add a note about notation, degrees-minutes
5 years ago
Adriaan de Groot e35992cf0b [libcalamares] Add spot-patches to timezone data
- for the purposes of Calamares's nearest-location selection algorithm
  for timezone selection, introduce spot patches: alternate markers
  on the map to indicate "things close to here belong in this timezone".
- hide the implementation detail in the find() methods.
5 years ago
Adriaan de Groot 028d424c73 [libcalamares] Expand testing of TZ location lookup
- Cape Town is in South Africa, so one might expect it to get South
  Africa's timezone -- which is Africa/Johannesburg -- but Windhoek
  is closer, so it gets that.
- Port Elisabeth is similar: Maseru lies between it an Johannesburg,
  so it gets the wrong timezone, too.

These both illustrate how the limited resolution of the map, together
with the "closest location" lookup, can give poor results. For most
of South Africa, the "wrong" timezone is closer than the right one.
5 years ago
Adriaan de Groot 6a33e72b58 [libcalamares] Refactor test to be data-driven
- this test is going to get a lot more cases, so prepare for that
5 years ago
Adriaan de Groot 00626fd96c [libcalamares] Refactor timezone loading
- load from a TextStream. This is prep-work for alternate TZ data
  sources.
5 years ago
Adriaan de Groot 0948963d86 [locale] Port TZ widget lookup to new find() method
- The TZ widget uses a different coordinate system (mapping lat and lon
  to pixel locations, and then calculating Manhattan distance from
  that), so needs a different distance function.
- Simplify code: there's just one "closest TZ" function.
5 years ago
Adriaan de Groot 2f871acbfd [libcalamares] Expose distanceFunc-find for timezones 5 years ago
Adriaan de Groot 0fda1dcf7d [libcalamares] Refactor finding-TZ algorithm
- introduce a distance function and use that, rather than coding it
  inside the find() function. This is prep-work for unifying the
  find() calls, based on various coordinate systems.
5 years ago
Adriaan de Groot 473daecdbf [grubcfg] expand config-testing for the new features
- create directories for new tests ahead of the tests themselves;
  this **can** still cause problems if a test is run standalone.
- if creating the grub-dir at runtime is necessary, be informative
  if it fails.
5 years ago
demmm e2a5eb6840 [welcomeq] language bar icon configurable
similar functionality as in welcome module, set in welcomeq.conf
5 years ago
Adriaan de Groot 8bf95b6881 [grubcfg] Support prefer_grub_d settings 5 years ago
Adriaan de Groot 064fff0c12 [grubcfg] Drop default_dir
- the default_dir was only stored in modify_grub_default() to
  create the directory if needed; move that functionality to
  the get_grub_config_paths() function (and drop the "s",
  since it now returns just one).
5 years ago
Adriaan de Groot aa50dfb8a1 [grubcfg] refactor finding-the-grub-paths into a function 5 years ago
Adriaan de Groot f85c70d4d2 [grubcfg] Introduce prefer_grub_d
- new setting for using /etc/defaults/grub.d/ (SEE #1457), not implemented
- add missing fields to schema for config file
5 years ago
Adriaan de Groot 3fc23e3b07 [grubcfg] Fix config schema 5 years ago
Adriaan de Groot 43f9f2e2f4 Merge branch 'issue-1477' into calamares
FIXES #1477
5 years ago
Adriaan de Groot 463ea3c73f [displaymanager] Fix config schema 5 years ago
Adriaan de Groot 2ce12d5368 Merge branch 'issue-1476' into calamares
Go over the locale module again:
- new models that avoid weird casts and inconvenient iteration
- shared timezone data
- simple sorting and filtering
- simplify the map / QML version

FIXES #1476
FIXES #1426
5 years ago
Adriaan de Groot cb20ba6aba [libcalamares] More GS load/save testing
- failures elsewhere boil down to QStringList is not supported,
  but a QVariantList of QVariants of QStrings is.
5 years ago
Adriaan de Groot 0de98fe4c1 [libcalamares] Expand YAML testing a little
- load/save of a stringlist seems to work
5 years ago
Adriaan de Groot dbc49f001e [libcalamares] Test GS
- test insert, remove, emitted signals
- test loading and saving of YAML and JSON

This shows up a big bug in the YAML saving code (which was never
used, it seems, anyway)
5 years ago
Adriaan de Groot a44e6802e5 [libcalamares] Rename tests for consistency 5 years ago
Adriaan de Groot 3c618a9a19 [libcalamares] Fix GS load behavior
- the loadJson behavior did too many notifications, and was likely to
  deadlock; write directly to the map instead and emit only once.
- the loadYaml method did something very different from its
  documentation or intent.
5 years ago
Adriaan de Groot ac713d8c4b [libcalamares] Apply locking to GS access 5 years ago
Adriaan de Groot dc5d98af7d [libcalamares] Address outdates assumptions about thread-safety 5 years ago
Adriaan de Groot 0121e3755b [libcalamares] GS improve load/save
- save should be const
- rename save() to saveJson() for parity with saveYaml()
5 years ago
Adriaan de Groot 104452513b [libcalamares] Document GS
- write apidox for all of GlobalStorage
- while here, polish up the SPDX bits
5 years ago
Adriaan de Groot 527449a102 [libcalamares] Improve GS debugDump() formatting 5 years ago
Adriaan de Groot c64aefe43c [libcalamares] Remove unused include, declaration 5 years ago
Adriaan de Groot 52d1c8f88a [locale] Explicitly update GS from the locale step
- refactor into some free functions (out of the lambda's for connecting)
- introduce new method to call from onLeave(), matching previous
  widget behavior
5 years ago
Adriaan de Groot c69bd972e9 [localeq] Demonstrate "offline" lookups
- we can do GeoIP and GeoNames lookups, **or**
- use Calamares's internal GeoIP lookup and country / city hints.

The online version is much more accurate, but costs more lookups;
in these examples, set it all to "offline" and document what needs
to change (code edit) to use the online version.

It's probably a good beginner job to introduce a bool in localeq.qml
to switch the behaviors.
5 years ago
Adriaan de Groot 71ca1e1544 [localeq] Pick up Config changes before showing the module 5 years ago
Adriaan de Groot 32c8338a9c [locale] QML doesn't like const 5 years ago
Adriaan de Groot 91cc5a2b42 [locale] Update the map-QML implementation
- Config has suitable strings for displaying TZ information.
  Use them and automatic bindings. Don't update the strings manually.
- Suggest online or offline TZ lookups based on what the distro wants.
  Edit the QML to pick online lookups (needs access to the geonames
  service, though).
- Drop the variables that point at config and geoip: the Config
  object has a currentLocation, which is filled in by both the
  configuration and any GeoIP lookup -- it doesn't have city
  or country information though.
5 years ago
Adriaan de Groot 15a8d62986 [locale] Add a 'current timezone' strings to Config
- status is a longer phrase
- name is a short human-readable name
- code is the internal code

Code that writes its own "Timezone set to" messages can use
the name, rather than the status.
5 years ago
Adriaan de Groot eda14ce548 [locale] Avoid nullptr deref
- when no location has been set at all, there's no sensible TZ
  to report; just leave it blank. In *practice* you won't hit this
  code from the Calamares UI before a location has been set, because
  the Config object is instantiated and then immediately configured,
  but from tests or unusual UIs it could be.
5 years ago
Adriaan de Groot b36ad4c7f4 [locale] Add test for Config initialization
- needs some massaging because Config otherwise depends on
  ModuleManager which is a UI class (for the Reasons),
  but we already have a BUILD_AS_TEST define for that purpose.
- demonstrate a nullptr deref.
5 years ago
Adriaan de Groot 04e53be934 [locale] Repair test: don't re-init te occupied-pixels set each loop
- while here, merge Tests.h to the cpp file
- Fix build when debugging timezones (missed during earlier refactor)
5 years ago
Adriaan de Groot 21f97db8fd [libcalamares] Offer translation lookup of regions 5 years ago
Adriaan de Groot ad3c0de936 [libcalamares] Reduce logging in POD manipulation 5 years ago
Adriaan de Groot 296337d45d [libcalamares] Implement nearest-TZ lookup
- This version, based on lat+lon lookup, handles wrap-around the
  globe at -180 W (which is very close to +180 E)
- Test wrap-around-the-globe lookups
5 years ago
Adriaan de Groot 9e274aac07 [libcalamares] Make ZonesModel more QML-friendly
- expose TZ lookup (as a QObject*, which QML needs)
- C++ code should use find(), which is safer
5 years ago
Adriaan de Groot ab69e7c83a [libcalamares] Add API for geographical lookup
- find a zone given lat, lon -- with a failing test and a bogus
  implementation.
5 years ago
Adriaan de Groot 626dd038da [locale] Re-do locale module with new TZ data
- The Config object now uses the re-done models and timezone data
- most of the properties of the locale Config are unchanged
- much less complication in extracting data from the zones model
5 years ago
Adriaan de Groot d814a3dba8 [libcalamares] Sort the models before use
- zones and regions alphabetically by key
5 years ago
Adriaan de Groot 37c211fd14 [libcalamares] Add an iterator for the full zones model 5 years ago
Adriaan de Groot 7ea2ad7dc6 [libcalamares] Add accessors for TZ data and region in the model
It's convenient when e.g. QComboBox::currentData() gets the key
"automatically", and the default role for that method is UserRole,
so let the value of KeyRole overlap.
5 years ago
Adriaan de Groot 245d4a8ef7 [libcalamares] Add a find() to ZonesModel
- Look up TZ data by region and zone name.
5 years ago
Adriaan de Groot 478a275764 [libcalamares] Make TimeZoneData public
- Also make it a QObject so we can add properties and make it useful
  for QML consumption.
5 years ago
Adriaan de Groot 10fb5b95c7 [libcalamares] Split out CStringPair into TranslatableString
The (renamed) class TranslatableString keeps a key value
(e.g. New_York) and a human-readable version around; the
human-readable one is passed through QObject::tr() for translation
on-the-fly.
5 years ago
Adriaan de Groot 3e32335511 [libcalamares] Introduce a filtering model per-region 5 years ago
Adriaan de Groot 1afdcc9c82 [libcalamares] Give zones data, too
- while here, fix bug in TimeZoneData that didn't munge names
  (so it reported "New_York")
5 years ago
Adriaan de Groot 33e39b92fb [libcalamares] Satisfy test, return region names 5 years ago
Adriaan de Groot 609ea8350c [libcalamares] Failing test: there is data in the regions model 5 years ago
Adriaan de Groot 82cc652f55 [libcalamares] Re-done zones loading
- just make one big list of zones, one short list of regions
- the models are non-functional right now
5 years ago
Adriaan de Groot ca40d2e2d9 [libcalamares] Introduce a failing test for the number of regions 5 years ago
Adriaan de Groot fce05acf1e [libcalamares] Rip out all the TZ models
- The models are overly complicated: **overall** there is just one
  list of timezones, and we need various views on that list.

Start over with an empty model of regions.
5 years ago
Adriaan de Groot 5066624a8e Merge branch 'issue-1471' into calamares
FIXES #1471
5 years ago
Adriaan de Groot 082770032f [hostinfo] Massage test to handle ARM
- there **is** another source of information about the CPU,
  so in the test use that to cross-check what hostCPU() says.

NB: it's probably a good idea to fall back on the same file
    in hostCPU() for better accuracy.
5 years ago
Adriaan de Groot 272cf099be [hostinfo] Try to recognize ARM as well
- /proc/cpuinfo is a terrible information source; it contains very
  different information on x86 from arm (testen on rpi4 and rock64).
5 years ago
Adriaan de Groot b49b9a66e6 [users] Drop data-access from the Page
- get username, password etc. from the config object, not the page
- jobs now depend entirely on config
- handle logic of "what's the root password" in Config
5 years ago
Adriaan de Groot eb72d662d1 [users] Add password fields to Config
- no checking is done for validity, and there is no password-status
5 years ago
Adriaan de Groot b2b9ae7799 [users] Add tests for moved password-check configuration
- link the PW checks to the test, and libpwquality if needed
- test only does very basic config-mungeing
5 years ago
Adriaan de Groot 900deb5dc8 [users] Move the configuration of password checks to Config
- the Widget (Page) does not need to know the password checks,
  that's business logic that belongs to Config.
5 years ago
Adriaan de Groot 7b87242107 [users] PW checking does not need widgets 5 years ago
Adriaan de Groot 0ecf1e1cc1 [users] Drop default parameter for badness 5 years ago
Adriaan de Groot fcafe5db8f [users] Test the moved setHostname Config
- document that the default for writeHostsFile is *true*
5 years ago
Adriaan de Groot 2efce1ac7a [users] Move the hostname-setting config
- The configuration for writing the hostname (to /etc/hostname,
  to /etc/hosts and possibly to systemd-hostname) is read-only,
  because it comes from the config file and won't change after.
5 years ago
Adriaan de Groot 35dff4d12c [users] Migrate reuse-password and password-strength to Config
- add the "reuse user password for root" setting to Config,
  make the UI page follow that setting.
- add the require-strong-password default and toggle settings to
  Config; this is not well-checked yet.

On the widget / UI side, connect checkboxes only if they are
visible; refactor reuse-user-password-for-root settings.
5 years ago
Adriaan de Groot 44bc61d4be [users] set up Config object before widget 5 years ago
Adriaan de Groot 05f3fbea05 [locale] Apply SPDX headers 5 years ago
Adriaan de Groot 3f1b31e352 [libcalamares] Explicit tests for Interlingue
- The language code "ie" is not recognized,
- "ia" is, and it seems to be the post-war variant of
  Interlingue, so we may want to rename / relabel.

The testEsperanto test -- now split into scripts and
esperanto -- would have picked "ie" out of the list
because it does map to C locale.
5 years ago
Adriaan de Groot b27bc11975 [libcalamares] Merge locale tests files
- No need for a separate .h in most test cases
5 years ago
Adriaan de Groot 320779ccbe [libcalamares] Document Job::prettyDescription
The TODO said it was unused: it **is** used, but only in
a very limited scope. Drop it from jobs where it wasn't
useful (e.g. those that just return prettyName(), outside
of the partition module).
5 years ago
Adriaan de Groot 88e5e98d29 [libcalamares] Use consistent type alias (Descriptor) 5 years ago
Adriaan de Groot ea709aab59 [libcalamaresui] Swap out unstructured string for structured data 5 years ago
Adriaan de Groot b5c0158ec2 [libcalamares] Some if-method-exists trickery
This builds some machinery so that we can create
a detector for member-functions (methods) named <whatever>.
Use the macro to build the machinery:

DECLARE_HAS_METHOD(myFunction)

then after that,

has_myFunction<T>

is either std::true_type or std::false_type
depending on whether T has a method myFunction.
5 years ago
Adriaan de Groot 7b6ff8dd37 [libcalamares] Minor tests for parts of RAII 5 years ago
Adriaan de Groot 0902c74809 [hostinfo] Editorialize on the tests
- the implementation understands Intel and AMD, but the test
  was written for my desktop machine (which fails elsewhere).

SEE #1471
5 years ago
Adriaan de Groot b1b81f27cc Merge branch 'issue-1297' into calamares
This does **not** result issue-1297, but brings in some
prep-work and pleasant clean-ups.
5 years ago
Adriaan de Groot 41ce42cd4b [partition] Drop InstallChoice enum from Page
- The enum for install choice was copied into PartitionActions and
  used in the Config object; its definition does not belong in the UI.
- Chase the renamings required.
5 years ago
Adriaan de Groot e21a2f0676 [partition] Add InitialInstallChoice to Config
- add an option to select what button should be selected when the
  partitioning module is started; TODO: the actual functionality is
  **not** implemented.
- drop the previously suggested name, which didn't get beyond the
  comments-in-the-config-file stage (but which intended to do the
  same things as this one)
- add option to schema already, even if it's not implemented.

See #1297

FIXUP conf
5 years ago
Adriaan de Groot 380e2b3613 [partition] Fix up schema file 5 years ago
Adriaan de Groot 42889b5d7f [users] Perhaps triggers the build failure
- This is the only use of STATICTEST together with , and is the only
  one failing to link.
5 years ago
Adriaan de Groot fec8361ed5 [partition] Drop "convenience" functions
- the functions are used just once
- thin wrappers for named-enum methods that are just as convenient
5 years ago
Adriaan de Groot 824dac62d8 [partition] ChoicePage to use Config object 5 years ago
Adriaan de Groot d103c42091 [partition] Fix build now swapChoices lives in config 5 years ago
Adriaan de Groot baabcc5bb4 Merge branch 'calamares' into issue-1297 5 years ago
Adriaan de Groot 33fd5a1fad [partition] Report a valid choice if a partition is selected 5 years ago
Adriaan de Groot ef4c2666e1 [partition] Update icons on all state changes
The encryption widget (passphrase for disk encryption) should show
ok / warning / error whenever the state changes; this avoids
it showing up first with **no** icon (it should show a warning
when both passphrases are empty).
5 years ago
Adriaan de Groot 0eb1f002db [partition] defuse is-next-enabled
Both the KPMCore and the ChoicePage -- asynchronously -- were connected
to the nextStatusChanged() signal. So if the core said next was true,
that could end up communicated to the ViewManager, enabling the *next*
button in the UI.

Changing to the *erase* page generally triggers a KPMCore reload,
which later emits a `hasRootMountPointChanged()` signal, once the
layout is applied and the disk gets a root mount point. So we'd
get a `true` from KPMCore, which -- because it was connected directly
to the signal to the VM -- would override any other considerations.

Hook up both signals to an intermediate slot that just recalculates
whether the next button should be enabled, based on the state
both of the Choice page and whatever else.
5 years ago
Adriaan de Groot f1c4caba48 [partition] Refactor checking next-enabled
- move the calculations to an own method (so it can use
  early-return and log things to explain why next is disabled)
5 years ago
Adriaan de Groot 43cd415d9a [partition] Switch to 'modern' Error/ok icons 5 years ago
Adriaan de Groot 892e9798f4 [users] Sanitize tests
- move the testing of config-object methods to its own tests
- simplify file structure for the password job tests
5 years ago
Adriaan de Groot cc1136fb0e [users] Untangle tests
- name sources for tests consistently Test<something>
- chase some required source changes with the renaming
- name test targets consistently too
5 years ago
Adriaan de Groot f75839340a [users] Drop QRegExpValidator
- QREValidator is a GUI part, so to avoid a dependency on GUI for the
  (non-GUI) Config object, port to the simpler QRE (which we had
  available anyway)
5 years ago
Adriaan de Groot b9372ba432 [users] Move default groups setting to Config
- drop groups from the viewstep
- note that the Config object should also be in charge of creating
  Jobs (but then the de-tangling needs to be completed)
- add tests of default groups loading

Doesn't compile because QRegExpValidator is a gui thing.
5 years ago
Adriaan de Groot bfa1f618c7 CMake: Improve RCC version-checking
Previously, we check for RCC support every single time CMake runs.
This is slightly wasteful, and it wasn't being done right anyway.
But it's moot because:

- Calamares supports back to Qt 5.9
- Qt 5.9's version of rcc (at least, 5.9.7) **does** support the
  command-line argument `--format-version 1`
- Everything newer does too.

Simplify translations a little, too: just use autorcc rather than
building things by hand.
5 years ago
Adriaan de Groot 38b347f8f2 [libcalamares] Take ownership of the versioning headers
- The sources were in src/calamares but processed and generated
  in libcalamares, which is weird at best.
- Generate an "extended" version header.
- Use the extended version in the logger and nowhere else.
- While here, minor coding style cleanups

The overall change here means that after running CMake, only
Logger.cpp needs to be rebuilt (if the extended version has
changed) and not a handful of other files that don't need the
full version number, but do happen to include CalamaresVersion.h
5 years ago
Adriaan de Groot 9568fc082f [calamares] Try to reduce compile-churn with version header
- Very rarely do we need the full-git-version of Calamares,
  so split that into a separate header with a little trickery.
- In the "normal" version header, drop the full-git-version values.
5 years ago
Adriaan de Groot b06498194e [machineid] Fix up schema
- schema didn't allow recent (2019) configuration entries
- remove mention of deprecated key from example config
5 years ago
Adriaan de Groot cc2e3f79ff [users] Move job creation from widget to viewstep
- This is a half-step: the ViewStep shouldn't do job creation either,
  eventually it needs to be the Config object, but this is better
  than asking the widget (UI) to create some jobs.
- When updating login- or host-name, or the autologin setting,
  set it in GS as well. This is a minor improvement over doing
  it only when leaving the page.
- Since the Config object isn't complete, there are leftovers in
  the widget, which has a fillGlobalStorage() for the not-jobs-related
  bits previously in createJobs().
5 years ago
Adriaan de Groot 6a03bcb25e [users] Move setRootPassword to Config
- this really controls whether a root password is written during installtion,
  so rename to writeRootPassword in the code.
5 years ago
Adriaan de Groot 45b71c24e7 [users] Move autologin setting to Config 5 years ago
Adriaan de Groot 6c930af5cb [users] Use convenience method for labeling Full Name 5 years ago
Adriaan de Groot 0813ec3327 [users] Misc cleanups
- unused includes
- avoid "my--pc" .. the dash is inserted by makeHostnameSuggestion()
5 years ago
Adriaan de Groot 9018913af5 [users] Move hostname validation to Config 5 years ago
Adriaan de Groot 40d7d1baac [users] Move login validation to Config object
- add a loginNameStatus which is a QString (empty if things are ok)
  stating what's wrong with the loginName, if anything.
5 years ago
Adriaan de Groot a564d7a753 [users] Fix build on Linux 5 years ago
Adriaan de Groot d4a784f521 [users] Hook up full name to Config 5 years ago
Adriaan de Groot 630a508049 [users] Hack - create the widget anyway
- since the configuration is in the UI parts, we need the widget still
  to load the whole configuration (until the config object is complete).
  Create the widget before doing configuration; this is wrong. But now
  we don't hit nullptr derefs all over.
5 years ago
Adriaan de Groot 8a14cc7ffc [users] Move some configuration from Page to Config object
- make the HostName textbox just a view on the Config's HostName
- make the username and login textboxes view onto Config
- query the Config rather than the UI for job data
5 years ago
Adriaan de Groot 5ffa09000a [users] Add hostname guessing to Config 5 years ago
Adriaan de Groot 411a202ba5 [users] Do some login-name guessing 5 years ago
Adriaan de Groot 66ae1823a5 [users] Give Config object a user and login name
- This is incomplete, because the business logic of guessing
  a login from the username is not here.
5 years ago
Adriaan de Groot 35916eb20f [users] Move autologin and sudoers groups to Config 5 years ago
Adriaan de Groot 2f786079f3 [users] Move shell settings to the Config object
- this is a set-only property (as far as the current ViewStep is
  concerned) and is passed around in GS for non-obvious reasons.
5 years ago
Adriaan de Groot 8497aad7a1 [users] Apply coding style 5 years ago
Adriaan de Groot f9b114a67a [users] Pass the Config object to the Page
- delay construction of the Page (widget) until it's needed
- hand the Config object to the Page on construction

This is prep-work for putting the configuration information into the
Config object, rather than in the UI elements.
5 years ago
Adriaan de Groot dab831b2ff [users] Introduce a (stub) Config object 5 years ago
Adriaan de Groot 1e08ee084f [users] Actually add the test file 5 years ago
Adriaan de Groot 92938f63f8 Merge branch 'move-permissions' into calamares 5 years ago
Adriaan de Groot 8ce7457023 [users] Add test for create-users code
- just one test for groups-file loading
- while here fix bug that blank and comment lines were being
  kept as valid group names
5 years ago
Adriaan de Groot 8a6e4af511 [users] FreeBSD support creating user
- call pw useradd and pw usermod as needed; the code paths are basically
  the same in invoking a program in the target system to do the work.
5 years ago
Adriaan de Groot 26b8c82630 [users] Refactor user-creation and user-group-setting into methods
- This is prep-work for handling other tools for user- and group-
  creation as well.
5 years ago
Adriaan de Groot 1fddf723fe [users] FreeBSD support creating groups 5 years ago
Adriaan de Groot b99b87f787 [users] Explain some weird internals 5 years ago
Adriaan de Groot 90a0605f38 [preservefiles] [users] Use the Permissions methods
- don't call out to tools (executables) when we have an API for it
  (which might call out to those tools, but that's abstracted)
5 years ago
Adriaan de Groot 59dff815fc [libcalamares] Additional apply() methods for Permissions 5 years ago
Adriaan de Groot 1babcd2aa4 [libcalamares] Put Permissions in CalamaresUtils namespace
- most of the things in utils/ are in the CalamaresUtils namespace,
  let Permissions follow suit. Chase the name change in the
  *preservefiles* module.
- add an `apply()` function for doing the most basic of chmod.
  Note that we don't use `QFile::setPermissions()` because the
  **values** used are different (0755 for chmod is 0x755 in the
  enum value passed to `setPermissions()`).
5 years ago
Adriaan de Groot d6910b47b5
Merge pull request #1464 from apt-ghetto/fixManualPartitionMsg
Revert Manual Partition instructions
5 years ago
Adriaan de Groot a01c428270
Merge pull request #1465 from apt-ghetto/fixRootUsername
[users] Do not allow 'root' as username
5 years ago
demmm 3a3507f2b2 [keyboardq] remove background image use
make the module more in line with the look of the rest of Calamares
5 years ago
apt-ghetto 01b22d27a8 Do not allow 'root' as username
On the "Users" tab, the user can choose a username. It was possible to
use 'root' as username, which led to an installation error, because
'root' exists already.

Added a new check to the username validation.

Fixes #1462.
5 years ago
apt-ghetto 2b3cc17782 Revert Manual Partition instructions
With PR calamares/calamares#1357 the label of the "Manual partitioning" option
was changed, which introduced several downsides:
  * The label is shown for UEFI and for BIOS installations.
  * The mountpoint of the ESP is and should be distro specific.
  * The label always mentioned GPT, which is irrelevant.
  * The label should explain, what the option does, and not, what
    problems can occur under certain circumstances.
5 years ago