]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- updated to 4.0.9 (fixes CVE-2019-10162 CVE-2019-10163 CVE-2019-10203; the last...
[packages/pdns.git] / pdns.spec
1 # TODO
2 # - warning: Installed (but unpackaged) file(s) found:
3 #   /etc/pdns/pdns.conf-dist
4 # - do not use 'djbdns' group!
5 Summary:        PowerDNS - a Versatile Database Driven Nameserver
6 Summary(pl.UTF-8):      PowerDNS - wielofunkcyjny serwer nazw korzystający z relacyjnych baz danych
7 Name:           pdns
8 Version:        4.0.9
9 Release:        1
10 License:        GPL v2
11 Group:          Networking/Daemons
12 Source0:        https://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2
13 # Source0-md5:  906aa90e95b194dcd773627b298787be
14 Source1:        https://downloads.powerdns.com/documentation/%{name}.pdf
15 # Source1-md5:  c7f3884185358e59d208e166eddb246c
16 Source2:        https://downloads.powerdns.com/documentation/%{name}.txt
17 Source3:        %{name}.init
18 Source4:        %{name}.conf
19 Source5:        %{name}.sysconfig
20 Patch1:         %{name}-openldap-2.3.patch
21 URL:            https://www.powerdns.com/
22 BuildRequires:  autoconf >= 2.61
23 BuildRequires:  automake >= 1:1.11
24 BuildRequires:  bison
25 BuildRequires:  boost-devel >= 1.35.0
26 BuildRequires:  flex
27 BuildRequires:  libpq++-devel
28 BuildRequires:  libstdc++-devel >= 6:4.7
29 BuildRequires:  libtool >= 2:2.2.2
30 BuildRequires:  lua-devel >= 5.1
31 BuildRequires:  mysql-devel
32 BuildRequires:  openldap-devel >= 2.4.6
33 BuildRequires:  openssl-devel
34 BuildRequires:  pkgconfig
35 BuildRequires:  polarssl-devel >= 1.1
36 BuildRequires:  postgresql-devel
37 BuildRequires:  protobuf-devel
38 BuildRequires:  rpmbuild(macros) >= 1.647
39 BuildRequires:  sed >= 4.0
40 BuildRequires:  sqlite3-devel >= 3
41 BuildRequires:  zlib-devel
42 Requires(post,preun,postun):    systemd-units >= 38
43 Requires(post): sed >= 4.0
44 Requires(post,preun):   /sbin/chkconfig
45 Requires(postun):       /usr/sbin/groupdel
46 Requires(postun):       /usr/sbin/userdel
47 Requires(pre):  /bin/id
48 Requires(pre):  /usr/bin/getgid
49 Requires(pre):  /usr/sbin/groupadd
50 Requires(pre):  /usr/sbin/useradd
51 Requires:       rc-scripts
52 Requires:       systemd-units >= 0.38
53 Provides:       group(djbdns)
54 Provides:       nameserver
55 Provides:       user(pdns)
56 Obsoletes:      powerdns
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %description
60 PowerDNS is a versatile nameserver which supports a large number of
61 different backends ranging from simple zonefiles to relational
62 databases and load balancing/failover algorithms.
63
64 %description -l pl.UTF-8
65 PowerDNS to wielofunkcyjny serwer nazw posiadający dużą liczbę wtyczek
66 od prostych stref (a'la BIND) począwszy, a na relacyjnych bazach
67 danych skończywszy oraz zawierający algorytmy zrównoważenia obciążenia
68 i przełączania w wypadku awarii.
69
70 %package backend-pipe
71 Summary:        PowerDNS support for custom pipe backend
72 Summary(pl.UTF-8):      Obsługa własnego mechanizmu przechowywania stref dla PowerDNS-a
73 Group:          Development/Libraries
74 Requires:       %{name} = %{version}-%{release}
75
76 %description backend-pipe
77 This package allows creation of own backend using simple STDIN/STDOUT
78 API. Example backend script in Perl is provided in package
79 documentation.
80
81 %description backend-pipe -l pl.UTF-8
82 Ten pakiet pozwala na utworzenie własnego mechanizmu przechowywania
83 stref za pomocą prostego interfejsu STDIN/STDOUT. Przykładowy skrypt w
84 Perlu został dołączony do dokumentacji pakietu.
85
86 %package backend-gpgsql
87 Summary:        PowerDNS support for PostgreSQL
88 Summary(pl.UTF-8):      Obsługa baz PostgreSQL dla PowerDNS-a
89 Group:          Development/Libraries
90 Requires:       %{name} = %{version}-%{release}
91
92 %description backend-gpgsql
93 This package allows zone storage in PostgreSQL relational db tables.
94
95 %description backend-gpgsql -l pl.UTF-8
96 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
97 relacyjnej bazy danych PostgreSQL.
98
99 %package backend-gmysql
100 Summary:        PowerDNS support for MySQL
101 Summary(pl.UTF-8):      Obsługa baz MySQL dla PowerDNS-a
102 Group:          Development/Libraries
103 Requires:       %{name} = %{version}-%{release}
104
105 %description backend-gmysql
106 This package allows zone storage in MySQL relational db tables.
107
108 %description backend-gmysql -l pl.UTF-8
109 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
110 relacyjnej bazy danych MySQL.
111
112 %package backend-gsqlite3
113 Summary:        PowerDNS support for SQLite 3
114 Summary(pl.UTF-8):      Obsługa baz SQLite 3 dla PowerDNS-a
115 Group:          Development/Libraries
116 Requires:       %{name} = %{version}-%{release}
117
118 %description backend-gsqlite3
119 This package allows zone storage in SQLite 3 relational db tables.
120
121 %description backend-gsqlite3 -l pl.UTF-8
122 Ten pakiet pozwala na przechowywanie danych o strefach w tabelach
123 relacyjnej bazy danych SQLite 3.
124
125 %package backend-ldap
126 Summary:        PowerDNS support for LDAP
127 Summary(pl.UTF-8):      Obsługa LDAP dla PowerDNS-a
128 Group:          Development/Libraries
129 Requires:       %{name} = %{version}-%{release}
130
131 %description backend-ldap
132 This package allows zone storage in LDAP directory.
133
134 %description backend-ldap -l pl.UTF-8
135 Ten pakiet pozwala na przechowywanie danych o strefach w katalogu
136 LDAP.
137
138 %prep
139 %setup -q
140 %patch1 -p1
141 cp -p %{SOURCE1} .
142 cp -p %{SOURCE2} .
143 cp -p %{SOURCE4} .
144
145 %if "%{_lib}" != "lib"
146 %{__sed} -i -e 's/module-dir=\/usr\/lib\/pdns/module-dir=\/usr\/%{_lib}\/pdns/' pdns.conf
147 %endif
148
149 %build
150 CPPFLAGS="-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=\"\""
151 %{__libtoolize}
152 %{__aclocal} -I .
153 %{__autoconf}
154 %{__automake}
155 %configure \
156         --sysconfdir=%{_sysconfdir}/%{name} \
157         --disable-silent-rules \
158         --disable-static \
159         --with-dynmodules="gsqlite3 gmysql gpgsql pipe ldap" \
160         --with-lua \
161         --with-modules="" \
162         --with-mysql-includes=%{_includedir} \
163         --with-mysql-lib=%{_libdir} \
164         --with-pgsql-includes=%{_includedir} \
165         --with-pgsql-lib=%{_libdir} \
166         --with-socketdir=/var/run \
167         --with-system-polarssl \
168         --with-systemd=%{systemdunitdir}
169
170 %{__make}
171
172 %install
173 rm -rf $RPM_BUILD_ROOT
174 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
175
176 %{__make} install \
177         DESTDIR=$RPM_BUILD_ROOT
178
179 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
180 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
181 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/pdns
182
183 # useless - modules are dlopened by *.so
184 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
185
186 # we put that in using %doc
187 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
188
189 %clean
190 rm -rf $RPM_BUILD_ROOT
191
192 %pre
193 %groupadd -g 32 djbdns
194 %useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns
195
196 %post
197 %systemd_post %{name}.service
198 # dirty hack so the config file is processed correctly, and server does not respawn
199 sed -i -e 's/^ *//' /etc/pdns/pdns.conf
200
201 /sbin/chkconfig --add pdns
202 %service pdns restart
203
204 %preun
205 if [ "$1" = "0" ]; then
206         %service pdns stop
207         /sbin/chkconfig --del pdns
208 fi
209 %systemd_preun %{name}.service
210
211 %postun
212 if [ "$1" = "0" ]; then
213         %userremove pdns
214         %groupremove djbdns
215 fi
216 %systemd_reload
217
218 %files
219 %defattr(644,root,root,755)
220 %doc INSTALL README pdns.pdf pdns.txt
221 %attr(754,root,root) /etc/rc.d/init.d/pdns
222 %dir %{_sysconfdir}/%{name}
223 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
224 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pdns
225 %{systemdunitdir}/pdns.service
226 %{systemdunitdir}/pdns@.service
227 %attr(755,root,root) %{_sbindir}/pdns_server
228 %attr(755,root,root) %{_bindir}/dnspcap2protobuf
229 %attr(755,root,root) %{_bindir}/pdns_control
230 %attr(755,root,root) %{_bindir}/pdnsutil
231 %attr(755,root,root) %{_bindir}/zone2json
232 %attr(755,root,root) %{_bindir}/zone2ldap
233 %attr(755,root,root) %{_bindir}/zone2sql
234 %dir %{_libdir}/%{name}
235 %{_mandir}/man1/calidns.1*
236 %{_mandir}/man1/dnsbulktest.1*
237 %{_mandir}/man1/dnsgram.1*
238 %{_mandir}/man1/dnspcap2protobuf.1*
239 %{_mandir}/man1/dnsreplay.1*
240 %{_mandir}/man1/dnsscan.1*
241 %{_mandir}/man1/dnsscope.1*
242 %{_mandir}/man1/dnstcpbench.1*
243 %{_mandir}/man1/dnswasher.1*
244 %{_mandir}/man1/dumresp.1*
245 %{_mandir}/man1/ixplore.1*
246 %{_mandir}/man1/nproxy.1*
247 %{_mandir}/man1/nsec3dig.1*
248 %{_mandir}/man1/pdns_control.1*
249 %{_mandir}/man1/pdns_notify.1*
250 %{_mandir}/man1/pdns_server.1*
251 %{_mandir}/man1/pdnsutil.1*
252 %{_mandir}/man1/saxfr.1*
253 %{_mandir}/man1/sdig.1*
254 %{_mandir}/man1/zone2json.1*
255 %{_mandir}/man1/zone2ldap.1*
256 %{_mandir}/man1/zone2sql.1*
257
258 %files backend-gmysql
259 %defattr(644,root,root,755)
260 %doc modules/gmysqlbackend/*schema.mysql.sql
261 %attr(755,root,root) %{_libdir}/%{name}/*mysql*.so*
262
263 %files backend-gpgsql
264 %defattr(644,root,root,755)
265 %doc modules/gpgsqlbackend/*schema.pgsql.sql
266 %attr(755,root,root) %{_libdir}/%{name}/*pgsql*.so*
267
268 %files backend-gsqlite3
269 %defattr(644,root,root,755)
270 %doc modules/gsqlite3backend/*schema.sqlite3.sql
271 %attr(755,root,root) %{_libdir}/%{name}/*sqlite3*.so*
272
273 %files backend-pipe
274 %defattr(644,root,root,755)
275 %attr(755,root,root) %{_libdir}/%{name}/*pipe*.so*
276
277 %files backend-ldap
278 %defattr(644,root,root,755)
279 %attr(755,root,root) %{_libdir}/%{name}/*ldap*.so*
This page took 0.0901 seconds and 4 git commands to generate.