Skip to content

dotnet-8: use offline build #33140

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

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Conversation

ader1990
Copy link
Contributor

@ader1990 ader1990 commented Nov 4, 2024

Dotnet-8 tag 8.0.10 or older cannot be built anymore, as Microsoft decided to retire the following repositories:

The repositories were replaced with:

The problem is that the tagged releases of dotnet <= 8.0.10 will never be able to build anymore, as tags cannot be replaced.

The fix has landed to dotnet/msbuild#10838, and the following tagged releases should be buildable again.

See: microsoft/BuildXL#1343

But, if we leverage the offline build, after the prep.sh has been run, there is no required connection to the inexistent repositories, thus the build will work for the old tags too.

Fixes:

Related:

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

Dotnet-8 tag 8.0.10 or older cannot be built anymore,
as Microsoft decided to retire the following repositories:

  * https://pkgs.dev.azure.com/ms/BuildXL/_packaging/BuildXL.Selfhost/nuget/v3/index.json
  * https://pkgs.dev.azure.com/ms/BuildXL/_packaging/BuildXL/nuget/v3/index.json

The repositories were replaced with:

  * https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/BuildXL.External.Dependencies/nuget/v3/index.json

The problem is that the tagged releases of dotnet <= 8.0.10 will never be able
to build anymore, as tags cannot be replaced.

The fix has landed to dotnet/msbuild#10838, and the
following tagged releases should be buildable again.

See: microsoft/BuildXL#1343

But, if we leverage the offline build, after the prep.sh has been run,
there is no required connection to the inexistent repositories, thus the build will
work for the old tags too.
Copy link
Member

@xnox xnox left a comment

Choose a reason for hiding this comment

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

Hi,

Unlike other distributions we do not automatically upgrade the package version number upon changes in git. To actually trigger post-submit build and upgrade the package one needs to bump epoch; or if new upstream version is increased reset epoch back to zero. (this is equivalent to creating a new changelog entry in debian/changelog to increase the .deb build number, or increasing Release field in rpm spec file)

One can manually edit "epoch: 0" to "epoch: 1" or use wolfictl bump dotnet-8.yaml (one can install wolfictl with go install github.com/wolfi-dev/wolfictl@latest or it is available as preinstalled in the sdk container, one can enter it with docker using make dev-container)

The GHA pre-submit checks attempt re-builds for any diff, but not elastic builds, nor post submit (post merge).

Thanks.

@ader1990
Copy link
Contributor Author

ader1990 commented Nov 4, 2024

Hi,

Unlike other distributions we do not automatically upgrade the package version number upon changes in git. To actually trigger post-submit build and upgrade the package one needs to bump epoch; or if new upstream version is increased reset epoch back to zero. (this is equivalent to creating a new changelog entry in debian/changelog to increase the .deb build number, or increasing Release field in rpm spec file)

One can manually edit "epoch: 0" to "epoch: 1" or use wolfictl bump dotnet-8.yaml (one can install wolfictl with go install github.com/wolfi-dev/wolfictl@latest or it is available as preinstalled in the sdk container, one can enter it with docker using make dev-container)

The GHA pre-submit checks attempt re-builds for any diff, but not elastic builds, nor post submit (post merge).

Thanks.

Hello,

In theory, this PR will not be changing anything in the outcome of the package build, it just fixes the build. If one tries now to build the package, it will fail, as the required build time download links won't work anymore.

Do you suggest to bump the epoch even in this case?

Thanks.

@xnox
Copy link
Member

xnox commented Nov 4, 2024

Hi,
Unlike other distributions we do not automatically upgrade the package version number upon changes in git. To actually trigger post-submit build and upgrade the package one needs to bump epoch; or if new upstream version is increased reset epoch back to zero. (this is equivalent to creating a new changelog entry in debian/changelog to increase the .deb build number, or increasing Release field in rpm spec file)
One can manually edit "epoch: 0" to "epoch: 1" or use wolfictl bump dotnet-8.yaml (one can install wolfictl with go install github.com/wolfi-dev/wolfictl@latest or it is available as preinstalled in the sdk container, one can enter it with docker using make dev-container)
The GHA pre-submit checks attempt re-builds for any diff, but not elastic builds, nor post submit (post merge).
Thanks.

Hello,

In theory, this PR will not be changing anything in the outcome of the package build, it just fixes the build. If one tries now to build the package, it will fail, as the required build time download links won't work anymore.

Do you suggest to bump the epoch even in this case?

Thanks.

Yes please. We bump epoch for any fixes to build failures, to ensure a rebuild is done with new changes with a full set of post-submit CI and is known to work.

As otherwise we loose an easy way to track which packaging / git commit was used to build -r0 (it is encoded inside the .apk but hard to extract).

At the moment, we don't bump epoch for test: dictionary only changes, as those are executed/exercised across the whole archive on every push.

@xnox
Copy link
Member

xnox commented Nov 4, 2024

@xnox
Copy link
Member

xnox commented Nov 4, 2024

@ader1990 bumping epoch for you; but it means i will have to get external reviewer, as i am prohibited from self-merging code now as the last pusher.

@ader1990
Copy link
Contributor Author

ader1990 commented Nov 4, 2024

@ader1990 bumping epoch for you; but it means i will have to get external reviewer, as i am prohibited from self-merging code now as the last pusher.

I can force-push it, if that is okay?

@xnox
Copy link
Member

xnox commented Nov 4, 2024

@ader1990 bumping epoch for you; but it means i will have to get external reviewer, as i am prohibited from self-merging code now as the last pusher.

I can force-push it, if that is okay?

yes please.

@xnox xnox enabled auto-merge (squash) November 4, 2024 15:43
@xnox xnox merged commit 713249a into wolfi-dev:main Nov 4, 2024
12 checks passed
@xnox
Copy link
Member

xnox commented Nov 4, 2024

@ader1990 managed to get a second reviewer, so this is merged now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants