]> git.proxmox.com Git - pve-installer.git/log
pve-installer.git
16 months agobump version to 8.0.14
Thomas Lamprecht [Wed, 28 Jun 2023 16:39:44 +0000 (18:39 +0200)]
bump version to 8.0.14

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoinstallation: disable clamav-clamonacc.service by default for PMG
Thomas Lamprecht [Wed, 28 Jun 2023 16:34:16 +0000 (18:34 +0200)]
installation: disable clamav-clamonacc.service by default for PMG

> On-Access [...] leverages a kernel api called fanotify to block
> processes from attempting to access malicious files. This
> prevention occurs in kernel-space, and thus offers stronger
> protection than a purely user-space solution.

This is not really useful for the PMG use case and requires user
configuration as otherwise it refuses to start. In fact, is the sole
unit marked as failed after a fresh installation:

> ERROR: Clamonacc: at least one of OnAccessExcludeUID,
> OnAccessExcludeUname, or OnAccessExcludeRootUID must be specified
> it is recommended you exclude the clamd instance UID or uname to
> prevent infinite event scanning loops.

So disable it by default, if a user really wants this, whyever that
would be, the can just configure it and enable it again via
systemctl.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobump version to 8.0.13
Thomas Lamprecht [Tue, 27 Jun 2023 14:20:02 +0000 (16:20 +0200)]
bump version to 8.0.13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobump version to 8.0.12
Thomas Lamprecht [Tue, 27 Jun 2023 13:00:18 +0000 (15:00 +0200)]
bump version to 8.0.12

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agotui: persist disk selection for zfs and btrfs
Stefan Sterz [Tue, 27 Jun 2023 14:15:07 +0000 (16:15 +0200)]
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>
16 months agotui: block & notify if same disk gets selected twice
Thomas Lamprecht [Tue, 27 Jun 2023 12:58:51 +0000 (14:58 +0200)]
tui: block & notify if same disk gets selected twice

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agotui: only show warning for missing hyper-visor CPU flags for PVE
Thomas Lamprecht [Tue, 27 Jun 2023 09:16:41 +0000 (11:16 +0200)]
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>
16 months agobump version to 8.0.11
Thomas Lamprecht [Mon, 26 Jun 2023 19:40:01 +0000 (21:40 +0200)]
bump version to 8.0.11

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agotui: hide max-vz and max-root inputs if product isn't PVE
Thomas Lamprecht [Mon, 26 Jun 2023 19:37:54 +0000 (21:37 +0200)]
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>
16 months agobuildsys: copy over .cargo config directory to build-dir
Thomas Lamprecht [Mon, 26 Jun 2023 17:23:26 +0000 (19:23 +0200)]
buildsys: copy over .cargo config directory to build-dir

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobump version to 8.0.10
Thomas Lamprecht [Mon, 26 Jun 2023 17:10:06 +0000 (19:10 +0200)]
bump version to 8.0.10

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agotui: boot disks: filter out Btrfs if setup info disallows it
Thomas Lamprecht [Mon, 26 Jun 2023 17:08:01 +0000 (19:08 +0200)]
tui: boot disks: filter out Btrfs if setup info disallows it

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: add check-pbs-tui target
Thomas Lamprecht [Mon, 26 Jun 2023 17:06:58 +0000 (19:06 +0200)]
buildsys: add check-pbs-tui target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agobuildsys: add check-pmg-tui target
Thomas Lamprecht [Mon, 26 Jun 2023 17:05:50 +0000 (19:05 +0200)]
buildsys: add check-pmg-tui target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agotui: rustfmt
Wolfgang Bumiller [Mon, 26 Jun 2023 13:59:43 +0000 (15:59 +0200)]
tui: rustfmt

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
16 months agotui: use product for default hostname
Wolfgang Bumiller [Mon, 26 Jun 2023 13:59:39 +0000 (15:59 +0200)]
tui: use product for default hostname

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
16 months agotui: make ProxmoxProduct Copy
Wolfgang Bumiller [Mon, 26 Jun 2023 13:56:13 +0000 (15:56 +0200)]
tui: make ProxmoxProduct Copy

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
16 months agotui: add global 'setup_info'
Wolfgang Bumiller [Mon, 26 Jun 2023 13:52:28 +0000 (15:52 +0200)]
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>
17 months agobump version to 8.0.9
Thomas Lamprecht [Thu, 22 Jun 2023 14:48:22 +0000 (16:48 +0200)]
bump version to 8.0.9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agodisk selection: save both, order and disk id
Thomas Lamprecht [Thu, 22 Jun 2023 14:46:33 +0000 (16:46 +0200)]
disk selection: save both, order and disk id

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agofix space calculation for small disks for pve product
Stoiko Ivanov [Thu, 22 Jun 2023 13:57:13 +0000 (15:57 +0200)]
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>
17 months agoalways align rootdisk size to 4 MiB
Fiona Ebner [Thu, 22 Jun 2023 14:18:34 +0000 (16:18 +0200)]
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>
17 months agoalign metadatasize to 4 MiB
Fiona Ebner [Thu, 22 Jun 2023 14:18:33 +0000 (16:18 +0200)]
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>
17 months agogtk: raid disk selector: separate UI state from config state
Thomas Lamprecht [Thu, 22 Jun 2023 14:22:10 +0000 (16:22 +0200)]
gtk: raid disk selector: separate UI state from config state

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agosys block: fix id for test disks
Thomas Lamprecht [Thu, 22 Jun 2023 14:20:41 +0000 (16:20 +0200)]
sys block: fix id for test disks

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agotui: do not auto reboot on failures
Maximiliano Sandoval [Thu, 22 Jun 2023 13:08:40 +0000 (15:08 +0200)]
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>
17 months agotui: add some info to uknown UI messages
Thomas Lamprecht [Thu, 22 Jun 2023 13:18:40 +0000 (15:18 +0200)]
tui: add some info to uknown UI messages

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agotui: disable automatic text wrapping for form labels
Christoph Heiss [Thu, 22 Jun 2023 09:56:17 +0000 (11:56 +0200)]
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>
17 months agotui: wrap multi-disk selection in scrollable view
Christoph Heiss [Thu, 22 Jun 2023 09:56:16 +0000 (11:56 +0200)]
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>
17 months agotui: switch to `f64` for disk sizes
Stefan Sterz [Thu, 22 Jun 2023 09:20:38 +0000 (11:20 +0200)]
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>
17 months agobump version to 8.0.8
Thomas Lamprecht [Thu, 22 Jun 2023 08:48:18 +0000 (10:48 +0200)]
bump version to 8.0.8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoRevert "critic: lazily read directories via <> glob"
Thomas Lamprecht [Thu, 22 Jun 2023 08:45:59 +0000 (10:45 +0200)]
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 90fb3d7615a76803b9ff0376827782903a2d3342.

