Commit Graph

1052 Commits

Author SHA1 Message Date
Thomas Lamprecht
57feade1a6 low-level: drop outdated comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:40:03 +02:00
Thomas Lamprecht
db97dbacaf low-level: dump runtime enviroment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:38:14 +02:00
Thomas Lamprecht
92c7b5c916 low level installer: init a per-command log
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:20:38 +02:00
Thomas Lamprecht
1118bc49c9 buildsys: install RunEnv module
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:19:37 +02:00
Thomas Lamprecht
0d27321b79 run env: do not export non-existing is_test_mode method
Probably left over from using ISOEnv as base

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:19:37 +02:00
Wolfgang Bumiller
37545cce04 RunEnv: exclude zfs in query_blockdevs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:19:37 +02:00
Wolfgang Bumiller
2231d22680 add Proxmox::Install::RunEnv module
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:19:37 +02:00
Thomas Lamprecht
6ec8d1636a use separate faster and incremental DEB build for check targets
Faster as lintian isn't called on the resulting package and
incremental, as the no-pre-clean (-nc) flag is passed to build
package.

This is mostly relevant since the rust based TUI prototype got added
to packaging, as those needs quite a bit longer compared to copying
perl module files.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:19:37 +02:00
Thomas Lamprecht
aee9344c83 package rust based TUI installer prototype
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:19:37 +02:00
Thomas Lamprecht
9cdfeefcb1 buildsys: use full DEB_VERSION
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:19:37 +02:00
Thomas Lamprecht
4368b6dc51 debian: wrap-and-sort -tkn
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:19:37 +02:00
Thomas Lamprecht
4213602716 add top-level cargo wrokspace
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:19:37 +02:00
Thomas Lamprecht
00104045a1 tui: build with sources from debian pacakges
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 12:19:37 +02:00
Maximiliano Sandoval
ddc887bce5 stop main loop when closing the main window
Without this change closing the main window does not exit the main loop.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-06-19 09:34:55 +02:00
Maximiliano Sandoval
fd09e89311 exit process gracefully
We make sure that all exit calls quit the Glib main loop and child
processes.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-06-19 09:34:17 +02:00
Maximiliano Sandoval
f9bc57c4c2 stop using Gtk3::Window->set_has_resize_grip
The property GtkWindow::has-resize-grip was deprecated in GTK 3.14,
instead we make the window unresizable.

Note that we set the value of resizable only after the window has been
mapped and knows how much space it needs, also note that this only works
correctly if the window is properly displayed via present.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-06-19 09:30:51 +02:00
Maximiliano Sandoval
bbf5122557 stop using Gtk3::HSeparator
This was deprecated in GTK 3.2, the replacement Gtk3::Separator was
added in GTK 3.0.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-06-19 09:30:51 +02:00
Maximiliano Sandoval
d6efed199c stop using Gtk3::HBox and Gtk3::VBox
These widgets were deprecated in GTK 3.2 and replaced by Gtk3::Box which
was introduced in 3.0.

The packing changes require to horizontally expand the WebKit2::WebView
widget.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-06-19 09:30:51 +02:00
Maximiliano Sandoval
9f91507bae stop using Gtk3::Misc->set_alignment
This was deprecated in GTK 3.14, instead we use
GtkLabel:{xalign,yalign}. Note that by default they are both set to 0.5.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-06-19 09:30:51 +02:00
Wolfgang Bumiller
282ea9c559 tui: no need to have './' fallible
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-16 13:32:54 +02:00
Wolfgang Bumiller
03888174fb tui: only count exact example email address as invalid
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-16 13:32:54 +02:00
Wolfgang Bumiller
32368ac302 tui: properly group imports
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-16 13:32:54 +02:00
Wolfgang Bumiller
52f80858e6 tui: dependencies: group our own crates separately
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-16 13:32:54 +02:00
Wolfgang Bumiller
497be1a7ff Merge remote-tracking branch 'cheiss/tui-installer' into tui 2023-06-16 11:50:13 +02:00
Thomas Lamprecht
aafb89528c code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-16 09:32:18 +02:00
Thomas Lamprecht
413ca90b02 buildsys: create complete cd-info for test
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-16 07:48:27 +02:00
Christoph Heiss
c66dfa8e7d tui: add preliminary final install config serialization
Not fleshed out and rather crude; can/should be tweaked as necessary.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 13:30:32 +02:00
Christoph Heiss
ea15ca43bb tui: read and save reboot-after-install checkbox into options
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 13:28:30 +02:00
Christoph Heiss
fbfd1838a6 tui: rename SetupInfo::product_cfg -> ::config
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 13:10:52 +02:00
Christoph Heiss
81f9348c14 tui: add preliminary install progress dialog
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 12:58:41 +02:00
Christoph Heiss
82cc9fc480 tui: fix bootdisk dialog for zfs/btrfs
This was broken when adding the usage caveats at the top of the advanced
dialog; the wrong child views were selected.

