tang/tang.spec

110 lines
2.4 KiB
RPMSpec
Raw Normal View History

2016-10-28 18:09:08 +00:00
Name: tang
Version: 14
Release: %autorelease
2016-10-28 18:09:08 +00:00
Summary: Network Presence Binding Daemon
License: GPL-3.0-or-later
2016-10-28 18:09:08 +00:00
URL: https://github.com/latchset/%{name}
2021-02-08 11:25:39 +00:00
Source0: https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
Source1: tang.sysusers
2024-01-11 17:18:15 +00:00
Patch: 0001-Add-support-for-building-with-llhttp-instead-of-http.patch
Patch: 0002-Fix-issue-introduced-in-http-parser-llhttp-conversio.patch
BuildRequires: gcc
BuildRequires: meson
BuildRequires: git-core
2017-06-14 05:45:28 +00:00
BuildRequires: jose >= 8
BuildRequires: libjose-devel >= 8
BuildRequires: libjose-zlib-devel >= 8
BuildRequires: libjose-openssl-devel >= 8
2016-10-28 18:09:08 +00:00
2024-01-11 17:18:15 +00:00
BuildRequires: llhttp-devel
2016-10-28 18:09:08 +00:00
BuildRequires: systemd-devel
BuildRequires: pkgconfig
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
2017-06-14 05:45:28 +00:00
BuildRequires: curl
2016-10-28 18:09:08 +00:00
2018-08-10 19:23:17 +00:00
BuildRequires: asciidoc
2016-10-28 18:09:08 +00:00
BuildRequires: coreutils
BuildRequires: grep
2021-05-05 11:31:13 +00:00
BuildRequires: socat
2016-10-28 18:09:08 +00:00
BuildRequires: sed
BuildRequires: iproute
2016-10-28 18:09:08 +00:00
%{?systemd_ordering}
2016-10-28 18:09:08 +00:00
Requires: coreutils
2017-06-14 05:45:28 +00:00
Requires: jose >= 8
2024-01-11 17:18:15 +00:00
Requires: llhttp
2016-10-28 18:09:08 +00:00
Requires: grep
Requires: sed
Requires(pre): shadow-utils
%description
Tang is a small daemon for binding data to the presence of a third party.
%prep
%autosetup -S git
2016-10-28 18:09:08 +00:00
%build
%meson
%meson_build
2016-10-28 18:09:08 +00:00
%install
%meson_install
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/tang.conf
2016-10-28 18:09:08 +00:00
%{__mkdir_p} $RPM_BUILD_ROOT/%{_localstatedir}/db/%{name}
%check
%meson_test \
%ifarch riscv64
--timeout-multiplier 10 \
%endif
%{nil}
2016-10-28 18:09:08 +00:00
%pre
%sysusers_create_compat %{SOURCE1}
2016-10-28 18:09:08 +00:00
exit 0
%post
%systemd_post %{name}d.socket
# Let's make sure any existing keys are readable only
# by the owner/group.
if [ -d /var/db/tang ]; then
for k in /var/db/tang/*.jwk; do
2021-10-04 14:35:57 +00:00
test -e "${k}" || continue
chmod 0440 -- "${k}"
done
for k in /var/db/tang/.*.jwk; do
2021-10-04 14:35:57 +00:00
test -e "${k}" || continue
chmod 0440 -- "${k}"
done
chown tang:tang -R /var/db/tang
fi
2016-10-28 18:09:08 +00:00
%preun
%systemd_preun %{name}d.socket
%postun
%systemd_postun_with_restart %{name}d.socket
%files
%license COPYING
%attr(0700, %{name}, %{name}) %{_localstatedir}/db/%{name}
2016-10-28 18:09:08 +00:00
%{_unitdir}/%{name}d@.service
%{_unitdir}/%{name}d.socket
2017-06-14 05:37:40 +00:00
%{_libexecdir}/%{name}d-keygen
2021-05-05 11:31:13 +00:00
%{_libexecdir}/%{name}d-rotate-keys
2016-10-28 18:09:08 +00:00
%{_libexecdir}/%{name}d
2017-06-14 05:37:40 +00:00
%{_mandir}/man8/tang.8*
2018-08-10 19:23:17 +00:00
%{_bindir}/%{name}-show-keys
%{_mandir}/man1/tang-show-keys.1*
2021-12-14 11:31:45 +00:00
%{_mandir}/man1/tangd-rotate-keys.1.*
%{_sysusersdir}/tang.conf
2016-11-10 21:54:39 +00:00
2016-10-28 18:09:08 +00:00
%changelog
%autochangelog