Bug 253252 - www/bareos-webui Package overwrites user-modifiable config
Summary: www/bareos-webui Package overwrites user-modifiable config
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-04 16:20 UTC by Vadim Belman
Modified: 2021-02-19 18:57 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (acm)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Belman 2021-02-04 16:20:54 UTC
The package unconditionally overwrites /usr/local/etc/apache24/Includes/apache-bareos-webui.conf, ignoring any hand-made changes in it. Why? The problem is not only the same file been installed in both /usr/local/etc/bareos and /usr/local/etc/apache24/Includes, but that it gets overriden in both locations too!

Aside of that, if you install all webui files under /usr/local/www/bareos then what's the problem have this path be the default in the config file? If you install configs under /usr/local/etc/bareos, including directors.ini – why www/bareos/config/autoload/global.php points to /usr/local/etc/bareos-webui/directors.ini?

I'm doing all my best not to get too personal here........
Comment 1 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2021-02-04 16:49:51 UTC
(In reply to Vadim Belman from comment #0)
Hi bareos-webui doesn't overwrite/install files into /usr/local/etc/apache24 directory. It installs files into /usr/local/etc/bareos[-webui]. Take a look at pkg-plist file

>Aside of that, if you install all webui files under /usr/local/www/bareos then >what's > >the problem have this path be the default in the config file?

because it is the right way to do that? I don't see any problem with that

> If you >install configs under /usr/local/etc/bareos, including directors.ini > why >www/bareos/config/autoload/global.php points to /usr/local/etc/bareos->webui/directors.ini?

it was a mistake on install time. I'll try fix it asap

>I'm doing all my best not to get too personal here........

I don't understand well what do you want to said with it, but I guess it is fine
Comment 2 Vadim Belman 2021-02-04 21:00:46 UTC
(In reply to Jose Alonso Cardenas Marquez from comment #1)
> bareos-webui doesn't overwrite/install files into /usr/local/etc/apache24 directory.

Not event the post-install script? Anyway, I took some measures to prevent this kind of problem to happen again. And since I wouldn't be able to test it, for simplicity, let's assume it was my fault of a kind.

> because it is the right way to do that?

No doubt. My point was the discrepancy, not the wrong destination. :) And the discrepancy is in apache-bareos-webui.conf where Alias and Directory directives point to /usr/share/bareos-webui, which is the Linux default, if memory serves me right.

And ignore my comment about being "too personal", I apologize for it. Too many things went wrong this day, including the webui (when all the paths are fixed) failing with "Trying to access array offset on value of type null" error in logs. The problems with bareos packages was just the last straw.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-02-19 18:56:44 UTC
A commit references this bug:

Author: acm
Date: Fri Feb 19 18:56:24 UTC 2021
New revision: 566092
URL: https://svnweb.freebsd.org/changeset/ports/566092

Log:
  - Fix installation path of webui configuration files
  - Remove some obsolete files from pkg-list files
  - Modify pkg-message file

  PR:		253252
  Reported by:	vrurg at lflat.org

Changes:
  head/www/bareos-webui/Makefile
  head/www/bareos-webui/files/pkg-message.in
  head/www/bareos-webui/pkg-plist
  head/www/bareos19-webui/Makefile
  head/www/bareos19-webui/files/pkg-message.in
  head/www/bareos19-webui/pkg-plist
Comment 4 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2021-02-19 18:57:59 UTC
- I have fixed installation path of ini files and some another changes. Thanks for your PR