Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 38 additions & 28 deletions .github/workflows/CI_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
push:
branches:
- master
- feature/yocto-layer-compliance
- whinlatter
pull_request:
branches:
- master
- feature/yocto-layer-compliance
- whinlatter
paths-ignore:
- "**.md"
jobs:
Expand All @@ -23,12 +23,8 @@ jobs:
matrix:
dotnet_version: [10.0.100, 8.0.406, 6.0.428]
mono_version: [6.12.0.206]
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
branch: [whinlatter]
arch: [x86-64, arm64]
env:
name: build-and-test
MONO_VERSION: ${{ matrix.mono_version }}
Expand All @@ -41,38 +37,52 @@ jobs:
with:
clean: false
path: ${{ matrix.branch }}/meta-mono
- name: Update repo poky
# Whinlatter (5.3+): poky repo no longer has release branches.
# Clone bitbake, openembedded-core and meta-yocto individually.
# See: https://docs.yoctoproject.org/dev/migration-guides/migration-5.3.html
- name: Clone base layers
run: |
if [ ! -d ${BRANCH}/poky ]; then
git clone git://git.yoctoproject.org/poky -b ${BRANCH} ${BRANCH}/poky
else
cd ${BRANCH}/poky
git pull origin ${BRANCH}
cd ../..
fi
- name: Update repo meta-openembedded
mkdir -p "${BRANCH}/layers"
clone_or_update() {
local url="$1" branch="$2" dest="$3"
if [ ! -d "$dest" ]; then
git clone "$url" -b "$branch" "$dest"
else
cd "$dest"
git fetch origin "$branch"
git checkout "$branch"
git pull origin "$branch"
cd "$GITHUB_WORKSPACE"
fi
}
clone_or_update https://git.openembedded.org/bitbake 2.16 ${BRANCH}/layers/bitbake
clone_or_update https://git.openembedded.org/openembedded-core whinlatter ${BRANCH}/layers/openembedded-core
clone_or_update https://git.yoctoproject.org/meta-yocto whinlatter ${BRANCH}/layers/meta-yocto
- name: Clone meta-openembedded
run: |
if [ ! -d ${BRANCH}/meta-openembedded ]; then
git clone https://github.com/openembedded/meta-openembedded.git -b ${BRANCH} ${BRANCH}/meta-openembedded
mkdir -p "${BRANCH}/layers"
if [ ! -d ${BRANCH}/layers/meta-openembedded ]; then
git clone https://github.com/openembedded/meta-openembedded.git -b ${BRANCH} ${BRANCH}/layers/meta-openembedded
Comment thread
cursor[bot] marked this conversation as resolved.
else
cd ${BRANCH}/meta-openembedded
cd ${BRANCH}/layers/meta-openembedded
git pull origin ${BRANCH}
cd ../..
cd "$GITHUB_WORKSPACE"
fi
- name: Configuring
run: |
rm -f ${BRANCH}/build/conf/local.conf
rm -f ${BRANCH}/build/conf/bblayers.conf
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build
TEMPLATECONF=$GITHUB_WORKSPACE/${BRANCH}/layers/meta-yocto/meta-poky/conf/templates/default \
. ./${BRANCH}/layers/openembedded-core/oe-init-build-env ${BRANCH}/build

# Append custom variables for regenerated local.conf and bblayers.conf samples
echo "### Starting to configure local.conf and bblayers.conf ###"
echo "mono version: $MONO_VERSION"
echo "dotnet version: $DOTNET_VERSION"

echo "BBLAYERS += '$GITHUB_WORKSPACE/${BRANCH}/meta-mono'" >> conf/bblayers.conf
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 "BBLAYERS += '$GITHUB_WORKSPACE/${BRANCH}/layers/meta-openembedded/meta-oe'" >> conf/bblayers.conf
echo "BBLAYERS += '$GITHUB_WORKSPACE/${BRANCH}/layers/meta-openembedded/meta-python'" >> conf/bblayers.conf

