trousers-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. %bcond_with systemd
  2. %global _unpackaged_files_terminate_build 1
  3. Name: trousers
  4. Summary: TCG's Software Stack v1.2
  5. Version: 0.3.14
  6. Release: 1%{?_dist_release}
  7. Group: System Environment/Libraries
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. Packager: tomop
  11. License: BSD
  12. URL: http://trousers.sourceforge.net
  13. Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
  14. Source1: tcsd.service
  15. Source1000: tcsd.init
  16. Patch1: trousers-0.3.13-noinline.patch
  17. Patch2: trousers-openssl1.1.patch
  18. BuildRequires: libtool, openssl-devel
  19. Requires(pre): shadow-utils
  20. Requires: %{name}-lib%{?_isa} = %{version}-%{release}
  21. %if %{with systemd}
  22. BuildRequires: systemd
  23. Requires(post): systemd-units
  24. Requires(preun): systemd-units
  25. Requires(postun): systemd-units
  26. %endif
  27. %description
  28. TrouSerS is an implementation of the Trusted Computing Group's Software Stack
  29. (TSS) specification. You can use TrouSerS to write applications that make use
  30. of your TPM hardware. TPM hardware can create, store and use RSA keys
  31. securely (without ever being exposed in memory), verify a platform's software
  32. state using cryptographic hashes and more.
  33. %package lib
  34. Summary: TrouSerS libtspi library
  35. Group: Development/Libraries
  36. # Needed obsoletes due to the -lib subpackage split
  37. Obsoletes: trousers < 0.3.13-4
  38. %description lib
  39. The libtspi library for use in Trusted Computing enabled applications.
  40. %package static
  41. Summary: TrouSerS TCG Device Driver Library
  42. Group: Development/Libraries
  43. Requires: %{name}-devel%{?_isa} = %{version}-%{release}
  44. %description static
  45. The TCG Device Driver Library (TDDL) used by the TrouSerS tcsd as the
  46. interface to the TPM's device driver. For more information about writing
  47. applications to the TDDL interface, see the latest TSS spec at
  48. https://www.trustedcomputinggroup.org/specs/TSS.
  49. %package devel
  50. Summary: TrouSerS header files and documentation
  51. Group: Development/Libraries
  52. Requires: %{name}-lib%{?_isa} = %{version}-%{release}
  53. %description devel
  54. Header files and man pages for use in creating Trusted Computing enabled
  55. applications.
  56. %prep
  57. %setup -q -c
  58. %patch1 -p1 -b .noinline
  59. %patch2 -p1 -b .ssl1.1
  60. # fix man page paths
  61. 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
  62. %build
  63. %configure --with-gui=openssl
  64. make -k %{?_smp_mflags}
  65. %install
  66. mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/lib/tpm
  67. make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -p"
  68. rm -f ${RPM_BUILD_ROOT}/%{_libdir}/libtspi.la
  69. %if %{with systemd}
  70. mkdir -p $RPM_BUILD_ROOT%{_unitdir}
  71. install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/
  72. %else
  73. mkdir -p $RPM_BUILD_ROOT%{_initdir}
  74. install -m 0755 %{SOURCE1000} $RPM_BUILD_ROOT%{_initdir}/tcsd
  75. %endif
  76. %pre
  77. getent group tss >/dev/null || groupadd -g 59 -r tss
  78. getent passwd tss >/dev/null || \
  79. useradd -r -u 59 -g tss -d /dev/null -s /sbin/nologin \
  80. -c "Account used by the trousers package to sandbox the tcsd daemon" tss
  81. exit 0
  82. %post
  83. %if %{with systemd}
  84. %systemd_post tcsd.service
  85. %else
  86. /sbin/chkconfig --add tcsd
  87. %endif
  88. %preun
  89. %if %{with systemd}
  90. %systemd_preun tcsd.service
  91. %else
  92. if [ $1 -eq 0 ]; then
  93. /sbin/service tcsd stop
  94. /sbin/chkconfig --del tcsd
  95. fi
  96. %endif
  97. %postun
  98. %if %{with systemd}
  99. %systemd_postun_with_restart tcsd.service
  100. %else
  101. if [ $1 -gt 0 ]; then
  102. /sbin/service tcsd condrestart
  103. fi
  104. %endif
  105. %post lib -p /sbin/ldconfig
  106. %postun lib -p /sbin/ldconfig
  107. %files
  108. %doc README ChangeLog
  109. %{_sbindir}/tcsd
  110. %config(noreplace) %attr(0600, tss, tss) %{_sysconfdir}/tcsd.conf
  111. %{_mandir}/man5/*
  112. %{_mandir}/man8/*
  113. %if %{with systemd}
  114. %attr(644,root,root) %{_unitdir}/tcsd.service
  115. %else
  116. %{_initdir}/tcsd
  117. %endif
  118. %attr(0700, tss, tss) %{_localstatedir}/lib/tpm/
  119. %files lib
  120. %{!?_licensedir:%global license %%doc}
  121. %license LICENSE
  122. %{_libdir}/libtspi.so.?
  123. %{_libdir}/libtspi.so.?.?.?
  124. %files devel
  125. # The files to be used by developers, 'trousers-devel'
  126. %doc doc/LTC-TSS_LLD_08_r2.pdf doc/TSS_programming_SNAFUs.txt
  127. %attr(0755, root, root) %{_libdir}/libtspi.so
  128. %{_includedir}/tss/
  129. %{_includedir}/trousers/
  130. %{_mandir}/man3/Tspi_*
  131. %files static
  132. # The only static library shipped by trousers, the TDDL
  133. %{_libdir}/libtddl.a
  134. %changelog
  135. * Wed Nov 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.3.14-1
  136. - new upstream release.
  137. * Wed Nov 07 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.3.13-12
  138. - rebuilt with openssl-1.1.1.
  139. - enabled Patch2.
  140. * Mon Mar 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.3.13-11
  141. - initial build for Vine Linux.
  142. * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-10
  143. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  144. * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-9
  145. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  146. * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-8
  147. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  148. * Tue Feb 7 2017 Peter Robinson <pbrobinson@fedoraproject.org> 0.3.13-7
  149. - Add patch for OpenSSL 1.1
  150. * Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-6
  151. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  152. * Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.13-5
  153. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  154. * Tue May 26 2015 Tomáš Mráz <tmraz@redhat.com> 0.3.13-4
  155. - Split libtspi to a trousers-lib subpackage (#1225062)
  156. - Fix FTBFS with current gcc (drop inline keyword when bogus)
  157. * Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.13-3
  158. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  159. * Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.13-2
  160. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  161. * Thu May 15 2014 Steve Grubb <sgrubb@redhat.com> 0.3.13-1
  162. - New upstream bug fix release
  163. * Tue Mar 18 2014 Steve Grubb <sgrubb@redhat.com> 0.3.11.2-3
  164. - Fix crash when linking libgnutls and libmysqlclient (#1069079)
  165. - Don't order tcsd after syslog.target (#1055198)
  166. * Thu Feb 13 2014 Peter Robinson <pbrobinson@fedoraproject.org> 0.3.11.2-2
  167. - Minor spec cleanups
  168. * Mon Aug 19 2013 Steve Grubb <sgrubb@redhat.com> 0.3.11.2-1
  169. - New upstream bug fix and license change release
  170. * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.10-4
  171. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  172. * Sun Jun 02 2013 Steve Grubb <sgrubb@redhat.com> 0.3.10-3
  173. - Remove +x bit from service file (#963916)
  174. * Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.10-2
  175. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  176. * Tue Sep 25 2012 Steve Grubb <sgrubb@redhat.com> 0.3.10-1
  177. - New upstream bug fix release
  178. * Thu Aug 30 2012 Steve Grubb <sgrubb@redhat.com> 0.3.9-4
  179. - Make daemon full RELRO
  180. * Mon Aug 27 2012 Steve Grubb <sgrubb@redhat.com> 0.3.9-3
  181. - bz #836476 - Provide native systemd service
  182. * Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.9-2
  183. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  184. * Thu Jun 21 2012 Steve Grubb <sgrubb@redhat.com> 0.3.9-1
  185. - New upstream bug fix release
  186. * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-2
  187. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  188. * Fri Apr 08 2011 Steve Grubb <sgrubb@redhat.com> 0.3.6-1
  189. - New upstream bug fix release
  190. * Thu Feb 10 2011 Miloš Jakubíček <xjakub@fi.muni.cz> - 0.3.4-5
  191. - Fix paths in man pages, mark them as %%doc -- fix BZ#676394
  192. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-4
  193. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  194. * Sat May 01 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 0.3.4-3
  195. - Fix init script to conform to Fedora guidelines
  196. - Do not overuse macros
  197. * Mon Feb 08 2010 Steve Grubb <sgrubb@redhat.com> 0.3.4-2
  198. - Fix issue freeing a data structure
  199. * Fri Jan 29 2010 Steve Grubb <sgrubb@redhat.com> 0.3.4-1
  200. - New upstream bug fix release
  201. - Upstream requested the tpm-emulator patch be dropped
  202. * Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.3.1-19
  203. - rebuilt with new openssl
  204. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-18
  205. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  206. * Thu May 14 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.3.1-17
  207. - Do not overuse macros.
  208. - Removed unnecessary file requirements on chkconfig, ldconfig and service,
  209. now requiring the initscripts and chkconfig packages.
  210. * Wed May 06 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.3.1-16
  211. - Fix a typo in groupadd causing the %%pre scriptlet to fail (resolves BZ#486155).
  212. * Mon Apr 27 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.3.1-15
  213. - Fix FTBFS: added trousers-0.3.1-gcc44.patch
  214. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-14
  215. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  216. * Sun Jan 18 2009 Tomas Mraz <tmraz@redhat.com> - 0.3.1-13
  217. - rebuild with new openssl
  218. * Tue Dec 16 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.3.1-12
  219. - Bump release to avoid wrong tag in rawhide
  220. * Tue Dec 16 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.3.1-11
  221. - Work around SELinux namespace pollution (#464037)
  222. - Use SO_REUSEADDR
  223. - Use TPM emulator if it's available and no hardware is
  224. * Fri Aug 08 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-10
  225. - Use the uid/gid pair assigned to trousers from BZ#457593
  226. * Fri Aug 01 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-9
  227. - Incorporated changes from the RHEL package which were done by Steve Grubb
  228. * Wed Jun 04 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-8
  229. - Fix cast issue preventing successful build on ppc64 and x86_64
  230. * Tue Jun 03 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-7
  231. - Fix for BZ #434267 and #440733. Patch authored by Debora Velarde
  232. * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.3.1-6
  233. - Autorebuild for GCC 4.3
  234. * Mon Dec 17 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-5
  235. - Updated static rpm's comment line (too long)
  236. * Thu Dec 13 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-4
  237. - Updated specfile for RHBZ#323441 comment #28
  238. * Wed Dec 12 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-3
  239. - Updated specfile for RHBZ#323441 comment #22
  240. * Wed Nov 28 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-2
  241. - Updated to include the include dirs in the devel package;
  242. added the no-install-hooks patch
  243. * Wed Nov 28 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-1
  244. - Updated specfile for RHBZ#323441 comment #13
  245. * Mon Nov 12 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1
  246. - Updated specfile for comments in RHBZ#323441
  247. * Wed Jun 07 2006 Kent Yoder <kyoder@users.sf.net> - 0.2.6-1
  248. - Updated build section to use smp_mflags
  249. - Removed .la file from installed dest and files section
  250. * Tue Jun 06 2006 Kent Yoder <kyoder@users.sf.net> - 0.2.6-1
  251. - Initial add of changelog tag for trousers CVS