Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WOIP] Build dotnet-8 using a bootstrap package #33564

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ader1990
Copy link
Contributor

@ader1990 ader1990 commented Nov 7, 2024

To build dotnet in a more controlled way, I propose to have a bootstrap package and a main package that uses the bootstrap one.

The workflow:

  • build dotnet-bootstrap-8
  • build dotnet-source-8

The dotnet-bootstrap-8 package bundles the artifacts from the prep.sh run. Those files consist of:

The dotnet-source-8 package uses the bootstrap package and does not need the prep.sh anymore, as the .dotnet folder is symlinked to the bootstrapped /usr/share. Also the prereqs/packages/archive/Private.SourceBuilt.Artifacts.Bootstrap.tar.gz is symlinked.

The outcome is that the build of dotnet-source-8 is done offline (excluding the actual git clone of the dotnet/dotnet repository).

Pre-review Checklist

For new package PRs only

  • This PR is marked as fixing a pre-existing package request bug
    • Alternatively, the PR is marked as related to a pre-existing package request bug, such as a dependency
  • REQUIRED - The package is available under an OSI-approved or FSF-approved license
  • REQUIRED - The version of the package is still receiving security updates
  • This PR links to the upstream project's support policy (e.g. endoflife.date)

For new version streams

  • The upstream project actually supports multiple concurrent versions.
  • Any subpackages include the version string in their package name (e.g. name: ${{package.name}}-compat)
  • The package (and subpackages) provides: logical unversioned forms of the package (e.g. nodejs, nodejs-lts)
  • If non-streamed package names no longer built, open PR to withdraw them (see WITHDRAWING PACKAGES)

For package updates (renames) in the base images

When updating packages part of base images (i.e. cgr.dev/chainguard/wolfi-base or ghcr.io/wolfi-dev/sdk)

  • REQUIRED cgr.dev/chainguard/wolfi-base and ghcr.io/wolfi-dev/sdk images successfully build
  • REQUIRED cgr.dev/chainguard/wolfi-base and ghcr.io/wolfi-dev/sdk contain no obsolete (no longer built) packages
  • Upon launch, does apk upgrade --latest successfully upgrades packages or performs no actions

For security-related PRs

  • The security fix is recorded in the advisories repo

For version bump PRs

  • The epoch field is reset to 0

For PRs that add patches

  • Patch source is documented

@@ -0,0 +1,210 @@
package:
name: dotnet-source-8
Copy link
Contributor Author

@ader1990 ader1990 Nov 7, 2024

Choose a reason for hiding this comment

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

An option would be to leave the current file dotnet-8.yaml to use the bootstrap package, as it is almost identical (just the prep.sh was removed).

Copy link
Member

Choose a reason for hiding this comment

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

Ack.

@ader1990 ader1990 changed the title Build dotnet-8 using a bootstrap package [WOIP] Build dotnet-8 using a bootstrap package Nov 7, 2024
strip-prefix: v
use-tag: true
tag-filter: "v8"

Copy link
Member

Choose a reason for hiding this comment

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

we could also keep update: enabled: false & have update-excuse: saying this is a bootstrap package.
as we typically do not want to upgrade bootstrap packages by default.

pipeline:
- name: Basic .NET command test
runs: |
echo 1 # TBD
Copy link
Member

Choose a reason for hiding this comment

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

it's also sort of ok to not have tests for bootstrap; as it's sole purpose is ability to build the real package.

dotnet-source-8.yaml Outdated Show resolved Hide resolved
@xnox xnox added the approved-to-run A repo member has approved this external contribution label Nov 8, 2024
/p:MinimalConsoleLogOutput=false \
/p:SkipPortableRuntimeBuild=true \
/p:BuildWithOnlineSources=false \
/p:Configuration=Debug
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to be reverted, added it here to have a way of build if anyone wants.

Size differences:

release version of dotnet

du -sh /usr/share/dotnet-source/
481.2M /usr/share/dotnet-source/

debug version of dotnet

du -sh /usr/share/dotnet-source/
559.3M /usr/share/dotnet-source/

Copy link
Member

Choose a reason for hiding this comment

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

do not want, too big.

@@ -0,0 +1,71 @@
package:
name: dotnet-bootstrap-8
version: 8.0.10
Copy link
Member

Choose a reason for hiding this comment

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

Please bump to .11 =) now that it is out.

package:
name: dotnet-source-8
version: 8.0.10
epoch: 1
Copy link
Member

Choose a reason for hiding this comment

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

also bump to 8.0.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved-to-run A repo member has approved this external contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants