Mercurial > dnsbl
comparison dnsbl.spec.in @ 52:a84752107aca
host names cannot have consecutive periods.
author | carl |
---|---|
date | Thu, 15 Jul 2004 23:01:41 -0700 |
parents | 9f2971c692d0 |
children | c2371bb6cf84 |
comparison
equal
deleted
inserted
replaced
51:9f2971c692d0 | 52:a84752107aca |
---|---|
1 Summary: DNSBL Sendmail Milter | 1 Summary: DNSBL Sendmail Milter |
2 Name: dnsbl | 2 Name: dnsbl |
3 Version: 3.3 | 3 Version: 3.4 |
4 Release: 2 | 4 Release: 2 |
5 Copyright: GPL | 5 Copyright: GPL |
6 Group: System Environment/Daemons | 6 Group: System Environment/Daemons |
7 Source: http://www.five-ten-sg.com/util/dnsbl.tar.gz | 7 Source: http://www.five-ten-sg.com/util/dnsbl.tar.gz |
8 Patch0: dnsbl.rc.patch | |
9 BuildRoot: %{_tmppath}/%{name}-%{version} | 8 BuildRoot: %{_tmppath}/%{name}-%{version} |
10 | 9 |
11 Requires(pre): /usr/sbin/groupadd | 10 Requires(pre): /usr/sbin/groupadd |
12 Requires(pre): /usr/sbin/useradd | 11 Requires(pre): /usr/sbin/useradd |
13 Requires(pre): /usr/bin/getent | 12 Requires(pre): /usr/bin/getent |
27 The DNSBL milter reads a text configuration file (dnsbl.conf) on startup, and whenever the config file (or any of the referenced include files) is changed. The entire configuration file is case insensitive. | 26 The DNSBL milter reads a text configuration file (dnsbl.conf) on startup, and whenever the config file (or any of the referenced include files) is changed. The entire configuration file is case insensitive. |
28 | 27 |
29 %prep | 28 %prep |
30 | 29 |
31 %setup | 30 %setup |
32 %patch0 -p1 | |
33 | 31 |
34 %build | 32 %build |
35 pwd | 33 pwd |
36 g++ -c $CXXFLAGS -pthread dnsbl.cpp | 34 g++ -c $CXXFLAGS -pthread dnsbl.cpp |
37 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread | 35 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread |
38 | 36 |
39 %install | 37 %install |
40 DST=%{buildroot} | 38 DST=%{buildroot} |
41 if [ "%{buildroot}" = "/" -o -z "%{buildroot}" ] ; then | 39 if [ "%{buildroot}" = "/" -o -z "%{buildroot}" ] ; then |
42 echo sorry, you probably do not want me to delete the old buildroot at %{buildroot} | 40 echo sorry, you probably do not want me to delete the old buildroot at %{buildroot} |
43 exit 1 | 41 exit 1 |
44 fi | 42 fi |
45 | 43 |
46 rm -rf %{buildroot} | 44 rm -rf %{buildroot} |
47 mkdir -p %{buildroot}/etc/dnsbl | 45 mkdir -p %{buildroot}/etc/dnsbl |
48 | 46 |
49 install -m 644 dnsbl.conf %{buildroot}/etc/dnsbl/dnsbl.conf | 47 install -m 644 dnsbl.conf %{buildroot}/etc/dnsbl/dnsbl.conf |
50 install -m 644 html-tags.conf %{buildroot}/etc/dnsbl/html-tags.conf | 48 install -m 644 html-tags.conf %{buildroot}/etc/dnsbl/html-tags.conf |
51 install -m 644 tld.conf %{buildroot}/etc/dnsbl/tld.conf | 49 install -m 644 tld.conf %{buildroot}/etc/dnsbl/tld.conf |
50 install -m 644 sample.conf %{buildroot}/etc/dnsbl/sample.conf | |
52 | 51 |
53 mkdir -p %{buildroot}/usr/sbin | 52 mkdir -p %{buildroot}/usr/sbin |
54 install -m 755 dnsbl %{buildroot}/usr/sbin/dnsbl | 53 install -m 755 dnsbl %{buildroot}/usr/sbin/dnsbl |
55 | 54 |
56 mkdir -p %{buildroot}/etc/init.d | 55 mkdir -p %{buildroot}/etc/rc.d/init.d |
57 install -m 755 dnsbl.rc %{buildroot}/etc/init.d/dnsbl | 56 install -m 755 dnsbl.rc %{buildroot}/etc/rc.d/init.d/dnsbl |
58 | 57 |
59 mkdir -p %{buildroot}/var/run/dnsbl | 58 mkdir -p %{buildroot}/var/run/dnsbl |
60 | 59 |
61 %pre | 60 %pre |
62 /usr/bin/getent passwd dnsbl || | 61 /usr/bin/getent passwd dnsbl || |
65 #[JOG] Attempt to migrate an existing, non-rpm install. | 64 #[JOG] Attempt to migrate an existing, non-rpm install. |
66 # WARNING! This may cause blindness, loss of appetite, and a general | 65 # WARNING! This may cause blindness, loss of appetite, and a general |
67 # feeling of ill will towards the author of this script. Please refer | 66 # feeling of ill will towards the author of this script. Please refer |
68 # to the Licence file for warranty information... | 67 # to the Licence file for warranty information... |
69 if [ -f "/var/dnsbl/dnsbl.conf" -a ! -f "/etc/dnsbl/dnsbl.conf" ] ; then | 68 if [ -f "/var/dnsbl/dnsbl.conf" -a ! -f "/etc/dnsbl/dnsbl.conf" ] ; then |
70 echo Existing installation found at /var/dnsbl/ Migrating configuation... | 69 echo Existing installation found at /var/dnsbl/ Migrating configuation... |
71 # create the conf directory so rpm can find it in a minute... | 70 # create the conf directory so rpm can find it in a minute... |
72 mkdir /etc/dnsbl/ | 71 mkdir /etc/dnsbl/ |
73 # and try to copy all of the relavent config files that are below this directory | 72 # and try to copy all of the relavent config files that are below this directory |
74 cd /var/dnsbl/ | 73 cd /var/dnsbl/ |
75 grep '^include ' /var/dnsbl/dnsbl.conf | cut -d ' ' -f 2 | grep -v '^/' | xargs cp --target-directory=/etc/dnsbl/ /var/dnsbl/dnsbl.conf | 74 grep '^include ' /var/dnsbl/dnsbl.conf | cut -d ' ' -f 2 | grep -v '^/' | xargs cp --target-directory=/etc/dnsbl/ /var/dnsbl/dnsbl.conf |
76 fi | 75 fi |
77 | 76 |
78 | 77 |
79 %post | 78 %post |
80 /sbin/chkconfig --add dnsbl | 79 /sbin/chkconfig --add dnsbl |
81 /sbin/chkconfig dnsbl on | 80 /sbin/chkconfig dnsbl on |
82 /sbin/service dnsbl start | 81 /sbin/service dnsbl start |
83 | 82 |
84 echo Remember to edit /etc/dnsbl.conf and add the following line to your sendmail.mc: | 83 echo Remember to edit /etc/dnsbl.conf and add the following line to your sendmail.mc: |
85 echo "INPUT_MAIL_FILTER(\`dnsbl\', \`S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=C:30s;S:2m;R:2m;E:5m\')" | 84 echo "INPUT_MAIL_FILTER(\`dnsbl\', \`S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=C:30s;S:5m;R:5m;E:5m\')" |
86 echo | 85 echo |
87 | 86 |
88 | 87 |
89 %preun | 88 %preun |
90 if [ $1 -eq 0 ]; then | 89 if [ $1 -eq 0 ]; then |
97 | 96 |
98 %clean | 97 %clean |
99 | 98 |
100 %files | 99 %files |
101 %defattr(-,root,root) | 100 %defattr(-,root,root) |
102 %config /etc/dnsbl/ | 101 %config(noreplace) /etc/dnsbl/ |
103 /etc/init.d/dnsbl | 102 %doc RELEASE_NOTES LICENSE sample.conf test.cpp |
103 /etc/rc.d/init.d/dnsbl | |
104 /usr/sbin/dnsbl | 104 /usr/sbin/dnsbl |
105 %dir %attr(0750,dnsbl,root) /var/run/dnsbl | 105 %dir %attr(0750,dnsbl,root) /var/run/dnsbl |
106 | 106 |
107 %changelog | 107 %changelog |
108 * Thu Jul 15 2004 John Gunkel <antispam@boing.ca> 1.3 | |
109 - patch to rc file no longer needed | |
110 - see RELEASE_NOTES | |
111 | |
108 * Mon Jul 05 2004 John Gunkel <jgunkel@palliser.ca> 1.2 | 112 * Mon Jul 05 2004 John Gunkel <jgunkel@palliser.ca> 1.2 |
109 - Fixed some typos | 113 - Fixed some typos |
110 - removed patch into separate file | 114 - removed patch into separate file |
111 - added config migration as suggested by Carl | 115 - added config migration as suggested by Carl |
112 - Added reminder to edit sendmail.mc | 116 - Added reminder to edit sendmail.mc |