Commit graph

540 commits

Author SHA1 Message Date
Gerd v. Egidy 64eabbbbaa wait until we are online before doing a http/https load-srm
There is no dependency on NetworkManager being actually online when
sysrescue-initialize.py calls load-srm to honor the late_load_srm config
option. So without this patch this can fail when the network takes a
few seconds until the link is actually up.

Fixes #288
2022-06-04 17:10:43 +02:00
Gerd v. Egidy ca74778681 show output of sysrescue-initialize.py on the boot console
show it immediately, not when the buffer is full. This also yields proper
timestamps in the journal in case some part of it takes longer to complete.
2022-06-04 17:08:53 +02:00
Francois Dupoux 422966c1d2 Merge branch 'release903' into 'main'
SystemRescue-9.03

See merge request systemrescue/systemrescue-sources!205
2022-05-28 13:21:43 +00:00
Francois Dupoux 8567100b70 SystemRescue-9.03 2022-05-28 14:20:17 +01:00
Francois Dupoux 537cd04e28 Merge branch 'changelog' into 'main'
Update ChangeLog to keep one line per entry

See merge request systemrescue/systemrescue-sources!204
2022-05-28 09:03:41 +00:00
Francois Dupoux 6c476ecfaf Update ChangeLog to keep one line per entry 2022-05-28 10:02:50 +01:00
Francois Dupoux 0067a690f9 Merge branch 'new-packages' into 'main'
add some more packages

See merge request systemrescue/systemrescue-sources!203
2022-05-27 21:14:01 +00:00
Gerd v. Egidy 187358205b add some more packages
syslinux: this is already installed, but only through a dependency.
  syslinux is essential to build a bootable image. So this should be
  explicitly listed and not just as a dependency.

fatresize (10 KB): allows to resize FAT filesystems. Helpful for
  example when you have to grow a EFI System Partition because it
  ran out of space.

kexec-tools (70 KB): allows to directly boot into a given kernel +
  initramfs without going through the BIOS or bootloader before.
  Useful when the bootloader is broken, you can't immediately fix
  it but want to boot the original system.
2022-05-27 22:06:44 +02:00
Francois Dupoux d8a1d03d61 Merge branch 'config-float-to-boolean' into 'main'
Properly cast floats to booleans in sysrescue-autorun and sysrescue-initialize.py

See merge request systemrescue/systemrescue-sources!202
2022-05-22 21:08:23 +00:00
Gerd v. Egidy 36dc530a50 Properly cast floats to booleans in sysrescue-autorun and sysrescue-initialize.py
When the lua script parses the YAML config, it converts a `1` to `1.0` because in
lua all numbers are floats. So it writes out `1.0`, which is then loaded by the
python scripts later. Make the type conversion for booleans aware of this.

This allows to write something like `ar_disable: 1` in the YAML and have it
acted upon as expected.
2022-05-22 21:14:01 +02:00
Francois Dupoux 53f49d8a33 Merge branch 'sysrescue-initialize-typecast' into 'main'
Improved type casting for sysrescue-initialize.py and sysrescue-autorun

See merge request systemrescue/systemrescue-sources!201
2022-05-22 15:49:40 +00:00
Gerd v. Egidy cecd6946ff sysrescue-autorun: improve type casting for booleans
The recently implemented type casting code doesn't work intuitively for
booleans: for example it treats a string "0" as False and doesn't show
an error message for it. So the user might be unaware of this.

So add a dedicated conversion function for booleans.

Also add checks for conversions from dicts and lists, forbid to cast them
to strings because that is most probably not what the user wants.
2022-05-22 15:49:10 +02:00
Gerd v. Egidy afb77e30c5 sysrescue-initialize.py: Ensure the values given in the config file have the correct types
With the new config file merging the user could accidently overwrite the
config values with wrong types, for example a boolean with a dict or list.
This could lead to the script aborting with an exception.

Use explicit type casting and default values to ensure correct operation
in this case. This is the same as recently implemented for autorun.

Implement a dedicated conversion function for booleans to for example
treat a string "0" as False, python by default would interpret it as True.
2022-05-22 15:43:10 +02:00
Gerd v. Egidy a898151581 Merge branch 'main' into 'main'
caste the config with the same type as the defaultval

See merge request systemrescue/systemrescue-sources!198
2022-05-22 10:23:59 +00:00
pfeilmann ca084e664f caste the config with the same type as the defaultval 2022-05-22 10:23:59 +00:00
Francois Dupoux afd21149b1 Merge branch 'changelog' into 'main'
some more changelog entries for 9.03

See merge request systemrescue/systemrescue-sources!200
2022-05-22 07:10:00 +00:00
Gerd v. Egidy 967eedfc8e some more changelog entries for 9.03 2022-05-21 22:44:51 +02:00
Gerd v. Egidy ae8a15c2b2 Merge branch 'autoterminal' into 'main'
implement autoterminal: automatically started scripts that take over a virtual terminal for user interaction

