- spec file modified to be fedora packaging guidline compliant

- little shifting lines in init script header due to rpmlint complaint
This commit is contained in:
Jiri Skala 2010-02-03 13:13:41 +00:00
parent fe0ffa36fc
commit b99b92d821
2 changed files with 38 additions and 31 deletions

View File

@ -1,9 +1,10 @@
#!/bin/bash
### BEGIN INIT INFO
# Provides: squid
# chkconfig: - 90 25
# pidfile: /var/run/squid.pid
# config: /etc/squid/squid.conf
#
### BEGIN INIT INFO
# Provides: squid
# Short-Description: starting and stopping Squid Internet Object Cache
# Description: Squid - Internet Object Cache. Internet object caching is \
# a way to store requested Internet objects (i.e., data available \

View File

@ -4,14 +4,13 @@
Name: squid
Version: 3.1.0.16
Release: 3%{?dist}
Release: 4%{?dist}
Summary: The Squid proxy caching server
Epoch: 7
License: GPLv2+
License: GPLv2
Group: System Environment/Daemons
URL: http://www.squid-cache.org
Source: http://www.squid-cache.org/Versions/v3/3.1/squid-%{version}.tar.bz2
Source1: http://www.squid-cache.org/Versions/v3/3.1/squid-%{version}.tar.bz2.asc
Source0: http://www.squid-cache.org/Versions/v3/3.1/squid-%{version}.tar.bz2
Source2: squid.init
Source3: squid.logrotate
Source4: squid.sysconfig
@ -53,7 +52,6 @@ BuildRequires: db4-devel
BuildRequires: expat-devel libxml2-devel
# TPROXY requires libcap, and also increases security somewhat
BuildRequires: libcap-devel
Obsoletes: squid-novm
%description
Squid is a high-performance proxy caching server for Web clients,
@ -80,7 +78,6 @@ lookup program (dnsserver), a program for retrieving FTP data
%patch208 -p1 -b .from_manpg
%build
export CXXFLAGS="-fPIE %{optflags}" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char %{optflags}" ; export LDFLAGS="-pie" ;
%configure \
--exec_prefix=/usr \
--libexecdir=%{_libdir}/squid \
@ -123,7 +120,15 @@ export CXXFLAGS="-fPIE %{optflags}" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned
--with-openssl \
--with-pthreads
export CXXFLAGS="-fPIE" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char" ; export LDFLAGS="-pie" ;
%ifarch sparcv9 sparc64 s390 s390x
export CXXFLAGS="$RPM_OPT_FLAGS -fPIE"
export CFLAGS="$RPM_OPT_FLAGS -fPIE"
%else
export CXXFLAGS="$RPM_OPT_FLAGS -fpie"
export CFLAGS="$RPM_OPT_FLAGS -fpie"
%endif
export LDFLAGS="-pie"
make \
DEFAULT_SWAP_DIR='$(localstatedir)/spool/squid' \
%{?_smp_mflags}
@ -183,41 +188,41 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README ChangeLog QUICKSTART src/squid.conf.documented
%doc COPYING COPYRIGHT README ChangeLog QUICKSTART src/squid.conf.documented
%doc contrib/url-normalizer.pl contrib/rredir.* contrib/user-agents.pl
%attr(755,root,root) %dir /etc/squid
%attr(755,root,root) %dir %{_sysconfdir}/squid
%attr(755,root,root) %dir %{_libdir}/squid
%attr(750,squid,squid) %dir /var/log/squid
%attr(750,squid,squid) %dir /var/spool/squid
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/squid.conf
%config(noreplace) %attr(640,root,squid) /etc/squid/squid.conf
%config(noreplace) %attr(644,root,squid) /etc/squid/cachemgr.conf
%config(noreplace) /etc/squid/mime.conf
%config(noreplace) /etc/squid/errorpage.css
%config(noreplace) /etc/sysconfig/squid
%config(noreplace) /etc/squid/msntauth.conf
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/httpd/conf.d/squid.conf
%config(noreplace) %attr(640,root,squid) %{_sysconfdir}/squid/squid.conf
%config(noreplace) %attr(644,root,squid) %{_sysconfdir}/squid/cachemgr.conf
%config(noreplace) %{_sysconfdir}/squid/mime.conf
%config(noreplace) %{_sysconfdir}/squid/errorpage.css
%config(noreplace) %{_sysconfdir}/sysconfig/squid
%config(noreplace) %{_sysconfdir}/squid/msntauth.conf
# These are not noreplace because they are just sample config files
%config /etc/squid/msntauth.conf.default
%config /etc/squid/squid.conf.default
%config /etc/squid/mime.conf.default
%config /etc/squid/errorpage.css.default
%config /etc/squid/cachemgr.conf.default
%config(noreplace) /etc/pam.d/squid
%config(noreplace) /etc/logrotate.d/squid
%config %{_sysconfdir}/squid/msntauth.conf.default
%config %{_sysconfdir}/squid/squid.conf.default
%config %{_sysconfdir}/squid/mime.conf.default
%config %{_sysconfdir}/squid/errorpage.css.default
%config %{_sysconfdir}/squid/cachemgr.conf.default
%config(noreplace) %{_sysconfdir}/pam.d/squid
%config(noreplace) %{_sysconfdir}/logrotate.d/squid
%dir %{_datadir}/squid
%attr(-,root,root) %{_datadir}/squid/errors
%attr(755,root,root) /etc/rc.d/init.d/squid
%attr(755,root,root) /etc/NetworkManager/dispatcher.d/20-squid
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/squid
%attr(755,root,root) %{_sysconfdir}/NetworkManager/dispatcher.d/20-squid
%{_datadir}/squid/icons
%{_sbindir}/squid
%{_bindir}/squidclient
%{_mandir}/man8/*
%{_mandir}/man1/*
%{_libdir}/squid/*
/usr/share/snmp/mibs/SQUID-MIB.txt
%{_datadir}/snmp/mibs/SQUID-MIB.txt
%pre
if ! getent group squid >/dev/null 2>&1; then
@ -253,11 +258,12 @@ if [ "$1" -ge "1" ] ; then
service squid condrestart >/dev/null 2>&1
fi
%triggerin -- samba-common
/usr/sbin/usermod -a -G wbpriv squid >/dev/null 2>&1 || \
chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
%changelog
* Wed Feb 03 2010 Jiri Skala <jskala@redhat.com> 7:3.1.0.16-4
- spec file modified to be fedora packaging guidline compliant
- little shifting lines in init script header due to rpmlint complaint
* Mon Feb 01 2010 Henrik Nordstrom <henrik@henriknordstrom.net> 7:3.1.0.16-3
- Upgrade to 3.1.0.16 for DNS related DoS fix (Squid-2010:1)