Commit Graph

8449 Commits

Author SHA1 Message Date
Adriaan de Groot
2127129227 [users] Use API to get file-paths in target 2024-04-14 09:25:03 +02:00
Adriaan de Groot
d0420ea3ee [users] Add translation context to AD job 2024-04-14 00:20:57 +02:00
Adriaan de Groot
fe68b45fc5 [libcalamares] Explain updating-status-text mechanism 2024-04-13 23:37:49 +02:00
Adriaan de Groot
fb83ad326b [libcalamares] Document recommended translation contexts
Jobs have specific contexts for their different strings.
Many jobs (now) misuse prettyName() as a status message,
although the existing fallback mechanism means that the
name gets used as if it is a status message when the job
does not define a description or status.
2024-04-13 23:30:57 +02:00
Adriaan de Groot
219befacbf
Merge pull request #2300 from lubuntu-team/calamares
Active Directory Support
2024-04-13 22:11:29 +02:00
Penvern Vincent
70a59d6cd1 add possibility to pre check encryption checkox 2024-04-13 02:09:09 +02:00
Adriaan de Groot
f6cd82f9a4 [bootloader] Group local variables
Put the constants -- do we use systemd, what are the partitions --
together, and put the things-set-by-the-loop together.
2024-04-12 22:08:54 +02:00
Adriaan de Groot
6d242b67f9 [bootloader] Start building kernel parameters earlier
- drop unnecessary variable
- build "quiet splash rw" first
2024-04-12 22:05:47 +02:00
Adriaan de Groot
b4edf52198 [bootloader] Avoid indirection through shell
There's no need to run the shell to take apart the arguments to grep.
2024-04-12 21:55:26 +02:00
Adriaan de Groot
b8049daa45 [bootloader] Factor out running "which" in target
which is an actual program, drop the round-about via shell
2024-04-12 21:42:49 +02:00
Eugene San (eugenesan)
51d6dd23ea Mirror GRUB's splash screen functionality for non-grub booloaders 2024-04-12 12:08:47 -07:00
Adriaan de Groot
134b2c8d83
Merge pull request #2305 from ptr1337/plymouthcfg-fix
plymouthcfg: Use plymouth-set-default-theme instead of sed
2024-04-09 15:50:01 +02:00
Adriaan de Groot
b950f0f6d4 [users] Remove duplicated constant (a regexp) 2024-04-02 23:33:21 +02:00
Adriaan de Groot
fbde737802 [partition] Don't redundantly specify value binding in lambda 2024-04-02 23:33:21 +02:00
Adriaan de Groot
14c8893b03 [libcalamares] Turn off Clang 17 warning for MOC
The build produces a zillion warnings about unsafe buffer usage
in the code that wrangles metaobjects and slot names. That is
generated code and we can't fix it.
2024-04-02 23:33:21 +02:00
Adriaan de Groot
b396f70d12 [partition] Fix typo's in example config 2024-04-02 23:33:21 +02:00
Adriaan de Groot
36485c8571 [partition] Simplify logic for checking for unencrypted /boot 2024-04-02 23:33:21 +02:00
demmm
f0c2295606 [localeq]Map-qt6 needed changes for Qt6 & Wayland
dragging & zooming now needs QML entries
osm is the only qtlocation provided map plugin, preferred thus useless now
no solution yet for warning (API key required), upstream bug reports offer no fix,
example https://bugreports.qt.io/browse/QTBUG-115742
2024-03-30 20:11:48 +01:00
Peter Jung
2fd98c913a
plymouthcfg: Use plymouth-set-default-theme instead of sed
Currently we are running into an issue, when setting the default theme via "sed", since the "[DAEMON]" entry in /etc/plymouth/plymouthd.conf is commented, which results into that the theme is not correctly applied.

Signed-off-by: Peter Jung <admin@ptr1337.dev>
2024-03-29 20:05:41 +01:00
Adriaan de Groot
ec0316806f [locale] Fix build with DEBUG_TIMEZONES 2024-03-29 02:09:18 +04:00
Adriaan de Groot
6b2c996d06
Merge pull request #2303 from calamares/mount_efi_fix
[mount] Ensure efi partition gets correct options
2024-03-26 16:32:19 +01:00
Mike Stemle
a659db1f9c
Update Presentation.qml
The `padding` property is present in the qt5 version, but not the qt6 version. I notice a syntax error as a result of this missing propertly.
2024-03-24 13:27:44 -04:00
dalto
bdd059ffa8 [displaymanager] Fix sddm config file writing to the wrong location 2024-03-23 09:43:15 -05:00
dalto
e8726111f8 [mount] Ensure efi partition gets correct options 2024-03-17 19:03:02 -05:00
Simon Quigley
408ee0338a Active Directory Support 2024-03-07 15:26:32 -06:00
Peter Jung
60c5f3fd5a
initcpiocfg: Add microcode module
Signed-off-by: Peter Jung <admin@ptr1337.dev>
2024-03-04 19:44:03 +01:00
Adriaan de Groot
10acebff46 [displaymanager] repair tests by removing extra / 2024-03-03 23:11:55 +01:00
Adriaan de Groot
1ca9c7516b [displaymanager] Use (optional) configuration value
FIXES #1757
2024-03-03 21:16:21 +01:00
Adriaan de Groot
25ab3f7f03 [displaymanager] Add SDDM config-file setting 2024-03-03 21:12:37 +01:00
Adriaan de Groot
012138c1f2 [libcalamares] Start with 3.5 TODOs, improve naming 2024-03-03 21:01:01 +01:00
dalto
9992cf2507 [calamares] Fir preprocessor directives 2024-03-02 15:04:44 -06:00
dalto
7fd9d48a20 [calamares] Add python integration type and build type to log 2024-03-02 14:52:16 -06:00
dalto
74ccb4d28b [calamares] Add Qt version to debug log 2024-03-02 14:21:58 -06:00
Adriaan de Groot
098bbd520e [calamares] do not treat strings as lists
In Qt5, a QVariant created from a QString doesn't convert to a
QVariantList. In Qt6, it does. It is unclear if that is because it would
take two conversions (QString -> QStringList -> QVariantList) or
something else.

