Move key handling to tang itself

Also move build systemd to meson
This commit is contained in:
Sergio Correia 2020-12-01 15:56:50 -03:00
parent 204d2ac281
commit 2cc81c4c42
3 changed files with 16010 additions and 29 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,18 @@
Name: tang Name: tang
Version: 7 Version: 7
Release: 7%{?dist} Release: 8%{?dist}
Summary: Network Presence Binding Daemon Summary: Network Presence Binding Daemon
License: GPLv3+ License: GPLv3+
URL: https://github.com/latchset/%{name} URL: https://github.com/latchset/%{name}
Source0: https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2 Source0: https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2
Patch0001: 0001-Move-build-system-to-meson.patch
Patch0002: 0002-Move-key-handling-to-tang-itself.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: meson
BuildRequires: git-core
BuildRequires: jose >= 8 BuildRequires: jose >= 8
BuildRequires: libjose-devel >= 8 BuildRequires: libjose-devel >= 8
BuildRequires: libjose-zlib-devel >= 8 BuildRequires: libjose-zlib-devel >= 8
@ -37,27 +42,19 @@ Requires(pre): shadow-utils
Tang is a small daemon for binding data to the presence of a third party. Tang is a small daemon for binding data to the presence of a third party.
%prep %prep
%setup -q %autosetup -S git
%build %build
%configure %meson
make %{?_smp_mflags} V=1 %meson_build
%install %install
rm -rf $RPM_BUILD_ROOT %meson_install
%make_install
%{__sed} -i 's|DirectoryMode=0700||' $RPM_BUILD_ROOT/%{_unitdir}/%{name}d-update.path
%{__sed} -i 's|MakeDirectory=true||' $RPM_BUILD_ROOT/%{_unitdir}/%{name}d-update.path
echo "User=%{name}" >> $RPM_BUILD_ROOT/%{_unitdir}/%{name}d-update.service
echo "User=%{name}" >> $RPM_BUILD_ROOT/%{_unitdir}/%{name}d@.service echo "User=%{name}" >> $RPM_BUILD_ROOT/%{_unitdir}/%{name}d@.service
%{__mkdir_p} $RPM_BUILD_ROOT/%{_localstatedir}/cache/%{name}
%{__mkdir_p} $RPM_BUILD_ROOT/%{_localstatedir}/db/%{name} %{__mkdir_p} $RPM_BUILD_ROOT/%{_localstatedir}/db/%{name}
%check %check
if ! make %{?_smp_mflags} check; then %meson_test
cat test-suite.log
false
fi
%pre %pre
getent group %{name} >/dev/null || groupadd -r %{name} getent group %{name} >/dev/null || groupadd -r %{name}
@ -68,39 +65,31 @@ exit 0
%post %post
%systemd_post %{name}d.socket %systemd_post %{name}d.socket
%systemd_post %{name}d-update.path
%systemd_post %{name}d-update.service
%systemd_post %{name}d-keygen.service
%preun %preun
%systemd_preun %{name}d.socket %systemd_preun %{name}d.socket
%systemd_preun %{name}d-update.path
%systemd_preun %{name}d-update.service
%systemd_preun %{name}d-keygen.service
%postun %postun
%systemd_postun_with_restart %{name}d.socket %systemd_postun_with_restart %{name}d.socket
%systemd_postun_with_restart %{name}d-update.path
%systemd_postun_with_restart %{name}d-update.service
%systemd_postun_with_restart %{name}d-keygen.service
%files %files
%license COPYING %license COPYING
%attr(0750, %{name}, %{name}) %{_localstatedir}/cache/%{name} %attr(0700, %{name}, %{name}) %{_localstatedir}/db/%{name}
%attr(2570, %{name}, %{name}) %{_localstatedir}/db/%{name}
%{_unitdir}/%{name}d-keygen.service
%{_unitdir}/%{name}d-update.service
%{_unitdir}/%{name}d-update.path
%{_unitdir}/%{name}d@.service %{_unitdir}/%{name}d@.service
%{_unitdir}/%{name}d.socket %{_unitdir}/%{name}d.socket
%{_libexecdir}/%{name}d-keygen %{_libexecdir}/%{name}d-keygen
%{_libexecdir}/%{name}d-update
%{_libexecdir}/%{name}d %{_libexecdir}/%{name}d
%{_mandir}/man8/tang.8* %{_mandir}/man8/tang.8*
%{_bindir}/%{name}-show-keys %{_bindir}/%{name}-show-keys
%{_mandir}/man1/tang-show-keys.1* %{_mandir}/man1/tang-show-keys.1*
%changelog %changelog
* Tue Dec 1 2020 Sergio Correia <scorreia@redhat.com> - 7.8
- Move build system to meson
Upstream commits (fed9020, 590de27)
- Move key handling to tang itself
Upstream commits (6090505, c71df1d, 7119454)
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7-7 * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild