Bug 205754 - mail/sqlgrey: Fix missing dependencies (bash, wget, md5sum)
Summary: mail/sqlgrey: Fix missing dependencies (bash, wget, md5sum)
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: Kurt Jaeger
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2015-12-31 11:34 UTC by Christian Schwarz
Modified: 2016-07-27 21:22 UTC (History)
3 users (show)

See Also:
koobs: merge-quarterly?


Attachments
Patch for update_sqlgrey_config (618 bytes, patch)
2015-12-31 12:00 UTC, Christian Schwarz
no flags Details | Diff
SVN Diff for the actual port. (2.17 KB, patch)
2015-12-31 17:53 UTC, Christian Schwarz
no flags Details | Diff
SVN Diff for the actual port. (5.48 KB, patch)
2016-01-07 16:26 UTC, Christian Schwarz
koobs: maintainer-approval+
Details | Diff
Output of the portlint -AC command. (291 bytes, text/plain)
2016-01-07 16:26 UTC, Christian Schwarz
no flags Details
Output of the `port test` command. (5.14 KB, text/plain)
2016-01-07 16:27 UTC, Christian Schwarz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Schwarz 2015-12-31 11:34:58 UTC
/usr/local/sbin/update_sqlgrey_config is a bash script but sqlgrey does not list bash as a dependency.

Steps to reproduce:

Install sqlgrey.

usr/local/sbin/update_sqlgrey_config 
zsh: /usr/local/sbin/update_sqlgrey_config: bad interpreter: /usr/local/bin/bash: no such file or directory


The script should either be checked for /bin/sh compliance or bash should be added as a dependency of sqlgrey.
Comment 1 Christian Schwarz 2015-12-31 11:37:14 UTC
A more comprehensive list of missing dependencies of update_sqlgrey_config:

- bash
- md5sum
- wget


md5sum seems problematic: I cannot find it in the ports tree. Maybe patch the script?
Comment 2 Christian Schwarz 2015-12-31 12:00:12 UTC
Created attachment 164896 [details]
Patch for update_sqlgrey_config

Apply using:

patch /usr/local/sbin/update_sqlgrey_config /root/patch
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-31 14:07:58 UTC
@Christian, given this port doesn't currently have a maintainer, you can assist resolving of this issue with the following:

* Create an svn (unified) diff against the mail/sqlgrey port itself after patching the script. For a super easy way see: http://www2.au.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#slow-patch

* You mentioned a wget dependency but didn't provide any detail. Can you provide more detail?

Has this script worked for you prior to this report or a previous port update?
Comment 4 Christian Schwarz 2015-12-31 17:53:29 UTC
Created attachment 164904 [details]
SVN Diff for the actual port.
Comment 5 Christian Schwarz 2015-12-31 17:54:01 UTC
(In reply to me from comment #4)

I attached a patch sqlgrey-1.8.0_1.diff.

Since the diff doesn't change is a port-bugfix and not a version-incrementation, I suggest to include the patch in the 2015Q4 / 2016Q1 branch of the ports tree.
Comment 6 Christian Schwarz 2016-01-07 16:26:12 UTC
Created attachment 165217 [details]
SVN Diff for the actual port.
Comment 7 Christian Schwarz 2016-01-07 16:26:50 UTC
Created attachment 165218 [details]
Output of the portlint -AC command.
Comment 8 Christian Schwarz 2016-01-07 16:27:14 UTC
Created attachment 165219 [details]
Output of the `port test` command.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-07 16:28:01 UTC
Nice work Christian! :)
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-07 16:28:17 UTC
Comment on attachment 165217 [details]
SVN Diff for the actual port.

Port is unmaintained, implicit approval
Comment 11 commit-hook freebsd_committer freebsd_triage 2016-01-18 19:48:51 UTC
A commit references this bug:

Author: pi
Date: Mon Jan 18 19:48:36 UTC 2016
New revision: 406608
URL: https://svnweb.freebsd.org/changeset/ports/406608

Log:
  mail/sqlgrey: Fix missing dependencies (bash, wget, md5sum)

  PR:		205754
  Submitted by:	me@cschwarz.com

Changes:
  head/mail/sqlgrey/Makefile
  head/mail/sqlgrey/files/patch-ipv6
  head/mail/sqlgrey/files/patch-sqlgrey
  head/mail/sqlgrey/files/patch-update__sqlgrey__config
Comment 12 Kurt Jaeger freebsd_committer freebsd_triage 2016-01-18 19:50:16 UTC
Testbuilds fine 11a, 10.2a+i, 9.3a.

Committed, thanks.
Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-19 04:16:41 UTC
@Kurt, could you add a comment for merge -, for our future selves :)
Comment 14 Christian Schwarz 2016-01-19 15:35:47 UTC
(In reply to commit-hook from comment #11)

Requesting merge-back to 2016Q1. This is merely a port bugfix and not a version update.
Comment 15 Kurt Jaeger freebsd_committer freebsd_triage 2016-01-19 18:52:00 UTC
Those missing DEPs existed since approx. 2012 and were probably not that urgent that it really requires a MFH. And I still do not understand the
process for MFH 8-)
Comment 16 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-20 11:13:10 UTC
(In reply to Kurt Jaeger from comment #15)

I fixed it for you:

https://wiki.freebsd.org/PortsSubversionPrimer#Quarterly_Branch

:)
Comment 17 Brad Davis freebsd_committer freebsd_triage 2016-05-06 21:39:44 UTC
Hey Christian,

Do you use the update_sqlgrey_config shell script?  I was thinking it would be easy to convert to not need bash or md5sum and use sh and md5.  Would you be able to help test?


Thanks,
Brad DAvis
Comment 18 Christian Schwarz 2016-05-08 11:27:19 UTC
(In reply to Brad Davis from comment #17)

I run it in a cronjob, that's all it's good for.

I can help you test but I think the only critical aspect is handling the different formats of md5 and md5sum (or knowing the right command line flags).
Comment 19 Brad Davis freebsd_committer freebsd_triage 2016-07-27 17:02:32 UTC
Where does it fetch from?  Could I get a copy of the file it is fetching?


Thanks,
Brad Davis
Comment 20 Christian Schwarz 2016-07-27 21:22:51 UTC
(In reply to Brad Davis from comment #19)

The standard file is fetched from the 'whitelist_host':

> http://sqlgrey.bouton.name/MD5SUMS

yes, you got that right, it's HTTP :(