mail/spamassassin's /usr/local/etc/rc.d/sa-spamd r349854 incorrectly assumes the existence of the directory /var/run/${name}, i.e. /var/run/spamd. If /var/run/spamd happens to be removed during deinstall, then it should be the responsibility of the port to create this directory during install. Fix: Augment head/mail/spamassassin/files/sa-spamd.in to check if /var/run/${name}, i.e. /var/run/spamd exists, creating this directory if necessary as part of the start and restart sequences. As an alternative, augment head/mail/spamassassin/pkg-plist to create /var/run/spamd during install. How-To-Repeat: Install mail/spamassassin. Forcefully upgrade mail/spamassassin, e.g. portupgrade -f mail/spamassassin. Notice the absence of the directory /var/run/spamd.
Responsible Changed From-To: freebsd-ports-bugs->adamw Over to maintainer (via the GNATS Auto Assign Tool)
pkg-plist now correctly ensures the directory is created, and I've added it to required_dirs in sa-spamd so it'll at least barf if it isn't there. I believe this should resolve the problem here... please let me know if it still persists or if I've done it sub-optimally. Thanks for the report!
(In reply to Adam Weinberger from comment #2) > pkg-plist now correctly ensures the directory is created, and I've added it > to required_dirs in sa-spamd so it'll at least barf if it isn't there. > > I believe this should resolve the problem here... please let me know if it > still persists or if I've done it sub-optimally. Problem persists: /var/run/spamd is NOT created upon install. Seems you missed the change to pkg-plist mentioned above?
Not sure what the issue is here... it certainly works for me installing from ports, and the directory is present in the tarball that I pull with 'pkg fetch'. What OS version are you running, and are you using ports, pkgng, or pkg_install?
running 9.3-STABLE using old-style pkg I observe there is no /var directory in the package: # tar tvfz /usr/obj/usr/ports/mail/spamassassin/work/pkg/pamassassin-3.4.0_12.tbz | fgrep var # Are you sure that the pkg-plist change mentioned above ("pkg-plist now correctly ensures the directory is created") is pushed to the repository? Because pkg-plist is >2 months old...
(In reply to Helge Oldach from comment #5) > using old-style pkg That means: I am installing from ports. > # tar tvfz /usr/obj/usr/ports/mail/spamassassin/work/pkg/pamassassin-3.4.0_12.tbz | fgrep var > # I dropped an "s" letter here while copy & paste verbatim: That should of course read: # tar tvfz /usr/obj/usr/ports/mail/spamassassin/work/pkg/spamassassin-3.4.0_12.tbz | fgrep var #
(In reply to Adam Weinberger from comment #4) > Not sure what the issue is here... it certainly works for me installing from > ports, and the directory is present in the tarball that I pull with 'pkg > fetch'. > > What OS version are you running, and are you using ports, pkgng, or > pkg_install? FreeBSD/amd64 stable/9 r268446. ports without pkgng, using latest portupgrade. (Boy, do I miss the old gnats system and its specific fields for this sort of information.) In other words, the +CONTENTS file does NOT list /var/run/spamd for creation when installing, it's only listed for decomissioning: @comment begin @dirrmtry /var/run/spamd @unexec rmdir "/var/run/spamd" 2>/dev/null || true @comment end @dirrmtry /var/run/spamd I will succumb to peer pressure and migrate to pkgng on said system later this summer.
Ahh. I see the common thread here. You are both running pkg_install instead of pkgng. It appears that support for paths outside of ${PREFIX} was only added to pkgng. Of course, I think you should both get on the bandwagon and come join us out here in 2014 with our smart phones and pkgng's ;-) That said, it's still another 6 weeks before pkg_install is officially removed, so I'll take the originally submitted suggestion of creating the directory in sa-spamd.
A commit references this bug: Author: adamw Date: Sun Jul 13 17:55:42 UTC 2014 New revision: 361699 URL: http://svnweb.freebsd.org/changeset/ports/361699 Log: Create /var/run/spamd manually in the rc(8) script, as pkg_tools does not create the directory from the @dirrm /var/run/spamd in the plist. So, we'll do it manually for the next 6 weeks. PR: 190005 Submitted by: Trond.Endrestol@ximalas.info Changes: head/mail/spamassassin/Makefile head/mail/spamassassin/files/sa-spamd.in
Okay, I've committed what I'm hoping will finally fix this properly for you! It does what you'd originally suggested, and manually creates the directory during start and restart. Thanks for bearing with me!