.. | ||
APKBUILD | ||
aspnetcore_portable-build-workaround.patch | ||
build_enable-timestamps.patch | ||
dotnet.sh.in | ||
installer_hard-dereference-tar-gz.patch | ||
installer_set-crossgen2rid-using-buildarchitecture.patch | ||
README.md | ||
roslyn-analyzer_disable-apphost.patch | ||
runtime_82269-mono-thread-coop-undefine-fortify-source.patch | ||
runtime_83682-specify-notext-on-linux-musl-x86.patch | ||
runtime_90251-rename-mono-cmake-host-var.patch | ||
runtime_enable-system-libunwind.diff | ||
runtime_more-clang-16-suppression.patch | ||
runtime_remove-usage-of-off64-t.patch | ||
vstest_intent-net8.0.patch |
dotnet8-runtime
This is the .NET 8.0 package for Alpine Linux.
Please report any issues using Gitlab and tag @ayakael
Building info
Generated packages
aspnetcore8-runtime
aspnetcore8-targeting-pack
dotnet8-apphost-pack
(used by dotnet8-runtime)dotnet8-hostfxr
(used by dotnet-host)dotnet8-runtime
dotnet8-targeting-pack
dotnet-host
How to build dotnet8 on Alpine
As dotnet is a self-hosting compiler (thus it compiles using itself), it
requires a bootstrap for the initial build. To solve this problem, this package
follows the stage0
proposal outlined here
The goal of stage0
is to bootstrap dotnet with as little intervention as
possible, thus allowing seamless Alpine upgrades. Unfortunately, upstream only
builds bootstraps for Alpine on x86_64
, aarch64
, and armv7
. Thus, stage0
has also been designed to be crossbuild aware, allowing bootstrapping to other
platforms.
In summary, dotnet8 is built using three different aports.
community/dotnet8-stage0
Builds minimum components for full build of dotnet8, and packages these in an initialdotnet8-stage0-bootstrap
package thatdotnet8-build
pulls.community/dotnet8-build
Builds full and packages dotnet8 fully using either stage0 or previoulsy built dotnet8 build.community/dotnet8-runtime
As abuild does not allow different versions for subpackages, a different aport is required to package runtime bits from dotnet8-build.
Crossbuilding with stage0
Crossbuilding stage0
is a three step process:
- Build sysroot for target platform by using
scripts/bootstrap.sh
in aports repo:
./bootstrap.sh $CTARGET_ARCH
- Although not necessary, it is recommended to add Alpine repositories to
$HOME/sysroot-$CTARGET_ARCH/etc/apk/repositories
, making sure to add required keys. This makes it so that whatever package is not built in step 1 will be pulled from package repos - Crossbuild
dotnet8-stage0
via:
CHOST=$CTARGET_ARCH abuild -r
Specification
This package follows package naming and contents suggested by upstream,
with two exceptions. It installs dotnet to /usr/lib/dotnet
(aka $_libdir
).
In addition, the package is named dotnet8
as opposed to dotnet-8.0
to match Alpine Linux naming conventions for packages with many installable versions
Contributing
The steps below are for the final package. Please only contribute to a pre-release version if you know what you are doing. Original instructions follow.
General Changes
-
Fork the main aports repo.
-
Checkout the forked repository.
git clone ssh://git@gitlab.alpinelinux.org/$USER/aports
cd community/dotnet8-build
-
Make your changes. Don't forget to add a changelog.
-
Do local builds.
abuild -r
-
Fix any errors that come up and rebuild until it works locally.
-
Commit the changes to the git repo in a git branch
git checkout -b dotnet8/<name>
git add
any new patchesgit remove
any now-unnecessary patchesgit commit -m 'community/dotnet8-build: descriptive description'
git push
-
Create a merge request with your changes, tagging @ayakael for review.
-
Once the tests in the pull-request pass, and reviewers are happy, your changes will be merged.
Updating to an new upstream release
-
Fork the main aports repo.
-
Checkout the forked repository.
git clone ssh://git@gitlab.alpinelinux.org/$USER/aports
cd community/dotnet8-build
-
Build the new upstream source tarball. Update the versions in the APKBUILD file, and then create a snapshot. After build, update checksum.
abuild snapshot
abuild checksum
-
Do local builds.
abuild -r
-
Fix any errors that come up and rebuild until it works locally. Any patches that are needed at this point should be added to the APKBUILD file in
_patches
variable. -
Upload the source archive to a remote location, and update
source
variable. -
Commit the changes to the git repo in a git branch.
git checkout -b dotnet8/<name>
git add
any new patchesgit remove
any now-unnecessary patchesgit commit -m 'community/dotnet8-build: upgrade to <new-version>
git push
-
Create a merge request with your changes, tagging @ayakael for review.
-
Once the tests in the pull-request pass, and reviewers are happy, your changes will be merged.
Testing
This package uses CI tests as defined in check()
function. Creating a
merge-request or running a build will fire off tests and flag any issues.
The tests themselves are contained in this external repository: https://github.com/redhat-developer/dotnet-regular-tests/