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 |
terryfage |
1.3 |
%define release 3 |
8 |
unnilennium |
1.1 |
|
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 |
jcrisp |
1.2 |
Requires: e-smith-release >= 9.0 |
24 |
|
|
Requires: dansguardian >= 2.10.1.1-1%{?dist} |
25 |
unnilennium |
1.1 |
AutoReqProv: no |
26 |
|
|
|
27 |
|
|
%description |
28 |
|
|
rpm to setup dansguardian.org web content filter |
29 |
|
|
|
30 |
|
|
%changelog |
31 |
terryfage |
1.3 |
* Fri Jan 11 2019 Terry Fage <tfage@yahoo.com.au> 2.10-3.sme |
32 |
|
|
- bump release syntax error in spec file [SME: 9613] |
33 |
|
|
|
34 |
jcrisp |
1.2 |
* Mon Dec 10 2018 T Fage <tfage@yahoo.com.au> 2.10-2.sme |
35 |
|
|
- fix log file permissions |
36 |
|
|
- remove /tmp files clamav compatability [SME: 9613] |
37 |
|
|
- bump required e-smith-release version |
38 |
|
|
|
39 |
unnilennium |
1.1 |
* Mon Jun 16 2014 JP Pialasse <tests@pialasse.com> 2.10-1.sme |
40 |
|
|
- initial import to SME9 contribs |
41 |
|
|
|
42 |
|
|
* Tue Jul 02 2013 JP Pialasse <tests@pialasse.com> 2.9-10 |
43 |
|
|
- more severe Requires for dansguardian [SME: 7716 7717] |
44 |
|
|
- fix clamav user for logs after rf rpm |
45 |
|
|
|
46 |
|
|
* Tue Jun 09 2009 Stephen Noble <support@dungog.net> 2.9-7 |
47 |
|
|
- undo portblocking on 443 |
48 |
|
|
|
49 |
|
|
* Wed Apr 30 2009 Stephen Noble <support@dungog.net> 2.9-6 |
50 |
|
|
- portblocking now blocks 443 as well as 3128 |
51 |
|
|
|
52 |
|
|
* Fri May 30 2008 Stephen Noble <support@dungog.net> 2.9-5 |
53 |
|
|
- fix portblocking on 8080 |
54 |
|
|
|
55 |
|
|
* Fri May 30 2008 Stephen Noble <support@dungog.net> 2.9-4 |
56 |
|
|
- $dansguardian{portblocking} = yes, blocks external 8080 |
57 |
|
|
|
58 |
|
|
* Thu Jul 05 2007 Stephen Noble <support@dungog.net> 2.9-3 |
59 |
|
|
- $dansguardian{portblocking} = yes, just blocks 3128 |
60 |
|
|
|
61 |
|
|
* Thu Jul 05 2007 Stephen Noble <support@dungog.net> |
62 |
|
|
- Build on lordsfam |
63 |
|
|
|
64 |
|
|
* Wed Sep 27 2006 Stephen Noble <support@dungog.net> |
65 |
|
|
- lograte gzip's files |
66 |
|
|
- uses initialize-default-databases |
67 |
|
|
- [2.9-2] |
68 |
|
|
|
69 |
|
|
* Wed Sep 27 2006 Stephen Noble <support@dungog.net> |
70 |
|
|
- update for 2.9 |
71 |
|
|
- no longer runs under daemontools |
72 |
|
|
- [2.9-1] |
73 |
|
|
|
74 |
|
|
* Sun Mar 12 2006 Stephen Noble <support@dungog.net> |
75 |
|
|
- 15AuthProgramPamAuth, spaces removed from realm |
76 |
|
|
- [1.2-4] |
77 |
|
|
|
78 |
|
|
* Thu Mar 9 2006 Stephen Noble <support@dungog.net> |
79 |
|
|
- 15AuthProgramPamAuth, realm put inside quotes |
80 |
|
|
- ident added, but it's broken |
81 |
|
|
- [1.2-3] |
82 |
|
|
|
83 |
|
|
* Sun Nov 6 2005 Stephen Noble <support@dungog.net> |
84 |
|
|
- db value to block ports changed |
85 |
|
|
- ncsa_auth password file changed |
86 |
|
|
- [1.2-2] |
87 |
|
|
|
88 |
|
|
* Fri Sep 16 2005 Stephen Noble <support@dungog.net> |
89 |
|
|
- SME7 initial version |
90 |
|
|
- runs under daemontools |
91 |
|
|
- for DG 2.8.0.6-el4 no patches |
92 |
|
|
- [1.2-1] |
93 |
|
|
|
94 |
|
|
<snip> |
95 |
|
|
* Tue Nov 6 2001 Stephen Noble <stephen@dungog.net> 0.1-1 |
96 |
|
|
- initial release |
97 |
|
|
|
98 |
|
|
%prep |
99 |
|
|
%setup |
100 |
|
|
#REM contribs9 %patch0 -p1 |
101 |
|
|
#REM contribs9 %patch1 -p1 |
102 |
|
|
#REM contribs9 %patch2 -p1 |
103 |
|
|
|
104 |
|
|
%build |
105 |
|
|
perl createlinks |
106 |
|
|
|
107 |
|
|
mkdir -p root/etc/e-smith/db/configuration/defaults/dansguardian |
108 |
|
|
echo "service" > root/etc/e-smith/db/configuration/defaults/dansguardian/type |
109 |
|
|
echo "enabled" > root/etc/e-smith/db/configuration/defaults/dansguardian/status |
110 |
|
|
|
111 |
|
|
%install |
112 |
|
|
rm -rf $RPM_BUILD_ROOT |
113 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
114 |
|
|
rm -f %{name}-%{version}-filelist |
115 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
116 |
|
|
--file '/etc/cron.weekly/dansguardian-logrotate' 'attr(0755,root,root)' \ |
117 |
|
|
> %{name}-%{version}-filelist |
118 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
119 |
|
|
|
120 |
|
|
%clean |
121 |
|
|
cd .. |
122 |
|
|
rm -rf %{name}-%{version} |
123 |
|
|
|
124 |
|
|
%pre |
125 |
|
|
|
126 |
|
|
%preun |
127 |
|
|
%post |
128 |
|
|
|
129 |
|
|
#gzip old log files |
130 |
|
|
if [ -z /var/log/dansguardian/access.log.1 ] ; then |
131 |
|
|
gzip -f /var/log/dansguardian/access.log.1 |
132 |
|
|
fi |
133 |
|
|
if [ -z /var/log/dansguardian/access.log.2 ] ; then |
134 |
|
|
gzip -f /var/log/dansguardian/access.log.2 |
135 |
|
|
fi |
136 |
|
|
if [ -z /var/log/dansguardian/access.log.3 ] ; then |
137 |
|
|
gzip -f /var/log/dansguardian/access.log.3 |
138 |
|
|
fi |
139 |
|
|
if [ -z /var/log/dansguardian/access.log.4 ] ; then |
140 |
|
|
gzip -f /var/log/dansguardian/access.log.4 |
141 |
|
|
fi |
142 |
|
|
|
143 |
|
|
# temp fix following rf dansguardian used |
144 |
jcrisp |
1.2 |
if [ -d /var/log/dansguardian/ ] ; then |
145 |
|
|
chown clamav:dansguardian /var/log/dansguardian |
146 |
|
|
fi |
147 |
|
|
if [ -d /var/log/dansguardian/* ] ; then |
148 |
|
|
chown clamav:dansguardian /var/log/dansguardian/* |
149 |
|
|
fi |
150 |
terryfage |
1.3 |
if [ -e /tmp/.dguardianipc ] || [ -e /tmp.dguardianurliupc ] ; then |
151 |
jcrisp |
1.2 |
/bin/rm -f /tmp/.dguardian* |
152 |
|
|
fi |
153 |
unnilennium |
1.1 |
|
154 |
|
|
%postun |
155 |
|
|
|
156 |
|
|
#uninstalls |
157 |
|
|
if [ $1 = 0 ] ; then |
158 |
|
|
/sbin/e-smith/db configuration setprop squid TransparentPort 3128 |
159 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/proxy/proxy.pac |
160 |
|
|
/sbin/e-smith/expand-template /etc/squid/squid.conf |
161 |
|
|
echo 'optionally run signal-event network-create to complete uninstall' |
162 |
|
|
fi |
163 |
|
|
|
164 |
|
|
#&upgrades |
165 |
|
|
|
166 |
|
|
%files -f %{name}-%{version}-filelist |
167 |
|
|
%defattr(-,root,root) |