aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-04-24 20:29:33 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-04-24 20:29:33 +0200
commit3e74fa3b3f4c1069616495decb06d601526986bd (patch)
treeb458bb0985c0978358479e950a53c258238039e5
parente89c3ae528d667a63b9716653f9f926bf416f2ee (diff)
downloadapkbuilds-3e74fa3b3f4c1069616495decb06d601526986bd.tar.gz
apkbuilds-3e74fa3b3f4c1069616495decb06d601526986bd.tar.bz2
apkbuilds-3e74fa3b3f4c1069616495decb06d601526986bd.zip
fix: Correct folder struct
Now it links the folder to the right place with the proper permission.
-rw-r--r--apks/firefly3/APKBUILD40
-rw-r--r--apks/firefly3/firefly3.nginx.conf16
-rw-r--r--apks/firefly3/firefly3.post-install6
-rw-r--r--apks/firefly3/firefly3.pre-install6
4 files changed, 34 insertions, 34 deletions
diff --git a/apks/firefly3/APKBUILD b/apks/firefly3/APKBUILD
index 9f113c0..f4e59bc 100644
--- a/apks/firefly3/APKBUILD
+++ b/apks/firefly3/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
pkgname=firefly3
-pkgver=5.7.13
+pkgver=5.7.18
pkgrel=4
pkgdesc="A free and open source personal finance manager"
url="https://firefly-iii.org"
@@ -41,8 +41,6 @@ install="
"
source="
${pkgname}-${pkgver}.tar.gz::https://github.com/firefly-iii/firefly-iii/archive/refs/tags/$pkgver.tar.gz
-
- $pkgname.nginx.conf
$pkgname-env
"
options="!check" # no clue how to run test on this
@@ -51,13 +49,19 @@ builddir="$srcdir/firefly-iii-$pkgver/"
package() {
local wwwdir="usr/share/webapps/$pkgname"
local confdir="etc/$pkgname"
+ local lib="var/lib/$pkgname"
+ local log="var/log/$pkgname"
- install -d -m 770 -o www-data -g www-data "$pkgdir"/$confdir
+ install -d -m 770 -o firefly -g firefly "$pkgdir/$confdir"
+ install -d -m 770 -o firefly -g firefly "$pkgdir/$lib"
+ install -d -m 770 -o firefly -g firefly "$pkgdir/$log"
mkdir -p "$pkgdir"
cd "$pkgdir"
mkdir -p ./${wwwdir%/*}
+ mkdir -p ./"$lib"/upload
+ mkdir -p ./"$lib"/database
cp -a "$builddir" ./$wwwdir
chmod +x ./$wwwdir/artisan
@@ -66,12 +70,25 @@ package() {
composer install --prefer-dist --no-dev --no-scripts
cd ..
- install -m 755 -o www-data -g www-data -d "$wwwdir"
-
- install -m 660 -o www-data -g www-data \
+ install -m 660 \
"$srcdir"/$pkgname-env "$pkgdir"/$confdir/env
ln -s /$confdir/env "$pkgdir"/$wwwdir/.env
+
+ rm -r "$pkgdir"/$wwwdir/storage/database
+ ln -s /"$lib"/database "$pkgdir"/$wwwdir/storage/
+
+ rm -r "$pkgdir"/$wwwdir/storage/upload
+ ln -s /"$lib"/upload "$pkgdir"/$wwwdir/storage/
+
+ ln -s /"$lib"/oauth-private.key "$pkgdir"/$wwwdir/storage/oauth-private.key
+ ln -s /"$lib"/oauth-public.key "$pkgdir"/$wwwdir/storage/oauth-public.key
+
+ rm -r "$pkgdir"/$wwwdir/storage/logs
+ ln -T -s /"$log"/ "$pkgdir"/$wwwdir/storage/logs
+
+ chown -R firefly:firefly "$pkgdir"/$wwwdir/
+ chown -R firefly:firefly "$pkgdir/$lib"
}
_mysql() {
@@ -92,15 +109,8 @@ _sqlite() {
mkdir -p "$subpkgdir"
}
-_nginx() {
- depends="firefly3"
- pkgdesc="nginx configuration for $pkgname"
- install -Dm644 "$srcdir/$pkgname.nginx.conf" \
- "$subpkgdir"/etc/nginx/http.d/$pkgname.conf
-}
sha512sums="
-a59f89305eeb6cdb301ca86a6a3dfacd90497ce887b59b7c426bef341e7a070efc0d430c6e40277273e5aa56b86271c652f80e696cc53f0788b0624dd1b66a46 firefly3-5.7.13.tar.gz
-9d32e8e8bd805b09cd429eacc42fe9e746570cdc867531ac47a0b31801378e5e0fc357ef88e8d5c14617ba1887a3789a9d2f7150111b497377380df7ccdd08a7 firefly3.nginx.conf
+4febc482056d1c635fb674b001442dcaa6d331ce3906aeeac80497b42b38fa1e2393e6b2a0d76da884db15d000c4364d299a11e4d28b2b6ebdeba8fae638a413 firefly3-5.7.18.tar.gz
b778a4113b8d4d3465a5f80a72fe04497d68d718751e2b0ee43fdbd4379b6278bdff74c68e095668f03ef3a9969de41d734cb4f7e27fb26f1a4342f0c9e0f57e firefly3-env
"
diff --git a/apks/firefly3/firefly3.nginx.conf b/apks/firefly3/firefly3.nginx.conf
deleted file mode 100644
index a95ebb1..0000000
--- a/apks/firefly3/firefly3.nginx.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-server {
- listen 80;
- server_name firefly.lan;
- root /var/www/firefly3/public;
-
- location ~ \.php$ {
- try_files $uri $uri/ =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/run/php-fpm8/fpm.sock;
- include fastcgi.conf;
- }
-
- location / {
- try_files $uri /index.php$is_args$args;
- }
-}
diff --git a/apks/firefly3/firefly3.post-install b/apks/firefly3/firefly3.post-install
index c74ae13..a92883d 100644
--- a/apks/firefly3/firefly3.post-install
+++ b/apks/firefly3/firefly3.post-install
@@ -3,4 +3,10 @@
printf " *\n * Add the configration to '/etc/firefly3/env' \n"
printf " * Without it firefly3 won't run.\n *\n"
+user=firefly
+group=firefly
+
+chown $user:$group /usr/share/webapps/firefly3
+chown $user:$group /var/lib/firefly3
+
exit 0
diff --git a/apks/firefly3/firefly3.pre-install b/apks/firefly3/firefly3.pre-install
index 74f1b59..b9622c2 100644
--- a/apks/firefly3/firefly3.pre-install
+++ b/apks/firefly3/firefly3.pre-install
@@ -1,9 +1,9 @@
#!/bin/sh
-user=www-data
-group=www-data
+user=firefly
+group=firefly
addgroup -S $group 2>/dev/null
-adduser -S -D -h /var/lib/$user -s /sbin/nologin -G $group -g $user $user 2>/dev/null
+adduser -S -D -h /var/lib/"$user"3 -s /sbin/nologin -G $group -g $user $user 2>/dev/null
exit 0