Bug 205744 - mail/policyd2: Missing dependency on textproc/gsed
Summary: mail/policyd2: Missing dependency on textproc/gsed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Mathieu Arnold
URL:
Keywords: easy, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-12-31 00:12 UTC by Louis Kowolowski
Modified: 2016-01-15 16:06 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments
Patch makefile for gsed (942 bytes, patch)
2016-01-01 20:04 UTC, Louis Kowolowski
no flags Details | Diff
generate valid SQL (398 bytes, patch)
2016-01-01 20:06 UTC, Louis Kowolowski
no flags Details | Diff
output from 'make makepatch' (389 bytes, patch)
2016-01-10 03:35 UTC, Louis Kowolowski
no flags Details | Diff
post-patch additions for Port Makefile (942 bytes, patch)
2016-01-10 03:36 UTC, Louis Kowolowski
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Louis Kowolowski 2015-12-31 00:12:51 UTC
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.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-31 02:34:21 UTC
@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.
Comment 2 Louis Kowolowski 2016-01-01 20:04:32 UTC
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
Comment 3 Louis Kowolowski 2016-01-01 20:06:16 UTC
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.
Comment 4 Louis Kowolowski 2016-01-01 20:09:41 UTC
@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.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-02 05:52:06 UTC
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.
Comment 6 Louis Kowolowski 2016-01-10 03:35:54 UTC
Created attachment 165345 [details]
output from 'make makepatch'
Comment 7 Louis Kowolowski 2016-01-10 03:36:49 UTC
Created attachment 165346 [details]
post-patch additions for Port Makefile
Comment 8 Louis Kowolowski 2016-01-10 03:38:31 UTC
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.
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-01-15 16:06:07 UTC
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