Exclude QStrings from being considered list-like; this works in both Qt5
and Qt6, and fixes weirdness in the Debug window.
2024-02-29 00:35:12 +01:00
Adriaan de Groot
49afa16b1c [calamares] factor out variant-type-checking in debug window 2024-02-29 00:33:08 +01:00
Adriaan de Groot
5568d22549 [networkcfg] fix python crash
open(path, "w") returns a TextIOWrapper,
open(path, "wb") returns a BufferedWriter,
.. neither of which is one of the types that os.chmod()
   consumes. Use fileno(), an integer file-descriptor.

FIXES #2294
2024-02-27 22:16:14 +01:00
Adriaan de Groot
91454a71d0 [calamares] missing include
Include for getpid() is needed on FreeBSD.
2024-02-27 00:52:21 +01:00
Adriaan de Groot
c4e0456acc [locale] avoid crash when there are no good locales
If the running locale doesn't match any locale in the list,
nothing is selected. Avoid a crash when referring to
first() of an empty list.
2024-02-27 00:28:36 +01:00
Adriaan de Groot
9925d6666f [calamares] Improve "crash self" functionality
Instead of UB, use POSIX signals and terminate the Calamares
process with a recognizable signal number (TRAP, which is
highly unusual).
2024-02-27 00:08:41 +01:00
Adriaan de Groot
2555b5baf4 [calamares] avoid double-quit message
In Qt5, QApplication::quit() was sufficient.
In Qt6, QApplication::quit() sends close events to top-level
windows, so we get a duplicate prompt for quit.

See https://blog.broulik.de/2023/11/on-the-road-to-plasma-6-vol-4/
2024-02-27 00:02:03 +01:00
Adriaan de Groot
f57ee158b7 Merge branch 'issue-2212' into calamares 2024-02-26 22:38:28 +01:00
Adriaan de Groot
028e9e68f9 [libcalamares] Add ${LANG} to process expansions 2024-02-26 22:37:20 +01:00
Adriaan de Groot
0f2bceb72f Docs: process jobmodules now expand variables 2024-02-26 21:58:40 +01:00
Adriaan de Groot
ab3612d18d [partition] tidy up constructor - use initializer-list 2024-02-26 21:39:37 +01:00
Victor Fuentes
01cbe07641
Make default partition entry have partNoEncrypt be false 2024-02-26 01:55:26 -05:00
Adriaan de Groot
2697c35fc7 [libcalamares] Run ProcessJobs with CommandLine
This makes the behavior of process jobs and shellcommands the same.
2024-02-25 23:22:19 +01:00
Adriaan de Groot
4329b824d4 [libcalamares] Test command-expansion with environment 2024-02-25 23:22:19 +01:00
Adriaan de Groot
0ced01ddc3 [libcalamares] Test environment-setting for CommandLine 2024-02-25 23:22:19 +01:00
Adriaan de Groot
d5555eba32 [libcalamares] Add environment-setting to CommandLine
This class is shared -- used by shellprocess and contextualprocess --
to collect the command settings for a single shell invocation.
2024-02-25 23:22:19 +01:00
Adriaan de Groot
6770f781e3 [libcalamares] Tests for new CommandLine constructors 2024-02-25 23:22:19 +01:00
Adriaan de Groot
ae3e609024 [libcalamares] Get default timeout from CommandList 2024-02-25 23:22:19 +01:00
Adriaan de Groot
4aa2c4988c [libcalamares] Replace factory method with constructor 2024-02-25 23:22:19 +01:00
Adriaan de Groot
0d9d2ac59a [libcalamares] Extend CommandLine
- rename fields so they are meaningful (this is a leftover
  from it inheriting std::pair)
