Signed-off-by: cherry530 <707078654@qq.com> (cherry picked from commit ed28560b81e06ceca8e9200f65fb30f1f126f514)
102 lines
3.0 KiB
RPMSpec
102 lines
3.0 KiB
RPMSpec
Name: tang
|
|
Version: 14
|
|
Release: 2
|
|
Summary: Server for binding data to network presence
|
|
License: GPLv3+
|
|
URL: https://github.com/latchset/%{name}
|
|
Source0: https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
|
|
|
|
BuildRequires: gcc meson jose libjose-devel libjose-zlib-devel libjose-openssl-devel
|
|
BuildRequires: http-parser-devel systemd-devel pkgconfig systemd curl
|
|
BuildRequires: asciidoc coreutils grep sed iproute
|
|
|
|
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
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
%build
|
|
%meson
|
|
%meson_build
|
|
|
|
%install
|
|
%meson_install
|
|
%{__mkdir_p} $RPM_BUILD_ROOT/%{_localstatedir}/db/%{name}
|
|
|
|
%check
|
|
%meson_test
|
|
|
|
%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
|
|
|
|
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
|
|
|
|
%preun
|
|
%systemd_preun %{name}d.socket
|
|
|
|
%postun
|
|
%systemd_postun_with_restart %{name}d.socket
|
|
|
|
%files
|
|
%license COPYING
|
|
%attr(0700, %{name}, %{name}) %{_localstatedir}/db/%{name}
|
|
%{_unitdir}/%{name}d@.service
|
|
%{_unitdir}/%{name}d.socket
|
|
%{_libexecdir}/%{name}d-keygen
|
|
%{_libexecdir}/%{name}d-rotate-keys
|
|
%{_libexecdir}/%{name}d
|
|
%{_bindir}/%{name}-show-keys
|
|
|
|
%files help
|
|
%{_mandir}/man8/tang.8*
|
|
%{_mandir}/man1/tang-show-keys.1*
|
|
%{_mandir}/man1/tangd-rotate-keys.1.gz
|
|
|
|
%changelog
|
|
* Wed Dec 11 2024 xu_ping <707078654@qq.com> - 14-2
|
|
- fix tang-show-keys error.
|
|
|
|
* Thu Sep 28 2023 wulei <wu_lei@hoperun.com> - 14-1
|
|
- Update to 14
|
|
|
|
* Fri Jun 30 2023 wangkai <13474090681@163.com> - 7-3
|
|
- Fix CVE-2023-1672
|
|
|
|
* Thu Dec 5 2019 openEuler Buildteam <buildteam@openeuler.org> - 7-2
|
|
- Package init
|