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
1 change: 0 additions & 1 deletion base/comps/components.toml
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,6 @@ overlay-files = ["overlays/*.overlay.toml"]
[components.golang-github-stretchr-objx]
[components.golang-github-stretchr-testify]
[components.golang-github-syndtr-goleveldb]
[components.golang-github-task-slim-sprig]
[components.golang-github-task-slim-sprig3]
[components.golang-github-tidwall-pretty]
[components.golang-github-tklauser-numcpus]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 0f85e14d9ed22d40591320b7afef80351cba390d Mon Sep 17 00:00:00 2001
From: Mitch Zhu <mitchzhu@microsoft.com>
Date: Tue, 18 Aug 2026 00:00:00 +0000
Subject: [PATCH] numeric: force float64 rounding before Modf

Go may fuse the multiplication passed to math.Modf on arm64, preserving
additional precision and changing the result of round. An explicit float64
conversion forces rounding to float64 precision before the Modf call, as
recommended in golang/go#77657.
---
numeric.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/numeric.go b/numeric.go
index 7a73fc4..f3abf5c 100644
--- a/numeric.go
+++ b/numeric.go
@@ -171 +171 @@ func round(a interface{}, p int, rOpt ...float64) float64 {
- digit := pow * val
+ digit := float64(pow * val)
--
2.51.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[components.golang-github-task-slim-sprig]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question(blocking): Fedora upstream has orphaned this package entirely: https://src.fedoraproject.org/rpms/golang-github-task-slim-sprig

What in our distro is still requiring it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I checked the Azure Linux 4 SDK dependency graph. Ginkgo v1 and v2 require slim-sprig. Ginkgo v1 is required by golevedb, which feeds httpcache -> k8s-client, so slim-sprig is not currently a removable leaf and needs to remain packaged. (I did find some other orphaned golang pkgs we should remove, will follow up in another PR).


[[components.golang-github-task-slim-sprig.overlays]]
description = "Force float64 rounding before math.Modf to prevent fused arithmetic from changing round results"
type = "patch-add"
source = "0001-numeric-force-float64-rounding-before-modf.patch"

[[components.golang-github-task-slim-sprig.overlays]]
description = "Apply the float64 rounding patch after Go source preparation"
type = "spec-append-lines"
section = "%prep"
lines = ["%autopatch -p1"]

[components.golang-github-task-slim-sprig.overlays.metadata]
category = "azl-platform-adaptation"
upstream-status = "upstreamable"
bugs = [{ url = "https://github.com/golang/go/issues/77657" }]
2 changes: 1 addition & 1 deletion locks/golang-github-task-slim-sprig.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ version = 1
import-commit = '39ae86274378b905963f46b28867fed2dfd0efe0'
upstream-commit = '39ae86274378b905963f46b28867fed2dfd0efe0'
manual-bump = 1
input-fingerprint = 'sha256:3a9e76c34633dff77e1e5c5c8ef63ce9fa8230ce20f9ebfdcb77380e5e5fea64'
input-fingerprint = 'sha256:1b5a02d6a40794b112c95eaf0cf445e3e8b68c0d2b591222259f15c9c02e9936'
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 0f85e14d9ed22d40591320b7afef80351cba390d Mon Sep 17 00:00:00 2001
From: Mitch Zhu <mitchzhu@microsoft.com>
Date: Tue, 18 Aug 2026 00:00:00 +0000
Subject: [PATCH] numeric: force float64 rounding before Modf

Go may fuse the multiplication passed to math.Modf on arm64, preserving
additional precision and changing the result of round. An explicit float64
conversion forces rounding to float64 precision before the Modf call, as
recommended in golang/go#77657.
---
numeric.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/numeric.go b/numeric.go
index 7a73fc4..f3abf5c 100644
--- a/numeric.go
+++ b/numeric.go
@@ -171 +171 @@ func round(a interface{}, p int, rOpt ...float64) float64 {
- digit := pow * val
+ digit := float64(pow * val)
--
2.51.0
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## (rpmautospec version 0.8.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 10;
release_number = 12;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
Expand Down Expand Up @@ -36,6 +36,7 @@ License: MIT
URL: %{gourl}
Source0: %{gosource}

Patch0: 0001-numeric-force-float64-rounding-before-modf.patch
%description
%{common_description}

Expand All @@ -44,6 +45,7 @@ Source0: %{gosource}
%prep
%goprep

%autopatch -p1
%generate_buildrequires
%go_generate_buildrequires

Expand All @@ -60,6 +62,12 @@ rm -vf network_test.go

%changelog
## START: Generated by rpmautospec
* Tue Aug 18 2026 Mitch Zhu <mitchzhu@microsoft.com> - 3.2.0-12
- fix(golang-github-task-slim-sprig): stabilize arm64 rounding

* Wed Aug 19 2026 reuben olinsky <reubeno@users.noreply.github.com> - 3.2.0-11
- build: mass rebuild auto-bumpable components

* Thu Apr 30 2026 Daniel McIlvaney <damcilva@microsoft.com> - 3.2.0-10
- feat: introduce deterministic commit resolution via Azure Linux lock file

Expand Down
Loading