Commit Graph

11139 Commits

Author SHA1 Message Date
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
ac265e6ff7 Changes: add contributor names 2023-11-07 21:56:49 +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
cb42b3af6a i18n: update language list 2023-11-07 13:13:26 +01:00
Calamares CI
bcd753c28b i18n: [python] Automatic merge of Transifex translations 2023-11-07 13:13:26 +01:00
Calamares CI
637084511e i18n: [calamares] Automatic merge of Transifex translations 2023-11-07 13:13:26 +01:00
Adriaan de Groot
32f8a3cbac i18n: adapt txstats to newer Transifex API
The language list hasn't updated in a long time, and the API
changed underneath. Update the getter -- while at it, this
changes the "completion" criterium to count only the strings
in Calamares itself, not the fdo + python bits too.
2023-11-07 12:57:39 +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
Adriaan de Groot
cfadf8f95a CI: add a -deps shell script for EndeavourOS 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
Adriaan de Groot
848137390e
Merge pull request #2228 from jpwhiting/work/whiting/sparsersync
Use rsync option -S
2023-11-04 22:41:17 +01: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
97da73b170 CI: don't fail the deps-installation scripts
Let CMake detect missing dependencies, one stage later in CI
2023-10-31 16:29:54 +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
Adriaan de Groot
026d1cb5e4 partition: add checks for absolute minimum size of EFI 2023-10-30 21:24:24 +01:00
Adriaan de Groot
f55161c06a Merge branch 'issue-2202' into calamares
FIXES #2202
2023-10-30 20:08:52 +01:00
Adriaan de Groot
757f8a8f9e packagechooser: handle differences in AppStreamQt API 2023-10-30 20:08:19 +01:00
Adriaan de Groot
a6dd49ac07 packagechooser: rename #define for AppStreamQt
Make explicit that it is set to a version (if it is defined at all).
2023-10-30 00:37:38 +01:00
Adriaan de Groot
b7545fded3 dummypython: add a ton of calls to setprogress()
Stress testing for #1912
2023-10-29 22:03:28 +01:00
Adriaan de Groot
8688285a25 CI: enable schema checks in the openSUSE nightly 2023-10-29 21:47:03 +01:00
Adriaan de Groot
741fe03969 netinstall: repair schema
The URIs were now being resolved (to the calamares.io domain) rather
than looked up locally. Make them local by prepending #/ in $ref s
2023-10-29 21:41:33 +01:00
Adriaan de Groot
82b5d50c34 CI: adapt schema tool to recent releases of pyyaml
Don't import a specific draft validator (it isn't used anyway,
and the validator is picked up from the schema's version)
2023-10-29 21:40:31 +01:00
Adriaan de Groot
350be92cd1 Merge branch 'work/adridg/pybind-fix' into calamares
FIXES #2223
2023-10-29 00:38:22 +02:00
Adriaan de Groot
fe45d32ef9 luksbootkeyfile: repair schema (add missing enum value) 2023-10-29 00:34:57 +02:00
Adriaan de Groot
db02ae0ce7 bootloader: repair schema (add missing properties) 2023-10-29 00:30:57 +02:00
Adriaan de Groot
ee90fee7bb CMake: be more chatty around results of validation-dependency check 2023-10-28 22:32:11 +02:00
Adriaan de Groot
627cb6b90a CMake: adapt to deprecations in CMake 3.28 2023-10-28 22:31:12 +02:00
demmm
27934ddaac
Merge pull request #2224 from demonkillerr/calamares
Fix small typo in module config documentation
2023-10-26 11:02:48 +02:00
DemonKiller
8f82dc8668
fix small typo in docs 2023-10-26 13:17:50 +05:30
Adriaan de Groot
5f011e5d19 CI: bump fedora to latest 2023-10-25 23:58:05 +02:00
Adriaan de Groot
e68f7b0bf3 dummypython: log things more sensibly 2023-10-25 00:35:50 +02:00
Adriaan de Groot
c5139e62bc libcalamares: one more round with module
Tested with:

- python -c 'import libcalamares ; print(libcalamares.VERSION);'
- loadmodule dummypython
- full install of KaOS
2023-10-24 23:46:58 +02:00
Adriaan de Groot
1c0559affa libcalamares: don't bind to temporaries
Clang warns about range-for-loop binding a reference
to temporaries, and these are pybind11 handles anyway
so are cheap to copy.
2023-10-24 22:18:10 +02:00
Adriaan de Groot
d435ddd955 libcalamares: don't name unused parameters 2023-10-24 22:15:10 +02:00
Adriaan de Groot
5d1b94a708 libcalamares: don't name unused parameters 2023-10-24 22:14:26 +02:00
Adriaan de Groot
f24df7ccc9 libcalamares: use Pybind11Helpers consistently
This header includes all of the needed pybind11 headers,
but also wrangles defines and warnings in one spot.
2023-10-24 22:13:06 +02:00
Adriaan de Groot
019450132e libcalamares: add missing parent constructor call to PythonJob 2023-10-24 22:06:25 +02:00