Skip to content

Commit e2dca8b

Browse files
committed
Upgrade OS --> 26.04
- Bump supported Ubuntu range to 24.04 - 26.04 (Resolute Raccoon) - PHP 8.3 -> 8.5, PostgreSQL 16 -> 18 (defaults on 26.04) - Centralize version checks in lib.sh: SUPPORTED_VERSION_MIN/MAX, LATEST_VERSION (derived), SUPPORTED_CODENAMES — single source of truth - Make check_php() fully dynamic (regex on `php -v`, /etc/php fallback) - Replace hardcoded stop_if_installed lists with brace-expansion loops covering php7.0-7.9, php8.0-8.9 and postgresql-9.x through postgresql-30 Signed-off-by: enoch85 <mailto@danielhansson.nu>
1 parent 1c8dc01 commit e2dca8b

21 files changed

Lines changed: 186 additions & 112 deletions
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: 'install-smoke-test'
2+
3+
# Manual / scheduled smoke test that runs nextcloud_install_production.sh
4+
# end-to-end inside a privileged Ubuntu 26.04 container. Catches:
5+
# - apt package availability changes between LTS releases
6+
# - PHP/PG/Apache config breakage
7+
# - Nextcloud download + occ install regressions
8+
# - lib.sh sourcing / version-gate regressions
9+
#
10+
# Does NOT cover:
11+
# - real LVM snapshot / lvextend behaviour (loopback approximation)
12+
# - hypervisor-specific kernel installs (Hyper-V, VMware, QEMU)
13+
# - reboot path (stubbed)
14+
#
15+
# Manual trigger only — runtime ~25 min, ~3 GB RAM.
16+
17+
on:
18+
workflow_dispatch:
19+
inputs:
20+
ubuntu_image:
21+
description: 'Ubuntu image to test against (e.g. ubuntu:26.04, ubuntu:24.04)'
22+
default: 'ubuntu:26.04'
23+
required: true
24+
25+
jobs:
26+
install:
27+
name: 'Run nextcloud_install_production.sh -p'
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 45
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
33+
with:
34+
# Default checks out the ref that fired workflow_dispatch (so picking
35+
# `upgrade-os-26.04` from the UI tests that branch).
36+
ref: ${{ github.ref }}
37+
38+
- name: Prepare host
39+
run: |
40+
# Loopback devices the install script expects
41+
sudo truncate -s 6G /tmp/disk-sdb.img
42+
sudo losetup -fP /tmp/disk-sdb.img
43+
LOOP_SDB=$(losetup -j /tmp/disk-sdb.img | cut -d: -f1)
44+
echo "LOOP_SDB=$LOOP_SDB" >> "$GITHUB_ENV"
45+
# Show what we created
46+
lsblk
47+
48+
- name: Run install script in privileged container
49+
env:
50+
UBUNTU_IMAGE: ${{ inputs.ubuntu_image }}
51+
run: |
52+
set -e
53+
docker run --rm \
54+
--privileged \
55+
--name nc-install \
56+
-v "$PWD:/repo:ro" \
57+
-v "${LOOP_SDB}:/dev/sdb" \
58+
-e DEBIAN_FRONTEND=noninteractive \
59+
-e SUDO_USER=root \
60+
-e RUNLEVEL=1 \
61+
"$UBUNTU_IMAGE" \
62+
bash -c '
63+
set -e
64+
# Bare image bootstrap so the install script can run
65+
apt-get update -qq
66+
apt-get install -qqy --no-install-recommends \
67+
sudo curl ca-certificates lsb-release iproute2 \
68+
netcat-openbsd whiptail kmod
69+
# Stub reboot so the script does not actually try to reboot
70+
cat > /usr/local/sbin/reboot <<"REBOOT"
71+
#!/bin/sh
72+
echo "[reboot stubbed in CI: $*]" >&2
73+
exit 0
74+
REBOOT
75+
chmod +x /usr/local/sbin/reboot
76+
ln -sf /usr/local/sbin/reboot /usr/local/sbin/shutdown
77+
# Make a copy we can edit (script lives in read-only mount)
78+
cp -a /repo /work
79+
cd /work
80+
# Run installer in provisioning mode (no prompts)
81+
bash nextcloud_install_production.sh -p
82+
'
83+
84+
- name: Verify Nextcloud is installed
85+
if: always()
86+
run: |
87+
# Container exited; attach a fresh one to the same host paths to inspect state
88+
# (Skipped here because container is --rm; rely on script exit code.)
89+
# Show host-side artifacts in case anything was written via bind mount.
90+
ls -la /tmp/disk-sdb.img || true
91+
92+
- name: Cleanup loopback
93+
if: always()
94+
run: |
95+
sudo losetup -d "$LOOP_SDB" || true
96+
sudo rm -f /tmp/disk-sdb.img

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ Server installation. Simplified. :cloud:
1717
--------------------
1818

