[521] | 1 | %define __perl_requires %{SOURCE98} |
---|
| 2 | |
---|
[3860] | 3 | Name: squid30 |
---|
[3022] | 4 | Version: 3.0.STABLE25 |
---|
[3860] | 5 | Release: 3%{_dist_release} |
---|
[521] | 6 | Summary: The Squid proxy caching server |
---|
| 7 | Summary(ja): Squid ウェブプロキシキャッシュ |
---|
| 8 | Epoch: 7 |
---|
| 9 | License: GPLv2+ |
---|
| 10 | Group: System Environment/Daemons |
---|
| 11 | URL: http://www.squid-cache.org |
---|
| 12 | Source: http://www.squid-cache.org/Squid/Versions/v3/3.0/squid-%{version}.tar.bz2 |
---|
| 13 | Source1: FAQ.sgml |
---|
| 14 | Source2: squid.init |
---|
| 15 | Source3: squid.logrotate |
---|
| 16 | Source4: squid.sysconfig |
---|
| 17 | Source5: squid.pam |
---|
| 18 | Source98: perl-requires-squid.sh |
---|
| 19 | |
---|
| 20 | # Upstream patches |
---|
| 21 | #Patch001: http://www.squid-cache.org/Versions/v3/3.0/changesets/bXXXX.patch |
---|
[3022] | 22 | Patch002: http://www.squid-cache.org/Versions/v3/3.0/changesets/squid-3.0-9189.patch |
---|
[521] | 23 | |
---|
| 24 | # External patches |
---|
| 25 | |
---|
| 26 | # Local patches |
---|
| 27 | # Applying upstream patches first makes it less likely that local patches |
---|
| 28 | # will break upstream ones. |
---|
| 29 | Patch201: squid-3.0.STABLE1-config.patch |
---|
| 30 | Patch202: squid-3.0.STABLE1-location.patch |
---|
| 31 | Patch203: squid-3.0.STABLE15-build.patch |
---|
| 32 | Patch204: squid-3.0.STABLE1-perlpath.patch |
---|
| 33 | Patch205: squid-3.0.STABLE1-smb-path.patch |
---|
| 34 | Patch208: squid-3.0.STABLE7-from_manpg.patch |
---|
| 35 | |
---|
[3864] | 36 | Buildroot: %{_tmppath}/squid-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
[521] | 37 | Requires: bash >= 2.0 |
---|
| 38 | Requires(pre): shadow-utils |
---|
| 39 | Requires(post): /sbin/chkconfig |
---|
| 40 | Requires(preun): /sbin/service /sbin/chkconfig |
---|
| 41 | Requires(postun): /sbin/service |
---|
| 42 | BuildRequires: openjade linuxdoc-tools |
---|
| 43 | BuildRequires: openldap-devel pam-devel openssl-devel krb5-devel |
---|
| 44 | BuildRequires: cyrus-sasl-devel |
---|
| 45 | |
---|
[3897] | 46 | Conflicts: squid >= 7:3.1 |
---|
[521] | 47 | Obsoletes: squid-novm |
---|
| 48 | # Obsoletes: squid26 |
---|
[3897] | 49 | Obsoletes: squid <= 7:3.0.STABLE25 |
---|
[521] | 50 | |
---|
| 51 | %description |
---|
| 52 | Squid is a high-performance proxy caching server for Web clients, |
---|
| 53 | supporting FTP, gopher, and HTTP data objects. Unlike traditional |
---|
| 54 | caching software, Squid handles all requests in a single, |
---|
| 55 | non-blocking, I/O-driven process. Squid keeps meta data and especially |
---|
| 56 | hot objects cached in RAM, caches DNS lookups, supports non-blocking |
---|
| 57 | DNS lookups, and implements negative caching of failed requests. |
---|
| 58 | |
---|
| 59 | Squid consists of a main server program squid, a Domain Name System |
---|
| 60 | lookup program (dnsserver), a program for retrieving FTP data |
---|
| 61 | (ftpget), and some management and client tools. |
---|
| 62 | |
---|
| 63 | %description -l ja |
---|
| 64 | Squid はウェブクライアントのための高性能のプロキシキャッシュサーバで、 |
---|
| 65 | FTP, gopher, HTTP データオブジェクトに対応しています。これまでの |
---|
| 66 | キャッシュソフトウェアと違い、 Squid は全ての要求を、単一の |
---|
| 67 | ブロックしない I/O ドリブンのプロセスで処理します。 Squid はメタデータや |
---|
| 68 | ホットなオブジェクトを RAM に保持し、 DNS 問い合わせをキャッシュします。 |
---|
| 69 | ブロック無しの DNS 問い合わせをサポートし、失敗した要求のネガティブ |
---|
| 70 | キャッシングが実装されています。 |
---|
| 71 | |
---|
| 72 | Squid は、メインのサーバプログラム squid と、 Domain Name System |
---|
| 73 | 問い合わせプログラム (dnsserver) と、 FTP データを取得するプログラム |
---|
| 74 | (ftpget) と、いくつかの管理用またはクライアントツールから成ります。 |
---|
| 75 | |
---|
| 76 | %prep |
---|
[3864] | 77 | %setup -q -n squid-%{version} |
---|
[521] | 78 | |
---|
[3022] | 79 | %patch002 -p0 -b .CVE-2010-3072 |
---|
| 80 | |
---|
[521] | 81 | %patch201 -p1 -b .config |
---|
| 82 | %patch202 -p1 -b .location |
---|
| 83 | %patch203 -p1 -b .build |
---|
| 84 | %patch204 -p1 -b .perlpath |
---|
| 85 | %patch205 -p1 -b .smb-path |
---|
| 86 | %patch208 -p1 -b .from_manpg |
---|
| 87 | |
---|
| 88 | %build |
---|
| 89 | export CXXFLAGS="-fPIE %{optflags}" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char %{optflags}" ; export LDFLAGS="-pie" ; |
---|
| 90 | %configure \ |
---|
| 91 | --exec_prefix=/usr \ |
---|
| 92 | --bindir=%{_sbindir} \ |
---|
| 93 | --libexecdir=%{_libdir}/squid \ |
---|
| 94 | --localstatedir=/var \ |
---|
| 95 | --datadir=%{_datadir} \ |
---|
| 96 | --sysconfdir=/etc/squid \ |
---|
| 97 | --disable-dependency-tracking \ |
---|
| 98 | --enable-arp-acl \ |
---|
| 99 | --enable-auth="basic,digest,ntlm,negotiate" \ |
---|
| 100 | --enable-basic-auth-helpers="LDAP,MSNT,NCSA,PAM,SMB,YP,getpwnam,multi-domain-NTLM,SASL" \ |
---|
| 101 | --enable-negotiate-auth-helpers="squid_kerb_auth" \ |
---|
| 102 | --enable-cache-digests \ |
---|
| 103 | --enable-cachemgr-hostname=localhost \ |
---|
| 104 | --enable-delay-pools \ |
---|
| 105 | --enable-digest-auth-helpers="password" \ |
---|
| 106 | --enable-epoll \ |
---|
| 107 | --enable-external-acl-helpers="ip_user,ldap_group,unix_group,wbinfo_group" \ |
---|
| 108 | --enable-icap-client \ |
---|
| 109 | --enable-ident-lookups \ |
---|
| 110 | %ifnarch ppc64 ia64 x86_64 s390x |
---|
| 111 | --with-large-files \ |
---|
| 112 | %endif |
---|
| 113 | --enable-linux-netfilter \ |
---|
| 114 | --enable-ntlm-auth-helpers="SMB,fakeauth" \ |
---|
| 115 | --enable-referer-log \ |
---|
| 116 | --enable-removal-policies="heap,lru" \ |
---|
| 117 | --enable-snmp \ |
---|
| 118 | --enable-ssl \ |
---|
| 119 | --enable-storeio="aufs,diskd,null,ufs" \ |
---|
| 120 | --enable-useragent-log \ |
---|
| 121 | --enable-wccpv2 \ |
---|
| 122 | --with-aio \ |
---|
| 123 | --with-default-user="squid" \ |
---|
| 124 | --with-filedescriptors=16384 \ |
---|
| 125 | --with-dl \ |
---|
| 126 | --with-pthreads |
---|
| 127 | |
---|
| 128 | # following options are disabled by vine |
---|
| 129 | # --with-openssl=/usr/kerberos \ |
---|
| 130 | |
---|
| 131 | # following options are no longer supported |
---|
| 132 | # --with-winbind-auth-challenge \ |
---|
| 133 | # --enable-follow-x-forwarded-for \ |
---|
| 134 | # --enable-fd-config \ |
---|
| 135 | # --with-maxfd=16384 \ |
---|
| 136 | # --enable-underscores \ |
---|
| 137 | |
---|
| 138 | export CXXFLAGS="-fPIE" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char" ; export LDFLAGS="-pie" ; |
---|
| 139 | make %{?_smp_mflags} |
---|
| 140 | |
---|
| 141 | mkdir faq |
---|
| 142 | cp %{SOURCE1} faq |
---|
| 143 | cd faq |
---|
| 144 | sgml2html FAQ.sgml |
---|
| 145 | |
---|
| 146 | %install |
---|
| 147 | rm -rf $RPM_BUILD_ROOT |
---|
| 148 | %makeinstall \ |
---|
| 149 | sysconfdir=$RPM_BUILD_ROOT/etc/squid \ |
---|
| 150 | localstatedir=$RPM_BUILD_ROOT/var \ |
---|
| 151 | bindir=$RPM_BUILD_ROOT/%{_sbindir} \ |
---|
| 152 | libexecdir=$RPM_BUILD_ROOT/%{_libdir}/squid |
---|
| 153 | echo " |
---|
| 154 | # |
---|
| 155 | # This is /etc/httpd/conf.d/squid.conf |
---|
| 156 | # |
---|
| 157 | |
---|
| 158 | ScriptAlias /Squid/cgi-bin/cachemgr.cgi %{_libdir}/squid/cachemgr.cgi |
---|
| 159 | |
---|
| 160 | # Only allow access from localhost by default |
---|
| 161 | <Location /Squid/cgi-bin/cachemgr.cgi> |
---|
| 162 | order allow,deny |
---|
| 163 | allow from localhost.localdomain |
---|
| 164 | # Add additional allowed hosts as needed |
---|
| 165 | # allow from .example.com |
---|
| 166 | </Location>" > $RPM_BUILD_ROOT/squid.httpd.tmp |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | ln -s ../../%{_datadir}/squid/errors/English $RPM_BUILD_ROOT/etc/squid/errors |
---|
| 170 | ln -s ../../%{_datadir}/squid/icons $RPM_BUILD_ROOT/etc/squid/icons |
---|
| 171 | |
---|
| 172 | mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d |
---|
| 173 | mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d |
---|
| 174 | mkdir -p $RPM_BUILD_ROOT/etc/sysconfig |
---|
| 175 | mkdir -p $RPM_BUILD_ROOT/etc/pam.d |
---|
| 176 | mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d/ |
---|
| 177 | install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/squid |
---|
| 178 | install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/squid |
---|
| 179 | install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/squid |
---|
| 180 | install -m 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/squid |
---|
| 181 | install -m 644 $RPM_BUILD_ROOT/squid.httpd.tmp $RPM_BUILD_ROOT/etc/httpd/conf.d/squid.conf |
---|
| 182 | mkdir -p $RPM_BUILD_ROOT/var/log/squid |
---|
| 183 | mkdir -p $RPM_BUILD_ROOT/var/spool/squid |
---|
| 184 | chmod 644 contrib/url-normalizer.pl contrib/rredir.* contrib/user-agents.pl |
---|
| 185 | iconv -f ISO88591 -t UTF8 ChangeLog -o ChangeLog.tmp |
---|
| 186 | mv -f ChangeLog.tmp ChangeLog |
---|
| 187 | |
---|
| 188 | # remove unpackaged files from the buildroot |
---|
| 189 | rm -f $RPM_BUILD_ROOT%{_sbindir}/{RunAccel,RunCache} |
---|
| 190 | rm -f $RPM_BUILD_ROOT/squid.httpd.tmp |
---|
| 191 | |
---|
| 192 | %clean |
---|
| 193 | rm -rf $RPM_BUILD_ROOT |
---|
| 194 | |
---|
| 195 | %files |
---|
| 196 | %defattr(-,root,root,-) |
---|
| 197 | %doc faq/*\.html README ChangeLog QUICKSTART |
---|
| 198 | %doc contrib/url-normalizer.pl contrib/rredir.* contrib/user-agents.pl |
---|
| 199 | |
---|
| 200 | %attr(755,root,root) %dir /etc/squid |
---|
| 201 | %attr(755,root,root) %dir %{_libdir}/squid |
---|
| 202 | %attr(750,squid,squid) %dir /var/log/squid |
---|
| 203 | %attr(750,squid,squid) %dir /var/spool/squid |
---|
| 204 | %attr(4750,root,squid) %{_libdir}/squid/ncsa_auth |
---|
| 205 | %attr(4750,root,squid) %{_libdir}/squid/pam_auth |
---|
| 206 | |
---|
| 207 | %config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/squid.conf |
---|
| 208 | %config(noreplace) %attr(640,root,squid) /etc/squid/squid.conf |
---|
| 209 | %config(noreplace) %attr(644,root,squid) /etc/squid/cachemgr.conf |
---|
| 210 | %config(noreplace) /etc/squid/mime.conf |
---|
| 211 | %config(noreplace) /etc/sysconfig/squid |
---|
| 212 | %config(noreplace) /etc/squid/msntauth.conf |
---|
| 213 | %config(noreplace) /etc/squid/mib.txt |
---|
| 214 | # These are not noreplace because they are just sample config files |
---|
| 215 | %config /etc/squid/msntauth.conf.default |
---|
| 216 | %config /etc/squid/squid.conf.default |
---|
| 217 | %config /etc/squid/mime.conf.default |
---|
| 218 | %config /etc/squid/cachemgr.conf.default |
---|
| 219 | %config(noreplace) /etc/pam.d/squid |
---|
| 220 | %config(noreplace) /etc/logrotate.d/squid |
---|
| 221 | |
---|
| 222 | %config(noreplace) /etc/squid/errors |
---|
| 223 | %dir %{_datadir}/squid |
---|
| 224 | %attr(-,root,root) %{_datadir}/squid/errors |
---|
| 225 | %attr(-,root,root) /etc/squid/icons |
---|
| 226 | %attr(755,root,root) /etc/rc.d/init.d/squid |
---|
| 227 | %{_datadir}/squid/icons |
---|
| 228 | %{_sbindir}/squid |
---|
| 229 | %{_sbindir}/squidclient |
---|
| 230 | %{_mandir}/man8/* |
---|
| 231 | %{_libdir}/squid/* |
---|
| 232 | |
---|
| 233 | %pre |
---|
| 234 | if ! getent group squid >/dev/null 2>&1; then |
---|
| 235 | /usr/sbin/groupadd -g 23 squid |
---|
| 236 | fi |
---|
| 237 | |
---|
| 238 | if ! getent passwd squid >/dev/null 2>&1 ; then |
---|
| 239 | /usr/sbin/useradd -g 23 -u 23 -d /var/spool/squid -r -s /sbin/nologin squid >/dev/null 2>&1 || exit 1 |
---|
| 240 | fi |
---|
| 241 | |
---|
| 242 | for i in /var/log/squid /var/spool/squid ; do |
---|
| 243 | if [ -d $i ] ; then |
---|
| 244 | for adir in `find $i -maxdepth 0 \! -user squid`; do |
---|
| 245 | chown -R squid:squid $adir |
---|
| 246 | done |
---|
| 247 | fi |
---|
| 248 | done |
---|
| 249 | |
---|
| 250 | exit 0 |
---|
| 251 | |
---|
| 252 | %post |
---|
| 253 | /sbin/chkconfig --add squid |
---|
| 254 | if [ $1 = 0 ]; then |
---|
| 255 | case "$LANG" in |
---|
| 256 | bg*) |
---|
| 257 | DIR=Bulgarian |
---|
| 258 | ;; |
---|
| 259 | ca*) |
---|
| 260 | DIR=Catalan |
---|
| 261 | ;; |
---|
| 262 | cs*) |
---|
| 263 | DIR=Czech |
---|
| 264 | ;; |
---|
| 265 | da*) |
---|
| 266 | DIR=Danish |
---|
| 267 | ;; |
---|
| 268 | nl*) |
---|
| 269 | DIR=Dutch |
---|
| 270 | ;; |
---|
| 271 | en*) |
---|
| 272 | DIR=English |
---|
| 273 | ;; |
---|
| 274 | ea*) |
---|
| 275 | DIR=Estonian |
---|
| 276 | ;; |
---|
| 277 | fi*) |
---|
| 278 | DIR=Finnish |
---|
| 279 | ;; |
---|
| 280 | fr*) |
---|
| 281 | DIR=French |
---|
| 282 | ;; |
---|
| 283 | de*) |
---|
| 284 | DIR=German |
---|
| 285 | ;; |
---|
| 286 | he*) |
---|
| 287 | DIR=Hebrew |
---|
| 288 | ;; |
---|
| 289 | hu*) |
---|
| 290 | DIR=Hungarian |
---|
| 291 | ;; |
---|
| 292 | it*) |
---|
| 293 | DIR=Italian |
---|
| 294 | ;; |
---|
| 295 | ja*) |
---|
| 296 | DIR=Japanese |
---|
| 297 | ;; |
---|
| 298 | kr*) |
---|
| 299 | DIR=Korean |
---|
| 300 | ;; |
---|
| 301 | pl*) |
---|
| 302 | DIR=Polish |
---|
| 303 | ;; |
---|
| 304 | pt*) |
---|
| 305 | DIR=Portuguese |
---|
| 306 | ;; |
---|
| 307 | ro*) |
---|
| 308 | DIR=Romanian |
---|
| 309 | ;; |
---|
| 310 | ru*) |
---|
| 311 | DIR=Russian-koi8-r |
---|
| 312 | ;; |
---|
| 313 | sr*) |
---|
| 314 | DIR=Serbian |
---|
| 315 | ;; |
---|
| 316 | sk*) |
---|
| 317 | DIR=Slovak |
---|
| 318 | ;; |
---|
| 319 | es*) |
---|
| 320 | DIR=Spanish |
---|
| 321 | ;; |
---|
| 322 | sv*) |
---|
| 323 | DIR=Swedish |
---|
| 324 | ;; |
---|
| 325 | zh_TW*) |
---|
| 326 | DIR=Traditional_Chinese |
---|
| 327 | ;; |
---|
| 328 | zh_CN*) |
---|
| 329 | DIR=Simplify_Chinese |
---|
| 330 | ;; |
---|
| 331 | tr*) |
---|
| 332 | DIR=Turkish |
---|
| 333 | ;; |
---|
| 334 | greek) |
---|
| 335 | DIR=Greek |
---|
| 336 | ;; |
---|
| 337 | *) |
---|
| 338 | DIR=English |
---|
| 339 | ;; |
---|
| 340 | esac |
---|
| 341 | ln -snf %{_datadir}/squid/errors/$DIR /etc/squid/errors |
---|
| 342 | fi |
---|
| 343 | |
---|
| 344 | %preun |
---|
| 345 | if [ $1 = 0 ] ; then |
---|
| 346 | service squid stop >/dev/null 2>&1 |
---|
| 347 | rm -f /var/log/squid/* |
---|
| 348 | /sbin/chkconfig --del squid |
---|
| 349 | fi |
---|
| 350 | |
---|
| 351 | %postun |
---|
| 352 | if [ "$1" -ge "1" ] ; then |
---|
| 353 | # service squid condrestart >/dev/null 2>&1 |
---|
| 354 | service squid condrestart |
---|
| 355 | fi |
---|
| 356 | |
---|
| 357 | %triggerin -- samba-common |
---|
| 358 | /usr/sbin/usermod -a -G wbpriv squid >/dev/null 2>&1 || \ |
---|
| 359 | chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || : |
---|
| 360 | |
---|
| 361 | %changelog |
---|
[3897] | 362 | * Tue May 17 2011 Masahiro INOUE <miyabi.-.inoue@nifty.com> 3.1.12-1 |
---|
[3860] | 363 | - 7:3.0.STABLE25-3 |
---|
| 364 | - change package name squid -> squid30 |
---|
| 365 | |
---|
[3022] | 366 | * Mon Sep 20 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 367 | - 7:3.0.STABLE25-2 |
---|
| 368 | - add patch001 for fix CVE-2010-3072 |
---|
| 369 | |
---|
| 370 | * Tue Mar 16 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 371 | - 7:3.0.STABLE25-1 |
---|
| 372 | - new upstream release |
---|
| 373 | |
---|
| 374 | * Tue Mar 9 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 375 | - 7:3.0.STABLE24-1 |
---|
| 376 | - new upstream release |
---|
| 377 | |
---|
[898] | 378 | * Wed Feb 3 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 379 | - 7:3.0.STABLE23-1 |
---|
| 380 | - new upstream release with security fix (Handle DNS header-only packet) |
---|
| 381 | |
---|
[521] | 382 | * Wed Aug 5 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 383 | - 7:3.0.STABLE18-1 |
---|
| 384 | - new upstream release |
---|
| 385 | - add ja summary/discription |
---|
| 386 | |
---|
| 387 | * Tue Jul 28 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 388 | - 7:3.0.STABLE17-1 |
---|
| 389 | - new upstream release |
---|
| 390 | - drop patch209 (is included in new release) |
---|
| 391 | |
---|
| 392 | * Mon Jun 22 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 393 | - 7:3.0.STABLE16-3 |
---|
| 394 | - update patch209 (from upstream) |
---|
| 395 | |
---|
| 396 | * Tue Jun 16 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 397 | - 7:3.0.STABLE16-2 |
---|
| 398 | - add patch209 to fix build error |
---|
| 399 | |
---|
| 400 | * Tue Jun 16 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 401 | - 7:3.0.STABLE16-1 |
---|
| 402 | - new upstream release |
---|
| 403 | |
---|
| 404 | * Sat May 09 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 405 | - 7:3.0.STABLE15-1 |
---|
| 406 | - new upstream release |
---|
| 407 | - update Patch203 to fit new release |
---|
| 408 | |
---|
| 409 | * Mon May 04 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 410 | - 7:3.0.STABLE14-2 |
---|
| 411 | - comment out "Obsoletes: squid26" |
---|
| 412 | |
---|
| 413 | * Mon May 04 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
| 414 | - 7:3.0.STABLE14-1 |
---|
| 415 | - Initial build for VineSeed / Vine 5.x |
---|
| 416 | - This package is based on Fedora 3.0.STABLE13-1 |
---|