2019-12-13 16:30:21 +00:00
|
|
|
%global srcname keylime
|
|
|
|
|
|
|
|
Name: keylime
|
2022-06-07 02:00:13 +00:00
|
|
|
Version: 6.4.1
|
2022-07-07 15:20:17 +00:00
|
|
|
Release: %autorelease
|
2019-12-13 16:30:21 +00:00
|
|
|
Summary: Open source TPM software for Bootstrapping and Maintaining Trust
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
URL: https://github.com/keylime/keylime
|
2022-02-07 22:44:19 +00:00
|
|
|
Source0: https://github.com/keylime/keylime/archive/refs/tags/v%{version}.tar.gz
|
|
|
|
|
2019-12-13 16:30:21 +00:00
|
|
|
# Main program: BSD
|
|
|
|
# Icons: MIT
|
2020-07-17 10:20:44 +00:00
|
|
|
License: ASL 2.0 and MIT
|
2019-12-13 16:30:21 +00:00
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
BuildRequires: git-core
|
2019-12-13 16:30:21 +00:00
|
|
|
BuildRequires: swig
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: python3-devel
|
2021-01-23 14:10:32 +00:00
|
|
|
BuildRequires: python3-dbus
|
2022-02-07 22:44:19 +00:00
|
|
|
BuildRequires: python3-setuptools
|
2019-12-13 16:30:21 +00:00
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: python3-%{srcname} = %{version}-%{release}
|
|
|
|
Requires: %{srcname}-base = %{version}-%{release}
|
|
|
|
Requires: %{srcname}-verifier = %{version}-%{release}
|
|
|
|
Requires: %{srcname}-registrar = %{version}-%{release}
|
|
|
|
Requires: %{srcname}-tenant = %{version}-%{release}
|
|
|
|
Requires: %{srcname}-webapp = %{version}-%{release}
|
|
|
|
Requires: %{srcname}-tools = %{version}-%{release}
|
|
|
|
|
|
|
|
# Agent.
|
|
|
|
Requires: keylime-agent
|
|
|
|
Suggests: python3-%{srcname}-agent
|
|
|
|
|
|
|
|
# Conflicts with the monolithic versions of the package, before the split.
|
|
|
|
Conflicts: keylime < 6.3.0-3
|
|
|
|
|
|
|
|
%{?python_enable_dependency_generator}
|
|
|
|
%description
|
|
|
|
Keylime is a TPM based highly scalable remote boot attestation
|
|
|
|
and runtime integrity measurement solution.
|
|
|
|
|
|
|
|
%package base
|
|
|
|
Summary: The base package contains the default configuration
|
|
|
|
License: MIT
|
|
|
|
|
2022-02-08 12:31:09 +00:00
|
|
|
# Conflicts with the monolithic versions of the package, before the split.
|
|
|
|
Conflicts: keylime < 6.3.0-3
|
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires(pre): shadow-utils
|
|
|
|
Requires: efivar-libs
|
2019-12-13 16:30:21 +00:00
|
|
|
Requires: procps-ng
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: tpm2-tss
|
|
|
|
Requires: tpm2-tools
|
|
|
|
|
|
|
|
|
|
|
|
%description base
|
|
|
|
The base package contains the Keylime default configuration
|
|
|
|
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
Summary: The Python Keylime module
|
|
|
|
License: MIT
|
|
|
|
|
2022-02-08 12:31:09 +00:00
|
|
|
# Conflicts with the monolithic versions of the package, before the split.
|
|
|
|
Conflicts: keylime < 6.3.0-3
|
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: %{srcname}-base = %{version}-%{release}
|
|
|
|
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{srcname}
|
|
|
|
The python3-keylime module implements the functionality used
|
|
|
|
by Keylime components.
|
|
|
|
|
|
|
|
%package verifier
|
|
|
|
Summary: The Python Keylime Verifier component
|
|
|
|
License: MIT
|
|
|
|
|
2022-02-08 12:31:09 +00:00
|
|
|
# Conflicts with the monolithic versions of the package, before the split.
|
|
|
|
Conflicts: keylime < 6.3.0-3
|
2022-02-07 22:44:19 +00:00
|
|
|
|
|
|
|
Requires: %{srcname}-base = %{version}-%{release}
|
|
|
|
Requires: python3-%{srcname} = %{version}-%{release}
|
|
|
|
|
|
|
|
Requires: python3-tornado
|
|
|
|
Requires: python3-sqlalchemy
|
|
|
|
Requires: python3-alembic
|
|
|
|
Requires: python3-cryptography
|
|
|
|
Requires: python3-pyyaml
|
|
|
|
Requires: python3-packaging
|
|
|
|
Requires: python3-requests
|
|
|
|
Requires: python3-zmq
|
|
|
|
Requires: python3-gnupg
|
2022-05-04 17:28:12 +00:00
|
|
|
Requires: python3-lark-parser
|
2022-02-07 22:44:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%description verifier
|
|
|
|
The Keylime Verifier continuously verifies the integrity state
|
|
|
|
of the machine that the agent is running on.
|
|
|
|
|
|
|
|
%package registrar
|
|
|
|
Summary: The Keylime Registrar component
|
|
|
|
License: MIT
|
2022-02-08 12:31:09 +00:00
|
|
|
|
|
|
|
# Conflicts with the monolithic versions of the package, before the split.
|
|
|
|
Conflicts: keylime < 6.3.0-3
|
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: %{srcname}-base = %{version}-%{release}
|
|
|
|
Requires: python3-%{srcname} = %{version}-%{release}
|
|
|
|
|
|
|
|
Requires: python3-tornado
|
|
|
|
Requires: python3-sqlalchemy
|
2021-01-23 14:10:32 +00:00
|
|
|
Requires: python3-alembic
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: python3-cryptography
|
|
|
|
Requires: python3-pyyaml
|
|
|
|
Requires: python3-packaging
|
|
|
|
Requires: python3-requests
|
|
|
|
Requires: python3-zmq
|
2021-03-25 14:37:26 +00:00
|
|
|
Requires: python3-gnupg
|
2022-05-04 17:28:12 +00:00
|
|
|
Requires: python3-lark-parser
|
2022-02-07 22:44:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%description registrar
|
|
|
|
The Keylime Registrar is a database of all agents registered
|
|
|
|
with Keylime and hosts the public keys of the TPM vendors.
|
|
|
|
|
|
|
|
%package -n python3-%{srcname}-agent
|
|
|
|
Summary: The Python Keylime Agent
|
|
|
|
License: MIT
|
|
|
|
|
2022-02-08 12:31:09 +00:00
|
|
|
# Conflicts with the monolithic versions of the package, before the split.
|
|
|
|
Conflicts: keylime < 6.3.0-3
|
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: %{srcname}-base = %{version}-%{release}
|
|
|
|
Requires: python3-%{srcname} = %{version}-%{release}
|
|
|
|
|
|
|
|
# Virtual Provides to support swapping between Python and Rust implementation.
|
|
|
|
Provides: keylime-agent
|
|
|
|
Conflicts: keylime-agent
|
|
|
|
|
|
|
|
Requires: python3-psutil
|
|
|
|
Requires: python3-tornado
|
|
|
|
Requires: python3-cryptography
|
2019-12-13 16:30:21 +00:00
|
|
|
Requires: python3-pyyaml
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: python3-packaging
|
|
|
|
Requires: python3-requests
|
|
|
|
Requires: python3-zmq
|
|
|
|
Requires: python3-gnupg
|
2022-05-04 17:28:12 +00:00
|
|
|
Requires: python3-lark-parser
|
2022-02-07 22:44:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{srcname}-agent
|
|
|
|
The Keylime Agent is deployed to the remote machine that is to be
|
|
|
|
measured or provisioned with secrets stored within an encrypted
|
|
|
|
payload released once trust is established.
|
|
|
|
|
|
|
|
%package tenant
|
|
|
|
Summary: The Python Keylime Tenant
|
|
|
|
License: MIT
|
|
|
|
|
2022-02-08 12:31:09 +00:00
|
|
|
# Conflicts with the monolithic versions of the package, before the split.
|
|
|
|
Conflicts: keylime < 6.3.0-3
|
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: %{srcname}-base = %{version}-%{release}
|
|
|
|
Requires: python3-%{srcname} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description tenant
|
|
|
|
The Keylime Tenant can be used to provision a Keylime Agent.
|
|
|
|
|
|
|
|
%package webapp
|
|
|
|
Summary: The Python Keylime WebApp GUI
|
|
|
|
License: MIT
|
|
|
|
|
2022-02-08 12:31:09 +00:00
|
|
|
# Conflicts with the monolithic versions of the package, before the split.
|
|
|
|
Conflicts: keylime < 6.3.0-3
|
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: %{srcname}-base = %{version}-%{release}
|
|
|
|
Requires: python3-%{srcname} = %{version}-%{release}
|
|
|
|
|
|
|
|
Requires: python3-tornado
|
2019-12-13 16:30:21 +00:00
|
|
|
Requires: python3-cryptography
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: python3-pyyaml
|
|
|
|
Requires: python3-packaging
|
|
|
|
Requires: python3-requests
|
|
|
|
Requires: python3-zmq
|
|
|
|
Requires: python3-gnupg
|
|
|
|
|
2022-02-08 12:31:09 +00:00
|
|
|
# Conflicts with the monolithic versions of the package, before the split.
|
|
|
|
Conflicts: keylime < 6.3.0-3
|
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
|
|
|
|
%description webapp
|
|
|
|
The Keylime WebApp GUI interface can be used to provision a Keylime Agent.
|
|
|
|
|
|
|
|
%package tools
|
|
|
|
Summary: Keylime tools
|
|
|
|
License: MIT
|
|
|
|
|
2022-02-08 12:31:09 +00:00
|
|
|
# Conflicts with the monolithic versions of the package, before the split.
|
|
|
|
Conflicts: keylime < 6.3.0-3
|
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: %{srcname}-base = %{version}-%{release}
|
|
|
|
Requires: python3-%{srcname} = %{version}-%{release}
|
|
|
|
|
2019-12-13 16:30:21 +00:00
|
|
|
Requires: python3-tornado
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: python3-cryptography
|
|
|
|
Requires: python3-pyyaml
|
|
|
|
Requires: python3-packaging
|
2019-12-13 16:30:21 +00:00
|
|
|
Requires: python3-requests
|
|
|
|
Requires: python3-zmq
|
2022-02-07 22:44:19 +00:00
|
|
|
Requires: python3-gnupg
|
2019-12-13 16:30:21 +00:00
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
|
|
|
|
%description tools
|
|
|
|
The keylime tools package includes tools like the IMA emulator.
|
2019-12-13 16:30:21 +00:00
|
|
|
|
|
|
|
%prep
|
2022-02-07 22:44:19 +00:00
|
|
|
%autosetup -S git -n %{srcname}-%{version}
|
2019-12-13 16:30:21 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%py3_install
|
2022-02-07 22:44:19 +00:00
|
|
|
mkdir -p %{buildroot}/%{_sharedstatedir}/%{srcname}
|
|
|
|
mkdir -p --mode=0700 %{buildroot}/%{_rundir}/%{srcname}
|
|
|
|
mkdir -p --mode=0700 %{buildroot}/%{_localstatedir}/log/%{srcname}
|
2019-12-13 16:30:21 +00:00
|
|
|
|
2022-04-06 22:05:45 +00:00
|
|
|
# Setting up the agent to use keylime user/group.
|
|
|
|
sed -e 's/^run_as.*/run_as = %{srcname}:%{srcname}/g' -i %{srcname}.conf
|
2022-02-15 03:19:03 +00:00
|
|
|
install -Dpm 600 %{srcname}.conf \
|
2019-12-13 16:30:21 +00:00
|
|
|
%{buildroot}%{_sysconfdir}/%{srcname}.conf
|
|
|
|
|
2022-02-15 03:19:03 +00:00
|
|
|
install -Dpm 644 ./services/%{srcname}_agent.service \
|
2019-12-13 16:30:21 +00:00
|
|
|
%{buildroot}%{_unitdir}/%{srcname}_agent.service
|
|
|
|
|
2022-04-06 22:05:45 +00:00
|
|
|
install -Dpm 644 ./services/%{srcname}_agent_secure.mount \
|
|
|
|
%{buildroot}%{_unitdir}/%{srcname}_agent_secure.mount
|
|
|
|
|
2022-02-15 03:19:03 +00:00
|
|
|
install -Dpm 644 ./services/%{srcname}_verifier.service \
|
2019-12-13 16:30:21 +00:00
|
|
|
%{buildroot}%{_unitdir}/%{srcname}_verifier.service
|
|
|
|
|
2022-02-15 03:19:03 +00:00
|
|
|
install -Dpm 644 ./services/%{srcname}_registrar.service \
|
2019-12-13 16:30:21 +00:00
|
|
|
%{buildroot}%{_unitdir}/%{srcname}_registrar.service
|
|
|
|
|
2020-02-06 15:43:50 +00:00
|
|
|
cp -r ./tpm_cert_store %{buildroot}%{_sharedstatedir}/keylime/
|
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
%pre base
|
|
|
|
getent group %{srcname} >/dev/null || groupadd -r %{srcname} &>/dev/null
|
|
|
|
getent passwd %{srcname} >/dev/null || \
|
|
|
|
useradd -r -g %{srcname} -d %{_localstatedir}/lib/%{srcname} -s /usr/sbin/nologin \
|
|
|
|
-c "Keylime agent unprivileged user" %{srcname} &>/dev/null
|
|
|
|
# Add keylime user to tss group.
|
|
|
|
if getent group tss >/dev/null && ! groups %{srcname} | grep -q "\btss\b"; then
|
|
|
|
usermod -a -G tss %{srcname} &>/dev/null
|
|
|
|
fi
|
2022-04-06 22:05:45 +00:00
|
|
|
exit 0
|
|
|
|
|
|
|
|
%posttrans base
|
|
|
|
[ -f %{_sysconfdir}/%{srcname}.conf ] && \
|
2022-05-04 17:28:12 +00:00
|
|
|
chmod 600 %{_sysconfdir}/%{srcname}.conf && \
|
|
|
|
chown %{srcname} %{_sysconfdir}/%{srcname}.conf
|
|
|
|
[ -d %{_sharedstatedir}/%{srcname} ] && \
|
|
|
|
chown -R %{srcname} %{_sharedstatedir}/%{srcname}/
|
|
|
|
[ -d %{_localstatedir}/log/%{srcname} ] && \
|
|
|
|
chown -R %{srcname} %{_localstatedir}/log/%{srcname}/
|
2022-02-07 22:44:19 +00:00
|
|
|
exit 0
|
2019-12-13 16:30:21 +00:00
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
%post verifier
|
|
|
|
%systemd_post %{srcname}_verifier.service
|
2019-12-13 16:30:21 +00:00
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
%post registrar
|
|
|
|
%systemd_post %{srcname}_registrar.service
|
2019-12-13 16:30:21 +00:00
|
|
|
|
2022-02-07 22:44:19 +00:00
|
|
|
%post -n python3-%{srcname}-agent
|
|
|
|
%systemd_post %{srcname}_agent.service
|
|
|
|
|
|
|
|
%preun verifier
|
|
|
|
%systemd_preun %{srcname}_verifier.service
|
|
|
|
|
|
|
|
%preun registrar
|
|
|
|
%systemd_preun %{srcname}_registrar.service
|
|
|
|
|
|
|
|
%preun -n python3-%{srcname}-agent
|
|
|
|
%systemd_preun %{srcname}_agent.service
|
|
|
|
|
|
|
|
%postun verifier
|
|
|
|
%systemd_postun_with_restart %{srcname}_verifier.service
|
|
|
|
|
|
|
|
%postun registrar
|
|
|
|
%systemd_postun_with_restart %{srcname}_registrar.service
|
|
|
|
|
|
|
|
%postun -n python3-%{srcname}-agent
|
|
|
|
%systemd_postun_with_restart %{srcname}_agent.service
|
|
|
|
|
|
|
|
%files verifier
|
|
|
|
%license LICENSE
|
2019-12-13 16:30:21 +00:00
|
|
|
%{_bindir}/%{srcname}_verifier
|
2022-02-07 22:44:19 +00:00
|
|
|
%{_bindir}/%{srcname}_ca
|
|
|
|
%{_bindir}/%{srcname}_migrations_apply
|
|
|
|
%{_unitdir}/keylime_verifier.service
|
|
|
|
|
|
|
|
%files registrar
|
|
|
|
%license LICENSE
|
2019-12-13 16:30:21 +00:00
|
|
|
%{_bindir}/%{srcname}_registrar
|
2022-02-07 22:44:19 +00:00
|
|
|
%{_unitdir}/keylime_registrar.service
|
|
|
|
|
|
|
|
%files -n python3-%{srcname}-agent
|
|
|
|
%license LICENSE
|
2019-12-13 16:30:21 +00:00
|
|
|
%{_bindir}/%{srcname}_agent
|
2022-04-06 22:05:45 +00:00
|
|
|
%{_unitdir}/%{srcname}_agent.service
|
|
|
|
%{_unitdir}/%{srcname}_agent_secure.mount
|
2022-02-07 22:44:19 +00:00
|
|
|
%{_bindir}/%{srcname}_ima_emulator
|
|
|
|
|
|
|
|
%files tenant
|
|
|
|
%license LICENSE
|
2019-12-13 16:30:21 +00:00
|
|
|
%{_bindir}/%{srcname}_tenant
|
2022-02-07 22:44:19 +00:00
|
|
|
|
|
|
|
%files webapp
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/%{srcname}_webapp
|
|
|
|
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
%license LICENSE
|
|
|
|
%{python3_sitelib}/%{srcname}-*.egg-info/
|
|
|
|
%{python3_sitelib}/%{srcname}
|
|
|
|
|
|
|
|
%files tools
|
|
|
|
%license LICENSE
|
2019-12-13 16:30:21 +00:00
|
|
|
%{_bindir}/%{srcname}_userdata_encrypt
|
2022-02-07 22:44:19 +00:00
|
|
|
|
|
|
|
%files base
|
|
|
|
%license LICENSE keylime/static/icons/ICON-LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%config(noreplace) %attr(600,%{srcname},%{srcname}) %{_sysconfdir}/%{srcname}.conf
|
|
|
|
%attr(700,%{srcname},%{srcname}) %dir %{_rundir}/%{srcname}
|
|
|
|
%attr(700,%{srcname},%{srcname}) %dir %{_localstatedir}/log/%{srcname}
|
|
|
|
%attr(700,%{srcname},%{srcname}) %{_sharedstatedir}/%{srcname}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
2019-12-13 16:30:21 +00:00
|
|
|
|
|
|
|
%changelog
|
2022-07-07 15:20:17 +00:00
|
|
|
%autochangelog
|