dff2ed
%global _hardened_build 1
dff2ed
dff2ed
Summary: A RFC 1413 ident protocol daemon
dff2ed
Name: authd
dff2ed
Version: 1.4.4
0c6c9e
Release: 5%{?dist}.1
dff2ed
License: GPLv2+
dff2ed
URL: https://github.com/InfrastructureServices/authd
dff2ed
Obsoletes: pidentd < 3.2
dff2ed
Provides: pidentd = 3.2
dff2ed
Requires(post): openssl
dff2ed
Source0: https://github.com/InfrastructureServices/authd/releases/download/v1.4.4/authd-1.4.4.tar.gz
dff2ed
Source1: auth.socket
dff2ed
Source2: auth@.service
dff2ed
BuildRequires:  gcc
dff2ed
BuildRequires: openssl-devel gettext help2man systemd-units
dff2ed
Requires(post): systemd-units
dff2ed
Requires(preun): systemd-units
dff2ed
Requires(postun): systemd-units
dff2ed
dff2ed
Patch0: authd-covscan.patch
dff2ed
dff2ed
%description
dff2ed
authd is a small and fast RFC 1413 ident protocol daemon
dff2ed
with both xinetd server and interactive modes that
dff2ed
supports IPv6 and IPv4 as well as the more popular features
dff2ed
of pidentd.
dff2ed
dff2ed
%prep
dff2ed
%autosetup
dff2ed
dff2ed
%build
dff2ed
make prefix=%{_prefix} CFLAGS="%{optflags}" \
dff2ed
        LDFLAGS="-lcrypto %{build_ldflags}"
dff2ed
dff2ed
%install
dff2ed
%make_install datadir=%{buildroot}/%{_datadir} \
dff2ed
	sbindir=%{buildroot}/%{_sbindir}
dff2ed
dff2ed
install -d %{buildroot}%{_unitdir}/
dff2ed
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/
dff2ed
install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/
dff2ed
dff2ed
install -d %{buildroot}%{_sysconfdir}/
dff2ed
touch %{buildroot}%{_sysconfdir}/ident.key
dff2ed
dff2ed
install -d %{buildroot}/%{_mandir}/man1/
dff2ed
help2man -N -v -V %{buildroot}/%{_sbindir}/in.authd -o \
dff2ed
         %{buildroot}/%{_mandir}/man1/in.authd.1
dff2ed
dff2ed
%find_lang %{name}
dff2ed
dff2ed
%post
dff2ed
/usr/sbin/adduser -s /sbin/nologin -u 98 -r -d '/' ident 2>/dev/null || true
dff2ed
/usr/bin/openssl rand -base64 -out %{_sysconfdir}/ident.key 32
dff2ed
echo CHANGE THE LINE ABOVE TO A PASSPHRASE >> %{_sysconfdir}/ident.key
dff2ed
/bin/chown ident:ident %{_sysconfdir}/ident.key
dff2ed
chmod o-rw %{_sysconfdir}/ident.key
dff2ed
%systemd_post auth.socket
dff2ed
dff2ed
%postun
dff2ed
%systemd_postun_with_restart auth.socket
dff2ed
dff2ed
%preun
dff2ed
%systemd_preun auth.socket
dff2ed
dff2ed
%files -f authd.lang
dff2ed
%license COPYING
dff2ed
%verify(not md5 size mtime user group) %config(noreplace) %attr(640,root,root) %{_sysconfdir}/ident.key
dff2ed
%doc COPYING README.html rfc1413.txt
dff2ed
%{_sbindir}/in.authd
dff2ed
%{_mandir}/*/*
dff2ed
%{_unitdir}/*
dff2ed
dff2ed
%changelog
0c6c9e
* Wed Jul 17 2019 Pavel Zhukov <pzhukov@redhat.com> - 1.4.4-5.1
0c6c9e
- Resolves: #1722492 - Partially revert covscan fix 
0c6c9e
dff2ed
* Mon Feb 18 2019 Pavel Zhukov <pzhukov@redhat.com> - 1.4.4-5
dff2ed
- Related: #1642073 - Properly pass hardened ld flags
dff2ed
- Fix covscan reported errors
dff2ed
dff2ed
* Sun Feb 17 2019 Pavel Zhukov <pzhukov@redhat.com> - 1.4.4-2
dff2ed
- Related: #1642073 - Rebuild with RHEL CFLAGS
dff2ed
- Enabled hardered build
dff2ed
dff2ed
* Tue Feb 12 2019 Pavel Zhukov <pzhukov@redhat.com> - 1.4.4-1
dff2ed
- Import from Fedora
dff2ed
- New release (v1.4.4)
dff2ed
- New upstream URL
dff2ed
dff2ed