17 months agobump version to 8.0.7
Thomas Lamprecht [Thu, 22 Jun 2023 05:39:23 +0000 (07:39 +0200)]
bump version to 8.0.7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agocritic: drop useless return undefined
Thomas Lamprecht [Thu, 22 Jun 2023 05:38:05 +0000 (07:38 +0200)]
critic: drop useless return undefined

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agocritic: lazily read directories via <> glob
Thomas Lamprecht [Thu, 22 Jun 2023 05:37:22 +0000 (07:37 +0200)]
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>
17 months agocritic: avoid $a, $b special package variables
Thomas Lamprecht [Thu, 22 Jun 2023 05:35:37 +0000 (07:35 +0200)]
critic: avoid $a, $b special package variables

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agofix checking the now boolean prompt response
Thomas Lamprecht [Thu, 22 Jun 2023 05:16:12 +0000 (07:16 +0200)]
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>
17 months agobump version to 8.0.6
Thomas Lamprecht [Wed, 21 Jun 2023 16:42:34 +0000 (18:42 +0200)]
bump version to 8.0.6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agotui: avoid actively focusing start-install button on summary
Thomas Lamprecht [Wed, 21 Jun 2023 16:39:28 +0000 (18:39 +0200)]
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>
17 months agotui: focus next button by default
Dominik Csapak [Wed, 21 Jun 2023 14:48:13 +0000 (16:48 +0200)]
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>
17 months agotui: improve ipv6 handling
Stefan Hanreich [Wed, 21 Jun 2023 14:16:49 +0000 (16:16 +0200)]
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>
17 months agoadd some more logging, especially at start up
Thomas Lamprecht [Wed, 21 Jun 2023 14:56:35 +0000 (16:56 +0200)]
add some more logging, especially at start up

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agolog: record when and that the log got initialized
Thomas Lamprecht [Wed, 21 Jun 2023 14:39:33 +0000 (16:39 +0200)]
log: record when and that the log got initialized

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobuildsys: dump environment in all test cases
Thomas Lamprecht [Wed, 21 Jun 2023 14:34:17 +0000 (16:34 +0200)]
buildsys: dump environment in all test cases

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agorun env: re-used cached version to speed up GUI installer start
Thomas Lamprecht [Wed, 21 Jun 2023 14:33:10 +0000 (16:33 +0200)]
run env: re-used cached version to speed up GUI installer start

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agomove location of runtome env file into ISO env
Thomas Lamprecht [Wed, 21 Jun 2023 14:25:38 +0000 (16:25 +0200)]
move location of runtome env file into ISO env

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agofix duplicate deserialize_invalid_value_as_none
Thomas Lamprecht [Wed, 21 Jun 2023 13:16:22 +0000 (15:16 +0200)]
fix duplicate deserialize_invalid_value_as_none

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agotui: verify email with basic regex
Dominik Csapak [Wed, 21 Jun 2023 12:30:32 +0000 (14:30 +0200)]
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>
17 months agotui: always use mail@example.invalid as default email address
Dominik Csapak [Wed, 21 Jun 2023 12:30:31 +0000 (14:30 +0200)]
tui: always use mail@example.invalid as default email address

