Need ebuild for www-apps/bareos-webui-19.2.7 In attach mostly work ebuild Reproducible: Always
Created attachment 640616 [details] bareos-webui-19.2.7.ebuild
*** Bug 724582 has been marked as a duplicate of this bug. ***
Created attachment 641666 [details] bareos-webui-9999.ebuild
Created attachment 642902 [details] bareos-webui-9999.ebuild
Fix version for bareos-webui-9999.ebuild Vith wrong version unable login toweb interface
Thank you ver much for the ebuilds! I am working on it and will add them (slightly tuned) to the tree soon.
What's the status of this ticket? I searched for bareos-webui and ended up on an overlay repository. Then I found this ticket which states this build will be included in the main repository. I searched in the main gentoo repositories and I find nothing. Did the inclusion never happen or am I missing something?
(In reply to Plüss Roland from comment #7) > What's the status of this ticket? I searched for bareos-webui and ended up > on an overlay repository. Then I found this ticket which states this build > will be included in the main repository. I searched in the main gentoo > repositories and I find nothing. Did the inclusion never happen or am I > missing something? Granted, this took way too long. Sorry for that, but there are some reasons for it. That being said, now it will work and I will have a look and add webui package for the current version of bareos (+ the 9999 version) very soon
I maintain a version in my repository https://github.com/inode64/inode64-overlay/tree/main/www-apps/bareos-webui
(In reply to INODE64 Sistemas from comment #9) > I maintain a version in my repository > > https://github.com/inode64/inode64-overlay/tree/main/www-apps/bareos-webui Thanks! I will have a look a see what I can merge from it to improve thew new ebuild
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee05fd6e5dabc192452af2f91ba49c2797d29115 commit ee05fd6e5dabc192452af2f91ba49c2797d29115 Author: Marc Schiffbauer <mschiff@gentoo.org> AuthorDate: 2023-12-05 14:51:29 +0000 Commit: Marc Schiffbauer <mschiff@gentoo.org> CommitDate: 2023-12-05 14:52:19 +0000 www-apps/bareos-webui: new package, add 22.1.0, 9999 Closes: https://bugs.gentoo.org/724390 Signed-off-by: Marc Schiffbauer <mschiff@gentoo.org> www-apps/bareos-webui/Manifest | 1 + www-apps/bareos-webui/bareos-webui-22.1.0.ebuild | 110 +++++++++++++++++++++++ www-apps/bareos-webui/bareos-webui-9999.ebuild | 110 +++++++++++++++++++++++ www-apps/bareos-webui/files/apache.conf | 50 +++++++++++ www-apps/bareos-webui/files/nginx.include | 17 ++++ www-apps/bareos-webui/files/postinstall-en.txt | 36 ++++++++ www-apps/bareos-webui/metadata.xml | 11 +++ 7 files changed, 335 insertions(+)
I can emerge the package now but it is not working. It shows an empty web page with only a single text field with the content "localhost-dir" and nothing else. The web console contains these warnings: This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”. bareos-webui Cookie “bareos” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite bareos-webui InstallTrigger is deprecated and will be removed in the future.
(In reply to Plüss Roland from comment #12) > I can emerge the package now but it is not working. It shows an empty web > page with only a single text field with the content "localhost-dir" and > nothing else. The web console contains these warnings: > > This page is in Quirks Mode. Page layout may be impacted. For Standards Mode > use “<!DOCTYPE html>”. > bareos-webui > Cookie “bareos” does not have a proper “SameSite” attribute value. Soon, > cookies without the “SameSite” attribute or with an invalid value will be > treated as “Lax”. This means that the cookie will no longer be sent in > third-party contexts. If your application depends on this cookie being > available in such contexts, please add the “SameSite=None“ attribute to it. > To know more about the “SameSite“ attribute, read > https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite > bareos-webui > InstallTrigger is deprecated and will be removed in the future. Please make sure you used webapp-config to actually install an instance for the webui and followed the instructions given after that. I tested it that way and it worked without any issues using apache with php-fpm. Can you give some details about your webserver and php-fpm config etc.?
php-fpm I never required nor used for anything. It is the default after emerging. I looked at the config but I see nothing special. I used webapp-config but it copied the files to the a wrong directory "htdocs" or something like this. I moved the directory to the correct location manually (inside "http"/server-name). I updated the apache config accordingly. I do get now the login screen and I can log in but then I get a 404 since the URL ".../bareos-webgui/dashboard" does not exist. I checked the files installed by webapp-config and such a directory or file does not exists. Webserver is apache2 and is a multi-host server with around 8 or so different server names hosted on the same IP. The apache config contains now this (copied from the apache conf file inside /etc/bareos-webui): <Directory "/var/www/http/XXX/admin/bareos-webui/public"> Options FollowSymLinks AllowOverride None RewriteEngine on RewriteBase /admin/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 mod_php5.c> php_flag magic_quotes_gpc off php_flag register_globals off </IfModule> </Directory> As mentioned php-fpm I did not touch. It is thouch just contained commented out lines as per default.
(In reply to Plüss Roland from comment #14) > php-fpm I never required nor used for anything. It will be mandatory for bareos >=23 (at least upstream writes it in the docs) > It is the default after > emerging. I looked at the config but I see nothing special. please make sure, that a php testpage is working before proceeding installing bareos-webui. A working apache with php via fpm is out of scope here > > I used webapp-config but it copied the files to the a wrong directory > "htdocs" or something like this. Why is this wrong? Its default for all webapp-config based packages I think > I moved the directory to the correct > location manually (inside "http"/server-name). I updated the apache config > accordingly. I would recommend not moving things around manually here or I would expect even more breakage > I do get now the login screen and I can log in but then I get a 404 since > the URL ".../bareos-webgui/dashboard" does not exist. I checked the files > installed by webapp-config and such a directory or file does not exists. see above > > Webserver is apache2 and is a multi-host server with around 8 or so > different server names hosted on the same IP. Ok, and you can use webapp-config to let it install all required file sinto the correct location for you > > The apache config contains now this (copied from the apache conf file inside > /etc/bareos-webui): There should be no apache conf in /etc/bareos-webui. Maybe this is an old file you had from a previous install? > > <Directory "/var/www/http/XXX/admin/bareos-webui/public"> > Options FollowSymLinks > AllowOverride None > > RewriteEngine on > RewriteBase /admin/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 mod_php5.c> > php_flag magic_quotes_gpc off > php_flag register_globals off > </IfModule> > </Directory> The above is not a correct apache config for using php-fpm > > As mentioned php-fpm I did not touch. It is thouch just contained commented > out lines as per default. Please have a look at /usr/share/webapps/bareos-webui/22.1.2/conf/apache-apache.conf
I managed now to get it working somehow, what goes for the webpage. But it is still not working correctly. When I go to "bareos-webui/director/messages" I see messages of all the recently run jobs. But if I go to "bareos-webui/job//" everything is empty. Also storage devices, files, backups, nothing is found. The only thing that works is the director messages page.
(In reply to Plüss Roland from comment #16) > I managed now to get it working somehow, what goes for the webpage. But it > is still not working correctly. When I go to > "bareos-webui/director/messages" I see messages of all the recently run > jobs. But if I go to "bareos-webui/job//" everything is empty. Also storage > devices, files, backups, nothing is found. The only thing that works is the > director messages page. I cannot reproduce this here. Everythign is working fine. Sounds like an ACL problem you have there. Did you reload the bareos-dir and is it really using the config snippets that came with the bareos-webui package? (most important: /etc/bareos/bareos-dir.d/profile/webui-admin.conf) If this is all ok I think its beyond the scope of this package and this bug
The permissions are fine. It's just that all the listings show empty lists although there are jobs, volumes, backups and more.
Okay, the problem is that bareos-webui requires Header set Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval' domain *.domain" In the apache configuration. If not present all listings are empty. This is not mentioned in the documentation nor in the apache config file installed by this ebuild.
I found another CPS config required. Without "blob: data:" file listings as in the backup jobs are also not working. The full line required is thus: Header set Content-Security-Policy "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: domain *.domain"
(In reply to Plüss Roland from comment #20) > I found another CPS config required. Without "blob: data:" file listings as > in the backup jobs are also not working. The full line required is thus: > > Header set Content-Security-Policy "script-src 'self' 'unsafe-inline' > 'unsafe-eval' blob: data: domain *.domain" Thanks for the feedback. But why did my firefox not complain? Maybe its because I was only using localhost through a SSH tunnel