aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2023-11-22 15:46:30 +0100
committerFrancesco Colista <fcolista@alpinelinux.org>2023-11-22 14:54:47 +0000
commitf53af3b87cb8d3dac3e80b2578a7f6bffc4717b7 (patch)
treeef75d62fd80e9cc383975bf427d189523b1e7c01
parentac25d59c594aa86e302783e034814587655cff4b (diff)
community/bareos: added php-fpm for apache2, fixed linter complains
-rw-r--r--community/bareos/APKBUILD24
-rwxr-xr-xcommunity/bareos/bareos.pre-upgrade14
-rw-r--r--community/bareos/php82-fpm.conf16
3 files changed, 43 insertions, 11 deletions
diff --git a/community/bareos/APKBUILD b/community/bareos/APKBUILD
index 646e9010ffd..13047e5392c 100644
--- a/community/bareos/APKBUILD
+++ b/community/bareos/APKBUILD
@@ -3,10 +3,10 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=bareos
pkgver=22.1.2
-pkgrel=0
+pkgrel=1
pkgdesc="Bareos - Backup Archiving REcovery Open Sourced"
url="https://www.bareos.com/"
-_php=php81
+_php=php82
# chromium-chromedriver only present on these arches
arch="x86_64 armv7"
options="!check"
@@ -59,6 +59,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/bareos/bareos/archive/Releas
$pkgname-dir.confd
$pkgname-sd.confd
$pkgname-fd.confd
+ $_php-fpm.conf
add-libintl.patch
nginx-conf.patch
@@ -137,12 +138,11 @@ package() {
mkdir -p "$pkgdir"/var/lib/bareos
mkdir -p "$pkgdir"/var/log/bareos
- local daemon; for daemon in dir; do
- install -Dm755 "$srcdir"/$pkgname-$daemon.initd \
- "$pkgdir"/etc/init.d/$pkgname-$daemon
- install -Dm755 "$srcdir"/$pkgname-$daemon.confd \
- "$pkgdir"/etc/conf.d/$pkgname-$daemon
- done
+ local daemon=dir
+ install -Dm755 "$srcdir"/$pkgname-$daemon.initd \
+ "$pkgdir"/etc/init.d/$pkgname-$daemon
+ install -Dm755 "$srcdir"/$pkgname-$daemon.confd \
+ "$pkgdir"/etc/conf.d/$pkgname-$daemon
# Install logrotate script
install -Dm644 core/scripts/logrotate "$pkgdir"/etc/logrotate.d/$pkgname
@@ -186,7 +186,7 @@ _postgresql() {
_webui() {
description="$description (webui)"
- depends="$_php $_php-gettext $_php-mbstring $_php-session $_php-ctype $_php-opcache $_php-openssl"
+ depends="$_php $_php-gettext $_php-mbstring $_php-session $_php-ctype $_php-opcache $_php-openssl $_php-intl $_php-json $_php-curl"
mkdir -p "$subpkgdir"/usr/share
mv "$pkgdir"/usr/share/bareos-webui "$subpkgdir"/usr/share/
@@ -200,14 +200,15 @@ _webui() {
_webui_apache2() {
description="$description (webui apache2 configuration)"
- depends="$pkgname-webui apache2 $_php-apache2"
+ depends="$pkgname-webui apache2 apache-mod-fcgid $_php-fpm"
mkdir -p "$subpkgdir"/etc/apache2/conf.d
cp "$builddir"/webui/install/apache/bareos-webui.conf "$subpkgdir"/etc/apache2/conf.d/
+ cp "$srcdir"/$_php-fpm.conf "$subpkgdir"/etc/apache2/conf.d/
}
_webui_nginx() {
- description="$description (webui apache2 configuration)"
+ description="$description (webui nginx configuration)"
depends="$pkgname-webui nginx $_php-fpm"
mkdir -p "$subpkgdir"/etc/nginx/http.d
@@ -255,6 +256,7 @@ cf0403ca8f3efb5cfb57915df9203ff16ed69a72d8d0bc189f5f221d36233127d9ed5c8391a46969
9858964a291ee9849e144f968a239758e3e6905bb5420717652114d8a583e3342e50f046efa41730f30cfc3f047b485251e93085fb13b327a6f2272d7c4c0309 bareos-dir.confd
eb5d942edb45d349804c90eb0379cfabca765d63277b21feb4f1937ef8b655b6ba9feb3b671b61f582996ff4f9740614c197ae990c00879731ec43d6da8f4286 bareos-sd.confd
4bdf1e9d5f2f7a85efdf9aaaa0d35daadf83e766afeccdba69a94490a2e59c0b46fbbbdb1dcd5be389603ac5a196fe35c0fb389bc241eab0bf414c9ec432451f bareos-fd.confd
+89269be79b5ccc3bddeb938a9aee4f80704219aa31423eedc42b0637ba00ebedeaa1617972005a8db6697cb0905e4321c4aedaaa44b1129be09d5ce080c06029 php82-fpm.conf
9d12f26d77d384ab122fdb133667b17a1e83c748d9fca9ca810c368b8f4f3cb2fc258f7c54628e96a0347e7f996c00f46d89655aad2fee373a61e7433fd783b9 add-libintl.patch
46b21a0b3c81d7be7d992d267441684c23b39eb2227326d7a8500aef8de3100146f2af98835cea555830d6490dd16fa58575095ba1ab833b697c24bddb68babd nginx-conf.patch
d7950b298306986d28b7c2e6b1d93d5a289c0e29cdd05825e667ea72da34ac2f078c7de344124d7cab2f342067f67725c40117a06cf95b1ef67f19f67e682521 apache2-conf.patch
diff --git a/community/bareos/bareos.pre-upgrade b/community/bareos/bareos.pre-upgrade
index 2fb5238dab0..a60ecced0fb 100755
--- a/community/bareos/bareos.pre-upgrade
+++ b/community/bareos/bareos.pre-upgrade
@@ -21,4 +21,18 @@ echo "catalog backend using the 'bareos-dbcopy' tool of your current" >&2
echo "installation first." >&2
echo "" >&2
echo "current catalog backend not supported anymore" >&2
+
+if $(apk info -qe bareos-webui); then
+ for _ver in 81 82; do
+ apk info -qe php$_ver-apache2 && \
+ echo "!! Found php$_ver-apache2. This needs to be removed since apache2 " && \
+ echo "!! with mod_php is no longer supported" && \
+ echo "" && \
+ echo "!! You should install php-fpm with:" && \
+ echo "" && \
+ echo "!! apk add php-fpm" && \
+ echo "" >&2
+ done
+fi
+
exit 0
diff --git a/community/bareos/php82-fpm.conf b/community/bareos/php82-fpm.conf
new file mode 100644
index 00000000000..3c268fa3e08
--- /dev/null
+++ b/community/bareos/php82-fpm.conf
@@ -0,0 +1,16 @@
+LoadModule fcgid_module modules/mod_fcgid.so
+
+<IfModule mod_fcgid.c>
+ Alias /fcgi-bin/ "/var/www/localhost/fcgi-bin/"
+ <Location /fcgi-bin>
+ SetHandler fcgid-script
+ Options +ExecCGI
+ Order allow,deny
+ Allow from all
+ </Location>
+ DirectoryIndex index.php
+ <FilesMatch "\.php$">
+ SetHandler "proxy:fcgi://127.0.0.1:9000/"
+ #CGIPassAuth on
+ </FilesMatch>
+</IfModule>