trousers-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  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: 2%{?_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. * Sun Oct 17 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.3.15-2
  140. - rebuilt with openssl-3.0.0.
  141. * Mon Feb 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.3.15-1
  142. - new upstream release.
  143. - dropped Patch4, 6, 1003 and 1005.
  144. * Tue Aug 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.3.14-1
  145. - new upstream release.
  146. - dropped Patch1 and 2.
  147. - imported Patch1-6 from rawhide.
  148. - imported Patch1003 and 1005 from upstream to fix vulnerabilities.
  149. * Wed Nov 07 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.3.13-12
  150. - rebuilt with openssl-1.1.1.
  151. - enabled Patch2.
  152. * Mon Mar 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.3.13-11
  153. - initial build for Vine Linux.
  154. * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-10
  155. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  156. * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-9
  157. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  158. * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-8
  159. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  160. * Tue Feb 7 2017 Peter Robinson <pbrobinson@fedoraproject.org> 0.3.13-7
  161. - Add patch for OpenSSL 1.1
  162. * Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.13-6
  163. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  164. * Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.13-5
  165. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  166. * Tue May 26 2015 Tomáš Mráz <tmraz@redhat.com> 0.3.13-4
  167. - Split libtspi to a trousers-lib subpackage (#1225062)
  168. - Fix FTBFS with current gcc (drop inline keyword when bogus)
  169. * Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.13-3
  170. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  171. * Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.13-2
  172. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  173. * Thu May 15 2014 Steve Grubb <sgrubb@redhat.com> 0.3.13-1
  174. - New upstream bug fix release
  175. * Tue Mar 18 2014 Steve Grubb <sgrubb@redhat.com> 0.3.11.2-3
  176. - Fix crash when linking libgnutls and libmysqlclient (#1069079)
  177. - Don't order tcsd after syslog.target (#1055198)
  178. * Thu Feb 13 2014 Peter Robinson <pbrobinson@fedoraproject.org> 0.3.11.2-2
  179. - Minor spec cleanups
  180. * Mon Aug 19 2013 Steve Grubb <sgrubb@redhat.com> 0.3.11.2-1
  181. - New upstream bug fix and license change release
  182. * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.10-4
  183. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  184. * Sun Jun 02 2013 Steve Grubb <sgrubb@redhat.com> 0.3.10-3
  185. - Remove +x bit from service file (#963916)
  186. * Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.10-2
  187. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  188. * Tue Sep 25 2012 Steve Grubb <sgrubb@redhat.com> 0.3.10-1
  189. - New upstream bug fix release
  190. * Thu Aug 30 2012 Steve Grubb <sgrubb@redhat.com> 0.3.9-4
  191. - Make daemon full RELRO
  192. * Mon Aug 27 2012 Steve Grubb <sgrubb@redhat.com> 0.3.9-3
  193. - bz #836476 - Provide native systemd service
  194. * Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.9-2
  195. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  196. * Thu Jun 21 2012 Steve Grubb <sgrubb@redhat.com> 0.3.9-1
  197. - New upstream bug fix release
  198. * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-2
  199. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  200. * Fri Apr 08 2011 Steve Grubb <sgrubb@redhat.com> 0.3.6-1
  201. - New upstream bug fix release
  202. * Thu Feb 10 2011 Miloš Jakubíček <xjakub@fi.muni.cz> - 0.3.4-5
  203. - Fix paths in man pages, mark them as %%doc -- fix BZ#676394
  204. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-4
  205. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  206. * Sat May 01 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 0.3.4-3
  207. - Fix init script to conform to Fedora guidelines
  208. - Do not overuse macros
  209. * Mon Feb 08 2010 Steve Grubb <sgrubb@redhat.com> 0.3.4-2
  210. - Fix issue freeing a data structure
  211. * Fri Jan 29 2010 Steve Grubb <sgrubb@redhat.com> 0.3.4-1
  212. - New upstream bug fix release
  213. - Upstream requested the tpm-emulator patch be dropped
  214. * Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.3.1-19
  215. - rebuilt with new openssl
  216. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-18
  217. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  218. * Thu May 14 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.3.1-17
  219. - Do not overuse macros.
  220. - Removed unnecessary file requirements on chkconfig, ldconfig and service,
  221. now requiring the initscripts and chkconfig packages.
  222. * Wed May 06 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.3.1-16
  223. - Fix a typo in groupadd causing the %%pre scriptlet to fail (resolves BZ#486155).
  224. * Mon Apr 27 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.3.1-15
  225. - Fix FTBFS: added trousers-0.3.1-gcc44.patch
  226. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-14
  227. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  228. * Sun Jan 18 2009 Tomas Mraz <tmraz@redhat.com> - 0.3.1-13
  229. - rebuild with new openssl
  230. * Tue Dec 16 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.3.1-12
  231. - Bump release to avoid wrong tag in rawhide
  232. * Tue Dec 16 2008 David Woodhouse <David.Woodhouse@intel.com> - 0.3.1-11
  233. - Work around SELinux namespace pollution (#464037)
  234. - Use SO_REUSEADDR
  235. - Use TPM emulator if it's available and no hardware is
  236. * Fri Aug 08 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-10
  237. - Use the uid/gid pair assigned to trousers from BZ#457593
  238. * Fri Aug 01 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-9
  239. - Incorporated changes from the RHEL package which were done by Steve Grubb
  240. * Wed Jun 04 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-8
  241. - Fix cast issue preventing successful build on ppc64 and x86_64
  242. * Tue Jun 03 2008 Emily Ratliff <ratliff@austin.ibm.com> - 0.3.1-7
  243. - Fix for BZ #434267 and #440733. Patch authored by Debora Velarde
  244. * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.3.1-6
  245. - Autorebuild for GCC 4.3
  246. * Mon Dec 17 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-5
  247. - Updated static rpm's comment line (too long)
  248. * Thu Dec 13 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-4
  249. - Updated specfile for RHBZ#323441 comment #28
  250. * Wed Dec 12 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-3
  251. - Updated specfile for RHBZ#323441 comment #22
  252. * Wed Nov 28 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-2
  253. - Updated to include the include dirs in the devel package;
  254. added the no-install-hooks patch
  255. * Wed Nov 28 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1-1
  256. - Updated specfile for RHBZ#323441 comment #13
  257. * Mon Nov 12 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1
  258. - Updated specfile for comments in RHBZ#323441
  259. * Wed Jun 07 2006 Kent Yoder <kyoder@users.sf.net> - 0.2.6-1
  260. - Updated build section to use smp_mflags
  261. - Removed .la file from installed dest and files section
  262. * Tue Jun 06 2006 Kent Yoder <kyoder@users.sf.net> - 0.2.6-1
  263. - Initial add of changelog tag for trousers CVS