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