- add environment list member
- add constructor that consumes a QVariantMap
2024-02-25 23:22:19 +01:00
Adriaan de Groot
15c514326c [shellprocess] Improve config docs 2024-02-25 23:22:19 +01:00
Adriaan de Groot
b795fd82bb [contextualprocess] Improve config docs 2024-02-25 23:22:19 +01:00
Adriaan de Groot
dc91255ff5 Changes: document process changes
FIXES #2212
2024-02-25 23:22:19 +01:00
Adriaan de Groot
7379e7f28d
Merge pull request #2288 from calamares/issue-2145
[packages] Add a DNF5 PM backend
2024-02-25 20:24:23 +01:00
Adriaan de Groot
633d6bda0d [libcalamaresui] Be more careful about which bindings are in use 2024-02-24 21:47:24 +01:00
Adriaan de Groot
dbddeaba68 CMake: be more noisy about python technologies
- log enabled and disabled features
- enabled python gets logged twice, that's fine
2024-02-24 21:27:45 +01:00
Adriaan de Groot
809d6cdda0 CMake: do not put PYBIND11 on the command-line
This is already stored in CalamaresConfig.hfor ABI purposes.
2024-02-24 18:54:33 +01:00
Adriaan de Groot
be5ce2e60f [libcalamares] repair boost / pybind split
The difference wasn't being recorded in the ABI-parts of
the CalamaresConfig.h header file, and it was unclear if
the two builds were "clean", e.g. no pybind11 stuff in a
boost build and vice-versa.

Tidy that up by writing more ABI info to the header and
double-checking defines when including Python-related
Calamares headers.
2024-02-24 13:27:44 +01:00
Adriaan de Groot
34888edae1 [libcalamares] repair visibility also for Boost::Python modules 2024-02-24 12:45:20 +01:00
Adriaan de Groot
7a3bff5117 [libcalamares] repair visibility also for Boost::Python modules 2024-02-24 12:28:36 +01:00
demmm
283c1f92bb [welcomeq] add Markdown example
use the release_notes.qml example, move from Richtext to Markdown
2024-02-23 17:09:56 +01:00
Adriaan de Groot
903fed07a9 [partition] Modernize signal-slot connection 2024-02-22 20:43:05 +01:00
Adriaan de Groot
9d1fec3668 [partition] Use a "real" slot for UniqueConnection 2024-02-22 20:37:01 +01:00
Adriaan de Groot
c69e229be0 [calamares] Use a "real" slot for UniqueConnection
Multiple reports of the following fatal error:
    WARNING (Qt): QObject::connect(QItemSelectionModel, PartitionPage):
    unique connections require a pointer to member function of a QObject subclass
