Bug 235949 - net-mgmt/librenms reconsider default options
Summary: net-mgmt/librenms reconsider default options
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dan Langille
Depends on:
Reported: 2019-02-22 23:18 UTC by Dries Michiels
Modified: 2020-03-03 16:27 UTC (History)
1 user (show)

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

APACHEMOD option default to off (811 bytes, patch)
2019-02-22 23:18 UTC, Dries Michiels
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dries Michiels 2019-02-22 23:18:44 UTC
Created attachment 202278 [details]
APACHEMOD option default to off

Hi guys,

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.
Comment 1 Dan Langille freebsd_committer 2019-07-26 23:59:13 UTC
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.
Comment 2 Dries Michiels 2019-07-27 09:30:31 UTC
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?
Comment 3 Dan Langille freebsd_committer 2020-03-03 15:44:30 UTC
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
  AUTHOR: dvl@FreeBSD.org

  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';
Comment 4 Dries Michiels 2020-03-03 15:52:04 UTC
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)
Comment 5 commit-hook freebsd_committer 2020-03-03 16:26:02 UTC
A commit references this bug:

Author: dvl
Date: Tue Mar  3 16:25:34 UTC 2020
New revision: 527681
URL: https://svnweb.freebsd.org/changeset/ports/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.

  In short:

  * Apache / mod_php is no longer an option
  * config.php needs entries added manually

  We are jumping a few versions here:

  * https://github.com/librenms/librenms/releases/tag/1.61
  * https://github.com/librenms/librenms/releases/tag/1.60
  * https://github.com/librenms/librenms/releases/tag/1.59
  * https://github.com/librenms/librenms/releases/tag/1.58.1
  * https://github.com/librenms/librenms/releases/tag/1.58

  PR:		235949
  Submitted by:	Dries Michiels <driesm.michiels@gmail.com>

Comment 6 Dan Langille freebsd_committer 2020-03-03 16:27:26 UTC
Thank you.