Skip to contentSkip to conversation

travis-ci: add pkcs11-helper patch identical to openvpn-build

PATCH In review Ilya Shipitsin 2 participants 2 messages Feb 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 travis-ci: add pkcs11-helper patch identical to openvpn-build

currently patch of implementing RFC7512 URI Scheme is added during building windows installer. The same patch was added to travis-ci cross builds

---
 .travis/build-deps.sh                   |  17 +-
 .travis/pkcs11-helper-001-RFC7512.patch | 656 ++++++++++++++++++++++++++++++++
 2 files changed, 669 insertions(+), 4 deletions(-)
 create mode 100644 .travis/pkcs11-helper-001-RFC7512.patch
.travis/build-deps.sh +13 -4
index 96a030cc..6270a945 100755
@@ -4,6 +4,11 @@ set -eux
 # Set defaults
 PREFIX="${PREFIX:-${HOME}/opt}"
 
+die() {
+        echo "FATAL: $1" >&2
+        exit 1
+}
+
 download_tap_windows () {
     if [ ! -f "download-cache/tap-windows-${TAP_WINDOWS_VERSION}.zip" ]; then
        wget -P download-cache/ \
@@ -15,12 +20,12 @@ download_lzo () {
     if [ ! -f "download-cache/lzo-${LZO_VERSION}.tar.gz" ]; then
         wget -P download-cache/ \
             "http://www.oberhumer.com/opensource/lzo/download/lzo-${LZO_VERSION}.tar.gz"
+        tar zxf download-cache/lzo-${LZO_VERSION}.tar.gz
     fi
 }
 
 build_lzo () {
     if [ "$(cat ${PREFIX}/.lzo-version)" != "${LZO_VERSION}" ]; then
-        tar zxf download-cache/lzo-${LZO_VERSION}.tar.gz
         (
             cd "lzo-${LZO_VERSION}"
 
@@ -36,12 +41,12 @@ download_pkcs11_helper () {
     if [ ! -f "pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2" ]; then
         wget -P download-cache/ \
             "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-${PKCS11_HELPER_VERSION}/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2"
+        tar jxf download-cache/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2
     fi
 }
 
 build_pkcs11_helper () {
     if [ "$(cat ${PREFIX}/.pkcs11_helper-version)" != "${PKCS11_HELPER_VERSION}" ]; then
-        tar jxf download-cache/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2
         (
             cd "pkcs11-helper-${PKCS11_HELPER_VERSION}"
 
@@ -158,8 +163,12 @@ if [ ! -z ${CHOST+x} ]; then
       unzip download-cache/tap-windows-${TAP_WINDOWS_VERSION}.zip
 
       download_lzo
-      build_lzo
-
       download_pkcs11_helper
+
+      for f in .travis/*.patch; do
+          patch -p1 < "${f}" || die "Patch '${f}'"
+      done
+
+      build_lzo
       build_pkcs11_helper
 fi
.travis/pkcs11-helper-001-RFC7512.patch new file +656 -0

656 lines not on this page · raw message

Signature · 1 line
2.14.3
#1 lore raw

Hi,

Quoted 3 lines · Ilya Shipitsin

currently patch of implementing RFC7512 URI Scheme is added during building windows installer. The same patch was added to travis-ci cross builds

I don't think this is a good idea. Most pkcs11-helper builds out in the world are *without* this patch, so I'd rather test building against a pkcs11-helper without the patch.

Also, we don't test pkcs11 functionality in this test suite at all, so I don't see the gain in adding the patch here.

-Steffan