suggest to replace the unique lambda by a "real" slot.
2024-02-22 20:26:56 +01:00
demmm
281f4c64bc [plasmalnf] CMake correction
libplasma is not required, if not found just skip the module, like in kf5
2024-02-22 11:50:02 +01:00
Adriaan de Groot
8a5876410e [packages] Add a DNF5 PM backend
I just made this up, checked that the `dnf5` command
in Fedora 39 exists and can run the command-lines
created by this PM backend. (I did install dnf5 into
that Fedora 39 system first)
2024-02-20 13:54:45 +01:00
demmm
b2ef6f9a28 [interactivetermianl] enable konsole for Qt6 builds too
4 lines of code duplicated to avoid even more ifdefs
2024-02-20 13:32:33 +01:00
Adriaan de Groot
54265f87b1 [libcalamaresui] Make symbols visible as needed 2024-02-20 12:07:57 +01:00
Adriaan de Groot
dc39791766 [libcalamares] Default symbols to hidden 2024-02-20 11:23:12 +01:00
Adriaan de Groot
ecf55cb65b
Merge pull request #2286 from demmm/calamares
[plasmalnf] enabled Plasma 6 build
2024-02-20 11:00:00 +01:00
Adriaan de Groot
a6591fcaf3 [libcalamares] Make symbols visible as needed 2024-02-20 00:44:48 +01:00
Adriaan de Groot
84b0262f31 [libcalamares] Default symbols to hidden
This restores the purpose of DLLEXPORT and helps keep the ABI
small-and-stable.
2024-02-19 23:23:03 +01:00
Adriaan de Groot
54250887e1 [locale] Adapt to changed RegionZonePair
- add method that takes a pair directly
- don't act like a pair is a std::pair
2024-02-19 23:04:37 +01:00
Adriaan de Groot
c09953e15e [libcalamares] Adapt tests to changed RegionZonePair
Don't access the pair like it is a std::pair
2024-02-19 23:04:37 +01:00
Adriaan de Groot
d131f51468 [libcalamares] don't inherit RegionZonePair from std::pair
There is no reason to stick with std::pair, make this
a regular value type with accessors with meaningful names.
2024-02-19 23:04:37 +01:00
Adriaan de Groot
5a1428154c [libcalamares] don't inherit CommandLine from std::pair
There's no reason not to write out the two data fields,
and we do not use anything else that std::pair offers.
2024-02-19 23:04:22 +01:00
Adriaan de Groot
0c9b3b2f16 [libcalamares] don't inherit InstanceKey from std::pair
While tempting, none of the STL containers are intended
for inheritance, and there's risks of slicing when used
as value types. Make InstanceKey a regular value type
data class and add the few operators that we actually
used from std::pair by hand.
2024-02-19 22:18:17 +01:00
Adriaan de Groot
c945cca93a [libcalamares] untangle GeoIP implementation details
Some implementation details should just be compiled
multiple times, rather than wrestling with visibility.
2024-02-19 21:40:10 +01:00
Adriaan de Groot
1444d9d73a [libcalamares] Repair misleading comment
The class used to be a `using Descriptor =` but that was changed without
updating the comment. Make it class documentation.
2024-02-19 19:22:08 +01:00
demmm
61126b424b [plasmalnf] enabled Plasma 6 build
plasma-framework has been renamed to libplasma and moved away from frameworks
now part of plasma (6 only)
2024-02-19 19:11:55 +01:00
Adriaan de Groot
38d78404b1 [locale*] Modernize setting compile definitions 2024-02-19 00:13:26 +01:00
Adriaan de Groot
a5dbe793d9 [packagechooser*] Modernize linking with dependencies 2024-02-19 00:06:45 +01:00
Adriaan de Groot
cefb437324 [libcalamares] Improve CMake bits
- use modern CMake commands, target-based
- make DLLEXPORT_PRO local to the build of libcalamares
- improve locality of includes
2024-02-18 23:19:43 +01:00
Adriaan de Groot
4eba859236 [libcalamares] Simplify symbol-visibility
Do not rely on Q_DECL_EXPORT and the like. Since we support basically
only gcc and clang for the kinds of Linux targets Calamares gets used
on, use visibility-specifiers that those compilers understand.
2024-02-18 23:10:35 +01:00
Adriaan de Groot
d7bbfd055c Merge branch 'issue-2283' into calamares 2024-02-18 22:45:29 +01:00
Adriaan de Groot
1e59092bf5 [partition] Clear jobs and reset intent
Start from a clean slate of intentions when applying changes
in the edit dialog. While here, shuffle debugging around so
that we get more useful information at once.
2024-02-18 22:38:03 +01:00
Adriaan de Groot
d640f17ddf [partition] When format is selected, clear out existing jobs
When editing a partition multiple times, do not leave
jobs from previous edits around. Apply fresh jobs each time.
2024-02-17 23:49:13 +01:00
Adriaan de Groot
2ea5a2b5d5 [partition] Set radio buttons conistently
Put the setChecked() calls together so that it is obvious
that only one is checked. *Keep* button is the inverse of
*Format* now. Previously, it used only the not-ZFS value,
and so would override the value obtained from the partition's
*format* setting.
2024-02-17 22:47:19 +01:00
Adriaan de Groot
3881737bbd [partition] Set intent while creating FS-labeling job 2024-02-17 17:55:34 +01:00
Adriaan de Groot
23d203b00b [partition] Set label intentions for filesystems
FIXES #1992
2024-02-17 17:37:02 +01:00
Adriaan de Groot
fc2bb1ede0 [partition] Add a helper for intended FS labels
The KPMCore partition label returns what **is**, not
what is intended. While here, fix some typo's in comments.
2024-02-17 17:37:02 +01:00
Adriaan de Groot
d5f32be5e3 [partition] Repair enable/disable status of FS label
The entry field was always enabled, but the label of the
FS-label entry field depended on the format button.
2024-02-17 17:03:27 +01:00
Adriaan de Groot
14e9da251a [libcalamaresui] Avoid Qt warning
16:23:24 [2]: WARNING (Qt): QThread::setPriority: Cannot set priority, thread is not running

Start the log widget's thread with a specific priority. This is
ignored on Linux anyway, but we'll avoid the setPriority() warning.
2024-02-17 16:52:06 +01:00
Adriaan de Groot
f23b4ff267 [partition] Preserve the will-it-be-formatted flag of the partition 2024-02-17 16:17:46 +01:00
Adriaan de Groot
ecd8839ac9 [partition] Set up label checkbox later
If the update-fs-label checkbox and drop-down depend on the
state of the format button, then set that up only once we're
done deciding on the format button.
2024-02-17 14:26:39 +01:00
Adriaan de Groot
a2b21ee087 [partition] Improve readability in edit-existing-partition
Pick out the condition and give it a name. The logic is the
same -- and is made worse because of the if() which looks
redundant at this point.
2024-02-17 14:18:24 +01:00
Adriaan de Groot
283668cb01 [libcalamares] Update sponsor / maintainer information 2024-02-17 11:25:40 +01:00
Lukas Märdian
562cae387c networkcfg: Configure NetworkManager to be the default renderer
When Netplan is installed in the target system:
In case NM is not yet set to be the default Netplan renderer (e.g. through a
/usr/lib/netplan/00-network-manager-all.yaml file shipped by an installed
package), create the /etc/netplan/01-network-manager-all.yaml configuration
and copy over all other Netplan configuration from the installer system.
2024-02-13 16:13:31 +01:00
Adriaan de Groot
f5e09cd676 [partition] Write out translation context
lupdate isn't smart enough to pick up `context` when it's
a variable, and then the whole string is not found for
translation.
2024-02-12 21:30:52 +01:00
Adriaan de Groot
f8448e3c97 [partition] Clarify documentation of static functions 2024-02-12 21:28:15 +01:00
dalto8
11522fa44e
Merge pull request #2280 from ArrayBolt3/calamares
[partition] Allow specifying unencrypted partitions when encryption is used
2024-02-08 19:58:52 +00:00
Tj
1d996d1f9a fstab: do not overwrite partition["mountPoint"]
When using BTRFS multiple subvolumes exist and whilst iterating them the
partition["mountPoint"] is inadvertently changed due to taking a
reference rather than a copy.

