├── .github ├── CODEOWNERS └── workflows │ ├── auto-approve-and-enable-auto-merge.yml │ ├── auto-backport.yml │ ├── auto-recipe-update.yml │ ├── build-test-all-branches.yml │ ├── build-test-recipe.yml │ ├── ff-merge.yml │ ├── nightly-cve-check.yml │ ├── oelint-adv.yml │ ├── pr-cve-check.yml │ └── yocto-check-layer.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── classes ├── aws-ec2-image.bbclass └── aws-firecracker-image.bbclass ├── conf ├── layer.conf └── machine │ ├── aws-ec2-arm64.conf │ ├── aws-ec2-x86-64.conf │ └── include │ └── aws-ec2-base.inc ├── dynamic-layers └── virtualization-layer │ └── recipes-extended │ └── cloud-init │ ├── cloud-init_%.bbappend │ └── files │ └── cloud.cfg ├── images ├── Arch_AWS-Command-Line-Interface_64.png ├── Arch_AWS-Firecracker.png ├── Arch_AWS-IoT-FleetWise_64.svg ├── Arch_AWS-IoT-Greengrass_64.png ├── Arch_AWS-Tools-and-SDKs_64.png ├── Arch_Amazon-CloudWatch_64.png ├── Arch_Amazon-EC2_64.svg ├── LF_17_02_Yocto-Badge-Update_Compatible_Final_Blank.png ├── corretto.png └── lf_yp_plat.png ├── recipes-cloud ├── amazon-cloudwatch-agent │ ├── amazon-cloudwatch-agent_1.300054.0.bb │ └── files │ │ ├── 001-makefile.patch │ │ └── run-ptest └── amazon-cloudwatch-publisher │ ├── amazon-cloudwatch-publisher_1.2.4.bb │ └── files │ └── run-ptest ├── recipes-containers └── firecracker-bin │ ├── firecracker-bin │ └── run-ptest │ ├── firecracker-bin_1.10.1.bb │ ├── jailer-bin │ └── run-ptest │ └── jailer-bin_1.10.1.bb ├── recipes-devtools ├── amazon-corretto │ ├── corretto-11-bin │ │ └── run-ptest │ ├── corretto-11-bin_11.0.27.6.1.bb │ ├── corretto-17-bin │ │ └── run-ptest │ ├── corretto-17-bin_17.0.15.6.1.bb │ ├── corretto-21-bin │ │ └── run-ptest │ ├── corretto-21-bin_21.0.7.6.1.bb │ ├── corretto-8-bin │ │ └── run-ptest │ ├── corretto-8-bin_8.452.09.1.bb │ └── corretto-bin-common.inc └── python │ ├── python3-boto3 │ └── run-ptest │ ├── python3-boto3_1.38.29.bb │ ├── python3-botocore │ └── run-ptest │ ├── python3-botocore_1.38.29.bb │ ├── python3-jmespath_%.bbappend │ ├── python3-ruamel-yaml-clib_0.2.12.bb │ ├── python3-s3transfer │ └── run-ptest │ ├── python3-s3transfer_0.13.0.bb │ └── python3-urllib3-1.x_1.26.20.bb ├── recipes-extended └── openssh │ └── openssh_%.bbappend ├── recipes-external └── python3-timeloop │ └── python3-timeloop_1.0.2.bb ├── recipes-iot ├── aws-iot-device-client │ ├── aws-iot-device-client_1.10.1.bb │ └── files │ │ ├── 001-disable-tests.patch │ │ └── run-ptest ├── aws-iot-fleetwise │ ├── README.md │ ├── aws-iot-fleetwise-edge_1.3.1.bb │ └── files │ │ ├── 001-remove-cxx-standard.patch │ │ ├── ptest_result.py │ │ └── run-ptest ├── aws-iot-greengrass │ ├── README.md │ ├── greengrass-bin-demo.bb │ ├── greengrass-bin-demo │ │ ├── demo.cert.pem │ │ ├── demo.pkey.pem │ │ ├── demo.root.pem │ │ └── greengrassv2-init.yaml │ ├── greengrass-bin │ │ ├── claim.cert.pem │ │ ├── claim.pkey.pem │ │ ├── claim.root.pem │ │ ├── config.yaml.template │ │ ├── greengrass.service.patch │ │ ├── greengrassv2-init.yaml │ │ ├── loader.patch │ │ ├── replace_board_id.sh │ │ └── run-ptest │ ├── greengrass-bin_2.14.1.bb │ ├── greengrass-lite │ │ ├── 001-disable_strip.patch │ │ ├── greengrass-lite.yaml │ │ └── run-ptest │ └── greengrass-lite_2.1.0.bb └── aws-iot-securetunneling-localproxy │ ├── aws-iot-securetunneling-localproxy_git.bb │ └── files │ ├── 0001-boost-support-any.patch │ ├── 0002-remove-cxx-standard.patch │ ├── 0003-boost-include-format.patch │ ├── 0004-cmake-version.patch │ └── run-ptest ├── recipes-kernel └── linux │ ├── files │ └── aws-ec2.cfg │ └── linux-yocto_%.bbappend ├── recipes-sdk ├── amazon-kvs-producer-sdk │ ├── amazon-kvs-producer-pic │ │ ├── ptest_result.py │ │ └── run-ptest │ ├── amazon-kvs-producer-pic_1.1.0.bb │ ├── amazon-kvs-producer-sdk-c_1.5.2.bb │ ├── amazon-kvs-producer-sdk-cpp │ │ ├── amazon-kvs-producer-sdk-cpp-deps.patch │ │ └── global-thread-sleep-linkerror.patch │ └── amazon-kvs-producer-sdk-cpp_3.4.2.bb ├── amazon-kvs-webrtc-sdk │ ├── amazon-kvs-webrtc-sdk_1.12.1.bb │ └── files │ │ ├── ptest_result.py │ │ └── run-ptest ├── aws-c-auth │ ├── aws-c-auth_0.9.0.bb │ └── files │ │ └── run-ptest ├── aws-c-cal │ ├── aws-c-cal_0.9.1.bb │ └── files │ │ └── run-ptest ├── aws-c-common │ ├── aws-c-common_0.12.3.bb │ └── files │ │ ├── ptest_result.py │ │ └── run-ptest ├── aws-c-compression │ ├── aws-c-compression_0.3.1.bb │ └── files │ │ └── run-ptest ├── aws-c-event-stream │ ├── aws-c-event-stream_0.5.4.bb │ └── files │ │ └── run-ptest ├── aws-c-http │ ├── aws-c-http_0.10.1.bb │ └── files │ │ └── run-ptest ├── aws-c-io │ ├── aws-c-io │ │ └── run-ptest │ └── aws-c-io_0.19.1.bb ├── aws-c-iot │ ├── aws-c-iot │ │ └── run-ptest │ └── aws-c-iot_0.2.1.bb ├── aws-c-mqtt │ ├── aws-c-mqtt │ │ └── run-ptest │ └── aws-c-mqtt_0.13.1.bb ├── aws-c-s3 │ ├── aws-c-s3_0.8.0.bb │ └── files │ │ └── run-ptest ├── aws-c-sdkutils │ ├── aws-c-sdkutils_0.2.4.bb │ └── files │ │ └── run-ptest ├── aws-checksums │ ├── aws-checksums_0.2.7.bb │ └── files │ │ └── run-ptest ├── aws-crt-cpp │ ├── aws-crt-cpp │ │ ├── 001-shared-static-crt-libs.patch │ │ └── run-ptest │ └── aws-crt-cpp_0.32.5.bb ├── aws-crt-python │ ├── aws-crt-python_0.27.2.bb │ └── files │ │ └── run-ptest ├── aws-iot-device-sdk-cpp-v2 │ ├── aws-iot-device-sdk-cpp-v2-samples-fleet-provisoning.bb │ ├── aws-iot-device-sdk-cpp-v2-samples-fleet-provisoning │ │ └── run-ptest │ ├── aws-iot-device-sdk-cpp-v2-samples-mqtt5-pubsub.bb │ ├── aws-iot-device-sdk-cpp-v2-samples.inc │ ├── aws-iot-device-sdk-cpp-v2-version.inc │ ├── aws-iot-device-sdk-cpp-v2 │ │ ├── 001-shared-static-crt-libs.patch │ │ └── run-ptest │ └── aws-iot-device-sdk-cpp-v2_1.35.1.bb ├── aws-iot-device-sdk-embedded-c │ ├── aws-iot-device-sdk-embedded-c_202412.00.bb │ └── files │ │ └── run-ptest ├── aws-iot-device-sdk-python-v2 │ ├── aws-iot-device-sdk-python-v2 │ │ └── run-ptest │ └── aws-iot-device-sdk-python-v2_1.22.2.bb ├── aws-lc │ ├── aws-lc_1.52.1.bb │ └── files │ │ └── run-ptest ├── aws-sdk-cpp │ ├── aws-sdk-cpp_1.11.581.bb │ └── files │ │ ├── ptest_result.py │ │ └── run-ptest ├── linux-webrtc-reference-for-amazon-kinesis-video-streams │ ├── files │ │ └── run-ptest │ └── linux-webrtc-reference-for-amazon-kinesis-video-streams_git.bb └── s2n │ ├── s2n │ └── run-ptest │ └── s2n_1.5.20.bb ├── recipes-support ├── amazon-ssm-agent │ ├── amazon-ssm-agent_3.3.2471.0.bb │ └── files │ │ └── run-ptest ├── aws-cli-v2 │ ├── aws-cli-v2 │ │ └── run-ptest │ └── aws-cli-v2_2.27.28.bb └── aws-cli │ ├── aws-cli │ └── run-ptest │ └── aws-cli_1.40.28.bb ├── scripts └── ec2-ami │ ├── README.md │ ├── create-ec2-ami.sh │ └── vmimport-cfn.yml └── wic └── efi-disk.wks.in /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Global owners 2 | * @aws4embeddedlinux/yoctogerians 3 | -------------------------------------------------------------------------------- /.github/workflows/auto-approve-and-enable-auto-merge.yml: -------------------------------------------------------------------------------- 1 | name: auto approve and enable auto-merge 2 | 3 | on: 4 | pull_request: 5 | types: [review_requested] 6 | branches: 7 | - '*-next' 8 | 9 | jobs: 10 | auto-approve-and-merge: 11 | runs-on: ubuntu-22.04 12 | name: auto approve and enable auto-merge 13 | steps: 14 | - name: Sleep (give PR time to create labels) 15 | run: sleep 1m 16 | shell: bash 17 | 18 | - name: Check label after delay 19 | uses: docker://agilepathway/pull-request-label-checker:v1.6.55 20 | with: 21 | any_of: version-upgrade 22 | repo_token: ${{ secrets.BOT2_CREDENTIAL }} 23 | 24 | - name: Auto approve 25 | uses: juliangruber/approve-pull-request-action@v2.0.6 26 | with: 27 | github-token: ${{ secrets.BOT2_CREDENTIAL }} 28 | number: ${{ github.event.pull_request.number }} 29 | 30 | - name: Enable Pull Request Automerge 31 | uses: peter-evans/enable-pull-request-automerge@v3.0.0 32 | with: 33 | token: ${{ secrets.BOT2_CREDENTIAL }} 34 | pull-request-number: ${{ github.event.pull_request.number }} 35 | merge-method: rebase 36 | -------------------------------------------------------------------------------- /.github/workflows/auto-backport.yml: -------------------------------------------------------------------------------- 1 | name: auto-backport 2 | 3 | on: 4 | pull_request_target: 5 | branches: 6 | - master-next 7 | types: ["closed"] 8 | permissions: 9 | contents: write 10 | pull-requests: write 11 | jobs: 12 | backport: 13 | name: Backport pull request 14 | runs-on: ubuntu-22.04 15 | # Only run when pull request is merged and labeled 'backport' 16 | if: (github.event.pull_request.merged == true ) && 17 | (contains(github.event.pull_request.labels.*.name, 'version-upgrade') || contains(github.event.pull_request.labels.*.name, 'auto-backport')) 18 | steps: 19 | - uses: actions/checkout@v3 20 | with: 21 | fetch-depth: 0 22 | - name: Create backport pull requests 23 | uses: korthout/backport-action@v3.1.0 24 | with: 25 | target_branches: kirkstone-next scarthgap-next walnascar-next 26 | # copy all labels (backport labels are automatically skipped) 27 | copy_labels_pattern: .+ 28 | github_token: ${{ secrets.BOT_CREDENTIAL }} 29 | -------------------------------------------------------------------------------- /.github/workflows/auto-recipe-update.yml: -------------------------------------------------------------------------------- 1 | name: auto-recipe-update 2 | on: 3 | schedule: 4 | - cron: '0 1 * * 2-5' 5 | workflow_dispatch: 6 | jobs: 7 | update: 8 | name: Recipe Update 9 | runs-on: ubuntu-22.04 10 | steps: 11 | - name: Setup Yocto Dependencies 12 | run: | 13 | sudo apt install gawk wget git diffstat unzip texinfo gcc \ 14 | build-essential chrpath socat cpio python3 python3-pip \ 15 | python3-pexpect xz-utils debianutils iputils-ping python3-git \ 16 | python3-jinja2 xterm python3-subunit zstd liblz4-tool 17 | git config --global user.name aws-iot-embedded-linux-ci 18 | git config --global user.email aws-iot-embedded-linux-ci@users.noreply.github.com 19 | git clone git://git.yoctoproject.org/poky -b ${{ github.ref_name }} 20 | git clone https://github.com/openembedded/meta-openembedded.git -b ${{ github.ref_name }} 21 | - name: Clone Our Layer 22 | uses: actions/checkout@v4 23 | with: 24 | ref: ${{ github.ref_name }}-next 25 | path: meta-aws 26 | fetch-depth: 0 27 | - name: Clone CI Tolls Repo 28 | uses: actions/checkout@v4 29 | with: 30 | path: ci 31 | repository: 'aws4embeddedlinux/meta-aws-ci' 32 | ref: master 33 | - name: Install Helper Tool 34 | run: | 35 | pip install ci/auto-upgrader 36 | - name: Run Update 37 | run: | 38 | source poky/oe-init-build-env build 39 | git -C ../poky status 40 | git -C ../meta-openembedded/ status 41 | git -C ../meta-aws/ status 42 | bitbake-layers add-layer ../meta-openembedded/meta-oe 43 | bitbake-layers add-layer ../meta-openembedded/meta-python 44 | bitbake-layers add-layer ../meta-openembedded/meta-multimedia 45 | bitbake-layers add-layer ../meta-openembedded/meta-networking 46 | bitbake-layers add-layer ../meta-aws 47 | upgrader update --layer-path ../meta-aws --target-branch=${{ github.ref_name }}-next 48 | - name: Push Result 49 | working-directory: meta-aws 50 | run: | 51 | cat ../build/branches.txt | xargs -n1 git push origin 52 | - name: Create Pulls 53 | working-directory: meta-aws 54 | env: 55 | GITHUB_TOKEN: ${{ secrets.BOT_CREDENTIAL }} 56 | run: | 57 | upgrader create-pulls --branch-file=../build/branches.txt --repo=${{ github.repository }} --target-branch=${{ github.ref_name }}-next --delay 300 58 | - name: Publish Artifacts 59 | uses: actions/upload-artifact@v4 60 | with: 61 | name: updated-recipes 62 | path: | 63 | ./build/result.json 64 | ./build/upgrader.log 65 | ./build/branches.txt 66 | -------------------------------------------------------------------------------- /.github/workflows/ff-merge.yml: -------------------------------------------------------------------------------- 1 | name: ff-merge 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | branches: 6 | description: 'branches to ff merge branch-next into' 7 | default: '["master", "dunfell", "gatesgarth", "hardknott", "honister", "kirkstone", "zeus", "langdale", "mickledore", "nanbield", "scarthgap", "styhead", "walnascar"]' 8 | required: true 9 | jobs: 10 | ff-merge: 11 | runs-on: ubuntu-22.04 12 | strategy: 13 | matrix: 14 | branch: ${{ fromJson(github.event.inputs.branches) }} 15 | fail-fast: false 16 | steps: 17 | - name: clone meta-aws ${{ github.event.inputs.branches }} branch 18 | uses: actions/checkout@v4 19 | with: 20 | ref: ${{ matrix.branch }} 21 | path: meta-aws 22 | fetch-depth: 0 23 | token: ${{ secrets.BOT_CREDENTIAL }} 24 | - name: merge ${{ matrix.branch }}-next into ${{ matrix.branch }} 25 | working-directory: meta-aws 26 | run: | 27 | git config --global user.name aws-iot-embedded-linux-ci 28 | git config --global user.email aws-iot-embedded-linux-ci@users.noreply.github.com 29 | git merge --ff-only origin/${{ matrix.branch }}-next 30 | - name: push ${{ matrix.branch }} 31 | working-directory: meta-aws 32 | run: | 33 | git push -u origin ${{ matrix.branch }} 34 | -------------------------------------------------------------------------------- /.github/workflows/nightly-cve-check.yml: -------------------------------------------------------------------------------- 1 | name: nightly-cve-check 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '0 0 * * *' 7 | jobs: 8 | nightly-cve-check: 9 | runs-on: ubuntu-22.04 10 | steps: 11 | - name: Install required packages to run nighly-cve-check 12 | run: | 13 | sudo apt-get -y install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 xz-utils zstd liblz4-tool locales 14 | echo "en_US.UTF-8 UTF-8" | sudo tee --append /etc/locale.gen 15 | sudo locale-gen 16 | - name: Checkout meta-aws 17 | uses: actions/checkout@v3 18 | with: 19 | path: yocto_cve/meta-aws 20 | - name: Checkout meta-oe 21 | uses: actions/checkout@v3 22 | with: 23 | repository: openembedded/meta-openembedded 24 | path: yocto_cve/meta-openembedded 25 | - name: Checkout poky 26 | run: | 27 | cd yocto_cve/ 28 | git clone git://git.yoctoproject.org/poky --single-branch 29 | - name: Cache sstate + downloads 30 | uses: actions/cache@v3 31 | with: 32 | path: | 33 | yocto_cve/build/sstate-cache 34 | yocto_cve/build/downloads 35 | key: cache-cve-sstate-downloads 36 | - name: Run CVE check 37 | run: | 38 | cd yocto_cve/ 39 | source poky/oe-init-build-env build 40 | bitbake-layers add-layer ../meta-openembedded/meta-oe 41 | bitbake-layers add-layer ../meta-openembedded/meta-python 42 | bitbake-layers add-layer ../meta-openembedded/meta-networking 43 | bitbake-layers add-layer ../meta-openembedded/meta-multimedia 44 | bitbake-layers add-layer ../meta-aws 45 | echo 'INHERIT += "cve-check"' >> conf/local.conf 46 | echo DISTRO = \"poky-altcfg\" >> conf/local.conf 47 | bitbake -c cve_check `find ../meta-aws -name *.bb -type f | sed 's!.*/!!' | sed 's!.bb!!' | sed 's!_.*!!' | sort | uniq | sed -z 's/\n/ /g'` 48 | - name: Show cve-summary.json 49 | run: | 50 | cat yocto_cve/build/tmp/log/cve/cve-summary.json 51 | - name: Check results (cve-summary.json) for unpatched CVEs 52 | shell: bash {0} 53 | run: | 54 | # find unpatched cvs and always exit 0 to not fail the step, but store return value 55 | jq -e '.package[] | select(.issue[].status | contains ("Unpatched") )' yocto_cve/build/tmp/log/cve/cve-summary.json > cve-unpatched.json ; ret=$?; true 56 | if [ $ret -eq 0 ]; then 57 | echo "::error::Found unpatched CVEs in packages: $(jq -e '. | select(.issue[].status | contains ("Unpatched") ) | .name' cve-unpatched.json)" 58 | exit 1 59 | elif [ $ret -eq 4 ]; then 60 | echo "::notice::No unpatched CVEs found" 61 | exit 0 62 | else 63 | echo "::error::General error" 64 | exit 99 65 | fi 66 | - name: Generate step summary 67 | if: '!cancelled()' 68 | run: | 69 | if [ -s cve-unpatched.json ]; then 70 | echo -e "# Found unpatched CVE(s) in package(s):" >> $GITHUB_STEP_SUMMARY 71 | cat cve-unpatched.json >> $GITHUB_STEP_SUMMARY 72 | else 73 | echo -e "# No unpatched CVE(s) found" >> $GITHUB_STEP_SUMMARY 74 | fi 75 | echo -e "# CVE-SUMMARY:\n" >> $GITHUB_STEP_SUMMARY 76 | cat yocto_cve/build/tmp/log/cve/cve-summary.json >> $GITHUB_STEP_SUMMARY 77 | - name: Save cve-summary.json 78 | if: '!cancelled()' 79 | uses: actions/upload-artifact@v4 80 | with: 81 | name: cve-summary.json 82 | path: yocto_cve/build/tmp/log/cve/cve-summary.json 83 | - name: Save cve-summary 84 | if: '!cancelled()' 85 | uses: actions/upload-artifact@v4 86 | with: 87 | name: cve-summary 88 | path: yocto_cve/build/tmp/log/cve/cve-summary 89 | if-no-files-found: ignore 90 | - name: Save cve-unpatched.json 91 | if: '!cancelled()' 92 | uses: actions/upload-artifact@v4 93 | with: 94 | name: cve-unpatched.json 95 | path: cve-unpatched.json 96 | if-no-files-found: ignore 97 | -------------------------------------------------------------------------------- /.github/workflows/oelint-adv.yml: -------------------------------------------------------------------------------- 1 | name: oelint-adv 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - '*-next' 7 | 8 | jobs: 9 | oelint-adv: 10 | runs-on: ubuntu-22.04 11 | 12 | steps: 13 | - name: install required packages to run oelint_adv 14 | run: | 15 | sudo apt-get -y install python3-pip 16 | sudo pip3 install oelint_adv 17 | 18 | - name: checkout meta-aws branch to test 19 | uses: actions/checkout@v3 20 | with: 21 | fetch-depth: 0 22 | 23 | - name: get changed bb files 24 | id: changes 25 | run: | 26 | echo "::set-output name=bb::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .bb | xargs)" 27 | 28 | - name: run oelint_adv 29 | if: ${{steps.changes.outputs.bb}} 30 | run: | 31 | oelint-adv --suppress oelint.vars.unpackdir --nowarn --noinfo ${{steps.changes.outputs.bb}} 32 | -------------------------------------------------------------------------------- /.github/workflows/pr-cve-check.yml: -------------------------------------------------------------------------------- 1 | name: pr-cve-check 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | branches: 7 | - 'master-next' 8 | paths: 9 | - '**.bb' 10 | - '**.inc' 11 | jobs: 12 | pr-cve-check: 13 | runs-on: ubuntu-22.04 14 | steps: 15 | - name: Install required packages to run cve-check 16 | run: | 17 | sudo apt-get -y install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 xz-utils zstd liblz4-tool locales 18 | echo "en_US.UTF-8 UTF-8" | sudo tee --append /etc/locale.gen 19 | sudo locale-gen 20 | - name: Checkout meta-aws 21 | uses: actions/checkout@v3 22 | with: 23 | path: yocto_cve/meta-aws 24 | - name: Checkout meta-oe 25 | uses: actions/checkout@v3 26 | with: 27 | repository: openembedded/meta-openembedded 28 | path: yocto_cve/meta-openembedded 29 | - name: Checkout poky 30 | run: | 31 | cd yocto_cve/ 32 | git clone git://git.yoctoproject.org/poky --single-branch 33 | - name: Cache sstate + downloads 34 | uses: actions/cache@v3 35 | with: 36 | path: | 37 | yocto_cve/build/sstate-cache 38 | yocto_cve/build/downloads 39 | key: cache-cve-sstate-downloads 40 | - name: Run CVE check 41 | run: | 42 | cd yocto_cve/ 43 | source poky/oe-init-build-env build 44 | bitbake-layers add-layer ../meta-openembedded/meta-oe 45 | bitbake-layers add-layer ../meta-openembedded/meta-python 46 | bitbake-layers add-layer ../meta-openembedded/meta-networking 47 | bitbake-layers add-layer ../meta-openembedded/meta-multimedia 48 | bitbake-layers add-layer ../meta-aws 49 | echo 'INHERIT += "cve-check"' >> conf/local.conf 50 | echo DISTRO = \"poky-altcfg\" >> conf/local.conf 51 | bitbake -c cve_check `find ../meta-aws -name *.bb -type f | sed 's!.*/!!' | sed 's!.bb!!' | sed 's!_.*!!' | sort | uniq | sed -z 's/\n/ /g'` 52 | - name: Show cve-summary.json 53 | run: | 54 | cat yocto_cve/build/tmp/log/cve/cve-summary.json 55 | - name: Check results (cve-summary.json) for unpatched CVEs 56 | shell: bash {0} 57 | run: | 58 | # find unpatched cvs and always exit 0 to not fail the step, but store return value 59 | jq -e '.package[] | select(.issue[].status | contains ("Unpatched") )' yocto_cve/build/tmp/log/cve/cve-summary.json > cve-unpatched.json ; ret=$?; true 60 | if [ $ret -eq 0 ]; then 61 | echo "::error::Found unpatched CVEs in packages: $(jq -e '. | select(.issue[].status | contains ("Unpatched") ) | .name' cve-unpatched.json)" 62 | exit 1 63 | elif [ $ret -eq 4 ]; then 64 | echo "::notice::No unpatched CVEs found" 65 | exit 0 66 | else 67 | echo "::error::General error" 68 | exit 99 69 | fi 70 | - name: Generate step summary 71 | if: '!cancelled()' 72 | run: | 73 | if [ -s cve-unpatched.json ]; then 74 | echo -e "# Found unpatched CVE(s) in package(s):" >> $GITHUB_STEP_SUMMARY 75 | cat cve-unpatched.json >> $GITHUB_STEP_SUMMARY 76 | else 77 | echo -e "# No unpatched CVE(s) found" >> $GITHUB_STEP_SUMMARY 78 | fi 79 | echo -e "# CVE-SUMMARY:\n" >> $GITHUB_STEP_SUMMARY 80 | cat yocto_cve/build/tmp/log/cve/cve-summary.json >> $GITHUB_STEP_SUMMARY 81 | - name: Save cve-summary.json 82 | if: '!cancelled()' 83 | uses: actions/upload-artifact@v4.4.0 84 | with: 85 | name: cve-summary.json 86 | path: yocto_cve/build/tmp/log/cve/cve-summary.json 87 | - name: Save cve-summary 88 | if: '!cancelled()' 89 | uses: actions/upload-artifact@v4.4.0 90 | with: 91 | name: cve-summary 92 | path: yocto_cve/build/tmp/log/cve/cve-summary 93 | if-no-files-found: ignore 94 | - name: Save cve-unpatched.json 95 | if: '!cancelled()' 96 | uses: actions/upload-artifact@v4.4.0 97 | with: 98 | name: cve-unpatched.json 99 | path: cve-unpatched.json 100 | if-no-files-found: ignore 101 | -------------------------------------------------------------------------------- /.github/workflows/yocto-check-layer.yml: -------------------------------------------------------------------------------- 1 | name: yocto-check-layer 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - '*-next' 7 | 8 | jobs: 9 | yocto-check-layer: 10 | runs-on: 11 | group: meta-aws 12 | labels: meta-aws_ubuntu-latest_32-core 13 | steps: 14 | - name: get yocto release name 15 | id: get-yocto-release-name 16 | run: | 17 | release_name=$(echo ${{github.event.pull_request.base.ref}} | cut -d- -f1) 18 | # this is deprecated, but replacement does not seem to work now? 19 | echo "::set-output name=release_name::$release_name" 20 | - name: install required packages to run yocto-check-layer 21 | run: | 22 | sudo apt-get -y install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 xz-utils zstd liblz4-tool locales 23 | echo "en_US.UTF-8 UTF-8" | sudo tee --append /etc/locale.gen 24 | sudo locale-gen 25 | sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 26 | - name: checkout meta-aws branch to test 27 | uses: actions/checkout@v3 28 | with: 29 | path: yocto_checklayer/meta-aws 30 | - name: checkout meta-oe 31 | uses: actions/checkout@v3 32 | with: 33 | repository: openembedded/meta-openembedded 34 | path: yocto_checklayer/meta-openembedded 35 | ref: ${{steps.get-yocto-release-name.outputs.release_name}} 36 | - name: checkout poky 37 | run: | 38 | cd yocto_checklayer/ 39 | git clone git://git.yoctoproject.org/poky --single-branch -b ${{steps.get-yocto-release-name.outputs.release_name}} 40 | - name: run yocto-check-layer 41 | run: | 42 | cd yocto_checklayer/ 43 | source poky/oe-init-build-env build 44 | yocto-check-layer ../meta-aws/ --dependency ../meta-openembedded/meta-oe/ ../meta-openembedded/meta-python/ ../meta-openembedded/meta-multimedia ../meta-openembedded/meta-networking --output-log ycl-check_meta-aws.log --debug --no-auto --no-auto-dependency 45 | - name: save test result 46 | uses: actions/upload-artifact@v4 47 | with: 48 | name: ycl-check_meta-aws 49 | path: yocto_checklayer/build/ycl-check_meta-aws.log 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/.DS_Store 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Thank you for your interest in contributing to our project. Whether 4 | it's a bug report, new feature, correction, or additional 5 | documentation, we greatly value feedback and contributions from our 6 | community. 7 | 8 | Please read through this document before submitting any issues or pull 9 | requests to ensure we have all the necessary information to 10 | effectively respond to your bug report or contribution. 11 | 12 | ## Reporting Bugs/Feature Requests 13 | 14 | We welcome you to use the GitHub issue tracker to report bugs or 15 | suggest features. 16 | 17 | When filing an issue, please check existing open, or recently closed, 18 | issues to make sure somebody else hasn't already reported the 19 | issue. Please try to include as much information as you can. Details 20 | like these are incredibly useful: 21 | 22 | * A reproducible test case or series of steps 23 | * The version of our code being used 24 | * Any modifications you've made relevant to the bug 25 | * Anything unusual about your environment or deployment 26 | 27 | ## Contributing via Pull Requests 28 | 29 | Contributions via pull requests are much appreciated. Before sending 30 | us a pull request, please ensure that: 31 | 32 | 1. You open an issue to discuss any significant work - we would hate 33 | for your time to be wasted. 34 | 2. You are working against the intended Yocto Project *release-next* 35 | branch. Changes are no longer accepted direct to *release* 36 | branches. 37 | 3. You check existing open, and recently merged, pull requests to make 38 | sure someone else hasn't addressed the problem already. 39 | 4. Typically bug fixes must already be accepted into the *master* branch before they can be backported to a *release* branch, unless the bug in question does not affect the *master* branch or the fix on the *master* branch is unsuitable for backporting. 40 | 41 | To send us a pull request, please: 42 | 43 | 1. Fork the repository. 44 | 2. Modify the source; please focus on the specific change you are 45 | contributing. If you also reformat all the code, it will be hard 46 | for us to focus on your change. 47 | 3. Ensure local tests pass. 48 | 4. Commit to your fork using clear commit messages. 49 | 5. Send us a pull request, answering any default questions in the pull 50 | request interface. 51 | 6. Wait for a repository maintainer to look at your PR, run it in CI, test, and review. If additional changes or discussion is needed, a maintainer will get back to you, so please stay invovled in the conversation. Note: PRs from forks will not run in CI automatically for security reasons. If you make a PR and see that CI is left pending, this is normal and expected. 52 | 7. After your pull request is merged into *release-next* there will be done some additional testing and after that is successfully finished it will be merged into the *release* branch. Usually this will take 24h for *master* and 7 days for *release* branches. 53 | 54 | GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and 55 | [creating a pull request](https://help.github.com/articles/creating-a-pull-request/). 56 | 57 | ## Quality 58 | With every pull request following tests are performed: 59 | ### build 60 | All recipes are tested to build with qemuarm, qemuarm64, qemux86-64. 61 | ### ptest 62 | We like to have a [ptest](https://wiki.yoctoproject.org/wiki/Ptest) for every recipe. With every pull request we ptest with the different architectures we support. 63 | If there is a ptest it must pass. To get an idea how to write an ptest just grep for it in the layer. 64 | ### oelint-adv 65 | We think having the same "coding" style for recipes is a good idea. Therefore we test with [oelint-adv](https://github.com/priv-kweihmann/oelint-adv) for errors. 66 | ### checklayer 67 | Meta-aws is Yocto project [compatible](https://www.yoctoproject.org/software-overview/layers/). To keep this status we test this. 68 | 69 | ## Finding contributions to work on 70 | 71 | Looking at the existing issues is a great way to find something to 72 | contribute on. As our projects, by default, use the default GitHub 73 | issue labels (enhancement/bug/duplicate/help 74 | wanted/invalid/question/wontfix), looking at any 'help wanted' issues 75 | is a great place to start. 76 | 77 | ## Code of Conduct 78 | This project has adopted the [Amazon Open Source Code of 79 | Conduct](https://aws.github.io/code-of-conduct). For more information 80 | see the [Code of Conduct 81 | FAQ](https://aws.github.io/code-of-conduct-faq) or contact 82 | opensource-codeofconduct@amazon.com with any additional questions or 83 | comments. 84 | 85 | ## Security issue notifications 86 | See the [SECURITY](SECURITY). 87 | 88 | ## Licensing 89 | 90 | See the [LICENSE](LICENSE) file for our project's licensing. We will 91 | ask you to confirm the licensing of your contribution. 92 | 93 | We may ask you to sign a [Contributor License Agreement 94 | (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for 95 | larger changes. 96 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Amazon.com, Inc. All Rights Reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | How to Report a Potential Vulnerability? 2 | ======================================== 3 | 4 | If you discover a potential security issue in this project we ask that 5 | you notify AWS/Amazon Security via our [vulnerability reporting 6 | page](http://aws.amazon.com/security/vulnerability-reporting/). 7 | 8 | Please do **not** create a public github issue and any example code, if available. 9 | 10 | Branches maintained with security fixes 11 | --------------------------------------- 12 | 13 | See [https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS Stable release and LTS] 14 | for detailed info regarding the policies and maintenance of Stable branches. 15 | 16 | The [https://wiki.yoctoproject.org/wiki/Releases Release page] contains a list of all 17 | releases of the Yocto Project. Versions in grey are no longer actively maintained with 18 | security patches, but well-tested patches may still be accepted for them for 19 | significant issues. -------------------------------------------------------------------------------- /classes/aws-ec2-image.bbclass: -------------------------------------------------------------------------------- 1 | # 2 | # This image class creates an ami ec2 image, see /scripts/ec2-ami/README.md 3 | # 4 | 5 | inherit extrausers 6 | # Hardening: Locking the root password. Creating the user without password for ssh key-based login only 7 | EXTRA_USERS_PARAMS = "usermod -L root; useradd -p '*' user" 8 | 9 | EXTRA_IMAGE_FEATURES:append = " ssh-server-openssh" 10 | 11 | # Forcing removal of debug-tweakes as that leads to reversing some sshd_config hardening done in our bbappend when do_rootfs runs 12 | EXTRA_IMAGE_FEATURES:remove = "debug-tweaks" 13 | 14 | IMAGE_FSTYPES += " wic.vhd" 15 | DISTRO_FEATURES:append = " systemd" 16 | DISTRO_FEATURES:append = " virtualization" 17 | DISTRO_FEATURES:append = " usrmerge" 18 | 19 | DISTRO_FEATURES:remove = " sysvinit" 20 | DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " sysvinit" 21 | 22 | INIT_MANAGER:forcevariable = "systemd" 23 | POKY_INIT_MANAGER:forcevariable = "systemd" 24 | 25 | VIRTUAL-RUNTIME_init_manager = "systemd" 26 | VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" 27 | VIRTUAL-RUNTIME_login_manager = "shadow-base" 28 | VIRTUAL-RUNTIME_dev_manager = "systemd" 29 | 30 | IMAGE_INSTALL:append = " cloud-init" 31 | -------------------------------------------------------------------------------- /classes/aws-firecracker-image.bbclass: -------------------------------------------------------------------------------- 1 | # 2 | # add firecracker distro features 3 | # 4 | 5 | DISTRO_FEATURES:append = " virtualization kvm" 6 | 7 | IMAGE_INSTALL:append = " kernel-module-kvm kernel-module-kvm-intel kernel-module-kvm-amd " 8 | 9 | IMAGE_INSTALL:append = " firecracker-demo" 10 | 11 | IMAGE_ROOTFS_EXTRA_SPACE = "5242880" 12 | 13 | QB_CPU:x86 = "-cpu Haswell-noTSX-IBRS,vmx=on" 14 | 15 | QB_CPU_KVM:x86 = "-cpu Haswell-noTSX-IBRS,vmx=on" 16 | 17 | QB_CPU:x86-64 = "-cpu Haswell-noTSX-IBRS,vmx=on" 18 | 19 | QB_CPU_KVM:x86-64 = "-cpu Haswell-noTSX-IBRS,vmx=on" 20 | -------------------------------------------------------------------------------- /conf/layer.conf: -------------------------------------------------------------------------------- 1 | # We have a conf and classes directory, add to BBPATH 2 | BBPATH .= ":${LAYERDIR}" 3 | 4 | # We have recipes-* directories, add to BBFILES 5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ 6 | ${LAYERDIR}/recipes-*/*/*.bbappend" 7 | BBFILES += "${@bb.utils.contains("GG_KERNEL_MOD", "Y", "${LAYERDIR}/recipes-*/*/base/*.bbappend", "", d)}" 8 | 9 | BBFILE_COLLECTIONS += "meta-aws" 10 | BBFILE_PATTERN_meta-aws = "^${LAYERDIR}/" 11 | BBFILE_PRIORITY_meta-aws = "6" 12 | 13 | LAYERDEPENDS_meta-aws += "core" 14 | LAYERDEPENDS_meta-aws += "openembedded-layer" 15 | LAYERDEPENDS_meta-aws += "multimedia-layer" 16 | LAYERDEPENDS_meta-aws += "networking-layer" 17 | LAYERDEPENDS_meta-aws += "meta-python" 18 | 19 | LAYERSERIES_COMPAT_meta-aws = "walnascar" 20 | 21 | # The dynamic-layers directory hosts the extensions and layer specific 22 | # modifications. 23 | # 24 | # The .bbappend and .bb files are included if the respective layer 25 | # collection is available. 26 | BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \ 27 | for layer in BBFILE_COLLECTIONS.split())}" 28 | BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer \ 29 | for layer in BBFILE_COLLECTIONS.split())}" 30 | 31 | BBFILES_DYNAMIC += " \ 32 | virtualization-layer:${LAYERDIR}/dynamic-layers/virtualization-layer/*/*/*.bb \ 33 | virtualization-layer:${LAYERDIR}/dynamic-layers/virtualization-layer/*/*/*.bbappend \ 34 | " 35 | # meta-virtualization and meta-openembedded/meta-python contains outdated versions of python3-boto3 and python3-botocore 36 | BBMASK += " \ 37 | meta-virtualization/recipes-devtools/python/python3-boto* \ 38 | meta-openembedded/meta-python/recipes-devtools/python/python3-boto* \ 39 | " 40 | -------------------------------------------------------------------------------- /conf/machine/aws-ec2-arm64.conf: -------------------------------------------------------------------------------- 1 | #@TYPE: Machine 2 | #@NAME: aws ec2 arm64 3 | #@DESCRIPTION: AWS arm 64 processer ec2 type 4 | 5 | require conf/machine/include/aws-ec2-base.inc 6 | 7 | require conf/machine/include/arm/arch-armv8-2a.inc 8 | 9 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" 10 | 11 | KBUILD_DEFCONFIG = "defconfig" 12 | KCONFIG_MODE = "--alldefconfig" 13 | 14 | KERNEL_IMAGETYPE = "Image" 15 | MACHINE_EXTRA_RRECOMMENDS += "kernel-modules linux-firmware" 16 | 17 | EFI_PROVIDER ?= "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd-boot", "grub-efi", d)}" 18 | 19 | WKS_FILE_DEPENDS_BOOTLOADERS:aarch64 += "systemd-boot" 20 | 21 | WKS_FILE ?= "efi-disk.wks.in" 22 | 23 | MACHINE_FEATURES:append = " efi rtc" 24 | -------------------------------------------------------------------------------- /conf/machine/aws-ec2-x86-64.conf: -------------------------------------------------------------------------------- 1 | #@TYPE: Machine 2 | #@NAME: aws ec2 x86-64 3 | #@DESCRIPTION: AWS x86-64 processer ec2 type 4 | 5 | require conf/machine/include/aws-ec2-base.inc 6 | 7 | DEFAULTTUNE ?= "core2-64" 8 | require conf/machine/include/x86/tune-core2.inc 9 | include conf/machine/include/x86/x86-base.inc 10 | 11 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" 12 | 13 | MACHINE_EXTRA_RRECOMMENDS += "kernel-modules linux-firmware" 14 | 15 | SERIAL_CONSOLES_CHECK = "ttyS0" 16 | 17 | EFI_PROVIDER ?= "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd-boot", "grub-efi", d)}" 18 | 19 | WKS_FILE ?= "efi-disk.wks.in" 20 | 21 | KMACHINE ?= "common-pc-64" 22 | -------------------------------------------------------------------------------- /conf/machine/include/aws-ec2-base.inc: -------------------------------------------------------------------------------- 1 | SOC_FAMILY = "aws-ec2" 2 | include conf/machine/include/soc-family.inc 3 | -------------------------------------------------------------------------------- /dynamic-layers/virtualization-layer/recipes-extended/cloud-init/cloud-init_%.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend:aws-ec2 := "${THISDIR}/files:" 2 | 3 | SRC_URI:append:aws-ec2 = " file://cloud.cfg" 4 | 5 | # nooelint: oelint.func.specific 6 | do_install:append:aws-ec2 () { 7 | # Adding cloud-init configuration with reasonable settings. 8 | install -T -m 0644 ${UNPACKDIR}/cloud.cfg ${D}${sysconfdir}/cloud/cloud.cfg 9 | } 10 | 11 | SYSTEMD_PACKAGES = "${PN}-systemd" 12 | SYSTEMD_SERVICE:${PN}-systemd = "cloud-init.service" 13 | SYSTEMD_AUTO_ENABLE:${PN}-systemd = "enable" 14 | 15 | inherit features_check 16 | REQUIRED_DISTRO_FEATURES = "virtualization" 17 | 18 | # nooelint: oelint.func.specific 19 | RDEPENDS:${PN}:append:aws-ec2 = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'cloud-init-systemd', '', d)} rng-tools aws-cli e2fsprogs e2fsprogs-resize2fs e2fsprogs-tune2fs e2fsprogs-e2fsck e2fsprogs-mke2fs parted sudo sudo-sudo openssh-sftp-server iproute2" 20 | -------------------------------------------------------------------------------- /dynamic-layers/virtualization-layer/recipes-extended/cloud-init/files/cloud.cfg: -------------------------------------------------------------------------------- 1 | users: 2 | - default 3 | 4 | 5 | disable_root: true 6 | 7 | ssh_pwauth: false 8 | ssh_deletekeys: true 9 | 10 | preserve_hostname: false 11 | 12 | cloud_init_modules: 13 | - migrator 14 | - seed_random 15 | - bootcmd 16 | - write-files 17 | - disk_setup 18 | - mounts 19 | - set_hostname 20 | - update_hostname 21 | - update_etc_hosts 22 | - ca-certs 23 | - rsyslog 24 | - users-groups 25 | - ssh 26 | 27 | cloud_config_modules: 28 | - ssh-import-id 29 | - set-passwords 30 | - ntp 31 | - timezone 32 | - disable-ec2-metadata 33 | - runcmd 34 | 35 | cloud_final_modules: 36 | - scripts-per-once 37 | - scripts-per-boot 38 | - scripts-per-instance 39 | - scripts-user 40 | - phone-home 41 | - final-message 42 | - power-state-change 43 | 44 | 45 | system_info: 46 | default_user: 47 | name: user 48 | lock_passwd: False 49 | gecos: EC2 Default User 50 | groups: [wheel, adm, systemd-journal] 51 | sudo: ["ALL=(ALL) NOPASSWD:ALL"] 52 | shell: /bin/sh 53 | ntp_client: auto 54 | paths: 55 | cloud_dir: /var/lib/cloud/ 56 | templates_dir: /etc/cloud/templates/ 57 | ssh_svcname: sshd.socket 58 | 59 | -------------------------------------------------------------------------------- /images/Arch_AWS-Command-Line-Interface_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/images/Arch_AWS-Command-Line-Interface_64.png -------------------------------------------------------------------------------- /images/Arch_AWS-Firecracker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/images/Arch_AWS-Firecracker.png -------------------------------------------------------------------------------- /images/Arch_AWS-IoT-FleetWise_64.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Icon-Architecture/64/Arch_AWS-IoT-FleetWise_64 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /images/Arch_AWS-IoT-Greengrass_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/images/Arch_AWS-IoT-Greengrass_64.png -------------------------------------------------------------------------------- /images/Arch_AWS-Tools-and-SDKs_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/images/Arch_AWS-Tools-and-SDKs_64.png -------------------------------------------------------------------------------- /images/Arch_Amazon-CloudWatch_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/images/Arch_Amazon-CloudWatch_64.png -------------------------------------------------------------------------------- /images/Arch_Amazon-EC2_64.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Icon-Architecture/64/Arch_Amazon-EC2_64 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /images/LF_17_02_Yocto-Badge-Update_Compatible_Final_Blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/images/LF_17_02_Yocto-Badge-Update_Compatible_Final_Blank.png -------------------------------------------------------------------------------- /images/corretto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/images/corretto.png -------------------------------------------------------------------------------- /images/lf_yp_plat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/images/lf_yp_plat.png -------------------------------------------------------------------------------- /recipes-cloud/amazon-cloudwatch-agent/amazon-cloudwatch-agent_1.300054.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Amazon CloudWatch Agent" 2 | DESCRIPTION = "CloudWatch Agent enables you to collect and export host-level metrics and logs on instances running Linux or Windows server." 3 | HOMEPAGE = "https://github.com/aws/amazon-cloudwatch-agent/" 4 | LICENSE = "MIT" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4dde6168ca1ce801034ffe20cabf2b37" 6 | 7 | COMPATIBLE_MACHINE = "(^$)" 8 | COMPATIBLE_MACHINE:aarch64 = "(.*)" 9 | COMPATIBLE_MACHINE:x86-64 = "(.*)" 10 | 11 | inherit go goarch ptest 12 | GO_IMPORT = "github.com/aws/amazon-cloudwatch-agent" 13 | 14 | SRC_URI = "\ 15 | git://${GO_IMPORT}.git;branch=main;protocol=http;destsuffix=git/src/github.com/aws/amazon-cloudwatch-agent \ 16 | file://run-ptest \ 17 | file://001-makefile.patch \ 18 | " 19 | 20 | SRCREV = "01b3fbdbe2d2234a44b1219d4f71d11335b771f2" 21 | 22 | S = "${WORKDIR}/git/src/${GO_IMPORT}" 23 | 24 | do_compile[network] = "1" 25 | 26 | do_compile:prepend() { 27 | export BUILD_SPACE="${B}" 28 | export CGO_LDFLAGS="-w" 29 | export BUILDTAGS="static_build" 30 | export GO_BUILD_FLAGS="-trimpath" 31 | export GOARCH="${TARGET_GOARCH}" 32 | export GOPATH="${WORKDIR}/git/:${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go:${WORKDIR}/git/" 33 | } 34 | 35 | # nooelint: oelint.task.dash 36 | go_do_compile:x86-64() { 37 | oe_runmake -C ${S} build-for-docker-amd64 38 | } 39 | 40 | go_do_compile:aarch64() { 41 | oe_runmake -C ${S} build-for-docker-arm64 42 | } 43 | 44 | go_do_install:aarch64() { 45 | install -d ${D}${bindir}/ 46 | cp ${B}/bin/linux_arm64/amazon-cloudwatch-agent ${D}${bindir}/ 47 | cp ${B}/bin/linux_arm64/start-amazon-cloudwatch-agent ${D}${bindir}/ 48 | } 49 | 50 | # nooelint: oelint.task.dash 51 | go_do_install:x86-64() { 52 | install -d ${D}${bindir}/ 53 | cp ${B}/bin/linux_amd64/amazon-cloudwatch-agent ${D}${bindir}/ 54 | cp ${B}/bin/linux_amd64/start-amazon-cloudwatch-agent ${D}${bindir}/ 55 | } 56 | 57 | # nooelint: oelint.vars.insaneskip 58 | INSANE_SKIP:${PN} += "textrel" 59 | -------------------------------------------------------------------------------- /recipes-cloud/amazon-cloudwatch-agent/files/001-makefile.patch: -------------------------------------------------------------------------------- 1 | 2 | Upstream-Status: Inappropriate [oe specific] 3 | 4 | Index: git/Makefile 5 | =================================================================== 6 | --- git.orig/Makefile 7 | +++ git/Makefile 8 | @@ -1,6 +1,3 @@ 9 | -export BASE_SPACE=$(shell pwd) 10 | -export BUILD_SPACE=$(BASE_SPACE)/build 11 | - 12 | VERSION = $(shell echo `git describe --tag --dirty``git status --porcelain 2>/dev/null| grep -q "^??" &&echo '-untracked'`) 13 | VERSION := $(shell echo ${VERSION} | sed -e "s/^v//") 14 | nightly-release: VERSION := $(shell echo ${VERSION}-nightly-build) 15 | @@ -10,17 +7,11 @@ ifeq ($(VERSION),) 16 | VERSION := `cat CWAGENT_VERSION` 17 | endif 18 | 19 | -# Determine agent build mode, default to PIE mode 20 | -ifndef CWAGENT_BUILD_MODE 21 | -CWAGENT_BUILD_MODE=default 22 | -endif 23 | - 24 | BUILD := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ") 25 | -LDFLAGS = -s -w 26 | LDFLAGS += -X github.com/aws/amazon-cloudwatch-agent/cfg/agentinfo.VersionStr=${VERSION} 27 | LDFLAGS += -X github.com/aws/amazon-cloudwatch-agent/cfg/agentinfo.BuildStr=${BUILD} 28 | -LINUX_AMD64_BUILD = CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -buildmode=${CWAGENT_BUILD_MODE} -ldflags="${LDFLAGS}" -o $(BUILD_SPACE)/bin/linux_amd64 29 | -LINUX_ARM64_BUILD = CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -buildmode=${CWAGENT_BUILD_MODE} -ldflags="${LDFLAGS}" -o $(BUILD_SPACE)/bin/linux_arm64 30 | +LINUX_AMD64_BUILD = GOOS=linux GOARCH=amd64 go build ${GO_BUILD_FLAGS} -ldflags="${CGO_LDFLAGS}" -o $(BUILD_SPACE)/bin/linux_amd64 31 | +LINUX_ARM64_BUILD = GOOS=linux GOARCH=arm64 go build ${GO_BUILD_FLAGS} -ldflags="${CGO_LDFLAGS}" -o $(BUILD_SPACE)/bin/linux_arm64 32 | WIN_BUILD = GOOS=windows GOARCH=amd64 go build -trimpath -buildmode=${CWAGENT_BUILD_MODE} -ldflags="${LDFLAGS}" -o $(BUILD_SPACE)/bin/windows_amd64 33 | DARWIN_BUILD_AMD64 = CGO_ENABLED=1 GO111MODULE=on GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags="${LDFLAGS}" -o $(BUILD_SPACE)/bin/darwin_amd64 34 | DARWIN_BUILD_ARM64 = CGO_ENABLED=1 GO111MODULE=on GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags="${LDFLAGS}" -o $(BUILD_SPACE)/bin/darwin_arm64 35 | @@ -109,7 +100,6 @@ build-for-docker-amd64: 36 | $(LINUX_AMD64_BUILD)/amazon-cloudwatch-agent github.com/aws/amazon-cloudwatch-agent/cmd/amazon-cloudwatch-agent 37 | $(LINUX_AMD64_BUILD)/start-amazon-cloudwatch-agent github.com/aws/amazon-cloudwatch-agent/cmd/start-amazon-cloudwatch-agent 38 | $(LINUX_AMD64_BUILD)/config-translator github.com/aws/amazon-cloudwatch-agent/cmd/config-translator 39 | - cp $(BASE_SPACE)/packaging/opentelemetry-jmx-metrics.jar $(BUILD_SPACE)/bin/linux_amd64/opentelemetry-jmx-metrics.jar 40 | 41 | build-for-docker-windows-amd64: 42 | $(WIN_BUILD)/amazon-cloudwatch-agent.exe github.com/aws/amazon-cloudwatch-agent/cmd/amazon-cloudwatch-agent 43 | @@ -120,7 +110,6 @@ build-for-docker-arm64: 44 | $(LINUX_ARM64_BUILD)/amazon-cloudwatch-agent github.com/aws/amazon-cloudwatch-agent/cmd/amazon-cloudwatch-agent 45 | $(LINUX_ARM64_BUILD)/start-amazon-cloudwatch-agent github.com/aws/amazon-cloudwatch-agent/cmd/start-amazon-cloudwatch-agent 46 | $(LINUX_ARM64_BUILD)/config-translator github.com/aws/amazon-cloudwatch-agent/cmd/config-translator 47 | - cp $(BASE_SPACE)/packaging/opentelemetry-jmx-metrics.jar $(BUILD_SPACE)/bin/linux_arm64/opentelemetry-jmx-metrics.jar 48 | 49 | docker-build: build-for-docker-amd64 build-for-docker-arm64 50 | docker buildx build --platform linux/amd64,linux/arm64 . -f amazon-cloudwatch-container-insights/cloudwatch-agent-dockerfile/localbin/Dockerfile -t $(IMAGE) 51 | -------------------------------------------------------------------------------- /recipes-cloud/amazon-cloudwatch-agent/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -euxo pipefail 3 | 4 | amazon-cloudwatch-agent --help 5 | 6 | RETVAL=$? 7 | if [ $RETVAL -eq 0 ] ; then 8 | echo "PASS: amazon-cloudwatch-agent: startup test" 9 | else 10 | echo "FAIL: amazon-cloudwatch-agent: startup test" 11 | fi 12 | -------------------------------------------------------------------------------- /recipes-cloud/amazon-cloudwatch-publisher/amazon-cloudwatch-publisher_1.2.4.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "amazon cloudwatch publisher" 2 | DESCRIPTION = "Push metrics and logs to CloudWatch from any system that can run Python" 3 | HOMEPAGE = "https://github.com/awslabs/amazon-cloudwatch-publisher" 4 | CVE_PRODUCT = "amazon_cloudwatch_publisher" 5 | LICENSE = "Apache-2.0" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" 7 | 8 | BRANCH ?= "main" 9 | 10 | SRC_URI = "\ 11 | git://github.com/awslabs/${BPN};branch=${BRANCH};protocol=https \ 12 | file://run-ptest \ 13 | " 14 | SRCREV = "9feebfa9facb6bfddade737de7a90bfbfd65cf6e" 15 | S = "${WORKDIR}/git" 16 | 17 | inherit systemd ptest 18 | 19 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" 20 | SYSTEMD_AUTO_ENABLE = "enable" 21 | 22 | FILES:${PN} += "\ 23 | ${systemd_system_unitdir}/${BPN}.service \ 24 | /opt/aws/${BPN}/${BPN} \ 25 | /opt/aws/${BPN}/etc/.gitkeep \ 26 | /opt/aws/${BPN}/logs/.gitkeep \ 27 | " 28 | 29 | RDEPENDS:${PN} += "\ 30 | python3-boto3 \ 31 | python3-psutil \ 32 | python3-requests \ 33 | python3-timeloop \ 34 | " 35 | 36 | do_install() { 37 | install -d ${D}${systemd_system_unitdir} 38 | install -d ${D}/opt/aws/${BPN}/etc 39 | touch ${D}/opt/aws/${BPN}/etc/.gitkeep 40 | install -d ${D}/opt/aws/${BPN}/logs 41 | touch ${D}/opt/aws/${BPN}/logs/.gitkeep 42 | install -m 744 ${BPN} ${D}/opt/aws/${BPN}/ 43 | 44 | # TODO: user and group should be cwpublisher/wheel 45 | cat <<-EOF > ${D}${systemd_system_unitdir}/${BPN}.service 46 | [Unit] 47 | Description=Push metrics and logs to CloudWatch from any system that can run Python 48 | DefaultDependencies=no 49 | Requires=network.target 50 | After=network.target network-online.target 51 | 52 | [Service] 53 | Type=simple 54 | User=root 55 | Group=root 56 | ExecStart=/opt/aws/${BPN}/${BPN} 57 | Restart=on-failure 58 | WorkingDirectory=/opt/aws/${BPN} 59 | 60 | [Install] 61 | WantedBy=multi-user.target 62 | EOF 63 | } 64 | -------------------------------------------------------------------------------- /recipes-cloud/amazon-cloudwatch-publisher/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -euxo pipefail 3 | 4 | cd /opt/aws/amazon-cloudwatch-publisher 5 | 6 | ./amazon-cloudwatch-publisher & 7 | sleep 30 8 | grep "Instance ID is" /opt/aws/amazon-cloudwatch-publisher/logs/amazon-cloudwatch-publisher.log 9 | 10 | RETVAL=$? 11 | if [ $RETVAL -eq 0 ] ; then 12 | echo "PASS: amazon-cloudwatch-publisher: startup test" 13 | else 14 | echo "FAIL: amazon-cloudwatch-publisher: startup test" 15 | fi 16 | -------------------------------------------------------------------------------- /recipes-containers/firecracker-bin/firecracker-bin/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | firecracker --version 4 | 5 | RETVAL=$? 6 | if [ $RETVAL -eq 0 ] ; then 7 | echo "PASS: firecracker: simple test" 8 | else 9 | echo "FAIL: firecracker: simple test" 10 | fi 11 | -------------------------------------------------------------------------------- /recipes-containers/firecracker-bin/firecracker-bin_1.10.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "firecracker - Binary Distribution" 2 | DESCRIPTION = "Secure and fast microVMs for serverless computing." 3 | HOMEPAGE = "https://firecracker-microvm.github.io/" 4 | CVE_PRODUCT = "firecracker" 5 | LICENSE = "Apache-2.0" 6 | # nooelint: oelint.var.licenseremotefile:License-File 7 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 8 | 9 | ARCH_DIR:x86-64 = "x86_64" 10 | ARCH_DIR:aarch64 = "aarch64" 11 | 12 | COMPATIBLE_MACHINE = "null" 13 | COMPATIBLE_MACHINE:aarch64 = "(.*)" 14 | COMPATIBLE_MACHINE:x86-64 = "(.*)" 15 | 16 | # nooelint: oelint.vars.srcurichecksum 17 | SRC_URI = "https://github.com/firecracker-microvm/firecracker/releases/download/v${PV}/firecracker-v${PV}-${ARCH_DIR}.tgz;name=${ARCH_DIR}" 18 | 19 | SRC_URI[x86_64.sha256sum] = "36112969952b0e34fadcfca769d48a55dc22cbba99af17e02bd0e24fc35adc77" 20 | SRC_URI[aarch64.sha256sum] = "9e3641071de140979afaac0c52fdc107baeba398bdb5709c12f77ee469207fcd" 21 | 22 | UPSTREAM_CHECK_REGEX ?= "releases/tag/v?(?P\d+(\.\d+)+)" 23 | 24 | UPSTREAM_CHECK_URI = "https://github.com/firecracker-microvm/firecracker/releases" 25 | 26 | SRC_URI:append = " \ 27 | file://run-ptest \ 28 | " 29 | 30 | S = "${WORKDIR}/release-v${PV}-${TARGET_ARCH}" 31 | 32 | inherit bin_package ptest 33 | 34 | # nooelint: oelint.vars.insaneskip 35 | INSANE_SKIP:${PN} += "already-stripped" 36 | 37 | 38 | FILES:${PN} += "\ 39 | ${bindir}/firecracker \ 40 | " 41 | 42 | do_install() { 43 | install -d ${D}${bindir} 44 | 45 | install -m 0755 ${S}/firecracker-v${PV}-${TARGET_ARCH} ${D}${bindir}/firecracker 46 | } 47 | 48 | # https://bugzilla.yoctoproject.org/show_bug.cgi?id=15227 49 | PACKAGE_DEPENDS:append:class-target = " virtual/cross-binutils" -------------------------------------------------------------------------------- /recipes-containers/firecracker-bin/jailer-bin/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | /usr/bin/jailer --id 551e7604-e35c-42b3-b825-416853441234 --exec-file /usr/bin/firecracker --version --uid 123 --gid 100 4 | 5 | RETVAL=$? 6 | if [ $RETVAL -eq 0 ] ; then 7 | echo "PASS: jailer: simple test" 8 | else 9 | echo "FAIL: jailer: simple test" 10 | fi 11 | -------------------------------------------------------------------------------- /recipes-containers/firecracker-bin/jailer-bin_1.10.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "jailer - Binary Distribution" 2 | DESCRIPTION = "Process for starting Firecracker in production scenarios; applies a cgroup/namespace isolation barrier and then drops privileges." 3 | HOMEPAGE = "https://firecracker-microvm.github.io/" 4 | CVE_PRODUCT = "jailer" 5 | LICENSE = "Apache-2.0" 6 | # nooelint: oelint.var.licenseremotefile:License-File 7 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 8 | 9 | ARCH_DIR:x86-64 = "x86_64" 10 | ARCH_DIR:aarch64 = "aarch64" 11 | 12 | COMPATIBLE_MACHINE = "null" 13 | COMPATIBLE_MACHINE:aarch64 = "(.*)" 14 | COMPATIBLE_MACHINE:x86-64 = "(.*)" 15 | 16 | # nooelint: oelint.vars.srcurichecksum 17 | SRC_URI = "https://github.com/firecracker-microvm/firecracker/releases/download/v${PV}/firecracker-v${PV}-${ARCH_DIR}.tgz;name=${ARCH_DIR}" 18 | 19 | SRC_URI[x86_64.sha256sum] = "36112969952b0e34fadcfca769d48a55dc22cbba99af17e02bd0e24fc35adc77" 20 | SRC_URI[aarch64.sha256sum] = "9e3641071de140979afaac0c52fdc107baeba398bdb5709c12f77ee469207fcd" 21 | 22 | UPSTREAM_CHECK_REGEX ?= "releases/tag/v?(?P\d+(\.\d+)+)" 23 | 24 | UPSTREAM_CHECK_URI = "https://github.com/firecracker-microvm/firecracker/releases" 25 | 26 | SRC_URI:append = " \ 27 | file://run-ptest \ 28 | " 29 | 30 | S = "${WORKDIR}/release-v${PV}-${TARGET_ARCH}" 31 | 32 | inherit bin_package ptest 33 | 34 | # nooelint: oelint.vars.insaneskip 35 | INSANE_SKIP:${PN} += "already-stripped" 36 | 37 | FILES:${PN} += "\ 38 | ${bindir}/jailer \ 39 | " 40 | 41 | RDEPENDS:${PN}-ptest += "\ 42 | firecracker-bin \ 43 | " 44 | 45 | do_install() { 46 | install -d ${D}${bindir} 47 | 48 | install -m 0755 ${S}/jailer-v${PV}-${TARGET_ARCH} ${D}${bindir}/jailer 49 | } 50 | 51 | # https://bugzilla.yoctoproject.org/show_bug.cgi?id=15227 52 | PACKAGE_DEPENDS:append:class-target = " virtual/cross-binutils" -------------------------------------------------------------------------------- /recipes-devtools/amazon-corretto/corretto-11-bin/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -euxo pipefail 3 | 4 | FILE=/usr/bin/java.corretto-11-bin 5 | if [ -f "$FILE" ]; then 6 | echo "$FILE exists. Using alternate java name to test." 7 | $FILE --version 8 | else 9 | echo "$FILE does not exist. Using default java to test." 10 | java --version 11 | fi 12 | 13 | RETVAL=$? 14 | if [ $RETVAL -eq 0 ] ; then 15 | echo "PASS: corretto-11-bin startup test" 16 | else 17 | echo "FAIL: corretto-11-bin startup test" 18 | fi 19 | -------------------------------------------------------------------------------- /recipes-devtools/amazon-corretto/corretto-11-bin_11.0.27.6.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Amazon Corretto 11" 2 | HOMEPAGE = "https://github.com/corretto/corretto-11" 3 | 4 | # nooelint: oelint.vars.srcurichecksum:SRC_URI[aarch64.md5sum] 5 | SRC_URI:aarch64 = "https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-aarch64.tar.gz;name=aarch64" 6 | 7 | BASE:arm = "amazon-corretto-${PV}-linux-armv7" 8 | # nooelint: oelint.vars.srcurichecksum:SRC_URI[arm.md5sum] 9 | SRC_URI:arm = "https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-armv7.tar.gz;name=arm" 10 | 11 | # nooelint: oelint.vars.srcurichecksum:SRC_URI[x86-64.md5sum] 12 | SRC_URI:x86-64 = "https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-x64.tar.gz;name=x86-64" 13 | 14 | BASE:x86 = "amazon-corretto-${PV}-linux-x86" 15 | # nooelint: oelint.vars.srcurichecksum:SRC_URI[x86.md5sum] 16 | SRC_URI:x86 = "https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-x86.tar.gz;name=x86" 17 | 18 | # you can find checksum here: https://github.com/corretto/corretto-11/releases since devtool upgrade can only do one arch atm. 19 | SRC_URI[aarch64.sha256sum] = "679ab9f1f614d3ed000b61ccb5e0c06041c9ee29fb9c0ca1b598a9f23975cf85" 20 | SRC_URI[arm.sha256sum] = "828b7bb111cf4be41ca47f3cb7cac13e5db7bb190f6bf19b4de697676963be98" 21 | SRC_URI[x86-64.sha256sum] = "0b4fd441b90471384af288ea7e927897114871c668ad292f4e982e7cb9f0cbf7" 22 | SRC_URI[x86.sha256sum] = "7b33d8d4455feea8284e142d82fa60a3fc65a6ed6160823810f70993f09a7f1f" 23 | 24 | COMPATIBLE_MACHINE:armv7a = "(.*)" 25 | COMPATIBLE_MACHINE:armv7ve = "(.*)" 26 | COMPATIBLE_MACHINE:x86 = "(.*)" 27 | 28 | # also available in master (not kirkstone) in classes-recipe: github-releases 29 | UPSTREAM_CHECK_REGEX ?= "releases/tag/v?(?P\d+(\.\d+)+)" 30 | 31 | UPSTREAM_CHECK_URI = "https://github.com/corretto/corretto-11/tags" 32 | 33 | ALTERNATIVE_PRIORITY = "60" 34 | RPROVIDES:${PN} = "java jdk-11 java-11" 35 | 36 | # nooelint: oelint.file.underscores 37 | require corretto-bin-common.inc 38 | 39 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 40 | INSANE_SKIP:${PN} += "ldflags" 41 | 42 | RDEPENDS:${PN}-ptest:prepend = "\ 43 | greengrass-bin \ 44 | " 45 | 46 | # this is used by meta-aws-tests to find this recipe for ptests, so it should stay in this file instead of moving into corretto-bin-common 47 | inherit ptest 48 | -------------------------------------------------------------------------------- /recipes-devtools/amazon-corretto/corretto-17-bin/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -euxo pipefail 3 | 4 | FILE=/usr/bin/java.corretto-17-bin 5 | if [ -f "$FILE" ]; then 6 | echo "$FILE exists. Using alternate java name to test." 7 | $FILE --version 8 | else 9 | echo "$FILE does not exist. Using default java to test." 10 | java --version 11 | fi 12 | 13 | RETVAL=$? 14 | if [ $RETVAL -eq 0 ] ; then 15 | echo "PASS: corretto-17-bin startup test" 16 | else 17 | echo "FAIL: corretto-17-bin startup test" 18 | fi 19 | -------------------------------------------------------------------------------- /recipes-devtools/amazon-corretto/corretto-17-bin_17.0.15.6.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Amazon Corretto 17" 2 | HOMEPAGE = "https://github.com/corretto/corretto-17" 3 | 4 | # nooelint: oelint.vars.srcurichecksum:SRC_URI[aarch64.md5sum] 5 | SRC_URI:append:aarch64 = " https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-aarch64.tar.gz;name=aarch64" 6 | 7 | # nooelint: oelint.vars.srcurichecksum:SRC_URI[x86-64.md5sum] 8 | SRC_URI:append:x86-64 = " https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-x64.tar.gz;name=x86-64" 9 | 10 | # you can find checksum here: https://github.com/corretto/corretto-17/releases since devtool upgrade can only do one arch atm. 11 | SRC_URI[aarch64.sha256sum] = "dec11e9862ef04f84949408044703ffd8c03e83850b3b058d56750ea14c45b69" 12 | SRC_URI[x86-64.sha256sum] = "7860c1d3ba126439d463fe272b54673a9384ee0b6e1cbdbc8ba2734935042cca" 13 | 14 | # also available in master (not kirkstone) in classes-recipe: github-releases 15 | UPSTREAM_CHECK_REGEX ?= "releases/tag/v?(?P\d+(\.\d+)+)" 16 | 17 | UPSTREAM_CHECK_URI = "https://github.com/corretto/corretto-17/tags" 18 | 19 | ALTERNATIVE_PRIORITY = "70" 20 | RPROVIDES:${PN} = "java jdk-17 java-17" 21 | 22 | # nooelint: oelint.file.underscores 23 | require corretto-bin-common.inc 24 | 25 | # this is used by meta-aws-tests to find this recipe for ptests, so it should stay in this file instead of moving into corretto-bin-common 26 | inherit ptest 27 | -------------------------------------------------------------------------------- /recipes-devtools/amazon-corretto/corretto-21-bin/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -euxo pipefail 3 | 4 | FILE=/usr/bin/java.corretto-21-bin 5 | if [ -f "$FILE" ]; then 6 | echo "$FILE exists. Using alternate java name to test." 7 | $FILE --version 8 | else 9 | echo "$FILE does not exist. Using default java to test." 10 | java --version 11 | fi 12 | 13 | RETVAL=$? 14 | if [ $RETVAL -eq 0 ] ; then 15 | echo "PASS: corretto-21-bin startup test" 16 | else 17 | echo "FAIL: corretto-21-bin startup test" 18 | fi 19 | -------------------------------------------------------------------------------- /recipes-devtools/amazon-corretto/corretto-21-bin_21.0.7.6.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Amazon Corretto 21" 2 | HOMEPAGE = "https://github.com/corretto/corretto-21" 3 | 4 | # nooelint: oelint.vars.srcurichecksum:SRC_URI[aarch64.md5sum] 5 | SRC_URI:append:aarch64 = " https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-aarch64.tar.gz;name=aarch64" 6 | 7 | # nooelint: oelint.vars.srcurichecksum:SRC_URI[x86-64.md5sum] 8 | SRC_URI:append:x86-64 = " https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-x64.tar.gz;name=x86-64" 9 | 10 | # you can find checksum here: https://github.com/corretto/corretto-21/releases since devtool upgrade can only do one arch atm. 11 | SRC_URI[aarch64.sha256sum] = "21dd5493e413fbc06f8b5905b1d5c58efccdac4aae0d28ba3425e7857270ba66" 12 | SRC_URI[x86-64.sha256sum] = "8bb627728d147e7507b2e38a5ef872549e895da50c2685d435c0d4c15ba95eb4" 13 | 14 | # also available in master (not kirkstone) in classes-recipe: github-releases 15 | UPSTREAM_CHECK_REGEX ?= "releases/tag/v?(?P\d+(\.\d+)+)" 16 | 17 | UPSTREAM_CHECK_URI = "https://github.com/corretto/corretto-21/tags" 18 | 19 | ALTERNATIVE_PRIORITY = "80" 20 | RPROVIDES:${PN} = "java jdk-21 java-21" 21 | 22 | # nooelint: oelint.file.underscores 23 | require corretto-bin-common.inc 24 | 25 | # this is used by meta-aws-tests to find this recipe for ptests, so it should stay in this file instead of moving into corretto-bin-common 26 | inherit ptest 27 | -------------------------------------------------------------------------------- /recipes-devtools/amazon-corretto/corretto-8-bin/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -euxo pipefail 3 | 4 | FILE=/usr/bin/java.corretto-8-bin 5 | if [ -f "$FILE" ]; then 6 | echo "$FILE exists. Using alternate java name to test." 7 | $FILE -version 8 | else 9 | echo "$FILE does not exist. Using default java to test." 10 | java -version 11 | fi 12 | 13 | RETVAL=$? 14 | if [ $RETVAL -eq 0 ] ; then 15 | echo "PASS: corretto-8-bin startup test" 16 | else 17 | echo "FAIL: corretto-8-bin startup test" 18 | fi 19 | -------------------------------------------------------------------------------- /recipes-devtools/amazon-corretto/corretto-8-bin_8.452.09.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Amazon Corretto 8" 2 | HOMEPAGE = "https://github.com/corretto/corretto-8" 3 | 4 | # nooelint: oelint.vars.srcurichecksum:SRC_URI[aarch64.md5sum] 5 | SRC_URI:aarch64 = "https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-aarch64.tar.gz;name=aarch64" 6 | 7 | # nooelint: oelint.vars.srcurichecksum:SRC_URI[x86-64.md5sum] 8 | SRC_URI:x86-64 = "https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-x64.tar.gz;name=x86-64" 9 | 10 | # you can find checksum here: https://github.com/corretto/corretto-8/releases since devtool upgrade can only do one arch atm. 11 | SRC_URI[aarch64.sha256sum] = "b3d959bd1b9e8c82e383a9ae32a7a1ebdfaae4ec99f005ed9cf94275ba46819c" 12 | SRC_URI[x86-64.sha256sum] = "7478d4a218d03d68bde6aaba91ad1057d68037c1281b646d4394826cde91b9be" 13 | 14 | UPSTREAM_CHECK_URI = "https://github.com/corretto/corretto-8/tags" 15 | 16 | ALTERNATIVE_PRIORITY = "50" 17 | RPROVIDES:${PN} = "java jdk-8 java-8" 18 | 19 | ALTERNATIVE_NAMES = "\ 20 | jar \ 21 | jarsigner \ 22 | java \ 23 | javac \ 24 | javadoc \ 25 | javap \ 26 | jcmd \ 27 | jconsole \ 28 | jdb \ 29 | jdeps \ 30 | jfr \ 31 | jinfo \ 32 | jmap \ 33 | jps \ 34 | jrunscript \ 35 | jstack \ 36 | jstat \ 37 | jstatd \ 38 | serialver \ 39 | " 40 | 41 | # nooelint: oelint.file.underscores 42 | require corretto-bin-common.inc 43 | 44 | do_package_qa[noexec] = "1" 45 | EXCLUDE_FROM_SHLIBS = "1" 46 | 47 | # nooelint: oelint.vars.dependsordered 48 | RDEPENDS:${PN} += "\ 49 | cairo \ 50 | gtk+ \ 51 | libgl \ 52 | pango \ 53 | " 54 | 55 | # this is used by meta-aws-tests to find this recipe for ptests, so it should stay in this file instead of moving into corretto-bin-common 56 | inherit ptest 57 | -------------------------------------------------------------------------------- /recipes-devtools/amazon-corretto/corretto-bin-common.inc: -------------------------------------------------------------------------------- 1 | DESCRIPTION = "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK)." 2 | LICENSE = "GPL-2.0-only" 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3e0b59f8fac05c3c03d4a26bbda13f8f" 4 | CVE_PRODUCT = "corretto" 5 | 6 | SHR = "amazon-corretto-${PV}" 7 | 8 | BASE:aarch64 = "amazon-corretto-${PV}-linux-aarch64" 9 | BASE:x86-64 = "amazon-corretto-${PV}-linux-x64" 10 | 11 | COMPATIBLE_MACHINE = "(^$)" 12 | COMPATIBLE_MACHINE:aarch64 = "(.*)" 13 | COMPATIBLE_MACHINE:x86-64 = "(.*)" 14 | 15 | # also available in master (not kirkstone) in classes-recipe: github-releases 16 | UPSTREAM_CHECK_REGEX ?= "releases/tag/v?(?P\d+(\.\d+)+)" 17 | 18 | SRC_URI:append = " file://run-ptest" 19 | 20 | S = "${UNPACKDIR}/${BASE}" 21 | 22 | FILES:${PN} += "\ 23 | /usr/lib/${SHR} \ 24 | /usr/bin \ 25 | " 26 | 27 | do_install() { 28 | install -d ${D}${bindir} 29 | install -d ${D}${libdir}/${SHR} 30 | cp -r ${UNPACKDIR}/${BASE}/* ${D}${libdir}/${SHR}/ 31 | cd ${D}${bindir} 32 | 33 | for alt_name in ${ALTERNATIVE_NAMES}; do 34 | ln -s ../lib/${SHR}/bin/${alt_name} 35 | done 36 | } 37 | 38 | do_install:append:x86-64() { 39 | # create symbolic link /lib64/ld-linux-x86-64.so.2 to enable 40 | # loading the binary When maintainers build binaries on ubuntu, 41 | # this is the library they are linking to, and if we don't set it 42 | # up this way on the device, the program will not run. 43 | install -d ${D}/lib64 44 | cd ${D}/lib64 45 | ln -s ../lib/ld-linux-x86-64.so.2 ld-linux-x86-64.so.2 46 | } 47 | 48 | FILES:${PN} += "/lib64" 49 | 50 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 51 | INSANE_SKIP:${PN} += "libdir" 52 | 53 | RDEPENDS:${PN} += "\ 54 | ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa-lib', '', d)} \ 55 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11 libxext libxi libxrender libxtst ', '', d)} \ 56 | zlib \ 57 | " 58 | 59 | do_install:append() { 60 | if ${@bb.utils.contains('DISTRO_FEATURES','x11','false','true',d)}; then 61 | rm ${D}${libdir}/${SHR}/lib/libawt_xawt.so 62 | rm ${D}${libdir}/${SHR}/lib/libjawt.so 63 | rm ${D}${libdir}/${SHR}/lib/libsplashscreen.so 64 | fi 65 | if ${@bb.utils.contains('DISTRO_FEATURES','alsa','false','true',d)}; then 66 | rm ${D}${libdir}/${SHR}/lib/libjsound.so 67 | fi 68 | } 69 | 70 | inherit update-alternatives 71 | 72 | ALTERNATIVE_NAMES ?= "\ 73 | jar \ 74 | jarsigner \ 75 | java \ 76 | javac \ 77 | javadoc \ 78 | javap \ 79 | jcmd \ 80 | jconsole \ 81 | jdb \ 82 | jdeprscan \ 83 | jdeps \ 84 | jfr \ 85 | jhsdb \ 86 | jimage \ 87 | jinfo \ 88 | jlink \ 89 | jmap \ 90 | jmod \ 91 | jps \ 92 | jrunscript \ 93 | jshell \ 94 | jstack \ 95 | jstat \ 96 | jstatd \ 97 | serialver \ 98 | " 99 | 100 | python do_package:prepend () { 101 | prio = d.getVar('ALTERNATIVE_PRIORITY') 102 | alt_names = d.getVar('ALTERNATIVE_NAMES') 103 | 104 | for alt_name in alt_names.split(): 105 | d.appendVar("ALTERNATIVE_PRIORITY_VARDEPS", ' ' + alt_name + ':' + prio) 106 | } 107 | 108 | 109 | ALTERNATIVE:${PN} = "${ALTERNATIVE_NAMES}" 110 | -------------------------------------------------------------------------------- /recipes-devtools/python/python3-boto3/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | pytest tests/functional/test_smoke.py -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'| sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' 3 | -------------------------------------------------------------------------------- /recipes-devtools/python/python3-boto3_1.38.29.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Python Boto3" 2 | DESCRIPTION = "Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, which allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2." 3 | HOMEPAGE = "https://github.com/boto/boto3" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" 6 | 7 | SRC_URI = "\ 8 | git://github.com/boto/boto3.git;protocol=https;branch=master \ 9 | file://run-ptest" 10 | 11 | SRCREV = "c77c69420935a1030f04bdb75399552391aaac50" 12 | S = "${WORKDIR}/git" 13 | 14 | inherit setuptools3 ptest 15 | 16 | # python3 needs to be included since there are core dependencies such 17 | # as getpass. 18 | RDEPENDS:${PN} += "\ 19 | python3 \ 20 | python3-botocore \ 21 | python3-jmespath \ 22 | python3-logging \ 23 | python3-s3transfer \ 24 | " 25 | 26 | RDEPENDS:${PN}-ptest += "\ 27 | ${PYTHON_PN}-pytest \ 28 | " 29 | do_install_ptest() { 30 | install -d ${D}${PTEST_PATH}/tests 31 | cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ 32 | } 33 | -------------------------------------------------------------------------------- /recipes-devtools/python/python3-botocore/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | pytest tests/integration/test_loaders.py -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'| sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' 3 | -------------------------------------------------------------------------------- /recipes-devtools/python/python3-botocore_1.38.29.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "python3 botocore" 2 | DESCRIPTION = "The low-level, core functionality of boto3 and the AWS CLI." 3 | HOMEPAGE = "https://github.com/boto/botocore" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ee41112a44fe7014dce33e26468ba93" 6 | 7 | SRC_URI = "\ 8 | git://github.com/boto/botocore.git;protocol=https;branch=master \ 9 | file://run-ptest \ 10 | " 11 | 12 | SRCREV = "3122ce2d69031ca873fa5d5f4280dd35b24f952a" 13 | S = "${WORKDIR}/git" 14 | 15 | inherit setuptools3 ptest 16 | 17 | RDEPENDS:${PN} += "\ 18 | python3-dateutil \ 19 | python3-jmespath \ 20 | python3-logging \ 21 | " 22 | 23 | RDEPENDS:${PN}-ptest += "\ 24 | python3 \ 25 | python3-pytest \ 26 | python3-urllib3 \ 27 | " 28 | do_install_ptest() { 29 | install -d ${D}${PTEST_PATH}/tests 30 | cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ 31 | } 32 | -------------------------------------------------------------------------------- /recipes-devtools/python/python3-jmespath_%.bbappend: -------------------------------------------------------------------------------- 1 | BBCLASSEXTEND = "native nativesdk" 2 | -------------------------------------------------------------------------------- /recipes-devtools/python/python3-ruamel-yaml-clib_0.2.12.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "YAML parser/emitter" 2 | DESCRIPTION = "YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order." 3 | HOMEPAGE = "https://pypi.org/project/ruamel.yaml.clib/" 4 | 5 | LICENSE = "MIT" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3628bf49cf3a3776a82e22f36f8857da" 7 | 8 | PYPI_PACKAGE = "ruamel.yaml.clib" 9 | 10 | inherit pypi setuptools3 native 11 | 12 | SRC_URI[sha256sum] = "6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f" 13 | 14 | RDEPENDS:${PN} += "\ 15 | ${PYTHON_PN}-shell \ 16 | ${PYTHON_PN}-datetime \ 17 | ${PYTHON_PN}-netclient \ 18 | " 19 | 20 | do_install:prepend() { 21 | export RUAMEL_NO_PIP_INSTALL_CHECK=1 22 | } 23 | 24 | BBCLASSEXTEND = "native" 25 | -------------------------------------------------------------------------------- /recipes-devtools/python/python3-s3transfer/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # known good tests 4 | TESTS="\ 5 | unit/test_bandwidth.py \ 6 | unit/test_compat.py \ 7 | unit/test_copies.py \ 8 | " 9 | 10 | for TEST in $TESTS 11 | do 12 | pytest tests/$TEST -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'| sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' 13 | done 14 | 15 | #disabled tests 16 | # unit/test_delete.py 17 | # unit/test_download.py 18 | # unit/test_futures.py 19 | # unit/test_manager.py 20 | # unit/test_processpool.py 21 | # unit/test_s3transfer.py 22 | # unit/test_subscribers.py 23 | # unit/test_tasks.py 24 | # unit/test_upload.py 25 | # unit/test_utils.py -------------------------------------------------------------------------------- /recipes-devtools/python/python3-s3transfer_0.13.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "python3 s3 transfer" 2 | DESCRIPTION = "Amazon S3 Transfer Manager for Python" 3 | HOMEPAGE = "https://github.com/boto/s3transfer" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" 6 | 7 | SRC_URI = "\ 8 | git://github.com/boto/s3transfer.git;protocol=https;branch=master \ 9 | file://run-ptest \ 10 | " 11 | SRCREV = "90a897be1a2be87e7a9b46bf4b1c12df81a4daf0" 12 | 13 | S = "${WORKDIR}/git" 14 | 15 | inherit setuptools3 ptest 16 | 17 | RDEPENDS:${PN} += "\ 18 | python3-asyncio \ 19 | python3-botocore \ 20 | python3-multiprocessing \ 21 | python3-urllib3 \ 22 | " 23 | 24 | RDEPENDS:${PN}-ptest += "\ 25 | python3 \ 26 | python3-pytest \ 27 | python3-urllib3 \ 28 | " 29 | 30 | do_install_ptest() { 31 | install -d ${D}${PTEST_PATH}/tests 32 | cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ 33 | } 34 | -------------------------------------------------------------------------------- /recipes-devtools/python/python3-urllib3-1.x_1.26.20.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Python HTTP library" 2 | DESCRIPTION = "Python HTTP library with thread-safe connection pooling, file post support, sanity friendly, and more" 3 | HOMEPAGE = "https://github.com/shazow/urllib3" 4 | LICENSE = "MIT" 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c2823cb995439c984fd62a973d79815c" 6 | 7 | # version 1.x.x 8 | UPSTREAM_CHECK_GITTAGREGEX = "(?P1\.\d+(\.\d+)+)" 9 | 10 | inherit setuptools3 11 | 12 | PIP_INSTALL_PACKAGE = "urllib3" 13 | 14 | S = "${WORKDIR}/git" 15 | SRC_URI = "git://github.com/urllib3/urllib3.git;protocol=https;branch=1.26.x" 16 | SRCREV = "6f2ad7ca0cdde53751bab29cbc10bcc965bb4387" 17 | 18 | RDEPENDS:${PN} += "\ 19 | ${PYTHON_PN}-certifi \ 20 | ${PYTHON_PN}-cryptography \ 21 | ${PYTHON_PN}-email \ 22 | ${PYTHON_PN}-idna \ 23 | ${PYTHON_PN}-netclient \ 24 | ${PYTHON_PN}-pyopenssl \ 25 | ${PYTHON_PN}-threading \ 26 | " 27 | 28 | CVE_PRODUCT = "urllib3" 29 | 30 | BBCLASSEXTEND = "native nativesdk" 31 | 32 | RCONFLICTS:${PN} = "python3-urllib3" 33 | 34 | RREPLACES:${PN} = "python3-urllib3 (< 2)" 35 | -------------------------------------------------------------------------------- /recipes-extended/openssh/openssh_%.bbappend: -------------------------------------------------------------------------------- 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # SPDX-License-Identifier: MIT-0 3 | 4 | # nooelint: oelint.func.specific 5 | do_install:append:aws-ec2() { 6 | # Hardening settings to enforce key-based ssh and disable root logins. 7 | sed -i -e 's:#PermitRootLogin prohibit-password:PermitRootLogin no:' ${D}${sysconfdir}/ssh/sshd_config 8 | sed -i -e 's:#PermitEmptyPasswords.*:PermitEmptyPasswords no:' ${D}${sysconfdir}/ssh/sshd_config 9 | sed -i -e 's:#PasswordAuthentication yes:PasswordAuthentication no:' ${D}${sysconfdir}/ssh/sshd_config 10 | } 11 | 12 | -------------------------------------------------------------------------------- /recipes-external/python3-timeloop/python3-timeloop_1.0.2.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Timeloop" 2 | DESCRIPTION = "An elegant periodic task executor " 3 | HOMEPAGE = "https://github.com/sankalpjonn/timeloop" 4 | LICENSE = "MIT" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=030635eb18c38d9fd120c13a324721b7" 6 | 7 | SRC_URI = "git://github.com/sankalpjonn/timeloop.git;protocol=https;branch=master" 8 | SRCREV = "36ec5cbb133a6dcfb5316f59b5e11765c14e62c2" 9 | 10 | S = "${WORKDIR}/git" 11 | 12 | inherit setuptools3 13 | 14 | RDEPENDS:${PN} += "python3-core" 15 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-device-client/aws-iot-device-client_1.10.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS IoT Device Client" 2 | DESCRIPTION = "The AWS IoT Device Client is free, open-source, modular software written in C++ that you can compile and install on your Embedded Linux based IoT devices to access AWS IoT Core, AWS IoT Device Management, and AWS IoT Device Defender features by default." 3 | HOMEPAGE = "https://github.com/awslabs/aws-iot-device-client" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3eb31626add6ada64ff9ac772bd3c653" 6 | 7 | DEPENDS = "\ 8 | aws-iot-device-sdk-cpp-v2 \ 9 | openssl \ 10 | " 11 | 12 | # disabled googletest because of: https://github.com/awslabs/aws-iot-device-client/issues/404 13 | # use a older and build by this package version, will be downloaded in the do_configure step 14 | # nooelint: oelint.task.network 15 | do_configure[network] = "1" 16 | 17 | PROVIDES = "aws/aws-iot-device-client" 18 | 19 | BRANCH ?= "main" 20 | 21 | # nooelint: oelint.file.patchsignedoff:Patch 22 | SRC_URI = "\ 23 | git://github.com/awslabs/aws-iot-device-client.git;protocol=https;branch=${BRANCH} \ 24 | file://run-ptest \ 25 | file://001-disable-tests.patch \ 26 | " 27 | 28 | SRCREV = "7f9547bca3e1a199f2824f4376e1782b082b226f" 29 | 30 | S = "${WORKDIR}/git" 31 | 32 | inherit cmake systemd ptest 33 | 34 | do_install() { 35 | install -d ${D}${base_sbindir} 36 | install -d ${D}${sysconfdir} 37 | install -d -m 0700 ${D}${sysconfdir}/aws-iot-device-client 38 | install -d ${D}${systemd_unitdir}/system 39 | 40 | install -m 0755 ${B}/aws-iot-device-client \ 41 | ${D}${base_sbindir}/aws-iot-device-client 42 | install -m 0644 ${S}/setup/aws-iot-device-client.service \ 43 | ${D}${systemd_system_unitdir}/aws-iot-device-client.service 44 | } 45 | 46 | EXTRA_OECMAKE += "\ 47 | -DBUILD_SDK=OFF \ 48 | -DBUILD_TEST_DEPS=ON \ 49 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ 50 | -DCMAKE_VERBOSE_MAKEFILE=ON \ 51 | -DCMAKE_CXX_FLAGS_RELEASE=-s \ 52 | " 53 | 54 | CXXFLAGS += "-Wno-ignored-attributes" 55 | 56 | PACKAGECONFIG ??= " dsn dsc ds st fp dd pubsub samples jobs" 57 | 58 | # enable PACKAGECONFIG = "static" to build static instead of shared 59 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON,," 60 | 61 | PACKAGECONFIG[samples] = "-DEXCLUDE_SAMPLES=OFF,-DEXCLUDE_SAMPLES=ON,," 62 | PACKAGECONFIG[pubsub] = "-DEXCLUDE_PUBSUB=OFF,-DEXCLUDE_PUBSUB=ON,," 63 | PACKAGECONFIG[jobs] = "-DEXCLUDE_JOBS=OFF,-DEXCLUDE_JOBS=ON,," 64 | PACKAGECONFIG[dd] = "-DEXCLUDE_DD=OFF,-DEXCLUDE_DD=ON,," 65 | PACKAGECONFIG[st] = "-DEXCLUDE_ST=OFF,-DEXCLUDE_ST=ON,," 66 | PACKAGECONFIG[fp] = "-DEXCLUDE_FP=OFF,-DEXCLUDE_FP=ON,," 67 | PACKAGECONFIG[ds] = "-DEXCLUDE_SHADOW=OFF,-DEXCLUDE_SHADOW=ON,," 68 | PACKAGECONFIG[dsc] = "-DEXCLUDE_CONFIG_SHADOW=OFF,-DEXCLUDE_CONFIG_SHADOW=ON,," 69 | PACKAGECONFIG[dsn] = "-DEXCLUDE_SAMPLE_SHADOW=OFF,-DEXCLUDE_SAMPLE_SHADOW=ON,," 70 | 71 | FILES:${PN} += "${base_sbindir}/sbin/aws-iot-device-client" 72 | FILES:${PN} += "${systemd_system_unitdir}/aws-iot-device-client.service" 73 | FILES:${PN} += "${sysconfdir}/aws-iot-device-client.json" 74 | 75 | RDEPENDS:${PN} = "\ 76 | aws-iot-device-sdk-cpp-v2 \ 77 | openssl \ 78 | " 79 | 80 | SYSTEMD_AUTO_ENABLE = "enable" 81 | SYSTEMD_SERVICE:${PN} = "aws-iot-device-client.service" 82 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-device-client/files/001-disable-tests.patch: -------------------------------------------------------------------------------- 1 | From d3afefb0d8dc0e548f4ed55d2c6d6954c7fed5f5 Mon Sep 17 00:00:00 2001 2 | From: Thomas Roos 3 | Date: Mon, 18 Nov 2024 19:32:41 +0000 4 | Subject: [PATCH] aws-iot-device-client: disable tests, as the new aws-c-io 5 | 6 | Upstream-Status: Submitted [author] 7 | --- 8 | CMakeLists.txt | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/CMakeLists.txt b/CMakeLists.txt 12 | index 7f3a8c0..e7374fe 100644 13 | --- a/CMakeLists.txt 14 | +++ b/CMakeLists.txt 15 | @@ -266,4 +266,4 @@ if (BUILD_TEST_DEPS) 16 | ${CMAKE_BINARY_DIR}/googletest-build) 17 | endif () 18 | 19 | -add_subdirectory(test) 20 | +# add_subdirectory(test) 21 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-device-client/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export LD_PRELOAD=$(find /usr/lib /lib -type f -name "libasan.so*") 3 | 4 | aws-iot-device-client --help 5 | 6 | RETVAL=$? 7 | if [ $RETVAL -eq 0 ] ; then 8 | echo "PASS: aws-iot-device-client: simple test" 9 | else 10 | echo "FAIL: aws-iot-device-client: simple test" 11 | fi 12 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-fleetwise/README.md: -------------------------------------------------------------------------------- 1 | # AWS IoT FleetWise Edge Agent 2 | 3 | This recipe builds [the AWS IoT FleetWise Edge Agent](https://github.com/aws/aws-iot-fleetwise-edge) 4 | and installs it as a `systemd` service named `fwe@0`. 5 | 6 | Refer to the [AWS IoT FleetWise Edge Agent Developer Guide](https://github.com/aws/aws-iot-fleetwise-edge/blob/main/docs/dev-guide/edge-agent-dev-guide.md) 7 | for more information about configuring the template configuration file installed at 8 | `/etc/aws-iot-fleetwise/config-0.json`, provisioning AWS IoT Core credentials, registering the 9 | device as a IoT FleetWise Vehicle, and deploying IoT FleetWise Campaigns from the cloud. 10 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-fleetwise/aws-iot-fleetwise-edge_1.3.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS IoT FleetWise Edge Agent" 2 | DESCRIPTION = "AWS IoT FleetWise is a service that makes it easy for Automotive OEMs, Fleet operators, Independent Software vendors (ISVs) to collect, store, organize, and monitor data from vehicles at scale." 3 | HOMEPAGE = "https://github.com/aws/aws-iot-fleetwise-edge" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" 6 | 7 | # nooelint: oelint.vars.dependsordered 8 | DEPENDS = "\ 9 | aws-sdk-cpp \ 10 | boost \ 11 | jsoncpp \ 12 | protobuf \ 13 | protobuf-native \ 14 | snappy \ 15 | jq-native \ 16 | " 17 | 18 | # nooelint: oelint.file.patchsignedoff 19 | SRC_URI = "\ 20 | git://github.com/aws/aws-iot-fleetwise-edge.git;protocol=https;branch=main \ 21 | file://001-remove-cxx-standard.patch \ 22 | file://run-ptest \ 23 | " 24 | 25 | SRCREV = "e650426256718fe446a65fd751a577ce0774598f" 26 | 27 | S = "${WORKDIR}/git" 28 | 29 | inherit cmake systemd ptest pkgconfig 30 | 31 | FILES:${PN} += "${systemd_system_unitdir}" 32 | 33 | PACKAGECONFIG ?= "\ 34 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 35 | " 36 | 37 | PACKAGECONFIG:append:x86-64 = " ${@bb.utils.contains('PTEST_ENABLED', '1', 'sanitize', '', d)}" 38 | 39 | PACKAGECONFIG[pulseaudio] = "-DPULSEAUDIO=TRUE, -DPULSEAUDIO=FALSE, pulseaudio" 40 | 41 | # CMAKE_CROSSCOMPILING=OFF will enable build of unit tests 42 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF, googlebenchmark" 43 | 44 | RDEPENDS:${PN} = "protobuf" 45 | 46 | EXTRA_OECMAKE += "-DFWE_AWS_SDK_SHARED_LIBS=ON" 47 | 48 | EXTRA_OECMAKE:append = " -DCMAKE_BUILD_TYPE=RelWithDebInfo" 49 | 50 | SYSTEMD_SERVICE:${PN} = "fwe@.service" 51 | 52 | # Default values for configure-fwe 53 | CERTIFICATE_FILE ?= "/etc/aws-iot-fleetwise/certificate.pem" 54 | PRIVATE_KEY_FILE ?= "/etc/aws-iot-fleetwise/private-key.key" 55 | LOG_LEVEL ?= "Info" 56 | LOG_COLOR ?= "Auto" 57 | PERSISTENCY_PATH ?= "/var/aws-iot-fleetwise/" 58 | TOPIC_PREFIX ?= "\$aws/iotfleetwise/" 59 | CONNECTION_TYPE ?= "iotCore" 60 | 61 | # Non-default parameters needed to be configured 62 | CERTIFICATE ?= "-----BEGIN-----\nXXXXX\n-----END-----\n" 63 | PRIVATE_KEY ?= "-----BEGIN-----\nXXXXX\n-----END-----\n" 64 | VEHICLE_NAME ?= "v1" 65 | ENDPOINT_URL ?= "xxx.iot.region.amazonaws.com" 66 | CAN_BUS ?= "vcan0" 67 | 68 | do_configure:append() { 69 | 70 | # Execute the script with arguments to generate the file 71 | ${S}/tools/configure-fwe.sh \ 72 | --input-config-file ${S}/configuration/static-config.json \ 73 | --output-config-file ${WORKDIR}/config-0.json \ 74 | --connection-type ${CONNECTION_TYPE} \ 75 | --vehicle-name ${VEHICLE_NAME} \ 76 | --endpoint-url ${ENDPOINT_URL} \ 77 | --can-bus0 ${CAN_BUS} \ 78 | --certificate-file ${CERTIFICATE_FILE} \ 79 | --certificate ${CERTIFICATE} \ 80 | --private-key ${PRIVATE_KEY} \ 81 | --private-key-file ${PRIVATE_KEY_FILE} \ 82 | --persistency-path ${PERSISTENCY_PATH} \ 83 | --topic-prefix ${TOPIC_PREFIX} \ 84 | --log-level ${LOG_LEVEL} \ 85 | --log-color ${LOG_COLOR} 86 | } 87 | 88 | do_install() { 89 | install -d ${D}${bindir} 90 | install -m 0755 ${B}/aws-iot-fleetwise-edge ${D}${bindir} 91 | install -m 0755 ${S}/tools/deploy/run-fwe.sh ${D}${bindir} 92 | install -d ${D}${systemd_system_unitdir} 93 | install -m 0755 ${S}/tools/deploy/fwe@.service ${D}${systemd_system_unitdir} 94 | install -d ${D}${sysconfdir}/aws-iot-fleetwise 95 | install -m 0755 ${WORKDIR}/config-0.json ${D}${sysconfdir}/aws-iot-fleetwise 96 | install -d ${D}${localstatedir}/aws-iot-fleetwise 97 | } 98 | 99 | do_install_ptest() { 100 | install -d ${D}${PTEST_PATH}/tests 101 | install -m 0755 ${S}/configuration/static-config.json ${D}${PTEST_PATH}/config-0.json 102 | install -m 0755 ${B}/fwe-gtest ${D}${PTEST_PATH}/tests/ 103 | install -m 0755 ${B}/fwe-benchmark ${D}${PTEST_PATH}/tests/ 104 | } 105 | 106 | RDEPENDS:${PN}-ptest += "\ 107 | python3 \ 108 | " 109 | 110 | # -fsanitize=address does cause this 111 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 112 | INSANE_SKIP += "${@bb.utils.contains('PACKAGECONFIG', 'sanitize', 'buildpaths', '', d)}" 113 | 114 | PACKAGECONFIG[sanitize] = ",,gcc-sanitizers" 115 | OECMAKE_CXX_FLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'sanitize', '-fsanitize=address -fno-omit-frame-pointer', '', d)}" 116 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-fleetwise/files/001-remove-cxx-standard.patch: -------------------------------------------------------------------------------- 1 | From ca53cfe70882adaa6d51eff9b610b8189cade393 Mon Sep 17 00:00:00 2001 2 | From: Thomas Roos 3 | Date: Tue, 9 Jan 2024 15:01:35 +0000 4 | Subject: [PATCH] aws-iot-fleetwise-edge: remove setting of cxx-standard 5 | 6 | Upstream-Status: Submitted [author] 7 | --- 8 | CMakeLists.txt | 5 ----- 9 | 1 file changed, 5 deletions(-) 10 | 11 | diff --git a/CMakeLists.txt b/CMakeLists.txt 12 | index 2695959..2165366 100644 13 | --- a/CMakeLists.txt 14 | +++ b/CMakeLists.txt 15 | @@ -4,11 +4,6 @@ cmake_minimum_required(VERSION 3.10.2) 16 | 17 | project(iotfleetwise VERSION 1.3.1) 18 | 19 | -# FWE uses C++14 for compatibility reasons with Automotive middlewares (Adaptive AUTOSAR, ROS2) 20 | -# Note: When built with FWE_FEATURE_ROS2, colcon will override these settings 21 | -set(CMAKE_CXX_STANDARD 14) 22 | -set(CMAKE_CXX_STANDARD_REQUIRED True) 23 | - 24 | # Print out the compile commands which is useful for IDEs 25 | set(CMAKE_EXPORT_COMPILE_COMMANDS ON) 26 | 27 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-fleetwise/files/ptest_result.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 Amazon.com, Inc. or its affiliates. 2 | # SPDX-License-Identifier: MIT 3 | 4 | import json 5 | import sys 6 | 7 | if len(sys.argv) != 2: 8 | print(f"usage: {sys.argv[0]} [result file]") 9 | sys.exit(1) 10 | 11 | with open (sys.argv[1], 'rb') as json_file: 12 | data = json.load(json_file) 13 | for testsuite in data['testsuites']: 14 | for test in testsuite['testsuite']: 15 | result = 'PASS' if not 'failures' in test else 'FAIL' 16 | print(f"{result}: {test['classname']}_{test['name']}") 17 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-fleetwise/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | aws-iot-fleetwise-edge config-0.json 2>&1 > test.log & 4 | sleep 30 5 | grep "AWS API ShutDown Completed" test.log 6 | 7 | RETVAL=$? 8 | if [ $RETVAL -eq 0 ] ; then 9 | echo "PASS: aws-iot-fleetwise startup test" 10 | else 11 | echo "FAIL: aws-iot-fleetwise startup test" 12 | fi 13 | 14 | ### fwe-gtest 15 | tests/fwe-gtest --gtest_filter=\ 16 | -AwsIotConnectivityModuleTest*:\ 17 | -CANDecoderTest*:\ 18 | -CANDataSourceTest.*:\ 19 | -CollectionInspectionEngine*:\ 20 | -CollectionInspectionWorkerThreadTest.*:\ 21 | -IoTFleetWiseConfigTest.ReadOk:\ 22 | -IoTFleetWiseEngineTest.*:\ 23 | -CollectionInspectionEngineDoubleTest.RandomDataTest\ 24 | -ISOTPOverCANProtocolTest.*:\ 25 | -OBDOverCANModuleTest.* \ 26 | --gtest_fail_fast --gtest_output=json:result.json > /dev/null ; python3 ptest_result.py result.json 27 | 28 | 29 | ### fwe-benchmark 30 | cd tests 31 | 32 | rm -rf tests.log 33 | 34 | ./fwe-benchmark >> tests.log 2>&1 35 | 36 | RETVAL=$? 37 | sed -e '/\[\s\|==.*==\|runtime error:/!d ; /OK/ s/^/PASS: / ; /FAILED\|ERROR: .*Sanitizer\|runtime error:/ s/^/FAIL: /' tests.log 38 | 39 | if [ $RETVAL -eq 0 ] ; then 40 | echo "PASS: fwe-benchmark test" 41 | else 42 | echo "FAIL: fwe-benchmark test" 43 | fi 44 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/README.md: -------------------------------------------------------------------------------- 1 | # AWS IoT Greengrass 2 | 3 | ## AWS IoT Greengrass Lite Runtime 4 | 5 | AWS IoT Greengrass Lite is an optimized runtime option designed for constrained devices. Written in C for improved performance and reduced footprint. 6 | 7 | ### Component Compatibility 8 | 9 | > [!NOTE] 10 | > At launch, Greengrass Lite Runtime supports a subset of Greengrass v2 components, with plans for eventual 11 | > feature parity in subsequent releases. 12 | > See more details [here](https://github.com/aws-greengrass/aws-greengrass-lite). 13 | 14 | ## Greengrass Lite on prplOS 15 | 16 | ### Integration Features 17 | 18 | AWS IoT Greengrass has been integrated with prplWare and RDK Telco stacks using prpl foundation's open source Life Cycle Manager (LCM) containers. This integration provides: 19 | 20 | * Simplified application development and deployment within LCM containers 21 | * High-level software abstraction for CPE devices 22 | * Cloud-to-edge integration capabilities 23 | * Flexibility to choose between prplWare and RDK stacks 24 | * Compliance with TR-369 and TR-181 standards 25 | 26 | ### Key Benefits for Telco Providers 27 | 28 | * Quick development and testing of new services 29 | * Remote application deployment 30 | * IoT device lifecycle management 31 | * Managed Wi-Fi capabilities 32 | * Network security management 33 | * Mass telemetry support 34 | * AI/ML capabilities at the edge 35 | * Advanced analytics 36 | 37 | ### Implementation Support 38 | 39 | * Supports Customer Premises Equipment (CPE) 40 | * Compatible with TR369 compliant prplWare 41 | * Works with RDKTelco software stacks 42 | * Operates through prpl foundation's LCM containers 43 | * Maintains native stack communications 44 | 45 | > [!NOTE] 46 | > The integration is still a pending PR. See more details about how to get started with Greengrass lite on Prpl OS [here](https://github.com/aws-samples/aws-iot-gg-prplos-workshop/pull/1): 47 | 48 | ## AWS IoT Greengrass V2 49 | 50 | These images are provided for AWS IoT Greengrass V2: 51 | * `greengrass-bin`: This installs Greengrass v2 without a configuration file. This can be used if you plan to add logic to configure Greengrass when the device runs for the first time 52 | * `greengrass-bin-demo`: This installs Greengrass v2 and configures it to run using the provided certificates and configs. Use this if you want the image to be specific to a device, or to get started quickly. 53 | 54 | If you want to use a version of greengrass that is not the latest, you can provide `PREFERRED_VERSION_greengrass-bin` and `PREFERRED_VERSION_greengrass-bin-demo` (if used) to use latest. 55 | 56 | ### Add systemd 57 | 58 | Greengrass v2 runs more elegantly using systemd. Add this to your 59 | local.conf or distribution to add support. 60 | 61 | ```bash 62 | DISTRO_FEATURES += "systemd" 63 | DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" 64 | VIRTUAL-RUNTIME_init_manager = "systemd" 65 | VIRTUAL-RUNTIME_initscripts = "" 66 | ``` 67 | 68 | ### Configure for demo mode (greengrass-bin-demo) 69 | 70 | 1. Put this in local.conf and configure 71 | 72 | ```bash 73 | IMAGE_INSTALL:append = " greengrass-bin-demo" 74 | 75 | GGV2_DATA_EP = "" 76 | GGV2_CRED_EP = "" 77 | GGV2_REGION = "" 78 | GGV2_PKEY = "" 79 | GGV2_CERT = "" 80 | GGV2_CA = "" 81 | GGV2_THING_NAME = "" 82 | GGV2_TES_RALIAS = "" 83 | ``` 84 | 85 | Add certificate, key, and CA to the files/ directory. Overwrite the 86 | files named: 87 | 88 | - demo.pkey.pem : private key in PEM format 89 | - demo.cert.pem : certificate in PEM format 90 | - demo.root.pem : root CA certificate in PEM format 91 | 92 | A sample configuration looks like the following. 93 | 94 | ```bash 95 | GGV2_DATA_EP = "audqth88umq6e-ats.iot.us-east-1.amazonaws.com" 96 | GGV2_CRED_EP = "c2uxv58888oq7k.credentials.iot.us-east-1.amazonaws.com" 97 | GGV2_REGION = "us-west-2" 98 | GGV2_THING_NAME = "workstation" 99 | GGV2_TES_RALIAS = "GreengrassV2TokenExchangeRoleAlias" 100 | ``` 101 | 102 | In order to get the information above you can follow the instructions provided here: https://docs.aws.amazon.com/greengrass/v2/developerguide/manual-installation.html 103 | 104 | ## Using Greengrass Fleet Provisioning 105 | 106 | When enabling Fleet provisioning `PACKAGECONFIG:pn-greengrass-bin = "fleetprovisioning"` 107 | it is important to provide claim certificates and place them in the `files` dir: 108 | ``` 109 | meta-aws 110 | └── recipes-iot 111 | └── aws-iot-greengrass 112 | └── files 113 | └── claim.cert.pem 114 | └── claim.pkey.pem 115 | └── claim.root.pem 116 | ``` 117 | Additionally make sure to provide the configuration through the variables from the local.conf similar to the ones in `greengrass-bin-demo` 118 | 119 | ``` 120 | GGV2_DATA_EP = "" 121 | GGV2_CRED_EP = "" 122 | GGV2_REGION = "" 123 | GGV2_PKEY = "" 124 | GGV2_CERT = "" 125 | GGV2_CA = "" 126 | GGV2_THING_NAME = "" 127 | GGV2_TES_RALIAS = "" 128 | ``` 129 | with the addition of: 130 | ``` 131 | GGV2_THING_GROUP = "" 132 | in which the devices will be part of after automatic provisioning and 133 | GGV2_FLEET_PROVISIONING_TEMPLATE_NAME = "" 134 | 135 | ``` -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin-demo.bb: -------------------------------------------------------------------------------- 1 | # nooelint: oelint.file.underscores,oelint.var.mandatoryvar.HOMEPAGE 2 | SUMMARY = "greengrass-bin demo" 3 | DESCRIPTION = "AWS IoT Greengrass Nucleus - Binary Distribution - demo mode" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" 6 | 7 | GG_BASENAME = "greengrass/v2" 8 | GG_ROOT = "${D}/${GG_BASENAME}" 9 | 10 | # nooelint: oelint.vars.downloadfilename 11 | SRC_URI = "\ 12 | https://raw.githubusercontent.com/aws-greengrass/aws-greengrass-nucleus/main/LICENSE;name=license; \ 13 | file://greengrassv2-init.yaml \ 14 | file://demo.pkey.pem \ 15 | file://demo.cert.pem \ 16 | file://demo.root.pem \ 17 | " 18 | 19 | SRC_URI[license.md5sum] = "34400b68072d710fecd0a2940a0d1658" 20 | SRC_URI[license.sha256sum] = "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b" 21 | 22 | UPSTREAM_VERSION_UNKNOWN = "1" 23 | 24 | S = "${WORKDIR}/sources" 25 | UNPACKDIR = "${S}" 26 | 27 | FILES:${PN} += "/${GG_BASENAME}" 28 | 29 | RDEPENDS:${PN} += "greengrass-bin" 30 | 31 | # greengrass-bin needs a correct clock, that should be done by any NTP client. 32 | # nooelint: oelint.vars.dependsordered 33 | RRECOMMENDS:${PN} += "\ 34 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ntp-systemd', '', d)} \ 35 | " 36 | 37 | do_configure[noexec] = "1" 38 | do_compile[noexec] = "1" 39 | 40 | do_install() { 41 | install -d ${GG_ROOT}/auth 42 | install -d ${GG_ROOT}/config 43 | install -m 0440 ${UNPACKDIR}/demo.pkey.pem ${GG_ROOT}/auth 44 | install -m 0440 ${UNPACKDIR}/demo.cert.pem ${GG_ROOT}/auth 45 | install -m 0440 ${UNPACKDIR}/demo.root.pem ${GG_ROOT}/auth 46 | 47 | install -m 0640 ${UNPACKDIR}/greengrassv2-init.yaml ${GG_ROOT}/config/config.yaml 48 | 49 | sed -i -e "s,##private_key##,/${GG_BASENAME}/auth/demo.pkey.pem,g" ${GG_ROOT}/config/config.yaml 50 | sed -i -e "s,##certificate_path##,/${GG_BASENAME}/auth/demo.cert.pem,g" ${GG_ROOT}/config/config.yaml 51 | sed -i -e "s,##root_ca##,/${GG_BASENAME}/auth/demo.root.pem,g" ${GG_ROOT}/config/config.yaml 52 | sed -i -e "s,##thing_name##,${GGV2_THING_NAME},g" ${GG_ROOT}/config/config.yaml 53 | sed -i -e "s,##aws_region##,${GGV2_REGION},g" ${GG_ROOT}/config/config.yaml 54 | sed -i -e "s,##role_alias##,${GGV2_TES_RALIAS},g" ${GG_ROOT}/config/config.yaml 55 | sed -i -e "s,##posixUser##,ggc_user:ggc_group,g" ${GG_ROOT}/config/config.yaml 56 | sed -i -e "s,##iot_cred_endpoint##,${GGV2_CRED_EP},g" ${GG_ROOT}/config/config.yaml 57 | sed -i -e "s,##iot_data_endpoint##,${GGV2_DATA_EP},g" ${GG_ROOT}/config/config.yaml 58 | } 59 | 60 | # nooelint: oelint.vars.insaneskip 61 | INSANE_SKIP:${PN} += "already-stripped ldflags file-rdeps" 62 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin-demo/demo.cert.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/recipes-iot/aws-iot-greengrass/greengrass-bin-demo/demo.cert.pem -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin-demo/demo.pkey.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/recipes-iot/aws-iot-greengrass/greengrass-bin-demo/demo.pkey.pem -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin-demo/demo.root.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/recipes-iot/aws-iot-greengrass/greengrass-bin-demo/demo.root.pem -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin-demo/greengrassv2-init.yaml: -------------------------------------------------------------------------------- 1 | system: 2 | thingName: ##thing_name## 3 | privateKeyPath: ##private_key## 4 | rootCaPath: ##root_ca## 5 | certificateFilePath: ##certificate_path## 6 | services: 7 | main: 8 | lifecycle: {} 9 | aws.greengrass.Nucleus: 10 | configuration: 11 | awsRegion: ##aws_region## 12 | iotCredEndpoint: ##iot_cred_endpoint## 13 | iotDataEndpoint: ##iot_data_endpoint## 14 | iotRoleAlias: ##role_alias## 15 | runWithDefault: 16 | posixUser: ##posixUser## 17 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin/claim.cert.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/recipes-iot/aws-iot-greengrass/greengrass-bin/claim.cert.pem -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin/claim.pkey.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/recipes-iot/aws-iot-greengrass/greengrass-bin/claim.pkey.pem -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin/claim.root.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws4embeddedlinux/meta-aws/cbf17bb4c4ad7440e862ef6684892164d58a71c4/recipes-iot/aws-iot-greengrass/greengrass-bin/claim.root.pem -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin/config.yaml.template: -------------------------------------------------------------------------------- 1 | --- 2 | services: 3 | aws.greengrass.Nucleus: 4 | configuration: 5 | awsRegion: "${AWS_DEFAULT_REGION}" 6 | runWithDefault: 7 | posixUser: "${PROXY_USER}" 8 | aws.greengrass.FleetProvisioningByClaim: 9 | configuration: 10 | rootPath: "/greengrass/v2" 11 | awsRegion: "${AWS_DEFAULT_REGION}" 12 | iotDataEndpoint: "${IOT_DATA_ENDPOINT}" 13 | iotCredentialEndpoint: "${IOT_CRED_ENDPOINT}" 14 | iotRoleAlias: "${TE_ROLE_ALIAS}" 15 | provisioningTemplate: "${FLEET_PROVISIONING_TEMPLATE_NAME}" 16 | claimCertificatePath: "${CLAIM_CERT_PATH}" 17 | claimCertificatePrivateKeyPath: "${CLAIM_KEY_PATH}" 18 | rootCaPath: "${ROOT_CA_PATH}" 19 | templateParameters: 20 | ThingName: "${THING_NAME}_" 21 | ThingGroupName: "${THING_GROUP_NAME}" 22 | --- 23 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin/greengrass.service.patch: -------------------------------------------------------------------------------- 1 | Upstream-Status: Inappropriate [oe-specific] 2 | 3 | Index: greengrass-bin/bin/greengrass.service.template 4 | =================================================================== 5 | --- greengrass-bin.orig/bin/greengrass.service.template 6 | +++ greengrass-bin/bin/greengrass.service.template 7 | @@ -8,6 +8,7 @@ PIDFile=REPLACE_WITH_GG_LOADER_PID_FILE 8 | RemainAfterExit=no 9 | Restart=on-failure 10 | RestartSec=10 11 | +ExecStartPre=/bin/sh -c "/greengrass/v2/config/replace_board_id.sh /greengrass/v2/config/config.yaml" 12 | ExecStart=/bin/sh -c "exec REPLACE_WITH_GG_LOADER_FILE >> REPLACE_WITH_LOADER_LOG_FILE 2>&1" 13 | KillMode=mixed 14 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin/greengrassv2-init.yaml: -------------------------------------------------------------------------------- 1 | system: 2 | thingName: ##thing_name## 3 | privateKeyPath: ##private_key## 4 | rootCaPath: ##root_ca## 5 | certificateFilePath: ##certificate_path## 6 | services: 7 | main: 8 | lifecycle: {} 9 | aws.greengrass.Nucleus: 10 | configuration: 11 | awsRegion: ##aws_region## 12 | iotCredEndpoint: ##iot_cred_endpoint## 13 | iotDataEndpoint: ##iot_data_endpoint## 14 | iotRoleAlias: ##role_alias## 15 | runWithDefault: 16 | posixUser: ##posixUser## 17 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin/loader.patch: -------------------------------------------------------------------------------- 1 | Upstream-Status: Inappropriate [oe-specific] 2 | 3 | Index: greengrass-bin/bin/loader 4 | =================================================================== 5 | --- greengrass-bin.orig/bin/loader 6 | +++ greengrass-bin/bin/loader 7 | @@ -31,7 +31,7 @@ launch_kernel() { 8 | fi 9 | 10 | JVM_OPTIONS="$JVM_OPTIONS -Droot=$GG_ROOT" 11 | - OPTIONS="--setup-system-service false" 12 | + OPTIONS="--setup-system-service false --trusted-plugin $GG_ROOT/plugins/trusted/aws.greengrass.FleetProvisioningByClaim.jar" 13 | if [ ! -z "${CONFIG_FILE}" ]; then 14 | OPTIONS="$OPTIONS --config $CONFIG_FILE" 15 | fi 16 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin/replace_board_id.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | file_path="$1" 4 | 5 | default_iface=$(busybox route | grep default | awk '{print $8}') 6 | mac_address=$(busybox ifconfig "$default_iface" | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | tr ':' '_') 7 | 8 | sed -i "s//$mac_address/g" "$file_path" 9 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-bin/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -euxo pipefail 3 | 4 | # Cause we starting this in the ptest separate. 5 | systemctl stop greengrass 6 | # some settle time 7 | sleep 10 8 | 9 | cd /greengrass/v2/alts/current/distro/bin 10 | chmod 755 loader 11 | ./loader 2>&1 > test.log & 12 | sleep 120 13 | grep "Launched Nucleus successfully" test.log 14 | 15 | RETVAL=$? 16 | if [ $RETVAL -eq 0 ] ; then 17 | echo "PASS: greengrass-bin startup test" 18 | else 19 | echo "FAIL: greengrass-bin startup test" 20 | fi 21 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-lite/001-disable_strip.patch: -------------------------------------------------------------------------------- 1 | Upstream-Status: Inappropriate [oe specific] 2 | 3 | Index: git/CMakeLists.txt 4 | =================================================================== 5 | --- git.orig/CMakeLists.txt 6 | +++ git/CMakeLists.txt 7 | @@ -185,7 +185,8 @@ try_add_link_option(compress-debug-secti 8 | # try_add_link_option_if(gc-sections $> 9 | # LINKER:--gc-sections) 10 | 11 | -try_add_link_option_if(strip-all $ LINKER:-s) 12 | +# Yocto will stip and create debug packages 13 | +# try_add_link_option_if(strip-all $ LINKER:-s) 14 | 15 | set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG FALSE) 16 | set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) 17 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-lite/greengrass-lite.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | system: 3 | rootPath: "@GG_WORKING_DIR@" 4 | services: 5 | aws.greengrass.NucleusLite: 6 | componentType: "NUCLEUS" 7 | configuration: 8 | runWithDefault: 9 | posixUser: "@GG_USER@:@GG_GROUP@" 10 | greengrassDataPlanePort: "8443" 11 | platformOverride: {} 12 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-greengrass/greengrass-lite/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -euxo pipefail 3 | 4 | # this has been disabled cause this has issues with greengrass-bin 5 | systemctl enable ggl.gg-ipc.socket.socket 6 | systemctl start greengrass-lite.target 7 | 8 | # settle time 9 | sleep 10 10 | 11 | systemctl is-active greengrass-lite.target 12 | 13 | RETVAL=$? 14 | if [ $RETVAL -eq 0 ] ; then 15 | echo "PASS: greengrass lite active test" 16 | else 17 | echo "FAIL: greengrass lite active test" 18 | fi 19 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-securetunneling-localproxy/aws-iot-securetunneling-localproxy_git.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS Iot Secure Tunneling local proxy reference C++ implementation" 2 | DESCRIPTION = "When devices are deployed behind restricted firewalls at remote sites, you need a way to gain access to those device for troubleshooting, configuration updates, and other operational tasks. Secure tunneling helps customers establish bidirectional communication to remote devices over a secure connection that is managed by AWS IoT. Secure tunneling does not require updates to your existing inbound firewall rule, so you can keep the same security level provided by firewall rules at a remote site. " 3 | HOMEPAGE = "https://docs.aws.amazon.com/iot/latest/developerguide/secure-tunneling.html" 4 | 5 | LICENSE = "Apache-2.0" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 7 | 8 | DEPENDS += "\ 9 | boost \ 10 | catch2 \ 11 | openssl \ 12 | protobuf \ 13 | protobuf-native \ 14 | zlib \ 15 | " 16 | 17 | BRANCH ?= "main" 18 | 19 | # nooelint: oelint.file.patchsignedoff 20 | SRC_URI = "\ 21 | git://git@github.com/aws-samples/aws-iot-securetunneling-localproxy.git;branch=${BRANCH};protocol=https \ 22 | file://0001-boost-support-any.patch \ 23 | file://0002-remove-cxx-standard.patch \ 24 | file://0003-boost-include-format.patch \ 25 | file://0004-cmake-version.patch \ 26 | file://run-ptest \ 27 | " 28 | SRCREV = "feb59e268c8f4f1c7450f3a510963e84cc397ac7" 29 | 30 | UPSTREAM_CHECK_COMMITS = "1" 31 | 32 | S = "${WORKDIR}/git" 33 | 34 | inherit cmake ptest pkgconfig 35 | 36 | PACKAGECONFIG ??= "\ 37 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 38 | " 39 | 40 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON,-DBUILD_TESTS=OFF," 41 | 42 | do_configure:prepend() { 43 | sed -i "s/Protobuf_LITE_STATIC_LIBRARY/Protobuf_LITE_LIBRARY/g" ${S}/CMakeLists.txt 44 | sed -i "s/string.*Protobuf_LITE_LIBRARY.*/#&/g" ${S}/CMakeLists.txt 45 | sed -i "s/set_property.*PROTOBUF_USE_STATIC_LIBS.*/#&/g" ${S}/CMakeLists.txt 46 | } 47 | 48 | do_install () { 49 | install -d ${D}${bindir} 50 | install -m 0755 ${B}/bin/localproxy ${D}${bindir}/localproxy 51 | } 52 | 53 | FILES:${PN} += "${bindir}/localproxy" 54 | FILES:${PN}-ptest += "${bindir}/localproxytest" 55 | 56 | do_install_ptest() { 57 | install -d ${D}${bindir} 58 | install -m 0755 ${B}/bin/localproxytest ${D}${bindir}/localproxytest 59 | } 60 | 61 | # fix DSO missing from command line 62 | LDFLAGS += "-Wl,--copy-dt-needed-entries" 63 | 64 | # Use -std=c++20 for fixing 65 | # error: #warning " is deprecated in C++17, use to detect implementation-specific macros" [-Werror=cpp] 66 | CXXFLAGS += "-std=c++20 -Wno-error=attributes -Wno-error=deprecated" 67 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-securetunneling-localproxy/files/0001-boost-support-any.patch: -------------------------------------------------------------------------------- 1 | From 9abc730567226b78152b5c607c3b31d09ed7221b Mon Sep 17 00:00:00 2001 2 | From: Thomas Roos 3 | Date: Fri, 10 Mar 2023 12:46:05 +0000 4 | Subject: [PATCH] aws-iot-securetunneling-localproxy: support any boost version 5 | 6 | Upstream-Status: Denied [Any version that compile should be good, team does only support a specific version] 7 | --- 8 | CMakeLists.txt | 3 +-- 9 | 1 file changed, 1 insertion(+), 2 deletions(-) 10 | 11 | diff --git a/CMakeLists.txt b/CMakeLists.txt 12 | index a7f6d72..02ac23c 100644 13 | --- a/CMakeLists.txt 14 | +++ b/CMakeLists.txt 15 | @@ -92,8 +92,7 @@ endif(BUILD_TESTS) 16 | set(Boost_USE_STATIC_LIBS ON) 17 | set(Boost_USE_DEBUG_RUNTIME OFF) 18 | #set_property(GLOBAL PROPERTY Boost_USE_MULTITHREADED ON) 19 | -set(BOOST_PKG_VERSION "1.87.0" CACHE STRING "") 20 | -find_package(Boost ${BOOST_PKG_VERSION} REQUIRED COMPONENTS system log log_setup thread program_options date_time filesystem chrono) 21 | +find_package(Boost REQUIRED COMPONENTS system log log_setup thread program_options date_time filesystem chrono) 22 | include_directories(${Boost_INCLUDE_DIRS}) 23 | foreach(BOOST_LIB ${Boost_LIBRARIES}) 24 | string(REPLACE ${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_SUFFIX} BOOST_STATIC_LIB ${BOOST_LIB}) 25 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-securetunneling-localproxy/files/0002-remove-cxx-standard.patch: -------------------------------------------------------------------------------- 1 | From fa29fd992b85eb2fb32b129c7f1389e6c96d9af0 Mon Sep 17 00:00:00 2001 2 | From: Thomas Roos 3 | Date: Tue, 9 Jan 2024 14:34:32 +0000 4 | Subject: [PATCH] aws-iot-securetunneling-localproxy: remove setting of 5 | 6 | Upstream-Status: Submitted [author] 7 | --- 8 | CMakeLists.txt | 6 +----- 9 | 1 file changed, 1 insertion(+), 5 deletions(-) 10 | 11 | diff --git a/CMakeLists.txt b/CMakeLists.txt 12 | index 02ac23c..fe71762 100644 13 | --- a/CMakeLists.txt 14 | +++ b/CMakeLists.txt 15 | @@ -1,5 +1,3 @@ 16 | -cmake_minimum_required(VERSION 3.2 FATAL_ERROR) 17 | - 18 | set(AWS_TUNNEL_LOCAL_PROXY_TARGET_NAME localproxy) 19 | set(AWS_TUNNEL_LOCAL_PROXY_LIB_NAME lproxy) 20 | project(${AWS_TUNNEL_LOCAL_PROXY_TARGET_NAME} CXX) 21 | @@ -31,9 +29,7 @@ endif () 22 | ######################################## 23 | # Section : Common Build setttings # 24 | ######################################## 25 | -# Set required compiler standard to standard c++11. Disable extensions. 26 | -set(CMAKE_CXX_STANDARD 14) # C++14 27 | -set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required... 28 | +# Disable extensions. 29 | set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11 30 | 31 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) 32 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-securetunneling-localproxy/files/0003-boost-include-format.patch: -------------------------------------------------------------------------------- 1 | From f830ccf48da4c2c7b657aebabc1175e71193ca2e Mon Sep 17 00:00:00 2001 2 | From: Thomas Roos 3 | Date: Mon, 11 Mar 2024 10:35:55 +0000 4 | Subject: [PATCH] aws-iot-securetunneling-localproxy: boost 1.84 format include 5 | 6 | Upstream-Status: Submitted [author] 7 | --- 8 | src/config/ConfigFile.cpp | 3 ++- 9 | 1 file changed, 2 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/src/config/ConfigFile.cpp b/src/config/ConfigFile.cpp 12 | index 2a3205c..6e25a2f 100644 13 | --- a/src/config/ConfigFile.cpp 14 | +++ b/src/config/ConfigFile.cpp 15 | @@ -19,6 +19,7 @@ 16 | #include 17 | #include 18 | #include 19 | +#include 20 | #include 21 | #include 22 | #include 23 | @@ -219,4 +220,4 @@ namespace aws { namespace iot { namespace securedtunneling { namespace config_fi 24 | boost::filesystem::path full_path(boost::filesystem::current_path()); 25 | return (boost::format("%1%/config") % full_path.string()).str(); 26 | } 27 | -}}}} 28 | \ No newline at end of file 29 | +}}}} 30 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-securetunneling-localproxy/files/0004-cmake-version.patch: -------------------------------------------------------------------------------- 1 | From 15d3d538528b46f9fced07473d661b4d8b44b10e Mon Sep 17 00:00:00 2001 2 | From: OpenEmbedded 3 | Date: Tue, 22 Oct 2024 02:00:39 +0000 4 | Subject: [PATCH] aws-iot-securetunneling-localproxy: upgrade git -> new 5 | 6 | Upstream-Status: Submitted [https://github.com/aws-samples/aws-iot-securetunneling-localproxy/issues/167] 7 | --- 8 | CMakeLists.txt | 3 +++ 9 | 1 file changed, 3 insertions(+) 10 | 11 | diff --git a/CMakeLists.txt b/CMakeLists.txt 12 | index fe71762..e0b3615 100644 13 | --- a/CMakeLists.txt 14 | +++ b/CMakeLists.txt 15 | @@ -155,3 +155,6 @@ if(BUILD_TESTS) 16 | endif(BUILD_TESTS) 17 | 18 | install(TARGETS ${AWS_TUNNEL_LOCAL_PROXY_TARGET_NAME} DESTINATION "bin") 19 | + 20 | +cmake_minimum_required(VERSION 3.22) 21 | + 22 | -------------------------------------------------------------------------------- /recipes-iot/aws-iot-securetunneling-localproxy/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | localproxytest -s [config] | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| sed -n '/PASS/{s|^|PASS: |};p' | sed -n '/FAIL/{s|^|FAIL: |};p' | sed -n '/SKIP/{s|^|SKIP: |};p' 4 | -------------------------------------------------------------------------------- /recipes-kernel/linux/files/aws-ec2.cfg: -------------------------------------------------------------------------------- 1 | CONFIG_ENA_ETHERNET=y 2 | CONFIG_BLK_DEV_NVME=y 3 | CONFIG_SERIAL_8250_PCI=y 4 | -------------------------------------------------------------------------------- /recipes-kernel/linux/linux-yocto_%.bbappend: -------------------------------------------------------------------------------- 1 | FILESEXTRAPATHS:prepend:aws-ec2 := "${THISDIR}/files:" 2 | 3 | COMPATIBLE_MACHINE:aws-ec2 = "aws-ec2" 4 | 5 | SRC_URI:append:aws-ec2 = " \ 6 | file://aws-ec2.cfg \ 7 | " 8 | -------------------------------------------------------------------------------- /recipes-sdk/amazon-kvs-producer-sdk/amazon-kvs-producer-pic/ptest_result.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 Amazon.com, Inc. or its affiliates. 2 | # SPDX-License-Identifier: MIT 3 | 4 | import json 5 | import sys 6 | 7 | if len(sys.argv) != 2: 8 | print(f"usage: {sys.argv[0]} [result file]") 9 | sys.exit(1) 10 | 11 | with open (sys.argv[1], 'rb') as json_file: 12 | data = json.load(json_file) 13 | for testsuite in data['testsuites']: 14 | for test in testsuite['testsuite']: 15 | result = 'PASS' if not 'failures' in test else 'FAIL' 16 | print(f"{result}: {test['classname']}_{test['name']}") 17 | -------------------------------------------------------------------------------- /recipes-sdk/amazon-kvs-producer-sdk/amazon-kvs-producer-pic/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | tests/kvspic_test --gtest_filter=*ClientApiTest.create* --gtest_output=json:result.json > /dev/null ; python3 ptest_result.py result.json -------------------------------------------------------------------------------- /recipes-sdk/amazon-kvs-producer-sdk/amazon-kvs-producer-pic_1.1.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Amazon Kinesis Video Streams PIC" 2 | DESCRIPTION = "Platform independent code layer for KVS Producer SDK" 3 | HOMEPAGE = "https://github.com/awslabs/amazon-kinesis-video-streams-pic" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" 6 | PROVIDES += "aws/amazon-kvs-producer-pic" 7 | 8 | BRANCH ?= "master" 9 | SRC_URI = "\ 10 | git://github.com/awslabs/amazon-kinesis-video-streams-pic.git;protocol=https;branch=${BRANCH} \ 11 | file://run-ptest \ 12 | file://ptest_result.py \ 13 | " 14 | 15 | # this recipe should be released only together with amazon-kvs-producer-sdk-c and amazon-kvs-producer-sdk-cpp 16 | UPSTREAM_VERSION_UNKNOWN = "1" 17 | # set to match only git_invalid_tag_regex because UPSTREAM_VERSION_UNKNOWN seems to be broken for git 18 | UPSTREAM_CHECK_GITTAGREGEX = "git_invalid_tag_regex" 19 | # this SRCREV commit id should not different than this: 20 | # https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/blob/master/CMake/Dependencies/libkvspic-CMakeLists.txt 21 | SRCREV = "65e38dac9b30523d43a57bc009d679e627b58d9a" 22 | 23 | S = "${WORKDIR}/git" 24 | 25 | inherit cmake pkgconfig ptest 26 | 27 | PACKAGECONFIG ??= "\ 28 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 29 | " 30 | 31 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 32 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON," 33 | 34 | PACKAGECONFIG[with-tests] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,gtest" 35 | 36 | CFLAGS:append = " -Wl,-Bsymbolic" 37 | 38 | # fix error: implicit declaration of function pthread_getname_np 39 | CFLAGS:append = " -D_GNU_SOURCE" 40 | 41 | EXTRA_OECMAKE += "\ 42 | -DBUILD_DEPENDENCIES=OFF \ 43 | -DCODE_COVERAGE=OFF \ 44 | -DADDRESS_SANITIZER=OFF \ 45 | -DMEMORY_SANITIZER=OFF \ 46 | -DTHREAD_SANITIZER=OFF \ 47 | -DUNDEFINED_BEHAVIOR_SANITIZER=OFF \ 48 | -DDEBUG_HEAP=OFF \ 49 | -DCOMPILER_WARNINGS=ON \ 50 | -DALIGNED_MEMORY_MODEL=OFF \ 51 | -DCMAKE_BUILD_TYPE=Release \ 52 | " 53 | 54 | FILES:${PN} += "\ 55 | ${libdir}/pkgconfig/*.pc \ 56 | ${libdir}/*.so.* \ 57 | " 58 | 59 | FILES:${PN}-dev += "\ 60 | ${includedir}/* \ 61 | ${libdir}/*.so \ 62 | " 63 | 64 | RDEPENDS:${PN}-ptest += "\ 65 | bash \ 66 | python3 \ 67 | " 68 | 69 | do_install_ptest () { 70 | install -d ${D}${PTEST_PATH}/tests 71 | install -m 0755 ${UNPACKDIR}/ptest_result.py ${D}${PTEST_PATH}/ 72 | cp -r ${B}/tst/kvspic_test ${D}${PTEST_PATH}/tests/ 73 | } 74 | 75 | BBCLASSEXTEND = "native nativesdk" 76 | -------------------------------------------------------------------------------- /recipes-sdk/amazon-kvs-producer-sdk/amazon-kvs-producer-sdk-c_1.5.2.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Amazon Kinesis Video Streams C Producer" 2 | DESCRIPTION = "Amazon Kinesis Video Streams Producer SDK for C/C++ makes it easy to build an on-device application that securely connects to a video stream, and reliably publishes video and other media data to Kinesis Video Streams. It takes care of all the underlying tasks required to package the frames and fragments generated by the device's media pipeline. The SDK also handles stream creation, token rotation for secure and uninterrupted streaming, processing acknowledgements returned by Kinesis Video Streams, and other tasks." 3 | HOMEPAGE = "https://github.com/awslabs/amazon-kinesis-video-streams-producer-c" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" 6 | 7 | DEPENDS += "\ 8 | amazon-kvs-producer-pic \ 9 | curl \ 10 | libwebsockets \ 11 | mbedtls \ 12 | openssl \ 13 | " 14 | 15 | PROVIDES += "aws/amazon-kvs-producer-sdk-c" 16 | 17 | BRANCH ?= "master" 18 | SRC_URI = "\ 19 | git://github.com/awslabs/amazon-kinesis-video-streams-producer-c.git;protocol=https;branch=${BRANCH}\ 20 | " 21 | 22 | # this recipe should be released only together with amazon-kvs-producer-sdk-pic and amazon-kvs-producer-sdk-cpp 23 | UPSTREAM_VERSION_UNKNOWN = "1" 24 | # set to match only git_invalid_tag_regex because UPSTREAM_VERSION_UNKNOWN seems to be broken for git 25 | UPSTREAM_CHECK_GITTAGREGEX = "git_invalid_tag_regex" 26 | SRCREV = "3e519b7670e39031375d227f983ad2cde888078e" 27 | 28 | S = "${WORKDIR}/git" 29 | 30 | inherit cmake pkgconfig 31 | 32 | # ptest are disabled, cause running tests require a certificate 33 | 34 | PACKAGECONFIG ??= "\ 35 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 36 | " 37 | 38 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 39 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON -DBUILD_STATIC=OFF,," 40 | 41 | PACKAGECONFIG[with-tests] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,gtest" 42 | 43 | FILES:${PN} += "\ 44 | ${libdir}/pkgconfig/*.pc \ 45 | " 46 | 47 | FILES:${PN}-dev += "\ 48 | ${includedir}/com/amazonaws/kinesis/video/* \ 49 | ${libdir}/libkvsCommonLws.so \ 50 | ${libdir}/libkvsCommonCurl.so \ 51 | ${libdir}/libcproducer.so \ 52 | " 53 | 54 | RDEPENDS:${PN} = "" 55 | CFLAGS:append = " -Wl,-Bsymbolic" 56 | 57 | EXTRA_OECMAKE += "\ 58 | -DBUILD_DEPENDENCIES=OFF \ 59 | -DCODE_COVERAGE=OFF \ 60 | -DBUILD_COMMON_LWS=ON \ 61 | -DCOMPILER_WARNINGS=OFF \ 62 | -DADDRESS_SANITIZER=OFF \ 63 | -DMEMORY_SANITIZER=OFF \ 64 | -DTHREAD_SANITIZER=OFF \ 65 | -DUNDEFINED_BEHAVIOR_SANITIZER=OFF \ 66 | -DDEBUG_HEAP=OFF \ 67 | -DALIGNED_MEMORY_MODEL=OFF \ 68 | -DCMAKE_BUILD_TYPE=Release \ 69 | " 70 | 71 | # Notify that libraries are not versioned 72 | FILES_SOLIBSDEV = "" 73 | 74 | do_install_ptest () { 75 | install -d ${D}${PTEST_PATH}/tests 76 | cp -r ${B}/tst/* ${D}${PTEST_PATH}/tests/ 77 | } 78 | 79 | BBCLASSEXTEND = "native nativesdk" 80 | -------------------------------------------------------------------------------- /recipes-sdk/amazon-kvs-producer-sdk/amazon-kvs-producer-sdk-cpp/amazon-kvs-producer-sdk-cpp-deps.patch: -------------------------------------------------------------------------------- 1 | From 7b608679a6885820ba29037a60aca19bb685bb05 Mon Sep 17 00:00:00 2001 2 | From: rpcme 3 | Date: Sun, 16 Jan 2022 06:00:06 -0500 4 | Subject: [PATCH] add support for amazon kvs producer sdk cpp 5 | 6 | Upstream-Status: Submitted [author] 7 | --- 8 | CMakeLists.txt | 3 +++ 9 | 1 file changed, 3 insertions(+) 10 | 11 | diff --git a/CMakeLists.txt b/CMakeLists.txt 12 | index 7f1e1c1..b302086 100644 13 | --- a/CMakeLists.txt 14 | +++ b/CMakeLists.txt 15 | @@ -94,6 +94,7 @@ set(BUILD_COMMON_LWS 16 | set(BUILD_COMMON_CURL 17 | TRUE 18 | CACHE BOOL "Build ProducerC with CURL Support" FORCE) 19 | +if(BUILD_DEPENDENCIES) 20 | set(DEPENDENCY_DOWNLOAD_PATH ${CMAKE_CURRENT_SOURCE_DIR}/dependency) 21 | if(NOT EXISTS ${DEPENDENCY_DOWNLOAD_PATH}) 22 | file(MAKE_DIRECTORY ${DEPENDENCY_DOWNLOAD_PATH}) 23 | @@ -101,6 +102,8 @@ endif() 24 | fetch_repo(kvscproducer) 25 | add_subdirectory(${DEPENDENCY_DOWNLOAD_PATH}/libkvscproducer/kvscproducer-src EXCLUDE_FROM_ALL) 26 | 27 | +endif() 28 | + 29 | ############# find dependent libraries ############ 30 | 31 | find_package(Threads) 32 | -------------------------------------------------------------------------------- /recipes-sdk/amazon-kvs-producer-sdk/amazon-kvs-producer-sdk-cpp/global-thread-sleep-linkerror.patch: -------------------------------------------------------------------------------- 1 | From 8623532eb98a093785661366b151cf98e472f0d3 Mon Sep 17 00:00:00 2001 2 | From: Thomas Roos 3 | Date: Fri, 26 Jul 2024 06:19:24 +0000 4 | Subject: [PATCH] amazon-kvs-producer-sdk-cpp: fix globalThreadSleep link error 5 | 6 | Upstream-Status: Submitted [https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/1197] 7 | --- 8 | CMakeLists.txt | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/CMakeLists.txt b/CMakeLists.txt 12 | index b302086..9529fed 100644 13 | --- a/CMakeLists.txt 14 | +++ b/CMakeLists.txt 15 | @@ -225,7 +225,7 @@ if(BUILD_GSTREAMER_PLUGIN) 16 | target_link_libraries(gstkvssink PRIVATE ${GST_APP_LIBRARIES} KinesisVideoProducer) 17 | 18 | add_executable(kvssink_gstreamer_sample samples/kvssink_gstreamer_sample.cpp) 19 | - target_link_libraries(kvssink_gstreamer_sample ${GST_APP_LIBRARIES} KinesisVideoProducer) 20 | + target_link_libraries(kvssink_gstreamer_sample ${GST_APP_LIBRARIES} KinesisVideoProducer kvspic) 21 | 22 | add_executable(kvs_gstreamer_sample samples/kvs_gstreamer_sample.cpp) 23 | target_link_libraries(kvs_gstreamer_sample ${GST_APP_LIBRARIES} KinesisVideoProducer kvspic) 24 | -------------------------------------------------------------------------------- /recipes-sdk/amazon-kvs-webrtc-sdk/amazon-kvs-webrtc-sdk_1.12.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Amazon Kinesis Video Streams WebRTC" 2 | DESCRIPTION = "Pure C WebRTC Client for Amazon Kinesis Video Streams" 3 | HOMEPAGE = "https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" 6 | 7 | DEPENDS += "\ 8 | aws-sdk-cpp \ 9 | amazon-kvs-producer-sdk-c \ 10 | curl \ 11 | gstreamer1.0 \ 12 | gstreamer1.0-plugins-base \ 13 | libsrtp \ 14 | libwebsockets \ 15 | openssl \ 16 | usrsctp \ 17 | " 18 | 19 | PROVIDES += "aws/amazon-kvs-webrtc-sdk" 20 | 21 | BRANCH = "main" 22 | SRC_URI = "\ 23 | git://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c.git;protocol=https;branch=${BRANCH} \ 24 | file://run-ptest \ 25 | file://ptest_result.py \ 26 | " 27 | 28 | SRCREV = "cf817bc5d18f3e4bd499c6b0f9a68c6f4d7e01de" 29 | 30 | S = "${WORKDIR}/git" 31 | 32 | inherit cmake pkgconfig ptest 33 | 34 | PACKAGECONFIG ??= "\ 35 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests with-samples', '', d)} \ 36 | " 37 | 38 | PACKAGECONFIG[with-tests] = "-DBUILD_TEST=ON,-DBUILD_TEST=OFF,gtest" 39 | 40 | PACKAGECONFIG[with-samples] = "-DBUILD_SAMPLE=ON ,-DBUILD_SAMPLE=OFF," 41 | 42 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 43 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON," 44 | 45 | do_configure[network] = "1" 46 | 47 | FILES:${PN} += "\ 48 | ${@bb.utils.contains('PACKAGECONFIG', 'with-samples', '/samples/*', '', d)} \ 49 | ${libdir} \ 50 | " 51 | 52 | CFLAGS:append = " -Wl,-Bsymbolic" 53 | 54 | EXTRA_OECMAKE += "\ 55 | -DBUILD_DEPENDENCIES=OFF \ 56 | -DCODE_COVERAGE=OFF \ 57 | -DADDRESS_SANITIZER=OFF \ 58 | -DMEMORY_SANITIZER=OFF \ 59 | -DTHREAD_SANITIZER=OFF \ 60 | -DUNDEFINED_BEHAVIOR_SANITIZER=OFF \ 61 | -DDEBUG_HEAP=OFF \ 62 | -DCOMPILER_WARNINGS=OFF \ 63 | -DALIGNED_MEMORY_MODEL=OFF \ 64 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-DDBUILD_TEST=ON -DCMAKE_BUILD_TYPE=Debug ', '-DBUILD_TEST=OFF -DCMAKE_BUILD_TYPE=Release', d)} \ 65 | " 66 | 67 | FILES_SOLIBSDEV = "" 68 | 69 | RDEPENDS:${PN}-ptest += "\ 70 | bash \ 71 | python3 \ 72 | " 73 | 74 | BBCLASSEXTEND = "native nativesdk" 75 | 76 | # fix DSO missing from command line 77 | LDFLAGS += "-Wl,--copy-dt-needed-entries" 78 | 79 | # fix package neo-ai-tvm contains bad RPATH 80 | EXTRA_OECMAKE += "-DCMAKE_SKIP_RPATH=1" 81 | 82 | do_install:append () { 83 | if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'with-samples', '1', '', d)}" ]; then 84 | install -d ${D}/samples/ 85 | cp -r ${S}/samples/h264SampleFrames ${D}/samples/ 86 | cp -r ${S}/samples/h265SampleFrames ${D}/samples/ 87 | cp -r ${S}/samples/opusSampleFrames ${D}/samples/ 88 | fi 89 | } 90 | 91 | do_install_ptest () { 92 | cp -r ${B}/tst/webrtc_client_test ${D}${PTEST_PATH}/ 93 | install -m 0755 ${UNPACKDIR}/ptest_result.py ${D}${PTEST_PATH}/ 94 | } 95 | 96 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 97 | INSANE_SKIP:${PN}-ptest += "buildpaths" 98 | 99 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 100 | INSANE_SKIP:${PN} += "buildpaths" 101 | -------------------------------------------------------------------------------- /recipes-sdk/amazon-kvs-webrtc-sdk/files/ptest_result.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 Amazon.com, Inc. or its affiliates. 2 | # SPDX-License-Identifier: MIT 3 | 4 | import json 5 | import sys 6 | 7 | if len(sys.argv) != 2: 8 | print(f"usage: {sys.argv[0]} [result file]") 9 | sys.exit(1) 10 | 11 | with open (sys.argv[1], 'rb') as json_file: 12 | data = json.load(json_file) 13 | for testsuite in data['testsuites']: 14 | for test in testsuite['testsuite']: 15 | testname = test['name'] 16 | result = 'PASS' if not 'failures' in test else 'FAIL' 17 | print(f"{result}: {test['name']}") 18 | -------------------------------------------------------------------------------- /recipes-sdk/amazon-kvs-webrtc-sdk/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export LD_PRELOAD=$(find /usr/lib /lib -type f -name "libasan.so*") 4 | 5 | ./webrtc_client_test --gtest_filter=DataChannelApiTest* --gtest_output=json:result.json 6 | 7 | python3 ptest_result.py result.json 8 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-auth/aws-c-auth_0.9.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C Auth" 2 | DESCRIPTION = "C99 library implementation of AWS client-side authentication: standard credentials providers and signing." 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-c-auth" 5 | LICENSE = "Apache-2.0" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 7 | 8 | DEPENDS += "\ 9 | aws-c-cal \ 10 | aws-c-common \ 11 | aws-c-compression \ 12 | aws-c-http \ 13 | aws-c-io \ 14 | aws-c-sdkutils \ 15 | s2n \ 16 | ${@bb.utils.contains('PACKAGECONFIG', 'static', 'aws-lc', 'openssl', d)} \ 17 | " 18 | 19 | PROVIDES += "aws/crt-c-auth" 20 | 21 | BRANCH ?= "main" 22 | SRC_URI = "\ 23 | git://github.com/awslabs/aws-c-auth.git;protocol=https;branch=${BRANCH} \ 24 | file://run-ptest \ 25 | " 26 | SRCREV = "cd9d6afcd42035d49bb2d0d3bef24b9faed57773" 27 | 28 | S = "${WORKDIR}/git" 29 | 30 | inherit cmake ptest pkgconfig 31 | 32 | CFLAGS:append = " -Wl,-Bsymbolic" 33 | 34 | EXTRA_OECMAKE += "\ 35 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 36 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 37 | -DCMAKE_BUILD_TYPE=Release \ 38 | " 39 | 40 | PACKAGECONFIG ??= "\ 41 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 42 | " 43 | 44 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 45 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 46 | 47 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF," 48 | 49 | FILES:${PN}-dev += "${libdir}/*/cmake" 50 | 51 | do_install_ptest () { 52 | install -d ${D}${PTEST_PATH}/tests 53 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 54 | install -m 0755 ${B}/tests/aws-c-auth-tests ${D}${PTEST_PATH}/tests/ 55 | } 56 | 57 | BBCLASSEXTEND = "native nativesdk" 58 | 59 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 60 | INSANE_SKIP:${PN}-ptest += "buildpaths" 61 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-cal/aws-c-cal_0.9.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C Cal" 2 | DESCRIPTION = "AWS Crypto Abstraction Layer: Cross-Platform, C99 wrapper for cryptography primitives." 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-c-cal" 5 | LICENSE = "Apache-2.0" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" 7 | 8 | DEPENDS = "\ 9 | aws-c-common \ 10 | s2n \ 11 | ${@bb.utils.contains('PACKAGECONFIG', 'static', 'aws-lc', 'openssl', d)} \ 12 | " 13 | 14 | PROVIDES += "aws/crt-c-cal" 15 | 16 | BRANCH ?= "main" 17 | 18 | SRC_URI = "\ 19 | git://github.com/awslabs/aws-c-cal.git;protocol=https;branch=${BRANCH}; \ 20 | file://run-ptest \ 21 | " 22 | 23 | SRCREV = "938d0fea30d8476a7cf260278d636404682a28d4" 24 | 25 | S = "${WORKDIR}/git" 26 | 27 | inherit cmake ptest pkgconfig 28 | 29 | PACKAGECONFIG ??= "\ 30 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 31 | " 32 | 33 | # CMAKE_CROSSCOMPILING=ON will disable building the tests 34 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON -DCMAKE_CROSSCOMPILING=OFF,-DBUILD_TESTING=OFF," 35 | 36 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 37 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 38 | 39 | FILES:${PN}-dev += "${libdir}/*/cmake" 40 | FILES:${PN}-staticdev += "${libdir}/lib*.a" 41 | 42 | RDEPENDS:${PN} = "\ 43 | aws-c-common \ 44 | s2n \ 45 | " 46 | 47 | do_install_ptest () { 48 | install -d ${D}${PTEST_PATH}/tests 49 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 50 | install -m 0755 ${B}/tests/aws-c-cal-tests ${D}${PTEST_PATH}/tests/ 51 | } 52 | 53 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 54 | INSANE_SKIP:${PN}-ptest += "buildpaths" 55 | 56 | CFLAGS:append = " -Wl,-Bsymbolic" 57 | 58 | EXTRA_OECMAKE += "\ 59 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 60 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 61 | -DCMAKE_BUILD_TYPE=Release \ 62 | " 63 | 64 | BBCLASSEXTEND = "native nativesdk" 65 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-cal/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd tests 4 | 5 | rm -rf tests.log 6 | 7 | # known good tests 8 | TESTS="\ 9 | sha256_nist_test_case_1 \ 10 | sha256_nist_test_case_2 \ 11 | sha256_nist_test_case_3 \ 12 | sha256_nist_test_case_4 \ 13 | sha256_nist_test_case_5 \ 14 | sha256_nist_test_case_5_truncated \ 15 | sha256_nist_test_case_6 \ 16 | sha256_test_invalid_buffer \ 17 | sha256_test_oneshot \ 18 | sha256_test_invalid_state \ 19 | sha256_test_extra_buffer_space \ 20 | sha1_nist_test_case_1 \ 21 | sha1_nist_test_case_2 \ 22 | sha1_nist_test_case_3 \ 23 | sha1_nist_test_case_4 \ 24 | sha1_nist_test_case_5 \ 25 | sha1_nist_test_case_5_truncated \ 26 | sha1_nist_test_case_6 \ 27 | sha1_test_invalid_buffer \ 28 | sha1_test_oneshot \ 29 | sha1_test_invalid_state \ 30 | sha1_test_extra_buffer_space \ 31 | md5_rfc1321_test_case_1 \ 32 | md5_rfc1321_test_case_2 \ 33 | md5_rfc1321_test_case_3 \ 34 | md5_rfc1321_test_case_4 \ 35 | md5_rfc1321_test_case_5 \ 36 | md5_rfc1321_test_case_6 \ 37 | md5_rfc1321_test_case_7 \ 38 | md5_rfc1321_test_case_7_truncated \ 39 | md5_verify_known_collision \ 40 | md5_invalid_buffer_size \ 41 | md5_test_invalid_state \ 42 | md5_test_extra_buffer_space \ 43 | sha256_hmac_rfc4231_test_case_1 \ 44 | sha256_hmac_rfc4231_test_case_2 \ 45 | sha256_hmac_rfc4231_test_case_3 \ 46 | sha256_hmac_rfc4231_test_case_4 \ 47 | sha256_hmac_rfc4231_test_case_5 \ 48 | sha256_hmac_rfc4231_test_case_6 \ 49 | sha256_hmac_rfc4231_test_case_7 \ 50 | sha256_hmac_test_oneshot \ 51 | sha256_hmac_test_invalid_buffer \ 52 | sha256_hmac_test_invalid_state \ 53 | sha256_hmac_test_extra_buffer_space \ 54 | ecdsa_p256_test_pub_key_derivation \ 55 | ecdsa_p384_test_pub_key_derivation \ 56 | ecdsa_p256_test_known_signing_value \ 57 | ecdsa_p384_test_known_signing_value \ 58 | ecdsa_test_invalid_signature \ 59 | ecdsa_p256_test_key_gen \ 60 | ecdsa_p384_test_key_gen \ 61 | ecdsa_p256_test_key_gen_export \ 62 | ecdsa_p384_test_key_gen_export \ 63 | ecdsa_p256_test_import_asn1_key_pair \ 64 | ecdsa_p384_test_import_asn1_key_pair \ 65 | ecdsa_test_import_asn1_key_pair_public_only \ 66 | ecdsa_test_import_asn1_key_pair_invalid_fails \ 67 | ecdsa_test_signature_format \ 68 | ecdsa_p256_test_small_coordinate_verification \ 69 | der_encode_integer \ 70 | der_encode_boolean \ 71 | der_encode_null \ 72 | der_encode_bit_string \ 73 | der_encode_octet_string \ 74 | der_encode_sequence \ 75 | der_encode_set \ 76 | der_decode_integer \ 77 | der_decode_boolean \ 78 | der_decode_null \ 79 | der_decode_bit_string \ 80 | der_decode_octet_string \ 81 | der_decode_sequence \ 82 | der_decode_set \ 83 | der_decode_key_pair \ 84 | ecc_key_pair_random_ref_count_test \ 85 | ecc_key_pair_public_ref_count_test \ 86 | ecc_key_pair_asn1_ref_count_test \ 87 | " 88 | 89 | for TEST in $TESTS 90 | do 91 | ./aws-c-cal-tests $TEST >> tests.log 92 | done 93 | 94 | sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /ERROR/ s/^/FAIL: /' tests.log 95 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-common/aws-c-common_0.12.3.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C Common" 2 | DESCRIPTION = "Core c99 package for AWS SDK for C. Includes cross-platform primitives, configuration, data structures, and error handling." 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-c-common" 5 | LICENSE = "Apache-2.0" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 7 | 8 | PROVIDES = "aws/crt-c-common" 9 | 10 | BRANCH ?= "main" 11 | SRC_URI = "\ 12 | git://github.com/awslabs/aws-c-common.git;protocol=https;branch=${BRANCH} \ 13 | file://run-ptest \ 14 | file://ptest_result.py \ 15 | " 16 | SRCREV = "aaa2f11ed609e3f888efd9bf745e810b45b13a38" 17 | 18 | # will match only x.x.x for auto upgrades, because: https://github.com/awslabs/aws-c-common/issues/1025 19 | UPSTREAM_CHECK_GITTAGREGEX = "(?P\d\.\d+(\.\d+)+)" 20 | 21 | S = "${WORKDIR}/git" 22 | 23 | inherit cmake ptest 24 | 25 | CFLAGS:append = " -Wl,-Bsymbolic" 26 | OECMAKE_GENERATOR = "Unix Makefiles" 27 | EXTRA_OECMAKE += "\ 28 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-DCMAKE_BUILD_TYPE=Debug -DALLOW_CROSS_COMPILED_TESTS=ON', '-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release', d)} \ 29 | -DBUILD_SHARED_LIBS=ON \ 30 | " 31 | 32 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 33 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON,," 34 | 35 | FILES:${PN}-dev += "${libdir}/*/cmake" 36 | 37 | RDEPENDS:${PN}-ptest += "cmake python3" 38 | 39 | do_install_ptest() { 40 | install -d ${D}${PTEST_PATH}/tests 41 | 42 | cp -r ${B}/ ${D}${PTEST_PATH}/build 43 | cp -r ${S}/ ${D}${PTEST_PATH}/src 44 | 45 | find ${D}${PTEST_PATH}/build -name "CMakeFiles" | xargs rm -rf 46 | find ${D}${PTEST_PATH}/build -name "*.so*" | xargs rm -rf 47 | find ${D}${PTEST_PATH}/src -name ".git" | xargs rm -rf 48 | 49 | install -m 0755 ${UNPACKDIR}/ptest_result.py ${D}${PTEST_PATH}/ 50 | } 51 | 52 | BBCLASSEXTEND = "native nativesdk" 53 | 54 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 55 | INSANE_SKIP:${PN}-ptest += "buildpaths" 56 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-common/files/ptest_result.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 Amazon.com, Inc. or its affiliates. 2 | # SPDX-License-Identifier: MIT 3 | 4 | import xml.etree.ElementTree as ET 5 | import sys 6 | 7 | if len(sys.argv) != 2: 8 | print(f"usage: {sys.argv[0]} [result file]") 9 | sys.exit(1) 10 | 11 | tree = ET.parse(sys.argv[1]) 12 | 13 | for child in tree.getroot(): 14 | result = 'PASS' if child.attrib['status'] == 'run' else 'FAIL' 15 | print(f"{result}: {child.attrib['name']}") 16 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-common/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) 2022 Amazon.com, Inc. or its affiliates. 3 | # SPDX-License-Identifier: MIT 4 | 5 | CTEST_PARALLEL_LEVEL=$(nproc) ctest --exclude-regex "assert_test|test_add_u64_saturating|test_add_size_saturating|ring_buffer_acquire_up_to_multi_threaded_test|ring_buffer_acquire_multi_threaded_test|test_stack_trace_decoding|test_memtrace_stacks" --test-dir build/tests/ --output-junit result.xml 6 | 7 | python3 ptest_result.py build/tests/result.xml 8 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-compression/aws-c-compression_0.3.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C Compression" 2 | DESCRIPTION = "This is a cross-platform C99 implementation of compression algorithms such as gzip, and huffman encoding/decoding. Currently only huffman is implemented." 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-c-compression" 5 | 6 | LICENSE = "Apache-2.0" 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 8 | 9 | DEPENDS += "\ 10 | aws-c-cal \ 11 | aws-c-common \ 12 | aws-c-io \ 13 | s2n \ 14 | " 15 | 16 | PROVIDES += "aws/crt-c-compression" 17 | 18 | BRANCH ?= "main" 19 | 20 | SRC_URI = "\ 21 | git://github.com/awslabs/aws-c-compression.git;protocol=https;branch=${BRANCH} \ 22 | file://run-ptest \ 23 | " 24 | 25 | SRCREV = "f951ab2b819fc6993b6e5e6cfef64b1a1554bfc8" 26 | 27 | S = "${WORKDIR}/git" 28 | 29 | inherit cmake ptest pkgconfig 30 | 31 | PACKAGECONFIG ??= "\ 32 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 33 | " 34 | 35 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 36 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 37 | 38 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF" 39 | 40 | do_install_ptest () { 41 | install -d ${D}${PTEST_PATH}/tests 42 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 43 | install -m 0755 ${B}/tests/aws-c-compression-tests ${D}${PTEST_PATH}/tests/ 44 | } 45 | 46 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 47 | INSANE_SKIP:${PN}-ptest += "buildpaths" 48 | 49 | AWS_C_INSTALL = "$D/usr" 50 | CFLAGS:append = " -Wl,-Bsymbolic" 51 | EXTRA_OECMAKE += "\ 52 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 53 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 54 | " 55 | 56 | FILES:${PN}-dev += "${libdir}/*/cmake" 57 | 58 | BBCLASSEXTEND = "native nativesdk" 59 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-compression/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd tests 4 | 5 | rm -rf tests.log 6 | 7 | # known good tests 8 | TESTS="\ 9 | library_init \ 10 | huffman_symbol_encoder \ 11 | huffman_encoder \ 12 | huffman_encoder_all_code_points \ 13 | huffman_encoder_partial_output \ 14 | huffman_encoder_exact_output \ 15 | huffman_symbol_decoder \ 16 | huffman_decoder \ 17 | huffman_decoder_all_code_points \ 18 | huffman_decoder_partial_input \ 19 | huffman_decoder_partial_output \ 20 | huffman_decoder_allow_growth \ 21 | huffman_transitive \ 22 | huffman_transitive_even_bytes \ 23 | huffman_transitive_all_code_points \ 24 | huffman_transitive_chunked \ 25 | " 26 | 27 | for TEST in $TESTS 28 | do 29 | ./aws-c-compression-tests $TEST >> tests.log 30 | done 31 | 32 | sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /ERROR/ s/^/FAIL: /' tests.log 33 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-event-stream/aws-c-event-stream_0.5.4.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C Event Stream" 2 | DESCRIPTION = "C99 implementation of the vnd.amazon.event-stream content-type." 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-c-event-stream" 5 | LICENSE = "Apache-2.0" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 7 | 8 | DEPENDS += "\ 9 | aws-c-common \ 10 | aws-c-io \ 11 | aws-checksums \ 12 | s2n \ 13 | ${@bb.utils.contains('PACKAGECONFIG', 'static', 'aws-lc', 'openssl', d)} \ 14 | " 15 | 16 | PROVIDES += "aws/crt-c-event-stream" 17 | 18 | BRANCH ?= "main" 19 | SRC_URI = "\ 20 | git://github.com/awslabs/aws-c-event-stream.git;protocol=https;branch=${BRANCH} \ 21 | file://run-ptest \ 22 | " 23 | SRCREV = "9312b052583183b98526aaeb91e5c72ec3db9627" 24 | 25 | S = "${WORKDIR}/git" 26 | 27 | inherit cmake ptest pkgconfig 28 | 29 | do_install_ptest () { 30 | install -d ${D}${PTEST_PATH}/tests 31 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 32 | install -m 0755 ${B}/tests/aws-c-event-stream-tests ${D}${PTEST_PATH}/tests/ 33 | } 34 | 35 | AWS_C_INSTALL = "${D}/usr" 36 | CFLAGS:append = " -Wl,-Bsymbolic" 37 | EXTRA_OECMAKE += "\ 38 | -DBUILD_TEST_DEPS=OFF \ 39 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 40 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 41 | " 42 | 43 | PACKAGECONFIG ??= "\ 44 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 45 | " 46 | 47 | # CMAKE_CROSSCOMPILING=ON will disable building the tests 48 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF," 49 | 50 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 51 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 52 | 53 | FILES:${PN}-dev += "${libdir}/*/cmake" 54 | 55 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 56 | INSANE_SKIP:${PN}-ptest += "buildpaths" 57 | 58 | BBCLASSEXTEND = "native nativesdk" 59 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-event-stream/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd tests 4 | 5 | rm -rf tests.log 6 | 7 | # known good tests 8 | TESTS="\ 9 | test_incoming_no_op_valid \ 10 | test_incoming_application_data_no_headers_valid \ 11 | test_incoming_application_one_compressed_header_pair_valid \ 12 | test_incoming_application_int32_header_valid \ 13 | test_outgoing_no_op_valid \ 14 | test_outgoing_application_data_no_headers_valid \ 15 | test_outgoing_application_one_compressed_header_pair_valid \ 16 | test_streaming_decoder_incoming_no_op_valid_single_message \ 17 | test_streaming_decoder_incoming_application_no_headers \ 18 | test_streaming_decoder_incoming_application_one_compressed_header_pair_valid \ 19 | test_streaming_decoder_incoming_application_one_int32_header_pair_valid \ 20 | test_streaming_decoder_incoming_application_one_bool_header_pair_valid \ 21 | test_streaming_decoder_incoming_multiple_messages \ 22 | test_channel_handler_single_valid_messages_parse \ 23 | test_channel_handler_multiple_valid_messages_parse \ 24 | test_channel_handler_corrupted_crc_fails \ 25 | test_channel_handler_msg_too_large_fails \ 26 | test_channel_handler_write_message \ 27 | test_event_stream_rpc_server_connection_setup_and_teardown \ 28 | test_event_stream_rpc_server_connection_setup_and_teardown_with_bind_to_zero_port \ 29 | test_event_stream_rpc_server_connection_connect_flow \ 30 | test_event_stream_rpc_server_connection_connect_reject_flow \ 31 | test_event_stream_rpc_server_connection_messages_before_connect_received \ 32 | test_event_stream_rpc_server_connection_messages_before_connect_ack_sent \ 33 | test_event_stream_rpc_server_connection_unknown_message_type \ 34 | test_event_stream_rpc_server_connection_missing_message_type \ 35 | test_event_stream_rpc_server_connection_missing_message_flags \ 36 | test_event_stream_rpc_server_connection_continuation_missing_operation \ 37 | test_event_stream_rpc_server_connection_missing_stream_id \ 38 | test_event_stream_rpc_server_connection_continuation_messages_flow \ 39 | test_event_stream_rpc_server_connection_continuation_failure \ 40 | test_event_stream_rpc_server_connection_stream_id_ahead \ 41 | test_event_stream_rpc_server_connection_continuation_reused_stream_id_fails \ 42 | test_event_stream_rpc_server_connection_continuation_max_stream_id_reached \ 43 | test_event_stream_rpc_client_connection_setup_and_teardown \ 44 | test_event_stream_rpc_client_connection_connect \ 45 | test_event_stream_rpc_client_connection_message_before_connect \ 46 | test_event_stream_rpc_client_connection_protocol_message \ 47 | test_event_stream_rpc_client_connection_continuation_flow \ 48 | test_event_stream_rpc_client_connection_unactivated_continuation_fails \ 49 | test_event_stream_rpc_client_connection_continuation_send_message_on_closed_fails \ 50 | test_event_stream_rpc_client_connection_continuation_duplicated_activate_fails \ 51 | " 52 | 53 | for TEST in $TESTS 54 | do 55 | ./aws-c-event-stream-tests $TEST >> tests.log 56 | done 57 | 58 | sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /ERROR/ s/^/FAIL: /' tests.log 59 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-http/aws-c-http_0.10.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C HTTP" 2 | DESCRIPTION = "C99 implementation of the HTTP/1.1 and HTTP/2 specifications" 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-c-http" 5 | LICENSE = "Apache-2.0" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 7 | 8 | DEPENDS += "\ 9 | aws-c-cal \ 10 | aws-c-common \ 11 | aws-c-compression \ 12 | aws-c-io \ 13 | s2n \ 14 | openssl \ 15 | " 16 | 17 | PROVIDES += "aws/crt-c-http" 18 | 19 | BRANCH ?= "main" 20 | 21 | SRC_URI = "\ 22 | git://github.com/awslabs/aws-c-http.git;protocol=https;branch=${BRANCH} \ 23 | file://run-ptest \ 24 | " 25 | 26 | SRCREV = "3eedf1ef8c6874cd941dbde794a6ab3bd979e181" 27 | 28 | S = "${WORKDIR}/git" 29 | 30 | inherit cmake ptest pkgconfig 31 | 32 | PACKAGECONFIG ??= "\ 33 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 34 | " 35 | 36 | # CMAKE_CROSSCOMPILING=ON will disable building the tests 37 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON -DCMAKE_CROSSCOMPILING=OFF,-DBUILD_TESTING=OFF," 38 | 39 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 40 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 41 | 42 | do_install_ptest () { 43 | install -d ${D}${PTEST_PATH}/tests 44 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 45 | install -m 0755 ${B}/tests/aws-c-http-tests ${D}${PTEST_PATH}/tests/ 46 | } 47 | 48 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 49 | INSANE_SKIP:${PN}-ptest += "buildpaths" 50 | 51 | AWS_C_INSTALL = "$D/usr" 52 | CFLAGS:append = " -Wl,-Bsymbolic" 53 | EXTRA_OECMAKE += "\ 54 | -DBUILD_TEST_DEPS=OFF \ 55 | -DBUILD_TESTING=OFF \ 56 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 57 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 58 | -DCMAKE_BUILD_TYPE=Release \ 59 | " 60 | 61 | FILES:${PN}-dev += "${libdir}/*/cmake" 62 | 63 | BBCLASSEXTEND = "native nativesdk" 64 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-io/aws-c-io_0.19.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C IO" 2 | DESCRIPTION = "aws-c-io is an event driven framework for implementing application protocols. It is built on top of cross-platform abstractions that allow you as a developer to think only about the state machine and API for your protocols." 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-c-io" 5 | 6 | CVE_PRODUCT = "amazon_web_services_aws-c-io" 7 | 8 | LICENSE = "Apache-2.0" 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 10 | 11 | DEPENDS = "\ 12 | aws-c-cal \ 13 | aws-c-common \ 14 | s2n \ 15 | ${@bb.utils.contains('PACKAGECONFIG', 'static', 'aws-lc', 'openssl', d)} \ 16 | " 17 | 18 | PROVIDES += "aws/crt-c-io" 19 | 20 | BRANCH ?= "main" 21 | SRC_URI = "\ 22 | git://github.com/awslabs/aws-c-io.git;protocol=https;branch=${BRANCH} \ 23 | file://run-ptest \ 24 | " 25 | SRCREV = "689dee3cb8dbd8a6906431d154a3695f7688c056" 26 | 27 | S = "${WORKDIR}/git" 28 | 29 | inherit cmake ptest pkgconfig 30 | 31 | PACKAGECONFIG ??= "\ 32 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 33 | " 34 | 35 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 36 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 37 | 38 | # CMAKE_CROSSCOMPILING=ON will disable building the tests 39 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON -DCMAKE_CROSSCOMPILING=OFF,-DBUILD_TESTING=OFF," 40 | 41 | FILES:${PN}-dev += "${libdir}/*/cmake" 42 | 43 | AWS_C_INSTALL = "$D/usr" 44 | CFLAGS:append = " -Wl,-Bsymbolic" 45 | EXTRA_OECMAKE += "\ 46 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 47 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 48 | " 49 | do_install_ptest () { 50 | install -d ${D}${PTEST_PATH}/tests 51 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 52 | install -m 0755 ${B}/tests/aws-c-io-tests ${D}${PTEST_PATH}/tests/ 53 | } 54 | 55 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 56 | INSANE_SKIP:${PN}-ptest += "buildpaths" 57 | 58 | BBCLASSEXTEND = "native nativesdk" 59 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-iot/aws-c-iot/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # set -euxo pipefail 3 | cd tests 4 | 5 | rm -rf tests.log 6 | 7 | echo nameserver 8.8.4.4 >> /etc/resolv.conf 8 | 9 | # known good tests 10 | TESTS="\ 11 | devicedefender_task_unsupported_report_format \ 12 | devicedefender_get_system_network_total \ 13 | devicedefender_get_network_connections \ 14 | devicedefender_success_test \ 15 | devicedefender_custom_metrics_success_test \ 16 | devicedefender_stop_while_running_test \ 17 | devicedefender_publish_failure_callback_invoked \ 18 | " 19 | 20 | for TEST in $TESTS 21 | do 22 | ./aws-c-iot-tests $TEST >> tests.log 23 | done 24 | 25 | sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /ERROR/ s/^/FAIL: /' tests.log 26 | 27 | ### disabled tests - require aws_test_harness### 28 | # secure_tunneling_handle_stream_start_test 29 | # secure_tunneling_handle_data_receive_test 30 | # secure_tunneling_handle_stream_reset_test 31 | # secure_tunneling_handle_session_reset_test 32 | # secure_tunneling_handle_session_reset_no_stream_test 33 | # secure_tunneling_init_websocket_options_test 34 | # secure_tunneling_handle_send_data 35 | # secure_tunneling_handle_send_data_stream_start 36 | # secure_tunneling_handle_send_data_stream_reset 37 | # secure_tunneling_handle_send_data_public -------------------------------------------------------------------------------- /recipes-sdk/aws-c-iot/aws-c-iot_0.2.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C IoT" 2 | DESCRIPTION = "C99 implementation of AWS IoT cloud services integration with devices" 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-c-iot" 5 | 6 | LICENSE = "Apache-2.0" 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" 8 | 9 | DEPENDS += "\ 10 | aws-c-auth \ 11 | aws-c-common \ 12 | aws-c-event-stream \ 13 | aws-c-http \ 14 | aws-c-io \ 15 | aws-c-mqtt \ 16 | aws-c-s3 \ 17 | aws-checksums \ 18 | s2n \ 19 | openssl \ 20 | " 21 | 22 | PROVIDES += "aws/aws-c-iot" 23 | 24 | BRANCH ?= "main" 25 | 26 | SRC_URI = "\ 27 | git://github.com/awslabs/aws-c-iot.git;protocol=https;branch=${BRANCH} \ 28 | file://run-ptest \ 29 | " 30 | 31 | SRCREV = "9f0c152ed76af1a45d99fb98286707aa23c728af" 32 | 33 | S = "${WORKDIR}/git" 34 | 35 | inherit cmake ptest pkgconfig 36 | 37 | PACKAGECONFIG ??= "\ 38 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 39 | " 40 | 41 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 42 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 43 | 44 | # CMAKE_CROSSCOMPILING=ON will disable building the tests 45 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON -DCMAKE_CROSSCOMPILING=OFF,-DBUILD_TESTING=OFF," 46 | 47 | FILES:${PN}-dev += "${libdir}/*/cmake" 48 | 49 | CFLAGS:append = " -Wl,-Bsymbolic" 50 | EXTRA_OECMAKE += "\ 51 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 52 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 53 | " 54 | 55 | do_install_ptest () { 56 | install -d ${D}${PTEST_PATH}/tests 57 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 58 | install -m 0755 ${B}/tests/aws-c-iot-tests ${D}${PTEST_PATH}/tests/ 59 | } 60 | 61 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 62 | INSANE_SKIP:${PN}-ptest += "buildpaths" 63 | 64 | BBCLASSEXTEND = "native nativesdk" 65 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-mqtt/aws-c-mqtt_0.13.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C MQTT" 2 | DESCRIPTION = "C99 implementation of the MQTT 3.1.1 specification." 3 | HOMEPAGE = "https://github.com/awslabs/aws-c-mqtt" 4 | 5 | LICENSE = "Apache-2.0" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 7 | 8 | DEPENDS = "\ 9 | aws-c-cal \ 10 | aws-c-common \ 11 | aws-c-compression \ 12 | aws-c-http \ 13 | aws-c-io \ 14 | s2n \ 15 | " 16 | 17 | PROVIDES += "aws/crt-c-mqtt" 18 | 19 | BRANCH ?= "main" 20 | 21 | SRC_URI = "\ 22 | git://github.com/awslabs/aws-c-mqtt.git;protocol=https;branch=${BRANCH}\ 23 | file://run-ptest \ 24 | " 25 | 26 | SRCREV = "3ac506507679a86677f8875dcc07589b63907863" 27 | 28 | S = "${WORKDIR}/git" 29 | 30 | inherit cmake ptest 31 | 32 | CFLAGS:append = " -Wl,-Bsymbolic" 33 | EXTRA_OECMAKE += "\ 34 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 35 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 36 | " 37 | 38 | PACKAGECONFIG ??= "\ 39 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 40 | " 41 | 42 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 43 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON,," 44 | 45 | # CMAKE_CROSSCOMPILING=ON will disable building additional tests 46 | PACKAGECONFIG[with-tests] = "-DBUILD_TEST_DEPS=ON -DBUILD_TESTING=ON -DCMAKE_CROSSCOMPILING=OFF,-DBUILD_TEST_DEPS=OFF -DBUILD_TESTING=OFF," 47 | 48 | FILES:${PN}-dev += "${libdir}/*/cmake" 49 | 50 | do_install_ptest () { 51 | install -d ${D}${PTEST_PATH}/tests 52 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 53 | install -m 0755 ${B}/tests/aws-c-mqtt-tests ${D}${PTEST_PATH}/tests/ 54 | } 55 | 56 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 57 | INSANE_SKIP:${PN}-ptest += "buildpaths" 58 | 59 | BBCLASSEXTEND = "native nativesdk" 60 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-s3/aws-c-s3_0.8.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C S3" 2 | DESCRIPTION = "C99 library implementation for communicating with the S3 service, designed for maximizing throughput on high bandwidth EC2 instances." 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-c-s3" 5 | LICENSE = "Apache-2.0" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" 7 | 8 | DEPENDS = "\ 9 | aws-c-auth \ 10 | aws-c-http \ 11 | aws-checksums \ 12 | ${@bb.utils.contains('PACKAGECONFIG', 'static', 'aws-lc', 'openssl', d)} \ 13 | " 14 | 15 | PROVIDES += "aws/crt-c-s3" 16 | 17 | BRANCH ?= "main" 18 | SRC_URI = "\ 19 | git://github.com/awslabs/aws-c-s3.git;protocol=https;branch=${BRANCH} \ 20 | file://run-ptest \ 21 | " 22 | SRCREV = "52c90d39dab19a36e06d746a8c795060632619e2" 23 | 24 | S = "${WORKDIR}/git" 25 | 26 | inherit cmake ptest pkgconfig 27 | 28 | PACKAGECONFIG ??= "\ 29 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 30 | " 31 | 32 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 33 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 34 | 35 | # CMAKE_CROSSCOMPILING=ON will disable building the tests 36 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON -DCMAKE_CROSSCOMPILING=OFF,-DBUILD_TESTING=OFF," 37 | 38 | CFLAGS:append = " -Wl,-Bsymbolic" 39 | 40 | FILES:${PN}-dev += "${libdir}/*/cmake" 41 | 42 | EXTRA_OECMAKE += "\ 43 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 44 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 45 | " 46 | 47 | do_install_ptest () { 48 | install -d ${D}${PTEST_PATH}/tests 49 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 50 | install -m 0755 ${B}/tests/aws-c-s3-tests ${D}${PTEST_PATH}/tests/ 51 | } 52 | 53 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 54 | INSANE_SKIP:${PN}-ptest += "buildpaths" 55 | 56 | BBCLASSEXTEND = "native nativesdk" 57 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-sdkutils/aws-c-sdkutils_0.2.4.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C SDKUTILS" 2 | DESCRIPTION = "No description or website provided. " 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-c-sdkutils" 5 | 6 | LICENSE = "Apache-2.0" 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" 8 | 9 | DEPENDS += "aws-c-common" 10 | 11 | PROVIDES += "aws/c-sdkutils" 12 | 13 | SRC_URI = "\ 14 | git://github.com/awslabs/aws-c-sdkutils.git;protocol=https;branch=main \ 15 | file://run-ptest \ 16 | " 17 | SRCREV = "f678bda9e21f7217e4bbf35e0d1ea59540687933" 18 | 19 | S = "${WORKDIR}/git" 20 | 21 | inherit cmake ptest pkgconfig 22 | 23 | PACKAGECONFIG ??= "\ 24 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 25 | " 26 | 27 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 28 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 29 | 30 | # CMAKE_CROSSCOMPILING=ON will disable building the tests 31 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON -DCMAKE_CROSSCOMPILING=OFF,-DBUILD_TESTING=OFF," 32 | 33 | CFLAGS:append = " -Wl,-Bsymbolic" 34 | EXTRA_OECMAKE += "\ 35 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 36 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 37 | -DCMAKE_BUILD_TYPE=Release \ 38 | " 39 | 40 | do_install_ptest () { 41 | install -d ${D}${PTEST_PATH}/tests 42 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 43 | install -m 0755 ${B}/tests/aws-c-sdkutils-tests ${D}${PTEST_PATH}/tests/ 44 | } 45 | 46 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 47 | INSANE_SKIP:${PN}-ptest += "buildpaths" 48 | 49 | FILES:${PN}-dev += "${libdir}/*/cmake" 50 | 51 | BBCLASSEXTEND = "native nativesdk" 52 | -------------------------------------------------------------------------------- /recipes-sdk/aws-c-sdkutils/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd tests 3 | 4 | rm -rf tests.log 5 | 6 | # known good tests 7 | TESTS="\ 8 | sdkutils_library_test \ 9 | aws_profile_early_property_parse_failure_test \ 10 | aws_profile_missing_bracket_parse_failure_test \ 11 | aws_profile_missing_assignment_parse_failure_test \ 12 | aws_profile_missing_property_key_parse_failure_test \ 13 | aws_profile_early_continuation_parse_failure_test \ 14 | aws_profile_illegal_continuation1_parse_failure_test \ 15 | aws_profile_illegal_continuation2_parse_failure_test \ 16 | aws_profile_illegal_continuation3_parse_failure_test \ 17 | aws_profile_continuation_reset_on_new_profile_parse_failure_test \ 18 | aws_profile_empty_test \ 19 | aws_profile_empty_profile_test \ 20 | aws_profile_whitespace_empty_profile_test \ 21 | aws_profile_tab_empty_profile_test \ 22 | aws_profile_single_simple_property_profile_test \ 23 | aws_profile_equal_containing_property_profile_test \ 24 | aws_profile_unicode_containing_property_profile_test \ 25 | aws_profile_multiple_property_profile_test \ 26 | aws_profile_trimmable_property_profile_test \ 27 | aws_profile_empty_property_profile_test \ 28 | aws_profile_multiple_empty_profile_test \ 29 | aws_profile_multiple_profile_test \ 30 | aws_profile_blank_lines_ignored_test \ 31 | aws_profile_pound_comments_ignored_test \ 32 | aws_profile_semicolon_comments_ignored_test \ 33 | aws_profile_mixed_comments_ignored_test \ 34 | aws_profile_empty_comments_ignored_test \ 35 | aws_profile_profile_adjacent_comment_test \ 36 | aws_profile_value_adjacent_comment_test \ 37 | aws_profile_continued_property_value_test \ 38 | aws_profile_multiline_continued_property_value_test \ 39 | aws_profile_continued_property_value_trim_test \ 40 | aws_profile_continued_property_value_pound_comment_test \ 41 | aws_profile_continued_property_value_semicolon_comment_test \ 42 | aws_profile_duplicate_profiles_merge_test \ 43 | aws_profile_duplicate_properties_last_property_value_test \ 44 | aws_profile_duplicate_profiles_last_property_value_test \ 45 | aws_profile_duplicate_default_profiles_property_resolution1_test \ 46 | aws_profile_duplicate_default_profiles_property_resolution2_test \ 47 | aws_profile_invalid_profile_names_merge_test \ 48 | aws_profile_invalid_property_names_ignored_test \ 49 | aws_profile_all_valid_profile_characters_test \ 50 | aws_profile_all_valid_property_characters_test \ 51 | aws_profile_basic_sub_property_test \ 52 | aws_profile_empty_sub_property_test \ 53 | aws_profile_invalid_sub_property_name_test \ 54 | aws_profile_sub_property_blank_line_test \ 55 | aws_profile_basic_duplicate_merge_test \ 56 | aws_profile_mixed_prefix_default_test \ 57 | aws_profile_override_duplicate_merge_test \ 58 | aws_profile_no_prefix_nondefault_test \ 59 | aws_profile_prefix_credentials_test \ 60 | parse_resource_name_test \ 61 | parse_resource_name_failures_test \ 62 | resource_name_tostring_test \ 63 | resource_name_tostring_failure_test \ 64 | resource_name_length_test \ 65 | parse_ruleset_from_string \ 66 | test_endpoints_aws_region \ 67 | test_endpoints_default_values \ 68 | test_endpoints_eventbridge \ 69 | test_endpoints_fns \ 70 | test_endpoints_get_attr_type_inference \ 71 | test_endpoints_headers \ 72 | test_endpoints_is_virtual_hostable_s3_bucket \ 73 | test_endpoints_region_override \ 74 | test_endpoints_minimal_ruleset \ 75 | test_endpoints_parse_arn \ 76 | test_endpoints_parse_url \ 77 | test_endpoints_partition_fn \ 78 | test_endpoints_substring \ 79 | test_endpoints_uri_encode \ 80 | test_endpoints_valid_hostlabel \ 81 | test_endpoints_condition_mem_clean_up \ 82 | endpoints_eval_util_is_ipv4 \ 83 | endpoints_eval_util_is_ipv6 \ 84 | endpoints_map_region_to_partition \ 85 | endpoints_uri_normalize_path \ 86 | endpoints_byte_buf_init_from_resolved_templated_string \ 87 | " 88 | 89 | for TEST in $TESTS 90 | do 91 | ./aws-c-sdkutils-tests $TEST >> tests.log 92 | done 93 | 94 | sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /ERROR/ s/^/FAIL: /' tests.log 95 | -------------------------------------------------------------------------------- /recipes-sdk/aws-checksums/aws-checksums_0.2.7.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS Checksums" 2 | DESCRIPTION = "Cross-Platform HW accelerated CRC32c and CRC32 with fallback to efficient SW implementations. C interface with language bindings for each of our SDKs" 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-checksums" 5 | 6 | LICENSE = "Apache-2.0" 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" 8 | 9 | DEPENDS += "\ 10 | aws-c-common \ 11 | s2n \ 12 | " 13 | 14 | PROVIDES += "aws/checksums" 15 | 16 | BRANCH ?= "main" 17 | SRC_URI = "\ 18 | git://github.com/awslabs/aws-checksums.git;protocol=https;branch=${BRANCH} \ 19 | file://run-ptest \ 20 | " 21 | 22 | SRCREV = "9978ba2c33a7a259c1a6bd0f62abe26827d03b85" 23 | 24 | S = "${WORKDIR}/git" 25 | 26 | inherit cmake ptest pkgconfig 27 | 28 | PACKAGECONFIG ??= "\ 29 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 30 | " 31 | 32 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF," 33 | 34 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 35 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 36 | 37 | do_install_ptest () { 38 | install -d ${D}${PTEST_PATH}/tests 39 | cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests/ 40 | install -m 0755 ${B}/tests/aws-checksums-tests ${D}${PTEST_PATH}/tests/ 41 | } 42 | 43 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 44 | INSANE_SKIP:${PN}-ptest += "buildpaths" 45 | 46 | AWS_C_INSTALL = "$D/usr" 47 | CFLAGS:append = " -Wl,-Bsymbolic" 48 | EXTRA_OECMAKE += "\ 49 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 50 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 51 | -DCMAKE_BUILD_TYPE=Release \ 52 | " 53 | 54 | FILES:${PN}-dev += "${libdir}/*/cmake" 55 | 56 | BBCLASSEXTEND = "native nativesdk" 57 | -------------------------------------------------------------------------------- /recipes-sdk/aws-checksums/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd tests 4 | 5 | rm -rf tests.log 6 | 7 | # known good tests 8 | TESTS="\ 9 | test_crc32c \ 10 | test_crc32 \ 11 | " 12 | 13 | for TEST in $TESTS 14 | do 15 | ./aws-checksums-tests $TEST >> tests.log 16 | done 17 | 18 | sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /ERROR/ s/^/FAIL: /' tests.log 19 | -------------------------------------------------------------------------------- /recipes-sdk/aws-crt-cpp/aws-crt-cpp/001-shared-static-crt-libs.patch: -------------------------------------------------------------------------------- 1 | This disable the shared libs build for aws-crt-cpp and aws-c-iot, 2 | cause they will conflict with already exising versions on a system. 3 | Therefor they are static linked into the cpp libs to not conflict. 4 | 5 | Upstream-Status: Inappropriate [oe specific] 6 | 7 | Index: 0.32.5/CMakeLists.txt 8 | =================================================================== 9 | --- 0.32.5.orig/CMakeLists.txt 10 | +++ 0.32.5/CMakeLists.txt 11 | @@ -45,6 +45,7 @@ set(GENERATED_CONFIG_HEADER "${GENERATED 12 | configure_file(include/aws/crt/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) 13 | 14 | if(BUILD_DEPS) 15 | + set(BUILD_SHARED_LIBS OFF) 16 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/crt/aws-c-common/cmake") 17 | 18 | include(AwsFindPackage) 19 | @@ -103,6 +104,7 @@ if(BUILD_DEPS) 20 | add_subdirectory(crt/aws-c-event-stream) 21 | add_subdirectory(crt/aws-c-s3) 22 | set(BUILD_TESTING ${BUILD_TESTING_PREV}) 23 | + set(BUILD_SHARED_LIBS ON) 24 | else() 25 | # this is required so we can use aws-c-common's CMake modules 26 | find_package(aws-c-common REQUIRED) 27 | -------------------------------------------------------------------------------- /recipes-sdk/aws-crt-cpp/aws-crt-cpp/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd tests 3 | 4 | rm -rf tests.log 5 | 6 | # known good tests 7 | TESTS="\ 8 | ApiMultiCreateDestroy \ 9 | ApiMultiDefaultCreateDestroy \ 10 | ApiStaticDefaultCreateDestroy \ 11 | EventLoopResourceSafety \ 12 | ClientBootstrapResourceSafety \ 13 | TLSContextUninitializedNewConnectionOptions \ 14 | Base64RoundTrip \ 15 | DateTimeBinding \ 16 | BasicJsonParsing \ 17 | JsonNullParsing \ 18 | JsonNullNestedObject \ 19 | JsonExplicitNull \ 20 | JsonBoolTest \ 21 | SHA256ResourceSafety \ 22 | MD5ResourceSafety \ 23 | SHA256HMACResourceSafety \ 24 | HttpCreateConnectionInvalidTlsConnectionOptions \ 25 | IotPublishSubscribe \ 26 | DefaultResolution \ 27 | OptionalCopySafety \ 28 | OptionalMoveSafety \ 29 | OptionalCopyAndMoveSemantics \ 30 | StreamTestCreateDestroyWrapper \ 31 | StreamTestLength \ 32 | StreamTestRead \ 33 | StreamTestReadEmpty \ 34 | StreamTestSeekBegin \ 35 | StreamTestSeekEnd \ 36 | StreamTestRefcount \ 37 | HttpRequestTestCreateDestroy \ 38 | Sigv4SigningTestCreateDestroy \ 39 | Sigv4SigningTestSimple \ 40 | Sigv4SigningTestUnsignedPayload \ 41 | UUIDToString \ 42 | TestIntArrayListToVector \ 43 | TestByteCursorArrayListToVector \ 44 | StringViewTest \ 45 | TestCreatingImdsClient \ 46 | ChannelHandlerInterop \ 47 | Mqtt5NewClientMinimal \ 48 | Mqtt5NewClientFull \ 49 | RuleEngine \ 50 | " 51 | 52 | for TEST in $TESTS 53 | do 54 | ./aws-crt-cpp-tests $TEST >> tests.log 2>&1 55 | done 56 | 57 | sed -e '/\[\s\|==.*==\|runtime error:/!d ; /OK/ s/^/PASS: / ; /FAILED\|ERROR: .*Sanitizer\|runtime error:/ s/^/FAIL: /' tests.log 58 | -------------------------------------------------------------------------------- /recipes-sdk/aws-crt-cpp/aws-crt-cpp_0.32.5.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS CRT CPP" 2 | DESCRIPTION = "C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++." 3 | 4 | HOMEPAGE = "https://github.com/awslabs/aws-crt-cpp" 5 | LICENSE = "Apache-2.0" 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 7 | 8 | DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'build-deps', 'openssl', '\ 9 | aws-c-auth \ 10 | aws-c-common \ 11 | aws-c-event-stream \ 12 | aws-c-http \ 13 | aws-c-io \ 14 | aws-c-mqtt \ 15 | aws-c-s3 \ 16 | aws-checksums \ 17 | s2n \ 18 | ', d)}" 19 | 20 | PROVIDES += "aws/crt-cpp" 21 | 22 | BRANCH ?= "main" 23 | 24 | SRC_URI = "\ 25 | gitsm://github.com/awslabs/aws-crt-cpp.git;protocol=https;branch=${BRANCH} \ 26 | ${@bb.utils.contains('PACKAGECONFIG', 'static', '', 'file://001-shared-static-crt-libs.patch', d)} \ 27 | file://run-ptest \ 28 | " 29 | 30 | SRCREV = "78c4031387b5be86837e336730f4ef4ab6144815" 31 | 32 | S = "${WORKDIR}/git" 33 | 34 | inherit cmake pkgconfig ptest 35 | 36 | CFLAGS:append = " -Wl,-Bsymbolic" 37 | 38 | EXTRA_OECMAKE += "\ 39 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 40 | -DCMAKE_PREFIX_PATH="${STAGING_LIBDIR}/cmake;${STAGING_LIBDIR}" \ 41 | -DUSE_OPENSSL=ON \ 42 | " 43 | 44 | # for generating Makefiles to run tests 45 | OECMAKE_GENERATOR = "Unix Makefiles" 46 | 47 | # build-deps is enabled by default to use the crt versions that comes as a git submodule, 48 | # this also means that it conflicts with the other standalone versions as it installs the same library if installed separate. 49 | PACKAGECONFIG[build-deps] = "-DBUILD_DEPS=ON,-DBUILD_DEPS=OFF" 50 | 51 | PACKAGECONFIG ??= "\ 52 | build-deps \ 53 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 54 | " 55 | 56 | PACKAGECONFIG:append:x86-64 = " ${@bb.utils.contains('PTEST_ENABLED', '1', 'sanitize', '', d)}" 57 | 58 | EXTRA_OECMAKE += "${@bb.utils.contains('PACKAGECONFIG', 'sanitize', '-DCMAKE_BUILD_TYPE=Debug', '-DCMAKE_BUILD_TYPE=Release', d)}" 59 | 60 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 61 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 62 | 63 | # CMAKE_CROSSCOMPILING=ON will disable building the tests 64 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON -DCMAKE_CROSSCOMPILING=OFF,-DBUILD_TESTING=OFF," 65 | 66 | FILES:${PN} += "${libdir}/libaws-crt-cpp.so" 67 | FILES:${PN}-dev += "\ 68 | ${includedir}/aws/crt/* \ 69 | ${libdir}/aws-crt-cpp/* \ 70 | ${includedir}/aws/iot/* \ 71 | ${@bb.utils.contains('PACKAGECONFIG', 'build-deps', '${libdir}/s2n/cmake', '', d)} \ 72 | " 73 | 74 | # Notify that libraries are not versioned 75 | FILES_SOLIBSDEV = "" 76 | 77 | BBCLASSEXTEND = "native nativesdk" 78 | 79 | do_install_ptest () { 80 | install -d ${D}${PTEST_PATH}/tests 81 | install -m 0755 ${B}/tests/aws-crt-cpp-tests ${D}${PTEST_PATH}/tests/ 82 | } 83 | 84 | # -fsanitize=address does cause this 85 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 86 | INSANE_SKIP += "${@bb.utils.contains('PACKAGECONFIG', 'sanitize', 'buildpaths', '', d)}" 87 | 88 | PACKAGECONFIG[sanitize] = ",, gcc-sanitizers" 89 | OECMAKE_CXX_FLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'sanitize', '-fsanitize=address,undefined -fno-omit-frame-pointer', '', d)}" 90 | -------------------------------------------------------------------------------- /recipes-sdk/aws-crt-python/aws-crt-python_0.27.2.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS CRT Python" 2 | DESCRIPTION = "Python bindings for the AWS Common Runtime" 3 | HOMEPAGE = "https://github.com/awslabs/aws-crt-python" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 6 | 7 | DEPENDS += "\ 8 | ${PYTHON_PN}-setuptools-native \ 9 | aws-c-auth \ 10 | aws-c-cal \ 11 | aws-c-common \ 12 | aws-c-compression \ 13 | aws-c-event-stream \ 14 | aws-c-http \ 15 | aws-c-io \ 16 | aws-c-mqtt \ 17 | aws-c-s3 \ 18 | aws-c-sdkutils \ 19 | aws-checksums \ 20 | s2n \ 21 | " 22 | 23 | BRANCH ?= "main" 24 | # nooelint: oelint.file.patchsignedoff 25 | SRC_URI = "\ 26 | git://github.com/awslabs/aws-crt-python.git;protocol=https;branch=${BRANCH} \ 27 | file://run-ptest \ 28 | " 29 | 30 | SRCREV = "0157faf2fdb7bcb7eb2f84bcdbc7c67faff18c6a" 31 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P.*)" 32 | 33 | S = "${WORKDIR}/git" 34 | 35 | inherit setuptools3_legacy ptest 36 | 37 | AWS_C_INSTALL = "${D}/usr/lib;${S}/source" 38 | 39 | RDEPENDS:${PN} += "python3-asyncio" 40 | 41 | CFLAGS:append = " -Wl,-Bsymbolic" 42 | 43 | do_configure:prepend(){ 44 | sed -i "s/__version__ = '1.0.0.dev0'/__version__ = '${PV}'/" ${S}/awscrt/__init__.py 45 | } 46 | 47 | RDEPENDS:${PN}-ptest += "\ 48 | ${PYTHON_PN} \ 49 | ${PYTHON_PN}-websockets \ 50 | bash \ 51 | " 52 | 53 | do_install_ptest() { 54 | install -d ${D}${PTEST_PATH}/tests 55 | cp -rf ${S}/* ${D}${PTEST_PATH}/tests/ 56 | } 57 | 58 | BBCLASSEXTEND = "native nativesdk" 59 | -------------------------------------------------------------------------------- /recipes-sdk/aws-crt-python/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo nameserver 8.8.4.4 >> /etc/resolv.conf 4 | 5 | cd tests/ 6 | 7 | # known good tests 8 | TESTS="\ 9 | test/test_appexit.py \ 10 | test/test_auth.py \ 11 | test/test_checksums.py \ 12 | test/test_common.py \ 13 | test/test_crypto.py \ 14 | test/test_eventstream.py \ 15 | test/test_eventstream_rpc.py \ 16 | test/test_exceptions.py \ 17 | test/test_http_headers.py \ 18 | test/test_io.py \ 19 | test/test_mqtt.py \ 20 | test/test_mqtt5.py \ 21 | test/test_proxy.py \ 22 | test/test_s3.py \ 23 | " 24 | 25 | for TEST in $TESTS 26 | do 27 | python3 -m unittest $TEST 28 | RETVAL=$? 29 | if [ $RETVAL -eq 0 ] ; then 30 | echo "PASS: aws-crt-python unittest: $TEST" 31 | else 32 | echo "FAIL: aws-crt-python unittest: $TEST" 33 | fi 34 | done 35 | 36 | ### removed tests #### 37 | # ./test/test_http_client.py 38 | # ./test/test_mqtt5_canary.py 39 | 40 | # a expected exception is thrown causing ptest to fail 41 | # ./test/test_websocket.py 42 | -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-cpp-v2/aws-iot-device-sdk-cpp-v2-samples-fleet-provisoning.bb: -------------------------------------------------------------------------------- 1 | # nooelint: oelint.file.underscores 2 | require aws-iot-device-sdk-cpp-v2-samples.inc 3 | 4 | S = "${WORKDIR}/git/samples/fleet_provisioning/fleet_provisioning" 5 | 6 | SRC_URI:append = " \ 7 | file://run-ptest \ 8 | " 9 | 10 | RDEPENDS:${PN}-ptest += "python3 aws-cli" 11 | 12 | do_install() { 13 | install -d ${D}${bindir} 14 | install ${B}/fleet-provisioning ${D}${bindir}/aws-iot-device-sdk-cpp-v2-samples-fleet-provisoning 15 | } 16 | 17 | inherit ptest 18 | 19 | do_install_ptest() { 20 | install -d ${D}${PTEST_PATH}/tests 21 | 22 | install -m 0755 ${S}/../../../utils/parse_cert_set_result.py ${D}${PTEST_PATH}/ 23 | } 24 | 25 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 26 | INSANE_SKIP:${PN}-dbg += "buildpaths" 27 | 28 | # ptest require credentials to be set before otherwise it will skipped 29 | # this can be done by adding a file aws-iot-device-sdk-cpp-v2-samples-fleet-provisoning.bbappend in a separate layer or uncomment here 30 | # do_install_ptest_append() { 31 | # install -d ${D}/home/root/.aws 32 | # 33 | # echo [default] > ${D}/home/root/.aws/credentials 34 | # echo "aws_access_key_id = XXX" >> ${D}/home/root/.aws/credentials 35 | # echo "aws_secret_access_key = XXX" >> ${D}/home/root/.aws/credentials 36 | # echo "region = xxx" >> ${D}/home/root/.aws/credentials 37 | # } -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-cpp-v2/aws-iot-device-sdk-cpp-v2-samples-fleet-provisoning/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "nameserver 8.8.8.8" > /etc/resolv.conf 4 | 5 | if [ ! -f "/home/root/.aws/credentials" ]; then 6 | echo "SKIP: aws-iot-device-sdk-cpp-v2-samples-fleet-provisoning test - aws cli needs to be configured" 7 | exit 8 | fi 9 | 10 | set -euxo pipefail 11 | 12 | DATE=$(date "+%F_%H-%M-%S") 13 | ROLE="fprole_$DATE" 14 | TEMPLATE="fptemplate_$DATE" 15 | TEMPLATE_JSON='{"Parameters":{"DeviceLocation":{"Type":"String"},"AWS::IoT::Certificate::Id":{"Type":"String"},"SerialNumber":{"Type":"String"}},"Mappings":{"LocationTable":{"Seattle":{"LocationUrl":"https://example.aws"}}},"Resources":{"thing":{"Type":"AWS::IoT::Thing","Properties":{"ThingName":{"Fn::Join":["",["ThingPrefix_",{"Ref":"SerialNumber"}]]},"AttributePayload":{"version":"v1","serialNumber":"serialNumber"}},"OverrideSettings":{"AttributePayload":"MERGE","ThingTypeName":"REPLACE","ThingGroups":"DO_NOTHING"}},"certificate":{"Type":"AWS::IoT::Certificate","Properties":{"CertificateId":{"Ref":"AWS::IoT::Certificate::Id"},"Status":"Active"},"OverrideSettings":{"Status":"REPLACE"}},"policy":{"Type":"AWS::IoT::Policy","Properties":{"PolicyDocument":{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["iot:Connect","iot:Subscribe","iot:Publish","iot:Receive"],"Resource":"*"}]}}}},"DeviceConfiguration":{"FallbackUrl":"https://www.example.com/test-site","LocationUrl":{"Fn::FindInMap":["LocationTable",{"Ref":"DeviceLocation"},"LocationUrl"]}}}' 16 | AWS_ACCOUNT_NUMBER=$(aws sts get-caller-identity --query "Account" --output text) 17 | IOT_DATA_ENDPOINT=`aws --output text iot describe-endpoint --endpoint-type iot:Data-ATS` 18 | 19 | aws iam create-role \ 20 | --role-name $ROLE \ 21 | --assume-role-policy-document '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"iot.amazonaws.com"}}]}' 22 | 23 | aws iam attach-role-policy \ 24 | --role-name $ROLE \ 25 | --policy-arn arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration 26 | 27 | # wait for role to be populated 28 | sleep 10 29 | 30 | aws iot create-provisioning-template \ 31 | --template-name $TEMPLATE \ 32 | --provisioning-role-arn arn:aws:iam::$AWS_ACCOUNT_NUMBER:role/$ROLE \ 33 | --template-body $TEMPLATE_JSON \ 34 | --enabled 35 | 36 | aws iot create-provisioning-claim \ 37 | --template-name $TEMPLATE \ 38 | | python3 ./parse_cert_set_result.py \ 39 | --path ./tmp \ 40 | --filename provision 41 | 42 | aws-iot-device-sdk-cpp-v2-samples-fleet-provisoning --endpoint $IOT_DATA_ENDPOINT --cert ./tmp/provision.cert.pem --key ./tmp/provision.private.key --template_name $TEMPLATE --template_parameters '{"SerialNumber":"'$DATE'","DeviceLocation":"Seattle"}' 43 | 44 | # this also acts like a (try-) catch block 45 | if [ $? -eq 0 ] ; then 46 | echo "PASS: aws-iot-device-sdk-cpp-v2-samples-fleet-provisoning test" 47 | else 48 | echo "FAIL: aws-iot-device-sdk-cpp-v2-samples-fleet-provisoning test" 49 | fi -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-cpp-v2/aws-iot-device-sdk-cpp-v2-samples-mqtt5-pubsub.bb: -------------------------------------------------------------------------------- 1 | # nooelint: oelint.file.underscores 2 | require aws-iot-device-sdk-cpp-v2-samples.inc 3 | 4 | S = "${WORKDIR}/git/samples/mqtt5/mqtt5_pubsub" 5 | 6 | do_install() { 7 | install -d ${D}${bindir} 8 | install ${B}/mqtt5_pubsub ${D}${bindir} 9 | } 10 | 11 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 12 | INSANE_SKIP:${PN}-dbg += "buildpaths" 13 | 14 | EXTRA_OECMAKE:append = " -DCMAKE_BUILD_TYPE=RelWithDebInfo" 15 | -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-cpp-v2/aws-iot-device-sdk-cpp-v2-samples.inc: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS IoT Device SDK for C++ v2 samples" 2 | DESCRIPTION = "The AWS IoT Device SDK for C++ v2 provides MQTT APIs for C++ applications samples" 3 | HOMEPAGE = "https://github.com/aws/aws-iot-device-sdk-cpp-v2" 4 | LICENSE = "Apache-2.0" 5 | 6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/git/documents/LICENSE;md5=f91e61641e7a96835dea6926a65f4702" 7 | 8 | DEPENDS += "aws-iot-device-sdk-cpp-v2" 9 | 10 | require aws-iot-device-sdk-cpp-v2-version.inc 11 | 12 | inherit cmake 13 | 14 | BRANCH ?= "main" 15 | 16 | # we just want to upgrade the library, then the samples are as well updated 17 | # set to match only git_invalid_tag_regex because UPSTREAM_VERSION_UNKNOWN seems to be broken for git 18 | UPSTREAM_CHECK_GITTAGREGEX = "git_invalid_tag_regex" 19 | 20 | CFLAGS:append = " -Wl,-Bsymbolic" 21 | 22 | EXTRA_OECMAKE += "\ 23 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 24 | -DBUILD_DEPS=OFF \ 25 | -DBUILD_TESTING=OFF \ 26 | -DBUILD_SHARED_LIBS=ON \ 27 | -DCMAKE_BUILD_TYPE=Release \ 28 | " 29 | 30 | FILES:${PN}-dev += "${libdir}/*/cmake" 31 | 32 | # Notify that libraries are not versioned 33 | SOLIBS = "*.so" 34 | FILES_SOLIBSDEV = "" 35 | 36 | BBCLASSEXTEND = "native nativesdk" 37 | -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-cpp-v2/aws-iot-device-sdk-cpp-v2-version.inc: -------------------------------------------------------------------------------- 1 | BRANCH ?= "main" 2 | SRC_URI = "gitsm://github.com/aws/aws-iot-device-sdk-cpp-v2.git;protocol=https;branch=${BRANCH}" 3 | SRCREV = "0a3ddbc93410f3c2fe0af56dab07f38e982f5cba" 4 | -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-cpp-v2/aws-iot-device-sdk-cpp-v2/001-shared-static-crt-libs.patch: -------------------------------------------------------------------------------- 1 | This disable the shared libs build for aws-crt-cpp and aws-c-iot, 2 | cause they will conflict with already exising versions on a system. 3 | Therefor they are static linked into the cpp libs to not conflict. 4 | 5 | Upstream-Status: Inappropriate [oe specific] 6 | 7 | 8 | Index: git/crt/aws-crt-cpp/CMakeLists.txt 9 | =================================================================== 10 | --- git.orig/crt/aws-crt-cpp/CMakeLists.txt 11 | +++ git/crt/aws-crt-cpp/CMakeLists.txt 12 | @@ -1,5 +1,7 @@ 13 | cmake_minimum_required(VERSION 3.9...3.31) 14 | 15 | +set(BUILD_SHARED_LIBS OFF) 16 | + 17 | option(BUILD_DEPS "Builds aws common runtime dependencies as part of build. Turn off if you want to control your dependency chain." ON) 18 | option(BYO_CRYPTO "Don't build a tls implementation or link against a crypto interface. This feature is only for unix builds currently" OFF) 19 | option(USE_OPENSSL "Set this if you want to use your system's OpenSSL 1.0.2/1.1.1 compatible libcrypto" OFF) 20 | Index: git/crt/aws-c-iot/CMakeLists.txt 21 | =================================================================== 22 | --- git.orig/crt/aws-c-iot/CMakeLists.txt 23 | +++ git/crt/aws-c-iot/CMakeLists.txt 24 | @@ -1,6 +1,8 @@ 25 | cmake_minimum_required(VERSION 3.9...3.31) 26 | project(aws-c-iot C) 27 | 28 | +set(BUILD_SHARED_LIBS OFF) 29 | + 30 | option(USE_EXTERNAL_DEPS_SOURCES "Use dependencies provided by add_subdirectory command" OFF) 31 | 32 | if (USE_EXTERNAL_DEPS_SOURCES) 33 | -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-cpp-v2/aws-iot-device-sdk-cpp-v2/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mqtt5_pubsub --help 4 | RETVAL=$? 5 | if [ $RETVAL -eq 255 ] ; then 6 | echo "PASS: aws-iot-device-sdk-cpp-v2-sample-mqtt5_pubsub help test" 7 | else 8 | echo "FAIL: aws-iot-device-sdk-cpp-v2-sample-mqtt5_pubsub help test" 9 | fi 10 | -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-cpp-v2/aws-iot-device-sdk-cpp-v2_1.35.1.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS IoT Device SDK for C++ v2" 2 | DESCRIPTION = "The AWS IoT Device SDK for C++ v2 provides MQTT APIs for C++ applications" 3 | HOMEPAGE = "https://github.com/aws/aws-iot-device-sdk-cpp-v2" 4 | LICENSE = "Apache-2.0" 5 | 6 | LIC_FILES_CHKSUM = "file://documents/LICENSE;md5=f91e61641e7a96835dea6926a65f4702" 7 | 8 | DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'build-deps', 'openssl', 'aws-c-iot', d)}" 9 | 10 | PROVIDES += "aws/aws-iot-device-sdk-cpp-v2" 11 | 12 | require aws-iot-device-sdk-cpp-v2-version.inc 13 | 14 | SRC_URI:append = " \ 15 | file://run-ptest \ 16 | ${@bb.utils.contains('PACKAGECONFIG', 'static', '', 'file://001-shared-static-crt-libs.patch', d)} \ 17 | " 18 | 19 | S = "${WORKDIR}/git" 20 | 21 | inherit cmake pkgconfig ptest 22 | 23 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+\.\d+(\.\d+)*)" 24 | 25 | CXXFLAGS:append = " -fPIC" 26 | LDFLAGS:append = " -Wl,-Bsymbolic" 27 | 28 | EXTRA_OECMAKE += "\ 29 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 30 | -DBUILD_TESTING=OFF \ 31 | -DCMAKE_BUILD_TYPE=Release \ 32 | -DUSE_OPENSSL=ON \ 33 | " 34 | 35 | # Notify that libraries are not versioned 36 | SOLIBS = "*.so" 37 | FILES_SOLIBSDEV = "" 38 | 39 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 40 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 41 | 42 | # build-deps is enabled by default to use the aws-c-iot lib (and its dependencies) version that comes as a git submodule, 43 | # this also means that it conflicts with the aws-c-iot as it installs the same library if installed separate. 44 | PACKAGECONFIG[build-deps] = "-DBUILD_DEPS=ON,-DBUILD_DEPS=OFF" 45 | 46 | PACKAGECONFIG ??= "\ 47 | build-deps \ 48 | " 49 | 50 | FILES:${PN}-dev += "${@bb.utils.contains('PACKAGECONFIG', 'build-deps', '${libdir}/s2n/cmake', '', d)}" 51 | 52 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 53 | INSANE_SKIP += "${@bb.utils.contains('PACKAGECONFIG', 'build-deps', 'ldflags', '', d)}" 54 | 55 | RDEPENDS:${PN}-ptest:prepend = "\ 56 | aws-iot-device-sdk-cpp-v2-samples-mqtt5-pubsub \ 57 | " 58 | 59 | BBCLASSEXTEND = "native nativesdk" 60 | 61 | EXTRA_OECMAKE:append = " -DCMAKE_BUILD_TYPE=RelWithDebInfo" 62 | -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-embedded-c/aws-iot-device-sdk-embedded-c_202412.00.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS IoT Device SDK for Embedded C" 2 | DESCRIPTION = "SDK for connecting to AWS IoT from a device using embedded C" 3 | HOMEPAGE = "https://github.com/aws/aws-iot-device-sdk-embedded-C" 4 | LICENSE = "MIT" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c8c19afab7f99fb196c9287cbd60a258 " 6 | 7 | SRC_URI = "\ 8 | gitsm://github.com/aws/aws-iot-device-sdk-embedded-C.git;protocol=https;branch=main \ 9 | file://run-ptest \ 10 | " 11 | 12 | SRCREV = "da99638ec373c791a45557b0cd91fc20968d492d" 13 | 14 | DEPENDS = "\ 15 | ${@bb.utils.contains('PACKAGECONFIG', 'with-demos', 'mosquitto', '', d)} \ 16 | ${@bb.utils.contains('PACKAGECONFIG', 'with-demos', 'openssl', '', d)} \ 17 | ${@bb.utils.contains('PACKAGECONFIG', 'with-tests', 'ruby-native', '', d)} \ 18 | " 19 | 20 | S = "${WORKDIR}/git" 21 | 22 | inherit cmake ptest pkgconfig 23 | 24 | PACKAGECONFIG ??= "\ 25 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests','', d)} \ 26 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-demos','', d)} \ 27 | " 28 | 29 | EXTRA_OECMAKE += "\ 30 | -DAWS_IOT_ENDPOINT=${AWS_IOT_ENDPOINT} \ 31 | -DBROKER_ENDPOINT=${BROKER_ENDPOINT} \ 32 | -DCLIENT_CERT_PATH=${CLIENT_CERT_PATH} \ 33 | -DCLIENT_PRIVATE_KEY_PATH=${CLIENT_PRIVATE_KEY_PATH} \ 34 | -DINSTALL_TO_SYSTEM=1 \ 35 | -DROOT_CA_CERT_PATH=${ROOT_CA_CERT_PATH} \ 36 | -DTHING_NAME=${THING_NAME} \ 37 | " 38 | 39 | do_install () { 40 | install -d ${D}${libdir} 41 | cp -r ${B}/lib/* ${D}${libdir} 42 | ${@bb.utils.contains('PACKAGECONFIG', 'with-demos', 'install -d ${D}${bindir}', '', d)} 43 | ${@bb.utils.contains('PACKAGECONFIG', 'with-demos', 'cp -r ${B}/bin/* ${D}${bindir}', '', d)} 44 | } 45 | 46 | do_install_ptest:append () { 47 | install -d ${D}${PTEST_PATH}/tests 48 | mv ${D}${bindir}/tests ${D}${PTEST_PATH}/ 49 | mv ${D}${bindir}/certificates ${D}${PTEST_PATH}/ 50 | } 51 | 52 | PACKAGECONFIG[with-demos] = "-DBUILD_DEMOS=ON ,-DBUILD_DEMOS=OFF ," 53 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON ,-DBUILD_TESTS=OFF ," 54 | 55 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 56 | INSANE_SKIP:${PN} += "buildpaths" 57 | 58 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 59 | INSANE_SKIP:${PN}-src += "buildpaths" 60 | 61 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 62 | INSANE_SKIP:${PN}-dev += "dev-elf file-rdeps" 63 | 64 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 65 | INSANE_SKIP:${PN}-ptest += "buildpaths rpaths" 66 | 67 | # those variables should be overwritten in your local.conf 68 | # e.g. AWS_IOT_ENDPOINT:pn-aws-iot-device-sdk-embedded-c = "" 69 | AWS_IOT_ENDPOINT ?= "your-iot-endpoint" 70 | BROKER_ENDPOINT ?= "localhost" 71 | CLIENT_CERT_PATH ?= "${sysconfdir}" 72 | CLIENT_PRIVATE_KEY_PATH ?= "${sysconfdir}" 73 | ROOT_CA_CERT_PATH ?= "${sysconfdir}" 74 | THING_NAME ?= "your-registered-thing-name" 75 | -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-embedded-c/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -rf tests.log 3 | pkcs11_demo_objects | tee -a tests.log 4 | grep "Finished PKCS #11 Objects Demo" tests.log 5 | RETVAL=$? 6 | if [ $RETVAL -eq 0 ] ; then 7 | echo "PASS: aws-iot-device-sdk-embedded-c: pkcs11_demo_objects" 8 | else 9 | echo "FAIL: aws-iot-device-sdk-embedded-c: pkcs11_demo_objects" 10 | fi 11 | 12 | rm -rf tests.log 13 | timeout 30s mqtt_demo_plaintext | tee -a tests.log 14 | grep "Demo completed successfully" tests.log 15 | RETVAL=$? 16 | if [ $RETVAL -eq 0 ] ; then 17 | echo "PASS: aws-iot-device-sdk-embedded-c: mqtt_demo_plaintext" 18 | else 19 | echo "FAIL: aws-iot-device-sdk-embedded-c: mqtt_demo_plaintext" 20 | fi 21 | -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-python-v2/aws-iot-device-sdk-python-v2/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo nameserver 8.8.4.4 >> /etc/resolv.conf 4 | 5 | cd tests/ 6 | 7 | # known good tests 8 | TESTS="\ 9 | test/test_ggv2.py \ 10 | test/test_mqtt.py \ 11 | test/test_mqtt5.py \ 12 | test/test_rpc.py \ 13 | test/test_samples.py \ 14 | test/test_shadow_state.py \ 15 | " 16 | 17 | for TEST in $TESTS 18 | do 19 | python3 -m unittest $TEST 20 | RETVAL=$? 21 | if [ $RETVAL -eq 0 ] ; then 22 | echo "PASS: aws-crt-python unittest: $TEST" 23 | else 24 | echo "FAIL: aws-crt-python unittest: $TEST" 25 | fi 26 | done 27 | 28 | ### removed tests#### 29 | # 30 | -------------------------------------------------------------------------------- /recipes-sdk/aws-iot-device-sdk-python-v2/aws-iot-device-sdk-python-v2_1.22.2.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS IoT Device SDK v2 for Python" 2 | DESCRIPTION = "AWS IoT devices can use the AWS IoT Device SDK for Python to communicate with AWS IoT and AWS IoT Greengrass core devices (using the Python programming language)." 3 | HOMEPAGE = "https://github.com/aws/aws-iot-device-sdk-python-v2" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://documents/LICENSE;md5=f91e61641e7a96835dea6926a65f4702" 6 | 7 | SRC_URI = "\ 8 | git://github.com/aws/aws-iot-device-sdk-python-v2.git;protocol=https;branch=${BRANCH} \ 9 | file://run-ptest\ 10 | " 11 | SRCREV = "9518299b90b5979bae2140ed69123c809fdd1609" 12 | 13 | S = "${WORKDIR}/git" 14 | 15 | inherit setuptools3 ptest 16 | 17 | BRANCH ?= "main" 18 | 19 | RDEPENDS:${PN} += "aws-crt-python python3-json" 20 | 21 | do_configure:prepend(){ 22 | sed -i "s/__version__ = '1.0.0-dev'/__version__ = '${PV}'/" ${S}/awsiot/__init__.py 23 | } 24 | 25 | RDEPENDS:${PN}-ptest += "\ 26 | ${PYTHON_PN} \ 27 | bash \ 28 | python3-boto3 \ 29 | " 30 | 31 | do_install_ptest() { 32 | install -d ${D}${PTEST_PATH}/tests 33 | cp -rf ${S}/* ${D}${PTEST_PATH}/tests/ 34 | } 35 | -------------------------------------------------------------------------------- /recipes-sdk/aws-lc/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd tests 4 | 5 | rm -rf tests.log 6 | 7 | ./ssl_test >> tests.log 8 | 9 | 10 | sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /ERROR/ s/^/FAIL: /' tests.log 11 | -------------------------------------------------------------------------------- /recipes-sdk/aws-sdk-cpp/aws-sdk-cpp_1.11.581.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "AWS C++ SDK" 2 | DESCRIPTION = "AWS C++ SDK and ptest" 3 | HOMEPAGE = "https://github.com/aws/aws-sdk-cpp" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" 6 | 7 | DEPENDS += "\ 8 | aws-crt-cpp \ 9 | curl \ 10 | " 11 | 12 | AWS_SDK_PACKAGES = "" 13 | 14 | PACKAGES_DYNAMIC = "^${PN}-.*" 15 | 16 | SRC_URI = "\ 17 | git://github.com/aws/aws-sdk-cpp.git;protocol=https;branch=main \ 18 | file://run-ptest \ 19 | file://ptest_result.py \ 20 | " 21 | 22 | SRCREV = "b2b92558b3f121286a24d9b3327dbf35651ffc72" 23 | 24 | S = "${WORKDIR}/git" 25 | 26 | inherit cmake ptest pkgconfig 27 | 28 | PACKAGECONFIG ?= "\ 29 | ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ 30 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 31 | " 32 | 33 | PACKAGECONFIG:append:x86-64 = " ${@bb.utils.contains('PTEST_ENABLED', '1', 'sanitize', '', d)}" 34 | 35 | PACKAGECONFIG[pulseaudio] = "-DPULSEAUDIO=TRUE, -DPULSEAUDIO=FALSE, pulseaudio" 36 | 37 | # CMAKE_CROSSCOMPILING=OFF will enable build of unit tests 38 | PACKAGECONFIG[with-tests] = "-DENABLE_TESTING=ON -DAUTORUN_UNIT_TESTS=OFF -DCMAKE_CROSSCOMPILING=OFF,-DENABLE_TESTING=OFF -DAUTORUN_UNIT_TESTS=OFF, googletest" 39 | 40 | python populate_packages:prepend () { 41 | packages = [] 42 | def hook(f, pkg, file_regex, output_pattern, modulename): 43 | packages.append(pkg) 44 | 45 | # Put the libraries into separate packages 46 | do_split_packages(d, d.expand('${libdir}'), r'^lib(.*)\.so$', '%s', 'library for %s', extra_depends='', prepend=True, hook=hook) 47 | 48 | d.setVar("AWS_SDK_PACKAGES", " ".join(packages)) 49 | 50 | } 51 | 52 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 53 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 54 | 55 | # Notify that libraries are not versioned 56 | FILES_SOLIBSDEV = "" 57 | 58 | # -Werror will cause deprecation warnings to fail the build e.g. OpenSSL cause one, so disable these warnings 59 | OECMAKE_CXX_FLAGS += "-Wno-deprecated-declarations" 60 | 61 | # note: variable tracking size limit exceeded with '-fvar-tracking-assignments', retrying without 62 | OECMAKE_CXX_FLAGS += "-fno-var-tracking" 63 | 64 | # -Wno-maybe-uninitialized is related to this: https://github.com/aws/aws-sdk-cpp/issues/2234 65 | OECMAKE_CXX_FLAGS += "${@bb.utils.contains('PTEST_ENABLED', '1', '-Wno-maybe-uninitialized', '', d)}" 66 | 67 | OECMAKE_CXX_FLAGS += "-Wno-psabi" 68 | 69 | EXTRA_OECMAKE += "\ 70 | -DBUILD_DEPS=OFF \ 71 | -DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \ 72 | " 73 | 74 | EXTRA_OECMAKE:append = " -DCMAKE_BUILD_TYPE=RelWithDebInfo" 75 | 76 | RDEPENDS:${PN}-ptest += "\ 77 | bash \ 78 | python3 \ 79 | " 80 | # "aws-sdk-cpp" is a meta package which pulls in all aws-sdk-cpp libraries 81 | ALLOW_EMPTY:${PN} = "1" 82 | RRECOMMENDS:${PN} += "${AWS_SDK_PACKAGES}" 83 | RRECOMMENDS:${PN}:class-native = "" 84 | 85 | do_install_ptest () { 86 | install -d ${D}${PTEST_PATH}/tests 87 | find ${B}/generated/tests -executable -type f -exec install -m 0755 "{}" ${D}${PTEST_PATH}/tests/ \; 88 | install -m 0755 ${UNPACKDIR}/ptest_result.py ${D}${PTEST_PATH}/ 89 | } 90 | 91 | # this is related to this issue 92 | # https://github.com/aws/aws-sdk-cpp/issues/2242 93 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 94 | INSANE_SKIP:${PN}-src:append:class-target = " buildpaths" 95 | 96 | # -fsanitize=address does cause this 97 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 98 | INSANE_SKIP += "${@bb.utils.contains('PACKAGECONFIG', 'sanitize', 'buildpaths', '', d)}" 99 | PACKAGECONFIG[sanitize] = ",,gcc-sanitizers" 100 | OECMAKE_CXX_FLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'sanitize', '-fsanitize=address,undefined -fno-omit-frame-pointer', '', d)}" 101 | 102 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 103 | INSANE_SKIP:${PN}-dev += "buildpaths" 104 | -------------------------------------------------------------------------------- /recipes-sdk/aws-sdk-cpp/files/ptest_result.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022 Amazon.com, Inc. or its affiliates. 2 | # SPDX-License-Identifier: MIT 3 | 4 | import json 5 | import sys 6 | import re 7 | 8 | def check_sanitizer_failure(test): 9 | # Look for sanitizer errors in system-out or system-err if they exist 10 | system_out = test.get('system-out', '') 11 | system_err = test.get('system-err', '') 12 | 13 | sanitizer_patterns = [ 14 | r'==\d+==ERROR: .*Sanitizer', 15 | r'runtime error:', 16 | r'SUMMARY: .*Sanitizer', 17 | r'ERROR: .*Sanitizer detected' 18 | ] 19 | 20 | for pattern in sanitizer_patterns: 21 | if (re.search(pattern, system_out) or 22 | re.search(pattern, system_err)): 23 | return True 24 | return False 25 | 26 | if len(sys.argv) != 2: 27 | print(f"usage: {sys.argv[0]} [result file]") 28 | sys.exit(1) 29 | 30 | with open(sys.argv[1], 'rb') as json_file: 31 | data = json.load(json_file) 32 | for testsuite in data['testsuites']: 33 | for test in testsuite['testsuite']: 34 | # Check both regular test failures and sanitizer failures 35 | has_failures = 'failures' in test 36 | has_sanitizer_failure = check_sanitizer_failure(test) 37 | 38 | result = 'FAIL' if (has_failures or has_sanitizer_failure) else 'PASS' 39 | print(f"{result}: {test['classname']}_{test['name']}") -------------------------------------------------------------------------------- /recipes-sdk/aws-sdk-cpp/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) 2022 Amazon.com, Inc. or its affiliates. 3 | # SPDX-License-Identifier: MIT 4 | 5 | find tests -executable -type f -exec bash -c '{} --gtest_output=json:result.json > /dev/null ; python3 ptest_result.py result.json ' \; -------------------------------------------------------------------------------- /recipes-sdk/linux-webrtc-reference-for-amazon-kinesis-video-streams/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "nameserver 8.8.8.8" > /etc/resolv.conf 4 | sleep 10 5 | 6 | # Start the MASTER process with timeout 60s, kill after 10s if not responding to SIGTERM 7 | # cd /usr/bin/ 8 | # ./WebRTCLinuxApplicationMaster 9 | 10 | # RETVAL=$? 11 | # todo 12 | RETVAL=255 13 | if [ $RETVAL -eq 255 ] ; then 14 | echo "PASS: linux-webrtc-reference-for-amazon-kinesis-video-stream simple test" 15 | else 16 | echo "FAIL: linux-webrtc-reference-for-amazon-kinesis-video-streams simple test" 17 | fi 18 | 19 | exit 20 | 21 | ### todo 22 | # 23 | # rm -rf /tmp/master.log 24 | # rm -rf /tmp/viewer.log 25 | # 26 | # # Start the MASTER process with timeout 60s, kill after 10s if not responding to SIGTERM 27 | # cd /usr/bin/ 28 | # timeout --preserve-status -k 10 60s ./WebRTCLinuxApplicationMaster 2>&1 | tee /tmp/master.log & 29 | # 30 | # # Setup and start Viewer 31 | # sleep 5 32 | # read ROLE_ALIAS < /etc/ROLE_ALIAS 33 | # read THING_NAME < /etc/THING_NAME 34 | # read CHANNEL_NAME < /etc/CHANNEL_NAME 35 | # read CREDENTIALS_ENDPOINT < /etc/CREDENTIALS_ENDPOINT 36 | # read AWS_DEFAULT_REGION < /etc/AWS_REGION 37 | # 38 | # export AWS_IOT_CORE_THING_NAME="$THING_NAME" 39 | # export AWS_KVS_CHANNEL_NAME="$CHANNEL_NAME" 40 | # export AWS_IOT_CORE_CREDENTIAL_ENDPOINT="$CREDENTIALS_ENDPOINT" 41 | # export AWS_IOT_CORE_ROLE_ALIAS="$ROLE_ALIAS" 42 | # export AWS_IOT_CORE_PRIVATE_KEY=/etc/private.key 43 | # export AWS_IOT_CORE_CERT=/etc/certificate.pem 44 | # export AWS_KVS_CACERT_PATH=/etc/cert.pem 45 | # export AWS_DEFAULT_REGION="$AWS_DEFAULT_REGION" 46 | # 47 | # # INFO 48 | # export AWS_KVS_LOG_LEVEL=3 49 | # 50 | # # Start the VIEWER process with timeout 60s, kill after 10s if not responding to SIGTERM 51 | # timeout --preserve-status -k 10 60s /usr/bin/kvsWebrtcClientViewer $AWS_KVS_CHANNEL_NAME 2>&1 | tee /tmp/viewer.log 52 | # 53 | # echo -e "\n\n\nmaster.log:" 54 | # cat /tmp/master.log 55 | # 56 | # echo -e "\n\n\nviewer.log:" 57 | # cat /tmp/viewer.log 58 | # 59 | # if [ -e /master.log ]; then 60 | # if grep -A3 -E ' fail| error' /tmp/master.log; then 61 | # echo "Found failed or error in master.log" 62 | # echo "FAIL: amazon-kvs-webrtc-sdk-c: data test: $RETVAL" 63 | # fi 64 | # if grep -E ' Connection established' /tmp/master.log; then 65 | # echo "Connection established found - good" 66 | # echo "PASS: amazon-kvs-webrtc-sdk-c: data test" 67 | # fi 68 | # fi 69 | # -------------------------------------------------------------------------------- /recipes-sdk/linux-webrtc-reference-for-amazon-kinesis-video-streams/linux-webrtc-reference-for-amazon-kinesis-video-streams_git.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "linux-webrtc-reference-for-amazon-kinesis-video-streams" 2 | DESCRIPTION = "Pure C WebRTC Client for Amazon Kinesis Video Streams - with minimal dependencies - This repository is currently in development and not recommended for production use." 3 | HOMEPAGE = "https://github.com/awslabs/linux-webrtc-reference-for-amazon-kinesis-video-streams" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" 6 | 7 | DEPENDS += "\ 8 | libwebsockets \ 9 | gstreamer1.0 \ 10 | gstreamer1.0-plugins-base \ 11 | gstreamer1.0-plugins-good \ 12 | gstreamer1.0-plugins-bad \ 13 | " 14 | 15 | # default is stripped, we wanna do this by yocto 16 | EXTRA_OECMAKE:append = " -DCMAKE_BUILD_TYPE=RelWithDebInfo" 17 | 18 | # set log message debug level 19 | EXTRA_OECMAKE:append = " -DLIBRARY_LOG_LEVEL=LOG_VERBOSE" 20 | 21 | ### 22 | # Use this for development to specify a local folder as source dir (cloned repo) 23 | # inherit externalsrc 24 | # EXTERNALSRC = "${THISDIR}/../../.." 25 | 26 | # this will force recipe to always rebuild 27 | # SSTATE_SKIP_CREATION = '1' 28 | ### 29 | # SRC_URI = "\ 30 | # file://run-ptest \ 31 | # " 32 | 33 | # nooelint: oelint.vars.specific 34 | CFLAGS:append:arm = " -Wno-error=format=" 35 | 36 | SRC_URI = "\ 37 | gitsm://github.com/awslabs/linux-webrtc-reference-for-amazon-kinesis-video-streams.git;protocol=https;branch=main \ 38 | file://run-ptest \ 39 | " 40 | 41 | SRCREV = "74a81e023d07bc2b6b3064121c134818e946d215" 42 | 43 | S = "${WORKDIR}/git" 44 | 45 | PACKAGECONFIG:append:x86-64 = " ${@bb.utils.contains('PTEST_ENABLED', '1', 'sanitize', '', d)}" 46 | 47 | PACKAGECONFIG[sanitize] = ",, gcc-sanitizers" 48 | 49 | RDEPENDS:${PN} += "ca-certificates" 50 | 51 | #RDEPENDS:${PN}-ptest += "\ 52 | # amazon-kvs-webrtc-sdk \ 53 | # coreutils \ 54 | # util-linux \ 55 | #" 56 | 57 | do_configure:append() { 58 | cp ${S}/examples/demo_config/demo_config_template.h ${S}/examples/demo_config/demo_config.h 59 | sed -i '/^#if defined( AWS_ACCESS_KEY_ID ) && defined( AWS_IOT_THING_ROLE_ALIAS )/i\ 60 | #define AWS_CREDENTIALS_ENDPOINT ""\ 61 | #define AWS_IOT_THING_NAME ""\ 62 | #define AWS_IOT_THING_ROLE_ALIAS ""\ 63 | #define AWS_IOT_THING_CERT_PATH "certificate.pem"\ 64 | #define AWS_IOT_THING_PRIVATE_KEY_PATH "private.key"\ 65 | ' ${S}/examples/demo_config/demo_config.h 66 | } 67 | 68 | inherit cmake pkgconfig ptest 69 | 70 | do_install() { 71 | install -d ${D}${bindir} 72 | install -m 0755 ${B}/WebRTCLinuxApplicationMaster ${D}${bindir} 73 | install -m 0755 ${B}/WebRTCLinuxApplicationGstMaster ${D}${bindir} 74 | 75 | install -d ${D}${bindir}/examples/app_media_source/samples/h264SampleFrames 76 | cp -r ${S}/examples/app_media_source/samples/h264SampleFrames/* ${D}${bindir}/examples/app_media_source/samples/h264SampleFrames/ 77 | 78 | install -d ${D}${bindir}/examples/app_media_source/samples/opusSampleFrames 79 | cp -r ${S}/examples/app_media_source/samples/opusSampleFrames/* ${D}${bindir}/examples/app_media_source/samples/opusSampleFrames/ 80 | 81 | install -d ${D}${sysconfdir} 82 | install -m 0664 ${S}/cert/cert.pem ${D}${sysconfdir}/ 83 | # install -m 0664 ${S}/certificate.pem ${D}${sysconfdir}/ 84 | # install -m 0664 ${S}/private.key ${D}${sysconfdir}/ 85 | } 86 | 87 | # do_install_ptest:append() { 88 | # install -d ${D}${sysconfdir} 89 | # install ${S}/tests/iot-credentials/THING_NAME ${D}${sysconfdir}/ 90 | # install ${S}/tests/iot-credentials/CHANNEL_NAME ${D}${sysconfdir}/ 91 | # install ${S}/tests/iot-credentials/ROLE_ALIAS ${D}${sysconfdir}/ 92 | # install ${S}/tests/iot-credentials/CREDENTIALS_ENDPOINT ${D}${sysconfdir}/ 93 | # install ${S}/tests/iot-credentials/AWS_REGION ${D}${sysconfdir}/ 94 | # } 95 | 96 | OECMAKE_CXX_FLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'sanitize', '-fsanitize=address,undefined -fno-omit-frame-pointer', '', d)}" 97 | -------------------------------------------------------------------------------- /recipes-sdk/s2n/s2n_1.5.20.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "s2n" 2 | DESCRIPTION = "s2n is a C99 implementation of the TLS/SSL protocols that is designed to be simple, small, fast, and with security as a priority." 3 | HOMEPAGE = "https://github.com/aws/s2n-tls" 4 | LICENSE = "Apache-2.0" 5 | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 7 | 8 | DEPENDS = "\ 9 | ${@bb.utils.contains('PACKAGECONFIG', 'static', 'aws-lc', 'openssl', d)} \ 10 | " 11 | 12 | PROVIDES += "aws/s2n" 13 | 14 | BRANCH ?= "main" 15 | SRC_URI = "\ 16 | git://github.com/aws/s2n-tls.git;protocol=https;branch=${BRANCH} \ 17 | file://run-ptest \ 18 | " 19 | 20 | SRCREV = "e12a1fe905dee789881d83af486dad5907cc7f67" 21 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P.*)" 22 | 23 | S = "${WORKDIR}/git" 24 | 25 | inherit cmake ptest pkgconfig 26 | 27 | CFLAGS:append = " -Wl,-Bsymbolic" 28 | 29 | PACKAGECONFIG ?= "\ 30 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \ 31 | " 32 | 33 | PACKAGECONFIG:append:x86-64 = " ${@bb.utils.contains('PTEST_ENABLED', '1', 'sanitize', '', d)}" 34 | 35 | # enable PACKAGECONFIG = "static" to build static instead of shared libs 36 | PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON" 37 | 38 | PACKAGECONFIG[with-tests] = "-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF," 39 | 40 | PACKAGECONFIG[sanitize] = "-DS2N_ADDRESS_SANITIZER=ON, -DS2N_ADDRESS_SANITIZER=OFF, gcc-sanitizers" 41 | 42 | EXTRA_OECMAKE:append = " -DCMAKE_BUILD_TYPE=RelWithDebInfo" 43 | 44 | # Fix "doesn't have GNU_HASH (didn't pass LDFLAGS?)" issue 45 | TARGET_CC_ARCH += "${LDFLAGS}" 46 | 47 | # Assume that warnings from upstream have already been evaluated 48 | EXTRA_OECMAKE += "-DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF" 49 | 50 | FILES:${PN}-dev += "${libdir}/*/cmake" 51 | 52 | RDEPENDS:${PN}-ptest += "\ 53 | bash \ 54 | openssl \ 55 | " 56 | 57 | do_install_ptest () { 58 | install -d ${D}${PTEST_PATH}/tests 59 | cp -r ${B}/bin/* ${D}${PTEST_PATH}/tests/ 60 | cp -r ${S}/tests/pems ${D}${PTEST_PATH}/ 61 | } 62 | 63 | BBCLASSEXTEND = "native nativesdk" 64 | 65 | OECMAKE_CXX_FLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'sanitize', '-fsanitize=address,undefined', '', d)}" 66 | -------------------------------------------------------------------------------- /recipes-support/amazon-ssm-agent/amazon-ssm-agent_3.3.2471.0.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Amazon SSM Agent" 2 | DESCRIPTION = "An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs)." 3 | HOMEPAGE = "https://github.com/aws/amazon-ssm-agent" 4 | CVE_PRODUCT = "amazon_ssm_agent" 5 | 6 | LICENSE = "Apache-2.0" 7 | LIC_FILES_CHKSUM = "\ 8 | file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ 9 | " 10 | 11 | SRC_URI = "\ 12 | git://github.com/aws/amazon-ssm-agent.git;protocol=https;branch=mainline \ 13 | file://run-ptest \ 14 | " 15 | 16 | SRCREV = "0a3ee4f12779a8ea44cce1276aed63a922d9da3f" 17 | 18 | S = "${WORKDIR}/git" 19 | 20 | GO_IMPORT = "" 21 | 22 | inherit go systemd ptest 23 | 24 | SYSTEMD_AUTO_ENABLE = "enable" 25 | SYSTEMD_SERVICE:${PN} = "amazon-ssm-agent.service" 26 | 27 | # src folder will break devtool upgrade 28 | # nooelint: oelint.task.nopythonprefix 29 | python go_do_unpack() { 30 | src_uri = (d.getVar('SRC_URI') or "").split() 31 | if len(src_uri) == 0: 32 | return 33 | 34 | fetcher = bb.fetch2.Fetch(src_uri, d) 35 | for url in fetcher.urls: 36 | if fetcher.ud[url].type == 'git': 37 | if fetcher.ud[url].parm.get('destsuffix') is None: 38 | s_dirname = os.path.basename(d.getVar('S')) 39 | # fetcher.ud[url].parm['destsuffix'] = os.path.join(s_dirname, 'src', d.getVar('GO_IMPORT')) + '/' 40 | fetcher.ud[url].parm['destsuffix'] = os.path.join(s_dirname, '', d.getVar('GO_IMPORT')) + '/' 41 | fetcher.unpack(d.getVar('WORKDIR')) 42 | } 43 | 44 | # src folder will break devtool upgrade 45 | go_do_configure() { 46 | # ln -snf ${S}/src ${B}/ 47 | ln -snf ${S} ${B}/ 48 | 49 | # Manually set the correct version. 50 | cat < ${S}/agent/version/version.go 51 | package version 52 | 53 | const Version = "${PV}" 54 | END 55 | 56 | } 57 | 58 | do_compile () { 59 | cd ${S} 60 | 61 | ${GO} build -trimpath -o ${B}/amazon-ssm-agent -v \ 62 | core/agent.go core/agent_unix.go core/agent_parser.go 63 | 64 | ${GO} build -trimpath -o ${B}/ssm-agent-worker -v \ 65 | agent/agent.go agent/agent_unix.go agent/agent_parser.go 66 | 67 | ${GO} build -trimpath -o ${B}/updater -v \ 68 | agent/update/updater/updater.go agent/update/updater/updater_unix.go 69 | 70 | ${GO} build -trimpath -o ${B}/ssm-cli -v \ 71 | agent/cli-main/cli-main.go 72 | 73 | ${GO} build -trimpath -o ${B}/ssm-document-worker -v \ 74 | agent/framework/processor/executer/outofproc/worker/main.go 75 | 76 | ${GO} build -trimpath -o ${B}/ssm-session-logger -v \ 77 | agent/session/logging/main.go 78 | 79 | ${GO} build -trimpath -o ${B}/ssm-session-worker -v \ 80 | agent/framework/processor/executer/outofproc/sessionworker/main.go 81 | 82 | ${GO} build -trimpath -o ${B}/ssm-setup-cli -v \ 83 | agent/setupcli/setupcli.go 84 | 85 | } 86 | 87 | do_install () { 88 | install -d ${D}${bindir}/ 89 | install -m 755 amazon-ssm-agent ${D}${bindir}/ 90 | install -m 755 ssm-agent-worker ${D}${bindir}/ 91 | install -m 755 updater ${D}${bindir}/ 92 | install -m 755 ssm-cli ${D}${bindir}/ 93 | install -m 755 ssm-document-worker ${D}${bindir}/ 94 | install -m 755 ssm-session-logger ${D}${bindir}/ 95 | install -m 755 ssm-session-worker ${D}${bindir}/ 96 | install -m 755 ssm-setup-cli ${D}${bindir}/ 97 | 98 | # TODO(glimsdal): This is hard coded in the SSM source. We should probably 99 | # patch the file or override the variable at link time. 100 | install -d ${D}${sysconfdir}/amazon/ssm 101 | install -m 644 ${S}/seelog_unix.xml ${D}${sysconfdir}/amazon/ssm/seelog.xml 102 | install -d ${D}${systemd_unitdir}/system/ 103 | install -m 644 ${S}/packaging/linux/amazon-ssm-agent.service ${D}${systemd_unitdir}/system/amazon-ssm-agent.service 104 | } 105 | 106 | # nooelint: oelint.vars.insaneskip:INSANE_SKIP 107 | INSANE_SKIP:${PN} += "textrel" 108 | -------------------------------------------------------------------------------- /recipes-support/amazon-ssm-agent/files/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | amazon-ssm-agent --help 4 | 5 | RETVAL=$? 6 | if [ $RETVAL -eq 0 ] ; then 7 | echo "PASS: amazon-ssm-agent startup test" 8 | else 9 | echo "FAIL: amazon-ssm-agent startup test" 10 | fi 11 | -------------------------------------------------------------------------------- /recipes-support/aws-cli-v2/aws-cli-v2/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pytest tests/functional/test_args.py -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' 4 | -------------------------------------------------------------------------------- /recipes-support/aws-cli-v2/aws-cli-v2_2.27.28.bb: -------------------------------------------------------------------------------- 1 | # FIXME: the LIC_FILES_CHKSUM values have been updated by 'devtool upgrade'. 2 | # The following is the difference between the old and the new license text. 3 | # Please update the LICENSE value if needed, and summarize the changes in 4 | # the commit message via 'License-Update:' tag. 5 | # (example: 'License-Update: copyright years updated.') 6 | # 7 | # The changes: 8 | # 9 | # --- LICENSE.txt 10 | # +++ LICENSE.txt 11 | # @@ -1,4 +1,4 @@ 12 | # -Copyright 2012-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 13 | # +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 14 | # 15 | # Licensed under the Apache License, Version 2.0 (the "License"). You 16 | # may not use this file except in compliance with the License. A copy of 17 | # 18 | # 19 | 20 | SUMMARY = "Universal Command Line Interface for Amazon Web Services v2" 21 | DESCRIPTION = "Universal Command Line Interface for Amazon Web Services and ptest scripts v2" 22 | HOMEPAGE = "https://github.com/aws/aws-cli/tree/v2" 23 | LICENSE = "Apache-2.0" 24 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8ad764cee43b1595056063799f3f79a5" 25 | 26 | DEPENDS += "\ 27 | aws-crt-python-native \ 28 | groff \ 29 | openssl-native \ 30 | python3-botocore \ 31 | python3-colorama-native \ 32 | python3-cryptography-native \ 33 | python3-dateutil-native \ 34 | python3-distro-native \ 35 | python3-docutils-native \ 36 | python3-flit-core \ 37 | python3-jmespath-native \ 38 | python3-native \ 39 | python3-prompt-toolkit-native \ 40 | python3-pyyaml-native \ 41 | python3-rsa \ 42 | python3-ruamel-yaml-clib-native \ 43 | python3-ruamel-yaml-native \ 44 | python3-s3transfer \ 45 | python3-urllib3-1.x-native \ 46 | python3-zipp-native \ 47 | " 48 | 49 | SRC_URI = "\ 50 | git://github.com/aws/aws-cli.git;protocol=https;branch=v2 \ 51 | file://run-ptest \ 52 | " 53 | 54 | SRCREV = "3d52a7e1fba6964ff28c4862c0b566e0d2d65960" 55 | 56 | # version 2.x 57 | UPSTREAM_CHECK_GITTAGREGEX = "(?P2\.\d+(\.\d+)+)" 58 | 59 | inherit python_pep517 python3native python3-dir setuptools3-base ptest 60 | 61 | export CRYPTOGRAPHY_OPENSSL_NO_LEGACY = "true" 62 | 63 | S = "${WORKDIR}/git" 64 | 65 | # this package also contains aws help 66 | PACKAGES += "${PN}-examples" 67 | 68 | FILES:${PN}-examples += "${libdir}/${PYTHON_DIR}/site-packages/awscli/examples" 69 | 70 | RDEPENDS:${PN} += "\ 71 | aws-crt-python \ 72 | openssl \ 73 | python3-botocore \ 74 | python3-colorama \ 75 | python3-compression \ 76 | python3-core \ 77 | python3-dateutil \ 78 | python3-distro \ 79 | python3-docutils \ 80 | python3-elementpath \ 81 | python3-io \ 82 | python3-ipaddress \ 83 | python3-jmespath \ 84 | python3-json \ 85 | python3-logging \ 86 | python3-misc \ 87 | python3-prompt-toolkit \ 88 | python3-rsa \ 89 | python3-ruamel-yaml \ 90 | python3-sqlite3 \ 91 | python3-unixadmin \ 92 | python3-urllib3-1.x \ 93 | python3-zipp \ 94 | " 95 | 96 | do_patch() { 97 | sed -i -E 's/(([a-zA-Z0-9_.-]+)(>=?[0-9.]+)?(,)?(<[0-9.]+\*|<=?[0-9.]+)?|([a-zA-Z0-9_.-]+)==[0-9.]+)/\2\3\6/' ${S}/pyproject.toml ${S}/requirements/bootstrap.txt 98 | } 99 | 100 | do_install_ptest() { 101 | install -d ${D}${PTEST_PATH}/tests 102 | # just install some tests with low memory (less than 4GB) consumption 103 | cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ 104 | } 105 | 106 | RDEPENDS:${PN}-ptest += "\ 107 | bash \ 108 | python3-mock \ 109 | python3-pytest \ 110 | python3-venv \ 111 | " 112 | 113 | RDEPENDS:${PN}-examples += "\ 114 | groff \ 115 | less \ 116 | " 117 | 118 | RRECOMMENDS:${PN} = "${PN}-examples" 119 | 120 | RCONFLICTS:${PN} = "awscli" 121 | -------------------------------------------------------------------------------- /recipes-support/aws-cli/aws-cli/run-ptest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' 4 | -------------------------------------------------------------------------------- /recipes-support/aws-cli/aws-cli_1.40.28.bb: -------------------------------------------------------------------------------- 1 | SUMMARY = "Universal Command Line Interface for Amazon Web Services" 2 | DESCRIPTION = "Universal Command Line Interface for Amazon Web Services and ptest scripts" 3 | HOMEPAGE = "https://github.com/aws/aws-cli" 4 | LICENSE = "Apache-2.0" 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7970352423db76abb33cbe303884afbf" 6 | 7 | SRC_URI = "\ 8 | git://github.com/aws/aws-cli.git;protocol=https;branch=master \ 9 | file://run-ptest \ 10 | " 11 | 12 | SRCREV = "a9f2409278b052c6c0a32f886d39f425c35d6184" 13 | 14 | # version 2.x has got library link issues - so stick to version 1.x for now 15 | UPSTREAM_CHECK_GITTAGREGEX = "(?P1\.\d+(\.\d+)+)" 16 | 17 | S = "${WORKDIR}/git" 18 | 19 | inherit setuptools3 ptest 20 | 21 | RDEPENDS:${PN} += "\ 22 | groff \ 23 | python3-botocore \ 24 | python3-colorama \ 25 | python3-dateutil \ 26 | python3-distro \ 27 | python3-docutils \ 28 | python3-jmespath \ 29 | python3-misc \ 30 | python3-prompt-toolkit \ 31 | python3-pyyaml \ 32 | python3-rsa \ 33 | python3-ruamel-yaml \ 34 | python3-s3transfer \ 35 | python3-sqlite3 \ 36 | python3-unixadmin \ 37 | python3-urllib3 \ 38 | " 39 | 40 | RDEPENDS:${PN}-ptest += "\ 41 | ${PYTHON_PN}-pytest \ 42 | bash \ 43 | " 44 | 45 | do_install_ptest() { 46 | install -d ${D}${PTEST_PATH}/tests 47 | # just install some tests with low memory (less than 4GB) consumption 48 | cp -rf ${S}/tests/functional/test_args.py ${D}${PTEST_PATH}/tests/ 49 | } 50 | 51 | PACKAGES =+ "${PN}-examples" 52 | 53 | FILES:${PN}-examples = "${libdir}/${PYTHON_DIR}/site-packages/awscli/examples" 54 | -------------------------------------------------------------------------------- /scripts/ec2-ami/README.md: -------------------------------------------------------------------------------- 1 | # The EC2 AMI generation feature 2 | The AWS EC2 AMI feature was taken from [meta-aws-ewaol](https://github.com/aws4embeddedlinux/meta-aws-ewaol). And turned into a more generic solution that will allow you by simple adding those lines to your local.conf to build an AWS EC2 AMI image that can be uploaded with a simple included script to your AWS account. 3 | 4 | ``` 5 | INHERIT += "aws-ec2-image" 6 | MACHINE = "aws-ec2-arm64" 7 | # or MACHINE = "aws-ec2-x86-64" 8 | ``` 9 | 10 | ## Build instructions 11 | 12 | ### Pre-requisites 13 | 14 | 1. An AWS account and the necessary IAM rights to create EC2 instances, EBS snapshots, EBS volumes, S3 buckets, and IAM roles and policies. 15 | 1. A VPC with appropriate subnets and routing required to access the build server. 16 | 1. The resources created by deploying the [VMImport CloudFormation Template](vmimport-cfn.yml) (roles, policies, S3 bucket for images). 17 | 1. Take note of the outputs of the stack deployment as they'll be needed in the following steps 18 | 19 | ### Build Dependencies 20 | To be able to execute the ```create-ec2-ami.sh``` script AWS CLI v2 is necessary. 21 | 1. Install AWS CLI v2 22 | 23 | ```bash 24 | curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "/tmp/awscliv2.zip" 25 | unzip /tmp/awscliv2.zip -d /tmp 26 | sudo /tmp/aws/install 27 | ``` 28 | 29 | ### Building 30 | 31 | 1. Build your image as usual. For example: 32 | 33 | ```bash 34 | bitbake core-image-minimal 35 | ``` 36 | 37 | ### Creating AMI from image file 38 | 39 | From meta-aws scripts/ec2-ami directory, run the bash script. Replace with the bucket name created by the CloudFormation Stack in the pre-requisites section and choose the appropriate size for the future root disk of AMI to have by entering a number (e.g. 16) in place of , use the created and : 40 | 41 | ```bash 42 | meta-aws/scripts/ec2-ami/create-ec2-ami.sh 43 | ``` 44 | 45 | e.g. 46 | ```bash 47 | meta-aws/scripts/ec2-ami/create-ec2-ami.sh amitest-bucket 16 core-image-minimal aws-ec2-arm64 48 | ``` 49 | ## Launch the EC2 Image as usual using your newly created AMI 50 | 51 | 1. In the Web Console, Navigate to EC2->Images->AMIs 52 | 1. Select the desired AMI and click 'Launch instance from Image' 53 | 1. Follow the wizard as usual 54 | 1. Access the image with the previously provided ssh key with user **user** or the user specified in [the cloud init configuration](../../dynamic-layers/virtualization-layer/recipes-extended/cloud-init/files/cloud.cfg). 55 | 56 | ## Limitations 57 | 58 | The image does not yet support online expansion of partitions/filesystems via cloud-init. 59 | Follow the below workaround to expand root partition and filesystem (this can be used as user data script): 60 | 61 | ```bash 62 | #!/bin/sh 63 | 64 | # disabling swap 65 | swapoff -a 66 | sed -i '/.*swap.*/d' /etc/fstab 67 | # trick to fix GPT 68 | printf "fix\n" | parted ---pretend-input-tty /dev/nvme0n1 print 69 | # remove partition 3 (swap) 70 | parted -s /dev/nvme0n1 rm 3 71 | # resize partition 2 to use 100% of available free space 72 | parted -s /dev/nvme0n1 resizepart 2 100% 73 | # resizing ext4 filesystem 74 | resize2fs /dev/nvme0n1p2 75 | ``` 76 | 77 | ## Future Enchancements 78 | 79 | * Enable support for expanding filesystem on boot with cloud-init which depends on growpart. This needs cloud-utils which is not in openembedded recipes yet. 80 | -------------------------------------------------------------------------------- /wic/efi-disk.wks.in: -------------------------------------------------------------------------------- 1 | # short-description: Create an EFI disk image 2 | # long-description: Creates a partitioned EFI disk image that the user 3 | # can directly dd to boot media. 4 | 5 | part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --label boot --active --align 1024 --use-uuid 6 | 7 | part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid 8 | 9 | part swap --size 44 --label swap --fstype=swap --use-uuid 10 | 11 | bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4" 12 | --------------------------------------------------------------------------------