archinstall 2.5.2__tar.gz → 2.5.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {archinstall-2.5.2 → archinstall-2.5.3}/PKG-INFO +1 -1
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/__init__.py +3 -7
- {archinstall-2.5.2 → archinstall-2.5.3/archinstall}/examples/guided.py +18 -14
- {archinstall-2.5.2 → archinstall-2.5.3/archinstall}/examples/only_hd.py +1 -1
- {archinstall-2.5.2 → archinstall-2.5.3/archinstall}/examples/swiss.py +3 -3
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/configuration.py +9 -5
- archinstall-2.5.3/archinstall/lib/disk/encryption.py +162 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/filesystem.py +7 -16
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/helpers.py +54 -40
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/partition.py +73 -53
- archinstall-2.5.3/archinstall/lib/hsm/__init__.py +1 -0
- archinstall-2.5.3/archinstall/lib/hsm/fido.py +92 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/installer.py +33 -39
- archinstall-2.5.2/archinstall/lib/menu/selection_menu.py → archinstall-2.5.3/archinstall/lib/menu/abstract_menu.py +45 -51
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/menu/global_menu.py +52 -42
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/menu/list_manager.py +1 -1
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/menu/menu.py +24 -23
- archinstall-2.5.3/archinstall/lib/menu/table_selection_menu.py +107 -0
- archinstall-2.5.3/archinstall/lib/models/disk_encryption.py +43 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/translationhandler.py +3 -24
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/__init__.py +1 -1
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/disk_conf.py +5 -5
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/general_conf.py +23 -38
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/locale_conf.py +2 -2
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/network_conf.py +5 -5
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/partitioning_conf.py +2 -40
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/save_conf.py +1 -1
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/system_conf.py +11 -11
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/README.md +5 -18
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/ar/LC_MESSAGES/base.po +1 -1
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/base.pot +9 -1
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/cs/LC_MESSAGES/base.po +2 -2
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/de/LC_MESSAGES/base.po +2 -5
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/el/LC_MESSAGES/base.po +1 -1
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/en/LC_MESSAGES/base.po +1 -1
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/es/LC_MESSAGES/base.po +2 -2
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/fr/LC_MESSAGES/base.po +2 -5
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/id/LC_MESSAGES/base.po +2 -2
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/it/LC_MESSAGES/base.po +2 -2
- archinstall-2.5.3/archinstall/locales/ko/LC_MESSAGES/base.mo +0 -0
- archinstall-2.5.3/archinstall/locales/ko/LC_MESSAGES/base.po +838 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/languages.json +5 -5
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/nl/LC_MESSAGES/base.po +2 -5
- archinstall-2.5.3/archinstall/locales/pl/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/pl/LC_MESSAGES/base.po +71 -82
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/pt/LC_MESSAGES/base.po +2 -5
- archinstall-2.5.3/archinstall/locales/pt_BR/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/pt_BR/LC_MESSAGES/base.po +22 -10
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/ru/LC_MESSAGES/base.po +2 -2
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/sv/LC_MESSAGES/base.po +2 -5
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/ta/LC_MESSAGES/base.po +2 -2
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/tr/LC_MESSAGES/base.po +2 -5
- archinstall-2.5.3/archinstall/locales/uk/LC_MESSAGES/base.mo +0 -0
- archinstall-2.5.3/archinstall/locales/uk/LC_MESSAGES/base.po +871 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/ur/LC_MESSAGES/base.po +2 -5
- archinstall-2.5.3/archinstall/locales/zh-CN/LC_MESSAGES/base.mo +0 -0
- archinstall-2.5.3/archinstall/locales/zh-CN/LC_MESSAGES/base.po +836 -0
- {archinstall-2.5.2/archinstall → archinstall-2.5.3}/examples/guided.py +18 -14
- {archinstall-2.5.2/archinstall → archinstall-2.5.3}/examples/only_hd.py +1 -1
- {archinstall-2.5.2/archinstall → archinstall-2.5.3}/examples/swiss.py +3 -3
- archinstall-2.5.2/archinstall/lib/hsm/__init__.py +0 -4
- archinstall-2.5.2/archinstall/lib/hsm/fido.py +0 -57
- archinstall-2.5.2/archinstall/locales/pl/LC_MESSAGES/base.mo +0 -0
- archinstall-2.5.2/archinstall/locales/pt_BR/LC_MESSAGES/base.mo +0 -0
- archinstall-2.5.2/docs/_build/doctrees/archinstall/Application.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/archinstall/Installer.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/archinstall/Profile.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/archinstall/general.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/environment.pickle +0 -0
- archinstall-2.5.2/docs/_build/doctrees/examples/binary.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/examples/python.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/help/discord.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/help/issues.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/index.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/installing/binary.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/installing/guided.doctree +0 -0
- archinstall-2.5.2/docs/_build/doctrees/installing/python.doctree +0 -0
- archinstall-2.5.2/docs/_build/man/archinstall.1 +0 -1239
- {archinstall-2.5.2 → archinstall-2.5.3}/README.md +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/__main__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/examples/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/examples/config-sample.json +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/examples/creds-sample.json +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/examples/custom-command-sample.json +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/examples/disk_layouts-sample.json +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/examples/minimal.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/examples/unattended.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/blockdevice.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/btrfs/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/btrfs/btrfs_helpers.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/btrfs/btrfspartition.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/btrfs/btrfssubvolumeinfo.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/diskinfo.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/dmcryptdev.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/mapperdev.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/user_guides.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/disk/validators.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/exceptions.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/general.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/hardware.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/locale_helpers.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/luks.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/menu/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/menu/simple_menu.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/menu/text_input.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/mirrors.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/models/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/models/dataclasses.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/models/network_configuration.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/models/password_strength.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/models/pydantic.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/models/subvolume.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/models/users.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/networking.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/output.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/packages/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/packages/packages.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/pacman.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/plugins.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/profiles.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/services.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/storage.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/systemd.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/udev/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/udev/udevadm.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/backwards_compatible_conf.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/manage_users_conf.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/subvolume_config.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/lib/user_interaction/utils.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/ar/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/cs/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/de/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/el/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/en/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/es/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/fr/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/id/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/it/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/locales_generator.sh +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/nl/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/pt/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/ru/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/sv/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/ta/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/tr/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/locales/ur/LC_MESSAGES/base.mo +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/52-54-00-12-34-56.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/awesome.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/cockpit.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/docker.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/httpd.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/lighttpd.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/mariadb.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/nginx.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/pipewire.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/postgresql.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/sshd.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/applications/tomcat.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/awesome.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/bspwm.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/budgie.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/cinnamon.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/cutefish.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/deepin.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/desktop.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/enlightenment.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/gnome.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/i3.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/kde.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/lxqt.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/mate.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/minimal.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/qtile.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/server.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/sway.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/xfce4.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/archinstall/profiles/xorg.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/Makefile +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/README.md +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/archinstall/Application.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/archinstall/Installer.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/archinstall/Profile.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/archinstall/general.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/conf.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/examples/binary.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/examples/python.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/flowcharts/BlockDeviceSelection.svg +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/flowcharts/DiskSelectionProcess.drawio +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/help/discord.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/help/issues.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/index.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/installing/binary.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/installing/guided.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/installing/python.rst +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/docs/pull_request_template.md +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/examples/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/examples/config-sample.json +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/examples/creds-sample.json +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/examples/custom-command-sample.json +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/examples/disk_layouts-sample.json +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/examples/minimal.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/examples/unattended.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/52-54-00-12-34-56.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/__init__.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/awesome.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/cockpit.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/docker.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/httpd.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/lighttpd.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/mariadb.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/nginx.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/pipewire.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/postgresql.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/sshd.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/applications/tomcat.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/awesome.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/bspwm.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/budgie.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/cinnamon.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/cutefish.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/deepin.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/desktop.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/enlightenment.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/gnome.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/i3.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/kde.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/lxqt.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/mate.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/minimal.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/qtile.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/server.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/sway.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/xfce4.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/profiles/xorg.py +0 -0
- {archinstall-2.5.2 → archinstall-2.5.3}/pyproject.toml +0 -0
|
@@ -37,21 +37,17 @@ from .lib.menu import Menu
|
|
|
37
37
|
from .lib.menu.list_manager import ListManager
|
|
38
38
|
from .lib.menu.text_input import TextInput
|
|
39
39
|
from .lib.menu.global_menu import GlobalMenu
|
|
40
|
-
from .lib.menu.
|
|
40
|
+
from .lib.menu.abstract_menu import (
|
|
41
41
|
Selector,
|
|
42
|
-
|
|
42
|
+
AbstractMenu
|
|
43
43
|
)
|
|
44
44
|
from .lib.translationhandler import TranslationHandler, DeferredTranslation
|
|
45
45
|
from .lib.plugins import plugins, load_plugin # This initiates the plugin loading ceremony
|
|
46
46
|
from .lib.configuration import *
|
|
47
47
|
from .lib.udev import udevadm_info
|
|
48
|
-
from .lib.hsm import (
|
|
49
|
-
get_fido2_devices,
|
|
50
|
-
fido2_enroll
|
|
51
|
-
)
|
|
52
48
|
parser = ArgumentParser()
|
|
53
49
|
|
|
54
|
-
__version__ = "2.5.
|
|
50
|
+
__version__ = "2.5.3"
|
|
55
51
|
storage['__version__'] = __version__
|
|
56
52
|
|
|
57
53
|
# add the custome _ as a builtin, it can now be used anywhere in the
|
|
@@ -54,12 +54,8 @@ def ask_user_questions():
|
|
|
54
54
|
|
|
55
55
|
global_menu.enable('disk_layouts')
|
|
56
56
|
|
|
57
|
-
#
|
|
58
|
-
global_menu.enable('
|
|
59
|
-
|
|
60
|
-
if archinstall.arguments.get('advanced', False) or archinstall.arguments.get('HSM', None):
|
|
61
|
-
# Enables the use of HSM
|
|
62
|
-
global_menu.enable('HSM')
|
|
57
|
+
# Specify disk encryption options
|
|
58
|
+
global_menu.enable('disk_encryption')
|
|
63
59
|
|
|
64
60
|
# Ask which boot-loader to use (will only ask if we're in UEFI mode, otherwise will default to GRUB)
|
|
65
61
|
global_menu.enable('bootloader')
|
|
@@ -150,14 +146,6 @@ def perform_installation(mountpoint):
|
|
|
150
146
|
if partition.size < 0.19: # ~200 MiB in GiB
|
|
151
147
|
raise archinstall.DiskError(f"The selected /boot partition in use is not large enough to properly install a boot loader. Please resize it to at least 200MiB and re-run the installation.")
|
|
152
148
|
|
|
153
|
-
# if len(mirrors):
|
|
154
|
-
# Certain services might be running that affects the system during installation.
|
|
155
|
-
# Currently, only one such service is "reflector.service" which updates /etc/pacman.d/mirrorlist
|
|
156
|
-
# We need to wait for it before we continue since we opted in to use a custom mirror/region.
|
|
157
|
-
installation.log('Waiting for automatic mirror selection (reflector) to complete.', level=logging.INFO)
|
|
158
|
-
while archinstall.service_state('reflector') not in ('dead', 'failed'):
|
|
159
|
-
time.sleep(1)
|
|
160
|
-
|
|
161
149
|
# If we've activated NTP, make sure it's active in the ISO too and
|
|
162
150
|
# make sure at least one time-sync finishes before we continue with the installation
|
|
163
151
|
if archinstall.arguments.get('ntp', False):
|
|
@@ -179,6 +167,22 @@ def perform_installation(mountpoint):
|
|
|
179
167
|
installation.log(f"Waiting for timedatectl timesync-status to report a timesync against a server", level=logging.INFO)
|
|
180
168
|
logged = True
|
|
181
169
|
time.sleep(1)
|
|
170
|
+
|
|
171
|
+
# if len(mirrors):
|
|
172
|
+
# Certain services might be running that affects the system during installation.
|
|
173
|
+
# Currently, only one such service is "reflector.service" which updates /etc/pacman.d/mirrorlist
|
|
174
|
+
# We need to wait for it before we continue since we opted in to use a custom mirror/region.
|
|
175
|
+
installation.log('Waiting for automatic mirror selection (reflector) to complete.', level=logging.INFO)
|
|
176
|
+
while archinstall.service_state('reflector') not in ('dead', 'failed', 'exited'):
|
|
177
|
+
time.sleep(1)
|
|
178
|
+
|
|
179
|
+
installation.log('Waiting pacman-init.service to complete.', level=logging.INFO)
|
|
180
|
+
while archinstall.service_state('pacman-init') not in ('dead', 'failed', 'exited'):
|
|
181
|
+
time.sleep(1)
|
|
182
|
+
|
|
183
|
+
installation.log('Waiting Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete.', level=logging.INFO)
|
|
184
|
+
while archinstall.service_state('archlinux-keyring-wkd-sync') not in ('dead', 'failed', 'exited'):
|
|
185
|
+
time.sleep(1)
|
|
182
186
|
|
|
183
187
|
# Set mirrors used by pacstrap (outside of installation)
|
|
184
188
|
if archinstall.arguments.get('mirror-region', None):
|
|
@@ -12,7 +12,7 @@ class OnlyHDMenu(archinstall.GlobalMenu):
|
|
|
12
12
|
super()._setup_selection_menu_options()
|
|
13
13
|
options_list = []
|
|
14
14
|
mandatory_list = []
|
|
15
|
-
options_list = ['harddrives', 'disk_layouts', '
|
|
15
|
+
options_list = ['harddrives', 'disk_layouts', 'disk_encryption','swap']
|
|
16
16
|
mandatory_list = ['harddrives']
|
|
17
17
|
options_list.extend(['save_config','install','abort'])
|
|
18
18
|
|
|
@@ -153,7 +153,7 @@ def select_installed_locale(mode):
|
|
|
153
153
|
_menus
|
|
154
154
|
"""
|
|
155
155
|
|
|
156
|
-
class SetupMenu(archinstall.
|
|
156
|
+
class SetupMenu(archinstall.AbstractMenu):
|
|
157
157
|
def __init__(self,storage_area):
|
|
158
158
|
super().__init__(data_store=storage_area)
|
|
159
159
|
|
|
@@ -230,14 +230,14 @@ class MyMenu(archinstall.GlobalMenu):
|
|
|
230
230
|
mandatory_list = []
|
|
231
231
|
if self._execution_mode in ('full','lineal'):
|
|
232
232
|
options_list = ['keyboard-layout', 'mirror-region', 'harddrives', 'disk_layouts',
|
|
233
|
-
'
|
|
233
|
+
'disk_encryption','swap', 'bootloader', 'hostname', '!root-password',
|
|
234
234
|
'!users', 'profile', 'audio', 'kernels', 'packages','additional-repositories','nic',
|
|
235
235
|
'timezone', 'ntp']
|
|
236
236
|
if archinstall.arguments.get('advanced',False):
|
|
237
237
|
options_list.extend(['sys-language','sys-encoding'])
|
|
238
238
|
mandatory_list = ['harddrives','bootloader','hostname']
|
|
239
239
|
elif self._execution_mode == 'only_hd':
|
|
240
|
-
options_list = ['harddrives', 'disk_layouts', '
|
|
240
|
+
options_list = ['harddrives', 'disk_layouts', 'disk_encryption','swap']
|
|
241
241
|
mandatory_list = ['harddrives']
|
|
242
242
|
elif self._execution_mode == 'only_os':
|
|
243
243
|
options_list = ['keyboard-layout', 'mirror-region','bootloader', 'hostname',
|
|
@@ -5,15 +5,18 @@ import logging
|
|
|
5
5
|
import pathlib
|
|
6
6
|
from typing import Optional, Dict
|
|
7
7
|
|
|
8
|
+
from .hsm.fido import Fido2
|
|
9
|
+
from .models.disk_encryption import DiskEncryption
|
|
8
10
|
from .storage import storage
|
|
9
11
|
from .general import JSON, UNSAFE_JSON
|
|
10
12
|
from .output import log
|
|
11
13
|
from .exceptions import RequirementError
|
|
12
|
-
|
|
14
|
+
|
|
13
15
|
|
|
14
16
|
def configuration_sanity_check():
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
disk_encryption: DiskEncryption = storage['arguments'].get('disk_encryption')
|
|
18
|
+
if disk_encryption is not None and disk_encryption.hsm_device:
|
|
19
|
+
if not Fido2.get_fido2_devices():
|
|
17
20
|
raise RequirementError(
|
|
18
21
|
f"In order to use HSM to pair with the disk encryption,"
|
|
19
22
|
+ f" one needs to be accessible through /dev/hidraw* and support"
|
|
@@ -21,6 +24,7 @@ def configuration_sanity_check():
|
|
|
21
24
|
+ f" 'systemd-cryptenroll --fido2-device=list'."
|
|
22
25
|
)
|
|
23
26
|
|
|
27
|
+
|
|
24
28
|
class ConfigurationOutput:
|
|
25
29
|
def __init__(self, config: Dict):
|
|
26
30
|
"""
|
|
@@ -39,8 +43,8 @@ class ConfigurationOutput:
|
|
|
39
43
|
self._user_creds_file = "user_credentials.json"
|
|
40
44
|
self._disk_layout_file = "user_disk_layout.json"
|
|
41
45
|
|
|
42
|
-
self._sensitive = ['!users'
|
|
43
|
-
self._ignore = ['abort', 'install', 'config', 'creds', 'dry_run']
|
|
46
|
+
self._sensitive = ['!users']
|
|
47
|
+
self._ignore = ['abort', 'install', 'config', 'creds', 'dry_run', 'disk_encryption']
|
|
44
48
|
|
|
45
49
|
self._process_config()
|
|
46
50
|
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
from typing import Dict, Optional, Any, TYPE_CHECKING, List
|
|
2
|
+
|
|
3
|
+
from ..menu.abstract_menu import Selector, AbstractSubMenu
|
|
4
|
+
from ..menu.menu import MenuSelectionType
|
|
5
|
+
from ..menu.table_selection_menu import TableMenu
|
|
6
|
+
from ..models.disk_encryption import EncryptionType, DiskEncryption
|
|
7
|
+
from ..user_interaction.partitioning_conf import current_partition_layout
|
|
8
|
+
from ..user_interaction.utils import get_password
|
|
9
|
+
from ..menu import Menu
|
|
10
|
+
from ..general import secret
|
|
11
|
+
from ..hsm.fido import Fido2Device, Fido2
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
_: Any
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class DiskEncryptionMenu(AbstractSubMenu):
|
|
18
|
+
def __init__(self, data_store: Dict[str, Any], preset: Optional[DiskEncryption], disk_layouts: Dict[str, Any]):
|
|
19
|
+
if preset:
|
|
20
|
+
self._preset = preset
|
|
21
|
+
else:
|
|
22
|
+
self._preset = DiskEncryption()
|
|
23
|
+
|
|
24
|
+
self._disk_layouts = disk_layouts
|
|
25
|
+
super().__init__(data_store=data_store)
|
|
26
|
+
|
|
27
|
+
def _setup_selection_menu_options(self):
|
|
28
|
+
self._menu_options['encryption_password'] = \
|
|
29
|
+
Selector(
|
|
30
|
+
_('Encryption password'),
|
|
31
|
+
lambda x: select_encrypted_password(),
|
|
32
|
+
display_func=lambda x: secret(x) if x else '',
|
|
33
|
+
default=self._preset.encryption_password,
|
|
34
|
+
enabled=True
|
|
35
|
+
)
|
|
36
|
+
self._menu_options['encryption_type'] = \
|
|
37
|
+
Selector(
|
|
38
|
+
_('Encryption type'),
|
|
39
|
+
func=lambda preset: select_encryption_type(preset),
|
|
40
|
+
display_func=lambda x: EncryptionType.type_to_text(x) if x else None,
|
|
41
|
+
dependencies=['encryption_password'],
|
|
42
|
+
default=self._preset.encryption_type,
|
|
43
|
+
enabled=True
|
|
44
|
+
)
|
|
45
|
+
self._menu_options['partitions'] = \
|
|
46
|
+
Selector(
|
|
47
|
+
_('Partitions'),
|
|
48
|
+
func=lambda preset: select_partitions_to_encrypt(self._disk_layouts, preset),
|
|
49
|
+
display_func=lambda x: f'{len(x)} {_("Partitions")}' if x else None,
|
|
50
|
+
dependencies=['encryption_password'],
|
|
51
|
+
default=self._preset.partitions,
|
|
52
|
+
preview_func=self._prev_disk_layouts,
|
|
53
|
+
enabled=True
|
|
54
|
+
)
|
|
55
|
+
self._menu_options['HSM'] = \
|
|
56
|
+
Selector(
|
|
57
|
+
description=_('Use HSM to unlock encrypted drive'),
|
|
58
|
+
func=lambda preset: select_hsm(preset),
|
|
59
|
+
display_func=lambda x: self._display_hsm(x),
|
|
60
|
+
dependencies=['encryption_password'],
|
|
61
|
+
default=self._preset.hsm_device,
|
|
62
|
+
enabled=True
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
def run(self, allow_reset: bool = True) -> Optional[DiskEncryption]:
|
|
66
|
+
super().run(allow_reset=allow_reset)
|
|
67
|
+
|
|
68
|
+
if self._data_store.get('encryption_password', None):
|
|
69
|
+
return DiskEncryption(
|
|
70
|
+
encryption_password=self._data_store.get('encryption_password', None),
|
|
71
|
+
encryption_type=self._data_store['encryption_type'],
|
|
72
|
+
partitions=self._data_store.get('partitions', None),
|
|
73
|
+
hsm_device=self._data_store.get('HSM', None)
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
def _display_hsm(self, device: Optional[Fido2Device]) -> Optional[str]:
|
|
79
|
+
if device:
|
|
80
|
+
return device.manufacturer
|
|
81
|
+
|
|
82
|
+
if not Fido2.get_fido2_devices():
|
|
83
|
+
return str(_('No HSM devices available'))
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
def _prev_disk_layouts(self) -> Optional[str]:
|
|
87
|
+
selector = self._menu_options['partitions']
|
|
88
|
+
if selector.has_selection():
|
|
89
|
+
partitions: List[Any] = selector.current_selection
|
|
90
|
+
output = str(_('Partitions to be encrypted')) + '\n'
|
|
91
|
+
output += current_partition_layout(partitions, with_title=False)
|
|
92
|
+
return output.rstrip()
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def select_encryption_type(preset: EncryptionType) -> Optional[EncryptionType]:
|
|
97
|
+
title = str(_('Select disk encryption option'))
|
|
98
|
+
options = [
|
|
99
|
+
# _type_to_text(EncryptionType.FullDiskEncryption),
|
|
100
|
+
EncryptionType.type_to_text(EncryptionType.Partition)
|
|
101
|
+
]
|
|
102
|
+
|
|
103
|
+
preset_value = EncryptionType.type_to_text(preset)
|
|
104
|
+
choice = Menu(title, options, preset_values=preset_value).run()
|
|
105
|
+
|
|
106
|
+
match choice.type_:
|
|
107
|
+
case MenuSelectionType.Reset: return None
|
|
108
|
+
case MenuSelectionType.Skip: return preset
|
|
109
|
+
case MenuSelectionType.Selection: return EncryptionType.text_to_type(choice.value) # type: ignore
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def select_encrypted_password() -> Optional[str]:
|
|
113
|
+
if passwd := get_password(prompt=str(_('Enter disk encryption password (leave blank for no encryption): '))):
|
|
114
|
+
return passwd
|
|
115
|
+
return None
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def select_hsm(preset: Optional[Fido2Device] = None) -> Optional[Fido2Device]:
|
|
119
|
+
title = _('Select a FIDO2 device to use for HSM')
|
|
120
|
+
fido_devices = Fido2.get_fido2_devices()
|
|
121
|
+
|
|
122
|
+
if fido_devices:
|
|
123
|
+
choice = TableMenu(title, data=fido_devices).run()
|
|
124
|
+
match choice.type_:
|
|
125
|
+
case MenuSelectionType.Reset:
|
|
126
|
+
return None
|
|
127
|
+
case MenuSelectionType.Skip:
|
|
128
|
+
return preset
|
|
129
|
+
case MenuSelectionType.Selection:
|
|
130
|
+
return choice.value # type: ignore
|
|
131
|
+
|
|
132
|
+
return None
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def select_partitions_to_encrypt(disk_layouts: Dict[str, Any], preset: List[Any]) -> List[Any]:
|
|
136
|
+
# If no partitions was marked as encrypted, but a password was supplied and we have some disks to format..
|
|
137
|
+
# Then we need to identify which partitions to encrypt. This will default to / (root).
|
|
138
|
+
all_partitions = []
|
|
139
|
+
for blockdevice in disk_layouts.values():
|
|
140
|
+
if partitions := blockdevice.get('partitions'):
|
|
141
|
+
partitions = [p for p in partitions if p['mountpoint'] != '/boot']
|
|
142
|
+
all_partitions += partitions
|
|
143
|
+
|
|
144
|
+
if all_partitions:
|
|
145
|
+
title = str(_('Select which partitions to encrypt'))
|
|
146
|
+
partition_table = current_partition_layout(all_partitions, with_title=False).strip()
|
|
147
|
+
|
|
148
|
+
choice = TableMenu(
|
|
149
|
+
title,
|
|
150
|
+
table_data=(all_partitions, partition_table),
|
|
151
|
+
multi=True
|
|
152
|
+
).run()
|
|
153
|
+
|
|
154
|
+
match choice.type_:
|
|
155
|
+
case MenuSelectionType.Reset:
|
|
156
|
+
return []
|
|
157
|
+
case MenuSelectionType.Skip:
|
|
158
|
+
return preset
|
|
159
|
+
case MenuSelectionType.Selection:
|
|
160
|
+
return choice.value # type: ignore
|
|
161
|
+
|
|
162
|
+
return []
|
|
@@ -5,6 +5,8 @@ import json
|
|
|
5
5
|
import pathlib
|
|
6
6
|
from typing import Optional, Dict, Any, TYPE_CHECKING
|
|
7
7
|
# https://stackoverflow.com/a/39757388/929999
|
|
8
|
+
from ..models.disk_encryption import DiskEncryption
|
|
9
|
+
|
|
8
10
|
if TYPE_CHECKING:
|
|
9
11
|
from .blockdevice import BlockDevice
|
|
10
12
|
_: Any
|
|
@@ -107,33 +109,22 @@ class Filesystem:
|
|
|
107
109
|
continue
|
|
108
110
|
|
|
109
111
|
if partition.get('filesystem', {}).get('format', False):
|
|
110
|
-
|
|
111
112
|
# needed for backward compatibility with the introduction of the new "format_options"
|
|
112
113
|
format_options = partition.get('options',[]) + partition.get('filesystem',{}).get('format_options',[])
|
|
113
|
-
|
|
114
|
+
disk_encryption: DiskEncryption = storage['arguments'].get('disk_encryption')
|
|
115
|
+
|
|
116
|
+
if disk_encryption and partition in disk_encryption.partitions:
|
|
114
117
|
if not partition['device_instance']:
|
|
115
118
|
raise DiskError(f"Internal error caused us to loose the partition. Please report this issue upstream!")
|
|
116
119
|
|
|
117
|
-
if not partition.get('!password'):
|
|
118
|
-
if not storage['arguments'].get('!encryption-password'):
|
|
119
|
-
if storage['arguments'] == 'silent':
|
|
120
|
-
raise ValueError(f"Missing encryption password for {partition['device_instance']}")
|
|
121
|
-
|
|
122
|
-
from ..user_interaction import get_password
|
|
123
|
-
|
|
124
|
-
prompt = str(_('Enter a encryption password for {}').format(partition['device_instance']))
|
|
125
|
-
storage['arguments']['!encryption-password'] = get_password(prompt)
|
|
126
|
-
|
|
127
|
-
partition['!password'] = storage['arguments']['!encryption-password']
|
|
128
|
-
|
|
129
120
|
if partition.get('mountpoint',None):
|
|
130
121
|
loopdev = f"{storage.get('ENC_IDENTIFIER', 'ai')}{pathlib.Path(partition['mountpoint']).name}loop"
|
|
131
122
|
else:
|
|
132
123
|
loopdev = f"{storage.get('ENC_IDENTIFIER', 'ai')}{pathlib.Path(partition['device_instance'].path).name}"
|
|
133
124
|
|
|
134
|
-
partition['device_instance'].encrypt(password=
|
|
125
|
+
partition['device_instance'].encrypt(password=disk_encryption.encryption_password)
|
|
135
126
|
# Immediately unlock the encrypted device to format the inner volume
|
|
136
|
-
with luks2(partition['device_instance'], loopdev,
|
|
127
|
+
with luks2(partition['device_instance'], loopdev, disk_encryption.encryption_password, auto_unmount=True) as unlocked_device:
|
|
137
128
|
if not partition.get('wipe'):
|
|
138
129
|
if storage['arguments'] == 'silent':
|
|
139
130
|
raise ValueError(f"Missing fs-type to format on newly created encrypted partition {partition['device_instance']}")
|
|
@@ -212,6 +212,47 @@ def all_disks() -> List[BlockDevice]:
|
|
|
212
212
|
log(f"[Deprecated] archinstall.all_disks() is deprecated. Use archinstall.all_blockdevices() with the appropriate filters instead.", level=logging.WARNING, fg="yellow")
|
|
213
213
|
return all_blockdevices(partitions=False, mappers=False)
|
|
214
214
|
|
|
215
|
+
def get_blockdevice_info(device_path, exclude_iso_dev :bool = True) -> Dict[str, Any]:
|
|
216
|
+
for retry_attempt in range(storage['DISK_RETRY_ATTEMPTS']):
|
|
217
|
+
partprobe(device_path)
|
|
218
|
+
time.sleep(max(0.1, storage['DISK_TIMEOUTS'] * retry_attempt))
|
|
219
|
+
|
|
220
|
+
try:
|
|
221
|
+
if exclude_iso_dev:
|
|
222
|
+
# exclude all devices associated with the iso boot locations
|
|
223
|
+
iso_devs = ['/run/archiso/airootfs', '/run/archiso/bootmnt']
|
|
224
|
+
|
|
225
|
+
try:
|
|
226
|
+
lsblk_info = get_lsblk_info(device_path)
|
|
227
|
+
except DiskError:
|
|
228
|
+
continue
|
|
229
|
+
|
|
230
|
+
if any([dev in lsblk_info.mountpoints for dev in iso_devs]):
|
|
231
|
+
continue
|
|
232
|
+
|
|
233
|
+
information = blkid(f'blkid -p -o export {device_path}')
|
|
234
|
+
return enrich_blockdevice_information(information)
|
|
235
|
+
except SysCallError as ex:
|
|
236
|
+
if ex.exit_code in (512, 2):
|
|
237
|
+
# Assume that it's a loop device, and try to get info on it
|
|
238
|
+
try:
|
|
239
|
+
resolved_device_name = device_path.readlink().name
|
|
240
|
+
except OSError:
|
|
241
|
+
resolved_device_name = device_path.name
|
|
242
|
+
|
|
243
|
+
try:
|
|
244
|
+
information = get_loop_info(device_path)
|
|
245
|
+
if not information:
|
|
246
|
+
raise SysCallError(f"Could not get loop information for {resolved_device_name}", exit_code=1)
|
|
247
|
+
return enrich_blockdevice_information(information)
|
|
248
|
+
|
|
249
|
+
except SysCallError:
|
|
250
|
+
information = get_blockdevice_uevent(resolved_device_name)
|
|
251
|
+
return enrich_blockdevice_information(information)
|
|
252
|
+
else:
|
|
253
|
+
# We could not reliably get any information, perhaps the disk is clean of information?
|
|
254
|
+
if retry_attempt == storage['DISK_RETRY_ATTEMPTS'] - 1:
|
|
255
|
+
raise ex
|
|
215
256
|
|
|
216
257
|
def all_blockdevices(
|
|
217
258
|
mappers: bool = False,
|
|
@@ -230,40 +271,18 @@ def all_blockdevices(
|
|
|
230
271
|
# we'll iterate the /sys/class definitions and find the information
|
|
231
272
|
# from there.
|
|
232
273
|
for block_device in glob.glob("/sys/class/block/*"):
|
|
233
|
-
|
|
274
|
+
try:
|
|
275
|
+
device_path = pathlib.Path(f"/dev/{pathlib.Path(block_device).readlink().name}")
|
|
276
|
+
except FileNotFoundError:
|
|
277
|
+
log(f"Unknown device found by '/sys/class/block/*', ignoring: {device_path}", level=logging.WARNING, fg="yellow")
|
|
234
278
|
|
|
235
279
|
if device_path.exists() is False:
|
|
236
280
|
log(f"Unknown device found by '/sys/class/block/*', ignoring: {device_path}", level=logging.WARNING, fg="yellow")
|
|
237
281
|
continue
|
|
238
282
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
iso_devs = ['/run/archiso/airootfs', '/run/archiso/bootmnt']
|
|
243
|
-
lsblk_info = get_lsblk_info(device_path)
|
|
244
|
-
if any([dev in lsblk_info.mountpoints for dev in iso_devs]):
|
|
245
|
-
continue
|
|
246
|
-
|
|
247
|
-
information = blkid(f'blkid -p -o export {device_path}')
|
|
248
|
-
except SysCallError as ex:
|
|
249
|
-
if ex.exit_code in (512, 2):
|
|
250
|
-
# Assume that it's a loop device, and try to get info on it
|
|
251
|
-
try:
|
|
252
|
-
information = get_loop_info(device_path)
|
|
253
|
-
if not information:
|
|
254
|
-
print("Exit code for blkid -p -o export was:", ex.exit_code)
|
|
255
|
-
raise SysCallError("Could not get loop information", exit_code=1)
|
|
256
|
-
|
|
257
|
-
except SysCallError:
|
|
258
|
-
print("Not a loop device, trying uevent rules.")
|
|
259
|
-
information = get_blockdevice_uevent(pathlib.Path(block_device).readlink().name)
|
|
260
|
-
else:
|
|
261
|
-
# We could not reliably get any information, perhaps the disk is clean of information?
|
|
262
|
-
print("Raising ex because:", ex.exit_code)
|
|
263
|
-
raise ex
|
|
264
|
-
# return instances
|
|
265
|
-
|
|
266
|
-
information = enrich_blockdevice_information(information)
|
|
283
|
+
information = get_blockdevice_info(device_path)
|
|
284
|
+
if not information:
|
|
285
|
+
continue
|
|
267
286
|
|
|
268
287
|
for path, path_info in information.items():
|
|
269
288
|
if path_info.get('DMCRYPT_NAME'):
|
|
@@ -409,7 +428,6 @@ def get_partitions_in_use(mountpoint :str) -> Dict[str, Any]:
|
|
|
409
428
|
return {}
|
|
410
429
|
|
|
411
430
|
output = json.loads(output)
|
|
412
|
-
# print(output)
|
|
413
431
|
|
|
414
432
|
mounts = {}
|
|
415
433
|
|
|
@@ -421,11 +439,13 @@ def get_partitions_in_use(mountpoint :str) -> Dict[str, Any]:
|
|
|
421
439
|
continue
|
|
422
440
|
|
|
423
441
|
if isinstance(blockdev, Partition):
|
|
424
|
-
|
|
425
|
-
|
|
442
|
+
if blockdev.mountpoints:
|
|
443
|
+
for blockdev_mountpoint in blockdev.mountpoints:
|
|
444
|
+
block_devices_mountpoints[blockdev_mountpoint] = blockdev
|
|
426
445
|
else:
|
|
427
|
-
|
|
428
|
-
|
|
446
|
+
if blockdev.mount_information:
|
|
447
|
+
for blockdev_mountpoint in blockdev.mount_information:
|
|
448
|
+
block_devices_mountpoints[blockdev_mountpoint['target']] = blockdev
|
|
429
449
|
|
|
430
450
|
log(f'Filtering available mounts {block_devices_mountpoints} to those under {mountpoint}', level=logging.DEBUG)
|
|
431
451
|
|
|
@@ -469,12 +489,6 @@ def disk_layouts() -> Optional[Dict[str, Any]]:
|
|
|
469
489
|
return None
|
|
470
490
|
|
|
471
491
|
|
|
472
|
-
def encrypted_partitions(blockdevices :Dict[str, Any]) -> bool:
|
|
473
|
-
for blockdevice in blockdevices.values():
|
|
474
|
-
for partition in blockdevice.get('partitions', []):
|
|
475
|
-
if partition.get('encrypted', False):
|
|
476
|
-
yield partition
|
|
477
|
-
|
|
478
492
|
def find_partition_by_mountpoint(block_devices :List[BlockDevice], relative_mountpoint :str) -> Partition:
|
|
479
493
|
for device in block_devices:
|
|
480
494
|
for partition in block_devices[device]['partitions']:
|