From 96d076a0ed6204e9d3dbf8967e1db2f7971c3689 Mon Sep 17 00:00:00 2001 From: thomas Date: Sat, 25 Jun 2022 20:07:29 +0200 Subject: [PATCH] Add bitwarden-desktop new version gitea glpi fix authelia systemd service --- README.MD | 11 +++- .../usr/lib/systemd/system/authelia.service | 2 +- ressources/bitwarden-desktop/debmaker | 60 +++++++++++++++++++ .../bitwarden-desktop/rootfs/DEBIAN/changelog | 0 .../bitwarden-desktop/rootfs/DEBIAN/control | 7 +++ .../rootfs/usr/share/applications/.gitkeep | 0 .../usr/share/applications/bitwarden.desktop | 11 ++++ ressources/gitea/debmaker | 2 +- ressources/glpi/debmaker | 2 +- 9 files changed, 91 insertions(+), 4 deletions(-) create mode 100755 ressources/bitwarden-desktop/debmaker create mode 100644 ressources/bitwarden-desktop/rootfs/DEBIAN/changelog create mode 100644 ressources/bitwarden-desktop/rootfs/DEBIAN/control create mode 100644 ressources/bitwarden-desktop/rootfs/usr/share/applications/.gitkeep create mode 100644 ressources/bitwarden-desktop/rootfs/usr/share/applications/bitwarden.desktop diff --git a/README.MD b/README.MD index 92e7d09..7381e84 100644 --- a/README.MD +++ b/README.MD @@ -49,6 +49,7 @@ To enter in temporary filesystem - [adguardhome](#adguardhome) ([site](https://adguard.com/fr/adguard-home/overview.html)) ([src](https://github.com/AdguardTeam/AdguardHome)) - [authelia](#authelia) ([site](https://www.authelia.com/)) ([src](https://github.com/authelia/authelia)) + - [bitwarden-desktop](#bitwarden-desktop) ([site](https://bitwarden.com/)) ([src](https://github.com/bitwarden/clients/)) - [element-web](#element-web) ([site](https://element.io/)) ([src](https://github.com/vector-im/element-web)) - [flame](#flame) ([site](https://github.com/pawelmalak/flame)) ([src](https://github.com/pawelmalak/flame)) - [gitea](#gitea) ([site](https://gitea.io)) ([src](https://github.com/go-gitea/gitea/)) @@ -91,6 +92,15 @@ apt-get install -y authelia systemctl enable --now authelia ``` +#### bitwarden-desktop + +```bash +apt install -y wget ca-certificates +wget -qO - https://deb.lgy.fr/install.sh | bash +apt-get update +apt-get install -y bitwarden-desktop +``` + #### element-web ```bash @@ -194,7 +204,6 @@ apt install -y wget ca-certificates wget -qO - https://deb.lgy.fr/install.sh | bash apt-get update apt-get install -y joplin - ``` #### joplin-server diff --git a/ressources/authelia/rootfs/usr/lib/systemd/system/authelia.service b/ressources/authelia/rootfs/usr/lib/systemd/system/authelia.service index f2a2d62..d541850 100644 --- a/ressources/authelia/rootfs/usr/lib/systemd/system/authelia.service +++ b/ressources/authelia/rootfs/usr/lib/systemd/system/authelia.service @@ -5,7 +5,7 @@ After=multi-user.target [Service] User=authelia Group=authelia -ExecStart=/usr/lib/authelia/authelia --config /etc/authelia/configuration.yml +ExecStart=/usr/bin/authelia --config /etc/authelia/configuration.yml SyslogIdentifier=authelia [Install] diff --git a/ressources/bitwarden-desktop/debmaker b/ressources/bitwarden-desktop/debmaker new file mode 100755 index 0000000..8b625bd --- /dev/null +++ b/ressources/bitwarden-desktop/debmaker @@ -0,0 +1,60 @@ +#!/bin/bash + +VERSION=2022.5.1 + +[ -e ./lib/function.sh ] && source ./lib/function.sh + +APP=bitwarden-desktop +DEPOT=https://github.com/bitwarden/clients.git +GIT_VERSION=desktop-v${VERSION} +DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M) +DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE=6 + +STEP="envinit prebuild build makedeb" + +envinit() { + apt-get update + apt-get dist-upgrade -y + apt install -y --no-install-recommends git wget ca-certificates dpkg build-essential pkg-config libsecret-1-dev fakeroot + wget -qO - https://deb.nodesource.com/setup_16.x | bash + wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg + echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list + apt-get update + apt-get install -y yarn nodejs +} + +prebuild(){ + [ -e /tmp/git ] && rm -fr /tmp/git + [ -e /tmp/${APP} ] || mkdir /tmp/${APP} + git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/git + cp -r /tmp/git/. /tmp/${APP} +} + +build() { + cd /tmp/${APP}/apps/desktop + yarn install + PATH=$PATH:node_modules/.bin/ + npm run clean:dist + electron-builder --linux dir --x64 -p never +} + +makedeb(){ + PATH_DEB=/tmp/src/rootfs + + mkdir -p ${PATH_DEB}/usr/lib/ + mkdir -p ${PATH_DEB}/usr/bin/ + mkdir -p ${PATH_DEB}/usr/share/doc/bitwarden/ + + cp -fr /tmp/${APP}/apps/desktop/dist/linux-unpacked ${PATH_DEB}/usr/lib/bitwarden-desktop + for tmp in /tmp/${APP}/apps/desktop/resources/icons/* + do + RESOLUTION=$(basename $tmp .png) + mkdir -p ${PATH_DEB}/usr/share/icons/hicolor/${RESOLUTION}/apps/ + cp $tmp ${PATH_DEB}/usr/share/icons/hicolor/${RESOLUTION}/apps/bitwarden.png + done + ln -s /usr/lib/bitwarden-desktop/bitwarden ${PATH_DEB}/usr/bin/bitwarden + + sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control + fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist +} diff --git a/ressources/bitwarden-desktop/rootfs/DEBIAN/changelog b/ressources/bitwarden-desktop/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/bitwarden-desktop/rootfs/DEBIAN/control b/ressources/bitwarden-desktop/rootfs/DEBIAN/control new file mode 100644 index 0000000..b5346f6 --- /dev/null +++ b/ressources/bitwarden-desktop/rootfs/DEBIAN/control @@ -0,0 +1,7 @@ +Package: bitwarden-desktop +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Maintainer: Thomas Legay +Description: bitwarden-desktop diff --git a/ressources/bitwarden-desktop/rootfs/usr/share/applications/.gitkeep b/ressources/bitwarden-desktop/rootfs/usr/share/applications/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ressources/bitwarden-desktop/rootfs/usr/share/applications/bitwarden.desktop b/ressources/bitwarden-desktop/rootfs/usr/share/applications/bitwarden.desktop new file mode 100644 index 0000000..0cc74f1 --- /dev/null +++ b/ressources/bitwarden-desktop/rootfs/usr/share/applications/bitwarden.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Bitwarden +Exec=/usr/bin/bitwarden +Terminal=false +Type=Application +Icon=bitwarden +StartupWMClass=Bitwarden +GenericName=Password Manager +Comment=A secure and free password manager for all of your devices. +MimeType=x-scheme-handler/bitwarden; +Categories=Utility; diff --git a/ressources/gitea/debmaker b/ressources/gitea/debmaker index 8ef7d4a..6fa20cd 100755 --- a/ressources/gitea/debmaker +++ b/ressources/gitea/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=1.16.8 +VERSION=1.16.9 [ -e ./lib/function.sh ] && source ./lib/function.sh diff --git a/ressources/glpi/debmaker b/ressources/glpi/debmaker index d8f2b55..9c5d691 100755 --- a/ressources/glpi/debmaker +++ b/ressources/glpi/debmaker @@ -7,7 +7,7 @@ VERSION=10.0.1 APP=glpi DEPOT=https://github.com/glpi-project/glpi.git GIT_VERSION=${VERSION} -DEB_VERSION=10.0.1-$(date +%Y%m%d%H%M) +DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M) DEBIAN_VERSION_CODENAME=bullseye IMAGE_SIZE=4