summaryrefslogtreecommitdiff
path: root/www-apps/bareos-webui
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-05 17:02:59 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-05 17:02:59 +0000
commit6bf575618cf9022e99cbfcc64036fd9db79a749c (patch)
treef692d02fb905cd3d5bab465b790da48fb2de546b /www-apps/bareos-webui
parent5944ce177026c93b7dab690db9d970567ddbf75f (diff)
gentoo auto-resync : 05:12:2023 - 17:02:58
Diffstat (limited to 'www-apps/bareos-webui')
-rw-r--r--www-apps/bareos-webui/Manifest7
-rw-r--r--www-apps/bareos-webui/bareos-webui-22.1.2.ebuild110
-rw-r--r--www-apps/bareos-webui/bareos-webui-9999.ebuild110
-rw-r--r--www-apps/bareos-webui/files/apache.conf50
-rw-r--r--www-apps/bareos-webui/files/nginx.include17
-rw-r--r--www-apps/bareos-webui/files/postinstall-en.txt36
-rw-r--r--www-apps/bareos-webui/metadata.xml11
7 files changed, 341 insertions, 0 deletions
diff --git a/www-apps/bareos-webui/Manifest b/www-apps/bareos-webui/Manifest
new file mode 100644
index 000000000000..4e81a3e6884b
--- /dev/null
+++ b/www-apps/bareos-webui/Manifest
@@ -0,0 +1,7 @@
+AUX apache.conf 1235 BLAKE2B ecc04426bc5d354579bfa404bfdddce09b4bc3621b5fbb2013ed684dca761750c7faeb2986e6c14eea913cfaec7e9a17f37c41c99cf33c4d684a153e1808117f SHA512 299cb11565547563833742df11f186a3596fc606b9582b4064417c6d280a75dadb083369e52c1660b0e3641e018d6f1f12950b65a92c4c13349f7aa8e9f8bac2
+AUX nginx.include 328 BLAKE2B a202780d56334cfe5c226300b88e40dd9e1490c97c852fee7ef984fa8676c1d6b0b6f3dc4b9d7b5b8bde41c3bc15d708ee28ac6574cafe56fbbe192cccaff48c SHA512 82e82397041da79f72ac316175689d981f935c5568fb6352ebdf666928963395b76bd65eeea4b6b09e755118b3e040ab82678fdd0b34e67cd44de0055d96a3dc
+AUX postinstall-en.txt 1318 BLAKE2B c5d4a74d67951bd9d3f9db677e7c526a29af108cab31a771e1623f425f1c0e4e16fca1ffc2f3cd7d8016a12fa87edab854002e5b513b07099128eb37d1cadc26 SHA512 0a1cddd68e6abba8e91d11d5ea32df18f71b64ef5f1dedcab3f5337b19fb272f05b289541da1117dac694f3d7ecb5b92d3bd3ccca96d7cbcbe3b9fad22b0ee37
+DIST bareos-22.1.2.tar.gz 14746158 BLAKE2B 5d8c9c098f61bd35b11f907a3e215a7c08b504c3e529c67a4c8c5cbbf24775158966800e63efca260b4cc513417332cdf43a158d21684f09be3d89dd93258880 SHA512 76d53425b2a28f4f7887b323a70bf9b37df44302e0e25aff7156c1b3ee26ffa60bbfb45ed29a0f2fe763d5c38b8f7135ac2a3e405d8e2b10717f4893baf9c327
+EBUILD bareos-webui-22.1.2.ebuild 2617 BLAKE2B d9c15bb7253fd131d61b7f83431dbac5bdbc00a25db27a5ed8caa1eed13f10a0050824b9351af699aa5bce6470a1427af01b70cc72ac10d667e6cf5361b6bcb2 SHA512 a7b0db05bef3819f706eb784f0a355197d5fed9eb8b5807da406a21d4a8cf0fcca0227ce1281db6d1dac4367b7863febc3f5d83587e41db1cc51aaf9595a56e0
+EBUILD bareos-webui-9999.ebuild 2617 BLAKE2B d9c15bb7253fd131d61b7f83431dbac5bdbc00a25db27a5ed8caa1eed13f10a0050824b9351af699aa5bce6470a1427af01b70cc72ac10d667e6cf5361b6bcb2 SHA512 a7b0db05bef3819f706eb784f0a355197d5fed9eb8b5807da406a21d4a8cf0fcca0227ce1281db6d1dac4367b7863febc3f5d83587e41db1cc51aaf9595a56e0
+MISC metadata.xml 328 BLAKE2B 47dda9d82b55f78bbf9b78f8ac463db48ede507dd62dfecd1fec01426e834f2669203956b0a5da31ae133bb0f362ab1263123318babf65abaa6619e1feb209f1 SHA512 c16ba92ff73595406f24c4f2cb18bb2059d7990273d2c91c4f83486f1349ab0ca3d709f27f929956987b60a24ff8426687dafc7f79be0d32df0a176ee2528d93
diff --git a/www-apps/bareos-webui/bareos-webui-22.1.2.ebuild b/www-apps/bareos-webui/bareos-webui-22.1.2.ebuild
new file mode 100644
index 000000000000..6d911f70e272
--- /dev/null
+++ b/www-apps/bareos-webui/bareos-webui-22.1.2.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_WARN_UNUSED_CLI=no
+CMAKE_MAKEFILE_GENERATOR="emake"
+
+inherit cmake webapp
+
+MY_PV=${PV/_/-}
+MY_PN="bareos"
+MY_P="${MY_PN}-${MY_PV}"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ S=${WORKDIR}/${PF}/webui
+ SRC_URI=""
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+else
+ S=${WORKDIR}/${MY_PN}-Release-${PV}/webui
+ SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/Release/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Featureful client/server network backup suite"
+HOMEPAGE="https://www.bareos.org/"
+RESTRICT="mirror"
+
+LICENSE="AGPL-3"
+
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-lang/php[bzip2,ctype,curl,fileinfo,filter,fpm,gd,iconv,intl,mhash,nls,pdo,postgres,session,simplexml,ssl,xml,xmlreader,xmlwriter,zip]
+ virtual/httpd-php
+"
+
+need_httpd
+
+pkg_setup() {
+ webapp_pkg_setup
+}
+
+src_prepare() {
+ # fix missing VERSION
+ sed -i "s/@BAREOS_FULL_VERSION@/${PV}/g" version.php.in || die
+
+ cmake_src_prepare
+ default
+}
+
+src_configure() {
+ if [[ ${PV} == 9999 ]]; then
+ pushd "${WORKDIR}/${PF}"
+ else
+ pushd "${S}"/..
+ fi
+ CURRENT_VERSION=$(echo $(cmake -P get_version.cmake) | sed 's/[- ]//g')
+ popd
+ local mycmakeargs=(
+ -DVERSION_STRING=${CURRENT_VERSION}
+ -Wno-dev
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc README.md doc/README-TRANSLATION.md
+
+ dodir /etc/bareos/bareos-dir.d
+ cp -r install/bareos/bareos-dir.d/* "${D}"/etc/bareos/bareos-dir.d
+
+ webapp_server_configfile nginx "${FILESDIR}"/nginx.include
+ webapp_server_configfile apache "${FILESDIR}"/apache.conf
+
+ insinto /etc/"${PN}"
+ doins install/{configuration,directors}.ini
+
+ insinto "${MY_HTDOCSDIR#${EPREFIX}}"
+ doins -r .
+
+ webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/config/application.config.php
+ webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/config/autoload/global.php
+
+ keepdir "${MY_HTDOCSDIR#${EPREFIX}}"/data
+ webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/data
+
+ # cleanup
+ find "${D}/${MY_HTDOCSDIR#${EPREFIX}}" -name "*.in" -delete
+ rm -rf "${D}/${MY_HTDOCSDIR#${EPREFIX}}"/{CMakeLists.txt,install,cmake,phpunit.xml,scripts,doc,tests}
+
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+
+ webapp_src_install
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "The webui uses 'webapp-config' to be installed to the webservers docroot"
+ einfo "E.g. to install webapp-config may be called like so:"
+ einfo ""
+ einfo " ~# webapp-config -h localhost -d bareos-webui -I bareos-webui ${PV}"
+ einfo ""
+ einfo "See 'man webapp-config' for details."
+ einfo ""
+}
diff --git a/www-apps/bareos-webui/bareos-webui-9999.ebuild b/www-apps/bareos-webui/bareos-webui-9999.ebuild
new file mode 100644
index 000000000000..6d911f70e272
--- /dev/null
+++ b/www-apps/bareos-webui/bareos-webui-9999.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_WARN_UNUSED_CLI=no
+CMAKE_MAKEFILE_GENERATOR="emake"
+
+inherit cmake webapp
+
+MY_PV=${PV/_/-}
+MY_PN="bareos"
+MY_P="${MY_PN}-${MY_PV}"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ S=${WORKDIR}/${PF}/webui
+ SRC_URI=""
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+else
+ S=${WORKDIR}/${MY_PN}-Release-${PV}/webui
+ SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/Release/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Featureful client/server network backup suite"
+HOMEPAGE="https://www.bareos.org/"
+RESTRICT="mirror"
+
+LICENSE="AGPL-3"
+
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-lang/php[bzip2,ctype,curl,fileinfo,filter,fpm,gd,iconv,intl,mhash,nls,pdo,postgres,session,simplexml,ssl,xml,xmlreader,xmlwriter,zip]
+ virtual/httpd-php
+"
+
+need_httpd
+
+pkg_setup() {
+ webapp_pkg_setup
+}
+
+src_prepare() {
+ # fix missing VERSION
+ sed -i "s/@BAREOS_FULL_VERSION@/${PV}/g" version.php.in || die
+
+ cmake_src_prepare
+ default
+}
+
+src_configure() {
+ if [[ ${PV} == 9999 ]]; then
+ pushd "${WORKDIR}/${PF}"
+ else
+ pushd "${S}"/..
+ fi
+ CURRENT_VERSION=$(echo $(cmake -P get_version.cmake) | sed 's/[- ]//g')
+ popd
+ local mycmakeargs=(
+ -DVERSION_STRING=${CURRENT_VERSION}
+ -Wno-dev
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc README.md doc/README-TRANSLATION.md
+
+ dodir /etc/bareos/bareos-dir.d
+ cp -r install/bareos/bareos-dir.d/* "${D}"/etc/bareos/bareos-dir.d
+
+ webapp_server_configfile nginx "${FILESDIR}"/nginx.include
+ webapp_server_configfile apache "${FILESDIR}"/apache.conf
+
+ insinto /etc/"${PN}"
+ doins install/{configuration,directors}.ini
+
+ insinto "${MY_HTDOCSDIR#${EPREFIX}}"
+ doins -r .
+
+ webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/config/application.config.php
+ webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/config/autoload/global.php
+
+ keepdir "${MY_HTDOCSDIR#${EPREFIX}}"/data
+ webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/data
+
+ # cleanup
+ find "${D}/${MY_HTDOCSDIR#${EPREFIX}}" -name "*.in" -delete
+ rm -rf "${D}/${MY_HTDOCSDIR#${EPREFIX}}"/{CMakeLists.txt,install,cmake,phpunit.xml,scripts,doc,tests}
+
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+
+ webapp_src_install
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "The webui uses 'webapp-config' to be installed to the webservers docroot"
+ einfo "E.g. to install webapp-config may be called like so:"
+ einfo ""
+ einfo " ~# webapp-config -h localhost -d bareos-webui -I bareos-webui ${PV}"
+ einfo ""
+ einfo "See 'man webapp-config' for details."
+ einfo ""
+}
diff --git a/www-apps/bareos-webui/files/apache.conf b/www-apps/bareos-webui/files/apache.conf
new file mode 100644
index 000000000000..60eea6e12fd0
--- /dev/null
+++ b/www-apps/bareos-webui/files/apache.conf
@@ -0,0 +1,50 @@
+#
+# Bareos WebUI Apache configuration file
+#
+
+# Environment Variable for Application Debugging
+# Set to "development" to turn on debugging mode or
+# "production" to turn off debugging mode.
+<IfModule env_module>
+ SetEnv "APPLICATION_ENV" "production"
+</IfModule>
+
+Alias /bareos-webui /var/www/localhost/htdocs/bareos-webui/public
+
+<Directory /var/www/localhost/htdocs/bareos-webui>
+
+ Options FollowSymLinks
+ AllowOverride None
+
+ <IfModule mod_authz_core.c>
+ <IfModule mod_access_compat.c>
+ Order deny,allow
+ </IfModule>
+ Require all granted
+ </IfModule>
+
+ #<IfModule mod_rewrite.c>
+ <IfModule rewrite_module>
+ RewriteEngine on
+ RewriteBase /bareos-webui
+ RewriteCond %{REQUEST_FILENAME} -s [OR]
+ RewriteCond %{REQUEST_FILENAME} -l [OR]
+ RewriteCond %{REQUEST_FILENAME} -d
+ RewriteRule ^.*$ - [NC,L]
+ RewriteRule ^.*$ index.php [NC,L]
+ </IfModule>
+
+ <IfDefine PROXY>
+ <FilesMatch "\.php$">
+ SetHandler "proxy:unix:/var/run/php-fpm/www.sock|fcgi://localhost"
+ </FilesMatch>
+
+ # Set it to handle the files
+ <IfModule mime_module>
+ AddHandler application/x-httpd-php .php .php5 .phtml
+ AddHandler application/x-httpd-php-source .phps
+ </IfModule>
+
+ DirectoryIndex index.php index.phtml
+ </IfDefine>
+</Directory>
diff --git a/www-apps/bareos-webui/files/nginx.include b/www-apps/bareos-webui/files/nginx.include
new file mode 100644
index 000000000000..2d6ab2978ba1
--- /dev/null
+++ b/www-apps/bareos-webui/files/nginx.include
@@ -0,0 +1,17 @@
+server {
+
+ listen 9100;
+ server_name bareos;
+ root /var/www/localhost/htdocs/bareos-webui/public;
+
+ location / {
+ index index.php;
+ try_files $uri $uri/ /index.php?$query_string;
+ }
+
+ location ~ .php$ {
+ snippets/fastcgi-php.conf
+ fastcgi_pass unix:/var/run/php5-fpm.sock;
+ fastcgi_param APPLICATION_ENV production;
+ }
+}
diff --git a/www-apps/bareos-webui/files/postinstall-en.txt b/www-apps/bareos-webui/files/postinstall-en.txt
new file mode 100644
index 000000000000..cd8b10f3b530
--- /dev/null
+++ b/www-apps/bareos-webui/files/postinstall-en.txt
@@ -0,0 +1,36 @@
+1. Edit webui ini files
+
+ - if your bareos-dir is not running on localhost you need
+ to edit /etc/bareos-webui/directors.ini
+
+ - maybe you want to edit the webui settings in
+ /etc/bareos-webui/configuration.ini
+
+ NOTE: If you want to run more than one instance of bareos-webui and
+ you need to use different ini-files per vhost you can set
+ BAREOS_WEBUI_CONFDIR in the webserver env to point to another
+ directory than /etc/bareos-webui.
+
+2. Edit bareos-dir configuration
+
+ - some required bareos-dir config snippets have been installed
+ to /etc/bareos/bareos-dir.d. You need at least to
+ cp /etc/bareos/bareos-dir.d/console/admin.conf{.example,}
+ and edit /etc/bareos/bareos-dir.d/console/admin.conf to set
+ login credentials for webui login
+
+ - don't forget to reload bareos-dir
+
+3. Edit webserver configuration
+
+ - starting from bareos 23, using php-fpm is a requirement
+ so be sure to have a working php-fpm setup
+
+ - as a starting point you may include a config from
+ /usr/share/webapps/${PN}/${PVR}/conf
+
+ - IMPORTANT: make sure the docroot of your webserver points to
+ the public/ folder within webapp htdocs directory
+
+For more details about how to setup the bareos webui, see:
+https://docs.bareos.org/IntroductionAndTutorial/InstallingBareosWebui.html
diff --git a/www-apps/bareos-webui/metadata.xml b/www-apps/bareos-webui/metadata.xml
new file mode 100644
index 000000000000..4a5a7ed6d64f
--- /dev/null
+++ b/www-apps/bareos-webui/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">bareos/bareos</remote-id>
+ </upstream>
+</pkgmetadata>