Bug 223505 - www/squid Enable PCRE regexp
Summary: www/squid Enable PCRE regexp
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-08 01:05 UTC by OlivierW
Modified: 2017-12-14 04:28 UTC (History)
2 users (show)

See Also:
timp87: maintainer-feedback+


Attachments
Add "PCRE" option to the Makefile (893 bytes, patch)
2017-11-08 01:05 UTC, OlivierW
no flags Details | Diff
updated patch (2.41 KB, patch)
2017-12-13 02:57 UTC, Steve Wills
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description OlivierW 2017-11-08 01:05:48 UTC
Created attachment 187833 [details]
Add "PCRE" option to the Makefile

Hello,

I'm currently migrating my Squid from Debian to FreeBSD and I want to reuse all my rules/ACL.

I'm using quite a lot of "url_regex" pattern matching but on FreeBSD I encountered errors like: "repetition-operator operand invalid".

I found out Squid needed to be compiled with PCRE by using LDFLAGS="-lpcreposix -lpcre". Source: http://squid-web-proxy-cache.1019090.n4.nabble.com/Regex-Problem-Squid-3-0STABLE10-td1034824.html

Please find attached a patch which will add a "PCRE" option to the Makefile. This new option is not enabled by default.

I've tested it with Squid 3.5.27 on FreeBSD 11.1 and now Squid does start and my ACLs works.

Best Regards,
Olivier
Comment 1 Pavel Timofeev 2017-11-13 05:29:16 UTC
Comment on attachment 187833 [details]
Add "PCRE" option to the Makefile

Works for me fine.

I'm going to implement this also for www/squid-devel if it's possible
Comment 2 OlivierW 2017-11-14 13:42:58 UTC
Yes, it probably does work also for www/squid-devel.

I'm currently using www/squid 3.5.27 as I am moving from Squid 3.4.8 on Debian Jessie. I didn't want to jump the versions too much :-)
I'll probably switch to www/squid-devel in a few weeks/months when my server will be completely migrated over to FreeBSD.
Comment 3 Steve Wills freebsd_committer 2017-12-13 02:35:51 UTC
Maintainer, please set maintainer approval flag if you approve the patch. (Though I think it might be better to set USES+=localbase.)
Comment 4 Steve Wills freebsd_committer 2017-12-13 02:57:38 UTC
Created attachment 188782 [details]
updated patch

I was wrong, USES=localbase doesn't work in this case. Here's an updated patch which adds the PCRE option, makes it default, because that seems useful enough to make default, sorts the options, bumps PORTREVISION and cleans up by removing some old commented things. Please take a look and approve if you agree. (Mark the old patch obsolete if you like too.)
Comment 5 Pavel Timofeev 2017-12-13 09:23:39 UTC
Comment on attachment 187833 [details]
Add "PCRE" option to the Makefile

Looks like setting maintainer-approval is not working
Comment 6 Pavel Timofeev 2017-12-13 09:24:09 UTC
Comment on attachment 188782 [details]
updated patch

Setting this to '+'
Comment 7 Pavel Timofeev 2017-12-13 09:24:37 UTC
Comment on attachment 187833 [details]
Add "PCRE" option to the Makefile

setting to '-'
Comment 8 Steve Wills freebsd_committer 2017-12-13 15:05:07 UTC
(In reply to timp87 from comment #7)
Are you approving the new patch or the old one? Hopefully the new one. :) Click the "Details" link next to the patch and then "maintainer-approval" there. Sorry, bugzilla isn't as easy to use as it could be.
Comment 9 Pavel Timofeev 2017-12-13 18:36:53 UTC
Comment on attachment 188782 [details]
updated patch

maintainer-approval+
The new one
Comment 10 commit-hook freebsd_committer 2017-12-13 18:41:27 UTC
A commit references this bug:

Author: swills
Date: Wed Dec 13 18:40:31 UTC 2017
New revision: 456224
URL: https://svnweb.freebsd.org/changeset/ports/456224

Log:
  www/squid: Enable PCRE support

  PR:		223505
  Submitted by:	OlivierW <olivierw1+bugzilla-freebsd@hotmail.com> (inspired by)
  Approved by:	timp87@gmail.com (maintainer)

Changes:
  head/www/squid/Makefile
Comment 11 Steve Wills freebsd_committer 2017-12-13 18:41:47 UTC
Committed, thanks!
Comment 12 OlivierW 2017-12-13 22:33:18 UTC
Hello :-)

Thanks for the new patch and commit!
There's a small typo, it should be "PORTREVISION=" instead of "POTREVISION=" (the "R" is missing).

I still haven't found the time to try the patch on www/squid-devel. I hope soon.

Best Regards,
Olivier
Comment 13 Pavel Timofeev 2017-12-14 04:28:15 UTC
(In reply to OlivierW from comment #12)
Thank you for the correction!

I'm testing it right now for www/squid-devel
I'll create a separate PR for that.