update 1.2.2.3 beta

This commit is contained in:
MacRimi
2026-07-06 00:59:50 +02:00
parent 9f94d72b69
commit 9c90722ef9
4 changed files with 54 additions and 40 deletions
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
2a42c1b604a8a42b553c79fe924a33534dfa7314d1f7a9df4d1a4d34861ad32e ProxMenux-1.2.2.3-beta.AppImage 7d9181c2adaab229a27f7002de121117a9343bdcd5465cc6cf3510de627005c3 ProxMenux-1.2.2.3-beta.AppImage
+1 -1
View File
@@ -13783,7 +13783,7 @@ def _pbs_keyfile_fingerprint(path: str = '') -> str:
return '' return ''
try: try:
r = subprocess.run( r = subprocess.run(
['proxmox-backup-client', 'key', 'info', '--output-format', 'json', kf], ['proxmox-backup-client', 'key', 'show', '--output-format', 'json', kf],
capture_output=True, text=True, timeout=10, capture_output=True, text=True, timeout=10,
) )
if r.returncode != 0 or not r.stdout: if r.returncode != 0 or not r.stdout:
+52 -38
View File
@@ -731,55 +731,44 @@ _bk_manage_pbs_encryption_keyfile() {
local installed=0 local installed=0
[[ -s "$key_file" ]] && installed=1 [[ -s "$key_file" ]] && installed=1
local preview="" # Precompute values used both by the compact prompt and the
# detailed info modal.
local fp="" kdf_hint="unknown" installed_at=""
if (( installed )); then if (( installed )); then
local fp="" kdf_hint="unknown" installed_at=""
if command -v proxmox-backup-client >/dev/null 2>&1; then if command -v proxmox-backup-client >/dev/null 2>&1; then
fp=$(proxmox-backup-client key info --output-format json "$key_file" 2>/dev/null \ fp=$(proxmox-backup-client key show --output-format json "$key_file" 2>/dev/null \
| grep -oE '"fingerprint"[[:space:]]*:[[:space:]]*"[^"]*"' \ | grep -oE '"fingerprint"[[:space:]]*:[[:space:]]*"[^"]*"' \
| head -1 | sed 's/.*"\([^"]*\)".*/\1/') | head -1 | sed 's/.*"\([^"]*\)".*/\1/')
fi fi
# KDF detection covers both keyfile shapes: modern PBS writes
# `"kdf":null` for kdf=none keys; the older format used
# `"kdf":"None"`. Anything else is treated as scrypt.
if grep -qE '"kdf":[[:space:]]*(null|"None")' "$key_file" 2>/dev/null; then if grep -qE '"kdf":[[:space:]]*(null|"None")' "$key_file" 2>/dev/null; then
kdf_hint="none" kdf_hint="none"
elif grep -q '"Scrypt"' "$key_file" 2>/dev/null; then elif grep -q '"Scrypt"' "$key_file" 2>/dev/null; then
kdf_hint="scrypt" kdf_hint="scrypt"
fi fi
installed_at=$(date -r "$key_file" '+%Y-%m-%d %H:%M' 2>/dev/null || echo "") installed_at=$(date -r "$key_file" '+%Y-%m-%d %H:%M' 2>/dev/null || echo "")
# Colors chosen for readability on the light-gray dialog fi
# background: \Z4 (blue) reads well; \Z2 (bright green) gets
# washed out. # Menu prompt: ONE line summarising the two things that
preview="$(hb_translate "Installed:") \Zb\Z4$(hb_translate "yes")\Zn"$'\n' # actually matter (installed + recoverable). Everything else
preview+="$(hb_translate "Path:") $key_file"$'\n' # goes in the "Show detailed keyfile info" action which uses
[[ -n "$installed_at" ]] && preview+="$(hb_translate "Installed at:") $installed_at"$'\n' # --msgbox — that widget honours embedded newlines, whereas
preview+="$(hb_translate "KDF:") $kdf_hint"$'\n' # dialog --menu collapses them into spaces on many distros and
[[ -n "$fp" ]] && preview+="$(hb_translate "Fingerprint:") $fp"$'\n' # produced an unreadable wall of text no matter how tight the
preview+="$(hb_translate "Keyfile passphrase stored:") " # per-field layout was.
[[ -s "$pass_file" ]] && preview+="\Zb\Z4$(hb_translate "yes")\Zn"$'\n' || preview+="\Zb$(hb_translate "no")\Zn"$'\n' local prompt=""
preview+="$(hb_translate "Recovery escrow present:") " if (( installed )); then
[[ -s "$recovery_enc" ]] && preview+="\Zb\Z4$(hb_translate "yes")\Zn"$'\n' || preview+="\Zb\Z1$(hb_translate "no")\Zn"$'\n' local recov_state="\Zb\Z1no — set a recovery passphrase\Zn"
# Explicit "the key IS recoverable" line so an operator glancing [[ -s "$recovery_enc" ]] && recov_state="\Zb\Z4yes\Zn"
# at "KDF: unknown" or a missing passphrase field doesn't infer prompt="Encryption keyfile: \Zb\Z4installed\Zn • Recoverable: ${recov_state}"
# that the key has been lost. Recovery only requires the escrow
# blob on PBS and its passphrase — neither of which lives in
# this on-disk keyfile.
if [[ -s "$recovery_enc" ]]; then
preview+="$(hb_translate "Recoverable via PBS escrow:") \Zb\Z4$(hb_translate "yes")\Zn"$'\n'
else
preview+="$(hb_translate "Recoverable via PBS escrow:") \Zb\Z1$(hb_translate "no")\Zn — $(hb_translate "set a recovery passphrase to enable recovery on a fresh host")"$'\n'
fi
else else
preview="$(hb_translate "No keyfile installed on this host.")"$'\n\n' prompt="No encryption keyfile installed on this host."
preview+="$(hb_translate "PBS encrypted backups won't work until one is generated or imported. Both actions happen during job creation the first time you tick 'Encrypt backups'.")"
fi fi
local choice local choice
if (( installed )); then if (( installed )); then
choice=$(dialog --backtitle "ProxMenux" --colors \ choice=$(dialog --backtitle "ProxMenux" --colors \
--title "$(translate "Manage PBS encryption keyfile")" \ --title "$(translate "Manage PBS encryption keyfile")" \
--menu "\n${preview}\n" \ --menu "\n${prompt}\n" \
"$HB_UI_MENU_H" "$HB_UI_MENU_W" "$HB_UI_MENU_LIST" \ "$HB_UI_MENU_H" "$HB_UI_MENU_W" "$HB_UI_MENU_LIST" \
"info" "$(hb_translate "Show detailed keyfile info")" \ "info" "$(hb_translate "Show detailed keyfile info")" \
"pass" "$(hb_translate "Update stored keyfile passphrase")" \ "pass" "$(hb_translate "Update stored keyfile passphrase")" \
@@ -790,7 +779,7 @@ _bk_manage_pbs_encryption_keyfile() {
else else
choice=$(dialog --backtitle "ProxMenux" --colors \ choice=$(dialog --backtitle "ProxMenux" --colors \
--title "$(translate "Manage PBS encryption keyfile")" \ --title "$(translate "Manage PBS encryption keyfile")" \
--menu "\n${preview}\n" \ --menu "\n${prompt}\n" \
"$HB_UI_MENU_H" "$HB_UI_MENU_W" "$HB_UI_MENU_LIST" \ "$HB_UI_MENU_H" "$HB_UI_MENU_W" "$HB_UI_MENU_LIST" \
"back" "$(hb_translate "← Return")" \ "back" "$(hb_translate "← Return")" \
3>&1 1>&2 2>&3) || break 3>&1 1>&2 2>&3) || break
@@ -798,12 +787,37 @@ _bk_manage_pbs_encryption_keyfile() {
case "$choice" in case "$choice" in
info) info)
# Full `key info` output (may need passphrase for scrypt). # Terminal output pattern used across ProxMenux (logo +
local info_out # msg_title + labeled TAB/BGN/BL/CL rows + "press enter
info_out=$(proxmox-backup-client key info "$key_file" 2>&1) # to return"), same shape as _bk_pbs's post-backup
dialog --backtitle "ProxMenux" \ # summary. Fits arbitrarily wide fingerprints without
--title "$(hb_translate "Keyfile info")" \ # the wrapping issues that dialog --msgbox has, and lets
--msgbox "$info_out" 20 80 # the operator copy-paste the fingerprint from a real
# terminal buffer.
show_proxmenux_logo
msg_title "$(translate "PBS encryption keyfile — detailed info")"
echo -e ""
echo -e "${TAB}${BGN}$(translate "Path:")${CL} ${BL}${key_file}${CL}"
[[ -n "$installed_at" ]] && \
echo -e "${TAB}${BGN}$(translate "Installed at:")${CL} ${BL}${installed_at}${CL}"
echo -e "${TAB}${BGN}$(translate "KDF:")${CL} ${BL}${kdf_hint}${CL}"
[[ -n "$fp" ]] && \
echo -e "${TAB}${BGN}$(translate "Fingerprint:")${CL} ${BL}${fp}${CL}"
if [[ -s "$pass_file" ]]; then
echo -e "${TAB}${BGN}$(translate "Keyfile passphrase stored:")${CL} ${BL}$(translate "yes (scrypt-unlock passphrase stored)")${CL}"
else
echo -e "${TAB}${BGN}$(translate "Keyfile passphrase stored:")${CL} ${BL}$(translate "no (kdf=none, not needed)")${CL}"
fi
if [[ -s "$recovery_enc" ]]; then
echo -e "${TAB}${BGN}$(translate "Recovery blob:")${CL} ${BL}$(translate "yes")${CL}"
echo -e "${TAB}${BGN}$(translate "Recoverable:")${CL} ${BL}$(translate "yes (via PBS escrow + recovery passphrase)")${CL}"
else
echo -e "${TAB}${BGN}$(translate "Recovery blob:")${CL} ${BL}$(translate "no")${CL}"
echo -e "${TAB}${BGN}$(translate "Recoverable:")${CL} ${BL}$(translate "no (no escrow blob — set a recovery passphrase to enable recovery)")${CL}"
fi
echo -e ""
msg_success "$(translate "Press Enter to return to menu...")"
read -r
;; ;;
pass) pass)
local new_pass new_pass2 local new_pass new_pass2