Skip to content

Commit e784c0f

Browse files
committed
build-sd-images.yml: Fix armbian tests
1 parent 276abd5 commit e784c0f

4 files changed

Lines changed: 32 additions & 12 deletions

File tree

‎.github/workflows/build-lxd.yml‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
if [[ "${LXD_ARCH}" == "arm64" ]]
4444
then
4545
LXC_CMD="incus"
46-
RUNNER_LABEL="ubuntu-20.04-arm64"
46+
RUNNER_LABEL="ubuntu-26.04-arm64"
4747
echo "lxd_extra_profile=network" | tee -a "$GITHUB_OUTPUT"
4848
else
4949
LXC_CMD="incus"
@@ -71,10 +71,11 @@ jobs:
7171
with:
7272
ref: "${{ env.VERSION }}"
7373
- name: Setup incus
74-
if: ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-20.04-arm64' }}
74+
if: ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-26.04-arm64' }}
7575
run: |
7676
sudo apt-get update
77-
sudo apt-get install -y incus qemu-system incus-tools
77+
sudo apt-get install -y incus qemu-system
78+
sudo apt-get install -y incus-tools || sudo apt-get install -y incus-extra
7879
sudo iptables -I DOCKER-USER -i incusbr0 -j ACCEPT
7980
sudo iptables -I DOCKER-USER -o incusbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
8081
sudo incus admin init --auto
@@ -147,7 +148,7 @@ jobs:
147148
echo "VERSION=$version" >> "$GITHUB_ENV"
148149
echo "previous_version=${version}" >> $GITHUB_OUTPUT
149150
- name: Setup incus
150-
if: ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-20.04-arm64' }}
151+
if: ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-26.04-arm64' }}
151152
run: |
152153
sudo apt-get update
153154
sudo apt-get install -y incus qemu-system incus-tools
@@ -199,7 +200,7 @@ jobs:
199200
with:
200201
ref: "${{ env.VERSION }}"
201202
- name: Setup incus
202-
if: ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-20.04-arm64' }}
203+
if: ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-26.04-arm64' }}
203204
run: |
204205
sudo apt-get update
205206
sudo apt-get install -y incus qemu-system incus-tools
@@ -254,7 +255,7 @@ jobs:
254255
. ./build/buildlib.sh
255256
sudo "$LXC" delete -q -f ncp || true
256257
sudo "$LXC" image import -q "./${ARTIFACT_FILE?}" --alias "ncp/test" || true
257-
LXC_ARGS=(-p default)
258+
LXC_ARGS=(-p default -c security.nesting=true)
258259
[[ -z "$LXD_EXTRA_PROFILE" ]] || LXC_ARGS+=(-p "$LXD_EXTRA_PROFILE")
259260
systemd-run --user --scope -p "Delegate=yes" "$LXC" launch -q "${LXC_ARGS[@]}" "ncp/test" ncp || \
260261
sudo systemd-run --scope -p "Delegate=yes" "$LXC" launch -q "${LXC_ARGS[@]}" "ncp/test" ncp
@@ -418,7 +419,7 @@ jobs:
418419
USE_INCUS: "${{ needs.determine-runner.outputs.lxc_cmd == 'incus' && 'yes' || 'no' }}"
419420
steps:
420421
- name: Setup incus
421-
if: ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-20.04-arm64' }}
422+
if: ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-26.04-arm64' }}
422423
run: |
423424
sudo apt-get update
424425
sudo apt-get install -y incus qemu-system incus-tools
@@ -474,7 +475,7 @@ jobs:
474475
. ./build/buildlib.sh
475476
sudo "$LXC" delete -q -f ncp || true
476477
sudo "$LXC" image import -q "./ncp.tar.gz" --alias "ncp/update" || true
477-
LXC_ARGS=(-p default)
478+
LXC_ARGS=(-p default -c security.nesting=true)
478479
[[ -z "$LXD_EXTRA_PROFILE" ]] || LXC_ARGS+=(-p "$LXD_EXTRA_PROFILE")
479480
systemd-run --user --scope -p "Delegate=yes" "$LXC" launch -q "${LXC_ARGS[@]}" "ncp/update" ncp || \
480481
sudo systemd-run --scope -p "Delegate=yes" "$LXC" launch -q "${LXC_ARGS[@]}" "ncp/update" ncp
@@ -739,7 +740,7 @@ jobs:
739740
with:
740741
ref: "${{ env.VERSION }}"
741742
- name: Setup incus
742-
if: ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-20.04-arm64' }}
743+
if: ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-26.04-arm64' }}
743744
run: |
744745
sudo apt-get update
745746
sudo apt-get install -y incus qemu-system incus-tools
@@ -794,7 +795,7 @@ jobs:
794795
. ./build/buildlib.sh
795796
sudo "$LXC" delete -q -f ncp || true
796797
sudo "$LXC" image import -q "./${ARTIFACT_FILE?}" --alias "ncp/test" || true
797-
LXC_ARGS=(-p default)
798+
LXC_ARGS=(-p default -c security.nesting=true)
798799
[[ -z "$LXD_EXTRA_PROFILE" ]] || LXC_ARGS+=(-p "$LXD_EXTRA_PROFILE")
799800
systemd-run --user --scope -p "Delegate=yes" "$LXC" launch -q "${LXC_ARGS[@]}" "ncp/test" ncp || \
800801
sudo systemd-run --scope -p "Delegate=yes" "$LXC" launch -q "${LXC_ARGS[@]}" "ncp/test" ncp

