]> git.pld-linux.org Git - packages/dcc-dccd.git/blobdiff - dcc-dccd.spec
- tabs in preamble
[packages/dcc-dccd.git] / dcc-dccd.spec
index d2855cc245359c261eb82ea9de891f1b9e226b0c..5c5eba8fc72d5725afab241d2d647db32048c8c2 100644 (file)
@@ -1,18 +1,24 @@
 Summary:       Distributed Checksum Clearinghouse, anti-spam tool
-Summary(pl):   Narzêdzie anty-spamowe bazuj±ce na sumach kontrolnych (DCC)
+Summary(pl.UTF-8):     Narzędzie anty-spamowe bazujące na sumach kontrolnych (DCC)
 Name:          dcc-dccd
-Version:       1.1.14
+Version:       1.2.50
 Release:       1
 License:       BSD-like
 Group:         Networking
 Source0:       http://www.dcc-servers.net/dcc/source/%{name}-%{version}.tar.Z
+# Source0-md5: 676b17dca43a3dabe22c057a6cfdde77
 URL:           http://www.dcc-servers.net/
-Requires(pre): /usr/sbin/useradd
+BuildRequires: fhs-compliance
+BuildRequires: rpmbuild(macros) >= 1.202
+BuildRequires: using-special-registered-not-regular-user
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/userdel
-Buildroot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Requires(pre): /usr/sbin/useradd
+Provides:      user(dcc)
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                dccdir  /var/lib/dcc
+%define                cgidir  /srv/httpd/cgi-bin
 
 %description
 Distributed Checksum Clearinghouse or DCC is a cooperative,
@@ -29,36 +35,101 @@ from sources in a "white list." White lists are generally the
 responsibility of DCC clients, since only they know which bulk mail
 they solicited.
 
-NB to use DCC to reject SPAM you need to configure %{dccdir}/dcc_conf
-and either use procmail or sendmail to feed the messages to DCC.
+%description -l pl.UTF-8
+DCC (Distributed Checksum Clearinghouse) jest kooperatywnym,
+rozproszonym systemem mającym na celu wykrywanie masowej poczty lub
+poczty wysłanej do wielu ludzi. Pozwala jednostkom otrzymującym
+pojedynczy list określić, jak wielu innych otrzymało dokładnie
+identyczne kopie tej wiadomości i na tej podstawie odrzucić ją. Może
+zidentyfikować niechcianą masową pocztę przy użyciu "pułapek
+antyspamowych" i innych wykrywaczy, ale to nie jest podstawowym celem.
+
+DCC można odbierać jako narzędzie dla użytkowników końcowych,
+zapewniające im prawo do przeciwstawienia się zalewowi masowej poczty
+przez odrzucenie wszystkich śmieci oprócz źródeł z "białej listy". Za
+białe listy odpowiadają klienci DCC, jako że tylko oni wiedzą, jaką
+masową pocztę zamawiali.
+
+%package client
+Summary:       Tools to access a DCC server
+Summary(pl.UTF-8):     Narzędzia dostępowe dla serwera DCC
+Group:         Networking
+Requires:      %{name} = %{version}-%{release}
+
+%description client
+Distributed Checksum Clearinghouse or DCC is a cooperative,
+distributed system intended to detect "bulk" mail or mail sent to many
+people. It allows individuals receiving a single mail message to
+determine that many other people have been sent essentially identical
+copies of the message and so reject the message. It can identify some
+unsolicited bulk mail using "spam traps" and other detectors, but that
+is not its focus.
+
+The DCC can be viewed as a tool for end users to enforce their right
+to "opt-in" to streams of bulk mail by refusing all bulk mail except
+from sources in a "white list." White lists are generally the
+responsibility of DCC clients, since only they know which bulk mail
+they solicited.
 
-%description -l pl
+%description client -l pl.UTF-8
 DCC (Distributed Checksum Clearinghouse) jest kooperatywnym,