1919
## Dependencies:
20-
(Ubuntu Server 24.04 LTS *minimal* 64-bit)
20+
(Ubuntu Server 26.04 LTS *minimal* 64-bit)
2121
<br>
22-
(Linux Kernel: 6.8)
22+
(Linux Kernel: 7.0)
2323
- Apache 2.4
24-
- PostgreSQL 16
25-
- PHP-FPM 8.3
24+
- PostgreSQL 18
25+
- PHP-FPM 8.5
2626
- Redis Memcache (Ubuntu package)
2727
- PHP-igbinary (Ubuntu package)
2828
- PHP-smbclient (Ubuntu package)

addons/redis-server-ubuntu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ debug_mode
1616
root_check
1717

1818
# Check Ubuntu version
19-
if ! version 18.04 "$DISTRO" 24.04.10
19+
if ! version 18.04 "$DISTRO" "$SUPPORTED_VERSION_MAX"
2020
then
21-
msg_box "Your current Ubuntu version is $DISTRO but must be between 18.04 - 24.04.10 to run this script."
21+
msg_box "Your current Ubuntu version is $DISTRO but must be between 18.04 - $SUPPORTED_VERSION_MAX to run this script."
2222
msg_box "Please contact us to get support for upgrading your server:
2323
https://www.hanssonit.se/#contact
2424
https://shop.hanssonit.se/"

apps/adminneo.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ fi
9292

9393
print_text_in_color "$IGreen" "AdminNeo ${ADMINNEO_VERSION} successfully downloaded!"
9494

95-
# Only add TLS 1.3 on Ubuntu later than 22.04
96-
if version 22.04 "$DISTRO" 24.04.10
95+
# Only add TLS 1.3 on supported Ubuntu releases
96+
if version "$SUPPORTED_VERSION_MIN" "$DISTRO" "$SUPPORTED_VERSION_MAX"
9797
then
9898
TLS13="+TLSv1.3"
9999
fi

apps/collabora_docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ a2enmod proxy_http
135135
a2enmod ssl
136136
a2enmod headers
137137

138-
# Only add TLS 1.3 on Ubuntu later than 22.04
139-
if version 22.04 "$DISTRO" 24.04.10
138+
# Only add TLS 1.3 on supported Ubuntu releases
139+
if version "$SUPPORTED_VERSION_MIN" "$DISTRO" "$SUPPORTED_VERSION_MAX"
140140
then
141141
TLS13="+TLSv1.3"
142142
fi

apps/onlyoffice_docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ a2enmod proxy_http
152152
a2enmod ssl
153153
a2enmod headers
154154

155-
# Only add TLS 1.3 on Ubuntu later than 22.04
156-
if version 22.04 "$DISTRO" 24.04.10
155+
# Only add TLS 1.3 on supported Ubuntu releases
156+
if version "$SUPPORTED_VERSION_MIN" "$DISTRO" "$SUPPORTED_VERSION_MAX"
157157
then
158158
TLS13="+TLSv1.3"
159159
fi

