tpm2-tss-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. %bcond_with systemd
  2. %bcond_with rc
  3. %if %{with rc}
  4. %global candidate rc2
  5. %endif
  6. Name: tpm2-tss
  7. Version: 4.1.3
  8. Release: 2%{?candidate:.%{candidate}}%{?_dist_release}
  9. Summary: TPM2.0 Software Stack
  10. Group: system
  11. Vendor: Project Vine
  12. Distribution: Vine Linux
  13. # The entire source code is under BSD except implementation.h and tpmb.h which
  14. # is under TCGL(Trusted Computing Group License).
  15. License: BSD-2-Clause
  16. URL: https://github.com/tpm2-software/tpm2-tss
  17. Source0: https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz
  18. Source1: tpm2-tss-systemd-sysusers.conf
  19. # doxygen crash
  20. Patch0: tpm2-tss-3.0.0-doxygen.patch
  21. %if %{without systemd}
  22. %define _rundir %{_localstatedir}/run
  23. %define _udevrulesdir /lib/udev/rules.d
  24. %endif
  25. %global udevrules_prefix 60-
  26. %if %{with rc}
  27. BuildRequires: autoconf
  28. BuildRequires: autoconf-archive
  29. BuildRequires: automake
  30. BuildRequires: libtool
  31. %endif
  32. BuildRequires: make
  33. BuildRequires: doxygen
  34. BuildRequires: gcc
  35. BuildRequires: gcc-c++
  36. BuildRequires: json-c-devel
  37. BuildRequires: curl-devel
  38. BuildRequires: libgcrypt-devel
  39. BuildRequires: openssl-devel
  40. BuildRequires: pkgconfig
  41. BuildRequires: libuuid-devel
  42. Requires(pre): shadow-utils
  43. %if %{with systemd}
  44. BuildRequires: systemd
  45. BuildRequires: systemd-rpm-macros
  46. %else
  47. Requires(post): acl
  48. %endif
  49. %description
  50. tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system
  51. APIs. It sits between TPM driver and applications, providing TPM2.0 specified
  52. APIs for applications to access TPM module through kernel TPM drivers.
  53. %package fapi
  54. Summary: High-level TPM2.0 Software Stack
  55. Requires: %{name}%{_isa} = %{version}-%{release}
  56. Group: system
  57. %description fapi
  58. tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system
  59. APIs. It sits between TPM driver and applications, providing TPM2.0 specified
  60. APIs for applications to access TPM module through kernel TPM drivers.
  61. This package provides the high-level "Feature API" library.
  62. %package devel
  63. Summary: Headers and libraries for building apps that use tpm2-tss
  64. Group: programming
  65. Requires: %{name}%{_isa} = %{version}-%{release}
  66. Requires: %{name}-fapi%{_isa} = %{version}-%{release}
  67. %description devel
  68. This package contains headers and libraries required to build applications that
  69. use tpm2-tss.
  70. %debug_package
  71. %prep
  72. %autosetup -n %{name}-%{version}%{?candidate:-%{candidate}} -p1
  73. %build
  74. # Use built-in tpm-udev.rules, with specified installation path and prefix.
  75. %configure \
  76. --disable-static \
  77. --disable-silent-rules \
  78. --with-udevrulesdir=%{_udevrulesdir} \
  79. --with-udevrulesprefix=%{udevrules_prefix} \
  80. --with-runstatedir=%{_rundir} \
  81. %if %{with systemd}
  82. --with-tmpfilesdir=%{_tmpfilesdir} \
  83. --with-sysusersdir=%{_sysusersdir} \
  84. %endif
  85. %{nil}
  86. # This is to fix Rpath errors. Taken from https://fedoraproject.org/wiki/Packaging:Guidelines#Removing_Rpath
  87. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  88. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  89. %make_build
  90. %install
  91. %make_install
  92. find %{buildroot}%{_libdir} -type f -name \*.la -delete
  93. %if %{with systemd}
  94. rm %{buildroot}%{_sysusersdir}/tpm2-tss.conf
  95. install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/tpm2-tss.conf
  96. %else
  97. mkdir -p %{buildroot}%{_localstatedir}/lib/tpm2-tss/system/keystore
  98. mkdir -p %{buildroot}%{_rundir}/tpm2-tss/eventlog
  99. %endif
  100. %pre
  101. %if %{with systemd}
  102. %sysusers_create_compat %{SOURCE1}
  103. %else
  104. getent group tss >/dev/null || groupadd -f -g 59 -r tss || :
  105. if ! getent passwd tss >/dev/null; then
  106. if ! getent passwd 59 >/dev/null; then
  107. useradd -r -u 59 -g tss -d / -s /sbin/nologin -c "Account used for TPM access" tss || :
  108. else
  109. useradd -r -g tss -d / -s /sbin/nologin -c "Account used for TPM access" tss || :
  110. fi
  111. fi
  112. %endif
  113. exit 0
  114. %if %{without systemd}
  115. %post fapi
  116. setfacl -m default:group:tss:rwx %{_localstatedir}/lib/tpm2-tss/system/keystore
  117. setfacl -m default:group:tss:rwx %{_rundir}/tpm2-tss/eventlog
  118. exit 0
  119. %endif
  120. %files
  121. %doc README.md CHANGELOG.md
  122. %license LICENSE
  123. %{_sysconfdir}/tpm2-tss/
  124. %{_libdir}/libtss2-mu.so.0*
  125. %{_libdir}/libtss2-sys.so.1*
  126. %{_libdir}/libtss2-esys.so.0*
  127. %{_libdir}/libtss2-policy.so.0*
  128. %{_libdir}/libtss2-rc.so.0*
  129. %{_libdir}/libtss2-tctildr.so.0*
  130. %{_libdir}/libtss2-tcti-cmd.so.0*
  131. %{_libdir}/libtss2-tcti-device.so.0*
  132. %{_libdir}/libtss2-tcti-mssim.so.0*
  133. %{_libdir}/libtss2-tcti-pcap.so.0*
  134. %{_libdir}/libtss2-tcti-i2c-helper.so.0*
  135. %{_libdir}/libtss2-tcti-spidev.so.0*
  136. %{_libdir}/libtss2-tcti-spi-helper.so.0*
  137. %{_libdir}/libtss2-tcti-swtpm.so.0*
  138. %if %{with systemd}
  139. %{_sysusersdir}/tpm2-tss.conf
  140. %endif
  141. %{_udevrulesdir}/%{udevrules_prefix}tpm-udev.rules
  142. %files fapi
  143. %{_libdir}/libtss2-fapi.so.1*
  144. %if %{with systemd}
  145. %{_tmpfilesdir}/tpm2-tss-fapi.conf
  146. %else
  147. %dir %{_localstatedir}/lib/tpm2-tss
  148. %dir %{_localstatedir}/lib/tpm2-tss/system
  149. %attr(2775,tss,tss) %dir %{_localstatedir}/lib/tpm2-tss/system/keystore
  150. %dir %{_rundir}/tpm2-tss
  151. %attr(2775,tss,tss) %dir %{_rundir}/tpm2-tss/eventlog
  152. %endif
  153. %files devel
  154. %{_includedir}/tss2/
  155. %{_libdir}/libtss2-mu.so
  156. %{_libdir}/libtss2-sys.so
  157. %{_libdir}/libtss2-esys.so
  158. %{_libdir}/libtss2-fapi.so
  159. %{_libdir}/libtss2-policy.so
  160. %{_libdir}/libtss2-rc.so
  161. %{_libdir}/libtss2-tctildr.so
  162. %{_libdir}/libtss2-tcti-cmd.so
  163. %{_libdir}/libtss2-tcti-device.so
  164. %{_libdir}/libtss2-tcti-mssim.so
  165. %{_libdir}/libtss2-tcti-pcap.so
  166. %{_libdir}/libtss2-tcti-i2c-helper.so
  167. %{_libdir}/libtss2-tcti-spidev.so
  168. %{_libdir}/libtss2-tcti-spi-helper.so
  169. %{_libdir}/libtss2-tcti-swtpm.so
  170. %{_libdir}/pkgconfig/tss2-mu.pc
  171. %{_libdir}/pkgconfig/tss2-sys.pc
  172. %{_libdir}/pkgconfig/tss2-esys.pc
  173. %{_libdir}/pkgconfig/tss2-fapi.pc
  174. %{_libdir}/pkgconfig/tss2-policy.pc
  175. %{_libdir}/pkgconfig/tss2-rc.pc
  176. %{_libdir}/pkgconfig/tss2-tctildr.pc
  177. %{_libdir}/pkgconfig/tss2-tcti-cmd.pc
  178. %{_libdir}/pkgconfig/tss2-tcti-device.pc
  179. %{_libdir}/pkgconfig/tss2-tcti-mssim.pc
  180. %{_libdir}/pkgconfig/tss2-tcti-pcap.pc
  181. %{_libdir}/pkgconfig/tss2-tcti-i2c-helper.pc
  182. %{_libdir}/pkgconfig/tss2-tcti-spidev.pc
  183. %{_libdir}/pkgconfig/tss2-tcti-spi-helper.pc
  184. %{_libdir}/pkgconfig/tss2-tcti-swtpm.pc
  185. %{_mandir}/man3/*.3.gz
  186. %{_mandir}/man5/*.5.gz
  187. %{_mandir}/man7/tss2*.7.gz
  188. %changelog
  189. * Sat Jun 29 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.1.3-2
  190. - initial build for Vine Linux.
  191. * Tue May 21 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 4.1.3-1
  192. - Update to 4.1.3
  193. * Wed May 08 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 4.1.1-1
  194. - Update to 4.1.1
  195. * Sat Apr 27 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 4.1.0-1
  196. - Update to 4.1.0
  197. * Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-7
  198. - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
  199. * Sat Dec 2 2023 Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl> - 4.0.1-6
  200. - Split out fapi subpackage
  201. Resolves: rhbz#2252535
  202. * Tue Sep 26 2023 Štěpán Horáček <shoracek@redhat.com> - 4.0.1-5
  203. - Migrate license to SPDX
  204. * Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-4
  205. - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
  206. * Wed Jan 25 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 4.0.1-3
  207. - Update to 4.0.1 - fixes CVE-2023-22745
  208. * Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-2
  209. - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
  210. * Wed Jan 04 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 4.0.0-1
  211. - Update to 4.0.0
  212. * Mon Dec 19 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 4.0.0-0.1.rc2
  213. - Update to 4.0.0 RC2
  214. * Mon Dec 19 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 3.2.1-1
  215. - Update to 3.2.1
  216. * Wed Jul 27 2022 Luca BRUNO <lucab@lucabruno.net> - 3.2.0-3
  217. - Align sysusers.d configuration to Fedora user/group allocation
  218. Resolves: rhbz#2103683
  219. * Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-2
  220. - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
  221. * Sat Feb 19 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 3.2.0-1
  222. - Update to 3.2.0
  223. * Fri Feb 18 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 3.2.0-0.5.rc3
  224. - Update to 3.2.0-rc3
  225. * Mon Feb 14 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 3.2.0-0.4.rc1
  226. - Update to 3.2.0-rc1
  227. * Tue Feb 08 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 3.2.0-0.3.rc0
  228. - Add conditionals for RC builds
  229. * Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-0.2.rc0
  230. - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
  231. * Fri Jan 14 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 3.2.0-0.1.rc0
  232. - Update to 3.2.0-rc0 (fixes rhbz#2008179)
  233. * Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 3.1.0-4
  234. - Rebuilt with OpenSSL 3.0.0
  235. * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-3
  236. - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
  237. * Sat Jul 10 2021 Björn Esser <besser82@fedoraproject.org> - 3.1.0-2
  238. - Rebuild for versioned symbols in json-c
  239. * Mon May 17 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 3.1.0-1
  240. - Update to 3.1.0
  241. * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
  242. - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
  243. * Thu Nov 26 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.3-1
  244. - Update to 3.0.2
  245. * Sun Nov 22 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.2-1
  246. - Update to 3.0.2
  247. * Wed Sep 23 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.1-1
  248. - Update to 3.0.1
  249. * Tue Sep 15 2020 Than Ngo <than@redhat.com> - 3.0.0-4
  250. - Fix doxygen crash
  251. * Tue Sep 15 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.0-3
  252. - Create tss user, if it doesn't exist, for userspace TPM access
  253. * Fri Aug 07 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.0-2
  254. - Install sysusers config in sysusersdir (rhbz #1834519)
  255. * Wed Aug 05 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.0-1
  256. - Update to 3.0.0
  257. * Wed Aug 05 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2.4.2-1
  258. - Update to 2.4.2
  259. * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-2
  260. - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
  261. * Thu May 14 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2.4.1-1
  262. - Update to 2.4.1
  263. * Fri May 08 2020 Paul Wouters <pwouters@redhat.com> - 2.4.0-3
  264. - Use proper rundir and tmpfiles macros so proper directories are used
  265. * Tue Apr 21 2020 Björn Esser <besser82@fedoraproject.org> - 2.4.0-2
  266. - Rebuild (json-c)
  267. * Thu Mar 12 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2.4.0-1
  268. - Update to 2.4.0 release
  269. * Mon Feb 24 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2.3.3-1
  270. - Update to 2.3.3 release
  271. * Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-2
  272. - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
  273. * Fri Dec 13 2019 Yunying Sun <yunying.sun@intel.com> - 2.3.2-1
  274. - Update to 2.3.2 release
  275. * Fri Sep 6 2019 Yunying Sun <yunying.sun@intel.com> - 2.3.1-1
  276. - Update to 2.3.1 release
  277. * Thu Aug 15 2019 Yunying Sun <yunying.sun@intel.com> - 2.3.0-1
  278. - Update to 2.3.0 release
  279. * Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-2
  280. - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
  281. * Wed May 29 2019 Yunying Sun <yunying.sun@intel.com> - 2.2.3-1
  282. - Update to 2.2.3 release
  283. * Fri Mar 29 2019 Yunying Sun <yunying.sun@intel.com> - 2.2.2-1
  284. - Update to 2.2.2 release
  285. * Mon Mar 4 2019 Peter Robinson <pbrobinson@fedoraproject.org> 2.2.1-1
  286. - Update to 2.2.1 release
  287. * Wed Feb 06 2019 Javier Martinez Canillas <javierm@redhat.com> - 2.2.0-1
  288. - Update to 2.2.0 release
  289. * Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
  290. - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
  291. * Wed Oct 10 2018 Yunying Sun <yunying.sun@intel.com> - 2.1.0-1
  292. - Update to 2.1.0 release
  293. * Thu Aug 30 2018 Yunying Sun <yunying.sun@intel.com> - 2.0.1-1
  294. - Update to 2.0.1 release
  295. * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-3
  296. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  297. * Wed Jul 4 2018 Yunying Sun <yunying.sun@intel.com> - 2.0.0-2
  298. - Re-enable ESAPI since gcrypt dependency is not an issue for Fedora
  299. - Bump release version to 2.0.0-2
  300. * Mon Jul 2 2018 Yunying Sun <yunying.sun@intel.com> - 2.0.0-1
  301. - Update to 2.0.0 release (RHBZ#1508870)
  302. - Remove patch file 60-tpm-udev.rules, use upstream tpm-udev.rules instead
  303. - Disable ESAPI to fix build errors caused by dependency to libgcrypt 1.6.0
  304. - Add scriptlet to fix Rpath errors
  305. - Update file installation paths and names accordingly
  306. * Sun Mar 04 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.4.0-1
  307. - Update URLs to point to the new project location
  308. - Add README.md CHANGELOG.md to %%files directive
  309. - Update to 1.4.0 release (RHBZ#1508870)
  310. * Fri Feb 23 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-4
  311. - Install udev rule for TPM character devices
  312. * Wed Feb 21 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-3
  313. - Remove ExclusiveArch: %%{ix86} x86_64 directive
  314. * Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.0-2
  315. - Escape macros in %%changelog
  316. * Fri Dec 08 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-1
  317. - Update to 1.3.0 release
  318. * Wed Nov 29 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-0.1.rc2
  319. - Update to 1.3.0 release candidate 2 (RHBZ#1508870)
  320. - Remove global pkg_prefix since now the upstream repo and package names match
  321. - Update URLs to point to the new project location
  322. - Remove -Wno-int-in-bool-context compiler flag since now upstream takes care
  323. - Remove %%doc directive since README.md and CHANGELOG.md are not in the tarball
  324. - Add patch to include a LICENSE since the generated tarball does not have it
  325. * Mon Aug 28 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.2.0-1
  326. - Update to 1.2.0 release
  327. - Use tpm2-tss instead of TPM2.0-TSS as prefix since project name changed
  328. - Fix SPEC file access mode
  329. - Include new man pages in %%files directive
  330. * Fri Aug 18 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.1.0-3
  331. - Remove unneeded source tarballs (RHBZ#1482828)
  332. * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
  333. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  334. * Wed Jul 26 2017 Sun Yunying <yunying.sun@intel.com> - 1.1.0-1
  335. - Update to 1.1.0 release
  336. * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-3
  337. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
  338. * Mon Dec 12 2016 Sun Yunying <yunying.sun@intel.com> - 1.0-2
  339. - Remove global macro pkg_version to avoid duplicate of version
  340. - Use ExclusiveArch instead of ExcludeArch
  341. - Use less wildcard in %%files section to be more specific
  342. - Add trailing slash at end of added directory in %%file section
  343. - Remove autoconf/automake/pkgconfig(cmocka) from BuildRequires
  344. - Increase release version to 2
  345. * Fri Dec 2 2016 Sun Yunying <yunying.sun@intel.com> - 1.0-1
  346. - Initial version of the package