patches to make argus 3.0 RC 21 compile under NetBSD pkgsrc

Carter Bullard carter at qosient.com
Fri Aug 18 10:35:24 EDT 2006


Hey Christoph,
    Thanks, I've incorporated all your suggestions, and assuming I  
didn't
mess up, they should be in the rc.26 code that I'll put up either  
today, or
early next week.  Sorry if I missed anything.   I don't use patch to  
make
the changes, I do them all by hand (that way I can review, etc, and
prevent something from slipping in that shouldn't be there), so if I  
missed
something, not intentional!!!

Thanks greatly!!!!!!!

Carter


On Aug 15, 2006, at 6:29 PM, Christoph Badura wrote:

> Carter,
>
> yes, I did have problems with 'empty lines" in the Makefile command  
> lines.
> Some of the commands weren't executed.  When I saw the empty lines  
> I figured
> that must be a non-standard GNU-make extension and told the package  
> system
> to use GNU-make instead of the system make, but that only went so far.
> So I figured I'd rather spend 15 minutes once to get rid of the non- 
> standard
> empty lines and solve the problem for good, GNU-make or not, rather  
> than
> having to waste time debugging the Makefiles until kingdom come.
>
> I dunno why you say "until 6 years ago". SUSv3 states that empty or  
> blank
> lines separating command lines in Makefiles cannot be depended on  
> to not
> start a new entry.
>
> Thanks for incorporating some of the patches, though!  However,  
> some of that
> wasn't done correctly.
>
> In configure you still add -lnsl to LIBS when libwrap has been  
> detected
> and the OS is linux.  If it is only needed for libwrap it should be  
> added
> to V_WRAPDEP as adding random libraries to LIBS can cause compiling
> conftest to fail.
>
> In the radium Makefile you still have:
>
> radium: radium.o $(LIB)
>
> Well, LIB can't contain -lwrap or -lnsl because those files don't  
> exist
> in that directory and there are no instructions on how to make  
> them, so
> that will allways fail for a system that comes with a pre-installed
> libwrap.
>
> I have cleaned up the use of MFLAGS in the argus Makefile.in, too.
> Shouldn't that be MAKEFLAGS, though? A standard make(1) doesn't know
> about MFLAGS and the variable isn't initialized anywhere...
>
> Below are my current patch sets against RC25 for the two pkgsrc  
> packages.
>
> Cheers,
> --chris
>
> $NetBSD$
>
> --- Makefile.in.orig	2006-08-10 17:38:13.000000000 +0200
> +++ Makefile.in
> @@ -51,7 +51,7 @@ DISTFILES = COPYING ChangeLog INSTALL MA
>  .c.o:
>  	$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
>
> -.PHONY: install installdirs
> +.PHONY: install installdirs all
>
>  all: force
>  	@-for d in $(DIRS); \
> @@ -60,34 +60,24 @@ all: force
>  			$(MAKE) $(MFLAGS) ;\
>  			echo "### Done with" `pwd`);\
>  	done
> -.PHONY: all
>
>  install:  force
> -	${MAKE} installdirs
> +	$(MAKE) installdirs
>  	[ -d $(DESTDIR)@prefix@ ] || \
>  		(mkdir -p $(DESTDIR)@prefix@; chmod 755 $(DESTDIR)@prefix@)
> -
> -	[ -d $(DESTDIR)@sbindir@ ] || \
> -		(mkdir -p $(DESTDIR)@sbindir@; chmod 755 $(DESTDIR)@sbindir@)
> -
>  	[ -d $(DESTDIR)@bindir@ ] || \
>  		(mkdir -p $(DESTDIR)@bindir@; chmod 755 $(DESTDIR)@bindir@)
> -
>  	[ -d $(DESTDIR)$(exec_prefix)/argus ] || \
>  		(mkdir -p $(DESTDIR)$(exec_prefix)/argus; chmod 755 $(DESTDIR)$ 
> (exec_prefix)/argus)
> -
>  	[ -d $(DESTDIR)$(exec_prefix)/argus/archive ] || \
>  		(mkdir -p $(DESTDIR)$(exec_prefix)/argus/archive; chmod 755 $ 
> (DESTDIR)$(exec_prefix)/argus/archive)
> -
>  	@-for d in $(INSTDIRS); \
>  	do \
>  		(cd $$d; echo "### Make install in" `pwd`;    \
>  			$(MAKE) $(MFLAGS) install;    \
>  			echo "### Done with" `pwd`);            \
>  	done
> -
>  	$(INSTALL) -m 0755 $(srcdir)/bin/argusbug $(DESTDIR)@bindir@/ 
> argusbug
> -
>  	[ -d $(DESTDIR)@mandir@ ] || \
>  		(mkdir -p $(DESTDIR)@mandir@; chmod 755 $(DESTDIR)@mandir@)
>  	[ -d $(DESTDIR)@mandir@/man5 ] || \
> @@ -98,37 +88,33 @@ install:  force
>  	$(INSTALL) -m 0644 $(srcdir)/man/man8/argus.8 $(DESTDIR)@mandir@/ 
> man8/argus.8
>
>  install-doc:  force
> -	${MAKE} installdirs
> +	$(MAKE) installdirs
>  	[ -d $(DESTDIR)@prefix@ ] || \
>  		(mkdir -p $(DESTDIR)@prefix@; chmod 755 $(DESTDIR)@prefix@)
> -
>  	[ -d $(DESTDIR)$(docdir) ] || \
>  		(mkdir -p $(DESTDIR)$(docdir); chmod 755 $(DESTDIR)$(docdir))
> -
>  	$(INSTALL) -m 0644 $(srcdir)/doc/FAQ $(DESTDIR)$(docdir)
> +	$(INSTALL) -m 0644 $(srcdir)/doc/CHANGES $(DESTDIR)$(docdir)
>  	$(INSTALL) -m 0644 $(srcdir)/doc/HOW-TO $(DESTDIR)$(docdir)
> -
>  	$(INSTALL) -m 0644 $(srcdir)/README $(DESTDIR)$(docdir)
>  	$(INSTALL) -m 0644 $(srcdir)/COPYING $(DESTDIR)$(docdir)
>
> -
>  uninstall:
>  	rm -f $(DESTDIR)@mandir@/man5/argus.5
>  	rm -f $(DESTDIR)@mandir@/man5/argus.conf.5
>  	rm -f $(DESTDIR)@mandir@/man8/argus.8
> -
>  	rm -rf $(DESTDIR)$(docdir)
> -
> -	@for i in  $(DIRS) ; do \
> +	@for i in  $(INSTDIRS) ; do \
>  		if [ -d $$i ] ; then \
>  		cd $$i; \
> -		${MAKE} uninstall; \
> +		$(MAKE) $(MFLAGS) uninstall; \
>  		cd ..; \
>  		fi; \
>  	done
>
>  installdirs:
> -	${srcdir}/config/mkinstalldirs $(bindir) $(infodir)
> +	${srcdir}/config/mkinstalldirs $(bindir) $(mandir) $(docdir) \
> +		$(exec_prefix)/argus/archive
>
>  Makefile: Makefile.in config.status
>  	$(SHELL) config.status
> @@ -181,7 +167,7 @@ depend: force
>  	@for i in $(DIRS) ; do \
>  		if [ -d $$i ] ; then \
>  		cd $$i; \
> -		${MAKE} depend || exit 1; \
> +		$(MAKE) $(MFLAGS) depend || exit 1; \
>  		cd ..; \
>  		fi; \
>  	done
> $NetBSD$
>
> --- argus/Makefile.in.orig	2006-08-10 17:38:37.000000000 +0200
> +++ argus/Makefile.in
> @@ -33,6 +33,7 @@ srcdir = @srcdir@
>  VPATH = @srcdir@
>
>  COMPATLIB = @COMPATLIB@
> +WRAPLIBS = @WRAPLIBS@
>
>  #
>  # You shouldn't need to edit anything below.
> @@ -77,7 +78,7 @@ PROG =	@INSTALL_BIN@/argus
>
>  OBJ =	$(SRC:.c=.o)
>
> -LIB = @LIBS@ @WRAPLIBS@ $(COMPATLIB) ../lib/argus_common.a -lm
> +LIB = @LIBS@ $(WRAPLIBS) $(COMPATLIB) ../lib/argus_common.a -lm
>
>  HDR =	pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
>  	ethertype.h gencode.h gnuc.h
> @@ -98,7 +99,6 @@ all: $(PROG)
>  install: force
>  	[ -d $(DESTDIR)$(SBINDIR) ] || \
>  		(mkdir -p $(DESTDIR)$(SBINDIR); chmod 755 $(DESTDIR)$(SBINDIR))
> -
>  	$(INSTALL) $(srcdir)/../bin/argus $(DESTDIR)$(SBINDIR)/argus
>
>  uninstall: force
> $NetBSD$
>
> --- configure.in.orig	2006-08-10 22:54:37.000000000 +0200
> +++ configure.in
> @@ -297,7 +297,7 @@ if test ! -z "$V_WRAPDEP"; then
>           fi
>           case "$target_os" in
>           linux*)
> -            LIBS="-lnsl $LIBS";;
> +            V_WRAPDEP="-lnsl $V_WRAPDEP";;
>           esac
>        fi
>     fi
> $NetBSD$
>
> --- Makefile.in.orig	2006-08-10 17:26:48.000000000 +0200
> +++ Makefile.in
> @@ -35,7 +35,7 @@ LDFLAGS = -g
>  prefix = @prefix@
>  exec_prefix = @exec_prefix@
>  srcdir = @srcdir@
> -docdir = @datadir@/doc/argus-3.0
> +docdir = @datadir@/doc/argus-clients-3.0
>
>  #### End of system configuration section. ####
>
> @@ -69,22 +69,14 @@ install:  force
>  	make installdirs
>  	[ -d $(DESTDIR)@prefix@ ] || \
>  		(mkdir -p $(DESTDIR)@prefix@; chmod 755 $(DESTDIR)@prefix@)
> -
> -	[ -d $(DESTDIR)@sbindir@ ] || \
> -		(mkdir -p $(DESTDIR)@sbindir@; chmod 755 $(DESTDIR)@sbindir@)
> -
>  	[ -d $(DESTDIR)@bindir@ ] || \
>  		(mkdir -p $(DESTDIR)@bindir@; chmod 755 $(DESTDIR)@bindir@)
> -
>  	[ -d $(DESTDIR)$(exec_prefix)/argus ] || \
>  		(mkdir -p $(DESTDIR)$(exec_prefix)/argus; chmod 755 $(DESTDIR)$ 
> (exec_prefix)/argus)
> -
>  	[ -d $(DESTDIR)$(exec_prefix)/argus/lib ] || \
>  		(mkdir -p $(DESTDIR)$(exec_prefix)/argus/lib; chmod 755 $ 
> (DESTDIR)$(exec_prefix)/argus/lib)
> -
>  	[ -d $(DESTDIR)$(exec_prefix)/argus/archive ] || \
>  		(mkdir -p $(DESTDIR)$(exec_prefix)/argus/archive; chmod 755 $ 
> (DESTDIR)$(exec_prefix)/argus/archive)
> -
>  	@for i in  $(INSTDIRS) ; do \
>  		if [ -d $$i ] ; then \
>  		echo "making in $$i"; \
> @@ -93,11 +85,8 @@ install:  force
>  		cd ..; \
>  		fi; \
>  	done
> -
>  	$(INSTALL) -m 0644 $(srcdir)/support/Config/rarc $(DESTDIR)$ 
> (prefix)/argus
> -
>  	$(INSTALL) -m 0755 $(srcdir)/bin/argusbug $(DESTDIR)@bindir@/ 
> argusbug
> -
>  	[ -d $(DESTDIR)@mandir@ ] || \
>  		(mkdir -p $(DESTDIR)@mandir@; chmod 755 $(DESTDIR)@mandir@)
>  	[ -d $(DESTDIR)@mandir@/man1 ] || \
> @@ -133,20 +122,16 @@ install-doc:
>  	make installdirs
>  	[ -d $(DESTDIR)@prefix@ ] || \
>  		(mkdir -p $(DESTDIR)@prefix@; chmod 755 $(DESTDIR)@prefix@)
> -
>  	[ -d $(DESTDIR)$(docdir) ] || \
>  		(mkdir -p $(DESTDIR)$(docdir); chmod 755 $(DESTDIR)$(docdir))
> -
>  	[ -d $(DESTDIR)$(docdir)/html ] || \
>  		(mkdir -p $(DESTDIR)$(docdir)/html; chmod 755 $(DESTDIR)$ 
> (docdir)/html)
> -
>  	[ -d $(DESTDIR)$(docdir)/html/man ] || \
>  		(mkdir -p $(DESTDIR)$(docdir)/html/man; chmod 755 $(DESTDIR)$ 
> (docdir)/html/man)
> -
> +	$(INSTALL) -m 0644 $(srcdir)/doc/CHANGES $(DESTDIR)$(docdir)
>  	$(INSTALL) -m 0644 $(srcdir)/doc/FAQ $(DESTDIR)$(docdir)
>  	$(INSTALL) -m 0644 $(srcdir)/doc/HOW-TO $(DESTDIR)$(docdir)
>  	$(INSTALL) -m 0644 $(srcdir)/doc/html/man/*.html $(DESTDIR)$ 
> (docdir)/html/man
> -
>  	$(INSTALL) -m 0644 $(srcdir)/README $(DESTDIR)$(docdir)
>  	$(INSTALL) -m 0644 $(srcdir)/COPYING $(DESTDIR)$(docdir)
>
> @@ -159,7 +144,6 @@ uninstall:
>  	rm -f $(DESTDIR)@bindir@/ragraph
>  	rm -f $(DESTDIR)@bindir@/ratop
>  	rm -f $(DESTDIR)@bindir@/ratemplate
> -
>  	rm -f $(DESTDIR)@mandir@/man1/ra.1
>  	rm -f $(DESTDIR)@mandir@/man1/racount.1
>  	rm -f $(DESTDIR)@mandir@/man1/ragraph.1
> @@ -168,7 +152,6 @@ uninstall:
>  	rm -f $(DESTDIR)@mandir@/man1/rabins.1
>  	rm -f $(DESTDIR)@mandir@/man1/racluster.1
>  	rm -f $(DESTDIR)@mandir@/man5/rarc.5
> -
>  	rm -rf $(DESTDIR)$(docdir)
>  	rm -f $(DESTDIR)$(prefix)/argus/COPYING
>  	rm -f $(DESTDIR)$(prefix)/argus/README
> $NetBSD$
>
> --- clients/Makefile.in.orig	2006-06-14 02:08:05.000000000 +0200
> +++ clients/Makefile.in
> @@ -114,7 +114,6 @@ CLEANFILES = $(OBJ) $(PROGS)
>  install: force all
>  	[ -d $(DESTDIR)$(BINDIR) ] || \
>  		(mkdir -p $(DESTDIR)$(BINDIR); chmod 755 $(DESTDIR)$(BINDIR))
> -
>  	$(INSTALL) $(srcdir)/../bin/ra* $(DESTDIR)$(BINDIR)
>
>  clean:
> $NetBSD$
>
> --- common/Makefile.in.orig	2006-08-10 16:32:12.000000000 +0200
> +++ common/Makefile.in
> @@ -131,14 +131,10 @@ version.c: $(srcdir)/../VERSION
>  	sed -e 's/.*/char version[] = "&";/' $(srcdir)/../VERSION > $@
>
>  install: force all
> -	[ -d $(LIBDEST) ] || \
> -		(mkdir -p $(LIBDEST); chmod 755 $(LIBDEST))
>  	[ -d $(DESTDIR)$(LIBDEST) ] || \
>  		(mkdir -p $(DESTDIR)$(LIBDEST); chmod 755 $(DESTDIR)$(LIBDEST))
> -
>  	$(INSTALL) $(srcdir)/../lib/argus_common.a $(DESTDIR)$(LIBDEST)/ 
> argus_common.a
>  	$(INSTALL) $(srcdir)/../lib/argus_parse.a  $(DESTDIR)$(LIBDEST)/ 
> argus_parse.a
> -
>  	$(RANLIB) $(DESTDIR)$(LIBDEST)/argus_common.a
>  	$(RANLIB) $(DESTDIR)$(LIBDEST)/argus_parse.a
>
> $NetBSD$
>
> --- configure.in.orig	2006-08-10 17:26:32.000000000 +0200
> +++ configure.in
> @@ -168,7 +168,7 @@ if test ! -z "$V_WRAPDEP"; then
>           fi
>           case "$target_os" in
>           linux*)
> -            LIBS="-lnsl $LIBS";;
> +            V_WRAPDEP="-lnsl $V_WRAPDEP";;
>           esac
>        fi
>     fi
> $NetBSD$
>
> --- radium/Makefile.in.orig	2006-08-10 17:30:31.000000000 +0200
> +++ radium/Makefile.in
> @@ -69,7 +69,8 @@ YACC = @V_YACC@
>  	@rm -f $@
>  	$(CC) $(CFLAGS) -c $(srcdir)/$*.c
>
> -LIB = @INSTALL_LIB@/argus_parse.a @INSTALL_LIB@/argus_common.a  
> @INSTALL_LIB@/argus_client.a @LIBS@ @WRAPLIBS@
> +LIB = @INSTALL_LIB@/argus_parse.a @INSTALL_LIB@/argus_common.a  
> @INSTALL_LIB@/argus_client.a
> +LIBS = @LIBS@ @WRAPLIBS@
>
>  SRC = radium.c
>
> @@ -78,7 +79,7 @@ PROGS = radium
>  all: $(PROGS)
>
>  radium: radium.o $(LIB)
> -	$(CC) $(CCOPT) -o $@ radium.o $(LIB) $(COMPATLIB)
> +	$(CC) $(CCOPT) -o $@ radium.o $(LIB) $(LIBS) $(COMPATLIB)
>
>  # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
>  # hack the extra indirection
> @@ -90,7 +91,6 @@ CLEANFILES = $(OBJ) $(PROGS)
>  install: force all
>  	[ -d $(DESTDIR)$(SBINDIR) ] || \
>  		(mkdir -p $(DESTDIR)$(SBINDIR); chmod 755 $(DESTDIR)$(SBINDIR))
> -
>  	$(INSTALL) radium $(DESTDIR)$(SBINDIR)
>
>  clean:
> $NetBSD$
>
> --- ragraph/Makefile.in.orig	2006-06-14 01:58:36.000000000 +0200
> +++ ragraph/Makefile.in
> @@ -72,7 +72,8 @@ PROGS = @INSTALL_BIN@/ragraph
>  all: $(PROGS)
>
>  @INSTALL_BIN@/ragraph: ragraph.pl
> -	$(INSTALL) ragraph.pl $@
> +	cp ragraph.pl $@
> +	chmod +x $@
>
>  # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
>  # hack the extra indirection
> @@ -83,7 +84,6 @@ CLEANFILES = $(PROGS)
>  install: force all
>  	[ -d $(DESTDIR)$(BINDIR) ] || \
>  		(mkdir -p $(DESTDIR)$(BINDIR); chmod 755 $(DESTDIR)$(BINDIR))
> -
>  	$(INSTALL) @INSTALL_BIN@/ragraph $(DESTDIR)$(BINDIR)
>
>  clean:
> $NetBSD$
>
> --- ratop/Makefile.in.orig	2006-08-10 16:32:12.000000000 +0200
> +++ ratop/Makefile.in
> @@ -92,7 +92,6 @@ CLEANFILES = $(OBJ) $(PROGS)
>  install: force all
>  	[ -d $(DESTDIR)$(BINDIR) ] || \
>  		(mkdir -p $(DESTDIR)$(BINDIR); chmod 755 $(DESTDIR)$(BINDIR))
> -
>  	$(INSTALL) @INSTALL_BIN@/ratop $(DESTDIR)$(BINDIR)
>
>  clean:

Carter Bullard
CEO/President
QoSient, LLC
150 E. 57th Street Suite 12D
New York, New York 10022

+1 212 588-9133 Phone
+1 212 588-9134 Fax


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20060818/a6fa95d9/attachment.html>


More information about the argus mailing list