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