-rozproszonym systemem maj±cym na celu wykrywanie masowej poczty lub
-poczty wys³anej do wielu ludzi. Pozwala jednostkom otrzymuj±cym
-pojedynczy list okre¶liæ, jak wielu innych otrzyma³o dok³adnie
-identyczne kopie tej wiadomo¶ci i na tej podstawie odrzuciæ j±. Mo¿e
-zidentyfikowaæ niechcian± masow± pocztê przy u¿yciu "pu³apek
+rozproszonym systemem mającym na celu wykrywanie masowej poczty lub
+poczty wysłanej do wielu ludzi. Pozwala jednostkom otrzymującym
+pojedynczy list określić, jak wielu innych otrzymało dokładnie
+identyczne kopie tej wiadomości i na tej podstawie odrzucić ją. Może
+zidentyfikować niechcianą masową pocztę przy użyciu "pułapek
 antyspamowych" i innych wykrywaczy, ale to nie jest podstawowym celem.
 
-DCC mo¿na odbieraæ jako narzêdzie dla u¿ytkowników koñcowych,
-zapewniaj±ce im prawo do przeciwstawienia siê zalewowi masowej poczty
-przez odrzucenie wszystkich ¶mieci oprócz ¼róde³ z "bia³ej listy".
-Za bia³e listy odpowiadaj± klienci DCC, jako ¿e tylko oni wiedz±,
-jak± masow± pocztê zamawiali.
+DCC można odbierać jako narzędzie dla użytkowników końcowych,
+zapewniające im prawo do przeciwstawienia się zalewowi masowej poczty
+przez odrzucenie wszystkich śmieci oprócz źródeł z "białej listy". Za
+białe listy odpowiadają klienci DCC, jako że tylko oni wiedzą, jaką
+masową pocztę zamawiali.
+
+%package server
+Summary:       DCC Server
+Summary(pl.UTF-8):     Serwer DCC
+Group:         Networking
+Requires:      %{name} = %{version}-%{release}
+
+%description server
+Distributed Checksum Clearinghouse or DCC is a cooperative,
+distributed system intended to detect "bulk" mail or mail sent to many
+people. It allows individuals receiving a single mail message to
+determine that many other people have been sent essentially identical
+copies of the message and so reject the message. It can identify some
+unsolicited bulk mail using "spam traps" and other detectors, but that
+is not its focus.
+
+The DCC can be viewed as a tool for end users to enforce their right
+to "opt-in" to streams of bulk mail by refusing all bulk mail except
+from sources in a "white list." White lists are generally the
+responsibility of DCC clients, since only they know which bulk mail
+they solicited.
+
+%description server -l pl.UTF-8
+DCC (Distributed Checksum Clearinghouse) jest kooperatywnym,
+rozproszonym systemem mającym na celu wykrywanie masowej poczty lub
+poczty wysłanej do wielu ludzi. Pozwala jednostkom otrzymującym
+pojedynczy list określić, jak wielu innych otrzymało dokładnie
+identyczne kopie tej wiadomości i na tej podstawie odrzucić ją. Może
+zidentyfikować niechcianą masową pocztę przy użyciu "pułapek
+antyspamowych" i innych wykrywaczy, ale to nie jest podstawowym celem.
 
-Aby u¿ywaæ DCC do odrzucania spamu trzeba go skonfigurowaæ poprzez
-%{dccdir}/dcc_conf i u¿ywaæ procmaila lub sendmaila, by przekazywaæ
-wszystkie listy do DCC.
+DCC można odbierać jako narzędzie dla użytkowników końcowych,
+zapewniające im prawo do przeciwstawienia się zalewowi masowej poczty
+przez odrzucenie wszystkich śmieci oprócz źródeł z "białej listy". Za
+białe listy odpowiadają klienci DCC, jako że tylko oni wiedzą, jaką
+masową pocztę zamawiali.
 
 %package cgi
-Summary:       cgi-scripts for managing mail delivery on a DCC enabled server
-Summary(pl):   Skrypty cgi do obs³ugi dostarczania poczty na serwerze DCC
+Summary:       CGI scripts for managing mail delivery on a DCC enabled server
+Summary(pl.UTF-8):     Skrypty CGI do obsługi dostarczania poczty na serwerze DCC
 Group:         Networking
-Requires:      %{name} >= 1.1.2
+Requires:      %{name} = %{version}-%{release}
 
 %description cgi
-Example set of cgi-scripts to allow users to point-and-click manage
+Example set of CGI scripts to allow users to point-and-click manage
 their own DCC whitelists and thus what is delivered to them. Allows
 overriding of site level lists. The scripts give controlled access to
 the whitelists which are otherwise in protected directory space (owned
@@ -66,89 +137,118 @@ by dcc).
 
 NB these scripts need configured after installation.
 
-%description cgi -l pl
-Przyk³adowy zestaw skryptów pozwalaj±cych u¿ytkownikom na klikane
-zarz±dzenie ich bia³ymi listami DCC, a wiêc i tym, co dostaj±. Pozwala
-przykrywaæ listy dotycz±ce serwera. Skrypty daj± dostêp do bia³ych
-list, które normalnie s± w zabezpieczonym katalogu (którego
-w³a¶cicielem jest DCC).
+%description cgi -l pl.UTF-8
+Przykładowy zestaw skryptów CGI pozwalających użytkownikom na klikane
+zarządzenie ich białymi listami DCC, a więc i tym, co dostają. Pozwala
+przykrywać listy dotyczące serwera. Skrypty dają dostęp do białych
+list, które normalnie są w zabezpieczonym katalogu (którego
+właścicielem jest DCC).
 
-Te skrypty wymagaj± konfiguracji po zainstalowaniu.
+Te skrypty wymagają konfiguracji po zainstalowaniu.
 
 %prep
 %setup -q
 
 %build
-%configure2_13 \
+CFLAGS="%{rpmcflags}"; export CFLAGS
+LDFLAGS="%{rpmldflags}"; export LDFLAGS
+./configure \
+       --bindir=%{_bindir} \
+       --libexecdir=%{_libexecdir} \
+       --mandir=%{_mandir} \
+       --homedir=%{dccdir} \
        --with-uid=99 \
-       --with-cgibin=/home/services/httpd/html/cgi-bin \
+       --with-cgibin=%{cgidir} \
        --with-rundir=%{_var}/run \
        --with-db-memory=32
+
 %{__make}
+%{__make} -C dccifd/dccif-test
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{makeinstall} \
-       MANOWN=$(id -u) \
-       MANGRP=$(id -g) \
-       BINOWN=$(id -u) \
-       BINGRP=$(id -u) \
-       MANDIR=$RPM_BUILD_ROOT%{_mandir} \
-       BINDIR=$RPM_BUILD_ROOT%{_bindir}
-
-DCC_PROTO_HOMEDIR=$RPM_BUILD%{_var}/lib/dcc
-DCC_CGIBINDIR=$RPM_BUILD_ROOT%{dccdir}/cgi-bin; export DCC_CGIBINDIR
-DCC_SUID=$BINOWN DCC_OWN=$BINOWN DCC_GRP=$BINGRP; export DCC_SUID DCC_OWN DCC_GRP
-
-install -d $RPM_BUILD_ROOT%{_datadir}/sendmail-cf/feature $DCC_CGIBINDIR
-install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{init.d,cron.daily},%{_bindir}} \
-       $RPM_BUILD_ROOT{/var/run/dcc,%{dccdir}/{log,userdirs/{local,esmtp,cyrus,procmail}}}
-
-%makeinstall
-cp misc/dcc.m4 misc/dccdnsbl.m4 $RPM_BUILD_ROOT/usr/share/sendmail-cf/feature
-mv $RPM_BUILD_ROOT/usr/sbin/cron-dccd $RPM_BUILD_ROOT/etc/cron.daily/dccd
-
-# There already is a logger program which takes the required arguments on Linux
+install -d $RPM_BUILD_ROOT%{_initrddir}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cron.daily,httpd}
+install -d $RPM_BUILD_ROOT/var/run/dcc
+install -d $RPM_BUILD_ROOT%{dccdir}/{log,userdirs/{local,esmtp,cyrus,procmail}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir},%{_libdir}}
+install -d $RPM_BUILD_ROOT%{_includedir}/dcc
 
