update authelia element-web

This commit is contained in:
thomas 2022-03-04 20:50:46 +01:00
parent 1f55fadcc7
commit beb7aa882f
5 changed files with 46 additions and 30 deletions

View File

@ -23,7 +23,7 @@ debmaker_chroot cache/joplin
### packages available in shared repository ### packages available in shared repository
- [adguardhome](#adguardhome) ([site](https://adguard.com/fr/adguard-home/overview.html)) - [adguardhome](#adguardhome) ([site](https://adguard.com/fr/adguard-home/overview.html)) ([src](https://github.com/AdguardTeam/AdguardHome))
- [authelia](#authelia) ([site](https://www.authelia.com/)) - [authelia](#authelia) ([site](https://www.authelia.com/))
- [element-web](#element-web) ([site](https://element.io/)) - [element-web](#element-web) ([site](https://element.io/))
- [gotify](#gotify) ([site](https://gotify.net/)) - [gotify](#gotify) ([site](https://gotify.net/))

View File

@ -1,28 +1,38 @@
#!/bin/bash #!/bin/bash
VERSION=4.34.2
RELEASE=1
[ -e ./lib/function.sh ] && source ./lib/function.sh [ -e ./lib/function.sh ] && source ./lib/function.sh
APP=authelia APP=authelia
VERSION=4.33.2 GIT_VERSION=v${VERSION}
GIT_VERSION=v$VERSION DEB_VERSION=${VERSION}-${RELEASE}
DEB_VERSION=$VERSION-4
DEBIAN_VERSION_CODENAME=bullseye DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=4 IMAGE_SIZE=4
STEP="envinit prebuild build makedeb" STEP="envinit prebuild build makedeb"
envinit() { envinit() {
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
wget -qO - https://deb.nodesource.com/setup_16.x | bash then
apt-get update apt-get update
apt-get install -y nodejs apt-get dist-upgrade -y
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz else
wget -qO - https://get.pnpm.io/install.sh | sh - apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot
wget -qO - https://deb.nodesource.com/setup_16.x | bash
apt-get update
apt-get install -y nodejs
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
wget -qO - https://get.pnpm.io/install.sh | sh -
fi
} }
prebuild(){ prebuild(){
GIT_VERSION=$1 [ -e /tmp/git ] && rm -fr /tmp/git
git clone --depth 1 -b ${GIT_VERSION} https://github.com/authelia/authelia.git /tmp/authelia [ -e /tmp/element-web ] || mkdir /tmp/element-web
git clone --depth 1 -b ${GIT_VERSION} https://github.com/authelia/authelia.git /tmp/git
cp -r /tmp/git/. /tmp/authelia
} }
build() { build() {
@ -32,8 +42,6 @@ build() {
} }
makedeb(){ makedeb(){
GIT_VERSION=$1
DEB_VERSION=$2
PATH_DEB=/tmp/src/rootfs PATH_DEB=/tmp/src/rootfs
cp /tmp/authelia/dist/authelia ${PATH_DEB}/usr/bin/authelia cp /tmp/authelia/dist/authelia ${PATH_DEB}/usr/bin/authelia

View File

@ -1,28 +1,38 @@
#!/bin/bash #!/bin/bash
VERSION=1.10.6
RELEASE=3
[ -e ./lib/function.sh ] && source ./lib/function.sh [ -e ./lib/function.sh ] && source ./lib/function.sh
APP=element-web APP=element-web
VERSION=1.10.6 GIT_VERSION=v${VERSION}
GIT_VERSION=v$VERSION DEB_VERSION=${VERSION}-${RELEASE}
DEB_VERSION=$VERSION-1
DEBIAN_VERSION_CODENAME=bullseye DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=4 IMAGE_SIZE=4
STEP="envinit prebuild build makedeb" STEP="envinit prebuild build makedeb"
envinit() { envinit() {
apt install -y --no-install-recommends build-essential git python wget ca-certificates dpkg fakeroot if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
wget -qO - https://deb.nodesource.com/setup_16.x | bash then
wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg apt-get update
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 dist-upgrade -y
apt-get update else
apt-get install -y yarn nodejs apt install -y --no-install-recommends git wget ca-certificates dpkg 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
fi
} }
prebuild(){ prebuild(){
GIT_VERSION=$1 [ -e /tmp/git ] && rm -fr /tmp/git
git clone --depth 1 -b ${GIT_VERSION} https://github.com/vector-im/element-web.git /tmp/element-web [ -e /tmp/element-web ] || mkdir /tmp/element-web
git clone --depth 1 -b ${GIT_VERSION} https://github.com/vector-im/element-web.git /tmp/git
cp -r /tmp/git/. /tmp/element-web
} }
build() { build() {
@ -32,11 +42,9 @@ build() {
} }
makedeb(){ makedeb(){
GIT_VERSION=$1
DEB_VERSION=$2
PATH_DEB=/tmp/src/rootfs PATH_DEB=/tmp/src/rootfs
tar -zxf /tmp/element-web/dist/element-${GIT_VERSION}-dirty.tar.gz --strip-components=1 -C ${PATH_DEB}/usr/lib/element-web/ tar -zxf /tmp/element-web/dist/element-${GIT_VERSION}-dirty.tar.gz --strip-components=1 -C ${PATH_DEB}/usr/share/element-web/
cp /tmp/element-web/config.sample.json ${PATH_DEB}/etc/element-web/config.json cp /tmp/element-web/config.sample.json ${PATH_DEB}/etc/element-web/config.json
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist

View File

@ -3,7 +3,7 @@
ServerAlias second.domaine.com ServerAlias second.domaine.com
ServerAlias third.domaine.com ServerAlias third.domaine.com
DocumentRoot /usr/lib/element-web DocumentRoot /usr/share/element-web
Protocols h2c http/1.1 Protocols h2c http/1.1
#default config ie first and third domaine #default config ie first and third domaine
@ -12,7 +12,7 @@
#config for second domaine #config for second domaine
Alias /config.second.domaine.com.json /etc/element-web/config.second.domaine.com.json Alias /config.second.domaine.com.json /etc/element-web/config.second.domaine.com.json
<directory /usr/lib/element-web> <directory /usr/share/element-web>
Options none Options none
AllowOverride None AllowOverride None
Require all granted Require all granted