Blame SPECS/tpm2-abrmd.spec

0e36c4
%global selinuxtype targeted
0e36c4
0e36c4
Name: tpm2-abrmd
0e36c4
Version: 2.3.3
cbf305
Release: 3%{?dist}
0e36c4
Summary: A system daemon implementing TPM2 Access Broker and Resource Manager
0e36c4
0e36c4
License: BSD
0e36c4
URL:     https://github.com/tpm2-software/tpm2-abrmd
0e36c4
Source0: https://github.com/tpm2-software/tpm2-abrmd/releases/download/%{version}/%{name}-%{version}.tar.gz
0e36c4
0e36c4
%{?systemd_requires}
0e36c4
BuildRequires: systemd
0e36c4
BuildRequires: libtool
0e36c4
BuildRequires: autoconf-archive
0e36c4
BuildRequires: pkgconfig(cmocka)
0e36c4
BuildRequires: pkgconfig(dbus-1)
0e36c4
BuildRequires: pkgconfig(gio-unix-2.0)
0e36c4
BuildRequires: pkgconfig(tss2-mu)
0e36c4
BuildRequires: pkgconfig(tss2-sys)
0e36c4
# tpm2-abrmd depends on tpm2-tss-devel for tss2-mu/sys libs
0e36c4
BuildRequires: tpm2-tss-devel >= 2.3.1-2%{?dist}
0e36c4
cbf305
Patch0: 0001-tabrmd-options-fix-memory-leak.patch
cbf305
Patch1: 0002-resource-manager-rm-ref-count-inc-of-handle_entry.patch
cbf305
Patch2: 0003-tabrmd-init.c-fix-leaks-on-main-to-thread-tpm2-insta.patch
cbf305
Patch3: 0004-init_thread_func-fix-deadlock.patch
cbf305
Patch4: 0005-ResourceManager-Avoid-double-free-in-resource-manage.patch
cbf305
Patch5: 0006-tcti-initialize-GError-to-NULL.patch
cbf305
0e36c4
# tpm2-abrmd depends on the package that contains its SELinux policy module
0e36c4
Requires: (%{name}-selinux >= 2.0.0-1%{?dist} if selinux-policy-%{selinuxtype})
0e36c4
0e36c4
%description
0e36c4
tpm2-abrmd is a system daemon implementing the TPM2 access broker (TAB) and
0e36c4
Resource Manager (RM) spec from the TCG.
0e36c4
0e36c4
%prep
0e36c4
%autosetup -p1 -n %{name}-%{version}
0e36c4
0e36c4
%build
0e36c4
%configure --disable-static --disable-silent-rules \
0e36c4
           --with-systemdsystemunitdir=%{_unitdir} \
0e36c4
           --with-systemdpresetdir=%{_presetdir}
0e36c4
%make_build
0e36c4
0e36c4
%install
0e36c4
%make_install
0e36c4
find %{buildroot}%{_libdir} -type f -name \*.la -delete
0e36c4
0e36c4
%pre
0e36c4
getent group tss >/dev/null || groupadd -g 59 -r tss
0e36c4
getent passwd tss >/dev/null || \
0e36c4
useradd -r -u 59 -g tss -d /dev/null -s /sbin/nologin \
0e36c4
 -c "Account used by the tpm2-abrmd package to sandbox the tpm2-abrmd daemon" tss
0e36c4
exit 0
0e36c4
0e36c4
%files
0e36c4
%doc README.md CHANGELOG.md
0e36c4
%license LICENSE
0e36c4
%{_libdir}/libtss2-tcti-tabrmd.so.*
0e36c4
%{_sbindir}/tpm2-abrmd
0e36c4
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/tpm2-abrmd.conf
0e36c4
%{_datarootdir}/dbus-1/system-services/com.intel.tss2.Tabrmd.service
0e36c4
%{_unitdir}/tpm2-abrmd.service
0e36c4
%{_presetdir}/tpm2-abrmd.preset
0e36c4
%{_mandir}/man3/Tss2_Tcti_Tabrmd_Init.3.gz
0e36c4
%{_mandir}/man7/tss2-tcti-tabrmd.7.gz
0e36c4
%{_mandir}/man8/tpm2-abrmd.8.gz
0e36c4
0e36c4
0e36c4
%package devel
0e36c4
Summary: Headers, static libraries and package config files of tpm2-abrmd
0e36c4
Requires: %{name}%{_isa} = %{version}-%{release}
0e36c4
# tpm2-abrmd-devel depends on tpm2-tss-devel for tss2-mu/sys libs
0e36c4
Requires: tpm2-tss-devel%{?_isa} >= 2.0.0-1%{?dist}
0e36c4
0e36c4
%description devel
0e36c4
This package contains headers, static libraries and package config files
0e36c4
required to build applications that use tpm2-abrmd.
0e36c4
0e36c4
%files devel
0e36c4
%{_includedir}/tss2/tss2-tcti-tabrmd.h
0e36c4
%{_libdir}/libtss2-tcti-tabrmd.so
0e36c4
%{_libdir}/pkgconfig/tss2-tcti-tabrmd.pc
0e36c4
0e36c4
# on package installation
0e36c4
%post
0e36c4
/sbin/ldconfig
0e36c4
%systemd_post tpm2-abrmd.service
0e36c4
0e36c4
%preun
0e36c4
%systemd_preun tpm2-abrmd.service
0e36c4
0e36c4
%postun
0e36c4
/sbin/ldconfig
0e36c4
%systemd_postun tpm2-abrmd.service
0e36c4
0e36c4
%changelog
cbf305
* Thu Aug 11 2022 Štěpán Horáček <shoracek@redhat.com> - 2.3.3-3
cbf305
- Fix memory leaks and double free
cbf305
  resolves: rhbz#2041912
