Blame SPECS/trousers.spec

7b4f43
Name: trousers
7b4f43
Summary: TCG's Software Stack v1.2
7b4f43
Version: 0.3.15
7b4f43
Release: 1%{?dist}
7b4f43
License: BSD
7b4f43
Group: System Environment/Libraries
7b4f43
Url: http://trousers.sourceforge.net
7b4f43
7b4f43
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
7b4f43
Source1: tcsd.service
7b4f43
Patch1: trousers-0.3.14-noinline.patch
7b4f43
# submitted upstream https://sourceforge.net/p/trousers/mailman/message/35766729/
7b4f43
Patch2: trousers-0.3.14-unlock-in-err-path.patch
7b4f43
Patch3: trousers-0.3.14-fix-indent-obj_policy.patch
7b4f43
Patch4: trousers-0.3.14-fix-indent-tspi_key.patch
7b4f43
7b4f43
BuildRequires: libtool openssl-devel gettext-devel autoconf automake
7b4f43
BuildRequires: systemd
7b4f43
Requires(pre): shadow-utils
7b4f43
Requires(post): systemd-units
7b4f43
Requires(preun): systemd-units
7b4f43
Requires(postun): systemd-units
7b4f43
Requires: %{name}-lib%{?_isa} = %{version}-%{release}
7b4f43
7b4f43
%description
7b4f43
TrouSerS is an implementation of the Trusted Computing Group's Software Stack
7b4f43
(TSS) specification. You can use TrouSerS to write applications that make use
7b4f43
of your TPM hardware. TPM hardware can create, store and use RSA keys
7b4f43
securely (without ever being exposed in memory), verify a platform's software
7b4f43
state using cryptographic hashes and more.
7b4f43
7b4f43
%package lib
7b4f43
Summary: TrouSerS libtspi library
7b4f43
Group: Development/Libraries
7b4f43
# Needed obsoletes due to the -lib subpackage split
7b4f43
Obsoletes: trousers < 0.3.13-4
7b4f43
7b4f43
%description lib
7b4f43
The libtspi library for use in Trusted Computing enabled applications.
7b4f43
7b4f43
%package static
7b4f43
Summary: TrouSerS TCG Device Driver Library
7b4f43
Group: Development/Libraries
7b4f43
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
7b4f43
7b4f43
%description static
7b4f43
The TCG Device Driver Library (TDDL) used by the TrouSerS tcsd as the
7b4f43
interface to the TPM's device driver. For more information about writing
7b4f43
applications to the TDDL interface, see the latest TSS spec at
7b4f43
https://www.trustedcomputinggroup.org/specs/TSS.
7b4f43
7b4f43
%package devel
7b4f43
Summary: TrouSerS header files and documentation
7b4f43
Group: Development/Libraries
7b4f43
Requires: %{name}-lib%{?_isa} = %{version}-%{release}
7b4f43
7b4f43
%description devel
7b4f43
Header files and man pages for use in creating Trusted Computing enabled
7b4f43
applications.
7b4f43
7b4f43
%prep
7b4f43
%autosetup -p1
7b4f43
# fix man page paths
7b4f43
sed -i -e 's|/var/tpm|/var/lib/tpm|g' -e 's|/usr/local/var|/var|g' man/man5/tcsd.conf.5.in man/man8/tcsd.8.in
7b4f43
7b4f43
%build
7b4f43
chmod +x ./bootstrap.sh
7b4f43
./bootstrap.sh
7b4f43
%configure --with-gui=openssl
7b4f43
make -k %{?_smp_mflags}
7b4f43
7b4f43
%install
7b4f43
mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/lib/tpm
7b4f43
make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -p"
7b4f43
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/libtspi.la
7b4f43
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
7b4f43
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/
7b4f43
7b4f43
%pre
7b4f43
getent group tss >/dev/null || groupadd -f -g 59 -r tss
7b4f43
if ! getent passwd tss >/dev/null ; then
7b4f43
    if ! getent passwd 59 >/dev/null ; then
7b4f43
      useradd -r -u 59 -g tss -d /dev/null -s /sbin/nologin -c "Account used for TPM access" tss
7b4f43
    else
7b4f43
      useradd -r -g tss -d /dev/null -s /sbin/nologin -c "Account used for TPM access" tss
7b4f43
    fi
