1 | # --- libtpm rpm-spec ---
|
---|
2 |
|
---|
3 | %define name libtpms
|
---|
4 | %define version 0.9.6
|
---|
5 | %define release 1
|
---|
6 |
|
---|
7 | # Valid crypto subsystems are 'freebl' and 'openssl'
|
---|
8 | %if "%{?crypto_subsystem}" == ""
|
---|
9 | %define crypto_subsystem openssl
|
---|
10 | %endif
|
---|
11 |
|
---|
12 | # Valid build types are 'production' or 'debug'
|
---|
13 | %define build_type production
|
---|
14 |
|
---|
15 | Summary: Library providing Trusted Platform Module (TPM) functionality
|
---|
16 | Name: %{name}
|
---|
17 | Version: %{version}
|
---|
18 | Release: %{release}%{?dist}
|
---|
19 | License: BSD
|
---|
20 | Group: Development/Libraries
|
---|
21 | Url: http://github.com/stefanberger/libtpms
|
---|
22 | Source: libtpms-%{version}.tar.gz
|
---|
23 | Provides: libtpms-%{crypto_subsystem} = %{version}-%{release}
|
---|
24 |
|
---|
25 | %if "%{crypto_subsystem}" == "openssl"
|
---|
26 | BuildRequires: openssl-devel
|
---|
27 | %else
|
---|
28 | BuildRequires: nss-devel >= 3.12.9-2
|
---|
29 | BuildRequires: nss-softokn-freebl-devel >= 3.12.9-2
|
---|
30 | %if 0%{?rhel} > 6 || 0%{?fedora} >= 13
|
---|
31 | BuildRequires: nss-softokn-freebl-static >= 3.12.9-2
|
---|
32 | %endif
|
---|
33 | BuildRequires: nss-softokn-devel >= 3.12.9-2, gmp-devel
|
---|
34 | %endif
|
---|
35 | BuildRequires: pkgconfig gawk sed
|
---|
36 | BuildRequires: automake autoconf libtool bash coreutils gcc-c++
|
---|
37 |
|
---|
38 | %if "%{crypto_subsystem}" == "openssl"
|
---|
39 | Requires: openssl
|
---|
40 | %else
|
---|
41 | Requires: nss-softokn-freebl >= 3.12.9-2, nss-softokn >= 3.12.9-2
|
---|
42 | %endif
|
---|
43 | Requires: gmp
|
---|
44 |
|
---|
45 | %description
|
---|
46 | A library providing TPM functionality for VMs. Targeted for integration
|
---|
47 | into Qemu.
|
---|
48 |
|
---|
49 | %package devel
|
---|
50 | Summary: Include files for libtpms
|
---|
51 | Group: Development/Libraries
|
---|
52 | Requires: %{name}%{?_isa} = %{version}-%{release}
|
---|
53 |
|
---|
54 | %description devel
|
---|
55 | Libtpms header files and documentation.
|
---|
56 |
|
---|
57 | %files
|
---|
58 | %defattr(-, root, root, -)
|
---|
59 | %{_libdir}/%{name}.so.%{version}
|
---|
60 | %{_libdir}/%{name}.so.0
|
---|
61 | %doc LICENSE README CHANGES
|
---|
62 |
|
---|
63 | %files devel
|
---|
64 | %defattr(-, root, root, -)
|
---|
65 |
|
---|
66 | %{_libdir}/%{name}.so
|
---|
67 | %dir %{_includedir}/%{name}
|
---|
68 | %attr(644, root, root) %{_libdir}/pkgconfig/*.pc
|
---|
69 | %attr(644, root, root) %{_includedir}/%{name}/*.h
|
---|
70 | %attr(644, root, root) %{_mandir}/man3/*
|
---|
71 |
|
---|
72 | %prep
|
---|
73 | %setup -q
|
---|
74 |
|
---|
75 | %build
|
---|
76 |
|
---|
77 | %if "%{crypto_subsystem}" == "openssl"
|
---|
78 | %define _with_openssl --with-openssl
|
---|
79 | %endif
|
---|
80 |
|
---|
81 | %if "%{build_type}" == "debug"
|
---|
82 | %define _enable_debug --enable-debug
|
---|
83 | %endif
|
---|
84 |
|
---|
85 | %if "%{build_type}" == "debug"
|
---|
86 | CFLAGS=-O0
|
---|
87 | %endif
|
---|
88 | ./autogen.sh \
|
---|
89 | --with-tpm2 \
|
---|
90 | --disable-static \
|
---|
91 | --prefix=/usr \
|
---|
92 | --libdir=%{_libdir} \
|
---|
93 | %{?_with_openssl} \
|
---|
94 | %{?_enable_debug}
|
---|
95 |
|
---|
96 | make %{?_smp_mflags}
|
---|
97 |
|
---|
98 | %check
|
---|
99 | make check
|
---|
100 |
|
---|
101 | %install
|
---|
102 | install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}
|
---|
103 | install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/libtpms
|
---|
104 | install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man3
|
---|
105 |
|
---|
106 | make %{?_smp_mflags} install DESTDIR=${RPM_BUILD_ROOT}
|
---|
107 |
|
---|
108 | rm -f $RPM_BUILD_ROOT%{_libdir}/libtpms.la
|
---|
109 |
|
---|
110 | %post -p /sbin/ldconfig
|
---|
111 |
|
---|
112 | %postun -p /sbin/ldconfig
|
---|
113 |
|
---|
114 | %changelog
|
---|
115 | * Tue Feb 28 2023 Stefan Berger - 0.9.6-1
|
---|
116 | - tpm2: Check size of buffer before accessing it (CVE-2023-1017 & -1018)
|
---|
117 |
|
---|
118 | * Fri Jul 01 2022 Stefan Berger - 0.9.5-1
|
---|
119 | - Release of version 0.9.5
|
---|
120 |
|
---|
121 | * Mon Apr 25 2022 Stefan Berger - 0.9.4-1
|
---|
122 | - Release of version 0.9.4
|
---|
123 |
|
---|
124 | * Mon Mar 07 2022 Stefan Berger - 0.9.3-1
|
---|
125 | - Release of version 0.9.3
|
---|
126 |
|
---|
127 | * Thu Jan 06 2022 Stefan Berger - 0.9.2-1
|
---|
128 | - Release of version 0.9.2
|
---|
129 |
|
---|
130 | * Wed Nov 24 2021 Stefan Berger - 0.9.1-1
|
---|
131 | - Release of version 0.9.1
|
---|
132 |
|
---|
133 | * Wed Sep 29 2021 Stefan Berger - 0.9.0-1
|
---|
134 | - Release of version 0.9.0 (rev. 164)
|
---|
135 |
|
---|
136 | * Wed Feb 24 2021 Stefan Berger - 0.8.0-1
|
---|
137 | - Release of version 0.8.0 (rev. 162)
|
---|
138 |
|
---|
139 | * Fri Jul 19 2019 Stefan Berger - 0.7.0-1
|
---|
140 | - Release of version 0.7.0 (rev. 150)
|
---|
141 |
|
---|
142 | * Mon Jan 14 2018 Stefan Berger - 0.6.0-1
|
---|
143 | - Release of version 0.6.0 with TPM 2.0 support
|
---|
144 |
|
---|
145 | * Mon Jun 30 2014 Stefan Berger - 0.5.2-1
|
---|
146 | - Updated to version 0.5.2
|
---|
147 | - coverity fixes
|
---|
148 | - fixes for ARM64 using __aarch64__
|
---|
149 |
|
---|
150 | * Sat Jun 07 2014 Fedora Release Engineering <[email protected]> - 0.5.1-20.1
|
---|
151 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
---|
152 |
|
---|
153 | * Sat Aug 03 2013 Fedora Release Engineering <[email protected]> - 0.5.1-19
|
---|
154 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
---|
155 |
|
---|
156 | * Mon Mar 25 2013 Stefan Berger - 0.5.1-18
|
---|
157 | - Ran autoreconf for support of aarch64
|
---|
158 | - Checking for __arm64__ in code
|
---|
159 |
|
---|
160 | * Thu Feb 14 2013 Fedora Release Engineering <[email protected]> - 0.5.1-17
|
---|
161 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
---|
162 |
|
---|
163 | * Thu Jul 19 2012 Fedora Release Engineering <[email protected]> - 0.5.1-16
|
---|
164 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
---|
165 |
|
---|
166 | * Fri Feb 17 2012 Peter Robinson <[email protected]> - 0.5.1-15
|
---|
167 | - Add dist tag as required by package guidelines
|
---|
168 |
|
---|
169 | * Fri Jan 27 2012 Stefan Berger - 0.5.1-14
|
---|
170 | - fix gcc-4.7 compilation problem
|
---|
171 |
|
---|
172 | * Fri Jan 13 2012 Fedora Release Engineering <[email protected]> - 0.5.1-13
|
---|
173 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
---|
174 |
|
---|
175 | * Tue Dec 20 2011 Dan Horák <dan[at]danny.cz> - 0.5.1-12
|
---|
176 | - fix build on secondary arches
|
---|
177 |
|
---|
178 | * Wed Nov 2 2011 Stefan Berger - 0.5.1-11
|
---|
179 | - added (lib)gmp as runtime dependency
|
---|
180 |
|
---|
181 | * Sat Oct 8 2011 Stefan Berger - 0.5.1-10
|
---|
182 | - internal fixes; callback fixes
|
---|
183 |
|
---|
184 | * Tue Aug 30 2011 Stefan Berger - 0.5.1-9
|
---|
185 | - new directory structure and build process
|
---|
186 |
|
---|
187 | * Tue Jul 12 2011 Stefan Berger - 0.5.1-8
|
---|
188 | - added pkgconfig as build dependency
|
---|
189 | - enabling __powerpc__ build following Bz 728220
|
---|
190 |
|
---|
191 | * Wed May 25 2011 Stefan Berger - 0.5.1-7
|
---|
192 | - increasing NVRAM area space to have enough room for certificates
|
---|
193 |
|
---|
194 | * Wed May 25 2011 Stefan Berger - 0.5.1-6
|
---|
195 | - adding libtpms.pc pkg-config file
|
---|
196 |
|
---|
197 | * Wed Apr 13 2011 Stefan Berger - 0.5.1-5
|
---|
198 | - adding BuildRequires for nss-softokn-freebl-static
|
---|
199 | - several libtpms-internal changes around state serialization and
|
---|
200 | deserialization
|
---|
201 | - fixes to libtpms makefile (makefile-libtpms)
|
---|
202 | - adding build_type to generate a debug or production build
|
---|
203 | - need nss-devel to have nss-config
|
---|
204 |
|
---|
205 | * Tue Mar 08 2011 Stefan Berger - 0.5.1-4
|
---|
206 | - small fixes to libtpms makefile
|
---|
207 |
|
---|
208 | * Fri Feb 25 2011 Stefan Berger - 0.5.1-3
|
---|
209 | - removing release from tar ball name
|
---|
210 | - Use {?_smp_mflags} for make rather than hardcoding it
|
---|
211 | - Fixing post and postun scripts; removing the scripts for devel package
|
---|
212 | - Fixing usage of defattr
|
---|
213 | - Adding version information into the changelog headers and spaces between the changelog entries
|
---|
214 | - Adding LICENSE, README and CHANGELOG file into tar ball and main rpm
|
---|
215 | - Removing clean section
|
---|
216 | - removed command to clean the build root
|
---|
217 | - adding library version to the libraries required for building and during
|
---|
218 | runtime
|
---|
219 | - Extended Requires in devel package with {?_isa}
|
---|
220 |
|
---|
221 | * Fri Feb 18 2011 Stefan Berger - 0.5.1-2
|
---|
222 | - make rpmlint happy by replacing tabs with spaces
|
---|
223 | - providing a valid URL for the tgz file
|
---|
224 | - release is now 2 -> 0.5.1-2
|
---|
225 |
|
---|
226 | * Mon Jan 17 2011 Stefan Berger - 0.5.1-1
|
---|
227 | - Update version to 0.5.1
|
---|
228 |
|
---|
229 | * Fri Jan 14 2011 Stefan Berger - 0.5.0-1
|
---|
230 | - Changes following Fedora review comments
|
---|
231 |
|
---|
232 | * Thu Dec 2 2010 Stefan Berger
|
---|
233 | - Small tweaks after reading the FedoreCore packaging requirements
|
---|
234 |
|
---|
235 | * Tue Nov 16 2010 Stefan Berger
|
---|
236 | - Created initial version of rpm spec files
|
---|
237 | - Version of library is now 0.5.0
|
---|
238 | - Debuginfo rpm is built but empty -- seems to be a known problem
|
---|
239 | Check https://bugzilla.redhat.com/show_bug.cgi?id=209316
|
---|