See merge request systemrescue/systemrescue-sources!196
2022-05-21 20:21:03 +00:00
Gerd v. Egidy 8dda60298c Merge branch 'lateloadsrm-systemd' into 'main'
Add workaround for systemd not re-evaluating dependencies while running a transaction

See merge request systemrescue/systemrescue-sources!199
2022-05-21 20:20:02 +00:00
Gerd v. Egidy 4daea6433e Add workaround for systemd not re-evaluating dependencies while running a transaction
As described in #279, systemd does not re-evaluate the dependencies of changed units and
targets when daemon-reload is executed. It just continues it's transaction as it was
configured when starting the transaction.

So a late-loaded SRM can't autostart a service.

To work around this, add an extra call to "systemctl --no-block start multi-user.target"
after the daemon-reload. This will create a new transaction after the current one and
allow new services to be added to multi-user.target in a late-loaded SRM.

This means of course that this workaround only works for multi-user.target, not other
services or targets.
2022-05-21 21:41:39 +02:00
Gerd v. Egidy c2060e8a73 implement handling of serial consoles for autoterminal
serial consoles have separate systemd services (serial-getty@.service). We need to adapt
the handling and also need some different options for them than for regular gettys.

To allow sysrescue-initialize.py to differentiate between regular consoles and serial ones
they must be configured with the prefix "serial:" in the yaml, for example like this:

autoterminal:
    "serial:ttyS0": "/usr/bin/bash"
2022-05-12 22:53:57 +02:00
Gerd v. Egidy c3b0b576a4 Implement main part of autoterminal feature
See #258
2022-05-12 22:51:48 +02:00
Gerd v. Egidy 845fd55243 rename systemd getty drop-in files: add numbering for easier overriding (they are loaded in lexicographic order) 2022-05-12 21:10:06 +02:00
Francois Dupoux 38fef3a817 Merge branch 'newpkg' into 'main'
add moreutils and python-pythondialog packages

See merge request systemrescue/systemrescue-sources!197
2022-05-10 07:21:00 +00:00
Gerd v. Egidy 95211a9e2a add moreutils and python-pythondialog packages
moreutils (about 200k): several small shell utilities
I want to use lckdo for improving mountall. Also ts is helpful when you have a
datastream (like from a serial console) and add timestamps to it. But there are
more helpful utils in there.
https://joeyh.name/code/moreutils/

python-pythondialog (about 60k): allows to easily use python to create
simple shell UIs, based on the "dialog" utility (like used for example in setkmap).
I want to use it to create menus to be used with autoterminal.
https://pythondialog.sourceforge.io/
2022-05-09 22:37:45 +02:00
Francois Dupoux eb536c5a06 Merge branch 'workspace-count' into 'main'
xfwm4: Reduce number of default workspaces from 4 to 1.

See merge request systemrescue/systemrescue-sources!195
2022-05-09 11:30:15 +00:00
Francois Dupoux 31dc85c0b3 Merge branch 'mountall' into 'main'
add "mountall" command

See merge request systemrescue/systemrescue-sources!194
2022-05-09 11:27:06 +00:00
Francois Dupoux cfcfd6dd7a Merge branch 'lua-config-once' into 'main'
execute sysrescue-configuration.lua only once

See merge request systemrescue/systemrescue-sources!193
2022-05-09 11:26:49 +00:00
Francois Dupoux ada815f07a Merge branch 'yaml-merge' into 'main'
change yaml config loading logic to full merge

See merge request systemrescue/systemrescue-sources!192
2022-05-09 11:26:35 +00:00
ProtoFoo f733e32f0c xfwm4: Reduce number of default workspaces from 4 to 1. 2022-04-30 01:55:27 +02:00
Gerd v. Egidy e87660beeb execute sysrescue-configuration.lua only once
Before this patch sysrescue-configuration.lua was executed twice each boot:
(1) during initramfs stage (2) in the regular system as sysrescue-configuration.service

While in theory both runs should create the same output, this isn't guaranteed and
differences could appear for example because of network issues. Finding and debugging
these is difficult because the output of sysrescue-configuration.lua created during
initramfs isn't available anymore when the final system is running.

This patch lets sysrescue-configuration.lua just run once during initramfs. The
output JSON file is then written to the new tmpfs mounted dir /run/archiso/config/.
This dir is also made the new default location for sysrescue-effective-config.json.

A symlink from /etc/sysrescue/sysrescue-effective-config.json to the new location
is created for compatibility with previous releases.
2022-04-25 20:31:18 +02:00
Gerd v. Egidy a424ed7991 add "mountall" command
It loops through all available block devices in the system and tries to mount them.
They are mounted to /mnt/<devicename>.

