Browse Source

squid-5.2-1

Tomohiro "Tomo-p" KATO 2 years ago
parent
commit
a87886ce84
1 changed files with 39 additions and 33 deletions
  1. 39 33
      s/squid/squid-vl.spec

+ 39 - 33
s/squid/squid-vl.spec

@@ -9,7 +9,7 @@ Summary:        The Squid proxy caching server
 Summary(ja):    Squid ウェブプロキシキャッシュ
 Name:           squid
 Epoch:          7
-Version:        4.15
+Version:        5.2
 Release:        1%{?_dist_release}%{?with_systemd:.systemd}
 Group:          servers
 Vendor:         Project Vine
@@ -17,7 +17,7 @@ Distribution:   Vine Linux
 
 License:        GPLv2+
 URL:            http://www.squid-cache.org
-Source0:        http://www.squid-cache.org/Versions/v4/%{name}-%{version}.tar.xz
+Source0:        http://www.squid-cache.org/Versions/v5/%{name}-%{version}.tar.xz
 Source1:        %{name}.init
 Source2:        %{name}.logrotate
 Source3:        %{name}.sysconfig
@@ -25,13 +25,20 @@ Source4:        %{name}.pam
 Source5:        %{name}.service
 Source6:        cache_swap.sh
 
-Patch1:         0001-config.patch
-Patch2:         0002-location.patch
-Patch3:         0003-perlpath.patch
+Patch201:       squid-4.0.11-config.patch
+Patch202:       squid-3.1.0.9-location.patch
+Patch203:       squid-3.0.STABLE1-perlpath.patch
+Patch204:       squid-3.5.9-include-guards.patch
+# revert this upstream patch - https://bugzilla.redhat.com/show_bug.cgi?id=1936422
+# workaround for #1934919
+Patch205:       squid-5.0.5-symlink-lang-err.patch
+Patch206:       squid-5.2-openssl3.patch
+# fix -lto build failure
+Patch207:       squid-5.2-test-store-cppsuite.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
 BuildRequires:  openldap-devel pam-devel openssl-devel krb5-devel
-BuildRequires:  cyrus-sasl-devel libcap-devel libdb-devel
+BuildRequires:  cyrus-sasl-devel libcap-devel libtdb-devel
 Requires:       bash >= 2.0
 Requires(pre):  shadow-utils
 %if %{with systemd}
@@ -74,18 +81,17 @@ Squid は、メインのサーバプログラム squid と、 Domain Name System
 
 
 %prep
-%autosetup -p1
+%setup -q
+%patch201 -p1 -b .config
+%patch202 -p1 -b .location
+%patch203 -p1 -b .perlpath
+%patch204 -p0 -b .include-guards
+%patch205 -p1 -R -b .symlink-lang-err
+%patch206 -p1 -b .openssl3
+%patch207 -p1 -b .flto
 
 
 %build
-TIRPC_CFLAGS=$(pkg-config --cflags libtirpc)
-TIRPC_LIBS=$(pkg-config --libs libtirpc)
-RPM_OPT_FLAGS="%{optflags} -Wno-stringop-truncation $TIRPC_CFLAGS"
-# added -Wno-cpp for glibc >= 2.30
-CXXFLAGS="$RPM_OPT_FLAGS -fPIC -Wno-cpp"
-CFLAGS="$RPM_OPT_FLAGS -fPIC -Wno-cpp"
-LDFLAGS="$RPM_LD_FLAGS -pie -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel"
-
 %configure \
    --libexecdir=%{_libdir}/%{name} \
    --datadir=%{_datadir}/%{name} \
@@ -96,11 +102,11 @@ LDFLAGS="$RPM_LD_FLAGS -pie -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel"
    --enable-follow-x-forwarded-for \
    --enable-arp-acl \
    --enable-auth \
-   --enable-auth-basic="DB,LDAP,NCSA,NIS,PAM,POP3,SASL,SMB,getpwnam" \
-   --enable-auth-digest="file,LDAP,eDirectory" \
-   --enable-auth-negotiate="kerberos" \
+   --enable-auth-basic="DB,fake,getpwnam,LDAP,NCSA,PAM,POP3,SASL,SMB,SMB_LM" \
    --enable-auth-ntlm="SMB_LM,fake" \
-   --enable-external-acl-helpers="LDAP_group,time_quota,session,unix_group,wbinfo_group" \
+   --enable-auth-digest="file,LDAP" \
+   --enable-auth-negotiate="kerberos" \
+   --enable-external-acl-helpers="LDAP_group,time_quota,session,unix_group,wbinfo_group,kerberos_ldap_group" \
    --enable-cache-digests \
    --enable-cachemgr-hostname=localhost \
    --enable-delay-pools \
@@ -128,10 +134,17 @@ LDFLAGS="$RPM_LD_FLAGS -pie -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel"
    --with-openssl \
    --with-pthreads \
    --disable-arch-native \
+   --disable-security-cert-validators \
+   --disable-strict-error-checking \
 %if %{with systemd}
    --with-pidfile='/run/squid.pid' \
 %endif
-   --with-pic
+  %{nil}
+
+# workaround to build squid v5
+mkdir -p src/icmp/tests
+mkdir -p tools/squidclient/tests
+mkdir -p tools/tests
 
 %{__make} \
     %{?_smp_mflags} \
@@ -261,19 +274,7 @@ fi
 # Program Files
 %attr(0755,root,root) %{_sbindir}/%{name}
 %attr(0755,root,root) %{_bindir}/*
-%attr(0755,root,root) %{_libdir}/%{name}/cachemgr.cgi
-%attr(4750,root,%{name}) %{_libdir}/%{name}/basic_*
-%attr(4750,root,%{name}) %{_libdir}/%{name}/digest_*
-%attr(4750,root,%{name}) %{_libdir}/%{name}/diskd
-%attr(4750,root,%{name}) %{_libdir}/%{name}/ext_*
-%attr(4750,root,%{name}) %{_libdir}/%{name}/helper*
-%attr(4750,root,%{name}) %{_libdir}/%{name}/log_*
-%attr(4750,root,%{name}) %{_libdir}/%{name}/negotiate_*
-%attr(4750,root,%{name}) %{_libdir}/%{name}/ntlm_*
-%attr(4750,root,%{name}) %{_libdir}/%{name}/security_*
-%attr(4750,root,%{name}) %{_libdir}/%{name}/storeid_*
-%attr(4750,root,%{name}) %{_libdir}/%{name}/unlinkd
-%attr(4750,root,%{name}) %{_libdir}/%{name}/url_*
+%attr(0755,root,root) %{_libdir}/%{name}/*
 # Config Files
 %if %{with systemd}
 %attr(0644,root,root) %{_unitdir}/%{name}.service
@@ -307,6 +308,11 @@ fi
 
 
 %changelog
+* Wed Oct 06 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.2-1
+- new upstream release.
+- replaced all patches.
+- built with openssl-3.0.0.
+
 * Wed May 12 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.15-1
 - new upstream release.