Closes: issue #2281
2024-02-07 16:21:24 +00:00
Aaron Rainbolt
546bedef11 [partition] Allow specifying unencrypted partitions when encryption is used 2024-02-05 19:24:05 -06:00
Adriaan de Groot
4e065b1ba9 [qml] Tidy up cmake bits, credit to contributor 2024-02-04 22:26:03 +01:00
Adriaan de Groot
25f9eaf523 [libcalamares*] Prefer < comparisons in Qt version 2024-02-04 22:06:55 +01:00
Adriaan de Groot
7d7a4597c1 [libcalamaresui] prefer < comparison of Qt versions 2024-02-04 22:06:55 +01:00
Adriaan de Groot
fd2610c739 [*] Remove pre-Qt-5.15 compatibility ifdefs 2024-02-04 22:06:51 +01:00
Jonathan Esk-Riddell
7b13d0b62f rename directory 2024-01-26 14:50:42 +00:00
Jonathan Esk-Riddell
c9685168e0 fix selection logic 2024-01-26 14:49:21 +00:00
Jonathan Esk-Riddell
ed540673d9 port slideshow to Qt 6 2024-01-25 15:42:19 +00:00
Adriaan de Groot
881347b9c2 [locale,packagechooser] (Auto-)Tests should not require GUI 2024-01-15 00:14:56 +01:00
Adriaan de Groot
1b655c26ef [libcalamares] Remove TMP-related environment variables
When running a command in the chroot, don't set TMP (and similar)
variables because those directories might nog make sense in the
target (yet).

FIXES #2269
2024-01-12 23:04:26 +01:00
artoo
78eeb963a3 libcalamares: add compat and packages headers to be installed;
Use case would be customization of default modules, eg packagechooser requires compat/Variant.h and packages/Globals.h to compile in the calamares-extension repo

Signed-off-by: artoo <artoo@artixlinux.org>
2024-01-02 22:57:08 +01:00
Adriaan de Groot
d38a48e900 [packagechooser] Make AppData and AppStream optional default OFF
If set to *ON*, then the dependencies for these two are required
(e.g. QtXml and/or AppStreamQt).
2024-01-02 22:40:10 +01:00
Adriaan de Groot
062171a2f0 [packagechooser] Use the found-directory for AppStream headers 2024-01-01 21:45:48 +01:00
Adriaan de Groot
8a199aaaf9 [packagechooser] Split out helper for AppStreamQt
- add a CMake helper for finding variations of AppStreamQt
- adapt packagechooser and packagechooserq
- adopt a slightly more modern CMake style here
2023-12-31 01:07:08 +01:00
Adriaan de Groot
fa2b96e9cc [partition] Fix build 2023-12-30 20:55:04 +01:00
Adriaan de Groot
7971bff2da
Merge pull request #2106 from Sunderland93/gtkgreet-css-config
greetd: Add custom CSS file path to gtkgreet
2023-12-30 20:45:40 +01:00
Adriaan de Groot
6cbed0f458 [partition] Remove extra-extra context string 2023-12-30 19:27:16 +01:00
Adriaan de Groot
e326758900 [partition] Massage types of job messages 2023-12-30 19:23:52 +01:00
Adriaan de Groot
ee09fd6613 [partition] Tidy up strings in flag job messages
- the prettyName() function returns names, labels. Use @title context.
- the prettyDescription() is for the summary page. Use @info context.
- the prettyStatus() is for status during installation. Use @status context.

While here, tighten up the wording some.
2023-12-30 17:42:16 +01:00
Emir SARI
1401f4ff21 Improve context 2023-12-28 00:07:31 +03:00
Adriaan de Groot
040f424931 [locale] Tweak string to avoid lupdate inserting {1?} 2023-12-27 00:53:26 +01:00
Adriaan de Groot
93ce2daff0 [machineid] Drop namespace to avoid lupdate warnings 2023-12-27 00:41:03 +01:00
Adriaan de Groot
0ac170c3de [summary] Split out classes to help lupdate
One QObject-based class per source file helps lupdate
figure out what goes where, avoids warning about unknown
class / namespace ::Config.
2023-12-27 00:28:26 +01:00
Adriaan de Groot
115f00f5cd [libcalamares] Rename tr() functions to avoid confusing lupdate 2023-12-25 14:24:06 +01:00
Adriaan de Groot
e73f5fb9fe [libcalamaresui] update percentage indicator on language change
Otherwise starting in one language will never change the
formatting of percentages when the language changes
later (example: Turkish writes %30, while Dutch writes 30%).