7b4f43
fi
7b4f43
exit 0
7b4f43
7b4f43
%post
7b4f43
%systemd_post tcsd.service
7b4f43
7b4f43
%preun
7b4f43
%systemd_preun tcsd.service
7b4f43
7b4f43
%postun
7b4f43
%systemd_postun_with_restart tcsd.service 
7b4f43
7b4f43
%post lib -p /sbin/ldconfig
7b4f43
7b4f43
%postun lib -p /sbin/ldconfig
7b4f43
7b4f43
%files
7b4f43
%doc README ChangeLog
7b4f43
%{_sbindir}/tcsd
7b4f43
%config(noreplace) %attr(0640, root, tss) %{_sysconfdir}/tcsd.conf
7b4f43
%{_mandir}/man5/*
7b4f43
%{_mandir}/man8/*
7b4f43
%attr(644,root,root) %{_unitdir}/tcsd.service
7b4f43
%attr(0700, tss, tss) %{_localstatedir}/lib/tpm/
7b4f43
7b4f43
%files lib
7b4f43
%license LICENSE
7b4f43
%{_libdir}/libtspi.so.?
7b4f43
%{_libdir}/libtspi.so.?.?.?
7b4f43
7b4f43
%files devel
7b4f43
# The files to be used by developers, 'trousers-devel'
7b4f43
%doc doc/LTC-TSS_LLD_08_r2.pdf doc/TSS_programming_SNAFUs.txt
7b4f43
%attr(0755, root, root) %{_libdir}/libtspi.so
7b4f43
%{_includedir}/tss/
7b4f43
%{_includedir}/trousers/
7b4f43
%{_mandir}/man3/Tspi_*
7b4f43
7b4f43
%files static
7b4f43
# The only static library shipped by trousers, the TDDL
7b4f43
%{_libdir}/libtddl.a
7b4f43
7b4f43
%changelog
7b4f43
* Fri Nov 06 2020 Jerry Snitselaar <jsnitsel@redhat.com> - 0.3.15-1
7b4f43
- Rebase to 0.3.15
7b4f43
- Fix CVE-2020-24330 CVE-2020-24331 CVE-2020-24332
7b4f43
resolves: rhbz#1725782 rhbz#1877517 rhbz#1882402 rhbz#1882414
7b4f43
7b4f43
* Wed Jun 05 2019 Jerry Snitselaar <jsnitsel@redhat.com> - 0.3.14-4
7b4f43
- Fix annocheck warnings
7b4f43
resolves: rhbz#1624181
7b4f43
7b4f43
* Mon May 27 2019 Jerry Snitselaar <jsnitsel@redhat.com> - 0.3.14-3
7b4f43
- Add initial CI gating support
7b4f43
- Fix covscan reported issues
7b4f43
resolves: rhbz#1602719
7b4f43
7b4f43
* Fri Aug 10 2018 Jerry Snitselaar <jsnitsel@redhat.com> - 0.3.14-2
7b4f43
- release mutex in error path for obj_context_set_machine_name
7b4f43
resolves: rhbz#1614915
7b4f43
7b4f43
* Wed Aug 01 2018 Jerry Snitselaar <jsnitsel@redhat.com> - 0.3.14-1
7b4f43
- Rebase to 3.14 release
7b4f43
resolves: rhbz#1614915
7b4f43
7b4f43
* Mon Jul 23 2018 Jerry Snitselaar <jsnitsel@redhat.com> - 0.3.13-11
7b4f43
- Rebuild with correct source checksum.
7b4f43
7b4f43
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-10
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
7b4f43
7b4f43
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-9
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
7b4f43
7b4f43
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-8
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7b4f43
7b4f43
* Tue Feb  7 2017 Peter Robinson <pbrobinson@fedoraproject.org> 0.3.13-7
7b4f43
- Add patch for OpenSSL 1.1
7b4f43
7b4f43
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-6
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7b4f43
7b4f43
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.13-5
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7b4f43
7b4f43
* Tue May 26 2015 Tomáš Mráz <tmraz@redhat.com> 0.3.13-4
7b4f43
- Split libtspi to a trousers-lib subpackage (#1225062)
7b4f43
- Fix FTBFS with current gcc (drop inline keyword when bogus)
7b4f43
7b4f43
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.13-3
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
7b4f43
7b4f43
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.13-2
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7b4f43
7b4f43
* Thu May 15 2014 Steve Grubb <sgrubb@redhat.com> 0.3.13-1
7b4f43
- New upstream bug fix release
7b4f43
7b4f43
* Tue Mar 18 2014 Steve Grubb <sgrubb@redhat.com> 0.3.11.2-3
7b4f43
- Fix crash when linking libgnutls and libmysqlclient (#1069079)
7b4f43
- Don't order tcsd after syslog.target (#1055198)
7b4f43
7b4f43
* Thu Feb 13 2014 Peter Robinson <pbrobinson@fedoraproject.org> 0.3.11.2-2
7b4f43
- Minor spec cleanups
7b4f43
7b4f43
* Mon Aug 19 2013 Steve Grubb <sgrubb@redhat.com> 0.3.11.2-1
7b4f43
- New upstream bug fix and license change release
7b4f43
7b4f43
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.10-4
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
7b4f43
7b4f43
* Sun Jun 02 2013 Steve Grubb <sgrubb@redhat.com> 0.3.10-3
7b4f43
- Remove +x bit from service file (#963916)
7b4f43
7b4f43
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.10-2
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
7b4f43
7b4f43
* Tue Sep 25 2012 Steve Grubb <sgrubb@redhat.com> 0.3.10-1
7b4f43
- New upstream bug fix release
7b4f43
7b4f43
* Thu Aug 30 2012 Steve Grubb <sgrubb@redhat.com> 0.3.9-4
7b4f43
- Make daemon full RELRO
7b4f43
7b4f43
* Mon Aug 27 2012 Steve Grubb <sgrubb@redhat.com> 0.3.9-3
7b4f43
- bz #836476 - Provide native systemd service
7b4f43
7b4f43
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.9-2
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7b4f43
7b4f43
* Thu Jun 21 2012 Steve Grubb <sgrubb@redhat.com> 0.3.9-1
7b4f43
- New upstream bug fix release
7b4f43
7b4f43
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-2
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
7b4f43
7b4f43
* Fri Apr 08 2011 Steve Grubb <sgrubb@redhat.com> 0.3.6-1
7b4f43
- New upstream bug fix release
7b4f43
7b4f43
* Thu Feb 10 2011 Miloš Jakubíček <xjakub@fi.muni.cz> - 0.3.4-5
7b4f43
- Fix paths in man pages, mark them as %%doc -- fix BZ#676394
7b4f43
7b4f43
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-4
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
7b4f43
7b4f43
* Sat May 01 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 0.3.4-3
7b4f43
- Fix init script to conform to Fedora guidelines
7b4f43
- Do not overuse macros
7b4f43
7b4f43
* Mon Feb 08 2010 Steve Grubb <sgrubb@redhat.com> 0.3.4-2
7b4f43
- Fix issue freeing a data structure
7b4f43
7b4f43
* Fri Jan 29 2010 Steve Grubb <sgrubb@redhat.com> 0.3.4-1
7b4f43
- New upstream bug fix release
7b4f43
- Upstream requested the tpm-emulator patch be dropped
7b4f43
7b4f43
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.3.1-19
7b4f43
- rebuilt with new openssl
7b4f43
7b4f43
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-18
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
7b4f43
7b4f43
* Thu May 14 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.3.1-17
7b4f43
- Do not overuse macros.
7b4f43
- Removed unnecessary file requirements on chkconfig, ldconfig and service,
7b4f43
  now requiring the initscripts and chkconfig packages.
7b4f43
7b4f43
* Wed May 06 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.3.1-16
7b4f43
- Fix a typo in groupadd causing the %%pre scriptlet to fail (resolves BZ#486155).
7b4f43
7b4f43
* Mon Apr 27 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.3.1-15
7b4f43
- Fix FTBFS: added trousers-0.3.1-gcc44.patch
7b4f43
7b4f43
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-14
7b4f43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
7b4f43
7b4f43
* Sun Jan 18 2009 Tomas Mraz <tmraz@redhat.com> - 0.3.1-13
7b4f43
- rebuild with new openssl
7b4f43
7b4f43
* Tue Dec 16 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.3.1-12
7b4f43
- Bump release to avoid wrong tag in rawhide
7b4f43
7b4f43
* Tue Dec 16 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.3.1-11
7b4f43
- Work around SELinux namespace pollution (#464037)
7b4f43
- Use SO_REUSEADDR
7b4f43
- Use TPM emulator if it's available and no hardware is
7b4f43
7b4f43
* Fri Aug 08 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-10
7b4f43
- Use the uid/gid pair assigned to trousers from BZ#457593
7b4f43
7b4f43
* Fri Aug 01 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-9
7b4f43
- Incorporated changes from the RHEL package which were done by Steve Grubb
7b4f43
7b4f43
* Wed Jun 04 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-8
7b4f43
- Fix cast issue preventing successful build on ppc64 and x86_64
7b4f43
7b4f43
* Tue Jun 03 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-7
7b4f43
- Fix for BZ #434267 and #440733. Patch authored by Debora Velarde
7b4f43
7b4f43
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.3.1-6
7b4f43
- Autorebuild for GCC 4.3
7b4f43
7b4f43
* Mon Dec 17 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-5
7b4f43
- Updated static rpm's comment line (too long)
7b4f43
7b4f43
* Thu Dec 13 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-4
7b4f43
- Updated specfile for RHBZ#323441 comment #28
7b4f43
7b4f43
* Wed Dec 12 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-3
7b4f43
- Updated specfile for RHBZ#323441 comment #22
7b4f43
7b4f43
* Wed Nov 28 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-2
7b4f43
- Updated to include the include dirs in the devel package;
7b4f43
added the no-install-hooks patch
7b4f43
7b4f43
* Wed Nov 28 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-1
7b4f43
- Updated specfile for RHBZ#323441 comment #13
7b4f43
7b4f43
* Mon Nov 12 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1
7b4f43
- Updated specfile for comments in RHBZ#323441
7b4f43
7b4f43
* Wed Jun 07 2006 Kent Yoder <kyoder@users.sf.net> - 0.2.6-1
7b4f43
- Updated build section to use smp_mflags
7b4f43
- Removed .la file from installed dest and files section
7b4f43
7b4f43
* Tue Jun 06 2006 Kent Yoder <kyoder@users.sf.net> - 0.2.6-1
7b4f43
- Initial add of changelog tag for trousers CVS