Fixes: 7f27373 ("tui: add notices for zfs/btrfs bootdisk and their caveats")
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 12:18:01 +02:00
Christoph Heiss
1353d6cf91 tui: implement both PartialOrd and Ord for KeyboardMapping
Otherwise, clippy (correctly) complains that you should always implement
both if you implement one.

Fixes: 86dac56 ("tui: use whole keyboard mapping in select view as value")
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 12:09:17 +02:00
Christoph Heiss
5b9842244f tui: apply keyboard layout immediately after selecting it
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 11:51:24 +02:00
Christoph Heiss
86dac562e8 tui: use whole keyboard mapping in select view as value
Thus all its values can easily be used later on. Involves making
`KeyboardMapping` partial-orderable, just use the human-readable name
here (as that's what displayed to the user).

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 11:49:55 +02:00
Christoph Heiss
cae155237b tui: make test mode indicator into global installer state
This will later be needed in other parts of the installer as well.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 11:47:45 +02:00
Christoph Heiss
6ab6af4cb3 tui: track previous screens so that that each is only created once
Until now, if the user navigated back and then forward again, the screen
would be constructed & added again to the stack. This would result in
missing values and broken "Previous" button behaviour.

Fix it by tracking their screen ids and simply switch to them as needed.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:49:24 +02:00
Christoph Heiss
b107a892a8 tui: display proper keyboard layout name in summary
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:22:35 +02:00
Christoph Heiss
06908b6ff7 tui: implement proper keyboard layout selection
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:12:13 +02:00
Christoph Heiss
4e61d6cc83 tui: save user-selected country in options
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:04:14 +02:00
Christoph Heiss
e1a11f794b tui: move timezone dialog into custom view
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:04:14 +02:00
Christoph Heiss
67c8d5d079 tui: rename LocaleInfo::country -> ::countries
It's a map of all the countries, thus make the name plural too to match
its content.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-15 10:04:14 +02:00
Thomas Lamprecht
026620be2f rename Env to ISOEnv
in preparation of adding a runtime env module

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-14 13:26:38 +02:00
Christoph Heiss
90c0ea37be tui: display correct logo & title depending on product info
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 12:53:58 +02:00
Christoph Heiss
d445e54aa3 tui: ignore testdir here as well
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 12:53:58 +02:00
Christoph Heiss
a6e00ea66d tui: rename InstallerData -> InstallerState
It was kind of ambigous anyway - naming is hard.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 12:53:58 +02:00
Christoph Heiss
4296d2004c tui: implement initial parsing for setup & locale info
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 12:53:58 +02:00
Christoph Heiss
7f273738d7 tui: add notices for zfs/btrfs bootdisk and their caveats
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
95c490081d tui: introduce proper type for handling FQDNs
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
74e3a21e4a tui: remove cargo lockfile
We don't commit that anywhere; so remove it here as well.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00
Christoph Heiss
130fb96a09 tui: add simple system cpu/memory check, similar to gui installer
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-14 10:39:56 +02:00