Skip to content

Commit 5656e8e

Browse files
committed
bookworm support
1 parent ca7b11a commit 5656e8e

File tree

9 files changed

+373
-321
lines changed

9 files changed

+373
-321
lines changed

.drone.jsonnet

+332-310
Large diffs are not rendered by default.

bin/service.nginx-public.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ fi
99

1010
case $1 in
1111
start)
12-
${DIR}/nginx/sbin/nginx -t -c /var/snap/platform/current/nginx.conf -e stderr
13-
exec $DIR/nginx/sbin/nginx -c /var/snap/platform/current/nginx.conf -e stderr
12+
${DIR}/nginx/bin/nginx.sh -t -c /var/snap/platform/current/nginx.conf -e stderr
13+
exec $DIR/nginx/bin/nginx.sh -c /var/snap/platform/current/nginx.conf -e stderr
1414
;;
1515
reload)
16-
$DIR/nginx/sbin/nginx -c /var/snap/platform/current/nginx.conf -s reload -e stderr
16+
$DIR/nginx/bin/nginx.sh -c /var/snap/platform/current/nginx.conf -s reload -e stderr
1717
;;
1818
*)
1919
echo "not valid command"

bin/update_certs.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/bash -e
22

3-
cp /snap/platform/current/certs/* /usr/share/ca-certificates/mozilla/
3+
cp /snap/platform/current/certs/* /usr/share/ca-certificates/mozilla/
4+
/usr/sbin/update-ca-certificates

config/nginx/public.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ http {
2222
fastcgi_temp_path /var/snap/platform/current/nginx/public_fastcgi_temp;
2323
uwsgi_temp_path /var/snap/platform/current/nginx/public_uwsgi_temp;
2424
scgi_temp_path /var/snap/platform/current/nginx/public_scgi_temp;
25-
include /snap/platform/current/nginx/conf/mime.types;
26-
25+
include /snap/platform/current/nginx/etc/nginx/mime.types;
26+
2727
client_max_body_size 10G;
2828
proxy_send_timeout 600s;
2929
proxy_read_timeout 600s;

nginx/bin/nginx.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash -e
2+
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )
3+
LIBS=$(echo ${DIR}/lib/*-linux-gnu*)
4+
LIBS=$LIBS:$(echo ${DIR}/usr/lib/*-linux-gnu*)
5+
${DIR}/lib/*-linux*/ld-*.so --library-path $LIBS ${DIR}/usr/sbin/nginx "$@"

nginx/build.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh -ex
2+
3+
DIR=$( cd "$( dirname "$0" )" && pwd )
4+
cd ${DIR}
5+
6+
BUILD_DIR=${DIR}/../build/snap/nginx
7+
mkdir -p ${BUILD_DIR}
8+
cp -r /etc ${BUILD_DIR}
9+
cp -r /opt ${BUILD_DIR}
10+
cp -r /usr ${BUILD_DIR}
11+
cp -r /bin ${BUILD_DIR}
12+
cp -r /lib ${BUILD_DIR}
13+
cp -r ${DIR}/bin/* ${BUILD_DIR}/bin

nginx/test.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh -ex
2+
3+
DIR=$( cd "$( dirname "$0" )" && pwd )
4+
cd ${DIR}
5+
6+
BUILD_DIR=${DIR}/../build/snap/nginx
7+
${BUILD_DIR}/bin/nginx.sh -version

package.sh

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ wget http://ftp.us.debian.org/debian/pool/main/c/ca-certificates/ca-certificates
2525
dpkg -x ca-certificates_${CA_CERTIFICATES_VERSION}_all.deb .
2626
mv usr/share/ca-certificates/mozilla ${BUILD_DIR}/certs
2727

28-
wget --retry-on-http-error=503 --progress=dot:giga https://github.com/syncloud/3rdparty/releases/download/nginx/nginx-${ARCH}.tar.gz
29-
tar xf nginx-${ARCH}.tar.gz
30-
mv nginx ${BUILD_DIR}
3128
wget --retry-on-http-error=503 --progress=dot:giga https://github.com/syncloud/3rdparty/releases/download/gptfdisk/gptfdisk-${ARCH}.tar.gz
3229
tar xf gptfdisk-${ARCH}.tar.gz
3330
mv gptfdisk ${BUILD_DIR}

test/test.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,18 @@ def test_remove(device):
572572
device.run_ssh('snap remove platform')
573573

574574

575-
def test_install_stable_from_store(device, device_host):
576-
device.run_ssh('snap install platform', retries=10)
575+
#remove after bookworm is working
576+
def test_bookworm(device, app_archive_path, device_host):
577+
local_install(device_host, LOGS_SSH_PASSWORD, app_archive_path)
577578
device.run_ssh('/snap/platform/current/openldap/bin/ldapsearch.sh -x -w syncloud -D "dc=syncloud,dc=org" -b "ou=users,dc=syncloud,dc=org" > {0}/ldapsearch.old.log'.format(TMP_DIR), throw=False)
578579

579580

581+
#restore after bookworm is working
582+
#def test_install_stable_from_store(device, device_host):
583+
# device.run_ssh('snap install platform', retries=10)
584+
# device.run_ssh('/snap/platform/current/openldap/bin/ldapsearch.sh -x -w syncloud -D "dc=syncloud,dc=org" -b "ou=users,dc=syncloud,dc=org" > {0}/ldapsearch.old.log'.format(TMP_DIR), throw=False)
585+
586+
580587
def test_activate_stable(device, device_host, main_domain, device_user, device_password, arch):
581588
def activate():
582589
response = requests.post('https://{0}/rest/activate/custom'.format(device_host),

0 commit comments

Comments
 (0)