like the gui installer

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
17 months agotui: forward stray messages from low-level installer to stderr
Christoph Heiss [Wed, 21 Jun 2023 11:31:09 +0000 (13:31 +0200)]
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>
17 months agotui: implement auto-reboot after installation
Christoph Heiss [Wed, 21 Jun 2023 11:17:15 +0000 (13:17 +0200)]
tui: implement auto-reboot after installation

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: do not fail completely on invalid domain names
Christoph Heiss [Wed, 21 Jun 2023 09:40:44 +0000 (11:40 +0200)]
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>
17 months agotui: fix ability to type commas
Wolfgang Bumiller [Wed, 21 Jun 2023 12:57:29 +0000 (14:57 +0200)]
tui: fix ability to type commas

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agotui: clamp max LVM disk size to size of selected disk
Christoph Heiss [Wed, 21 Jun 2023 12:21:44 +0000 (14:21 +0200)]
tui: clamp max LVM disk size to size of selected disk

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: remove underline-effect from advanced disk setup titles
Christoph Heiss [Wed, 21 Jun 2023 12:04:09 +0000 (14:04 +0200)]
tui: remove underline-effect from advanced disk setup titles

While this might look at it should it terminal emulators, in a raw tty
this can have different effects; e.g. being a bright blue/green and
nearly unreadable. For now, just remove the effect completely, the
semantics are still very much clear.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agobump version to 8.0.5
Thomas Lamprecht [Wed, 21 Jun 2023 11:46:36 +0000 (13:46 +0200)]
bump version to 8.0.5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agotui: implement auto-reboot after installation
Christoph Heiss [Wed, 21 Jun 2023 11:15:12 +0000 (13:15 +0200)]
tui: implement auto-reboot after installation

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: rename `reboot` option to `autoreboot`, to better align with GUI
Christoph Heiss [Wed, 21 Jun 2023 11:13:14 +0000 (13:13 +0200)]
tui: rename `reboot` option to `autoreboot`, to better align with GUI

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agolow level: simulate reboot in test session
Christoph Heiss [Wed, 21 Jun 2023 11:12:37 +0000 (13:12 +0200)]
low level: simulate reboot in test session

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: use non-slanted logo
Christoph Heiss [Wed, 21 Jun 2023 11:00:56 +0000 (13:00 +0200)]
tui: use non-slanted logo

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agounconfigured: redirect TUI stderr output to tty2
Christoph Heiss [Wed, 21 Jun 2023 10:59:59 +0000 (12:59 +0200)]
unconfigured: redirect TUI stderr output to tty2

Otherwise, if anything is printed there, black bars appear at the
current cursor position in the TUI until after a refresh.

Also aligns it more closely. Might also be useful in the future for the
TUI to log some things.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agoUI: fix perl warning if no progress text is passed
Christoph Heiss [Wed, 21 Jun 2023 10:49:06 +0000 (12:49 +0200)]
UI: fix perl warning if no progress text is passed

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: make reboot-after-install checkbox default to enabled
Christoph Heiss [Wed, 21 Jun 2023 10:39:12 +0000 (12:39 +0200)]
tui: make reboot-after-install checkbox default to enabled

