rpms/dansguardian/devel dansguardian-must-be-successful.patch, NONE, 1.1 dansguardian.logrotate, NONE, 1.1 dansguardian.spec, 1.2, 1.3
Felix Kaechele
heffer at fedoraproject.org
Wed Sep 23 18:28:58 UTC 2009
Author: heffer
Update of /cvs/pkgs/rpms/dansguardian/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5585
Modified Files:
dansguardian.spec
Added Files:
dansguardian-must-be-successful.patch dansguardian.logrotate
Log Message:
* Thu Sep 10 2009 Felix Kaechele <heffer at fedoraproject.org> - 2.10.1.1-3
- fixes for Bugzilla 515159, 515160, 515161, 515363, 519642, 519976, 520440
- lists now reside in /etc/dansguardian/lists
dansguardian-must-be-successful.patch:
configs/dansguardian.conf.in | 2 +-
src/FDTunnel.cpp | 2 +-
src/FOptionContainer.cpp | 2 +-
src/FatController.cpp | 2 +-
src/ListContainer.cpp | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
--- NEW FILE dansguardian-must-be-successful.patch ---
diff -ruN dansguardian-2.10.1.1.orig/configs/dansguardian.conf.in dansguardian-2.10.1.1/configs/dansguardian.conf.in
--- dansguardian-2.10.1.1.orig/configs/dansguardian.conf.in 2009-08-04 11:46:41.484910072 +0200
+++ dansguardian-2.10.1.1/configs/dansguardian.conf.in 2009-08-04 11:49:08.980902851 +0200
@@ -354,7 +354,7 @@
# Delete file cache after user completes download
# When a file gets save to temp it stays there until it is deleted.
-# You can choose to have the file deleted when the user makes a sucessful
+# You can choose to have the file deleted when the user makes a successful
# download. This will mean if they click on the link to download from
# the temp store a second time it will give a 404 error.
# You should configure something to delete old files in temp to stop it filling up.
diff -ruN dansguardian-2.10.1.1.orig/src/FatController.cpp dansguardian-2.10.1.1/src/FatController.cpp
--- dansguardian-2.10.1.1.orig/src/FatController.cpp 2009-08-04 11:46:41.465902112 +0200
+++ dansguardian-2.10.1.1/src/FatController.cpp 2009-08-04 11:48:43.541651965 +0200
@@ -2074,7 +2074,7 @@
int tofind;
reloadconfig = false;
- syslog(LOG_INFO, "Started sucessfully.");
+ syslog(LOG_INFO, "Started successfully.");
while (failurecount < 30 && !ttg && !reloadconfig) {
diff -ruN dansguardian-2.10.1.1.orig/src/FDTunnel.cpp dansguardian-2.10.1.1/src/FDTunnel.cpp
--- dansguardian-2.10.1.1.orig/src/FDTunnel.cpp 2009-08-04 11:46:41.464902536 +0200
+++ dansguardian-2.10.1.1/src/FDTunnel.cpp 2009-08-04 11:47:37.011652752 +0200
@@ -114,7 +114,7 @@
bool done = false; // so we get past the first while
while (!done && (targetthroughput > -1 ? throughput < targetthroughput : true)) {
- done = true; // if we don't make a sucessful read and write this
+ done = true; // if we don't make a successful read and write this
// flag will stay true and so the while() will exit
inset = fdSet; // as select() can modify the sets we need to take
diff -ruN dansguardian-2.10.1.1.orig/src/FOptionContainer.cpp dansguardian-2.10.1.1/src/FOptionContainer.cpp
--- dansguardian-2.10.1.1.orig/src/FOptionContainer.cpp 2009-08-04 11:46:41.464902536 +0200
+++ dansguardian-2.10.1.1/src/FOptionContainer.cpp 2009-08-04 11:48:03.572653450 +0200
@@ -56,7 +56,7 @@
if (inet_aton(ip, &address)) { // convert to in_addr
struct hostent *answer;
answer = gethostbyaddr((char *) &address, sizeof(address), AF_INET);
- if (answer) { // sucess in reverse dns
+ if (answer) { // success in reverse dns
result->push_back(String(answer->h_name));
for (addrptr = (struct in_addr **) answer->h_addr_list; *addrptr; addrptr++) {
result->push_back(String(inet_ntoa(**addrptr)));
diff -ruN dansguardian-2.10.1.1.orig/src/ListContainer.cpp dansguardian-2.10.1.1/src/ListContainer.cpp
--- dansguardian-2.10.1.1.orig/src/ListContainer.cpp 2009-08-04 11:46:41.460901992 +0200
+++ dansguardian-2.10.1.1/src/ListContainer.cpp 2009-08-04 11:47:22.300690828 +0200
@@ -246,7 +246,7 @@
}
}
listfile.close();
- return true; // sucessful read
+ return true; // successful read
}
// for phrase lists - helper function for readPhraseList
@@ -502,7 +502,7 @@
addToItemList(temp.toCharArray(), temp.length()); // add to unsorted list
}
listfile.close();
- return true; // sucessful read
+ return true; // successful read
}
// for item lists - read nested item lists
--- NEW FILE dansguardian.logrotate ---
/var/log/dansguardian/access.log {
rotate 4
weekly
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/dansguardian.pid 2>/dev/null` 2> /dev/null || true
endscript
}
Index: dansguardian.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dansguardian/devel/dansguardian.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- dansguardian.spec 24 Jul 2009 19:56:12 -0000 1.2
+++ dansguardian.spec 23 Sep 2009 18:28:57 -0000 1.3
@@ -1,6 +1,6 @@
Name: dansguardian
Version: 2.10.1.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Content filtering web proxy
Summary(de): Contentfilter-Proxy
@@ -15,17 +15,21 @@ URL: http://www.dansguardian.
Source0: http://dansguardian.org/downloads/2/Stable/%{name}-%{version}.tar.gz
Source1: dansguardian.init
Source2: dansguardian.httpd
+Source3: dansguardian.logrotate
# This patch removes the upstream restrictions on the GPLv2+ source
Patch0: dansguardian-copyright-notice.patch
# Fixes some compilation errors with gcc 4.4
Patch1: dansguardian-gcc44.patch
# Adds support for ClamAV > 0.95
Patch2: dansguardian-clamav095.patch
+# Fix some typos ;) (Bug #515363)
+Patch3: dansguardian-must-be-successful.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: clamav-devel pcre-devel zlib-devel
-BuildRequires: pkgconfig
-Requires(post): chkconfig
+BuildRequires: clamav-devel pcre-devel zlib-devel
+BuildRequires: pkgconfig
+Requires(pre): shadow-utils
+Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
@@ -45,7 +49,7 @@ want but DansGuardian puts you in contro
DansGuardian requires squid or another similar caching proxy server on your
local network.
-%description(de)
+%description -l de
DansGuardian filtert den Content einer Webseite basierend auf verschiedenen
Methoden wie beispielsweise Wortfilter, PICS filtering und URL filtering. Es
handelt sich also um ein echtes Content filtering anstatt einfacher Blacklists.
@@ -64,11 +68,10 @@ lokalen Netzwerk.
%patch0 -p1
%patch1 -p1
%patch2 -p1
-sed -i 's|@DGCONFDIR@/lists/|@DGDATADIR@/lists/|' configs/%{name}*.conf.in
-
+%patch3 -p1
%build
-%configure --enable-orig-ip \
+%configure \
--enable-clamav \
--enable-clamd \
--enable-icap \
@@ -76,7 +79,9 @@ sed -i 's|@DGCONFDIR@/lists/|@DGDATADIR@
--enable-commandline \
--enable-trickledm \
--enable-ntlm \
- --enable-email
+ --enable-email \
+ --with-proxyuser=dansguardian \
+ --with-proxygroup=dansguardian
make %{?_smp_mflags}
@@ -84,16 +89,12 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
-install -Dpm 644 $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts/%{name} \
+install -Dpm 644 %{SOURCE3} \
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
# delete the other scripts since they are of no use for Fedora users
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts
chmod 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}.pl
-# move the lists to the datadir, since they really are data
-mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/lists \
- $RPM_BUILD_ROOT%{_datadir}/%{name}
-
# install init script and httpd config
install -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name}
install -Dp -m0644 %{SOURCE2} \
@@ -102,10 +103,30 @@ install -Dp -m0644 %{SOURCE2} \
# we'll install this later within %doc
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
+# create the log dir
+install -dm 755 $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
+
+
%clean
rm -rf $RPM_BUILD_ROOT
+%pre
+getent group %{name} >/dev/null || groupadd -r %{name}
+getent passwd %{name} >/dev/null || \
+useradd -r -g %{name} -d %{_datadir}/%{name} -s /sbin/nologin \
+ -c "DansGuardian web content filter" %{name}
+exit 0
+
+# in the first release we put some user-editable files inside the datadir. doh!
+# if they are still there we migrate them over to their new home in the
+# sysconfdir.
+if [ "$1" -gt 1 ] ; then
+ if [ -e %{_datadir}/%{name}/lists ] ; then
+ mv -f %{_datadir}/%{name}/lists %{_sysconfdir}/%{name}
+ fi
+fi
+
%post
/sbin/chkconfig --add %{name}
@@ -128,9 +149,9 @@ fi
%doc COPYING INSTALL README UPGRADING
%doc doc/AuthPlugins doc/ContentScanners doc/DownloadManagers doc/FAQ
%doc doc/FAQ.html doc/Plugins
-%doc %{_mandir}/man?/*
+%doc %{_mandir}/man8/%{name}.8.gz
%{_sbindir}/%{name}
-%{_datadir}/%{name}
+%attr(-,%{name},%{name}) %{_datadir}/%{name}
%{_initrddir}/%{name}
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/%{name}*.conf
@@ -140,12 +161,18 @@ fi
%config(noreplace) %{_sysconfdir}/%{name}/contentscanners/*
%dir %{_sysconfdir}/%{name}/downloadmanagers
%config(noreplace) %{_sysconfdir}/%{name}/downloadmanagers/*
+%dir %{_sysconfdir}/%{name}/lists
+%config(noreplace) %{_sysconfdir}/%{name}/lists/*
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
-
+%attr(755,%{name},%{name}) %dir %{_localstatedir}/log/%{name}
%changelog
+* Thu Sep 10 2009 Felix Kaechele <heffer at fedoraproject.org> - 2.10.1.1-3
+- fixes for Bugzilla 515159, 515160, 515161, 515363, 519642, 519976, 520440
+- lists now reside in /etc/dansguardian/lists
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.10.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the fedora-extras-commits
mailing list