If they have "dev", "proc" or "sys" dirs in them, then the respective dirs of the
running SystemRescue are bind-mounted into it. This allows running some commands
like grub-install when chrooting into the dir.
2022-04-24 21:53:21 +02:00
Gerd v. Egidy 0ce5fffa28 add changelog entry 2022-04-24 12:38:57 +02:00
Gerd v. Egidy b11a052e69 change logic of the sysrescuecfg boot command line option: merge instead of replace
When you set a "sysrescuecfg" option on the boot command line before this change,
only the files given on the boot command line were read, not the files in the
sysrescue.d dir. But previous versions of sysrescue-configuration.lua had a set of
built-in default values, these were still used.

Current sysrescue-configuration.lua does not include default values anymore, they
are now all in 100-defaults.yaml. So it is better to always read the default values
from the sysrescue.d dir and just merge files given with the sysrescuecfg option
additionally, with a higher priority.

The sysrescuecfg now also allows absolute paths for local files. When using relative
paths, the common sysrescue.d dirs are prefixed. In this case the file will usually
be loaded again, but at a higher priority.
2022-04-24 01:52:43 +02:00
Gerd v. Egidy 8cb9d2de6b harden sysrescue-autorun sysrescue-initialize.py against missing config values
Until now sysrescue-configuration.lua always ensured the default values were
in the effective JSON config because there was no way to remove them. Now the
lua script is improved to allow full config merging, including a delete function.
This could lead to the user accidently removing a value. The scripts did not
expect this and accessed non existing keys, leading to an exception.

This is fixed with this commit.
2022-04-24 01:08:27 +02:00
Gerd v. Egidy 24529bbb58 change yaml config loading logic to full merge
Previously when loading a YAML config, it overrode single values on the second hierarchy level.
But on all deeper levels new values were completely overwritten. This was inconsistent and poses
a problem for config entries that use these levels, like the ca-trust or the in-development autoterminal.

This change implements full merging of dictionaries on all levels to solve this. Values in files later
in precedence overwrite previous values. If the the old and the new config values are both dictionaries,
then the hierarchy levels are merged down recursively.

You can remove a previously existing dict entry again in a later file by assigning it an empty value.

Also fix handling of invalid YAMLs: ignore them instead of aborting execution
2022-04-23 23:18:23 +02:00
Francois Dupoux f1b7636d5d Merge branch 'acpi' into 'main'
Add acpi package (#280)

See merge request systemrescue/systemrescue-sources!191
2022-04-18 19:44:50 +00:00
Francois Dupoux f79ec4e9c4 Add acpi package (#280) 2022-04-18 20:05:33 +01:00
Francois Dupoux 675945c48e Merge branch 'setkmap-history' into 'main'
store the "setkmap" command in bash_history to make it accessible without typing

See merge request systemrescue/systemrescue-sources!190
2022-04-10 20:12:58 +00:00
Gerd v. Egidy b614840213 store the "setkmap" command in bash_history to make it accessible without typing
When the correct keyboard map is not set yet, it might be difficult for the user
to type in the command. This way they just have to press the arrow up key to reach it.

Fixes #273
2022-04-10 21:56:01 +02:00
Francois Dupoux 4537187dea Merge branch 'checkbin' into 'main'
Update check-binaries.sh script with new custom packages

See merge request systemrescue/systemrescue-sources!189
2022-04-10 18:35:00 +00:00
Francois Dupoux 770fc6bf15 Update check-binaries.sh script with new custom packages 2022-04-10 18:58:54 +01:00
Francois Dupoux 2305ce4bf5 Merge branch 'release902' into 'main'
SystemRescue-9.02

See merge request systemrescue/systemrescue-sources!188
2022-04-09 11:04:09 +00:00
Francois Dupoux 1085cca8a8 SystemRescue-9.02 2022-04-09 11:55:33 +01:00
Francois Dupoux a56da41d76 Merge branch 'readme' into 'main'
explain the use of sysrescuerepo for rebuilding SystemRescue

See merge request systemrescue/systemrescue-sources!187
2022-04-02 14:46:37 +00:00
Gerd v. Egidy 47bc90a08b explain the use of sysrescuerepo for rebuilding SystemRescue 2022-04-02 15:38:33 +02:00
Gerd v. Egidy 62312e703f Merge branch 'branchweb' into 'main'
Use the branch which contains the latest version of the website

See merge request systemrescue/systemrescue-sources!186
2022-04-02 13:23:35 +00:00
Francois Dupoux 01701add58 Use the branch which contains the latest version of the website 2022-04-02 13:27:15 +01:00
Francois Dupoux d671fb198d Merge branch 'load-srm' into 'main'
Add script and config.yaml parameter for late-loading of SystemRescueModules

See merge request systemrescue/systemrescue-sources!185
2022-03-27 14:07:38 +00:00
Gerd v. Egidy a100257d96 Add script and config.yaml parameter for late-loading of SystemRescueModules 2022-03-27 14:07:38 +00:00