Commit Graph

979 Commits

Author SHA1 Message Date
Christoph Heiss
c6f81714a1 tui: only focus summary table if it can be scrolled
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 10:35:13 +02:00
Christoph Heiss
79ae84dea9 tui: set detected keyboard layout at installer launch
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 10:26:07 +02:00
Christoph Heiss
00268c0cb8 tui: make auto-deteced routes optional
If, for some reason, the network is not properly configured (due to
e.g. no DHCP server being present on the network), there will be no
routes in the runtime environment as well. So do not depend on that,
otherwise the installer fails at the start.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 09:31:50 +02:00
Christoph Heiss
cc82d42e8d tui: skip serializing empty fields for install config
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 09:22:56 +02:00
Christoph Heiss
409fc0fdb0 tui: make disk swap-, max-root-, max-data- and min-lvm-free-size optional
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 09:21:53 +02:00
Christoph Heiss
7cfaf5608e tui: allow numeric & disk size edit views to be empty
Bit of a retro-fit I guess, could maybe get improved in the future.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 09:20:59 +02:00
Christoph Heiss
4a8f0a1c50 tui: run rustfmt
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 08:42:59 +02:00
Christoph Heiss
5ab640a142 low level: fix test-session progress
In a8fbe0ff, the protocol was changed; such that the TUI now multiplies
the value by 100. Thus divide it here by 100 before sending it off.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 08:37:13 +02:00
Christoph Heiss
c070637464 tui: simplify test-mode evaluation
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 08:30:02 +02:00
Christoph Heiss
1936156eee tui: drop unneeded parameter from InstallerBackgroundView::new()
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 08:09:29 +02:00
Christoph Heiss
0cdcf336a2 tui: drop useless gitattributes file
Since the cargo lockfile was removed from the repo in 74e3a21, this
became useless.

Fixes: 74e3a21 ("tui: remove cargo lockfile")
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 07:52:34 +02:00
Christoph Heiss
5e6eca8489 gitignore: merge TUI .gitignore into top-level
Since the TUI was put into a top-level workspace, the `target` folder
and lockfile exist too on that level.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 07:50:13 +02:00
Thomas Lamprecht
1de369c519 bump version to 8.0.4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 22:03:01 +02:00
Thomas Lamprecht
62824106e5 proxinstall: re-add Encode module
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 22:02:13 +02:00
Thomas Lamprecht
7e85b1e5b3 bump version to 8.0.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:37:12 +02:00
Thomas Lamprecht
1d594e1d2f tui: avoid using domain as FQDN, hard-code product as workaround
Using the product is actually fine, but we should derive it from the
ISO env, not hard-coding "pve", but for now ok enough.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:36:23 +02:00
Thomas Lamprecht
b7ad1ad4c2 gtk: fix initial default for FQDN
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:25:07 +02:00
Thomas Lamprecht
e3e27c9cbb low level: drop extra exit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:08:58 +02:00
Thomas Lamprecht
beb25c36a6 tui: fix passing disk selection, use index
Currently the installer depends on the index to derive the selected
disks, so use that instead of a wishing-how-it-could-be approach.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:07:04 +02:00
Thomas Lamprecht
e4a899304d install: fix passing missing root volume name
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:03:16 +02:00
Thomas Lamprecht
a8fbe0ff55 add Finished UI² message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 21:02:53 +02:00
Thomas Lamprecht
f9edca42a7 install module: move over ZFS and BTRFS device getters
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 20:03:58 +02:00
Thomas Lamprecht
9a2d64977f tui: disk view: partition sizes are in GB
The proxinstall takes a GB float here and multiplies it up to KB for
most parts, which is then passed to various tools, passing bytes here
makes this go bonkers and try to create a 4 EiB swap partition.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 18:15:01 +02:00
Thomas Lamprecht
23632414c2 tui: lvm: crudely fix calculation mismatch
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 18:14:09 +02:00
Thomas Lamprecht
5ad2f28c8d tui: use plain Proxmox ascii figlet in header
If, one would need to write the full product name, and as that is
already written in the "inner" dialogue header, lets just drop it
from the outer.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 18:12:48 +02:00
Thomas Lamprecht
b6e671a6db low-level: report errors and implement autor-reboot
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 17:39:32 +02:00
Christoph Heiss
3285f0ad2f tui: add initial implementation of low-level installer transport
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-20 16:07:15 +02:00
Christoph Heiss
deebe07fa7 tui: make yes_no_dialog() accept a callback for negative responses too
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-20 16:07:15 +02:00
Christoph Heiss
0c4590e073 UI: turn on autoflush for STDOUT
Otherwise, when STDOUT is connected to a pipe, it will not get flushed
completely after each message, which might than hangs the installer UI.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-20 16:07:15 +02:00
Christoph Heiss
c97b9971af tui: add back disk sorting
This was accidentally removed with below commit.

