5075 Commits (b074696ac1a51dbf237ab5994b94e90f32a209a6)

Author SHA1 Message Date
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
Adriaan de Groot e72ecaafd3 Merge branch 'kpmcore-manager'
Introduces a "partitioning service" into libcalamares,
shuffles a bunch of things into it, tries to help out
with settling the system between partitioning actions.
6 years ago
Adriaan de Groot 5a50a3a40c [partition] Consistent FS name usage
- explicit use of user-visible names in EditExistingPartitionDialog
 - consistent conversion of config-values to FS names (user-visible).
   The GS value comes from the ViewStep, and should always match
   something -- it's already converted to the canonical un-translated
   so the type should be good.
6 years ago
Adriaan de Groot 57b608083e [partition] Fix build - missing ) 6 years ago
Adriaan de Groot ca67534cd2 [partition] Improve logging of bad configs 6 years ago
Adriaan de Groot 472ec32617 [partition] Be explicit about user-visible FS names, ReplaceWidget 6 years ago
Adriaan de Groot 05dfc24af6 [partition] Be explicit about user-visible FS names, CreatePartitionDialog 6 years ago
Adriaan de Groot 88cff387c3 [partition] Be explicit about user-visible FS names, FormatPartitionJob 6 years ago
Adriaan de Groot bacca04695 [partition] Be explicit about what's user visible in SetPartitionFlagsJob 6 years ago
Adriaan de Groot 29894cec6a [partition] Convenience userVisibleFS()
- Mark uses of filesystem-name where it's intentional that they
   are user-visible, with a new convenience function.
6 years ago
Adriaan de Groot dac5516b2c [partition] Update copyright, coding style 6 years ago
Adriaan de Groot a0449abab9 [partition] Do not translate filesystem names
- Move contents of FSName to KPMHelpers
 - Use the new functions from FillGlobalStorage

Needs more use in the rest of the partition module.
6 years ago
Adriaan de Groot f410a4bb68 [libcalamares] Convenience function for FS names
Because getting the untranslated name of a FileSystem is something
that needs doing consistently, add some functions for that;
it makes it easier to spot places where that isn't done.

Probably doesn't compile, and needs extra documentation.
6 years ago
Adriaan de Groot c055e1da49 [partition] Use untranslated name of filesystem
- Patch from Gabriel Craciunescu
6 years ago
Adriaan de Groot aa0a799492 [welcomeq] QML warnings--
The config bits are all constant, so avoid NOTIFY warnings.
6 years ago
Adriaan de Groot f094cb543b [libcalamaresui] Set config object earlier
- The config context object should be set earlier, otherwise
   QML code will try binding to a non-existent config already
 - Document that QMLViewStep::setConfigurationMap() parent implementation
   should be called **last**, at the end of the subclass implementation.
6 years ago
Adriaan de Groot 7e0cc7af41 [welcomeq] Add configuration file
- copy the buttons-config part from welcome.conf
 - create buttons in the QML part
6 years ago
Adriaan de Groot 85b873a1a2 [libcalamaresui] Log QML error message
- When loading fails, log a useful error message from the QML
   engine (to help debug the QML)
6 years ago
Adriaan de Groot 49ed97cb77 [libcalamares] Allow QML ViewSteps to expose a config object 6 years ago
Adriaan de Groot f0134aab71 [welcomeq] Add more fields to Config
- getters as slots, for later access from QML
6 years ago
Adriaan de Groot 86bf9287ab [notesqml] Use Branding strings 6 years ago
Adriaan de Groot ae35256177 [welcomeq] Add top-text
- Fix QML indentation to the canonical 4-spaces
 - Add a header at the top of the page
 - Force the image to load from the filesystem
6 years ago
Adriaan de Groot 18942f835f [libcalamares] Remove confusing name-qualifiers
- Using Branding::ImageEntry, when ImageEntry is an enum class
   defined *in* Branding, is superfluous, and it also confuses
   moc; the enum type isn't recognized from QML.
