5075 Commits (b074696ac1a51dbf237ab5994b94e90f32a209a6)

Author SHA1 Message Date
Adriaan de Groot 7752cf31b3 [users] Improve documentation of setRootPassword 6 years ago
Adriaan de Groot 14979b1630 [libcalamares] TemporaryMount with backwards logic
- because mount() returns an exit code, and 0 is "success",
  the if (!code) was backwards: when mounting succeeded, the
  TemporaryMount object thought it failed.
- This leads to temp-mounts being left *all over* the place
  from os-prober and fstab-handling.
6 years ago
Adriaan de Groot a865620f90 [calamares] Easter egg: running -D8 will show the Debug Information button 6 years ago
Adriaan de Groot ee52e37b36 [libcalamares] Don't hard-code full paths
- See editorial in the code-comment. Still need to test that
   chroot(8) doesn't need a full path, otherwise this will
   go to /usr/bin/env udevadm to force lookup (redundantly
   if not in a chroot)
6 years ago
Adriaan de Groot 8c527ab592 [users] Overwrite host(s|name) files in target 6 years ago
Adriaan de Groot 4621937477 [users] Use right check on writing hostname
- !failed() also means "didn't write the file because it already
  exists", which is sometimes acceptable -- but not here.
  Use the more-strict bool() conversion, which is only when
  the file was actually written.
6 years ago
Adriaan de Groot 862b7e34df [libcalamares] Add tests for file-overwrite 6 years ago
Adriaan de Groot f89951716e [libcalamares] Add mode to createTargetFile()
- Unconditionally **not** overwriting the target file isn't an option:
  writing hostname, for instance, expects that to be done even
  if `/etc/hostname` already exists on the target filesystem.
6 years ago
Adriaan de Groot 6a02f2cfec [machineid] Fix tests
- Make tests more resilient: do them in a temp-dir, and clean it
  up after successful tests. This was prompted by tests failing
  because of things hanging around in /tmp.
6 years ago
Adriaan de Groot adf81c0ab5 [locale][packagechooser] Fix tests, QCOMPARE again 6 years ago
Adriaan de Groot 6352b50ed0 [initramfs] Fix more tests 6 years ago
Adriaan de Groot e49fb74847 [libcalamares] Fix more tests 6 years ago
Adriaan de Groot 39cc43f26b [libcalamares] Fix tests
- QCOMPARE() is sensitive to differing types in actual and expected,
  and uchar and int (and mode_t and int) are different.
6 years ago
Adriaan de Groot a78556b56a [unpackfs] Revert text mode
- Follow original patch from Gabriel Craciunescu: just drop
  the *bufsize* parameter and stick to binary reads.

Text mode was associated in my testing with multiple hangs,
which didn't show up during binary-reads.
6 years ago
Adriaan de Groot 248776144e [unpackfs] Now it's text, it's not encoded anymore 6 years ago
Calamares CI aec6058dc5 i18n: [dummypythonqt] Automatic merge of Transifex translations 6 years ago
Adriaan de Groot 61ca6384cc [partition] Fix tests
- One of the files listed in the test has moved (to libcalamares),
- Don't bother with an extra intermediate SRCS variable.
6 years ago
Adriaan de Groot 6d0f5e4111 Merge branch 'kpmcore-manager' 6 years ago
Adriaan de Groot a2d245ef92 Merge branch 'issue-swaps' 6 years ago
Adriaan de Groot 327c1c0e7b [unpackfs] Reading from the pipe is line-oriented
- Using bufsize=1 causes warnings, since we never bothered
  to explicitly set text mode.
6 years ago
Adriaan de Groot 7c7af28a0d [unpackfs] Make clear that the FS is unsupported by *this* kernel
Patch from Gabriel Craciunescu. FS support is determined be
the kernel, not by Calamares, so make that clearer in the message.
6 years ago
Adriaan de Groot 50161cdab9 [grubcfg] Use own swap
- In situations where there are more swap partitions, only use
  partitions this install "owns".
6 years ago
Adriaan de Groot 5247c13f98 [partition] Follow 'claimed' settings for claiming swap
- By the time the GS is actually written, new (for partition state)
  is always false. So "new" is the wrong thing to track. It should
  have had a better name anyway,
- We store custom properties on the partition objects to indicate
  what happens to them; use those properties (instead of state,
  as done originally), call it "claimed" to indicate that the partition
  is part of this installation.

For now, only new (as in, formatted, created-by-us) partitions are
claimed.

- The effect here is that only "new" swap will be added to the system,
  so in erase-disk installations, or manual partitioning.
