1 |
unnilennium |
1.1 |
# $Id: smeserver-dansguardian.spec,v 1.4 2013/07/02 21:31:38 unnilennium Exp $ |
2 |
|
|
# Authority: dungog |
3 |
|
|
# Name: Stephen Noble |
4 |
|
|
|
5 |
|
|
%define name smeserver-dansguardian |
6 |
|
|
%define version 2.10 |
7 |
|
|
%define release 1 |
8 |
|
|
|
9 |
|
|
Summary: Set up dansguardian to filter www content. |
10 |
|
|
Name: %{name} |
11 |
|
|
Version: %{version} |
12 |
|
|
Release: %{release}%{?dist} |
13 |
|
|
License: GNU GPL version 2 |
14 |
|
|
URL: http://www.dungog.net/sme |
15 |
|
|
Group: SMEserver/addon |
16 |
|
|
Source: %{name}-%{version}.tar.gz |
17 |
|
|
#REM contribs9 Patch0: smeserver-dansguardian-2.10-unblock80.patch |
18 |
|
|
#REM contribs9 Patch1: smeserver-dansguardian-2.10-block8080.patch |
19 |
|
|
#REM contribs9 Patch2: smeserver-dansguardian-2.10-block8080-2.patch |
20 |
|
|
BuildRoot: %{_tmppath}/%{name}-buildroot |
21 |
|
|
BuildArchitectures: noarch |
22 |
|
|
BuildRequires: e-smith-devtools >= 1.13.1-03 |
23 |
|
|
Requires: e-smith-release >= 7.0 |
24 |
|
|
Requires: dansguardian = 2.10.1.1-1%{?dist} |
25 |
|
|
AutoReqProv: no |
26 |
|
|
|
27 |
|
|
%description |
28 |
|
|
rpm to setup dansguardian.org web content filter |
29 |
|
|
|
30 |
|
|
%changelog |
31 |
|
|
* Mon Jun 16 2014 JP Pialasse <tests@pialasse.com> 2.10-1.sme |
32 |
|
|
- initial import to SME9 contribs |
33 |
|
|
|
34 |
|
|
* Tue Jul 02 2013 JP Pialasse <tests@pialasse.com> 2.9-10 |
35 |
|
|
- more severe Requires for dansguardian [SME: 7716 7717] |
36 |
|
|
- fix clamav user for logs after rf rpm |
37 |
|
|
|
38 |
|
|
* Tue Jun 09 2009 Stephen Noble <support@dungog.net> 2.9-7 |
39 |
|
|
- undo portblocking on 443 |
40 |
|
|
|
41 |
|
|
* Wed Apr 30 2009 Stephen Noble <support@dungog.net> 2.9-6 |
42 |
|
|
- portblocking now blocks 443 as well as 3128 |
43 |
|
|
|
44 |
|
|
* Fri May 30 2008 Stephen Noble <support@dungog.net> 2.9-5 |
45 |
|
|
- fix portblocking on 8080 |
46 |
|
|
|
47 |
|
|
* Fri May 30 2008 Stephen Noble <support@dungog.net> 2.9-4 |
48 |
|
|
- $dansguardian{portblocking} = yes, blocks external 8080 |
49 |
|
|
|
50 |
|
|
* Thu Jul 05 2007 Stephen Noble <support@dungog.net> 2.9-3 |
51 |
|
|
- $dansguardian{portblocking} = yes, just blocks 3128 |
52 |
|
|
|
53 |
|
|
* Thu Jul 05 2007 Stephen Noble <support@dungog.net> |
54 |
|
|
- Build on lordsfam |
55 |
|
|
|
56 |
|
|
* Wed Sep 27 2006 Stephen Noble <support@dungog.net> |
57 |
|
|
- lograte gzip's files |
58 |
|
|
- uses initialize-default-databases |
59 |
|
|
- [2.9-2] |
60 |
|
|
|
61 |
|
|
* Wed Sep 27 2006 Stephen Noble <support@dungog.net> |
62 |
|
|
- update for 2.9 |
63 |
|
|
- no longer runs under daemontools |
64 |
|
|
- [2.9-1] |
65 |
|
|
|
66 |
|
|
* Sun Mar 12 2006 Stephen Noble <support@dungog.net> |
67 |
|
|
- 15AuthProgramPamAuth, spaces removed from realm |
68 |
|
|
- [1.2-4] |
69 |
|
|
|
70 |
|
|
* Thu Mar 9 2006 Stephen Noble <support@dungog.net> |
71 |
|
|
- 15AuthProgramPamAuth, realm put inside quotes |
72 |
|
|
- ident added, but it's broken |
73 |
|
|
- [1.2-3] |
74 |
|
|
|
75 |
|
|
* Sun Nov 6 2005 Stephen Noble <support@dungog.net> |
76 |
|
|
- db value to block ports changed |
77 |
|
|
- ncsa_auth password file changed |
78 |
|
|
- [1.2-2] |
79 |
|
|
|
80 |
|
|
* Fri Sep 16 2005 Stephen Noble <support@dungog.net> |
81 |
|
|
- SME7 initial version |
82 |
|
|
- runs under daemontools |
83 |
|
|
- for DG 2.8.0.6-el4 no patches |
84 |
|
|
- [1.2-1] |
85 |
|
|
|
86 |
|
|
<snip> |
87 |
|
|
* Tue Nov 6 2001 Stephen Noble <stephen@dungog.net> 0.1-1 |
88 |
|
|
- initial release |
89 |
|
|
|
90 |
|
|
%prep |
91 |
|
|
%setup |
92 |
|
|
#REM contribs9 %patch0 -p1 |
93 |
|
|
#REM contribs9 %patch1 -p1 |
94 |
|
|
#REM contribs9 %patch2 -p1 |
95 |
|
|
|
96 |
|
|
%build |
97 |
|
|
perl createlinks |
98 |
|
|
|
99 |
|
|
mkdir -p root/etc/e-smith/db/configuration/defaults/dansguardian |
100 |
|
|
echo "service" > root/etc/e-smith/db/configuration/defaults/dansguardian/type |
101 |
|
|
echo "enabled" > root/etc/e-smith/db/configuration/defaults/dansguardian/status |
102 |
|
|
|
103 |
|
|
%install |
104 |
|
|
rm -rf $RPM_BUILD_ROOT |
105 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
106 |
|
|
rm -f %{name}-%{version}-filelist |
107 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
108 |
|
|
--file '/etc/cron.weekly/dansguardian-logrotate' 'attr(0755,root,root)' \ |
109 |
|
|
> %{name}-%{version}-filelist |
110 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
111 |
|
|
|
112 |
|
|
%clean |
113 |
|
|
cd .. |
114 |
|
|
rm -rf %{name}-%{version} |
115 |
|
|
|
116 |
|
|
%pre |
117 |
|
|
|
118 |
|
|
%preun |
119 |
|
|
%post |
120 |
|
|
|
121 |
|
|
#gzip old log files |
122 |
|
|
if [ -z /var/log/dansguardian/access.log.1 ] ; then |
123 |
|
|
gzip -f /var/log/dansguardian/access.log.1 |
124 |
|
|
fi |
125 |
|
|
if [ -z /var/log/dansguardian/access.log.2 ] ; then |
126 |
|
|
gzip -f /var/log/dansguardian/access.log.2 |
127 |
|
|
fi |
128 |
|
|
if [ -z /var/log/dansguardian/access.log.3 ] ; then |
129 |
|
|
gzip -f /var/log/dansguardian/access.log.3 |
130 |
|
|
fi |
131 |
|
|
if [ -z /var/log/dansguardian/access.log.4 ] ; then |
132 |
|
|
gzip -f /var/log/dansguardian/access.log.4 |
133 |
|
|
fi |
134 |
|
|
|
135 |
|
|
# temp fix following rf dansguardian used |
136 |
|
|
chown clamav:clamav /var/log/dansguardian/* |
137 |
|
|
|
138 |
|
|
%postun |
139 |
|
|
|
140 |
|
|
#uninstalls |
141 |
|
|
if [ $1 = 0 ] ; then |
142 |
|
|
/sbin/e-smith/db configuration setprop squid TransparentPort 3128 |
143 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/proxy/proxy.pac |
144 |
|
|
/sbin/e-smith/expand-template /etc/squid/squid.conf |
145 |
|
|
echo 'optionally run signal-event network-create to complete uninstall' |
146 |
|
|
fi |
147 |
|
|
|
148 |
|
|
#&upgrades |
149 |
|
|
|
150 |
|
|
%files -f %{name}-%{version}-filelist |
151 |
|
|
%defattr(-,root,root) |