6 years ago
Camilo Higuita 15d8503726 [libcalamaresui] Expose the branding strings & urls to qml 6 years ago
Adriaan de Groot 152c3352c2 [welcomeq] Compile the QML into the module
- Default implementation is in the QRC
 - Register Branding for QML modules (just once)
6 years ago
Camilo Higuita b5e17b7ea5 [welcomeq] Add full-featured QML for welcome page
This is a merge of several commits by Camilo.
6 years ago
Adriaan de Groot 7bf0fded1b [welcomeq] Port to newer QmlViewStep 6 years ago
Adriaan de Groot adb312bdd2 [welcomeq] Coding style
- a R/W property isn't CONSTANT
 - apply calamaresstyle
6 years ago
Adriaan de Groot c7780db07a Merge branch 'model-q'
- Make models of some things previously held as lists, as
   prep-work for QML modules.
6 years ago
Camilo Higuita 1f2f1a657e [libcalamaresui] Expose Branding strings to QML 6 years ago
Adriaan de Groot ca13d1670e [libcalamares] Merge more from Camilo
- Complete the model for locales
6 years ago
Adriaan de Groot 59ddda6225 Merge branch 'wrangle-boost' 6 years ago
Adriaan de Groot 9408601074 [libcalamares] Move Python wrapper
- Take the Python wrapper for GlobalStorage out of the GlobalStorage.h
   header and add it to PythonHelper instead, saving some work in
   all the cases that only GS is interesting, not the Python bits.
6 years ago
Adriaan de Groot ad725b671e [hostinfo] Warnings--
- Physical memory can't be negative, so it is reported as
   an unsigned long, but the bytes-to-MiB functions do accept
   negative amounts. As long as no machine has more than 2**62
   bytes of memory, we're good though.
6 years ago
Adriaan de Groot a11280b427 [libcalamares] Expand tests for printable entropy 6 years ago
Adriaan de Groot 090716ba4f [libcalamares] Warnings-- in Entropy
- reading a file yields a qint64
 - need to mash the unsigned data from twister to signed char data.
6 years ago
Adriaan de Groot 7efed8226c [libcalamares] Warnings--, update copyright 6 years ago
Adriaan de Groot c1151cbcfa [libcalamares] Update copyright info 6 years ago
Adriaan de Groot 8181808bec [libcalamares] Fix build
- drop now-obsolete boost-warnings.h
 - add missing namespace alias to GlobalStorage.h (removed accidentally
   in previous commit)
6 years ago
Adriaan de Groot 3b35ca7bb9 [libcalamares] Simplify includes
- PythonHelper.h already pulls in all the Python machinery
6 years ago
Adriaan de Groot 95722541d0 [libcalamares] Untangle Python includes
- Use BoostPython.h to manage overall includes
 - Remove local home-grown variations
6 years ago
Adriaan de Groot f8998834cf [libcalamares] Simplify includes (no Python used in JobQueue) 6 years ago
Adriaan de Groot d42e757576 [libcalamares] Simplify includes
- CalamaresVersion used by the job, not the API presented to Python.
 - Untangle Qt includes from there.
6 years ago
Adriaan de Groot f3e7fe5eb4 [libcalamares] Use more specific include 6 years ago
Adriaan de Groot 96580e5c40 [libcalamares] Convenience header for Boost and its warnings 6 years ago
Adriaan de Groot 6432b7f42a [libcalamares] Hit Boost warnings with a hammer
- Tons of warnings from Clang 9 in Boost::Python code, so
   turn of most of those warnings in the Boost-support code.
6 years ago
Adriaan de Groot 684c5f477c [libcalamares] Moc warnings--
- don't have a NOTIFY CONSTANT property
 - the data is constant, so drop NOTIFY
 - remove redundant signals
 - remove setLabels() now it's only needed from one constructor
