Skip to content

Commit 31d5ed9

Browse files
committed
build-sd-images.yml: Adjust php fpm fix to correct php version
Signed-off-by: Tobias Knöppler <[email protected]>
1 parent ef84957 commit 31d5ed9

File tree

4 files changed

+27
-13
lines changed

4 files changed

+27
-13
lines changed

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

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ jobs:
151151
steps:
152152
- name: Set up QEMU
153153
uses: docker/setup-qemu-action@v3
154-
# - name: Set up QEMU
155-
# run: |
156-
# sudo apt-get update
157-
# sudo apt-get install -y binfmt-support
158-
# docker run --rm --privileged tonistiigi/binfmt:latest --install all
159-
# docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
154+
- name: Set up QEMU
155+
run: |
156+
sudo apt-get update
157+
sudo apt-get install -y binfmt-support
158+
docker run --rm --privileged tonistiigi/binfmt:latest --install all
159+
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
160160
# sudo systemctl disable apparmor
161161
# sudo mkdir -p /etc/binfmt
162162
# for conf in qemu-{aarch64,arm}-static.conf
@@ -191,9 +191,9 @@ jobs:
191191
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/redis-server.service.d/ncp.conf
192192
echo 'PrivateUsers=false' | sudo tee -a raspbian_root/etc/systemd/system/redis-server.service.d/ncp.conf
193193
194-
sudo mkdir -p raspbian_root/etc/systemd/system/php8.2-fpm.service.d
195-
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/php8.2-fpm.service.d/ncp.conf
196-
echo 'ExecStartPre=mkdir -p /var/run/php' | sudo tee -a raspbian_root/etc/systemd/system/php8.2-fpm.service.d/ncp.conf
194+
sudo mkdir -p raspbian_root/etc/systemd/system/php8.3-fpm.service.d
195+
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/php8.3-fpm.service.d/ncp.conf
196+
echo 'ExecStartPre=mkdir -p /var/run/php' | sudo tee -a raspbian_root/etc/systemd/system/php8.3-fpm.service.d/ncp.conf
197197
- name: Test image
198198
id: test
199199
run: |
@@ -208,13 +208,13 @@ jobs:
208208
sudo systemd-nspawn --boot -D ./raspbian_root/ -M ncp --hostname=nextcloudpi |& awk "{ print \"${LOG_GUEST} \" \$0 }" &
209209
sleep 60
210210
211-
CONTAINER_CMD=(sudo systemd-run --machine=ncp -P --wait)
211+
CONTAINER_CMD=(sudo systemd-run --machine=ncp -P --wait)
212212
213213
success=false
214214
for attempt in {1..30}
215215
do
216216
echo -e "${LOG_CICD} == Wait until container network is available (attempt $attempt/30) =="
217-
ip="$("${CONTAINER_CMD[@]}" bash -c '. /usr/local/etc/library.sh > /dev/null; get_ip')"
217+
ip="$("${CONTAINER_CMD[@]}" bash -c '. /usr/local/etc/library.sh > /dev/null; get_ip')"
218218
[[ -n "$ip" ]] && curl -k "https://$ip/activate/" > /dev/null || { sleep 6; continue; }
219219
success=true
220220
break
@@ -310,6 +310,14 @@ jobs:
310310
python tests/nextcloud_tests.py --no-gui "$ip" 443 4443 |& awk "{ print \"${LOG_TEST} \" \$0 }"
311311
[[ ${PIPESTATUS[0]} -eq 0 ]] || {
312312
echo -e "${LOG_CICD} Nextcloud test failed!"
313+
echo -e "${LOG_DIAG} /etc/os-release:"
314+
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'cat /etc/os-release'
315+
echo -e "${LOG_DIAG} /usr/local/etc/ncp.cfg:"
316+
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'cat /usr/local/etc/ncp.cfg'
317+
cat ./raspbian_root/usr/local/etc/ncp.cfg
318+
echo -e "${LOG_DIAG} /home/ncp-app-bridge confi g ncp"
319+
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'sudo -u www-data sudo /home/www/ncp-app-bridge.sh config ncp'
320+
sudo ls -l ./raspbian_root/home/www/ncp-app-bridge.sh
313321
echo -e "{$LOG_DIAG} Geckodriver logs:"
314322
tail -n 20 geckodriver.log >&2 |& awk "{ print \"${LOG_DIAG} \" \$0 }" || true
315323
echo -e "${LOG_CICD} ================"
@@ -319,6 +327,7 @@ jobs:
319327
echo "${LOG_DIAG} Nextcloud log: "
320328
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'ls -l /opt/ncdata/data/nextcloud.log' |& awk "{ print \"${LOG_DIAG} \" \$0 }" || true
321329
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'cat /opt/ncdata/data/nextcloud.log' |& awk "{ print \"${LOG_DIAG} \" \$0 }" || true
330+
cat ./raspbian_root/opt/ncdata/data/nextcloud.log |& awk "{ print \"${LOG_DIAG} \" \$0 }"
322331
sleep 12
323332
continue
324333
}

build/armbian/armbian.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ LINUXFAMILY=$2
1919
BOARD=$3
2020
BUILD_DESKTOP=$4
2121

22+
echo "include home dir? ${INCLUDE_HOME_DIR:-no}"
23+
2224
cd /tmp/overlay
2325
NCPCFG=etc/ncp.cfg
2426
source etc/library.sh # sets RELEASE

ncp-app/lib/Service/SettingsService.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function getConfig(string $name, array $defaults): array
3838
}
3939
if ($config == null) {
4040
$this->logger->error("Failed to retrieve ncp config (exit code: $ret)");
41+
$this->logger->error("ERR: $stderr")
4142
return $defaults;
4243
}
4344
return $config;
@@ -132,11 +133,13 @@ private function runCommand(string $cmd): array {
132133
2 => ["pipe", "w"]
133134
];
134135

135-
$proc = proc_open($cmd, $descriptorSpec, $pipes, "/var/www", null);
136+
$proc = proc_open($cmd, $descriptorSpec, $pipes, "/home/www", null);
136137
$stdout = stream_get_contents($pipes[1]);
137138
fclose($pipes[1]);
138139
$stderr = stream_get_contents($pipes[2]);
139140
fclose($pipes[2]);
141+
142+
$this->logger->error("STDERR: $stderr")
140143
return [proc_close($proc), $stdout, $stderr];
141144
}
142145
}

ncp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ EOF
128128

129129
cat > /home/www/ncp-app-bridge.sh <<'EOF'
130130
#!/bin/bash
131-
set -e
131+
set -ex
132132
grep -q '[\\&#;`|*?~<>^()[{}$&]' <<< "$*" && exit 1
133133
action="${1?}"
134134
[[ "$action" == "config" ]] && {

0 commit comments

Comments
 (0)