diff options
3 files changed, 1 insertions, 83 deletions
diff --git a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-encrypt_secret.py-switch-to-python3.patch b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-encrypt_secret.py-switch-to-python3.patch deleted file mode 100644 index 2ef8036..0000000 --- a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-encrypt_secret.py-switch-to-python3.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From 480648bd9a516fc84b02d0b83ebccf40547e5dd0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
| 3 | Date: Fri, 13 Mar 2020 20:17:46 +0800 | ||
| 4 | Subject: [PATCH] encrypt_secret.py: switch to python3 | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [https://github.com/jiazhang0/cryptfs-tpm2/pull/7] | ||
| 7 | |||
| 8 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
| 9 | --- | ||
| 10 | scripts/encrypt_secret.py.in | 3 +-- | ||
| 11 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/scripts/encrypt_secret.py.in b/scripts/encrypt_secret.py.in | ||
| 14 | index 1ddb76d..ffd3213 100755 | ||
| 15 | --- a/scripts/encrypt_secret.py.in | ||
| 16 | +++ b/scripts/encrypt_secret.py.in | ||
| 17 | @@ -1,11 +1,10 @@ | ||
| 18 | -#!/usr/bin/env python | ||
| 19 | +#!/usr/bin/env python3 | ||
| 20 | #coding: UTF-8 | ||
| 21 | |||
| 22 | ''' | ||
| 23 | The simple encryption/decryption for secret info | ||
| 24 | ''' | ||
| 25 | |||
| 26 | -from __future__ import print_function | ||
| 27 | import logging | ||
| 28 | import argparse | ||
| 29 | import struct | ||
| 30 | -- | ||
| 31 | 2.7.4 | ||
| 32 | |||
diff --git a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-lib-Makefile-set-correct-soname-for-libcryptfs-tpm2.patch b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-lib-Makefile-set-correct-soname-for-libcryptfs-tpm2.patch deleted file mode 100644 index af6a6ab..0000000 --- a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-lib-Makefile-set-correct-soname-for-libcryptfs-tpm2.patch +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | From 04b865d3af710e4116f0ff980918a984345a7ee3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
| 3 | Date: Fri, 17 Jul 2020 13:12:35 +0800 | ||
| 4 | Subject: [PATCH] lib/Makefile: set correct soname for libcryptfs-tpm2 | ||
| 5 | |||
| 6 | The current soname of libcryptfs-tpm2 is libcryptfs-tpm2.so: | ||
| 7 | $ readelf -d libcryptfs-tpm2.so.0.7.0 | grep SONAME | ||
| 8 | 0x000000000000000e (SONAME) Library soname: [libcryptfs-tpm2.so] | ||
| 9 | |||
| 10 | The libcryptfs-tpm2.so is a symbolic link of libcryptfs-tmp2.so.0.7.0 | ||
| 11 | and it is not installed by default because it is packaged to dev | ||
| 12 | package. Then we will encounter an error when run command cryptfs-tpm2: | ||
| 13 | $ cryptfs-tpm2 | ||
| 14 | cryptfs-tpm2: error while loading shared libraries: libcryptfs-tpm2.so: cannot open shared object file: No such file or directory | ||
| 15 | $ ldd cryptfs-tpm2 | grep libcryptfs-tpm2 | ||
| 16 | libcryptfs-tpm2.so => not found | ||
| 17 | |||
| 18 | Set the soname to libcryptfs-tpm2.so.$(MAJOR_VERSION) to fix the issue. | ||
| 19 | |||
| 20 | Upstream-Status: Pending | ||
| 21 | |||
| 22 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
| 23 | --- | ||
| 24 | src/lib/Makefile | 6 +++--- | ||
| 25 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 26 | |||
| 27 | diff --git a/src/lib/Makefile b/src/lib/Makefile | ||
| 28 | index 75144e7..5a61572 100644 | ||
| 29 | --- a/src/lib/Makefile | ||
| 30 | +++ b/src/lib/Makefile | ||
| 31 | @@ -40,11 +40,11 @@ install: all | ||
| 32 | $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR) | ||
| 33 | $(INSTALL) -m 755 $(LIB_NAME).a $(DESTDIR)$(LIBDIR) | ||
| 34 | $(INSTALL) -m 755 $(LIB_NAME).so $(DESTDIR)$(LIBDIR)/$(LIB_NAME).so.$(VERSION) | ||
| 35 | - $(foreach x, $(LIB_NAME).so, ln -sfn $(x).$(VERSION) $(DESTDIR)$(LIBDIR)/$(patsubst %,%.$(MAJOR_VERSION).$(MINOR_VERSION),$(x)); \ | ||
| 36 | - ln -sfn $(x).$(MAJOR_VERSION).$(MINOR_VERSION) $(DESTDIR)$(LIBDIR)/$(patsubst %,%.$(MAJOR_VERSION),$(x));) | ||
| 37 | + $(foreach x, $(LIB_NAME), ln -sfn $(x).so.$(VERSION) $(DESTDIR)$(LIBDIR)/$(patsubst %,%.so.$(MAJOR_VERSION),$(x)); \ | ||
| 38 | + ln -sfn $(x).so.$(VERSION) $(DESTDIR)$(LIBDIR)/$(patsubst %,%.so,$(x));) | ||
| 39 | |||
| 40 | $(LIB_NAME).so: $(OBJS_$(LIB_NAME)) | ||
| 41 | - $(CCLD) $^ -o $@ $(CFLAGS) -shared -Wl,-soname,$(patsubst %.$(VERSION),%,$@) | ||
| 42 | + $(CCLD) $^ -o $@ $(CFLAGS) -shared -Wl,-soname,$(patsubst %,%.$(MAJOR_VERSION),$@) | ||
| 43 | |||
| 44 | $(LIB_NAME).a: $(filter-out init.o,$(OBJS_$(LIB_NAME))) | ||
| 45 | $(AR) rcs $@ $^ | ||
| 46 | -- | ||
| 47 | 2.17.1 | ||
| 48 | |||
diff --git a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb index f80880f..6bc9f54 100644 --- a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb +++ b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb | |||
| @@ -22,14 +22,12 @@ PV = "0.7.0+git${SRCPV}" | |||
| 22 | SRC_URI = "\ | 22 | SRC_URI = "\ |
| 23 | git://github.com/jiazhang0/cryptfs-tpm2.git \ | 23 | git://github.com/jiazhang0/cryptfs-tpm2.git \ |
| 24 | file://0001-luks-setup.sh-Add-support-for-qemu-with-the-swtpm.patch \ | 24 | file://0001-luks-setup.sh-Add-support-for-qemu-with-the-swtpm.patch \ |
| 25 | file://0001-encrypt_secret.py-switch-to-python3.patch \ | ||
| 26 | file://0002-luks-setup.sh-Updated-TPM-Tools.patch \ | 25 | file://0002-luks-setup.sh-Updated-TPM-Tools.patch \ |
| 27 | file://0001-lib-Makefile-set-correct-soname-for-libcryptfs-tpm2.patch \ | ||
| 28 | file://0001-Remove-build-time-from-show_banner.patch \ | 26 | file://0001-Remove-build-time-from-show_banner.patch \ |
| 29 | file://0001-env.mk-fix-LDFLAGS-expansion.patch \ | 27 | file://0001-env.mk-fix-LDFLAGS-expansion.patch \ |
| 30 | file://0001-encrypt_secret.py-fix-for-python3.patch \ | 28 | file://0001-encrypt_secret.py-fix-for-python3.patch \ |
| 31 | " | 29 | " |
| 32 | SRCREV = "87c35c63090a33d4de437f518b8da9f2d1f1d828" | 30 | SRCREV = "62e7f4777495df4aeb0e02d3c761eea6f236f588" |
| 33 | 31 | ||
| 34 | S = "${WORKDIR}/git" | 32 | S = "${WORKDIR}/git" |
| 35 | 33 | ||
