The scripts (which get dumped into /usr/local/share/policyd/database/) which generate SQL code rely on gsed. The scripts (convert-tsql, parse-checkhelo-whitelist, parse-greylisting-whitelist) don't generate valid SQL using BSD sed.
@Louis, the mail/policyd port was deleted in 2005. What current port does this issue refer to? If you could also provide a patch that adds the missing dependency, that would be appreciated.
Created attachment 164937 [details] Patch makefile for gsed This adds a dependency for textproc/gsed, and patches the following files to use gsed: database/convert-tsql database/whitelists/parse-checkhelo-whitelist database/whitelists/parse-greylisting-whitelist
Created attachment 164938 [details] generate valid SQL This removes empty lines and replaces lines which start with '#' to become lines starting with '--'. Output is now valid SQL.
@Kubilay, sorry, service is named policyd, port is policyd2. I've updated things to reflect the correct port. I've also added patches for both the Makefile and the convert-tsql script. While the convert-tsql script doesn't strictly require gsed (the patches to convert-tsql I've provided also work with BSD sed), its easier to keep all the references the same, and will likely mean less work if things are changed upstream. At least that is the hope. The parse-*-whitelist scripts do need gsed, and the Makefile patch takes care of this as well as adding in the dependancy.
Thanks Louis Could you combine these two patches in a single unified diff against the port head? To correctly create a files/patch-* file for the patch against the upstream sources, you can use the `make makepatch method`, outlined here: https://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html Also, correctly assign this to MAINTAINER now that we know what port its for.
Created attachment 165345 [details] output from 'make makepatch'
Created attachment 165346 [details] post-patch additions for Port Makefile
I've attached the output from 'make makepatch' as requested. I've also added the patch to the Port Makefile which updates the post-patch section.
A commit references this bug: Author: mat Date: Fri Jan 15 16:05:22 UTC 2016 New revision: 406170 URL: https://svnweb.freebsd.org/changeset/ports/406170 Log: Add missing dependency on GNU sed. PR: 205744 Submitted by: Louis Kowolowski Sponsored by: Absolight Changes: head/mail/policyd2/Makefile head/mail/policyd2/files/patch-database_convert-tsql