Commit Graph

41 Commits

Author SHA1 Message Date
Emir SARI
37178b2273 Improve context 2023-11-10 13:34:01 +03:00
Adriaan de Groot
63b0589382 CI: apply style tool across the entire codebase 2023-10-17 22:24:46 +02:00
Adriaan de Groot
1efb12e332 libcalamares: rename CalamaresUtilsSystem and Gui 2023-09-11 20:40:10 +02:00
Adriaan de Groot
eb840d4117 libcalamares: ditch namespace CalamaresUtils
- Most CalamaresUtils things go to Calamares
- YAML support to Calamares::YAML and then remove redundant "yaml"
  from the function names.
2023-09-11 20:34:01 +02:00
Adriaan de Groot
cf097850de CMake: apply gersemi styling 2022-02-08 16:18:47 +01:00
dalto
3be6946d93 [initcpio] Minor documentation updates 2022-01-01 12:14:42 -06:00
dalto
475c0d21a1 [initcpio] Spell mkinitcpio properly 2022-01-01 10:48:48 -06:00
dalto
c2ae5fad96 [initcpio] Make implementation match config description and remove broken uname option 2022-01-01 10:05:00 -06:00
Adriaan de Groot
4114a2bbe8 CMake: chase renamed YAMLCPP 2021-07-26 15:08:29 +02:00
Adriaan de Groot
03e621f4a2 Modules: clean up linking
- do not link (explicitly) to Calamares libraries, the CMake
  functions do that automatically.
- while here, tidy and remove commented-out-bits
- while here, remove unneeded includes
2021-07-26 15:04:43 +02:00
Adriaan de Groot
2878c474c5 Warnings-- (~T() override)
Change all the places that had
	virtual ~T() override
to the less redundant form without override.
2020-09-22 22:49:30 +02:00
Adriaan de Groot
1cd9b93a22 REUSE: Giant boilerplate cleanup
- point to main Calamares site in the 'part of' headers instead
  of to github (this is the "this file is part of Calamares"
  opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
  this is the 3-paragraph summary of the GPL-3.0-or-later, which has
  a meaning entirely covered by the SPDX tag.
2020-08-26 02:28:38 +02:00
Adriaan de Groot
30a85668b7 REUSE: (GPL-3.0-or-later) C++ modules 2020-08-26 02:22:49 +02:00
Adriaan de Groot
1b23520f20 REUSE: (CC0-1.0) module descriptors and configuration files
In spite of there being considerable documentation sometimes in the
config file, we go with CC0 because we don't want the notion of
'derived work' of a config file.

The example `settings.conf` is also CC0. Add some docs to
it while we're at it.
2020-08-26 02:22:49 +02:00
Adriaan de Groot
95ceb1e8c7 REUSE: (BSD-2-Clause) all CMakeLists
The build instructions are not that interesting, it's a toss-up
between CC0 and BSD-2, but because other CMake bits are BSD-2-Clause,
apply that to more CMakeLists. The copyright date isn't all that
accurate, but these are just inconsequential files.

While here, tidy up and get rid of some useless intermediates.
2020-08-26 02:05:46 +02:00
Adriaan de Groot
86f66e8f16 REUSE: (GPL-3.0-or-later) all the schema files
- these are vaguely derived from the schema's written by
  artoo@manjaro.org, but totally re-done for JSON-Schema
2020-08-26 02:01:58 +02:00
Adriaan de Groot
050d74b4be Fix YAML schemas for all the remaining config files 2020-08-12 10:29:24 +02:00
Adriaan de Groot
4a07bd4ae3 CI: import all the rest of the YAML schema
- These have **not** been fixed for validation, so the schema's themselves
  will fail to load. This is a consequence of variations in JSON-Schema
  representations through various drafts. Fixing the schemata is
  fairly straightforward.

This gives us 19 new tests, all of which fail.
2020-06-16 16:06:56 +02:00
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).
2020-02-17 14:55:12 +01:00
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
2020-02-17 14:36:52 +01:00
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.
2020-02-17 11:37:35 +01:00
bill-auger
13a58a4ab2
update doc comment in src/modules/initcpio/initcpio.conf 2019-08-28 13:02:36 -04:00
Adriaan de Groot
e81bd52fb5 [initcpio] [initramfs] Set compilation options on tests
- calamares_automoc() sets AUTOMOC, but also adds some flags
   to avoid compilation warnings from the generated MOC code.
 - drop weird hard-coded include paths
