Date: Wed, 07 Jan 2026 19:48:50 +0000 From: Gleb Popov <arrowd@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: 015745398487 - 2025Q4 - lang/dotnet8: Fix build in year 2026 Message-ID: <695eb8a2.40938.114dd36a@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch 2025Q4 has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=015745398487980bc10cb822a5e66fb2529c3f31 commit 015745398487980bc10cb822a5e66fb2529c3f31 Author: Gleb Popov <arrowd@FreeBSD.org> AuthorDate: 2026-01-07 18:54:31 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2026-01-07 19:48:14 +0000 lang/dotnet8: Fix build in year 2026 Relevant issue: https://github.com/dotnet/dotnet/issues/4037 (cherry picked from commit 27d33ba01bb40c388f2d8f39e7e7316cfd71fd07) --- lang/dotnet8/Makefile | 5 ++++ ...-Fix-assembly-version-calculation-in-2026.patch | 29 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/lang/dotnet8/Makefile b/lang/dotnet8/Makefile index f932757d464a..55d7554f28b0 100644 --- a/lang/dotnet8/Makefile +++ b/lang/dotnet8/Makefile @@ -69,6 +69,11 @@ LIB_DEPENDS+= libcrypto.so.111:misc/compat13x BROKEN= "crossgen2" exited with code 139 .endif +# https://github.com/dotnet/dotnet/issues/4037 +post-patch: + ${CP} ${PATCHDIR}/0003-Fix-assembly-version-calculation-in-2026.patch \ + ${WRKSRC}/src/source-build-externals/patches/azure-activedirectory-identitymodel-extensions-for-dotnet/ + post-extract: ${CP} ${DISTDIR}/${DIST_SUBDIR}/release.json-${PORTVERSION} ${WRKSRC}/release.json diff --git a/lang/dotnet8/files/0003-Fix-assembly-version-calculation-in-2026.patch b/lang/dotnet8/files/0003-Fix-assembly-version-calculation-in-2026.patch new file mode 100644 index 000000000000..3d3026f30113 --- /dev/null +++ b/lang/dotnet8/files/0003-Fix-assembly-version-calculation-in-2026.patch @@ -0,0 +1,29 @@ +diff --git a/updateAssemblyInfo.sh b/updateAssemblyInfo.sh +index c5117975..e71b6c45 100755 +--- a/updateAssemblyInfo.sh ++++ b/updateAssemblyInfo.sh +@@ -5,12 +5,23 @@ scriptroot=$(cd -P "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) + + packageType=${1:-preview} + ++# Get current date components ++year=$(date '+%Y') ++year_offset=$((year - 2019)) ++month=$(date '+%m') ++day=$(date '+%d') ++ ++# Calculate revision using the new formula that prevents overflow ++# Base: 61232 (ensures revision is higher than already shipped packages) ++# This will overflow in 2029 and needs a long term fix ++revision=$((61232 + (year_offset * 416) + (10#$month * 32) + 10#$day)) ++ + date=$(date '+%y%m%d%H%M%S') + # Formats the date by replacing the 4-digit year with a 2-digit value and then subtract 19 + dateTimeStamp=$(echo $((10#${date:0:2}-19)))${date:2} + + assemblyVersion=$(sed -n 's/.*<assemblyVersion>\([^<]*\)<.*/\1/p' ${scriptroot}/buildConfiguration.xml) +-assemblyFileVersion="$assemblyVersion.${dateTimeStamp::$((${#dateTimeStamp} - 6))}" # Trim minutes/seconds ++assemblyFileVersion="$assemblyVersion.$revision" + assemblyInformationalVersion="$assemblyVersion.$dateTimeStamp" + + echo "assemblyVersion: $assemblyVersion"help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695eb8a2.40938.114dd36a>
