Blame SPECS/dnssec-trigger.spec

2ac4eb
%global _hardened_build 1
2ac4eb
2ac4eb
Summary: NetworkManager plugin to update/reconfigure DNSSEC resolving
2ac4eb
Name: dnssec-trigger
2ac4eb
Version: 0.11
2ac4eb
Release: 22%{?dist}
2ac4eb
License: BSD
2ac4eb
Url: http://www.nlnetlabs.nl/downloads/dnssec-trigger/
2ac4eb
Source: http://www.nlnetlabs.nl/downloads/dnssec-trigger/%{name}-%{version}.tar.gz
2ac4eb
Source1:dnssec-triggerd.service
2ac4eb
Source2: dnssec-triggerd-keygen.service
2ac4eb
Source3: dnssec-trigger.conf
2ac4eb
# Latest NM dispatcher Python hook from upstream SVN
2ac4eb
# http://www.nlnetlabs.nl/svn/dnssec-trigger/trunk/contrib/01-dnssec-trigger-hook-new_nm
2ac4eb
Source4: 01-dnssec-trigger-hook
2ac4eb
Source5: dnssec-trigger.tmpfiles.d
2ac4eb
Source6: dnssec-triggerd-resolvconf-handle.sh
2ac4eb
Source7: dnssec-triggerd-resolvconf-handle.service
2ac4eb
# http://www.nlnetlabs.nl/svn/dnssec-trigger/trunk/contrib/dnssec.conf.sample
2ac4eb
Source8: dnssec.conf.sample
2ac4eb
Patch1: dnssec-trigger-0.11-improve_dialog_texts.patch
2ac4eb
Patch2: dnssec-trigger-842455.patch
2ac4eb
# https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=489
2ac4eb
Patch3: dnssec-trigger-0.11-nl489.patch
2ac4eb
Patch4: dnssec-trigger-0.11-coverity_scan.patch
2ac4eb
Patch5: dnssec-trigger-rh1254473.patch
2ac4eb
2ac4eb
Requires(postun): initscripts
2ac4eb
Requires: ldns >= 1.6.10, NetworkManager, NetworkManager-glib, unbound, xdg-utils
2ac4eb
Requires(pre): shadow-utils
2ac4eb
BuildRequires: desktop-file-utils systemd-units, openssl-devel, ldns-devel
2ac4eb
BuildRequires: gtk2-devel, NetworkManager-devel
2ac4eb
2ac4eb
BuildRequires: systemd
2ac4eb
Requires(post): systemd
2ac4eb
Requires(preun): systemd
2ac4eb
Requires(postun): systemd
2ac4eb
2ac4eb
%description
2ac4eb
dnssec-trigger reconfigures the local unbound DNS server. This unbound DNS
2ac4eb
server performs DNSSEC validation, but dnssec-trigger will signal it to
2ac4eb
use the DHCP obtained forwarders if possible, and fallback to doing its
2ac4eb
own AUTH queries if that fails, and if that fails prompt the user via
2ac4eb
dnssec-trigger-applet the option to go with insecure DNS only.
2ac4eb
2ac4eb
%prep
2ac4eb
%setup -q 
2ac4eb
# Fixup the name to not include "panel" in the menu item or name
2ac4eb
sed -i "s/ Panel//" panel/dnssec-trigger-panel.desktop.in
2ac4eb
sed -i "s/-panel//" panel/dnssec-trigger-panel.desktop.in
2ac4eb
# change some text in the popups
2ac4eb
%patch1 -p1
2ac4eb
%patch2 -p1
2ac4eb
%patch3 -p1
2ac4eb
%patch4 -p1
2ac4eb
%patch5 -p1
2ac4eb
2ac4eb
%build
2ac4eb
%configure  --with-keydir=/etc/dnssec-trigger 
2ac4eb
%{__make} %{?_smp_mflags}
2ac4eb
2ac4eb
%install
2ac4eb
rm -rf %{buildroot}
2ac4eb
%{__make} DESTDIR=%{buildroot} install
2ac4eb
install -d 0755 %{buildroot}%{_unitdir}
2ac4eb
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}d.service
2ac4eb
install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}d-keygen.service
2ac4eb
install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/
2ac4eb
2ac4eb
mkdir -p %{buildroot}%{_libexecdir}
2ac4eb
install -m 0755 %{SOURCE6} %{buildroot}%{_libexecdir}/%{name}d-resolvconf-handle.sh
2ac4eb
install -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/%{name}d-resolvconf-handle.service
2ac4eb
2ac4eb
desktop-file-install --dir=%{buildroot}%{_datadir}/applications dnssec-trigger-panel.desktop
2ac4eb
2ac4eb
# overwrite the stock NM hook since there is new one in upstream SVN that is not used by default
2ac4eb
install -p -m 0755 %{SOURCE4} %{buildroot}/%{_sysconfdir}/NetworkManager/dispatcher.d/01-dnssec-trigger-hook
2ac4eb
#install the /etc/dnssec.conf configuration file
2ac4eb
install -p -m 0644 %{SOURCE8} %{buildroot}/%{_sysconfdir}/dnssec.conf
2ac4eb
2ac4eb
# install the configuration for /var/run/dnssec-trigger into tmpfiles.d dir
2ac4eb
mkdir -p %{buildroot}%{_tmpfilesdir}
2ac4eb
install -m 644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_tmpfilesdir}/%{name}.conf
2ac4eb
# we must create the /var/run/dnssec-trigger directory
2ac4eb
mkdir -p %{buildroot}%{_localstatedir}/run
2ac4eb
install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name}
2ac4eb
2ac4eb
# supress the panel name everywhere including the gnome3 panel at the bottom
2ac4eb
ln -s dnssec-trigger-panel %{buildroot}%{_bindir}/dnssec-trigger
2ac4eb
2ac4eb
# Make dnssec-trigger.8 manpage available under names of all dnssec-trigger-*
2ac4eb
# executables
2ac4eb
for all in dnssec-trigger-control dnssec-trigger-control-setup dnssec-triggerd; do
2ac4eb
    ln -s %{_mandir}/man8/dnssec-trigger.8 %{buildroot}/%{_mandir}/man8/"$all".8
2ac4eb
done
2ac4eb
ln -s %{_mandir}/man8/dnssec-trigger.8 %{buildroot}/%{_mandir}/man8/dnssec-trigger.conf.8
2ac4eb
2ac4eb
%clean
2ac4eb
rm -rf ${RPM_BUILD_ROOT}
2ac4eb
2ac4eb
%files 
2ac4eb
%defattr(-,root,root,-)
2ac4eb
%doc README LICENSE
2ac4eb
%{_unitdir}/%{name}d.service
2ac4eb
%{_unitdir}/%{name}d-keygen.service
2ac4eb
%{_unitdir}/%{name}d-resolvconf-handle.service
2ac4eb
2ac4eb
%attr(0755,root,root) %dir %{_sysconfdir}/%{name}
2ac4eb
%attr(0755,root,root) %{_sysconfdir}/NetworkManager/dispatcher.d/01-dnssec-trigger-hook
2ac4eb
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/dnssec.conf
2ac4eb
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/dnssec-trigger.conf
2ac4eb
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/xdg/autostart/dnssec-trigger-panel.desktop
2ac4eb
%dir %{_localstatedir}/run/%{name}
2ac4eb
%{_tmpfilesdir}/%{name}.conf
2ac4eb
%{_bindir}/dnssec-trigger-panel
2ac4eb
%{_bindir}/dnssec-trigger
2ac4eb
%{_sbindir}/dnssec-trigger*
2ac4eb
%{_libexecdir}/%{name}d-resolvconf-handle.sh
2ac4eb
%{_mandir}/*/*
2ac4eb
%attr(0755,root,root) %dir %{_datadir}/%{name}
2ac4eb
%attr(0644,root,root) %{_datadir}/%{name}/*
2ac4eb
%attr(0644,root,root) %{_datadir}/applications/dnssec-trigger-panel.desktop
2ac4eb
2ac4eb
2ac4eb
%post
2ac4eb
%systemd_post %{name}d.service
2ac4eb
2ac4eb
2ac4eb
%preun
2ac4eb
%systemd_preun %{name}d.service
2ac4eb
if [ "$1" -eq "0" ] ; then
2ac4eb
    # dnssec-triggerd makes /etc/resolv.conf immutable, undo that on removal
2ac4eb
    chattr -i /etc/resolv.conf
2ac4eb
fi
2ac4eb
2ac4eb
%postun
2ac4eb
%systemd_postun_with_restart %{name}d.service
2ac4eb
2ac4eb
2ac4eb
%changelog
2ac4eb
* Wed May 18 2016 Tomas Hozza <thozza@redhat.com> - 0.11-22
2ac4eb
- Improved text in the GUI panel in Hotspot sign-on mode (#1254473)
2ac4eb
- Build all binaries with PIE hardening (#1092526)
2ac4eb
2ac4eb
* Tue Feb 11 2014 Tomas Hozza <thozza@redhat.com> - 0.11-21
2ac4eb
- handle IndexError exception in NM script until NM provides better API (#1063735)
2ac4eb
- restart NM when stopping dnssec-trigger daemon instead of handling
2ac4eb
  resolv.conf by ourself. (#1061370)
2ac4eb
2ac4eb
* Wed Jan 29 2014 Tomas Hozza <thozza@redhat.com> - 0.11-20
2ac4eb
- use systemd macros instead of directly using systemctl (#1058773)
2ac4eb
- Replace the "Fedora /EPEL" comment in dnssec-trigger.conf (#1055949)
2ac4eb
- Use more newer and more advanced dispatcher script (#1034813)
2ac4eb
2ac4eb
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.11-19
2ac4eb
- Mass rebuild 2014-01-24
2ac4eb
2ac4eb
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.11-18
2ac4eb
- Mass rebuild 2013-12-27
2ac4eb
2ac4eb
* Tue Nov 26 2013 Tomas Hozza <thozza@redhat.com> - 0.11-17
2ac4eb
- Add script to backup and restore resolv.conf on dnssec-trigger start/stop (#1031648)
2ac4eb
2ac4eb
* Mon Nov 18 2013 Tomas Hozza <thozza@redhat.com> - 0.11-16
2ac4eb
- Improve GUI dialogs texts (#1029889)
2ac4eb
2ac4eb
* Mon Nov 11 2013 Tomas Hozza <thozza@redhat.com> - 0.11-15
2ac4eb
- Fix the dispatcher script to use new nmcli syntax (#1028003)
2ac4eb
2ac4eb
* Mon Aug 26 2013 Tomas Hozza <thozza@redhat.com> - 0.11-14
2ac4eb
- Fix errors found by static analysis of source
2ac4eb
2ac4eb
* Fri Aug 09 2013 Tomas Hozza <thozza@redhat.com> - 0.11-13
2ac4eb
- Use improved NM dispatcher script from upstream (#980036)
2ac4eb
- Added tmpfiles.d config due to improved NM dispatcher script
2ac4eb
2ac4eb
* Mon Jul 22 2013 Tomas Hozza <thozza@redhat.com> - 0.11-12
2ac4eb
- Removed Fedora infrastructure from dnssec-trigger.conf (#955149)
2ac4eb
2ac4eb
* Mon Mar 04 2013 Adam Tkac <atkac redhat com> - 0.11-11
2ac4eb
- link dnssec-trigger.conf.8 to dnssec-trigger.8
2ac4eb
- build dnssec-triggerd with full RELRO
2ac4eb
2ac4eb
* Mon Mar 04 2013 Adam Tkac <atkac redhat com> - 0.11-10
2ac4eb
- remove deprecated "Application" keyword from desktop file
2ac4eb
2ac4eb
* Mon Mar 04 2013 Adam Tkac <atkac redhat com> - 0.11-9
2ac4eb
- install various dnssec-trigger-* symlinks to dnssec-trigger.8 manpage
2ac4eb
2ac4eb
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-8
2ac4eb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2ac4eb
2ac4eb
* Tue Jan 08 2013 Paul Wouters <pwouters@redhat.com> - 0.11-7
2ac4eb
- Use full path for systemd (rhbz#842455)
2ac4eb
2ac4eb
* Tue Jul 24 2012 Paul Wouters <pwouters@redhat.com> - 0.11-6
2ac4eb
- Patched daemon to remove immutable attr (rhbz#842455) as the
2ac4eb
  systemd ExecStopPost= target does not seem to work
2ac4eb
2ac4eb
* Tue Jul 24 2012 Paul Wouters <pwouters@redhat.com> - 0.11-5
2ac4eb
- On service stop, remove immutable attr from resolv.conf (rhbz#842455)
2ac4eb
2ac4eb
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-4
2ac4eb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2ac4eb
2ac4eb
* Thu Jun 28 2012 Paul Wouters <pwouters@redhat.com> - 0.11-3
2ac4eb
- Fix DHCP hook for f17+ version of nmcli (rhbz#835298)
2ac4eb
2ac4eb
* Sun Jun 17 2012 Paul Wouters <pwouters@redhat.com> - 0.11-2
2ac4eb
- Small textual changes to some popup windows
2ac4eb
2ac4eb
* Fri Jun 15 2012 Paul Wouters <pwouters@redhat.com> - 0.11-1
2ac4eb
- Updated to 0.11
2ac4eb
- http Hotspot detection via fedoraproject.org/static/hotspot.html
2ac4eb
- http Hotspot Login page via uses hotspot-nocache.fedoraproject.org
2ac4eb
2ac4eb
* Thu Feb 23 2012 Paul Wouters <pwouters@redhat.com> - 0.10-4
2ac4eb
- Require: unbound
2ac4eb
2ac4eb
* Wed Feb 22 2012 Paul Wouters <pwouters@redhat.com> - 0.10-3
2ac4eb
- Fix the systemd startup to require unbound
2ac4eb
- dnssec-triggerd no longer forks, giving systemd more control
2ac4eb
- Fire NM dispatcher in ExecStartPost of dnssec-triggerd.service
2ac4eb
- Fix tcp80 entries in dnssec-triggerd.conf
2ac4eb
- symlink dnssec-trigger-panel to dnssec-trigger to supress the
2ac4eb
  "-panel" in the applet name shown in gnome3
2ac4eb
2ac4eb
2ac4eb
* Wed Feb 22 2012 Paul Wouters <pwouters@redhat.com> - 0.10-2
2ac4eb
- The NM hook was not modified at the right time during build
2ac4eb
2ac4eb
* Wed Feb 22 2012 Paul Wouters <pwouters@redhat.com> - 0.10-1
2ac4eb
- Updated to 0.10
2ac4eb
- The NM hook lacks /usr/sbin in path, resulting in empty resolv.conf on hotspot
2ac4eb
2ac4eb
* Wed Feb 08 2012 Paul Wouters <pwouters@redhat.com> - 0.9-4
2ac4eb
- Updated tls443 / tls80 resolver instances supplied by Fedora Hosted
2ac4eb
2ac4eb
* Mon Feb 06 2012 Paul Wouters <pwouters@redhat.com> - 0.9-3
2ac4eb
- Convert from SysV to systemd for initial Fedora release
2ac4eb
- Moved configs and pem files to /etc/dnssec-trigger/
2ac4eb
- No more /var/run/dnssec-triggerd/
2ac4eb
- Fix Build-requires
2ac4eb
- Added commented tls443 port80 entries of pwouters resolvers
2ac4eb
- On uninstall ensure there is no immutable bit on /etc/resolv.conf
2ac4eb
2ac4eb
* Sat Jan 07 2012 Paul Wouters <paul@xelerance.com> - 0.9-2
2ac4eb
- Added LICENCE to doc section
2ac4eb
2ac4eb
* Mon Dec 19 2011 Paul Wouters <paul@xelerance.com> - 0.9-1
2ac4eb
- Upgraded to 0.9
2ac4eb
2ac4eb
* Fri Oct 28 2011 Paul Wouters <paul@xelerance.com> - 0.7-1
2ac4eb
- Upgraded to 0.7
2ac4eb
2ac4eb
* Fri Sep 23 2011 Paul Wouters <paul@xelerance.com> - 0.4-1
2ac4eb
- Upgraded to 0.4
2ac4eb
2ac4eb
* Sat Sep 17 2011 Paul Wouters <paul@xelerance.com> - 0.3-5
2ac4eb
- Start 01-dnssec-trigger-hook in daemon start
2ac4eb
- Ensure dnssec-triggerd starts after NetworkManager
2ac4eb
2ac4eb
* Fri Sep 16 2011 Paul Wouters <paul@xelerance.com> - 0.3-4
2ac4eb
- Initial package