-rm -f $RPM_BUILD_ROOT/usr/sbin/logger
+INST_UID="$( id -u )" INST_GID="$( id -g )"; export INST_UID INST_GID
 
-# We are putting these in the docs directory
-rm -f $RPM_BUILD_ROOT/usr/sbin/hackmc
-rm -f $RPM_BUILD_ROOT/usr/sbin/na-spam
-rm -f $RPM_BUILD_ROOT/usr/sbin/ng-spam
-
-mv $RPM_BUILD_ROOT/usr/sbin/rcDCC $RPM_BUILD_ROOT/etc/rc.d/init.d/dccd
-chmod 755 $RPM_BUILD_ROOT/etc/init.d/dccd
+%{makeinstall} \
+       MANOWN=$INST_UID \
+       MANGRP=$INST_GID \
+       DCC_SUID=$INST_UID \
+       DCC_OWN=$INST_UID \
+       DCC_GRP=$INST_GID \
+       BINOWN=$INST_UID \
+       GRP=$INST_GID \
+       INSTALL="install -C" \
+       INST_BINDIR=$RPM_BUILD_ROOT%{cgidir} \
+       DCC_HOMEDIR=$RPM_BUILD_ROOT%{dccdir} \
+       DCC_CGIBINDIR=$RPM_BUILD_ROOT%{cgidir} \
+       DCC_LIBEXECDIR=$RPM_BUILD_ROOT%{_sbindir} \
+       DCC_BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
+       BINDIR=$RPM_BUILD_ROOT%{_bindir} \
+       MANDIR=$RPM_BUILD_ROOT%{_mandir}/man
+
+install misc/cron-dccd $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/dccd
+install misc/rcDCC $RPM_BUILD_ROOT%{_initrddir}/dccd
+install homedir/flod $RPM_BUILD_ROOT%{dccdir}/flod
+
+# move some binaries in place, wierd stuff...
+for i in dbclean dblist dccd dccifd dccsight wlist; do
+       mv -f $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_sbindir}
+done
+
+# install extras
+install dccifd/dccif-test/dccif-test $RPM_BUILD_ROOT%{_sbindir}
+install dccifd/dccif-test/dccif-test.pl $RPM_BUILD_ROOT%{_sbindir}
+install dccifd/dccif.pl $RPM_BUILD_ROOT%{_sbindir}
 
 # Set some initial logging, but no rejections
-perl -p -i -e "s/BRAND=\$/BRAND=RPMDEFAULT/ ; s/DCCM_LOG_AT=\$/\$&10/ ; " \
+perl -p -i -e "s/BRAND=\$/BRAND=%{version}-%{release}/ ; s/DCCM_LOG_AT=\$/\$&10/ ; " \
        $RPM_BUILD_ROOT%{dccdir}/dcc_conf
 
