tang/tang.spec

102 lines
3.0 KiB
RPMSpec
Raw Normal View History

2019-12-14 21:39:55 +08:00
Name: tang
2023-10-07 14:52:34 +08:00
Version: 14
Release: 2
2019-12-14 21:39:55 +08:00
Summary: Server for binding data to network presence
License: GPLv3+
URL: https://github.com/latchset/%{name}
2023-10-07 14:52:34 +08:00
Source0: https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
2019-12-14 21:39:55 +08:00
2023-10-07 14:52:34 +08:00
BuildRequires: gcc meson jose libjose-devel libjose-zlib-devel libjose-openssl-devel
2019-12-14 21:39:55 +08:00
BuildRequires: http-parser-devel systemd-devel pkgconfig systemd curl
2023-10-07 14:52:34 +08:00
BuildRequires: asciidoc coreutils grep sed iproute
2019-12-14 21:39:55 +08:00
Requires: coreutils jose grep sed
Requires(pre): shadow-utils
%{?systemd_requires}
%description
This package is a server for binding data to network presence.
First, the client gets a list of the Tang server's advertised asymmetric keys.
This can happen online by a simple HTTP GET. Alternatively, since the keys are
asymmetric, the public key list can be distributed out of band.
Second, the client uses one of these public keys to generate a unique,
cryptographically strong encryption key. The data is then encrypted using this
key. Once the data is encrypted, the key is discarded. Some small metadata is
produced as part of this operation which the client should store in a convenient
location. This process of encrypting data is the provisioning step.
Third, when the client is ready to access its data, it simply loads the metadata
produced in the provisioning step and performs an HTTP POST in order to recover
the encryption key. This process is the recovery step.
%package_help
%prep
2023-06-30 16:53:38 +08:00
%autosetup -n %{name}-%{version} -p1
2019-12-14 21:39:55 +08:00
%build
2023-10-07 14:52:34 +08:00
%meson
%meson_build
2019-12-14 21:39:55 +08:00
%install
2023-10-07 14:52:34 +08:00
%meson_install
%{__mkdir_p} $RPM_BUILD_ROOT/%{_localstatedir}/db/%{name}
2019-12-14 21:39:55 +08:00
%check
2023-10-07 14:52:34 +08:00
%meson_test
2019-12-14 21:39:55 +08:00
%pre
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || \
useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \
-c "Tang Network Presence Daemon user" %{name}
exit 0
%post
%systemd_post %{name}d.socket
2023-10-07 14:52:34 +08:00
if [ -d /var/db/tang ]; then
for k in /var/db/tang/*.jwk; do
test -e "${k}" || continue
chmod 0440 -- "${k}"
done
for k in /var/db/tang/.*.jwk; do
test -e "${k}" || continue
chmod 0440 -- "${k}"
done
chown tang:tang -R /var/db/tang
fi
2019-12-14 21:39:55 +08: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}
2019-12-14 21:39:55 +08:00
%{_unitdir}/%{name}d@.service
%{_unitdir}/%{name}d.socket
%{_libexecdir}/%{name}d-keygen
2023-10-07 14:52:34 +08:00
%{_libexecdir}/%{name}d-rotate-keys
2019-12-14 21:39:55 +08:00
%{_libexecdir}/%{name}d
%{_bindir}/%{name}-show-keys
%files help
%{_mandir}/man8/tang.8*
%{_mandir}/man1/tang-show-keys.1*
2023-10-07 14:52:34 +08:00
%{_mandir}/man1/tangd-rotate-keys.1.gz
2019-12-14 21:39:55 +08:00
%changelog
* Wed Dec 11 2024 xu_ping <707078654@qq.com> - 14-2
- fix tang-show-keys error.
2023-10-07 14:52:34 +08:00
* Thu Sep 28 2023 wulei <wu_lei@hoperun.com> - 14-1
- Update to 14
2023-06-30 16:53:38 +08:00
* Fri Jun 30 2023 wangkai <13474090681@163.com> - 7-3
- Fix CVE-2023-1672
2019-12-14 21:39:55 +08:00
* Thu Dec 5 2019 openEuler Buildteam <buildteam@openeuler.org> - 7-2
2023-06-30 16:53:38 +08:00
- Package init