Bug 216799 - mail/dcc-dccd: Fixes for changes in FreeBSD 11 /usr/share/mk
Summary: mail/dcc-dccd: Fixes for changes in FreeBSD 11 /usr/share/mk
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: Richard Gallamore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-04 22:49 UTC by Vernon Schryver
Modified: 2017-07-02 18:12 UTC (History)
5 users (show)

See Also:
pkubaj: maintainer-feedback+


Attachments
patch /usr/ports/mail/dcc-dccd (6.94 KB, patch)
2017-02-04 22:49 UTC, Vernon Schryver
no flags Details | Diff
patch (7.17 KB, patch)
2017-02-06 08:47 UTC, Piotr Kubaj
pkubaj: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vernon Schryver 2017-02-04 22:49:42 UTC
Created attachment 179619 [details]
patch  /usr/ports/mail/dcc-dccd

Changes in FreeBSD 11 /usr/share/mk broke the DCC Makefiles on FreeBSD.

I have released version 1.3.159 of DCC to deal with that problem,
but fixes broke the FreeBSD mail/dcc-dccd port.

I've attached a patch that fixes the port.  It does the following

  - changes Makefile 
     + to use new ./configure switches so that the port does not
        need to patch the DCC source
     + not use gmake

  - delete all of the files/patch* files

  - remove dcc/libexec/fetchids from pkg-plist because that file is no
     longer in the free DCC tarball


Vernon Schryver    vjs@rhyolite.com
Comment 1 Piotr Kubaj freebsd_committer 2017-02-06 08:47:30 UTC
Created attachment 179669 [details]
patch

You forgot to put the right distinfo, here's the updated patch.

Other than that, it looks good.
Comment 2 Dani 2017-06-14 14:33:28 UTC
Bump - maintainer-approval is given.

-> Could this please be commited? :-)

Thanks for taking a look at it!
Comment 3 Dani 2017-06-14 14:34:38 UTC
Bump - patch has been provided and has been approved by the maintainer.

Could this update please be commited? Thanks a lot! :)
Comment 4 Richard Gallamore freebsd_committer 2017-06-14 21:54:25 UTC
Sorry, looks like this PR was lost.
Comment 5 commit-hook freebsd_committer 2017-06-16 18:26:55 UTC
A commit references this bug:

Author: ultima
Date: Fri Jun 16 18:25:58 UTC 2017
New revision: 443717
URL: https://svnweb.freebsd.org/changeset/ports/443717

Log:
  * Updated to 1.3.159
  * Added upstream configure switches for DCC
  * Remove gmake
  * Fixed portlint items
  * Install stripped

  Currently, this port is out of compliance with FreeBSD porting standards
  and is in desperate need to be modernized. @cwd is depricated, and will
  be removed in the future. The ALT_HOME Option will also need to be
  removed or reworked which changes the home directory to /var/dcc.
  Libmilter nolonger depends on sendmail and various comments will also be
  updated to match current FreeBSD porting practices.

  PR:		216799
  Submitted by:	Vernon Schryver <vjs@rhyolite.com>
  Reviewed by:	matthew (mentor)
  Approved by:	Piotr Kubaj <pkubaj@anongoth.pl> (maintainer), matthew (mentor)
  Differential Revision:	https://reviews.freebsd.org/D11207

Changes:
  head/mail/dcc-dccd/Makefile
  head/mail/dcc-dccd/distinfo
  head/mail/dcc-dccd/files/patch-Makefile.inc.in
  head/mail/dcc-dccd/files/patch-Makefile.inc2.in
  head/mail/dcc-dccd/files/patch-cdcc__Makefile.in
  head/mail/dcc-dccd/files/patch-configure
  head/mail/dcc-dccd/files/patch-dccproc__Makefile.in
  head/mail/dcc-dccd/files/patch-dccsight__Makefile.in
  head/mail/dcc-dccd/files/patch-homedir_Makefile.in
  head/mail/dcc-dccd/files/patch-homedir__make-dcc_conf.in
  head/mail/dcc-dccd/files/patch-misc_Makefile.in
  head/mail/dcc-dccd/pkg-plist
Comment 6 Richard Gallamore freebsd_committer 2017-06-16 18:28:05 UTC
Committed, thanks!
Comment 7 rwmaillists 2017-07-02 12:05:15 UTC
This broke DCC for me (dccproc from SpamAssassin) the mail logs show: 

dccproc[61386]: open(/usr/local/dcc/map): Permission denied
dccproc[61386]: lock_open(/usr/local/dcc/whiteclnt.dccx): Permission denied; file not writeable for locking

The install sets the ownership of /usr/local/dcc/ and  /usr/local/dcc/map to root:wheel, setting them to dcc:dcc fixed the problem.

ids and ids.sample are also root:wheel, but don't appear to create a problem.
Comment 8 Vernon Schryver 2017-07-02 14:47:37 UTC
concerning:

> This broke DCC for me (dccproc from SpamAssassin) the mail logs show:
>
> dccproc[61386]: open(/usr/local/dcc/map): Permission denied
> dccproc[61386]: lock_open(/usr/local/dcc/whiteclnt.dccx): Permission denied;
> file not writeable for locking
>
> The install sets the ownership of /usr/local/dcc/ and  /usr/local/dcc/map to
> root:wheel, setting them to dcc:dcc fixed the problem.
>
> ids and ids.sample are also root:wheel, but don't appear to create a problem.

I suspect that /usr/local/dcc/whiteclnt.dccx is a typeo for whiteclnt.dccw

The ids, map, whiteclnt, and whiteclnt.dccw files and the log directories must be owned by the UID specified by DCCUID in the dcc_conf file and the setuid UID of dccproc, cdcc, and dccsight.  If I am reading "DCCUSER?=dcc" and CONFIGURE_ARGS in a recent /usr/ports/dcc-dccd/Makefile correctly, that UID is "dcc".

Does the pkg_list file need to be adjusted?
`make install` in homedir should fix the owners of the ids, map, and whiteclnt files.

If you use the proof-of-concept CGI files (almost no one does), the whiteclnt files must be writable by the GID of CGI processes, perhaps "www".  The log directories should be readable by that GID.

Running ${DCCHOME}/libexec/updatedcc is my recommendation for updating an existing DCC installation.


vjs
Comment 9 rwmaillists 2017-07-02 17:19:16 UTC
According to dcc_ck.h a .dccx file is a "hash table under construction". I presume it's trying to create a new whiteclnt.dccw file, which is why the permission on /usr/local/dcc/ matters.

I suspect that almost all users of mail/dcc-dccd install it as a dependency of spamassassin. Whatever the merits of updatedcc it's important that a package/port update doesn't break dcc.
Comment 10 Richard Gallamore freebsd_committer 2017-07-02 18:12:06 UTC
This has been moved to bug #220201. A Fix is in the works.