trousers-vl.spec 11 KB

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