Make nagios start up out of the box again after 'pkg_add nagios'.

Executables were installed mode 774 owned by root:bin. We need to use
mode 775 (o+x), otherwise nagios which runs as user _nagios complains:
  Error: failed to access() /usr/local/bin/nagios: Permission denied
  Error: Spawning workers will be impossible. Aborting.

Solution discussed and found together with sthen and tb.
ok sthen@ tb@
This commit is contained in:
stsp 2021-05-02 19:30:58 +00:00
parent 478b147d84
commit 23b8230145
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.88 2021/02/24 16:49:01 sthen Exp $
# $OpenBSD: Makefile,v 1.89 2021/05/02 19:30:58 stsp Exp $
ONLY_FOR_ARCHS= ${LP64_ARCHS} # time_t format string issues
@ -6,6 +6,7 @@ COMMENT-main= host and service monitor
COMMENT-web= cgis and webpages for nagios
V= 4.4.6
REVISION= 0
DISTNAME= nagios-$V
PKGNAME-main= nagios-$V
PKGNAME-web= nagios-web-$V
@ -87,7 +88,6 @@ EXDIR= ${PREFIX}/share/examples/nagios
SAMPLEDIR= ${WRKSRC}/sample-config
MODSAMPLE= ${WRKINST}${PREFIX-web}/conf/modules.sample
INSTALL_TARGET= install-unstripped
SUBST_VARS= CHROOT
.if ${FLAVOR:Mchroot}

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-base_Makefile_in,v 1.7 2021/02/24 13:05:14 sthen Exp $
$OpenBSD: patch-base_Makefile_in,v 1.8 2021/05/02 19:30:59 stsp Exp $
Index: base/Makefile.in
--- base/Makefile.in.orig
@ -10,7 +10,7 @@ Index: base/Makefile.in
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) -s -m 774 $(INSTALL_OPTS) @nagios_name@ $(DESTDIR)$(BINDIR)
- $(INSTALL) -s -m 774 $(INSTALL_OPTS) @nagiostats_name@ $(DESTDIR)$(BINDIR)
+ $(BSD_INSTALL_PROGRAM) @nagios_name@ $(DESTDIR)$(prefix)/sbin
+ $(BSD_INSTALL_PROGRAM) @nagios_name@ $(DESTDIR)$(prefix)/bin
+ $(BSD_INSTALL_PROGRAM) @nagiostats_name@ $(DESTDIR)$(BINDIR)
install-unstripped: