21cbd5
Name:           tang
21cbd5
Version:        7
a10f3d
Release:        6%{?dist}
21cbd5
Summary:        Network Presence Binding Daemon
21cbd5
21cbd5
License:        GPLv3+
21cbd5
URL:            https://github.com/latchset/%{name}
21cbd5
Source0:        https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2
dc8dd4
Patch1: 0001-Move-key-generation-to-tang.patch
a10f3d
Patch2: 0002-Exit-with-success-unless-the-issue-was-with-with-tan.patch
21cbd5
21cbd5
BuildRequires:  gcc
dc8dd4
BuildRequires:  autoconf
dc8dd4
BuildRequires:  automake
21cbd5
BuildRequires:  jose >= 8
21cbd5
BuildRequires:  libjose-devel >= 8
21cbd5
BuildRequires:  libjose-zlib-devel >= 8
21cbd5
BuildRequires:  libjose-openssl-devel >= 8
21cbd5
21cbd5
BuildRequires:  http-parser-devel >= 2.7.1-3
21cbd5
BuildRequires:  systemd-devel
21cbd5
BuildRequires:  pkgconfig
21cbd5
21cbd5
BuildRequires:  systemd
21cbd5
BuildRequires:  curl
21cbd5
21cbd5
BuildRequires:  asciidoc
21cbd5
BuildRequires:  coreutils
21cbd5
BuildRequires:  grep
21cbd5
BuildRequires:  sed
a10f3d
BuildRequires:  git-core
21cbd5
21cbd5
%{?systemd_requires}
21cbd5
Requires:       coreutils
21cbd5
Requires:       jose >= 8
21cbd5
Requires:       grep
21cbd5
Requires:       sed
21cbd5
21cbd5
Requires(pre):  shadow-utils
21cbd5
21cbd5
%description
21cbd5
Tang is a small daemon for binding data to the presence of a third party.
21cbd5
21cbd5
%prep
a10f3d
%autosetup -S git
21cbd5
21cbd5
%build
dc8dd4
autoreconf -i
21cbd5
%configure
21cbd5
make %{?_smp_mflags} V=1
21cbd5
21cbd5
%install
21cbd5
rm -rf $RPM_BUILD_ROOT
21cbd5
%make_install
21cbd5
echo "User=%{name}" >> $RPM_BUILD_ROOT/%{_unitdir}/%{name}d@.service
21cbd5
%{__mkdir_p} $RPM_BUILD_ROOT/%{_localstatedir}/db/%{name}
21cbd5
21cbd5
%check
21cbd5
if ! make %{?_smp_mflags} check; then
21cbd5
    cat test-suite.log
21cbd5
    false
21cbd5
fi
21cbd5
21cbd5
%pre
21cbd5
getent group %{name} >/dev/null || groupadd -r %{name}
21cbd5
getent passwd %{name} >/dev/null || \
21cbd5
    useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \
21cbd5
    -c "Tang Network Presence Daemon user" %{name}
21cbd5
exit 0
21cbd5
21cbd5
%post
21cbd5
%systemd_post %{name}d.socket
21cbd5
21cbd5
%preun
21cbd5
%systemd_preun %{name}d.socket
21cbd5
21cbd5
%postun
21cbd5
%systemd_postun_with_restart %{name}d.socket
21cbd5
21cbd5
%files
21cbd5
%license COPYING
dc8dd4
%attr(0700, %{name}, %{name}) %{_localstatedir}/db/%{name}
21cbd5
%{_unitdir}/%{name}d@.service
21cbd5
%{_unitdir}/%{name}d.socket
21cbd5
%{_libexecdir}/%{name}d-keygen
21cbd5
%{_libexecdir}/%{name}d
21cbd5
%{_mandir}/man8/tang.8*
21cbd5
%{_bindir}/%{name}-show-keys
21cbd5
%{_mandir}/man1/tang-show-keys.1*
21cbd5
21cbd5
%changelog
a10f3d
* Wed Jan 13 2021 Sergio Correia <scorreia@redhat.com> - 7-6
a10f3d
- Exit with success unless the issue was with with tangd itself
a10f3d
  Resolves: rhbz#1828558
a10f3d
dc8dd4
* Sun Dec 01 2019 Sergio Correia <scorreia@redhat.com> - 7-5
dc8dd4
- Permissions of /var/db/tang set to 0700
dc8dd4
- Home dir of user tang is /var/cache/tang
dc8dd4
dc8dd4
* Fri Nov 29 2019 Sergio Correia <scorreia@redhat.com> - 7-4
dc8dd4
- Fix permissions of /var/db/tang
dc8dd4
dc8dd4
* Tue Oct 15 2019 Sergio Correia <scorreia@redhat.com> - 7-3
dc8dd4
- Rebuild to ensure correct dist tag
dc8dd4
dc8dd4
* Sun Sep 29 2019 Sergio Correia <scorreia@redhat.com> - 7-2
dc8dd4
- Move key generation to tang
dc8dd4
- Resolves rhbz#1745177, rhbz#1679186
dc8dd4
21cbd5
* Fri Aug 10 2018 Nathaniel McCallum <npmccallum@redhat.com> - 7-1
21cbd5
- New upstream release
21cbd5
- Retire tang-nagios package (now separate upstream)
21cbd5
21cbd5
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6-5
21cbd5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
21cbd5
21cbd5
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6-4
21cbd5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
21cbd5
21cbd5
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6-3
21cbd5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
21cbd5
21cbd5
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6-2
21cbd5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
21cbd5
21cbd5
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 6-1
21cbd5
- New upstream release
21cbd5
21cbd5
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 5-2
21cbd5
- Fix incorrect dependencies
21cbd5
21cbd5
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 5-1
21cbd5
- New upstream release
21cbd5
21cbd5
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4-3
21cbd5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
21cbd5
21cbd5
* Mon Nov 14 2016 Nathaniel McCallum <npmccallum@redhat.com> - 4-2
21cbd5
- Fix a race condition in one of the tests
21cbd5
21cbd5
* Thu Nov 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 4-1
21cbd5
- New upstream release
21cbd5
- Add nagios subpackage
21cbd5
21cbd5
* Wed Oct 26 2016 Nathaniel McCallum <npmccallum@redhat.com> - 3-1
21cbd5
- New upstream release
21cbd5
21cbd5
* Wed Oct 19 2016 Nathaniel McCallum <npmccallum@redhat.com> - 2-1
21cbd5
- New upstream release
21cbd5
21cbd5
* Tue Aug 23 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1-1
21cbd5
- First release