From dc26ef859388ef9e70fc1d46e53b7a9cb9be96bb Mon Sep 17 00:00:00 2001 From: Dennis Fokin Date: Tue, 28 Jan 2020 13:46:49 +0100 Subject: [PATCH 1/4] Actions: windows, bumped pyotherside to 1.5.9 --- .github/workflows/windows-x86.yml | 11 ++++++----- .github/workflows/windows.yml | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/windows-x86.yml b/.github/workflows/windows-x86.yml index 6341d5ff..c5f29f2c 100644 --- a/.github/workflows/windows-x86.yml +++ b/.github/workflows/windows-x86.yml @@ -5,11 +5,12 @@ on: [push, pull_request] env: PYTHON_VER: '3.8.1' PYTHON_VER_DIRNAME: 'python38' + PYOTHERSIDE_VER: '1.5.9' jobs: build: - runs-on: windows-2019 + runs-on: windows-latest steps: - uses: actions/checkout@v1 @@ -21,7 +22,7 @@ jobs: - name: Download dependencies run: | wget https://download.qt.io/official_releases/jom/jom.zip -OutFile jom.zip - wget https://github.com/thp/pyotherside/archive/1.5.3.zip -OutFile pyotherside-1.5.3.zip + wget https://github.com/thp/pyotherside/archive/$env:PYOTHERSIDE_VER.zip -OutFile pyotherside-$env:PYOTHERSIDE_VER.zip wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0-win32.zip -OutFile ykpers-1.20.0-win32.zip wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0-win32.zip.sig -OutFile ykpers-1.20.0-win32.zip.sig wget https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.7z -OutFile libusb-1.0.22.7z @@ -48,8 +49,8 @@ jobs: - name: Unpack and prepare pyotherside run: | - 7z x pyotherside-1.5.3.zip - cd pyotherside-1.5.3 + 7z x pyotherside-$env:PYOTHERSIDE_VER.zip + cd pyotherside-$env:PYOTHERSIDE_VER (Get-Content .\src\qmldir).replace('pyothersideplugin', 'pyothersideplugin1') | Set-Content .\src\qmldir Clear-Content python.pri Add-Content python.pri "PYTHON_CONFIG = python3-config`nQMAKE_LIBS += -LC:\hostedtoolcache\windows\Python\$env:PYTHON_VER\x86\libs -l$env:PYTHON_VER_DIRNAME`nQMAKE_CXXFLAGS += -IC:\hostedtoolcache\windows\Python\$env:PYTHON_VER\x86\include`n" @@ -60,7 +61,7 @@ jobs: run: | set PATH=D:\a\yubikey-manager-qt\yubikey-manager-qt\5.13.1\msvc2017\bin;D:\a\yubikey-manager-qt\yubikey-manager-qt;%PATH% call C:\"Program Files (x86)\Microsoft Visual Studio"\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat x86 - cd pyotherside-1.5.3 + cd pyotherside-$env:PYOTHERSIDE_VER qmake jom jom install diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index a090c144..94e4c042 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -5,11 +5,12 @@ on: [push, pull_request] env: PYTHON_VER: '3.8.1' PYTHON_VER_DIRNAME: 'python38' + PYOTHERSIDE_VER: '1.5.9' jobs: build: - runs-on: windows-2019 + runs-on: windows-latest steps: - uses: actions/checkout@v1 @@ -21,7 +22,7 @@ jobs: - name: Download dependencies run: | wget https://download.qt.io/official_releases/jom/jom.zip -OutFile jom.zip - wget https://github.com/thp/pyotherside/archive/1.5.3.zip -OutFile pyotherside-1.5.3.zip + wget https://github.com/thp/pyotherside/archive/$env:PYOTHERSIDE_VER.zip -OutFile pyotherside-$env:PYOTHERSIDE_VER.zip wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0-win64.zip -OutFile ykpers-1.20.0-win64.zip wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0-win64.zip.sig -OutFile ykpers-1.20.0-win64.zip.sig wget https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.7z -OutFile libusb-1.0.22.7z @@ -48,8 +49,8 @@ jobs: - name: Download and prepare pyotherside run: | - 7z x pyotherside-1.5.3.zip - cd pyotherside-1.5.3 + 7z x pyotherside-$env:PYOTHERSIDE_VER.zip + cd pyotherside-$env:PYOTHERSIDE_VER (Get-Content .\src\qmldir).replace('pyothersideplugin', 'pyothersideplugin1') | Set-Content .\src\qmldir Clear-Content python.pri Add-Content python.pri "PYTHON_CONFIG = python3-config`nQMAKE_LIBS += -LC:\hostedtoolcache\windows\Python\$env:PYTHON_VER\x64\libs -l$env:PYTHON_VER_DIRNAME`nQMAKE_CXXFLAGS += -IC:\hostedtoolcache\windows\Python\$env:PYTHON_VER\x64\include`n" @@ -60,7 +61,7 @@ jobs: run: | set PATH=D:\a\yubikey-manager-qt\yubikey-manager-qt\5.13.1\msvc2017_64\bin;D:\a\yubikey-manager-qt\yubikey-manager-qt;%PATH% call C:\"Program Files (x86)\Microsoft Visual Studio"\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat x64 - cd pyotherside-1.5.3 + cd pyotherside-$env:PYOTHERSIDE_VER qmake jom jom install From f00a1645f342cddc8b270e6af17147bbb9759162 Mon Sep 17 00:00:00 2001 From: Dennis Fokin Date: Tue, 28 Jan 2020 14:05:56 +0100 Subject: [PATCH 2/4] Actions: mac, bumped pyotherside and python --- .github/workflows/macOS.yml | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml index cc2ea004..2ff03bb9 100644 --- a/.github/workflows/macOS.yml +++ b/.github/workflows/macOS.yml @@ -2,10 +2,16 @@ name: macOS on: [push, pull_request] +env: + PYTHON_VER: '3.7.6' + PYTHON_VER_SHORT: '3.7' + PYTHON_VER_SHORT_COMPACT: '37' + PYOTHERSIDE_VER: '1.5.9' + jobs: build: - runs-on: macOS-10.14 + runs-on: macOS-latest steps: - uses: actions/checkout@v1 @@ -18,20 +24,20 @@ jobs: - name: Build custom Python as a framework run: | - wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz - tar -xzvf Python-3.7.4.tgz - cd Python-3.7.4 + wget https://www.python.org/ftp/python/${PYTHON_VER}/Python-${PYTHON_VER}.tgz + tar -xzvf Python-${PYTHON_VER}.tgz + cd Python-${PYTHON_VER} ./configure CPPFLAGS="-I$(brew --prefix openssl@1.1)/include" LDFLAGS="-L$(brew --prefix openssl@1.1)/lib" MACOSX_DEPLOYMENT_TARGET=10.13 CC=clang --enable-framework --with-openssl=$(brew --prefix openssl@1.1) --enable-optimizations sudo make altinstall cd .. - name: Download, build, install pyotherside QML plugin run: | - wget https://github.com/thp/pyotherside/archive/1.5.8.tar.gz - tar -xzvf 1.5.8.tar.gz - echo "DEFINES += QT_NO_DEBUG_OUTPUT" >> pyotherside-1.5.8/src/src.pro - cd pyotherside-1.5.8 - qmake PYTHON_CONFIG=/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7m-config + wget https://github.com/thp/pyotherside/archive/${PYOTHERSIDE_VER}.tar.gz + tar -xzvf ${PYOTHERSIDE_VER}.tar.gz + echo "DEFINES += QT_NO_DEBUG_OUTPUT" >> pyotherside-${PYOTHERSIDE_VER}/src/src.pro + cd pyotherside-${PYOTHERSIDE_VER} + qmake PYTHON_CONFIG=/Library/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/bin/python${PYTHON_VER_SHORT}m-config make sudo make install cd .. @@ -63,19 +69,19 @@ jobs: - name: Move python dependencies to site-packages (required by codesign) run: | - rsync -a ykman-gui/ykman-gui.app/Contents/MacOS/pymodules/* ykman-gui/ykman-gui.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ + rsync -a ykman-gui/ykman-gui.app/Contents/MacOS/pymodules/* ykman-gui/ykman-gui.app/Contents/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/lib/python${PYTHON_VER_SHORT}/site-packages/ rm -rf ykman-gui/ykman-gui.app/Contents/MacOS/pymodules - name: Point pyotherside to relative Python run: | - sudo install_name_tool -change /Library/Frameworks/Python.framework/Versions/3.7/Python @executable_path/../Frameworks/Python.framework/Versions/3.7/Python ykman-gui/ykman-gui.app/Contents/PlugIns/quick/libpyothersideplugin.dylib + sudo install_name_tool -change /Library/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/Python @executable_path/../Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/Python ykman-gui/ykman-gui.app/Contents/PlugIns/quick/libpyothersideplugin.dylib - name: Point custom Python share objects to relative openssl (from brew) run: | - sudo install_name_tool -change /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib @executable_path/../Frameworks/libcrypto.1.1.dylib ykman-gui/ykman-gui.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_ssl.cpython-37m-darwin.so - sudo install_name_tool -change /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib @executable_path/../Frameworks/libssl.1.1.dylib ykman-gui/ykman-gui.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_ssl.cpython-37m-darwin.so - sudo install_name_tool -change /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib @executable_path/../Frameworks/libcrypto.1.1.dylib ykman-gui/ykman-gui.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_hashlib.cpython-37m-darwin.so - sudo install_name_tool -change /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib @executable_path/../Frameworks/libssl.1.1.dylib ykman-gui/ykman-gui.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_hashlib.cpython-37m-darwin.so + sudo install_name_tool -change /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib @executable_path/../Frameworks/libcrypto.1.1.dylib ykman-gui/ykman-gui.app/Contents/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/lib/python${PYTHON_VER_SHORT}/lib-dynload/_ssl.cpython-${PYTHON_VER_SHORT_COMPACT}m-darwin.so + sudo install_name_tool -change /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib @executable_path/../Frameworks/libssl.1.1.dylib ykman-gui/ykman-gui.app/Contents/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/lib/python${PYTHON_VER_SHORT}/lib-dynload/_ssl.cpython-${PYTHON_VER_SHORT_COMPACT}m-darwin.so + sudo install_name_tool -change /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib @executable_path/../Frameworks/libcrypto.1.1.dylib ykman-gui/ykman-gui.app/Contents/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/lib/python${PYTHON_VER_SHORT}/lib-dynload/_hashlib.cpython-${PYTHON_VER_SHORT_COMPACT}m-darwin.so + sudo install_name_tool -change /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib @executable_path/../Frameworks/libssl.1.1.dylib ykman-gui/ykman-gui.app/Contents/Frameworks/Python.framework/Versions/${PYTHON_VER_SHORT}/lib/python${PYTHON_VER_SHORT}/lib-dynload/_hashlib.cpython-${PYTHON_VER_SHORT_COMPACT}m-darwin.so sudo install_name_tool -change /usr/local/Cellar/openssl@1.1/1.1.1d/lib/libcrypto.1.1.dylib @executable_path/../Frameworks/libcrypto.1.1.dylib ykman-gui/ykman-gui.app/Contents/Frameworks/libssl.1.1.dylib - name: Point ykpers dependencies to relative dylibs From 880a06cc83e438791271f3215a86eadcb015e19a Mon Sep 17 00:00:00 2001 From: Dennis Fokin Date: Tue, 28 Jan 2020 14:35:52 +0100 Subject: [PATCH 3/4] Actions: linux, bumped pyotherside and python --- docker/xenial-appimage/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/xenial-appimage/Dockerfile b/docker/xenial-appimage/Dockerfile index 118aea6d..7588e167 100644 --- a/docker/xenial-appimage/Dockerfile +++ b/docker/xenial-appimage/Dockerfile @@ -24,23 +24,23 @@ ENV LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRA RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash \ && eval "$(pyenv init -)" \ && pyenv update \ - && pyenv install --force 3.7.4 \ - && pyenv global 3.7.4 \ - && wget https://github.com/thp/pyotherside/archive/1.5.8.tar.gz \ - && tar -xzvf 1.5.8.tar.gz \ - && echo "DEFINES += QT_NO_DEBUG_OUTPUT" >> pyotherside-1.5.8/src/src.pro \ - && cd pyotherside-1.5.8/src \ + && pyenv install --force 3.8.1 \ + && pyenv global 3.8.1 \ + && wget https://github.com/thp/pyotherside/archive/1.5.9.tar.gz \ + && tar -xzvf 1.5.9.tar.gz \ + && echo "DEFINES += QT_NO_DEBUG_OUTPUT" >> pyotherside-1.5.9/src/src.pro \ + && cd pyotherside-1.5.9/src \ && qmake \ && make \ && make install COPY . yubikey-manager-qt RUN mkdir -p yubikey-manager-qt/appDir/usr \ && eval "$(pyenv init -)" \ - && pyenv global 3.7.4 \ + && pyenv global 3.8.1 \ && cd yubikey-manager-qt \ && pip3 install --upgrade pip \ && pip3 install -r requirements.txt \ - && cp -R /root/.pyenv/versions/3.7.4/* appDir/usr \ + && cp -R /root/.pyenv/versions/3.8.1/* appDir/usr \ && apt-get download libykpers-1-1 \ && dpkg -x libykpers*.deb appDir/ \ && qmake \ From 5b67bf458c4c928ca64dccfe71273bbbbf4561b6 Mon Sep 17 00:00:00 2001 From: Dennis Fokin Date: Wed, 29 Jan 2020 10:03:48 +0100 Subject: [PATCH 4/4] Actions: windows, removed env var and renamed the 64 bit file --- ...ws-libs.sha256sum => windows-x64-libs.sha256sum} | 0 .github/workflows/{windows.yml => windows-x64.yml} | 13 ++++++------- .github/workflows/windows-x86.yml | 9 ++++----- 3 files changed, 10 insertions(+), 12 deletions(-) rename .github/workflows/{windows-libs.sha256sum => windows-x64-libs.sha256sum} (100%) rename .github/workflows/{windows.yml => windows-x64.yml} (94%) diff --git a/.github/workflows/windows-libs.sha256sum b/.github/workflows/windows-x64-libs.sha256sum similarity index 100% rename from .github/workflows/windows-libs.sha256sum rename to .github/workflows/windows-x64-libs.sha256sum diff --git a/.github/workflows/windows.yml b/.github/workflows/windows-x64.yml similarity index 94% rename from .github/workflows/windows.yml rename to .github/workflows/windows-x64.yml index 94e4c042..90dece50 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows-x64.yml @@ -1,11 +1,10 @@ -name: windows +name: windows 64bit on: [push, pull_request] env: PYTHON_VER: '3.8.1' PYTHON_VER_DIRNAME: 'python38' - PYOTHERSIDE_VER: '1.5.9' jobs: build: @@ -22,7 +21,7 @@ jobs: - name: Download dependencies run: | wget https://download.qt.io/official_releases/jom/jom.zip -OutFile jom.zip - wget https://github.com/thp/pyotherside/archive/$env:PYOTHERSIDE_VER.zip -OutFile pyotherside-$env:PYOTHERSIDE_VER.zip + wget https://github.com/thp/pyotherside/archive/1.5.9.zip -OutFile pyotherside-1.5.9.zip wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0-win64.zip -OutFile ykpers-1.20.0-win64.zip wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0-win64.zip.sig -OutFile ykpers-1.20.0-win64.zip.sig wget https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.7z -OutFile libusb-1.0.22.7z @@ -34,7 +33,7 @@ jobs: - name: Verify checksums of downloaded files run: | - sha256sum -c ./.github/workflows/windows-libs.sha256sum + sha256sum -c ./.github/workflows/windows-x64-libs.sha256sum gpg --no-default-keyring --keyring yubico --verify ykpers-1.20.0-win64.zip.sig ykpers-1.20.0-win64.zip - name: Install swig @@ -49,8 +48,8 @@ jobs: - name: Download and prepare pyotherside run: | - 7z x pyotherside-$env:PYOTHERSIDE_VER.zip - cd pyotherside-$env:PYOTHERSIDE_VER + 7z x pyotherside-1.5.9.zip + cd pyotherside-1.5.9 (Get-Content .\src\qmldir).replace('pyothersideplugin', 'pyothersideplugin1') | Set-Content .\src\qmldir Clear-Content python.pri Add-Content python.pri "PYTHON_CONFIG = python3-config`nQMAKE_LIBS += -LC:\hostedtoolcache\windows\Python\$env:PYTHON_VER\x64\libs -l$env:PYTHON_VER_DIRNAME`nQMAKE_CXXFLAGS += -IC:\hostedtoolcache\windows\Python\$env:PYTHON_VER\x64\include`n" @@ -61,7 +60,7 @@ jobs: run: | set PATH=D:\a\yubikey-manager-qt\yubikey-manager-qt\5.13.1\msvc2017_64\bin;D:\a\yubikey-manager-qt\yubikey-manager-qt;%PATH% call C:\"Program Files (x86)\Microsoft Visual Studio"\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat x64 - cd pyotherside-$env:PYOTHERSIDE_VER + cd pyotherside-1.5.9 qmake jom jom install diff --git a/.github/workflows/windows-x86.yml b/.github/workflows/windows-x86.yml index c5f29f2c..957f528c 100644 --- a/.github/workflows/windows-x86.yml +++ b/.github/workflows/windows-x86.yml @@ -5,7 +5,6 @@ on: [push, pull_request] env: PYTHON_VER: '3.8.1' PYTHON_VER_DIRNAME: 'python38' - PYOTHERSIDE_VER: '1.5.9' jobs: build: @@ -22,7 +21,7 @@ jobs: - name: Download dependencies run: | wget https://download.qt.io/official_releases/jom/jom.zip -OutFile jom.zip - wget https://github.com/thp/pyotherside/archive/$env:PYOTHERSIDE_VER.zip -OutFile pyotherside-$env:PYOTHERSIDE_VER.zip + wget https://github.com/thp/pyotherside/archive/1.5.9.zip -OutFile pyotherside-1.5.9.zip wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0-win32.zip -OutFile ykpers-1.20.0-win32.zip wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0-win32.zip.sig -OutFile ykpers-1.20.0-win32.zip.sig wget https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.7z -OutFile libusb-1.0.22.7z @@ -49,8 +48,8 @@ jobs: - name: Unpack and prepare pyotherside run: | - 7z x pyotherside-$env:PYOTHERSIDE_VER.zip - cd pyotherside-$env:PYOTHERSIDE_VER + 7z x pyotherside-1.5.9.zip + cd pyotherside-1.5.9 (Get-Content .\src\qmldir).replace('pyothersideplugin', 'pyothersideplugin1') | Set-Content .\src\qmldir Clear-Content python.pri Add-Content python.pri "PYTHON_CONFIG = python3-config`nQMAKE_LIBS += -LC:\hostedtoolcache\windows\Python\$env:PYTHON_VER\x86\libs -l$env:PYTHON_VER_DIRNAME`nQMAKE_CXXFLAGS += -IC:\hostedtoolcache\windows\Python\$env:PYTHON_VER\x86\include`n" @@ -61,7 +60,7 @@ jobs: run: | set PATH=D:\a\yubikey-manager-qt\yubikey-manager-qt\5.13.1\msvc2017\bin;D:\a\yubikey-manager-qt\yubikey-manager-qt;%PATH% call C:\"Program Files (x86)\Microsoft Visual Studio"\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat x86 - cd pyotherside-$env:PYOTHERSIDE_VER + cd pyotherside-1.5.9 qmake jom jom install