www/squid: Support DragonFly SHM segments

Out of the box, squid would not run on dragonfly due to its handling
of SHM segments.  On DragonFly, SHM segments are always treated as files
but on FreeBSD it depends on whether or not application is inside a jail.

In any case, the case for DragonFly was no supported, so it has been
added via patch.  This also requires the return of /var/run/squid
directory which is where the SHM files are stored (defined by
localstatedir and supported by RC script).  The RC script would define
this directory if missing, but let's make sure it is always available.

PR:		201405
Submitted by:	marino
Approved by:	maintainer (timp87/gmail)
This commit is contained in:
John Marino 2015-07-08 09:30:17 +00:00
parent 53a7175a7b
commit d49600aa37
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=391555
3 changed files with 12 additions and 1 deletions

View File

@ -355,7 +355,6 @@ post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} ${MYDOCS} ${STAGEDIR}${DOCSDIR})
${MKDIR} ${STAGEDIR}/var/squid/logs
${RMDIR} ${STAGEDIR}/var/run/squid
.include <bsd.port.pre.mk>

View File

@ -0,0 +1,11 @@
--- compat/shm.cc.orig 2015-05-28 11:06:38 UTC
+++ compat/shm.cc
@@ -29,6 +29,8 @@ shm_portable_segment_name_is_path()
size_t len = sizeof(jailed);
::sysctlbyname("security.jail.jailed", &jailed, &len, NULL, 0);
return !jailed;
+#elif defined (__DragonFly__)
+ return true;
#else
return false;
#endif

View File

@ -2176,6 +2176,7 @@ sbin/purge
sbin/squid
sbin/squidclient
@dir(squid,squid,750) /var/log/squid
@dir(squid,squid,750) /var/run/squid
@dir(squid,squid,750) /var/squid
@dir(squid,squid,750) /var/squid/cache
@dir(squid,squid,750) /var/squid/logs