summaryrefslogtreecommitdiff
path: root/gnu/packages/dotnet.scm
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@friendly-machines.com>2025-06-10 16:56:31 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-06-23 23:05:27 +0100
commit4f10384b546bb93b7dd06ae3b99a60c7c15f1d59 (patch)
tree40f451ba029df11e552bd20c61ae9164b3c0dc29 /gnu/packages/dotnet.scm
parentd0ba40a7a5a01c0bbe33196ee0be1cc23ca2d176 (diff)
gnu: mono@1.9.1: Make it reproducible.
* gnu/packages/patches/mono-1.9.1-reproducibility.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/dotnet.scm (mono-1.9.1)[source]: Add it. [arguments]<#:make-flags>: Add NO_SIGN_ASSEMBLY. <#:phases>[delete-mdb]: New phase. [disable-signing]: New phase. Change-Id: I094692a1aa74d7737fa781e88582e8a0a3a27dbb Reviewed-by: Ludovic Courtès <ludo@gnu.org> Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/dotnet.scm')
-rw-r--r--gnu/packages/dotnet.scm25
1 files changed, 23 insertions, 2 deletions
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 2ad9a17b457..3ee9cab76fc 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -419,7 +419,8 @@ a C-style programming language from Microsoft that is very similar to Java.")
(snippet prepare-mono-source)
(patches (search-patches
"mono-1.9.1-fixes.patch"
- "mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch"))))
+ "mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch"
+ "mono-1.9.1-reproducibility.patch"))))
(native-inputs
(modify-inputs (package-native-inputs mono-1.2.6)
(delete "pnet-git")
@@ -431,9 +432,29 @@ a C-style programming language from Microsoft that is very similar to Java.")
(arguments
(substitute-keyword-arguments (package-arguments mono-1.2.6)
((#:make-flags _ #f)
- #~(list #$(string-append "CC=" (cc-for-target)) "V=1"))
+ #~(list #$(string-append "CC=" (cc-for-target))
+ "NO_SIGN_ASSEMBLY=yes" ; non-reproducible otherwise.
+ "V=1"))
((#:phases phases #~%standard-phases)
#~(modify-phases #$phases
+ (add-before 'install 'delete-mdb
+ (lambda _
+ ;; Those are a source of non-reproducibility--because of the
+ ;; random GUIDs. We are also nerfing the module GUIDs anyway
+ ;; so I don't think .net still knows which mdb module is for
+ ;; what implementation module.
+ (for-each delete-file (find-files "." "[.]mdb$"))))
+ ;; Note: Would also work directly after unpack.
+ (add-after 'configure 'disable-signing
+ (lambda _
+ ;; This would be a source of non-reproducibility and have no /keyfile.
+ (substitute* "mcs/class/IBM.Data.DB2/Makefile"
+ (("^LIB_MCS_FLAGS =")
+ "LIB_MCS_FLAGS = /delaysign+ "))
+ ;; This would be a source of non-reproducibility.
+ (substitute* "mcs/class/FirebirdSql.Data.Firebird/Assembly/AssemblyInfo.cs"
+ (("AssemblyDelaySign[(]false[)]")
+ "AssemblyDelaySign(true)"))))
(add-before 'configure 'set-cflags
(lambda _
;; apparently can't be set via make flags in this version