echo "BB_DEFAULT_EVENTLOG = \"\"" >> conf/local.conf
echo "MACHINE = \"qemu${ARCH}\"" >> conf/local.conf
Expand All @@ -95,23 +105,23 @@ jobs:
# TODO: remove this step once all matrix jobs have rebuilt successfully.
- name: Clean stale sstate
run: |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build
. ./${BRANCH}/layers/openembedded-core/oe-init-build-env ${BRANCH}/build
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
. ./${BRANCH}/layers/openembedded-core/oe-init-build-env ${BRANCH}/build
bitbake test-image-mono
- name: CVE Check Mono / dotNet
run: |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build
. ./${BRANCH}/layers/openembedded-core/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
. ./${BRANCH}/layers/openembedded-core/oe-init-build-env ${BRANCH}/build
export TERM=linux
bitbake test-image-mono -c testimage
- name: Store artifacts
Expand Down
2 changes: 1 addition & 1 deletion conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ INSANE_SKIP:msbuild-dev += "buildpaths"
INSANE_SKIP:python3-clr-loader += "buildpaths"
INSANE_SKIP:python3-pythonnet += "buildpaths"

LAYERSERIES_COMPAT_mono = "styhead"
LAYERSERIES_COMPAT_mono = "whinlatter"
2 changes: 0 additions & 2 deletions recipes-mono/gtk-sharp/gtk-sharp3_2.99.4.bb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ SRCREV = "9a72bb67fff7e4845b7bb430a608282668c3e4da"
SRC_URI = "git://github.com/mono/gtk-sharp.git;protocol=https;branch=master \
file://0001-fixup-gmcs-to-mcs.patch"

S = "${UNPACKDIR}/git"

do_configure:prepend() {
export PROFILER_CFLAGS="-D_REENTRANT -I${STAGING_DIR_TARGET}/usr/include/glib-2.0 -I${STAGING_DIR_TARGET}/usr/lib/glib-2.0 -I${STAGING_DIR_TARGET}/usr/lib/glib-2.0/include -I${STAGING_DIR_TARGET}/usr/include/mono-2.0"
}
Expand Down
2 changes: 0 additions & 2 deletions recipes-mono/libgdiplus/libgdiplus-common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ SRC_URI = " \
gitsm://github.com/mono/libgdiplus.git;protocol=https;branch=${BRANCH} \
"

S = "${UNPACKDIR}/git"

inherit autotools pkgconfig

FILES:${PN} += "${libdir}/libgdiplus.so"
Expand Down
2 changes: 0 additions & 2 deletions recipes-mono/mono-addins/mono-addins-xbuild.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ SRCBRANCH = "master"

SRC_URI = "git://github.com/mono/mono-addins.git;protocol=https;branch=${SRCBRANCH}"

S = "${UNPACKDIR}/git"

do_configure() {
}

Expand Down
2 changes: 0 additions & 2 deletions recipes-mono/mono-addins/mono-addins.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@ SRCBRANCH = "master"
SRC_URI = "git://github.com/mono/mono-addins.git;protocol=https;branch=${SRCBRANCH} \
file://0001-configure-mcs.patch"

S = "${UNPACKDIR}/git"

inherit autotools-brokensep pkgconfig
inherit mono
2 changes: 0 additions & 2 deletions recipes-mono/mono-upnp/mono-upnp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-${PV}:"
SRC_URI = "git://github.com/mono/mono-upnp.git;protocol=https;branch=${SRCBRANCH} \
"

S = "${UNPACKDIR}/git"

inherit autotools-brokensep pkgconfig

