PVE-mods/build/test/fetch-proxmox-files.sh
Meliox 6585849459
Restructure repo (#251)
* refactor: restructure src/ into modules/, scripts/, and build/

- src/nag_screen/ and src/node_info/ -> src/modules/  (mods grouped explicitly)
- src/Scripts/ -> src/scripts/                        (lowercase, consistent)
- src/gen-rules.sh -> build/                          (build tool separated from source)

Update all references: debian/rules, .github/workflows/*, build/gen-rules.sh,
src/scripts/test/test-syntax.sh (SRC_DIR now points to src/modules/),
src/scripts/test/test-patches.sh, and files.list comments.

* refactor: move CI test scripts from src/scripts/test/ to build/test/

Test scripts are not installed — they are CI/dev tooling and belong
alongside build/gen-rules.sh. Update workflow references and fix the
SRC_DIR path depth in build/test/test-syntax.sh (../ -> ../..).

* d

---------

Co-authored-by: Meliox <na>
2026-08-08 23:46:46 +02:00

28 lines
1.5 KiB
Bash

#!/usr/bin/env bash
# Downloads upstream Proxmox VE packages and extracts all their files to real
# system paths, so the patch engine can be exercised on a plain CI runner.
set -euo pipefail
SUITE="${PVE_SUITE:-trixie}"
WORKDIR="$(mktemp -d)"
trap 'rm -rf "$WORKDIR"' EXIT
echo "[fetch] Configuring Proxmox no-subscription repo ($SUITE)..."
sudo wget -q "https://enterprise.proxmox.com/debian/proxmox-archive-keyring-${SUITE}.gpg" \
-O /usr/share/keyrings/proxmox-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/proxmox-archive-keyring.gpg] http://download.proxmox.com/debian/pve $SUITE pve-no-subscription" \
| sudo tee /etc/apt/sources.list.d/pve-test.list >/dev/null
sudo apt-get update -qq
echo "[fetch] Downloading pve-manager, proxmox-widget-toolkit, pve-yew-mobile-gui, libjson-perl, libpve-common-perl, libclone-perl, liblinux-inotify2-perl, libcommon-sense-perl, libhttp-message-perl, libstring-shellquote-perl, libencode-locale-perl, libdevel-cycle-perl, liburi-perl, libnet-ip-perl, libtimedate-perl and libfilesys-df-perl..."
cd "$WORKDIR"
apt-get download pve-manager proxmox-widget-toolkit pve-yew-mobile-gui libjson-perl libpve-common-perl libclone-perl liblinux-inotify2-perl libcommon-sense-perl libhttp-message-perl libstring-shellquote-perl libencode-locale-perl libdevel-cycle-perl liburi-perl libnet-ip-perl libtimedate-perl libfilesys-df-perl
echo "[fetch] Extracting to system paths..."
for deb in *.deb; do
echo "[fetch] $deb"
sudo dpkg-deb -x "$deb" /
done
echo "[fetch] Done."