Created attachment 202278 [details]
APACHEMOD option default to off
When trying a pkg install librenms it pulls in apache.
I don't think this is the right call or dependency for librenms.
It is true one needs a web server to make the application work although NGINX is another perfect candidate.
My question is, could we make APACHEMOD default to off maybe even considering removing the option all together? Installing apache is as easy as pkg install apache24 and pkg install php_mod. Same for NGINX after intalling librenms, pkg install ... :) while it is quiet ugly that apache is installed when I want to use NGINX using packages.
Thanks for considering.
If we set this off, should we also provide an Nginx option? if so, what?
If we set this off, that's going to break POLA for some people.
Well, my 2 cents, I think that we should not even provide a web server options. Because it is as easy as "pkg install 'web server I want'". This way, all the flexibility is at the users hand. You are right that this will break POLA for the people using LibreNMS with Apache. And I also have no clear path forward. At least it will require an UPDATING entry. Maybe get some buy-in from portmgr and see what they think about this?
This is the solution I will proceed with:
* remove references to apache and mod_php from Makefile
* add this entry to UPDATING:
AFFECTS: users of net-mgmt/librenms
1. Apache / mod_php options removed
The APACHEMOD option has been removed. LibreNMS can be used
with other webservers, not just Apache. In other to simplify
the port, the option was removed.
Now you manually install the webserver of your preference.
If upgrading from LibreNMS < 1.61, you can do this to
prevent 'pkg autoremove' from uninstalling Apache / mod_php:
$ sudo pkg set -A 0 apache24 mod_php74
Mark apache24-2.4.41 as not automatically installed? [y/N]: y
Mark mod_php74-7.4.3 as not automatically installed? [y/N]: y
Adjust mod_php74 to suit the version of mod_php you have.
2. include/defaults.inc.php is gone
The file include/defaults.inc.php is no longer distributed by
the upstream project. The FreeBSD port patched this file to
correct the paths to common tools such as ping, snmpwalk, etc.
These values previously adjusted by the port must now be specified
in config.php. New installs will have this automatically, but existing
installs must be updated manually. These are the entries you should
add if upgrading from LibreNMS < 1.61:
$config['snmpwalk'] = '/usr/local/bin/snmpwalk';
$config['snmpget'] = '/usr/local/bin/snmpget';
$config['snmpbulkwalk'] = '/usr/local/bin/snmpbulkwalk';
$config['snmptranslate'] = '/usr/local/bin/snmptranslate';
$config['ping'] = '/sbin/ping';
$config['mtr'] = '/usr/local/bin/mtr';
$config['nmap'] = '/usr/local/bin/nmap';
$config['nagios_plugins'] = '/usr/local/libexec/nagios';
$config['ipmitool'] = '/usr/local/bin/ipmitool';
$config['virsh'] = '/usr/local/bin/virsh';
$config['dot'] = '/usr/local/bin/dot';
$config['sfdp'] = '/usr/local/bin/sfdp';
$config['nfdump'] = '/usr/local/bin/nfdump';
I like it! This completely reflects what I meant.
Thank you for picking this up.
Minor remark: In other/s/order to simplify (I think)
A commit references this bug:
Date: Tue Mar 3 16:25:34 UTC 2020
New revision: 527681
Update to 1.61
While here, adjust the webserver options (see PR)
NOTE: upgrading existing installations will break unless you read UPGRADING
and follow the instructions.
* Apache / mod_php is no longer an option
* config.php needs entries added manually
We are jumping a few versions here:
Submitted by: Dries Michiels <email@example.com>