cbf305
0e36c4
* Mon Nov 23 2020 Jerry Snitselaar <jsnitsel@redhat.com> - 2.3.3-2
0e36c4
- Update tpm2-tss-devel BuildRequires
0e36c4
resolves: rhbz#1855177
0e36c4
0e36c4
* Wed Nov 11 2020 Jerry Snitselaar <jsnitsel@redhat.com> - 2.3.3-1
0e36c4
- Rebase to 2.3.3 release.
0e36c4
resolves: rhbz#1855177
0e36c4
0e36c4
* Tue May 28 2019 Jerry Snitselaar <jsnitsel@redhat.com> - 2.1.1-3
0e36c4
- Update CI gating to use test.
0e36c4
resolves: rhbz#1682416
0e36c4
0e36c4
* Tue May 14 2019 Jerry Snitselaar <jsnitsel@redhat.com> - 2.1.1-2
0e36c4
- Add initial CI gating.
0e36c4
resolves: rhbz#1682416
0e36c4
0e36c4
* Tue Apr 30 2019 Jerry Snitselaar <jsnitsel@redhat.com> - 2.1.1-1
0e36c4
- Rebase to release 2.1.1
0e36c4
resolves: rhbz#1664499
0e36c4
0e36c4
* Wed Feb 06 2019 Jerry Snitselaar <jsnitsel@redhat.com> - 2.0.0-3
0e36c4
- Fix tpm2-abrmd-selinux Requires
0e36c4
resolves: rhbz#1642000
0e36c4
0e36c4
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-2
0e36c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0e36c4
0e36c4
* Wed Jul 04 2018 Javier Martinez Canillas <javierm@redhat.com> - 2.0.0-1
0e36c4
- Download the distributed tarball instead of the source code tarball
0e36c4
- Update URLs to point to the new project location
0e36c4
- Update to 2.0.0 release
0e36c4
0e36c4
* Fri Feb 23 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.1.0-12
0e36c4
- Don't install udev rule for TPM character devices
0e36c4
0e36c4
* Wed Feb 21 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.1.0-11
0e36c4
- Remove ExclusiveArch: x86_64 directive
0e36c4
0e36c4
* Thu Feb 15 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.1.0-10
0e36c4
- Remove %%{_isa} from BuildRequires (RHBZ#1545210)
0e36c4
0e36c4
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-9
0e36c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0e36c4
0e36c4
* Wed Oct 25 2017 Peter Jones <pjones@redhat.com> - 1.1.0-8
0e36c4
- Make only tpm2-abrmd-devel have a runtime dep on tpm2-tools-devel
0e36c4
0e36c4
* Wed Oct 18 2017 Jerry Snitselaar <jsnitsel@redhat.com> - 1.1.0-7
0e36c4
- tcti-abrmd: Fix null deref
0e36c4
0e36c4
* Fri Oct 13 2017 Sun Yunying <yunying.sun@intel.com> - 1.1.0-6
0e36c4
- Add tss user if doesn't currently exist - PR#1 from Jerry Snitselaar
0e36c4
- Removed source tarball and cleared it from .gitignore
0e36c4
0e36c4
* Wed Aug 16 2017 Sun Yunying <yunying.sun@intel.com> - 1.1.0-5
0e36c4
- Updated source0 URL to fix rpmlint warnings
0e36c4
0e36c4
* Tue Aug 15 2017 Sun Yunying <yunying.sun@intel.com> - 1.1.0-4
0e36c4
- Rename and relocate udev rules file to _udevrulesdir
0e36c4
- Update scriptlet to add service name after systemd_postrun
0e36c4
0e36c4
* Tue Aug 1 2017 Sun Yunying <yunying.sun@intel.com> - 1.1.0-3
0e36c4
- Use config option with-systemdsystemunitdir to set systemd unit file location
0e36c4
0e36c4
* Mon Jul 31 2017 Sun Yunying <yunying.sun@intel.com> - 1.1.0-2
0e36c4
- Removed BuildRequires for gcc
0e36c4
- Move tpm2-abrmd systemd service to /usr/lib/systemd/system
0e36c4
- Added scriptlet for tpm2-abrmd systemd service
0e36c4
- Use autoreconf instead of bootstrap
0e36c4
0e36c4
* Wed Jul 26 2017 Sun Yunying <yunying.sun@intel.com> - 1.1.0-1
0e36c4
- Initial packaging