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