do_configure () {
Expand Down
2 changes: 0 additions & 2 deletions recipes-mono/mono-xsp/mono-xsp_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ require mono-xsp-3.x.inc
SRCREV= "e272a2c006211b6b03be2ef5bbb9e3f8fefd0768"
SRC_URI = "git://github.com/mono/xsp.git;branch=main;protocol=https \
"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mono-xsp git wrong S

Medium Severity

Dropping the git-specific S override in mono-xsp_git.bb leaves S from mono-xsp-3.x.inc as ${UNPACKDIR}/xsp-${PV} for a tarball layout, while this recipe's SRC_URI uses the git fetcher. Builds of mono-xsp_git point at a path that does not match the unpacked repository.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2eb825b. Configure here.

S = "${UNPACKDIR}/git"
2 changes: 1 addition & 1 deletion recipes-mono/mono/mono-4.xx.inc
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ FILES:${PN}-staticdev += " ${libdir}/*.a"
RDEPENDS:${PN}-dev =+ "bash"

# Workaround for observed race in `make install`
PARALLEL_MAKEINST=""
PARALLEL_MAKEINST = ""
2 changes: 1 addition & 1 deletion recipes-mono/mono/mono-5.xx.inc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ RDEPENDS:${PN}-dev =+ "bash"
RDEPENDS:${PN}-libs =+ "zlib"

# Workaround for observed race in `make install`
PARALLEL_MAKEINST=""
PARALLEL_MAKEINST = ""

# Otherwise the full path to bash is written to the first line of doltlibtool script
# which causes build failures with deeply nested build directories
Expand Down
2 changes: 0 additions & 2 deletions recipes-mono/mono/mono-6.12.0.206.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
S = "${UNPACKDIR}/git"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mono git source path wrong

High Severity

Removing the S = "${UNPACKDIR}/git" override from mono-6.12.0.206.inc leaves S at mono-6.xx.inc's tarball path (${UNPACKDIR}/mono-6.12.0) while mono_6.12.0.206.bb and mono-native_6.12.0.206.bb fetch from git. Configure and patch steps then target the wrong directory and CI mono builds fail.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2eb825b. Configure here.


DEPENDS += " cmake-native"
2 changes: 1 addition & 1 deletion recipes-mono/mono/mono-6.xx.inc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ INSANE_SKIP:${PN}-xbuild = "file-rdeps"
INSANE_SKIP:${PN}-configuration-crypto = "file-rdeps"

# Workaround for observed race in `make install`
PARALLEL_MAKEINST=""
PARALLEL_MAKEINST = ""

# Otherwise the full path to bash is written to the first line of doltlibtool script
# which causes build failures with deeply nested build directories
Expand Down
4 changes: 1 addition & 3 deletions recipes-mono/mono/mono-git.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ SRC_URI = "git://github.com/mono/mono.git;branch=${SRCBRANCH}\
# file://0001-reintroduce-gmcs.patch \
#

S = "${UNPACKDIR}/git"

FILESPATH =. "${FILE_DIRNAME}/mono-4.xx:"
FILESPATH =. "${FILE_DIRNAME}/mono-${PV}:"

Expand Down Expand Up @@ -83,4 +81,4 @@ FILES:${PN}-profiler += " ${datadir}/mono-2.0/mono/profiler/*"
RDEPENDS:${PN} =+ "bash"

# Workaround for observed race in `make install`
PARALLEL_MAKEINST=""
PARALLEL_MAKEINST = ""
2 changes: 0 additions & 2 deletions recipes-mono/msbuild/msbuild_16.10.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ SRC_URI = "git://github.com/mono/linux-packaging-msbuild.git;branch=main;protoco
file://0001-Copy-hostfxr.patch \
"

S = "${UNPACKDIR}/git"

do_configure () {
sed "s|%libhostfxr%|${STAGING_DIR_TARGET}${libdir}/libhostfxr.so|g" -i ${S}/eng/cibuild_bootstrapped_msbuild.sh

Expand Down
2 changes: 1 addition & 1 deletion recipes-mono/nuget/nuget.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://Apache-LICENSE-2.0.txt;md5=3b83ef96387f14655fc854ddc3
HOMEPAGE = "http://nuget.org/"

# This package ships Mono EXE and a shell script
PACKAGE_ARCH="all"
PACKAGE_ARCH = "all"

# Fully updated Fedora 33 and 34 say that dist.nuget.org cert is untrusted
BB_CHECK_SSL_CERTS = "0"
Expand Down
2 changes: 0 additions & 2 deletions recipes-mono/taglib-sharp/taglib-sharp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ DEPENDS = "mono"

SRC_URI = "git://github.com/mono/taglib-sharp.git;protocol=https;branch=${SRCBRANCH}"

S = "${UNPACKDIR}/git"

inherit autotools-brokensep pkgconfig

EXTRA_OECONF = " --disable-docs"
Expand Down