diff --git a/.github/workflows/CI_github.yml b/.github/workflows/CI_github.yml index bcef378c..bd050ec4 100644 --- a/.github/workflows/CI_github.yml +++ b/.github/workflows/CI_github.yml @@ -4,23 +4,31 @@ on: push: branches: - master - - master-next - - walnascar + - feature/yocto-layer-compliance pull_request: - + branches: + - master + - feature/yocto-layer-compliance + paths-ignore: + - "**.md" jobs: build-and-test: runs-on: [self-hosted, linux, X64] - timeout-minutes: 600 + timeout-minutes: 960 container: image: dynamicdevices/yocto-ci-build:latest options: --privileged --platform linux/amd64 -v /dev/net/tun:/dev/net/tun -v /dev/kvm:/dev/kvm strategy: + max-parallel: 1 matrix: - dotnet_version: [8.0.303, 6.0.424] + dotnet_version: [10.0.100, 8.0.406, 6.0.428] mono_version: [6.12.0.206] - branch: [walnascar] - arch: [x86-64, arm64] + branch: [styhead] + arch: [x86-64, arm, arm64] + exclude: + # styhead GCC build broken for ARM32 - see README "Removal of support for ARM32" and discussions/234 + - branch: styhead + arch: arm env: name: build-and-test MONO_VERSION: ${{ matrix.mono_version }} @@ -50,7 +58,7 @@ jobs: cd ${BRANCH}/meta-openembedded git pull origin ${BRANCH} cd ../.. - fi + fi - name: Configuring run: | rm -f ${BRANCH}/build/conf/local.conf @@ -66,29 +74,41 @@ jobs: echo "BBLAYERS += '$GITHUB_WORKSPACE/${BRANCH}/meta-openembedded/meta-oe'" >> conf/bblayers.conf echo "BBLAYERS += '$GITHUB_WORKSPACE/${BRANCH}/meta-openembedded/meta-python'" >> conf/bblayers.conf - echo "MACHINE=\"qemu${ARCH}\"" >> conf/local.conf - echo "DL_DIR=\"$GITHUB_WORKSPACE/downloads\"" >> conf/local.conf - echo "SSTATE_DIR=\"$GITHUB_WORKSPACE/sstate\"" >> conf/local.conf - - echo "PREFERRED_VERSION_mono=\"${MONO_VERSION}\"" >> conf/local.conf - echo "PREFERRED_VERSION_mono-native=\"${MONO_VERSION}\"" >> conf/local.conf + echo "BB_DEFAULT_EVENTLOG = \"\"" >> conf/local.conf + echo "MACHINE = \"qemu${ARCH}\"" >> conf/local.conf + echo "DL_DIR = \"$GITHUB_WORKSPACE/downloads\"" >> conf/local.conf + echo "SSTATE_DIR = \"$GITHUB_WORKSPACE/sstate\"" >> conf/local.conf + echo "PREFERRED_VERSION_mono = \"${MONO_VERSION}\"" >> conf/local.conf + echo "PREFERRED_VERSION_mono-native = \"${MONO_VERSION}\"" >> conf/local.conf - echo "PREFERRED_VERSION_dotnet=\"${DOTNET_VERSION}\"" >> conf/local.conf - echo "PREFERRED_VERSION_dotnet-native=\"${DOTNET_VERSION}\"" >> conf/local.conf + echo "PREFERRED_VERSION_dotnet = \"${DOTNET_VERSION}\"" >> conf/local.conf + echo "PREFERRED_VERSION_dotnet-native = \"${DOTNET_VERSION}\"" >> conf/local.conf - echo "INHERIT += \" rm_work \"" >> conf/local.conf + echo "INHERIT += \" create-spdx cve-check rm_work \"" >> conf/local.conf sed -i 's/#IMAGE_CLASSES += "testimage testsdk"/IMAGE_CLASSES += "testimage "/' conf/local.conf + echo "SPDX_PRETTY = \"1\"" >> conf/local.conf echo "BB_NUMBER_THREADS ?= \"\${@oe.utils.cpu_count()}\"" >> conf/local.conf echo "PARALLEL_MAKE ?= \"-j \${@oe.utils.cpu_count()} -l \${@oe.utils.cpu_count()*2}\"" >> conf/local.conf - - name: Cleaning + # Flush stale sstate/sysroot to ensure fresh builds with corrected + # host/fxr layout and dotnet wrapper. + # TODO: remove this step once all matrix jobs have rebuilt successfully. + - name: Clean stale sstate run: | . ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build - bitbake -c cleanall test-image-mono dotnet dotnet-native - - name: Building + bitbake -c cleansstate dotnet dotnet-native python3-clr-loader python3-clr-loader-native dotnet-helloworld python3-pythonnet + - name: Building Mono Test Image run: | . ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build - bitbake -k test-image-mono + bitbake test-image-mono + - name: CVE Check Mono / dotNet + run: | + . ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build + export TERM=linux + bitbake mono -c cve_check + mv $GITHUB_WORKSPACE/${BRANCH}/build/tmp/log/cve/cve-summary.json $GITHUB_WORKSPACE/${BRANCH}/build/tmp/log/cve/cve-summary-mono.json + bitbake dotnet -c cve_check + mv $GITHUB_WORKSPACE/${BRANCH}/build/tmp/log/cve/cve-summary.json $GITHUB_WORKSPACE/${BRANCH}/build/tmp/log/cve/cve-summary-dotnet.json - name: Testing run: | . ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build @@ -99,3 +119,8 @@ jobs: with: name: test-image-mono-${{ matrix.branch }}-${{ matrix.mono_version }}-${{ matrix.dotnet_version }}-${{ github.sha }}-${{ matrix.arch }} path: ./${{ matrix.branch }}/build/tmp/deploy/images/qemu${{ matrix.arch }}/ + - name: Store CVEs + uses: actions/upload-artifact@v4 + with: + name: cve-summary-${{ matrix.branch }}-${{ matrix.mono_version }}-${{ matrix.dotnet_version }}-${{ github.sha }}-${{ matrix.arch }} + path: ./${{ matrix.branch }}/build/tmp/log/cve/*.json diff --git a/README.md b/README.md index fedf78f1..2d192ee1 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,22 @@ meta-mono is an OpenEmbedded layer that builds dotNet, the mono runtime and mono | Branch | Version | Support Status* | Status of Build & Tests | | ------ | ------- | --------------- | ----------------------- | -| styhead | 5.1 | Active Development | [![styhead](https://img.shields.io/github/actions/workflow/status/dynamicdevices/meta-mono/CI_github.yml?branch=styhead&label=build%20%26%20test)](https://github.com/DynamicDevices/meta-mono/actions/workflows/CI_github.yml) | +| walnascar | 5.2 | Future (April 2025) | [![walnascar](https://img.shields.io/github/actions/workflow/status/dynamicdevices/meta-mono/CI_github.yml?branch=walnascar&label=build%20%26%20test)](https://github.com/DynamicDevices/meta-mono/actions/workflows/CI_github.yml) | +| styhead | 5.1 | Support for 7 months (May 2025) | [![styhead](https://img.shields.io/github/actions/workflow/status/dynamicdevices/meta-mono/CI_github.yml?branch=styhead&label=build%20%26%20test)](https://github.com/DynamicDevices/meta-mono/actions/workflows/CI_github.yml) | | scarthgap | 5.0 | Long Term Support (until Apr. 2028) | [![scarthgap](https://img.shields.io/github/actions/workflow/status/dynamicdevices/meta-mono/CI_github.yml?branch=scarthgap&label=build%20%26%20test)](https://github.com/DynamicDevices/meta-mono/actions/workflows/CI_github.yml) | -| nanbield | 4.3 | May 2024 | [![nanbield](https://img.shields.io/github/actions/workflow/status/dynamicdevices/meta-mono/CI_github.yml?branch=nanbield&label=build%20%26%20test)](https://github.com/DynamicDevices/meta-mono/actions/workflows/CI_github.yml) | -| kirkstone | 4.0 | Long Term Support (minimum Apr. 2024) | [![master](https://img.shields.io/github/actions/workflow/status/dynamicdevices/meta-mono/CI_github.yml?branch=kirkstone&label=build%20%26%20test)](https://github.com/DynamicDevices/meta-mono/actions/workflows/CI_github.yml) | -| dunfell | 3.1 | Supported - Long Term Support (until Apr. 2024) | [![dunfell](https://img.shields.io/github/actions/workflow/status/dynamicdevices/meta-mono/CI_github.yml?branch=dunfell&label=build%20%26%20test)](https://github.com/DynamicDevices/meta-mono/actions/workflows/CI_github.yml) | +| kirkstone | 4.0 | Long Term Support (minimum Apr. 2024) | [![kirkstone](https://img.shields.io/github/actions/workflow/status/dynamicdevices/meta-mono/CI_github.yml?branch=kirkstone&label=build%20%26%20test)](https://github.com/DynamicDevices/meta-mono/actions/workflows/CI_github.yml) | -*support status as of 03/10/24, follows main Yocto release support schedule [here](https://wiki.yoctoproject.org/wiki/Releases) +*support status as of 21/03/25, follows main Yocto release support schedule [here](https://wiki.yoctoproject.org/wiki/Releases) + +## Limitations + +### Removal of support for ARM32 + +Currently (21/10/2024) `styhead` is failing to build GCC for ARM32. As such we've removed the CI tests for the interim. For discussion see [here](https://github.com/DynamicDevices/meta-mono/discussions/234). At such time as GCC is building again for ARM32 the intention is to add the CI build back in at which time we intend to continue to support ARM32. #HelpWanted + +### pythonnet + +The `python3-pythonnet` package currently does not support .NET 10. ## Layer Dependencies @@ -66,7 +75,7 @@ On the target: So far, Windows Forms applications have been tested under Sato. Mono does not require Sato, it does require X if you want to run -Windows Forms applications. +Windows Forms applications. ## Testing Mono builds diff --git a/recipes-mono/dotnet-helloworld/dotnet-helloworld_1.0.bb b/recipes-mono/dotnet-helloworld/dotnet-helloworld_1.0.bb index be548ea9..8c22dc41 100644 --- a/recipes-mono/dotnet-helloworld/dotnet-helloworld_1.0.bb +++ b/recipes-mono/dotnet-helloworld/dotnet-helloworld_1.0.bb @@ -5,7 +5,9 @@ PRIORITY = "optional" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -DEPENDS:append = " dotnet-native" +inherit linuxloader + +DEPENDS:append = " dotnet-native patchelf-native" RDEPENDS:${PN}:append = " \ icu \ @@ -15,6 +17,16 @@ RDEPENDS:${PN}:append = " \ COMPATIBLE_HOST ?= "(x86_64|aarch64|arm).*-linux" +# NuGet MigrationRunner in .NET 6 hardcodes $HOME for migrations dir. +# Override HOME so it's always writable (CI containers often have read-only HOME). +export HOME="${WORKDIR}/dotnet-home" +export DOTNET_CLI_HOME="${WORKDIR}/dotnet-home" +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE="true" +export DOTNET_CLI_TELEMETRY_OPTOUT="1" +export DOTNET_NOLOGO="1" +export NUGET_PACKAGES="${UNPACKDIR}/nuget-packages" +export NUGET_HTTP_CACHE_PATH="${UNPACKDIR}/nuget-http-cache" + SRC_ARCH:aarch64 = "arm64" SRC_ARCH:arm = "arm" SRC_ARCH:x86-64 = "x64" @@ -33,6 +45,9 @@ do_compile () { dotnet new console --force -o ${S} --name ${PN} dotnet build ${S}/${PN}.csproj --output ${B}/${PN} --configuration release --runtime linux-${SRC_ARCH} + # The interpreter points to a path on the build host by default; fix it to use the correct path for the target + patchelf --set-interpreter "${@get_linuxloader(d)}" ${B}/${PN}/${PN} + #FIXME: remove the following line. if the lttng-ust conflict is solved #FIXME: dotnet 8 doesn't produce libcoreclrtraceptprovider.so for the helloworld applications # When dotnet 6 and 7 reach end of life remove the following line. diff --git a/recipes-mono/dotnet/dotnet.inc b/recipes-mono/dotnet/dotnet.inc index 2cacaa9a..f20f8ce1 100644 --- a/recipes-mono/dotnet/dotnet.inc +++ b/recipes-mono/dotnet/dotnet.inc @@ -11,6 +11,7 @@ DEPENDS = "patchelf-native" RDEPENDS:${PN}:class-target = "icu zlib libgssapi-krb5" RDEPENDS:${PN}:class-native = "icu zlib" RDEPENDS:${PN}:class-nativesdk = "icu zlib" +RDEPENDS:${PN}-dev = "zlib" PR = "r0" @@ -18,10 +19,10 @@ SRC_ARCH:aarch64 = "arm64" SRC_ARCH:arm = "arm" SRC_ARCH:x86-64 = "x64" -SRC_URI[vardeps] += "SRC_FETCH_ID SRC_ARCH" +SRC_URI[vardeps] += "SRC_ARCH" SRC_URI[sha512sum] = "${SRC_SHA512SUM}" -SRC_URI = "https://download.visualstudio.microsoft.com/download/pr/${SRC_FETCH_ID}/dotnet-sdk-${PV}-linux-${SRC_ARCH}.tar.gz;subdir=dotnet-${PV}" +SRC_URI = "https://builds.dotnet.microsoft.com/dotnet/Sdk/${PV}/dotnet-sdk-${PV}-linux-${SRC_ARCH}.tar.gz;subdir=dotnet-${PV}" do_configure[noexec] = "1" do_compile[noexec] = "1" @@ -38,9 +39,14 @@ do_install() { install -m 0644 ${S}/LICENSE.txt ${D}${datadir}/dotnet install -m 0644 ${S}/ThirdPartyNotices.txt ${D}${datadir}/dotnet + # Install ALL host/fxr versions from the SDK tarball. Microsoft ships + # updated muxer binaries in serviced SDK releases (e.g. SDK 6.0.428 may + # bundle a 10.0.0 muxer), so only copying DOTNET_RUNTIME_VERSION breaks + # the muxer's fxr lookup. install -d ${D}${datadir}/dotnet/host/fxr - cp -r --no-preserve=ownership ${S}/host/fxr/${DOTNET_RUNTIME_VERSION} ${D}${datadir}/dotnet/host/fxr + cp -r --no-preserve=ownership ${S}/host/fxr/* ${D}${datadir}/dotnet/host/fxr/ + cp -r --no-preserve=ownership ${S}/packs ${D}${datadir}/dotnet/ cp -r --no-preserve=ownership ${S}/sdk ${D}${datadir}/dotnet/ cp -r --no-preserve=ownership ${S}/sdk-manifests ${D}${datadir}/dotnet/ @@ -52,9 +58,21 @@ do_install() { # Hack to fix liblttng-ust dependency issues patchelf --remove-needed liblttng-ust.so.0 ${D}${datadir}/dotnet/shared/Microsoft.NETCore.App/${DOTNET_RUNTIME_VERSION}/libcoreclrtraceptprovider.so + patchelf --remove-needed liblttng-ust.so.1 ${D}${datadir}/dotnet/shared/Microsoft.NETCore.App/${DOTNET_RUNTIME_VERSION}/libcoreclrtraceptprovider.so + # Symlink libhostfxr.so - prefer DOTNET_RUNTIME_VERSION, fall back to + # whatever the SDK tarball actually ships (muxer version may differ). install -d ${D}${libdir} - ln -rs ${D}${datadir}/dotnet/host/fxr/${DOTNET_RUNTIME_VERSION}/libhostfxr.so ${D}${libdir}/libhostfxr.so + if [ -f ${D}${datadir}/dotnet/host/fxr/${DOTNET_RUNTIME_VERSION}/libhostfxr.so ]; then + ln -rs ${D}${datadir}/dotnet/host/fxr/${DOTNET_RUNTIME_VERSION}/libhostfxr.so ${D}${libdir}/libhostfxr.so + else + for fxr_dir in ${D}${datadir}/dotnet/host/fxr/*/; do + if [ -f "${fxr_dir}libhostfxr.so" ]; then + ln -rs "${fxr_dir}libhostfxr.so" ${D}${libdir}/libhostfxr.so + break + fi + done + fi } do_install:append:x86-64:class-target () { @@ -71,6 +89,7 @@ FILES:${PN} += "\ " FILES:${PN}-dev = "\ + ${datadir}/dotnet/packs \ ${datadir}/dotnet/sdk \ ${datadir}/dotnet/sdk-manifests \ ${datadir}/dotnet/templates \ @@ -83,6 +102,28 @@ FILES:${PN}-dbg = "\ RRECOMMENDS:dotnet-dev[nodeprrecs] = "1" INSANE_SKIP:${PN} = "already-stripped libdir staticdev textrel dev-so" +INSANE_SKIP:${PN}-dev = "libdir staticdev dev-elf" INSANE_SKIP:${PN}-dbg = "libdir" +# For native builds, replace the dotnet symlink with a wrapper script that +# ensures HOME is always writable. .NET SDK 6 NuGet MigrationRunner.Run() +# unconditionally writes to $HOME/.local/share/NuGet/Migrations *before* +# checking DOTNET_SKIP_FIRST_TIME_EXPERIENCE. In CI containers HOME is +# often read-only, breaking every recipe that invokes dotnet. The wrapper +# fixes this for ALL consumer recipes automatically. +do_install:append:class-native() { + rm -f ${D}${bindir}/dotnet + cat > ${D}${bindir}/dotnet << 'WRAPPER' +#!/bin/sh +export HOME="${DOTNET_CLI_HOME:-${TMPDIR:-/tmp}/dotnet-home}" +mkdir -p "$HOME" 2>/dev/null || true +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true +export DOTNET_CLI_TELEMETRY_OPTOUT=1 +export DOTNET_NOLOGO=1 +SELF_DIR="$(cd "$(dirname "$0")" && pwd)" +exec "${SELF_DIR}/../share/dotnet/dotnet" "$@" +WRAPPER + chmod 0755 ${D}${bindir}/dotnet +} + BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-mono/dotnet/dotnet_10.0.100.bb b/recipes-mono/dotnet/dotnet_10.0.100.bb new file mode 100644 index 00000000..7e7f3ad8 --- /dev/null +++ b/recipes-mono/dotnet/dotnet_10.0.100.bb @@ -0,0 +1,7 @@ +require dotnet.inc + +DOTNET_RUNTIME_VERSION = "10.0.0" + +SRC_SHA512SUM:aarch64 = "24fc2b105ab8484c34213ef57ac4e6a36a6593241f0ebc6cf0a40ec2f5fea2d76de85c4b87b2a53814d194e32ec1288dd5053cd6f52768d79cd0ac948cbf84ea" +SRC_SHA512SUM:arm = "45f2d7fd05670a5a14fa480889e45920782277575dba0da44c259997d059d64070b40ac7aae9f0c3a3076d9fed5b787854a8abdc2dfdb4783b449c05c1c9b49c" +SRC_SHA512SUM:x86-64 = "f78dbac30c9af2230d67ff5c224de3a5dbf63f8a78d1c206594dedb80e6909d2cc8a9d865d5105c72c2fd2aa266fc0c6c77dedac60408cbccf272b116bd11b07" diff --git a/recipes-mono/dotnet/dotnet_6.0.424.bb b/recipes-mono/dotnet/dotnet_6.0.424.bb deleted file mode 100644 index 20e491ab..00000000 --- a/recipes-mono/dotnet/dotnet_6.0.424.bb +++ /dev/null @@ -1,12 +0,0 @@ -require dotnet.inc - -DOTNET_RUNTIME_VERSION = "6.0.32" - -SRC_FETCH_ID:aarch64 = "5f4b8e71-b03a-45cb-9a81-3cfcb51ef346/eb9509f0a061be1106689c1fbf5d5169" -SRC_SHA512SUM:aarch64 = "6a24dcad251016aa82ea11d3c665b250d5f86e7f8a82a6ec0f01d250e9cd671fd0746812757c023f28d4929248d326b2a5dc13ede8d5b5486671ea1452954aed" - -SRC_FETCH_ID:arm = "500addd2-cfbf-49b4-b09f-e497f93331a4/e096ebc13bba6a9f6890588c5f617cae" -SRC_SHA512SUM:arm = "671c39af0b0fa658b2c55b32923b90122074e0cff3070588134d50625ac0dc52c9abb93e5c872b7c84231128d5ef8aa213133df7fba552bd9aefb8e83f93e778" - -SRC_FETCH_ID:x86-64 = "e94bb674-1fb1-4966-b2f0-bc9055ea33fc/428b37dee8ffb641fd1e45b401b2994c" -SRC_SHA512SUM:x86-64 = "e9823aa2ad261199f8289fde8721931c1e4d47357b4973b8c7d34c12abd440bb932064ac151b0e0d7b3d5b72a5dfe3f20d5dafa19e6f56f1a61ad54b7de5e584" diff --git a/recipes-mono/dotnet/dotnet_6.0.428.bb b/recipes-mono/dotnet/dotnet_6.0.428.bb new file mode 100644 index 00000000..fc8819c0 --- /dev/null +++ b/recipes-mono/dotnet/dotnet_6.0.428.bb @@ -0,0 +1,7 @@ +require dotnet.inc + +DOTNET_RUNTIME_VERSION = "6.0.36" + +SRC_SHA512SUM:aarch64 = "cb8454865ecb99ce557bd0a5741d3dc84657a45ea00f9b2a0f0593e94e4e661e898a5690df90cf0175bf5982973c19985a168998aaa975b7ac7a3bef2ecd05d2" +SRC_SHA512SUM:arm = "c751881dd27ef098428e616b99a9c16e8bf82526484f76987dac1efcb5177534749c8f943f6d9daacc3a91bb086c9cb9c8d535c9881c0be3dc19c647065968fe" +SRC_SHA512SUM:x86-64 = "04395f991ab50e4755ce1ae53e23592a7420b71b82160883bae3194dd1dfd5dcaed78743e4e0b4dd51ea43c49ec84b5643630707b3854f1471265dc98490d2f9" diff --git a/recipes-mono/dotnet/dotnet_8.0.303.bb b/recipes-mono/dotnet/dotnet_8.0.303.bb deleted file mode 100644 index 729398c6..00000000 --- a/recipes-mono/dotnet/dotnet_8.0.303.bb +++ /dev/null @@ -1,12 +0,0 @@ -require dotnet.inc - -DOTNET_RUNTIME_VERSION = "8.0.7" - -SRC_FETCH_ID:aarch64 = "4bfdbe1a-e1f9-4535-8da6-6e1e7ea0994c/b110641d008b36dded561ff2bdb0f793" -SRC_SHA512SUM:aarch64 = "09cb6b12770febe186e36971afdbcea6e8bf5fb34b7701cd8c416f597d3b7e930d05e51ccef1985e5598291540ef2d721187904587469300bb39772317e2be5c" - -SRC_FETCH_ID:arm = "9e0bdcde-1878-4351-883a-c0adbb570bba/156df738634f710dad131e993fc0f48a" -SRC_SHA512SUM:arm = "03b3730d1fd5e1955b8a23e69695c975e88e781513b1f47027ce4ed96a8743ba2560ca87ae2e937ebd89ef69a3aa05c4ca2f39eede5a27bd937775f372b9feba" - -SRC_FETCH_ID:x86-64 = "60218cc4-13eb-41d5-aa0b-5fd5a3fb03b8/6c42bee7c3651b1317b709a27a741362" -SRC_SHA512SUM:x86-64 = "814ff07ccdfc8160c4a24adfda6c815e7feace88c59722f827a5a27041719067538754911fc15cb46978e16566fe0938695891723d182055190e876131faedda" diff --git a/recipes-mono/dotnet/dotnet_8.0.406.bb b/recipes-mono/dotnet/dotnet_8.0.406.bb new file mode 100644 index 00000000..ee29c145 --- /dev/null +++ b/recipes-mono/dotnet/dotnet_8.0.406.bb @@ -0,0 +1,7 @@ +require dotnet.inc + +DOTNET_RUNTIME_VERSION = "8.0.13" + +SRC_SHA512SUM:aarch64 = "9b939f09fbda8a080b1266914ca02c4d60a95e85fa6a1344c378d394697de6935eb7d941dd9a3aeb977ada3aab561c614a5fe9b973824899cb02aa74e9c09988" +SRC_SHA512SUM:arm = "18a2bf575a6d895ce0671b22e4f0853003920f0b7f2f33ff45afc51d34453bfd6b87b2aa5e53349d0c6ae9f6c37f6663d37f87a2ee544c89a7f5ba88d6f65408" +SRC_SHA512SUM:x86-64 = "d6fdcfebd0df46959f7857cfb3beac7de6c8843515ece28b24802765fd9cfb6c7e9701b320134cb4907322937ab89cae914ddc21bf48b9b6313e9a9af5c1f24a" diff --git a/recipes-mono/images/test-image-mono.bb b/recipes-mono/images/test-image-mono.bb index 693c5309..aea1fee3 100644 --- a/recipes-mono/images/test-image-mono.bb +++ b/recipes-mono/images/test-image-mono.bb @@ -8,7 +8,6 @@ DEFAULT_TEST_SUITES:pn-${PN}:prepend = "dotnet " IMAGE_INSTALL += "msbuild \ dotnet \ dotnet-helloworld \ - python3-pythonnet \ " IMAGE_BASENAME = "${PN}" diff --git a/recipes-mono/mono/mono-6.12.0.206/0001-Add-libusb-1.0-mapping.patch b/recipes-mono/mono/mono-6.12.0.206/0001-Add-libusb-1.0-mapping.patch new file mode 100644 index 00000000..896a3ff9 --- /dev/null +++ b/recipes-mono/mono/mono-6.12.0.206/0001-Add-libusb-1.0-mapping.patch @@ -0,0 +1,32 @@ +From 611f269ab768407965311ad3be56edf912c36e95 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= + +Date: Tue, 22 Oct 2024 07:36:06 +0200 +Subject: [PATCH] Add libusb-1.0 mapping +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes using USB devices with LibUsbDotNet and MonoLibUsb. + +Signed-off-by: Zoltán Böszörményi +Upstream-Status: Submitted [https://github.com/mono/mono/pull/21807] +--- + data/config.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/data/config.in b/data/config.in +index 2718b6e9f45..66cfd55ab76 100644 +--- a/data/config.in ++++ b/data/config.in +@@ -33,6 +33,7 @@ + + + ++ + + + +-- +2.47.0 + diff --git a/recipes-mono/mono/mono_6.12.0.206.bb b/recipes-mono/mono/mono_6.12.0.206.bb index 3648e7d2..2bf2963e 100644 --- a/recipes-mono/mono/mono_6.12.0.206.bb +++ b/recipes-mono/mono/mono_6.12.0.206.bb @@ -11,6 +11,7 @@ SRC_URI = "gitsm://github.com/mono/mono.git;protocol=https;branch=2020-02 \ file://shm_open-test-crosscompile.diff \ file://disable-mmap-MAP_32BIT-support.patch \ file://0001-Allow-passing-external-mapfile-C-build-options.patch \ + file://0001-Add-libusb-1.0-mapping.patch \ " diff --git a/recipes-mono/msbuild/msbuild_15.4.bb b/recipes-mono/msbuild/msbuild_15.4.bb deleted file mode 100644 index 7860661c..00000000 --- a/recipes-mono/msbuild/msbuild_15.4.bb +++ /dev/null @@ -1,76 +0,0 @@ -SUMMARY = "The Microsoft Build Engine is a platform for building applications." -HOMEPAGE = "https://github.com/mono/msbuild" -SECTION = "console/apps" -LICENSE = "MIT" -DEPENDS = " \ - coreutils-native findutils-native curl-native \ - unzip-native mono-native \ - " - -LIC_FILES_CHKSUM = "file://LICENSE;md5=768c552053144071f8ef7e5621714b0a" - -inherit mono - -SRCREV = "1822f8c9b6b63753c2498493a7c0522a9d263ca6" - -SRC_URI = " \ - git://github.com/mono/msbuild.git;protocol=https;branch=d${PV} \ - file://cibuild.sh-debug.patch \ - " - -S = "${UNPACKDIR}/git" - -do_compile () { - ./cibuild.sh --scope Compile --host Mono --target Mono --config Release --bootstrap-only -} - -do_install () { - MONO_PREFIX=${prefix} - DESTDIR="${D}" - - install -d -m0755 ${D}${libdir}/mono - DESTDIR="${D}" ./install-mono-prefix.sh ${prefix} - - # Extract some variables from ./install-mono-prefix.sh - XBUILD_DIR=$(grep ^XBUILD_DIR= ./install-mono-prefix.sh | sed s,XBUILD_DIR=\$MONO_PREFIX,,) - MSBUILD_TOOLSVERSION=$(grep ^MSBUILD_TOOLSVERSION ./install-mono-prefix.sh | sed s,MSBUILD_TOOLSVERSION=,,) - MSBUILD_INSTALL_BIN_DIR=$MONO_PREFIX/lib/mono/msbuild/$MSBUILD_TOOLSVERSION/bin - - # Set explicitly and re-do the whole installation manually - MSBUILD_OUT_DIR="bin/Release-MONO/AnyCPU/Unix/Unix_Deployment" - install $MSBUILD_OUT_DIR/*.* ${D}$MSBUILD_INSTALL_BIN_DIR/ - - # Some conditional copies from install-mono-prefix.sh - # must be performed manually here because the separated - # build and installed trees in Yocto / Bitbake. - test -d ${STAGING_DIR_HOST}${prefix}$XBUILD_DIR/14.0/Imports && cp -R ${STAGING_DIR_HOST}${prefix}$XBUILD_DIR/14.0/Imports ${D}${prefix}$XBUILD_DIR/$MSBUILD_TOOLSVERSION - # End of conditional copies from install-mono-prefix.sh - - sed -i -es,${D},,g ${D}${bindir}/msbuild - - # There are two conflicting files in these directories - # across msbuild and mono 5.12.x - rm -rf ${D}${libdir}/mono/xbuild/15.0/Microsoft.Common.targets - rm -rf ${D}${libdir}/mono/xbuild/15.0/Imports/Microsoft.Common.props -} - -do_install:append() { - install -d -m0755 ${D}${libdir}/mono/msbuild/15.0/bin/Roslyn - install -m0755 ${S}/bin/Release-MONO/AnyCPU/Unix/Unix_Deployment/Roslyn/* ${D}${libdir}/mono/msbuild/15.0/bin/Roslyn/ -} - -FILES:${PN} += " \ - ${libdir}/mono/ \ - " - -SYSROOT_PREPROCESS_FUNCS += "msbuild_sysroot_preprocess" - -msbuild_sysroot_preprocess () { - install -d ${SYSROOT_DESTDIR}${bindir_crossscripts} - - install -m0755 ${S}/msbuild-mono-deploy.in ${SYSROOT_DESTDIR}${bindir_crossscripts}/msbuild - sed -i -es,@bindir@,${STAGING_BINDIR_NATIVE}, ${SYSROOT_DESTDIR}${bindir_crossscripts}/msbuild - sed -i -es,@mono_instdir@,${STAGING_LIBDIR}/mono, ${SYSROOT_DESTDIR}${bindir_crossscripts}/msbuild -} - -BBCLASSEXTEND = "native" diff --git a/recipes-mono/msbuild/msbuild_16.6.bb b/recipes-mono/msbuild/msbuild_16.6.bb deleted file mode 100644 index e3d04436..00000000 --- a/recipes-mono/msbuild/msbuild_16.6.bb +++ /dev/null @@ -1,59 +0,0 @@ -SUMMARY = "The Microsoft Build Engine is a platform for building applications." -HOMEPAGE = "https://docs.microsoft.com/visualstudio/msbuild/msbuild" -SECTION = "console/apps" -LICENSE = "MIT" - -DEPENDS = "curl-native ca-certificates-native unzip-native dotnet-native" - -RDEPENDS_${PN} = "dotnet" - -LIC_FILES_CHKSUM = "file://license;md5=aa2bb45abfacf721bd09860b11b79f5a \ - file://ref/LicenseHeader.txt;md5=b06c0743af93aeb14a577bb2bfdada8e" - -inherit mono - -SRCREV = "94d0c55bc96f297618d50cc32167ddba9fee30b0" - -SRC_URI = "git://github.com/mono/linux-packaging-msbuild.git;branch=main;protocol=https \ - file://mono-msbuild-dotnetbits-case.patch \ - file://mono-msbuild-license-case.patch \ - file://mono-msbuild-no-hostfxr.patch \ - file://mono-msbuild-use-bash.patch \ - file://0001-Don-t-try-to-run-pkill.patch \ - file://0001-Copy-hostfxr.patch \ - file://0002-Remove-myget-feeds-and-replace-with-AzDO-feeds.patch \ - " - -S = "${UNPACKDIR}/git" - -do_configure () { - sed "s|%libhostfxr%|${STAGING_DIR_TARGET}${libdir}/libhostfxr.so|g" -i ${S}/eng/cibuild_bootstrapped_msbuild.sh - - sed "s|\$(HOME)\\\.nuget\\\packages|${NUGET_PACKAGES}|g" -i ${S}/mono/build/common.props - sed "s|\$(MonoInstallPrefix)\\\lib|${D}${libdir}|g" -i ${S}/mono/build/install.proj - sed "s|\$(MonoInstallPrefix)\\\bin|${D}${bindir}|g" -i ${S}/mono/build/install.proj - sed "s|\$(MonoInstallPrefix)\\\share|${D}${datadir}|g" -i ${S}/mono/build/install.proj - - sed "s|'\$1'/bin|${bindir}|g" -i ${S}/mono/build/gen_msbuild_wrapper.sh - sed "s|\$1/lib|${libdir}|g" -i ${S}/mono/build/gen_msbuild_wrapper.sh -} - -export DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR="${STAGING_DATADIR_NATIVE}/dotnet" -export CURL_CA_BUNDLE="${STAGING_DIR_NATIVE}/etc/ssl/certs/ca-certificates.crt" - -do_compile[network] = "1" - -do_compile () { - ./eng/cibuild_bootstrapped_msbuild.sh --host_type mono --configuration Release --skip_tests /p:DisableNerdbankVersioning=true -} - -do_install () { - ./stage1/mono-msbuild/msbuild mono/build/install.proj /p:MonoInstallPrefix="${D}" /p:Configuration=Release-MONO /p:IgnoreDiffFailure=true -} - -FILES:${PN} = "\ - ${bindir} \ - ${libdir}/mono \ -" - -BBCLASSEXTEND = "native" diff --git a/recipes-python/python3-clr-loader/python3-clr-loader.bb b/recipes-python/python3-clr-loader/python3-clr-loader.bb index 73b1f432..7cbc5b94 100644 --- a/recipes-python/python3-clr-loader/python3-clr-loader.bb +++ b/recipes-python/python3-clr-loader/python3-clr-loader.bb @@ -32,6 +32,16 @@ RDEPENDS:${PN} += " \ export NUGET_PACKAGES="${UNPACKDIR}/nuget-packages" export NUGET_HTTP_CACHE_PATH="${UNPACKDIR}/nuget-http-cache" +# NuGet MigrationRunner.Run() in .NET 6 runs BEFORE the skip-first-time +# check, and hardcodes $HOME/.local/share/NuGet/Migrations. In CI +# containers $HOME is often read-only. Override HOME to a writable path +# so NuGet, dotnet CLI, and any other $HOME consumer all get a writable dir. +export HOME="${WORKDIR}/dotnet-home" +export DOTNET_CLI_HOME="${WORKDIR}/dotnet-home" +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE="true" +export DOTNET_CLI_TELEMETRY_OPTOUT="1" +export DOTNET_NOLOGO="1" + # Workaround for dotnet restore issue, define custom proxy in a .bbappend # and/or in layer.conf or local.conf if dotnet restore was failed. # Override DOTNET_HTTP_PROXY and DOTNET_HTTPS_PROXY in layer.conf or local.conf if needed diff --git a/recipes-python/python3-pythonnet/python3-pythonnet.bb b/recipes-python/python3-pythonnet/python3-pythonnet.bb index 4ed8e1af..5fa8b1b9 100644 --- a/recipes-python/python3-pythonnet/python3-pythonnet.bb +++ b/recipes-python/python3-pythonnet/python3-pythonnet.bb @@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = " \ inherit pypi python_flit_core -PV = "3.0.3" -SRC_URI[sha256sum] = "8d4b2e97158a023875f8647458a58f38817f4fe39af60abdd6b0d8adf1d77e75" +PV = "3.0.4" +SRC_URI[sha256sum] = "c92fbcfddd16575f7e75a643302271658b606d8557df7f0132ac240e03cc3a8f" PYPI_PACKAGE = "pythonnet" DOTNET_MIN_REQ_VERSION ?= "6.0.0"