diff --git a/lib/exec_in_chroot.sh b/lib/exec_in_chroot.sh index 8b4b625..54b25b2 100755 --- a/lib/exec_in_chroot.sh +++ b/lib/exec_in_chroot.sh @@ -11,12 +11,14 @@ install_package_dependency(){ } get_git_source(){ - [ -e /tmp/${APP} ] && rm -fr /tmp/${APP} + GIT_PATH=/tmp/${APP} + [ ! "$1" == "" ] && GIT_PATH=$1 + [ -e ${GIT_PATH} ] && rm -fr ${GIT_PATH} if [ "${GIT_VERSION}" = "last" ] ; then - git clone --depth 1 ${DEPOT} /tmp/${APP} + git clone --depth 1 ${DEPOT} ${GIT_PATH} else - git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/${APP} + git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} ${GIT_PATH} fi } @@ -28,20 +30,21 @@ configure_depot_yarn() { configure_depot_nodejs() { NODE_VERSION=16 [ ! "$1" == "" ] && NODE_VERSION=$1 + DEB_FILE=/etc/apt/sources.list.d/nodesource.list XNODE_VERSION=${NODE_VERSION}.x - grep -q ${XNODE_VERSION} /etc/apt/sources.list.d/nodesource.list - if [ $? -ne 0 ] + if [ -e ${DEB_FILE} ] && [ $(grep -c ${XNODE_VERSION} ${DEB_FILE}) -ne 0 ] then wget -qO - https://deb.nodesource.com/setup_${XNODE_VERSION} | bash fi + wget -qO - https://deb.nodesource.com/setup_${XNODE_VERSION} | bash echo -e "Package: nodejs\\nPin: version ${NODE_VERSION}.*\\nPin-Priority: 1000" > /etc/apt/preferences.d/nodejs } install_go() { - GO_VERSION=1.20.6 + GO_VERSION=1.20.7 [ ! "$1" == "" ] && GO_VERSION=$1 PATH=$PATH:/usr/local/go/bin - if [ ! "$(go version)" == "go version go${GO_VERSION} linux/amd64" ] ; + if [ -e /usr/local/go/bin/go ] || [ ! "$(go version)" == "go version go${GO_VERSION} linux/amd64" ] ; then rm -rvf /usr/local/go/ wget -qO - https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz | tar -C /usr/local -xz diff --git a/ressources/adguardhome/debmaker b/ressources/adguardhome/debmaker index e00e9ea..bdbc647 100755 --- a/ressources/adguardhome/debmaker +++ b/ressources/adguardhome/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=0.108.0-b.42 +VERSION=0.108.0-b.43 APP=adguardhome DEPOT=https://github.com/AdguardTeam/AdGuardHome.git GIT_VERSION=v${VERSION} diff --git a/ressources/bitwarden-desktop/debmaker b/ressources/bitwarden-desktop/debmaker index f4c4220..e7b1d4b 100755 --- a/ressources/bitwarden-desktop/debmaker +++ b/ressources/bitwarden-desktop/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=2023.7.0 +VERSION=2023.8.2 APP=bitwarden-desktop DEPOT=https://github.com/bitwarden/clients.git GIT_VERSION=desktop-v${VERSION} diff --git a/ressources/budibase/README.MD b/ressources/budibase/README.MD index c386034..7d6062b 100644 --- a/ressources/budibase/README.MD +++ b/ressources/budibase/README.MD @@ -24,13 +24,16 @@ apt install -y --no-install-recommends curl apt-transport-https gnupg wget ca-ce wget -qO - https://deb.lgy.fr/install.sh | bash wget -qO - https://deb.nodesource.com/setup_18.x | bash -wget https://repos.azul.com/azul-repo.key -O - | gpg --dearmor -o /usr/share/keyrings/azul.gpg +wget -qO - https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" > /etc/apt/sources.list.d/zulu.list + + + #echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list #wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg -curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor > /usr/share/keyrings/couchdb-archive-keyring.gpg +wget -qO - https://couchdb.apache.org/repo/keys.asc | gpg --dearmor > /usr/share/keyrings/couchdb-archive-keyring.gpg source /etc/os-release echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/couchdb.list diff --git a/ressources/budibase/debmaker b/ressources/budibase/debmaker index ab76356..f15666b 100755 --- a/ressources/budibase/debmaker +++ b/ressources/budibase/debmaker @@ -1,109 +1,49 @@ #!/bin/bash -VERSION=2.8.29 +VERSION=2.9.33 APP=budibase DEPOT=https://github.com/Budibase/budibase.git -GIT_VERSION=${VERSION} +GIT_VERSION=2.9.33-alpha.0 DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M) DEBIAN_VERSION_CODENAME=bullseye IMAGE_SIZE=20 -PACKAGE_DEPENDENCY="yarn nodejs build-essential" +PACKAGE_DEPENDENCY="yarn nodejs build-essential python3-multiprocess " main(){ base_package_upgrade envinit - get_git_source + get_git_source /opt/${APP}/ build makedeb } -envinit(){ +envinit() { configure_depot_yarn - configure_depot_nodejs 16 + configure_depot_nodejs 18 install_package_dependency } - build() { - cd /tmp/${APP} - - [ -e /opt/budibase ] && rm -fr /opt/budibase - KEEP="dist|package.json|yarn.lock|client|builder|build" - npm install -g yarn jest lerna husky --force - mkdir -p /opt/budibase/node_modules - - cp -fr /tmp/${APP}/packages/server /opt/budibase - cp -fr /tmp/${APP}/packages/worker /opt/budibase - - cp -fr /tmp/${APP}/packages/builder/ /opt/budibase/server - cp -fr /tmp/${APP}/packages/client/ /opt/budibase/server - - cp -fr /tmp/${APP}/yarn.lock /opt/budibase/ + cd /opt/${APP} - - ln -s /opt/budibase/node_modules /opt/budibase/server/node_modules - ln -s /opt/budibase/node_modules /opt/budibase/worker/node_modules - - cd /opt/budibase/server - sed "s/\"0.0.0\"/\"${VERSION}\"/" -i package.json - yarn install --production=true - yarn build - - cd /opt/budibase/worker - sed "s/\"0.0.0\"/\"${VERSION}\"/" -i package.json - yarn install --production=true - yarn build - - #rm -fr /opt/budibase/node_modules - #mkdir -p /opt/budibase/node_modules - - #cd /opt/budibase/server - #ls | egrep -v $KEEP | xargs rm -rfv - #ln -s /opt/budibase/node_modules /opt/budibase/worker/node_modules - #NODE_ENV=production yarn - # - #cd /opt/budibase/worker - #ls | egrep -v $KEEP | xargs rm -rfv - #ln -s /opt/budibase/node_modules /opt/budibase/server/node_modules - #NODE_ENV=production yarn -} - -build() { - cd /tmp/${APP} - npm install -g yarn jest lerna husky --force + npm install -g yarn jest lerna typescript husky esbuild --force + node ./hosting/scripts/setup.js yarn - #yarn bootstrap + yarn bootstrap yarn build - - rm -fr /tmp/${APP}/packages/*/build } - makedeb(){ PATH_DEB=/tmp/src/rootfs - grep "process.env" /tmp/${APP}/packages/server/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-server - grep "process.env" /tmp/${APP}/packages/worker/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-worker + grep "process.env" /opt/${APP}/packages/server/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-server + grep "process.env" /opt/${APP}/packages/worker/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-worker - mv /opt/ ${PATH_DEB}/ - - sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control - fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist -} - - -makedeb(){ - PATH_DEB=/tmp/src/rootfs - - grep "process.env" /tmp/${APP}/packages/server/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-server - grep "process.env" /tmp/${APP}/packages/worker/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-worker - - mkdir -p ${PATH_DEB}/opt/budibase - cp -fr /tmp/${APP}/packages/* ${PATH_DEB}/opt/budibase/ - cp -fr /tmp/${APP}/node_modules ${PATH_DEB}/opt/budibase/ - mkdir -p ${PATH_DEB}/opt/budibase/server/client - cp ${PATH_DEB}/opt/budibase/client/manifest.json ${PATH_DEB}/opt/budibase/server/client - cp ${PATH_DEB}/opt/budibase/client/dist/budibase-client.js ${PATH_DEB}/opt/budibase/server/client + mkdir -p ${PATH_DEB}/opt/ + cp -fr /opt/${APP} ${PATH_DEB}/opt/${APP} + mkdir -p ${PATH_DEB}/opt/budibase/packages/server/client + cp ${PATH_DEB}/opt/budibase/packages/client/manifest.json ${PATH_DEB}/opt/budibase/packages/server/client + cp ${PATH_DEB}/opt/budibase/packages/client/dist/budibase-client.js ${PATH_DEB}/opt/budibase/packages/server/client sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist diff --git a/ressources/budibase/rootfs/usr/lib/systemd/system/budibase-server.service b/ressources/budibase/rootfs/usr/lib/systemd/system/budibase-server.service index 2836a56..428c5b2 100644 --- a/ressources/budibase/rootfs/usr/lib/systemd/system/budibase-server.service +++ b/ressources/budibase/rootfs/usr/lib/systemd/system/budibase-server.service @@ -4,7 +4,8 @@ After=network.target [Service] EnvironmentFile=/etc/default/budibase-server -ExecStart=/usr/bin/node /opt/budibase/server/dist/index.js +ExecStart=/usr/bin/node dist/index.js +WorkingDirectory=/opt/budibase/packages/server/ Restart=always #User=budibase-server #Group=budibase-server diff --git a/ressources/budibase/rootfs/usr/lib/systemd/system/budibase-worker.service b/ressources/budibase/rootfs/usr/lib/systemd/system/budibase-worker.service index fb05e50..2bfe29b 100644 --- a/ressources/budibase/rootfs/usr/lib/systemd/system/budibase-worker.service +++ b/ressources/budibase/rootfs/usr/lib/systemd/system/budibase-worker.service @@ -4,7 +4,8 @@ After=network.target [Service] EnvironmentFile=/etc/default/budibase-worker -ExecStart=/usr/bin/node /opt/budibase/worker/dist/index.js +ExecStart=/usr/bin/node dist/index.js +WorkingDirectory=/opt/budibase/packages/worker/ Restart=always #User=budibase-worker #Group=budibase-worker diff --git a/ressources/element-web/debmaker b/ressources/element-web/debmaker index de4459b..1684e6c 100755 --- a/ressources/element-web/debmaker +++ b/ressources/element-web/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=1.11.36 +VERSION=1.11.38 APP=element-web DEPOT=https://github.com/vector-im/element-web.git GIT_VERSION=v${VERSION} @@ -19,7 +19,7 @@ main(){ envinit() { configure_depot_yarn - configure_depot_nodejs + configure_depot_nodejs 18 install_package_dependency } diff --git a/ressources/flame/debmaker b/ressources/flame/debmaker index 4b29b0c..560bdf1 100755 --- a/ressources/flame/debmaker +++ b/ressources/flame/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=2.3.0 +VERSION=2.3.1 APP=flame DEPOT=https://github.com/pawelmalak/flame.git GIT_VERSION=v${VERSION} diff --git a/ressources/forgejo/debmaker b/ressources/forgejo/debmaker index bfd0693..37b47bf 100755 --- a/ressources/forgejo/debmaker +++ b/ressources/forgejo/debmaker @@ -1,19 +1,19 @@ #!/bin/bash -VERSION=1.20.1-0 +VERSION=1.20.3-0 APP=forgejo DEPOT=https://codeberg.org/forgejo/forgejo GIT_VERSION=v${VERSION} DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M) DEBIAN_VERSION_CODENAME=bookworm IMAGE_SIZE=6 -PACKAGE_DEPENDENCY="build-essential nodejs" +PACKAGE_DEPENDENCY="build-essential nodejs golang" main() { base_package_upgrade configure_depot_nodejs 18 install_package_dependency - install_go +# install_go get_git_source build makedeb diff --git a/ressources/joplin-desktop/debmaker b/ressources/joplin-desktop/debmaker index 98b547a..0df8620 100755 --- a/ressources/joplin-desktop/debmaker +++ b/ressources/joplin-desktop/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=2.12.10 +VERSION=2.12.14 APP=joplin-desktop GIT_VERSION=v${VERSION} DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M) diff --git a/ressources/mautrix-whatsapp/debian/mautrix-whatsapp.service b/ressources/mautrix-whatsapp/debian/mautrix-whatsapp.service index 2f1c8ed..06225f3 100644 --- a/ressources/mautrix-whatsapp/debian/mautrix-whatsapp.service +++ b/ressources/mautrix-whatsapp/debian/mautrix-whatsapp.service @@ -1,5 +1,7 @@ [Unit] Description=mautrix-whatsapp bridge +Wants=network.target +After=network.target [Service] Type=exec diff --git a/ressources/mautrix-whatsapp/debmaker b/ressources/mautrix-whatsapp/debmaker index 9f315dd..c857893 100755 --- a/ressources/mautrix-whatsapp/debmaker +++ b/ressources/mautrix-whatsapp/debmaker @@ -1,18 +1,18 @@ #!/bin/bash -VERSION=0.9.0 +VERSION=0.10.0 APP=mautrix-whatsapp DEPOT=https://github.com/mautrix/whatsapp.git GIT_VERSION=v${VERSION} -DEBIAN_VERSION_CODENAME=bullseye +DEBIAN_VERSION_CODENAME=bookworm IMAGE_SIZE=4 -PACKAGE_DEPENDENCY="debhelper-compat libolm-dev build-essential devscripts" +PACKAGE_DEPENDENCY="debhelper-compat libolm-dev build-essential devscripts golang" main(){ - echo deb http://deb.debian.org/debian bullseye-backports main > /etc/apt/sources.list.d/backports.list +# echo deb http://deb.debian.org/debian bullseye-backports main > /etc/apt/sources.list.d/backports.list base_package_upgrade install_package_dependency - apt install -y --no-install-recommends -t bullseye-backports golang +# apt install -y --no-install-recommends -t bullseye-backports golang get_git_source makedeb } diff --git a/ressources/metabase/debmaker b/ressources/metabase/debmaker index 5233367..2f7478d 100755 --- a/ressources/metabase/debmaker +++ b/ressources/metabase/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=0.46.6.4 +VERSION=0.47.0 APP=metabase DEPOT=https://github.com/metabase/metabase.git GIT_VERSION=v$VERSION @@ -12,7 +12,7 @@ PACKAGE_DEPENDENCY="build-essential default-jdk curl nodejs yarn" main(){ base_package_upgrade configure_depot_yarn - configure_depot_nodejs + configure_depot_nodejs 18 install_package_dependency install_clojure get_git_source diff --git a/ressources/mysqlfdw/debmaker b/ressources/mysqlfdw/debmaker index 1ab1c7f..575ea95 100755 --- a/ressources/mysqlfdw/debmaker +++ b/ressources/mysqlfdw/debmaker @@ -1,7 +1,7 @@ #!/bin/bash -VERSION=2_9_0 -APP=mysql_fdw +VERSION=2_9_1 +APP=mysqlfdw DEPOT=https://github.com/EnterpriseDB/mysql_fdw.git GIT_VERSION=REL-${VERSION} DEB_VERSION=$(echo ${VERSION} | sed 's/_/./g' )-$(date +%Y%m%d%H%M) diff --git a/ressources/mysqlfdw/rootfs/DEBIAN/control b/ressources/mysqlfdw/rootfs/DEBIAN/control index e25c029..f693c2d 100644 --- a/ressources/mysqlfdw/rootfs/DEBIAN/control +++ b/ressources/mysqlfdw/rootfs/DEBIAN/control @@ -1,8 +1,8 @@ -Package: mysqlfdw +Package: mysqlfdw Version: %VERSION% Section: contrib Priority: optional Depends: libmariadb-dev-compat Architecture: all Maintainer: Thomas Legay -Description: mysql_fdw \ No newline at end of file +Description: mysql_fdw diff --git a/ressources/picapport/debmaker b/ressources/picapport/debmaker index 758bbad..e7a9a40 100755 --- a/ressources/picapport/debmaker +++ b/ressources/picapport/debmaker @@ -3,7 +3,7 @@ VERSION=10.4.00 DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M) APP=picapport -DEBIAN_VERSION_CODENAME=bullseye +DEBIAN_VERSION_CODENAME=bookworm IMAGE_SIZE=3 main(){ diff --git a/ressources/picapport/rootfs/DEBIAN/postinst b/ressources/picapport/rootfs/DEBIAN/postinst index 6de9549..a7e100d 100755 --- a/ressources/picapport/rootfs/DEBIAN/postinst +++ b/ressources/picapport/rootfs/DEBIAN/postinst @@ -1,10 +1,9 @@ #!/bin/bash APP=picapport -id ${APP} &> /dev/null || useradd ${APP} -r -s /bin/false -d /var/lib/${APP} +id ${APP} &> /dev/null || useradd ${APP} -r -s /bin/false -md /var/lib/${APP} -chown ${APP}:${APP} /var/lib/${APP}/ -chown ${APP}:${APP} /var/lib/${APP}/* +chown -R ${APP}:${APP} /var/lib/${APP}/ if [[ $(systemctl list-unit-files | grep ${APP}.services) -eq 0 ]] then