-umask 077
-cat > $RPM_BUILD_ROOT%{dccdir}/flod <<EOF
-# hostname,port     rem-id [passwd-id] [out-opts] [in-opts]
-
-# this will not work
-# nonesuch.example.com,-       32767 100
-EOF
+# prepare for docs inclusion
+cp misc/README README.misc
+cp homedir/README README.homedir
+cp cgi-bin/README README.cgi-bin
+
+# install devel files
+install dccd/*.h $RPM_BUILD_ROOT%{_includedir}/dcc
+install dcclib/*.h $RPM_BUILD_ROOT%{_includedir}/dcc
+install include/*.h $RPM_BUILD_ROOT%{_includedir}/dcc
+install srvrlib/*.h $RPM_BUILD_ROOT%{_includedir}/dcc
+install dcclib/libdcc.a $RPM_BUILD_ROOT%{_libdir}
+install srvrlib/libsrvr.a $RPM_BUILD_ROOT%{_libdir}
+install thrlib/libthr.a $RPM_BUILD_ROOT%{_libdir}
+
+# house cleaning
+rm -f $RPM_BUILD_ROOT/var/www/dcc-bin/README
+rm -f $RPM_BUILD_ROOT%{_sbindir}/rcDCC
+rm -f $RPM_BUILD_ROOT%{_sbindir}/cron-dccd
+rm -f $RPM_BUILD_ROOT%{_sbindir}/logger
+rm -f $RPM_BUILD_ROOT%{_sbindir}/updatedcc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-/usr/sbin/useradd -d /var/dcc -r dcc >/dev/null 2>&1 || :
+# TODO register userid in uid_gid.db.txt
+%useradd -u XXX -d %{dccdir} -r dcc
 
 %postun
 if [ $1 = 0 ]; then
-        /usr/sbin/userdel -r dcc > /dev/null 2>&1 || :
+       %userremove dcc
 fi
 
 %post
-/sbin/chkconfig --add dccd || :
-/sbin/chkconfig --level 016 dccd off || :
+/sbin/chkconfig --add dccd
 umask 022
-/usr/bin/cdcc info > %{dccdir}/map.txt || :
+/usr/bin/cdcc info > %{dccdir}/map.txt
 
 %post cgi
 echo The scripts need configured and added into your web configuration.
@@ -162,6 +262,11 @@ fi
 
 %files
 %defattr(644,root,root,755)
+%doc CHANGES FAQ.html FAQ.txt INSTALL.html INSTALL.txt LICENSE cdcc.html
+%doc dbclean.html dblist.html dccd.html dcc.html dccproc.html
+%doc dccsight.html homedir/flod homedir/ids homedir/map.txt homedir/README
+%doc misc/dcc.m4 misc/dccdnsbl.m4 misc/hackmc
+#%doc dccm.html
 %dir %{dccdir}
 %dir %{dccdir}/log
 %dir %{dccdir}/userdirs/local
@@ -169,44 +274,70 @@ fi
 %dir %{dccdir}/userdirs/procmail
 %dir %{dccdir}/userdirs/esmtp
 %dir /var/run/dcc
-%doc CHANGES FAQ.html FAQ.txt INSTALL.html INSTALL.txt LICENSE cdcc.html dbclean.html dblist.html dccd.html dcc.html dccm.html dccproc.html dccsight.html homedir/flod homedir/ids homedir/map.txt homedir/README misc/dcc.m4 misc/dccdnsbl.m4 misc/hackmc misc/na-spam misc/ng-spam
-%config(noreplace) %verify(not size mtime md5) %{dccdir}/dcc_conf
-%config(noreplace) %verify(not size mtime md5) %{dccdir}/whiteclnt
-%config(noreplace) %verify(not size mtime md5) %{dccdir}/whitecommon
-%config(noreplace) %verify(not size mtime md5) %{dccdir}/whitelist
-%config(noreplace) %verify(not size mtime md5) %{dccdir}/ids
-%config(noreplace) %verify(not size mtime md5) %{dccdir}/flod
-%config(noreplace) %verify(not size mtime md5) %{dccdir}/dcc_db
-%config(noreplace) %verify(not size mtime md5) %{dccdir}/dcc_db.hash
-%config(noreplace) %verify(not size mtime md5) %{dccdir}/map
+%config(noreplace) %verify(not md5 mtime size) %{dccdir}/dcc_conf
+%config(noreplace) %verify(not md5 mtime size) %{dccdir}/whiteclnt
+%config(noreplace) %verify(not md5 mtime size) %{dccdir}/whitecommon
+%config(noreplace) %verify(not md5 mtime size) %{dccdir}/whitelist
+%config(noreplace) %verify(not md5 mtime size) %{dccdir}/ids
+%config(noreplace) %verify(not md5 mtime size) %{dccdir}/flod
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{dccdir}/map
+#%config(noreplace) %verify(not size mtime md5) %{dccdir}/dcc_db
+#%config(noreplace) %verify(not size mtime md5) %{dccdir}/dcc_db.hash
 %{dccdir}/map.txt
+%{dccdir}/grey_flod
+%{dccdir}/grey_whitelist
+
+%files client
+%defattr(644,root,root,755)
+%attr(4755,root,root) %{_bindir}/cdcc
+%attr(4755,root,root) %{_bindir}/dccproc
+%{_mandir}/man8/cdcc.8*
+%{_mandir}/man8/dccproc.8*
+
+%files server
+%defattr(644,root,root,755)
 %attr(754,root,root) /etc/rc.d/init.d/dccd
 %attr(750,root,root) /etc/cron.daily/dccd
-%attr(755,root,root) %{_bindir}/cdcc
-%attr(755,root,root) %{_bindir}/dccproc
+%attr(4755,root,root) %{_sbindir}/dccsight
 %attr(755,root,root) %{_sbindir}/dbclean
 %attr(755,root,root) %{_sbindir}/dblist
+%attr(755,root,root) %{_sbindir}/dcc-stats-collect
+%attr(755,root,root) %{_sbindir}/dcc-stats-graph
+%attr(755,root,root) %{_sbindir}/dcc-stats-init
 %attr(755,root,root) %{_sbindir}/dccd
-%attr(755,root,root) %{_sbindir}/dccm
-%attr(755,root,root) %{_sbindir}/dccsight
-%attr(755,root,root) %{_sbindir}/refeed
+%attr(755,root,root) %{_sbindir}/dccif-test
+%attr(755,root,root) %{_sbindir}/dccif-test.pl
+%attr(755,root,root) %{_sbindir}/dccif.pl
+%attr(755,root,root) %{_sbindir}/dccifd
+%attr(755,root,root) %{_sbindir}/fetch-testmsg-whitelist
+%attr(755,root,root) %{_sbindir}/hackmc
+%attr(755,root,root) %{_sbindir}/newwebuser
+%attr(755,root,root) %{_sbindir}/wlist
+# sendmail stuff
+#%attr(755,root,root) %{_sbindir}/dccm
+#%{_datadir}/sendmail-cf/feature/dcc.m4
+#%{_datadir}/sendmail-cf/feature/dccdnsbl.m4
 %attr(755,root,root) %{_sbindir}/start-dccd
+%attr(755,root,root) %{_sbindir}/start-dccifd
 %attr(755,root,root) %{_sbindir}/start-dccm
+%attr(755,root,root) %{_sbindir}/start-grey
+%attr(755,root,root) %{_sbindir}/stats-get
 %attr(755,root,root) %{_sbindir}/stop-dccd
-%attr(755,root,root) %{_sbindir}/wlist
-%{_datadir}/sendmail-cf/feature/dcc.m4
-%{_datadir}/sendmail-cf/feature/dccdnsbl.m4
-
-%{_mandir}/man8/*
+%{_mandir}/man8/dbclean.8*
+%{_mandir}/man8/dblist.8*
+%{_mandir}/man8/dcc.8*
+%{_mandir}/man8/dccd.8*
+%{_mandir}/man8/dccifd.8*
+%{_mandir}/man8/dccm.8*
+%{_mandir}/man8/dccsight.8*
 
 %files cgi
 %defattr(644,root,root,755)
-%dir %{dccdir}/cgi-bin
-%{dccdir}/cgi-bin/chgpasswd
-%{dccdir}/cgi-bin/common
-%{dccdir}/cgi-bin/edit-whiteclnt
-%{dccdir}/cgi-bin/http2https
-%{dccdir}/cgi-bin/list-log
-%{dccdir}/cgi-bin/list-msg
-%{dccdir}/cgi-bin/README
-%{dccdir}/cgi-bin/webuser-notify
+%{cgidir}/chgpasswd
+%{cgidir}/common
+%{cgidir}/edit-whiteclnt
+%{cgidir}/http2https
+%{cgidir}/list-log
+%{cgidir}/list-msg
+%{cgidir}/README
+%{cgidir}/webuser-notify
This page took 0.097351 seconds and 4 git commands to generate.