688 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
82de09f19f fix: remove debug output, add duration tracking, cleanup duplicate log messages 2026-02-10 14:29:28 +01:00
CanbiZ (MickLesk)
c60ff2ae75 Update build.func 2026-02-10 14:18:42 +01:00
CanbiZ (MickLesk)
2c0c72b0e5 unified logging 2026-02-10 13:59:35 +01:00
Tobias
4cd72cc2ec
Add APPLICATION_VERSION export to build function 2026-02-10 08:08:24 +01:00
CanbiZ (MickLesk)
5aa85ace6a Add telemetry debug/logging and failure report
Enhance post_update_to_api robustness and observability: add debug traces for entry, missing curl, duplicate submissions, DIAGNOSTICS/RANDOM_UUID checks, payload/URL output, and HTTP response code capture; make curl non-blocking and tolerant of failures. Also invoke post_update_to_api on installation failure so build/install errors are reported to telemetry. Includes a small comment glyph fix in build.func. Changes keep telemetry as a silent, best-effort path that won't break script execution.
2026-02-09 16:53:25 +01:00
CanbiZ (MickLesk)
ce375b02aa Refactor telemetry checks, relax method validation
Reformat telemetry pre-checks in misc/api.func for clearer multi-line condition handling and remove stray whitespace around the curl response logging. Tweak misc/build.func comment line (minor encoding/visual cleanup). In misc/data/service.go remove the strict allowedMethod map and its validation so the 'method' field is treated as optional/flexible; keep sanitization and numeric validations unchanged. These changes improve readability and allow custom method values without breaking behavior.
2026-02-09 16:51:51 +01:00
CanbiZ (MickLesk)
bcc6bb9f5f Update build.func 2026-02-09 16:46:25 +01:00
CanbiZ (MickLesk)
fafdf88e6a Update build.func 2026-02-09 16:12:35 +01:00
CanbiZ (MickLesk)
820d4551a1 Replace Go API with PocketBase; update docs
Remove the old Go/Mongo API (api/main.go, go.mod, go.sum, .env.example) and switch telemetry backend to PocketBase (http://db.community-scripts.org). Update documentation and flowcharts to reflect the PocketBase collection (_dev_telemetry_data), new REST endpoints (POST/PATCH/GET), field schema, and revised api.func integration (LXC/VM reporting and status updates). Misc scripts and helpers were adjusted (misc/api.func, misc/build.func, misc/error_handler.func) and a new misc/ingest.go was added. This consolidates telemetry to a hosted PocketBase instance and updates docs and integration points accordingly.
2026-02-09 15:34:17 +01:00
Finn Joshua Bartels
3232665b92 feat(core): dev mode configurator menu
- Implement interactive Whiptail checklist for dev_mode configuration
- Add logic to read and pre-populate menu from existing dev_mode enviorment var
2026-02-09 11:49:02 +01:00
CanbiZ (MickLesk)
dc5c1d3ef0 Improve locale setup and database user privileges
Add command to grant superuser, createrole, and createdb privileges to the postgres user during Databasus installation. Enhance LXC container customization by installing locales for Devuan templates and only configuring locale if locale.gen exists, improving compatibility with minimal templates.
2026-01-30 09:47:38 +01:00
justin
000a7a2701 Fix Error check and error message style 2026-01-29 10:21:41 +01:00
justin
8c4f1ce531 Make check_container_storage() POSIX compliant 2026-01-29 10:21:41 +01:00
CanbiZ (MickLesk)
293a5a8340 test 2026-01-28 14:59:32 +01:00
CanbiZ (MickLesk)
a6134095d4 fix: correct if/fi nesting in template selection blocks 2026-01-27 13:45:38 +01:00
CanbiZ (MickLesk)
1bb32bbc94 fix syntax 2026-01-27 13:39:57 +01:00
CanbiZ (MickLesk)
a82d04982d Improve unattended mode detection and export MODE
Enhanced the is_unattended() function to prioritize the MODE variable for detecting unattended/non-interactive mode, with detailed handling for various modes and legacy fallbacks. Also, export MODE in build_container() to inform install scripts about the current mode. Updated APP name in forgejo-runner.sh for consistency.
2026-01-27 13:38:49 +01:00
CanbiZ (MickLesk)
310d0e54a6 Interactive Prompts 2026-01-27 13:26:31 +01:00
CanbiZ (MickLesk)
3b9ad58ce3 merge from Main 2026-01-27 10:08:34 +01:00
CanbiZ (MickLesk)
6f9a1965f9 Merge from VE 2026-01-27 09:29:22 +01:00
CanbiZ (MickLesk)
900200ec6d fix(build): correct storage size formatting bugs
- Fix select_storage(): use --from-unit=1024 instead of --from-unit=K
- Fix resolve_storage_preselect(): add missing --from-unit=1024
- pvesm outputs KiB (1024-byte blocks), not 1000-byte blocks
- Fixes incorrect MB display instead of GB
2026-01-22 10:49:47 +01:00
CanbiZ (MickLesk)
c2b890baa6 Improve validation and robustness in container scripts
Enhances timezone handling by mapping 'Etc/*' zones to 'host', adds stricter password validation (removing leading dashes and enforcing minimum length), and improves container ID validation. Adds storage space validation before container creation and when selecting storage. Implements retry logic and stale lock cleanup for template lock files to avoid stuck processes. Improves GitHub release fetching by adding a fallback to codeload.github.com for complex tag names.
2026-01-21 15:48:22 +01:00
CanbiZ (MickLesk)
eb4c45c9fe Big Merge -> build.func (VE) to VED Compared. 2026-01-21 14:44:57 +01:00
justin
9575fd7188
Make which & tar are installed for RHEL-based OSs 2026-01-18 15:45:22 -05:00
MickLesk
3d6a5f58b0 fix: Multiple distro issues from testing
Devuan:
- Fixed sed syntax error: replaced -E with BRE, removed invalid [^$] pattern
- Simplified regex patterns for inittab autologin matching

openEuler:
- Added template patching to inject /etc/redhat-release before pct create
- This fixes 'error in setup task PVE::LXC::Setup::post_create_hook'
- Reverted to unprivileged container (privileged not needed with patch)

openSUSE:
- Added --gpg-auto-import-keys to zypper to avoid interactive GPG prompts
- This was causing the 15+ minute hangs during package manager init

Gentoo:
- Changed to use emerge-webrsync (http) instead of emerge --sync (rsync)
- webrsync is significantly faster than full rsync sync
- Install curl FIRST before other packages (required for install.func)
- Better error handling with separate curl check

Rocky Linux DNS issue:
- Not a script bug - container network/DNS not working
- User should check container gateway and DNS settings
2026-01-12 21:58:15 +01:00
MickLesk
b8afdab106 fix: Multi-distro LXC container fixes for autologin and package installation
- Rocky/AlmaLinux 10 (EL10): Version detection for DNF 5 with correct packages (langpacks-en instead of glibc-langpack-en), makecache refresh, fallback to minimal install
- openSUSE: Install ncurses-utils and terminfo-base, set TERM in /etc/profile.d and /etc/environment to fix 'unknown terminal type'
- Gentoo: Fixed template pattern to use underscore (-openrc_) instead of dash, special version handling
- openEuler: Set privileged container (var_unprivileged=0) to workaround PVE setup hook limitation
- Devuan: Enhanced sysvinit autologin with multiple inittab patterns, fallback console entry, telinit reload
- CentOS/all: Updated URLs from raw.githubusercontent.com to git.community-scripts.org
- General: Better error handling and removed duplicate code blocks
2026-01-12 21:34:58 +01:00
CanbiZ
47b4ea5c40 Improve locale and template handling for LXC builds
Adds explicit locale package installation and locale setup for Debian, Ubuntu, Devuan, RHEL-based, openSUSE, and openEuler containers to ensure proper locale generation on minimal templates. Refines template pattern matching for CentOS Stream and Gentoo, and deduplicates openSUSE handling. Also, refactors misc/core.func for consistent indentation and minor logic improvements.
2026-01-12 13:58:25 +01:00
CanbiZ
698a17089c fixes 2026-01-12 09:13:20 +01:00
CanbiZ
dfed41f70f Format 2026-01-12 08:55:45 +01:00
CanbiZ
37fdd4779b Get Features & Fixes from Upstream 2026-01-12 08:55:28 +01:00
Tobias
c5786b9210 happ new year - well a bit late :D 2026-01-06 12:36:02 +01:00
MickLesk
92cbcd5132 fix: LXC distro compatibility issues
- Gentoo: Fix template pattern to match 'gentoo-current-openrc' naming
- openSUSE: Sanitize ANSI escape codes from MSG_INFO_SHOWN array keys
- Devuan: Use flexible runlevel matching for sysvinit autologin
- CentOS/RHEL: Add missing '-' before $TERM in agetty commands

Fixes reported issues:
- Gentoo template not found (wrong pattern '-current_')
- openSUSE 'not a valid identifier' error on msg_ok with color codes
- Devuan autologin failing due to strict runlevel pattern
- CentOS autologin improvements for LXC console
2025-12-24 14:27:38 +01:00
CanbiZ
66c7b2e168 Update Hoodik build scripts and requirements
Increase default RAM to 4GB and disk to 20GB for Hoodik builds in scripts and metadata. Split frontend and backend build steps, add frontend build commands, and clean up build artifacts after installation. Update installation instructions and warnings to reflect new requirements and build times. Change default URLs to use HTTP instead of HTTPS and adjust systemd service working directory.
2025-12-10 07:52:51 +01:00
CanbiZ
7373ecfc32 Update build.func 2025-12-10 07:42:56 +01:00
CanbiZ
9e4d367415 Report container build failures to API before cleanup
Adds calls to post_update_to_api to notify the API of container build failures before prompting for container cleanup in both build and error handler scripts.
2025-12-08 15:12:31 +01:00
CanbiZ
877ac7875e bump from ve 2025-12-08 15:08:20 +01:00
CanbiZ
465b4d0d24 Update build.func 2025-12-08 09:24:18 +01:00
CanbiZ
231fb62891 Update build.func 2025-12-08 09:21:14 +01:00
CanbiZ
03a5149f50 merge from main 2025-12-08 09:17:21 +01:00
CanbiZ
4a6f783ddb Update build.func 2025-12-04 15:19:58 +01:00
CanbiZ
4ed0fa9697 Update build.func 2025-12-04 15:18:40 +01:00
CanbiZ
19a2d83c5a Unify install logic and cleanup LXC for all OS types
Refactored build.func to use a unified install.func for all supported OS types, simplifying OS detection and package installation. Added cleanup_lxc step to all install scripts. Removed support for runit, pacman, and nix-env from install.func, and improved SSH server installation logic for containers. Updated template pattern matching for additional OS types.
2025-12-04 15:00:10 +01:00
CanbiZ
19f3c6b67d Reindent functions to use consistent 2-space style
Changed all function bodies in misc/build.func to use 2-space indentation for improved readability and consistency. No logic changes were made; only whitespace and indentation were updated.
2025-12-04 14:41:02 +01:00
CanbiZ
d677488b29 Refactor storage validation and error codes for containers
Simplifies and streamlines storage validation logic in create_lxc_container, removing redundant content checks and using direct exit codes for unsupported storage types. Updates error_handler.func with clearer, more specific Proxmox exit code explanations and improves code consistency and readability throughout error handling functions.
2025-12-04 14:06:16 +01:00
CanbiZ
12f92c0947 Indent all function bodies for improved readability
All function bodies in build.func are now consistently indented, improving code readability and maintainability. No logic changes were made; only whitespace and indentation were updated.
2025-12-04 14:00:18 +01:00
CanbiZ
3526f7fce3 Update build.func 2025-12-03 11:23:35 +01:00
CanbiZ
9f36d3fac0 Add granular IPv6 disable option to setup scripts
Expanded IPv6 configuration in build.func to include a 'disable' option with clearer descriptions. Updated install.func to use IPV6_METHOD for disabling IPv6 via sysctl.d, improving clarity and control over IPv6 management.
2025-12-02 11:13:11 +01:00
CanbiZ
6da891f822 typo 2025-11-28 09:07:57 +01:00
CanbiZ
76e933b3a4 Refactor advanced_settings and add whitelist check
Moved and redefined _is_whitelisted_key as a global function for use in multiple locations. Improved formatting and readability in the advanced_settings wizard, including better handling of container type selection and IPv6 configuration steps.
2025-11-27 16:36:53 +01:00
CanbiZ
9554dae973 Refactor advanced_settings to wizard with back navigation
Replaces the old whiptail menu loop in advanced_settings with a state-machine, wizard-style configuration supporting forward and backward navigation. Each step is now modular, input validation is improved, and a summary confirmation is shown before applying settings. This enhances user experience and maintainability for container configuration.
2025-11-27 16:32:05 +01:00