FIXES #2258
2023-12-25 00:06:00 +01:00
Adriaan de Groot
1d8a197242 [partition] Repair test
Was picking up settings stored from a previous test,
leading to a spurious failure.
2023-12-12 00:04:06 +01:00
Adriaan de Groot
8e5fbef390 [users] Repair test of now-removed "nonempty" option 2023-12-11 22:55:36 +01:00
Adriaan de Groot
558f045b65
Merge pull request #2252 from calamares/issue-2225
Add support for systemd-machine-id variations
2023-12-11 22:18:03 +01:00
Neal Gompa
5f897468ef [mount] Set btrfs compression default to zstd:1 to match comment default
The comment and examples above the mountOptions already indicate
zstd:1 for compression. Empirically, this has proven out to be a
reasonable default choice and should be actually used in the default
configuration.
2023-12-09 17:45:55 -05:00
Neal Gompa
84e66f8512 [mount] Drop noatime for baseline and btrfs defaults
The usage of noatime has subtle negative impacts on the system,
including breaking various utilities that rely on that information.

If a user or distribution explicitly chooses this, then they
acknowledge this problem and account for it, but it should not be
an uninformed default.

It's left in place for swap because it does not matter there and
likely reduces thrashing for swap files.
2023-12-09 17:45:40 -05:00
Adriaan de Groot
acd0875f1d [users] Use more-modern CMake constructs 2023-12-09 00:59:26 +01:00
Adriaan de Groot
b2d9b20edc
Merge pull request #2248 from EbonJaeger/add-crypt-gensalt-support
users: Add support for crypt_gensalt for user passwords
2023-12-09 00:25:43 +01:00
Adriaan de Groot
1b37eb1262 [machineid] Read systemd-style from config 2023-12-09 00:08:38 +01:00
Adriaan de Groot
89348910c3 [machineid] Document aliases (not visible in schema) 2023-12-09 00:08:19 +01:00
Adriaan de Groot
2f740564c6 [machineid] Run systemd-machine-id in host, telling it to modify target 2023-12-08 23:37:48 +01:00
Adriaan de Groot
e04e0260c9 [machineid] Apply coding style 2023-12-08 23:15:32 +01:00
Adriaan de Groot
e5ee28329d [machineid] Handle different settings of systemd-style 2023-12-08 22:43:00 +01:00
Adriaan de Groot
0eb387d6de [machineid] Default to running systemd-machine-id 2023-12-08 22:26:32 +01:00
Adriaan de Groot
0d11de4525 [libcalamares] Add missing parameter name 2023-12-08 22:04:46 +01:00
Aaron Rainbolt
7e6ac140c4 [grubcfg] Write config keys even if they don't already exist 2023-12-01 15:46:36 -06:00
Adriaan de Groot
d2214b8d2e [users] Document retirement of 'nonempty' 2023-12-01 18:15:00 +01:00
Adriaan de Groot
4e3de90cd0 [users] Document password settings 2023-12-01 18:01:58 +01:00
Adriaan de Groot
4262d9f051 [users] Expand documentation of the settings 2023-11-29 21:55:20 +01:00
dalto8
e8d0fa140a
Merge pull request #2249 from EbonJaeger/add-clr-boot-manager-support
bootloader: Add clr-boot-manager support
2023-11-28 18:51:21 +00:00
Evan Maddock
1b07de6fa7
Apply suggestions from code review
Co-authored-by: Adriaan de Groot <groot@kde.org>
2023-11-27 19:02:50 -05:00
dalto8
63ce03680b
Merge pull request #2246 from fhdk/initcpiocfg-bash-array-update
[initcpiocfg] use f-string - use new style bash array (issue #2243)
2023-11-27 18:22:38 +00:00
Evan Maddock
7a4d03e2c1
bootloader: Write all kernel params to the kernel cmdline file for CBM
Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
2023-11-27 10:47:51 -05:00
Evan Maddock
e13dbc621a
bootloader: Add clr-boot-manager support
This adds support for Clear Boot Manager to handle the bootloader installation and configuration.

When this option is selected in the bootloader.conf, clr-boot-manager will be used to install the bootloader (systemd-boot on EFI systems). If the system is non-EFI, Grub must be installed first, because clr-boot-manager doesn't do that, despite it running grub_mkconfig after.

Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
2023-11-26 17:27:57 -05:00
Evan Maddock
559d19018c
users: Add support for crypt_gensalt for user passwords
This attempts to locate the presense of the crypt_gensalt function in the crypto library in use. Many distributions have switched to libxcrypt, which provides this function. This means that Calamares can use the native library implementation instead of generating password salts itself, which, depending on the distro's configuration, may be more secure.

If the function can not be found, fallback to the current method of generating password salts.

Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
2023-11-26 16:54:07 -05:00
Adriaan de Groot
7a9a50d702 [libcalamares] AutoMount / kded6 has been tested by KaOS 2023-11-26 21:53:04 +01:00
Frede Hundewadt
98d534d5dd [initcpiocfg] use f-string - use new style bash array (issue #2243) 2023-11-26 14:57:19 +01:00
Adriaan de Groot
01e7cf44c2 [libcalamares] Placeholder for KF6 automount DBus calls 2023-11-21 15:22:09 +01:00
Adriaan de Groot
8748a52c68 [keyboard] Add explanatory translation comment 2023-11-20 20:31:58 +01:00
demmm
0e2fa42b60 [CMake] use KPMCore version to select Qt6
with 2588d1e796
KPMCore is Qt6 only, so any version from 24.01.75 on is Qt6, no need to check for Qt version this way
add missing NO_CONFIG to summaryq
2023-11-19 15:40:29 +01:00
Adriaan de Groot
146f549552 [libcalamares] Return None for empty GS keys
All unknown-variants return None, but this only
happens in practice with an empty variant (e.g.
a configuration key that is empty in the YAML).

FIXES #2237
2023-11-16 23:17:33 +01:00
Adriaan de Groot
8305b6cb1a [dummypython] Demonstrator for #2237 2023-11-16 23:10:53 +01:00
demmm
de85a02f74 [partition] make the tests also build with Qt6 2023-11-15 14:19:15 +01:00
Adriaan de Groot
8868ae956a [partition] Repair comparison 2023-11-14 13:50:08 +01:00
Adriaan de Groot
12413ad9e8 [partition] Add test demonstrating size edge-case 2023-11-13 21:32:05 +01:00
Adriaan de Groot
5c0b20d06a [partition] Enforce minimum <= recommended. 2023-11-13 21:28:10 +01:00
Adriaan de Groot
2ab0041180 [localeq] Repair translation-related typo
This would lead to a runtime error when loading the QML.
2023-11-13 20:10:52 +01:00
Adriaan de Groot
6b1226d5ea
Merge pull request #2206 from geckolinux/patch-1
Correct the comment description of the "Replace" partition behavior
2023-11-13 19:18:00 +01:00
Adriaan de Groot
eb77b208f8
Merge pull request #2226 from bitigchi/strings
Improve string formatting and context
2023-11-13 19:17:12 +01:00
Adriaan de Groot
1e1e12fad2 Merge branch 'issue-2018' into calamares
FIXES #2018
2023-11-13 00:47:31 +01:00
Adriaan de Groot
196dd55784 [partition] Test mixed-with-overlap settings 2023-11-13 00:40:58 +01:00
Adriaan de Groot
3e758d2d5c [partition] Extend test, fix bug indicated by test
Copy-paste-o, was using wrong string value for minimum size,
found by failing unit test.
2023-11-13 00:37:03 +01:00
Adriaan de Groot
45c11135b8 [partition] Extend tests with more config examples 2023-11-13 00:31:18 +01:00
Adriaan de Groot
d9aeb88275 [libcalamares] Add a clear() to GlobalStorage
While this isn't useful in production, it makes tests a lot
simpler to write since you don't have to wrestle with
creating new GS objects in order to start fresh.
2023-11-12 22:41:02 +01:00
Adriaan de Groot
f07e31de29 [partition] Test for basic legacy configuration 2023-11-12 22:28:27 +01:00
Adriaan de Groot
13acdace42 [partition] Start of tests for config 2023-11-11 23:46:00 +01:00
Emir SARI
37178b2273 Improve context 2023-11-10 13:34:01 +03:00
Adriaan de Groot
85350e63ef [partition] Put EFI settings in a sub-map 2023-11-09 23:31:17 +01:00
Adriaan de Groot
eb08c3facd [partition] Use API for consistent EFI-size GS key
While here, remove the textual entry in GS, which was unused.
2023-11-09 22:29:33 +01:00
Adriaan de Groot
449fba03be [partition] Factor out GS keys for EFI-size sharing 2023-11-09 22:17:51 +01:00
Adriaan de Groot
b06afd9074 [partition] Read minimum EFI size from GS 2023-11-09 22:06:12 +01:00
Adriaan de Groot
b72508546c [partition] Simplify variables for error messages 2023-11-09 21:57:55 +01:00
Adriaan de Groot
6e9dac3417 libcalamares: apply coding style 2023-11-07 23:43:09 +01:00
Adriaan de Groot
c506808d72 partition: factor out 32_MiB constant 2023-11-07 23:41:10 +01:00
Adriaan de Groot
d0ae922439 partition: introduce accessor for minimum-size EFI 2023-11-07 23:37:31 +01:00
Adriaan de Groot
45529ebdc1 partition: rename API to emphasize recommended and strict-minimum 2023-11-07 23:30:56 +01:00
Adriaan de Groot
bc45f57b48 partition: introduce more settings for EFI size 2023-11-07 22:46:39 +01:00
Adriaan de Groot
1051033324 libcalamares: create Python module libcalamares by hand
From inside Calamares, register libcalamares to the
interpreter by hand; from external Python processes
the regular extension library hooks are called.

Tested by running ./build/localmodule dummypython
(which means that the shared library is not present
in the current directory, so then `import libcalamares`
fails if the module is not already registered --
a test scenario that previous attempt at module
import missed).
2023-11-07 21:42:05 +01:00
Adriaan de Groot
a629e2650a libcalamares: importing the embedded python module can fail 2023-11-07 13:40:10 +01:00
Adriaan de Groot
5346008b7a libcalamares: repair names for recent translations
bqi is one possible name of Luri / Lhur language,
as far as I can tell -- there is also Northern Luri,
which is supported by Qt and has code lrc.

ie is Interlingue, which Qt maps to C locale.
Work around that by mapping it to interlingua.
2023-11-07 13:25:37 +01:00
Adriaan de Groot
d2c3f7a326 libcalamares: improve formatting of Qt error messages
These come through without function information, but we
can format them in one line by mis-using function info.
2023-11-07 00:53:10 +01:00
Adriaan de Groot
b57db97412 libcalamares: massage logging
Make the log-to-file always follow columns (with time
at the start of each line) so that stdout and the
log file look more alike.
2023-11-07 00:53:10 +01:00
Adriaan de Groot
cdd50681cd calamares: log settings and logfile paths again
When setting up the application, output goes to stdout,
so do it again once the logfile is configured, so that
these specific settings are in the log file as well.
2023-11-07 00:53:10 +01:00
Adriaan de Groot
18689074a8 libcalamares: add accessor for settings path 2023-11-07 00:53:10 +01:00
dalto8
ce1ecdba32
Merge pull request #2227 from jpwhiting/work/whiting/dontmountemptysubvolume
If a mountPoint has subvolume: "" don't try to mount the subvolume with a wrong "subvol=," argument.
2023-11-05 18:55:23 +00:00
Gaël PORTAY
194ebeba94 Use rsync option -S
The filesystems may contains huge sparse files (for example the docker
data file at path /var/lib/docker/devicemapper/devicemapper/data that is
100G big).

These files causes rsync to fail if the target file-system is too small
to copy them.

The option --sparse tells rsync to turn sequences of nulls into sparse
blocks.

        --sparse, -S

        Try to handle sparse files efficiently so they take up less
        space on the destination. If combined with --inplace the file
        created might not end up with sparse blocks with some
        combinations of kernel version and/or filesystem type. If
        --whole-file is in effect (e.g. for a local copy) then it will
        always work because rsync truncates the file prior to writing
        out the updated version.

        Note that versions of rsync older than 3.1.3 will reject the
        combination of --sparse and --inplace.

This adds the rsync short option -S to let rsync handle sparse files.

Fixes:

        18:03:36 [6]: static CalamaresUtils::ProcessResult CalamaresUtils::System::runCommand(CalamaresUtils::System::RunLocation, const QStringList&, const QString&, const QString&, std::chrono::seconds)
            Running "env" ("sync")
            ..  Finished. Exit code: 0
            ..  Target cmd: ("sync") output:

        rsync: [receiver] write failed on "/tmp/calamares-root-81qie5d1/var/lib/docker/devicemapper/devicemapper/data": No space left on device (28)
        rsync error: error in file IO (code 11) at receiver.c(378) [receiver=v3.2.3]

Signed-off-by: Jeremy Whiting <jpwhiting@kde.org>
2023-11-03 09:59:06 -06:00
Jeremy Whiting
deb35d8b49 If a mountPoint has subvolume: "" don't use subvol= arguments.
When testing with a / mountPoint set to subvolume: "" it tried and
failed to mount the subvolume:

    .. Running ("mount", "-t", "btrfs", "-o", "subvol=,", "/dev/sda3", "/tmp/calamares-root-ylvhpxys/")
    .. Target cmd: ("mount", "-t", "btrfs", "-o", "subvol=,", "/dev/sda3", "/tmp/calamares-root-ylvhpxys/") Exit code: 32 output:
 mount: /tmp/calamares-root-ylvhpxys: wrong fs type, bad option, bad superblock on /dev/sda3, missing codepage or helper program, or other error.

This fix makes the following config in mount.conf let us drop out of any
subvolume handling:

btrfsSubvolumes:
    - mountPoint: /
      subvolume: ""
2023-11-03 08:27:36 -06:00
Adriaan de Groot
44d12379bd machineid: pass around enum for style 2023-11-02 21:22:35 +01:00
Adriaan de Groot
083b0fb1e5 machineid: add configuration option for machine-id
SEE #2225
2023-10-30 23:25:21 +01:00
Adriaan de Groot
d3a767bad8 Merge branch 'issue-2018' into calamares
FIXES #2018
2023-10-30 22:40:34 +01:00
Adriaan de Groot
f6d1d81b01 partition: re-jig the EFI partition messages 2023-10-30 22:40:13 +01:00