I honestly think this is a foolishly complicated. Just install the program, then run regress. Install an older version without the broken changes if it doesn't work.
I tire of these interactions between environment variables, base build methods, fork+exec paths in privsep programs, and now getting tied into regress tests. In a word, YUCK. I think this isn't "convenience". Rather it comes off as artifically complicated, trying to solve a problem which doesn't need to be exist at all. Perhaps even perceiving there to be a problem which needs solving via such abstration is the true problem. Klemens Nanni <[email protected]> wrote: > Same as in pfctl or route so I can easily test my changes with > > $ make BGPD=/usr/obj/usr.sbin/bgpd/bgpd config > > OK? > > Index: config/Makefile > =================================================================== > RCS file: /cvs/src/regress/usr.sbin/bgpd/config/Makefile,v > retrieving revision 1.5 > diff -u -p -r1.5 Makefile > --- config/Makefile 10 Sep 2018 14:20:25 -0000 1.5 > +++ config/Makefile 18 Sep 2018 20:53:24 -0000 > @@ -1,5 +1,7 @@ > # $OpenBSD: Makefile,v 1.5 2018/09/10 14:20:25 benno Exp $ > > +BGPD ?= /usr/sbin/bgpd > + > BGPDTESTS=1 2 3 4 5 6 7 8 > > REGRESS_TARGETS = config > @@ -9,12 +11,12 @@ BGPD_TARGETS+=bgpd${n} > BGPD_UPDATES+=bgpd${n}-update > > bgpd${n}: > - bgpd -nv -f /dev/stdin < ${.CURDIR}/bgpd.conf.${n}.in | \ > + ${BGPD} -nv -f /dev/stdin < ${.CURDIR}/bgpd.conf.${n}.in | \ > sed 's/router-id .*/router-id 127.0.0.1/' | \ > diff -u ${.CURDIR}/bgpd.conf.${n}.ok /dev/stdin > > bgpd${n}-update: > - bgpd -nv -f /dev/stdin < ${.CURDIR}/bgpd.conf.${n}.in | \ > + ${BGPD} -nv -f /dev/stdin < ${.CURDIR}/bgpd.conf.${n}.in | \ > sed 's/router-id .*/router-id 127.0.0.1/' > \ > ${.CURDIR}/bgpd.conf.${n}.ok > .endfor > @@ -24,11 +26,11 @@ bgpd-update: ${BGPD_UPDATES} > > # check that the example configuration file we ship is ok > bgpd-example: > - bgpd -nf ${.CURDIR}/../../../../etc/examples/bgpd.conf > + ${BGPD} -nf ${.CURDIR}/../../../../etc/examples/bgpd.conf > > # check that the output of bgpd -nvv is parseable > bgpd-printconf: > - bgpd -nvf ${.CURDIR}/bgpd.conf.printconf | \ > - bgpd -nf /dev/stdin > + ${BGPD} -nvf ${.CURDIR}/bgpd.conf.printconf | \ > + ${BGPD} -nf /dev/stdin > > .include <bsd.regress.mk> >
