Bug 192681 - www/fcgiwrap: cannot start after reboot
Summary: www/fcgiwrap: cannot start after reboot
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rodrigo Osorio
URL:
Keywords: needs-qa, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2014-08-15 15:09 UTC by Johan Ström
Modified: 2014-12-22 13:47 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
Patch implementing the fixes suggested above. (3.42 KB, patch)
2014-12-22 12:45 UTC, A.J. "Fonz" van Werven
freebsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Ström 2014-08-15 15:09:13 UTC
Background: When fcgiwrap exits, it does not remove it's socket. Trying to start fcgiwrap with an existing socket fails. 

Old fix: The rc script has a method fcgiwrap_cleansocket, which is executed as stop_postcmd. 

Problem: On reboot, the rc script is not utilized, and this is never called.

Fix: I've added cleanup support to the code, a pull request upstream has been created: https://github.com/gnosek/fcgiwrap/pull/26

Not sure how quick upstream is to release new though, so a local ports patch might be suitable. Should be simple enough.

I'm running the above code now to ensure it doesn't have any odd side effects (no high-volume site at all though). If I find none, and no new release has been made, I can provide a patch for the port too.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-15 15:46:28 UTC
notify maintainer in CC.
Comment 2 A.J. "Fonz" van Werven 2014-08-15 18:18:06 UTC
Thanks for reporting and for thinking along. I'll look into this as soon as possible.
Comment 3 A.J. "Fonz" van Werven 2014-09-23 12:15:03 UTC
Can you provide a port patch?
Comment 4 A.J. "Fonz" van Werven 2014-12-21 16:20:43 UTC
Update:

I see that, although you submitted a pull request on GitHub months ago, your proposed patches still haven't been merged upstream. If you have a port patch ready, please attach it to this report. Otherwise I'll patch the port myself in a couple of days.

This bug has been open for way too long, there's probably little point in waiting for the upstream vendor any more.
Comment 5 Johan Ström 2014-12-21 19:34:56 UTC
I agree, upstream does not seem too active.

I don't have any port patch ready, and I'm quite backed up for the moment. If you can write a patch up it would be great!
Comment 6 A.J. "Fonz" van Werven 2014-12-22 12:45:51 UTC
Created attachment 150847 [details]
Patch implementing the fixes suggested above.

Apply to ${PORTSDIR}/www.
Modifies www/fcgiwrap/Makefile and www/fcgiwrap/files/patch-fcgiwrap.c.
Comment 7 A.J. "Fonz" van Werven 2014-12-22 12:47:07 UTC
Done. The attached patch bumps PORTREVISION and merges your diffs with the existing patch for fcgiwrap.c. Thanks!

Now we just wait for a committer to pick it up.
Comment 8 Johan Ström 2014-12-22 12:49:19 UTC
Perfect, thanks!
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2014-12-22 12:55:57 UTC
A.J,

Attaching a successful poudriere build log would be great. If you dont have poudriere, you can attach output of the following instead:

make stage && make check-plist && make stage-qa && make package
Comment 10 Rodrigo Osorio freebsd_committer freebsd_triage 2014-12-22 13:13:07 UTC
i'll take it
Comment 11 A.J. "Fonz" van Werven 2014-12-22 13:26:11 UTC
Two remarks:

* Output of the above as suggested by Koobs can (at least for a while) be found here:
http://www.skysmurf.nl/~fonz/tmp/buildlog

* The patch I submitted succeeds in patching files/patch-*, but somehow rejects modification of the Makefile. I have no idea why. In case it matters: it just bumps PORTREVISION.
Comment 12 commit-hook freebsd_committer freebsd_triage 2014-12-22 13:47:44 UTC
A commit references this bug:

Author: rodrigo
Date: Mon Dec 22 13:47:18 UTC 2014
New revision: 375237
URL: https://svnweb.freebsd.org/changeset/ports/375237

Log:
  - Fix issue on restart after reboot, fcgiwrap doesn't handle
    properly unix sockets bind errors (https://github.com/gnosek/fcgiwrap/pull/26)
  - Bump port revision

  PR:		ports/192681
  Submitted by:	freebsd@skysmurf.nl (maintainer)

Changes:
  head/www/fcgiwrap/Makefile
  head/www/fcgiwrap/files/patch-fcgiwrap.c
Comment 13 Rodrigo Osorio freebsd_committer freebsd_triage 2014-12-22 13:47:53 UTC
Committed, thanks