Commit Graph

1682 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
a87cdd8b9e Update build.func 2026-03-26 13:50:55 +01:00
CanbiZ (MickLesk)
0f3a8c8406 Improve apt-get retry and mirror fallback
Add robust retry logic for APT operations in misc/build.func and misc/install.func. Introduces an apt_retry helper and multiple fallback steps: disable by-hash, switch to a country mirror (ftp.de.debian.org), wait and retry to allow mirror sync, and as a last resort temporarily relax APT verification to allow insecure repositories to complete updates. Ensures cleanup and restores secure settings where possible, with clearer failure handling and messages to increase resilience of package installation during container builds and installs.
2026-03-26 13:48:56 +01:00
CanbiZ (MickLesk)
66cd1fb05a Add APT by-hash bypass and mirror fallback
Improve APT retry logic to handle failures caused by by-hash/CDN issues. Both misc/build.func and misc/install.func now write an apt config to disable Acquire::By-Hash, remove /var/lib/apt/lists/* and retry apt-get update/install; if that still fails they substitute deb.debian.org with ftp.debian.org as a fallback. This makes container builds and package updates more robust against CDN/hash-related apt failures.
2026-03-26 13:33:58 +01:00
CanbiZ (MickLesk)
6614b65bc1 magicdns 2026-03-26 13:19:14 +01:00
CanbiZ (MickLesk)
785a215a50 base packages dns 2026-03-26 13:18:52 +01:00
CanbiZ (MickLesk)
ee15572375 Update install.func 2026-03-26 13:11:13 +01:00
CanbiZ (MickLesk)
6a5e7b88fd fix(tools.func): flat repo detection for suites ending with /
- setup_deb822_repo: skip Components for any suite ending with /
- Previously only skipped for exactly './' but 'stable/' is also flat
- Fixes Jitsi repo producing 'Malformed entry (absolute Suite Component)'
2026-03-25 12:41:33 +01:00
CanbiZ (MickLesk)
f95260387c move json 2026-03-25 10:30:56 +01:00
MickLesk
96fc169f4b fix(build): prevent error handler crash from pipefail on grep
The missing_cmd grep pipeline in the install error handler runs
under set -o pipefail. When grep finds no match (exit 1), the
entire pipeline fails and triggers the ERR trap recursively,
crashing the recovery menu. Add || true to suppress this.
2026-03-21 19:16:33 +01:00
CanbiZ (MickLesk)
7ab160ff75 gitea sync 2026-03-18 14:58:47 +01:00
CanbiZ (MickLesk)
aaaf18de91 switch urls back to github (due slow gitea syncs) 2026-03-18 14:47:29 +01:00
CanbiZ (MickLesk)
4b0fcf7d9d Update print statement from 'Hello' to 'Goodbye' 2026-03-18 12:36:33 +01:00
CanbiZ (MickLesk)
b056d30f9d fixes pg_cron 2026-03-16 16:57:55 +01:00
CanbiZ (MickLesk)
7d411e30d7 fixes 2026-03-16 16:50:49 +01:00
CanbiZ (MickLesk)
b8c147ebfc fixes 2026-03-12 14:27:06 +01:00
CanbiZ (MickLesk)
ec875e6e62 Run app install live during image build
Change VM app deployer to run CT install scripts during image customization (virt-customize --run) instead of via a first-boot systemd service. Updated docs to reflect live installation, new update workflow (curl the ct/<app>.sh inside the VM), and new troubleshooting/reinstall guidance. misc/vm-app.func now injects function libs, runs a temporary wrapper inside virt-customize (with logging and error handling), removes the first-boot service and update wrapper injection, and updates summary/status messages to mark apps as pre-installed.
2026-03-12 09:43:43 +01:00
CanbiZ (MickLesk)
be8e4483fc Update vm-app.func 2026-03-12 09:22:12 +01:00
CanbiZ (MickLesk)
19cc18037c vm app-deployer 2026-03-12 09:06:41 +01:00
tremor021
2afbe78348 Add fetch_and_deploy_gl_release 2026-03-04 12:34:52 +01:00
CanbiZ (MickLesk)
fdc30949e3 feat(preflight): add enterprise repo subscription check
- New preflight_repo_access() warns if enterprise repos are active without subscription
- Scans /etc/apt/sources.list.d/ for enterprise.proxmox.com entries
- Tests HTTP access (detects 401/403 Unauthorized)
- Warning only — not a blocker (packages come from pve-no-subscription repo)
2026-03-03 14:42:59 +01:00
CanbiZ (MickLesk)
d242100531 refactor(preflight): move to install_script, clean UX flow
- Move run_preflight from build_container() into install_script() after header_info
- Shows: Header → preflight checks → 2s pause → clear (via next header_info call)
- On failure: show summary + exit cleanly (no ERR trap)
- Change all return 1 → return 0 in preflight functions (prevents ERR trap under set -Ee)
- Remove PREFLIGHT_DONE guard from build_container (no longer needed)
2026-03-03 14:10:03 +01:00
CanbiZ (MickLesk)
4254e15bba Update build.func 2026-03-03 14:06:26 +01:00
CanbiZ (MickLesk)
c35cfb59fb Update build.func 2026-03-03 13:51:20 +01:00
CanbiZ (MickLesk)
e29561e401 Update build.func 2026-03-03 13:40:40 +01:00
CanbiZ (MickLesk)
1ae3275248 Add template availability preflight check
Introduce preflight_template_available() in misc/build.func to verify a matching OS/version template exists locally or in the online pveam catalog, and to fail early with a helpful list of available versions when none is found (exit code 225). Integrate this check into run_preflight. Also move the run_preflight invocation inside install_script to run after header_info (so preflight output is visible) and remove the earlier preflight call.
2026-03-03 13:36:02 +01:00
CanbiZ (MickLesk)
ed0e6ed49c linting 2026-03-03 13:30:25 +01:00
CanbiZ (MickLesk)
cb648eec9c Track preflight aborts and add exit codes
Add preflight/validation exit codes and telemetry reporting for aborted preflight checks. Introduces new exit codes (103-110) and maps them to a new "preflight" error category. Adds post_preflight_to_api(), a fire-and-forget telemetry sender that posts an "aborted" status and detailed error summary (only when diagnostics/UUIDs are present), and extends post_update_to_api() to handle an "aborted" status. Changes are defensive (no blocking failures, short curl timeout) and aim to improve analytics for validation/preflight failures.
2026-03-03 13:28:41 +01:00
CanbiZ (MickLesk)
f0c4843784 preflight dev 2026-03-03 13:27:42 +01:00
CanbiZ (MickLesk)
80cc18f9e1 Revert "[Linting] misc/build.func (first pass)" 2026-03-02 15:32:35 +01:00
CanbiZ (MickLesk)
c29b00c97e Merge branch 'main' into lint-build-func 2026-03-02 15:02:31 +01:00
CanbiZ (MickLesk)
2171cfb09d merge from VE 2026-03-02 09:18:02 +01:00
CanbiZ (MickLesk)
d16008181d merge build.func 2026-02-24 09:47:12 +01:00
CanbiZ (MickLesk)
4e2b64524f merge vmcore 2026-02-24 09:41:40 +01:00
CanbiZ (MickLesk)
00fa5a0492 merge api.func 2026-02-24 09:39:37 +01:00
CanbiZ (MickLesk)
192452a3fd merge tools.func 2026-02-24 09:38:46 +01:00
CanbiZ (MickLesk)
81e39c0680 merge error_handler 2026-02-24 09:36:33 +01:00
CanbiZ (MickLesk)
2be37f5e00 merge core.func from VE 2026-02-24 09:35:08 +01:00
CanbiZ (MickLesk)
6881dc9de1 cleanup 2026-02-24 09:32:56 +01:00
MickLesk
155c0a00e4 feat: add Postiz app, fix silent() for || fallbacks 2026-02-22 17:46:38 +01:00
MickLesk
5ab302102b refactor: clean COMMUNITY_SCRIPTS_URL pattern (#1449)
- ct/vm scripts: split to 2-line pattern (variable + source)
- func files: remove redundant inline defaults
- Only entry points keep the default (ct/*.sh, vm/*.sh, build.func,
  install.func, alpine-install.func)
- Downstream sources use $COMMUNITY_SCRIPTS_URL without default
2026-02-22 14:43:08 +01:00
MickLesk
4b9121f41c feat: add configurable COMMUNITY_SCRIPTS_URL for dev sourcing (#1449)
- Replace all hardcoded source URLs with $COMMUNITY_SCRIPTS_URL variable
- Default: https://git.community-scripts.org/.../ProxmoxVED/raw/branch/main
- Override: export COMMUNITY_SCRIPTS_URL=https://.../your-fork/raw/branch/xyz
- Propagates into container via build.func exports
- Updated: 43 ct scripts, 14 deferred, 22 vm scripts, 5 func files
- Document in docs/DEV_MODE.md with usage examples
- Also normalizes legacy GitHub URLs to Gitea canonical URL
2026-02-22 14:36:31 +01:00
MickLesk
959a0cbeeb fix: quote PostgreSQL identifiers in setup_postgresql_db
- Rename Twenty DB from 'default' to 'twenty_db' (reserved keyword)
- Quote all identifiers in setup_postgresql_db with double quotes
  to prevent SQL syntax errors with reserved words
2026-02-22 14:23:29 +01:00
MickLesk
446751ed03 kima 2026-02-20 21:46:48 +01:00
CanbiZ (MickLesk)
d773b939f7 noHup /SIGHUP Tweak 2026-02-17 13:46:03 +01:00
CanbiZ (MickLesk)
792f03aeed update api from live 2026-02-17 11:26:06 +01:00
justin
a9188982ac Remove FUNCTIONS_FILE_PATH quotes 2026-02-14 12:30:27 -05:00
justin
bb4f7c17de $PCT_OPTIONS needs to be unquoted for now 2026-02-14 12:30:27 -05:00
justin
7ebfc41eab Co-Author 2026-02-14 12:30:27 -05:00
justin
c23e0086c4 Revert "Extract pct create cmd to var & call with command"
This reverts commit ec10ea87475e044183fd96635fa3734fba9d7a96.
2026-02-14 12:30:26 -05:00
justin
9b15034ddd Extract pct create cmd to var & call with command 2026-02-14 12:30:26 -05:00