I just need an OK from another developer to import - any takers? I won't reattach, but for ease of fetching: ftp -o dnsdist.tgz "http://marc.info/?l=openbsd-ports&m=148425983104778&q=p3"
(Other responses inline, but I wanted to get that at the top of the mail so it gets spotted :) On 2017/01/13 20:56, Peter van Dijk wrote: > Hello Stuart, > > many thanks for this, the Makefile now no longer resembles an incremental > science project :) > > On 12 Jan 2017, at 23:23, Stuart Henderson wrote: > > > I've committed the reservation in user.list; updated port attached, > > Thank you for that, I imagine this prevents some race conditions. > > > comments on my changes: > > > > |V= 1.1.0 > > |DISTNAME= dnsdist-${V} > > |EXTRACT_SUFX = .tar.bz2 > > |PKGNAME= dnsdist-${V} > > > > PKGNAME defaults to DISTNAME already, V is used nowhere else, so just > > set DISTNAME=dnsdist-1.1.0. > > Right. This is where I admit I did not use Makefile.template (managed to > skim over that bit in the Porting Guide every time) and instead stole > net/powerdns/Makefile, which unlike dnsdist has plenty reason to have this > V. > > > |# GPLv2 > > > > More specific version; in this case there's no "or later" so the > > marker to use it "GPLv2 only" > > Indeed. > > > |CONFIGURE_STYLE= gnu > > > > hardcodes -O3, I've patched configure.ac to remove this and switched to > > running autoconf (CONFIGURE_STYLE=autoconf) to regenerate > > Understood, and while I can think of some reasons myself, is ‘no -O3’ some > OpenBSD policy that I missed? Yes - we don't fully trust it on all arches. Actually in this case it probably gets overridden by the -O2 from default CFLAGS later on the command line, but I'd rather explicitly remove it in case anything changes with a future update. > > | lang/lua > > > > because MODLUA_VERSION wasn't set it defaults to 5.1; dnsdist build > > is picking up 5.3 preferentially if multiple versions are installed, > > so I've set this explicitly. > > Great. > > > |LIBTOOL_FLAGS= --tag=disable-static > > |CONFIGURE_ARGS+= --disable-shared \ > > > > removed these, they're doing nothing here > > Alright. > > > |SEPARATE_BUILD= No > > > > removed, this is the default > > I just grepped the rest of the ports and saw a lot of this, relying on > defaults is better of course. There are quite a few SEPARATE_BUILD=Yes (where the port builds OK out of the source tree; e.g. those where you can run "cd $build_dir; /path/to/configure; make"), we don't normally use "SEPARATE_BUILD=No" unless there's something funny going on (with cmake-based ports, infrastructure sets this to Yes by default, but there are a couple which don't work with this -- and there are some special cases like iperf which does build with SEPARATE_BUILD=Yes but breaks IPv6 support, so in that case it's better to be explicit to avoid someone trying it later and not spotting the problem). > > |NO_TEST= Yes > > > > removed, this is normally only used if things error out, and left > > out if there are no tests, or if they're not built by default. (though > > is there any disadvantage to adding --enable-unit-tests to enable them?) > > There are no ‘make check’-exposed tests in dnsdist so this would not make a > difference. ok. > > others: > > > > - reordered variables more in line with Makefile.template > > Thank you for that. > > > - it wasn't building for me, needed gmake, so I've added USE_GMAKE=Yes > > Yes, I recall being surprised at it building without such a hint at one time > but then I forgot. Wonder why it did build for me anyway, but at least there > is no confusion now. Ah I see why: the GNUism is in the protobuf-related parts of the Makefile. Using $< in a non-suffix rule context is a GNUmake idiom (Makefile:1749) dnsmessage.pb.cc: dnsmessage.proto $(AM_V_GEN)$(PROTOC) --cpp_out=./ $< > > - picks up and links with protobuf if available at configure time; > > I've added it as LIB_DEPENDS and regen'd WANTLIB > > Yes, should have been explicit about that, thank you. Generally we need to go through configure output and look for things which might get picked up, otherwise we end up with failing bulk builds or broken packages depending on what else was installed at build time. (The other option would be to disable protobuf support). > I see you reformatted pkg/DESCR to fit in 72 chars instead of 80; is this > something that should be updated in > http://www.openbsd.org/faq/ports/guide.html (search for fmt -w)? Up to 80 chars is OK (though I prefer 79 to avoid ending up hard against the edge of the terminal window), I just thought the line- breaking didn't look quite right visually. > I’ve tested your rework of the port and it should be no surprise to you that > it works perfectly. Is there anything I can do to move this along into the > tree? > > Thanks again for your help here, sthen@. No problem, I think this would be useful to have in the tree. I had an abandoned attempt at 0.1 in mystuff but I didn't get round to figuring out why it didn't build :)