apps/pico_cms.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ a2enmod proxy_http
214214
a2enmod ssl
215215
a2enmod headers
216216

217-
# Only add TLS 1.3 on Ubuntu later than 22.04
218-
if version 22.04 "$DISTRO" 24.04.10
217+
# Only add TLS 1.3 on supported Ubuntu releases
218+
if version "$SUPPORTED_VERSION_MIN" "$DISTRO" "$SUPPORTED_VERSION_MAX"
219219
then
220220
TLS13="+TLSv1.3"
221221
fi

apps/smbmount.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,14 @@ We please you to do the math yourself if the number is high enough for your setu
350350
# Get installed php version
351351
check_php
352352
# Enable Inotify
353-
if [ ! -f $PHP_MODS_DIR/inotify.ini ]
353+
if [ ! -f "$PHP_MODS_DIR"/inotify.ini ]
354354
then
355-
touch $PHP_MODS_DIR/inotify.ini
355+
touch "$PHP_MODS_DIR"/inotify.ini
356356
fi
357-
if ! grep -qFx extension=inotify.so $PHP_MODS_DIR/inotify.ini
357+
if ! grep -qFx extension=inotify.so "$PHP_MODS_DIR"/inotify.ini
358358
then
359-
echo "# PECL inotify" > $PHP_MODS_DIR/inotify.ini
360-
echo "extension=inotify.so" >> $PHP_MODS_DIR/inotify.ini
359+
echo "# PECL inotify" > "$PHP_MODS_DIR"/inotify.ini
360+
echo "extension=inotify.so" >> "$PHP_MODS_DIR"/inotify.ini
361361
check_command phpenmod -v ALL inotify
362362
fi
363363

apps/talk.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ else
9393
removal_popup "$SCRIPT_NAME"
9494
fi
9595

96-
# Must be 24.04
97-
if ! version 22.04 "$DISTRO" 24.04.10
96+
# Must be on a supported Ubuntu release
97+
if ! version "$SUPPORTED_VERSION_MIN" "$DISTRO" "$SUPPORTED_VERSION_MAX"
9898
then
99-
msg_box "Your current Ubuntu version is $DISTRO but must be between 22.04 - 24.04.10 to install Talk"
99+
msg_box "Your current Ubuntu version is $DISTRO but must be between $SUPPORTED_VERSION_MIN - $SUPPORTED_VERSION_MAX to install Talk"
100100
msg_box "Please contact us to get support for upgrading your server:
101101
https://www.hanssonit.se/#contact
102102
https://shop.hanssonit.se/"
@@ -444,8 +444,8 @@ mkdir -p /var/www/html/error
444444
echo "Hi there! :) If you see this page, the Apache2 proxy for $SCRIPT_NAME is up and running." > /var/www/html/error/404_proxy.html
445445
chown -R www-data:www-data /var/www/html/error
446446

447-
# Only add TLS 1.3 on Ubuntu later than 22.04
448-
if version 22.04 "$DISTRO" 24.04.10
447+
# Only add TLS 1.3 on supported Ubuntu releases
448+
if version "$SUPPORTED_VERSION_MIN" "$DISTRO" "$SUPPORTED_VERSION_MAX"
449449
then
450450
TLS13="+TLSv1.3"
451451
fi

apps/tmbitwarden.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ a2enmod ssl
240240
a2enmod headers
241241
a2enmod remoteip
242242

243-
# Only add TLS 1.3 on Ubuntu later than 22.04
244-
if version 22.04 "$DISTRO" 24.04.10
243+
# Only add TLS 1.3 on supported Ubuntu releases
244+
if version "$SUPPORTED_VERSION_MIN" "$DISTRO" "$SUPPORTED_VERSION_MAX"
245245
then
246246
TLS13="+TLSv1.3"
247247
fi

0 commit comments

Comments
 (0)