Blame SPECS/tpm2-abrmd.spec

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