Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jun 2020 08:06:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 247247] www/squid: fails to start when dir for pidfile does not exist (e.g. /var/run is a tmpfs)
Message-ID:  <bug-247247-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D247247

            Bug ID: 247247
           Summary: www/squid: fails to start when dir for pidfile does
                    not exist (e.g. /var/run is a tmpfs)
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: t.eichstaedt@gmx.net
                CC: timp87@gmail.com
                CC: timp87@gmail.com
             Flags: maintainer-feedback?(timp87@gmail.com)

Created attachment 215535
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D215535&action=
=3Dedit
patch for squid's service script

System: FreeBSD 12.1-RELEASE-p6
squid: 4.10 from pkg (not built myself)
fstab: none /var/run tmpfs rw,size=3D2M,noexec,gid=3D0,uid=3D0 0 0

Hello Tim!

By default, squid's pidfile is /var/run/squid/squid.pid.

The dir /var/run/squid gets neither checked nor created by the service scri=
pt
/etc/rc.d/squid.

Many users will create that directory when they run into that bug (and not
report it), but that fixes it only if /var/run resides on stable storage --=
 in
contrast, a common recommendation is a tmpfs like given above, and this imp=
lies
it is empty after every reboot.  Thus, the service script should check and
create that dir, if neccessary.

My suggestions for appropiate defaults are:
pidfile=3D/var/run/squid.pid (why does squid need it's own directory? worker
threads?)
chdir=3D/var/cache/squid
    The admin might have special ZFS parameters set for caches (e.g. relaxed
    metadata redundancy, no snapshots).
    2nd many would agree to keep /usr and /var narrow.
    Remember 30 years ago, when each and every tarball installed itself into
    /usr/gprolog, /usr/X11, /usr/squid,... nobody likes that nowadays.

Appended is the patch to my fixed service script; it is by no means perfect,
but you may want to copy&paste some parts.  I removed comments where the
information they give is brilliantly clear (on 1st sight, even for beginner=
s)
from the code.

The patch was produced with 'diff -U 7 etc/rc.d/squid{.orig,}' from /usr/lo=
cal.

With kind regards, Torsten

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-247247-7788>