- Install-alongside and replace will now **not** claim the swap already
  on the disk; I think we'll need another UI knob for that one.

FIXES #1316
6 years ago
Adriaan de Groot 35a2db064b [partition] Make debug-logging match the functionality
- `createPartitionList()` is called for the summary widget (via
  `prettyDescription()`), and from `exec()`. Only the latter
  actually *writes* to Global Storage, so it's misleading to
  think that the pretty-printed version ends up in GS.
- This makes the "new" key useless, since by the time `exec()` is called
  the partitoons are no longer new.
6 years ago
Adriaan de Groot f9d9cd2df4 [fstab] Document the remapping of fs names
- Shuffle the code a little so it's clear where the remapping
  happens, and explain why we look for "swap" in fstab and
  "linuxswap" elsewhere.
6 years ago
Adriaan de Groot 8ecb364f8c [initramfs] Fix up tests
- These tests don't actually test anything in this specific module,
  they do test CalamaresUtils::System.
- Wrangling System and JobQueue and GlobalStorage instances is fraught
6 years ago
Adriaan de Groot fba1bf7072 CMake: add DEFINITIONS option to calamares_add_test
- There's a handful of tests that need this, it's possible
  there will be more, so just add it to the infrastructure.
6 years ago
Adriaan de Groot 1bb43e06e2 Merge branch 'master' into kpmcore-manager 6 years ago
Adriaan de Groot 7cbc43616e [netinstall] Some more "standard" alternative labels
- Hide the labels from the compiler to avoid warnings
- Add some more labels proposed by ArcoLinux
6 years ago
Adriaan de Groot 5dac67b710 [notesqml] Cut down the example text to be translated. 6 years ago
Adriaan de Groot 2d754dac6d [notesqml] Rename example file to save translators 6 years ago
Adriaan de Groot 51ad7df31c [netinstall] Don't give the translators a bogus string 6 years ago
Adriaan de Groot 538779991e [netinstall] Add some "standard" sidebar labels for the module 6 years ago
Adriaan de Groot 81752b6f7c [libcalamares] Document how TranslatedString context works
- Support re-using class-specific tr() calls in a standard way
- Document this in the netinstall.conf which uses it
6 years ago
Adriaan de Groot a03394f177 [netinstall] Use tr() infrastructure for config-translations 6 years ago
Adriaan de Groot 0ef28f6a50 [libcalamares] Translatable config strings use tr()-infrastructure
- Allow TranslatedString to get a context parameter; if it has
  one, it will try to use the regular tr()-infrastructure
  **as fallback** for the translations from the config file itself.
- This makes it possible to offer -- and translate -- some "standard"
  phrases in the module, while allowing the config file the knob
  to change strings. Using one of the standard strings gets translations
  for "free", while introducing something entirely new means sourcing
  translations for it as well.
6 years ago
Adriaan de Groot 25e3f91754 [welcome] Remove the QML testing bits
- The welcomeq module has actual QML support
6 years ago
Adriaan de Groot bff07ded25 Merge remote-tracking branch 'origin/welcome-q'
- Updates QmlViewStep with slightly neater API
- Introduces Config object for QML pages
- Updates notesqml and welcomeq to use that API
6 years ago
Adriaan de Groot c20f7ee534 [netinstall] Rip out derpy translations of PackageModel
- The model always has two columns, and the column names are always
  the same. We don't need to specially set headers for that.
- Use QCoreApplication::translation() to re-use the existing
  translations and avoid creating "new" strings (in a new context).
6 years ago
Adriaan de Groot f6d8ed85e4 [netinstall] Allow a title above the netinstall tree
- Supports translation via the config file. This is useful
  (like label:sidebar) when displaying more than one netinstall page.
6 years ago
Adriaan de Groot 5b67ca315a [netinstall] It should be easier to get the number 2 6 years ago
Adriaan de Groot 497ecda14d [netinstall] Move translation of widget headers
Editorial: I really don't like plain CALAMARES_RETRANSLATE() thrown
into the middle of code.
6 years ago
Adriaan de Groot 45c15de623 [netinstall] Configurable name in the sidebar 6 years ago
Adriaan de Groot be567dc508 [netinstall] Remove unused m_prettyStatus 6 years ago
Adriaan de Groot 4ae484dbca [netinstall] Initial work for configurable sidebar label
- Now that multiple netinstall pages may be supported, it's annoying
  that they all have the same name. Copy the approach from other
  modules (e.g. notesQML) of having the sidebar and other labels
  configured in the config file.
