mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-09 14:42:01 -03:30
build-sd-images.yml: Adjust php fpm fix to correct php version
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
ef849572d7
commit
31d5ed984f
31
.github/workflows/build-sd-images.yml
vendored
31
.github/workflows/build-sd-images.yml
vendored
@ -151,12 +151,12 @@ jobs:
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
# - name: Set up QEMU
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get install -y binfmt-support
|
||||
# docker run --rm --privileged tonistiigi/binfmt:latest --install all
|
||||
# docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
|
||||
- name: Set up QEMU
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y binfmt-support
|
||||
docker run --rm --privileged tonistiigi/binfmt:latest --install all
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
|
||||
# sudo systemctl disable apparmor
|
||||
# sudo mkdir -p /etc/binfmt
|
||||
# for conf in qemu-{aarch64,arm}-static.conf
|
||||
@ -191,9 +191,9 @@ jobs:
|
||||
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/redis-server.service.d/ncp.conf
|
||||
echo 'PrivateUsers=false' | sudo tee -a raspbian_root/etc/systemd/system/redis-server.service.d/ncp.conf
|
||||
|
||||
sudo mkdir -p raspbian_root/etc/systemd/system/php8.2-fpm.service.d
|
||||
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/php8.2-fpm.service.d/ncp.conf
|
||||
echo 'ExecStartPre=mkdir -p /var/run/php' | sudo tee -a raspbian_root/etc/systemd/system/php8.2-fpm.service.d/ncp.conf
|
||||
sudo mkdir -p raspbian_root/etc/systemd/system/php8.3-fpm.service.d
|
||||
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/php8.3-fpm.service.d/ncp.conf
|
||||
echo 'ExecStartPre=mkdir -p /var/run/php' | sudo tee -a raspbian_root/etc/systemd/system/php8.3-fpm.service.d/ncp.conf
|
||||
- name: Test image
|
||||
id: test
|
||||
run: |
|
||||
@ -208,13 +208,13 @@ jobs:
|
||||
sudo systemd-nspawn --boot -D ./raspbian_root/ -M ncp --hostname=nextcloudpi |& awk "{ print \"${LOG_GUEST} \" \$0 }" &
|
||||
sleep 60
|
||||
|
||||
CONTAINER_CMD=(sudo systemd-run --machine=ncp -P --wait)
|
||||
CONTAINER_CMD=(sudo systemd-run --machine=ncp -P --wait)
|
||||
|
||||
success=false
|
||||
for attempt in {1..30}
|
||||
do
|
||||
echo -e "${LOG_CICD} == Wait until container network is available (attempt $attempt/30) =="
|
||||
ip="$("${CONTAINER_CMD[@]}" bash -c '. /usr/local/etc/library.sh > /dev/null; get_ip')"
|
||||
ip="$("${CONTAINER_CMD[@]}" bash -c '. /usr/local/etc/library.sh > /dev/null; get_ip')"
|
||||
[[ -n "$ip" ]] && curl -k "https://$ip/activate/" > /dev/null || { sleep 6; continue; }
|
||||
success=true
|
||||
break
|
||||
@ -310,6 +310,14 @@ jobs:
|
||||
python tests/nextcloud_tests.py --no-gui "$ip" 443 4443 |& awk "{ print \"${LOG_TEST} \" \$0 }"
|
||||
[[ ${PIPESTATUS[0]} -eq 0 ]] || {
|
||||
echo -e "${LOG_CICD} Nextcloud test failed!"
|
||||
echo -e "${LOG_DIAG} /etc/os-release:"
|
||||
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'cat /etc/os-release'
|
||||
echo -e "${LOG_DIAG} /usr/local/etc/ncp.cfg:"
|
||||
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'cat /usr/local/etc/ncp.cfg'
|
||||
cat ./raspbian_root/usr/local/etc/ncp.cfg
|
||||
echo -e "${LOG_DIAG} /home/ncp-app-bridge confi g ncp"
|
||||
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'sudo -u www-data sudo /home/www/ncp-app-bridge.sh config ncp'
|
||||
sudo ls -l ./raspbian_root/home/www/ncp-app-bridge.sh
|
||||
echo -e "{$LOG_DIAG} Geckodriver logs:"
|
||||
tail -n 20 geckodriver.log >&2 |& awk "{ print \"${LOG_DIAG} \" \$0 }" || true
|
||||
echo -e "${LOG_CICD} ================"
|
||||
@ -319,6 +327,7 @@ jobs:
|
||||
echo "${LOG_DIAG} Nextcloud log: "
|
||||
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'ls -l /opt/ncdata/data/nextcloud.log' |& awk "{ print \"${LOG_DIAG} \" \$0 }" || true
|
||||
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'cat /opt/ncdata/data/nextcloud.log' |& awk "{ print \"${LOG_DIAG} \" \$0 }" || true
|
||||
cat ./raspbian_root/opt/ncdata/data/nextcloud.log |& awk "{ print \"${LOG_DIAG} \" \$0 }"
|
||||
sleep 12
|
||||
continue
|
||||
}
|
||||
|
||||
@ -19,6 +19,8 @@ LINUXFAMILY=$2
|
||||
BOARD=$3
|
||||
BUILD_DESKTOP=$4
|
||||
|
||||
echo "include home dir? ${INCLUDE_HOME_DIR:-no}"
|
||||
|
||||
cd /tmp/overlay
|
||||
NCPCFG=etc/ncp.cfg
|
||||
source etc/library.sh # sets RELEASE
|
||||
|
||||
@ -38,6 +38,7 @@ class SettingsService {
|
||||
}
|
||||
if ($config == null) {
|
||||
$this->logger->error("Failed to retrieve ncp config (exit code: $ret)");
|
||||
$this->logger->error("ERR: $stderr")
|
||||
return $defaults;
|
||||
}
|
||||
return $config;
|
||||
@ -132,11 +133,13 @@ class SettingsService {
|
||||
2 => ["pipe", "w"]
|
||||
];
|
||||
|
||||
$proc = proc_open($cmd, $descriptorSpec, $pipes, "/var/www", null);
|
||||
$proc = proc_open($cmd, $descriptorSpec, $pipes, "/home/www", null);
|
||||
$stdout = stream_get_contents($pipes[1]);
|
||||
fclose($pipes[1]);
|
||||
$stderr = stream_get_contents($pipes[2]);
|
||||
fclose($pipes[2]);
|
||||
|
||||
$this->logger->error("STDERR: $stderr")
|
||||
return [proc_close($proc), $stdout, $stderr];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user