123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392 |
- %bcond_with systemd
- %define uid 23
- %define gid 23
- %define _unpackaged_files_terminate_build 1
- Summary: The Squid proxy caching server
- Summary(ja): Squid ウェブプロキシキャッシュ
- Name: squid
- Epoch: 7
- Version: 5.6
- Release: 1%{?_dist_release}%{?with_systemd:.systemd}
- Group: servers
- Vendor: Project Vine
- Distribution: Vine Linux
- License: GPLv2+
- URL: http://www.squid-cache.org
- Source0: http://www.squid-cache.org/Versions/v5/%{name}-%{version}.tar.xz
- Source1: %{name}.init
- Source2: %{name}.logrotate
- Source3: %{name}.sysconfig
- Source4: %{name}.pam
- Source5: %{name}.service
- Source6: cache_swap.sh
- 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 libtdb-devel
- Requires: bash >= 2.0
- Requires(pre): shadow-utils
- %if %{with systemd}
- %{?systemd_requires}
- %else
- Requires(post): %{_syssbindir}/chkconfig
- Requires(preun): %{_syssbindir}/chkconfig
- %endif
- Conflicts: squid30
- Obsoletes: squid-novm
- %description
- Squid is a high-performance proxy caching server for Web clients,
- supporting FTP, gopher, and HTTP data objects. Unlike traditional
- caching software, Squid handles all requests in a single,
- non-blocking, I/O-driven process. Squid keeps meta data and especially
- hot objects cached in RAM, caches DNS lookups, supports non-blocking
- DNS lookups, and implements negative caching of failed requests.
- Squid consists of a main server program squid, a Domain Name System
- lookup program (dnsserver), a program for retrieving FTP data
- (ftpget), and some management and client tools.
- %description -l ja
- Squid はウェブクライアントのための高性能のプロキシキャッシュサーバで、
- FTP, gopher, HTTP データオブジェクトに対応しています。これまでの
- キャッシュソフトウェアと違い、 Squid は全ての要求を、単一の
- ブロックしない I/O ドリブンのプロセスで処理します。 Squid はメタデータや
- ホットなオブジェクトを RAM に保持し、 DNS 問い合わせをキャッシュします。
- ブロック無しの DNS 問い合わせをサポートし、失敗した要求のネガティブ
- キャッシングが実装されています。
- Squid は、メインのサーバプログラム squid と、 Domain Name System
- 問い合わせプログラム (dnsserver) と、 FTP データを取得するプログラム
- (ftpget) と、いくつかの管理用またはクライアントツールから成ります。
- %debug_package
- %prep
- %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
- %configure \
- --libexecdir=%{_libdir}/%{name} \
- --datadir=%{_datadir}/%{name} \
- --sysconfdir=%{_sysconfdir}/%{name} \
- --with-logdir=%{_localstatedir}/log/%{name} \
- --disable-dependency-tracking \
- --enable-eui \
- --enable-follow-x-forwarded-for \
- --enable-arp-acl \
- --enable-auth \
- --enable-auth-basic="DB,fake,getpwnam,LDAP,NCSA,PAM,POP3,SASL,SMB,SMB_LM" \
- --enable-auth-ntlm="SMB_LM,fake" \
- --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 \
- --enable-epoll \
- --enable-icap-client \
- --enable-ident-lookups \
- %ifnarch ppc64 ia64 x86_64 s390x
- --with-large-files \
- %endif
- --enable-linux-netfilter \
- --enable-referer-log \
- --enable-removal-policies="heap,lru" \
- --enable-snmp \
- --enable-ssl \
- --enable-ssl-crtd \
- --enable-storeio="aufs,diskd,ufs,rock" \
- --enable-diskio \
- --enable-useragent-log \
- --enable-wccpv2 \
- --enable-internal-dns \
- --with-aio \
- --with-default-user="%{name}" \
- --with-filedescriptors=16384 \
- --with-dl \
- --with-openssl \
- --with-pthreads \
- --disable-arch-native \
- --disable-security-cert-validators \
- --disable-strict-error-checking \
- %if %{with systemd}
- --with-pidfile='/run/squid.pid' \
- %endif
- %{nil}
- # workaround to build squid v5
- mkdir -p src/icmp/tests
- mkdir -p tools/squidclient/tests
- mkdir -p tools/tests
- %{__make} \
- %{?_smp_mflags} \
- DEFAULT_SWAP_DIR="%{_localstatedir}/cache/%{name}"
- %install
- [ "${RPM_BUILD_ROOT}" != "/" ] && %{__rm} -rf ${RPM_BUILD_ROOT}
- %{__make} install \
- DESTDIR="${RPM_BUILD_ROOT}" \
- DEFAULT_SWAP_DIR="%{_localstatedir}/cache/%{name}"
- echo "
- #
- # This is %{_sysconfdir}/httpd/conf.d/%{name}.conf
- #
- ScriptAlias /Squid/cgi-bin/cachemgr.cgi %{_libdir}/%{name}/cachemgr.cgi
- # Only allow access from localhost by default
- <Location /Squid/cgi-bin/cachemgr.cgi>
- order allow,deny
- allow from localhost.localdomain
- # Add additional allowed hosts as needed
- # allow from .example.com
- </Location>" > ${RPM_BUILD_ROOT}/%{name}.httpd.tmp
- mkdir -p ${RPM_BUILD_ROOT}%{_initdir}
- mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
- mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
- mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d
- mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/
- %if %{with systemd}
- install -Dpm644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service
- install -Dpm755 %{SOURCE6} ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/cache_swap.sh
- %else
- install -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initdir}/%{name}
- %endif
- install -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}
- install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}
- install -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d/%{name}
- install -m 644 ${RPM_BUILD_ROOT}/%{name}.httpd.tmp ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/%{name}.conf
- mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}
- mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}
- chmod 644 contrib/url-normalizer.pl contrib/user-agents.pl
- iconv -f ISO88591 -t UTF8 ChangeLog -o ChangeLog.tmp
- mv -f ChangeLog.tmp ChangeLog
- # remove unpackaged files from the buildroot
- rm -f ${RPM_BUILD_ROOT}/%{name}.httpd.tmp
- %clean
- [ "${RPM_BUILD_ROOT}" != "/" ] && %{__rm} -rf ${RPM_BUILD_ROOT}
- %pretrans
- for l in zh-cn zh-tw; do
- if [ -d /usr/share/squid/errors/$l -a ! -L /usr/share/squid/errors/$l ]; then
- rm -rf /usr/share/squid/errors/$l
- fi
- done
- %pre
- if ! getent group %{name} >/dev/null 2>&1; then
- /usr/sbin/groupadd -g %{gid} %{name}
- fi
- if ! getent passwd %{name} >/dev/null 2>&1 ; then
- /usr/sbin/useradd -g %{gid} -u %{uid} -d %{_localstatedir}/cache/%{name} -r -s /sbin/nologin %{name} >/dev/null 2>&1 || exit 1
- fi
- for i in %{_localstatedir}/log/%{name} %{_localstatedir}/cache/%{name} ; do
- if [ -d $i ] ; then
- for adir in `find $i -maxdepth 0 \! -user %{name}`; do
- chown -R %{name}:%{name} $adir
- done
- fi
- done
- exit 0
- %post
- %if %{with systemd}
- %systemd_post %{name}.service
- %else
- if ! /sbin/chkconfig %{name}; then
- /sbin/chkconfig --add %{name}
- fi
- %endif
- %preun
- %if %{with systemd}
- %systemd_preun %{name}.service
- %else
- if [ "$1" -eq "0" -o -x /bin/systemctl ]; then
- %{_initdir}/%{name} stop
- rm -f %{_localstatedir}/log/%{name}/*
- /sbin/chkconfig --del %{name}
- fi
- %endif
- %postun
- %if %{with systemd}
- %systemd_postun_with_restart %{name}.service
- %else
- if [ "$1" -gt 1 ]; then
- %{_initdir}/%{name} condrestart
- fi
- %endif
- %triggerin -- samba-common
- /usr/sbin/usermod -a -G wbpriv %{name} >/dev/null 2>&1 || \
- chgrp %{name} %{_localstatedir}/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
- %files
- %defattr(-,root,root,-)
- # Directory
- %dir %{_sysconfdir}/%{name}/
- %dir %{_libdir}/%{name}
- %dir %{_datadir}/%{name}
- %attr(0750,%{name},%{name}) %dir %{_localstatedir}/log/%{name}
- %attr(0750,%{name},%{name}) %dir %{_localstatedir}/cache/%{name}
- # Program Files
- %attr(0755,root,root) %{_sbindir}/%{name}
- %attr(0755,root,root) %{_bindir}/*
- %attr(0755,root,root) %{_libdir}/%{name}/*
- # Config Files
- %if %{with systemd}
- %attr(0644,root,root) %{_unitdir}/%{name}.service
- %dir %{_libexecdir}/%{name}
- %attr(0755,root,root) %{_libexecdir}/%{name}/*
- %else
- %attr(0755,root,root) %{_initdir}/%{name}
- %endif
- %attr(0640,root,%{name}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
- %attr(0644,root,%{name}) %config(noreplace) %{_sysconfdir}/%{name}/cachemgr.conf
- %config(noreplace) %{_sysconfdir}/%{name}/mime.conf
- %config(noreplace) %{_sysconfdir}/%{name}/errorpage.css
- %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
- %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
- %config(noreplace) %{_sysconfdir}/pam.d/%{name}
- %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
- # Sample Config Files
- %config %{_sysconfdir}/%{name}/%{name}.conf.default
- %config %{_sysconfdir}/%{name}/cachemgr.conf.default
- %config %{_sysconfdir}/%{name}/mime.conf.default
- %config %{_sysconfdir}/%{name}/errorpage.css.default
- # Data Files
- %{_datadir}/%{name}/*
- # Document Files
- %license COPYING
- %doc README ChangeLog QUICKSTART
- %doc contrib/url-normalizer.pl contrib/user-agents.pl
- %{_mandir}/man8/*
- %{_mandir}/man1/*
- %{_sysconfdir}/%{name}/%{name}.conf.documented
- %changelog
- * Fri Jul 29 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.6-1
- - new upstream release.
- * 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.
- * Tue Mar 02 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.14-1
- - new upstream release.
- * Fri Sep 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.13-1
- - new upstream release.
- * Fri Jul 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.12-1
- - new upstream release.
- * Thu Apr 30 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.11-1
- - new upstream release.
- - added systemd support (disabled as default).
- * Mon Feb 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.10-1
- - new upstream release.
- * Mon Dec 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.9-1
- - new upstream release.
- - added "-Wno-cpp" to CFLAGS/CXXFLAGS for glibc >= 2.30.
- * Thu Aug 29 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.8-1
- - new upstream release.
- * Tue Nov 20 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.4-1
- - new upstream release.
- - update patches.
- * Tue Jan 09 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.27-2
- - enabled a build option: --enable-internal-dns.
- * Wed Sep 06 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.27-1
- - new upstream release.
- - updated Patch203.
- * Wed Jun 29 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.19-1
- - new upstream release.
- * Fri Apr 29 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.17-1
- - new upstream release.
- * Tue Apr 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.16-1
- - new upstream release.
- * Thu Jun 18 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.5-1
- - new upstream release.
- * Mon Jul 7 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.4.6-1
- - new upstream release.
- * Sat Jan 12 2013 Masahiro INOUE <miyabi.-.inoue@nifty.com> 3.1.23-1
- - new upstream release
- * Sat Dec 08 2012 Masahiro INOUE <miyabi.-.inoue@nifty.com> 3.1.22-1
- - new upstream release
- * Thu Nov 22 2012 Masahiro INOUE <miyabi.-.inoue@nifty.com> 3.1.21-1
- - new upstream release
- * Thu Aug 23 2012 Masahiro INOUE <miyabi.-.inoue@nifty.com> 3.1.20-1
- - new upstream release
- * Mon Oct 17 2011 Masahiro INOUE <miyabi.-.inoue@nifty.com> 3.1.16-1
- - new upstream release
- - add BuildRequires - libcap-devel
- * Fri Jun 10 2011 Masahiro INOUE <miyabi.-.inoue@nifty.com> 3.1.12-2
- - files in libexec moved to libdir
- * Tue May 17 2011 Masahiro INOUE <miyabi.-.inoue@nifty.com> 3.1.12-1
- - initial build for Vine Linux
- - This package is based on Vine Linux - squid-3.0.STABLE25-2
|