authd/authd.spec
yixiangzhike f0aad8573e Update the hash function for key derivation to SHA256
(cherry picked from commit e0aa2210f9a75cb015e71155de38241138b8fe1d)
2022-04-28 09:34:01 +08:00

84 lines
2.4 KiB
RPMSpec

Name: authd
Version: 1.4.4
Release: 2
Summary: A RFC 1413 ident protocol daemon
License: GPLv2+
URL: https://github.com/InfrastructureServices/authd
Source0: https://github.com/InfrastructureServices/authd/releases/download/v1.4.4/authd-1.4.4.tar.gz
# Authd Activation Socket from Fedora, as published at
# https://github.com/InfrastructureServices/authd/tree/master/packaging/Fedora
Source1: auth.socket
Source2: auth@.service
Patch0: backport-Update-the-hash-function-for-key-derivation-to-SHA256.patch
BuildRequires: gcc openssl-devel gettext help2man systemd-units
Requires(post): openssl systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Obsoletes: pidentd < 3.2
Provides: pidentd = 3.2
%description
Authd is a small and fast RFC 1413 ident protocol daemon with both
xinetd server and interactive modes that supports IPv6 and IPv4
as well as the more popular features of pidentd.
%package_help
%prep
%autosetup -n %{name}-%{version}
%build
CFLAGS=$RPM_OPT_FLAGS make prefix=%{_prefix}
%install
%makeinstall
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/
touch ${RPM_BUILD_ROOT}%{_sysconfdir}/ident.key
install -d ${RPM_BUILD_ROOT}/%{_mandir}/man1/
help2man -N -v -V ${RPM_BUILD_ROOT}/%{_sbindir}/in.authd -o \
${RPM_BUILD_ROOT}/%{_mandir}/man1/in.authd.1
install -d ${RPM_BUILD_ROOT}%{_unitdir}/
install %{SOURCE1} ${RPM_BUILD_ROOT}%{_unitdir}/
install %{SOURCE2} ${RPM_BUILD_ROOT}%{_unitdir}/
%find_lang %{name}
%preun
%systemd_preun auth.socket
%post
/usr/sbin/adduser -s /sbin/nologin -u 98 -r -d '/' ident 2>/dev/null || true
/usr/bin/openssl rand -base64 -out %{_sysconfdir}/ident.key 32
echo CHANGE THE LINE ABOVE TO A PASSPHRASE >> %{_sysconfdir}/ident.key
/bin/chown ident:ident %{_sysconfdir}/ident.key
chmod o-rw %{_sysconfdir}/ident.key
%systemd_post auth.socket
%postun
%systemd_postun_with_restart auth.socket
%files
%defattr(-,root,root)
%verify(not md5 size mtime user group) %config(noreplace) %attr(640,root,root) %{_sysconfdir}/ident.key
%doc COPYING README.html
%{_sbindir}/in.authd
%{_datadir}/locale/*
%{_unitdir}/auth*
%files help
%defattr(-,root,root)
%{_mandir}/*
%doc rfc1413.txt
%changelog
* Wed Apr 27 2022 yixiangzhike <yixiangzhike007@163.com> - 1.4.4-2
- Update the hash function for key derivation to SHA256
* Tue Sep 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.4.4-1
- Package init