Commit Graph

1052 Commits

Author SHA1 Message Date
Thomas Lamprecht
87c98625ca bump version to 8.0.12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-27 16:44:50 +02:00
Stefan Sterz
cc655f8b9d tui: persist disk selection for zfs and btrfs
previously the disk selection was reset if the advanced options
dialogue was re-opened. this commit adapts the behavior to restore
the previous selection.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-27 16:44:50 +02:00
Thomas Lamprecht
5ed7f4951f tui: block & notify if same disk gets selected twice
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-27 14:58:55 +02:00
Thomas Lamprecht
e77ab7d0d9 tui: only show warning for missing hyper-visor CPU flags for PVE
that feature isn't useful for neither Proxmox Mail Gateway nor
Proxmox Backup Server

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-27 11:17:44 +02:00
Thomas Lamprecht
ce8fdebb80 bump version to 8.0.11
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 21:40:01 +02:00
Thomas Lamprecht
6719eda6b5 tui: hide max-vz and max-root inputs if product isn't PVE
like we do in the GTK based installer

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 21:38:50 +02:00
Thomas Lamprecht
0a48c149be buildsys: copy over .cargo config directory to build-dir
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 19:23:26 +02:00
Thomas Lamprecht
eab366db0e bump version to 8.0.10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 19:10:06 +02:00
Thomas Lamprecht
a96dc91688 tui: boot disks: filter out Btrfs if setup info disallows it
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 19:08:03 +02:00
Thomas Lamprecht
ce76d4c0a1 buildsys: add check-pbs-tui target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 19:06:58 +02:00
Thomas Lamprecht
7e569bd6cd buildsys: add check-pmg-tui target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 19:05:50 +02:00
Wolfgang Bumiller
f57b120627 tui: rustfmt
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-26 16:01:31 +02:00
Wolfgang Bumiller
13f9bbae33 tui: use product for default hostname
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-26 16:01:31 +02:00
Wolfgang Bumiller
3f0477a811 tui: make ProxmoxProduct Copy
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-26 16:01:31 +02:00
Wolfgang Bumiller
fabd468edc tui: add global 'setup_info'
This is basically "installer information" and will is used
for things such as default values for which we do not want
to pass around all the data.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-26 16:01:31 +02:00
Thomas Lamprecht
f8a5d0412f bump version to 8.0.9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 16:49:29 +02:00
Thomas Lamprecht
c9482d0e38 disk selection: save both, order and disk id
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 16:46:33 +02:00
Stoiko Ivanov
120bc64902 fix space calculation for small disks for pve product
The convoluted calculation logic in case the disks is 8GB leads to
datasize becoming 16EiB further down:
* after calculating and removing the rootsize from $rest, $rest becomes
  smaller than $space (which should be the minimal non-used space in the
  volume-group) - this leads to a negative value, which overflows in
  the `& ~0xFFF` opration.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2023-06-22 16:26:49 +02:00
Fiona Ebner
98c856e86a always align rootdisk size to 4 MiB
While this was already done in the $rest < 48 GiB cases, it wasn't yet
done for the else branch and also not if $maxroot_mb was assigned,
because of being smaller.

Second and last step towards fixing an issue reported in the community
forum [0] where using 250.00 hdsize, 250 maxroot and 0 minfree would
fail.

Turns out two extents would be missing because of lvcreate implicitly
rounding up, one of them for the root LV (the one for metadata was
already handled in the previous commit).

[0]: https://forum.proxmox.com/threads/129320/post-566375

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-22 16:26:49 +02:00
Fiona Ebner
22b7837283 align metadatasize to 4 MiB
First step towards fixing an issue reported in the community forum [0]
where using 250.00 hdsize, 250 maxroot and 0 minfree would fail.

Turns out two extents would be missing because of lvcreate implicitly
rounding up, one of them for the metadata.

[0]: https://forum.proxmox.com/threads/129320/post-566375

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-22 16:26:49 +02:00
Thomas Lamprecht
0632d4790a gtk: raid disk selector: separate UI state from config state
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 16:22:10 +02:00
Thomas Lamprecht
25de20e33a sys block: fix id for test disks
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 16:20:41 +02:00
Maximiliano Sandoval
e1eb2ac947 tui: do not auto reboot on failures
Otherwise the user only has 5 seconds to see the error message before
the machine reboots.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-06-22 15:30:53 +02:00
Thomas Lamprecht
41f03d9036 tui: add some info to uknown UI messages
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 15:18:40 +02:00
Christoph Heiss
49d2f85044 tui: disable automatic text wrapping for form labels
This just causes weird layouts; such that labels and inputs do not line
up anymore.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-22 14:36:28 +02:00
Christoph Heiss
45082a3c1c tui: wrap multi-disk selection in scrollable view
If lots of disks are present and the available screen size is rather
small, it might be impossible for users to properly set all disks as
they want.

Fix it by making the view scrollable.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-22 14:36:28 +02:00
Stefan Sterz
f28043332a tui: switch to f64 for disk sizes
previously the tui used `u64` internally to represent the disk size.
since the perl-based installer expects GiB as floats and that is also
what is displayed in the tui that meant a lot of converting back and
forth. it also lead to an error where the disk sizes that were set
seemed to not have been persisted, even though the sizes were
correctly set. this commit refactors the installer to convert the size
once in the beginning and then stick to `f64`.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Reviewed-by: Christoph Heiss <c.heiss@proxmox.com>
Tested-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-22 14:34:24 +02:00
Thomas Lamprecht
f61593857b bump version to 8.0.8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 10:48:18 +02:00
Thomas Lamprecht
59096f791f Revert "critic: lazily read directories via <> glob"
Perl definitively acts very different with the while variant, it
seems it keeps the file handle open and reuses it in future calls,
even if the directory base of the glob is different

This reverts commit 90fb3d7615.
2023-06-22 10:45:59 +02:00
Thomas Lamprecht
4d942895df bump version to 8.0.7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 07:39:23 +02:00
Thomas Lamprecht
87782341ac critic: drop useless return undefined
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 07:38:05 +02:00
Thomas Lamprecht
90fb3d7615 critic: lazily read directories via <> glob
the for/foreach ones read everything in to build a list and then
iterate that, the while one is lazy and needs less memory.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 07:37:25 +02:00
Thomas Lamprecht
7d53c80701 critic: avoid $a, $b special package variables
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 07:35:56 +02:00
Thomas Lamprecht
ed68d1244d fix checking the now boolean prompt response
When the prompt abstraction got added in bc05a8f ("add basic UI
plugin infrastructure") it also inlined the check for the answer, as
that can be differently structured for each user interface, and
returns bool. But when switching over to this new infra, two sites
weren't updated to the simpler bool check and still checked with the
previous "equals 'ok'", which now was always false.

Fixes: 72bea99 ("switch prompt, error and message calls to new UI infra")
Reported-by: Alexander Zeidler <a.zeidler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-22 07:21:19 +02:00
Thomas Lamprecht
cb879145c3 bump version to 8.0.6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 18:42:34 +02:00
Thomas Lamprecht
fcb51d7391 tui: avoid actively focusing start-install button on summary
it's just safer to make the user look at the summary and avoid that a
stray enter hits of the installation.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 18:39:30 +02:00
Dominik Csapak
1d8fcd721a tui: focus next button by default
except the password dialog, since the user must provide input

to do that, we have to set the focus index on all relevant views

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-21 18:28:24 +02:00
Stefan Hanreich
99a7fcf1fe tui: improve ipv6 handling
* fix detection of ipv6 addresses
* change input for CIDR to allow integers up until 128

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-06-21 17:35:21 +02:00
Thomas Lamprecht
a467ec47b8 add some more logging, especially at start up
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:56:35 +02:00
Thomas Lamprecht
dc6c1a80cc log: record when and that the log got initialized
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:39:36 +02:00
Thomas Lamprecht
63fb95ea37 buildsys: dump environment in all test cases
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:38:49 +02:00
Thomas Lamprecht
e1b7469635 run env: re-used cached version to speed up GUI installer start
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:33:16 +02:00
Thomas Lamprecht
11fd703fe3 move location of runtome env file into ISO env
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 16:32:12 +02:00
Thomas Lamprecht
97e1524df3 fix duplicate deserialize_invalid_value_as_none
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 15:16:22 +02:00
Dominik Csapak
298a4de044 tui: verify email with basic regex
regex copied from perl gui installer

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: add missing librust-regex-1+default-dev B-D ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-21 15:14:15 +02:00
Dominik Csapak
d09fe568b9 tui: always use mail@example.invalid as default email address
like the gui installer

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-21 15:11:32 +02:00
Christoph Heiss
0fd882c301 tui: forward stray messages from low-level installer to stderr
After eaa7d41 - which directs all stderr from the TUI to tty2 - this can
be safely done without interrupting the TUI.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 15:09:19 +02:00
Christoph Heiss
638479b904 tui: implement auto-reboot after installation
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 15:09:11 +02:00
Christoph Heiss
73574fee14 tui: do not fail completely on invalid domain names
Since we already handly non-present domain names, invalid names can be
handled the same way, as not to completely fail the installation.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-06-21 15:09:06 +02:00
Wolfgang Bumiller
3fbd1dc9da tui: fix ability to type commas
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-21 15:07:39 +02:00