File tree 10 files changed +140
-0
lines changed 10 files changed +140
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/bash
2
+ #
3
+ # {{{ CDDL HEADER
4
+ #
5
+ # This file and its contents are supplied under the terms of the
6
+ # Common Development and Distribution License ("CDDL"), version 1.0.
7
+ # You may only use this file in accordance with the terms of version
8
+ # 1.0 of the CDDL.
9
+ #
10
+ # A full copy of the text of the CDDL should have accompanied this
11
+ # source. A copy of the CDDL is also available via the Internet at
12
+ # http://www.illumos.org/license/CDDL.
13
+ # }}}
14
+
15
+ # Copyright 2024 OmniOS Community Edition (OmniOSce) Association.
16
+
17
+ . ../../lib/build.sh
18
+
19
+ PROG=libtpms
20
+ VER=0.10.0
21
+ PKG=ooce/library/libtpms
22
+ SUMMARY=" $PROG "
23
+ DESC=" $PROG - library that targets the integration of TPM functionality "
24
+ DESC+=" into hypervisors"
25
+
26
+ set_clangver
27
+
28
+ export MAKE
29
+
30
+ CONFIGURE_OPTS="
31
+ --disable-static
32
+ "
33
+
34
+ init
35
+ download_source $PROG v$VER
36
+ patch_source
37
+ prep_build autoconf -autoreconf
38
+ build
39
+ make_package
40
+ clean_up
41
+
42
+ # Vim hints
43
+ # vim:ts=4:sw=4:et:fdm=marker
Original file line number Diff line number Diff line change
1
+ ACTCommands.c
2
+ DebugHelpers.c
3
+ tpm_error.c
4
+ tpm_maint.c
5
+ TpmMath_Debug.c
6
+ TpmSizeChecks.c
7
+ Unique.c
8
+ Vendor_TCG_Test.c
Original file line number Diff line number Diff line change
1
+ #
2
+ # This file and its contents are supplied under the terms of the
3
+ # Common Development and Distribution License ("CDDL"), version 1.0.
4
+ # You may only use this file in accordance with the terms of version
5
+ # 1.0 of the CDDL.
6
+ #
7
+ # A full copy of the text of the CDDL should have accompanied this
8
+ # source. A copy of the CDDL is also available via the Internet at
9
+ # http://www.illumos.org/license/CDDL.
10
+
11
+ # Copyright 2024 OmniOS Community Edition (OmniOSce) Association.
12
+
13
+ license LICENSE license=modified-BSD
14
+
15
+ <transform path=.*\.la$ -> drop>
16
+
Original file line number Diff line number Diff line change
1
+ see: https://www.illumos.org/issues/16151 and https://www.illumos.org/issues/16505
2
+
3
+ diff -wpruN --no-dereference '--exclude=*.orig' a~/src/tpm_library.c a/src/tpm_library.c
4
+ --- a~/src/tpm_library.c 1970-01-01 00:00:00
5
+ +++ a/src/tpm_library.c 1970-01-01 00:00:00
6
+ @@ -102,6 +102,36 @@ static struct sized_buffer cached_blobs[
7
+ static int tpmvers_choice = 0; /* default is TPM1.2 */
8
+ static TPM_BOOL tpmvers_locked = FALSE;
9
+
10
+ + #ifdef __illumos__
11
+ + static int vdprintf(int fd, const char *fmt, va_list ap)
12
+ + {
13
+ + FILE *fp;
14
+ + int ret;
15
+ +
16
+ + fp = fdopen(fd, "w");
17
+ + if (fp == NULL)
18
+ + return (EOF);
19
+ +
20
+ + ret = vfprintf(fp, fmt, ap);
21
+ +
22
+ + (void) fclose(fp);
23
+ +
24
+ + return (ret);
25
+ + }
26
+ +
27
+ + static int dprintf(int fd, const char *fmt, ...)
28
+ + {
29
+ + va_list va;
30
+ + int ret;
31
+ +
32
+ + va_start(va, fmt);
33
+ + ret = vdprintf(fd, fmt, va);
34
+ + va_end(va);
35
+ +
36
+ + return (ret);
37
+ + }
38
+ + #endif /* __illumos__ */
39
+ +
40
+ uint32_t TPMLIB_GetVersion(void)
41
+ {
42
+ return TPM_LIBRARY_VERSION;
Original file line number Diff line number Diff line change
1
+ diff -wpruN --no-dereference '--exclude=*.orig' a~/src/tpm2/RuntimeProfile.c a/src/tpm2/RuntimeProfile.c
2
+ --- a~/src/tpm2/RuntimeProfile.c 1970-01-01 00:00:00
3
+ +++ a/src/tpm2/RuntimeProfile.c 1970-01-01 00:00:00
4
+ @@ -45,6 +45,9 @@
5
+ #include <stdio.h>
6
+ #include <regex.h>
7
+ #include <limits.h>
8
+ + #ifdef __illumos__
9
+ + #include <strings.h>
10
+ + #endif
11
+
12
+ #include "Tpm.h"
13
+ #include "tpm_library_intern.h"
14
+ diff -wpruN --no-dereference '--exclude=*.orig' a~/src/tpm2/TpmProfile_Common.h a/src/tpm2/TpmProfile_Common.h
15
+ --- a~/src/tpm2/TpmProfile_Common.h 1970-01-01 00:00:00
16
+ +++ a/src/tpm2/TpmProfile_Common.h 1970-01-01 00:00:00
17
+ @@ -89,7 +89,7 @@
18
+ #else
19
+ # include <endian.h>
20
+ #endif
21
+ - #if defined __linux__ || defined __CYGWIN__
22
+ + #if defined __linux__ || defined __CYGWIN__ || defined __illumos__
23
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
24
+ #define BIG_ENDIAN_TPM NO
25
+ #endif
Original file line number Diff line number Diff line change
1
+ illumos.patch
2
+ dprintf.patch
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ extra.omnios ooce/library/libpciaccess
160
160
extra.omnios ooce/library/libpng
161
161
extra.omnios ooce/library/libsodium
162
162
extra.omnios ooce/library/libtasn1
163
+ extra.omnios ooce/library/libtpms
163
164
extra.omnios ooce/library/liburcu
164
165
extra.omnios ooce/library/libusb-1
165
166
extra.omnios ooce/library/libuv
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ extra.omnios ooce/library/libogg
43
43
extra.omnios ooce/library/libpng
44
44
extra.omnios ooce/library/libsodium
45
45
extra.omnios ooce/library/libtasn1
46
+ extra.omnios ooce/library/libtpms
46
47
extra.omnios ooce/library/liburcu
47
48
extra.omnios ooce/library/libuv
48
49
extra.omnios ooce/library/libvncserver
Original file line number Diff line number Diff line change 131
131
| ooce/library/libpng | 1.6.44 | http://www.libpng.org/pub/png/libpng.html | [ omniosorg] ( https://github.com/omniosorg )
132
132
| ooce/library/libsodium | 1.0.20 | https://github.com/jedisct1/libsodium/releases | [ omniosorg] ( https://github.com/omniosorg )
133
133
| ooce/library/libtasn1 | 4.19.0 | https://ftp.gnu.org/gnu/libtasn1/ | [ omniosorg] ( https://github.com/omniosorg )
134
+ | ooce/library/libtpms | 0.10.0 | https://github.com/stefanberger/libtpms/releases | [ omniosorg] ( https://github.com/omniosorg )
134
135
| ooce/library/liburcu | 0.14.0 | https://lttng.org/files/urcu/?O=D | [ omniosorg] ( https://github.com/omniosorg )
135
136
| ooce/library/libusb-1 | 1.0.27 | https://github.com/libusb/libusb/releases | [ omniosorg] ( https://github.com/omniosorg )
136
137
| ooce/library/libuv | 1.48.0 | https://github.com/libuv/libuv/releases | [ omniosorg] ( https://github.com/omniosorg )
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ ooce/application/tig
83
83
ooce/developer/cunit
84
84
ooce/library/libtasn1
85
85
ooce/library/unistring
86
+ ooce/library/libtpms
86
87
###############################################################################
87
88
.SYSROOT
88
89
ooce/audio/flac
You can’t perform that action at this time.
0 commit comments