Aligns it with the GUI installer.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agogui: make abort button unsensitive on last panel
Maximiliano Sandoval [Wed, 21 Jun 2023 09:57:42 +0000 (11:57 +0200)]
gui: make abort button unsensitive on last panel

It makes no sense from a UX point of view to abort an install that's
already finished.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
17 months agotui: use correct index when retrieving DNS server address from view
Christoph Heiss [Wed, 21 Jun 2023 10:29:40 +0000 (12:29 +0200)]
tui: use correct index when retrieving DNS server address from view

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agofix #4643: show a confirmation dialog when clicking abort
Maximiliano Sandoval [Wed, 21 Jun 2023 08:55:05 +0000 (10:55 +0200)]
fix #4643: show a confirmation dialog when clicking abort

Note that unlike the rest of the file, we connect to the response signal
instead of using Gtk3::Dialog->run, the reason is that run blocks the
main loop used by GTK and this undesirable to the point where
Gtk3::Dialog->run was removed for GTK 4.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
17 months agotui: refresh summary view if it is switched back to
Christoph Heiss [Wed, 21 Jun 2023 10:09:24 +0000 (12:09 +0200)]
tui: refresh summary view if it is switched back to

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: make HVM extension not being present a non-fatal warning
Christoph Heiss [Wed, 21 Jun 2023 09:49:24 +0000 (11:49 +0200)]
tui: make HVM extension not being present a non-fatal warning

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: assume that the installer is run from the repo root in debug mode
Christoph Heiss [Wed, 21 Jun 2023 09:44:01 +0000 (11:44 +0200)]
tui: assume that the installer is run from the repo root in debug mode

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: do not fail completely on invalid domain names
Christoph Heiss [Wed, 21 Jun 2023 09:40:44 +0000 (11:40 +0200)]
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>
17 months agotui: allow one-part FQDNs/domains
Christoph Heiss [Wed, 21 Jun 2023 09:38:00 +0000 (11:38 +0200)]
tui: allow one-part FQDNs/domains

Otherwise, the user would be blocked from continuing the the installer,
instead just being presented with an error.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agogtk: return truthy for rescheduling the timer for autoreboot
Thomas Lamprecht [Wed, 21 Jun 2023 09:58:36 +0000 (11:58 +0200)]
gtk: return truthy for rescheduling the timer for autoreboot

