Bug 283669

Summary: www/squid: apply portclippy and portfmt
Product: Ports & Packages Reporter: Pavel Timofeev <timp87>
Component: Individual Port(s)Assignee: Vladimir Druzenko <vvd>
Status: Closed FIXED    
Severity: Affects Some People CC: vvd
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
port patch
timp87: maintainer-approval+
port patch rev 2
timp87: maintainer-approval+
Makefile none

Description Pavel Timofeev 2024-12-27 22:25:44 UTC
Created attachment 256211 [details]
port patch

www/squid: apply portclippy and portfmt
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-12-28 01:00:05 UTC
Default value of GNU_CONFIGURE_MANPREFIX is ${PREFIX}/share:
https://cgit.freebsd.org/ports/tree/Mk/bsd.port.mk#n2713
We can remove it from Makefile.

Can you attach Makefile?
Comment 2 Pavel Timofeev 2024-12-28 02:18:51 UTC
Created attachment 256221 [details]
port patch rev 2

there it is
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2024-12-28 02:31:16 UTC
(In reply to Pavel Timofeev from comment #2)
Attach please just Makefile too (not patch). Thanks.
Comment 4 Pavel Timofeev 2024-12-28 03:23:50 UTC
Created attachment 256222 [details]
Makefile
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-12-28 13:23:20 UTC
Prevent silent grab security/nettle:

www/squid/files/patch-configure:
--- configure.orig      2024-10-11 07:24:17 UTC
+++ configure
@@ -29452,7 +29452,7 @@ fi
 fi


-if test "x$with_nettle" != "xno"]
+if test "x$with_nettle" != "xno"
 then :


@@ -44043,7 +44043,10 @@ else $as_nop

 else $as_nop

-  BUILD_HELPER=""
+# XXX: On FreeBSD we have to do this to make NIS work
+# until https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188247
+# is resolved.
+  BUILD_HELPER="NIS"

 fi

@@ -50892,6 +50895,7 @@ ac_fn_cxx_check_type "$LINENO" "cpu_set_t" "ac_cv_type

 ac_fn_cxx_check_type "$LINENO" "cpu_set_t" "ac_cv_type_cpu_set_t" "
 #if HAVE_SCHED_H
+#define _WITH_CPU_SET_T
 #include <sched.h>
 #endif

@@ -53860,6 +53864,7 @@ else $as_nop
 #       include <sys/ioccom.h>
 #       include <netinet/in.h>
 #undef minor_t
+#       include <net/if.h>     /* IFNAMSIZ */
 #       include <netinet/ip_compat.h>
 #       include <netinet/ip_fil.h>
 #       include <netinet/ip_nat.h>

This is upstream bug - can you report it to developers of the squid?
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2024-12-28 13:40:59 UTC
(In reply to Vladimir Druzenko from comment #6)
-                http://www.squid-cache.org/%SUBDIR%/
+                https://www.squid-cache.org/%SUBDIR%/
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2024-12-28 14:05:56 UTC
(In reply to Vladimir Druzenko from comment #5)
Look like bug is here: https://github.com/squid-cache/squid/blob/v6/configure.ac#L1046
- AS_IF(test "x$with_nettle" != "xno"],[
+ AS_IF([test "x$with_nettle" != "xno"],[

https://github.com/squid-cache/squid/pull/937#issuecomment-2564333146
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2024-12-29 15:19:08 UTC
I'll commit my nettle patch and http => https.
Comment 10 Pavel Timofeev 2024-12-29 15:58:35 UTC
(In reply to Vladimir Druzenko from comment #9)
Thank you so much! I will create a PR for upstream with this nettle patch later today.

I have limited time this weekend, so sorry for the silence.
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2024-12-29 16:55:09 UTC
(In reply to Pavel Timofeev from comment #10)
I already reported to upstream (with patch) and they committed it.
Comment 12 commit-hook freebsd_committer freebsd_triage 2024-12-29 16:59:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9fae06866ad741b7c3458896f18c851b33678d9a

commit 9fae06866ad741b7c3458896f18c851b33678d9a
Author:     Pavel Timofeev <timp87@gmail.com>
AuthorDate: 2024-12-29 16:55:36 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-12-29 16:58:59 +0000

    www/squid: Improve port: apply portclippy and portfmt, fix silent grab security/nettle

    Upstream bug report about silent grab security/nettle:
    https://github.com/squid-cache/squid/pull/937#issuecomment-2564333146

    PR:     283669

 www/squid/Makefile              | 297 ++++++++++++++++++++--------------------
 www/squid/files/patch-configure |  17 ++-
 2 files changed, 158 insertions(+), 156 deletions(-)
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2024-12-29 17:01:30 UTC
Thanks.
Comment 14 Pavel Timofeev 2024-12-29 17:54:26 UTC
(In reply to Vladimir Druzenko from comment #11)
thank you so much!
Comment 15 commit-hook freebsd_committer freebsd_triage 2024-12-29 22:47:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=232af3da18def9214594078f4307e3dff159ec0b

commit 232af3da18def9214594078f4307e3dff159ec0b
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-12-29 22:37:12 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-12-29 22:37:12 +0000

    www/squid: Removing accidentally added default option AUTH_LDAP

    PR:             283669
    Reported by:    yasu (via email)
    Fixes:          9fae06866ad7 (Improve port: apply portclippy and portfmt, fix silent grab security/nettle)

 www/squid/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)