‎.github/workflows/build-sd-images.yml‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122

123123
test:
124124
needs: build
125-
runs-on: ubuntu-22.04
125+
runs-on: ubuntu-20.04-arm64
126126
env:
127127
VERSION: "${{ inputs.git_ref }}"
128128
ARTIFACT_ID: ${{ needs.build.outputs.artifact_name }}
@@ -186,6 +186,21 @@ jobs:
186186
sudo mkdir -p raspbian_root/etc/systemd/system/php${PHPVER}-fpm.service.d
187187
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/php${PHPVER}-fpm.service.d/ncp-ci.conf
188188
echo 'ExecStartPre=mkdir -p /var/run/php' | sudo tee -a raspbian_root/etc/systemd/system/php${PHPVER}-fpm.service.d/ncp-ci.conf
189+
190+
# Disable ImportCredential and LoadCredential directives to workaround https://gitlab.com/qemu-project/qemu/-/work_items/1962
191+
# see https://github.com/systemd/systemd/issues/31219#issuecomment-2846006948
192+
for i in raspbian_root/usr/lib/systemd/system/*.service
193+
do
194+
[[ -f $i ]] || continue
195+
grep -q '^ImportCredential=' "$i" && {
196+
sudo mkdir -p "${i/usr\/lib/etc}.d"
197+
echo -e '[Service]\nImportCredential=' | sudo tee "${i/usr\/lib/etc}.d/unset-ImportCredential.conf"
198+
}
199+
grep -q '^LoadCredenital=' "$i" && {
200+
sudo mkdir -p "${i/usr\/lib/etc}.d"
201+
echo -e '[Service]\nLoadCredential=' | sudo tee "${i/usr\/lib/etc}.d/unset-LoadCredential.conf"
202+
}
203+
done
189204
- name: Test image
190205
id: test
191206
run: |

‎build/build-LXD.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ LXC_CMD=(lxc)
3939
"${LXC_CMD[@]}" info || LXC_CMD=(sudo "${LXC_CMD[0]}")
4040

4141
"${LXC_CMD[@]}" delete -f ncp 2>/dev/null || true
42-
LXC_CREATE=("${LXC_CMD[@]}" init -p default)
42+
LXC_CREATE=("${LXC_CMD[@]}" init -p default -c security.nesting=true)
4343
[[ -n "$LXD_EXTRA_PROFILE" ]] && LXC_CREATE+=(-p "$LXD_EXTRA_PROFILE")
4444
if [[ -n "$LXD_ARCH" ]] && [[ "$LXD_ARCH" != "x86" ]]
4545
then

‎tests/nextcloud_tests.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ def test_nextcloud(IP: str, nc_port: str, driver: WebDriver, skip_release_check:
189189
wait.until(VisibilityOfElementLocatedByAnyLocator([(By.CSS_SELECTOR, "#security-warning.settings-section")]))
190190
settings_config_check(wait, test)
191191
except TimeoutException:
192+
try:
193+
print(driver.find_element(By.CSS_SELECTOR, "#security-warning").get_attribute("innerHTML"))
194+
except NoSuchElementException:
195+
print(driver.page_source)
192196
settings_config_check_pre32(wait, test)
193197

194198
close_first_run_wizard(driver, wait_multiplier)

0 commit comments

Comments
 (0)