2016-02-08 16:45:02 +00:00
|
|
|
%global _hardened_build 1
|
2016-04-15 14:32:08 +00:00
|
|
|
%global prever beta1
|
2016-02-24 01:02:56 +00:00
|
|
|
%ifarch %{nodejs_arches}
|
2016-02-08 19:32:15 +00:00
|
|
|
%global uglify 1
|
|
|
|
%endif
|
|
|
|
|
2016-02-08 16:45:02 +00:00
|
|
|
|
|
|
|
Name: dnsdist
|
|
|
|
Version: 1.0.0
|
2016-04-15 14:32:08 +00:00
|
|
|
Release: 0.10.%{?prever}%{?dist}
|
2016-02-08 16:45:02 +00:00
|
|
|
Summary: Highly DNS-, DoS- and abuse-aware loadbalancer
|
|
|
|
Group: System Environment/Daemons
|
|
|
|
License: GPLv2
|
|
|
|
URL: http://dnsdist.org
|
|
|
|
Source0: http://downloads.powerdns.com/releases/%{name}-%{version}-%{?prever}.tar.bz2
|
|
|
|
|
|
|
|
BuildRequires: boost-devel
|
|
|
|
BuildRequires: libedit-devel
|
|
|
|
BuildRequires: libsodium-devel
|
|
|
|
BuildRequires: lua-devel
|
2016-02-24 01:02:56 +00:00
|
|
|
%ifnarch %{power64} aarch64 s390 s390x
|
2016-02-08 16:45:02 +00:00
|
|
|
BuildRequires: luajit-devel
|
2016-04-15 14:32:08 +00:00
|
|
|
%else
|
|
|
|
BuildRequires: lua-devel
|
2016-02-08 18:27:45 +00:00
|
|
|
%endif
|
2016-04-15 14:32:08 +00:00
|
|
|
BuildRequires: protobuf-devel
|
|
|
|
BuildRequires: re2-devel
|
2016-02-08 16:45:02 +00:00
|
|
|
BuildRequires: readline-devel
|
2016-04-15 14:32:08 +00:00
|
|
|
BuildRequires: systemd-devel
|
2016-02-08 16:45:02 +00:00
|
|
|
BuildRequires: systemd-units
|
2016-02-08 19:32:15 +00:00
|
|
|
%if 0%{?uglify}
|
2016-02-08 16:45:02 +00:00
|
|
|
BuildRequires: uglify-js
|
2016-02-08 19:32:15 +00:00
|
|
|
%endif
|
2016-02-08 16:45:02 +00:00
|
|
|
Requires(post): systemd
|
2016-04-15 14:32:08 +00:00
|
|
|
Requires(preun): shadow-utils
|
2016-02-08 16:45:02 +00:00
|
|
|
Requires(preun): systemd
|
|
|
|
Requires(postun): systemd
|
|
|
|
|
|
|
|
%description
|
|
|
|
dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life
|
|
|
|
is to route traffic to the best server, delivering top performance to
|
|
|
|
legitimate users while shunting or blocking abusive traffic.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}-%{?prever}
|
|
|
|
|
2016-04-15 14:32:08 +00:00
|
|
|
# run as dnsdist user
|
|
|
|
sed -i '/^ExecStart/ s/dnsdist/dnsdist -u dnsdist -g dnsdist/' dnsdist.service.in
|
|
|
|
|
2016-02-08 16:45:02 +00:00
|
|
|
%build
|
|
|
|
%configure \
|
|
|
|
--sysconfdir=%{_sysconfdir}/%{name} \
|
|
|
|
--disable-static \
|
|
|
|
--disable-dependency-tracking \
|
|
|
|
--disable-silent-rules \
|
|
|
|
--enable-dnscrypt \
|
|
|
|
--enable-libsodium \
|
2016-02-24 01:02:56 +00:00
|
|
|
%ifnarch %{power64} aarch64 s390 s390x
|
2016-02-08 16:45:02 +00:00
|
|
|
--with-luajit \
|
2016-04-15 14:32:08 +00:00
|
|
|
%else
|
|
|
|
--with-lua \
|
2016-02-08 19:32:15 +00:00
|
|
|
%endif
|
2016-02-08 16:45:02 +00:00
|
|
|
--enable-unit-tests
|
|
|
|
rm html/js/*
|
2016-02-08 19:32:15 +00:00
|
|
|
%if 0%{?uglify}
|
2016-02-08 16:45:02 +00:00
|
|
|
make min_js
|
2016-02-08 19:32:15 +00:00
|
|
|
%else
|
2016-02-08 19:39:26 +00:00
|
|
|
cp src_js/*.js html/js
|
2016-02-08 19:32:15 +00:00
|
|
|
%endif
|
|
|
|
|
2016-02-08 16:45:02 +00:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
mv dnsdistconf.lua dnsdist.conf.sample
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
|
|
|
|
# install systemd unit file
|
2016-02-24 01:02:56 +00:00
|
|
|
install -D -p -m 644 contrib/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/%{name}/
|
2016-02-08 16:45:02 +00:00
|
|
|
|
2016-04-15 14:32:08 +00:00
|
|
|
%pre
|
|
|
|
getent group dnsdist >/dev/null || groupadd -r dnsdist
|
|
|
|
getent passwd dnsdist >/dev/null || \
|
|
|
|
useradd -r -g dnsdist -d / -s /sbin/nologin \
|
|
|
|
-c "dnsdist user" dnsdist
|
|
|
|
exit 0
|
2016-02-08 16:45:02 +00:00
|
|
|
|
|
|
|
%post
|
|
|
|
%systemd_post %{name}.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun %{name}.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart %{name}.service
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc dnsdist.conf.sample
|
|
|
|
%doc README.md
|
|
|
|
%license COPYING
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_mandir}/man1/%{name}.1*
|
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%dir %{_sysconfdir}/%{name}/
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2016-04-15 14:32:08 +00:00
|
|
|
* Fri Apr 15 2016 Ruben Kerkhof <ruben@rubenkerkhof.com> - 1.9.9-0.10.beta1
|
|
|
|
- Upstream released new version
|
|
|
|
- Run as dnsdist user / group (#1326623)
|
|
|
|
- Enable support for libre2 and protobufs
|
|
|
|
- Fix systemd detection
|
|
|
|
- Only build with lua if luajit is not available
|
|
|
|
|
2016-03-08 12:30:25 +00:00
|
|
|
* Tue Mar 08 2016 Ruben Kerkhof <ruben@rubenkerkhof.com> 1.0.0-0.9.alpha2
|
|
|
|
- Rebuild for libsodium soname bump
|
|
|
|
|
2016-02-24 01:02:56 +00:00
|
|
|
* Tue Feb 23 2016 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.0-0.8.alpha2
|
|
|
|
- Add aarch64/s390(x) to luajit excludes
|
|
|
|
- uglify-js available on nodejs arches so use that define
|
|
|
|
|
2016-02-08 19:39:26 +00:00
|
|
|
* Mon Feb 08 2016 Sander Hoentjen <sander@hoentjen.eu> - 1.0.0-0.7.alpha2
|
|
|
|
- Only copy .js files when minify-js is not available
|
|
|
|
|
2016-02-08 19:32:15 +00:00
|
|
|
* Mon Feb 08 2016 Sander Hoentjen <sander@hoentjen.eu> - 1.0.0-0.6.alpha2
|
|
|
|
- PPC on EPEL does not have uglify-js
|
|
|
|
|
2016-02-08 18:27:45 +00:00
|
|
|
* Mon Feb 08 2016 Sander Hoentjen <sander@hoentjen.eu> - 1.0.0-0.5.alpha2
|
|
|
|
- Don't build against luijit on ppc, it is not available there
|
|
|
|
|
2016-02-08 16:45:02 +00:00
|
|
|
* Mon Feb 08 2016 Sander Hoentjen <sander@hoentjen.eu> - 1.0.0-0.4.alpha2
|
|
|
|
- Add sample config file
|
|
|
|
|
|
|
|
* Sat Feb 06 2016 Sander Hoentjen <sander@hoentjen.eu> - 1.0.0-0.3.alpha2
|
|
|
|
- Update to new upstream
|
|
|
|
|
|
|
|
* Sun Jan 10 2016 Sander Hoentjen <sander@hoentjen.eu> - 1.0.0-0.2.alpha1
|
|
|
|
- SPEC fixes for review
|
|
|
|
|
|
|
|
* Sun Jan 10 2016 Sander Hoentjen <sander@hoentjen.eu> - 1.0.0-0.1.alpha1
|
|
|
|
- Initial package
|