6 years ago
Adriaan de Groot b4b1bf5de2 [libcalamares] Call delegated constructor 6 years ago
Adriaan de Groot df5a0d25bc [libcalamares] Handle empty locale names quickly 6 years ago
Adriaan de Groot 27bc64e63f [libcalamares] C++ style, warnings-- 6 years ago
Adriaan de Groot 241cb04f06 [libcalamares] Coding style 6 years ago
Camilo Higuita 1b3d32ca79 make label item from LabelModel qobject based and expose properties 6 years ago
Adriaan de Groot 6c0fecd40d [notesqml] Don't use a fixed width 6 years ago
Adriaan de Groot c3c845e9d7 [notesqml] Add some more module documentation 6 years ago
Adriaan de Groot 4f60a6340e [dummyqml] Drop module; it makes more sense to just be notesqml 6 years ago
demmm c0e1ebb72a adding notesqml, copy of dummyqml
included in settings.conf, commented out
6 years ago
Adriaan de Groot 39a5453904 [libcalamaresui] Add QML onActivate() and onLeave() calls.
- This comes from the ExecutionViewStep, V2 loading, which
   notifies the QML that the QML is now active.
6 years ago
Adriaan de Groot 1f34c2834e [libcalamaresui] Move definitions inside namespace {}
- Remove the extra Calamares:: namespace specifier from half the
   definitions.
6 years ago
Adriaan de Groot 12675be516 [libcalamaresui] Factor out "simple" QML method calls 6 years ago
Adriaan de Groot bf675d971b Merge branch 'qml' 6 years ago
Adriaan de Groot faa88afc88 Merge branch 'issue-1314'
FIXES #1314
6 years ago
Adriaan de Groot 229d09927e Changes: for 2020, new fake Linux distro name 6 years ago
Adriaan de Groot 3e2908ea16 [machineid] Follow Manjaro flags
- add -f to ln(1) flags
6 years ago
Adriaan de Groot 110a84344b [machineid] Test job function
- Create a job and ask it to create dbus files -- either directly,
   or as a symlink. Since the target chroot isn't viable, this will
   fail but we can at least see that directories are created, etc.
6 years ago
Adriaan de Groot 4cdcb48de6 [machineid] Functionality moved to libcalamares 6 years ago
Adriaan de Groot b62004aae9 [machineid] Create the DBus data directory
- before running dbus-uuidgen or linking to systemd's UUID,
   create /var/lib/dbus; some distro's don't create that
   beforehand.

FIXES #1314
6 years ago
Adriaan de Groot 240fe2a564 [libcalamares] Add convenience createTargetParentDirs() 6 years ago
Adriaan de Groot 6ede9f2c7c [libcalamares] Test QFileInfo::dir() for completeness 6 years ago
Adriaan de Groot e65969d587 [libcalamares] Re-do createTargetDirs()
- Drop the basedirs idea, replace return with just bool
 - Use QDir::mkpath, with some extra validation
 - Test it a bit
6 years ago
Adriaan de Groot 8b8ecf7b7b [libcalamars] Improve test init and cleanup
- Test createTargetFile and removeTargetFile
 - Clean up afterwards
 - Ensure /tmp is the RMP for each test
6 years ago
Adriaan de Groot b502d78984 [libcalamares] Fix warning message
- "create" was when this function was used elsewhere
6 years ago
Adriaan de Groot 394eee3954 [libcalamares] Test more targetPath() scenario's 6 years ago
Adriaan de Groot 8d23e665ea [libcalamares] Fix targetPath() tests
- there is less simplification done than you might think
6 years ago
Adriaan de Groot daa5b804b3 [libcalamares] Split paths-tests into own test executable
- Since these tests all want a system object, and a GS
   with a sensible setup, give them one with its own initTestCase().

This could have been done with one executable, running tests from
multiple classes, but there's not much overall benefit there.
6 years ago
Adriaan de Groot 31878dd43b [libcalamares] Avoid double / between root and path in targetPath() 6 years ago
Adriaan de Groot 15bca702c1 [libcalamares] Add tests for path functions (part 1) 6 years ago
Adriaan de Groot 95936549e2 [libcalamares] Add a createTargetBasedirs()
- Used to ensure that the directories leading up to a given path
   exist. Implementation is incomplete and broken for now.
 - While here, avoid removing an empty pathname in removeTargetFile()
   (the empty pathname indicates a broken configuration).
6 years ago
Adriaan de Groot 4af68365c9 [machineid] Remove obsolete implementation 6 years ago
Adriaan de Groot bf882cec1d [machineid] Migrate removeFile() to libcalamares
- Becomes removeTargetFile()
6 years ago
Adriaan de Groot 9ef04192db [libcalamares] Simplify returns in targetPath() 6 years ago
Philip Müller 97ddd30af4
[machineid] folder needs to be created when not exists
- See #1314
6 years ago
Philip Müller 72d742e2f4
[machineid] Use same approach as we do in Manjaro
- See also https://gitlab.manjaro.org/applications/calamares/commit/da8f45ae
- Fixes #1314
6 years ago
Philip Müller c766a0f10f
[machineid] create dbus var-lib folder when not existing
See also #1314
6 years ago
Adriaan de Groot 53b6113c75 [welcome] Fix QML tests 6 years ago
Adriaan de Groot eaea262449 Merge branch 'master' into qml 6 years ago
Adriaan de Groot 4b3f7eb209 [calamares] Local translations can be a separate setting
- Don't stick this in Settings, though, it becomes overly complicated.
6 years ago
Adriaan de Groot 24c2c435a0 [libcalamares] Try repairing tests
- Fail on FreeBSD with an instant timeout
6 years ago
Adriaan de Groot 4525060c26 [calamares] Refactor Settings initialization
- add a Settings::init() to do actual work
 - remove the same kind of code from CalamaresApplication
 - make constructor of Settings private
 - initialize settings before the application
6 years ago
Adriaan de Groot 68e8b0695d [calamares] Make declaration order match calling order 6 years ago
Adriaan de Groot db80a34aca [calamares] Remove intermediate debug-settings
- There's a multi-stage setup for debug-mode, where the application
   object also knows that debugging is set. Remove it.
 - Break debug mode (because now the settings don't get debug-mode set).
 - Refactor so that parameter handing is only done if this Calamares
   is the unique (first) Calamares.
6 years ago
Adriaan de Groot 50b6801d35 [calamares] Install translator after loading settings
- means that also the *initial* translation can take settings
   into account, like -d loading local translations.
6 years ago
Adriaan de Groot f233cac7a1 [calamares] Refactor debug-logging settings 6 years ago
Adriaan de Groot ea8adc3de7 [calamares] Simplify return from main 6 years ago
Adriaan de Groot af862336a8 [calamares] Initialize settings before QML 6 years ago
Adriaan de Groot 91625c8ba8 [libcalamares] Tidy up boolean options in Settings
- The const getters for a single boolean value have moved
   to the header, for inlining.
 - Document the getters and what their settings mean.
6 years ago
Calamares CI 8c0ef5798d i18n: [dummypythonqt] Automatic merge of Transifex translations 6 years ago
Adriaan de Groot d956c79291 [libcalamares] Load translations from more places
- To support translation testing, without needing to recompile
   Calamares, load files from the local directory when debugging,
   or from /usr/share/calamares/lang/ in general.
 - This allows updating translations and testing them with just
   lrelease (a translation build tool) installed, without rebuilding
   Calamares.
 - This allows distro's to ship updated or modified translations without
   rebuilding Calamares.
6 years ago
Adriaan de Groot 02e5e0de5e [users] Use entropy service.
FIXES #1254
6 years ago
Adriaan de Groot 5b987d4f33 [machineid] Use entropy service
- Most of the code was error-checking, just replace the open-read
   with a call to the service instead.
 - It's not an error if /dev/urandom doesn't exist in the source system
   (there may be other good random sources, and otherwise we have the
   low-quality random fallback).
6 years ago
Adriaan de Groot c971127b17 [machineid] Fix entropy-file return
- If the file was created and written, it would drop out of the
   if() and return an error anyway.
6 years ago
Adriaan de Groot e56948cefa [libcalamares] Fix tests (cell is the lower unicode byte) 6 years ago