6 years ago
Adriaan de Groot 0877a994f1 [netinstall] Update copyright 6 years ago
Adriaan de Groot d909b8119e [netinstall] Code-style 6 years ago
Adriaan de Groot bc5aa1f837 [netinstall] Pretend to clean up resources 6 years ago
Adriaan de Groot 5f1bd4396e [netinstall] Avoid duplicate operations
- Since operations are added each time you leave this page,
   the existing operations (from a previous visit) need to be
   cleaned up. With the old setup of only **one** possible
   set of operations, this wasn't a problem. Now, merging
   in operations is necessary. Implement that by looking for
   the *source* property in an operation.

FIXES #1303
6 years ago
Adriaan de Groot 74169c166a [netinstall] Mark operations with source-module
- This will allow us to find the operations later, by looking for
  the same source-module.
- While here, tidy up types
6 years ago
Adriaan de Groot 7cadfb8ddd [packages] Log unfamiliar package operations
- unknown operations get a warning
 - "source" will be added from netinstall shortly
6 years ago
Adriaan de Groot 056b0d7548 [netinstall] Refactor variant-from-ItemData 6 years ago
Adriaan de Groot d5675508fa [netinstall] More coding-style
The tools don't always pick up all the style changes in one go
(I think astyle has trouble parsing some Calamares code)
6 years ago
Adriaan de Groot 8286bff95f [netinstall] Shuffle code around a bit
- introduce char const for key name (consistency, it's used lots)
 - polish debugging a bit
 - add some inline code-docs
6 years ago
Adriaan de Groot 17eb3f5e33 [netinstall] Apply coding style 6 years ago
Adriaan de Groot 1b80cf82de [fstab] Don't add swap that wasn't made new for us 6 years ago
Adriaan de Groot 158e11de1e [partition] Indicate that a filesystem is new in GS 6 years ago
Adriaan de Groot 7c2a196568 [users] Document new knobs
- while here, update copyright notice

FIXES #1140
6 years ago
Adriaan de Groot f7e8488edf [users] Correct DBus return from hostnamed calls 6 years ago
Adriaan de Groot 094c213baa [users] Also test hostname-setting via hostnamed
SEE #1140
6 years ago
Adriaan de Groot f1435452ea [users] Polish up tests
- Don't remove test artifacts on failure
 - Coding style
6 years ago
Adriaan de Groot c5b45c37fc [users] Add tests of the file-writing components 6 years ago
Adriaan de Groot 371fe267b1 Merge branch 'better-hostname' 6 years ago
Adriaan de Groot 94f5b13db0 [libcalamaresui] Restore previous DLLEXPORT names
- Different libraries should have different EXPORTs, so that
   you can IMPORT one while building the other. Reported (and
   kindly explained) by Kevin Kofler.
 - Stick to one header file, though.

While here, update copyright on file.
6 years ago
Adriaan de Groot 49eb8212e3 [users] Imporove enum-naming 6 years ago
Adriaan de Groot e74831fcb4 [users] Add .conf entries for hostname settings
- Set hostname not-at-all, or via one of two mechanisms
 - Write /etc/hosts or not
6 years ago
Adriaan de Groot 61d096c9ec [users] Prep-work for configurable actions
- tidy include style
 - add setting to UsersViewStep for hostname action
6 years ago
Adriaan de Groot 33b3321698 [users] Simplify reading configuration 6 years ago
Adriaan de Groot dbba0c9b03 [users] Move Job creation from the widget to the ViewStep
- Having the widget do creation ties the step heavily to that UI;
   start moving towards a state where we have a Config object (not
   here yet; it still queries the UI part) that moves data around
   between UI and ViewStep.
6 years ago
Adriaan de Groot 2471e74aab [users] Provide some accessors to the UI-page data 6 years ago
Adriaan de Groot ef4bb5e13b [users] Make SetHostName job actions configurable 6 years ago
Adriaan de Groot 6719a41aef [libcalamares] Switch tests to calamares_add_test() 6 years ago
Adriaan de Groot 51e135cfbd CMake: chase introduction of IMPORTED yamlcpp 6 years ago
Adriaan de Groot 6f996d8eed CMake: give yamlcpp a proper imported target
- This makes linking easier,
 - Adds the right includes (needed on FreeBSD),
 - Lets us drop silly GUI setting for non-GUI tests (I think this was
   a side-effect of compiling on FreeBSD, where UI would pull in
   /usr/local/include).
6 years ago
Adriaan de Groot 4495a4c739 CMake: Allow extra libraries in calamares_add_test
- Extra libraries specified via LIBRARIES part of CMake function
 - Convert all the other module tests
6 years ago
Adriaan de Groot 637a57d534 [machineid] Change to calamares_add_test
- The test-macro handles cases without ECM or testing transparently.
 - Adds compile defines for STATICTEST.
6 years ago
Adriaan de Groot 6bdc4a55de CMake: new convenience module CalamaresAddTest 6 years ago
Adriaan de Groot b42520b0ef [machineid] Apply new STATICTEST specifier, hide implementation details 6 years ago
Adriaan de Groot 92260e7d0b [libcalamares] Document DllMacro.h and add STATICTEST
- document the export macros
 - introduce a "static" that is switched off when re-building code
   for tests.
6 years ago
Adriaan de Groot b044549013 [libcalamares] Merge PluginDllMacro.h into DllMacro.h
- Let's just have one header definining export- and visibility-
   macros for Calamares. They are still selected based on the
   export flags (*_PRO), just defined in one header instead of two.
6 years ago
Adriaan de Groot aaa6f6bd55 [libcalamaresui] Drop UiDllMacro.h
- The scattering of DLL export macro's is kind of useless;
   there are several headers, and then the export macro isn't
   even applied consistently. Just drop the one for UI exports,
   which was only used in libcalamaresui.
6 years ago
Adriaan de Groot 44bf0a5d6d [users] Add method for using hostnamed
SEE #1140
6 years ago
Adriaan de Groot 9a7465bfd5 [users] Refactor writing-hostname and writing-hosts
- Move to separate functions, as prep-work for making the actions
   configurable (and optional).
6 years ago
Adriaan de Groot 214f9a308e Merge branch 'improve-tests' 6 years ago
Adriaan de Groot d5f3e2e7d4
Merge pull request #1318 from yurchor/patch-2
[partition] Fix typo: partitons -> partitions
6 years ago
Yuri Chornoivan ea82a26dae
Fix typo:; partitons -> partitions
Many thanks in advance for reviewing.
6 years ago
Yuri Chornoivan b582c27bf4
Fix minor typo
Many thanks in advance for reviewing.
6 years ago
Adriaan de Groot 90f79b0692 [users] Restore error-checking to set-hostname code
- Use the new CreationResult code for compact results
6 years ago
Adriaan de Groot 781322ab41 [libcalamares] Use more descriptive variable name
- If the test failed, you'd get a cryptic message like
	FAIL!  : NetworkTests::testPing() 'r' returned FALSE. ()
   So rename the variable so the failure mode is more obvious.
   (Could have used QVERIFY2() instead, this is simpler)
6 years ago
Adriaan de Groot f6526f7d9f [libcalamares] Add some tests for CreationResult
- More important is the compiler warning that will show up
   if we add more failure states.
6 years ago
Adriaan de Groot 274115c727 [libcalamares] Update tests to reflect changed API 6 years ago
Adriaan de Groot 2d7398161d [libcalamares] More detail for createTargetFile()
- Return a result-object with statrus information and the path
   which was previously used (empty for "failures").
6 years ago
Adriaan de Groot 695b88b8a7 [users] Tidy up hostname creation
- Use the createTargetFile() convenience functions to do the
   actual work.
 - This probably involves more copying around of buffers, since it's
   creating one big QString and sending that off, rather than writing
   little chunks to a file, but I feel this is worth the code simplification.
 - Drops all the error checking for creation, though, because the API for
   createTargetFile() lousy.
6 years ago
Adriaan de Groot b337a6b3f5 [user] Apply coding style 6 years ago
Adriaan de Groot 2bb4dd8e22 [users] Refactor hostname-guessing 6 years ago
Gabriel Craciunescu 7c323bdcdc [users] Try to guess suggested hostname from dmi
- nothing compicated for now, just try to get something
  from /sys/devices/virtual/dmi/id/product_name and fallback
  to -pc thingy if we can't
6 years ago
Adriaan de Groot 7f295d9565 [partition] Apply coding style to core/ subdir
Because this is a giant code change, with no functional effect,
I've been saving this until the end of the kpmcore-manager branch.
6 years ago
Adriaan de Groot 2bc296b468 [unpackfs] Fix typo's introduced in june 6 years ago
Adriaan de Groot 45a31a3022 [partition] Tidy includes
- sort includes a little
 - remove superfluous includes
 - update copyright
6 years ago
Adriaan de Groot d931b146e3 [partition] Shuffle new conveniences into partition service
- the general stuff from KPMHelpers ends up in the partition
   service; that only gets compiled when KPMCore is available anyway.
6 years ago