diff --git a/lib/exec_in_chroot.sh b/lib/exec_in_chroot.sh index 8997327..f798c12 100755 --- a/lib/exec_in_chroot.sh +++ b/lib/exec_in_chroot.sh @@ -31,13 +31,14 @@ configure_depot_yarn() { configure_depot_nodejs() { NODE_MAJOR=16 [ ! "$1" == "" ] && NODE_MAJOR=$1 - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list - wget -qO - https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + echo -e "Package: nodejs\\nPin: version $NODE_MAJOR.*\\nPin-Priority: 1000" > /etc/apt/preferences.d/nodejs + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list + [ -f /etc/apt/keyrings/nodesource.gpg ] || wget -qO - https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg } install_go() { - GO_VERSION=1.20.7 + GO_VERSION=1.21.1 [ ! "$1" == "" ] && GO_VERSION=$1 PATH=$PATH:/usr/local/go/bin if [ -e /usr/local/go/bin/go ] || [ ! "$(go version)" == "go version go${GO_VERSION} linux/amd64" ] ; diff --git a/ressources/adguardhome/debmaker b/ressources/adguardhome/debmaker index bdbc647..80f16d1 100755 --- a/ressources/adguardhome/debmaker +++ b/ressources/adguardhome/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=0.108.0-b.43 +VERSION=0.108.0-b.46 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 e7b1d4b..91e7927 100755 --- a/ressources/bitwarden-desktop/debmaker +++ b/ressources/bitwarden-desktop/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=2023.8.2 +VERSION=2023.8.3 APP=bitwarden-desktop DEPOT=https://github.com/bitwarden/clients.git GIT_VERSION=desktop-v${VERSION} diff --git a/ressources/forgejo/debmaker b/ressources/forgejo/debmaker index 37b47bf..ce75d23 100755 --- a/ressources/forgejo/debmaker +++ b/ressources/forgejo/debmaker @@ -1,19 +1,19 @@ #!/bin/bash -VERSION=1.20.3-0 +VERSION=1.20.4-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 golang" +PACKAGE_DEPENDENCY="build-essential nodejs" 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 0df8620..4baab7b 100755 --- a/ressources/joplin-desktop/debmaker +++ b/ressources/joplin-desktop/debmaker @@ -1,9 +1,9 @@ #!/bin/bash -VERSION=2.12.14 +VERSION=2.12.17 APP=joplin-desktop GIT_VERSION=v${VERSION} -DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M) +DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M) DEPOT=https://github.com/laurent22/joplin.git DEBIAN_VERSION_CODENAME=bookworm IMAGE_SIZE=10 diff --git a/ressources/metabase/debmaker b/ressources/metabase/debmaker index 2f7478d..4347474 100755 --- a/ressources/metabase/debmaker +++ b/ressources/metabase/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=0.47.0 +VERSION=0.47.1 APP=metabase DEPOT=https://github.com/metabase/metabase.git GIT_VERSION=v$VERSION diff --git a/ressources/uptime-kuma/DEBIAN/changelog b/ressources/uptime-kuma/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/uptime-kuma/DEBIAN/control b/ressources/uptime-kuma/DEBIAN/control new file mode 100644 index 0000000..8e26f93 --- /dev/null +++ b/ressources/uptime-kuma/DEBIAN/control @@ -0,0 +1,8 @@ +Package: uptime-kuma +Version: %VERSION% +Section: contrib +Priority: optional +Architecture: all +Depends: nodejs +Maintainer: Thomas Legay +Description: uptime-kuma diff --git a/ressources/uptime-kuma/DEBIAN/postinst b/ressources/uptime-kuma/DEBIAN/postinst new file mode 100755 index 0000000..a3f14d4 --- /dev/null +++ b/ressources/uptime-kuma/DEBIAN/postinst @@ -0,0 +1,7 @@ +#!/bin/bash +APPUSER=uptime-kuma + +id $APPUSER &> /dev/null || useradd $APPUSER -r -s /bin/false -d /var/lib/$APPUSER/ + +chown -R $APPUSER:$APPUSER /var/lib/$APPUSER/ + diff --git a/ressources/uptime-kuma/debmaker b/ressources/uptime-kuma/debmaker new file mode 100755 index 0000000..f398fd7 --- /dev/null +++ b/ressources/uptime-kuma/debmaker @@ -0,0 +1,43 @@ +#!/bin/bash + +VERSION=1.23.1 +APP=uptime-kuma +GIT_VERSION=${VERSION} +DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M) +DEPOT=https://github.com/louislam/uptime-kuma.git +DEBIAN_VERSION_CODENAME=bookworm +IMAGE_SIZE=10 +PACKAGE_DEPENDENCY="nodejs yarn build-essential" + +main(){ + base_package_upgrade + configure_depot_yarn + configure_depot_nodejs + install_package_dependency + get_git_source + build + makedeb +} + +build() { + cd /tmp/${APP} + yarn + yarn build +} + +makedeb(){ + PATH_DEB=/tmp/src/rootfs/ + cp -fr /tmp/src/DEBIAN $PATH_DEB + + mkdir -p $PATH_DEB/usr/share/uptime-kuma/ + mkdir -p $PATH_DEB/var/lib/uptime-kuma/data + + cp -fr /tmp/${APP}/{db,dist,node_modules,package.json,server,src} $PATH_DEB/usr/share/uptime-kuma/ + ln -s /var/lib/uptime-kuma/ $PATH_DEB/usr/share/uptime-kuma/data + + mkdir -p ${PATH_DEB}/usr/lib/systemd/system/ + cp -p /tmp/src/uptime-kuma.service ${PATH_DEB}/usr/lib/systemd/system/ + + sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control + fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist +} diff --git a/ressources/uptime-kuma/uptime-kuma.service b/ressources/uptime-kuma/uptime-kuma.service new file mode 100644 index 0000000..b19b509 --- /dev/null +++ b/ressources/uptime-kuma/uptime-kuma.service @@ -0,0 +1,13 @@ +[Unit] +Description=linkding +After=network.target + +[Service] +ExecStart=/usr/bin/nodejs /var/lib/uptime-kuma/server/server.js +WorkingDirectory=/var/lib/uptime-kuma +Restart=always +User=uptime-kuma +Group=uptime-kuma + +[Install] +WantedBy=multi-user.target