2016-10-28 18:09:08 +00:00
|
|
|
Name: tang
|
2023-06-14 14:41:34 +00:00
|
|
|
Version: 14
|
2024-02-05 10:41:29 +00:00
|
|
|
Release: %autorelease
|
2016-10-28 18:09:08 +00:00
|
|
|
Summary: Network Presence Binding Daemon
|
|
|
|
|
2023-05-31 10:14:37 +00:00
|
|
|
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
|
2022-08-17 13:38:45 +00:00
|
|
|
Source1: tang.sysusers
|
2024-01-11 17:18:15 +00:00
|
|
|
Patch: 0001-Add-support-for-building-with-llhttp-instead-of-http.patch
|
2024-02-12 15:27:13 +00:00
|
|
|
Patch: 0002-Fix-issue-introduced-in-http-parser-llhttp-conversio.patch
|
2020-12-01 18:56:50 +00:00
|
|
|
|
2018-07-09 17:06:52 +00:00
|
|
|
BuildRequires: gcc
|
2020-12-01 18:56:50 +00:00
|
|
|
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
|
2022-08-17 13:38:45 +00:00
|
|
|
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
|
2023-05-05 14:18:33 +00:00
|
|
|
BuildRequires: iproute
|
2016-10-28 18:09:08 +00:00
|
|
|
|
|
|
|
%{?systemd_requires}
|
|
|
|
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
|
2020-12-01 18:56:50 +00:00
|
|
|
%autosetup -S git
|
2016-10-28 18:09:08 +00:00
|
|
|
|
|
|
|
%build
|
2020-12-01 18:56:50 +00:00
|
|
|
%meson
|
|
|
|
%meson_build
|
2016-10-28 18:09:08 +00:00
|
|
|
|
|
|
|
%install
|
2020-12-01 18:56:50 +00:00
|
|
|
%meson_install
|
2022-08-17 13:38:45 +00:00
|
|
|
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
|
2020-12-01 18:56:50 +00:00
|
|
|
%meson_test
|
2016-10-28 18:09:08 +00:00
|
|
|
|
|
|
|
%pre
|
2022-08-17 13:38:45 +00:00
|
|
|
%sysusers_create_compat %{SOURCE1}
|
2016-10-28 18:09:08 +00:00
|
|
|
exit 0
|
|
|
|
|
|
|
|
%post
|
|
|
|
%systemd_post %{name}d.socket
|
|
|
|
|
2021-09-29 13:13:42 +00:00
|
|
|
# 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
|
2021-09-29 13:13:42 +00:00
|
|
|
chmod 0440 -- "${k}"
|
|
|
|
done
|
|
|
|
for k in /var/db/tang/.*.jwk; do
|
2021-10-04 14:35:57 +00:00
|
|
|
test -e "${k}" || continue
|
2021-09-29 13:13:42 +00:00
|
|
|
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
|
2020-12-01 18:56:50 +00:00
|
|
|
%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.*
|
2022-08-17 13:38:45 +00:00
|
|
|
%{_sysusersdir}/tang.conf
|
2016-11-10 21:54:39 +00:00
|
|
|
|
2016-10-28 18:09:08 +00:00
|
|
|
%changelog
|
2024-02-05 10:41:29 +00:00
|
|
|
%autochangelog
|