From 05f9b162ae7da719f879bb776ed84f3f94cecbde Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 13 Jun 2023 17:31:58 -0400 Subject: [PATCH] user/authentik: upgrade to 2023.5.3 --- user/authentik/APKBUILD | 12 ++++++++---- user/authentik/authentik.post-install | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/user/authentik/APKBUILD b/user/authentik/APKBUILD index af3b844..820ad71 100644 --- a/user/authentik/APKBUILD +++ b/user/authentik/APKBUILD @@ -2,7 +2,7 @@ # Contributor: Antoine Martin (ayakael) pkgname=authentik -pkgver=2023.5.2 +pkgver=2023.5.3 pkgrel=0 pkgdesc="An open-source Identity Provider focused on flexibility and versatility" url="https://github.com/goauthentik/authentik" @@ -10,6 +10,8 @@ arch="all" license="MIT" depends=" postgresql + procps + pwgen py3-aiohttp py3-aiosignal py3-amqp @@ -187,6 +189,7 @@ package() { msg "Packaging $pkgname" mkdir -p "$pkgdir"/usr/share/webapps/authentik/web mkdir -p "$pkgdir"/usr/share/webapps/authentik/website + mkdir -p "$pkgdir"/var/lib/authentik mkdir -p "$pkgdir"/usr/share/doc mkdir -p "$pkgdir"/usr/bin cp -dr "$builddir"/authentik "$pkgdir"/usr/share/webapps/authentik @@ -196,6 +199,7 @@ package() { cp -dr "$builddir"/tests "$pkgdir"/usr/share/webapps/authentik/tests cp -dr "$builddir"/lifecycle "$pkgdir"/usr/share/webapps/authentik/lifecycle cp -dr "$builddir"/locale "$pkgdir"/usr/share/webapps/authentik/locale + cp -dr "$builddir"/blueprints "$pkgdir"/var/lib/authentik/blueprints install -Dm755 "$builddir"/manage.py "$pkgdir"/usr/share/webapps/authentik/manage.py install -Dm755 "$builddir"/server "$pkgdir"/usr/share/webapps/authentik/server ln -s "/etc/authentik/config.yml" "$pkgdir"/usr/share/webapps/authentik/local.env.yml @@ -213,12 +217,12 @@ package() { sed -i 's|cert_discovery_dir.*|cert_discovery_dir: /var/lib/authentik/certs|' "$pkgdir"/etc/authentik/config.yml sed -i 's|blueprints_dir.*|blueprints_dir: /var/lib/authentik/blueprints|' "$pkgdir"/etc/authentik/config.yml sed -i 's|template_dir.*|template_dir: /var/lib/authentik/templates|' "$pkgdir"/etc/authentik/config.yml - echo "\ncsrf:\n trusted_origins: ['auth.example.com']" >> "$pkgdir"/etc/authentik/config.yml - echo "\nsecret_key: '@@SECRET_KEY@@'" >> "$pkgdir"/etc/authentik/config.yml + printf "\ncsrf:\n trusted_origins: ['auth.example.com']" >> "$pkgdir"/etc/authentik/config.yml + printf "\nsecret_key: '@@SECRET_KEY@@'" >> "$pkgdir"/etc/authentik/config.yml } sha512sums=" -6304283c28bef1ba798e7e3233d72bed983a349762daa9b6323446dccb29517ff36b00a61a1a1fb15afa2408d578f586c3eacd3f2a001ee96b44ca3f28ff6038 authentik-2023.5.2.tar.gz +84e3582d58a70576bfd2c2d04cc4083721beb2c3c4c015b71bb705439aa5ebf5c36b41220a95d5df8e7154cbfc42aedfb8d1608aab13289af1fb279a8aa0781b authentik-2023.5.3.tar.gz 4defb4fe3a4230f4aa517fbecd5e5b8bcef2a64e1b40615660ae9eec33597310a09df5e126f4d39ce7764bd1716c0a7040637699135c103cbc1879593c6c06f1 authentik.openrc 5d7f28bf5a9f358a0fc3634b2bac6d070c276c3f8181d26fa7e94a17503a4d54556bf7c3207ccd6cb924b81754ed965795d5e2a8aa1af409fd9e32d390ec4cf5 authentik-worker.openrc 483befe5e2c90c4f37d5b3ef95ebb99a4208927ee0481e948117a79e36cce110ed53eaa0a9a816cf30ba4c0691b504c9c08d2f9dd7a7bc465a618af260aa1145 root-settings-csrf_trusted_origins.patch diff --git a/user/authentik/authentik.post-install b/user/authentik/authentik.post-install index 89a2af8..ca0a6e6 100755 --- a/user/authentik/authentik.post-install +++ b/user/authentik/authentik.post-install @@ -9,7 +9,8 @@ setcap 'cap_net_bind_service=+ep' /usr/share/webapps/authentik/server if [ $(grep '@@SECRET_KEY@@' "$config_file") ]; then echo "* Generating random secret in $config_file" >&2 - sed -i "s|@@SECRET_KEY@@|$(pwgen -s 50 1 )" "$config_file" + secret_key="$(pwgen -s 50 1)" + sed -i "s|@@SECRET_KEY@@|$secret_key|" "$config_file" chown root:$group "$config_file" chmod 0640 "$config_file" fi