This definitively worked without that value when the functionality
was first added in dfc02f3 ("fix #3093: allow to automatically reboot
on installation success"), so possibly something new with the glib,
gtk, or the perl bindings in bookworm..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agorun env: make addresses optional, include all interfaces
Thomas Lamprecht [Wed, 21 Jun 2023 09:52:14 +0000 (11:52 +0200)]
run env: make addresses optional, include all interfaces

Similar to our actual battle proven get_ip_config, but as the TUI
uses this one, and switching to it rather more risk, make just
addresses optional, add skip for "lo" loopback and don't skip ifaces
that aren't UP in the current helper.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agotui: slight FloatEditView improvement
Wolfgang Bumiller [Wed, 21 Jun 2023 08:37:33 +0000 (10:37 +0200)]
tui: slight FloatEditView improvement

with this you can type without removing the decimal places, but if
you type inside the decimal places it'll just move the cursor to the
end and do nothing

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoconfig: avoid warning if no country was detected
Thomas Lamprecht [Wed, 21 Jun 2023 08:45:28 +0000 (10:45 +0200)]
config: avoid warning if no country was detected

e.g., due to having no network (no DHCP lease)

Reported-by: Christian Ebner <c.ebner@proxmox.com>
Reported-by: Stefan Hanreich <s.hanreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoconfig: fix missing include of Log module
Thomas Lamprecht [Wed, 21 Jun 2023 08:44:38 +0000 (10:44 +0200)]
config: fix missing include of Log module

Reported-by: Stefan Hanreich <s.hanreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agotui: only focus summary table if it can be scrolled
Christoph Heiss [Wed, 21 Jun 2023 08:35:13 +0000 (10:35 +0200)]
tui: only focus summary table if it can be scrolled

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: set detected keyboard layout at installer launch
Christoph Heiss [Wed, 21 Jun 2023 08:26:07 +0000 (10:26 +0200)]
tui: set detected keyboard layout at installer launch

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: make auto-deteced routes optional
Christoph Heiss [Wed, 21 Jun 2023 07:31:50 +0000 (09:31 +0200)]
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>
17 months agotui: skip serializing empty fields for install config
Christoph Heiss [Wed, 21 Jun 2023 07:22:56 +0000 (09:22 +0200)]
tui: skip serializing empty fields for install config

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: make disk swap-, max-root-, max-data- and min-lvm-free-size optional
Christoph Heiss [Wed, 21 Jun 2023 07:21:53 +0000 (09:21 +0200)]
tui: make disk swap-, max-root-, max-data- and min-lvm-free-size optional

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: allow numeric & disk size edit views to be empty
Christoph Heiss [Wed, 21 Jun 2023 07:20:59 +0000 (09:20 +0200)]
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>
17 months agotui: run rustfmt
Christoph Heiss [Wed, 21 Jun 2023 06:42:59 +0000 (08:42 +0200)]
tui: run rustfmt

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agolow level: fix test-session progress
Christoph Heiss [Wed, 21 Jun 2023 06:37:13 +0000 (08:37 +0200)]
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>
17 months agotui: simplify test-mode evaluation
Christoph Heiss [Wed, 21 Jun 2023 06:30:02 +0000 (08:30 +0200)]
tui: simplify test-mode evaluation

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: drop unneeded parameter from InstallerBackgroundView::new()
Christoph Heiss [Wed, 21 Jun 2023 06:09:29 +0000 (08:09 +0200)]
tui: drop unneeded parameter from InstallerBackgroundView::new()

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
17 months agotui: drop useless gitattributes file
Christoph Heiss [Wed, 21 Jun 2023 05:52:34 +0000 (07:52 +0200)]
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>
17 months agogitignore: merge TUI .gitignore into top-level
Christoph Heiss [Wed, 21 Jun 2023 05:50:13 +0000 (07:50 +0200)]
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>
17 months agobump version to 8.0.4
Thomas Lamprecht [Tue, 20 Jun 2023 20:03:01 +0000 (22:03 +0200)]
bump version to 8.0.4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoproxinstall: re-add Encode module
Thomas Lamprecht [Tue, 20 Jun 2023 20:02:13 +0000 (22:02 +0200)]
proxinstall: re-add Encode module

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobump version to 8.0.3
Thomas Lamprecht [Tue, 20 Jun 2023 19:37:04 +0000 (21:37 +0200)]
bump version to 8.0.3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agotui: avoid using domain as FQDN, hard-code product as workaround
Thomas Lamprecht [Tue, 20 Jun 2023 19:36:22 +0000 (21:36 +0200)]
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>
17 months agogtk: fix initial default for FQDN
Thomas Lamprecht [Tue, 20 Jun 2023 19:25:07 +0000 (21:25 +0200)]
gtk: fix initial default for FQDN

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agolow level: drop extra exit
Thomas Lamprecht [Tue, 20 Jun 2023 19:08:58 +0000 (21:08 +0200)]
low level: drop extra exit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agotui: fix passing disk selection, use index
Thomas Lamprecht [Tue, 20 Jun 2023 19:06:59 +0000 (21:06 +0200)]
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>
17 months agoinstall: fix passing missing root volume name
Thomas Lamprecht [Tue, 20 Jun 2023 19:03:16 +0000 (21:03 +0200)]
install: fix passing missing root volume name

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoadd Finished UI² message
Thomas Lamprecht [Tue, 20 Jun 2023 18:04:36 +0000 (20:04 +0200)]
add Finished UI² message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoinstall module: move over ZFS and BTRFS device getters
Thomas Lamprecht [Tue, 20 Jun 2023 18:03:58 +0000 (20:03 +0200)]
install module: move over ZFS and BTRFS device getters

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agotui: disk view: partition sizes are in GB
Thomas Lamprecht [Tue, 20 Jun 2023 16:14:54 +0000 (18:14 +0200)]
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>
17 months agotui: lvm: crudely fix calculation mismatch
Thomas Lamprecht [Tue, 20 Jun 2023 16:14:09 +0000 (18:14 +0200)]
tui: lvm: crudely fix calculation mismatch

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>