From d1e09e229d31c6ccf15e4b42839a980b8701fb3d Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Sun, 3 May 2020 13:05:31 -0400 Subject: [PATCH] gpg toolstack: Upgrade toolstack in an attempt to fix #710 (gawk error fixed upstream). Goal of this is to show that x230 board will die if we do not resolve #590, or move along with #703. --- .circleci/config.yml | 53 ++++-- config/coreboot-x230.config | 4 +- modules/gpg2 | 5 +- modules/libassuan | 4 +- modules/libgcrypt | 4 +- modules/libgpg-error | 4 +- modules/pinentry | 8 +- .../{gpg2-2.2.10.patch => gpg2-2.2.20.patch} | 0 ...suan-2.5.1.patch => libassuan-2.5.3.patch} | 0 ...rypt-1.8.3.patch => libgcrypt-1.8.5.patch} | 0 patches/libgpg-error-1.32.patch | 157 ++++++++++++++++++ 11 files changed, 217 insertions(+), 22 deletions(-) rename patches/{gpg2-2.2.10.patch => gpg2-2.2.20.patch} (100%) rename patches/{libassuan-2.5.1.patch => libassuan-2.5.3.patch} (100%) rename patches/{libgcrypt-1.8.3.patch => libgcrypt-1.8.5.patch} (100%) create mode 100644 patches/libgpg-error-1.32.patch diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d4ff24f4..6da031e8b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,14 +2,22 @@ version: 2 jobs: build: docker: - - image: osresearch/musl-cross:38e52db + - image: ubuntu:18.04 steps: + - run: + name: Install dependencies + command: | + apt update + apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg iasl m4 nasm patch python wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev - checkout + - restore_cache: + key: heads-{{ .Branch }}{{ .Environment.CACHE_VERSION }} + - run: - name: Bootstrap make + name: git reset command: | - make -j4 bootstrap + git reset --hard "$CIRCLE_SHA1" \ # linuxboot steps need something to pass in the kernel header path # skipping for now @@ -40,11 +48,14 @@ jobs: - run: name: qemu-coreboot command: | - ./build/make-4.2.1/make \ - CROSS=/cross/bin/x86_64-linux-musl- \ - --load 2 \ + rm -rf build/make-4.2.1/ build/qemu-coreboot/* && make --load 2 \ V=1 \ BOARD=qemu-coreboot \ + no_output_timeout: 3h + - run: + name: Output qemu-coreboot hashes + command: | + cat build/qemu-coreboot/hashes.txt \ - store-artifacts: path: build/qemu-coreboot/coreboot.rom @@ -54,17 +65,39 @@ jobs: - run: name: x230 command: | - ./build/make-4.2.1/make \ - CROSS=/cross/bin/x86_64-linux-musl- \ - --load 2 \ + make --load 2 \ V=1 \ BOARD=x230 \ + no_output_timeout: 3h + - run: + name: Ouput x230 hashes + command: | + cat build/x230/hashes.txt \ + - run: + name: Archiving build logs to bundle in artifacts + command: | + tar zcvf logs.tar.gz ./build/log/* + - store-artifacts: path: build/x230/coreboot.rom - store-artifacts: - path: build/x230/hashes.txt + path: build/x230/initrd.cpio.xz + - store-artifacts: + path: build/x230/modules.cpio + - store-artifacts: + path: build/x230/heads.cpio + - store-artifacts: + path: build/x230/tools.cpio + - store-artifacts: + path: logs.tar.gz + - save_cache: + key: heads-{{ .Branch }}{{ .Environment.CACHE_VERSION }} + paths: + - packages + - crossgcc + - build workflows: version: 2 diff --git a/config/coreboot-x230.config b/config/coreboot-x230.config index c69f4174e..ece97b628 100644 --- a/config/coreboot-x230.config +++ b/config/coreboot-x230.config @@ -1,8 +1,6 @@ CONFIG_LOCALVERSION="heads" CONFIG_ANY_TOOLCHAIN=y -# CONFIG_INCLUDE_CONFIG_FILE is not set -# CONFIG_COLLECT_TIMESTAMPS is not set -CONFIG_USE_BLOBS=y +CONFIG_USE_BLOBS=n CONFIG_MEASURED_BOOT=y CONFIG_VENDOR_LENOVO=y CONFIG_CBFS_SIZE=0x700000 diff --git a/modules/gpg2 b/modules/gpg2 index 318a4cd11..f4ad356f4 100644 --- a/modules/gpg2 +++ b/modules/gpg2 @@ -1,10 +1,10 @@ modules-$(CONFIG_GPG2) += gpg2 -gpg2_version := 2.2.10 +gpg2_version := 2.2.20 gpg2_dir := gnupg-$(gpg2_version) gpg2_tar := gnupg-$(gpg2_version).tar.bz2 gpg2_url := https://www.gnupg.org/ftp/gcrypt/gnupg/$(gpg2_tar) -gpg2_hash := 799dd37a86a1448732e339bd20440f4f5ee6e69755f6fd7a73ee8af30840c915 +gpg2_hash := 04a7c9d48b74c399168ee8270e548588ddbe52218c337703d7f06373d326ca30 # For reproducibility reasons we have to override the exec_prefix # and datarootdir on the configure line so that the Makefiles will @@ -46,6 +46,7 @@ gpg2_configure := ./configure \ --disable-wks-tools \ --disable-gnutls \ --disable-dirmngr \ + --disable-static \ # Run one build to generate the executables with the pre-defined # exec_prefix and datarootdir, then a second make to install the binaries diff --git a/modules/libassuan b/modules/libassuan index 3c4e319aa..a4d4bcb9e 100644 --- a/modules/libassuan +++ b/modules/libassuan @@ -1,9 +1,9 @@ modules-$(CONFIG_GPG2) += libassuan -libassuan_version := 2.5.1 +libassuan_version := 2.5.3 libassuan_dir := libassuan-$(libassuan_version) libassuan_tar := libassuan-$(libassuan_version).tar.bz2 libassuan_url := https://gnupg.org/ftp/gcrypt/libassuan/$(libassuan_tar) -libassuan_hash := 47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449 +libassuan_hash := 91bcb0403866b4e7c4bc1cc52ed4c364a9b5414b3994f718c70303f7f765e702 libassuan_configure := ./configure \ $(CROSS_TOOLS) \ diff --git a/modules/libgcrypt b/modules/libgcrypt index 1ba82fceb..98465a4f7 100644 --- a/modules/libgcrypt +++ b/modules/libgcrypt @@ -1,9 +1,9 @@ modules-$(CONFIG_GPG2) += libgcrypt -libgcrypt_version := 1.8.3 +libgcrypt_version := 1.8.5 libgcrypt_dir := libgcrypt-$(libgcrypt_version) libgcrypt_tar := libgcrypt-$(libgcrypt_version).tar.bz2 libgcrypt_url := https://gnupg.org/ftp/gcrypt/libgcrypt/$(libgcrypt_tar) -libgcrypt_hash := 66ec90be036747602f2b48f98312361a9180c97c68a690a5f376fa0f67d0af7c +libgcrypt_hash := 3b4a2a94cb637eff5bdebbcaf46f4d95c4f25206f459809339cdada0eb577ac3 libgcrypt_configure := ./configure \ $(CROSS_TOOLS) \ diff --git a/modules/libgpg-error b/modules/libgpg-error index 752e11aad..fce6a9b5f 100644 --- a/modules/libgpg-error +++ b/modules/libgpg-error @@ -1,9 +1,9 @@ modules-$(CONFIG_GPG2) += libgpg-error -libgpg-error_version := 1.32 +libgpg-error_version := 1.37 libgpg-error_dir := libgpg-error-$(libgpg-error_version) libgpg-error_tar := libgpg-error-$(libgpg-error_version).tar.bz2 libgpg-error_url := https://gnupg.org/ftp/gcrypt/libgpg-error/$(libgpg-error_tar) -libgpg-error_hash := c345c5e73cc2332f8d50db84a2280abfb1d8f6d4f1858b9daa30404db44540ca +libgpg-error_hash := b32d6ff72a73cf79797f7f2d039e95e9c6f92f0c1450215410840ab62aea9763 libgpg-error_configure := ./configure \ $(CROSS_TOOLS) \ diff --git a/modules/pinentry b/modules/pinentry index c0e93d7fa..1ce9b6a58 100644 --- a/modules/pinentry +++ b/modules/pinentry @@ -21,12 +21,18 @@ pinentry_configure := ./configure \ --disable-libsecret \ --disable-fallback-curses \ --disable-pinentry-curses \ - --disable-pinentry-qt \ --disable-pinentry-gtk2 \ --disable-pinentry-gnome3 \ --disable-pinentry-fltk \ --disable-pinentry-emacs \ --disable-fallback-curses \ + --disable-pinentry-qt5 \ + --disable-pinentry-fltk \ + --disable-modular-tests \ + --disable-qt --disable-ft --disable-fc \ + --disable-qt \ + --disable-gtk-doc \ + --disable-cups \ --with-libgpg-error-prefix="$(INSTALL)" \ --with-libassuan-prefix="$(INSTALL)" \ diff --git a/patches/gpg2-2.2.10.patch b/patches/gpg2-2.2.20.patch similarity index 100% rename from patches/gpg2-2.2.10.patch rename to patches/gpg2-2.2.20.patch diff --git a/patches/libassuan-2.5.1.patch b/patches/libassuan-2.5.3.patch similarity index 100% rename from patches/libassuan-2.5.1.patch rename to patches/libassuan-2.5.3.patch diff --git a/patches/libgcrypt-1.8.3.patch b/patches/libgcrypt-1.8.5.patch similarity index 100% rename from patches/libgcrypt-1.8.3.patch rename to patches/libgcrypt-1.8.5.patch diff --git a/patches/libgpg-error-1.32.patch b/patches/libgpg-error-1.32.patch new file mode 100644 index 000000000..9b243e715 --- /dev/null +++ b/patches/libgpg-error-1.32.patch @@ -0,0 +1,157 @@ +From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka +Date: Mon, 15 Apr 2019 15:10:44 +0900 +Subject: [PATCH] awk: Prepare for Gawk 5.0. + +* src/Makefile.am: Use pkg_namespace (instead of namespace). +* src/mkerrnos.awk: Likewise. +* lang/cl/mkerrcodes.awk: Don't escape # in regexp. +* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto. + +-- + +In Gawk 5.0, regexp routines are replaced by Gnulib implementation, +which only allows escaping specific characters. + +GnuPG-bug-id: 4459 +Reported-by: Marius Schamschula +Signed-off-by: NIIBE Yutaka +--- + lang/cl/mkerrcodes.awk | 2 +- + src/Makefile.am | 2 +- + src/mkerrcodes.awk | 2 +- + src/mkerrcodes1.awk | 2 +- + src/mkerrcodes2.awk | 2 +- + src/mkerrnos.awk | 2 +- + src/mkstrtable.awk | 10 +++++----- + 7 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk +index ae29043..9a1fc18 100644 +--- a/lang/cl/mkerrcodes.awk ++++ b/lang/cl/mkerrcodes.awk +@@ -122,7 +122,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +diff --git a/src/Makefile.am b/src/Makefile.am +index ce1b882..f2590cb 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile + + errnos-sym.h: Makefile mkstrtable.awk errnos.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ +- -v prefix=GPG_ERR_ -v namespace=errnos_ \ ++ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \ + $(srcdir)/errnos.in >$@ + + +diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk +index 46d436c..e9c857c 100644 +--- a/src/mkerrcodes.awk ++++ b/src/mkerrcodes.awk +@@ -85,7 +85,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk +index a771a73..4578e29 100644 +--- a/src/mkerrcodes1.awk ++++ b/src/mkerrcodes1.awk +@@ -81,7 +81,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk +index ea58503..188f7a4 100644 +--- a/src/mkerrcodes2.awk ++++ b/src/mkerrcodes2.awk +@@ -91,7 +91,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk +index f79df66..15b1aad 100644 +--- a/src/mkerrnos.awk ++++ b/src/mkerrnos.awk +@@ -83,7 +83,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk +index c9de9c1..285e45f 100644 +--- a/src/mkstrtable.awk ++++ b/src/mkstrtable.awk +@@ -77,7 +77,7 @@ + # + # The variable prefix can be used to prepend a string to each message. + # +-# The variable namespace can be used to prepend a string to each ++# The variable pkg_namespace can be used to prepend a string to each + # variable and macro name. + + BEGIN { +@@ -102,7 +102,7 @@ header { + print "/* The purpose of this complex string table is to produce"; + print " optimal code with a minimum of relocations. */"; + print ""; +- print "static const char " namespace "msgstr[] = "; ++ print "static const char " pkg_namespace "msgstr[] = "; + header = 0; + } + else +@@ -110,7 +110,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +@@ -150,7 +150,7 @@ END { + else + print " gettext_noop (\"" last_msgstr "\");"; + print ""; +- print "static const int " namespace "msgidx[] ="; ++ print "static const int " pkg_namespace "msgidx[] ="; + print " {"; + for (i = 0; i < coded_msgs; i++) + print " " pos[i] ","; +@@ -158,7 +158,7 @@ END { + print " };"; + print ""; + print "static GPG_ERR_INLINE int"; +- print namespace "msgidxof (int code)"; ++ print pkg_namespace "msgidxof (int code)"; + print "{"; + print " return (0 ? 0"; + +-- +2.21.0