From 53f29c11547bf0aba0599a2bac9ce7e3e0dfee1d Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Mon, 27 Jul 2020 16:47:07 +0100 Subject: [PATCH 01/23] Initial cpack setup --- CMakeLists.txt | 1 + cmake/cpack_settings.cmake | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 cmake/cpack_settings.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 815e3c994e58..fb6e17ad0ae6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.11) set(CCF_DIR ${CMAKE_CURRENT_SOURCE_DIR}) include(${CCF_DIR}/cmake/preproject.cmake) include(${CCF_DIR}/cmake/version.cmake) +include(${CCF_DIR}/cmake/cpack_settings.cmake) project( ccf diff --git a/cmake/cpack_settings.cmake b/cmake/cpack_settings.cmake new file mode 100644 index 000000000000..d03705535a55 --- /dev/null +++ b/cmake/cpack_settings.cmake @@ -0,0 +1,18 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache 2.0 License. + +include(InstallRequiredSystemLibraries) +set(CPACK_PACKAGE_NAME "ccf") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Confidential Consortium Framework") +set(CPACK_PACKAGE_CONTACT "ccfeng@microsoft.com") +set(CPACK_RESOURCE_FILE_LICENSE "${CCF_DIR}/LICENSE") +set(CPACK_PACKAGE_VERSION ${CCF_RELEASE_VERSION}) +set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) + +# CPack variables for Debian packages +set(CPACK_DEBIAN_PACKAGE_DEPENDS + "open-enclave (>=0.10.0)" +) +set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) + +include(CPack) \ No newline at end of file From 154d6ea8f7a0a232c6618f2cb361415d9ecc05f5 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 28 Jul 2020 16:02:35 +0100 Subject: [PATCH 02/23] Build in CI --- .azure-pipelines-templates/common.yml | 2 ++ .azure-pipelines-templates/pkg.yml | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .azure-pipelines-templates/pkg.yml diff --git a/.azure-pipelines-templates/common.yml b/.azure-pipelines-templates/common.yml index ef195c153d33..f51c80ddfe4d 100644 --- a/.azure-pipelines-templates/common.yml +++ b/.azure-pipelines-templates/common.yml @@ -44,4 +44,6 @@ jobs: artifact_name: ${{ parameters.artifact_name }} tls_report: ${{ parameters.tls_report }} + - template: pkg.yml + - template: install.yml \ No newline at end of file diff --git a/.azure-pipelines-templates/pkg.yml b/.azure-pipelines-templates/pkg.yml new file mode 100644 index 000000000000..76917a372788 --- /dev/null +++ b/.azure-pipelines-templates/pkg.yml @@ -0,0 +1,15 @@ +steps: +- script: | + cmake -L .. 2>/dev/null | grep CMAKE_INSTALL_PREFIX: | cut -d = -f 2 > /tmp/install_prefix + cpack -G DEB + PKG=`ls *.deb` + cp $PKG $(Build.ArtifactStagingDirectory) + echo "##vso[task.setvariable variable=pkgname]$PKG" + workingDirectory: build + displayName: 'Make .deb package' + +- task: PublishPipelineArtifact@1 + inputs: + path: $(Build.ArtifactStagingDirectory)/$[variables['pkgname']] + artifact: $[variables['pkgname']] + displayName: 'Publish CCF Install' \ No newline at end of file From 8c786155ad57141a26ebbc9eacced2ad8b6b97e4 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Wed, 29 Jul 2020 10:02:19 +0100 Subject: [PATCH 03/23] . --- .azure-pipelines-templates/pkg.yml | 3 +-- cmake/cpack_settings.cmake | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines-templates/pkg.yml b/.azure-pipelines-templates/pkg.yml index 76917a372788..0765e43b3b98 100644 --- a/.azure-pipelines-templates/pkg.yml +++ b/.azure-pipelines-templates/pkg.yml @@ -1,7 +1,6 @@ steps: - script: | - cmake -L .. 2>/dev/null | grep CMAKE_INSTALL_PREFIX: | cut -d = -f 2 > /tmp/install_prefix - cpack -G DEB + cpack -V -G DEB PKG=`ls *.deb` cp $PKG $(Build.ArtifactStagingDirectory) echo "##vso[task.setvariable variable=pkgname]$PKG" diff --git a/cmake/cpack_settings.cmake b/cmake/cpack_settings.cmake index d03705535a55..cf1db0172e56 100644 --- a/cmake/cpack_settings.cmake +++ b/cmake/cpack_settings.cmake @@ -11,7 +11,7 @@ set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) # CPack variables for Debian packages set(CPACK_DEBIAN_PACKAGE_DEPENDS - "open-enclave (>=0.10.0)" + "open-enclave (>=0.10.0), libuv1 (>= 1.18.0), libc++1 (>=6.0), , libc++abi1 (>=6.0)" ) set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) From 135e669beb22e37abc494a06cc82d4e2c6095949 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Wed, 29 Jul 2020 10:36:40 +0100 Subject: [PATCH 04/23] . --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f34c7779e66..5498153331f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,6 @@ cmake_minimum_required(VERSION 3.11) set(CCF_DIR ${CMAKE_CURRENT_SOURCE_DIR}) include(${CCF_DIR}/cmake/preproject.cmake) include(${CCF_DIR}/cmake/version.cmake) -include(${CCF_DIR}/cmake/cpack_settings.cmake) project( ccf @@ -18,6 +17,8 @@ set(ENV{BETTER_EXCEPTIONS} 1) message(STATUS "CCF version=${CCF_VERSION}") message(STATUS "CCF release version=${CCF_RELEASE_VERSION}") +include(${CCF_DIR}/cmake/cpack_settings.cmake) + # Set the default install prefix for CCF. Users may override this value with the # cmake command. For example: # From 253baecab6654e6b6ebfcf7310d7f7ef7d51d80e Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Wed, 29 Jul 2020 12:00:20 +0100 Subject: [PATCH 05/23] . --- .azure-pipelines-templates/pkg.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines-templates/pkg.yml b/.azure-pipelines-templates/pkg.yml index 0765e43b3b98..3347e553df33 100644 --- a/.azure-pipelines-templates/pkg.yml +++ b/.azure-pipelines-templates/pkg.yml @@ -9,6 +9,6 @@ steps: - task: PublishPipelineArtifact@1 inputs: - path: $(Build.ArtifactStagingDirectory)/$[variables['pkgname']] + path: $(Build.ArtifactStagingDirectory)/$(pkgname)] artifact: $[variables['pkgname']] displayName: 'Publish CCF Install' \ No newline at end of file From bbf43b5487f40e4d1275c6b4b899db1761dfac8e Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Wed, 29 Jul 2020 14:21:04 +0100 Subject: [PATCH 06/23] . --- .azure-pipelines-templates/pkg.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines-templates/pkg.yml b/.azure-pipelines-templates/pkg.yml index 3347e553df33..47d91bed10a2 100644 --- a/.azure-pipelines-templates/pkg.yml +++ b/.azure-pipelines-templates/pkg.yml @@ -9,6 +9,6 @@ steps: - task: PublishPipelineArtifact@1 inputs: - path: $(Build.ArtifactStagingDirectory)/$(pkgname)] - artifact: $[variables['pkgname']] + path: $(Build.ArtifactStagingDirectory)/$(pkgname) + artifact: $(pkgname) displayName: 'Publish CCF Install' \ No newline at end of file From fa2dab4cf7cf9b8f99c4266256a5f21853275f58 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 11:46:21 +0100 Subject: [PATCH 07/23] Test install --- .azure-pipelines-templates/common.yml | 2 -- .azure-pipelines-templates/install.yml | 19 ++++++++----------- .azure-pipelines-templates/pkg.yml | 14 -------------- 3 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 .azure-pipelines-templates/pkg.yml diff --git a/.azure-pipelines-templates/common.yml b/.azure-pipelines-templates/common.yml index f51c80ddfe4d..ef195c153d33 100644 --- a/.azure-pipelines-templates/common.yml +++ b/.azure-pipelines-templates/common.yml @@ -44,6 +44,4 @@ jobs: artifact_name: ${{ parameters.artifact_name }} tls_report: ${{ parameters.tls_report }} - - template: pkg.yml - - template: install.yml \ No newline at end of file diff --git a/.azure-pipelines-templates/install.yml b/.azure-pipelines-templates/install.yml index a411604bdc25..33eea0ecbee1 100644 --- a/.azure-pipelines-templates/install.yml +++ b/.azure-pipelines-templates/install.yml @@ -1,24 +1,21 @@ steps: - script: | - sudo chmod a+w /opt - ninja install cmake -L .. 2>/dev/null | grep CMAKE_INSTALL_PREFIX: | cut -d = -f 2 > /tmp/install_prefix + cpack -V -G DEB + PKG=`ls *.deb` + cp $PKG $(Build.ArtifactStagingDirectory) + echo "##vso[task.setvariable variable=pkgname]$PKG" workingDirectory: build - displayName: 'Install' + displayName: 'Make .deb package' - script: | + apt install ./$(pkgname) cat /tmp/install_prefix | xargs ./test_install.sh workingDirectory: build displayName: Test installed CCF -- script: | - INSTALL_PREFIX=`cat /tmp/install_prefix` - tar czf $(Build.ArtifactStagingDirectory)/ccf.tar.gz ${INSTALL_PREFIX##/opt/} - displayName: Create release tarball - workingDirectory: /opt - - task: PublishPipelineArtifact@1 inputs: - path: $(Build.ArtifactStagingDirectory)/ccf.tar.gz - artifact: ccf.tar.gz + path: $(Build.ArtifactStagingDirectory)/$(pkgname) + artifact: $(pkgname) displayName: 'Publish CCF Install' \ No newline at end of file diff --git a/.azure-pipelines-templates/pkg.yml b/.azure-pipelines-templates/pkg.yml deleted file mode 100644 index 47d91bed10a2..000000000000 --- a/.azure-pipelines-templates/pkg.yml +++ /dev/null @@ -1,14 +0,0 @@ -steps: -- script: | - cpack -V -G DEB - PKG=`ls *.deb` - cp $PKG $(Build.ArtifactStagingDirectory) - echo "##vso[task.setvariable variable=pkgname]$PKG" - workingDirectory: build - displayName: 'Make .deb package' - -- task: PublishPipelineArtifact@1 - inputs: - path: $(Build.ArtifactStagingDirectory)/$(pkgname) - artifact: $(pkgname) - displayName: 'Publish CCF Install' \ No newline at end of file From 9141cc642d4f9e48ee3f91282c98966285131111 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 13:21:27 +0100 Subject: [PATCH 08/23] . --- .azure-pipelines-templates/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines-templates/install.yml b/.azure-pipelines-templates/install.yml index 33eea0ecbee1..8e56fd3c0718 100644 --- a/.azure-pipelines-templates/install.yml +++ b/.azure-pipelines-templates/install.yml @@ -9,7 +9,7 @@ steps: displayName: 'Make .deb package' - script: | - apt install ./$(pkgname) + sudo apt install ./$(pkgname) cat /tmp/install_prefix | xargs ./test_install.sh workingDirectory: build displayName: Test installed CCF From 44f852211c19bf32c7c7e8b03c08b46cfba4b9c9 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 13:59:37 +0100 Subject: [PATCH 09/23] . --- cmake/cpack_settings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cpack_settings.cmake b/cmake/cpack_settings.cmake index cf1db0172e56..9f7da0af03d9 100644 --- a/cmake/cpack_settings.cmake +++ b/cmake/cpack_settings.cmake @@ -11,7 +11,7 @@ set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) # CPack variables for Debian packages set(CPACK_DEBIAN_PACKAGE_DEPENDS - "open-enclave (>=0.10.0), libuv1 (>= 1.18.0), libc++1 (>=6.0), , libc++abi1 (>=6.0)" + "open-enclave (>=0.10.0), libuv1 (>= 1.18.0), libc++1 (>=6.0), libc++abi1 (>=6.0)" ) set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) From 20dc9124b4d29d42493dcfd03af8e082946e2341 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 14:39:40 +0100 Subject: [PATCH 10/23] . --- cmake/cpack_settings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cpack_settings.cmake b/cmake/cpack_settings.cmake index 9f7da0af03d9..2fc4acfbcb75 100644 --- a/cmake/cpack_settings.cmake +++ b/cmake/cpack_settings.cmake @@ -11,7 +11,7 @@ set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) # CPack variables for Debian packages set(CPACK_DEBIAN_PACKAGE_DEPENDS - "open-enclave (>=0.10.0), libuv1 (>= 1.18.0), libc++1 (>=6.0), libc++abi1 (>=6.0)" + "open-enclave (>=0.10.0), libuv1 (>= 1.18.0), libc++1, libc++abi1" ) set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) From adaf7a2710cd3241e26f84b8741f551208b657f4 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 15:30:14 +0100 Subject: [PATCH 11/23] . --- .azure-pipelines-templates/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines-templates/install.yml b/.azure-pipelines-templates/install.yml index 8e56fd3c0718..8b8fb5444165 100644 --- a/.azure-pipelines-templates/install.yml +++ b/.azure-pipelines-templates/install.yml @@ -9,7 +9,7 @@ steps: displayName: 'Make .deb package' - script: | - sudo apt install ./$(pkgname) + sudo apt -y install ./$(pkgname) cat /tmp/install_prefix | xargs ./test_install.sh workingDirectory: build displayName: Test installed CCF From 618b9638ad379e1febf1fd97c54ac5138a147028 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 15:30:50 +0100 Subject: [PATCH 12/23] . --- .azure-pipelines-templates/common.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines-templates/common.yml b/.azure-pipelines-templates/common.yml index ef195c153d33..3df274858520 100644 --- a/.azure-pipelines-templates/common.yml +++ b/.azure-pipelines-templates/common.yml @@ -22,11 +22,11 @@ jobs: parameters: cmake_args: '${{ parameters.cmake_args }}' - - template: test.yml - parameters: - ctest_filter: ${{ parameters.ctest_filter }} - suite_name_suffix: '${{ parameters.target }} ${{ parameters.suffix }}' - ctest_timeout: ${{ parameters.ctest_timeout }} + # - template: test.yml + # parameters: + # ctest_filter: ${{ parameters.ctest_filter }} + # suite_name_suffix: '${{ parameters.target }} ${{ parameters.suffix }}' + # ctest_timeout: ${{ parameters.ctest_timeout }} - ${{ if eq(parameters.suffix, 'Instrumented') }}: - template: coverage.yml From 89fd76b5f11dd7d98869d85eb6d4ea14e2d0ce37 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 15:38:20 +0100 Subject: [PATCH 13/23] . --- .azure-pipelines-templates/common.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.azure-pipelines-templates/common.yml b/.azure-pipelines-templates/common.yml index 3df274858520..d669fe5f8224 100644 --- a/.azure-pipelines-templates/common.yml +++ b/.azure-pipelines-templates/common.yml @@ -28,20 +28,20 @@ jobs: # suite_name_suffix: '${{ parameters.target }} ${{ parameters.suffix }}' # ctest_timeout: ${{ parameters.ctest_timeout }} - - ${{ if eq(parameters.suffix, 'Instrumented') }}: - - template: coverage.yml + # - ${{ if eq(parameters.suffix, 'Instrumented') }}: + # - template: coverage.yml - - ${{ if eq(parameters.suffix, 'Instrumented') }}: - - template: scan_build.yml + # - ${{ if eq(parameters.suffix, 'Instrumented') }}: + # - template: scan_build.yml - - ${{ if eq(parameters.suffix, 'Perf') }}: - - template: push_perf_data.yml - - template: metrics.yml + # - ${{ if eq(parameters.suffix, 'Perf') }}: + # - template: push_perf_data.yml + # - template: metrics.yml - ${{ if eq(parameters.suffix, 'Release') }}: - - template: publish_build.yml - parameters: - artifact_name: ${{ parameters.artifact_name }} - tls_report: ${{ parameters.tls_report }} + # - template: publish_build.yml + # parameters: + # artifact_name: ${{ parameters.artifact_name }} + # tls_report: ${{ parameters.tls_report }} - template: install.yml \ No newline at end of file From 825392279bea3447f0aeeeae9fcc2518c67f290e Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 15:43:47 +0100 Subject: [PATCH 14/23] . --- cmake/cpack_settings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cpack_settings.cmake b/cmake/cpack_settings.cmake index 2fc4acfbcb75..7e2bfdac0f8a 100644 --- a/cmake/cpack_settings.cmake +++ b/cmake/cpack_settings.cmake @@ -11,7 +11,7 @@ set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) # CPack variables for Debian packages set(CPACK_DEBIAN_PACKAGE_DEPENDS - "open-enclave (>=0.10.0), libuv1 (>= 1.18.0), libc++1, libc++abi1" + "open-enclave (>=0.10.0), libuv1 (>= 1.18.0), libc++1-8, libc++abi1-8" ) set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) From 66df44df272f9cea8417265763ad2ed4ba9cac39 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 15:57:26 +0100 Subject: [PATCH 15/23] . --- tests/test_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_install.sh b/tests/test_install.sh index 496cf944d65d..ea2d4002ccdf 100755 --- a/tests/test_install.sh +++ b/tests/test_install.sh @@ -18,7 +18,7 @@ cd nested/run python3.7 -m venv env source env/bin/activate python -m pip install -U -r "$INSTALL_PREFIX"/bin/requirements.txt -pip freeze > "$INSTALL_PREFIX"/bin/requirements.txt +# pip freeze > "$INSTALL_PREFIX"/bin/requirements.txt # Start ephemeral network in the background network_info_file="network_info.txt" From 910d65c9c00bf7527a77985bd62b10ef0ad5c703 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 16:37:02 +0100 Subject: [PATCH 16/23] . --- .azure-pipelines-templates/common.yml | 32 +++++++++++++-------------- tests/test_install.sh | 1 - 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.azure-pipelines-templates/common.yml b/.azure-pipelines-templates/common.yml index d669fe5f8224..ef195c153d33 100644 --- a/.azure-pipelines-templates/common.yml +++ b/.azure-pipelines-templates/common.yml @@ -22,26 +22,26 @@ jobs: parameters: cmake_args: '${{ parameters.cmake_args }}' - # - template: test.yml - # parameters: - # ctest_filter: ${{ parameters.ctest_filter }} - # suite_name_suffix: '${{ parameters.target }} ${{ parameters.suffix }}' - # ctest_timeout: ${{ parameters.ctest_timeout }} + - template: test.yml + parameters: + ctest_filter: ${{ parameters.ctest_filter }} + suite_name_suffix: '${{ parameters.target }} ${{ parameters.suffix }}' + ctest_timeout: ${{ parameters.ctest_timeout }} - # - ${{ if eq(parameters.suffix, 'Instrumented') }}: - # - template: coverage.yml + - ${{ if eq(parameters.suffix, 'Instrumented') }}: + - template: coverage.yml - # - ${{ if eq(parameters.suffix, 'Instrumented') }}: - # - template: scan_build.yml + - ${{ if eq(parameters.suffix, 'Instrumented') }}: + - template: scan_build.yml - # - ${{ if eq(parameters.suffix, 'Perf') }}: - # - template: push_perf_data.yml - # - template: metrics.yml + - ${{ if eq(parameters.suffix, 'Perf') }}: + - template: push_perf_data.yml + - template: metrics.yml - ${{ if eq(parameters.suffix, 'Release') }}: - # - template: publish_build.yml - # parameters: - # artifact_name: ${{ parameters.artifact_name }} - # tls_report: ${{ parameters.tls_report }} + - template: publish_build.yml + parameters: + artifact_name: ${{ parameters.artifact_name }} + tls_report: ${{ parameters.tls_report }} - template: install.yml \ No newline at end of file diff --git a/tests/test_install.sh b/tests/test_install.sh index ea2d4002ccdf..96ef37ddd522 100755 --- a/tests/test_install.sh +++ b/tests/test_install.sh @@ -18,7 +18,6 @@ cd nested/run python3.7 -m venv env source env/bin/activate python -m pip install -U -r "$INSTALL_PREFIX"/bin/requirements.txt -# pip freeze > "$INSTALL_PREFIX"/bin/requirements.txt # Start ephemeral network in the background network_info_file="network_info.txt" From f7a393c4605da3d67d6e3ceac4c5a3084ed00c97 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 16:50:12 +0100 Subject: [PATCH 17/23] Update to .deb --- .azure-pipelines-templates/release.yml | 4 ++-- getting_started/setup_vm/roles/ccf_install/vars/common.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines-templates/release.yml b/.azure-pipelines-templates/release.yml index 60ea78892298..30022e94f41a 100644 --- a/.azure-pipelines-templates/release.yml +++ b/.azure-pipelines-templates/release.yml @@ -11,7 +11,7 @@ jobs: - task: DownloadPipelineArtifact@2 inputs: source: current - patterns: '**/ccf*.tar.gz' + patterns: '**/ccf*.deb' path: $(Build.ArtifactStagingDirectory) - task: GitHubRelease@0 @@ -21,7 +21,7 @@ jobs: action: 'create' target: '$(Build.SourceVersion)' tagSource: 'auto' - assets: $(Build.ArtifactStagingDirectory)/**/ccf.tar.gz + assets: $(Build.ArtifactStagingDirectory)/**/ccf*.deb assetUploadMode: 'delete' isDraft: true isPreRelease: true diff --git a/getting_started/setup_vm/roles/ccf_install/vars/common.yml b/getting_started/setup_vm/roles/ccf_install/vars/common.yml index 65baecb8eb31..93c99b0ea25d 100644 --- a/getting_started/setup_vm/roles/ccf_install/vars/common.yml +++ b/getting_started/setup_vm/roles/ccf_install/vars/common.yml @@ -4,3 +4,4 @@ ccf_tarball: "ccf.tar.gz" ccf_suffix: "{{ 'latest/download' if ccf_ver == 'latest' else 'download/ccf-' + ccf_ver }}" ccf_url: "https://github.com/microsoft/CCF/releases/{{ ccf_suffix }}/{{ ccf_tarball }}" ccf_prefix: "/opt/openenclave" +ccf_deb_url: "https://github.com/microsoft/CCF/releases/{{ ccf_suffix }}/ccf_{{ ccf_ver }}_amd64.deb" From d1a3a0c32e7b0321f8ed7c9716f2029cf65aadc9 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 16:53:18 +0100 Subject: [PATCH 18/23] . --- getting_started/setup_vm/app-dev.yml | 2 +- getting_started/setup_vm/app-run.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/getting_started/setup_vm/app-dev.yml b/getting_started/setup_vm/app-dev.yml index 39c52f15f186..bde0da587a70 100644 --- a/getting_started/setup_vm/app-dev.yml +++ b/getting_started/setup_vm/app-dev.yml @@ -22,4 +22,4 @@ tasks_from: install.yml - import_role: name: ccf_install - tasks_from: install.yml \ No newline at end of file + tasks_from: deb_install.yml \ No newline at end of file diff --git a/getting_started/setup_vm/app-run.yml b/getting_started/setup_vm/app-run.yml index 3518718b9050..3dd8f200abfb 100644 --- a/getting_started/setup_vm/app-run.yml +++ b/getting_started/setup_vm/app-run.yml @@ -19,4 +19,4 @@ tasks_from: install.yml - import_role: name: ccf_install - tasks_from: install.yml \ No newline at end of file + tasks_from: deb_install.yml \ No newline at end of file From f3053301456b26dea9ba1789c0c07e0b00a0f43a Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 16:54:42 +0100 Subject: [PATCH 19/23] Run deps are captured by .deb --- getting_started/setup_vm/app-dev.yml | 3 --- getting_started/setup_vm/app-run.yml | 3 --- 2 files changed, 6 deletions(-) diff --git a/getting_started/setup_vm/app-dev.yml b/getting_started/setup_vm/app-dev.yml index bde0da587a70..3feca506d590 100644 --- a/getting_started/setup_vm/app-dev.yml +++ b/getting_started/setup_vm/app-dev.yml @@ -14,9 +14,6 @@ - import_role: name: llvm_repo tasks_from: install.yml - - import_role: - name: ccf_run - tasks_from: install.yml - import_role: name: ccf_build tasks_from: install.yml diff --git a/getting_started/setup_vm/app-run.yml b/getting_started/setup_vm/app-run.yml index 3dd8f200abfb..ba9c69fae7d8 100644 --- a/getting_started/setup_vm/app-run.yml +++ b/getting_started/setup_vm/app-run.yml @@ -14,9 +14,6 @@ - import_role: name: llvm_repo tasks_from: install.yml - - import_role: - name: ccf_run - tasks_from: install.yml - import_role: name: ccf_install tasks_from: deb_install.yml \ No newline at end of file From 38eb0280b097008263823d1c0210ec4d2e93eb3c Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 16:59:09 +0100 Subject: [PATCH 20/23] . --- .../roles/ccf_install/tasks/deb_install.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 getting_started/setup_vm/roles/ccf_install/tasks/deb_install.yml diff --git a/getting_started/setup_vm/roles/ccf_install/tasks/deb_install.yml b/getting_started/setup_vm/roles/ccf_install/tasks/deb_install.yml new file mode 100644 index 000000000000..445dd8f5b5c5 --- /dev/null +++ b/getting_started/setup_vm/roles/ccf_install/tasks/deb_install.yml @@ -0,0 +1,23 @@ +- name: Include vars + include_vars: common.yml + +- name: Install CCF + apt: + deb: "{{ ccf_deb_url }}" + become: yes + +- name: Copy cchost + copy: + src: "/opt/ccf-{{ ccf_ver }}/bin/cchost" + dest: "/usr/bin/cchost" + remote_src: true + mode: a=rx + become: true + when: run_only|bool + +- name: Remove release + apt: + deb: ccf + state: absent + become: true + when: run_only|bool \ No newline at end of file From 33f6e1ccef036fb052b5dd6516e3464bf3fe88dc Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Thu, 30 Jul 2020 21:44:27 +0100 Subject: [PATCH 21/23] . --- cmake/cpack_settings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cpack_settings.cmake b/cmake/cpack_settings.cmake index 7e2bfdac0f8a..fa5ecc249949 100644 --- a/cmake/cpack_settings.cmake +++ b/cmake/cpack_settings.cmake @@ -15,4 +15,4 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS ) set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) -include(CPack) \ No newline at end of file +include(CPack) From 4941274cf1858ab49c47e7dc97b88f7a28907920 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Fri, 31 Jul 2020 11:03:25 +0100 Subject: [PATCH 22/23] . --- cmake/cpack_settings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cpack_settings.cmake b/cmake/cpack_settings.cmake index fa5ecc249949..75d61a67d154 100644 --- a/cmake/cpack_settings.cmake +++ b/cmake/cpack_settings.cmake @@ -11,7 +11,7 @@ set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) # CPack variables for Debian packages set(CPACK_DEBIAN_PACKAGE_DEPENDS - "open-enclave (>=0.10.0), libuv1 (>= 1.18.0), libc++1-8, libc++abi1-8" + "open-enclave (>=0.10.0), libuv1 (>= 1.18.0), libc++1-8, libc++abi1-8, libcurl4" ) set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) From 1bd1741cf98f72ea3bdbf456dd09d025701c32c1 Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Fri, 31 Jul 2020 11:10:50 +0100 Subject: [PATCH 23/23] . --- cmake/cpack_settings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cpack_settings.cmake b/cmake/cpack_settings.cmake index 75d61a67d154..32886cbd783e 100644 --- a/cmake/cpack_settings.cmake +++ b/cmake/cpack_settings.cmake @@ -4,7 +4,7 @@ include(InstallRequiredSystemLibraries) set(CPACK_PACKAGE_NAME "ccf") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Confidential Consortium Framework") -set(CPACK_PACKAGE_CONTACT "ccfeng@microsoft.com") +set(CPACK_PACKAGE_CONTACT "https://github.com/Microsoft/CCF") set(CPACK_RESOURCE_FILE_LICENSE "${CCF_DIR}/LICENSE") set(CPACK_PACKAGE_VERSION ${CCF_RELEASE_VERSION}) set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})