Bug 150574 - [PATCH] mail/dkimproxy: Simplify the rc scripts
Summary: [PATCH] mail/dkimproxy: Simplify the rc scripts
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Olli Hauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-14 20:20 UTC by Erik Steigler
Modified: 2010-11-27 19:25 UTC (History)
0 users

See Also:


Attachments
dkimproxy.patch (3.24 KB, patch)
2010-09-14 20:20 UTC, Erik Steigler
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Steigler 2010-09-14 20:20:00 UTC
 When using dkimproxy.out I found that it was creating a temporary file and then directing std error to the file. Later the dkimproxy_out script would remove that file resulting in a file handle which is still growing in size but isn't visable anywhere.

Fix: It appeared the rc.d scripts for dkimproxy were written before it had the ability to be easily run as a daemon and create its own pid file. I modified the scripts to provide the proper flags in the flags variable and pass the pidfile configuration option in there also. A patch is provided below

	
How-To-Repeat: Start dkimproxy_out, examine the open files via lsof and notice the dangling file handle.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-09-14 20:20:09 UTC
Maintainer of mail/dkimproxy,

Please note that PR ports/150574 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/150574

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2010-09-14 20:20:11 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Yoshisato YANAGISAWA 2010-09-16 15:42:15 UTC
I approve this PR.
Thank you for your contribution!
Comment 4 Philip M. Gollucci freebsd_committer freebsd_triage 2010-09-17 00:28:23 UTC
State Changed
From-To: feedback->open

Maintainer approved
Comment 5 Olli Hauer freebsd_committer freebsd_triage 2010-11-22 21:46:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ohauer

I'll take it
Comment 6 Olli Hauer freebsd_committer freebsd_triage 2010-11-22 23:19:29 UTC
State Changed
From-To: open->feedback

Hi Yoshisato YANAGISAWA, 

with the new dkimproxy I see potential to rewrite more 
from the rc scripts. 

- Is it really nessesary to chown the pidfile? 
- dkimproxy is a registered GID/UID, until my patch 
for bsd.port.mk is approved I can create a pkg-install 
script which makes sure the dkimproxy user exist. 

Will provide tomorrow new rewritten scripts, maybe you 
can answer meamwhile the two small questions ;)
Comment 7 Olli Hauer freebsd_committer freebsd_triage 2010-11-26 13:50:19 UTC
Hello Yoshisato YANAGISAWA,

can you take a look into the new (total rewritten) rc.scripts.

changes Makefile:
 - update to dkimproxy 1.3
 - 's;/usr/bin/perl;${PERL};g'
    this is needed, else the parameter "command_interpreter"
    in the rc scripts does not work correct.

changes rc scripts:
 - complete rewrite

Since the diff for the port is ~80 lines longer then the updated port
port I've uploaded the new files to this location.
http://people.freebsd.org/~ohauer/diffs/dkimproxy/

If it looks good for you drop a note and I will commit the changes.
Comment 8 Yoshisato YANAGISAWA 2010-11-27 00:46:25 UTC
LGTM

2010/11/26 22:50, Olli Hauer wrote:
> Hello Yoshisato YANAGISAWA,
>
> can you take a look into the new (total rewritten) rc.scripts.
>
> changes Makefile:
>   - update to dkimproxy 1.3
>   - 's;/usr/bin/perl;${PERL};g'
>      this is needed, else the parameter "command_interpreter"
>      in the rc scripts does not work correct.
>
> changes rc scripts:
>   - complete rewrite
>
> Since the diff for the port is ~80 lines longer then the updated port
> port I've uploaded the new files to this location.
> http://people.freebsd.org/~ohauer/diffs/dkimproxy/
>
> If it looks good for you drop a note and I will commit the changes.
Comment 9 dfilter service freebsd_committer freebsd_triage 2010-11-27 19:09:44 UTC
ohauer      2010-11-27 19:09:40 UTC

  FreeBSD ports repository

  Modified files:
    mail/dkimproxy       Makefile distinfo pkg-plist 
    mail/dkimproxy/files dkimproxy_in.in dkimproxy_out.in 
  Log:
   - 's|/usr/bin/perl|${PERL}|' (now "command_interpreter" can be used in rc scripts)
   - rewrite rc scripts
   - update to version 1.3
  
  PR:             150574
  Submitted by:   Erik Steigler <erik _at_ okcupid.com>
  Approved by:    Yoshisato YANAGISAWA <yanagisawa _at_ csg.is.titech.ac.jp>
  
  Revision  Changes    Path
  1.11      +13 -3     ports/mail/dkimproxy/Makefile
  1.8       +2 -3      ports/mail/dkimproxy/distinfo
  1.6       +21 -55    ports/mail/dkimproxy/files/dkimproxy_in.in
  1.6       +26 -59    ports/mail/dkimproxy/files/dkimproxy_out.in
  1.5       +2 -2      ports/mail/dkimproxy/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 10 Olli Hauer freebsd_committer freebsd_triage 2010-11-27 19:20:22 UTC
State Changed
From-To: feedback->closed

commited with total rewritten rc scripts. 

Since dkimproxy_in/out returns 0 even startup fails we  
cannot use "$?" after starting the process. 
With the new rc scripts we loose the pidfile but we can 
control the process via the rc.subr framework. 

Additional port is updated to 1.3