Page 1 of 1

Re: [Nagios-devel] Nagios build patch

Posted: Wed Jun 26, 2002 7:22 am
by Guest
This is a multi-part message in MIME format.
--------------050603040805060009020803
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Wow, mozilla sure chose a goofy mime type for that last attachment.
I've reattached it with an explicit extension so as not to confuse your
mail client :).

Incidentally, this is a *really* quiet list. Anybody out there?

-- Lars

> The attached patch makes the following changes to Nagios (CVS current as
> of Tue Jun 25 22:25:23 EDT 2002):
>
> (1) Modifies install targets to strip binaries *after* installing them.
> This allows one to run 'make install' as root after building Nagios as
> an unprivileged user in an NFS mounted filesystem (where root generally
> has no write privileges).
>
> (2) Modifies the configure.in script to search for the 'strip' binary.
>
> (3) Adds some missing quotes in configure.in that were causing autoconf
> (2.52) to complain.

--------------050603040805060009020803
Content-Type: text/plain;
name="nagios-build-patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nagios-build-patch.txt"

diff -ruN nagios-20.Jun.2002/Makefile.in nagios-20.Jun.2002-fixed/Makefile.in
--- nagios-20.Jun.2002/Makefile.in Thu Jun 20 11:31:21 2002
+++ nagios-20.Jun.2002-fixed/Makefile.in Thu Jun 20 13:34:40 2002
@@ -149,6 +149,7 @@
install-init: install-daemoninit

install-daemoninit:
+ $(INSTALL) -m 755 -d $(INIT_OPTS) $(DESTDIR)$(INIT_DIR)
$(INSTALL) -m 774 $(INIT_OPTS) daemon-init $(DESTDIR)$(INIT_DIR)/nagios

install-commandmode:
diff -ruN nagios-20.Jun.2002/base/Makefile.in nagios-20.Jun.2002-fixed/base/Makefile.in
--- nagios-20.Jun.2002/base/Makefile.in Thu Jun 20 11:31:22 2002
+++ nagios-20.Jun.2002-fixed/base/Makefile.in Thu Jun 20 13:34:40 2002
@@ -24,6 +24,7 @@
INSTALL=@INSTALL@
INSTALL_OPTS=@INSTALL_OPTS@
COMMAND_OPTS=@COMMAND_OPTS@
+STRIP=@STRIP@

CGIURL=@cgiurl@
HTMURL=@htmurl@
@@ -101,8 +102,8 @@
devclean: clean

install:
- strip nagios
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
$(INSTALL) -m 774 $(INSTALL_OPTS) nagios $(DESTDIR)$(BINDIR)
+ $(STRIP) $(DESTDIR)$(BINDIR)/nagios


diff -ruN nagios-20.Jun.2002/cgi/Makefile.in nagios-20.Jun.2002-fixed/cgi/Makefile.in
--- nagios-20.Jun.2002/cgi/Makefile.in Thu Jun 20 11:31:22 2002
+++ nagios-20.Jun.2002-fixed/cgi/Makefile.in Thu Jun 20 13:34:40 2002
@@ -19,6 +19,7 @@
INSTALL=@INSTALL@
INSTALL_OPTS=@INSTALL_OPTS@
COMMAND_OPTS=@COMMAND_OPTS@
+STRIP=@STRIP@

CGIEXTRAS=@CGIEXTRAS@

@@ -154,9 +155,10 @@
devclean: clean

install:
- strip *.cgi
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR)
- for file in *.cgi; \
- do $(INSTALL) -m 775 $(INSTALL_OPTS) $$file $(DESTDIR)$(CGIDIR); done
+ for file in *.cgi; do \
+ $(INSTALL) -m 775 $(INSTALL_OPTS) $$file $(DESTDIR)$(CGIDIR); \
+ $(STRIP) $(DESTDIR)$(CGIDIR)/$$file; \
+ done


diff -ruN nagios-20.Jun.2002/configure.in nagios-20.Jun.2002-fixed/configure.in
--- nagios-20.Jun.2002/configure.in Thu Jun 20 11:31:22 2002
+++ nagios-20.Jun.2002-fixed/configure.in Thu Jun 20 13:34:40 2002
@@ -16,6 +16,7 @@
dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
+AC_PATH_PROG([STRIP], [strip], [true])

dnl Checks for header files.
AC_HEADER_STDC
@@ -493,10 +494,10 @@
[ac_save_LIBS="$LIBS"
LIBS="-l$1 $6 $LIBS"
AC_TRY_LINK(dnl
- ifelse(AC_LANG, [FORTRAN77], ,
+ ifelse([AC_LANG], [FORTRAN77], ,
ifelse([$2], [main], , dnl Avoid conflicting decl of main.
[/* Override any gcc2 internal prototype to avoid an error. */
-]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+]ifelse([AC_LANG], CPLUSPLUS, [#ifdef __cplusplus
extern "C"
#endif
])dnl

--------------050603040805060009020803--






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: lars@deas.harvard.edu