2019-08-09 16:29:55 +02:00
Adriaan de Groot
a0854a999e Modules: chase API change, use std::chrono::seconds 2019-08-01 22:59:06 +02:00
Adriaan de Groot
940c990268 [initcpio] [initramfs] Allow turning off CVE mitigations
- The mitigations are slightly intrusive, and may clash
   with other, similar mitigations (especially for initramfs,
   the recommended solution is to configure the system with
   the snippet outside of Calamares).
2019-07-06 00:04:16 +02:00
Adriaan de Groot
39d618c61e [initcpio] Simple test for fixPermissions() 2019-07-05 13:28:32 +02:00
Adriaan de Groot
5f6efd2822 [initcpio] Improve security by making initramfs files not world-readable 2019-07-05 13:17:55 +02:00
Adriaan de Groot
bb6530577d [initcpio] Replace Python implementation with C++
- This is a simple variation on the theme of things-that-call-a-
   initramfs-updater, so the code is mostly a copy of initramfs/
   module. I didn't even bother to strip out the configuration-
   handling (I figure it might be good for *something*) so now
   "" and "$uname" are valid kernel names as well.
 - Fixes security issue where the initramfs ends up readable
   by all, and that includes the cryptfile for LUKS.

SEE #1190
2019-07-04 20:23:40 +02:00
Adriaan de Groot
ec0fe2ccd3 Modules: Improve error reporting
- [initcpio] remove superfluous inner function
 - [initcpio] catch errors from mkinitcpio itself and report them in a nice
   readable format.

 - Save translators the effort of doing a dozen messages
   with just the name of the module changed. All of these modules
   bail out on bad configurations with a meaningful message.
   - [initcpiocfg]
   - [fstab]
   - [initramfscfg]
   - [localecfg]
   - [luksbootkeyfile]
   - [luksopenswaphookcfg]

 - [machineid] Warn on bad config. It's conceivable that this is run
   with an empty rootMountPoint (i.e. "") to modify the running system,
   so only bail on None.
2019-04-28 14:34:39 -04:00
Adriaan de Groot
e326b658ef Enable translation in Python modules
- covers all the remaining Python modules
 - most only get a translatable pretty name, some also return
   error messages
2019-04-20 11:22:32 +02:00
Adriaan de Groot
63c03068c0 [modules] Documentation for fstab, grubcfg, mkinitcpio
- These modules were entirely documented as "use the source",
 - The sources aren't terribly clear either.
2018-06-26 06:39:30 -04:00
Adriaan de Groot
762ad54344 Documentation: change http links to GitHub to https 2017-12-20 08:39:09 -05:00
Teo Mrnjavac
10ce42f35c Use target_env calls in Python modules. 2015-09-15 16:48:41 +02:00
Gormogon
beb911863b A little more PEP 2015-06-14 06:56:56 -04:00
Philip
d677fe9d01 [initcpiocfg] add python doc strings 2015-02-25 14:49:23 +01:00
Philip
98db0b3f59 [initcpio] add python doc strings 2015-02-25 14:49:23 +01:00
Gormogon
113d9db7cb Python Better Docstrings 2015-02-25 14:49:23 +01:00
Gormogon
09dc6bb5d7 [PEP 8] General Style Part 2 2015-02-18 09:47:24 -05:00
Gormogon
8e1480431a [PEP 263] Corrected Encoding Headers 2015-02-18 09:06:10 -05:00
Teo Mrnjavac
8f10c21e5b Big configuration overhaul.
Module descriptors are now module.desc, no configuration allowed inside.
Module config files are <modulename>.conf, installed in
share/calamares/modules.
settings.conf is read from /etc/calamares, then share/calamares, and if
running with --debug also in the current dir.
Module config files are read from /etc/calamares/modules, then
share/calamares/modules, and if running with --debug also in
src/modules/<modulename> relative to the current dir.
2014-08-06 11:54:45 +02:00
Aurélien Gâteau
df790986ae initcpio module, very loosely based on the one from the manjaro branch 2014-08-04 17:33:59 +02:00