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