Bug 255330 - net-mgmt/observium: make install fails if APACHEMOD is not set
Summary: net-mgmt/observium: make install fails if APACHEMOD is not set
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mark Felder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-22 15:57 UTC by x0r+freebsd
Modified: 2021-04-22 15:57 UTC (History)
0 users

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


Attachments
Patch proposal for fixing the issue (1009 bytes, patch)
2021-04-22 15:57 UTC, x0r+freebsd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description x0r+freebsd 2021-04-22 15:57:40 UTC
Created attachment 224357 [details]
Patch proposal for fixing the issue

I was trying to install net-mgmt/observium version 0.19.8_1 from ports, with APACHEMOD disabled as I am running an nginx-based setup. However, in that case, make install fails with the following output:

===>  Installing for observium-php74-0.19.8_1
===>  Checking if observium-php74 is already installed
===>   Registering installation for observium-php74-0.19.8_1
pkg-static: Unable to access file /usr/ports/net-mgmt/observium/work-php74/stage/Includes/observium.conf.sample:No such file or directory
pkg-static: Fail to apply keyword 'sample'
*** Error code 1

Stop.                                                                                                                                                                                                                                                                                         
make[1]: stopped in /usr/ports/net-mgmt/observium
*** Error code 1

Stop.
make: stopped in /usr/ports/net-mgmt/observium                                                                                                 

The port also tries to install observium.conf.sample into ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes, even though this file only makes sense for Apache setups. In my case, ${APACHEETCDIR} is unset and the sample file would be installed in /usr/local/Includes.

The problem can be fixed by surrounding the installation of Apache-specific files with .if ${PORT_OPTIONS:MAPACHEMOD} ... .endif.

I have attached a patch that fixes the build in this particular case.