Fixes: 4532cff ("run env: replace lsblk with hd_list but fix it up a bit")
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-20 16:07:15 +02:00
Christoph Heiss
e2a1e0c2e7 tui: add "abort" button to installation progress screen
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-20 16:07:15 +02:00
Christoph Heiss
cb1f20b034 tui: adapt install config serialization to proper format
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-20 16:07:15 +02:00
Thomas Lamprecht
afa3b40f82 proxinstall: further clean ups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:01:59 +02:00
Thomas Lamprecht
140f3f407f low level: support actual installation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:01:34 +02:00
Thomas Lamprecht
059e965004 proxinstall: cleanup imports
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:00:47 +02:00
Thomas Lamprecht
499af19fe0 sys command: add missing imports, switch to UI for event processing
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:00:47 +02:00
Thomas Lamprecht
a677c773e9 factor out installation into own module
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:00:47 +02:00
Thomas Lamprecht
dc87ef5448 storage config: use strictures
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:00:47 +02:00
Thomas Lamprecht
fe06d7e94f move ipconf into run-env
This adds some duplication there, but much safer than restructuring
stuff at this point in time, we can deal with unification later.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:00:47 +02:00
Thomas Lamprecht
8e66eb8eee config: always parse kernel cmdline on initialization
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:00:47 +02:00
Thomas Lamprecht
f93bbae54f move assembling target and base directory into extract_data
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 16:00:47 +02:00
Thomas Lamprecht
ceec3def24 run env: use single source of truth for block devices
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 14:24:46 +02:00
Thomas Lamprecht
44e93c11f2 config: note that we want to remove mngmt_nic_id in the future
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 14:24:16 +02:00
Wolfgang Bumiller
66249b5b3a tui: include disk model in disk list
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-20 14:00:00 +02:00
Wolfgang Bumiller
4532cff472 run env: replace lsblk with hd_list but fix it up a bit
Instead of lsblk we use the original `hd_list` to be closer
to what we originally had.
However, from the PVE codebase I copied over the use of the
`E: DEVNAME` property to find the `/dev` node like (since
some weird devices can have '!' in /sys with '/' in /dev),
drop the check for `/sys/block/$d/dev`, and provide both the
`/dev` and `/sys/block` path in the output array.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-20 14:00:00 +02:00
Thomas Lamprecht
a2d3045be5 d/rules: actually build in release mode
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 13:29:12 +02:00
Thomas Lamprecht
c9f463a067 d/control: add missing libjson-perl dependency
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 13:27:29 +02:00
Thomas Lamprecht
5c3d53f5f5 low-level: add dummy install with prompt and message test
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 12:37:54 +02:00
Thomas Lamprecht
7a11b29803 unconfigured: honor proxtui cmndline flag
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 12:12:56 +02:00
Thomas Lamprecht
de629a2382 uncofigured: prepare for TUI and reworked installer config handling
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-20 12:06:56 +02:00