Created attachment 243412 [details] Patch to update port to squid-6.1 Adding a patch that does the bulk of the work to upgrade www/squid for the recently-released version 6.1, but it probably needs some more massaging before being committed. I am not 100% confident in how I regenerated pkg-plist, because I could not work out the errors/xx-yy/* files that don't seem to be installed by squid by default, so it only includes the errors/templates/* files. Advice on how to get pkg-plist to capture everything would be great. But I think I got most everything else. Updated most of the patches, and had to add a new patch for src/base/RandomUuid.cc to add an "#include <arpa/inet.h>" so that references to htonl/htons/ntohl/ntohs are handled. Also would like extra eyeballs on the change in configure options between squid-5.9 and 6.1. LDAP got a new --without-ldap flag, so I *think* I have that handled right, and several other --enable flags changed to --disable, so I assumed that meant they are now enabled by default. Also added a new (I think?) flag, --enable-arch-native, to the configure args that Makefile passes. Compile test works using my specific set options, but I did not try to rebuild the port with a variety of other options. Upgrading my squid jail and restarting it was seamless. I am sure there are changes I should do to my squid configuration, but those are outside the scope of updating the port.
Thank you for your contribution! I have squid-6x in my private repo. So I'll merge your job and provide a patch this week.
(In reply to Pavel Timofeev from comment #1) No problem! The 6.1 pkg produced by my attempt seems to generally work well, so it seems like a straight-forward update. I still get periodic "Bug: Missing MemObject::storeId value" entries in cache.log, but upstream seems to have not yet found a cause and fix for that. I think it's being tracked under Squid Bug #4527: https://bugs.squid-cache.org/show_bug.cgi?id=4527 I would also look at Squid Bug #5451 and see if any of the commits identified in GH PR#947 or #1421 may be worth applying to the 6.1 port as well. I'm the originator for #5451 cause I was having issues w/ Squid attempting to use IPv6 addresses returned in DNS AAAA records over their IPv4 equivalents, so I disabled IPv6 support in Squid, and that led to the discovery of that assertion being hit, which started writing out pretty huge core files. https://bugs.squid-cache.org/show_bug.cgi?id=5154 https://github.com/squid-cache/squid/pull/947 https://github.com/squid-cache/squid/pull/1421
(In reply to Pavel Timofeev from comment #1) Any progress on this? If not, I'll go ahead and commit Joshua's patch soon.
(In reply to Robert Clausecker from comment #3) Note that my patch is somewhat incomplete, as the pkg-plist does not contain all of the error page translations in the proper order. Not really sure how to get it to do that, as squid-6.x has moved some things around and there's not a whole lot of guidance I can find on those plist files. The current upstream release is also 6.3, so I need to re-roll the patch, as I think I had to tweak one of the squid patches in my local setup. I'll do that shortly, but I think Pavel will still have to fix the pkg-plist file up to be correct, before this gets added to ports.
I promise to provide the patch this weekend
(In reply to Joshua Kinard from comment #4) Usually you make the port install all the files it should install, and then you run "make makeplist" to generate a pkg-plist. Review the plist generated and add @... commands as necessary. @Pavel great!
Created attachment 245134 [details] Patch to update port to squid-6.3 (In reply to Robert Clausecker from comment #6) Yup, I worked that much out. I wasn't sure how Pavel got the additional translations in if they weren't installed. Assumed there was some trick somewhere that I was missing. Attaching an updated patch for squid-6.3. Like the earlier one, the pkg-plist needs some fixups, but this gets most of the way there.
(In reply to Pavel Timofeev from comment #5) So... that was a long weekend. Any progress?
Sorry, having hard time being on-call at job. Working on it now.
(In reply to Joshua Kinard from comment #7) Are you able to complete your patch? I am not certain that we'll see anything from the maintainer any time soon.
(In reply to Robert Clausecker from comment #10) I'll see if I can find some time this weekend to take another look at doing the plist file correctly. Probably just need to stare at it a bit longer and then it'll "click".
Created attachment 245516 [details] port patch from maintainer - update to 6.3 - modernize a few options handling - remove configure args which are default now
Created attachment 245517 [details] port patch 2 from maintainer - reorder a few things and remove useless comment
(In reply to Pavel Timofeev from comment #13) This works good on my end so far. It does look like Squid-6.x no longer installs all of those error translations for some reason. Not sure if that's a fluke in their code or not.
There is option --enable-translation to enable it back. It's off by default now. But as far as I understand they want you to use translation files separately. There is www/squid-langpack port for that, maintained by someone else. BTW, I noticed patch-src_ip_Address.cc patch you provided. Can you describe it?
Hmm, I just thought that it makes sense to update pkg-message with the info about translation. What do you think?
Patch appears reasonable, thank you for getting around to write it. Could you link to the changelog(s) for the update so I can include it/them in the commit message? > Hmm, I just thought that it makes sense to update pkg-message with the info about translation. What do you think? It's okay. You could have also added e.g. an NLS option that adds the error messages port as a dependency and amends the sample configuration file to point to it, but this way is good enough.
A brief changelog is http://www.squid-cache.org/Versions/v6/squid-6.3-RELEASENOTES.html More detailed one is at the github https://github.com/squid-cache/squid/blob/4f23290eeee307adf23eeb89b934677611b71304/ChangeLog#L1-L152
Created attachment 245532 [details] port patch 3 from maintainer Added pkg-message entry for translated error messages
(In reply to Pavel Timofeev from comment #15) > > BTW, I noticed patch-src_ip_Address.cc patch you provided. Can you describe it? > I honestly forgot about that one. It's a proposed fix from Alex Rousskov on a Squid bug I filed back in 2021 regarding Squid's handling of IPv6 and IPv4 when both are seemingly available on a network: https://bugs.squid-cache.org/show_bug.cgi?id=5154 https://github.com/squid-cache/squid/pull/1421/commits/a3b22cced0339be9348d70dd8c6b502399d06bcb Squid got rid of the 'dns_v4_first' option a while back, so it favors IPv6 AAAA records coming back in DNS over IPv4 A records when determining which one to use. The bug above was citing a case of some daffy logic handling over this, which when combined with my local Unbound resolver returning 0.0.0.0 addressing for blocked domains (in 2021; I use RPZ now), was triggering a crash in a squid kid, which in turn caused Squid to simply refuse to connect to the site. Fun one to chase down. Technically still unresolved, and that patch is based off the latest upstream pull request to fix it, but it hasn't been approved yet. You can ignore it in this case. I'll need to keep better notes to not let experimental patches slip in again next time.
(In reply to Joshua Kinard from comment #20) Thanks a lot for the explanation!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=53134607143382ef9029f30acd586d53183efc39 commit 53134607143382ef9029f30acd586d53183efc39 Author: Pavel Timofeev <timp87@gmail.com> AuthorDate: 2023-10-09 17:05:14 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-10-11 06:04:38 +0000 www/squid: update to 6.3 Error message translation files are now part of www/squid-langpack. Changelog: http://www.squid-cache.org/Versions/v6/squid-6.3-RELEASENOTES.html PR: 272524 www/squid/Makefile | 53 +- www/squid/distinfo | 6 +- www/squid/files/patch-compat_shm.cc | 4 +- www/squid/files/patch-configure | 15 +- www/squid/files/patch-include_squid.h | 4 +- www/squid/files/patch-src-cf.data.pre | 4 +- .../files/patch-src_DiskIO_Mmapped_MmappedFile.cc | 6 +- www/squid/files/patch-src_base_RandomUuid.cc (new) | 10 + www/squid/files/patch-src_ip_Intercept.cc | 6 +- www/squid/files/patch-src_ipc_mem_Segment.cc | 9 +- www/squid/files/patch-src_tools.cc | 4 +- www/squid/files/pkg-message.in | 3 + www/squid/pkg-plist | 2121 +------------------- 13 files changed, 76 insertions(+), 2169 deletions(-)
Thank you for your contribution.
A commit in branch 2023Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=88b1e50105abae8c3b0cedec0edc3b0d55e99991 commit 88b1e50105abae8c3b0cedec0edc3b0d55e99991 Author: Pavel Timofeev <timp87@gmail.com> AuthorDate: 2023-10-09 17:05:14 +0000 Commit: Joel Bodenmann <jbo@FreeBSD.org> CommitDate: 2023-10-26 12:43:10 +0000 www/squid: update to 6.3 Error message translation files are now part of www/squid-langpack. Changelog: http://www.squid-cache.org/Versions/v6/squid-6.3-RELEASENOTES.html PR: 272524 (cherry picked from commit 53134607143382ef9029f30acd586d53183efc39) www/squid/Makefile | 53 +- www/squid/distinfo | 6 +- www/squid/files/patch-compat_shm.cc | 4 +- www/squid/files/patch-configure | 15 +- www/squid/files/patch-include_squid.h | 4 +- www/squid/files/patch-src-cf.data.pre | 4 +- .../files/patch-src_DiskIO_Mmapped_MmappedFile.cc | 6 +- www/squid/files/patch-src_base_RandomUuid.cc (new) | 10 + www/squid/files/patch-src_ip_Intercept.cc | 6 +- www/squid/files/patch-src_ipc_mem_Segment.cc | 9 +- www/squid/files/patch-src_tools.cc | 4 +- www/squid/files/pkg-message.in | 3 + www/squid/pkg-plist | 2121 +------------------- 13 files changed, 76 insertions(+), 2169 deletions(-)