Architecture specific change in rpms/rust-cache-padded.git
by githook-noreply@fedoraproject.org
The package rpms/rust-cache-padded.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-cache-padded.git/commit/?id=....
Change:
+%ifarch %{arm}
Thanks.
Full change:
============
commit 6b379125a72c9cd4ada215b118ff6d9bc4676b5c
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Tue Dec 21 18:29:47 2021 +0100
Ignore harmless test failures on armv7hl
diff --git a/rust-cache-padded.spec b/rust-cache-padded.spec
index 663dbd5..533f7a1 100644
--- a/rust-cache-padded.spec
+++ b/rust-cache-padded.spec
@@ -64,8 +64,14 @@ use the "default" feature of the "%{crate}" crate.
%if %{with check}
%check
+%ifarch %{arm}
+# * ignore harmless test failures on armv7hl:
+# https://github.com/smol-rs/cache-padded/issues/9
+%cargo_test -- -- --skip distance --skip "src/lib.rs"
+%else
%cargo_test
%endif
+%endif
%changelog
%autochangelog
2 years, 4 months
[Report] Packages Restricting Arches
by root
New package excluding arches (3)
============================
- rust-darling0.12
ExclusiveArch: %{rust_arches}
- rust-darling_core0.12
ExclusiveArch: %{rust_arches}
- rust-darling_macro0.12
ExclusiveArch: %{rust_arches}
List of packages currently excluding arches (2316)
===========================================
- 0ad
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le
- 90-Second-Portraits
ExclusiveArch: %{arm} %{ix86} x86_64 aarch64 ppc64le
- GoldenCheetah
ExclusiveArch: %{qt5_qtwebengine_arches}
- GtkAda
ExclusiveArch: %{GPRbuild_arches}
- GtkAda3
ExclusiveArch: %{GPRbuild_arches}
- OpenColorIO
ExclusiveArch: x86_64 ppc64le
- OpenImageIO
ExclusiveArch: x86_64 ppc64le
- OpenMolcas
ExclusiveArch: x86_64 aarch64 ppc64le s390x
- PragmARC
ExclusiveArch: %{GPRbuild_arches}
- R-V8
ExclusiveArch: %{nodejs_arches}
- RdRand
ExclusiveArch: %{ix86} x86_64
- RediSearch
ExclusiveArch: x86_64
- SLOF
ExclusiveArch: ppc64le
- YafaRay
ExclusiveArch: %{ix86} x86_64
- aboot
ExclusiveArch: alpha
- accel-config
ExclusiveArch: %{ix86} x86_64
- acpid
ExclusiveArch: ia64 x86_64 %{ix86} %{arm} aarch64
- ahven
ExclusiveArch: %{GPRbuild_arches}
- algobox
ExclusiveArch: %{qt5_qtwebengine_arches}
- alleyoop
ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le s390x %{arm} aarch64
- american-fuzzy-lop
ExclusiveArch: %{ix86} x86_64 s390x
- anet
ExclusiveArch: %{GPRbuild_arches}
- anki
ExclusiveArch: %{qt5_qtwebengine_arches} noarch
- apmd
ExclusiveArch: %{ix86}
- appstream-generator
ExclusiveArch: %{ldc_arches}
- arm-trusted-firmware
ExclusiveArch: aarch64
- aunit
ExclusiveArch: %GPRbuild_arches
- avgtime
ExclusiveArch: %{ldc_arches}
- aws
ExclusiveArch: %GPRbuild_arches
- bcal
ExclusiveArch: x86_64 aarch64 ia64 ppc64 ppc64le s390x
- bcc
ExclusiveArch: x86_64 %{power64} aarch64 s390x armv7hl
- bcm283x-firmware
ExclusiveArch: %{arm} aarch64
- berusky2
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 %{mips}
- biosdevname
ExclusiveArch: %{ix86} x86_64
- blender
ExclusiveArch: x86_64 aarch64 ppc64le s390x
- bless
ExclusiveArch: %mono_arches
- bpftrace
ExclusiveArch: x86_64 %{power64} aarch64 s390x
- calamares
ExclusiveArch: %{ix86} x86_64 aarch64
- calibre
ExclusiveArch: %{qt5_qtwebengine_arches}
- ccdciel
ExclusiveArch: %{fpc_arches}
- cdcollect
ExclusiveArch: %{mono_arches}
- ceph
ExclusiveArch: x86_64 aarch64 ppc64le s390x
- chromium
ExclusiveArch: x86_64 i686
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64 i686 aarch64
- cjdns
ExclusiveArch: %{nodejs_arches}
- clevis-pin-tpm2
ExclusiveArch: %{rust_arches}
- cmospwd
ExclusiveArch: %{ix86} x86_64
- cmrt
ExclusiveArch: %{ix86} x86_64 ia64
- coffee-script
ExclusiveArch: %{nodejs_arches} noarch
- colorful
ExclusiveArch: %{fpc_arches}
- cpu-x
ExclusiveArch: i686 x86_64
- cpufetch
ExclusiveArch: %{arm} aarch64 x86_64 ppc ppc64 ppc64le
- cpuid
ExclusiveArch: %{ix86} x86_64
- cqrlog
ExclusiveArch: %{fpc_arches}
- crash
ExclusiveArch: %{ix86} ia64 x86_64 ppc ppc64 s390 s390x %{arm} aarch64 ppc64le
- crash-gcore-command
ExclusiveArch: aarch64 ppc64le x86_64
- crash-trace-command
ExclusiveArch: aarch64 ppc64le s390x x86_64
- cri-tools
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
- criu
ExclusiveArch: x86_64 %{arm} ppc64le aarch64 s390x
- cryptlib
ExclusiveArch: x86_64 %{ix86} aarch64 ppc64 ppc64le
- cryptobone
ExclusiveArch: x86_64 %{ix86} ppc64 ppc64le aarch64
- csslint
ExclusiveArch: %{nodejs_arches} noarch
- daq
ExclusiveArch: x86_64 aarch64
- darktable
ExclusiveArch: x86_64 aarch64
ExclusiveArch: x86_64 ppc64le
- dbus-parsec
ExclusiveArch: %{rust_arches}
- dbus-sharp
ExclusiveArch: %mono_arches
- dbus-sharp-glib
ExclusiveArch: %mono_arches
- dbxtool
ExclusiveArch: i386 x86_64 aarch64
- deepin-daemon
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
- deepin-desktop-schemas
ExclusiveArch: %{go_arches}
- dlm
ExclusiveArch: i686 x86_64
- dmidecode
ExclusiveArch: %{ix86} x86_64 ia64 aarch64
- dmtcp
ExclusiveArch: x86_64
- docker-distribution
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
- dolphin-emu
ExclusiveArch: x86_64 aarch64
- dotnet-build-reference-packages
ExclusiveArch: aarch64 x86_64
ExclusiveArch: x86_64
- dotnet3.1
ExclusiveArch: aarch64 x86_64
ExclusiveArch: x86_64
- dotnet5.0
ExclusiveArch: aarch64 x86_64
ExclusiveArch: x86_64
- dotnet5.0-build-reference-packages
ExclusiveArch: aarch64 x86_64
ExclusiveArch: x86_64
- dotnet6.0
ExclusiveArch: aarch64 x86_64 s390x
ExclusiveArch: x86_64
- doublecmd
ExclusiveArch: %{ix86} x86_64
- dpdk
ExclusiveArch: x86_64 i686 aarch64 ppc64le
- dxvk-native
ExclusiveArch: %{ix86} x86_64
- dyninst
ExclusiveArch: %{ix86} x86_64 ppc64le aarch64
- e3
ExclusiveArch: %{ix86} x86_64
- eclipse-swt
ExclusiveArch: s390x x86_64 aarch64 ppc64le
- edk2
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
ExclusiveArch: x86_64 aarch64
- efibootmgr
ExclusiveArch: %{efi}
- efifs
ExclusiveArch: %{efi}
- efitools
ExclusiveArch: %{efi}
- efivar
ExclusiveArch: %{efi}
- elk
ExclusiveArch: x86_64 %{ix86}
ExclusiveArch: x86_64 %{ix86} aarch64 %{arm} %{power64}
- emacs-slime
ExclusiveArch: %{arm} %{ix86} x86_64 ppc sparcv9 aarch64
- enki
ExclusiveArch: %{qt5_qtwebengine_arches} noarch
- envytools
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
- eric
ExclusiveArch: %{qt5_qtwebengine_arches} noarch
- eth-tools
ExclusiveArch: x86_64
- extlinux-bootloader
ExclusiveArch: %{arm} aarch64
- fcitx-libpinyin
ExclusiveArch: %{qt5_qtwebengine_arches}
- fedora-dockerfiles
ExclusiveArch: %{go_arches}
- fes
ExclusiveArch: %{ix86} x86_64
- fkill-cli
ExclusiveArch: %{nodejs_arches} noarch
- florist
ExclusiveArch: %{GPRbuild_arches}
- fluent-bit
ExclusiveArch: x86_64 aarch64
- fpc
ExclusiveArch: %{arm} aarch64 %{ix86} x86_64 ppc64le
- frescobaldi
ExclusiveArch: %{qt5_qtwebengine_arches}
- frysk
ExclusiveArch: %{ix86} x86_64 ppc64
- fwts
ExclusiveArch: x86_64 %{arm} aarch64 s390x riscv64 %{power64}
- fwupd-efi
ExclusiveArch: x86_64 aarch64
- fx
ExclusiveArch: %{nodejs_arches} noarch
- fx-completion
ExclusiveArch: %{nodejs_arches} noarch
- ga
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le
- gbrainy
ExclusiveArch: %mono_arches
- gdb-exploitable
ExclusiveArch: x86_64 i386
ExclusiveArch: x86_64 noarch
- gearhead1
ExclusiveArch: %{fpc_arches}
- gela-asis
ExclusiveArch: %GPRbuild_arches
- ghdl
ExclusiveArch: %{GNAT_arches}
- ghostwriter
ExclusiveArch: %{qt5_qtwebengine_arches}
- gio-sharp
ExclusiveArch: %mono_arches
- gir-to-d
ExclusiveArch: %{ldc_arches}
- git-octopus
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
- gitqlient
ExclusiveArch: %{qt5_qtwebengine_arches}
- giver
ExclusiveArch: %{mono_arches}
- gkeyfile-sharp
ExclusiveArch: %mono_arches
- glibc32
ExclusiveArch: x86_64
- glibd
ExclusiveArch: %{ldc_arches}
- gmqcc
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
- gnatcoll
ExclusiveArch: %{GPRbuild_arches}
- gnatcoll-bindings
ExclusiveArch: %{GPRbuild_arches}
- gnatcoll-db
ExclusiveArch: %{GPRbuild_arches}
- gnome-boxes
ExclusiveArch: x86_64
- gnome-desktop-sharp
ExclusiveArch: %mono_arches
- gnome-do
ExclusiveArch: %mono_arches
- gnome-keyring-sharp
ExclusiveArch: %mono_arches
- gnome-rdp
ExclusiveArch: %{mono_arches}
- gnome-sharp
ExclusiveArch: %mono_arches
- gnome-subtitles
ExclusiveArch: %mono_arches
- gnu-efi
ExclusiveArch: %{efi}
- go-bindata
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
- go-compilers
ExclusiveArch: %{go_arches}
- go-rpm-macros
ExclusiveArch: %{golang_arches} %{gccgo_arches}
- godep
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
- golang
ExclusiveArch: %{golang_arches}
- gomtree
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
- gotun
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
ExclusiveArch: x86_64
- goverlay
ExclusiveArch: %{fpc_arches}
- gprbuild
ExclusiveArch: %{GPRbuild_arches} %{bootstrap_arch}
- gprolog
ExclusiveArch: x86_64 %{ix86} ppc alpha
- grafana
ExclusiveArch: %{grafana_arches}
- grafana-pcp
ExclusiveArch: %{grafanapcp_arches}
- gtk-sharp-beans
ExclusiveArch: %mono_arches
- gtk-sharp2
ExclusiveArch: %mono_arches
- gtk-sharp3
ExclusiveArch: %{mono_arches}
- gtkd
ExclusiveArch: %{ldc_arches}
- gudev-sharp
ExclusiveArch: %mono_arches
- guestfs-tools
ExclusiveArch: %{kernel_arches}
- hedgewars
ExclusiveArch: %{fpc_arches}
- hsakmt
ExclusiveArch: x86_64 aarch64
- hyena
ExclusiveArch: %{mono_arches}
- hyperscan
ExclusiveArch: x86_64
- hyperv-daemons
ExclusiveArch: i686 x86_64
- i3status-rs
ExclusiveArch: %{rust_arches}
- icaro
ExclusiveArch: %{ix86} x86_64 noarch
- imvirt
ExclusiveArch: %{ix86} x86_64 ia64
- indistarter
ExclusiveArch: %{fpc_arches}
- infinipath-psm
ExclusiveArch: x86_64
- intel-cmt-cat
ExclusiveArch: x86_64 i686 i586
ExclusiveArch: x86_64 i686 i586
- intel-gmmlib
ExclusiveArch: x86_64 i686
- intel-ipp-crypto-mb
ExclusiveArch: x86_64
ExclusiveArch: x86_64
- intel-ipsec-mb
ExclusiveArch: x86_64
ExclusiveArch: x86_64
- intel-mediasdk
ExclusiveArch: x86_64
- intel-undervolt
ExclusiveArch: i386 x86_64
- ioport
ExclusiveArch: %{ix86} x86_64
- ipmctl
ExclusiveArch: x86_64
- ispc
ExclusiveArch: x86_64 aarch64
- iucode-tool
ExclusiveArch: %{ix86} x86_64
- iyfct
ExclusiveArch: %{arm} %{ix86} x86_64 aarch64 ppc64le
- java-1.8.0-openjdk-aarch32
ExclusiveArch: %{arm}
- jigawatts
ExclusiveArch: x86_64 %{arm} ppc64le aarch64 s390x
- kchmviewer
ExclusiveArch: %{qt5_qtwebengine_arches}
- keepass
ExclusiveArch: %{mono_arches}
- kernel
ExclusiveArch: noarch x86_64 s390x %{arm} aarch64 ppc64le
ExclusiveArch: noarch i386 i686 x86_64 s390x %{arm} aarch64 ppc64le
- keyring-ima-signer
ExclusiveArch: %{rust_arches}
- kf5-akonadi-search
ExclusiveArch: x86_64 ppc64le aarch64 %{arm}
- kf5-audiocd-kio
ExclusiveArch: x86_64 ppc64le aarch64 %{arm}
- kf5-kalarmcal
ExclusiveArch: x86_64 ppc64le aarch64 %{arm}
- kf5-kblog
ExclusiveArch: x86_64 ppc64le aarch64 %{arm}
- kf5-kcalendarcore
ExclusiveArch: x86_64 ppc64le aarch64 %{arm}
- kf5-kcalendarutils
ExclusiveArch: x86_64 ppc64le aarch64 %{arm}
- kf5-kitinerary
ExclusiveArch: x86_64 ppc64le aarch64 %{arm}
- kf5-ktnef
ExclusiveArch: x86_64 ppc64le aarch64 %{arm}
- kf5-libkdcraw
ExclusiveArch: x86_64 ppc64le %{arm}
- kicad
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le
- kiwix-desktop
ExclusiveArch: %{qt5_qtwebengine_arches}
- klee
ExclusiveArch: x86_64
- knot-resolver
ExclusiveArch: %{ix86} x86_64
ExclusiveArch: %{arm} aarch64 %{ix86} x86_64
- knotes
ExclusiveArch: x86_64 %{arm}
- kompose
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 s390x
- kubernetes
ExclusiveArch: x86_64 aarch64 ppc64le s390x %{arm}
- lazarus
ExclusiveArch: %{fpc_arches}
- lazpaint
ExclusiveArch: %{fpc_arches}
- ldc
ExclusiveArch: %{ldc_arches}
- libbsr
ExclusiveArch: %{power64}
- libclc
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 %{power64} s390x
- libcxl
ExclusiveArch: %{power64}
- libdfp
ExclusiveArch: ppc ppc64 ppc64le s390 s390x x86_64
- libdispatch
ExclusiveArch: x86_64 aarch64
- libguestfs
ExclusiveArch: %{kernel_arches}
- libica
ExclusiveArch: s390 s390x
- libipt
ExclusiveArch: %{ix86} x86_64
ExclusiveArch: %{ix86} x86_64
- libkgapi
ExclusiveArch: x86_64 ppc64le aarch64 %{arm}
- libnxz
ExclusiveArch: ppc64le
- libocxl
ExclusiveArch: ppc64le
- libpmemobj-cpp
ExclusiveArch: x86_64 ppc64le
- libpsm2
ExclusiveArch: x86_64
- libquentier
ExclusiveArch: %{qt5_qtwebengine_arches}
- libretro-desmume2015
ExclusiveArch: i686 x86_64
- librtas
ExclusiveArch: %{power64}
- libservicelog
ExclusiveArch: ppc %{power64}
- libsmbios
ExclusiveArch: x86_64 %{ix86}
- libunwind
ExclusiveArch: %{arm} aarch64 hppa ia64 mips ppc %{power64} s390x %{ix86} x86_64
- libva-intel-hybrid-driver
ExclusiveArch: %{ix86} x86_64 ia64
- libvma
ExclusiveArch: x86_64 ppc64le ppc64 aarch64
- libvmi
ExclusiveArch: x86_64
- libvpd
ExclusiveArch: %{power64}
- libxsmm
ExclusiveArch: x86_64
- libzdnn
ExclusiveArch: s390x
- libzfcphbaapi
ExclusiveArch: s390 s390x
- lightdm
ExclusiveArch: x86_64 ppc64le
- llhttp
ExclusiveArch: %{nodejs_arches}
- log4net
ExclusiveArch: %mono_arches
- lrmi
ExclusiveArch: %{ix86}
- lsvpd
ExclusiveArch: %{power64}
- luajit
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64
- luxcorerender
ExclusiveArch: x86_64
- mactel-boot
ExclusiveArch: x86_64
- manifest-tool
ExclusiveArch: x86_64 aarch64 ppc64le s390x
- marked
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
- matreshka
ExclusiveArch: %GPRbuild_arches
- maxima
ExclusiveArch: %{arm} %{ix86} x86_64 aarch64 ppc sparcv9
ExclusiveArch: %{ix86} x86_64 ppc sparcv9
- mbpfan
ExclusiveArch: x86_64
- mcelog
ExclusiveArch: i686 x86_64
- mdevctl
ExclusiveArch: %{rust_arches}
- mediaconch
ExclusiveArch: %{qt5_qtwebengine_arches}
- mellowplayer
ExclusiveArch: %{qt5_qtwebengine_arches}
- memkind
ExclusiveArch: x86_64 ppc64 ppc64le s390x aarch64
- memtest86+
ExclusiveArch: %{ix86} x86_64
- mesos
ExclusiveArch: x86_64
- microcode_ctl
ExclusiveArch: %{ix86} x86_64
- micropython
ExclusiveArch: %{arm} %{ix86} x86_64
- mine_detector
ExclusiveArch: %{GPRbuild_arches}
- minetest
ExclusiveArch: %{ix86} x86_64
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64
- mingw-libidn2
ExclusiveArch: %{ix86} x86_64 %{arm}
- mingw-wine-gecko
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
- mirrorlist-server
ExclusiveArch: %{rust_arches}
- mkbootdisk
ExclusiveArch: %{ix86} sparc sparc64 x86_64
- mod_mono
ExclusiveArch: %mono_arches
- module-build-service
ExclusiveArch: %{ix86} x86_64 noarch
- mokutil
ExclusiveArch: %{ix86} x86_64 aarch64 %{arm}
- mono
ExclusiveArch: %mono_arches
- mono-addins
ExclusiveArch: %mono_arches
- mono-basic
ExclusiveArch: %{mono_arches}
- mono-bouncycastle
ExclusiveArch: %mono_arches
- mono-cecil
ExclusiveArch: %mono_arches
- mono-cecil-flowanalysis
ExclusiveArch: %mono_arches
- mono-reflection
ExclusiveArch: %mono_arches
- mono-tools
ExclusiveArch: %mono_arches
- mono-zeroconf
ExclusiveArch: %mono_arches
- monobristol
ExclusiveArch: %{mono_arches}
- monodevelop
ExclusiveArch: %mono_arches
- monodevelop-debugger-gdb
ExclusiveArch: %{mono_arches}
- monosim
ExclusiveArch: %mono_arches
- mrrescue
ExclusiveArch: %{arm} %{ix86} x86_64 aarch64 ppc64le
- msr-tools
ExclusiveArch: %{ix86} x86_64
- mustache-d
ExclusiveArch: %{ldc_arches}
- mysql-connector-net
ExclusiveArch: %{mono_arches}
- nant
ExclusiveArch: %mono_arches
- nativejit
ExclusiveArch: x86_64
- nbc
ExclusiveArch: %{fpc_arches}
- nbdkit
ExclusiveArch: x86_64
- ndesk-dbus
ExclusiveArch: %{mono_arches}
- ndesk-dbus-glib
ExclusiveArch: %{mono_arches}
- newsflash
ExclusiveArch: %{rust_arches}
- newtonsoft-json
ExclusiveArch: %{mono_arches}
- nispor
ExclusiveArch: %{rust_arches}
- nodejs
ExclusiveArch: %{nodejs_arches}
- nodejs-acorn-object-spread
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
- nodejs-backbone
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-bash-language-server
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-buble
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-colors
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-generic-pool
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-linefix
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
- nodejs-nodemon
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-packaging
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-replace-require-self
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-supervisor
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-svgo
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-tape
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-typescript
ExclusiveArch: %{nodejs_arches} noarch
- nodejs-underscore
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
- notify-sharp
ExclusiveArch: %{mono_arches}
- notify-sharp3
ExclusiveArch: %{mono_arches}
- npm-name-cli
ExclusiveArch: %{nodejs_arches} noarch
- nuget
ExclusiveArch: %{mono_arches}
- numatop
ExclusiveArch: x86_64 ppc64le
- nunit
ExclusiveArch: %{mono_arches}
- nunit2
ExclusiveArch: %{mono_arches}
- nvml
ExclusiveArch: x86_64 ppc64le
- nwchem
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le
- obs-service-rust2rpm
ExclusiveArch: %{rust_arches} noarch
- oci-seccomp-bpf-hook
ExclusiveArch: x86_64 %%{power64} aarch64 s390x armv7hl
- oci-umount
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le s390x %{mips}
- oidn
ExclusiveArch: x86_64
- olpc-kbdshim
ExclusiveArch: %{ix86} %{arm}
- olpc-utils
ExclusiveArch: %{ix86} %{arm}
- onednn
ExclusiveArch: x86_64 aarch64 ppc64le s390x
- onedrive
ExclusiveArch: %{ldc_arches}
- opae
ExclusiveArch: x86_64
- opal-prd
ExclusiveArch: ppc64le
- open-vm-tools
ExclusiveArch: x86_64
ExclusiveArch: %{ix86} x86_64 aarch64
- openblas
ExclusiveArch: %{openblas_arches}
- openjfx
ExclusiveArch: x86_64
- openjfx8
ExclusiveArch: x86_64
- openlibm
ExclusiveArch: %{arm} %{ix86} x86_64 aarch64 %{power64}
- openni
ExclusiveArch: %{ix86} x86_64 %{arm}
- openni-primesense
ExclusiveArch: %{ix86} x86_64 %{arm}
- openshadinglanguage
ExclusiveArch: x86_64 aarch64 ppc64le s390x
- openssl-ibmca
ExclusiveArch: s390 s390x
- origin
ExclusiveArch: %{go_arches}
ExclusiveArch: x86_64 aarch64 ppc64le s390x
- orion
ExclusiveArch: %{qt5_qtwebengine_arches}
- orthorobot
ExclusiveArch: %{arm} %{ix86} x86_64 aarch64 ppc64le
- pacemaker
ExclusiveArch: aarch64 i686 ppc64le s390x x86_64 %{arm}
ExclusiveArch: aarch64 i686 ppc64le s390x x86_64
- paflib
ExclusiveArch: ppc %{power64}
- parsec
ExclusiveArch: %{rust_arches}
- parsec-tool
ExclusiveArch: %{rust_arches}
- pcc
ExclusiveArch: %{ix86} x86_64
- pcm
ExclusiveArch: %{ix86} x86_64
- pcmciautils
ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 %{arm}
- pdbg
ExclusiveArch: ppc64le
- pdfmod
ExclusiveArch: %mono_arches
- perl-Dumbbench
ExclusiveArch: %{ix86} x86_64 noarch
- perl-Parse-DMIDecode
ExclusiveArch: %{ix86} x86_64 ia64 aarch64
- pesign
ExclusiveArch: %{ix86} x86_64 ia64 aarch64 %{arm}
- pesign-test-app
ExclusiveArch: x86_64
- pinta
ExclusiveArch: %mono_arches
- pioneer
ExclusiveArch: %{ix86} x86_64
- playonlinux
ExclusiveArch: %{arm} aarch64 %{ix86} x86_64
- pmdk-convert
ExclusiveArch: x86_64
- pmemkv
ExclusiveArch: x86_64
- podman
ExclusiveArch: %{golang_arches}
- poppler-sharp
ExclusiveArch: %mono_arches
- popub
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
- powerpc-utils
ExclusiveArch: ppc %{power64}
- ppc64-diag
ExclusiveArch: ppc %{power64}
- pveclib
ExclusiveArch: ppc %{power64}
- pvs-sbcl
ExclusiveArch: %{ix86} x86_64 ppc sparcv9
- pyqtwebengine
ExclusiveArch: %{qt5_qtwebengine_arches}
- python-cryptography
ExclusiveArch: %{rust_arches}
- python-etcd
ExclusiveArch: noarch %{ix86} x86_64 %{arm} aarch64 ppc64le s390x
- python-healpy
ExclusiveArch: aarch64 ppc64 ppc64le x86_64 s390x
- python-javabridge
ExclusiveArch: i686 x86_64
- python-openoffice
ExclusiveArch: noarch x86_64
- python-pymoc
ExclusiveArch: aarch64 ppc64 ppc64le x86_64 s390x
- python-setuptools-rust
ExclusiveArch: %{rust_arches}
- q4wine
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
- qatzip
ExclusiveArch: x86_64
- qcint
ExclusiveArch: x86_64
- qclib
ExclusiveArch: s390 s390x
- qemu-sanity-check
ExclusiveArch: %{kernel_arches}
- qevercloud
ExclusiveArch: %{qt5_qtwebengine_arches}
- qmapshack
ExclusiveArch: %{qt5_qtwebengine_arches}
- qt4pas
ExclusiveArch: %{fpc_arches}
- qt5-qtwebengine
ExclusiveArch: %{qt5_qtwebengine_arches}
- quantum-espresso
ExclusiveArch: x86_64 %{ix86} aarch64 %{power64}
- quentier
ExclusiveArch: %{qt5_qtwebengine_arches}
- rear
ExclusiveArch: %ix86 x86_64 ppc ppc64 ppc64le ia64
- reg
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
- renderdoc
ExclusiveArch: x86_64
- reptyr
ExclusiveArch: %{ix86} x86_64 %{arm}
- rescene
ExclusiveArch: %{mono_arches}
- restool
ExclusiveArch: aarch64
- restsharp
ExclusiveArch: %{mono_arches}
- rhythmbox-alternative-toolbar
ExclusiveArch: %{ix86} %{arm} x86_64 ppc64 ppc64le
- rocm-runtime
ExclusiveArch: x86_64 aarch64
- rocminfo
ExclusiveArch: x86_64 aarch64
- rpg-cli
ExclusiveArch: %{rust_arches}
- rpm-ostree
ExclusiveArch: %{rust_arches}
- rr
ExclusiveArch: %{ix86} x86_64 aarch64
- rssguard
ExclusiveArch: %{qt5_qtwebengine_arches}
- rubygem-childprocess
ExclusiveArch: %{ix86} x86_64 noarch
- runc
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le %{mips} s390x
- rust
ExclusiveArch: %{rust_arches}
- rust-Inflector
ExclusiveArch: %{rust_arches}
- rust-ab_glyph
ExclusiveArch: %{rust_arches}
- rust-ab_glyph_rasterizer
ExclusiveArch: %{rust_arches}
- rust-abomonation
ExclusiveArch: %{rust_arches}
- rust-actix
ExclusiveArch: %{rust_arches}
- rust-actix-codec
ExclusiveArch: %{rust_arches}
- rust-actix-connect
ExclusiveArch: %{rust_arches}
- rust-actix-http
ExclusiveArch: %{rust_arches}
- rust-actix-macros
ExclusiveArch: %{rust_arches}
- rust-actix-macros0.1
ExclusiveArch: %{rust_arches}
- rust-actix-router
ExclusiveArch: %{rust_arches}
- rust-actix-rt
ExclusiveArch: %{rust_arches}
- rust-actix-rt1
ExclusiveArch: %{rust_arches}
- rust-actix-server
ExclusiveArch: %{rust_arches}
- rust-actix-service
ExclusiveArch: %{rust_arches}
- rust-actix-testing
ExclusiveArch: %{rust_arches}
- rust-actix-threadpool
ExclusiveArch: %{rust_arches}
- rust-actix-tls
ExclusiveArch: %{rust_arches}
- rust-actix-utils
ExclusiveArch: %{rust_arches}
- rust-actix-web
ExclusiveArch: %{rust_arches}
- rust-actix-web-codegen
ExclusiveArch: %{rust_arches}
- rust-actix0.10
ExclusiveArch: %{rust_arches}
- rust-actix_derive
ExclusiveArch: %{rust_arches}
- rust-actix_derive0.5
ExclusiveArch: %{rust_arches}
- rust-addr2line
ExclusiveArch: %{rust_arches}
- rust-adler
ExclusiveArch: %{rust_arches}
- rust-adler32
ExclusiveArch: %{rust_arches}
- rust-aead
ExclusiveArch: %{rust_arches}
- rust-aes
ExclusiveArch: %{rust_arches}
- rust-aes-gcm
ExclusiveArch: %{rust_arches}
- rust-afterburn
ExclusiveArch: %{rust_arches}
- rust-ahash
ExclusiveArch: %{rust_arches}
- rust-ahash0.4
ExclusiveArch: %{rust_arches}
- rust-aho-corasick
ExclusiveArch: %{rust_arches}
- rust-alacritty
ExclusiveArch: %{rust_arches}
- rust-alacritty_config_derive
ExclusiveArch: %{rust_arches}
- rust-alacritty_terminal
ExclusiveArch: %{rust_arches}
- rust-alga
ExclusiveArch: %{rust_arches}
- rust-alga_derive
ExclusiveArch: %{rust_arches}
- rust-aliasable
ExclusiveArch: %{rust_arches}
- rust-alloc-no-stdlib
ExclusiveArch: %{rust_arches}
- rust-alloc-stdlib
ExclusiveArch: %{rust_arches}
- rust-alsa
ExclusiveArch: %{rust_arches}
- rust-alsa-sys
ExclusiveArch: %{rust_arches}
- rust-ambient-authority
ExclusiveArch: %{rust_arches}
- rust-ammonia
ExclusiveArch: %{rust_arches}
- rust-andrew
ExclusiveArch: %{rust_arches}
- rust-ansi_colours
ExclusiveArch: %{rust_arches}
- rust-ansi_term
ExclusiveArch: %{rust_arches}
- rust-ansi_term0.11
ExclusiveArch: %{rust_arches}
- rust-antidote
ExclusiveArch: %{rust_arches}
- rust-anyhow
ExclusiveArch: %{rust_arches}
- rust-aom-sys
ExclusiveArch: %{rust_arches}
- rust-app_dirs
ExclusiveArch: %{rust_arches}
- rust-approx
ExclusiveArch: %{rust_arches}
- rust-ar
ExclusiveArch: %{rust_arches}
- rust-arbitrary
ExclusiveArch: %{rust_arches}
- rust-arbitrary0.4
ExclusiveArch: %{rust_arches}
- rust-arc-swap
ExclusiveArch: %{rust_arches}
- rust-arg_enum_proc_macro
ExclusiveArch: %{rust_arches}
- rust-argh
ExclusiveArch: %{rust_arches}
- rust-argh_derive
ExclusiveArch: %{rust_arches}
- rust-argh_shared
ExclusiveArch: %{rust_arches}
- rust-argparse
ExclusiveArch: %{rust_arches}
- rust-array-init
ExclusiveArch: %{rust_arches}
- rust-arrayref
ExclusiveArch: %{rust_arches}
- rust-arrayvec
ExclusiveArch: %{rust_arches}
- rust-arrayvec0.5
ExclusiveArch: %{rust_arches}
- rust-article_scraper
ExclusiveArch: %{rust_arches}
- rust-ascii
ExclusiveArch: %{rust_arches}
- rust-ascii-canvas
ExclusiveArch: %{rust_arches}
- rust-askalono
ExclusiveArch: %{rust_arches}
- rust-askalono-cli
ExclusiveArch: %{rust_arches}
- rust-askama
ExclusiveArch: %{rust_arches}
- rust-askama_derive
ExclusiveArch: %{rust_arches}
- rust-askama_escape
ExclusiveArch: %{rust_arches}
- rust-askama_shared
ExclusiveArch: %{rust_arches}
- rust-asn1
ExclusiveArch: %{rust_arches}
- rust-asn1_derive
ExclusiveArch: %{rust_arches}
- rust-assert-impl
ExclusiveArch: %{rust_arches}
- rust-assert-json-diff
ExclusiveArch: %{rust_arches}
- rust-assert_approx_eq
ExclusiveArch: %{rust_arches}
- rust-assert_cli
ExclusiveArch: %{rust_arches}
- rust-assert_cmd
ExclusiveArch: %{rust_arches}
- rust-assert_fs
ExclusiveArch: %{rust_arches}
- rust-assert_matches
ExclusiveArch: %{rust_arches}
- rust-assign
ExclusiveArch: %{rust_arches}
- rust-async-attributes
ExclusiveArch: %{rust_arches}
- rust-async-channel
ExclusiveArch: %{rust_arches}
- rust-async-compression
ExclusiveArch: %{rust_arches}
- rust-async-executor
ExclusiveArch: %{rust_arches}
- rust-async-global-executor
ExclusiveArch: %{rust_arches}
- rust-async-io
ExclusiveArch: %{rust_arches}
- rust-async-lock
ExclusiveArch: %{rust_arches}
- rust-async-mutex
ExclusiveArch: %{rust_arches}
- rust-async-process
ExclusiveArch: %{rust_arches}
- rust-async-std
ExclusiveArch: %{rust_arches}
- rust-async-stream
ExclusiveArch: %{rust_arches}
- rust-async-stream-impl
ExclusiveArch: %{rust_arches}
- rust-async-task
ExclusiveArch: %{rust_arches}
- rust-async-trait
ExclusiveArch: %{rust_arches}
- rust-asyncgit
ExclusiveArch: %{rust_arches}
- rust-atk
ExclusiveArch: %{rust_arches}
- rust-atk-sys
ExclusiveArch: %{rust_arches}
- rust-atom
ExclusiveArch: %{rust_arches}
- rust-atomic-waker
ExclusiveArch: %{rust_arches}
- rust-attohttpc
ExclusiveArch: %{rust_arches}
- rust-atty
ExclusiveArch: %{rust_arches}
- rust-autocfg
ExclusiveArch: %{rust_arches}
- rust-automod
ExclusiveArch: %{rust_arches}
- rust-av-metrics
ExclusiveArch: %{rust_arches}
- rust-average
ExclusiveArch: %{rust_arches}
- rust-awc
ExclusiveArch: %{rust_arches}
- rust-aws-nitro-enclaves-cose
ExclusiveArch: %{rust_arches}
- rust-az
ExclusiveArch: %{rust_arches}
- rust-backtrace
ExclusiveArch: %{rust_arches}
- rust-base100
ExclusiveArch: %{rust_arches}
- rust-base64
ExclusiveArch: %{rust_arches}
- rust-base64-0.10
ExclusiveArch: %{rust_arches}
- rust-base64-0.11
ExclusiveArch: %{rust_arches}
- rust-base64_0.12
ExclusiveArch: %{rust_arches}
- rust-base64ct
ExclusiveArch: %{rust_arches}
- rust-bat
ExclusiveArch: %{rust_arches}
- rust-battery
ExclusiveArch: %{rust_arches}
- rust-beef
ExclusiveArch: %{rust_arches}
- rust-below
ExclusiveArch: %{rust_arches}
- rust-below-common
ExclusiveArch: %{rust_arches}
- rust-below-config
ExclusiveArch: %{rust_arches}
- rust-below-dump
ExclusiveArch: %{rust_arches}
- rust-below-model
ExclusiveArch: %{rust_arches}
- rust-below-render
ExclusiveArch: %{rust_arches}
- rust-below-store
ExclusiveArch: %{rust_arches}
- rust-below-view
ExclusiveArch: %{rust_arches}
- rust-below_derive
ExclusiveArch: %{rust_arches}
- rust-bencher
ExclusiveArch: %{rust_arches}
- rust-benfred-read-process-memory
ExclusiveArch: %{rust_arches}
- rust-bincode
ExclusiveArch: %{rust_arches}
- rust-bincode0.8
ExclusiveArch: %{rust_arches}
- rust-bindgen
ExclusiveArch: %{rust_arches}
- rust-binfarce
ExclusiveArch: %{rust_arches}
- rust-biscuit
ExclusiveArch: %{rust_arches}
- rust-bit-set
ExclusiveArch: %{rust_arches}
- rust-bit-vec
ExclusiveArch: %{rust_arches}
- rust-bitfield
ExclusiveArch: %{rust_arches}
- rust-bitflags
ExclusiveArch: %{rust_arches}
- rust-bitmaps
ExclusiveArch: %{rust_arches}
- rust-bitreader
ExclusiveArch: %{rust_arches}
- rust-bitstream-io
ExclusiveArch: %{rust_arches}
- rust-bitvec
ExclusiveArch: %{rust_arches}
- rust-blake2
ExclusiveArch: %{rust_arches}
- rust-blobby
ExclusiveArch: %{rust_arches}
- rust-blobby0.1
ExclusiveArch: %{rust_arches}
- rust-block-buffer
ExclusiveArch: %{rust_arches}
- rust-block-modes
ExclusiveArch: %{rust_arches}
- rust-block-padding
ExclusiveArch: %{rust_arches}
- rust-blocking
ExclusiveArch: %{rust_arches}
- rust-blsctl
ExclusiveArch: %{rust_arches}
- rust-bodhi
ExclusiveArch: %{rust_arches}
- rust-bodhi-cli
ExclusiveArch: %{rust_arches}
- rust-bootupd
ExclusiveArch: x86_64 aarch64
- rust-box_drawing
ExclusiveArch: %{rust_arches}
- rust-boxfnonce
ExclusiveArch: %{rust_arches}
- rust-brotli
ExclusiveArch: %{rust_arches}
- rust-brotli-decompressor
ExclusiveArch: %{rust_arches}
- rust-brotli-sys
ExclusiveArch: %{rust_arches}
- rust-brotli2
ExclusiveArch: %{rust_arches}
- rust-bstr
ExclusiveArch: %{rust_arches}
- rust-btrd
ExclusiveArch: %{rust_arches}
- rust-buf_redux
ExclusiveArch: %{rust_arches}
- rust-buffered-reader
ExclusiveArch: %{rust_arches}
- rust-bufsize
ExclusiveArch: %{rust_arches}
- rust-bufstream
ExclusiveArch: %{rust_arches}
- rust-bugreport
ExclusiveArch: %{rust_arches}
- rust-build-env
ExclusiveArch: %{rust_arches}
- rust-build_const
ExclusiveArch: %{rust_arches}
- rust-bumpalo
ExclusiveArch: %{rust_arches}
- rust-byte-unit
ExclusiveArch: %{rust_arches}
- rust-byte-unit3
ExclusiveArch: %{rust_arches}
- rust-bytecheck
ExclusiveArch: %{rust_arches}
- rust-bytecheck_derive
ExclusiveArch: %{rust_arches}
- rust-bytecount
ExclusiveArch: %{rust_arches}
- rust-bytelines
ExclusiveArch: %{rust_arches}
- rust-bytemuck
ExclusiveArch: %{rust_arches}
- rust-bytemuck_derive
ExclusiveArch: %{rust_arches}
- rust-byteorder
ExclusiveArch: %{rust_arches}
- rust-bytes
ExclusiveArch: %{rust_arches}
- rust-bytes0.4
ExclusiveArch: %{rust_arches}
- rust-bytes0.5
ExclusiveArch: %{rust_arches}
- rust-bytes0.6
ExclusiveArch: %{rust_arches}
- rust-bytesize
ExclusiveArch: %{rust_arches}
- rust-bytestring
ExclusiveArch: %{rust_arches}
- rust-bzip2
ExclusiveArch: %{rust_arches}
- rust-bzip2-sys
ExclusiveArch: %{rust_arches}
- rust-cache-padded
ExclusiveArch: %{rust_arches}
- rust-cairo-rs
ExclusiveArch: %{rust_arches}
- rust-cairo-sys-rs
ExclusiveArch: %{rust_arches}
- rust-calloop
ExclusiveArch: %{rust_arches}
- rust-calloop0.6
ExclusiveArch: %{rust_arches}
- rust-camino
ExclusiveArch: %{rust_arches}
- rust-cap-primitives
ExclusiveArch: %{rust_arches}
- rust-cap-rand
ExclusiveArch: %{rust_arches}
- rust-cap-std
ExclusiveArch: %{rust_arches}
- rust-capnp
ExclusiveArch: %{rust_arches}
- rust-capnp-futures
ExclusiveArch: %{rust_arches}
- rust-capnp-rpc
ExclusiveArch: %{rust_arches}
- rust-caps
ExclusiveArch: %{rust_arches}
- rust-cargo
ExclusiveArch: %{rust_arches}
- rust-cargo-bloat
ExclusiveArch: %{rust_arches}
- rust-cargo-c
ExclusiveArch: %{rust_arches}
- rust-cargo-edit
ExclusiveArch: %{rust_arches}
- rust-cargo-husky
ExclusiveArch: %{rust_arches}
- rust-cargo-insta
ExclusiveArch: %{rust_arches}
- rust-cargo-platform
ExclusiveArch: %{rust_arches}
- rust-cargo-readme
ExclusiveArch: %{rust_arches}
- rust-cargo-util
ExclusiveArch: %{rust_arches}
- rust-cargo_metadata
ExclusiveArch: %{rust_arches}
- rust-cascade
ExclusiveArch: %{rust_arches}
- rust-case
ExclusiveArch: %{rust_arches}
- rust-cassowary
ExclusiveArch: %{rust_arches}
- rust-cast
ExclusiveArch: %{rust_arches}
- rust-cbindgen
ExclusiveArch: %{rust_arches}
- rust-cc
ExclusiveArch: %{rust_arches}
- rust-cedarwood
ExclusiveArch: %{rust_arches}
- rust-cexpr
ExclusiveArch: %{rust_arches}
- rust-cfg-expr
ExclusiveArch: %{rust_arches}
- rust-cfg-if
ExclusiveArch: %{rust_arches}
- rust-cfg-if0.1
ExclusiveArch: %{rust_arches}
- rust-cgmath
ExclusiveArch: %{rust_arches}
- rust-cgroupfs
ExclusiveArch: %{rust_arches}
- rust-chainerror
ExclusiveArch: %{rust_arches}
- rust-charset
ExclusiveArch: %{rust_arches}
- rust-chbs
ExclusiveArch: %{rust_arches}
- rust-checked_int_cast
ExclusiveArch: %{rust_arches}
- rust-chlorine
ExclusiveArch: %{rust_arches}
- rust-choosier
ExclusiveArch: %{rust_arches}
- rust-chrono
ExclusiveArch: %{rust_arches}
- rust-chrono-humanize
ExclusiveArch: %{rust_arches}
- rust-chrono-tz
ExclusiveArch: %{rust_arches}
- rust-chunked_transfer
ExclusiveArch: %{rust_arches}
- rust-cipher
ExclusiveArch: %{rust_arches}
- rust-clang-ast
ExclusiveArch: %{rust_arches}
- rust-clang-sys
ExclusiveArch: %{rust_arches}
- rust-clap
ExclusiveArch: %{rust_arches}
- rust-clap-verbosity-flag
ExclusiveArch: %{rust_arches}
- rust-clap2
ExclusiveArch: %{rust_arches}
- rust-clap_derive
ExclusiveArch: %{rust_arches}
- rust-clap_generate
ExclusiveArch: %{rust_arches}
- rust-clap_generate_fig
ExclusiveArch: %{rust_arches}
- rust-claxon
ExclusiveArch: %{rust_arches}
- rust-clicolors-control
ExclusiveArch: %{rust_arches}
- rust-clipboard
ExclusiveArch: %{rust_arches}
- rust-clircle
ExclusiveArch: %{rust_arches}
- rust-cloudflare-zlib
ExclusiveArch: x86_64 aarch64
- rust-cloudflare-zlib-sys
ExclusiveArch: x86_64 aarch64
- rust-cmake
ExclusiveArch: %{rust_arches}
- rust-codespan-reporting
ExclusiveArch: %{rust_arches}
- rust-codicon
ExclusiveArch: %{rust_arches}
- rust-color-backtrace
ExclusiveArch: %{rust_arches}
- rust-color_quant
ExclusiveArch: %{rust_arches}
- rust-colored
ExclusiveArch: %{rust_arches}
- rust-colored1
ExclusiveArch: %{rust_arches}
- rust-colored_json
ExclusiveArch: %{rust_arches}
- rust-colorful
ExclusiveArch: %{rust_arches}
- rust-combine
ExclusiveArch: %{rust_arches}
- rust-comfy-table
ExclusiveArch: %{rust_arches}
- rust-compiletest_rs
ExclusiveArch: %{rust_arches}
- rust-compress-tools
ExclusiveArch: %{rust_arches}
- rust-comrak
ExclusiveArch: %{rust_arches}
- rust-concurrent-queue
ExclusiveArch: %{rust_arches}
- rust-configparser
ExclusiveArch: %{rust_arches}
- rust-confy
ExclusiveArch: %{rust_arches}
- rust-console
ExclusiveArch: %{rust_arches}
- rust-console0.11
ExclusiveArch: %{rust_arches}
- rust-console0.12
ExclusiveArch: %{rust_arches}
- rust-console0.13
ExclusiveArch: %{rust_arches}
- rust-console0.9
ExclusiveArch: %{rust_arches}
- rust-console_error_panic_hook
ExclusiveArch: %{rust_arches}
- rust-const-cstr
ExclusiveArch: %{rust_arches}
- rust-const-random
ExclusiveArch: %{rust_arches}
- rust-const-random-macro
ExclusiveArch: %{rust_arches}
- rust-const_fn
ExclusiveArch: %{rust_arches}
- rust-constant_time_eq
ExclusiveArch: %{rust_arches}
- rust-content_inspector
ExclusiveArch: %{rust_arches}
- rust-conv
ExclusiveArch: %{rust_arches}
- rust-convert_case
ExclusiveArch: %{rust_arches}
- rust-cookie
ExclusiveArch: %{rust_arches}
- rust-cookie0.14
ExclusiveArch: %{rust_arches}
- rust-cookie_store
ExclusiveArch: %{rust_arches}
- rust-copydeps
ExclusiveArch: %{rust_arches}
- rust-copyless
ExclusiveArch: %{rust_arches}
- rust-copypasta
ExclusiveArch: %{rust_arches}
- rust-cordic
ExclusiveArch: %{rust_arches}
- rust-coreos-installer
ExclusiveArch: %{rust_arches}
- rust-counted-array
ExclusiveArch: %{rust_arches}
- rust-cpal
ExclusiveArch: %{rust_arches}
- rust-cpio
ExclusiveArch: %{rust_arches}
- rust-cpp_demangle
ExclusiveArch: %{rust_arches}
- rust-cpufeatures
ExclusiveArch: %{rust_arches}
- rust-cpython
ExclusiveArch: %{rust_arches}
- rust-cranelift-bforest
ExclusiveArch: %{rust_arches}
- rust-cranelift-codegen
ExclusiveArch: %{rust_arches}
- rust-cranelift-codegen-meta
ExclusiveArch: %{rust_arches}
- rust-cranelift-codegen-shared
ExclusiveArch: %{rust_arches}
- rust-cranelift-entity
ExclusiveArch: %{rust_arches}
- rust-cranelift-frontend
ExclusiveArch: %{rust_arches}
- rust-cranelift-native
ExclusiveArch: %{rust_arches}
- rust-cranelift-wasm
ExclusiveArch: %{rust_arches}
- rust-crates-io
ExclusiveArch: %{rust_arches}
- rust-crc
ExclusiveArch: %{rust_arches}
- rust-crc-any
ExclusiveArch: %{rust_arches}
- rust-crc-catalog
ExclusiveArch: %{rust_arches}
- rust-crc-core
ExclusiveArch: %{rust_arches}
- rust-crc1
ExclusiveArch: %{rust_arches}
- rust-crc32fast
ExclusiveArch: %{rust_arches}
- rust-criterion
ExclusiveArch: %{rust_arches}
- rust-criterion-plot
ExclusiveArch: %{rust_arches}
- rust-crossbeam
ExclusiveArch: %{rust_arches}
- rust-crossbeam-channel
ExclusiveArch: %{rust_arches}
- rust-crossbeam-channel0.4
ExclusiveArch: %{rust_arches}
- rust-crossbeam-deque
ExclusiveArch: %{rust_arches}
- rust-crossbeam-deque0.7
ExclusiveArch: %{rust_arches}
- rust-crossbeam-epoch
ExclusiveArch: %{rust_arches}
- rust-crossbeam-epoch0.8
ExclusiveArch: %{rust_arches}
- rust-crossbeam-queue
ExclusiveArch: %{rust_arches}
- rust-crossbeam-queue0.2
ExclusiveArch: %{rust_arches}
- rust-crossbeam-utils
ExclusiveArch: %{rust_arches}
- rust-crossbeam-utils0.7
ExclusiveArch: %{rust_arches}
- rust-crossbeam0.7
ExclusiveArch: %{rust_arches}
- rust-crossfont
ExclusiveArch: %{rust_arches}
- rust-crossterm
ExclusiveArch: %{rust_arches}
- rust-crossterm0.17
ExclusiveArch: %{rust_arches}
- rust-crossterm0.19
ExclusiveArch: %{rust_arches}
- rust-crosstermion
ExclusiveArch: %{rust_arches}
- rust-crunchy
ExclusiveArch: %{rust_arches}
- rust-crypto-bigint
ExclusiveArch: %{rust_arches}
- rust-crypto-hash
ExclusiveArch: %{rust_arches}
- rust-crypto-mac
ExclusiveArch: %{rust_arches}
- rust-crypto-mac0.8
ExclusiveArch: %{rust_arches}
- rust-cryptoki
ExclusiveArch: %{rust_arches}
- rust-cryptoki-sys
ExclusiveArch: %{rust_arches}
- rust-cryptovec
ExclusiveArch: %{rust_arches}
- rust-cssparser
ExclusiveArch: %{rust_arches}
- rust-cssparser-macros
ExclusiveArch: %{rust_arches}
- rust-cstr-argument
ExclusiveArch: %{rust_arches}
- rust-csv
ExclusiveArch: %{rust_arches}
- rust-csv-core
ExclusiveArch: %{rust_arches}
- rust-ct-logs
ExclusiveArch: %{rust_arches}
- rust-ctor
ExclusiveArch: %{rust_arches}
- rust-ctr
ExclusiveArch: %{rust_arches}
- rust-ctrlc
ExclusiveArch: %{rust_arches}
- rust-cty
ExclusiveArch: %{rust_arches}
- rust-curl
ExclusiveArch: %{rust_arches}
- rust-curl-sys
ExclusiveArch: %{rust_arches}
- rust-cursive
ExclusiveArch: %{rust_arches}
- rust-cursive-tabs
ExclusiveArch: %{rust_arches}
- rust-cursive_buffered_backend
ExclusiveArch: %{rust_arches}
- rust-cursive_core
ExclusiveArch: %{rust_arches}
- rust-curve25519-dalek
ExclusiveArch: %{rust_arches}
- rust-custom_derive
ExclusiveArch: %{rust_arches}
- rust-cxx
ExclusiveArch: %{rust_arches}
- rust-cxx-build
ExclusiveArch: %{rust_arches}
- rust-cxx-gen
ExclusiveArch: %{rust_arches}
- rust-cxxbridge-flags
ExclusiveArch: %{rust_arches}
- rust-cxxbridge-macro
ExclusiveArch: %{rust_arches}
- rust-darling
ExclusiveArch: %{rust_arches}
- rust-darling0.12
ExclusiveArch: %{rust_arches}
- rust-darling_core
ExclusiveArch: %{rust_arches}
- rust-darling_core0.12
ExclusiveArch: %{rust_arches}
- rust-darling_macro
ExclusiveArch: %{rust_arches}
- rust-darling_macro0.12
ExclusiveArch: %{rust_arches}
- rust-dashmap
ExclusiveArch: %{rust_arches}
- rust-data-encoding
ExclusiveArch: %{rust_arches}
- rust-data-url
ExclusiveArch: %{rust_arches}
- rust-datetime
ExclusiveArch: %{rust_arches}
- rust-dav1d-sys
ExclusiveArch: %{rust_arches}
- rust-dbus
ExclusiveArch: %{rust_arches}
- rust-dbus-codegen
ExclusiveArch: %{rust_arches}
- rust-dbus-crossroads
ExclusiveArch: %{rust_arches}
- rust-dbus-tokio
ExclusiveArch: %{rust_arches}
- rust-dbus-tree
ExclusiveArch: %{rust_arches}
- rust-dbus0.8
ExclusiveArch: %{rust_arches}
- rust-debug-helper
ExclusiveArch: %{rust_arches}
- rust-decimal
ExclusiveArch: %{rust_arches}
- rust-defer-drop
ExclusiveArch: %{rust_arches}
- rust-deflate
ExclusiveArch: %{rust_arches}
- rust-defmac
ExclusiveArch: %{rust_arches}
- rust-delta_e
ExclusiveArch: %{rust_arches}
- rust-derivative
ExclusiveArch: %{rust_arches}
- rust-derive-new
ExclusiveArch: %{rust_arches}
- rust-derive_arbitrary
ExclusiveArch: %{rust_arches}
- rust-derive_arbitrary0.4
ExclusiveArch: %{rust_arches}
- rust-derive_builder
ExclusiveArch: %{rust_arches}
- rust-derive_builder0.9
ExclusiveArch: %{rust_arches}
- rust-derive_builder_core
ExclusiveArch: %{rust_arches}
- rust-derive_builder_core0.9
ExclusiveArch: %{rust_arches}
- rust-derive_builder_macro
ExclusiveArch: %{rust_arches}
- rust-derive_more
ExclusiveArch: %{rust_arches}
- rust-des
ExclusiveArch: %{rust_arches}
- rust-desed
ExclusiveArch: %{rust_arches}
- rust-deunicode
ExclusiveArch: %{rust_arches}
- rust-devicemapper
ExclusiveArch: %{rust_arches}
- rust-devicemapper-sys
ExclusiveArch: %{rust_arches}
- rust-dialoguer
ExclusiveArch: %{rust_arches}
- rust-diesel
ExclusiveArch: %{rust_arches}
- rust-diesel_derives
ExclusiveArch: %{rust_arches}
- rust-diesel_migrations
ExclusiveArch: %{rust_arches}
- rust-diff
ExclusiveArch: %{rust_arches}
- rust-difference
ExclusiveArch: %{rust_arches}
- rust-difflib
ExclusiveArch: %{rust_arches}
- rust-diffus
ExclusiveArch: %{rust_arches}
- rust-diffus-derive
ExclusiveArch: %{rust_arches}
- rust-digest
ExclusiveArch: %{rust_arches}
- rust-directories
ExclusiveArch: %{rust_arches}
- rust-directories-next
ExclusiveArch: %{rust_arches}
- rust-dirs
ExclusiveArch: %{rust_arches}
- rust-dirs-next
ExclusiveArch: %{rust_arches}
- rust-dirs-sys
ExclusiveArch: %{rust_arches}
- rust-dirs-sys-next
ExclusiveArch: %{rust_arches}
- rust-dirs2
ExclusiveArch: %{rust_arches}
- rust-dirs3
ExclusiveArch: %{rust_arches}
- rust-diskonaut
ExclusiveArch: %{rust_arches}
- rust-displaydoc
ExclusiveArch: %{rust_arches}
- rust-dissimilar
ExclusiveArch: %{rust_arches}
- rust-dlib
ExclusiveArch: %{rust_arches}
- rust-dlib0.4
ExclusiveArch: %{rust_arches}
- rust-dlv-list
ExclusiveArch: %{rust_arches}
- rust-dns-lookup
ExclusiveArch: %{rust_arches}
- rust-dns-parser
ExclusiveArch: %{rust_arches}
- rust-doc-comment
ExclusiveArch: %{rust_arches}
- rust-docmatic
ExclusiveArch: %{rust_arches}
- rust-docopt
ExclusiveArch: %{rust_arches}
- rust-dotenv
ExclusiveArch: %{rust_arches}
- rust-downcast
ExclusiveArch: %{rust_arches}
- rust-downcast-rs
ExclusiveArch: %{rust_arches}
- rust-drg
ExclusiveArch: %{rust_arches}
- rust-dtoa
ExclusiveArch: %{rust_arches}
- rust-dtoa-short
ExclusiveArch: %{rust_arches}
- rust-dua-cli
ExclusiveArch: %{rust_arches}
- rust-duct
ExclusiveArch: %{rust_arches}
- rust-dummy
ExclusiveArch: %{rust_arches}
- rust-dunce
ExclusiveArch: %{rust_arches}
- rust-dutree
ExclusiveArch: %{rust_arches}
- rust-dyn-clone
ExclusiveArch: %{rust_arches}
- rust-easy-cast
ExclusiveArch: %{rust_arches}
- rust-easy-parallel
ExclusiveArch: %{rust_arches}
- rust-edit
ExclusiveArch: %{rust_arches}
- rust-edit-distance
ExclusiveArch: %{rust_arches}
- rust-either
ExclusiveArch: %{rust_arches}
- rust-elasticlunr-rs
ExclusiveArch: %{rust_arches}
- rust-elf
ExclusiveArch: %{rust_arches}
- rust-elfcat
ExclusiveArch: %{rust_arches}
- rust-ena
ExclusiveArch: %{rust_arches}
- rust-encode_unicode
ExclusiveArch: %{rust_arches}
- rust-encoding
ExclusiveArch: %{rust_arches}
- rust-encoding-index-japanese
ExclusiveArch: %{rust_arches}
- rust-encoding-index-korean
ExclusiveArch: %{rust_arches}
- rust-encoding-index-simpchinese
ExclusiveArch: %{rust_arches}
- rust-encoding-index-singlebyte
ExclusiveArch: %{rust_arches}
- rust-encoding-index-tradchinese
ExclusiveArch: %{rust_arches}
- rust-encoding_index_tests
ExclusiveArch: %{rust_arches}
- rust-encoding_rs
ExclusiveArch: %{rust_arches}
- rust-encoding_rs_io
ExclusiveArch: %{rust_arches}
- rust-endian-type
ExclusiveArch: %{rust_arches}
- rust-entities
ExclusiveArch: %{rust_arches}
- rust-enum-as-inner
ExclusiveArch: %{rust_arches}
- rust-enum-iterator
ExclusiveArch: %{rust_arches}
- rust-enum-iterator-derive
ExclusiveArch: %{rust_arches}
- rust-enum-map
ExclusiveArch: %{rust_arches}
- rust-enum-map-derive
ExclusiveArch: %{rust_arches}
- rust-enum-repr
ExclusiveArch: %{rust_arches}
- rust-enum_primitive
ExclusiveArch: %{rust_arches}
- rust-enumflags2
ExclusiveArch: %{rust_arches}
- rust-enumflags2_derive
ExclusiveArch: %{rust_arches}
- rust-enumset
ExclusiveArch: %{rust_arches}
- rust-enumset_derive
ExclusiveArch: %{rust_arches}
- rust-env_logger
ExclusiveArch: %{rust_arches}
- rust-env_logger0.4
ExclusiveArch: %{rust_arches}
- rust-env_logger0.5
ExclusiveArch: %{rust_arches}
- rust-env_logger0.6
ExclusiveArch: %{rust_arches}
- rust-env_logger0.7
ExclusiveArch: %{rust_arches}
- rust-env_logger0.8
ExclusiveArch: %{rust_arches}
- rust-env_proxy
ExclusiveArch: %{rust_arches}
- rust-environment
ExclusiveArch: %{rust_arches}
- rust-envsubst
ExclusiveArch: %{rust_arches}
- rust-epoll
ExclusiveArch: %{rust_arches}
- rust-erased-serde
ExclusiveArch: %{rust_arches}
- rust-err-derive
ExclusiveArch: %{rust_arches}
- rust-errln
ExclusiveArch: %{rust_arches}
- rust-errno
ExclusiveArch: %{rust_arches}
- rust-error-chain
ExclusiveArch: %{rust_arches}
- rust-escaper
ExclusiveArch: %{rust_arches}
- rust-escargot
ExclusiveArch: %{rust_arches}
- rust-euclid
ExclusiveArch: %{rust_arches}
- rust-event-listener
ExclusiveArch: %{rust_arches}
- rust-exa
ExclusiveArch: %{rust_arches}
- rust-executable-path
ExclusiveArch: %{rust_arches}
- rust-exitcode
ExclusiveArch: %{rust_arches}
- rust-exitfailure
ExclusiveArch: %{rust_arches}
- rust-expat-sys
ExclusiveArch: %{rust_arches}
- rust-extend
ExclusiveArch: %{rust_arches}
- rust-extprim
ExclusiveArch: %{rust_arches}
- rust-extprim_literals_macros
ExclusiveArch: %{rust_arches}
- rust-faccess
ExclusiveArch: %{rust_arches}
- rust-fail
ExclusiveArch: %{rust_arches}
- rust-failure
ExclusiveArch: %{rust_arches}
- rust-failure-tools
ExclusiveArch: %{rust_arches}
- rust-failure_derive
ExclusiveArch: %{rust_arches}
- rust-fake
ExclusiveArch: %{rust_arches}
- rust-fake-simd
ExclusiveArch: %{rust_arches}
- rust-fallible-iterator
ExclusiveArch: %{rust_arches}
- rust-fallible-streaming-iterator
ExclusiveArch: %{rust_arches}
- rust-fallible_collections
ExclusiveArch: %{rust_arches}
- rust-fancy-regex
ExclusiveArch: %{rust_arches}
- rust-fastrand
ExclusiveArch: %{rust_arches}
- rust-fb_procfs
ExclusiveArch: %{rust_arches}
- rust-fbthrift_codegen_includer_proc_macro
ExclusiveArch: %{rust_arches}
- rust-fd-find
ExclusiveArch: %{rust_arches}
- rust-fd-lock
ExclusiveArch: %{rust_arches}
- rust-fdlimit
ExclusiveArch: %{rust_arches}
- rust-fedora
ExclusiveArch: %{rust_arches}
- rust-fedora-coreos-pinger
ExclusiveArch: %{rust_arches}
- rust-fedora-update-feedback
ExclusiveArch: %{rust_arches}
- rust-feed-rs
ExclusiveArch: %{rust_arches}
- rust-feedbin_api
ExclusiveArch: %{rust_arches}
- rust-feedly_api
ExclusiveArch: %{rust_arches}
- rust-femme
ExclusiveArch: %{rust_arches}
- rust-fern
ExclusiveArch: %{rust_arches}
- rust-fever_api
ExclusiveArch: %{rust_arches}
- rust-ffsend
ExclusiveArch: %{rust_arches}
- rust-ffsend-api
ExclusiveArch: %{rust_arches}
- rust-field-offset
ExclusiveArch: %{rust_arches}
- rust-file-per-thread-logger
ExclusiveArch: %{rust_arches}
- rust-filedescriptor
ExclusiveArch: %{rust_arches}
- rust-filesize
ExclusiveArch: %{rust_arches}
- rust-filetime
ExclusiveArch: %{rust_arches}
- rust-filetreelist
ExclusiveArch: %{rust_arches}
- rust-find-crate
ExclusiveArch: %{rust_arches}
- rust-fixed
ExclusiveArch: %{rust_arches}
- rust-fixedbitset
ExclusiveArch: %{rust_arches}
- rust-flate2
ExclusiveArch: %{rust_arches}
- rust-float-cmp
ExclusiveArch: %{rust_arches}
- rust-float-ord
ExclusiveArch: %{rust_arches}
- rust-fluent
ExclusiveArch: %{rust_arches}
- rust-fluent-bundle
ExclusiveArch: %{rust_arches}
- rust-fluent-langneg
ExclusiveArch: %{rust_arches}
- rust-fluent-syntax
ExclusiveArch: %{rust_arches}
- rust-fn-error-context
ExclusiveArch: %{rust_arches}
- rust-fnv
ExclusiveArch: %{rust_arches}
- rust-font-kit
ExclusiveArch: %{rust_arches}
- rust-foreign-types
ExclusiveArch: %{rust_arches}
- rust-foreign-types-macros
ExclusiveArch: %{rust_arches}
- rust-foreign-types-shared
ExclusiveArch: %{rust_arches}
- rust-foreign-types-shared0.1
ExclusiveArch: %{rust_arches}
- rust-foreign-types0.3
ExclusiveArch: %{rust_arches}
- rust-form_urlencoded
ExclusiveArch: %{rust_arches}
- rust-fragile
ExclusiveArch: %{rust_arches}
- rust-freetype
ExclusiveArch: %{rust_arches}
- rust-freetype-rs
ExclusiveArch: %{rust_arches}
- rust-freetype-sys
ExclusiveArch: %{rust_arches}
- rust-fs-set-times
ExclusiveArch: %{rust_arches}
- rust-fs2
ExclusiveArch: %{rust_arches}
- rust-fs_extra
ExclusiveArch: %{rust_arches}
- rust-funty
ExclusiveArch: %{rust_arches}
- rust-futf
ExclusiveArch: %{rust_arches}
- rust-futures
ExclusiveArch: %{rust_arches}
- rust-futures-channel
ExclusiveArch: %{rust_arches}
- rust-futures-core
ExclusiveArch: %{rust_arches}
- rust-futures-cpupool
ExclusiveArch: %{rust_arches}
- rust-futures-executor
ExclusiveArch: %{rust_arches}
- rust-futures-io
ExclusiveArch: %{rust_arches}
- rust-futures-lite
ExclusiveArch: %{rust_arches}
- rust-futures-macro
ExclusiveArch: %{rust_arches}
- rust-futures-sink
ExclusiveArch: %{rust_arches}
- rust-futures-task
ExclusiveArch: %{rust_arches}
- rust-futures-test
ExclusiveArch: %{rust_arches}
- rust-futures-timer
ExclusiveArch: %{rust_arches}
- rust-futures-util
ExclusiveArch: %{rust_arches}
- rust-futures0.1
ExclusiveArch: %{rust_arches}
- rust-fuzzy-matcher
ExclusiveArch: %{rust_arches}
- rust-fxhash
ExclusiveArch: %{rust_arches}
- rust-gdk
ExclusiveArch: %{rust_arches}
- rust-gdk-pixbuf
ExclusiveArch: %{rust_arches}
- rust-gdk-pixbuf-sys
ExclusiveArch: %{rust_arches}
- rust-gdk-sys
ExclusiveArch: %{rust_arches}
- rust-gdk4
ExclusiveArch: %{rust_arches}
- rust-gdk4-sys
ExclusiveArch: %{rust_arches}
- rust-generic-array
ExclusiveArch: %{rust_arches}
- rust-generic-array0.12
ExclusiveArch: %{rust_arches}
- rust-genmesh
ExclusiveArch: %{rust_arches}
- rust-getch
ExclusiveArch: %{rust_arches}
- rust-gethostname
ExclusiveArch: %{rust_arches}
- rust-getopts
ExclusiveArch: %{rust_arches}
- rust-getrandom
ExclusiveArch: %{rust_arches}
- rust-getrandom0.1
ExclusiveArch: %{rust_arches}
- rust-getset
ExclusiveArch: %{rust_arches}
- rust-gettext-rs
ExclusiveArch: %{rust_arches}
- rust-gettext-sys
ExclusiveArch: %{rust_arches}
- rust-ghash
ExclusiveArch: %{rust_arches}
- rust-ghost
ExclusiveArch: %{rust_arches}
- rust-gif
ExclusiveArch: %{rust_arches}
- rust-gimli
ExclusiveArch: %{rust_arches}
- rust-gio
ExclusiveArch: %{rust_arches}
- rust-gio-sys
ExclusiveArch: %{rust_arches}
- rust-gir-format-check
ExclusiveArch: %{rust_arches}
- rust-git-delta
ExclusiveArch: %{rust_arches}
- rust-git-version
ExclusiveArch: %{rust_arches}
- rust-git-version-macro
ExclusiveArch: %{rust_arches}
- rust-git2
ExclusiveArch: %{rust_arches}
- rust-git2-curl
ExclusiveArch: %{rust_arches}
- rust-gitui
ExclusiveArch: %{rust_arches}
- rust-gl_generator
ExclusiveArch: %{rust_arches}
- rust-glam
ExclusiveArch: %{rust_arches}
- rust-glib
ExclusiveArch: %{rust_arches}
- rust-glib-macros
ExclusiveArch: %{rust_arches}
- rust-glib-sys
ExclusiveArch: %{rust_arches}
- rust-glob
ExclusiveArch: %{rust_arches}
- rust-globset
ExclusiveArch: %{rust_arches}
- rust-globwalk
ExclusiveArch: %{rust_arches}
- rust-glutin
ExclusiveArch: %{rust_arches}
- rust-glutin_egl_sys
ExclusiveArch: %{rust_arches}
- rust-glutin_glx_sys
ExclusiveArch: %{rust_arches}
- rust-gobject-sys
ExclusiveArch: %{rust_arches}
- rust-goblin
ExclusiveArch: %{rust_arches}
- rust-gptman
ExclusiveArch: %{rust_arches}
- rust-graphene-rs
ExclusiveArch: %{rust_arches}
- rust-graphene-sys
ExclusiveArch: %{rust_arches}
- rust-grep
ExclusiveArch: %{rust_arches}
- rust-grep-cli
ExclusiveArch: %{rust_arches}
- rust-grep-matcher
ExclusiveArch: %{rust_arches}
- rust-grep-pcre2
ExclusiveArch: %{rust_arches}
- rust-grep-printer
ExclusiveArch: %{rust_arches}
- rust-grep-regex
ExclusiveArch: %{rust_arches}
- rust-grep-searcher
ExclusiveArch: %{rust_arches}
- rust-groupable
ExclusiveArch: %{rust_arches}
- rust-gsk4
ExclusiveArch: %{rust_arches}
- rust-gsk4-sys
ExclusiveArch: %{rust_arches}
- rust-gstreamer
ExclusiveArch: %{rust_arches}
- rust-gstreamer-audio
ExclusiveArch: %{rust_arches}
- rust-gstreamer-audio-sys
ExclusiveArch: %{rust_arches}
- rust-gstreamer-base
ExclusiveArch: %{rust_arches}
- rust-gstreamer-base-sys
ExclusiveArch: %{rust_arches}
- rust-gstreamer-editing-services
ExclusiveArch: %{rust_arches}
- rust-gstreamer-editing-services-sys
ExclusiveArch: %{rust_arches}
- rust-gstreamer-pbutils
ExclusiveArch: %{rust_arches}
- rust-gstreamer-pbutils-sys
ExclusiveArch: %{rust_arches}
- rust-gstreamer-player
ExclusiveArch: %{rust_arches}
- rust-gstreamer-player-sys
ExclusiveArch: %{rust_arches}
- rust-gstreamer-sys
ExclusiveArch: %{rust_arches}
- rust-gstreamer-video
ExclusiveArch: %{rust_arches}
- rust-gstreamer-video-sys
ExclusiveArch: %{rust_arches}
- rust-gtk
ExclusiveArch: %{rust_arches}
- rust-gtk-sys
ExclusiveArch: %{rust_arches}
- rust-gtk3-macros
ExclusiveArch: %{rust_arches}
- rust-gtk4
ExclusiveArch: %{rust_arches}
- rust-gtk4-macros
ExclusiveArch: %{rust_arches}
- rust-gtk4-sys
ExclusiveArch: %{rust_arches}
- rust-gzip-header
ExclusiveArch: %{rust_arches}
- rust-h2
ExclusiveArch: %{rust_arches}
- rust-h2_0.2
ExclusiveArch: %{rust_arches}
- rust-half
ExclusiveArch: %{rust_arches}
- rust-hamcrest2
ExclusiveArch: %{rust_arches}
- rust-handlebars
ExclusiveArch: %{rust_arches}
- rust-hashbrown
ExclusiveArch: %{rust_arches}
- rust-hashbrown0.9
ExclusiveArch: %{rust_arches}
- rust-hashlink
ExclusiveArch: %{rust_arches}
- rust-headers
ExclusiveArch: %{rust_arches}
- rust-headers-core
ExclusiveArch: %{rust_arches}
- rust-headers-derive
ExclusiveArch: %{rust_arches}
- rust-heapsize
ExclusiveArch: %{rust_arches}
- rust-heatseeker
ExclusiveArch: %{rust_arches}
- rust-heck
ExclusiveArch: %{rust_arches}
- rust-hex
ExclusiveArch: %{rust_arches}
- rust-hex-literal
ExclusiveArch: %{rust_arches}
- rust-hex-literal-impl
ExclusiveArch: %{rust_arches}
- rust-hex-literal0.2
ExclusiveArch: %{rust_arches}
- rust-hexyl
ExclusiveArch: %{rust_arches}
- rust-hidapi
ExclusiveArch: %{rust_arches}
- rust-hkdf
ExclusiveArch: %{rust_arches}
- rust-hmac
ExclusiveArch: %{rust_arches}
- rust-home
ExclusiveArch: %{rust_arches}
- rust-horrorshow
ExclusiveArch: %{rust_arches}
- rust-hostname
ExclusiveArch: %{rust_arches}
- rust-hostname-validator
ExclusiveArch: %{rust_arches}
- rust-hound
ExclusiveArch: %{rust_arches}
- rust-html-escape
ExclusiveArch: %{rust_arches}
- rust-html2pango
ExclusiveArch: %{rust_arches}
- rust-html5ever
ExclusiveArch: %{rust_arches}
- rust-http
ExclusiveArch: %{rust_arches}
- rust-http-body
ExclusiveArch: %{rust_arches}
- rust-http-body0.3
ExclusiveArch: %{rust_arches}
- rust-http0.1
ExclusiveArch: %{rust_arches}
- rust-httparse
ExclusiveArch: %{rust_arches}
- rust-httpdate
ExclusiveArch: %{rust_arches}
- rust-human-panic
ExclusiveArch: %{rust_arches}
- rust-human-sort
ExclusiveArch: %{rust_arches}
- rust-humansize
ExclusiveArch: %{rust_arches}
- rust-humantime
ExclusiveArch: %{rust_arches}
- rust-humantime-serde
ExclusiveArch: %{rust_arches}
- rust-humantime1
ExclusiveArch: %{rust_arches}
- rust-hyper
ExclusiveArch: %{rust_arches}
- rust-hyper-native-tls
ExclusiveArch: %{rust_arches}
- rust-hyper-rustls
ExclusiveArch: %{rust_arches}
- rust-hyper-staticfile
ExclusiveArch: %{rust_arches}
- rust-hyper-tls
ExclusiveArch: %{rust_arches}
- rust-hyper-tls0.4
ExclusiveArch: %{rust_arches}
- rust-hyper0.10
ExclusiveArch: %{rust_arches}
- rust-hyper0.13
ExclusiveArch: %{rust_arches}
- rust-hyperfine
ExclusiveArch: %{rust_arches}
- rust-i18n-config
ExclusiveArch: %{rust_arches}
- rust-i18n-embed
ExclusiveArch: %{rust_arches}
- rust-i18n-embed-fl
ExclusiveArch: %{rust_arches}
- rust-i18n-embed-impl
ExclusiveArch: %{rust_arches}
- rust-i3ipc
ExclusiveArch: %{rust_arches}
- rust-iai
ExclusiveArch: %{rust_arches}
- rust-ident_case
ExclusiveArch: %{rust_arches}
- rust-idna
ExclusiveArch: %{rust_arches}
- rust-idna0.1
ExclusiveArch: %{rust_arches}
- rust-ignition-config
ExclusiveArch: %{rust_arches}
- rust-ignore
ExclusiveArch: %{rust_arches}
- rust-im-rc
ExclusiveArch: %{rust_arches}
- rust-image
ExclusiveArch: %{rust_arches}
- rust-image-roll
ExclusiveArch: %{rust_arches}
- rust-imgref
ExclusiveArch: %{rust_arches}
- rust-imgui
ExclusiveArch: %{rust_arches}
- rust-imgui-sys
ExclusiveArch: %{rust_arches}
- rust-imgui-winit-support
ExclusiveArch: %{rust_arches}
- rust-indexmap
ExclusiveArch: %{rust_arches}
- rust-indicatif
ExclusiveArch: %{rust_arches}
- rust-indoc
ExclusiveArch: %{rust_arches}
- rust-inferno
ExclusiveArch: %{rust_arches}
- rust-inflate
ExclusiveArch: %{rust_arches}
- rust-inotify
ExclusiveArch: %{rust_arches}
- rust-inotify-sys
ExclusiveArch: %{rust_arches}
- rust-input_buffer
ExclusiveArch: %{rust_arches}
- rust-insta
ExclusiveArch: %{rust_arches}
- rust-instant
ExclusiveArch: %{rust_arches}
- rust-interpolate_name
ExclusiveArch: %{rust_arches}
- rust-intervaltree
ExclusiveArch: %{rust_arches}
- rust-intl-memoizer
ExclusiveArch: %{rust_arches}
- rust-intl_pluralrules
ExclusiveArch: %{rust_arches}
- rust-invalidstring
ExclusiveArch: %{rust_arches}
- rust-inventory
ExclusiveArch: %{rust_arches}
- rust-inventory-impl
ExclusiveArch: %{rust_arches}
- rust-io-extras
ExclusiveArch: %{rust_arches}
- rust-io-lifetimes
ExclusiveArch: %{rust_arches}
- rust-ioctl-rs
ExclusiveArch: %{rust_arches}
- rust-iocuddle
ExclusiveArch: %{rust_arches}
- rust-iovec
ExclusiveArch: %{rust_arches}
- rust-ipnet
ExclusiveArch: %{rust_arches}
- rust-ipnetwork
ExclusiveArch: %{rust_arches}
- rust-iptables
ExclusiveArch: %{rust_arches}
- rust-iron
ExclusiveArch: %{rust_arches}
- rust-iso8601
ExclusiveArch: %{rust_arches}
- rust-iter-read
ExclusiveArch: %{rust_arches}
- rust-itertools
ExclusiveArch: %{rust_arches}
- rust-itertools-num
ExclusiveArch: %{rust_arches}
- rust-itertools0.8
ExclusiveArch: %{rust_arches}
- rust-itertools0.9
ExclusiveArch: %{rust_arches}
- rust-itoa
ExclusiveArch: %{rust_arches}
- rust-itoa0.4
ExclusiveArch: %{rust_arches}
- rust-ivf
ExclusiveArch: %{rust_arches}
- rust-javascriptcore-rs
ExclusiveArch: %{rust_arches}
- rust-javascriptcore-rs-sys
ExclusiveArch: %{rust_arches}
- rust-jetscii
ExclusiveArch: %{rust_arches}
- rust-jieba-rs
ExclusiveArch: %{rust_arches}
- rust-jobserver
ExclusiveArch: %{rust_arches}
- rust-josekit
ExclusiveArch: %{rust_arches}
- rust-jpeg-decoder
ExclusiveArch: %{rust_arches}
- rust-jql
ExclusiveArch: %{rust_arches}
- rust-js-sys
ExclusiveArch: %{rust_arches}
- rust-js_int
ExclusiveArch: %{rust_arches}
- rust-json
ExclusiveArch: %{rust_arches}
- rust-json_value_merge
ExclusiveArch: %{rust_arches}
- rust-just
ExclusiveArch: %{rust_arches}
- rust-jwalk
ExclusiveArch: %{rust_arches}
- rust-k9
ExclusiveArch: %{rust_arches}
- rust-keccak
ExclusiveArch: %{rust_arches}
- rust-khronos_api
ExclusiveArch: %{rust_arches}
- rust-kv-log-macro
ExclusiveArch: %{rust_arches}
- rust-lab
ExclusiveArch: %{rust_arches}
- rust-lalrpop
ExclusiveArch: %{rust_arches}
- rust-lalrpop-util
ExclusiveArch: %{rust_arches}
- rust-language-tags
ExclusiveArch: %{rust_arches}
- rust-lazy-init
ExclusiveArch: %{rust_arches}
- rust-lazy_static
ExclusiveArch: %{rust_arches}
- rust-lazycell
ExclusiveArch: %{rust_arches}
- rust-leb128
ExclusiveArch: %{rust_arches}
- rust-lewton
ExclusiveArch: %{rust_arches}
- rust-lexical-core
ExclusiveArch: %{rust_arches}
- rust-lexiclean
ExclusiveArch: %{rust_arches}
- rust-libblkid-rs
ExclusiveArch: %{rust_arches}
- rust-libblkid-rs-sys
ExclusiveArch: %{rust_arches}
- rust-libbpf-cargo
ExclusiveArch: %{rust_arches}
- rust-libbpf-rs
ExclusiveArch: %{rust_arches}
- rust-libbpf-sys
ExclusiveArch: %{rust_arches}
- rust-libc
ExclusiveArch: %{rust_arches}
- rust-libcryptsetup-rs
ExclusiveArch: %{rust_arches}
- rust-libcryptsetup-rs-sys
ExclusiveArch: %{rust_arches}
- rust-libdbus-sys
ExclusiveArch: %{rust_arches}
- rust-libdeflate-sys
ExclusiveArch: %{rust_arches}
- rust-libdeflater
ExclusiveArch: %{rust_arches}
- rust-libflate
ExclusiveArch: %{rust_arches}
- rust-libflate_lz77
ExclusiveArch: %{rust_arches}
- rust-libgit2-sys
ExclusiveArch: %{rust_arches}
- rust-libhandy
ExclusiveArch: %{rust_arches}
- rust-libhandy-sys
ExclusiveArch: %{rust_arches}
- rust-libloading
ExclusiveArch: %{rust_arches}
- rust-libloading0.6
ExclusiveArch: %{rust_arches}
- rust-libm
ExclusiveArch: %{rust_arches}
- rust-libmount
ExclusiveArch: %{rust_arches}
- rust-libnotcurses-sys
ExclusiveArch: %{rust_arches}
- rust-liboverdrop
ExclusiveArch: %{rust_arches}
- rust-libpulse-binding
ExclusiveArch: %{rust_arches}
- rust-libpulse-sys
ExclusiveArch: %{rust_arches}
- rust-libslirp
ExclusiveArch: %{rust_arches}
- rust-libslirp-sys
ExclusiveArch: %{rust_arches}
- rust-libsqlite3-sys
ExclusiveArch: %{rust_arches}
- rust-libssh2-sys
ExclusiveArch: %{rust_arches}
- rust-libsystemd
ExclusiveArch: %{rust_arches}
- rust-libsystemd-sys
ExclusiveArch: %{rust_arches}
- rust-libudev
ExclusiveArch: %{rust_arches}
- rust-libudev-sys
ExclusiveArch: %{rust_arches}
- rust-libwebp
ExclusiveArch: %{rust_arches}
- rust-libwebp-sys2
ExclusiveArch: %{rust_arches}
- rust-libxml
ExclusiveArch: %{rust_arches}
- rust-libz-sys
ExclusiveArch: %{rust_arches}
- rust-line-wrap
ExclusiveArch: %{rust_arches}
- rust-link-cplusplus
ExclusiveArch: %{rust_arches}
- rust-linked-hash-map
ExclusiveArch: %{rust_arches}
- rust-linkify
ExclusiveArch: %{rust_arches}
- rust-linreg
ExclusiveArch: %{rust_arches}
- rust-linux-raw-sys
ExclusiveArch: %{rust_arches}
- rust-linux_proc
ExclusiveArch: %{rust_arches}
- rust-lipsum
ExclusiveArch: %{rust_arches}
- rust-listenfd
ExclusiveArch: %{rust_arches}
- rust-lmdb
ExclusiveArch: %{rust_arches}
- rust-lmdb-sys
ExclusiveArch: %{rust_arches}
- rust-locale
ExclusiveArch: %{rust_arches}
- rust-locale_config
ExclusiveArch: %{rust_arches}
- rust-lock_api
ExclusiveArch: %{rust_arches}
- rust-lockfree
ExclusiveArch: %{rust_arches}
- rust-log
ExclusiveArch: %{rust_arches}
- rust-log-mdc
ExclusiveArch: %{rust_arches}
- rust-log-panics
ExclusiveArch: %{rust_arches}
- rust-log0.3
ExclusiveArch: %{rust_arches}
- rust-log4rs
ExclusiveArch: %{rust_arches}
- rust-loggerv
ExclusiveArch: %{rust_arches}
- rust-loopdev
ExclusiveArch: %{rust_arches}
- rust-lru-cache
ExclusiveArch: %{rust_arches}
- rust-lscolors
ExclusiveArch: %{rust_arches}
- rust-lsd
ExclusiveArch: %{rust_arches}
- rust-lzma-sys
ExclusiveArch: %{rust_arches}
- rust-lzw
ExclusiveArch: %{rust_arches}
- rust-mac
ExclusiveArch: %{rust_arches}
- rust-macro-attr
ExclusiveArch: %{rust_arches}
- rust-macroquad_macro
ExclusiveArch: %{rust_arches}
- rust-magic-crypt
ExclusiveArch: %{rust_arches}
- rust-maildir
ExclusiveArch: %{rust_arches}
- rust-mailparse
ExclusiveArch: %{rust_arches}
- rust-man
ExclusiveArch: %{rust_arches}
- rust-maplit
ExclusiveArch: %{rust_arches}
- rust-markup5ever
ExclusiveArch: %{rust_arches}
- rust-markup5ever_rcdom
ExclusiveArch: %{rust_arches}
- rust-match_cfg
ExclusiveArch: %{rust_arches}
- rust-matches
ExclusiveArch: %{rust_arches}
- rust-matrixcompare
ExclusiveArch: %{rust_arches}
- rust-matrixcompare-core
ExclusiveArch: %{rust_arches}
- rust-matrixcompare-mock
ExclusiveArch: %{rust_arches}
- rust-matrixmultiply
ExclusiveArch: %{rust_arches}
- rust-maxminddb
ExclusiveArch: %{rust_arches}
- rust-maybe-owned
ExclusiveArch: %{rust_arches}
- rust-maybe-uninit
ExclusiveArch: %{rust_arches}
- rust-mbox
ExclusiveArch: %{rust_arches}
- rust-mbrman
ExclusiveArch: %{rust_arches}
- rust-md-5
ExclusiveArch: %{rust_arches}
- rust-md5
ExclusiveArch: %{rust_arches}
- rust-mdl
ExclusiveArch: %{rust_arches}
- rust-memchr
ExclusiveArch: %{rust_arches}
- rust-memmap
ExclusiveArch: %{rust_arches}
- rust-memmap2
ExclusiveArch: %{rust_arches}
- rust-memmap2_0.1
ExclusiveArch: %{rust_arches}
- rust-memoffset
ExclusiveArch: %{rust_arches}
- rust-memoffset0.5
ExclusiveArch: %{rust_arches}
- rust-memsec
ExclusiveArch: %{rust_arches}
- rust-migrations_internals
ExclusiveArch: %{rust_arches}
- rust-migrations_macros
ExclusiveArch: %{rust_arches}
- rust-mime
ExclusiveArch: %{rust_arches}
- rust-mime0.2
ExclusiveArch: %{rust_arches}
- rust-mime_guess
ExclusiveArch: %{rust_arches}
- rust-mime_guess1
ExclusiveArch: %{rust_arches}
- rust-miniflux_api
ExclusiveArch: %{rust_arches}
- rust-minify-html
ExclusiveArch: %{rust_arches}
- rust-minimal-lexical
ExclusiveArch: %{rust_arches}
- rust-minimp3
ExclusiveArch: %{rust_arches}
- rust-minimp3-sys
ExclusiveArch: %{rust_arches}
- rust-miniz-sys
ExclusiveArch: %{rust_arches}
- rust-miniz_oxide
ExclusiveArch: %{rust_arches}
- rust-miniz_oxide0.3
ExclusiveArch: %{rust_arches}
- rust-miniz_oxide_c_api
ExclusiveArch: %{rust_arches}
- rust-mint
ExclusiveArch: %{rust_arches}
- rust-mio
ExclusiveArch: %{rust_arches}
- rust-mio-extras
ExclusiveArch: %{rust_arches}
- rust-mio-uds
ExclusiveArch: %{rust_arches}
- rust-mio0.6
ExclusiveArch: %{rust_arches}
- rust-mktemp
ExclusiveArch: %{rust_arches}
- rust-mnt
ExclusiveArch: %{rust_arches}
- rust-mockall
ExclusiveArch: %{rust_arches}
- rust-mockall_derive
ExclusiveArch: %{rust_arches}
- rust-mockall_double
ExclusiveArch: %{rust_arches}
- rust-mockito
ExclusiveArch: %{rust_arches}
- rust-modifier
ExclusiveArch: %{rust_arches}
- rust-more-asserts
ExclusiveArch: %{rust_arches}
- rust-mp4parse
ExclusiveArch: %{rust_arches}
- rust-msgbox
ExclusiveArch: %{rust_arches}
- rust-muldiv
ExclusiveArch: %{rust_arches}
- rust-multimap
ExclusiveArch: %{rust_arches}
- rust-multipart
ExclusiveArch: %{rust_arches}
- rust-mustache
ExclusiveArch: %{rust_arches}
- rust-nalgebra
ExclusiveArch: %{rust_arches}
- rust-nalgebra-macros
ExclusiveArch: %{rust_arches}
- rust-nasm-rs
ExclusiveArch: %{rust_arches}
- rust-native-tls
ExclusiveArch: %{rust_arches}
- rust-natord
ExclusiveArch: %{rust_arches}
- rust-navi
ExclusiveArch: %{rust_arches}
- rust-nb-connect
ExclusiveArch: %{rust_arches}
- rust-ncurses
ExclusiveArch: %{rust_arches}
- rust-net2
ExclusiveArch: %{rust_arches}
- rust-netlink-packet-core
ExclusiveArch: %{rust_arches}
- rust-netlink-packet-route
ExclusiveArch: %{rust_arches}
- rust-netlink-packet-utils
ExclusiveArch: %{rust_arches}
- rust-netlink-proto
ExclusiveArch: %{rust_arches}
- rust-netlink-sys
ExclusiveArch: %{rust_arches}
- rust-netmap_sys
ExclusiveArch: %{rust_arches}
- rust-nettle
ExclusiveArch: %{rust_arches}
- rust-nettle-sys
ExclusiveArch: %{rust_arches}
- rust-new_debug_unreachable
ExclusiveArch: %{rust_arches}
- rust-news-flash
ExclusiveArch: %{rust_arches}
- rust-newsblur_api
ExclusiveArch: %{rust_arches}
- rust-newtype_derive
ExclusiveArch: %{rust_arches}
- rust-nibble_vec
ExclusiveArch: %{rust_arches}
- rust-nix
ExclusiveArch: %{rust_arches}
- rust-nix0.14
ExclusiveArch: %{rust_arches}
- rust-nix0.17
ExclusiveArch: %{rust_arches}
- rust-nix0.18
ExclusiveArch: %{rust_arches}
- rust-nix0.20
ExclusiveArch: %{rust_arches}
- rust-no-panic
ExclusiveArch: %{rust_arches}
- rust-nodrop
ExclusiveArch: %{rust_arches}
- rust-nom
ExclusiveArch: %{rust_arches}
- rust-nom4
ExclusiveArch: %{rust_arches}
- rust-nom5
ExclusiveArch: %{rust_arches}
- rust-nom6
ExclusiveArch: %{rust_arches}
- rust-noop_proc_macro
ExclusiveArch: %{rust_arches}
- rust-normalize-line-endings
ExclusiveArch: %{rust_arches}
- rust-notify
ExclusiveArch: %{rust_arches}
- rust-notify-rust
ExclusiveArch: %{rust_arches}
- rust-num
ExclusiveArch: %{rust_arches}
- rust-num-bigint
ExclusiveArch: %{rust_arches}
- rust-num-bigint-dig
ExclusiveArch: %{rust_arches}
- rust-num-bigint0.3
ExclusiveArch: %{rust_arches}
- rust-num-complex
ExclusiveArch: %{rust_arches}
- rust-num-complex0.3
ExclusiveArch: %{rust_arches}
- rust-num-derive
ExclusiveArch: %{rust_arches}
- rust-num-format
ExclusiveArch: %{rust_arches}
- rust-num-integer
ExclusiveArch: %{rust_arches}
- rust-num-iter
ExclusiveArch: %{rust_arches}
- rust-num-rational
ExclusiveArch: %{rust_arches}
- rust-num-rational0.3
ExclusiveArch: %{rust_arches}
- rust-num-traits
ExclusiveArch: %{rust_arches}
- rust-num-traits0.1
ExclusiveArch: %{rust_arches}
- rust-num0.3
ExclusiveArch: %{rust_arches}
- rust-num_cpus
ExclusiveArch: %{rust_arches}
- rust-num_enum
ExclusiveArch: %{rust_arches}
- rust-num_enum_derive
ExclusiveArch: %{rust_arches}
- rust-number_prefix
ExclusiveArch: %{rust_arches}
- rust-numtoa
ExclusiveArch: %{rust_arches}
- rust-oauth2
ExclusiveArch: %{rust_arches}
- rust-obfstr
ExclusiveArch: %{rust_arches}
- rust-obj
ExclusiveArch: %{rust_arches}
- rust-object
ExclusiveArch: %{rust_arches}
- rust-odds
ExclusiveArch: %{rust_arches}
- rust-ogg
ExclusiveArch: %{rust_arches}
- rust-oid
ExclusiveArch: %{rust_arches}
- rust-once_cell
ExclusiveArch: %{rust_arches}
- rust-onig
ExclusiveArch: %{rust_arches}
- rust-onig_sys
ExclusiveArch: %{rust_arches}
- rust-oorandom
ExclusiveArch: %{rust_arches}
- rust-opaque-debug
ExclusiveArch: %{rust_arches}
- rust-open
ExclusiveArch: %{rust_arches}
- rust-open1
ExclusiveArch: %{rust_arches}
- rust-openat
ExclusiveArch: %{rust_arches}
- rust-openat-ext
ExclusiveArch: %{rust_arches}
- rust-opener
ExclusiveArch: %{rust_arches}
- rust-openssh-keys
ExclusiveArch: %{rust_arches}
- rust-openssl
ExclusiveArch: %{rust_arches}
- rust-openssl-probe
ExclusiveArch: %{rust_arches}
- rust-openssl-sys
ExclusiveArch: %{rust_arches}
- rust-opml
ExclusiveArch: %{rust_arches}
- rust-ord_subset
ExclusiveArch: %{rust_arches}
- rust-ordered-float
ExclusiveArch: %{rust_arches}
- rust-ordered-multimap
ExclusiveArch: %{rust_arches}
- rust-os_info
ExclusiveArch: %{rust_arches}
- rust-os_pipe
ExclusiveArch: %{rust_arches}
- rust-os_str_bytes
ExclusiveArch: %{rust_arches}
- rust-os_type
ExclusiveArch: %{rust_arches}
- rust-osmesa-sys
ExclusiveArch: %{rust_arches}
- rust-osstrtools
ExclusiveArch: %{rust_arches}
- rust-ostree
ExclusiveArch: %{rust_arches}
- rust-ostree-sys
ExclusiveArch: %{rust_arches}
- rust-ouroboros
ExclusiveArch: %{rust_arches}
- rust-ouroboros_macro
ExclusiveArch: %{rust_arches}
- rust-owned-alloc
ExclusiveArch: %{rust_arches}
- rust-owned_ttf_parser
ExclusiveArch: %{rust_arches}
- rust-owning_ref
ExclusiveArch: %{rust_arches}
- rust-oxipng
ExclusiveArch: %{rust_arches}
- rust-packaging
ExclusiveArch: %{rust_arches}
- rust-pad
ExclusiveArch: %{rust_arches}
- rust-page_size
ExclusiveArch: %{rust_arches}
- rust-pager
ExclusiveArch: %{rust_arches}
- rust-palette
ExclusiveArch: %{rust_arches}
- rust-palette_derive
ExclusiveArch: %{rust_arches}
- rust-pam
ExclusiveArch: %{rust_arches}
- rust-pam-client
ExclusiveArch: %{rust_arches}
- rust-pam-sys
ExclusiveArch: %{rust_arches}
- rust-pancurses
ExclusiveArch: %{rust_arches}
- rust-pango
ExclusiveArch: %{rust_arches}
- rust-pango-sys
ExclusiveArch: %{rust_arches}
- rust-pangocairo
ExclusiveArch: %{rust_arches}
- rust-pangocairo-sys
ExclusiveArch: %{rust_arches}
- rust-parity-wasm
ExclusiveArch: %{rust_arches}
- rust-parking
ExclusiveArch: %{rust_arches}
- rust-parking_lot
ExclusiveArch: %{rust_arches}
- rust-parking_lot_core
ExclusiveArch: %{rust_arches}
- rust-parse-zoneinfo
ExclusiveArch: %{rust_arches}
- rust-parse_cfg
ExclusiveArch: %{rust_arches}
- rust-parsec-client
ExclusiveArch: %{rust_arches}
- rust-parsec-interface
ExclusiveArch: %{rust_arches}
- rust-partial-io
ExclusiveArch: %{rust_arches}
- rust-partition-identity
ExclusiveArch: %{rust_arches}
- rust-paste
ExclusiveArch: %{rust_arches}
- rust-path-absolutize
ExclusiveArch: %{rust_arches}
- rust-path-dedot
ExclusiveArch: %{rust_arches}
- rust-path-slash
ExclusiveArch: %{rust_arches}
- rust-pathdiff
ExclusiveArch: %{rust_arches}
- rust-pathfinder_geometry
ExclusiveArch: %{rust_arches}
- rust-pathfinder_simd
ExclusiveArch: %{rust_arches}
- rust-pbr
ExclusiveArch: %{rust_arches}
- rust-pcap
ExclusiveArch: %{rust_arches}
- rust-pcre2
ExclusiveArch: %{rust_arches}
- rust-pcre2-sys
ExclusiveArch: %{rust_arches}
- rust-peeking_take_while
ExclusiveArch: %{rust_arches}
- rust-peg
ExclusiveArch: %{rust_arches}
- rust-peg-macros
ExclusiveArch: %{rust_arches}
- rust-peg-runtime
ExclusiveArch: %{rust_arches}
- rust-peg0.5
ExclusiveArch: %{rust_arches}
- rust-pem
ExclusiveArch: %{rust_arches}
- rust-pem0.8
ExclusiveArch: %{rust_arches}
- rust-percent-encoding
ExclusiveArch: %{rust_arches}
- rust-percent-encoding1
ExclusiveArch: %{rust_arches}
- rust-peresil
ExclusiveArch: %{rust_arches}
- rust-permutate
ExclusiveArch: %{rust_arches}
- rust-permutohedron
ExclusiveArch: %{rust_arches}
- rust-pest
ExclusiveArch: %{rust_arches}
- rust-pest_derive
ExclusiveArch: %{rust_arches}
- rust-pest_generator
ExclusiveArch: %{rust_arches}
- rust-pest_meta
ExclusiveArch: %{rust_arches}
- rust-petgraph
ExclusiveArch: %{rust_arches}
- rust-phf
ExclusiveArch: %{rust_arches}
- rust-phf0.7
ExclusiveArch: %{rust_arches}
- rust-phf_codegen
ExclusiveArch: %{rust_arches}
- rust-phf_codegen0.7
ExclusiveArch: %{rust_arches}
- rust-phf_generator
ExclusiveArch: %{rust_arches}
- rust-phf_generator0.7
ExclusiveArch: %{rust_arches}
- rust-phf_macros
ExclusiveArch: %{rust_arches}
- rust-phf_macros0.7
ExclusiveArch: %{rust_arches}
- rust-phf_shared
ExclusiveArch: %{rust_arches}
- rust-phf_shared0.7
ExclusiveArch: %{rust_arches}
- rust-picky-asn1
ExclusiveArch: %{rust_arches}
- rust-picky-asn1-der
ExclusiveArch: %{rust_arches}
- rust-picky-asn1-x509
ExclusiveArch: %{rust_arches}
- rust-pico-args
ExclusiveArch: %{rust_arches}
- rust-pid
ExclusiveArch: %{rust_arches}
- rust-pin-project
ExclusiveArch: %{rust_arches}
- rust-pin-project-internal
ExclusiveArch: %{rust_arches}
- rust-pin-project-internal0.4
ExclusiveArch: %{rust_arches}
- rust-pin-project-lite
ExclusiveArch: %{rust_arches}
- rust-pin-project-lite0.1
ExclusiveArch: %{rust_arches}
- rust-pin-project0.4
ExclusiveArch: %{rust_arches}
- rust-pin-utils
ExclusiveArch: %{rust_arches}
- rust-pipe
ExclusiveArch: %{rust_arches}
- rust-piper
ExclusiveArch: %{rust_arches}
- rust-pkcs11
ExclusiveArch: %{rust_arches}
- rust-pkg-config
ExclusiveArch: %{rust_arches}
- rust-plain
ExclusiveArch: %{rust_arches}
- rust-pleaser
ExclusiveArch: %{rust_arches}
- rust-plist
ExclusiveArch: %{rust_arches}
- rust-plotlib
ExclusiveArch: %{rust_arches}
- rust-plotters
ExclusiveArch: %{rust_arches}
- rust-plotters-backend
ExclusiveArch: %{rust_arches}
- rust-plotters-bitmap
ExclusiveArch: %{rust_arches}
- rust-plotters-svg
ExclusiveArch: %{rust_arches}
- rust-plugin
ExclusiveArch: %{rust_arches}
- rust-pnet_base
ExclusiveArch: %{rust_arches}
- rust-pnet_datalink
ExclusiveArch: %{rust_arches}
- rust-pnet_sys
ExclusiveArch: %{rust_arches}
- rust-png
ExclusiveArch: %{rust_arches}
- rust-podio
ExclusiveArch: %{rust_arches}
- rust-polling
ExclusiveArch: %{rust_arches}
- rust-polyval
ExclusiveArch: %{rust_arches}
- rust-pom
ExclusiveArch: %{rust_arches}
- rust-pommes
ExclusiveArch: %{rust_arches}
- rust-posish
ExclusiveArch: %{rust_arches}
- rust-ppv-lite86
ExclusiveArch: %{rust_arches}
- rust-pq-sys
ExclusiveArch: %{rust_arches}
- rust-precomputed-hash
ExclusiveArch: %{rust_arches}
- rust-predicates
ExclusiveArch: %{rust_arches}
- rust-predicates-core
ExclusiveArch: %{rust_arches}
- rust-predicates-tree
ExclusiveArch: %{rust_arches}
- rust-predicates1
ExclusiveArch: %{rust_arches}
- rust-pretty-git-prompt
ExclusiveArch: %{rust_arches}
- rust-pretty-hex
ExclusiveArch: %{rust_arches}
- rust-pretty_assertions
ExclusiveArch: %{rust_arches}
- rust-pretty_assertions0.6
ExclusiveArch: %{rust_arches}
- rust-pretty_assertions0.7
ExclusiveArch: %{rust_arches}
- rust-pretty_env_logger
ExclusiveArch: %{rust_arches}
- rust-prettytable-rs
ExclusiveArch: %{rust_arches}
- rust-proc-macro-crate
ExclusiveArch: %{rust_arches}
- rust-proc-macro-crate0.1
ExclusiveArch: %{rust_arches}
- rust-proc-macro-error
ExclusiveArch: %{rust_arches}
- rust-proc-macro-error-attr
ExclusiveArch: %{rust_arches}
- rust-proc-macro-hack
ExclusiveArch: %{rust_arches}
- rust-proc-macro2
ExclusiveArch: %{rust_arches}
- rust-proc-macro2-0.4
ExclusiveArch: %{rust_arches}
- rust-proc-maps
ExclusiveArch: %{rust_arches}
- rust-proc-mounts
ExclusiveArch: %{rust_arches}
- rust-proc-quote-impl
ExclusiveArch: %{rust_arches}
- rust-procedural-masquerade
ExclusiveArch: %{rust_arches}
- rust-process_control
ExclusiveArch: %{rust_arches}
- rust-process_path
ExclusiveArch: %{rust_arches}
- rust-procfs
ExclusiveArch: %{rust_arches}
- rust-procs
ExclusiveArch: %{rust_arches}
- rust-progress-streams
ExclusiveArch: %{rust_arches}
- rust-prometheus
ExclusiveArch: %{rust_arches}
- rust-proptest
ExclusiveArch: %{rust_arches}
- rust-proptest-derive
ExclusiveArch: %{rust_arches}
- rust-proptest0.10
ExclusiveArch: %{rust_arches}
- rust-prost
ExclusiveArch: %{rust_arches}
- rust-prost-build
ExclusiveArch: %{rust_arches}
- rust-prost-derive
ExclusiveArch: %{rust_arches}
- rust-prost-types
ExclusiveArch: %{rust_arches}
- rust-protobuf
ExclusiveArch: %{rust_arches}
- rust-protobuf-codegen
ExclusiveArch: %{rust_arches}
- rust-protobuf-codegen-pure
ExclusiveArch: %{rust_arches}
- rust-protoc
ExclusiveArch: %{rust_arches}
- rust-protoc-rust
ExclusiveArch: %{rust_arches}
- rust-psa-crypto
ExclusiveArch: %{rust_arches}
- rust-psa-crypto-sys
ExclusiveArch: %{rust_arches}
- rust-psd
ExclusiveArch: %{rust_arches}
- rust-psm
ExclusiveArch: %{rust_arches}
- rust-ptr_meta
ExclusiveArch: %{rust_arches}
- rust-ptr_meta_derive
ExclusiveArch: %{rust_arches}
- rust-publicsuffix
ExclusiveArch: %{rust_arches}
- rust-pulldown-cmark
ExclusiveArch: %{rust_arches}
- rust-pulse
ExclusiveArch: %{rust_arches}
- rust-pure-rust-locales
ExclusiveArch: %{rust_arches}
- rust-pyo3
ExclusiveArch: %{rust_arches}
- rust-pyo3-build-config
ExclusiveArch: %{rust_arches}
- rust-pyo3-macros
ExclusiveArch: %{rust_arches}
- rust-pyo3-macros-backend
ExclusiveArch: %{rust_arches}
- rust-python-launcher
ExclusiveArch: %{rust_arches}
- rust-python3-sys
ExclusiveArch: %{rust_arches}
- rust-qr2term
ExclusiveArch: %{rust_arches}
- rust-qrcode
ExclusiveArch: %{rust_arches}
- rust-qstring
ExclusiveArch: %{rust_arches}
- rust-quad-rand
ExclusiveArch: %{rust_arches}
- rust-quantiles
ExclusiveArch: %{rust_arches}
- rust-quick-error
ExclusiveArch: %{rust_arches}
- rust-quick-error1
ExclusiveArch: %{rust_arches}
- rust-quick-xml
ExclusiveArch: %{rust_arches}
- rust-quick-xml0.20
ExclusiveArch: %{rust_arches}
- rust-quickcheck
ExclusiveArch: %{rust_arches}
- rust-quickcheck0.6
ExclusiveArch: %{rust_arches}
- rust-quickcheck0.9
ExclusiveArch: %{rust_arches}
- rust-quickcheck_macros
ExclusiveArch: %{rust_arches}
- rust-quickersort
ExclusiveArch: %{rust_arches}
- rust-quote
ExclusiveArch: %{rust_arches}
- rust-quote0.3
ExclusiveArch: %{rust_arches}
- rust-quote0.6
ExclusiveArch: %{rust_arches}
- rust-quoted_printable
ExclusiveArch: %{rust_arches}
- rust-r2d2
ExclusiveArch: %{rust_arches}
- rust-radium
ExclusiveArch: %{rust_arches}
- rust-radix64
ExclusiveArch: %{rust_arches}
- rust-radix_trie
ExclusiveArch: %{rust_arches}
- rust-rand
ExclusiveArch: %{rust_arches}
- rust-rand0.4
ExclusiveArch: %{rust_arches}
- rust-rand0.5
ExclusiveArch: %{rust_arches}
- rust-rand0.6
ExclusiveArch: %{rust_arches}
- rust-rand0.7
ExclusiveArch: %{rust_arches}
- rust-rand_chacha
ExclusiveArch: %{rust_arches}
- rust-rand_chacha0.1
ExclusiveArch: %{rust_arches}
- rust-rand_chacha0.2
ExclusiveArch: %{rust_arches}
- rust-rand_core
ExclusiveArch: %{rust_arches}
- rust-rand_core0.3
ExclusiveArch: %{rust_arches}
- rust-rand_core0.4
ExclusiveArch: %{rust_arches}
- rust-rand_core0.5
ExclusiveArch: %{rust_arches}
- rust-rand_distr
ExclusiveArch: %{rust_arches}
- rust-rand_hc
ExclusiveArch: %{rust_arches}
- rust-rand_hc0.1
ExclusiveArch: %{rust_arches}
- rust-rand_isaac
ExclusiveArch: %{rust_arches}
- rust-rand_isaac0.1
ExclusiveArch: %{rust_arches}
- rust-rand_isaac0.2
ExclusiveArch: %{rust_arches}
- rust-rand_jitter
ExclusiveArch: %{rust_arches}
- rust-rand_jitter0.1
ExclusiveArch: %{rust_arches}
- rust-rand_os
ExclusiveArch: %{rust_arches}
- rust-rand_os0.1
ExclusiveArch: %{rust_arches}
- rust-rand_pcg
ExclusiveArch: %{rust_arches}
- rust-rand_pcg0.1
ExclusiveArch: %{rust_arches}
- rust-rand_pcg0.2
ExclusiveArch: %{rust_arches}
- rust-rand_xorshift
ExclusiveArch: %{rust_arches}
- rust-rand_xorshift0.1
ExclusiveArch: %{rust_arches}
- rust-rand_xorshift0.2
ExclusiveArch: %{rust_arches}
- rust-rand_xoshiro
ExclusiveArch: %{rust_arches}
- rust-random-fast-rng
ExclusiveArch: %{rust_arches}
- rust-random-trait
ExclusiveArch: %{rust_arches}
- rust-randomize
ExclusiveArch: %{rust_arches}
- rust-rav1e
ExclusiveArch: %{rust_arches}
- rust-raw-window-handle
ExclusiveArch: %{rust_arches}
- rust-rawpointer
ExclusiveArch: %{rust_arches}
- rust-rawslice
ExclusiveArch: %{rust_arches}
- rust-rayon
ExclusiveArch: %{rust_arches}
- rust-rayon-core
ExclusiveArch: %{rust_arches}
- rust-rbspy
ExclusiveArch: %{rust_arches}
- rust-rbspy-ruby-structs
ExclusiveArch: %{rust_arches}
- rust-rbspy-testdata
ExclusiveArch: %{rust_arches}
- rust-rd-agent
ExclusiveArch: %{rust_arches}
- rust-rd-agent-intf
ExclusiveArch: %{rust_arches}
- rust-rd-hashd
ExclusiveArch: %{rust_arches}
- rust-rd-hashd-intf
ExclusiveArch: %{rust_arches}
- rust-rd-util
ExclusiveArch: %{rust_arches}
- rust-read-process-memory
ExclusiveArch: %{rust_arches}
- rust-read_input
ExclusiveArch: %{rust_arches}
- rust-readability-fork
ExclusiveArch: %{rust_arches}
- rust-readwrite
ExclusiveArch: %{rust_arches}
- rust-recycler
ExclusiveArch: %{rust_arches}
- rust-ref-cast
ExclusiveArch: %{rust_arches}
- rust-ref-cast-impl
ExclusiveArch: %{rust_arches}
- rust-regalloc
ExclusiveArch: %{rust_arches}
- rust-regex
ExclusiveArch: %{rust_arches}
- rust-regex-automata
ExclusiveArch: %{rust_arches}
- rust-regex-syntax
ExclusiveArch: %{rust_arches}
- rust-region
ExclusiveArch: %{rust_arches}
- rust-relative-path
ExclusiveArch: %{rust_arches}
- rust-relay
ExclusiveArch: %{rust_arches}
- rust-remoteprocess
ExclusiveArch: %{rust_arches}
- rust-remove_dir_all
ExclusiveArch: %{rust_arches}
- rust-rend
ExclusiveArch: %{rust_arches}
- rust-rental
ExclusiveArch: %{rust_arches}
- rust-rental-impl
ExclusiveArch: %{rust_arches}
- rust-reqwest
ExclusiveArch: %{rust_arches}
- rust-reqwest0.10
ExclusiveArch: %{rust_arches}
- rust-resctl-bench
ExclusiveArch: %{rust_arches}
- rust-resctl-bench-intf
ExclusiveArch: %{rust_arches}
- rust-resctl-demo
ExclusiveArch: %{rust_arches}
- rust-resize
ExclusiveArch: %{rust_arches}
- rust-resolv-conf
ExclusiveArch: %{rust_arches}
- rust-restson
ExclusiveArch: %{rust_arches}
- rust-retry
ExclusiveArch: %{rust_arches}
- rust-rgb
ExclusiveArch: %{rust_arches}
- rust-ring
ExclusiveArch: %{rust_arches}
- rust-ripgrep
ExclusiveArch: %{rust_arches}
- rust-rkyv
ExclusiveArch: %{rust_arches}
- rust-rkyv_derive
ExclusiveArch: %{rust_arches}
- rust-rle-decode-fast
ExclusiveArch: %{rust_arches}
- rust-rmp
ExclusiveArch: %{rust_arches}
- rust-rmp-serde
ExclusiveArch: %{rust_arches}
- rust-rodio
ExclusiveArch: %{rust_arches}
- rust-roff
ExclusiveArch: %{rust_arches}
- rust-ron
ExclusiveArch: %{rust_arches}
- rust-roxmltree
ExclusiveArch: %{rust_arches}
- rust-rpassword
ExclusiveArch: %{rust_arches}
- rust-rpick
ExclusiveArch: %{rust_arches}
- rust-rsa
ExclusiveArch: %{rust_arches}
- rust-rspec
ExclusiveArch: %{rust_arches}
- rust-rtnetlink
ExclusiveArch: %{rust_arches}
- rust-rudo
ExclusiveArch: %{rust_arches}
- rust-ruma
ExclusiveArch: %{rust_arches}
- rust-ruma-api
ExclusiveArch: %{rust_arches}
- rust-ruma-api-macros
ExclusiveArch: %{rust_arches}
- rust-ruma-appservice-api
ExclusiveArch: %{rust_arches}
- rust-ruma-client-api
ExclusiveArch: %{rust_arches}
- rust-ruma-common
ExclusiveArch: %{rust_arches}
- rust-ruma-events-macros
ExclusiveArch: %{rust_arches}
- rust-ruma-federation-api
ExclusiveArch: %{rust_arches}
- rust-ruma-identifiers
ExclusiveArch: %{rust_arches}
- rust-ruma-identifiers-macros
ExclusiveArch: %{rust_arches}
- rust-ruma-identifiers-validation
ExclusiveArch: %{rust_arches}
- rust-ruma-identity-service-api
ExclusiveArch: %{rust_arches}
- rust-ruma-push-gateway-api
ExclusiveArch: %{rust_arches}
- rust-ruma-serde
ExclusiveArch: %{rust_arches}
- rust-ruma-serde-macros
ExclusiveArch: %{rust_arches}
- rust-ruma-signatures
ExclusiveArch: %{rust_arches}
- rust-rusqlite
ExclusiveArch: %{rust_arches}
- rust-rust-embed
ExclusiveArch: %{rust_arches}
- rust-rust-embed-impl
ExclusiveArch: %{rust_arches}
- rust-rust-embed-utils
ExclusiveArch: %{rust_arches}
- rust-rust-ini
ExclusiveArch: %{rust_arches}
- rust-rust-stemmers
ExclusiveArch: %{rust_arches}
- rust-rust_decimal
ExclusiveArch: %{rust_arches}
- rust-rust_hawktracer
ExclusiveArch: %{rust_arches}
- rust-rust_hawktracer_normal_macro
ExclusiveArch: %{rust_arches}
- rust-rust_hawktracer_proc_macro
ExclusiveArch: %{rust_arches}
- rust-rust_hawktracer_sys
ExclusiveArch: %{rust_arches}
- rust-rustbus
ExclusiveArch: %{rust_arches}
- rust-rustbus_derive
ExclusiveArch: %{rust_arches}
- rust-rustc-demangle
ExclusiveArch: %{rust_arches}
- rust-rustc-hash
ExclusiveArch: %{rust_arches}
- rust-rustc-serialize
ExclusiveArch: %{rust_arches}
- rust-rustc-test
ExclusiveArch: %{rust_arches}
- rust-rustc_tools_util
ExclusiveArch: %{rust_arches}
- rust-rustc_version
ExclusiveArch: %{rust_arches}
- rust-rustc_version0.3
ExclusiveArch: %{rust_arches}
- rust-rustdoc-stripper
ExclusiveArch: %{rust_arches}
- rust-rustfilt
ExclusiveArch: %{rust_arches}
- rust-rustfix
ExclusiveArch: %{rust_arches}
- rust-rustio
ExclusiveArch: %{rust_arches}
- rust-rustix
ExclusiveArch: %{rust_arches}
- rust-rustls
ExclusiveArch: %{rust_arches}
- rust-rustls-native-certs
ExclusiveArch: %{rust_arches}
- rust-rusttype
ExclusiveArch: %{rust_arches}
- rust-rustversion
ExclusiveArch: %{rust_arches}
- rust-rusty-fork
ExclusiveArch: %{rust_arches}
- rust-rustyline
ExclusiveArch: %{rust_arches}
- rust-rustyline-derive
ExclusiveArch: %{rust_arches}
- rust-ryu
ExclusiveArch: %{rust_arches}
- rust-safe-transmute
ExclusiveArch: %{rust_arches}
- rust-safe_arch
ExclusiveArch: %{rust_arches}
- rust-safemem
ExclusiveArch: %{rust_arches}
- rust-same-file
ExclusiveArch: %{rust_arches}
- rust-sapp-kms
ExclusiveArch: %{rust_arches}
- rust-sapp-linux
ExclusiveArch: %{rust_arches}
- rust-sass-rs
ExclusiveArch: %{rust_arches}
- rust-sass-sys
ExclusiveArch: %{rust_arches}
- rust-scan_fmt
ExclusiveArch: %{rust_arches}
- rust-scheduled-thread-pool
ExclusiveArch: %{rust_arches}
- rust-scoped-tls
ExclusiveArch: %{rust_arches}
- rust-scoped-tls-hkt
ExclusiveArch: %{rust_arches}
- rust-scoped_threadpool
ExclusiveArch: %{rust_arches}
- rust-scopeguard
ExclusiveArch: %{rust_arches}
- rust-scopetime
ExclusiveArch: %{rust_arches}
- rust-scratch
ExclusiveArch: %{rust_arches}
- rust-scroll
ExclusiveArch: %{rust_arches}
- rust-scroll_derive
ExclusiveArch: %{rust_arches}
- rust-sct
ExclusiveArch: %{rust_arches}
- rust-sd
ExclusiveArch: %{rust_arches}
- rust-sd-notify
ExclusiveArch: %{rust_arches}
- rust-seahash
ExclusiveArch: %{rust_arches}
- rust-seahash3
ExclusiveArch: %{rust_arches}
- rust-secrecy
ExclusiveArch: %{rust_arches}
- rust-secret-service
ExclusiveArch: %{rust_arches}
- rust-self_cell
ExclusiveArch: %{rust_arches}
- rust-semver
ExclusiveArch: %{rust_arches}
- rust-semver-parser
ExclusiveArch: %{rust_arches}
- rust-semver-parser0.9
ExclusiveArch: %{rust_arches}
- rust-semver0.11
ExclusiveArch: %{rust_arches}
- rust-sequoia-autocrypt
ExclusiveArch: %{rust_arches}
- rust-sequoia-ipc
ExclusiveArch: %{rust_arches}
- rust-sequoia-keyring-linter
ExclusiveArch: %{rust_arches}
- rust-sequoia-net
ExclusiveArch: %{rust_arches}
- rust-sequoia-octopus-librnp
ExclusiveArch: %{rust_arches}
- rust-sequoia-openpgp
ExclusiveArch: %{rust_arches}
- rust-sequoia-sop
ExclusiveArch: %{rust_arches}
- rust-sequoia-sq
ExclusiveArch: %{rust_arches}
- rust-sequoia-sqv
ExclusiveArch: %{rust_arches}
- rust-serde
ExclusiveArch: %{rust_arches}
- rust-serde-big-array
ExclusiveArch: %{rust_arches}
- rust-serde-pickle
ExclusiveArch: %{rust_arches}
- rust-serde-value
ExclusiveArch: %{rust_arches}
- rust-serde-xml-rs
ExclusiveArch: %{rust_arches}
- rust-serde_bser
ExclusiveArch: %{rust_arches}
- rust-serde_bytes
ExclusiveArch: %{rust_arches}
- rust-serde_cbor
ExclusiveArch: %{rust_arches}
- rust-serde_derive
ExclusiveArch: %{rust_arches}
- rust-serde_fmt
ExclusiveArch: %{rust_arches}
- rust-serde_ignored
ExclusiveArch: %{rust_arches}
- rust-serde_json
ExclusiveArch: %{rust_arches}
- rust-serde_repr
ExclusiveArch: %{rust_arches}
- rust-serde_stacker
ExclusiveArch: %{rust_arches}
- rust-serde_test
ExclusiveArch: %{rust_arches}
- rust-serde_url_params
ExclusiveArch: %{rust_arches}
- rust-serde_urlencoded
ExclusiveArch: %{rust_arches}
- rust-serde_urlencoded0.6
ExclusiveArch: %{rust_arches}
- rust-serde_with
ExclusiveArch: %{rust_arches}
- rust-serde_with_macros
ExclusiveArch: %{rust_arches}
- rust-serde_yaml
ExclusiveArch: %{rust_arches}
- rust-serial-core
ExclusiveArch: %{rust_arches}
- rust-serial_test
ExclusiveArch: %{rust_arches}
- rust-serial_test_derive
ExclusiveArch: %{rust_arches}
- rust-servo-fontconfig
ExclusiveArch: %{rust_arches}
- rust-servo-fontconfig-sys
ExclusiveArch: %{rust_arches}
- rust-sev
ExclusiveArch: %{rust_arches}
- rust-sevctl
ExclusiveArch: %{rust_arches}
- rust-sha-1
ExclusiveArch: %{rust_arches}
- rust-sha1
ExclusiveArch: %{rust_arches}
- rust-sha1collisiondetection
ExclusiveArch: %{rust_arches}
- rust-sha2
ExclusiveArch: %{rust_arches}
- rust-sha3
ExclusiveArch: %{rust_arches}
- rust-shadow-rs
ExclusiveArch: %{rust_arches}
- rust-shared_child
ExclusiveArch: %{rust_arches}
- rust-shared_library
ExclusiveArch: %{rust_arches}
- rust-shell-escape
ExclusiveArch: %{rust_arches}
- rust-shell-words
ExclusiveArch: %{rust_arches}
- rust-shellexpand
ExclusiveArch: %{rust_arches}
- rust-shellwords
ExclusiveArch: %{rust_arches}
- rust-shlex
ExclusiveArch: %{rust_arches}
- rust-signal-hook
ExclusiveArch: %{rust_arches}
- rust-signal-hook-mio
ExclusiveArch: %{rust_arches}
- rust-signal-hook-registry
ExclusiveArch: %{rust_arches}
- rust-signal-hook0.1
ExclusiveArch: %{rust_arches}
- rust-signature
ExclusiveArch: x86_64 aarch64
- rust-silver
ExclusiveArch: %{rust_arches}
- rust-simba
ExclusiveArch: %{rust_arches}
- rust-simd_helpers
ExclusiveArch: %{rust_arches}
- rust-simdutf8
ExclusiveArch: %{rust_arches}
- rust-similar
ExclusiveArch: %{rust_arches}
- rust-similar-asserts
ExclusiveArch: %{rust_arches}
- rust-simple-error
ExclusiveArch: %{rust_arches}
- rust-simple_asn1
ExclusiveArch: %{rust_arches}
- rust-simple_logger
ExclusiveArch: %{rust_arches}
- rust-simplelog
ExclusiveArch: %{rust_arches}
- rust-siphasher
ExclusiveArch: %{rust_arches}
- rust-size
ExclusiveArch: %{rust_arches}
- rust-sized-chunks
ExclusiveArch: %{rust_arches}
- rust-skeptic
ExclusiveArch: %{rust_arches}
- rust-skim
ExclusiveArch: %{rust_arches}
- rust-slab
ExclusiveArch: %{rust_arches}
- rust-slice-deque
ExclusiveArch: %{rust_arches}
- rust-slog
ExclusiveArch: %{rust_arches}
- rust-slog-async
ExclusiveArch: %{rust_arches}
- rust-slog-scope
ExclusiveArch: %{rust_arches}
- rust-slog-term
ExclusiveArch: %{rust_arches}
- rust-slotmap
ExclusiveArch: %{rust_arches}
- rust-slug
ExclusiveArch: %{rust_arches}
- rust-sluice
ExclusiveArch: %{rust_arches}
- rust-smallbitvec
ExclusiveArch: %{rust_arches}
- rust-smallstr
ExclusiveArch: %{rust_arches}
- rust-smallvec
ExclusiveArch: %{rust_arches}
- rust-smart-default
ExclusiveArch: %{rust_arches}
- rust-smawk
ExclusiveArch: %{rust_arches}
- rust-smithay-client-toolkit
ExclusiveArch: %{rust_arches}
- rust-smithay-client-toolkit0.12
ExclusiveArch: %{rust_arches}
- rust-smithay-clipboard
ExclusiveArch: %{rust_arches}
- rust-snafu
ExclusiveArch: %{rust_arches}
- rust-snafu-derive
ExclusiveArch: %{rust_arches}
- rust-snake_case
ExclusiveArch: %{rust_arches}
- rust-socket2
ExclusiveArch: %{rust_arches}
- rust-socket2_0.3
ExclusiveArch: %{rust_arches}
- rust-sop
ExclusiveArch: %{rust_arches}
- rust-soup-sys
ExclusiveArch: %{rust_arches}
- rust-spin
ExclusiveArch: %{rust_arches}
- rust-spin_on
ExclusiveArch: %{rust_arches}
- rust-spinning_top
ExclusiveArch: %{rust_arches}
- rust-spmc
ExclusiveArch: %{rust_arches}
- rust-ssh-key-dir
ExclusiveArch: %{rust_arches}
- rust-stable_deref_trait
ExclusiveArch: %{rust_arches}
- rust-stacker
ExclusiveArch: %{rust_arches}
- rust-standback
ExclusiveArch: %{rust_arches}
- rust-starship
ExclusiveArch: %{rust_arches}
- rust-starship_module_config_derive
ExclusiveArch: %{rust_arches}
- rust-static_assertions
ExclusiveArch: %{rust_arches}
- rust-statistical
ExclusiveArch: %{rust_arches}
- rust-statrs
ExclusiveArch: %{rust_arches}
- rust-stb_truetype
ExclusiveArch: %{rust_arches}
- rust-stderrlog
ExclusiveArch: %{rust_arches}
- rust-str_stack
ExclusiveArch: %{rust_arches}
- rust-stratisd_proc_macros
ExclusiveArch: %{rust_arches}
- rust-streaming-stats
ExclusiveArch: %{rust_arches}
- rust-streebog
ExclusiveArch: %{rust_arches}
- rust-string
ExclusiveArch: %{rust_arches}
- rust-string_cache
ExclusiveArch: %{rust_arches}
- rust-string_cache_codegen
ExclusiveArch: %{rust_arches}
- rust-string_cache_shared
ExclusiveArch: %{rust_arches}
- rust-strings
ExclusiveArch: %{rust_arches}
- rust-strip-ansi-escapes
ExclusiveArch: %{rust_arches}
- rust-strong-xml
ExclusiveArch: %{rust_arches}
- rust-strong-xml-derive
ExclusiveArch: %{rust_arches}
- rust-strsim
ExclusiveArch: %{rust_arches}
- rust-structopt
ExclusiveArch: %{rust_arches}
- rust-structopt-derive
ExclusiveArch: %{rust_arches}
- rust-structopt-derive0.2
ExclusiveArch: %{rust_arches}
- rust-structopt0.2
ExclusiveArch: %{rust_arches}
- rust-strum
ExclusiveArch: %{rust_arches}
- rust-strum_macros
ExclusiveArch: %{rust_arches}
- rust-subprocess
ExclusiveArch: %{rust_arches}
- rust-subtle
ExclusiveArch: %{rust_arches}
- rust-sudo_plugin
ExclusiveArch: %{rust_arches}
- rust-sudo_plugin-sys
ExclusiveArch: %{rust_arches}
- rust-sval
ExclusiveArch: %{rust_arches}
- rust-sval_derive
ExclusiveArch: %{rust_arches}
- rust-sval_json
ExclusiveArch: %{rust_arches}
- rust-svg
ExclusiveArch: %{rust_arches}
- rust-svg_metadata
ExclusiveArch: %{rust_arches}
- rust-svgfilters
ExclusiveArch: %{rust_arches}
- rust-svgtypes
ExclusiveArch: %{rust_arches}
- rust-sxd-document
ExclusiveArch: %{rust_arches}
- rust-syn
ExclusiveArch: %{rust_arches}
- rust-syn0.15
ExclusiveArch: %{rust_arches}
- rust-synom
ExclusiveArch: %{rust_arches}
- rust-synstructure
ExclusiveArch: %{rust_arches}
- rust-syntect
ExclusiveArch: %{rust_arches}
- rust-sys-info
ExclusiveArch: %{rust_arches}
- rust-sysctl
ExclusiveArch: %{rust_arches}
- rust-sysinfo
ExclusiveArch: %{rust_arches}
- rust-syslog
ExclusiveArch: %{rust_arches}
- rust-system-deps
ExclusiveArch: %{rust_arches}
- rust-system76_ectool
ExclusiveArch: %{rust_arches}
- rust-systemd
ExclusiveArch: %{rust_arches}
- rust-tabular
ExclusiveArch: %{rust_arches}
- rust-tabwriter
ExclusiveArch: %{rust_arches}
- rust-take
ExclusiveArch: %{rust_arches}
- rust-take_mut
ExclusiveArch: %{rust_arches}
- rust-takeable
ExclusiveArch: %{rust_arches}
- rust-takeable-option
ExclusiveArch: %{rust_arches}
- rust-tap
ExclusiveArch: %{rust_arches}
- rust-tar
ExclusiveArch: %{rust_arches}
- rust-target
ExclusiveArch: %{rust_arches}
- rust-target-lexicon
ExclusiveArch: %{rust_arches}
- rust-tealdeer
ExclusiveArch: %{rust_arches}
- rust-teloxide
ExclusiveArch: %{rust_arches}
- rust-teloxide-macros
ExclusiveArch: %{rust_arches}
- rust-tempdir
ExclusiveArch: %{rust_arches}
- rust-tempfile
ExclusiveArch: %{rust_arches}
- rust-temptree
ExclusiveArch: %{rust_arches}
- rust-tendril
ExclusiveArch: %{rust_arches}
- rust-tera
ExclusiveArch: %{rust_arches}
- rust-term
ExclusiveArch: %{rust_arches}
- rust-term0.6
ExclusiveArch: %{rust_arches}
- rust-term_grid
ExclusiveArch: %{rust_arches}
- rust-term_size
ExclusiveArch: %{rust_arches}
- rust-termcolor
ExclusiveArch: %{rust_arches}
- rust-terminal_size
ExclusiveArch: %{rust_arches}
- rust-terminfo
ExclusiveArch: %{rust_arches}
- rust-termion
ExclusiveArch: %{rust_arches}
- rust-termios
ExclusiveArch: %{rust_arches}
- rust-test-assembler
ExclusiveArch: %{rust_arches}
- rust-test-case
ExclusiveArch: %{rust_arches}
- rust-tester
ExclusiveArch: %{rust_arches}
- rust-testing_logger
ExclusiveArch: %{rust_arches}
- rust-textwrap
ExclusiveArch: %{rust_arches}
- rust-textwrap0.11
ExclusiveArch: %{rust_arches}
- rust-textwrap0.12
ExclusiveArch: %{rust_arches}
- rust-thiserror
ExclusiveArch: %{rust_arches}
- rust-thiserror-impl
ExclusiveArch: %{rust_arches}
- rust-thread-id
ExclusiveArch: %{rust_arches}
- rust-thread-tree
ExclusiveArch: %{rust_arches}
- rust-thread_local
ExclusiveArch: %{rust_arches}
- rust-threadpool
ExclusiveArch: %{rust_arches}
- rust-tiff
ExclusiveArch: %{rust_arches}
- rust-tiger
ExclusiveArch: %{rust_arches}
- rust-time
ExclusiveArch: %{rust_arches}
- rust-time-macros
ExclusiveArch: %{rust_arches}
- rust-time-macros-impl
ExclusiveArch: %{rust_arches}
- rust-time-macros0.1
ExclusiveArch: %{rust_arches}
- rust-time0.1
ExclusiveArch: %{rust_arches}
- rust-time0.2
ExclusiveArch: %{rust_arches}
- rust-timebomb
ExclusiveArch: %{rust_arches}
- rust-timer
ExclusiveArch: %{rust_arches}
- rust-timerfd
ExclusiveArch: %{rust_arches}
- rust-tiny-keccak
ExclusiveArch: %{rust_arches}
- rust-tiny_http
ExclusiveArch: %{rust_arches}
- rust-tiny_http0.6
ExclusiveArch: %{rust_arches}
- rust-tinyfiledialogs
ExclusiveArch: %{rust_arches}
- rust-tinystr
ExclusiveArch: %{rust_arches}
- rust-tinytemplate
ExclusiveArch: %{rust_arches}
- rust-tinyvec
ExclusiveArch: %{rust_arches}
- rust-tinyvec_macros
ExclusiveArch: %{rust_arches}
- rust-tokei
ExclusiveArch: %{rust_arches}
- rust-tokio
ExclusiveArch: %{rust_arches}
- rust-tokio-codec
ExclusiveArch: %{rust_arches}
- rust-tokio-core
ExclusiveArch: %{rust_arches}
- rust-tokio-current-thread
ExclusiveArch: %{rust_arches}
- rust-tokio-executor
ExclusiveArch: %{rust_arches}
- rust-tokio-fs
ExclusiveArch: %{rust_arches}
- rust-tokio-io
ExclusiveArch: %{rust_arches}
- rust-tokio-macros
ExclusiveArch: %{rust_arches}
- rust-tokio-macros0.2
ExclusiveArch: %{rust_arches}
- rust-tokio-mock-task
ExclusiveArch: %{rust_arches}
- rust-tokio-native-tls
ExclusiveArch: %{rust_arches}
- rust-tokio-openssl
ExclusiveArch: %{rust_arches}
- rust-tokio-openssl0.4
ExclusiveArch: %{rust_arches}
- rust-tokio-reactor
ExclusiveArch: %{rust_arches}
- rust-tokio-rustls
ExclusiveArch: %{rust_arches}
- rust-tokio-socks
ExclusiveArch: %{rust_arches}
- rust-tokio-socks0.3
ExclusiveArch: %{rust_arches}
- rust-tokio-stream
ExclusiveArch: %{rust_arches}
- rust-tokio-sync
ExclusiveArch: %{rust_arches}
- rust-tokio-tcp
ExclusiveArch: %{rust_arches}
- rust-tokio-test
ExclusiveArch: %{rust_arches}
- rust-tokio-threadpool
ExclusiveArch: %{rust_arches}
- rust-tokio-timer
ExclusiveArch: %{rust_arches}
- rust-tokio-tls
ExclusiveArch: %{rust_arches}
- rust-tokio-tls0.2
ExclusiveArch: %{rust_arches}
- rust-tokio-tungstenite
ExclusiveArch: %{rust_arches}
- rust-tokio-udp
ExclusiveArch: %{rust_arches}
- rust-tokio-uds
ExclusiveArch: %{rust_arches}
- rust-tokio-util
ExclusiveArch: %{rust_arches}
- rust-tokio-util0.3
ExclusiveArch: %{rust_arches}
- rust-tokio0.1
ExclusiveArch: %{rust_arches}
- rust-tokio0.2
ExclusiveArch: %{rust_arches}
- rust-toml
ExclusiveArch: %{rust_arches}
- rust-toml0.4
ExclusiveArch: %{rust_arches}
- rust-toml_edit
ExclusiveArch: %{rust_arches}
- rust-tower-layer
ExclusiveArch: %{rust_arches}
- rust-tower-service
ExclusiveArch: %{rust_arches}
- rust-tower-test
ExclusiveArch: %{rust_arches}
- rust-tower-util
ExclusiveArch: %{rust_arches}
- rust-tpm2-policy
ExclusiveArch: %{rust_arches}
- rust-tracing
ExclusiveArch: %{rust_arches}
- rust-tracing-attributes
ExclusiveArch: %{rust_arches}
- rust-tracing-core
ExclusiveArch: %{rust_arches}
- rust-tracing-futures
ExclusiveArch: %{rust_arches}
- rust-traitobject
ExclusiveArch: %{rust_arches}
- rust-trash
ExclusiveArch: %{rust_arches}
- rust-treebitmap
ExclusiveArch: %{rust_arches}
- rust-treeline
ExclusiveArch: %{rust_arches}
- rust-trust-dns-https
ExclusiveArch: %{rust_arches}
- rust-trust-dns-native-tls
ExclusiveArch: %{rust_arches}
- rust-trust-dns-native-tls0.19
ExclusiveArch: %{rust_arches}
- rust-trust-dns-openssl
ExclusiveArch: %{rust_arches}
- rust-trust-dns-openssl0.19
ExclusiveArch: %{rust_arches}
- rust-trust-dns-proto
ExclusiveArch: %{rust_arches}
- rust-trust-dns-proto0.19
ExclusiveArch: %{rust_arches}
- rust-trust-dns-resolver
ExclusiveArch: %{rust_arches}
- rust-trust-dns-resolver0.19
ExclusiveArch: %{rust_arches}
- rust-trust-dns-rustls
ExclusiveArch: %{rust_arches}
- rust-try-lock
ExclusiveArch: %{rust_arches}
- rust-trybuild
ExclusiveArch: %{rust_arches}
- rust-tss-esapi
ExclusiveArch: %{rust_arches}
- rust-tss-esapi-sys
ExclusiveArch: %{rust_arches}
- rust-ttf-parser
ExclusiveArch: %{rust_arches}
- rust-tui
ExclusiveArch: %{rust_arches}
- rust-tui-react
ExclusiveArch: %{rust_arches}
- rust-tui0.11
ExclusiveArch: %{rust_arches}
- rust-tui0.9
ExclusiveArch: %{rust_arches}
- rust-tuikit
ExclusiveArch: %{rust_arches}
- rust-tungstenite
ExclusiveArch: %{rust_arches}
- rust-twoway
ExclusiveArch: %{rust_arches}
- rust-type-map
ExclusiveArch: %{rust_arches}
- rust-typeable
ExclusiveArch: %{rust_arches}
- rust-typed-arena
ExclusiveArch: %{rust_arches}
- rust-typemap
ExclusiveArch: %{rust_arches}
- rust-typenum
ExclusiveArch: %{rust_arches}
- rust-typetag
ExclusiveArch: %{rust_arches}
- rust-typetag-impl
ExclusiveArch: %{rust_arches}
- rust-tzfile
ExclusiveArch: %{rust_arches}
- rust-ucd-parse
ExclusiveArch: %{rust_arches}
- rust-ucd-trie
ExclusiveArch: %{rust_arches}
- rust-ucd-util
ExclusiveArch: %{rust_arches}
- rust-unchecked-index
ExclusiveArch: %{rust_arches}
- rust-unescape
ExclusiveArch: %{rust_arches}
- rust-unic-char-property
ExclusiveArch: %{rust_arches}
- rust-unic-char-range
ExclusiveArch: %{rust_arches}
- rust-unic-common
ExclusiveArch: %{rust_arches}
- rust-unic-langid
ExclusiveArch: %{rust_arches}
- rust-unic-langid-impl
ExclusiveArch: %{rust_arches}
- rust-unic-langid-macros
ExclusiveArch: %{rust_arches}
- rust-unic-langid-macros-impl
ExclusiveArch: %{rust_arches}
- rust-unic-locale
ExclusiveArch: %{rust_arches}
- rust-unic-locale-impl
ExclusiveArch: %{rust_arches}
- rust-unic-locale-macros
ExclusiveArch: %{rust_arches}
- rust-unic-locale-macros-impl
ExclusiveArch: %{rust_arches}
- rust-unic-segment
ExclusiveArch: %{rust_arches}
- rust-unic-ucd-category
ExclusiveArch: %{rust_arches}
- rust-unic-ucd-common
ExclusiveArch: %{rust_arches}
- rust-unic-ucd-segment
ExclusiveArch: %{rust_arches}
- rust-unic-ucd-version
ExclusiveArch: %{rust_arches}
- rust-unicase
ExclusiveArch: %{rust_arches}
- rust-unicase1
ExclusiveArch: %{rust_arches}
- rust-unicode-bidi
ExclusiveArch: %{rust_arches}
- rust-unicode-linebreak
ExclusiveArch: %{rust_arches}
- rust-unicode-normalization
ExclusiveArch: %{rust_arches}
- rust-unicode-segmentation
ExclusiveArch: %{rust_arches}
- rust-unicode-truncate
ExclusiveArch: %{rust_arches}
- rust-unicode-width
ExclusiveArch: %{rust_arches}
- rust-unicode-xid
ExclusiveArch: %{rust_arches}
- rust-unicode-xid0.1
ExclusiveArch: %{rust_arches}
- rust-unicode_categories
ExclusiveArch: %{rust_arches}
- rust-unindent
ExclusiveArch: %{rust_arches}
- rust-universal-hash
ExclusiveArch: %{rust_arches}
- rust-unix_socket
ExclusiveArch: %{rust_arches}
- rust-unreachable
ExclusiveArch: %{rust_arches}
- rust-unsafe-any
ExclusiveArch: %{rust_arches}
- rust-unsafe-io
ExclusiveArch: %{rust_arches}
- rust-untrusted
ExclusiveArch: %{rust_arches}
- rust-uom
ExclusiveArch: %{rust_arches}
- rust-url
ExclusiveArch: %{rust_arches}
- rust-url1
ExclusiveArch: %{rust_arches}
- rust-url_serde
ExclusiveArch: %{rust_arches}
- rust-urlencoding
ExclusiveArch: %{rust_arches}
- rust-urlocator
ExclusiveArch: %{rust_arches}
- rust-urlshortener
ExclusiveArch: %{rust_arches}
- rust-users
ExclusiveArch: %{rust_arches}
- rust-users0.10
ExclusiveArch: %{rust_arches}
- rust-utf-8
ExclusiveArch: %{rust_arches}
- rust-utf8-cstr
ExclusiveArch: %{rust_arches}
- rust-utf8-ranges
ExclusiveArch: %{rust_arches}
- rust-utf8-width
ExclusiveArch: %{rust_arches}
- rust-utf8parse
ExclusiveArch: %{rust_arches}
- rust-uuid
ExclusiveArch: %{rust_arches}
- rust-uuid0.7
ExclusiveArch: %{rust_arches}
- rust-v_frame
ExclusiveArch: %{rust_arches}
- rust-value-bag
ExclusiveArch: %{rust_arches}
- rust-varlink
ExclusiveArch: %{rust_arches}
- rust-varlink-cli
ExclusiveArch: %{rust_arches}
- rust-varlink_generator
ExclusiveArch: %{rust_arches}
- rust-varlink_parser
ExclusiveArch: %{rust_arches}
- rust-varlink_stdinterfaces
ExclusiveArch: %{rust_arches}
- rust-vcpkg
ExclusiveArch: %{rust_arches}
- rust-vec_map
ExclusiveArch: %{rust_arches}
- rust-vergen
ExclusiveArch: %{rust_arches}
- rust-vergen3
ExclusiveArch: %{rust_arches}
- rust-version
ExclusiveArch: %{rust_arches}
- rust-version-compare
ExclusiveArch: %{rust_arches}
- rust-version-sync
ExclusiveArch: %{rust_arches}
- rust-version-sync0.8
ExclusiveArch: %{rust_arches}
- rust-version_check
ExclusiveArch: %{rust_arches}
- rust-versions
ExclusiveArch: %{rust_arches}
- rust-virtio-bindings
ExclusiveArch: x86_64 aarch64 ppc64le
- rust-vm-memory
ExclusiveArch: x86_64 aarch64 ppc64le
- rust-vmm-sys-util
ExclusiveArch: x86_64 aarch64 ppc64le
- rust-vmw_backdoor
ExclusiveArch: %{rust_arches}
- rust-void
ExclusiveArch: %{rust_arches}
- rust-vsprintf
ExclusiveArch: %{rust_arches}
- rust-vte
ExclusiveArch: %{rust_arches}
- rust-vte_generate_state_changes
ExclusiveArch: %{rust_arches}
- rust-wait-timeout
ExclusiveArch: %{rust_arches}
- rust-waker-fn
ExclusiveArch: %{rust_arches}
- rust-walkdir
ExclusiveArch: %{rust_arches}
- rust-want
ExclusiveArch: %{rust_arches}
- rust-warp
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen-backend
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen-futures
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen-macro
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen-macro-support
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen-shared
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen-test
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen-test-macro
ExclusiveArch: %{rust_arches}
- rust-wasmer_enumset
ExclusiveArch: %{rust_arches}
- rust-wasmer_enumset_derive
ExclusiveArch: %{rust_arches}
- rust-wasmparser
ExclusiveArch: %{rust_arches}
- rust-wasmtime-cache
ExclusiveArch: %{rust_arches}
- rust-wasmtime-environ
ExclusiveArch: %{rust_arches}
- rust-wasmtime-fiber
ExclusiveArch: %{rust_arches}
- rust-wasmtime-types
ExclusiveArch: %{rust_arches}
- rust-wast
ExclusiveArch: %{rust_arches}
- rust-wat
ExclusiveArch: %{rust_arches}
- rust-watchman_client
ExclusiveArch: %{rust_arches}
- rust-wayland-client
ExclusiveArch: %{rust_arches}
- rust-wayland-commons
ExclusiveArch: %{rust_arches}
- rust-wayland-cursor
ExclusiveArch: %{rust_arches}
- rust-wayland-egl
ExclusiveArch: %{rust_arches}
- rust-wayland-protocols
ExclusiveArch: %{rust_arches}
- rust-wayland-scanner
ExclusiveArch: %{rust_arches}
- rust-wayland-server
ExclusiveArch: %{rust_arches}
- rust-wayland-sys
ExclusiveArch: %{rust_arches}
- rust-web-sys
ExclusiveArch: %{rust_arches}
- rust-webbrowser
ExclusiveArch: %{rust_arches}
- rust-webkit2gtk
ExclusiveArch: %{rust_arches}
- rust-webkit2gtk-sys
ExclusiveArch: %{rust_arches}
- rust-webpki
ExclusiveArch: %{rust_arches}
- rust-webpki-roots
ExclusiveArch: %{rust_arches}
- rust-websocket
ExclusiveArch: %{rust_arches}
- rust-websocket-base
ExclusiveArch: %{rust_arches}
- rust-weezl
ExclusiveArch: %{rust_arches}
- rust-which
ExclusiveArch: %{rust_arches}
- rust-wide
ExclusiveArch: %{rust_arches}
- rust-wild
ExclusiveArch: %{rust_arches}
- rust-wildmatch
ExclusiveArch: %{rust_arches}
- rust-winit
ExclusiveArch: %{rust_arches}
- rust-witx
ExclusiveArch: %{rust_arches}
- rust-ws
ExclusiveArch: %{rust_arches}
- rust-wyz
ExclusiveArch: %{rust_arches}
- rust-x11
ExclusiveArch: %{rust_arches}
- rust-x11-clipboard
ExclusiveArch: %{rust_arches}
- rust-x11-dl
ExclusiveArch: %{rust_arches}
- rust-xattr
ExclusiveArch: %{rust_arches}
- rust-xcb
ExclusiveArch: %{rust_arches}
- rust-xcursor
ExclusiveArch: %{rust_arches}
- rust-xdg
ExclusiveArch: %{rust_arches}
- rust-xi-unicode
ExclusiveArch: %{rust_arches}
- rust-xkbcommon
ExclusiveArch: %{rust_arches}
- rust-xml-rs
ExclusiveArch: %{rust_arches}
- rust-xml5ever
ExclusiveArch: %{rust_arches}
- rust-xmlparser
ExclusiveArch: %{rust_arches}
- rust-xmltree
ExclusiveArch: %{rust_arches}
- rust-xmlwriter
ExclusiveArch: %{rust_arches}
- rust-xz2
ExclusiveArch: %{rust_arches}
- rust-y4m
ExclusiveArch: %{rust_arches}
- rust-yaml-rust
ExclusiveArch: %{rust_arches}
- rust-yaml-rust0.3
ExclusiveArch: %{rust_arches}
- rust-ybaas
ExclusiveArch: %{rust_arches}
- rust-yubibomb
ExclusiveArch: %{rust_arches}
- rust-zbase32
ExclusiveArch: %{rust_arches}
- rust-zbus
ExclusiveArch: %{rust_arches}
- rust-zbus_macros
ExclusiveArch: %{rust_arches}
- rust-zcomponents
ExclusiveArch: %{rust_arches}
- rust-zeroize
ExclusiveArch: %{rust_arches}
- rust-zeroize_derive
ExclusiveArch: %{rust_arches}
- rust-zincati
ExclusiveArch: %{rust_arches}
- rust-zip
ExclusiveArch: %{rust_arches}
- rust-zmq
ExclusiveArch: %{rust_arches}
- rust-zmq-sys
ExclusiveArch: %{rust_arches}
- rust-zoneinfo_compiled
ExclusiveArch: %{rust_arches}
- rust-zopfli
ExclusiveArch: %{rust_arches}
- rust-zoxide
ExclusiveArch: %{rust_arches}
- rust-zram-generator
ExclusiveArch: %{rust_arches}
- rust-zstd
ExclusiveArch: %{rust_arches}
- rust-zstd-safe
ExclusiveArch: %{rust_arches}
- rust-zstd-sys
ExclusiveArch: %{rust_arches}
- rust-zvariant
ExclusiveArch: %{rust_arches}
- rust-zvariant_derive
ExclusiveArch: %{rust_arches}
- s390utils
ExclusiveArch: s390 s390x
- safetyblanket
ExclusiveArch: %{arm} %{ix86} x86_64 aarch64 ppc64le
- sagemath
ExclusiveArch: aarch64 %{ix86} x86_64 ppc sparcv9
- sbcl
ExclusiveArch: %{arm} %{ix86} x86_64 ppc sparcv9 aarch64
- sbd
ExclusiveArch: i686 x86_64 s390x aarch64 ppc64le
- sbsigntools
ExclusiveArch: x86_64 aarch64 %{arm} %{ix86}
- sdsl-lite
ExclusiveArch: %{power64} x86_64 aarch64
- seabios
ExclusiveArch: x86_64
- seadrive-gui
ExclusiveArch: %{qt5_qtwebengine_arches}
- seafile-client
ExclusiveArch: %{qt5_qtwebengine_arches}
- seamonkey
ExclusiveArch: x86_64
- seqan3
ExclusiveArch: %{power64} x86_64 aarch64
- servicelog
ExclusiveArch: ppc %{power64}
- sgabios
ExclusiveArch: %{ix86} x86_64
- sharpfont
ExclusiveArch: %mono_arches
- sharpziplib
ExclusiveArch: %{mono_arches}
- shim
ExclusiveArch: %{efi}
- shim-unsigned-aarch64
ExclusiveArch: aarch64
- shim-unsigned-x64
ExclusiveArch: x86_64
- sigul
ExclusiveArch: x86_64
- skopeo
ExclusiveArch: %{go_arches}
- skychart
ExclusiveArch: %{fpc_arches}
- snapd
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le s390x
- soup-sharp
ExclusiveArch: %{mono_arches}
- sparkleshare
ExclusiveArch: %{mono_arches}
- spicctrl
ExclusiveArch: %{ix86} x86_64
- spice
ExclusiveArch: x86_64
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
- springlobby
ExclusiveArch: %{ix86} x86_64
- squeekboard
ExclusiveArch: %{rust_arches}
- startdde
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
- statsd
ExclusiveArch: %{nodejs_arches} noarch
- stratis-cli
ExclusiveArch: %{rust_arches} noarch
- stratisd
ExclusiveArch: %{rust_arches}
ExclusiveArch: ${rust_arches}
- stripesnoop
ExclusiveArch: %{ix86} x86_64
- supercollider
ExclusiveArch: %{qt5_qtwebengine_arches}
- supermin
ExclusiveArch: %{kernel_arches}
- svt-av1
ExclusiveArch: x86_64
- svt-vp9
ExclusiveArch: x86_64
- swift-lang
ExclusiveArch: x86_64 aarch64
- sysbench
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips}
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64 ppc64le s390x
- syslinux
ExclusiveArch: %{ix86} x86_64
ExclusiveArch: %{ix86} x86_64
- system76-keyboard-configurator
ExclusiveArch: %{rust_arches}
- taglib-sharp
ExclusiveArch: %{mono_arches}
- tarantool
ExclusiveArch: %{ix86} x86_64
- tboot
ExclusiveArch: %{ix86} x86_64
- tdlib
ExclusiveArch: x86_64
- templates_parser
ExclusiveArch: %GPRbuild_arches
- ternimal
ExclusiveArch: %{rust_arches}
- testcloud
ExclusiveArch: %{kernel_arches} noarch
- themonospot-base
ExclusiveArch: %mono_arches
- themonospot-console
ExclusiveArch: %mono_arches
- themonospot-gui-gtk
ExclusiveArch: %mono_arches
- themonospot-plugin-avi
ExclusiveArch: %mono_arches
- themonospot-plugin-mkv
ExclusiveArch: %mono_arches
- thermald
ExclusiveArch: %{ix86} x86_64
- tilix
ExclusiveArch: %{ldc_arches}
- tmux-top
ExclusiveArch: %{go_arches}
- tomboy
ExclusiveArch: %{mono_arches}
- topojson-client
ExclusiveArch: %{nodejs_arches} noarch
- topojson-server
ExclusiveArch: %{nodejs_arches} noarch
- topojson-simplify
ExclusiveArch: %{nodejs_arches} noarch
- torbrowser-launcher
ExclusiveArch: %{ix86} x86_64
- tuned-profiles-nfv-host-bin
ExclusiveArch: %{ix86} x86_64
- uClibc
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips}
- ucx
ExclusiveArch: aarch64 ppc64le x86_64
- uglify-js
ExclusiveArch: %{nodejs_arches} noarch
- unetbootin
ExclusiveArch: %{ix86} x86_64
- ursa-major
ExclusiveArch: noarch aarch64 ppc64le s390x x86_64
- usd
ExclusiveArch: aarch64 x86_64
- v8-314
ExclusiveArch: %{ix86} x86_64 %{arm} mips mipsel ppc ppc64
- valgrind
ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64
- vboot-utils
ExclusiveArch: %{arm} aarch64 %{ix86} x86_64
- vim-go
ExclusiveArch: %{?golang_arches}%{!?golang_arches:%{ix86} x86_64 %{arm}}
- virt-p2v
ExclusiveArch: x86_64
- virt-v2v
ExclusiveArch: x86_64
- virtualbox-guest-additions
ExclusiveArch: i686 x86_64
- vkd3d
ExclusiveArch: %{ix86} x86_64 %{arm}
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
- vmaf
ExclusiveArch: x86_64
- vmemcache
ExclusiveArch: x86_64 ppc64 ppc64le s390x aarch64
- vrq
ExclusiveArch: %{ix86} x86_64
- warsow
ExclusiveArch: %{ix86} x86_64 %{arm}
- warsow-data
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
ExclusiveArch: %{ix86} x86_64 %{arm}
- webkit2-sharp
ExclusiveArch: %mono_arches
- wine
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
ExclusiveArch: %{ix86} %{arm}
- wine-dxvk
ExclusiveArch: %{ix86} x86_64
- winetricks
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
- wxMaxima
ExclusiveArch: %{arm} %{ix86} x86_64 aarch64 ppc sparcv9
- x2goclient
ExclusiveArch: x86_64
- xe-guest-utilities-latest
ExclusiveArch: %{ix86} x86_64
- xen
ExclusiveArch: %{ix86} x86_64 armv7hl aarch64
- xmlada
ExclusiveArch: %{GPRbuild_arches}
- xorg-x11-drv-armsoc
ExclusiveArch: %{arm} aarch64
- xorg-x11-drv-intel
ExclusiveArch: %{ix86} x86_64
- xorg-x11-drv-openchrome
ExclusiveArch: %{ix86} x86_64
- xorg-x11-drv-vesa
ExclusiveArch: %{ix86} x86_64
- xorg-x11-drv-vmware
ExclusiveArch: %{ix86} x86_64 ia64
- xsp
ExclusiveArch: %mono_arches
- yarnpkg
ExclusiveArch: %{nodejs_arches} noarch
- zeal
ExclusiveArch: %{qt5_qtwebengine_arches}
- zeromq-ada
ExclusiveArch: %{GPRbuild_arches}
- zig
ExclusiveArch: %{zig_arches}
- zlib-ada
ExclusiveArch: %{GPRbuild_arches}
- zlib-ng
ExclusiveArch: aarch64 i686 ppc64le s390x x86_64
- zola
ExclusiveArch: %{rust_arches}
2 years, 4 months
Architecture specific change in rpms/dotnet6.0.git
by githook-noreply@fedoraproject.org
The package rpms/dotnet6.0.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=0fdb2e03...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=0fffd382...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=b9e285d2...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=96fb4c4f...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=12044336...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=ccec65f6...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=b18622e4....
Change:
-%ifnarch x86_64
+ExclusiveArch: x86_64
+%ifnarch x86_64
-%ifnarch x86_64
+%ifarch aarch64
+%ifnarch x86_64
+ExclusiveArch: x86_64
Thanks.
Full change:
============
commit d3412cc4b5b5aaa1842515da78c5a6424567aab6
Author: Omair Majid <omajid(a)redhat.com>
Date: Sun Dec 19 17:51:29 2021 -0500
Initial build for Fedora
diff --git a/.gitignore b/.gitignore
index b620824..0f04369 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,6 @@
/dotnet-v5.0.202-SDK.tar.gz
/dotnet-v5.0.203-SDK.tar.gz
/dotnet-v5.0.204-SDK.tar.gz
+/dotnet-9e8b04bbff820c93c142f99a507a46b976f5c14c-x64-bootstrap.tar.xz
+/dotnet-arm64-prebuilts-2021-10-29.tar.gz
+/dotnet-s390x-prebuilts-2021-10-29.tar.gz
diff --git a/copr-build b/copr-build
deleted file mode 100755
index f0d4ca3..0000000
--- a/copr-build
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-set -x
-
-fedpkg --release f34 srpm 2>&1 | tee fedpkg.output
-
-srpm_name=$(grep 'Wrote: ' fedpkg.output | cut -d' ' -f 2)
-
-copr-cli build @dotnet-sig/dotnet-preview "${srpm_name}"
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 2c6abf5..e137b93 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -22,9 +22,9 @@
%global host_version 6.0.0
%global runtime_version 6.0.0
-%global aspnetcore_runtime_version 6.0.0
+%global aspnetcore_runtime_version %{runtime_version}
%global sdk_version 6.0.100
-%global templates_version 6.0.0
+%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version}
@@ -664,7 +664,7 @@ export COMPlus_LTTng=0
%changelog
-* Wed Nov 10 2021 Omair Majid <omajid(a)redhat.com> - 6.0.100-1
+* Sun Dec 19 2021 Omair Majid <omajid(a)redhat.com> - 6.0.100-1
- Update to .NET 6
* Fri Oct 22 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.7.rc2
diff --git a/sources b/sources
new file mode 100644
index 0000000..e5277d1
--- /dev/null
+++ b/sources
@@ -0,0 +1,3 @@
+SHA512 (dotnet-9e8b04bbff820c93c142f99a507a46b976f5c14c-x64-bootstrap.tar.xz) = dedbc8619af5141f7cba108c4060cbbcf9c4c4c8968180ed1dc71d2afdf829a99c479b6daaf5c15018b8cd66de14eb6fee9fc4072f81546067544a6a6a20b641
+SHA512 (dotnet-arm64-prebuilts-2021-10-29.tar.gz) = e24fb8bb8b0fb24f52a68d472356574d8edf7af554b14618aeeae6ff76b54ce5e6d8a9deb056f9bc052bff8d17bae01c6475217039508bb0e08303f9f6c4b5d1
+SHA512 (dotnet-s390x-prebuilts-2021-10-29.tar.gz) = 6ea9d857edce50efd1cc35a73b3b3ccb170bbdb5cc4c8b20fb0ee1c7cb75cc573a565b01ef1bf4eec10a3e6e5209143957425cee5ff3fe24c7c1c89813272a99
commit 2e89959290ded7fa3b68f037f49ccd19123cbb86
Merge: 430e989 8b78620
Author: Omair Majid <omajid(a)redhat.com>
Date: Sun Dec 19 12:12:42 2021 -0500
Merge from dotnet-sig's dotnet6.0 repository
diff --cc README.md
index 13547e4,5289f61..a3681f2
--- a/README.md
+++ b/README.md
@@@ -1,3 -1,137 +1,137 @@@
# dotnet6.0
- The dotnet6.0 package
-This is the pre-release .NET 6.0 package for Fedora.
++This is the .NET 6.0 package for Fedora.
+
+ This package is maintained by the Fedora DotNet SIG (Special Interest
+ Group). You can find out more about the DotNet SIG at:
+
+ - https://fedoraproject.org/wiki/SIGs/DotNet
+ - https://fedoraproject.org/wiki/DotNet
+ - https://lists.fedoraproject.org/archives/list/dotnet-sig@lists.fedoraproj...
+
+ Please report any issues [using
-bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet5.0).
++bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet6.0).
+
+ # Specification
+
+ This package follows [package naming and contents suggested by
+ upstream](https://docs.microsoft.com/en-us/dotnet/core/build/distribution...,
+ with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
+ `%{_libdir}`).
+
+ # Contributing
+
+ The steps below are for the final package. Please only contribute to this
+ pre-release version this if you know what you are doing. Original instructions
+ follow.
+
+ ## General Changes
+
+ 1. Fork the repo.
+
+ 2. Checkout the forked repository.
+
- - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
- - `cd dotnet5.0`
++ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet6.0.git`
++ - `cd dotnet6.0`
+
+ 3. Make your changes. Don't forget to add a changelog.
+
+ 4. Do local builds.
+
+ - `fedpkg local`
+
+ 5. Fix any errors that come up and rebuild until it works locally.
+
+ 6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+ 8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+ 9. Create a pull request with your changes.
+
+ 10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+ 11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+ ## Updating to an new upstream release
+
+ 1. Fork the repo.
+
+ 2. Checkout the forked repository.
+
- - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
- - `cd dotnet5.0`
++ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet6.0.git`
++ - `cd dotnet6.0`
+
+ 3. Build the new upstream source tarball. Update the versions in the
+ spec file. Add a changelog. This is generally automated by the
+ following.
+
+ - `./update-release <sdk-version> <runtime-version>`
+
+ If this fails because of compiler errors, you might have to figure
+ out a fix, then add the patch in `build-dotnet-tarball` script
+ rather than the spec file.
+
+ 4. Do local builds.
+
+ - `fedpkg local`
+
+ 5. Fix any errors that come up and rebuild until it works locally. Any
+ patches that are needed at this point should be added to the spec file.
+
+ 6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+ 7. Upload the source archive to the Fedora look-aside cache.
+
+ - `fedpkg new-sources path-to-generated-dotnet-source-tarball.tar.gz`
+
+ 8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+ 9. Create a pull request with your changes.
+
+ 10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+ 11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+ # Testing
+
+ This package uses CI tests as defined in `tests/test.yml`. Creating a
+ pull-request or running a build will fire off tests and flag any issues. We have
+ enabled gating (via `gating.yaml`) on the tests. That prevents a build
+ that fails any test from being released until the failures are waived.
+
+ The tests themselves are contained in this external repository:
+ https://github.com/redhat-developer/dotnet-regular-tests/
commit 8b78620e7d10c6712e103717c9c9dc073baf0702
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Dec 2 16:43:41 2021 -0500
Fix Fedora macro
It needs to be optional, using %{?..} syntax to make sure it doesn't
error out on non-Fedora systems.
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 026fd19..2c6abf5 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -605,7 +605,7 @@ echo "Testing build results for debug symbols..."
%check
-%if 0%{fedora} > 35
+%if 0%{?fedora} > 35
# lttng in Fedora > 35 is incompatible with .NET
export COMPlus_LTTng=0
%endif
commit fcca190f6a4c7d3fad0bdb92a62fc35a117ec845
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Dec 2 12:23:20 2021 -0500
Disable lttng at runtime manually
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 7aed931..026fd19 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -409,9 +409,6 @@ ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages
# Fix bad hardcoded path in build
sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehost/hostmisc/pal.unix.cpp
-# Disable warnings
-# sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
-
pushd src/runtime.*
%patch100 -p1
%patch101 -p1
@@ -522,6 +519,11 @@ unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
+# Disable tracing, which is incompatible with certain versions of
+# lttng See https://github.com/dotnet/runtime/issues/57784. The
+# suggested compile-time change doesn't work, unfrotunately.
+export COMPlus_LTTng=0
+
VERBOSE=1 ./build.sh \
%if %{without bootstrap}
--with-sdk previously-built-dotnet \
@@ -603,6 +605,11 @@ echo "Testing build results for debug symbols..."
%check
+%if 0%{fedora} > 35
+# lttng in Fedora > 35 is incompatible with .NET
+export COMPlus_LTTng=0
+%endif
+
%{buildroot}%{_libdir}/dotnet/dotnet --info
commit 84b428a155cda8d96ddf3aa2a844d22b1ac27c50
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Nov 30 08:40:18 2021 -0500
Fix build against clang 13
diff --git a/copr-build b/copr-build
index 8a7cf46..f0d4ca3 100755
--- a/copr-build
+++ b/copr-build
@@ -4,7 +4,7 @@ set -euo pipefail
set -x
-fedpkg --release f32 srpm 2>&1 | tee fedpkg.output
+fedpkg --release f34 srpm 2>&1 | tee fedpkg.output
srpm_name=$(grep 'Wrote: ' fedpkg.output | cut -d' ' -f 2)
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index fc63a3f..7aed931 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -88,6 +88,8 @@ Patch100: runtime-arm64-lld-fix.patch
Patch101: runtime-mono-remove-ilstrip.patch
# https://github.com/dotnet/runtime/pull/61442
Patch102: runtime-61442-disable-werror.patch
+# https://github.com/dotnet/runtime/pull/62170
+Patch103: runtime-62170-clang13.patch
# https://github.com/dotnet/command-line-api/pull/1401
Patch300: command-line-api-use-work-tree-with-git-apply.patch
@@ -414,6 +416,7 @@ pushd src/runtime.*
%patch100 -p1
%patch101 -p1
%patch102 -p1
+%patch103 -p1
popd
pushd src/command-line-api.*
diff --git a/runtime-62170-clang13.patch b/runtime-62170-clang13.patch
new file mode 100644
index 0000000..8c47186
--- /dev/null
+++ b/runtime-62170-clang13.patch
@@ -0,0 +1,76 @@
+From 9cd95a5608b667e22727d9eb1a5330efd61dfe50 Mon Sep 17 00:00:00 2001
+From: Jan Vorlicek <janvorli(a)microsoft.com>
+Date: Mon, 29 Nov 2021 17:32:45 -0800
+Subject: [PATCH] Fix clang 13 induced runtime issues
+
+The clang 13 optimizer started to assume that "this" pointer is always
+properly aligned. That lead to elimination of some code that was actually
+needed.
+It also takes pointer aliasing rules more strictly in one place in jit.
+That caused the optimizer to falsely assume that a callee with an argument
+passed by reference is not modifying that argument and used a stale
+copy of the original value at the caller site.
+
+This change fixes both of the issues. With this fix, runtime compiled
+using clang 13 seems to be fully functional.
+---
+ src/coreclr/inc/corhlpr.h | 8 ++++----
+ src/coreclr/jit/bitsetasshortlong.h | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/coreclr/inc/corhlpr.h b/src/coreclr/inc/corhlpr.h
+index 450514da95c1..427e8cdc0ff5 100644
+--- a/src/coreclr/inc/corhlpr.h
++++ b/src/coreclr/inc/corhlpr.h
+@@ -336,7 +336,7 @@ struct COR_ILMETHOD_SECT
+ const COR_ILMETHOD_SECT* Next() const
+ {
+ if (!More()) return(0);
+- return ((COR_ILMETHOD_SECT*)(((BYTE *)this) + DataSize()))->Align();
++ return ((COR_ILMETHOD_SECT*)Align(((BYTE *)this) + DataSize()));
+ }
+
+ const BYTE* Data() const
+@@ -374,9 +374,9 @@ struct COR_ILMETHOD_SECT
+ return((AsSmall()->Kind & CorILMethod_Sect_FatFormat) != 0);
+ }
+
+- const COR_ILMETHOD_SECT* Align() const
++ static const void* Align(const void* p)
+ {
+- return((COR_ILMETHOD_SECT*) ((((UINT_PTR) this) + 3) & ~3));
++ return((void*) ((((UINT_PTR) p) + 3) & ~3));
+ }
+
+ protected:
+@@ -579,7 +579,7 @@ typedef struct tagCOR_ILMETHOD_FAT : IMAGE_COR_ILMETHOD_FAT
+
+ const COR_ILMETHOD_SECT* GetSect() const {
+ if (!More()) return (0);
+- return(((COR_ILMETHOD_SECT*) (GetCode() + GetCodeSize()))->Align());
++ return(((COR_ILMETHOD_SECT*) COR_ILMETHOD_SECT::Align(GetCode() + GetCodeSize())));
+ }
+ } COR_ILMETHOD_FAT;
+
+diff --git a/src/coreclr/jit/bitsetasshortlong.h b/src/coreclr/jit/bitsetasshortlong.h
+index d343edeeda4c..365cf346a10a 100644
+--- a/src/coreclr/jit/bitsetasshortlong.h
++++ b/src/coreclr/jit/bitsetasshortlong.h
+@@ -345,7 +345,7 @@ class BitSetOps</*BitSetType*/ BitSetShortLongRep,
+ {
+ if (IsShort(env))
+ {
+- (size_t&)out = (size_t)out & ((size_t)gen | (size_t)in);
++ out = (BitSetShortLongRep)((size_t)out & ((size_t)gen | (size_t)in));
+ }
+ else
+ {
+@@ -361,7 +361,7 @@ class BitSetOps</*BitSetType*/ BitSetShortLongRep,
+ {
+ if (IsShort(env))
+ {
+- (size_t&)in = (size_t)use | ((size_t)out & ~(size_t)def);
++ in = (BitSetShortLongRep)((size_t)use | ((size_t)out & ~(size_t)def));
+ }
+ else
+ {
commit abafa176a7ac41bc6b2ebf84040bd39bca21c15a
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Nov 16 08:20:56 2021 -0500
Fix build errors caused by Werror
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index d222adf..fc63a3f 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -86,6 +86,8 @@ Source11: dotnet.sh.in
Patch100: runtime-arm64-lld-fix.patch
# Mono still has a dependency on (now unbuildable) ILStrip which was removed from CoreCLR: https://github.com/dotnet/runtime/pull/60315
Patch101: runtime-mono-remove-ilstrip.patch
+# https://github.com/dotnet/runtime/pull/61442
+Patch102: runtime-61442-disable-werror.patch
# https://github.com/dotnet/command-line-api/pull/1401
Patch300: command-line-api-use-work-tree-with-git-apply.patch
@@ -411,6 +413,7 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehos
pushd src/runtime.*
%patch100 -p1
%patch101 -p1
+%patch102 -p1
popd
pushd src/command-line-api.*
diff --git a/runtime-61442-disable-werror.patch b/runtime-61442-disable-werror.patch
new file mode 100644
index 0000000..401440c
--- /dev/null
+++ b/runtime-61442-disable-werror.patch
@@ -0,0 +1,41 @@
+From f41c06ba040adf1930156340c5b03d9864d8a1d4 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Wed, 10 Nov 2021 17:54:45 -0500
+Subject: [PATCH] The 6.0 branch is no longer pre-release
+
+This has limited affects, but it should have been set to false since 6.0
+is now stable/released.
+
+The one difference it makes is that -Werror is disabled when building
+native code.
+---
+ Directory.Build.props | 2 +-
+ eng/native/configureplatform.cmake | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Directory.Build.props b/Directory.Build.props
+index f19ea9208c2c..5cb87bb7c257 100644
+--- a/Directory.Build.props
++++ b/Directory.Build.props
+@@ -255,7 +255,7 @@
+ <PackageReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</PackageReleaseNotes>
+ <!-- Indicates this is not an officially supported release. Release branches should set this to false. -->
+ <!-- Keep it in sync with PRERELEASE in eng/native/configureplatform.cmake -->
+- <IsPrerelease>true</IsPrerelease>
++ <IsPrerelease>false</IsPrerelease>
+ <IsPrivateAssembly>$(MSBuildProjectName.Contains('Private'))</IsPrivateAssembly>
+ <!-- Private packages should not be stable -->
+ <SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(IsPrivateAssembly)">true</SuppressFinalPackageVersion>
+diff --git a/eng/native/configureplatform.cmake b/eng/native/configureplatform.cmake
+index 519431772004..af1c88bce5b6 100644
+--- a/eng/native/configureplatform.cmake
++++ b/eng/native/configureplatform.cmake
+@@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/functions.cmake)
+
+ # If set, indicates that this is not an officially supported release
+ # Keep in sync with IsPrerelease in Directory.Build.props
+-set(PRERELEASE 1)
++set(PRERELEASE 0)
+
+ #----------------------------------------
+ # Detect and set platform variable names
commit 0fdb2e0331d111f1fe03c9418de35754cb71eac2
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Nov 11 08:10:43 2021 -0500
Update to .NET 6 GA
diff --git a/arcade-no-apphost.patch b/arcade-no-apphost.patch
new file mode 100644
index 0000000..cec03a1
--- /dev/null
+++ b/arcade-no-apphost.patch
@@ -0,0 +1,36 @@
+Index: a/src/Microsoft.DotNet.GitSync.CommitManager/Microsoft.DotNet.GitSync.CommitManager.csproj
+===================================================================
+--- a/src/Microsoft.DotNet.GitSync.CommitManager/Microsoft.DotNet.GitSync.CommitManager.csproj
++++ b/src/Microsoft.DotNet.GitSync.CommitManager/Microsoft.DotNet.GitSync.CommitManager.csproj
+@@ -5,6 +5,7 @@
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ <LangVersion>latest</LangVersion>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
++ <UseAppHost>false</UseAppHost>
+ </PropertyGroup>
+
+ <ItemGroup>
+Index: a/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.CmdLine/Microsoft.DotNet.SwaggerGenerator.CmdLine.csproj
+===================================================================
+--- a/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.CmdLine/Microsoft.DotNet.SwaggerGenerator.CmdLine.csproj
++++ b/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.CmdLine/Microsoft.DotNet.SwaggerGenerator.CmdLine.csproj
+@@ -9,6 +9,7 @@
+ <ToolCommandName>dotnet-swaggergen</ToolCommandName>
+ <SignAssembly>false</SignAssembly>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
++ <UseAppHost>false</UseAppHost>
+ </PropertyGroup>
+
+ <ItemGroup>
+Index: a/src/Microsoft.DotNet.XUnitConsoleRunner/src/Microsoft.DotNet.XUnitConsoleRunner.csproj
+===================================================================
+--- a/src/Microsoft.DotNet.XUnitConsoleRunner/src/Microsoft.DotNet.XUnitConsoleRunner.csproj
++++ b/src/Microsoft.DotNet.XUnitConsoleRunner/src/Microsoft.DotNet.XUnitConsoleRunner.csproj
+@@ -11,6 +11,7 @@
+ <VersionPrefix>2.5.1</VersionPrefix>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
+ <RollForward>Major</RollForward>
++ <UseAppHost>false</UseAppHost>
+ </PropertyGroup>
+
+ <ItemGroup>
diff --git a/build-arm64-bootstrap-tarball b/build-arm64-bootstrap-tarball
new file mode 100755
index 0000000..9f1cc7d
--- /dev/null
+++ b/build-arm64-bootstrap-tarball
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+set -euo pipefail
+
+set -x
+
+bootstrap_dir=$(readlink -f "$1")
+
+version=$(jq -r '.tools.dotnet' "$bootstrap_dir"/global.json)
+
+date=$(date +%F)
+
+mkdir -p "dotnet-arm64-prebuilts-$date"
+
+pushd "dotnet-arm64-prebuilts-$date"
+
+# Getting the exact matching rc2 version gets us an arm64 build without this
+# fix https://github.com/dotnet/runtime/pull/58959. That causes a segfault on
+# startup.
+# wget "https://dotnetcli.azureedge.net/dotnet/Sdk/$version/dotnet-sdk-$version-l..."
+
+wget https://aka.ms/dotnet/6.0.1XX-rc2/daily/dotnet-sdk-linux-arm64.tar.gz
+
+mapfile -t linux_x64_packages < <(tar tf "$bootstrap_dir"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz | grep linux-x64)
+
+for package in "${linux_x64_packages[@]}"; do
+ if [[ "$package" = *'.Intermediate.'* ]]; then
+ continue;
+ fi
+
+ filename=${package##*/}
+ name=${filename%.6.0*}
+ arm_name=${name/linux-x64/linux-arm64}
+ version="6.0${filename##*6.0}"
+ version=${version%.*}
+
+ nappo download --verbose "$arm_name" "$version"
+
+done
+
+popd
+
+tar czf "dotnet-arm64-prebuilts-$date.tar.gz" "dotnet-arm64-prebuilts-$date"
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 826752b..8f15c6f 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -1,11 +1,11 @@
#!/bin/bash
# Usage:
-# build-dotnet-tarball [--bootstrap] <tag-from-source-build>
+# build-dotnet-tarball [--bootstrap] <tag-from-installer>
#
-# Creates a source archive from a tag (or commit) at github.com/dotnet/source-build
+# Creates a source archive from a tag (or commit) at github.com/dotnet/installer
-# Source-build is a little strange, we need to clone it, check out the
+# installer is a little strange, we need to clone it, check out the
# tag, build it and then create a tarball from the archive directory
# it creates. Also, it is likely that the source archive is only
# buildable on the OS it was initially created in.
@@ -15,9 +15,9 @@ IFS=$'\n\t'
function print_usage {
echo "Usage:"
- echo "$0 [--bootstrap] <tag-from-source-build>"
+ echo "$0 [--bootstrap] <tag-from-installer>"
echo
- echo "Creates a source archive from a tag at https://github.com/dotnet/source-build"
+ echo "Creates a source archive from a tag at https://github.com/dotnet/installer"
echo ""
echo " --bootstrap build a source tarball usable for bootstrapping .NET"
}
@@ -102,14 +102,16 @@ set -x
dir_name="dotnet-${tag}"
unmodified_tarball_name="${dir_name}-original"
tarball_name="${dir_name}"
+tarball_suffix=.tar.gz
if [[ ${build_bootstrap} == true ]]; then
unmodified_tarball_name="${unmodified_tarball_name}-${arch}-bootstrap"
tarball_name="${tarball_name}-${arch}-bootstrap"
+ tarball_suffix=.tar.xz
fi
-if [ -f "${tarball_name}.tar.gz" ]; then
- echo "error: ${tarball_name}.tar.gz already exists"
+if [ -f "${tarball_name}${tarball_suffix}" ]; then
+ echo "error: ${tarball_name}${tarball_suffix} already exists"
exit 1
fi
@@ -125,15 +127,9 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
./build.sh /p:ArcadeBuildTarball=true /p:TarballDir="$(readlink -f ../"${unmodified_tarball_name}")"
popd
- if [[ ${build_bootstrap} == true ]]; then
- pushd "${unmodified_tarball_name}"
- ./prep.sh
- popd
- fi
-
popd
- tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}"
+ tar cf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}"
rm -rf "${temp_dir}"
fi
@@ -145,15 +141,36 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
if [[ ${build_bootstrap} == true ]]; then
+ if [[ "$(wc -l < packages/archive/archiveArtifacts.txt)" != 1 ]]; then
+ echo "error: this is not going to work! update $0 to fix this issue."
+ exit 1
+ fi
+
+ pushd packages/archive/
+ curl -O $(cat archiveArtifacts.txt)
+ popd
+
+ mkdir foo
+ pushd foo
+
+ tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+ sed -i -E 's|<MicrosoftNETHostModelPackageVersion>6.0.0-rtm.21521.1</|<MicrosoftNETHostModelPackageVersion>6.0.0-rtm.21521.4</|' PackageVersions.props
+ sed -i -E 's|<MicrosoftNETHostModelVersion>6.0.0-rtm.21521.1</|<MicrosoftNETHostModelVersion>6.0.0-rtm.21521.4</|' PackageVersions.props
+ cat PackageVersions.props
+
+ tar czf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
+
+ popd
+ rm -rf foo
+
+ ./prep.sh --bootstrap
+
mkdir -p fixup-previously-source-built-artifacts
pushd fixup-previously-source-built-artifacts
tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
find . -iname '*fedora*nupkg' -delete
- rm runtime.linux-x64.Microsoft.NETCore.IL*sm.*.nupkg
- wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_p...
- wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_p...
# We must keep the original file names in the archive, even prepending a ./ leads to issues
- tar -I 'gzip -9' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
+ tar -I 'gzip -1' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
popd
rm -rf fixup-previously-source-built-artifacts
@@ -164,12 +181,26 @@ fi
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
-# FIXME
-#rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
-#find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
-#rm -r src/nuget-client.*/test/EndToEnd
-#rm -r src/source-build.*/src/humanizer/samples/
+
+# Binaries for gradle
+rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
+
+# Unnecessary crypto implementation: IDEA
+rm -r src/runtime.*/src/tests/JIT/Performance/CodeQuality/Bytemark/
+
+# https://github.com/dotnet/aspnetcore/issues/34785
+find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
+
+# https://github.com/NuGet/Home/issues/11094
+rm -r src/nuget-client.*/test/EndToEnd
+
+# https://github.com/Humanizr/sample-aspnetmvc/issues/1
+rm -r src/source-build.*/src/humanizer/samples/
popd
-tar -I 'gzip -9' -cf "${tarball_name}.tar.gz" "${tarball_name}"
+if [[ ${build_bootstrap} == true ]]; then
+ tar -I 'xz -T 0' -cf "${tarball_name}${tarball_suffix}" "${tarball_name}"
+else
+ tar -czf "${tarball_name}${tarball_suffix}" "${tarball_name}"
+fi
diff --git a/check-debug-symbols.py b/check-debug-symbols.py
index be26d87..b873c77 100755
--- a/check-debug-symbols.py
+++ b/check-debug-symbols.py
@@ -65,7 +65,7 @@ def scan_file(file):
def is_elf(file):
result = subprocess.run(['file', file], stdout=subprocess.PIPE, encoding='utf-8', check=True)
- return re.search('ELF 64-bit LSB (?:executable|shared object)', result.stdout)
+ return re.search('ELF 64-bit LSB (?:pie )(?:executable|shared object)', result.stdout)
def scan_file_if_sensible(file):
if is_elf(file):
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 6f523a3..d222adf 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -20,21 +20,21 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 6.0.0-rc.2.21470.23
-%global runtime_version 6.0.0-rc.2.21470.23
-%global aspnetcore_runtime_version 6.0.0-rc.2.21470.37
-%global sdk_version 6.0.100-rc.2.21474.1
-%global templates_version 6.0.0-rc.2.21470.37
+%global host_version 6.0.0
+%global runtime_version 6.0.0
+%global aspnetcore_runtime_version 6.0.0
+%global sdk_version 6.0.100
+%global templates_version 6.0.0
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
-%global host_rpm_version 6.0.0
-%global runtime_rpm_version 6.0.0
-%global aspnetcore_runtime_rpm_version %{runtime_rpm_version}
-%global sdk_rpm_version 6.0.0
+%global host_rpm_version %{host_version}
+%global runtime_rpm_version %{runtime_version}
+%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
+%global sdk_rpm_version %{sdk_version}
# upstream can update releases without revving the SDK version so these don't always match
#%%global upstream_tag v%%{sdk_version}-SDK
-%global upstream_tag 28be3e9a006d90d8c6e87d4353b77882829df718
+%global upstream_tag 9e8b04bbff820c93c142f99a507a46b976f5c14c
%if 0%{?fedora} || 0%{?rhel} < 8
%global use_bundled_libunwind 0
@@ -42,7 +42,7 @@
%global use_bundled_libunwind 1
%endif
-%ifarch aarch64
+%ifarch aarch64 s390x
%global use_bundled_libunwind 1
%endif
@@ -52,49 +52,94 @@
%ifarch aarch64
%global runtime_arch arm64
%endif
+%ifarch s390x
+%global runtime_arch s390x
+%endif
%{!?runtime_id:%global runtime_id %(. /etc/os-release ; echo "${ID}.${VERSION_ID%%.*}")-%{runtime_arch}}
Name: dotnet6.0
Version: %{sdk_rpm_version}
-Release: 0.3.%{upstream_tag}%{?dist}
+Release: 1%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
+%if %{with bootstrap}
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball --bootstrap %%{upstream_tag}
-Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.gz
+Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.xz
+# Generated via ./build-arm64-bootstrap-tarball
+Source1: dotnet-arm64-prebuilts-2021-10-29.tar.gz
+# Generated manually, same pattern as the arm64 tarball
+Source2: dotnet-s390x-prebuilts-2021-10-29.tar.gz
+%else
+# The source is generated on a Fedora box via:
+# ./build-dotnet-tarball %%{upstream_tag}
+Source0: dotnet-%{upstream_tag}.tar.gz
+%endif
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
-# https://github.com/NuGet/NuGet.Client/pull/4254
-Patch200: nuget-client-use-work-tree-with-git-apply.patch
+# Fix using lld on Fedora
+Patch100: runtime-arm64-lld-fix.patch
+# Mono still has a dependency on (now unbuildable) ILStrip which was removed from CoreCLR: https://github.com/dotnet/runtime/pull/60315
+Patch101: runtime-mono-remove-ilstrip.patch
+
# https://github.com/dotnet/command-line-api/pull/1401
Patch300: command-line-api-use-work-tree-with-git-apply.patch
+
# https://github.com/microsoft/vstest/pull/3046
Patch400: vstest-use-work-tree-with-git-apply.patch
+# This is the suggestion from https://github.com/dotnet/source-build/pull/2450, applied
Patch500: fsharp-use-work-tree-with-git-apply.patch
+# Disable apphost, needed for s390x
+Patch501: fsharp-no-apphost.patch
+# This is the suggestion from https://github.com/dotnet/source-build/pull/2450, applied
Patch600: xliff-tasks-use-work-tree-with-git-apply.patch
+# Disable apphost, needed for s390x
+Patch700: arcade-no-apphost.patch
+
+# Named mutex fix for mono, needed for s390x. https://github.com/dotnet/roslyn/pull/57003
+Patch800: roslyn-57003-mono-named-mutex.patch
+# Disable apphost, needed for s390x
+Patch801: roslyn-no-apphost.patch
+
+# Disable apphost, needed for s390x
+Patch900: roslyn-analyzers-no-apphost.patch
+
+# Fix mono-specific runtime crashes running msbuild. CoreCLR does not
+# load types that are not actually used/invoked at runtime, while mono
+# does. System.Configuration and System.Security are missing in
+# source-build builds, which breaks msbuild.
+Patch1000: msbuild-no-systemsecurity.patch
+Patch1001: msbuild-no-systemconfiguration.patch
+
# Disable telemetry by default; make it opt-in
-Patch1500: sdk-telemetry-optout.patch
+Patch1500: sdk-telemetry-optout.patch
+# https://github.com/dotnet/sdk/pull/22373
+Patch1501: sdk-22373-portablerid.patch
+
+# https://github.com/dotnet/installer/pull/12516
+Patch1600: installer-12516-portablerid.patch
+# https://github.com/dotnet/installer/pull/12622
+Patch1601: installer-12622-fix-runtime-symbols.patch
-#%%if 0%%{?fedora} > 32 || 0%%{?rhel} > 8
-#ExclusiveArch: aarch64 x86_64
-#%%else
+%if 0%{?fedora} || 0%{?rhel} >= 8
+ExclusiveArch: aarch64 x86_64 s390x
+%else
ExclusiveArch: x86_64
-#%%endif
+%endif
BuildRequires: clang
BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
-BuildRequires: dotnet-sdk-6.0-build-reference-packages
BuildRequires: dotnet-sdk-6.0
BuildRequires: dotnet-sdk-6.0-source-built-artifacts
%endif
@@ -105,18 +150,20 @@ BuildRequires: glibc-langpack-en
%endif
BuildRequires: hostname
BuildRequires: krb5-devel
-BuildRequires: libcurl-devel
BuildRequires: libicu-devel
%if ! %{use_bundled_libunwind}
BuildRequires: libunwind-devel
%endif
-BuildRequires: lldb-devel
+%ifarch aarch64
+BuildRequires: lld
+%endif
BuildRequires: llvm
BuildRequires: lttng-ust-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: python3
BuildRequires: tar
+BuildRequires: util-linux
BuildRequires: zlib-devel
%description
@@ -319,12 +366,25 @@ These are not meant for general use.
%if %{without bootstrap}
%setup -q -n dotnet-%{upstream_tag}
%else
-%ifarch x86_64
-%setup -q -T -b 0 -n dotnet-%{upstream_tag}-%{runtime_arch}-bootstrap
-%endif
+
+%setup -q -T -b 0 -n dotnet-%{upstream_tag}-x64-bootstrap
+
+%ifnarch x86_64
+
+rm -rf .dotnet
%ifarch aarch64
-%setup -q -T -b 0 -n dotnet-%{upstream_tag}-%{runtime_arch}-bootstrap
+tar -x --strip-components=1 -f %{SOURCE1} -C packages/prebuilt
+%endif
+%ifarch s390x
+tar -x --strip-components=1 -f %{SOURCE2} -C packages/prebuilt
%endif
+mkdir -p .dotnet
+tar xf packages/prebuilt/dotnet-sdk*.tar.gz -C .dotnet/
+rm packages/prebuilt/dotnet-sdk*.tar.gz
+boot_sdk_version=$(ls -1 .dotnet/sdk/)
+sed -i -E 's|"dotnet": "[^"]+"|"dotnet" : "'$boot_sdk_version'"|' global.json
+%endif
+
%endif
%if %{without bootstrap}
@@ -336,9 +396,7 @@ find -iname '*.nupkg' -type f -delete
find -iname '*.zip' -type f -delete
rm -rf .dotnet/
rm -rf packages/source-built
-%endif
-%if %{without bootstrap}
mkdir -p packages/archive
ln -s %{_libdir}/dotnet/source-built-artifacts/Private.SourceBuilt.Artifacts.*.tar.gz packages/archive/
ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive/
@@ -351,10 +409,8 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehos
# sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
pushd src/runtime.*
-popd
-
-pushd src/nuget-client.*
-%patch200 -p1
+%patch100 -p1
+%patch101 -p1
popd
pushd src/command-line-api.*
@@ -367,26 +423,53 @@ popd
pushd src/fsharp.*
%patch500 -p1
+%patch501 -p1
popd
pushd src/xliff-tasks.*
%patch600 -p1
popd
+pushd src/arcade.*
+%patch700 -p1
+popd
+
+pushd src/roslyn.*
+%patch800 -p3
+%patch801 -p1
+popd
+
+pushd src/roslyn-analyzers.*
+%patch900 -p1
+popd
+
+pushd src/msbuild.*
+
+# These are mono-specific fixes. Mono is only used on s390x. Restrict
+# patch to s390x to avoid potential risk in other architectures.
+%ifarch s390x
+%patch1000 -p1
+%patch1001 -p1
+%endif
+
+popd
+
pushd src/sdk.*
%patch1500 -p1
+%patch1501 -p1
popd
-%if %{without bootstrap}
-%ifnarch x86_64
-mkdir -p artifacts/obj/%{runtime_arch}/Release
-cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
-%endif
-%endif
+pushd src/installer.*
+%patch1600 -p1
+popd
+
+# We need to apply the patch to the already-built tarball's
+# repos/runtime.common.targets, not to the installer's "source" copy.
+%patch1601 -p5
-# Disable package validation which breaks our build, even though we
-# are injecting "blessed" nuget packages produced by Microsoft.
+# Disable package validation which breaks our build.
# There's no need to run validation in RPM packages anyway.
+# See https://github.com/dotnet/runtime/pull/60881
sed -i -E 's|( /p:BuildDebPackage=false)|\1 /p:EnablePackageValidation=false|' src/runtime.*/eng/SourceBuild.props
%if ! %{use_bundled_libunwind}
@@ -455,10 +538,13 @@ install -dm 0755 %{buildroot}%{_libdir}/dotnet
ls artifacts/%{runtime_arch}/Release
tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
-# FIXME: no managed symbols in 6.0?
+# See https://github.com/dotnet/source-build/issues/2579
+find %{buildroot}%{_libdir}/dotnet/ -type f -name 'testhost.x86' -delete
+find %{buildroot}%{_libdir}/dotnet/ -type f -name 'vstest.console' -delete
+
# Install managed symbols
-#tar xf artifacts/%%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%%{runtime_version}-%%{runtime_id}.tar.gz \
-# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
+tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_id}-%{runtime_version}.tar.gz \
+ -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
# Fix executable permissions on files
find %{buildroot}%{_libdir}/dotnet/ -type f -name 'apphost' -exec chmod +x {} \;
@@ -505,9 +591,8 @@ install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
-# FIXME
-#echo "Testing build results for debug symbols..."
-#%%{SOURCE10} -v %%{buildroot}%%{_libdir}/dotnet/
+echo "Testing build results for debug symbols..."
+%{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
@@ -566,6 +651,24 @@ install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.
%changelog
+* Wed Nov 10 2021 Omair Majid <omajid(a)redhat.com> - 6.0.100-1
+- Update to .NET 6
+
+* Fri Oct 22 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.7.rc2
+- Update to .NET 6 RC2
+
+* Fri Oct 08 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.6.28be3e9a006d90d8c6e87d4353b77882829df718
+- Enable building on arm64
+- Related: RHBZ#1986017
+
+* Sun Oct 03 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.5.28be3e9a006d90d8c6e87d4353b77882829df718
+- Enable building on s390x
+- Related: RHBZ#1986017
+
+* Sun Oct 03 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.4.28be3e9a006d90d8c6e87d4353b77882829df718
+- Clean up tarball and add initial support for s390x
+- Related: RHBZ#1986017
+
* Sun Sep 26 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.3.28be3e9a006d90d8c6e87d4353b77882829df718
- Update to work-in-progress RC2 release
diff --git a/fsharp-no-apphost.patch b/fsharp-no-apphost.patch
new file mode 100644
index 0000000..1534888
--- /dev/null
+++ b/fsharp-no-apphost.patch
@@ -0,0 +1,21 @@
+--- a/tests/benchmarks/MicroPerf/MicroPerf.fsproj
++++ b/tests/benchmarks/MicroPerf/MicroPerf.fsproj
+@@ -9,6 +9,7 @@
+ <OtherFlags>$(OtherFlags) --nowarn:57</OtherFlags>
+ <OtherFlags>$(OtherFlags) --langversion:preview</OtherFlags>
+ <OtherFlags>$(OtherFlags) --define:PREVIEW</OtherFlags>
++ <UseAppHost>false</UseAppHost>
+ <!-- By default this project will compile with the proto compiler -->
+ <!-- Uncommenting this will build with a previous installed compiler -->
+ <!--
+--- a/tests/benchmarks/TaskPerf/TaskPerf.fsproj
++++ b/tests/benchmarks/TaskPerf/TaskPerf.fsproj
+@@ -4,6 +4,7 @@
+ <TargetFramework>net5.0</TargetFramework>
+ <OutputType>Exe</OutputType>
+ <DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
++ <UseAppHost>false</UseAppHost>
+ <!-- Turn off "This function is for use by compiled F# code and should not be used directly" -->
+ <OtherFlags>$(OtherFlags) --nowarn:1204</OtherFlags>
+ <!-- Turn off "Experimental" -->
+
diff --git a/installer-12516-portablerid.patch b/installer-12516-portablerid.patch
new file mode 100644
index 0000000..4cb4ab6
--- /dev/null
+++ b/installer-12516-portablerid.patch
@@ -0,0 +1,23 @@
+From 892222071f73062f969f4f6ed1df8f759b9327b7 Mon Sep 17 00:00:00 2001
+From: Tom Deseyn <tom.deseyn(a)gmail.com>
+Date: Wed, 3 Nov 2021 15:12:59 +0100
+Subject: [PATCH] GetRuntimeInformation.targets: determine
+ PortableProductMonikerRid based on HostOSName and Architecture.
+
+---
+ src/redist/targets/GetRuntimeInformation.targets | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/redist/targets/GetRuntimeInformation.targets b/src/redist/targets/GetRuntimeInformation.targets
+index 5133c3a3841..01f704c7d8e 100644
+--- a/src/redist/targets/GetRuntimeInformation.targets
++++ b/src/redist/targets/GetRuntimeInformation.targets
+@@ -28,6 +28,8 @@
+ '$(Rid)' == 'linux-musl-x64' ">$(Rid)</ProductMonikerRid>
+ <ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(OSName)-$(Architecture)</ProductMonikerRid>
+
++ <PortableProductMonikerRid Condition=" '$(PortableProductMonikerRid)' == '' ">$(HostOSName)-$(Architecture)</PortableProductMonikerRid>
++
+ <ArtifactNameSdk>dotnet-sdk-internal$(PgoTerm)</ArtifactNameSdk>
+ <ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk$(PgoTerm)</ArtifactNameCombinedHostHostFxrFrameworkSdk>
+
diff --git a/installer-12622-fix-runtime-symbols.patch b/installer-12622-fix-runtime-symbols.patch
new file mode 100644
index 0000000..fa2d46f
--- /dev/null
+++ b/installer-12622-fix-runtime-symbols.patch
@@ -0,0 +1,48 @@
+From 7365824ddc6ed66152cfc50f4c8508368953099c Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Tue, 9 Nov 2021 08:39:27 -0500
+Subject: [PATCH] Also publish non-portable RID runtime symbols tarball
+
+This fixes a regression in .NET 6 source-build compared to the .NET
+5 source-build.
+
+source-build wants to publish runtime symbols tarball for portable (eg,
+linux-x64) and non-portable (eg, fedora.33-x64) RIDs here after a build.
+Following .NET 5 conventions, I expected to see:
+
+ ./artifacts/x64/Release/runtime/dotnet-runtime-symbols-fedora.34-x64-6.0.0.tar.gz
+ ./artifacts/x64/Release/runtime/dotnet-runtime-symbols-linux-x64-6.0.0.tar.gz
+
+Unfortunately, only the portable RID (linux-x64) tarball is present
+after a full source-build in .NET 6.
+
+It turns out this is a bug in our build scripts. We try and copy
+binaries - including the symbol tarballs - after building each of
+runtime-portable and runtime. However, the target dependency is wrong:
+after `Build`, the intermediate package doesn't exist from the
+just-built repo.
+
+What ends up happening is that nothing is copied after building
+runtime-portable. However, after building runtime, the runtime-portable
+intermediate artifacts are found and copied over. So the end
+build has portable RID symbos, but not the non-portable ones.
+
+Fix that by changing the dependency of this target so it runs after
+intermediate packages are available.
+---
+ src/SourceBuild/tarball/content/repos/runtime.common.targets | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/SourceBuild/tarball/content/repos/runtime.common.targets b/src/SourceBuild/tarball/content/repos/runtime.common.targets
+index ca606b23d21..862b70dc832 100644
+--- a/src/SourceBuild/tarball/content/repos/runtime.common.targets
++++ b/src/SourceBuild/tarball/content/repos/runtime.common.targets
+@@ -23,7 +23,7 @@
+ </Target>
+
+ <Target Name="CopyBinariesToBinFolder"
+- AfterTargets="Build"
++ AfterTargets="ExtractIntermediatePackages"
+ Inputs="$(MSBuildProjectFullPath)"
+ Outputs="$(RepoCompletedSemaphorePath)CopyBinariesToBinFolder.complete">
+ <ItemGroup>
diff --git a/msbuild-no-systemconfiguration.patch b/msbuild-no-systemconfiguration.patch
new file mode 100644
index 0000000..537470d
--- /dev/null
+++ b/msbuild-no-systemconfiguration.patch
@@ -0,0 +1,46 @@
+--- a/src/Build/Definition/ProjectCollection.cs
++++ b/src/Build/Definition/ProjectCollection.cs
+@@ -1754,7 +1754,11 @@ namespace Microsoft.Build.Evaluation
+ #if FEATURE_WIN32_REGISTRY
+ ToolsetRegistryReader registryReader = null,
+ #endif
++#if FEATURE_SYSTEM_CONFIGURATION
+ ToolsetConfigurationReader configReader = null
++#else
++ object configReader = null
++#endif
+ )
+ {
+ _toolsets = new Dictionary<string, Toolset>(StringComparer.OrdinalIgnoreCase);
+--- a/src/Build/Definition/ToolsetReader.cs
++++ b/src/Build/Definition/ToolsetReader.cs
+@@ -101,7 +101,11 @@ namespace Microsoft.Build.Evaluation
+ #if FEATURE_WIN32_REGISTRY
+ ToolsetRegistryReader registryReader,
+ #endif
++#if FEATURE_SYSTEM_CONFIGURATION
+ ToolsetConfigurationReader configurationReader,
++#else
++ object _configurationReader,
++#endif
+ PropertyDictionary<ProjectPropertyInstance> environmentProperties,
+ PropertyDictionary<ProjectPropertyInstance> globalProperties,
+ ToolsetDefinitionLocations locations
+@@ -120,6 +124,7 @@ namespace Microsoft.Build.Evaluation
+
+ if ((locations & ToolsetDefinitionLocations.ConfigurationFile) == ToolsetDefinitionLocations.ConfigurationFile)
+ {
++#if FEATURE_SYSTEM_CONFIGURATION
+ if (configurationReader == null)
+ {
+ configurationReader = new ToolsetConfigurationReader(environmentProperties, globalProperties);
+@@ -129,6 +134,9 @@ namespace Microsoft.Build.Evaluation
+ defaultToolsVersionFromConfiguration = configurationReader.ReadToolsets(toolsets, globalProperties,
+ initialProperties, true /* accumulate properties */, out overrideTasksPathFromConfiguration,
+ out defaultOverrideToolsVersionFromConfiguration);
++#else
++ throw new InvalidOperationException("ToolsetDefinitionLocations.ConfigurationFile not supported");
++#endif
+ }
+
+ string defaultToolsVersionFromRegistry = null;
diff --git a/msbuild-no-systemsecurity.patch b/msbuild-no-systemsecurity.patch
new file mode 100644
index 0000000..dcf6809
--- /dev/null
+++ b/msbuild-no-systemsecurity.patch
@@ -0,0 +1,12 @@
+--- a/src/Shared/ExceptionHandling.cs
++++ b/src/Shared/ExceptionHandling.cs
+@@ -153,7 +153,9 @@ namespace Microsoft.Build.Shared
+ internal static bool IsXmlException(Exception e)
+ {
+ return e is XmlException
++#if FEATURE_SECURITY_PERMISSIONS
+ || e is XmlSyntaxException
++#endif
+ || e is XmlSchemaException
+ || e is UriFormatException; // XmlTextReader for example uses this under the covers
+ }
diff --git a/nuget-client-use-work-tree-with-git-apply.patch b/nuget-client-use-work-tree-with-git-apply.patch
deleted file mode 100644
index e1785ae..0000000
--- a/nuget-client-use-work-tree-with-git-apply.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 691babb1c8316e2f829fbcf9f2aa14f4b7711960 Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Thu, 9 Sep 2021 10:03:36 -0400
-Subject: [PATCH] [ArPow] Use --work-tree with git apply
-
-This makes things work bettern in a source-tarball build (where there
-may not be a .git directory), or there might be a .git directory but
-it's for a different repo than the one we are building.
----
- eng/source-build/source-build.proj | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/eng/source-build/source-build.proj b/eng/source-build/source-build.proj
-index 6f90f9793..72058ac88 100644
---- a/eng/source-build/source-build.proj
-+++ b/eng/source-build/source-build.proj
-@@ -55,7 +55,7 @@
- </ItemGroup>
-
- <Exec
-- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
-+ Command="git --work-tree="$(ProjectRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
- WorkingDirectory="$(ProjectRoot)"
- Condition="'@(SourceBuildPatchFile)' != ''" />
- </Target>
---
-2.31.1
-
diff --git a/roslyn-57003-mono-named-mutex.patch b/roslyn-57003-mono-named-mutex.patch
new file mode 100644
index 0000000..c264bff
--- /dev/null
+++ b/roslyn-57003-mono-named-mutex.patch
@@ -0,0 +1,453 @@
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
+@@ -31,5 +31,24 @@ namespace Roslyn.Utilities
+ }
+ }
+ }
++ /// <summary>
++ /// Are we running on .NET 5 or later using the Mono runtime?
++ /// Will also return true when running on Mono itself; if necessary
++ /// we can use IsRunningOnMono to distinguish.
++ /// </summary>
++ public static bool IsUsingMonoRuntime
++ {
++ get
++ {
++ try
++ {
++ return !(Type.GetType("Mono.RuntimeStructs", throwOnError: false) is null);
++ }
++ catch
++ {
++ return false;
++ }
++ }
++ }
+ }
+ }
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
+@@ -79,7 +79,7 @@ namespace Microsoft.CodeAnalysis.Compile
+ // to connect. When it fails it should fall back to in-proc
+ // compilation.
+ bool holdsMutex;
+- using (var serverMutex = new Mutex(initiallyOwned: true,
++ using (var serverMutex = BuildServerConnection.OpenOrCreateMutex(
+ name: BuildServerConnection.GetServerMutexName(_pipeName),
+ createdNew: out holdsMutex))
+ {
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
+@@ -103,7 +103,7 @@ class Hello
+ var mutexName = BuildServerConnection.GetServerMutexName(pipeName);
+
+ bool holdsMutex;
+- using (var mutex = new Mutex(initiallyOwned: true,
++ using (var mutex = BuildServerConnection.OpenOrCreateMutex(
+ name: mutexName,
+ createdNew: out holdsMutex))
+ {
+@@ -119,7 +119,7 @@ class Hello
+ }
+ finally
+ {
+- mutex.ReleaseMutex();
++ mutex.Dispose();
+ }
+ }
+ }
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
+@@ -304,7 +304,7 @@ End Module")
+ var newTempDir = _tempDirectory.CreateDirectory(new string('a', 100 - _tempDirectory.Path.Length));
+ await ApplyEnvironmentVariables(
+ new[] { new KeyValuePair<string, string>("TMPDIR", newTempDir.Path) },
+- async () =>
++ async () => await Task.Run(async () =>
+ {
+ using var serverData = await ServerUtil.CreateServer(_logger);
+ var result = RunCommandLineCompiler(
+@@ -317,7 +317,7 @@ End Module")
+
+ var listener = await serverData.Complete();
+ Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single());
+- });
++ }));
+ }
+
+ [Fact]
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
+@@ -101,7 +101,7 @@ namespace Microsoft.CodeAnalysis.Compile
+
+ var thread = new Thread(() =>
+ {
+- using (var mutex = new Mutex(initiallyOwned: true, name: mutexName, createdNew: out created))
++ using (var mutex = BuildServerConnection.OpenOrCreateMutex(name: mutexName, createdNew: out created))
+ using (var stream = NamedPipeUtil.CreateServer(pipeName))
+ {
+ readyMre.Set();
+@@ -112,7 +112,7 @@ namespace Microsoft.CodeAnalysis.Compile
+ stream.Close();
+
+ doneMre.WaitOne();
+- mutex.ReleaseMutex();
++ mutex.Dispose();
+ }
+ });
+
+@@ -153,7 +153,7 @@ namespace Microsoft.CodeAnalysis.Compile
+ {
+ using (var stream = NamedPipeUtil.CreateServer(pipeName))
+ {
+- var mutex = new Mutex(initiallyOwned: true, name: mutexName, createdNew: out created);
++ var mutex = BuildServerConnection.OpenOrCreateMutex(name: mutexName, createdNew: out created);
+ readyMre.Set();
+
+ stream.WaitForConnection();
+@@ -161,7 +161,6 @@ namespace Microsoft.CodeAnalysis.Compile
+
+ // Client is waiting for a response. Close the mutex now. Then close the connection
+ // so the client gets an error.
+- mutex.ReleaseMutex();
+ mutex.Dispose();
+ stream.Close();
+
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Shared/BuildServerConnection.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Shared/BuildServerConnection.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Shared/BuildServerConnection.cs
+@@ -543,19 +543,10 @@ namespace Microsoft.CodeAnalysis.Command
+ {
+ try
+ {
+- if (PlatformInformation.IsRunningOnMono)
++ if (PlatformInformation.IsUsingMonoRuntime)
+ {
+- IServerMutex? mutex = null;
+- bool createdNew = false;
+- try
+- {
+- mutex = new ServerFileMutexPair(mutexName, false, out createdNew);
+- return !createdNew;
+- }
+- finally
+- {
+- mutex?.Dispose();
+- }
++ using var mutex = new ServerFileMutex(mutexName);
++ return !mutex.CouldLock();
+ }
+ else
+ {
+@@ -572,9 +563,11 @@ namespace Microsoft.CodeAnalysis.Command
+
+ internal static IServerMutex OpenOrCreateMutex(string name, out bool createdNew)
+ {
+- if (PlatformInformation.IsRunningOnMono)
++ if (PlatformInformation.IsUsingMonoRuntime)
+ {
+- return new ServerFileMutexPair(name, initiallyOwned: true, out createdNew);
++ var mutex = new ServerFileMutex(name);
++ createdNew = mutex.TryLock(0);
++ return mutex;
+ }
+ else
+ {
+@@ -648,19 +641,22 @@ namespace Microsoft.CodeAnalysis.Command
+ }
+
+ /// <summary>
+- /// An interprocess mutex abstraction based on OS advisory locking (FileStream.Lock/Unlock).
++ /// An interprocess mutex abstraction based on file sharing permission (FileShare.None).
+ /// If multiple processes running as the same user create FileMutex instances with the same name,
+ /// those instances will all point to the same file somewhere in a selected temporary directory.
+- /// The TryLock method can be used to attempt to acquire the mutex, with Unlock or Dispose used to release.
++ /// The TryLock method can be used to attempt to acquire the mutex, with Dispose used to release.
++ /// The CouldLock method can be used to check whether an attempt to acquire the mutex would have
++ /// succeeded at the current time, without actually acquiring it.
+ /// Unlike Win32 named mutexes, there is no mechanism for detecting an abandoned mutex. The file
+ /// will simply revert to being unlocked but remain where it is.
+ /// </summary>
+- internal sealed class FileMutex : IDisposable
++ internal sealed class ServerFileMutex : IServerMutex
+ {
+- public readonly FileStream Stream;
++ public FileStream? Stream;
+ public readonly string FilePath;
++ public readonly string GuardPath;
+
+- public bool IsLocked { get; private set; }
++ public bool IsDisposed { get; private set; }
+
+ internal static string GetMutexDirectory()
+ {
+@@ -670,61 +666,176 @@ namespace Microsoft.CodeAnalysis.Command
+ return result;
+ }
+
+- public FileMutex(string name)
++ public ServerFileMutex(string name)
+ {
+- FilePath = Path.Combine(GetMutexDirectory(), name);
+- Stream = new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
++ var mutexDirectory = GetMutexDirectory();
++ FilePath = Path.Combine(mutexDirectory, name);
++ GuardPath = Path.Combine(mutexDirectory, ".guard");
+ }
+
+- public bool TryLock(int timeoutMs)
++ /// <summary>
++ /// Acquire the guard by opening the guard file with FileShare.None. The guard must only ever
++ /// be held for very brief amounts of time, so we can simply spin until it is acquired. The
++ /// guard must be released by disposing the FileStream returned from this routine. Note the
++ /// guard file is never deleted; this is a leak, but only of a single file.
++ /// </summary>
++ internal FileStream LockGuard()
+ {
+- if (IsLocked)
+- throw new InvalidOperationException("Lock already held");
+-
+- var sw = Stopwatch.StartNew();
+- do
++ // We should be able to acquire the guard quickly. Limit the number of retries anyway
++ // by some arbitrary bound to avoid getting hung up in a possibly infinite loop.
++ for (var i = 0; i < 100; i++)
+ {
+ try
+ {
+- Stream.Lock(0, 0);
+- IsLocked = true;
+- return true;
++ return new FileStream(GuardPath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
+ }
+ catch (IOException)
+ {
+- // Lock currently held by someone else.
++ // Guard currently held by someone else.
+ // We want to sleep for a short period of time to ensure that other processes
+ // have an opportunity to finish their work and relinquish the lock.
+ // Spinning here (via Yield) would work but risks creating a priority
+ // inversion if the lock is held by a lower-priority process.
+ Thread.Sleep(1);
+ }
++ }
++ // Handle unexpected failure to acquire guard as error.
++ throw new InvalidOperationException("Unable to acquire guard");
++ }
++
++ /// <summary>
++ /// Attempt to acquire the lock by opening the lock file with FileShare.None. Sets "Stream"
++ /// and returns true if successful, returns false if the lock is already held by another
++ /// thread or process. Guard must be held when calling this routine.
++ /// </summary>
++ internal bool TryLockFile()
++ {
++ Debug.Assert(Stream is null);
++ FileStream? stream = null;
++ try
++ {
++ stream = new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
++ // On some targets, the file locking used to implement FileShare.None may not be
++ // atomic with opening/creating the file. This creates a race window when another
++ // thread holds the lock and is just about to unlock: we may be able to open the
++ // file here, then the other thread unlocks and deletes the file, and then we
++ // acquire the lock on our file handle - but the actual file is already deleted.
++ // To close this race, we verify that the file does in fact still exist now that
++ // we have successfull acquired the locked FileStream. (Note that this check is
++ // safe because we cannot race with an other attempt to create the file since we
++ // hold the guard, and after the FileStream constructor returned we can no race
++ // with file deletion because we hold the lock.)
++ if (!File.Exists(FilePath))
++ {
++ // To simplify the logic, we treat this case as "unable to acquire the lock"
++ // because it we caught another process while it owned the lock and was just
++ // giving it up. If the caller retries, we'll likely acquire the lock then.
++ stream.Dispose();
++ return false;
++ }
++ }
++ catch (Exception)
++ {
++ stream?.Dispose();
++ return false;
++ }
++ Stream = stream;
++ return true;
++ }
++
++ /// <summary>
++ /// Release the lock by deleting the lock file and disposing "Stream".
++ /// </summary>
++ internal void UnlockFile()
++ {
++ Debug.Assert(Stream is not null);
++ try
++ {
++ // Delete the lock file while the stream is not yet disposed
++ // and we therefore still hold the FileShare.None exclusion.
++ // There may still be a race with another thread attempting a
++ // TryLockFile in parallel, but that is safely handled there.
++ File.Delete(FilePath);
++ }
++ finally
++ {
++ Stream.Dispose();
++ Stream = null;
++ }
++ }
++
++ public bool TryLock(int timeoutMs)
++ {
++ if (IsDisposed)
++ throw new ObjectDisposedException("Mutex");
++ if (Stream is not null)
++ throw new InvalidOperationException("Lock already held");
++
++ var sw = Stopwatch.StartNew();
++ do
++ {
++ try
++ {
++ // Attempt to acquire lock while holding guard.
++ using var guard = LockGuard();
++ if (TryLockFile())
++ return true;
++ }
+ catch (Exception)
+ {
+- // Something else went wrong.
+ return false;
+ }
++
++ // See comment in LockGuard.
++ Thread.Sleep(1);
+ } while (sw.ElapsedMilliseconds < timeoutMs);
+
+ return false;
+ }
+
+- public void Unlock()
++ public bool CouldLock()
+ {
+- if (!IsLocked)
+- return;
+- Stream.Unlock(0, 0);
+- IsLocked = false;
++ if (IsDisposed)
++ return false;
++ if (Stream is not null)
++ return false;
++
++ try
++ {
++ // Attempt to acquire lock while holding guard, and if successful
++ // immediately unlock again while still holding guard. This ensures
++ // no other thread will spuriously observe the lock as held due to
++ // the lock attempt here.
++ using var guard = LockGuard();
++ if (TryLockFile())
++ {
++ UnlockFile();
++ return true;
++ }
++ }
++ catch (Exception)
++ {
++ return false;
++ }
++
++ return false;
+ }
+
+ public void Dispose()
+ {
+- var wasLocked = IsLocked;
+- if (wasLocked)
+- Unlock();
+- Stream.Dispose();
+- // We do not delete the lock file here because there is no reliable way to perform a
+- // 'delete if no one has the file open' operation atomically on *nix. This is a leak.
++ if (IsDisposed)
++ return;
++ IsDisposed = true;
++ if (Stream is not null)
++ {
++ try
++ {
++ UnlockFile();
++ }
++ catch (Exception)
++ {
++ }
++ }
+ }
+ }
+
+@@ -792,56 +903,4 @@ namespace Microsoft.CodeAnalysis.Command
+ }
+ }
+ }
+-
+- /// <summary>
+- /// Approximates a named mutex with 'locked', 'unlocked' and 'abandoned' states.
+- /// There is no reliable way to detect whether a mutex has been abandoned on some target platforms,
+- /// so we use the AliveMutex to manually track whether the creator of a mutex is still running,
+- /// while the HeldMutex represents the actual lock state of the mutex.
+- /// </summary>
+- internal sealed class ServerFileMutexPair : IServerMutex
+- {
+- public readonly FileMutex AliveMutex;
+- public readonly FileMutex HeldMutex;
+-
+- public bool IsDisposed { get; private set; }
+-
+- public ServerFileMutexPair(string mutexName, bool initiallyOwned, out bool createdNew)
+- {
+- AliveMutex = new FileMutex(mutexName + "-alive");
+- HeldMutex = new FileMutex(mutexName + "-held");
+- createdNew = AliveMutex.TryLock(0);
+- if (initiallyOwned && createdNew)
+- {
+- if (!TryLock(0))
+- throw new Exception("Failed to lock mutex after creating it");
+- }
+- }
+-
+- public bool TryLock(int timeoutMs)
+- {
+- if (IsDisposed)
+- throw new ObjectDisposedException("Mutex");
+- return HeldMutex.TryLock(timeoutMs);
+- }
+-
+- public void Dispose()
+- {
+- if (IsDisposed)
+- return;
+- IsDisposed = true;
+-
+- try
+- {
+- HeldMutex.Unlock();
+- AliveMutex.Unlock();
+- }
+- finally
+- {
+- AliveMutex.Dispose();
+- HeldMutex.Dispose();
+- }
+- }
+- }
+-
+ }
diff --git a/roslyn-analyzers-no-apphost.patch b/roslyn-analyzers-no-apphost.patch
new file mode 100644
index 0000000..c1fc3dd
--- /dev/null
+++ b/roslyn-analyzers-no-apphost.patch
@@ -0,0 +1,10 @@
+--- a/src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj
++++ b/src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj
+@@ -4,6 +4,7 @@
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ <NonShipping>true</NonShipping>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
++ <UseAppHost>false</UseAppHost>
+ </PropertyGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersion)" />
diff --git a/roslyn-no-apphost.patch b/roslyn-no-apphost.patch
new file mode 100644
index 0000000..f1767c7
--- /dev/null
+++ b/roslyn-no-apphost.patch
@@ -0,0 +1,10 @@
+--- a/src/Workspaces/Remote/ServiceHub.CoreComponents/Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.csproj
++++ b/src/Workspaces/Remote/ServiceHub.CoreComponents/Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.csproj
+@@ -5,6 +5,7 @@
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ <!-- The purpose of this project is to include all dependecies of Microsoft.CodeAnalysis.Remote.ServiceHub targeting .Net Core -->
++ <UseAppHost>false</UseAppHost>
+ <IsShipping>false</IsShipping>
+ </PropertyGroup>
+ <ItemGroup>
diff --git a/runtime-arm64-lld-fix.patch b/runtime-arm64-lld-fix.patch
new file mode 100644
index 0000000..5972f45
--- /dev/null
+++ b/runtime-arm64-lld-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/eng/native/init-compiler.sh b/eng/native/init-compiler.sh
+index 567d18da474..927b3071e92 100755
+--- a/eng/native/init-compiler.sh
++++ b/eng/native/init-compiler.sh
+@@ -108,7 +108,7 @@ if [[ -z "$CC" ]]; then
+ fi
+
+ if [[ "$compiler" == "clang" ]]; then
+- if command -v "lld$desired_version" > /dev/null; then
++ if command -v lld || command -v "lld$desired_version" > /dev/null; then
+ # Only lld version >= 9 can be considered stable
+ if [[ "$majorVersion" -ge 9 ]]; then
+ LDFLAGS="-fuse-ld=lld"
diff --git a/runtime-mono-remove-ilstrip.patch b/runtime-mono-remove-ilstrip.patch
new file mode 100644
index 0000000..9a711f8
--- /dev/null
+++ b/runtime-mono-remove-ilstrip.patch
@@ -0,0 +1,33 @@
+diff --git a/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Microsoft.NET.Runtime.MonoTargets.Sdk.pkgproj b/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Microsoft.NET.Runtime.MonoTargets.Sdk.pkgproj
+index 724b704f864..3dabdc81dae 100644
+--- a/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Microsoft.NET.Runtime.MonoTargets.Sdk.pkgproj
++++ b/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Microsoft.NET.Runtime.MonoTargets.Sdk.pkgproj
+@@ -6,7 +6,7 @@
+ </PropertyGroup>
+
+ <ItemGroup>
+- <ProjectReference Include="$(RepoTasksDir)ILStripTask\ILStrip.csproj" />
++ <ProjectReference Include="$(RepoTasksDir)ILStripTask\ILStrip.csproj" Condition="'$(DotNetBuildFromSource)' != 'true'" />
+ <ProjectReference Include="$(RepoTasksDir)RuntimeConfigParser\RuntimeConfigParser.csproj" />
+ <ProjectReference Include="$(RepoTasksDir)JsonToItemsTaskFactory\JsonToItemsTaskFactory.csproj" />
+ </ItemGroup>
+@@ -15,7 +15,7 @@
+ <PackageFile Include="Sdk\Sdk.props" TargetPath="Sdk" />
+ <PackageFile Include="Sdk\Sdk.targets" TargetPath="Sdk" />
+ <PackageFile Include="build\$(MSBuildProjectName).props" TargetPath="build" />
+- <PackageFile Include="Sdk\ILStripTask.props" TargetPath="Sdk" />
++ <PackageFile Include="Sdk\ILStripTask.props" TargetPath="Sdk" Condition="'$(DotNetBuildFromSource)' != 'true'" />
+ <PackageFile Include="Sdk\RuntimeConfigParserTask.props" TargetPath="Sdk" />
+ <PackageFile Include="Sdk\RuntimeComponentManifest.props" TargetPath="Sdk" />
+ <PackageFile Include="Sdk\RuntimeComponentManifest.targets" TargetPath="Sdk" />
+diff --git a/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props b/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props
+index 8a7ede79242..cfd515eeca9 100644
+--- a/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props
++++ b/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props
+@@ -1,5 +1,5 @@
+ <Project>
+- <Import Project="$(MSBuildThisFileDirectory)\ILStripTask.props" />
++ <Import Project="$(MSBuildThisFileDirectory)\ILStripTask.props" Condition="'$(DotNetBuildFromSource)' != 'true'" />
+ <Import Project="$(MSBuildThisFileDirectory)\RuntimeConfigParserTask.props" />
+ <Import Project="$(MSBuildThisFileDirectory)\RuntimeComponentManifest.props" />
+ </Project>
diff --git a/sdk-22373-portablerid.patch b/sdk-22373-portablerid.patch
new file mode 100644
index 0000000..8b39eb3
--- /dev/null
+++ b/sdk-22373-portablerid.patch
@@ -0,0 +1,22 @@
+From 499fcf6e3b0e4b01a9c340a06f00cfc3e1fcc5d2 Mon Sep 17 00:00:00 2001
+From: Tom Deseyn <tom.deseyn(a)gmail.com>
+Date: Tue, 5 Oct 2021 09:04:14 +0200
+Subject: [PATCH] Use the portable rid for --use-current-runtime.
+
+---
+ .../targets/Microsoft.NET.RuntimeIdentifierInference.targets | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
+index 17308aa9160..e764b2d9845 100644
+--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
++++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
+@@ -62,7 +62,7 @@ Copyright (c) .NET Foundation. All rights reserved.
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(UseCurrentRuntimeIdentifier)' == 'true'">
+- <RuntimeIdentifier>$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier>
++ <RuntimeIdentifier>$(NETCoreSdkPortableRuntimeIdentifier)</RuntimeIdentifier>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(PlatformTarget)' == ''">
commit 9bc7689eec09735652c954ea3d97febebb4dc0f5
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Sep 28 14:23:03 2021 -0400
Make it easier to build on RHEL 8 as well using the system libunwind
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 4279bba..826752b 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -148,7 +148,10 @@ if [[ ${build_bootstrap} == true ]]; then
mkdir -p fixup-previously-source-built-artifacts
pushd fixup-previously-source-built-artifacts
tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
- find -iname '*fedora*nupkg' -delete
+ find . -iname '*fedora*nupkg' -delete
+ rm runtime.linux-x64.Microsoft.NETCore.IL*sm.*.nupkg
+ wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_p...
+ wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_p...
# We must keep the original file names in the archive, even prepending a ./ leads to issues
tar -I 'gzip -9' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
popd
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index d1d6994..6f523a3 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -197,7 +197,8 @@ Requires: dotnet-hostfxr-6.0%{?_isa} >= %{host_rpm_version}-%{release}
Requires: libicu%{?_isa}
%if %{use_bundled_libunwind}
-Provides: bundled(libunwind) = 1.3
+# See runtime.*/src/coreclr/pal/src/libunwind/libunwind-version.txt
+Provides: bundled(libunwind) = 1.5.rc1.28.g9165d2a1
%endif
%description -n dotnet-runtime-6.0
@@ -383,6 +384,14 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}
%endif
%endif
+# Disable package validation which breaks our build, even though we
+# are injecting "blessed" nuget packages produced by Microsoft.
+# There's no need to run validation in RPM packages anyway.
+sed -i -E 's|( /p:BuildDebPackage=false)|\1 /p:EnablePackageValidation=false|' src/runtime.*/eng/SourceBuild.props
+
+%if ! %{use_bundled_libunwind}
+sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' src/runtime.*/eng/SourceBuild.props
+%endif
%build
cat /etc/os-release
commit 0fffd382bfeeeb57a9753cce6200c64e29b348dd
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Sep 27 09:39:50 2021 -0400
Update to work-in-progress RC2 release
This isn't even the final RC2 release.
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index c0fa8fd..4279bba 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -28,10 +28,6 @@ function clean_dotnet_cache {
}
function check_bootstrap_environment {
- if rpm -qa | grep libunwind-devel; then
- echo "error: libunwind-devel is installed. Not a good idea for bootstrapping."
- exit 1
- fi
if rpm -qa | grep dotnet ; then
echo "error: dotnet is installed. Not a good idea for bootstrapping."
exit 1
@@ -125,18 +121,16 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git checkout "${tag}"
git submodule update --init --recursive
clean_dotnet_cache
- # FIXME remove contineuonprebuilterror
- # ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true -p:UseSystemLibunwind=false
- # ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
mkdir -p "../${unmodified_tarball_name}"
./build.sh /p:ArcadeBuildTarball=true /p:TarballDir="$(readlink -f ../"${unmodified_tarball_name}")"
+ popd
if [[ ${build_bootstrap} == true ]]; then
- # FIXME
- # cp -a artifacts/"${arch}"/Release/Private.SourceBuilt.Artifacts.*.tar.gz "${unmodified_tarball_name}"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
- echo
+ pushd "${unmodified_tarball_name}"
+ ./prep.sh
+ popd
fi
- popd
+
popd
tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}"
@@ -150,20 +144,29 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
-if [[ ${build_bootstrap} != true ]]; then
+if [[ ${build_bootstrap} == true ]]; then
+ mkdir -p fixup-previously-source-built-artifacts
+ pushd fixup-previously-source-built-artifacts
+ tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+ find -iname '*fedora*nupkg' -delete
+ # We must keep the original file names in the archive, even prepending a ./ leads to issues
+ tar -I 'gzip -9' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
+ popd
+ rm -rf fixup-previously-source-built-artifacts
+
+else
find . -type f -iname '*.tar.gz' -delete
rm -rf .dotnet
-else
- ./prep.sh
fi
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
-rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
-find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
-rm -r src/nuget-client.*/test/EndToEnd
-rm -r src/source-build.*/src/humanizer/samples/
+# FIXME
+#rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
+#find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
+#rm -r src/nuget-client.*/test/EndToEnd
+#rm -r src/source-build.*/src/humanizer/samples/
popd
-tar czf "${tarball_name}.tar.gz" "${tarball_name}"
+tar -I 'gzip -9' -cf "${tarball_name}.tar.gz" "${tarball_name}"
diff --git a/command-line-api-use-work-tree-with-git-apply.patch b/command-line-api-use-work-tree-with-git-apply.patch
new file mode 100644
index 0000000..552d59d
--- /dev/null
+++ b/command-line-api-use-work-tree-with-git-apply.patch
@@ -0,0 +1,27 @@
+From 7a752928ed3588246c4b296feb6cf4946f1b29b7 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Thu, 9 Sep 2021 12:11:39 -0400
+Subject: [PATCH] [ArPow] Use --work-tree with git apply
+
+This makes things work better in a source-tarball build, where there may
+be a .git directory but it's for a different repo than command-line-api.
+---
+ eng/SourceBuild.props | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
+index 6cc85018..5e223747 100644
+--- a/eng/SourceBuild.props
++++ b/eng/SourceBuild.props
+@@ -15,7 +15,7 @@
+ </ItemGroup>
+
+ <Exec
+- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
++ Command="git --work-tree="$(RepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ WorkingDirectory="$(RepoRoot)"
+ Condition="'@(SourceBuildPatchFile)' != ''" />
+ </Target>
+--
+2.31.1
+
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 1ee4e19..d1d6994 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -20,11 +20,11 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 6.0.0-preview.7.21356.2
-%global runtime_version 6.0.0-preview.7.21356.2
-%global aspnetcore_runtime_version 6.0.0-preview.6.21355.2/
-%global sdk_version 6.0.100
-%global templates_version 6.0.0-rc.2.21420.26
+%global host_version 6.0.0-rc.2.21470.23
+%global runtime_version 6.0.0-rc.2.21470.23
+%global aspnetcore_runtime_version 6.0.0-rc.2.21470.37
+%global sdk_version 6.0.100-rc.2.21474.1
+%global templates_version 6.0.0-rc.2.21470.37
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version 6.0.0
@@ -34,7 +34,7 @@
# upstream can update releases without revving the SDK version so these don't always match
#%%global upstream_tag v%%{sdk_version}-SDK
-%global upstream_tag f3ea71b28f18719441d1e6995f134e22559131d6
+%global upstream_tag 28be3e9a006d90d8c6e87d4353b77882829df718
%if 0%{?fedora} || 0%{?rhel} < 8
%global use_bundled_libunwind 0
@@ -57,27 +57,38 @@
Name: dotnet6.0
Version: %{sdk_rpm_version}
-Release: 0.2.preview6%{?dist}
+Release: 0.3.%{upstream_tag}%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
-# ./build-dotnet-tarball --bootstrap $commit-id
+# ./build-dotnet-tarball --bootstrap %%{upstream_tag}
Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
+# https://github.com/NuGet/NuGet.Client/pull/4254
+Patch200: nuget-client-use-work-tree-with-git-apply.patch
+# https://github.com/dotnet/command-line-api/pull/1401
+Patch300: command-line-api-use-work-tree-with-git-apply.patch
+# https://github.com/microsoft/vstest/pull/3046
+Patch400: vstest-use-work-tree-with-git-apply.patch
+
+Patch500: fsharp-use-work-tree-with-git-apply.patch
+
+Patch600: xliff-tasks-use-work-tree-with-git-apply.patch
+
# Disable telemetry by default; make it opt-in
-Patch500: sdk-telemetry-optout.patch
+Patch1500: sdk-telemetry-optout.patch
-%if 0%{?fedora} > 32 || 0%{?rhel} > 8
-ExclusiveArch: aarch64 x86_64
-%else
-ExclusiveArch: x86_64
-%endif
+#%%if 0%%{?fedora} > 32 || 0%%{?rhel} > 8
+#ExclusiveArch: aarch64 x86_64
+#%%else
+ExclusiveArch: x86_64
+#%%endif
BuildRequires: clang
BuildRequires: cmake
@@ -338,10 +349,33 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehos
# Disable warnings
# sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
-pushd src/sdk.*
+pushd src/runtime.*
+popd
+
+pushd src/nuget-client.*
+%patch200 -p1
+popd
+
+pushd src/command-line-api.*
+%patch300 -p1
+popd
+
+pushd src/vstest.*
+%patch400 -p1
+popd
+
+pushd src/fsharp.*
%patch500 -p1
popd
+pushd src/xliff-tasks.*
+%patch600 -p1
+popd
+
+pushd src/sdk.*
+%patch1500 -p1
+popd
+
%if %{without bootstrap}
%ifnarch x86_64
mkdir -p artifacts/obj/%{runtime_arch}/Release
@@ -349,16 +383,6 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}
%endif
%endif
-%if %{use_bundled_libunwind}
- sed -i -E \
- 's/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=(TRUE|true|FALSE|false)/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE/' \
- src/runtime.*/eng/SourceBuild.props
-%else
- sed -i -E \
- 's/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=(TRUE|true|FALSE|false)/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE/' \
- src/runtime.*/eng/SourceBuild.props
-%endif
-
%build
cat /etc/os-release
@@ -400,17 +424,13 @@ unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
-#%%if %%{without bootstrap}
-# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
-# --with-packages %%{_libdir}/dotnet/source-built-artifacts/*.tar.gz \
-# --with-sdk %%{_libdir}/dotnet \
-#%%endif
-
VERBOSE=1 ./build.sh \
%if %{without bootstrap}
--with-sdk previously-built-dotnet \
%endif
-- \
+
+echo \
/v:n \
/p:SkipPortableRuntimeBuild=true \
/p:LogVerbosity=n \
@@ -432,9 +452,13 @@ tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}
# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
# Fix executable permissions on files
+find %{buildroot}%{_libdir}/dotnet/ -type f -name 'apphost' -exec chmod +x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name 'singlefilehost' -exec chmod +x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name 'lib*so' -exec chmod +x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.h' -exec chmod 0644 {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.json' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
@@ -459,9 +483,11 @@ ln -s ../../%{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/
install -dm 0755 %{buildroot}%{_mandir}/man1/
find -iname 'dotnet*.1' -type f -exec cp {} %{buildroot}%{_mandir}/man1/ \;
-echo "%{_libdir}/dotnet" >> install_location
install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
+echo "%{_libdir}/dotnet" >> install_location
install install_location %{buildroot}%{_sysconfdir}/dotnet/
+echo "%{_libdir}/dotnet" >> install_location_%{runtime_arch}
+install install_location_%{runtime_arch} %{buildroot}%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
@@ -520,7 +546,9 @@ install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.
%dir %{_libdir}/dotnet/sdk
%{_libdir}/dotnet/sdk/%{sdk_version}
%dir %{_libdir}/dotnet/sdk-manifests
-%{_libdir}/dotnet/sdk-manifests/%{sdk_version}
+# FIXME hardcoded version?
+%{_libdir}/dotnet/sdk-manifests/6.0.100
+%{_libdir}/dotnet/metadata
%dir %{_libdir}/dotnet/packs
%files -n dotnet-sdk-6.0-source-built-artifacts
@@ -529,6 +557,9 @@ install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.
%changelog
+* Sun Sep 26 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.3.28be3e9a006d90d8c6e87d4353b77882829df718
+- Update to work-in-progress RC2 release
+
* Wed Aug 25 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.2.preview6
- Updated to build the latest source-build preview
diff --git a/fsharp-use-work-tree-with-git-apply.patch b/fsharp-use-work-tree-with-git-apply.patch
new file mode 100644
index 0000000..810cf67
--- /dev/null
+++ b/fsharp-use-work-tree-with-git-apply.patch
@@ -0,0 +1,11 @@
+--- a/eng/SourceBuild.props
++++ b/eng/SourceBuild.props
+@@ -15,7 +15,7 @@
+ </ItemGroup>
+
+ <Exec
+- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
++ Command="git --work-tree="$(RepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ WorkingDirectory="$(RepoRoot)"
+ Condition="'@(SourceBuildPatchFile)' != ''" />
+ </Target>
diff --git a/nuget-client-use-work-tree-with-git-apply.patch b/nuget-client-use-work-tree-with-git-apply.patch
new file mode 100644
index 0000000..e1785ae
--- /dev/null
+++ b/nuget-client-use-work-tree-with-git-apply.patch
@@ -0,0 +1,28 @@
+From 691babb1c8316e2f829fbcf9f2aa14f4b7711960 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Thu, 9 Sep 2021 10:03:36 -0400
+Subject: [PATCH] [ArPow] Use --work-tree with git apply
+
+This makes things work bettern in a source-tarball build (where there
+may not be a .git directory), or there might be a .git directory but
+it's for a different repo than the one we are building.
+---
+ eng/source-build/source-build.proj | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/eng/source-build/source-build.proj b/eng/source-build/source-build.proj
+index 6f90f9793..72058ac88 100644
+--- a/eng/source-build/source-build.proj
++++ b/eng/source-build/source-build.proj
+@@ -55,7 +55,7 @@
+ </ItemGroup>
+
+ <Exec
+- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
++ Command="git --work-tree="$(ProjectRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ WorkingDirectory="$(ProjectRoot)"
+ Condition="'@(SourceBuildPatchFile)' != ''" />
+ </Target>
+--
+2.31.1
+
diff --git a/vstest-use-work-tree-with-git-apply.patch b/vstest-use-work-tree-with-git-apply.patch
new file mode 100644
index 0000000..58c139f
--- /dev/null
+++ b/vstest-use-work-tree-with-git-apply.patch
@@ -0,0 +1,33 @@
+From b2c4b2427d8c1a2410c4210789caccf1ec87e64a Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Thu, 9 Sep 2021 13:21:51 -0400
+Subject: [PATCH] [ArPow] Use --work-tree with git apply
+
+This makes things work better in a source-tarball build, where there may
+be a .git directory somewhere in our parent directories but it's for a
+different repo than vstest. In a situation like that a plain `git apply`
+will (silently!) ignore patches because they wont apply to the unrelated
+repository. That will (eventually) make the source-build fail.
+`--work-tree` makes git directly use the directory that we care about.
+
+See https://github.com/dotnet/source-build/issues/2445 for more details.
+---
+ eng/SourceBuild.props | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
+index b365645c..68f82592 100644
+--- a/eng/SourceBuild.props
++++ b/eng/SourceBuild.props
+@@ -24,7 +24,7 @@
+ </ItemGroup>
+
+ <Exec
+- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
++ Command="git --work-tree="$(InnerSourceBuildRepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ WorkingDirectory="$(InnerSourceBuildRepoRoot)"
+ Condition="'@(SourceBuildPatchFile)' != ''" />
+ </Target>
+--
+2.31.1
+
diff --git a/xliff-tasks-use-work-tree-with-git-apply.patch b/xliff-tasks-use-work-tree-with-git-apply.patch
new file mode 100644
index 0000000..810cf67
--- /dev/null
+++ b/xliff-tasks-use-work-tree-with-git-apply.patch
@@ -0,0 +1,11 @@
+--- a/eng/SourceBuild.props
++++ b/eng/SourceBuild.props
+@@ -15,7 +15,7 @@
+ </ItemGroup>
+
+ <Exec
+- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
++ Command="git --work-tree="$(RepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ WorkingDirectory="$(RepoRoot)"
+ Condition="'@(SourceBuildPatchFile)' != ''" />
+ </Target>
commit ab9ddbb0e7fe2b2c10a82c24f9004bcabd9f6941
Author: Omair Majid <omajid(a)redhat.com>
Date: Sat Aug 28 14:35:50 2021 -0400
Fix build
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 5499281..1ee4e19 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -349,7 +349,15 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}
%endif
%endif
-find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
+%if %{use_bundled_libunwind}
+ sed -i -E \
+ 's/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=(TRUE|true|FALSE|false)/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE/' \
+ src/runtime.*/eng/SourceBuild.props
+%else
+ sed -i -E \
+ 's/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=(TRUE|true|FALSE|false)/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE/' \
+ src/runtime.*/eng/SourceBuild.props
+%endif
%build
@@ -398,7 +406,7 @@ unset LDFLAGS
# --with-sdk %%{_libdir}/dotnet \
#%%endif
-VERBOSE=1 echo ./build.sh \
+VERBOSE=1 ./build.sh \
%if %{without bootstrap}
--with-sdk previously-built-dotnet \
%endif
@@ -408,11 +416,6 @@ VERBOSE=1 echo ./build.sh \
/p:LogVerbosity=n \
/p:MinimalConsoleLogOutput=false \
/p:ContinueOnPrebuiltBaselineError=true \
-%if %{use_bundled_libunwind}
- /p:UseSystemLibunwind=false \
-%else
- /p:UseSystemLibunwind=true \
-%endif
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
@@ -420,11 +423,13 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
+ls artifacts/%{runtime_arch}/Release
tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
+# FIXME: no managed symbols in 6.0?
# Install managed symbols
-tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
- -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
+#tar xf artifacts/%%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%%{runtime_version}-%%{runtime_id}.tar.gz \
+# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
# Fix executable permissions on files
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
@@ -459,15 +464,15 @@ install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
install install_location %{buildroot}%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
-#install -m 0644 artifacts/%%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %%{buildroot}/%%{_libdir}/dotnet/source-built-artifacts/
-install -m 0644 /home/omajid/rh-git/dotnet6.0/already-built-artifacts.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
-echo "Testing build results for debug symbols..."
-%{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
+# FIXME
+#echo "Testing build results for debug symbols..."
+#%%{SOURCE10} -v %%{buildroot}%%{_libdir}/dotnet/
commit 6eb79c130ad50a7e5137ee83e860449c8e26837b
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Aug 25 15:10:50 2021 -0400
Update to latest source-build 6.0 preview commit
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 98494bd..c0fa8fd 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -79,6 +79,7 @@ while [[ "$#" -gt 0 ]]; do
arg="${1}"
case "${arg}" in
--bootstrap)
+ check_bootstrap_environment
build_bootstrap=true
shift
;;
@@ -119,22 +120,26 @@ fi
if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
temp_dir=$(mktemp -d -p "$(pwd)")
pushd "${temp_dir}"
- git clone https://github.com/dotnet/source-build
- pushd source-build
+ git clone https://github.com/dotnet/installer
+ pushd installer
git checkout "${tag}"
git submodule update --init --recursive
clean_dotnet_cache
# FIXME remove contineuonprebuilterror
- ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true -p:UseSystemLibunwind=false
- ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
+ # ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true -p:UseSystemLibunwind=false
+ # ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
+ mkdir -p "../${unmodified_tarball_name}"
+ ./build.sh /p:ArcadeBuildTarball=true /p:TarballDir="$(readlink -f ../"${unmodified_tarball_name}")"
if [[ ${build_bootstrap} == true ]]; then
- cp -a artifacts/"${arch}"/Release/Private.SourceBuilt.Artifacts.*.tar.gz "${unmodified_tarball_name}"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+ # FIXME
+ # cp -a artifacts/"${arch}"/Release/Private.SourceBuilt.Artifacts.*.tar.gz "${unmodified_tarball_name}"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+ echo
fi
popd
popd
- tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}/source-build" "${unmodified_tarball_name}"
+ tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}"
rm -rf "${temp_dir}"
fi
@@ -148,15 +153,16 @@ pushd "${tarball_name}"
if [[ ${build_bootstrap} != true ]]; then
find . -type f -iname '*.tar.gz' -delete
rm -rf .dotnet
+else
+ ./prep.sh
fi
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
-rm -r src/nuget.client.*/test/EndToEnd
-rm -r src/runtime.*/src/mono/
-rm -r src/Humanizer.*/samples/
+rm -r src/nuget-client.*/test/EndToEnd
+rm -r src/source-build.*/src/humanizer/samples/
popd
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 5617669..5499281 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -1,6 +1,3 @@
-#FIXME HACK
-%define debug_package %{nil}
-
%bcond_without bootstrap
# Avoid provides/requires from private libraries
@@ -23,11 +20,11 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 6.0.0-preview6
-%global runtime_version 6.0.0-preview6
-%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 6.0.0-preview6
-%global templates_version %{runtime_version}
+%global host_version 6.0.0-preview.7.21356.2
+%global runtime_version 6.0.0-preview.7.21356.2
+%global aspnetcore_runtime_version 6.0.0-preview.6.21355.2/
+%global sdk_version 6.0.100
+%global templates_version 6.0.0-rc.2.21420.26
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version 6.0.0
@@ -36,7 +33,8 @@
%global sdk_rpm_version 6.0.0
# upstream can update releases without revving the SDK version so these don't always match
-%global src_version %{sdk_version}
+#%%global upstream_tag v%%{sdk_version}-SDK
+%global upstream_tag f3ea71b28f18719441d1e6995f134e22559131d6
%if 0%{?fedora} || 0%{?rhel} < 8
%global use_bundled_libunwind 0
@@ -59,14 +57,14 @@
Name: dotnet6.0
Version: %{sdk_rpm_version}
-Release: 0.1.preview6%{?dist}
+Release: 0.2.preview6%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
-# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-6.0-preview6.tar.gz
+# ./build-dotnet-tarball --bootstrap $commit-id
+Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
@@ -307,13 +305,13 @@ These are not meant for general use.
%prep
%if %{without bootstrap}
-%setup -q -n dotnet-v%{src_version}-SDK
+%setup -q -n dotnet-%{upstream_tag}
%else
%ifarch x86_64
-%setup -q -T -b 0 -n tarball-6.0-preview6
+%setup -q -T -b 0 -n dotnet-%{upstream_tag}-%{runtime_arch}-bootstrap
%endif
%ifarch aarch64
-%setup -q -T -b 1 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
+%setup -q -T -b 0 -n dotnet-%{upstream_tag}-%{runtime_arch}-bootstrap
%endif
%endif
@@ -422,27 +420,11 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
-#tar xf artifacts/%%{runtime_arch}/Release/dotnet-sdk-%%{sdk_version}-%%{runtime_id}.tar.gz -C %%{buildroot}%%{_libdir}/dotnet/
-
-# FIXME this is a GIANT HACK to create a fake .NET installation on disk
-cat <<EOF > %{buildroot}%{_libdir}/dotnet/dotnet
-#!/usr/bin/bash
-
-echo "I am a fake dotnet command"
-EOF
-mkdir -p %{buildroot}%{_libdir}/dotnet/host/fxr/%{host_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/%{aspnetcore_runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Ref/%{runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/%{runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/sdk/%{sdk_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/templates/%{templates_version}
+tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
# Install managed symbols
-# tar xf artifacts/%%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%%{runtime_version}-%%{runtime_id}.tar.gz \
-# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
+tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
+ -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
# Fix executable permissions on files
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
@@ -452,6 +434,7 @@ find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.txt' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.xml' -exec chmod -x {} \;
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
@@ -477,17 +460,19 @@ install install_location %{buildroot}%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
#install -m 0644 artifacts/%%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %%{buildroot}/%%{_libdir}/dotnet/source-built-artifacts/
+install -m 0644 /home/omajid/rh-git/dotnet6.0/already-built-artifacts.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
-# FIXME echo "Testing build results for debug symbols..."
-#%%{SOURCE10} -v %%{buildroot}%%{_libdir}/dotnet/
+echo "Testing build results for debug symbols..."
+%{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
%check
-#%%{buildroot}%%{_libdir}/dotnet/dotnet --info
+%{buildroot}%{_libdir}/dotnet/dotnet --info
%files -n dotnet
@@ -499,9 +484,8 @@ install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
%dir %{_libdir}/dotnet/host
%dir %{_libdir}/dotnet/host/fxr
%{_bindir}/dotnet
-# FIXME
-#%%license %%{_libdir}/dotnet/LICENSE.txt
-#%%license %%{_libdir}/dotnet/ThirdPartyNotices.txt
+%license %{_libdir}/dotnet/LICENSE.txt
+%license %{_libdir}/dotnet/ThirdPartyNotices.txt
%doc %{_mandir}/man1/dotnet*.1.gz
%config(noreplace) %{_sysconfdir}/profile.d/dotnet.sh
%config(noreplace) %{_sysconfdir}/dotnet
@@ -530,6 +514,8 @@ install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
%files -n dotnet-sdk-6.0
%dir %{_libdir}/dotnet/sdk
%{_libdir}/dotnet/sdk/%{sdk_version}
+%dir %{_libdir}/dotnet/sdk-manifests
+%{_libdir}/dotnet/sdk-manifests/%{sdk_version}
%dir %{_libdir}/dotnet/packs
%files -n dotnet-sdk-6.0-source-built-artifacts
@@ -538,6 +524,9 @@ install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
%changelog
+* Wed Aug 25 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.2.preview6
+- Updated to build the latest source-build preview
+
* Fri Jul 23 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.1.preview6
- Initial package for .NET 6
commit 363c3eae42893b844fd39beac5dc70e8d1920808
Author: Omair Majid <omajid(a)redhat.com>
Date: Sat Jul 24 14:22:54 2021 -0400
Update README
diff --git a/README.md b/README.md
index df95803..5289f61 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# dotnet5.0
+# dotnet6.0
-This is the .NET 5.0 package for Fedora.
+This is the pre-release .NET 6.0 package for Fedora.
This package is maintained by the Fedora DotNet SIG (Special Interest
Group). You can find out more about the DotNet SIG at:
@@ -21,6 +21,10 @@ with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
# Contributing
+The steps below are for the final package. Please only contribute to this
+pre-release version this if you know what you are doing. Original instructions
+follow.
+
## General Changes
1. Fork the repo.
commit ccf6794055940ee90a1db7a3aa9c290eb9158c22
Author: Omair Majid <omajid(a)redhat.com>
Date: Sat Jul 24 14:20:14 2021 -0400
Initial .NET 6 package
diff --git a/dotnet5.0.rpmlintrc b/dotnet6.0.rpmlintrc
similarity index 100%
rename from dotnet5.0.rpmlintrc
rename to dotnet6.0.rpmlintrc
diff --git a/dotnet5.0.spec b/dotnet6.0.spec
similarity index 84%
rename from dotnet5.0.spec
rename to dotnet6.0.spec
index 8facb47..5617669 100644
--- a/dotnet5.0.spec
+++ b/dotnet6.0.spec
@@ -1,4 +1,7 @@
-%bcond_with bootstrap
+#FIXME HACK
+%define debug_package %{nil}
+
+%bcond_without bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -20,17 +23,17 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.7
-%global runtime_version 5.0.7
+%global host_version 6.0.0-preview6
+%global runtime_version 6.0.0-preview6
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 5.0.204
+%global sdk_version 6.0.0-preview6
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
-%global host_rpm_version %{host_version}
-%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
-%global runtime_rpm_version %{runtime_version}
-%global sdk_rpm_version %{sdk_version}
+%global host_rpm_version 6.0.0
+%global runtime_rpm_version 6.0.0
+%global aspnetcore_runtime_rpm_version %{runtime_rpm_version}
+%global sdk_rpm_version 6.0.0
# upstream can update releases without revving the SDK version so these don't always match
%global src_version %{sdk_version}
@@ -54,16 +57,16 @@
%{!?runtime_id:%global runtime_id %(. /etc/os-release ; echo "${ID}.${VERSION_ID%%.*}")-%{runtime_arch}}
-Name: dotnet5.0
+Name: dotnet6.0
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 0.1.preview6%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-SDK.tar.gz
+Source0: dotnet-6.0-preview6.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
@@ -82,9 +85,9 @@ BuildRequires: clang
BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
-BuildRequires: dotnet5.0-build-reference-packages
-BuildRequires: dotnet-sdk-5.0
-BuildRequires: dotnet-sdk-5.0-source-built-artifacts
+BuildRequires: dotnet-sdk-6.0-build-reference-packages
+BuildRequires: dotnet-sdk-6.0
+BuildRequires: dotnet-sdk-6.0-source-built-artifacts
%endif
BuildRequires: findutils
BuildRequires: git
@@ -104,7 +107,6 @@ BuildRequires: lttng-ust-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: python3
-BuildRequires: systemtap-sdt-devel
BuildRequires: tar
BuildRequires: zlib-devel
@@ -125,7 +127,7 @@ application to drive everything.
Version: %{sdk_rpm_version}
Summary: .NET CLI tools and runtime
-Requires: dotnet-sdk-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
+Requires: dotnet-sdk-6.0%{?_isa} >= %{sdk_rpm_version}-%{release}
%description -n dotnet
.NET is a fast, lightweight and modular platform for creating
@@ -155,7 +157,7 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-hostfxr-5.0
+%package -n dotnet-hostfxr-6.0
Version: %{host_rpm_version}
Summary: .NET command line host resolver
@@ -164,7 +166,7 @@ Summary: .NET command line host resolver
# provided by this package, or from a newer version of .NET
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
-%description -n dotnet-hostfxr-5.0
+%description -n dotnet-hostfxr-6.0
The .NET host resolver contains the logic to resolve and select
the right version of the .NET SDK or runtime to use.
@@ -175,12 +177,12 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-runtime-5.0
+%package -n dotnet-runtime-6.0
Version: %{runtime_rpm_version}
-Summary: NET 5.0 runtime
+Summary: NET 6.0 runtime
-Requires: dotnet-hostfxr-5.0%{?_isa} >= %{host_rpm_version}-%{release}
+Requires: dotnet-hostfxr-6.0%{?_isa} >= %{host_rpm_version}-%{release}
# libicu is dlopen()ed
Requires: libicu%{?_isa}
@@ -189,7 +191,7 @@ Requires: libicu%{?_isa}
Provides: bundled(libunwind) = 1.3
%endif
-%description -n dotnet-runtime-5.0
+%description -n dotnet-runtime-6.0
The .NET runtime contains everything needed to run .NET applications.
It includes a high performance Virtual Machine as well as the framework
libraries used by .NET applications.
@@ -201,14 +203,14 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n aspnetcore-runtime-5.0
+%package -n aspnetcore-runtime-6.0
Version: %{aspnetcore_runtime_rpm_version}
-Summary: ASP.NET Core 5.0 runtime
+Summary: ASP.NET Core 6.0 runtime
-Requires: dotnet-runtime-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: dotnet-runtime-6.0%{?_isa} >= %{runtime_rpm_version}-%{release}
-%description -n aspnetcore-runtime-5.0
+%description -n aspnetcore-runtime-6.0
The ASP.NET Core runtime contains everything needed to run .NET
web applications. It includes a high performance Virtual Machine as
well as the framework libraries used by .NET applications.
@@ -220,16 +222,16 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-templates-5.0
+%package -n dotnet-templates-6.0
Version: %{sdk_rpm_version}
-Summary: .NET 5.0 templates
+Summary: .NET 6.0 templates
# Theoretically any version of the host should work. But lets aim for the one
# provided by this package, or from a newer version of .NET
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
-%description -n dotnet-templates-5.0
+%description -n dotnet-templates-6.0
This package contains templates used by the .NET SDK.
.NET is a fast, lightweight and modular platform for creating
@@ -239,25 +241,24 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-sdk-5.0
+%package -n dotnet-sdk-6.0
Version: %{sdk_rpm_version}
-Summary: .NET 5.0 Software Development Kit
+Summary: .NET 6.0 Software Development Kit
Provides: bundled(js-jquery)
-Provides: bundled(npm)
-Requires: dotnet-runtime-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: aspnetcore-runtime-5.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+Requires: dotnet-runtime-6.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-runtime-6.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
-Requires: dotnet-apphost-pack-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: dotnet-targeting-pack-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: aspnetcore-targeting-pack-5.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+Requires: dotnet-apphost-pack-6.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: dotnet-targeting-pack-6.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-targeting-pack-6.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
Requires: netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{release}
-Requires: dotnet-templates-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
+Requires: dotnet-templates-6.0%{?_isa} >= %{sdk_rpm_version}-%{release}
-%description -n dotnet-sdk-5.0
+%description -n dotnet-sdk-6.0
The .NET SDK is a collection of command line applications to
create, build, publish and run .NET applications.
@@ -286,18 +287,18 @@ applications using the .NET SDK.
%{_libdir}/dotnet/packs/%{5}
}
-%dotnet_targeting_pack dotnet-apphost-pack-5.0 %{runtime_rpm_version} Microsoft.NETCore.App 5.0 Microsoft.NETCore.App.Host.%{runtime_id}
-%dotnet_targeting_pack dotnet-targeting-pack-5.0 %{runtime_rpm_version} Microsoft.NETCore.App 5.0 Microsoft.NETCore.App.Ref
-%dotnet_targeting_pack aspnetcore-targeting-pack-5.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 5.0 Microsoft.AspNetCore.App.Ref
+%dotnet_targeting_pack dotnet-apphost-pack-6.0 %{runtime_rpm_version} Microsoft.NETCore.App 6.0 Microsoft.NETCore.App.Host.%{runtime_id}
+%dotnet_targeting_pack dotnet-targeting-pack-6.0 %{runtime_rpm_version} Microsoft.NETCore.App 6.0 Microsoft.NETCore.App.Ref
+%dotnet_targeting_pack aspnetcore-targeting-pack-6.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 6.0 Microsoft.AspNetCore.App.Ref
%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref
-%package -n dotnet-sdk-5.0-source-built-artifacts
+%package -n dotnet-sdk-6.0-source-built-artifacts
Version: %{sdk_rpm_version}
-Summary: Internal package for building .NET 5.0 Software Development Kit
+Summary: Internal package for building .NET 6.0 Software Development Kit
-%description -n dotnet-sdk-5.0-source-built-artifacts
+%description -n dotnet-sdk-6.0-source-built-artifacts
The .NET source-built archive is a collection of packages needed
to build the .NET SDK itself.
@@ -309,7 +310,7 @@ These are not meant for general use.
%setup -q -n dotnet-v%{src_version}-SDK
%else
%ifarch x86_64
-%setup -q -T -b 0 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
+%setup -q -T -b 0 -n tarball-6.0-preview6
%endif
%ifarch aarch64
%setup -q -T -b 1 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
@@ -334,10 +335,10 @@ ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages
%endif
# Fix bad hardcoded path in build
-sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/corehost/cli/hostmisc/pal.unix.cpp
+sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehost/hostmisc/pal.unix.cpp
# Disable warnings
-sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
+# sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
pushd src/sdk.*
%patch500 -p1
@@ -350,8 +351,6 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}
%endif
%endif
-cat source-build-info.txt
-
find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
@@ -401,7 +400,7 @@ unset LDFLAGS
# --with-sdk %%{_libdir}/dotnet \
#%%endif
-VERBOSE=1 ./build.sh \
+VERBOSE=1 echo ./build.sh \
%if %{without bootstrap}
--with-sdk previously-built-dotnet \
%endif
@@ -423,27 +422,37 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
-ls artifacts/%{runtime_arch}/Release
-tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
+#tar xf artifacts/%%{runtime_arch}/Release/dotnet-sdk-%%{sdk_version}-%%{runtime_id}.tar.gz -C %%{buildroot}%%{_libdir}/dotnet/
+
+# FIXME this is a GIANT HACK to create a fake .NET installation on disk
+cat <<EOF > %{buildroot}%{_libdir}/dotnet/dotnet
+#!/usr/bin/bash
+
+echo "I am a fake dotnet command"
+EOF
+mkdir -p %{buildroot}%{_libdir}/dotnet/host/fxr/%{host_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/%{aspnetcore_runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Ref/%{runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/%{runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/sdk/%{sdk_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/templates/%{templates_version}
# Install managed symbols
-tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
- -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
+# tar xf artifacts/%%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%%{runtime_version}-%%{runtime_id}.tar.gz \
+# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
# Fix executable permissions on files
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
-find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.h' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.h' -exec chmod 0644 {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.xml' -exec chmod -x {} \;
-chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/apphost
-chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
-chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
-chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/nethost.h
-chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/singlefilehost
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
@@ -467,17 +476,18 @@ install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
install install_location %{buildroot}%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
-install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+#install -m 0644 artifacts/%%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %%{buildroot}/%%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
-echo "Testing build results for debug symbols..."
-%{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
+# FIXME echo "Testing build results for debug symbols..."
+#%%{SOURCE10} -v %%{buildroot}%%{_libdir}/dotnet/
+
%check
-%{buildroot}%{_libdir}/dotnet/dotnet --info
+#%%{buildroot}%%{_libdir}/dotnet/dotnet --info
%files -n dotnet
@@ -489,8 +499,9 @@ echo "Testing build results for debug symbols..."
%dir %{_libdir}/dotnet/host
%dir %{_libdir}/dotnet/host/fxr
%{_bindir}/dotnet
-%license %{_libdir}/dotnet/LICENSE.txt
-%license %{_libdir}/dotnet/ThirdPartyNotices.txt
+# FIXME
+#%%license %%{_libdir}/dotnet/LICENSE.txt
+#%%license %%{_libdir}/dotnet/ThirdPartyNotices.txt
%doc %{_mandir}/man1/dotnet*.1.gz
%config(noreplace) %{_sysconfdir}/profile.d/dotnet.sh
%config(noreplace) %{_sysconfdir}/dotnet
@@ -498,35 +509,38 @@ echo "Testing build results for debug symbols..."
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/dotnet
-%files -n dotnet-hostfxr-5.0
+%files -n dotnet-hostfxr-6.0
%dir %{_libdir}/dotnet/host/fxr
%{_libdir}/dotnet/host/fxr/%{host_version}
-%files -n dotnet-runtime-5.0
+%files -n dotnet-runtime-6.0
%dir %{_libdir}/dotnet/shared
%dir %{_libdir}/dotnet/shared/Microsoft.NETCore.App
%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}
-%files -n aspnetcore-runtime-5.0
+%files -n aspnetcore-runtime-6.0
%dir %{_libdir}/dotnet/shared
%dir %{_libdir}/dotnet/shared/Microsoft.AspNetCore.App
%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}
-%files -n dotnet-templates-5.0
+%files -n dotnet-templates-6.0
%dir %{_libdir}/dotnet/templates
%{_libdir}/dotnet/templates/%{templates_version}
-%files -n dotnet-sdk-5.0
+%files -n dotnet-sdk-6.0
%dir %{_libdir}/dotnet/sdk
%{_libdir}/dotnet/sdk/%{sdk_version}
%dir %{_libdir}/dotnet/packs
-%files -n dotnet-sdk-5.0-source-built-artifacts
+%files -n dotnet-sdk-6.0-source-built-artifacts
%dir %{_libdir}/dotnet
%{_libdir}/dotnet/source-built-artifacts
%changelog
+* Fri Jul 23 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.1.preview6
+- Initial package for .NET 6
+
* Thu Jun 10 2021 Omair Majid <omajid(a)redhat.com> - 5.0.204-1
- Update to .NET SDK 5.0.204 and Runtime 5.0.7
diff --git a/sources b/sources
deleted file mode 100644
index 3023834..0000000
--- a/sources
+++ /dev/null
@@ -1 +0,0 @@
-SHA512 (dotnet-v5.0.204-SDK.tar.gz) = ac6df26f4b36bc6da2bf1909d6f43f82bdfe95461ccb19558edafa4a6e8ceb287287da814aa30ba67d95154640ecfa708cdf42c714997c8d1afe8be2308310bb
commit 6e4203231baf641ee62293cbd9eeb2c94c2b5287
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Jun 10 14:03:16 2021 -0400
Update to .NET SDK 5.0.204 and Runtime 5.0.7
diff --git a/.gitignore b/.gitignore
index 263a869..b620824 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
/dotnet-v5.0.104-SDK.tar.gz
/dotnet-v5.0.202-SDK.tar.gz
/dotnet-v5.0.203-SDK.tar.gz
+/dotnet-v5.0.204-SDK.tar.gz
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 9856091..8facb47 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,10 +20,10 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.6
-%global runtime_version 5.0.6
+%global host_version 5.0.7
+%global runtime_version 5.0.7
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 5.0.203
+%global sdk_version 5.0.204
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
@@ -527,6 +527,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Thu Jun 10 2021 Omair Majid <omajid(a)redhat.com> - 5.0.204-1
+- Update to .NET SDK 5.0.204 and Runtime 5.0.7
+
* Wed May 12 2021 Omair Majid <omajid(a)redhat.com> - 5.0.203-1
- Update to .NET SDK 5.0.203 and Runtime 5.0.6
diff --git a/sources b/sources
index 690c031..3023834 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v5.0.203-SDK.tar.gz) = d2a6162c62d475ea3aab0055179a405b8b99fb698c30738db4d93c6f3372da438b2c8c7ad204b56e01f1ff53a6fd1c12e118dbc7a6a6d637b4bd9392794fa529
+SHA512 (dotnet-v5.0.204-SDK.tar.gz) = ac6df26f4b36bc6da2bf1909d6f43f82bdfe95461ccb19558edafa4a6e8ceb287287da814aa30ba67d95154640ecfa708cdf42c714997c8d1afe8be2308310bb
commit 44bde96015d3885c4f1d022d6825a3bced856001
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri May 14 10:40:29 2021 -0400
Update to .NET SDK 5.0.203 and Runtime 5.0.6
diff --git a/.gitignore b/.gitignore
index e9aebf0..263a869 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
/dotnet-v5.0.103-SDK.tar.gz
/dotnet-v5.0.104-SDK.tar.gz
/dotnet-v5.0.202-SDK.tar.gz
+/dotnet-v5.0.203-SDK.tar.gz
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 28764be..9856091 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,10 +20,10 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.5
-%global runtime_version 5.0.5
+%global host_version 5.0.6
+%global runtime_version 5.0.6
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 5.0.202
+%global sdk_version 5.0.203
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
@@ -329,8 +329,8 @@ rm -rf packages/source-built
%if %{without bootstrap}
mkdir -p packages/archive
-ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
-ln -s %{_libdir}/dotnet/reference-packages/*.tar.gz packages/archive
+ln -s %{_libdir}/dotnet/source-built-artifacts/Private.SourceBuilt.Artifacts.*.tar.gz packages/archive/
+ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive/
%endif
# Fix bad hardcoded path in build
@@ -527,6 +527,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Wed May 12 2021 Omair Majid <omajid(a)redhat.com> - 5.0.203-1
+- Update to .NET SDK 5.0.203 and Runtime 5.0.6
+
* Wed Apr 14 2021 Omair Majid <omajid(a)redhat.com> - 5.0.202-1
- Update to .NET SDK 5.0.202 and Runtime 5.0.5
diff --git a/sources b/sources
index 269959d..690c031 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v5.0.202-SDK.tar.gz) = ac69830aca58db95f7f48839867ebb2bb97dec2ef50c23ac7879ba217800a76c360d727a7e1db065bc4b0edd77b5fa93151d840e64c8b1564265819f8650c20e
+SHA512 (dotnet-v5.0.203-SDK.tar.gz) = d2a6162c62d475ea3aab0055179a405b8b99fb698c30738db4d93c6f3372da438b2c8c7ad204b56e01f1ff53a6fd1c12e118dbc7a6a6d637b4bd9392794fa529
commit 7f6b8ec3f9527a6fbc89018ce31cdcfecc474edd
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Apr 14 23:01:46 2021 -0400
Update to .NET SDK 5.0.202 and Runtime 5.0.5
Also make update-release more flexible with optional bug ids and
optional already-built tarballs.
diff --git a/.gitignore b/.gitignore
index 016368a..e9aebf0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
/dotnet-v5.0.102-SDK.tar.gz
/dotnet-v5.0.103-SDK.tar.gz
/dotnet-v5.0.104-SDK.tar.gz
+/dotnet-v5.0.202-SDK.tar.gz
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 990b208..98494bd 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -154,7 +154,7 @@ fi
# not-very-useful artifacts to reduce tarball size
rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
-rm -r src/NuGet.Client.*/test/EndToEnd
+rm -r src/nuget.client.*/test/EndToEnd
rm -r src/runtime.*/src/mono/
rm -r src/Humanizer.*/samples/
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index d960cba..28764be 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,10 +20,10 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.4
-%global runtime_version 5.0.4
+%global host_version 5.0.5
+%global runtime_version 5.0.5
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 5.0.104
+%global sdk_version 5.0.202
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
@@ -56,7 +56,7 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -68,10 +68,6 @@ Source0: dotnet-v%{src_version}-SDK.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
-# https://github.com/dotnet/runtime/pull/48203
-# Add Fedora 35 RID
-Patch100: runtime-48203-fedora-35-rid.patch
-
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
@@ -343,10 +339,6 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/core
# Disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
-pushd src/runtime.*
-%patch100 -p1
-popd
-
pushd src/sdk.*
%patch500 -p1
popd
@@ -535,6 +527,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Wed Apr 14 2021 Omair Majid <omajid(a)redhat.com> - 5.0.202-1
+- Update to .NET SDK 5.0.202 and Runtime 5.0.5
+
* Tue Apr 06 2021 Omair Majid <omajid(a)redhat.com> - 5.0.104-2
- Mark files under /etc/ as config(noreplace)
- Add an rpm-inspect configuration file
diff --git a/rename-tarball b/rename-tarball
index b6b6086..ea7e65c 100755
--- a/rename-tarball
+++ b/rename-tarball
@@ -21,12 +21,14 @@ while [[ "$#" -gt 0 ]]; do
esac
done
-original_name=${positional_args[0]:-}
-if [[ -z ${original_name} ]]; then
+if [[ -z "${positional_args[0]:-}" ]]; then
echo "error: missing original tarball name"
exit 1
fi
+original_path=$(readlink -f "${positional_args[0]:-}")
+original_name=$(basename "$original_path")
+
new_name=${positional_args[1]:-}
if [[ -z ${new_name} ]]; then
echo "error: missing new tarball name"
@@ -41,8 +43,8 @@ echo "New name: ${new_name}.tar.gz"
mkdir "temp-${new_name}"
pushd "temp-${new_name}"
-tar xf "../${original_name}.tar.gz"
-mv "${original_name}" "${new_name}"
+tar xf "${original_path}"
+mv -- * "${new_name}"
tar czf ../"${new_name}.tar.gz" "${new_name}"
rm -rf "${new_name}"
popd
diff --git a/runtime-48203-fedora-35-rid.patch b/runtime-48203-fedora-35-rid.patch
deleted file mode 100644
index cb8d6ea..0000000
--- a/runtime-48203-fedora-35-rid.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From e806448fdf844ca925c461b356b31363e844e902 Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Thu, 11 Feb 2021 20:13:18 -0500
-Subject: [PATCH 1/2] Add Fedora 35 RID
-
-Fedora rawhide now uses the fedora.35-x64 RID:
-
- $ podman run -it registry.fedoraproject.org/fedora:rawhide /bin/bash -c 'cat /etc/os-release'
- NAME=Fedora
- VERSION="35 (Container Image Prerelease)"
- ID=fedora
- VERSION_ID=35
- VERSION_CODENAME=""
- PLATFORM_ID="platform:f35"
- PRETTY_NAME="Fedora 35 (Container Image Prerelease)"
- ANSI_COLOR="0;38;2;60;110;180"
- LOGO=fedora-logo-icon
- CPE_NAME="cpe:/o:fedoraproject:fedora:35"
- HOME_URL="https://fedoraproject.org/"
- DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators..."
- SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
- BUG_REPORT_URL="https://bugzilla.redhat.com/"
- REDHAT_BUGZILLA_PRODUCT="Fedora"
- REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
- REDHAT_SUPPORT_PRODUCT="Fedora"
- REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
- PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
- VARIANT="Container Image"
- VARIANT_ID=container
----
- .../runtime.compatibility.json | 32 ++++++++++++++++++
- .../Microsoft.NETCore.Platforms/runtime.json | 17 ++++++++++
- .../runtimeGroups.props | 2 +-
- 6 files changed, 69 insertions(+), 18 deletions(-)
-
-diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-index 275929bf1fce..f56d7461e90c 100644
---- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-+++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-@@ -2376,6 +2376,38 @@
- "any",
- "base"
- ],
-+ "fedora.35": [
-+ "fedora.35",
-+ "fedora",
-+ "linux",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
-+ "fedora.35-arm64": [
-+ "fedora.35-arm64",
-+ "fedora.35",
-+ "fedora-arm64",
-+ "fedora",
-+ "linux-arm64",
-+ "linux",
-+ "unix-arm64",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
-+ "fedora.35-x64": [
-+ "fedora.35-x64",
-+ "fedora.35",
-+ "fedora-x64",
-+ "fedora",
-+ "linux-x64",
-+ "linux",
-+ "unix-x64",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
- "freebsd": [
- "freebsd",
- "unix",
-diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
-index 5a2631cccd9a..3e8b2e74e85f 100644
---- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
-+++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
-@@ -962,6 +962,23 @@
- "fedora-x64"
- ]
- },
-+ "fedora.35": {
-+ "#import": [
-+ "fedora"
-+ ]
-+ },
-+ "fedora.35-arm64": {
-+ "#import": [
-+ "fedora.35",
-+ "fedora-arm64"
-+ ]
-+ },
-+ "fedora.35-x64": {
-+ "#import": [
-+ "fedora.35",
-+ "fedora-x64"
-+ ]
-+ },
- "freebsd": {
- "#import": [
- "unix"
-diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-index 5bd4306409de..e78268c077fd 100644
---- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-+++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-@@ -60,7 +60,7 @@
- <RuntimeGroup Include="fedora">
- <Parent>linux</Parent>
- <Architectures>x64;arm64</Architectures>
-- <Versions>23;24;25;26;27;28;29;30;31;32;33;34</Versions>
-+ <Versions>23;24;25;26;27;28;29;30;31;32;33;34;35</Versions>
- <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
- </RuntimeGroup>
-
diff --git a/sdk-telemetry-optout.patch b/sdk-telemetry-optout.patch
index 9b92f33..d6e6464 100644
--- a/sdk-telemetry-optout.patch
+++ b/sdk-telemetry-optout.patch
@@ -15,4 +15,4 @@ index de1ebb9e6..6bbf479de 100644
+
DebugHelper.HandleDebugSwitch(ref args);
- new MulticoreJitActivator().TryActivateMulticoreJit();
+ // Capture the current timestamp to calculate the host overhead.
diff --git a/sources b/sources
index ebd7eb5..269959d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v5.0.104-SDK.tar.gz) = 3318750fb2437d7849f1dd8a3047fcbddab75420439dc60b6f2e50b71ad0ef8d7bbece54c7162254049eac5ed5e0835966b47adaa0255063160622bc6bdb9d68
+SHA512 (dotnet-v5.0.202-SDK.tar.gz) = ac69830aca58db95f7f48839867ebb2bb97dec2ef50c23ac7879ba217800a76c360d727a7e1db065bc4b0edd77b5fa93151d840e64c8b1564265819f8650c20e
diff --git a/update-release b/update-release
index 00996ca..70b3c87 100755
--- a/update-release
+++ b/update-release
@@ -1,24 +1,37 @@
#!/bin/bash
# Usage:
-# ./update-release sdk-version runtime-version [tarball-name]
+# ./update-release sdk-version runtime-version [--bug bug-id] [--tarball tarball-name]
set -euo pipefail
IFS=$'\n\t'
print_usage() {
echo " Usage:"
- echo " ./update-release sdk-version runtime-version [tarball-name]"
+ echo " ./update-release sdk-version runtime-version [--bug bug-id] [--tarball tarball-name]"
}
+user_provided_tarball_name=""
+
positional_args=()
+bug_ids=()
while [[ "$#" -gt 0 ]]; do
- arg="${1}"
+ arg="$1"
case "${arg}" in
+ --bug)
+ bug_ids+=("$2")
+ shift;
+ shift;
+ ;;
-h|--help)
print_usage
exit 0
;;
+ --tarball)
+ user_provided_tarball_name="$2"
+ shift;
+ shift;
+ ;;
*)
positional_args+=("$1")
shift
@@ -26,7 +39,8 @@ while [[ "$#" -gt 0 ]]; do
esac
done
-spec_file=dotnet5.0.spec
+spec_files=( ./*.spec )
+spec_file="${spec_files[0]}"
sdk_version=${positional_args[0]:-}
if [[ -z ${sdk_version} ]]; then
@@ -40,18 +54,22 @@ if [[ -z ${runtime_version} ]]; then
exit 1
fi
+host_version="$runtime_version"
+
tag=v${sdk_version}-SDK
-user_provided_tarball_name=${positional_args[2]:-}
-if [[ -n "${user_provided_tarball_name}" ]]; then
- # we know the format build-dotnet-tarball expects for the original tarball:
- # dotnet-${tag}-original.tar.gz
- ./rename-tarball "$user_provided_tarball_name" dotnet-${tag}-original.tar.gz
+if [[ -f "dotnet-${tag}-original.tar.gz" ]]; then
+ echo "dotnet-${tag}-original.tar.gz alredy exists, not rebuilding tarball"
+else
+ if [[ -n "${user_provided_tarball_name}" ]]; then
+ ./rename-tarball "$user_provided_tarball_name" "dotnet-${tag}-original.tar.gz"
+ elif [[ -f "dotnet-${sdk_version}-SDK.tar.gz" ]]; then
+ ./rename-tarball "dotnet-${sdk_version}-SDK.tar.gz" "dotnet-${tag}-original.tar.gz"
+ elif [[ -f "dotnet-${runtime_version}.tar.gz" ]]; then
+ ./rename-tarball "dotnet-${runtime_version}.tar.gz" "dotnet-${tag}-original.tar.gz"
+ fi
fi
-
-host_version="$runtime_version"
-
if [[ ! -f "dotnet-${tag}.tar.gz" ]]; then
./build-dotnet-tarball "${tag}"
fi
@@ -63,11 +81,15 @@ sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%gl
sed -i -E "s|^%global sdk_version [[:digit:]]\.[[:digit:]]\.[[:digit:]][[:digit:]][[:digit:]]|%global sdk_version ${sdk_version}|" "$spec_file"
comment="Update to .NET SDK ${sdk_version} and Runtime ${runtime_version}"
+for bug_id in "${bug_ids[@]}"; do
+ comment="$comment
+- Resolves: RHBZ#$bug_id"
+done
-rpmdev-bumpspec --comment="$comment" $spec_file
+rpmdev-bumpspec --comment="$comment" "$spec_file"
# Reset release to 1 in 'Release' tag
-sed -i -E 's|^Release: [[:digit:]]+%|Release: 1%|' $spec_file
+sed -i -E 's|^Release: [[:digit:]]+%|Release: 1%|' "$spec_file"
# Reset Release in changelog comment
# See https://stackoverflow.com/questions/18620153/find-matching-text-and-repla...
-sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-1/' $spec_file
+sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-1/' "$spec_file"
commit 6677e18b0936d55a4b505228b869e823aae1c60f
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Apr 6 11:39:49 2021 -0400
Mark files under /etc/ as config(noreplace)
- Add an rpm-inspect configuration file
- Add an rpmlintrc file
- Enable gating for release branches and ELN too
diff --git a/dotnet5.0.rpmlintrc b/dotnet5.0.rpmlintrc
new file mode 100644
index 0000000..1396c43
--- /dev/null
+++ b/dotnet5.0.rpmlintrc
@@ -0,0 +1,35 @@
+# Tarball is generated, no upstream URL
+addFilter("W:.*invalid-url Source0: dotnet-.*tar.gz")
+
+# macOS is the correct name
+addFilter("W: spelling-error %description -l en_US macOS ->.*")
+# The name of the nuget package includes NETCore
+addFilter("W: spelling-error .* NETCore -> Net Core.*")
+
+# Upstream really has no README or documentation files. They suggest using online resources.
+addFilter("W: no-documentation")
+
+# This is a script that we run; it's expected to have execute permissions
+addFilter("W: strange-permission check-debug-symbols.py")
+
+# libicu is a required dependency, but it's used via a dlopen()
+addFilter("E: explicit-lib-dependency libicu")
+
+# There's no devel package for us to place .h files
+addFilter("W: devel-file-in-non-devel-package /usr/lib64/dotnet/.*\.h")
+addFilter("W: devel-file-in-non-devel-package /usr/lib64/dotnet/.*\.a")
+
+# These paths are non-standard, so we need $ORIGIN to find these libraries
+addFilter("E: binary-or-shlib-defines-rpath /usr/lib64/dotnet/.*\['\$ORIGIN/netcoredeps'\]")
+addFilter("E: binary-or-shlib-defines-rpath /usr/lib64/dotnet/.*\['\$ORIGIN'\]")
+
+# We put dll files in /usr/lib/dotnet, but rpmlint somehow doesn't see it as a binary?
+addFilter("W: only-non-binary-in-usr-lib")
+
+# We use a number of zero-length files, including _._
+addFilter("E: zero-length /usr/lib64/dotnet/.*/_\._")
+
+# Upstream uses hidden files, even though we ask them not to, as much as possible
+addFilter("W: hidden-file-or-dir /usr/lib64/dotnet/.*/\.version")
+addFilter("W: hidden-file-or-dir /usr/lib64/dotnet/.*/\.toolsetversion")
+
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 044a298..d960cba 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -56,7 +56,7 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -475,7 +475,7 @@ install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
install install_location %{buildroot}%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
-install artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
@@ -500,8 +500,8 @@ echo "Testing build results for debug symbols..."
%license %{_libdir}/dotnet/LICENSE.txt
%license %{_libdir}/dotnet/ThirdPartyNotices.txt
%doc %{_mandir}/man1/dotnet*.1.gz
-%{_sysconfdir}/profile.d/dotnet.sh
-%{_sysconfdir}/dotnet
+%config(noreplace) %{_sysconfdir}/profile.d/dotnet.sh
+%config(noreplace) %{_sysconfdir}/dotnet
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/dotnet
@@ -535,6 +535,12 @@ echo "Testing build results for debug symbols..."
%changelog
+* Tue Apr 06 2021 Omair Majid <omajid(a)redhat.com> - 5.0.104-2
+- Mark files under /etc/ as config(noreplace)
+- Add an rpm-inspect configuration file
+- Add an rpmlintrc file
+- Enable gating for release branches and ELN too
+
* Tue Mar 16 2021 Omair Majid <omajid(a)redhat.com> - 5.0.104-1
- Update to .NET SDK 5.0.104 and Runtime 5.0.4
- Drop unneeded/upstreamed patches
commit 2eade32a3739a78fda898b0a23c5596d96c5e74d
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Apr 1 10:46:18 2021 -0400
Enable gating for stable branches and RHEL
diff --git a/gating.yaml b/gating.yaml
index 0d881de..8574546 100644
--- a/gating.yaml
+++ b/gating.yaml
@@ -5,3 +5,16 @@ decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
+--- !Policy
+product_versions:
+ - fedora-*
+decision_context: bodhi_update_push_stable
+subject_type: koji_build
+rules:
+ - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
+--- !Policy
+product_versions:
+ - rhel-*
+decision_context: osci_compose_gate
+rules:
+ - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
commit 7536c39a6b4cf414f9143b4b7cd54d388c18fa95
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Mar 22 11:56:59 2021 -0400
Add an rpminspect file for get rpminspect to pass
This requires a recent version of rpminspect, see
https://github.com/rpminspect/rpminspect/issues/335
diff --git a/rpminspect.yaml b/rpminspect.yaml
new file mode 100644
index 0000000..edc369a
--- /dev/null
+++ b/rpminspect.yaml
@@ -0,0 +1,12 @@
+---
+inspections:
+ # We ship an empty dotnet package that installs the latest SDK, but
+ # also a newer SDK when we have that
+ emptyrpm: off
+ # We patch upstream a lot, no need to reject patches
+ patches: off
+runpath:
+ # Upstream explicitly sets $ORIGIN/netcoredeps as an RPATH
+ # See https://github.com/dotnet/core/blob/main/Documentation/self-contained-lin...
+ allowed_origin_paths:
+ - /netcoredeps
commit 46ee7cc319d6aef5ba16e49ab1718a69fde95791
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Mar 17 09:27:35 2021 -0400
Add missing sources
diff --git a/.gitignore b/.gitignore
index 679a3d1..016368a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz
/dotnet-v5.0.102-SDK.tar.gz
/dotnet-v5.0.103-SDK.tar.gz
+/dotnet-v5.0.104-SDK.tar.gz
diff --git a/sources b/sources
index 77bcd05..ebd7eb5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v5.0.103-SDK.tar.gz) = 60705e65a757476dd8d45e0bd5f622cc90baa56b5337234fa8f040bd315639ae7456a30f11045159dafe2b0d16a87af3d7c0fde3d05cf3638ee9a5ce9d1b5141
+SHA512 (dotnet-v5.0.104-SDK.tar.gz) = 3318750fb2437d7849f1dd8a3047fcbddab75420439dc60b6f2e50b71ad0ef8d7bbece54c7162254049eac5ed5e0835966b47adaa0255063160622bc6bdb9d68
commit 68176abe60cd05a5e33604a056df678ebf33a9ff
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Mar 17 09:21:23 2021 -0400
Update to .NET SDK 5.0.104 and Runtime 5.0.4
Drop unneeded/upstreamed patches
diff --git a/SHAHashProvider.Browser.cs b/SHAHashProvider.Browser.cs
deleted file mode 100644
index 4515b8a..0000000
--- a/SHAHashProvider.Browser.cs
+++ /dev/null
@@ -1,1184 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.IO;
-using System.Diagnostics;
-using System.Numerics;
-using System.Security.Cryptography;
-
-namespace Internal.Cryptography
-{
- internal sealed class SHAHashProvider : HashProvider
- {
- private int hashSizeInBytes;
- private SHAManagedImplementationBase impl;
- private MemoryStream buffer;
-
- public SHAHashProvider(string hashAlgorithmId)
- {
- switch (hashAlgorithmId)
- {
- case HashAlgorithmNames.SHA1:
- impl = new SHA1ManagedImplementation();
- hashSizeInBytes = 20;
- break;
- case HashAlgorithmNames.SHA256:
- impl = new SHA256ManagedImplementation();
- hashSizeInBytes = 32;
- break;
- case HashAlgorithmNames.SHA384:
- impl = new SHA384ManagedImplementation();
- hashSizeInBytes = 48;
- break;
- case HashAlgorithmNames.SHA512:
- impl = new SHA512ManagedImplementation();
- hashSizeInBytes = 64;
- break;
- default:
- throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
- }
- }
-
- public override void AppendHashData(ReadOnlySpan<byte> data)
- {
- if (buffer == null)
- {
- buffer = new MemoryStream(1000);
- }
-
- buffer.Write(data);
- }
-
- public override int FinalizeHashAndReset(Span<byte> destination)
- {
- GetCurrentHash(destination);
- buffer = null;
-
- return hashSizeInBytes;
- }
-
- public override int GetCurrentHash(Span<byte> destination)
- {
- Debug.Assert(destination.Length >= hashSizeInBytes);
-
- impl.Initialize();
- if (buffer != null)
- {
- impl.HashCore(buffer.GetBuffer(), 0, (int)buffer.Length);
- }
- impl.HashFinal().CopyTo(destination);
-
- return hashSizeInBytes;
- }
-
- public override int HashSizeInBytes => hashSizeInBytes;
-
- public override void Dispose(bool disposing)
- {
- }
-
- private abstract class SHAManagedImplementationBase
- {
- public abstract void Initialize();
- public abstract void HashCore(byte[] partIn, int ibStart, int cbSize);
- public abstract byte[] HashFinal();
- }
-
- // Ported from src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs.
- // n.b. It's ok to use a "non-secret purposes" hashing implementation here, as this is only
- // used in wasm scenarios, and as of the current release we don't make any security guarantees
- // about our crypto primitives in wasm environments.
- private class SHA1ManagedImplementation : SHAManagedImplementationBase
- {
- private Sha1ForNonSecretPurposes _state; // mutable struct - don't make readonly
-
- public override void Initialize()
- {
- _state = default;
- _state.Start();
- }
-
- public override void HashCore(byte[] partIn, int ibStart, int cbSize)
- {
- _state.Append(partIn.AsSpan(ibStart, cbSize));
- }
-
- public override byte[] HashFinal()
- {
- byte[] output = new byte[20];
- _state.Finish(output);
- return output;
- }
-
- /// <summary>
- /// Implements the SHA1 hashing algorithm. Note that this
- /// implementation is for hashing public information. Do not
- /// use this code to hash private data, as this implementation does
- /// not take any steps to avoid information disclosure.
- /// </summary>
- private struct Sha1ForNonSecretPurposes
- {
- private long length; // Total message length in bits
- private uint[] w; // Workspace
- private int pos; // Length of current chunk in bytes
-
- /// <summary>
- /// Call Start() to initialize the hash object.
- /// </summary>
- public void Start()
- {
- this.w ??= new uint[85];
-
- this.length = 0;
- this.pos = 0;
- this.w[80] = 0x67452301;
- this.w[81] = 0xEFCDAB89;
- this.w[82] = 0x98BADCFE;
- this.w[83] = 0x10325476;
- this.w[84] = 0xC3D2E1F0;
- }
-
- /// <summary>
- /// Adds an input byte to the hash.
- /// </summary>
- /// <param name="input">Data to include in the hash.</param>
- public void Append(byte input)
- {
- this.w[this.pos / 4] = (this.w[this.pos / 4] << 8) | input;
- if (64 == ++this.pos)
- {
- this.Drain();
- }
- }
-
- /// <summary>
- /// Adds input bytes to the hash.
- /// </summary>
- /// <param name="input">
- /// Data to include in the hash. Must not be null.
- /// </param>
- public void Append(ReadOnlySpan<byte> input)
- {
- foreach (byte b in input)
- {
- this.Append(b);
- }
- }
-
- /// <summary>
- /// Retrieves the hash value.
- /// Note that after calling this function, the hash object should
- /// be considered uninitialized. Subsequent calls to Append or
- /// Finish will produce useless results. Call Start() to
- /// reinitialize.
- /// </summary>
- /// <param name="output">
- /// Buffer to receive the hash value. Must not be null.
- /// Up to 20 bytes of hash will be written to the output buffer.
- /// If the buffer is smaller than 20 bytes, the remaining hash
- /// bytes will be lost. If the buffer is larger than 20 bytes, the
- /// rest of the buffer is left unmodified.
- /// </param>
- public void Finish(byte[] output)
- {
- long l = this.length + 8 * this.pos;
- this.Append(0x80);
- while (this.pos != 56)
- {
- this.Append(0x00);
- }
-
- unchecked
- {
- this.Append((byte)(l >> 56));
- this.Append((byte)(l >> 48));
- this.Append((byte)(l >> 40));
- this.Append((byte)(l >> 32));
- this.Append((byte)(l >> 24));
- this.Append((byte)(l >> 16));
- this.Append((byte)(l >> 8));
- this.Append((byte)l);
-
- int end = output.Length < 20 ? output.Length : 20;
- for (int i = 0; i != end; i++)
- {
- uint temp = this.w[80 + i / 4];
- output[i] = (byte)(temp >> 24);
- this.w[80 + i / 4] = temp << 8;
- }
- }
- }
-
- /// <summary>
- /// Called when this.pos reaches 64.
- /// </summary>
- private void Drain()
- {
- for (int i = 16; i != 80; i++)
- {
- this.w[i] = BitOperations.RotateLeft(this.w[i - 3] ^ this.w[i - 8] ^ this.w[i - 14] ^ this.w[i - 16], 1);
- }
-
- unchecked
- {
- uint a = this.w[80];
- uint b = this.w[81];
- uint c = this.w[82];
- uint d = this.w[83];
- uint e = this.w[84];
-
- for (int i = 0; i != 20; i++)
- {
- const uint k = 0x5A827999;
- uint f = (b & c) | ((~b) & d);
- uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
- }
-
- for (int i = 20; i != 40; i++)
- {
- uint f = b ^ c ^ d;
- const uint k = 0x6ED9EBA1;
- uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
- }
-
- for (int i = 40; i != 60; i++)
- {
- uint f = (b & c) | (b & d) | (c & d);
- const uint k = 0x8F1BBCDC;
- uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
- }
-
- for (int i = 60; i != 80; i++)
- {
- uint f = b ^ c ^ d;
- const uint k = 0xCA62C1D6;
- uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
- }
-
- this.w[80] += a;
- this.w[81] += b;
- this.w[82] += c;
- this.w[83] += d;
- this.w[84] += e;
- }
-
- this.length += 512; // 64 bytes == 512 bits
- this.pos = 0;
- }
- }
- }
-
- // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
- private class SHA256ManagedImplementation : SHAManagedImplementationBase
- {
- private byte[] _buffer;
- private long _count; // Number of bytes in the hashed message
- private uint[] _stateSHA256;
- private uint[] _W;
-
- public SHA256ManagedImplementation()
- {
- _stateSHA256 = new uint[8];
- _buffer = new byte[64];
- _W = new uint[64];
-
- InitializeState();
- }
-
- public override void Initialize()
- {
- InitializeState();
-
- // Zeroize potentially sensitive information.
- Array.Clear(_buffer, 0, _buffer.Length);
- Array.Clear(_W, 0, _W.Length);
- }
-
- private void InitializeState()
- {
- _count = 0;
-
- _stateSHA256[0] = 0x6a09e667;
- _stateSHA256[1] = 0xbb67ae85;
- _stateSHA256[2] = 0x3c6ef372;
- _stateSHA256[3] = 0xa54ff53a;
- _stateSHA256[4] = 0x510e527f;
- _stateSHA256[5] = 0x9b05688c;
- _stateSHA256[6] = 0x1f83d9ab;
- _stateSHA256[7] = 0x5be0cd19;
- }
-
- /* SHA256 block update operation. Continues an SHA message-digest
- operation, processing another message block, and updating the
- context.
- */
- public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
- {
- int bufferLen;
- int partInLen = cbSize;
- int partInBase = ibStart;
-
- /* Compute length of buffer */
- bufferLen = (int)(_count & 0x3f);
-
- /* Update number of bytes */
- _count += partInLen;
-
- fixed (uint* stateSHA256 = _stateSHA256)
- {
- fixed (byte* buffer = _buffer)
- {
- fixed (uint* expandedBuffer = _W)
- {
- if ((bufferLen > 0) && (bufferLen + partInLen >= 64))
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 64 - bufferLen);
- partInBase += (64 - bufferLen);
- partInLen -= (64 - bufferLen);
- SHATransform(expandedBuffer, stateSHA256, buffer);
- bufferLen = 0;
- }
-
- /* Copy input to temporary buffer and hash */
- while (partInLen >= 64)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 64);
- partInBase += 64;
- partInLen -= 64;
- SHATransform(expandedBuffer, stateSHA256, buffer);
- }
-
- if (partInLen > 0)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
- }
- }
- }
- }
- }
-
- /* SHA256 finalization. Ends an SHA256 message-digest operation, writing
- the message digest.
- */
- public override byte[] HashFinal()
- {
- byte[] pad;
- int padLen;
- long bitCount;
- byte[] hash = new byte[32]; // HashSizeValue = 256
-
- /* Compute padding: 80 00 00 ... 00 00 <bit count>
- */
-
- padLen = 64 - (int)(_count & 0x3f);
- if (padLen <= 8)
- padLen += 64;
-
- pad = new byte[padLen];
- pad[0] = 0x80;
-
- // Convert count to bit count
- bitCount = _count * 8;
-
- pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
- pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
- pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
- pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
- pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
- pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
- pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
- pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
-
- /* Digest padding */
- HashCore(pad, 0, pad.Length);
-
- /* Store digest */
- SHAUtils.DWORDToBigEndian(hash, _stateSHA256, 8);
-
- return hash;
- }
-
- private static readonly uint[] _K = {
- 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
- 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
- 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
- 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
- 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
- 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
- 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
- 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
- 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
- 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
- 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
- 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
- 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
- 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
- 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
- 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
- };
-
- private static unsafe void SHATransform(uint* expandedBuffer, uint* state, byte* block)
- {
- uint a, b, c, d, e, f, h, g;
- uint aa, bb, cc, dd, ee, ff, hh, gg;
- uint T1;
-
- a = state[0];
- b = state[1];
- c = state[2];
- d = state[3];
- e = state[4];
- f = state[5];
- g = state[6];
- h = state[7];
-
- // fill in the first 16 bytes of W.
- SHAUtils.DWORDFromBigEndian(expandedBuffer, 16, block);
- SHA256Expand(expandedBuffer);
-
- /* Apply the SHA256 compression function */
- // We are trying to be smart here and avoid as many copies as we can
- // The perf gain with this method over the straightforward modify and shift
- // forward is >= 20%, so it's worth the pain
- for (int j = 0; j < 64;)
- {
- T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
- ee = d + T1;
- aa = T1 + Sigma_0(a) + Maj(a, b, c);
- j++;
-
- T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
- ff = c + T1;
- bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
- j++;
-
- T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
- gg = b + T1;
- cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
- j++;
-
- T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
- hh = a + T1;
- dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
- j++;
-
- T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
- h = aa + T1;
- d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
- j++;
-
- T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
- g = bb + T1;
- c = T1 + Sigma_0(d) + Maj(d, dd, cc);
- j++;
-
- T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
- f = cc + T1;
- b = T1 + Sigma_0(c) + Maj(c, d, dd);
- j++;
-
- T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
- e = dd + T1;
- a = T1 + Sigma_0(b) + Maj(b, c, d);
- j++;
- }
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
- state[4] += e;
- state[5] += f;
- state[6] += g;
- state[7] += h;
- }
-
- private static uint RotateRight(uint x, int n)
- {
- return (((x) >> (n)) | ((x) << (32 - (n))));
- }
-
- private static uint Ch(uint x, uint y, uint z)
- {
- return ((x & y) ^ ((x ^ 0xffffffff) & z));
- }
-
- private static uint Maj(uint x, uint y, uint z)
- {
- return ((x & y) ^ (x & z) ^ (y & z));
- }
-
- private static uint sigma_0(uint x)
- {
- return (RotateRight(x, 7) ^ RotateRight(x, 18) ^ (x >> 3));
- }
-
- private static uint sigma_1(uint x)
- {
- return (RotateRight(x, 17) ^ RotateRight(x, 19) ^ (x >> 10));
- }
-
- private static uint Sigma_0(uint x)
- {
- return (RotateRight(x, 2) ^ RotateRight(x, 13) ^ RotateRight(x, 22));
- }
-
- private static uint Sigma_1(uint x)
- {
- return (RotateRight(x, 6) ^ RotateRight(x, 11) ^ RotateRight(x, 25));
- }
-
- /* This function creates W_16,...,W_63 according to the formula
- W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
- */
- private static unsafe void SHA256Expand(uint* x)
- {
- for (int i = 16; i < 64; i++)
- {
- x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
- }
- }
- }
-
- // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
- private class SHA384ManagedImplementation : SHAManagedImplementationBase
- {
- private byte[] _buffer;
- private ulong _count; // Number of bytes in the hashed message
- private ulong[] _stateSHA384;
- private ulong[] _W;
-
- public SHA384ManagedImplementation()
- {
- _stateSHA384 = new ulong[8];
- _buffer = new byte[128];
- _W = new ulong[80];
-
- InitializeState();
- }
-
- public override void Initialize()
- {
- InitializeState();
-
- // Zeroize potentially sensitive information.
- Array.Clear(_buffer, 0, _buffer.Length);
- Array.Clear(_W, 0, _W.Length);
- }
-
- private void InitializeState()
- {
- _count = 0;
-
- _stateSHA384[0] = 0xcbbb9d5dc1059ed8;
- _stateSHA384[1] = 0x629a292a367cd507;
- _stateSHA384[2] = 0x9159015a3070dd17;
- _stateSHA384[3] = 0x152fecd8f70e5939;
- _stateSHA384[4] = 0x67332667ffc00b31;
- _stateSHA384[5] = 0x8eb44a8768581511;
- _stateSHA384[6] = 0xdb0c2e0d64f98fa7;
- _stateSHA384[7] = 0x47b5481dbefa4fa4;
- }
-
- /* SHA384 block update operation. Continues an SHA message-digest
- operation, processing another message block, and updating the
- context.
- */
- public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
- {
- int bufferLen;
- int partInLen = cbSize;
- int partInBase = ibStart;
-
- /* Compute length of buffer */
- bufferLen = (int)(_count & 0x7f);
-
- /* Update number of bytes */
- _count += (ulong)partInLen;
-
- fixed (ulong* stateSHA384 = _stateSHA384)
- {
- fixed (byte* buffer = _buffer)
- {
- fixed (ulong* expandedBuffer = _W)
- {
- if ((bufferLen > 0) && (bufferLen + partInLen >= 128))
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 128 - bufferLen);
- partInBase += (128 - bufferLen);
- partInLen -= (128 - bufferLen);
- SHATransform(expandedBuffer, stateSHA384, buffer);
- bufferLen = 0;
- }
-
- /* Copy input to temporary buffer and hash */
- while (partInLen >= 128)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 128);
- partInBase += 128;
- partInLen -= 128;
- SHATransform(expandedBuffer, stateSHA384, buffer);
- }
-
- if (partInLen > 0)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
- }
- }
- }
- }
- }
-
- /* SHA384 finalization. Ends an SHA384 message-digest operation, writing
- the message digest.
- */
- public override byte[] HashFinal()
- {
- byte[] pad;
- int padLen;
- ulong bitCount;
- byte[] hash = new byte[48]; // HashSizeValue = 384
-
- /* Compute padding: 80 00 00 ... 00 00 <bit count>
- */
-
- padLen = 128 - (int)(_count & 0x7f);
- if (padLen <= 16)
- padLen += 128;
-
- pad = new byte[padLen];
- pad[0] = 0x80;
-
- // Convert count to bit count
- bitCount = _count * 8;
-
- // bitCount is at most 8 * 128 = 1024. Its representation as a 128-bit number has all bits set to zero
- // except eventually the 11 lower bits
-
- //pad[padLen-16] = (byte) ((bitCount >> 120) & 0xff);
- //pad[padLen-15] = (byte) ((bitCount >> 112) & 0xff);
- //pad[padLen-14] = (byte) ((bitCount >> 104) & 0xff);
- //pad[padLen-13] = (byte) ((bitCount >> 96) & 0xff);
- //pad[padLen-12] = (byte) ((bitCount >> 88) & 0xff);
- //pad[padLen-11] = (byte) ((bitCount >> 80) & 0xff);
- //pad[padLen-10] = (byte) ((bitCount >> 72) & 0xff);
- //pad[padLen-9] = (byte) ((bitCount >> 64) & 0xff);
- pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
- pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
- pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
- pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
- pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
- pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
- pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
- pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
-
- /* Digest padding */
- HashCore(pad, 0, pad.Length);
-
- /* Store digest */
- SHAUtils.QuadWordToBigEndian(hash, _stateSHA384, 6);
-
- return hash;
- }
-
- private static readonly ulong[] _K = {
- 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc,
- 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,
- 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2,
- 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694,
- 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
- 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5,
- 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,
- 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70,
- 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df,
- 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,
- 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30,
- 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,
- 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8,
- 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3,
- 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,
- 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b,
- 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,
- 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b,
- 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c,
- 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817,
- };
-
- private static unsafe void SHATransform(ulong* expandedBuffer, ulong* state, byte* block)
- {
- ulong a, b, c, d, e, f, g, h;
- ulong aa, bb, cc, dd, ee, ff, hh, gg;
- ulong T1;
-
- a = state[0];
- b = state[1];
- c = state[2];
- d = state[3];
- e = state[4];
- f = state[5];
- g = state[6];
- h = state[7];
-
- // fill in the first 16 blocks of W.
- SHAUtils.QuadWordFromBigEndian(expandedBuffer, 16, block);
- SHA384Expand(expandedBuffer);
-
- /* Apply the SHA384 compression function */
- // We are trying to be smart here and avoid as many copies as we can
- // The perf gain with this method over the straightforward modify and shift
- // forward is >= 20%, so it's worth the pain
- for (int j = 0; j < 80;)
- {
- T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
- ee = d + T1;
- aa = T1 + Sigma_0(a) + Maj(a, b, c);
- j++;
-
- T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
- ff = c + T1;
- bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
- j++;
-
- T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
- gg = b + T1;
- cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
- j++;
-
- T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
- hh = a + T1;
- dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
- j++;
-
- T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
- h = aa + T1;
- d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
- j++;
-
- T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
- g = bb + T1;
- c = T1 + Sigma_0(d) + Maj(d, dd, cc);
- j++;
-
- T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
- f = cc + T1;
- b = T1 + Sigma_0(c) + Maj(c, d, dd);
- j++;
-
- T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
- e = dd + T1;
- a = T1 + Sigma_0(b) + Maj(b, c, d);
- j++;
- }
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
- state[4] += e;
- state[5] += f;
- state[6] += g;
- state[7] += h;
- }
-
- private static ulong RotateRight(ulong x, int n)
- {
- return (((x) >> (n)) | ((x) << (64 - (n))));
- }
-
- private static ulong Ch(ulong x, ulong y, ulong z)
- {
- return ((x & y) ^ ((x ^ 0xffffffffffffffff) & z));
- }
-
- private static ulong Maj(ulong x, ulong y, ulong z)
- {
- return ((x & y) ^ (x & z) ^ (y & z));
- }
-
- private static ulong Sigma_0(ulong x)
- {
- return (RotateRight(x, 28) ^ RotateRight(x, 34) ^ RotateRight(x, 39));
- }
-
- private static ulong Sigma_1(ulong x)
- {
- return (RotateRight(x, 14) ^ RotateRight(x, 18) ^ RotateRight(x, 41));
- }
-
- private static ulong sigma_0(ulong x)
- {
- return (RotateRight(x, 1) ^ RotateRight(x, 8) ^ (x >> 7));
- }
-
- private static ulong sigma_1(ulong x)
- {
- return (RotateRight(x, 19) ^ RotateRight(x, 61) ^ (x >> 6));
- }
-
- /* This function creates W_16,...,W_79 according to the formula
- W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
- */
- private static unsafe void SHA384Expand(ulong* x)
- {
- for (int i = 16; i < 80; i++)
- {
- x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
- }
- }
- }
-
- // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
- private class SHA512ManagedImplementation : SHAManagedImplementationBase
- {
- private byte[] _buffer;
- private ulong _count; // Number of bytes in the hashed message
- private ulong[] _stateSHA512;
- private ulong[] _W;
-
- public SHA512ManagedImplementation()
- {
- _stateSHA512 = new ulong[8];
- _buffer = new byte[128];
- _W = new ulong[80];
-
- InitializeState();
- }
-
- public override void Initialize()
- {
- InitializeState();
-
- // Zeroize potentially sensitive information.
- Array.Clear(_buffer, 0, _buffer.Length);
- Array.Clear(_W, 0, _W.Length);
- }
-
- private void InitializeState()
- {
- _count = 0;
-
- _stateSHA512[0] = 0x6a09e667f3bcc908;
- _stateSHA512[1] = 0xbb67ae8584caa73b;
- _stateSHA512[2] = 0x3c6ef372fe94f82b;
- _stateSHA512[3] = 0xa54ff53a5f1d36f1;
- _stateSHA512[4] = 0x510e527fade682d1;
- _stateSHA512[5] = 0x9b05688c2b3e6c1f;
- _stateSHA512[6] = 0x1f83d9abfb41bd6b;
- _stateSHA512[7] = 0x5be0cd19137e2179;
- }
-
- /* SHA512 block update operation. Continues an SHA message-digest
- operation, processing another message block, and updating the
- context.
- */
- public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
- {
- int bufferLen;
- int partInLen = cbSize;
- int partInBase = ibStart;
-
- /* Compute length of buffer */
- bufferLen = (int)(_count & 0x7f);
-
- /* Update number of bytes */
- _count += (ulong)partInLen;
-
- fixed (ulong* stateSHA512 = _stateSHA512)
- {
- fixed (byte* buffer = _buffer)
- {
- fixed (ulong* expandedBuffer = _W)
- {
- if ((bufferLen > 0) && (bufferLen + partInLen >= 128))
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 128 - bufferLen);
- partInBase += (128 - bufferLen);
- partInLen -= (128 - bufferLen);
- SHATransform(expandedBuffer, stateSHA512, buffer);
- bufferLen = 0;
- }
-
- /* Copy input to temporary buffer and hash */
- while (partInLen >= 128)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 128);
- partInBase += 128;
- partInLen -= 128;
- SHATransform(expandedBuffer, stateSHA512, buffer);
- }
-
- if (partInLen > 0)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
- }
- }
- }
- }
- }
-
- /* SHA512 finalization. Ends an SHA512 message-digest operation, writing
- the message digest.
- */
- public override byte[] HashFinal()
- {
- byte[] pad;
- int padLen;
- ulong bitCount;
- byte[] hash = new byte[64]; // HashSizeValue = 512
-
- /* Compute padding: 80 00 00 ... 00 00 <bit count>
- */
-
- padLen = 128 - (int)(_count & 0x7f);
- if (padLen <= 16)
- padLen += 128;
-
- pad = new byte[padLen];
- pad[0] = 0x80;
-
- // Convert count to bit count
- bitCount = _count * 8;
-
- // If we ever have UInt128 for bitCount, then these need to be uncommented.
- // Note that C# only looks at the low 6 bits of the shift value for ulongs,
- // so >>0 and >>64 are equal!
-
- //pad[padLen-16] = (byte) ((bitCount >> 120) & 0xff);
- //pad[padLen-15] = (byte) ((bitCount >> 112) & 0xff);
- //pad[padLen-14] = (byte) ((bitCount >> 104) & 0xff);
- //pad[padLen-13] = (byte) ((bitCount >> 96) & 0xff);
- //pad[padLen-12] = (byte) ((bitCount >> 88) & 0xff);
- //pad[padLen-11] = (byte) ((bitCount >> 80) & 0xff);
- //pad[padLen-10] = (byte) ((bitCount >> 72) & 0xff);
- //pad[padLen-9] = (byte) ((bitCount >> 64) & 0xff);
- pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
- pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
- pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
- pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
- pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
- pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
- pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
- pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
-
- /* Digest padding */
- HashCore(pad, 0, pad.Length);
-
- /* Store digest */
- SHAUtils.QuadWordToBigEndian(hash, _stateSHA512, 8);
-
- return hash;
- }
-
- private static readonly ulong[] _K = {
- 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc,
- 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,
- 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2,
- 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694,
- 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
- 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5,
- 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,
- 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70,
- 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df,
- 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,
- 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30,
- 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,
- 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8,
- 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3,
- 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,
- 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b,
- 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,
- 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b,
- 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c,
- 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817,
- };
-
- private static unsafe void SHATransform(ulong* expandedBuffer, ulong* state, byte* block)
- {
- ulong a, b, c, d, e, f, g, h;
- ulong aa, bb, cc, dd, ee, ff, hh, gg;
- ulong T1;
-
- a = state[0];
- b = state[1];
- c = state[2];
- d = state[3];
- e = state[4];
- f = state[5];
- g = state[6];
- h = state[7];
-
- // fill in the first 16 blocks of W.
- SHAUtils.QuadWordFromBigEndian(expandedBuffer, 16, block);
- SHA512Expand(expandedBuffer);
-
- /* Apply the SHA512 compression function */
- // We are trying to be smart here and avoid as many copies as we can
- // The perf gain with this method over the straightforward modify and shift
- // forward is >= 20%, so it's worth the pain
- for (int j = 0; j < 80;)
- {
- T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
- ee = d + T1;
- aa = T1 + Sigma_0(a) + Maj(a, b, c);
- j++;
-
- T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
- ff = c + T1;
- bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
- j++;
-
- T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
- gg = b + T1;
- cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
- j++;
-
- T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
- hh = a + T1;
- dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
- j++;
-
- T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
- h = aa + T1;
- d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
- j++;
-
- T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
- g = bb + T1;
- c = T1 + Sigma_0(d) + Maj(d, dd, cc);
- j++;
-
- T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
- f = cc + T1;
- b = T1 + Sigma_0(c) + Maj(c, d, dd);
- j++;
-
- T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
- e = dd + T1;
- a = T1 + Sigma_0(b) + Maj(b, c, d);
- j++;
- }
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
- state[4] += e;
- state[5] += f;
- state[6] += g;
- state[7] += h;
- }
-
- private static ulong RotateRight(ulong x, int n)
- {
- return (((x) >> (n)) | ((x) << (64 - (n))));
- }
-
- private static ulong Ch(ulong x, ulong y, ulong z)
- {
- return ((x & y) ^ ((x ^ 0xffffffffffffffff) & z));
- }
-
- private static ulong Maj(ulong x, ulong y, ulong z)
- {
- return ((x & y) ^ (x & z) ^ (y & z));
- }
-
- private static ulong Sigma_0(ulong x)
- {
- return (RotateRight(x, 28) ^ RotateRight(x, 34) ^ RotateRight(x, 39));
- }
-
- private static ulong Sigma_1(ulong x)
- {
- return (RotateRight(x, 14) ^ RotateRight(x, 18) ^ RotateRight(x, 41));
- }
-
- private static ulong sigma_0(ulong x)
- {
- return (RotateRight(x, 1) ^ RotateRight(x, 8) ^ (x >> 7));
- }
-
- private static ulong sigma_1(ulong x)
- {
- return (RotateRight(x, 19) ^ RotateRight(x, 61) ^ (x >> 6));
- }
-
- /* This function creates W_16,...,W_79 according to the formula
- W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
- */
- private static unsafe void SHA512Expand(ulong* x)
- {
- for (int i = 16; i < 80; i++)
- {
- x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
- }
- }
- }
-
- // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
- private class SHAUtils
- {
- // digits == number of DWORDs
- public static unsafe void DWORDFromBigEndian(uint* x, int digits, byte* block)
- {
- int i;
- int j;
-
- for (i = 0, j = 0; i < digits; i++, j += 4)
- x[i] = (uint)((block[j] << 24) | (block[j + 1] << 16) | (block[j + 2] << 8) | block[j + 3]);
- }
-
- // encodes x (DWORD) into block (unsigned char), most significant byte first.
- // digits == number of DWORDs
- public static void DWORDToBigEndian(byte[] block, uint[] x, int digits)
- {
- int i;
- int j;
-
- for (i = 0, j = 0; i < digits; i++, j += 4)
- {
- block[j] = (byte)((x[i] >> 24) & 0xff);
- block[j + 1] = (byte)((x[i] >> 16) & 0xff);
- block[j + 2] = (byte)((x[i] >> 8) & 0xff);
- block[j + 3] = (byte)(x[i] & 0xff);
- }
- }
-
- // digits == number of QWORDs
- public static unsafe void QuadWordFromBigEndian(ulong* x, int digits, byte* block)
- {
- int i;
- int j;
-
- for (i = 0, j = 0; i < digits; i++, j += 8)
- x[i] = (
- (((ulong)block[j]) << 56) | (((ulong)block[j + 1]) << 48) |
- (((ulong)block[j + 2]) << 40) | (((ulong)block[j + 3]) << 32) |
- (((ulong)block[j + 4]) << 24) | (((ulong)block[j + 5]) << 16) |
- (((ulong)block[j + 6]) << 8) | ((ulong)block[j + 7])
- );
- }
-
- // encodes x (DWORD) into block (unsigned char), most significant byte first.
- // digits = number of QWORDS
- public static void QuadWordToBigEndian(byte[] block, ulong[] x, int digits)
- {
- int i;
- int j;
-
- for (i = 0, j = 0; i < digits; i++, j += 8)
- {
- block[j] = (byte)((x[i] >> 56) & 0xff);
- block[j + 1] = (byte)((x[i] >> 48) & 0xff);
- block[j + 2] = (byte)((x[i] >> 40) & 0xff);
- block[j + 3] = (byte)((x[i] >> 32) & 0xff);
- block[j + 4] = (byte)((x[i] >> 24) & 0xff);
- block[j + 5] = (byte)((x[i] >> 16) & 0xff);
- block[j + 6] = (byte)((x[i] >> 8) & 0xff);
- block[j + 7] = (byte)(x[i] & 0xff);
- }
- }
- }
- }
-}
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 6135973..990b208 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -158,18 +158,6 @@ rm -r src/NuGet.Client.*/test/EndToEnd
rm -r src/runtime.*/src/mono/
rm -r src/Humanizer.*/samples/
-# FIXME delete when upstream has a new release with this file fixed
-if ! grep "RSA Data Security" src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/SHAHashProvider.Browser.cs; then
- echo "SHAHashProvider.Browser.cs has been fixed upstream. Please fix build-dotnet-tarball"
- exit 1
-fi
-# Delete the bad source
-rm src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/SHAHashProvider.Browser.cs
-# Delete the patch that modifies the bad source
-rm patches/runtime/0001-Use-substitute-SHA-1-implementation-in-wasm-44982.patch
-# Add pre-patched copy
-cp ../SHAHashProvider.Browser.cs src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/
-
popd
tar czf "${tarball_name}.tar.gz" "${tarball_name}"
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 5cf9541..044a298 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,10 +20,10 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.3
-%global runtime_version 5.0.3
+%global host_version 5.0.4
+%global runtime_version 5.0.4
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 5.0.103
+%global sdk_version 5.0.104
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
@@ -56,7 +56,7 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -68,21 +68,9 @@ Source0: dotnet-v%{src_version}-SDK.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
-# Fix up a patch included in source-build to apply after we apply the linker-order patch first
-Patch1: source-build-runtime-fixup-linker-order.patch
-
-# FIXME: upstream Fedora 35 RIDs; needed to unblock Fedora 35 for now
-Patch2: source-build-rids.patch
-
-# https://github.com/dotnet/runtime/pull/42094
-# Fix linker order when linking with --as-needed
-Patch100: runtime-linker-order.patch
-# https://github.com/dotnet/runtime/pull/47020
-# Fix build with gcc 11
-Patch101: runtime-47020-gcc11.patch
# https://github.com/dotnet/runtime/pull/48203
# Add Fedora 35 RID
-Patch102: runtime-48203-fedora-35-rid.patch
+Patch100: runtime-48203-fedora-35-rid.patch
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
@@ -355,13 +343,8 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/core
# Disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
-%patch1 -p1
-%patch2 -p1
-
pushd src/runtime.*
%patch100 -p1
-%patch101 -p1
-%patch102 -p1
popd
pushd src/sdk.*
@@ -552,6 +535,10 @@ echo "Testing build results for debug symbols..."
%changelog
+* Tue Mar 16 2021 Omair Majid <omajid(a)redhat.com> - 5.0.104-1
+- Update to .NET SDK 5.0.104 and Runtime 5.0.4
+- Drop unneeded/upstreamed patches
+
* Wed Feb 17 2021 Omair Majid <omajid(a)redhat.com> - 5.0.103-2
- Add Fedora 35 RIDs
diff --git a/runtime-47020-gcc11.patch b/runtime-47020-gcc11.patch
deleted file mode 100644
index 3751fcf..0000000
--- a/runtime-47020-gcc11.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 7123b8344ddc1c883483f13d34abbd22d4170452 Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Tue, 5 Jan 2021 18:50:18 -0500
-Subject: [PATCH] Fix build errors using GCC 11 (#46334)
-
-Building runtime with GCC 11 leads to some new errors. The errors are
-consistent with the "Header dependency changes" section documented at
-https://gcc.gnu.org/gcc-11/porting_to.html
-
-The first set of errors looks like this:
-
- runtime/src/coreclr/pal/src/misc/cgroup.cpp:403:29:
- error: no member named 'numeric_limits' in namespace 'std'
- if (temp > std::numeric_limits<size_t>::max())
- ~~~~~^
-
-Fix that by including <limits>.
-
-The second set of errors looks like this:
-
- runtime/src/installer/corehost/cli/test/nativehost/host_context_test.cpp:634:31:
- error: no member named 'sleep_for' in namespace 'std::this_thread'
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
- ~~~~~~~~~~~~~~~~~~^
-
-Fix that by including <thread>.
----
- src/coreclr/src/pal/src/misc/cgroup.cpp | 1 +
- src/installer/corehost/cli/test/nativehost/host_context_test.cpp | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/src/coreclr/src/pal/src/misc/cgroup.cpp b/src/coreclr/src/pal/src/misc/cgroup.cpp
-index f3e20012c539..24617359a21b 100644
---- a/src/coreclr/src/pal/src/misc/cgroup.cpp
-+++ b/src/coreclr/src/pal/src/misc/cgroup.cpp
-@@ -14,6 +14,7 @@ Module Name:
- #include "pal/dbgmsg.h"
- SET_DEFAULT_DEBUG_CHANNEL(MISC);
- #include "pal/palinternal.h"
-+#include <limits>
- #include <limits.h>
- #include <sys/resource.h>
- #include "pal/virtual.h"
-diff --git a/src/installer/corehost/cli/test/nativehost/host_context_test.cpp b/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
-index cea98db6673a..371ec2d7e2aa 100644
---- a/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
-+++ b/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
-@@ -11,6 +11,7 @@
- #include <corehost_context_contract.h>
- #include "hostfxr_exports.h"
- #include "host_context_test.h"
-+#include <thread>
- #include <utils.h>
-
- namespace
diff --git a/runtime-linker-order.patch b/runtime-linker-order.patch
deleted file mode 100644
index 6ca413f..0000000
--- a/runtime-linker-order.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/src/installer/corehost/cli/apphost/static/CMakeLists.txt b/src/installer/corehost/cli/apphost/static/CMakeLists.txt
-index 85ea6ffe642..e6369f6b9ad 100644
---- a/src/installer/corehost/cli/apphost/static/CMakeLists.txt
-+++ b/src/installer/corehost/cli/apphost/static/CMakeLists.txt
-@@ -204,11 +204,12 @@ target_link_libraries(singlefilehost
- libhostcommon
- ${CORECLR_LIBRARIES}
-
-+ ${START_WHOLE_ARCHIVE}
-+ ${NATIVE_LIBS}
-+ ${END_WHOLE_ARCHIVE}
-+
- ${ZLIB_LIBRARIES}
- ${LIBGSS}
- ${NATIVE_LIBS_EXTRA}
-
-- ${START_WHOLE_ARCHIVE}
-- ${NATIVE_LIBS}
-- ${END_WHOLE_ARCHIVE}
- )
diff --git a/source-build-rids.patch b/source-build-rids.patch
deleted file mode 100644
index d81bcc2..0000000
--- a/source-build-rids.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-index 363fdeee..0a39a0d0 100644
---- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-+++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-@@ -46,6 +46,8 @@ namespace Microsoft.DotNet.Build.Tasks
- ".fedora.32", "-fedora.32",
- ".fedora.33", "-fedora.33",
- ".fedora.34", "-fedora.34",
-+ ".fedora.35", "-fedora.35",
-+ ".fedora.36", "-fedora.36",
- "-linux", ".linux",
- "-osx", ".osx",
- "-OSX", ".OSX",
diff --git a/source-build-runtime-fixup-linker-order.patch b/source-build-runtime-fixup-linker-order.patch
deleted file mode 100644
index 5a74b5d..0000000
--- a/source-build-runtime-fixup-linker-order.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/patches/runtime/0014-Fix-singlefilehost-build-in-non-portable-mode-42415.patch
-+++ b/patches/runtime/0014-Fix-singlefilehost-build-in-non-portable-mode-42415.patch
-@@ -45,8 +45,8 @@
- # These options are used to force every object to be included even if it's unused.
- set(START_WHOLE_ARCHIVE -Wl,--whole-archive)
- @@ -212,3 +217,10 @@ target_link_libraries(singlefilehost
-- ${NATIVE_LIBS}
-- ${END_WHOLE_ARCHIVE}
-+ ${NATIVE_LIBS_EXTRA}
-+
- )
- +
- +if(NOT FEATURE_DISTRO_AGNOSTIC_SSL)
diff --git a/update-release b/update-release
index 8c6edfe..00996ca 100755
--- a/update-release
+++ b/update-release
@@ -1,14 +1,14 @@
#!/bin/bash
# Usage:
-# ./update-release sdk-version runtime-version
+# ./update-release sdk-version runtime-version [tarball-name]
set -euo pipefail
IFS=$'\n\t'
print_usage() {
echo " Usage:"
- echo " ./update-release sdk-version runtime-version"
+ echo " ./update-release sdk-version runtime-version [tarball-name]"
}
positional_args=()
@@ -40,10 +40,20 @@ if [[ -z ${runtime_version} ]]; then
exit 1
fi
+tag=v${sdk_version}-SDK
+
+user_provided_tarball_name=${positional_args[2]:-}
+if [[ -n "${user_provided_tarball_name}" ]]; then
+ # we know the format build-dotnet-tarball expects for the original tarball:
+ # dotnet-${tag}-original.tar.gz
+ ./rename-tarball "$user_provided_tarball_name" dotnet-${tag}-original.tar.gz
+fi
+
+
host_version="$runtime_version"
-if [[ ! -f "dotnet-v${sdk_version}-SDK.tar.gz" ]]; then
- ./build-dotnet-tarball "v${sdk_version}-SDK"
+if [[ ! -f "dotnet-${tag}.tar.gz" ]]; then
+ ./build-dotnet-tarball "${tag}"
fi
set -x
commit a36231563c01b8257a7a703e8505519b8773e895
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Feb 17 13:34:03 2021 -0500
Add Fedora 35 RIDs
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 6b1dc9d..5cf9541 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -56,7 +56,7 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -71,12 +71,18 @@ Source11: dotnet.sh.in
# Fix up a patch included in source-build to apply after we apply the linker-order patch first
Patch1: source-build-runtime-fixup-linker-order.patch
+# FIXME: upstream Fedora 35 RIDs; needed to unblock Fedora 35 for now
+Patch2: source-build-rids.patch
+
# https://github.com/dotnet/runtime/pull/42094
# Fix linker order when linking with --as-needed
Patch100: runtime-linker-order.patch
# https://github.com/dotnet/runtime/pull/47020
# Fix build with gcc 11
Patch101: runtime-47020-gcc11.patch
+# https://github.com/dotnet/runtime/pull/48203
+# Add Fedora 35 RID
+Patch102: runtime-48203-fedora-35-rid.patch
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
@@ -350,10 +356,12 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/core
sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
%patch1 -p1
+%patch2 -p1
pushd src/runtime.*
%patch100 -p1
%patch101 -p1
+%patch102 -p1
popd
pushd src/sdk.*
@@ -544,6 +552,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Wed Feb 17 2021 Omair Majid <omajid(a)redhat.com> - 5.0.103-2
+- Add Fedora 35 RIDs
+
* Thu Feb 11 2021 Omair Majid <omajid(a)redhat.com> - 5.0.103-1
- Update to .NET SDK 5.0.103 and Runtime 5.0.3
diff --git a/runtime-48203-fedora-35-rid.patch b/runtime-48203-fedora-35-rid.patch
new file mode 100644
index 0000000..cb8d6ea
--- /dev/null
+++ b/runtime-48203-fedora-35-rid.patch
@@ -0,0 +1,119 @@
+From e806448fdf844ca925c461b356b31363e844e902 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Thu, 11 Feb 2021 20:13:18 -0500
+Subject: [PATCH 1/2] Add Fedora 35 RID
+
+Fedora rawhide now uses the fedora.35-x64 RID:
+
+ $ podman run -it registry.fedoraproject.org/fedora:rawhide /bin/bash -c 'cat /etc/os-release'
+ NAME=Fedora
+ VERSION="35 (Container Image Prerelease)"
+ ID=fedora
+ VERSION_ID=35
+ VERSION_CODENAME=""
+ PLATFORM_ID="platform:f35"
+ PRETTY_NAME="Fedora 35 (Container Image Prerelease)"
+ ANSI_COLOR="0;38;2;60;110;180"
+ LOGO=fedora-logo-icon
+ CPE_NAME="cpe:/o:fedoraproject:fedora:35"
+ HOME_URL="https://fedoraproject.org/"
+ DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators..."
+ SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
+ BUG_REPORT_URL="https://bugzilla.redhat.com/"
+ REDHAT_BUGZILLA_PRODUCT="Fedora"
+ REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
+ REDHAT_SUPPORT_PRODUCT="Fedora"
+ REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
+ PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
+ VARIANT="Container Image"
+ VARIANT_ID=container
+---
+ .../runtime.compatibility.json | 32 ++++++++++++++++++
+ .../Microsoft.NETCore.Platforms/runtime.json | 17 ++++++++++
+ .../runtimeGroups.props | 2 +-
+ 6 files changed, 69 insertions(+), 18 deletions(-)
+
+diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+index 275929bf1fce..f56d7461e90c 100644
+--- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
++++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+@@ -2376,6 +2376,38 @@
+ "any",
+ "base"
+ ],
++ "fedora.35": [
++ "fedora.35",
++ "fedora",
++ "linux",
++ "unix",
++ "any",
++ "base"
++ ],
++ "fedora.35-arm64": [
++ "fedora.35-arm64",
++ "fedora.35",
++ "fedora-arm64",
++ "fedora",
++ "linux-arm64",
++ "linux",
++ "unix-arm64",
++ "unix",
++ "any",
++ "base"
++ ],
++ "fedora.35-x64": [
++ "fedora.35-x64",
++ "fedora.35",
++ "fedora-x64",
++ "fedora",
++ "linux-x64",
++ "linux",
++ "unix-x64",
++ "unix",
++ "any",
++ "base"
++ ],
+ "freebsd": [
+ "freebsd",
+ "unix",
+diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
+index 5a2631cccd9a..3e8b2e74e85f 100644
+--- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
++++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
+@@ -962,6 +962,23 @@
+ "fedora-x64"
+ ]
+ },
++ "fedora.35": {
++ "#import": [
++ "fedora"
++ ]
++ },
++ "fedora.35-arm64": {
++ "#import": [
++ "fedora.35",
++ "fedora-arm64"
++ ]
++ },
++ "fedora.35-x64": {
++ "#import": [
++ "fedora.35",
++ "fedora-x64"
++ ]
++ },
+ "freebsd": {
+ "#import": [
+ "unix"
+diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+index 5bd4306409de..e78268c077fd 100644
+--- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
++++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+@@ -60,7 +60,7 @@
+ <RuntimeGroup Include="fedora">
+ <Parent>linux</Parent>
+ <Architectures>x64;arm64</Architectures>
+- <Versions>23;24;25;26;27;28;29;30;31;32;33;34</Versions>
++ <Versions>23;24;25;26;27;28;29;30;31;32;33;34;35</Versions>
+ <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
+ </RuntimeGroup>
+
diff --git a/source-build-rids.patch b/source-build-rids.patch
new file mode 100644
index 0000000..d81bcc2
--- /dev/null
+++ b/source-build-rids.patch
@@ -0,0 +1,13 @@
+diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
+index 363fdeee..0a39a0d0 100644
+--- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
++++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
+@@ -46,6 +46,8 @@ namespace Microsoft.DotNet.Build.Tasks
+ ".fedora.32", "-fedora.32",
+ ".fedora.33", "-fedora.33",
+ ".fedora.34", "-fedora.34",
++ ".fedora.35", "-fedora.35",
++ ".fedora.36", "-fedora.36",
+ "-linux", ".linux",
+ "-osx", ".osx",
+ "-OSX", ".OSX",
commit 387708279ca7a98aefe9bee6b782f12d319d46d9
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Feb 11 17:25:22 2021 -0500
Update to .NET SDK 5.0.103 and Runtime 5.0.3
diff --git a/.gitignore b/.gitignore
index 69c1b65..679a3d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
/dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz
/dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz
/dotnet-v5.0.102-SDK.tar.gz
+/dotnet-v5.0.103-SDK.tar.gz
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 1e0613d..6b1dc9d 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,10 +20,10 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.2
-%global runtime_version 5.0.2
-%global aspnetcore_runtime_version 5.0.2
-%global sdk_version 5.0.102
+%global host_version 5.0.3
+%global runtime_version 5.0.3
+%global aspnetcore_runtime_version %{runtime_version}
+%global sdk_version 5.0.103
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
@@ -56,7 +56,7 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -544,6 +544,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Thu Feb 11 2021 Omair Majid <omajid(a)redhat.com> - 5.0.103-1
+- Update to .NET SDK 5.0.103 and Runtime 5.0.3
+
* Fri Jan 29 2021 Omair Majid <omajid(a)redhat.com> - 5.0.102-2
- Disable bootstrap
diff --git a/sources b/sources
index a52be32..77bcd05 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v5.0.102-SDK.tar.gz) = 86208c0cfa4dc574e77265bac794387d3315d7097ec4e035a99333386e6254478bb4a3e6b866f36391de8dd98cba9d4b0aee19e0b54ca097cd02309786d22188
+SHA512 (dotnet-v5.0.103-SDK.tar.gz) = 60705e65a757476dd8d45e0bd5f622cc90baa56b5337234fa8f040bd315639ae7456a30f11045159dafe2b0d16a87af3d7c0fde3d05cf3638ee9a5ce9d1b5141
diff --git a/update-release b/update-release
index da87262..8c6edfe 100755
--- a/update-release
+++ b/update-release
@@ -52,7 +52,7 @@ sed -i -E "s|^%global host_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%globa
sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%global runtime_version ${runtime_version}|" "$spec_file"
sed -i -E "s|^%global sdk_version [[:digit:]]\.[[:digit:]]\.[[:digit:]][[:digit:]][[:digit:]]|%global sdk_version ${sdk_version}|" "$spec_file"
-comment="Update to .NET Core Runtime ${runtime_version} and SDK ${sdk_version}"
+comment="Update to .NET SDK ${sdk_version} and Runtime ${runtime_version}"
rpmdev-bumpspec --comment="$comment" $spec_file
commit 2e4240bf831b134d40326b808eee0b02eb7a4d11
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jan 29 17:55:10 2021 -0500
Disable bootstrap
diff --git a/.gitignore b/.gitignore
index d032b4e..69c1b65 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/dotnet-v3.1.103.2-SDK.tar.gz
/dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz
/dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz
+/dotnet-v5.0.102-SDK.tar.gz
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 6d2e962..1e0613d 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -1,4 +1,4 @@
-%bcond_without bootstrap
+%bcond_with bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -56,15 +56,14 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-SDK-x64-bootstrap.tar.gz
-Source1: dotnet-v%{src_version}-SDK-arm64-bootstrap.tar.gz
+Source0: dotnet-v%{src_version}-SDK.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
@@ -545,6 +544,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Fri Jan 29 2021 Omair Majid <omajid(a)redhat.com> - 5.0.102-2
+- Disable bootstrap
+
* Fri Dec 18 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-2
- Update to .NET Core Runtime 5.0.0 and SDK 5.0.100 commit 9c4e5de
diff --git a/sources b/sources
index 6d15575..a52be32 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-SHA512 (dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz) = 00369e72c7bf2391510c15804c4ad384862e93b92b941508b5ae33203ac8865bf792a8c961d776ef6622e542a4a8e76fd5822a3ddb5bd1d178497f3800acbe4b
-SHA512 (dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz) = cd01134cc33478bc3615c8c6ffc4d5ddd7a626908b3909d919dd081204f646be48101649db6be2197d98840004839e1fb7caa7a383cfb9b363506e7898f3a0c0
+SHA512 (dotnet-v5.0.102-SDK.tar.gz) = 86208c0cfa4dc574e77265bac794387d3315d7097ec4e035a99333386e6254478bb4a3e6b866f36391de8dd98cba9d4b0aee19e0b54ca097cd02309786d22188
commit d67974b77e2f927b6121d7591e9e51415ede43cc
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jan 29 14:28:00 2021 -0500
Add sources
diff --git a/.gitignore b/.gitignore
index 6fa687b..d032b4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
/dotnet-v3.1.101-SDK.tar.gz
/dotnet-v3.1.102-SDK.tar.gz
/dotnet-v3.1.103.2-SDK.tar.gz
+/dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz
+/dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz
diff --git a/sources b/sources
new file mode 100644
index 0000000..6d15575
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+SHA512 (dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz) = 00369e72c7bf2391510c15804c4ad384862e93b92b941508b5ae33203ac8865bf792a8c961d776ef6622e542a4a8e76fd5822a3ddb5bd1d178497f3800acbe4b
+SHA512 (dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz) = cd01134cc33478bc3615c8c6ffc4d5ddd7a626908b3909d919dd081204f646be48101649db6be2197d98840004839e1fb7caa7a383cfb9b363506e7898f3a0c0
commit 029284a8ad9a0186d7ab202b44afd4c5f1f77ba0
Merge: 7ec31ab a8e6394
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jan 29 12:51:16 2021 -0500
Merge branch 'pagure-master'
Merge the contents from dotnet-sig repo in pagure.
diff --cc README.md
index 9a67806,3990ea2..df95803
--- a/README.md
+++ b/README.md
@@@ -1,3 -1,133 +1,133 @@@
-# Overview
+# dotnet5.0
- The dotnet5.0 package
+ This is the .NET 5.0 package for Fedora.
+
+ This package is maintained by the Fedora DotNet SIG (Special Interest
+ Group). You can find out more about the DotNet SIG at:
+
+ - https://fedoraproject.org/wiki/SIGs/DotNet
+ - https://fedoraproject.org/wiki/DotNet
+ - https://lists.fedoraproject.org/archives/list/dotnet-sig@lists.fedoraproj...
+
+ Please report any issues [using
+ bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&compon....
+
+ # Specification
+
+ This package follows [package naming and contents suggested by
+ upstream](https://docs.microsoft.com/en-us/dotnet/core/build/distribution...,
+ with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
+ `%{_libdir}`).
+
+ # Contributing
+
+ ## General Changes
+
+ 1. Fork the repo.
+
+ 2. Checkout the forked repository.
+
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
+ - `cd dotnet5.0`
+
+ 3. Make your changes. Don't forget to add a changelog.
+
+ 4. Do local builds.
+
+ - `fedpkg local`
+
+ 5. Fix any errors that come up and rebuild until it works locally.
+
+ 6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+ 8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+ 9. Create a pull request with your changes.
+
+ 10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+ 11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+ ## Updating to an new upstream release
+
+ 1. Fork the repo.
+
+ 2. Checkout the forked repository.
+
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
+ - `cd dotnet5.0`
+
+ 3. Build the new upstream source tarball. Update the versions in the
+ spec file. Add a changelog. This is generally automated by the
+ following.
+
+ - `./update-release <sdk-version> <runtime-version>`
+
+ If this fails because of compiler errors, you might have to figure
+ out a fix, then add the patch in `build-dotnet-tarball` script
+ rather than the spec file.
+
+ 4. Do local builds.
+
+ - `fedpkg local`
+
+ 5. Fix any errors that come up and rebuild until it works locally. Any
+ patches that are needed at this point should be added to the spec file.
+
+ 6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+ 7. Upload the source archive to the Fedora look-aside cache.
+
+ - `fedpkg new-sources path-to-generated-dotnet-source-tarball.tar.gz`
+
+ 8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+ 9. Create a pull request with your changes.
+
+ 10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+ 11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+ # Testing
+
+ This package uses CI tests as defined in `tests/test.yml`. Creating a
+ pull-request or running a build will fire off tests and flag any issues. We have
+ enabled gating (via `gating.yaml`) on the tests. That prevents a build
+ that fails any test from being released until the failures are waived.
+
+ The tests themselves are contained in this external repository:
+ https://github.com/redhat-developer/dotnet-regular-tests/
commit a8e63940d4d93dfeebe5397994a37a608f1b734b
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jan 29 12:47:59 2021 -0500
Add a comment describing the patch
Requested in the package review.
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 7bccb47..6d2e962 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -69,6 +69,7 @@ Source1: dotnet-v%{src_version}-SDK-arm64-bootstrap.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
+# Fix up a patch included in source-build to apply after we apply the linker-order patch first
Patch1: source-build-runtime-fixup-linker-order.patch
# https://github.com/dotnet/runtime/pull/42094
commit 7ec31ab47baf71fc91f03e3306bd9c3f7685c91f
Author: Mohan Boddu <mohanboddu(a)fedoraproject.org>
Date: Fri Jan 29 16:59:14 2021 +0000
Added the README
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..9a67806
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# dotnet5.0
+
+The dotnet5.0 package
commit b9e285d220d38729101bed96ed18f20be8d3d0ad
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Jan 21 18:53:18 2021 -0500
Fix non-bootstrap build on aarch64
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index bd6c36e..7bccb47 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -360,6 +360,13 @@ pushd src/sdk.*
%patch500 -p1
popd
+%if %{without bootstrap}
+%ifnarch x86_64
+mkdir -p artifacts/obj/%{runtime_arch}/Release
+cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
+%endif
+%endif
+
cat source-build-info.txt
find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
commit b0a5c898c259c15d8c7969236ff34a77d5c05eaa
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Jan 21 10:05:23 2021 -0500
Change name of source-build-references-package
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 5cd020d..bd6c36e 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -92,7 +92,7 @@ BuildRequires: clang
BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
-BuildRequires: dotnet-5.0-build-reference-packages
+BuildRequires: dotnet5.0-build-reference-packages
BuildRequires: dotnet-sdk-5.0
BuildRequires: dotnet-sdk-5.0-source-built-artifacts
%endif
commit 96fb4c4fa914c5f1f92dabc920ab1f1079333a7d
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Jan 20 17:24:05 2021 -0500
Update for 5.0.102 and bootstrapping
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 6eba1bf..6135973 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -125,7 +125,7 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git submodule update --init --recursive
clean_dotnet_cache
# FIXME remove contineuonprebuilterror
- ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true
+ ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true -p:UseSystemLibunwind=false
./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
if [[ ${build_bootstrap} == true ]]; then
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 5523053..5cd020d 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,11 +20,11 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.0
-%global runtime_version 5.0.0
-%global aspnetcore_runtime_version 5.0.0
-%global sdk_version 5.0.100
-%global templates_version 5.0.0
+%global host_version 5.0.2
+%global runtime_version 5.0.2
+%global aspnetcore_runtime_version 5.0.2
+%global sdk_version 5.0.102
+%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version}
@@ -63,15 +63,20 @@ URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-9c4e5de-x64-bootstrap.tar.gz
-Source1: check-debug-symbols.py
-Source2: dotnet.sh.in
+Source0: dotnet-v%{src_version}-SDK-x64-bootstrap.tar.gz
+Source1: dotnet-v%{src_version}-SDK-arm64-bootstrap.tar.gz
+
+Source10: check-debug-symbols.py
+Source11: dotnet.sh.in
Patch1: source-build-runtime-fixup-linker-order.patch
# https://github.com/dotnet/runtime/pull/42094
# Fix linker order when linking with --as-needed
Patch100: runtime-linker-order.patch
+# https://github.com/dotnet/runtime/pull/47020
+# Fix build with gcc 11
+Patch101: runtime-47020-gcc11.patch
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
@@ -310,7 +315,16 @@ These are not meant for general use.
%prep
-%setup -q -n dotnet-9c4e5de-x64-bootstrap
+%if %{without bootstrap}
+%setup -q -n dotnet-v%{src_version}-SDK
+%else
+%ifarch x86_64
+%setup -q -T -b 0 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
+%endif
+%ifarch aarch64
+%setup -q -T -b 1 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
+%endif
+%endif
%if %{without bootstrap}
# Remove all prebuilts
@@ -339,17 +353,13 @@ sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
pushd src/runtime.*
%patch100 -p1
+%patch101 -p1
popd
pushd src/sdk.*
%patch500 -p1
popd
-%ifnarch x86_64
-mkdir -p artifacts/obj/%{runtime_arch}/Release
-cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
-%endif
-
cat source-build-info.txt
find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
@@ -418,7 +428,7 @@ VERBOSE=1 ./build.sh \
%endif
-sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
+sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
%install
@@ -473,7 +483,7 @@ install artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
echo "Testing build results for debug symbols..."
-%{SOURCE1} -v %{buildroot}%{_libdir}/dotnet/
+%{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
%check
diff --git a/runtime-47020-gcc11.patch b/runtime-47020-gcc11.patch
new file mode 100644
index 0000000..3751fcf
--- /dev/null
+++ b/runtime-47020-gcc11.patch
@@ -0,0 +1,55 @@
+From 7123b8344ddc1c883483f13d34abbd22d4170452 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Tue, 5 Jan 2021 18:50:18 -0500
+Subject: [PATCH] Fix build errors using GCC 11 (#46334)
+
+Building runtime with GCC 11 leads to some new errors. The errors are
+consistent with the "Header dependency changes" section documented at
+https://gcc.gnu.org/gcc-11/porting_to.html
+
+The first set of errors looks like this:
+
+ runtime/src/coreclr/pal/src/misc/cgroup.cpp:403:29:
+ error: no member named 'numeric_limits' in namespace 'std'
+ if (temp > std::numeric_limits<size_t>::max())
+ ~~~~~^
+
+Fix that by including <limits>.
+
+The second set of errors looks like this:
+
+ runtime/src/installer/corehost/cli/test/nativehost/host_context_test.cpp:634:31:
+ error: no member named 'sleep_for' in namespace 'std::this_thread'
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
+ ~~~~~~~~~~~~~~~~~~^
+
+Fix that by including <thread>.
+---
+ src/coreclr/src/pal/src/misc/cgroup.cpp | 1 +
+ src/installer/corehost/cli/test/nativehost/host_context_test.cpp | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/coreclr/src/pal/src/misc/cgroup.cpp b/src/coreclr/src/pal/src/misc/cgroup.cpp
+index f3e20012c539..24617359a21b 100644
+--- a/src/coreclr/src/pal/src/misc/cgroup.cpp
++++ b/src/coreclr/src/pal/src/misc/cgroup.cpp
+@@ -14,6 +14,7 @@ Module Name:
+ #include "pal/dbgmsg.h"
+ SET_DEFAULT_DEBUG_CHANNEL(MISC);
+ #include "pal/palinternal.h"
++#include <limits>
+ #include <limits.h>
+ #include <sys/resource.h>
+ #include "pal/virtual.h"
+diff --git a/src/installer/corehost/cli/test/nativehost/host_context_test.cpp b/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
+index cea98db6673a..371ec2d7e2aa 100644
+--- a/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
++++ b/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
+@@ -11,6 +11,7 @@
+ #include <corehost_context_contract.h>
+ #include "hostfxr_exports.h"
+ #include "host_context_test.h"
++#include <thread>
+ #include <utils.h>
+
+ namespace
commit 12422fd0a6ac964bde1cb1a90a611a343a1c914f
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Jan 18 10:26:45 2021 -0500
Update for bootstrapping 5.0
diff --git a/build-bootstrap-tarball b/build-bootstrap-tarball
deleted file mode 100755
index d3f3547..0000000
--- a/build-bootstrap-tarball
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-set -x
-
-sdk_version=3.1.105
-
-arch=$(uname -m)
-if [[ $arch == "x86_64" ]]; then
- arch=x64
-elif [[ $arch == "aarch64" ]]; then
- arch=arm64
-fi
-
-if rpm -qa | grep libunwind; then
- echo "error: libunwind is installed. Not a good idea for bootstrapping."
- exit 1
-fi
-if rpm -qa | grep dotnet ; then
- echo "error: dotnet is installed. Not a good idea for bootstrapping."
- exit 1
-fi
-if [ -d /usr/lib/dotnet ] || [ -d /usr/lib64/dotnet ] || [ -d /usr/share/dotnet ] ; then
- echo "error: one of /usr/lib/dotnet /usr/lib64/dotnet or /usr/share/dotnet/ exists. Not a good idea for bootstrapping."
- exit 1
-fi
-if command -v dotnet ; then
- echo "error: dotnet is in $PATH. Not a good idea for bootstrapping."
- exit 1
-fi
-
-if [ ! -d dotnet-source-build-tarball ]; then
- if [ ! -d source-build ]; then
- git clone https://github.com/dotnet/source-build
- fi
- pushd source-build
- sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.common.props
- git clean -xdf
- ./build-source-tarball.sh ../dotnet-source-build-tarball/ -- -p:DownloadSourceBuildReferencePackagesTimeoutSeconds=100000
- popd
-fi
-
-rm -rf dotnet-v${sdk_version}-SDK dotnet-v${sdk_version}-SDK.tar.gz
-
-cp -a dotnet-source-build-tarball dotnet-v${sdk_version}-SDK
-cp -a source-build/artifacts/$arch/Release/Private.SourceBuilt.Artifacts.*.tar.gz dotnet-v${sdk_version}-SDK/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
-
-tar czf dotnet-v${sdk_version}-SDK-$arch.tar.gz dotnet-v${sdk_version}-SDK
-
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index c250937..6eba1bf 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -1,7 +1,7 @@
#!/bin/bash
# Usage:
-# build-dotnet-tarball <tag-from-source-build>
+# build-dotnet-tarball [--bootstrap] <tag-from-source-build>
#
# Creates a source archive from a tag (or commit) at github.com/dotnet/source-build
@@ -13,31 +13,40 @@
set -euo pipefail
IFS=$'\n\t'
-print_usage() {
+function print_usage {
echo "Usage:"
- echo "$0 <tag-from-source-build>"
+ echo "$0 [--bootstrap] <tag-from-source-build>"
echo
echo "Creates a source archive from a tag at https://github.com/dotnet/source-build"
+ echo ""
+ echo " --bootstrap build a source tarball usable for bootstrapping .NET"
}
-clean_dotnet_cache() {
+function clean_dotnet_cache {
rm -rf ~/.aspnet ~/.dotnet/ ~/.nuget/ ~/.local/share/NuGet ~/.templateengine
rm -rf /tmp/NuGet /tmp/NuGetScratch /tmp/.NETCore* /tmp/.NETStandard* /tmp/.dotnet /tmp/dotnet.* /tmp/clr-debug-pipe* /tmp/Razor-Server /tmp/CoreFxPipe* /tmp/VBCSCompiler /tmp/.NETFramework*
}
-function runtime_id {
-
- declare -A archmap
- archmap=(
- ["aarch64"]="arm64"
- ["amd64"]="x64"
- ["armv8l"]="arm"
- ["i686"]="x86"
- ["i386"]="x86"
- ["x86_64"]="x64"
- )
+function check_bootstrap_environment {
+ if rpm -qa | grep libunwind-devel; then
+ echo "error: libunwind-devel is installed. Not a good idea for bootstrapping."
+ exit 1
+ fi
+ if rpm -qa | grep dotnet ; then
+ echo "error: dotnet is installed. Not a good idea for bootstrapping."
+ exit 1
+ fi
+ if [ -d /usr/lib/dotnet ] || [ -d /usr/lib64/dotnet ] || [ -d /usr/share/dotnet ] ; then
+ echo "error: one of /usr/lib/dotnet /usr/lib64/dotnet or /usr/share/dotnet/ exists. Not a good idea for bootstrapping."
+ exit 1
+ fi
+ if command -v dotnet ; then
+ echo "error: dotnet is in $PATH. Not a good idea for bootstrapping."
+ exit 1
+ fi
+}
- arch=${archmap["$(uname -m)"]}
+function runtime_id {
source /etc/os-release
case "${ID}" in
@@ -50,10 +59,29 @@ function runtime_id {
echo "${ID}.${rid_version}-${arch}"
}
+build_bootstrap=false
+
+declare -A archmap
+archmap=(
+ ["aarch64"]="arm64"
+ ["amd64"]="x64"
+ ["armv8l"]="arm"
+ ["i686"]="x86"
+ ["i386"]="x86"
+ ["x86_64"]="x64"
+)
+
+arch=${archmap["$(uname -m)"]}
+
+
positional_args=()
while [[ "$#" -gt 0 ]]; do
arg="${1}"
case "${arg}" in
+ --bootstrap)
+ build_bootstrap=true
+ shift
+ ;;
-h|--help)
print_usage
exit 0
@@ -78,6 +106,11 @@ dir_name="dotnet-${tag}"
unmodified_tarball_name="${dir_name}-original"
tarball_name="${dir_name}"
+if [[ ${build_bootstrap} == true ]]; then
+ unmodified_tarball_name="${unmodified_tarball_name}-${arch}-bootstrap"
+ tarball_name="${tarball_name}-${arch}-bootstrap"
+fi
+
if [ -f "${tarball_name}.tar.gz" ]; then
echo "error: ${tarball_name}.tar.gz already exists"
exit 1
@@ -94,6 +127,10 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
# FIXME remove contineuonprebuilterror
./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true
./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
+
+ if [[ ${build_bootstrap} == true ]]; then
+ cp -a artifacts/"${arch}"/Release/Private.SourceBuilt.Artifacts.*.tar.gz "${unmodified_tarball_name}"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+ fi
popd
popd
@@ -107,12 +144,17 @@ tar xf "${unmodified_tarball_name}.tar.gz"
mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
+
+if [[ ${build_bootstrap} != true ]]; then
+ find . -type f -iname '*.tar.gz' -delete
+ rm -rf .dotnet
+fi
+
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
rm -r src/NuGet.Client.*/test/EndToEnd
-find src/runtime.*/ -depth -name tests -print0 | xargs -0 rm -r
rm -r src/runtime.*/src/mono/
rm -r src/Humanizer.*/samples/
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 9aad30e..5523053 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -63,7 +63,7 @@ URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-SDK-337413b.tar.gz
+Source0: dotnet-9c4e5de-x64-bootstrap.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
@@ -87,7 +87,7 @@ BuildRequires: clang
BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
-BuildRequires: dotnet-build-reference-packages
+BuildRequires: dotnet-5.0-build-reference-packages
BuildRequires: dotnet-sdk-5.0
BuildRequires: dotnet-sdk-5.0-source-built-artifacts
%endif
@@ -310,7 +310,7 @@ These are not meant for general use.
%prep
-%setup -q -n dotnet-v%{src_version}-SDK-337413b
+%setup -q -n dotnet-9c4e5de-x64-bootstrap
%if %{without bootstrap}
# Remove all prebuilts
@@ -324,10 +324,9 @@ rm -rf packages/source-built
%endif
%if %{without bootstrap}
-sed -i -e 's|5.0.100-preview1-014459|5.0.103|' global.json
mkdir -p packages/archive
ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
-ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
+ln -s %{_libdir}/dotnet/reference-packages/*.tar.gz packages/archive
%endif
# Fix bad hardcoded path in build
@@ -467,8 +466,8 @@ echo "%{_libdir}/dotnet" >> install_location
install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
install install_location %{buildroot}%{_sysconfdir}/dotnet/
-#install -dm 0755 %%{buildroot}%%{_libdir}/dotnet/source-built-artifacts
-#install artifacts/%%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %%{buildroot}/%%{_libdir}/dotnet/source-built-artifacts/
+install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
+install artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
@@ -522,13 +521,16 @@ echo "Testing build results for debug symbols..."
%{_libdir}/dotnet/sdk/%{sdk_version}
%dir %{_libdir}/dotnet/packs
-#%%files -n dotnet-sdk-5.0-source-built-artifacts
-#%%dir %%{_libdir}/dotnet
-#%%{_libdir}/dotnet/source-built-artifacts
+%files -n dotnet-sdk-5.0-source-built-artifacts
+%dir %{_libdir}/dotnet
+%{_libdir}/dotnet/source-built-artifacts
%changelog
-* Fri Dec 04 13:22:13 EST 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-1
+* Fri Dec 18 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-2
+- Update to .NET Core Runtime 5.0.0 and SDK 5.0.100 commit 9c4e5de
+
+* Fri Dec 04 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-1
- Update to .NET Core Runtime 5.0.0 and SDK 5.0.100
* Thu Dec 03 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.4.20201202git337413b
commit 120443366777f7d79f381716ae2b97a12340c874
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Dec 4 17:09:37 2020 -0500
Update to .NET Core Runtime 5.0.0 and SDK 5.0.100
diff --git a/README.md b/README.md
index 4d4fb58..3990ea2 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Overview
-This is the .NET Core 5.0 package for Fedora.
+This is the .NET 5.0 package for Fedora.
This package is maintained by the Fedora DotNet SIG (Special Interest
Group). You can find out more about the DotNet SIG at:
diff --git a/SHAHashProvider.Browser.cs b/SHAHashProvider.Browser.cs
new file mode 100644
index 0000000..4515b8a
--- /dev/null
+++ b/SHAHashProvider.Browser.cs
@@ -0,0 +1,1184 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.IO;
+using System.Diagnostics;
+using System.Numerics;
+using System.Security.Cryptography;
+
+namespace Internal.Cryptography
+{
+ internal sealed class SHAHashProvider : HashProvider
+ {
+ private int hashSizeInBytes;
+ private SHAManagedImplementationBase impl;
+ private MemoryStream buffer;
+
+ public SHAHashProvider(string hashAlgorithmId)
+ {
+ switch (hashAlgorithmId)
+ {
+ case HashAlgorithmNames.SHA1:
+ impl = new SHA1ManagedImplementation();
+ hashSizeInBytes = 20;
+ break;
+ case HashAlgorithmNames.SHA256:
+ impl = new SHA256ManagedImplementation();
+ hashSizeInBytes = 32;
+ break;
+ case HashAlgorithmNames.SHA384:
+ impl = new SHA384ManagedImplementation();
+ hashSizeInBytes = 48;
+ break;
+ case HashAlgorithmNames.SHA512:
+ impl = new SHA512ManagedImplementation();
+ hashSizeInBytes = 64;
+ break;
+ default:
+ throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
+ }
+ }
+
+ public override void AppendHashData(ReadOnlySpan<byte> data)
+ {
+ if (buffer == null)
+ {
+ buffer = new MemoryStream(1000);
+ }
+
+ buffer.Write(data);
+ }
+
+ public override int FinalizeHashAndReset(Span<byte> destination)
+ {
+ GetCurrentHash(destination);
+ buffer = null;
+
+ return hashSizeInBytes;
+ }
+
+ public override int GetCurrentHash(Span<byte> destination)
+ {
+ Debug.Assert(destination.Length >= hashSizeInBytes);
+
+ impl.Initialize();
+ if (buffer != null)
+ {
+ impl.HashCore(buffer.GetBuffer(), 0, (int)buffer.Length);
+ }
+ impl.HashFinal().CopyTo(destination);
+
+ return hashSizeInBytes;
+ }
+
+ public override int HashSizeInBytes => hashSizeInBytes;
+
+ public override void Dispose(bool disposing)
+ {
+ }
+
+ private abstract class SHAManagedImplementationBase
+ {
+ public abstract void Initialize();
+ public abstract void HashCore(byte[] partIn, int ibStart, int cbSize);
+ public abstract byte[] HashFinal();
+ }
+
+ // Ported from src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs.
+ // n.b. It's ok to use a "non-secret purposes" hashing implementation here, as this is only
+ // used in wasm scenarios, and as of the current release we don't make any security guarantees
+ // about our crypto primitives in wasm environments.
+ private class SHA1ManagedImplementation : SHAManagedImplementationBase
+ {
+ private Sha1ForNonSecretPurposes _state; // mutable struct - don't make readonly
+
+ public override void Initialize()
+ {
+ _state = default;
+ _state.Start();
+ }
+
+ public override void HashCore(byte[] partIn, int ibStart, int cbSize)
+ {
+ _state.Append(partIn.AsSpan(ibStart, cbSize));
+ }
+
+ public override byte[] HashFinal()
+ {
+ byte[] output = new byte[20];
+ _state.Finish(output);
+ return output;
+ }
+
+ /// <summary>
+ /// Implements the SHA1 hashing algorithm. Note that this
+ /// implementation is for hashing public information. Do not
+ /// use this code to hash private data, as this implementation does
+ /// not take any steps to avoid information disclosure.
+ /// </summary>
+ private struct Sha1ForNonSecretPurposes
+ {
+ private long length; // Total message length in bits
+ private uint[] w; // Workspace
+ private int pos; // Length of current chunk in bytes
+
+ /// <summary>
+ /// Call Start() to initialize the hash object.
+ /// </summary>
+ public void Start()
+ {
+ this.w ??= new uint[85];
+
+ this.length = 0;
+ this.pos = 0;
+ this.w[80] = 0x67452301;
+ this.w[81] = 0xEFCDAB89;
+ this.w[82] = 0x98BADCFE;
+ this.w[83] = 0x10325476;
+ this.w[84] = 0xC3D2E1F0;
+ }
+
+ /// <summary>
+ /// Adds an input byte to the hash.
+ /// </summary>
+ /// <param name="input">Data to include in the hash.</param>
+ public void Append(byte input)
+ {
+ this.w[this.pos / 4] = (this.w[this.pos / 4] << 8) | input;
+ if (64 == ++this.pos)
+ {
+ this.Drain();
+ }
+ }
+
+ /// <summary>
+ /// Adds input bytes to the hash.
+ /// </summary>
+ /// <param name="input">
+ /// Data to include in the hash. Must not be null.
+ /// </param>
+ public void Append(ReadOnlySpan<byte> input)
+ {
+ foreach (byte b in input)
+ {
+ this.Append(b);
+ }
+ }
+
+ /// <summary>
+ /// Retrieves the hash value.
+ /// Note that after calling this function, the hash object should
+ /// be considered uninitialized. Subsequent calls to Append or
+ /// Finish will produce useless results. Call Start() to
+ /// reinitialize.
+ /// </summary>
+ /// <param name="output">
+ /// Buffer to receive the hash value. Must not be null.
+ /// Up to 20 bytes of hash will be written to the output buffer.
+ /// If the buffer is smaller than 20 bytes, the remaining hash
+ /// bytes will be lost. If the buffer is larger than 20 bytes, the
+ /// rest of the buffer is left unmodified.
+ /// </param>
+ public void Finish(byte[] output)
+ {
+ long l = this.length + 8 * this.pos;
+ this.Append(0x80);
+ while (this.pos != 56)
+ {
+ this.Append(0x00);
+ }
+
+ unchecked
+ {
+ this.Append((byte)(l >> 56));
+ this.Append((byte)(l >> 48));
+ this.Append((byte)(l >> 40));
+ this.Append((byte)(l >> 32));
+ this.Append((byte)(l >> 24));
+ this.Append((byte)(l >> 16));
+ this.Append((byte)(l >> 8));
+ this.Append((byte)l);
+
+ int end = output.Length < 20 ? output.Length : 20;
+ for (int i = 0; i != end; i++)
+ {
+ uint temp = this.w[80 + i / 4];
+ output[i] = (byte)(temp >> 24);
+ this.w[80 + i / 4] = temp << 8;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when this.pos reaches 64.
+ /// </summary>
+ private void Drain()
+ {
+ for (int i = 16; i != 80; i++)
+ {
+ this.w[i] = BitOperations.RotateLeft(this.w[i - 3] ^ this.w[i - 8] ^ this.w[i - 14] ^ this.w[i - 16], 1);
+ }
+
+ unchecked
+ {
+ uint a = this.w[80];
+ uint b = this.w[81];
+ uint c = this.w[82];
+ uint d = this.w[83];
+ uint e = this.w[84];
+
+ for (int i = 0; i != 20; i++)
+ {
+ const uint k = 0x5A827999;
+ uint f = (b & c) | ((~b) & d);
+ uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
+ }
+
+ for (int i = 20; i != 40; i++)
+ {
+ uint f = b ^ c ^ d;
+ const uint k = 0x6ED9EBA1;
+ uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
+ }
+
+ for (int i = 40; i != 60; i++)
+ {
+ uint f = (b & c) | (b & d) | (c & d);
+ const uint k = 0x8F1BBCDC;
+ uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
+ }
+
+ for (int i = 60; i != 80; i++)
+ {
+ uint f = b ^ c ^ d;
+ const uint k = 0xCA62C1D6;
+ uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
+ }
+
+ this.w[80] += a;
+ this.w[81] += b;
+ this.w[82] += c;
+ this.w[83] += d;
+ this.w[84] += e;
+ }
+
+ this.length += 512; // 64 bytes == 512 bits
+ this.pos = 0;
+ }
+ }
+ }
+
+ // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
+ private class SHA256ManagedImplementation : SHAManagedImplementationBase
+ {
+ private byte[] _buffer;
+ private long _count; // Number of bytes in the hashed message
+ private uint[] _stateSHA256;
+ private uint[] _W;
+
+ public SHA256ManagedImplementation()
+ {
+ _stateSHA256 = new uint[8];
+ _buffer = new byte[64];
+ _W = new uint[64];
+
+ InitializeState();
+ }
+
+ public override void Initialize()
+ {
+ InitializeState();
+
+ // Zeroize potentially sensitive information.
+ Array.Clear(_buffer, 0, _buffer.Length);
+ Array.Clear(_W, 0, _W.Length);
+ }
+
+ private void InitializeState()
+ {
+ _count = 0;
+
+ _stateSHA256[0] = 0x6a09e667;
+ _stateSHA256[1] = 0xbb67ae85;
+ _stateSHA256[2] = 0x3c6ef372;
+ _stateSHA256[3] = 0xa54ff53a;
+ _stateSHA256[4] = 0x510e527f;
+ _stateSHA256[5] = 0x9b05688c;
+ _stateSHA256[6] = 0x1f83d9ab;
+ _stateSHA256[7] = 0x5be0cd19;
+ }
+
+ /* SHA256 block update operation. Continues an SHA message-digest
+ operation, processing another message block, and updating the
+ context.
+ */
+ public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
+ {
+ int bufferLen;
+ int partInLen = cbSize;
+ int partInBase = ibStart;
+
+ /* Compute length of buffer */
+ bufferLen = (int)(_count & 0x3f);
+
+ /* Update number of bytes */
+ _count += partInLen;
+
+ fixed (uint* stateSHA256 = _stateSHA256)
+ {
+ fixed (byte* buffer = _buffer)
+ {
+ fixed (uint* expandedBuffer = _W)
+ {
+ if ((bufferLen > 0) && (bufferLen + partInLen >= 64))
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 64 - bufferLen);
+ partInBase += (64 - bufferLen);
+ partInLen -= (64 - bufferLen);
+ SHATransform(expandedBuffer, stateSHA256, buffer);
+ bufferLen = 0;
+ }
+
+ /* Copy input to temporary buffer and hash */
+ while (partInLen >= 64)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 64);
+ partInBase += 64;
+ partInLen -= 64;
+ SHATransform(expandedBuffer, stateSHA256, buffer);
+ }
+
+ if (partInLen > 0)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
+ }
+ }
+ }
+ }
+ }
+
+ /* SHA256 finalization. Ends an SHA256 message-digest operation, writing
+ the message digest.
+ */
+ public override byte[] HashFinal()
+ {
+ byte[] pad;
+ int padLen;
+ long bitCount;
+ byte[] hash = new byte[32]; // HashSizeValue = 256
+
+ /* Compute padding: 80 00 00 ... 00 00 <bit count>
+ */
+
+ padLen = 64 - (int)(_count & 0x3f);
+ if (padLen <= 8)
+ padLen += 64;
+
+ pad = new byte[padLen];
+ pad[0] = 0x80;
+
+ // Convert count to bit count
+ bitCount = _count * 8;
+
+ pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
+ pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
+ pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
+ pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
+ pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
+ pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
+ pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
+ pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
+
+ /* Digest padding */
+ HashCore(pad, 0, pad.Length);
+
+ /* Store digest */
+ SHAUtils.DWORDToBigEndian(hash, _stateSHA256, 8);
+
+ return hash;
+ }
+
+ private static readonly uint[] _K = {
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
+ 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
+ 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
+ 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
+ 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
+ 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
+ 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
+ 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
+ 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
+ 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
+ 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
+ };
+
+ private static unsafe void SHATransform(uint* expandedBuffer, uint* state, byte* block)
+ {
+ uint a, b, c, d, e, f, h, g;
+ uint aa, bb, cc, dd, ee, ff, hh, gg;
+ uint T1;
+
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+ e = state[4];
+ f = state[5];
+ g = state[6];
+ h = state[7];
+
+ // fill in the first 16 bytes of W.
+ SHAUtils.DWORDFromBigEndian(expandedBuffer, 16, block);
+ SHA256Expand(expandedBuffer);
+
+ /* Apply the SHA256 compression function */
+ // We are trying to be smart here and avoid as many copies as we can
+ // The perf gain with this method over the straightforward modify and shift
+ // forward is >= 20%, so it's worth the pain
+ for (int j = 0; j < 64;)
+ {
+ T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
+ ee = d + T1;
+ aa = T1 + Sigma_0(a) + Maj(a, b, c);
+ j++;
+
+ T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
+ ff = c + T1;
+ bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
+ j++;
+
+ T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
+ gg = b + T1;
+ cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
+ j++;
+
+ T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
+ hh = a + T1;
+ dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
+ j++;
+
+ T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
+ h = aa + T1;
+ d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
+ j++;
+
+ T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
+ g = bb + T1;
+ c = T1 + Sigma_0(d) + Maj(d, dd, cc);
+ j++;
+
+ T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
+ f = cc + T1;
+ b = T1 + Sigma_0(c) + Maj(c, d, dd);
+ j++;
+
+ T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
+ e = dd + T1;
+ a = T1 + Sigma_0(b) + Maj(b, c, d);
+ j++;
+ }
+
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+ state[4] += e;
+ state[5] += f;
+ state[6] += g;
+ state[7] += h;
+ }
+
+ private static uint RotateRight(uint x, int n)
+ {
+ return (((x) >> (n)) | ((x) << (32 - (n))));
+ }
+
+ private static uint Ch(uint x, uint y, uint z)
+ {
+ return ((x & y) ^ ((x ^ 0xffffffff) & z));
+ }
+
+ private static uint Maj(uint x, uint y, uint z)
+ {
+ return ((x & y) ^ (x & z) ^ (y & z));
+ }
+
+ private static uint sigma_0(uint x)
+ {
+ return (RotateRight(x, 7) ^ RotateRight(x, 18) ^ (x >> 3));
+ }
+
+ private static uint sigma_1(uint x)
+ {
+ return (RotateRight(x, 17) ^ RotateRight(x, 19) ^ (x >> 10));
+ }
+
+ private static uint Sigma_0(uint x)
+ {
+ return (RotateRight(x, 2) ^ RotateRight(x, 13) ^ RotateRight(x, 22));
+ }
+
+ private static uint Sigma_1(uint x)
+ {
+ return (RotateRight(x, 6) ^ RotateRight(x, 11) ^ RotateRight(x, 25));
+ }
+
+ /* This function creates W_16,...,W_63 according to the formula
+ W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
+ */
+ private static unsafe void SHA256Expand(uint* x)
+ {
+ for (int i = 16; i < 64; i++)
+ {
+ x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
+ }
+ }
+ }
+
+ // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
+ private class SHA384ManagedImplementation : SHAManagedImplementationBase
+ {
+ private byte[] _buffer;
+ private ulong _count; // Number of bytes in the hashed message
+ private ulong[] _stateSHA384;
+ private ulong[] _W;
+
+ public SHA384ManagedImplementation()
+ {
+ _stateSHA384 = new ulong[8];
+ _buffer = new byte[128];
+ _W = new ulong[80];
+
+ InitializeState();
+ }
+
+ public override void Initialize()
+ {
+ InitializeState();
+
+ // Zeroize potentially sensitive information.
+ Array.Clear(_buffer, 0, _buffer.Length);
+ Array.Clear(_W, 0, _W.Length);
+ }
+
+ private void InitializeState()
+ {
+ _count = 0;
+
+ _stateSHA384[0] = 0xcbbb9d5dc1059ed8;
+ _stateSHA384[1] = 0x629a292a367cd507;
+ _stateSHA384[2] = 0x9159015a3070dd17;
+ _stateSHA384[3] = 0x152fecd8f70e5939;
+ _stateSHA384[4] = 0x67332667ffc00b31;
+ _stateSHA384[5] = 0x8eb44a8768581511;
+ _stateSHA384[6] = 0xdb0c2e0d64f98fa7;
+ _stateSHA384[7] = 0x47b5481dbefa4fa4;
+ }
+
+ /* SHA384 block update operation. Continues an SHA message-digest
+ operation, processing another message block, and updating the
+ context.
+ */
+ public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
+ {
+ int bufferLen;
+ int partInLen = cbSize;
+ int partInBase = ibStart;
+
+ /* Compute length of buffer */
+ bufferLen = (int)(_count & 0x7f);
+
+ /* Update number of bytes */
+ _count += (ulong)partInLen;
+
+ fixed (ulong* stateSHA384 = _stateSHA384)
+ {
+ fixed (byte* buffer = _buffer)
+ {
+ fixed (ulong* expandedBuffer = _W)
+ {
+ if ((bufferLen > 0) && (bufferLen + partInLen >= 128))
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 128 - bufferLen);
+ partInBase += (128 - bufferLen);
+ partInLen -= (128 - bufferLen);
+ SHATransform(expandedBuffer, stateSHA384, buffer);
+ bufferLen = 0;
+ }
+
+ /* Copy input to temporary buffer and hash */
+ while (partInLen >= 128)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 128);
+ partInBase += 128;
+ partInLen -= 128;
+ SHATransform(expandedBuffer, stateSHA384, buffer);
+ }
+
+ if (partInLen > 0)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
+ }
+ }
+ }
+ }
+ }
+
+ /* SHA384 finalization. Ends an SHA384 message-digest operation, writing
+ the message digest.
+ */
+ public override byte[] HashFinal()
+ {
+ byte[] pad;
+ int padLen;
+ ulong bitCount;
+ byte[] hash = new byte[48]; // HashSizeValue = 384
+
+ /* Compute padding: 80 00 00 ... 00 00 <bit count>
+ */
+
+ padLen = 128 - (int)(_count & 0x7f);
+ if (padLen <= 16)
+ padLen += 128;
+
+ pad = new byte[padLen];
+ pad[0] = 0x80;
+
+ // Convert count to bit count
+ bitCount = _count * 8;
+
+ // bitCount is at most 8 * 128 = 1024. Its representation as a 128-bit number has all bits set to zero
+ // except eventually the 11 lower bits
+
+ //pad[padLen-16] = (byte) ((bitCount >> 120) & 0xff);
+ //pad[padLen-15] = (byte) ((bitCount >> 112) & 0xff);
+ //pad[padLen-14] = (byte) ((bitCount >> 104) & 0xff);
+ //pad[padLen-13] = (byte) ((bitCount >> 96) & 0xff);
+ //pad[padLen-12] = (byte) ((bitCount >> 88) & 0xff);
+ //pad[padLen-11] = (byte) ((bitCount >> 80) & 0xff);
+ //pad[padLen-10] = (byte) ((bitCount >> 72) & 0xff);
+ //pad[padLen-9] = (byte) ((bitCount >> 64) & 0xff);
+ pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
+ pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
+ pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
+ pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
+ pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
+ pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
+ pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
+ pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
+
+ /* Digest padding */
+ HashCore(pad, 0, pad.Length);
+
+ /* Store digest */
+ SHAUtils.QuadWordToBigEndian(hash, _stateSHA384, 6);
+
+ return hash;
+ }
+
+ private static readonly ulong[] _K = {
+ 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc,
+ 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,
+ 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2,
+ 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694,
+ 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
+ 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5,
+ 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,
+ 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70,
+ 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df,
+ 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,
+ 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30,
+ 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,
+ 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8,
+ 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3,
+ 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,
+ 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b,
+ 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,
+ 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b,
+ 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c,
+ 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817,
+ };
+
+ private static unsafe void SHATransform(ulong* expandedBuffer, ulong* state, byte* block)
+ {
+ ulong a, b, c, d, e, f, g, h;
+ ulong aa, bb, cc, dd, ee, ff, hh, gg;
+ ulong T1;
+
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+ e = state[4];
+ f = state[5];
+ g = state[6];
+ h = state[7];
+
+ // fill in the first 16 blocks of W.
+ SHAUtils.QuadWordFromBigEndian(expandedBuffer, 16, block);
+ SHA384Expand(expandedBuffer);
+
+ /* Apply the SHA384 compression function */
+ // We are trying to be smart here and avoid as many copies as we can
+ // The perf gain with this method over the straightforward modify and shift
+ // forward is >= 20%, so it's worth the pain
+ for (int j = 0; j < 80;)
+ {
+ T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
+ ee = d + T1;
+ aa = T1 + Sigma_0(a) + Maj(a, b, c);
+ j++;
+
+ T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
+ ff = c + T1;
+ bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
+ j++;
+
+ T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
+ gg = b + T1;
+ cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
+ j++;
+
+ T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
+ hh = a + T1;
+ dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
+ j++;
+
+ T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
+ h = aa + T1;
+ d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
+ j++;
+
+ T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
+ g = bb + T1;
+ c = T1 + Sigma_0(d) + Maj(d, dd, cc);
+ j++;
+
+ T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
+ f = cc + T1;
+ b = T1 + Sigma_0(c) + Maj(c, d, dd);
+ j++;
+
+ T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
+ e = dd + T1;
+ a = T1 + Sigma_0(b) + Maj(b, c, d);
+ j++;
+ }
+
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+ state[4] += e;
+ state[5] += f;
+ state[6] += g;
+ state[7] += h;
+ }
+
+ private static ulong RotateRight(ulong x, int n)
+ {
+ return (((x) >> (n)) | ((x) << (64 - (n))));
+ }
+
+ private static ulong Ch(ulong x, ulong y, ulong z)
+ {
+ return ((x & y) ^ ((x ^ 0xffffffffffffffff) & z));
+ }
+
+ private static ulong Maj(ulong x, ulong y, ulong z)
+ {
+ return ((x & y) ^ (x & z) ^ (y & z));
+ }
+
+ private static ulong Sigma_0(ulong x)
+ {
+ return (RotateRight(x, 28) ^ RotateRight(x, 34) ^ RotateRight(x, 39));
+ }
+
+ private static ulong Sigma_1(ulong x)
+ {
+ return (RotateRight(x, 14) ^ RotateRight(x, 18) ^ RotateRight(x, 41));
+ }
+
+ private static ulong sigma_0(ulong x)
+ {
+ return (RotateRight(x, 1) ^ RotateRight(x, 8) ^ (x >> 7));
+ }
+
+ private static ulong sigma_1(ulong x)
+ {
+ return (RotateRight(x, 19) ^ RotateRight(x, 61) ^ (x >> 6));
+ }
+
+ /* This function creates W_16,...,W_79 according to the formula
+ W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
+ */
+ private static unsafe void SHA384Expand(ulong* x)
+ {
+ for (int i = 16; i < 80; i++)
+ {
+ x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
+ }
+ }
+ }
+
+ // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
+ private class SHA512ManagedImplementation : SHAManagedImplementationBase
+ {
+ private byte[] _buffer;
+ private ulong _count; // Number of bytes in the hashed message
+ private ulong[] _stateSHA512;
+ private ulong[] _W;
+
+ public SHA512ManagedImplementation()
+ {
+ _stateSHA512 = new ulong[8];
+ _buffer = new byte[128];
+ _W = new ulong[80];
+
+ InitializeState();
+ }
+
+ public override void Initialize()
+ {
+ InitializeState();
+
+ // Zeroize potentially sensitive information.
+ Array.Clear(_buffer, 0, _buffer.Length);
+ Array.Clear(_W, 0, _W.Length);
+ }
+
+ private void InitializeState()
+ {
+ _count = 0;
+
+ _stateSHA512[0] = 0x6a09e667f3bcc908;
+ _stateSHA512[1] = 0xbb67ae8584caa73b;
+ _stateSHA512[2] = 0x3c6ef372fe94f82b;
+ _stateSHA512[3] = 0xa54ff53a5f1d36f1;
+ _stateSHA512[4] = 0x510e527fade682d1;
+ _stateSHA512[5] = 0x9b05688c2b3e6c1f;
+ _stateSHA512[6] = 0x1f83d9abfb41bd6b;
+ _stateSHA512[7] = 0x5be0cd19137e2179;
+ }
+
+ /* SHA512 block update operation. Continues an SHA message-digest
+ operation, processing another message block, and updating the
+ context.
+ */
+ public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
+ {
+ int bufferLen;
+ int partInLen = cbSize;
+ int partInBase = ibStart;
+
+ /* Compute length of buffer */
+ bufferLen = (int)(_count & 0x7f);
+
+ /* Update number of bytes */
+ _count += (ulong)partInLen;
+
+ fixed (ulong* stateSHA512 = _stateSHA512)
+ {
+ fixed (byte* buffer = _buffer)
+ {
+ fixed (ulong* expandedBuffer = _W)
+ {
+ if ((bufferLen > 0) && (bufferLen + partInLen >= 128))
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 128 - bufferLen);
+ partInBase += (128 - bufferLen);
+ partInLen -= (128 - bufferLen);
+ SHATransform(expandedBuffer, stateSHA512, buffer);
+ bufferLen = 0;
+ }
+
+ /* Copy input to temporary buffer and hash */
+ while (partInLen >= 128)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 128);
+ partInBase += 128;
+ partInLen -= 128;
+ SHATransform(expandedBuffer, stateSHA512, buffer);
+ }
+
+ if (partInLen > 0)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
+ }
+ }
+ }
+ }
+ }
+
+ /* SHA512 finalization. Ends an SHA512 message-digest operation, writing
+ the message digest.
+ */
+ public override byte[] HashFinal()
+ {
+ byte[] pad;
+ int padLen;
+ ulong bitCount;
+ byte[] hash = new byte[64]; // HashSizeValue = 512
+
+ /* Compute padding: 80 00 00 ... 00 00 <bit count>
+ */
+
+ padLen = 128 - (int)(_count & 0x7f);
+ if (padLen <= 16)
+ padLen += 128;
+
+ pad = new byte[padLen];
+ pad[0] = 0x80;
+
+ // Convert count to bit count
+ bitCount = _count * 8;
+
+ // If we ever have UInt128 for bitCount, then these need to be uncommented.
+ // Note that C# only looks at the low 6 bits of the shift value for ulongs,
+ // so >>0 and >>64 are equal!
+
+ //pad[padLen-16] = (byte) ((bitCount >> 120) & 0xff);
+ //pad[padLen-15] = (byte) ((bitCount >> 112) & 0xff);
+ //pad[padLen-14] = (byte) ((bitCount >> 104) & 0xff);
+ //pad[padLen-13] = (byte) ((bitCount >> 96) & 0xff);
+ //pad[padLen-12] = (byte) ((bitCount >> 88) & 0xff);
+ //pad[padLen-11] = (byte) ((bitCount >> 80) & 0xff);
+ //pad[padLen-10] = (byte) ((bitCount >> 72) & 0xff);
+ //pad[padLen-9] = (byte) ((bitCount >> 64) & 0xff);
+ pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
+ pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
+ pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
+ pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
+ pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
+ pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
+ pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
+ pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
+
+ /* Digest padding */
+ HashCore(pad, 0, pad.Length);
+
+ /* Store digest */
+ SHAUtils.QuadWordToBigEndian(hash, _stateSHA512, 8);
+
+ return hash;
+ }
+
+ private static readonly ulong[] _K = {
+ 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc,
+ 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,
+ 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2,
+ 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694,
+ 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
+ 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5,
+ 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,
+ 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70,
+ 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df,
+ 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,
+ 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30,
+ 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,
+ 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8,
+ 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3,
+ 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,
+ 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b,
+ 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,
+ 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b,
+ 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c,
+ 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817,
+ };
+
+ private static unsafe void SHATransform(ulong* expandedBuffer, ulong* state, byte* block)
+ {
+ ulong a, b, c, d, e, f, g, h;
+ ulong aa, bb, cc, dd, ee, ff, hh, gg;
+ ulong T1;
+
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+ e = state[4];
+ f = state[5];
+ g = state[6];
+ h = state[7];
+
+ // fill in the first 16 blocks of W.
+ SHAUtils.QuadWordFromBigEndian(expandedBuffer, 16, block);
+ SHA512Expand(expandedBuffer);
+
+ /* Apply the SHA512 compression function */
+ // We are trying to be smart here and avoid as many copies as we can
+ // The perf gain with this method over the straightforward modify and shift
+ // forward is >= 20%, so it's worth the pain
+ for (int j = 0; j < 80;)
+ {
+ T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
+ ee = d + T1;
+ aa = T1 + Sigma_0(a) + Maj(a, b, c);
+ j++;
+
+ T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
+ ff = c + T1;
+ bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
+ j++;
+
+ T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
+ gg = b + T1;
+ cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
+ j++;
+
+ T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
+ hh = a + T1;
+ dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
+ j++;
+
+ T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
+ h = aa + T1;
+ d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
+ j++;
+
+ T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
+ g = bb + T1;
+ c = T1 + Sigma_0(d) + Maj(d, dd, cc);
+ j++;
+
+ T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
+ f = cc + T1;
+ b = T1 + Sigma_0(c) + Maj(c, d, dd);
+ j++;
+
+ T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
+ e = dd + T1;
+ a = T1 + Sigma_0(b) + Maj(b, c, d);
+ j++;
+ }
+
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+ state[4] += e;
+ state[5] += f;
+ state[6] += g;
+ state[7] += h;
+ }
+
+ private static ulong RotateRight(ulong x, int n)
+ {
+ return (((x) >> (n)) | ((x) << (64 - (n))));
+ }
+
+ private static ulong Ch(ulong x, ulong y, ulong z)
+ {
+ return ((x & y) ^ ((x ^ 0xffffffffffffffff) & z));
+ }
+
+ private static ulong Maj(ulong x, ulong y, ulong z)
+ {
+ return ((x & y) ^ (x & z) ^ (y & z));
+ }
+
+ private static ulong Sigma_0(ulong x)
+ {
+ return (RotateRight(x, 28) ^ RotateRight(x, 34) ^ RotateRight(x, 39));
+ }
+
+ private static ulong Sigma_1(ulong x)
+ {
+ return (RotateRight(x, 14) ^ RotateRight(x, 18) ^ RotateRight(x, 41));
+ }
+
+ private static ulong sigma_0(ulong x)
+ {
+ return (RotateRight(x, 1) ^ RotateRight(x, 8) ^ (x >> 7));
+ }
+
+ private static ulong sigma_1(ulong x)
+ {
+ return (RotateRight(x, 19) ^ RotateRight(x, 61) ^ (x >> 6));
+ }
+
+ /* This function creates W_16,...,W_79 according to the formula
+ W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
+ */
+ private static unsafe void SHA512Expand(ulong* x)
+ {
+ for (int i = 16; i < 80; i++)
+ {
+ x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
+ }
+ }
+ }
+
+ // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
+ private class SHAUtils
+ {
+ // digits == number of DWORDs
+ public static unsafe void DWORDFromBigEndian(uint* x, int digits, byte* block)
+ {
+ int i;
+ int j;
+
+ for (i = 0, j = 0; i < digits; i++, j += 4)
+ x[i] = (uint)((block[j] << 24) | (block[j + 1] << 16) | (block[j + 2] << 8) | block[j + 3]);
+ }
+
+ // encodes x (DWORD) into block (unsigned char), most significant byte first.
+ // digits == number of DWORDs
+ public static void DWORDToBigEndian(byte[] block, uint[] x, int digits)
+ {
+ int i;
+ int j;
+
+ for (i = 0, j = 0; i < digits; i++, j += 4)
+ {
+ block[j] = (byte)((x[i] >> 24) & 0xff);
+ block[j + 1] = (byte)((x[i] >> 16) & 0xff);
+ block[j + 2] = (byte)((x[i] >> 8) & 0xff);
+ block[j + 3] = (byte)(x[i] & 0xff);
+ }
+ }
+
+ // digits == number of QWORDs
+ public static unsafe void QuadWordFromBigEndian(ulong* x, int digits, byte* block)
+ {
+ int i;
+ int j;
+
+ for (i = 0, j = 0; i < digits; i++, j += 8)
+ x[i] = (
+ (((ulong)block[j]) << 56) | (((ulong)block[j + 1]) << 48) |
+ (((ulong)block[j + 2]) << 40) | (((ulong)block[j + 3]) << 32) |
+ (((ulong)block[j + 4]) << 24) | (((ulong)block[j + 5]) << 16) |
+ (((ulong)block[j + 6]) << 8) | ((ulong)block[j + 7])
+ );
+ }
+
+ // encodes x (DWORD) into block (unsigned char), most significant byte first.
+ // digits = number of QWORDS
+ public static void QuadWordToBigEndian(byte[] block, ulong[] x, int digits)
+ {
+ int i;
+ int j;
+
+ for (i = 0, j = 0; i < digits; i++, j += 8)
+ {
+ block[j] = (byte)((x[i] >> 56) & 0xff);
+ block[j + 1] = (byte)((x[i] >> 48) & 0xff);
+ block[j + 2] = (byte)((x[i] >> 40) & 0xff);
+ block[j + 3] = (byte)((x[i] >> 32) & 0xff);
+ block[j + 4] = (byte)((x[i] >> 24) & 0xff);
+ block[j + 5] = (byte)((x[i] >> 16) & 0xff);
+ block[j + 6] = (byte)((x[i] >> 8) & 0xff);
+ block[j + 7] = (byte)(x[i] & 0xff);
+ }
+ }
+ }
+ }
+}
diff --git a/build-additional-rids.patch b/build-additional-rids.patch
deleted file mode 100644
index 5bfba35..0000000
--- a/build-additional-rids.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-index 4394a8b..e32d338 100644
---- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-+++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-@@ -36,12 +36,15 @@ namespace Microsoft.DotNet.Build.Tasks
- // should include the delimiter immediately before the RID, arch, or extension.
- protected string[] BadAtoms = new[] { "-x64", ".x64",
- ".tar", ".gz",
-- "-rhel.7", "-rhel.8",
-- ".rhel.7", ".rhel.8",
-- "-centos.7", "-centos.8",
-- ".centos.7", ".centos.8",
-+ "-rhel.7", "-rhel.8", "-rhel.9",
-+ ".rhel.7", ".rhel.8", ".rhel.9",
-+ "-centos.7", "-centos.8", "-centos.9",
-+ ".centos.7", ".centos.8", ".centos.9",
- ".fedora.30", "-fedora.30",
- ".fedora.31", "-fedora.31",
-+ ".fedora.32", "-fedora.32",
-+ ".fedora.33", "-fedora.33",
-+ ".fedora.34", "-fedora.34",
- "-linux", ".linux",
- "-osx", ".osx",
- "-OSX", ".OSX",
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index fbaea55..c250937 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -91,10 +91,8 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git checkout "${tag}"
git submodule update --init --recursive
clean_dotnet_cache
- sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/runtime.common.props
# FIXME remove contineuonprebuilterror
- patch -p1 -i ../../build-additional-rids.patch
- ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true
+ ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true
./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
popd
popd
@@ -113,8 +111,23 @@ pushd "${tarball_name}"
# not-very-useful artifacts to reduce tarball size
rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
-rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
+rm -r src/NuGet.Client.*/test/EndToEnd
find src/runtime.*/ -depth -name tests -print0 | xargs -0 rm -r
+rm -r src/runtime.*/src/mono/
+rm -r src/Humanizer.*/samples/
+
+# FIXME delete when upstream has a new release with this file fixed
+if ! grep "RSA Data Security" src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/SHAHashProvider.Browser.cs; then
+ echo "SHAHashProvider.Browser.cs has been fixed upstream. Please fix build-dotnet-tarball"
+ exit 1
+fi
+# Delete the bad source
+rm src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/SHAHashProvider.Browser.cs
+# Delete the patch that modifies the bad source
+rm patches/runtime/0001-Use-substitute-SHA-1-implementation-in-wasm-44982.patch
+# Add pre-patched copy
+cp ../SHAHashProvider.Browser.cs src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/
+
popd
tar czf "${tarball_name}.tar.gz" "${tarball_name}"
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 8305ab1..9aad30e 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -14,23 +14,23 @@
%global __provides_exclude ^(%{privlibs})\\.so
%global __requires_exclude ^(%{privlibs})\\.so
-# Filter flags not supported by clang
-# -fstack-clash-protection
-# -specs=
-%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
-%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-
-%global host_version 5.0.0-preview.8.20407.11
-%global runtime_version 5.0.0-preview.8.20407.11
-%global aspnetcore_runtime_version 5.0.0-preview.8.20414.8
-%global sdk_version 5.0.100-preview.8.20417.9
-%global templates_version 5.0.0-preview.8.20417.9
+# LTO triggers a compilation error for a source level issue. Given that LTO should not
+# change the validity of any given source and the nature of the error (undefined enum), I
+# suspect a generator program is mis-behaving in some way. This needs further debugging,
+# until that's done, disable LTO. This has to happen before setting the flags below.
+%define _lto_cflags %{nil}
+
+%global host_version 5.0.0
+%global runtime_version 5.0.0
+%global aspnetcore_runtime_version 5.0.0
+%global sdk_version 5.0.100
+%global templates_version 5.0.0
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
-%global host_rpm_version 5.0.0
-%global aspnetcore_runtime_rpm_version 5.0.0
-%global runtime_rpm_version 5.0.0
-%global sdk_rpm_version 5.0.100
+%global host_rpm_version %{host_version}
+%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
+%global runtime_rpm_version %{runtime_version}
+%global sdk_rpm_version %{sdk_version}
# upstream can update releases without revving the SDK version so these don't always match
%global src_version %{sdk_version}
@@ -52,44 +52,36 @@
%global runtime_arch arm64
%endif
-%if 0%{?fedora}
-%global runtime_id fedora.%{fedora}-%{runtime_arch}
-%else
-%if 0%{?centos}
-%global runtime_id centos.%{centos}-%{runtime_arch}
-%else
-%global runtime_id rhel.%{rhel}-%{runtime_arch}
-%endif
-%endif
+%{!?runtime_id:%global runtime_id %(. /etc/os-release ; echo "${ID}.${VERSION_ID%%.*}")-%{runtime_arch}}
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 0.3.preview8%{?dist}
+Release: 1%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-SDK.tar.gz
+Source0: dotnet-v%{src_version}-SDK-337413b.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
-# https://github.com/dotnet/runtime/pull/39203
-# Do not strip debuginfo from (native/unmanaged) binaries
-Patch100: runtime-dont-strip.patch
+Patch1: source-build-runtime-fixup-linker-order.patch
+
# https://github.com/dotnet/runtime/pull/42094
# Fix linker order when linking with --as-needed
-Patch101: runtime-linker-order.patch
-# https://github.com/dotnet/runtime/pull/39191
-# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
-Patch102: runtime-flags-support.patch
+Patch100: runtime-linker-order.patch
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
-# ExclusiveArch: aarch64 x86_64
+%if 0%{?fedora} > 32 || 0%{?rhel} > 8
+ExclusiveArch: aarch64 x86_64
+%else
ExclusiveArch: x86_64
+%endif
+
BuildRequires: clang
BuildRequires: cmake
@@ -318,7 +310,7 @@ These are not meant for general use.
%prep
-%setup -q -n dotnet-v%{src_version}-SDK
+%setup -q -n dotnet-v%{src_version}-SDK-337413b
%if %{without bootstrap}
# Remove all prebuilts
@@ -344,24 +336,16 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/core
# Disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
+%patch1 -p1
+
pushd src/runtime.*
%patch100 -p1
-%patch101 -p1
-%patch102 -p1
popd
pushd src/sdk.*
%patch500 -p1
popd
-# If CLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE is misisng, add it back
-grep CLR_CMAKE_USE_SYSTEM_LIBUNWIND repos/runtime.common.props || \
- sed -i 's|\$(BuildArguments) </BuildArguments>|$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments>|' repos/runtime.common.props
-
-%if %{use_bundled_libunwind}
-sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/runtime.common.props
-%endif
-
%ifnarch x86_64
mkdir -p artifacts/obj/%{runtime_arch}/Release
cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
@@ -380,9 +364,37 @@ cat /etc/os-release
cp -a %{_libdir}/dotnet previously-built-dotnet
%endif
-export EXTRA_CFLAGS="%{dotnet_cflags}"
-export EXTRA_CXXFLAGS="%{dotnet_cflags}"
-export EXTRA_LDFLAGS="%{dotnet_ldflags}"
+%if 0%{?fedora} > 32 || 0%{?rhel} > 8
+# Setting this macro ensures that only clang supported options will be
+# added to ldflags and cflags.
+%global toolchain clang
+%set_build_flags
+%else
+# Filter flags not supported by clang
+%global dotnet_cflags %(echo %optflags | sed -re 's/-specs=[^ ]*//g')
+%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
+export CFLAGS="%{dotnet_cflags}"
+export CXXFLAGS="%{dotnet_cflags}"
+export LDFLAGS="%{dotnet_ldflags}"
+%endif
+
+%ifarch aarch64
+# -mbranch-protection=standard breaks unwinding in CoreCLR through libunwind
+CFLAGS=$(echo $CFLAGS | sed -e 's/-mbranch-protection=standard //')
+CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-mbranch-protection=standard //')
+%endif
+
+# -fstack-clash-protection breaks CoreCLR
+CFLAGS=$(echo $CFLAGS | sed -e 's/-fstack-clash-protection//' )
+CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-fstack-clash-protection//' )
+
+export EXTRA_CFLAGS="$CFLAGS"
+export EXTRA_CXXFLAGS="$CXXFLAGS"
+export EXTRA_LDFLAGS="$LDFLAGS"
+
+unset CFLAGS
+unset CXXFLAGS
+unset LDFLAGS
#%%if %%{without bootstrap}
# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
@@ -400,6 +412,11 @@ VERBOSE=1 ./build.sh \
/p:LogVerbosity=n \
/p:MinimalConsoleLogOutput=false \
/p:ContinueOnPrebuiltBaselineError=true \
+%if %{use_bundled_libunwind}
+ /p:UseSystemLibunwind=false \
+%else
+ /p:UseSystemLibunwind=true \
+%endif
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
@@ -415,12 +432,14 @@ tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtim
-C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
# Fix executable permissions on files
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.h' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
-find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.xml' -exec chmod -x {} \;
chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/apphost
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
@@ -509,6 +528,15 @@ echo "Testing build results for debug symbols..."
%changelog
+* Fri Dec 04 13:22:13 EST 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-1
+- Update to .NET Core Runtime 5.0.0 and SDK 5.0.100
+
+* Thu Dec 03 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.4.20201202git337413b
+- Update to latest 5.0 pre-GA commit
+
+* Tue Nov 24 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.4.20201123gitdee899c
+- Update to 5.0 pre-GA commit
+
* Mon Sep 14 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.3.preview8
- Update to Preview 8
diff --git a/runtime-dont-strip.patch b/runtime-dont-strip.patch
deleted file mode 100644
index 694face..0000000
--- a/runtime-dont-strip.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Do not strip native/unmanaged symbols from binaries
-
-This is a hack. It rips out the calls to strip directly.
-
-The correct/upstreamable fix is to add a configure/build option to
-keep symbols for some builds, such as those needed by upstream.
-
-diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
-index 8b73581ed14..7697908425e 100644
---- a/eng/native/functions.cmake
-+++ b/eng/native/functions.cmake
-@@ -282,7 +282,7 @@ function(target_precompile_header)
- endif(MSVC)
- endfunction()
-
--function(strip_symbols targetName outputFilename)
-+function(strip_symbols_renamed targetName outputFilename)
- if (CLR_CMAKE_HOST_UNIX)
- set(strip_source_file $<TARGET_FILE:${targetName}>)
-
-@@ -336,8 +336,8 @@ function(strip_symbols targetName outputFilename)
- endfunction()
-
- function(install_with_stripped_symbols targetName kind destination)
-- strip_symbols(${targetName} symbol_file)
-- install_symbols(${symbol_file} ${destination})
-+ # strip_symbols_renamed(${targetName} symbol_file)
-+ # install_symbols(${symbol_file} ${destination})
- if ("${kind}" STREQUAL "TARGETS")
- set(install_source ${targetName})
- elseif("${kind}" STREQUAL "PROGRAMS")
-@@ -375,13 +375,13 @@ function(install_clr)
- foreach(targetName ${INSTALL_CLR_TARGETS})
- list(FIND CLR_CROSS_COMPONENTS_LIST ${targetName} INDEX)
- if (NOT DEFINED CLR_CROSS_COMPONENTS_LIST OR NOT ${INDEX} EQUAL -1)
-- strip_symbols(${targetName} symbol_file)
-+ # strip_symbols_renamed(${targetName} symbol_file)
-
- foreach(destination ${destinations})
- # We don't need to install the export libraries for our DLLs
- # since they won't be directly linked against.
- install(PROGRAMS $<TARGET_FILE:${targetName}> DESTINATION ${destination})
-- install_symbols(${symbol_file} ${destination})
-+ # install_symbols(${symbol_file} ${destination})
-
- if(CLR_CMAKE_PGO_INSTRUMENT)
- if(WIN32)
diff --git a/runtime-flags-support.patch b/runtime-flags-support.patch
deleted file mode 100644
index 921e483..0000000
--- a/runtime-flags-support.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh
-index b976f5fdc6c..853580b1c7a 100755
---- a/eng/native/build-commons.sh
-+++ b/eng/native/build-commons.sh
-@@ -163,6 +163,14 @@ EOF
- return
- fi
-
-+ SAVED_CFLAGS="${CFLAGS}"
-+ SAVED_CXXFLAGS="${CXXFLAGS}"
-+ SAVED_LDFLAGS="${LDFLAGS}"
-+
-+ export CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}"
-+ export CXXFLAGS="${CXXFLAGS} ${EXTRA_CXXFLAGS}"
-+ export LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}"
-+
- if [[ "$__StaticAnalyzer" == 1 ]]; then
- pushd "$intermediatesDir"
-
-@@ -181,6 +189,10 @@ EOF
- $cmake_command --build "$intermediatesDir" --target install -- -j "$__NumProc"
- fi
-
-+ CFLAGS="${SAVED_CFLAGS}"
-+ CXXFLAGS="${SAVED_CXXFLAGS}"
-+ LDFLAGS="${SAVED_LDFLAGS}"
-+
- local exit_code="$?"
- if [[ "$exit_code" != 0 ]]; then
- echo "${__ErrMsgPrefix}Failed to build \"$message\"."
diff --git a/source-build-runtime-fixup-linker-order.patch b/source-build-runtime-fixup-linker-order.patch
new file mode 100644
index 0000000..5a74b5d
--- /dev/null
+++ b/source-build-runtime-fixup-linker-order.patch
@@ -0,0 +1,13 @@
+--- a/patches/runtime/0014-Fix-singlefilehost-build-in-non-portable-mode-42415.patch
++++ b/patches/runtime/0014-Fix-singlefilehost-build-in-non-portable-mode-42415.patch
+@@ -45,8 +45,8 @@
+ # These options are used to force every object to be included even if it's unused.
+ set(START_WHOLE_ARCHIVE -Wl,--whole-archive)
+ @@ -212,3 +217,10 @@ target_link_libraries(singlefilehost
+- ${NATIVE_LIBS}
+- ${END_WHOLE_ARCHIVE}
++ ${NATIVE_LIBS_EXTRA}
++
+ )
+ +
+ +if(NOT FEATURE_DISTRO_AGNOSTIC_SSL)
diff --git a/tests/tests.yml b/tests/tests.yml
index f3825cf..d63f183 100644
--- a/tests/tests.yml
+++ b/tests/tests.yml
@@ -9,6 +9,7 @@
repositories:
- repo: "https://github.com/redhat-developer/dotnet-regular-tests.git"
dest: "dotnet-regular-tests"
+ version: main
tests:
- download_test_runner:
dir: ./
@@ -18,17 +19,15 @@
run: ./turkey --version
- regular:
dir: ./
- run: ./turkey -l={{ remote_artifacts }} -s=$(pwd)/nuget-prerelease dotnet-regular-tests
+ run: ./turkey -l={{ remote_artifacts }} dotnet-regular-tests
required_packages:
- babeltrace
- bash-completion
- binutils
- expect
- - git
- jq
- lldb
- lttng-tools
- - make
- npm
- python3
- strace
commit 260d2eab645885b86643a9c6da358d3b38941f56
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Sep 14 11:29:00 2020 -0400
Update to Preview 8
diff --git a/build-additional-rids.patch b/build-additional-rids.patch
new file mode 100644
index 0000000..5bfba35
--- /dev/null
+++ b/build-additional-rids.patch
@@ -0,0 +1,24 @@
+diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
+index 4394a8b..e32d338 100644
+--- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
++++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
+@@ -36,12 +36,15 @@ namespace Microsoft.DotNet.Build.Tasks
+ // should include the delimiter immediately before the RID, arch, or extension.
+ protected string[] BadAtoms = new[] { "-x64", ".x64",
+ ".tar", ".gz",
+- "-rhel.7", "-rhel.8",
+- ".rhel.7", ".rhel.8",
+- "-centos.7", "-centos.8",
+- ".centos.7", ".centos.8",
++ "-rhel.7", "-rhel.8", "-rhel.9",
++ ".rhel.7", ".rhel.8", ".rhel.9",
++ "-centos.7", "-centos.8", "-centos.9",
++ ".centos.7", ".centos.8", ".centos.9",
+ ".fedora.30", "-fedora.30",
+ ".fedora.31", "-fedora.31",
++ ".fedora.32", "-fedora.32",
++ ".fedora.33", "-fedora.33",
++ ".fedora.34", "-fedora.34",
+ "-linux", ".linux",
+ "-osx", ".osx",
+ "-OSX", ".OSX",
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index f32d847..fbaea55 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -93,6 +93,7 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
clean_dotnet_cache
sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/runtime.common.props
# FIXME remove contineuonprebuilterror
+ patch -p1 -i ../../build-additional-rids.patch
./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true
./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
popd
@@ -110,10 +111,8 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
-rm -rf .dotnet
-find -type f -iname '*.tar.gz' -delete
-rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*
-find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r
+rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
+find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
find src/runtime.*/ -depth -name tests -print0 | xargs -0 rm -r
popd
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 49221a4..8305ab1 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,11 +20,11 @@
%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-%global host_version 5.0.0-preview.4.20251.6
-%global runtime_version 5.0.0-preview.4.20251.6
-%global aspnetcore_runtime_version 5.0.0-preview.4.20257.10
-%global sdk_version 5.0.100-preview.4.20161.13
-%global templates_version 5.0.0-preview.4.20161.13
+%global host_version 5.0.0-preview.8.20407.11
+%global runtime_version 5.0.0-preview.8.20407.11
+%global aspnetcore_runtime_version 5.0.0-preview.8.20414.8
+%global sdk_version 5.0.100-preview.8.20417.9
+%global templates_version 5.0.0-preview.8.20417.9
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version 5.0.0
@@ -33,7 +33,7 @@
%global sdk_rpm_version 5.0.100
# upstream can update releases without revving the SDK version so these don't always match
-%global src_version %{sdk_rpm_version}
+%global src_version %{sdk_version}
%if 0%{?fedora} || 0%{?rhel} < 8
%global use_bundled_libunwind 0
@@ -64,25 +64,24 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 0.2.preview4%{?dist}
-Summary: .NET Core Runtime and SDK
+Release: 0.3.preview8%{?dist}
+Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-preview4-SDK.tar.gz
+Source0: dotnet-v%{src_version}-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
-# dotnet/runtime PR 39044
-Patch100: runtime-39044-cmake-downgrade.patch
-
-# TODO: upstream this patch
+# https://github.com/dotnet/runtime/pull/39203
# Do not strip debuginfo from (native/unmanaged) binaries
-Patch101: runtime-dont-strip.patch
-
-# TODO: upstream this patch
+Patch100: runtime-dont-strip.patch
+# https://github.com/dotnet/runtime/pull/42094
+# Fix linker order when linking with --as-needed
+Patch101: runtime-linker-order.patch
+# https://github.com/dotnet/runtime/pull/39191
# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
Patch102: runtime-flags-support.patch
@@ -123,13 +122,13 @@ BuildRequires: tar
BuildRequires: zlib-devel
%description
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, macOS and Windows.
It particularly focuses on creating console applications, web
applications and micro-services.
-.NET Core contains a runtime conforming to .NET Standards a set of
+.NET contains a runtime conforming to .NET Standards a set of
framework libraries, an SDK containing compilers and a 'dotnet'
application to drive everything.
@@ -137,18 +136,18 @@ application to drive everything.
%package -n dotnet
Version: %{sdk_rpm_version}
-Summary: .NET Core CLI tools and runtime
+Summary: .NET CLI tools and runtime
Requires: dotnet-sdk-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
%description -n dotnet
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, macOS and Windows.
It particularly focuses on creating console applications, web
applications and micro-services.
-.NET Core contains a runtime conforming to .NET Standards a set of
+.NET contains a runtime conforming to .NET Standards a set of
framework libraries, an SDK containing compilers and a 'dotnet'
application to drive everything.
@@ -159,10 +158,10 @@ Version: %{host_rpm_version}
Summary: .NET command line launcher
%description -n dotnet-host
-The .NET Core host is a command line program that runs a standalone
-.NET core application or launches the SDK.
+The .NET host is a command line program that runs a standalone
+.NET application or launches the SDK.
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, Mac and Windows.
It particularly focuses on creating console applications, web
@@ -172,17 +171,17 @@ applications and micro-services.
%package -n dotnet-hostfxr-5.0
Version: %{host_rpm_version}
-Summary: .NET Core command line host resolver
+Summary: .NET command line host resolver
# Theoretically any version of the host should work. But lets aim for the one
-# provided by this package, or from a newer version of .NET Core
+# provided by this package, or from a newer version of .NET
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
%description -n dotnet-hostfxr-5.0
-The .NET Core host resolver contains the logic to resolve and select
-the right version of the .NET Core SDK or runtime to use.
+The .NET host resolver contains the logic to resolve and select
+the right version of the .NET SDK or runtime to use.
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, Mac and Windows.
It particularly focuses on creating console applications, web
@@ -192,7 +191,7 @@ applications and micro-services.
%package -n dotnet-runtime-5.0
Version: %{runtime_rpm_version}
-Summary: NET Core 5.0 runtime
+Summary: NET 5.0 runtime
Requires: dotnet-hostfxr-5.0%{?_isa} >= %{host_rpm_version}-%{release}
@@ -204,11 +203,11 @@ Provides: bundled(libunwind) = 1.3
%endif
%description -n dotnet-runtime-5.0
-The .NET Core runtime contains everything needed to run .NET Core applications.
+The .NET runtime contains everything needed to run .NET applications.
It includes a high performance Virtual Machine as well as the framework
-libraries used by .NET Core applications.
+libraries used by .NET applications.
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, Mac and Windows.
It particularly focuses on creating console applications, web
@@ -223,9 +222,9 @@ Summary: ASP.NET Core 5.0 runtime
Requires: dotnet-runtime-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
%description -n aspnetcore-runtime-5.0
-The ASP.NET Core runtime contains everything needed to run .NET Core
+The ASP.NET Core runtime contains everything needed to run .NET
web applications. It includes a high performance Virtual Machine as
-well as the framework libraries used by .NET Core applications.
+well as the framework libraries used by .NET applications.
ASP.NET Core is a fast, lightweight and modular platform for creating
cross platform web applications that work on Linux, Mac and Windows.
@@ -237,17 +236,17 @@ applications and micro-services.
%package -n dotnet-templates-5.0
Version: %{sdk_rpm_version}
-Summary: .NET Core 5.0 templates
+Summary: .NET 5.0 templates
# Theoretically any version of the host should work. But lets aim for the one
-# provided by this package, or from a newer version of .NET Core
+# provided by this package, or from a newer version of .NET
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
%description -n dotnet-templates-5.0
-This package contains templates used by the .NET Core SDK.
+This package contains templates used by the .NET SDK.
-ASP.NET Core is a fast, lightweight and modular platform for creating
-cross platform web applications that work on Linux, Mac and Windows.
+.NET is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, Mac and Windows.
It particularly focuses on creating console applications, web
applications and micro-services.
@@ -256,7 +255,7 @@ applications and micro-services.
%package -n dotnet-sdk-5.0
Version: %{sdk_rpm_version}
-Summary: .NET Core 5.0 Software Development Kit
+Summary: .NET 5.0 Software Development Kit
Provides: bundled(js-jquery)
Provides: bundled(npm)
@@ -272,10 +271,10 @@ Requires: netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{r
Requires: dotnet-templates-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
%description -n dotnet-sdk-5.0
-The .NET Core SDK is a collection of command line applications to
-create, build, publish and run .NET Core applications.
+The .NET SDK is a collection of command line applications to
+create, build, publish and run .NET applications.
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, Mac and Windows.
It particularly focuses on creating console applications, web
@@ -293,7 +292,7 @@ Requires: dotnet-host%{?_isa}
%description -n %{1}
This package provides a targeting pack for %{3} %{4}
that allows developers to compile against and target %{3} %{4}
-applications using the .NET Core SDK.
+applications using the .NET SDK.
%files -n %{1}
%dir %{_libdir}/dotnet/packs
@@ -309,17 +308,17 @@ applications using the .NET Core SDK.
%package -n dotnet-sdk-5.0-source-built-artifacts
Version: %{sdk_rpm_version}
-Summary: Internal package for building .NET Core 5.0 Software Development Kit
+Summary: Internal package for building .NET 5.0 Software Development Kit
%description -n dotnet-sdk-5.0-source-built-artifacts
-The .NET Core source-built archive is a collection of packages needed
-to build the .NET Core SDK itself.
+The .NET source-built archive is a collection of packages needed
+to build the .NET SDK itself.
These are not meant for general use.
%prep
-%setup -q -n dotnet-v%{src_version}-preview4-SDK
+%setup -q -n dotnet-v%{src_version}-SDK
%if %{without bootstrap}
# Remove all prebuilts
@@ -383,7 +382,7 @@ cp -a %{_libdir}/dotnet previously-built-dotnet
export EXTRA_CFLAGS="%{dotnet_cflags}"
export EXTRA_CXXFLAGS="%{dotnet_cflags}"
-export EXTRA_LDFLAGS="%%{dotnet_ldflags}"
+export EXTRA_LDFLAGS="%{dotnet_ldflags}"
#%%if %%{without bootstrap}
# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
@@ -409,7 +408,7 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
ls artifacts/%{runtime_arch}/Release
-tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_rpm_version}-preview.4.20161.13-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
+tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
# Install managed symbols
tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
@@ -421,10 +420,12 @@ find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/apphost
-chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/nethost.h
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/singlefilehost
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
@@ -508,6 +509,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Mon Sep 14 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.3.preview8
+- Update to Preview 8
+
* Fri Jul 10 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.2.preview4
- Fix building with custom CFLAGS/CXXFLAGS/LDFLAGS
- Clean up patches
diff --git a/runtime-39044-cmake-downgrade.patch b/runtime-39044-cmake-downgrade.patch
deleted file mode 100644
index 71938d0..0000000
--- a/runtime-39044-cmake-downgrade.patch
+++ /dev/null
@@ -1,1158 +0,0 @@
-diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
-index 534f1d19de6..50d81842274 100644
---- a/eng/common/cross/toolchain.cmake
-+++ b/eng/common/cross/toolchain.cmake
-@@ -83,15 +83,26 @@ endif()
-
- # Specify link flags
-
-+function(add_toolchain_linker_flag Flag)
-+ set(Config "${ARGV1}")
-+ set(CONFIG_SUFFIX "")
-+ if (NOT Config STREQUAL "")
-+ set(CONFIG_SUFFIX "_${Config}")
-+ endif()
-+ set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
-+ set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
-+endfunction()
-+
-+
- if(TARGET_ARCH_NAME STREQUAL "armel")
- if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
-- add_link_options("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
-- add_link_options("-L${CROSS_ROOTFS}/lib")
-- add_link_options("-L${CROSS_ROOTFS}/usr/lib")
-- add_link_options("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
-+ add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
-+ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
-+ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib")
-+ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
- endif()
- elseif(TARGET_ARCH_NAME STREQUAL "x86")
-- add_link_options(-m32)
-+ add_toolchain_linker_flag(-m32)
- endif()
-
- # Specify compile options
-diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh
-index a1a975ce177..9a0c296ff66 100755
---- a/eng/native/build-commons.sh
-+++ b/eng/native/build-commons.sh
-@@ -51,12 +51,9 @@ check_prereqs()
- # Check presence of CMake on the path
- command -v cmake 2>/dev/null || { echo >&2 "Please install cmake before running this script"; exit 1; }
-
-- function version { echo "$@" | awk -F. '{ printf("%d%02d%02d\n", $1,$2,$3); }'; }
--
-- local cmake_version="$(cmake --version | awk '/^cmake version [0-9]+\.[0-9]+\.[0-9]+$/ {print $3}')"
--
-- if [[ "$(version "$cmake_version")" -lt "$(version 3.14.2)" ]]; then
-- echo "Please install CMake 3.14.2 or newer from http://www.cmake.org/download/ or https://apt.kitware.com and ensure it is on your path."; exit 1;
-+ if [[ "$__HostOS" == "OSX" ]]; then
-+ # Check presence of pkg-config on the path
-+ command -v pkg-config 2>/dev/null || { echo >&2 "Please install pkg-config before running this script, see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/..."; exit 1; }
- fi
-
- if [[ "$__UseNinja" == 1 ]]; then
-@@ -156,8 +153,8 @@ build_native()
- cmake_command="emcmake $cmake_command"
- fi
-
-- echo "Executing $cmake_command --build \"$intermediatesDir\" --target install -j $__NumProc"
-- $cmake_command --build "$intermediatesDir" --target install -j "$__NumProc"
-+ echo "Executing $cmake_command --build \"$intermediatesDir\" --target install -- -j $__NumProc"
-+ $cmake_command --build "$intermediatesDir" --target install -- -j "$__NumProc"
- fi
-
- local exit_code="$?"
-diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake
-index 2937916ced9..07fd6f75f6f 100644
---- a/eng/native/configurecompiler.cmake
-+++ b/eng/native/configurecompiler.cmake
-@@ -8,8 +8,6 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
- set(CMAKE_CXX_STANDARD 11)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
--cmake_policy(SET CMP0083 NEW)
--
- include(CheckCXXCompilerFlag)
-
- # "configureoptimization.cmake" must be included after CLR_CMAKE_HOST_UNIX has been set.
-@@ -40,11 +38,18 @@ set(CMAKE_CXX_FLAGS_CHECKED "")
- set(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
- set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "")
-
-+set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "")
-+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "")
-+set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "")
-+set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
-+set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
-+set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "")
-+
- add_compile_definitions("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1>")
- add_compile_definitions("$<$<OR:$<CONFIG:RELEASE>,$<CONFIG:RELWITHDEBINFO>>:NDEBUG;URTBLDENV_FRIENDLY=Retail>")
-
- if (MSVC)
-- add_link_options(/GUARD:CF)
-+ add_linker_flag(/GUARD:CF)
-
- # Linker flags
- #
-@@ -57,48 +62,51 @@ if (MSVC)
- endif ()
-
- #Do not create Side-by-Side Assembly Manifest
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/MANIFEST:NO>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO")
- # can handle addresses larger than 2 gigabytes
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/LARGEADDRESSAWARE>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LARGEADDRESSAWARE")
- #Compatible with Data Execution Prevention
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/NXCOMPAT>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NXCOMPAT")
- #Use address space layout randomization
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/DYNAMICBASE>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DYNAMICBASE")
- #shrink pdb size
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/PDBCOMPRESS>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /PDBCOMPRESS")
-
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/DEBUG>)
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/IGNORE:4197,4013,4254,4070,4221>)
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/SUBSYSTEM:WINDOWS,${WINDOWS_SUBSYSTEM_VERSION}>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG")
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /IGNORE:4197,4013,4254,4070,4221")
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS,${WINDOWS_SUBSYSTEM_VERSION}")
-
- set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
-
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/DEBUG>)
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/PDBCOMPRESS>)
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/STACK:1572864>)
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /PDBCOMPRESS")
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1572864")
-
- # Debug build specific flags
-- add_link_options($<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>>:/NOVCFEATURE>)
-+ set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NOVCFEATURE")
-+ set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "${CMAKE_SHARED_LINKER_FLAGS_CHECKED} /NOVCFEATURE")
-
- # Checked build specific flags
-- add_link_options($<$<CONFIG:CHECKED>:/INCREMENTAL:NO>) # prevent "warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification"
-- add_link_options($<$<CONFIG:CHECKED>:/OPT:REF>)
-- add_link_options($<$<CONFIG:CHECKED>:/OPT:NOICF>)
-+ add_linker_flag(/INCREMENTAL:NO CHECKED) # prevent "warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification"
-+ add_linker_flag(/OPT:REF CHECKED)
-+ add_linker_flag(/OPT:NOICF CHECKED)
-
- # Release build specific flags
-- add_link_options($<$<CONFIG:RELEASE>:/LTCG>)
-- add_link_options($<$<CONFIG:RELEASE>:/OPT:REF>)
-- add_link_options($<$<CONFIG:RELEASE>:/OPT:ICF>)
-+ add_linker_flag(/LTCG RELEASE)
-+ add_linker_flag(/OPT:REF RELEASE)
-+ add_linker_flag(/OPT:ICF RELEASE)
-+ add_linker_flag(/INCREMENTAL:NO RELEASE)
- set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
-
- # ReleaseWithDebugInfo build specific flags
-- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/LTCG>)
-- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/OPT:REF>)
-- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/OPT:ICF>)
-+ add_linker_flag(/LTCG RELWITHDEBINFO)
-+ add_linker_flag(/OPT:REF RELWITHDEBINFO)
-+ add_linker_flag(/OPT:ICF RELWITHDEBINFO)
- set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
-
- # Force uCRT to be dynamically linked for Release build
-- add_link_options("$<$<CONFIG:RELEASE>:/NODEFAULTLIB:libucrt.lib;/DEFAULTLIB:ucrt.lib>")
-+ add_linker_flag(/NODEFAULTLIB:libucrt.lib RELEASE)
-+ add_linker_flag(/DEFAULTLIB:ucrt.lib RELEASE)
-
- elseif (CLR_CMAKE_HOST_UNIX)
- # Set the values to display when interactively configuring CMAKE_BUILD_TYPE
-@@ -157,11 +165,10 @@ elseif (CLR_CMAKE_HOST_UNIX)
-
- # -fdata-sections -ffunction-sections: each function has own section instead of one per .o file (needed for --gc-sections)
- # -O1: optimization level used instead of -O0 to avoid compile error "invalid operand for inline asm constraint"
-- add_compile_definitions("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:${CLR_SANITIZE_CXX_OPTIONS};-fdata-sections;--ffunction-sections;-O1>")
-- add_link_options($<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>>:${CLR_SANITIZE_LINK_OPTIONS}>)
--
-+ add_compile_options("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:${CLR_SANITIZE_CXX_OPTIONS};-fdata-sections;--ffunction-sections;-O1>")
-+ add_linker_flag("${CLR_SANITIZE_LINK_OPTIONS}" DEBUG CHECKED)
- # -Wl and --gc-sections: drop unused sections\functions (similar to Windows /Gy function-level-linking)
-- add_link_options("$<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>>:${CLR_SANITIZE_LINK_OPTIONS};-Wl,--gc-sections>")
-+ add_linker_flag("-Wl,--gc-sections" DEBUG CHECKED)
- endif ()
- endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
- endif(MSVC)
-@@ -173,15 +180,18 @@ endif(MSVC)
- # ./build-native.sh cmakeargs "-DCLR_ADDITIONAL_COMPILER_OPTIONS=<...>" cmakeargs "-DCLR_ADDITIONAL_LINKER_FLAGS=<...>"
- #
- if(CLR_CMAKE_HOST_UNIX)
-- add_link_options(${CLR_ADDITIONAL_LINKER_FLAGS})
-+ foreach(ADDTL_LINKER_FLAG ${CLR_ADDITIONAL_LINKER_FLAGS})
-+ add_linker_flag(${ADDTL_LINKER_FLAG})
-+ endforeach()
- endif(CLR_CMAKE_HOST_UNIX)
-
- if(CLR_CMAKE_HOST_LINUX)
- add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
-- add_link_options(-Wl,--build-id=sha1 -Wl,-z,relro,-z,now)
-+ add_linker_flag(-Wl,--build-id=sha1)
-+ add_linker_flag(-Wl,-z,relro,-z,now)
- elseif(CLR_CMAKE_HOST_FREEBSD)
- add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
-- add_link_options(LINKER:--build-id=sha1)
-+ add_linker_flag("-Wl,--build-id=sha1")
- elseif(CLR_CMAKE_HOST_SUNOS)
- set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /opt/local/include)
- set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /opt/local/lib)
-@@ -357,7 +367,7 @@ if (CLR_CMAKE_HOST_UNIX)
- if(CLR_CMAKE_HOST_OSX)
- set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=10.12)
- add_compile_options(${MACOS_VERSION_MIN_FLAGS})
-- add_link_options(${MACOS_VERSION_MIN_FLAGS})
-+ add_linker_flag(${MACOS_VERSION_MIN_FLAGS})
- endif(CLR_CMAKE_HOST_OSX)
- endif(CLR_CMAKE_HOST_UNIX)
-
-@@ -514,7 +524,7 @@ if(CLR_CMAKE_ENABLE_CODE_COVERAGE)
-
- add_compile_options(-fprofile-arcs)
- add_compile_options(-ftest-coverage)
-- add_link_options(--coverage)
-+ add_linker_flag(--coverage)
- else()
- message(FATAL_ERROR "Code coverage builds not supported on current platform")
- endif(CLR_CMAKE_HOST_UNIX)
-diff --git a/eng/native/configureplatform.cmake b/eng/native/configureplatform.cmake
-index 1c5254d8496..4a4131cb05d 100644
---- a/eng/native/configureplatform.cmake
-+++ b/eng/native/configureplatform.cmake
-@@ -1,4 +1,3 @@
--include(CheckPIESupported)
- include(${CMAKE_CURRENT_LIST_DIR}/functions.cmake)
-
- # If set, indicates that this is not an officially supported release
-@@ -363,19 +362,10 @@ if(NOT CLR_CMAKE_TARGET_EMSCRIPTEN)
- # but since we know that PIE is supported, we can safely skip this redundant check).
- #
- # The default linker on Solaris also does not support PIE.
-- if(NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_SUNOS)
-- # All code we build should be compiled as position independent
-- get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
-- if("CXX" IN_LIST languages)
-- set(CLR_PIE_LANGUAGE CXX)
-- else()
-- set(CLR_PIE_LANGUAGE C)
-- endif()
-- check_pie_supported(OUTPUT_VARIABLE PIE_SUPPORT_OUTPUT LANGUAGES ${CLR_PIE_LANGUAGE})
-- if(NOT MSVC AND NOT CMAKE_${CLR_PIE_LANGUAGE}_LINK_PIE_SUPPORTED)
-- message(WARNING "PIE is not supported at link time: ${PIE_SUPPORT_OUTPUT}.\n"
-- "PIE link options will not be passed to linker.")
-- endif()
-+ if(NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_SUNOS AND NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_HOST_TVOS AND NOT CLR_CMAKE_HOST_IOS AND NOT MSVC)
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
-+ add_compile_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-fPIE>)
-+ add_compile_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-fPIC>)
- endif()
-
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
-index b7f8f463804..f4a96cbe35e 100644
---- a/eng/native/functions.cmake
-+++ b/eng/native/functions.cmake
-@@ -123,7 +123,7 @@ function(preprocess_compile_asm)
- set(options "")
- set(oneValueArgs OUTPUT_OBJECTS)
- set(multiValueArgs ASM_FILES)
-- cmake_parse_arguments(PARSE_ARGV 0 COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}")
-+ cmake_parse_arguments(COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
-
- get_include_directories_asm(ASM_INCLUDE_DIRECTORIES)
-
-@@ -209,7 +209,7 @@ function(target_precompile_header)
- set(options "")
- set(oneValueArgs TARGET HEADER)
- set(multiValueArgs ADDITIONAL_INCLUDE_DIRECTORIES)
-- cmake_parse_arguments(PARSE_ARGV 0 PRECOMPILE_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}")
-+ cmake_parse_arguments(PRECOMPILE_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
-
- if ("${PRECOMPILE_HEADERS_TARGET}" STREQUAL "")
- message(SEND_ERROR "No target supplied to target_precompile_header.")
-@@ -321,7 +321,7 @@ endfunction()
- function(install_clr)
- set(oneValueArgs ADDITIONAL_DESTINATION)
- set(multiValueArgs TARGETS)
-- cmake_parse_arguments(PARSE_ARGV 0 INSTALL_CLR "${options}" "${oneValueArgs}" "${multiValueArgs}")
-+ cmake_parse_arguments(INSTALL_CLR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
-
- if ("${INSTALL_CLR_TARGETS}" STREQUAL "")
- message(FATAL_ERROR "At least one target must be passed to install_clr(TARGETS )")
-@@ -377,6 +377,15 @@ function(disable_pax_mprotect targetName)
- endif()
- endfunction()
-
-+if (CMAKE_VERSION VERSION_LESS "3.12")
-+ # Polyfill add_compile_definitions when it is unavailable
-+ function(add_compile_definitions)
-+ get_directory_property(DIR_COMPILE_DEFINITIONS COMPILE_DEFINITIONS)
-+ list(APPEND DIR_COMPILE_DEFINITIONS ${ARGV})
-+ set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${DIR_COMPILE_DEFINITIONS}")
-+ endfunction()
-+endif()
-+
- function(_add_executable)
- if(NOT WIN32)
- add_executable(${ARGV} ${VERSION_FILE_PATH})
-@@ -415,3 +424,16 @@ endfunction()
- function(add_executable_clr)
- _add_executable(${ARGV})
- endfunction()
-+
-+# add_linker_flag(Flag [Config1 Config2 ...])
-+function(add_linker_flag Flag)
-+ if (ARGN STREQUAL "")
-+ set("CMAKE_EXE_LINKER_FLAGS" "${CMAKE_EXE_LINKER_FLAGS} ${Flag}" PARENT_SCOPE)
-+ set("CMAKE_SHARED_LINKER_FLAGS" "${CMAKE_SHARED_LINKER_FLAGS} ${Flag}" PARENT_SCOPE)
-+ else()
-+ foreach(Config ${ARGN})
-+ set("CMAKE_EXE_LINKER_FLAGS_${Config}" "${CMAKE_EXE_LINKER_FLAGS_${Config}} ${Flag}" PARENT_SCOPE)
-+ set("CMAKE_SHARED_LINKER_FLAGS_${Config}" "${CMAKE_SHARED_LINKER_FLAGS_${Config}} ${Flag}" PARENT_SCOPE)
-+ endforeach()
-+ endif()
-+endfunction()
-diff --git a/eng/native/gen-buildsys.sh b/eng/native/gen-buildsys.sh
-index f27bb33e357..1b4c2e02c59 100755
---- a/eng/native/gen-buildsys.sh
-+++ b/eng/native/gen-buildsys.sh
-@@ -91,6 +91,9 @@ if [[ "$build_arch" == "wasm" ]]; then
- cmake_command="emcmake $cmake_command"
- fi
-
-+# We have to be able to build with CMake 3.6.2, so we can't use the -S or -B options
-+pushd "$3"
-+
- # Include CMAKE_USER_MAKE_RULES_OVERRIDE as uninitialized since it will hold its value in the CMake cache otherwise can cause issues when branch switching
- $cmake_command \
- -G "$generator" \
-@@ -98,5 +101,6 @@ $cmake_command \
- "-DCMAKE_INSTALL_PREFIX=$__CMakeBinDir" \
- $cmake_extra_defines \
- $__UnprocessedCMakeArgs \
-- -S "$1" \
-- -B "$3"
-+ "$1"
-+
-+popd
-diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt
-index 5fa572c4fcd..071ac2cf5fa 100644
---- a/src/coreclr/CMakeLists.txt
-+++ b/src/coreclr/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required(VERSION 3.14.2)
-+cmake_minimum_required(VERSION 3.6.2)
-
- cmake_policy(SET CMP0042 NEW)
-
-diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake
-index 4b119809017..04bde2bc20b 100644
---- a/src/coreclr/pgosupport.cmake
-+++ b/src/coreclr/pgosupport.cmake
-@@ -1,5 +1,18 @@
--include(CheckIPOSupported)
--check_ipo_supported(RESULT HAVE_LTO)
-+include(CheckCXXSourceCompiles)
-+include(CheckCXXCompilerFlag)
-+
-+# VC++ guarantees support for LTCG (LTO's equivalent)
-+if(NOT WIN32)
-+ # Function required to give CMAKE_REQUIRED_* local scope
-+ function(check_have_lto)
-+ set(CMAKE_REQUIRED_FLAGS -flto)
-+ set(CMAKE_REQUIRED_LIBRARIES -flto -fuse-ld=gold)
-+ check_cxx_source_compiles("int main() { return 0; }" HAVE_LTO)
-+ endfunction(check_have_lto)
-+ check_have_lto()
-+
-+ check_cxx_compiler_flag(-faligned-new COMPILER_SUPPORTS_F_ALIGNED_NEW)
-+endif(NOT WIN32)
-
- # Adds Profile Guided Optimization (PGO) flags to the current target
- function(add_pgo TargetName)
-diff --git a/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt b/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
-index dcd39e346c9..7b471d53726 100644
---- a/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
-+++ b/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
-@@ -1,3 +1,4 @@
-+cmake_minimum_required(VERSION 3.8)
- # Quick note: The CMake C# support is using the CSC bundled with the MSBuild that the native build runs on, not the one supplied by the local .NET SDK.
-
- project(DacTableGen LANGUAGES CSharp)
-diff --git a/src/coreclr/src/binder/CMakeLists.txt b/src/coreclr/src/binder/CMakeLists.txt
-index 3a66c81e10e..208f1214dd0 100644
---- a/src/coreclr/src/binder/CMakeLists.txt
-+++ b/src/coreclr/src/binder/CMakeLists.txt
-@@ -82,11 +82,13 @@ endif(CLR_CMAKE_TARGET_WIN32)
- convert_to_absolute_path(BINDER_SOURCES ${BINDER_SOURCES})
- convert_to_absolute_path(BINDER_CROSSGEN_SOURCES ${BINDER_CROSSGEN_SOURCES})
-
--add_library_clr(v3binder
-- STATIC
-+add_library_clr(v3binder_obj
-+ OBJECT
- ${BINDER_SOURCES}
- )
--add_dependencies(v3binder eventing_headers)
-+add_dependencies(v3binder_obj eventing_headers)
-+add_library(v3binder INTERFACE)
-+target_sources(v3binder INTERFACE $<TARGET_OBJECTS:v3binder_obj>)
-
- add_library_clr(v3binder_crossgen
- STATIC
-diff --git a/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt b/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
-index 391f70eff43..fdcf344c16a 100644
---- a/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
-+++ b/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
-@@ -10,9 +10,11 @@ set(BCLTYPE_SOURCES
- variant.cpp
- )
-
--add_library_clr(bcltype
-- STATIC
-+add_library_clr(bcltype_obj
-+ OBJECT
- ${BCLTYPE_SOURCES}
- )
-
--add_dependencies(bcltype eventing_headers)
-+add_dependencies(bcltype_obj eventing_headers)
-+add_library(bcltype INTERFACE)
-+target_sources(bcltype INTERFACE $<TARGET_OBJECTS:bcltype_obj>)
-diff --git a/src/coreclr/src/classlibnative/float/CMakeLists.txt b/src/coreclr/src/classlibnative/float/CMakeLists.txt
-index 44d40c92592..3c066620f76 100644
---- a/src/coreclr/src/classlibnative/float/CMakeLists.txt
-+++ b/src/coreclr/src/classlibnative/float/CMakeLists.txt
-@@ -7,9 +7,12 @@ set(FLOAT_SOURCES
- floatsingle.cpp
- )
-
--add_library_clr(comfloat_wks
-- STATIC
-+add_library_clr(comfloat_wks_obj
-+ OBJECT
- ${FLOAT_SOURCES}
- )
-
--add_dependencies(comfloat_wks eventing_headers)
-+add_dependencies(comfloat_wks_obj eventing_headers)
-+
-+add_library(comfloat_wks INTERFACE)
-+target_sources(comfloat_wks INTERFACE $<TARGET_OBJECTS:comfloat_wks_obj>)
-diff --git a/src/coreclr/src/debug/debug-pal/CMakeLists.txt b/src/coreclr/src/debug/debug-pal/CMakeLists.txt
-index ac1e48fb5fb..213fa59e784 100644
---- a/src/coreclr/src/debug/debug-pal/CMakeLists.txt
-+++ b/src/coreclr/src/debug/debug-pal/CMakeLists.txt
-@@ -34,4 +34,6 @@ if(CLR_CMAKE_HOST_UNIX)
-
- endif(CLR_CMAKE_HOST_UNIX)
-
--_add_library(debug-pal STATIC ${TWO_WAY_PIPE_SOURCES})
-+_add_library(debug-pal_obj OBJECT ${TWO_WAY_PIPE_SOURCES})
-+add_library(debug-pal INTERFACE)
-+target_sources(debug-pal INTERFACE $<TARGET_OBJECTS:debug-pal_obj>)
-diff --git a/src/coreclr/src/debug/ee/wks/CMakeLists.txt b/src/coreclr/src/debug/ee/wks/CMakeLists.txt
-index ee6c482ce76..3dd5e3612df 100644
---- a/src/coreclr/src/debug/ee/wks/CMakeLists.txt
-+++ b/src/coreclr/src/debug/ee/wks/CMakeLists.txt
-@@ -9,9 +9,9 @@ if (CLR_CMAKE_TARGET_WIN32)
-
- if(CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64)
-
-- preprocess_compile_asm(ASM_FILES ${ASM_FILE} OUTPUT_OBJECTS ASM_OBJECTS)
-+ preprocess_compile_asm(TARGET cordbee_wks_obj ASM_FILES ${ASM_FILE} OUTPUT_OBJECTS ASM_OBJECTS)
-
-- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${ASM_OBJECTS})
-+ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ${ASM_FILE} ${ASM_OBJECTS})
-
- else ()
-
-@@ -23,19 +23,21 @@ if (CLR_CMAKE_TARGET_WIN32)
-
- set_source_files_properties(${ASM_FILE} PROPERTIES COMPILE_OPTIONS "${ASM_OPTIONS}")
-
-- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${ASM_FILE})
-+ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ${ASM_FILE})
-
- endif()
-
- else ()
-
- if(CLR_CMAKE_HOST_ARCH_AMD64 OR CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64 OR CLR_CMAKE_HOST_ARCH_I386)
-- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S)
-+ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S)
- else()
- message(FATAL_ERROR "Unknown platform")
- endif()
-
- endif (CLR_CMAKE_TARGET_WIN32)
-
--target_precompile_header(TARGET cordbee_wks HEADER stdafx.h)
--add_dependencies(cordbee_wks eventing_headers)
-+target_precompile_header(TARGET cordbee_wks_obj HEADER stdafx.h)
-+add_dependencies(cordbee_wks_obj eventing_headers)
-+add_library(cordbee_wks INTERFACE)
-+target_sources(cordbee_wks INTERFACE $<TARGET_OBJECTS:cordbee_wks_obj>)
-diff --git a/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt b/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
-index 88364658f11..362da1f6483 100644
---- a/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
-+++ b/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
-@@ -10,5 +10,6 @@ set( ILDBSYMLIB_SOURCES
- symwrite.cpp
- )
-
--add_library_clr(ildbsymlib ${ILDBSYMLIB_SOURCES})
--
-+add_library_clr(ildbsymlib_obj OBJECT ${ILDBSYMLIB_SOURCES})
-+add_library(ildbsymlib INTERFACE)
-+target_sources(ildbsymlib INTERFACE $<TARGET_OBJECTS:ildbsymlib_obj>)
-diff --git a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
-index 777a2869e4f..066b75ab01f 100644
---- a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
-+++ b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
-@@ -9,20 +9,20 @@ if (CLR_CMAKE_HOST_WIN32)
-
- list(APPEND CLR_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def)
-
-- add_link_options(/ENTRY:CoreDllMain)
-+ add_linker_flag("/ENTRY:CoreDllMain")
-
- # Incremental linking results in the linker inserting extra padding and routing function calls via thunks that can break the
- # invariants (e.g. size of region between Jit_PatchedCodeLast-Jit_PatchCodeStart needs to fit in a page).
-- add_link_options(/INCREMENTAL:NO)
-+ add_linker_flag("/INCREMENTAL:NO")
-
- # Delay load libraries required for WinRT as that is not supported on all platforms
-- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll")
-- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll")
-- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll")
-- add_link_options("/DELAYLOAD:api-ms-win-ro-typeresolution-l1-1-0.dll")
-+ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll")
-+ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll")
-+ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll")
-+ add_linker_flag("/DELAYLOAD:api-ms-win-ro-typeresolution-l1-1-0.dll")
-
- # Delay load version.dll so that we can specify how to search when loading it as it is not part of Windows' known DLLs
-- add_link_options("/DELAYLOAD:version.dll")
-+ add_linker_flag("/DELAYLOAD:version.dll")
-
- # No library groups for Win32
- set(START_LIBRARY_GROUP)
-@@ -35,7 +35,7 @@ else(CLR_CMAKE_HOST_WIN32)
- if(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_NETBSD)
- # This option is necessary to ensure that the overloaded delete operator defined inside
- # of the utilcode will be used instead of the standard library delete operator.
-- add_link_options("LINKER:-Bsymbolic")
-+ add_linker_flag("-Wl,-Bsymbolic")
-
- # The following linked options can be inserted into the linker libraries list to
- # ensure proper resolving of circular references between a subset of the libraries.
-@@ -110,7 +110,7 @@ set(CORECLR_LIBRARIES
- utilcode
- v3binder
- libraries-native
-- System.Globalization.Native-Static
-+ System.Globalization.Native-static
- interop
- )
-
-@@ -162,7 +162,12 @@ if(FEATURE_EVENT_TRACE)
- endif(CLR_CMAKE_HOST_UNIX)
- endif(FEATURE_EVENT_TRACE)
-
--target_link_libraries(coreclr ${CORECLR_LIBRARIES})
-+if(FEATURE_MERGE_JIT_AND_ENGINE)
-+ set(CLRJIT_STATIC clrjit_static)
-+endif(FEATURE_MERGE_JIT_AND_ENGINE)
-+
-+target_sources(coreclr PUBLIC $<TARGET_OBJECTS:cee_wks_core>)
-+target_link_libraries(coreclr PUBLIC ${CORECLR_LIBRARIES} ${CLRJIT_STATIC} cee_wks)
-
- # Create the runtime module index header file containing the coreclr build id
- # for xplat and the timestamp/size on Windows.
-diff --git a/src/coreclr/src/dlls/mscorrc/CMakeLists.txt b/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
-index 08cf27aaf80..e114ec19cea 100644
---- a/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
-+++ b/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
-@@ -19,7 +19,9 @@ if(CLR_CMAKE_HOST_WIN32)
- else()
- build_resources(${CMAKE_CURRENT_SOURCE_DIR}/include.rc mscorrc TARGET_CPP_FILE)
-
-- add_library_clr(mscorrc STATIC
-+ add_library_clr(mscorrc_obj OBJECT
- ${TARGET_CPP_FILE}
- )
-+ add_library(mscorrc INTERFACE)
-+ target_sources(mscorrc INTERFACE $<TARGET_OBJECTS:mscorrc_obj>)
- endif(CLR_CMAKE_HOST_WIN32)
-diff --git a/src/coreclr/src/gcinfo/CMakeLists.txt b/src/coreclr/src/gcinfo/CMakeLists.txt
-index b0b67462562..50a1722a8ea 100644
---- a/src/coreclr/src/gcinfo/CMakeLists.txt
-+++ b/src/coreclr/src/gcinfo/CMakeLists.txt
-@@ -16,11 +16,14 @@ endif(CLR_CMAKE_TARGET_ARCH_I386)
-
- convert_to_absolute_path(GCINFO_SOURCES ${GCINFO_SOURCES})
-
--add_library_clr(gcinfo
-- STATIC
-+add_library_clr(gcinfo_obj
-+ OBJECT
- ${GCINFO_SOURCES}
- )
-
-+add_library(gcinfo INTERFACE)
-+target_sources(gcinfo INTERFACE $<TARGET_OBJECTS:gcinfo_obj>)
-+
- add_library_clr(gcinfo_crossgen
- STATIC
- ${GCINFO_SOURCES}
-diff --git a/src/coreclr/src/inc/CMakeLists.txt b/src/coreclr/src/inc/CMakeLists.txt
-index 60fad88e77d..4f75d3a882d 100644
---- a/src/coreclr/src/inc/CMakeLists.txt
-+++ b/src/coreclr/src/inc/CMakeLists.txt
-@@ -58,7 +58,9 @@ if(FEATURE_JIT_PITCHING)
- endif(FEATURE_JIT_PITCHING)
-
- # Compile *_i.cpp to lib
--_add_library(corguids ${CORGUIDS_SOURCES})
-+_add_library(corguids_obj OBJECT ${CORGUIDS_SOURCES})
-+add_library(corguids INTERFACE)
-+target_sources(corguids INTERFACE $<TARGET_OBJECTS:corguids_obj>)
-
- # Binplace the inc files for packaging later.
-
-@@ -75,4 +77,3 @@ _install (FILES cfi.h
- gcinfoencoder.h
- gcinfotypes.h
- DESTINATION inc)
--_install (TARGETS corguids DESTINATION lib)
-diff --git a/src/coreclr/src/interop/CMakeLists.txt b/src/coreclr/src/interop/CMakeLists.txt
-index d7eaa1b04ae..3924b4fdbb4 100644
---- a/src/coreclr/src/interop/CMakeLists.txt
-+++ b/src/coreclr/src/interop/CMakeLists.txt
-@@ -30,7 +30,10 @@ endif(WIN32)
-
- convert_to_absolute_path(INTEROP_SOURCES ${INTEROP_SOURCES})
-
--add_library_clr(interop
-- STATIC
-+add_library_clr(interop_obj
-+ OBJECT
- ${INTEROP_SOURCES}
- )
-+
-+add_library(interop INTERFACE)
-+target_sources(interop INTERFACE $<TARGET_OBJECTS:interop_obj>)
-diff --git a/src/coreclr/src/jit/dll/CMakeLists.txt b/src/coreclr/src/jit/dll/CMakeLists.txt
-index ec7cddc78ed..01bdbf5a731 100644
---- a/src/coreclr/src/jit/dll/CMakeLists.txt
-+++ b/src/coreclr/src/jit/dll/CMakeLists.txt
-@@ -2,17 +2,17 @@ project(ClrJit)
-
- set_source_files_properties(${JIT_EXPORTS_FILE} PROPERTIES GENERATED TRUE)
-
-+add_library_clr(clrjit_obj
-+ OBJECT
-+ ${JIT_CORE_SOURCES}
-+ ${JIT_ARCH_SOURCES}
-+)
-+
- if(CLR_CMAKE_HOST_UNIX)
-- add_library_clr(clrjit_static
-- STATIC
-- ${SHARED_LIB_SOURCES}
-- ${JIT_ARCH_SOURCES}
-- )
-- add_dependencies(clrjit_static coreclrpal gcinfo)
--else()
-- add_library_clr(clrjit_static
-- ${SHARED_LIB_SOURCES}
-- ${JIT_ARCH_SOURCES}
-- )
-+ add_dependencies(clrjit_obj coreclrpal gcinfo)
- endif(CLR_CMAKE_HOST_UNIX)
--target_precompile_header(TARGET clrjit_static HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR})
-+
-+target_precompile_header(TARGET clrjit_obj HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR})
-+
-+add_library(clrjit_static INTERFACE)
-+target_sources(clrjit_static INTERFACE $<TARGET_OBJECTS:clrjit_obj>)
-diff --git a/src/coreclr/src/md/ceefilegen/CMakeLists.txt b/src/coreclr/src/md/ceefilegen/CMakeLists.txt
-index 90749c806b2..fd0f8424d97 100644
---- a/src/coreclr/src/md/ceefilegen/CMakeLists.txt
-+++ b/src/coreclr/src/md/ceefilegen/CMakeLists.txt
-@@ -25,8 +25,11 @@ if (CLR_CMAKE_TARGET_WIN32)
- list(APPEND CEEFILEGEN_SOURCES ${CEEFILEGEN_HEADERS})
- endif (CLR_CMAKE_TARGET_WIN32)
-
--add_library_clr(ceefgen
-- STATIC
-+add_library_clr(ceefgen_obj
-+ OBJECT
- ${CEEFILEGEN_SOURCES}
- )
--target_precompile_header(TARGET ceefgen HEADER stdafx.h)
-+target_precompile_header(TARGET ceefgen_obj HEADER stdafx.h)
-+
-+add_library(ceefgen INTERFACE)
-+target_sources(ceefgen INTERFACE $<TARGET_OBJECTS:ceefgen_obj>)
-diff --git a/src/coreclr/src/md/compiler/CMakeLists.txt b/src/coreclr/src/md/compiler/CMakeLists.txt
-index 3b916cdc9fe..f9f80db2500 100644
---- a/src/coreclr/src/md/compiler/CMakeLists.txt
-+++ b/src/coreclr/src/md/compiler/CMakeLists.txt
-@@ -58,9 +58,11 @@ add_library_clr(mdcompiler_dac ${MDCOMPILER_SOURCES})
- set_target_properties(mdcompiler_dac PROPERTIES DAC_COMPONENT TRUE)
- target_precompile_header(TARGET mdcompiler_dac HEADER stdafx.h)
-
--add_library_clr(mdcompiler_wks ${MDCOMPILER_SOURCES})
--target_compile_definitions(mdcompiler_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
--target_precompile_header(TARGET mdcompiler_wks HEADER stdafx.h)
-+add_library_clr(mdcompiler_wks_obj OBJECT ${MDCOMPILER_SOURCES})
-+target_compile_definitions(mdcompiler_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
-+target_precompile_header(TARGET mdcompiler_wks_obj HEADER stdafx.h)
-+add_library(mdcompiler_wks INTERFACE)
-+target_sources(mdcompiler_wks INTERFACE $<TARGET_OBJECTS:mdcompiler_wks_obj>)
-
- add_library_clr(mdcompiler-dbi ${MDCOMPILER_SOURCES})
- set_target_properties(mdcompiler-dbi PROPERTIES DBI_COMPONENT TRUE)
-diff --git a/src/coreclr/src/md/enc/CMakeLists.txt b/src/coreclr/src/md/enc/CMakeLists.txt
-index 7220736b9ca..82af8434296 100644
---- a/src/coreclr/src/md/enc/CMakeLists.txt
-+++ b/src/coreclr/src/md/enc/CMakeLists.txt
-@@ -48,9 +48,11 @@ add_library_clr(mdruntimerw_dac ${MDRUNTIMERW_SOURCES})
- set_target_properties(mdruntimerw_dac PROPERTIES DAC_COMPONENT TRUE)
- target_precompile_header(TARGET mdruntimerw_dac HEADER stdafx.h)
-
--add_library_clr(mdruntimerw_wks ${MDRUNTIMERW_SOURCES})
--target_compile_definitions(mdruntimerw_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
--target_precompile_header(TARGET mdruntimerw_wks HEADER stdafx.h)
-+add_library_clr(mdruntimerw_wks_obj OBJECT ${MDRUNTIMERW_SOURCES})
-+target_compile_definitions(mdruntimerw_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
-+target_precompile_header(TARGET mdruntimerw_wks_obj HEADER stdafx.h)
-+add_library(mdruntimerw_wks INTERFACE)
-+target_sources(mdruntimerw_wks INTERFACE $<TARGET_OBJECTS:mdruntimerw_wks_obj>)
-
- add_library_clr(mdruntimerw-dbi ${MDRUNTIMERW_SOURCES})
- set_target_properties(mdruntimerw-dbi PROPERTIES DBI_COMPONENT TRUE)
-diff --git a/src/coreclr/src/md/hotdata/CMakeLists.txt b/src/coreclr/src/md/hotdata/CMakeLists.txt
-index c6168d2a4b0..88475cb72f4 100644
---- a/src/coreclr/src/md/hotdata/CMakeLists.txt
-+++ b/src/coreclr/src/md/hotdata/CMakeLists.txt
-@@ -33,8 +33,10 @@ add_library_clr(mdhotdata_dac ${MDHOTDATA_SOURCES})
- set_target_properties(mdhotdata_dac PROPERTIES DAC_COMPONENT TRUE)
- target_precompile_header(TARGET mdhotdata_dac HEADER external.h)
-
--add_library_clr(mdhotdata_full ${MDHOTDATA_SOURCES})
--target_precompile_header(TARGET mdhotdata_full HEADER external.h)
-+add_library_clr(mdhotdata_full_obj OBJECT ${MDHOTDATA_SOURCES})
-+target_precompile_header(TARGET mdhotdata_full_obj HEADER external.h)
-+add_library(mdhotdata_full INTERFACE)
-+target_sources(mdhotdata_full INTERFACE $<TARGET_OBJECTS:mdhotdata_full_obj>)
-
- add_library_clr(mdhotdata_crossgen ${MDHOTDATA_SOURCES})
- set_target_properties(mdhotdata_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
-diff --git a/src/coreclr/src/md/runtime/CMakeLists.txt b/src/coreclr/src/md/runtime/CMakeLists.txt
-index 6dc193e14a7..7e0e83f1114 100644
---- a/src/coreclr/src/md/runtime/CMakeLists.txt
-+++ b/src/coreclr/src/md/runtime/CMakeLists.txt
-@@ -47,9 +47,11 @@ add_library_clr(mdruntime_dac ${MDRUNTIME_SOURCES})
- set_target_properties(mdruntime_dac PROPERTIES DAC_COMPONENT TRUE)
- target_precompile_header(TARGET mdruntime_dac HEADER stdafx.h)
-
--add_library_clr(mdruntime_wks ${MDRUNTIME_SOURCES})
--target_compile_definitions(mdruntime_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
--target_precompile_header(TARGET mdruntime_wks HEADER stdafx.h)
-+add_library_clr(mdruntime_wks_obj OBJECT ${MDRUNTIME_SOURCES})
-+target_compile_definitions(mdruntime_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
-+target_precompile_header(TARGET mdruntime_wks_obj HEADER stdafx.h)
-+add_library(mdruntime_wks INTERFACE)
-+target_sources(mdruntime_wks INTERFACE $<TARGET_OBJECTS:mdruntime_wks_obj>)
-
- add_library_clr(mdruntime-dbi ${MDRUNTIME_SOURCES})
- set_target_properties(mdruntime-dbi PROPERTIES DBI_COMPONENT TRUE)
-diff --git a/src/coreclr/src/pal/src/CMakeLists.txt b/src/coreclr/src/pal/src/CMakeLists.txt
-index e7c1629d5b2..7818deef050 100644
---- a/src/coreclr/src/pal/src/CMakeLists.txt
-+++ b/src/coreclr/src/pal/src/CMakeLists.txt
-@@ -256,10 +256,12 @@ add_library(coreclrpal
- # > warning for library: libtracepointprovider.a the table of contents is empty (no object file members in the library define global symbols)
- #
- if(CLR_CMAKE_TARGET_LINUX)
-- add_library(tracepointprovider
-- STATIC
-+ add_library(tracepointprovider_obj
-+ OBJECT
- misc/tracepointprovider.cpp
- )
-+ add_library(tracepointprovider INTERFACE)
-+ target_sources(tracepointprovider INTERFACE $<TARGET_OBJECTS:tracepointprovider_obj>)
- endif(CLR_CMAKE_TARGET_LINUX)
-
- if(CLR_CMAKE_TARGET_OSX)
-diff --git a/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt b/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
-index 39b9826d1ab..8e6968cf783 100644
---- a/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
-+++ b/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
-@@ -1,8 +1,8 @@
--include(FindPython)
-+include(FindPythonInterp)
-
- set (GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genDummyProvider.py)
-
--set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
-+set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
-
- execute_process(
- COMMAND ${GENERATE_COMMAND} --dry-run
-diff --git a/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt b/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
-index 234dea19b75..d55dab3557f 100644
---- a/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
-+++ b/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
-@@ -1,7 +1,7 @@
--include(FindPython)
-+include(FindPythonInterp)
- set (GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genLttngProvider.py)
-
--set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
-+set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
-
- execute_process(
- COMMAND ${GENERATE_COMMAND} --dry-run
-diff --git a/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt b/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
-index 000ee2d2fb0..845fae656be 100644
---- a/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
-+++ b/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
-@@ -5,10 +5,10 @@ set(SOURCES
- set(EVENT_MANIFEST ${VM_DIR}/ClrEtwAll.man)
- set(TEST_GENERATOR ${CLR_DIR}/src/scripts/genEventingTests.py)
-
--include(FindPython)
-+include(FindPythonInterp)
-
- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/clralltestevents.cpp
-- COMMAND ${Python_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}"
-+ COMMAND ${PYTHON_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}"
- DEPENDS ${EVENT_MANIFEST} ${TEST_GENERATOR}
- COMMENT "Updating clralltestevents.cpp"
- )
-diff --git a/src/coreclr/src/unwinder/CMakeLists.txt b/src/coreclr/src/unwinder/CMakeLists.txt
-index 4421ea9f6f6..41a0219bbf7 100644
---- a/src/coreclr/src/unwinder/CMakeLists.txt
-+++ b/src/coreclr/src/unwinder/CMakeLists.txt
-@@ -20,8 +20,10 @@ list(APPEND UNWINDER_SOURCES
- convert_to_absolute_path(UNWINDER_SOURCES ${UNWINDER_SOURCES})
-
- if(CLR_CMAKE_HOST_UNIX)
-- add_library_clr(unwinder_wks ${UNWINDER_SOURCES})
-- add_dependencies(unwinder_wks eventing_headers)
-+ add_library_clr(unwinder_wks_obj OBJECT ${UNWINDER_SOURCES})
-+ add_dependencies(unwinder_wks_obj eventing_headers)
-+ add_library(unwinder_wks INTERFACE)
-+ target_sources(unwinder_wks INTERFACE $<TARGET_OBJECTS:unwinder_wks_obj>)
- endif(CLR_CMAKE_HOST_UNIX)
-
- add_library_clr(unwinder_dac ${UNWINDER_SOURCES})
-diff --git a/src/coreclr/src/utilcode/CMakeLists.txt b/src/coreclr/src/utilcode/CMakeLists.txt
-index aa28b2db603..f8082fc9076 100644
---- a/src/coreclr/src/utilcode/CMakeLists.txt
-+++ b/src/coreclr/src/utilcode/CMakeLists.txt
-@@ -98,7 +98,9 @@ convert_to_absolute_path(UTILCODE_CROSSGEN_SOURCES ${UTILCODE_CROSSGEN_SOURCES})
- convert_to_absolute_path(UTILCODE_STATICNOHOST_SOURCES ${UTILCODE_STATICNOHOST_SOURCES})
-
- add_library_clr(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES})
--add_library_clr(utilcode STATIC ${UTILCODE_SOURCES})
-+add_library_clr(utilcode_obj OBJECT ${UTILCODE_SOURCES})
-+add_library(utilcode INTERFACE)
-+target_sources(utilcode INTERFACE $<TARGET_OBJECTS:utilcode_obj>)
- add_library_clr(utilcodestaticnohost STATIC ${UTILCODE_STATICNOHOST_SOURCES})
- add_library_clr(utilcode_crossgen STATIC ${UTILCODE_CROSSGEN_SOURCES})
-
-@@ -106,9 +108,9 @@ if(CLR_CMAKE_HOST_UNIX)
- target_link_libraries(utilcodestaticnohost nativeresourcestring)
- target_link_libraries(utilcode_crossgen nativeresourcestring)
- target_link_libraries(utilcode_dac nativeresourcestring)
-- target_link_libraries(utilcode nativeresourcestring)
-+ target_link_libraries(utilcode INTERFACE nativeresourcestring)
- add_dependencies(utilcode_dac coreclrpal)
-- add_dependencies(utilcode coreclrpal)
-+ add_dependencies(utilcode_obj coreclrpal)
- endif(CLR_CMAKE_HOST_UNIX)
-
-
-@@ -121,10 +123,10 @@ set_target_properties(utilcode_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
- target_compile_definitions(utilcode_dac PRIVATE SELF_NO_HOST)
- target_compile_definitions(utilcodestaticnohost PRIVATE SELF_NO_HOST)
- add_dependencies(utilcode_dac ${UTILCODE_DEPENDENCIES})
--add_dependencies(utilcode ${UTILCODE_DEPENDENCIES})
-+add_dependencies(utilcode_obj ${UTILCODE_DEPENDENCIES})
- add_dependencies(utilcode_crossgen ${UTILCODE_DEPENDENCIES})
- add_dependencies(utilcodestaticnohost ${UTILCODE_DEPENDENCIES})
- target_precompile_header(TARGET utilcode_dac HEADER stdafx.h)
--target_precompile_header(TARGET utilcode HEADER stdafx.h)
-+target_precompile_header(TARGET utilcode_obj HEADER stdafx.h)
- target_precompile_header(TARGET utilcode_crossgen HEADER stdafx.h)
- target_precompile_header(TARGET utilcodestaticnohost HEADER stdafx.h)
-diff --git a/src/coreclr/src/vm/CMakeLists.txt b/src/coreclr/src/vm/CMakeLists.txt
-index 3e37cebdc10..2b20d7d910a 100644
---- a/src/coreclr/src/vm/CMakeLists.txt
-+++ b/src/coreclr/src/vm/CMakeLists.txt
-@@ -923,7 +923,7 @@ list(APPEND VM_HEADERS_DAC
-
- if (CLR_CMAKE_TARGET_WIN32)
- list(APPEND VM_SOURCES_WKS ${VM_HEADERS_WKS})
-- list(APPEND VM_SOURCES_WKS_ARCH_ASM ${VM_HEADERS_WKS_ARCH_ASM})
-+ list(APPEND VM_SOURCES_WKS ${VM_HEADERS_WKS_ARCH_ASM})
- list(APPEND VM_SOURCES_DAC ${VM_HEADERS_DAC})
- endif(CLR_CMAKE_TARGET_WIN32)
-
-diff --git a/src/coreclr/src/vm/eventing/CMakeLists.txt b/src/coreclr/src/vm/eventing/CMakeLists.txt
-index 98dd158df54..e2bf024fc59 100644
---- a/src/coreclr/src/vm/eventing/CMakeLists.txt
-+++ b/src/coreclr/src/vm/eventing/CMakeLists.txt
-@@ -8,12 +8,13 @@ else()
- set(NEED_XPLAT_HEADER ON)
- endif()
-
--include(FindPython)
-+include(FindPythonInterp)
-
- set (EventingHeaders
- ${GENERATED_INCLUDE_DIR}/etmdummy.h
- ${GENERATED_INCLUDE_DIR}/clretwallmain.h
- ${GENERATED_INCLUDE_DIR}/clreventpipewriteevents.h
-+ ${GENERATED_INCLUDE_DIR}/clrproviders.h
- )
-
- if (NEED_XPLAT_HEADER)
-@@ -24,7 +25,7 @@ endif()
- set(GENEVENTING_SCRIPT ${CLR_DIR}/src/scripts/genEventing.py)
-
- add_custom_target(eventing_headers
-- ${Python_EXECUTABLE} ${GENEVENTING_SCRIPT} --man ${EVENT_MANIFEST} --inc ${GENERATED_INCLUDE_DIR} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG}
-+ ${PYTHON_EXECUTABLE} ${GENEVENTING_SCRIPT} --man ${EVENT_MANIFEST} --inc ${GENERATED_INCLUDE_DIR} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG}
- DEPENDS ${EVENT_MANIFEST} ${GENEVENTING_SCRIPT}
- VERBATIM
- )
-diff --git a/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt b/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
-index 34a067e1ec5..4c7df2fbb3c 100644
---- a/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
-+++ b/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
-@@ -1,4 +1,4 @@
--include(FindPython)
-+include(FindPythonInterp)
-
- set(ETW_PROVIDER_SCRIPT ${CLR_DIR}/src/scripts/genEtwProvider.py)
-
-@@ -14,5 +14,5 @@ set (ETW_PROVIDER_OUTPUTS
- set_source_files_properties(${ETW_PROVIDER_OUTPUTS} PROPERTIES GENERATED TRUE)
-
- add_custom_target(eventprovider
-- ${Python_EXECUTABLE} ${ETW_PROVIDER_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${GENERATED_INCLUDE_DIR}
-+ ${PYTHON_EXECUTABLE} ${ETW_PROVIDER_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${GENERATED_INCLUDE_DIR}
- DEPENDS ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS} ${ETW_PROVIDER_SCRIPT})
-diff --git a/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt b/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
-index 00b3f6f386f..00d79737e54 100644
---- a/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
-+++ b/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
-@@ -1,9 +1,9 @@
--include(FindPython)
-+include(FindPythonInterp)
-
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
- set(GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genEventPipe.py)
--set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${CMAKE_CURRENT_BINARY_DIR} ${NONEXTERN_ARG})
-+set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${CMAKE_CURRENT_BINARY_DIR} ${NONEXTERN_ARG})
-
- execute_process(
- COMMAND ${GENERATE_COMMAND} --dry-run
-@@ -28,10 +28,8 @@ add_custom_command(OUTPUT ${EVENTPIPE_SOURCES}
- COMMAND ${GENERATE_COMMAND}
- DEPENDS ${GENERATE_SCRIPT} ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS})
-
--add_library_clr(eventpipe STATIC ${EVENTPIPE_SOURCES})
--set_target_properties(eventpipe PROPERTIES LINKER_LANGUAGE CXX)
--add_dependencies(eventpipe eventing_headers)
--
--if (NOT CLR_CMAKE_TARGET_WIN32)
-- _install(TARGETS eventpipe DESTINATION lib)
--endif()
-+add_library_clr(eventpipe_obj OBJECT ${EVENTPIPE_SOURCES})
-+set_target_properties(eventpipe_obj PROPERTIES LINKER_LANGUAGE CXX)
-+add_dependencies(eventpipe_obj eventing_headers)
-+add_library(eventpipe INTERFACE)
-+target_sources(eventpipe INTERFACE $<TARGET_OBJECTS:eventpipe_obj>)
-diff --git a/src/coreclr/src/vm/wks/CMakeLists.txt b/src/coreclr/src/vm/wks/CMakeLists.txt
-index 1e94b575fd6..5d355f6adcb 100644
---- a/src/coreclr/src/vm/wks/CMakeLists.txt
-+++ b/src/coreclr/src/vm/wks/CMakeLists.txt
-@@ -7,13 +7,19 @@ if (CLR_CMAKE_TARGET_WIN32)
-
- endif (CLR_CMAKE_TARGET_WIN32)
-
--add_library_clr(cee_wks ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM})
--target_precompile_header(TARGET cee_wks HEADER common.h)
-+add_library_clr(cee_wks_core OBJECT ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM})
-+add_library_clr(cee_wks_obj OBJECT ${VM_SOURCES_WKS_SPECIAL})
-+
-+target_precompile_header(TARGET cee_wks_core HEADER common.h)
-+target_precompile_header(TARGET cee_wks_obj HEADER common.h)
-+
- if (MSVC)
- # mscorlib.cpp does not compile with precompiled header file
- set_source_files_properties(../mscorlib.cpp PROPERTIES COMPILE_FLAGS "/Y-")
- endif()
--add_dependencies(cee_wks eventing_headers)
-+
-+add_dependencies(cee_wks_core eventing_headers)
-+add_dependencies(cee_wks_obj eventing_headers)
-
- if (CLR_CMAKE_TARGET_WIN32)
-
-@@ -45,8 +51,16 @@ if (CLR_CMAKE_TARGET_WIN32)
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.inc
- )
-
-- add_dependencies(cee_wks asmconstants_inc)
-+ add_dependencies(cee_wks_core asmconstants_inc)
-+ add_dependencies(cee_wks_obj asmconstants_inc)
-
- endif(NOT CLR_CMAKE_HOST_ARCH_ARM AND NOT CLR_CMAKE_HOST_ARCH_ARM64)
-
- endif (CLR_CMAKE_TARGET_WIN32)
-+
-+add_custom_target(preprocessd_asm DEPENDS ${VM_WKS_ARCH_ASM_OBJECTS})
-+add_dependencies(cee_wks_core preprocessd_asm)
-+add_dependencies(cee_wks_obj preprocessd_asm)
-+
-+add_library(cee_wks INTERFACE)
-+target_sources(cee_wks INTERFACE $<TARGET_OBJECTS:cee_wks_obj> ${VM_WKS_ARCH_ASM_OBJECTS})
-diff --git a/src/coreclr/tests/CMakeLists.txt b/src/coreclr/tests/CMakeLists.txt
-index 53dbb85a58b..c5417cba7d0 100644
---- a/src/coreclr/tests/CMakeLists.txt
-+++ b/src/coreclr/tests/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required(VERSION 3.14.2)
-+cmake_minimum_required(VERSION 3.6.2)
-
- cmake_policy(SET CMP0042 NEW)
- project(Tests)
-diff --git a/src/installer/corehost/CMakeLists.txt b/src/installer/corehost/CMakeLists.txt
-index 43a59a1a695..dff0496cdd8 100644
---- a/src/installer/corehost/CMakeLists.txt
-+++ b/src/installer/corehost/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required(VERSION 3.14.2)
-+cmake_minimum_required(VERSION 3.6.2)
-
- project(corehost)
-
-diff --git a/src/installer/corehost/cli/exe.cmake b/src/installer/corehost/cli/exe.cmake
-index de8cd49396b..732faf97ff9 100644
---- a/src/installer/corehost/cli/exe.cmake
-+++ b/src/installer/corehost/cli/exe.cmake
-@@ -5,7 +5,6 @@
- project (${DOTNET_PROJECT_NAME})
-
- cmake_policy(SET CMP0011 NEW)
--cmake_policy(SET CMP0083 NEW)
-
- include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)
-
-diff --git a/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt b/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
-index bcf6a051229..8572a6318ec 100644
---- a/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
-+++ b/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
-@@ -2,7 +2,6 @@
- # The .NET Foundation licenses this file to you under the MIT license.
- # See the LICENSE file in the project root for more information.
-
--cmake_minimum_required (VERSION 2.6)
- project(mockhostfxr_2_2)
-
- set(DOTNET_PROJECT_NAME "mockhostfxr_2_2")
-diff --git a/src/libraries/Native/Unix/CMakeLists.txt b/src/libraries/Native/Unix/CMakeLists.txt
-index f14ada69fee..cb174fe5013 100644
---- a/src/libraries/Native/Unix/CMakeLists.txt
-+++ b/src/libraries/Native/Unix/CMakeLists.txt
-@@ -1,19 +1,14 @@
--cmake_minimum_required(VERSION 3.14.2)
-+cmake_minimum_required(VERSION 3.6.2)
-+if(CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
-+ # CMake 3.14.5 contains bug fixes for iOS
-+ cmake_minimum_required(VERSION 3.14.5)
-+ endif()
- cmake_policy(SET CMP0042 NEW)
-
- project(CoreFX C)
-
- include(${CLR_ENG_NATIVE_DIR}/configuretools.cmake)
-
--if(CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
-- # CMake 3.14.5 contains bug fixes for iOS
-- cmake_minimum_required(VERSION 3.14.5)
--endif()
--
--if(NOT CLR_CMAKE_TARGET_ARCH_WASM)
-- cmake_policy(SET CMP0083 NEW)
--endif(NOT CLR_CMAKE_TARGET_ARCH_WASM)
--
- set(CMAKE_MACOSX_RPATH ON)
- set(CMAKE_INSTALL_PREFIX $ENV{__CMakeBinDir})
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
-@@ -167,7 +162,8 @@ if(CLR_CMAKE_TARGET_UNIX)
- if(NOT CLR_CMAKE_TARGET_ARCH_WASM AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS)
- if(CLR_CMAKE_TARGET_OSX)
- add_definitions(-DTARGET_OSX)
-- add_link_options(-Wl,-bind_at_load)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-bind_at_load")
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-bind_at_load" )
- else()
- add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
- if(CLR_CMAKE_TARGET_SUNOS)
-@@ -175,7 +171,8 @@ if(CLR_CMAKE_TARGET_UNIX)
- else()
- # -z,now is required for full relro.
- # see https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-re...
-- add_link_options(-Wl,--build-id=sha1 -Wl,-z,relro,-z,now)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now")
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now" )
- endif()
- endif()
- endif()
-diff --git a/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt b/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
-index bcfc5dd106a..ebcb5a02b3f 100644
---- a/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
-+++ b/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
-@@ -79,14 +79,15 @@ if (GEN_SHARED_LIB)
- install_with_stripped_symbols (System.Globalization.Native PROGRAMS .)
- endif()
-
--add_library(System.Globalization.Native-Static
-- STATIC
-+add_library(System.Globalization.Native-obj
-+ OBJECT
- ${NATIVEGLOBALIZATION_SOURCES}
- )
-
--set_target_properties(System.Globalization.Native-Static PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1)
-+set_target_properties(System.Globalization.Native-obj PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1)
-
--install (TARGETS System.Globalization.Native-Static DESTINATION .)
-+add_library(System.Globalization.Native-static INTERFACE)
-+target_sources(System.Globalization.Native-static INTERFACE $<TARGET_OBJECTS:System.Globalization.Native-obj>)
-
- if(NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID)
- if (GEN_SHARED_LIB)
diff --git a/runtime-linker-order.patch b/runtime-linker-order.patch
new file mode 100644
index 0000000..6ca413f
--- /dev/null
+++ b/runtime-linker-order.patch
@@ -0,0 +1,20 @@
+diff --git a/src/installer/corehost/cli/apphost/static/CMakeLists.txt b/src/installer/corehost/cli/apphost/static/CMakeLists.txt
+index 85ea6ffe642..e6369f6b9ad 100644
+--- a/src/installer/corehost/cli/apphost/static/CMakeLists.txt
++++ b/src/installer/corehost/cli/apphost/static/CMakeLists.txt
+@@ -204,11 +204,12 @@ target_link_libraries(singlefilehost
+ libhostcommon
+ ${CORECLR_LIBRARIES}
+
++ ${START_WHOLE_ARCHIVE}
++ ${NATIVE_LIBS}
++ ${END_WHOLE_ARCHIVE}
++
+ ${ZLIB_LIBRARIES}
+ ${LIBGSS}
+ ${NATIVE_LIBS_EXTRA}
+
+- ${START_WHOLE_ARCHIVE}
+- ${NATIVE_LIBS}
+- ${END_WHOLE_ARCHIVE}
+ )
commit ccec65f6fac2e9f96e34068fe4f31bf72648e1af
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Aug 10 11:10:29 2020 -0400
Iniitial update to .NET 5.0
diff --git a/README.md b/README.md
index 816aba3..4d4fb58 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Overview
-This is the .NET Core 3.1 package for Fedora.
+This is the .NET Core 5.0 package for Fedora.
This package is maintained by the Fedora DotNet SIG (Special Interest
Group). You can find out more about the DotNet SIG at:
@@ -10,7 +10,7 @@ Group). You can find out more about the DotNet SIG at:
- https://lists.fedoraproject.org/archives/list/dotnet-sig@lists.fedoraproj...
Please report any issues [using
-bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet3.1).
+bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet5.0).
# Specification
@@ -27,8 +27,8 @@ with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
2. Checkout the forked repository.
- - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet3.1.git`
- - `cd dotnet3.1`
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
+ - `cd dotnet5.0`
3. Make your changes. Don't forget to add a changelog.
@@ -71,8 +71,8 @@ with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
2. Checkout the forked repository.
- - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet3.1.git`
- - `cd dotnet3.1`
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
+ - `cd dotnet5.0`
3. Build the new upstream source tarball. Update the versions in the
spec file. Add a changelog. This is generally automated by the
diff --git a/build-bootstrap-tarball b/build-bootstrap-tarball
new file mode 100755
index 0000000..d3f3547
--- /dev/null
+++ b/build-bootstrap-tarball
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+set -euo pipefail
+
+set -x
+
+sdk_version=3.1.105
+
+arch=$(uname -m)
+if [[ $arch == "x86_64" ]]; then
+ arch=x64
+elif [[ $arch == "aarch64" ]]; then
+ arch=arm64
+fi
+
+if rpm -qa | grep libunwind; then
+ echo "error: libunwind is installed. Not a good idea for bootstrapping."
+ exit 1
+fi
+if rpm -qa | grep dotnet ; then
+ echo "error: dotnet is installed. Not a good idea for bootstrapping."
+ exit 1
+fi
+if [ -d /usr/lib/dotnet ] || [ -d /usr/lib64/dotnet ] || [ -d /usr/share/dotnet ] ; then
+ echo "error: one of /usr/lib/dotnet /usr/lib64/dotnet or /usr/share/dotnet/ exists. Not a good idea for bootstrapping."
+ exit 1
+fi
+if command -v dotnet ; then
+ echo "error: dotnet is in $PATH. Not a good idea for bootstrapping."
+ exit 1
+fi
+
+if [ ! -d dotnet-source-build-tarball ]; then
+ if [ ! -d source-build ]; then
+ git clone https://github.com/dotnet/source-build
+ fi
+ pushd source-build
+ sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.common.props
+ git clean -xdf
+ ./build-source-tarball.sh ../dotnet-source-build-tarball/ -- -p:DownloadSourceBuildReferencePackagesTimeoutSeconds=100000
+ popd
+fi
+
+rm -rf dotnet-v${sdk_version}-SDK dotnet-v${sdk_version}-SDK.tar.gz
+
+cp -a dotnet-source-build-tarball dotnet-v${sdk_version}-SDK
+cp -a source-build/artifacts/$arch/Release/Private.SourceBuilt.Artifacts.*.tar.gz dotnet-v${sdk_version}-SDK/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+
+tar czf dotnet-v${sdk_version}-SDK-$arch.tar.gz dotnet-v${sdk_version}-SDK
+
diff --git a/build-coreclr-clang10.patch b/build-coreclr-clang10.patch
deleted file mode 100644
index 3b13cb1..0000000
--- a/build-coreclr-clang10.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff --git a/configurecompiler.cmake b/configurecompiler.cmake
-index d769e82f57..4936c8b00d 100644
---- a/configurecompiler.cmake
-+++ b/configurecompiler.cmake
-@@ -474,6 +474,7 @@ if (CLR_CMAKE_PLATFORM_UNIX)
- add_compile_options(-Wno-unused-variable)
- add_compile_options(-Wno-unused-value)
- add_compile_options(-Wno-unused-function)
-+ add_compile_options(-Wno-error=misleading-indentation)
-
- #These seem to indicate real issues
- add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-invalid-offsetof>)
-diff --git a/src/inc/slist.h b/src/inc/slist.h
-index f05d763dc6..abebe04d47 100644
---- a/src/inc/slist.h
-+++ b/src/inc/slist.h
-@@ -160,13 +160,13 @@ public:
- void Init()
- {
- LIMITED_METHOD_CONTRACT;
-- m_pHead = &m_link;
-+ m_pHead = PTR_SLink(&m_link);
- // NOTE :: fHead variable is template argument
- // the following code is a compiled in, only if the fHead flag
- // is set to false,
- if (!fHead)
- {
-- m_pTail = &m_link;
-+ m_pTail = PTR_SLink(&m_link);
- }
- }
-
-@@ -274,7 +274,7 @@ public:
- SLink *ret = SLink::FindAndRemove(m_pHead, GetLink(pObj), &prior);
-
- if (ret == m_pTail)
-- m_pTail = prior;
-+ m_pTail = PTR_SLink(prior);
-
- return GetObject(ret);
- }
-diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
-index 08a35c8f62..43eb648a14 100644
---- a/src/pal/inc/pal.h
-+++ b/src/pal/inc/pal.h
-@@ -145,7 +145,7 @@ typedef PVOID NATIVE_LIBRARY_HANDLE;
-
- /******************* Compiler-specific glue *******************************/
- #ifndef THROW_DECL
--#if defined(_MSC_VER) || defined(__llvm__) || !defined(__cplusplus)
-+#if defined(_MSC_VER) || !defined(__cplusplus)
- #define THROW_DECL
- #else
- #define THROW_DECL throw()
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 3314c7e..f32d847 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -91,14 +91,10 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git checkout "${tag}"
git submodule update --init --recursive
clean_dotnet_cache
- sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.proj
- mkdir -p patches/coreclr/
- cp ../../build-coreclr-clang10.patch patches/coreclr
- mkdir -p patches/corefx/
- cp ../../corefx-42900-clang-10.patch patches/corefx
- cp -r /usr/lib64/dotnet "${temp_dir}"
- ./build.sh --with-sdk ../dotnet /p:ArchiveDownloadedPackages=true
- ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build --with-sdk ../dotnet
+ sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/runtime.common.props
+ # FIXME remove contineuonprebuilterror
+ ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true
+ ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
popd
popd
@@ -114,11 +110,12 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
+rm -rf .dotnet
find -type f -iname '*.tar.gz' -delete
-rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
-find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
+rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*
+find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r
rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
-find src/coreclr.*/ -depth -name tests -print0 | xargs -0 rm -r
+find src/runtime.*/ -depth -name tests -print0 | xargs -0 rm -r
popd
tar czf "${tarball_name}.tar.gz" "${tarball_name}"
diff --git a/copr-build b/copr-build
new file mode 100755
index 0000000..8a7cf46
--- /dev/null
+++ b/copr-build
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -euo pipefail
+
+set -x
+
+fedpkg --release f32 srpm 2>&1 | tee fedpkg.output
+
+srpm_name=$(grep 'Wrote: ' fedpkg.output | cut -d' ' -f 2)
+
+copr-cli build @dotnet-sig/dotnet-preview "${srpm_name}"
diff --git a/core-setup-hardening-flags.patch b/core-setup-hardening-flags.patch
deleted file mode 100644
index 3f6b91c..0000000
--- a/core-setup-hardening-flags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/src/settings.cmake b/src/settings.cmake
---- a/src/settings.cmake
-+++ b/src/settings.cmake
-@@ -218,6 +218,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic -Bsymbolic-functions")
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1")
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
- add_compile_options(-fstack-protector-strong)
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- add_compile_options(-fstack-protector)
diff --git a/coreclr-hardening-flags.patch b/coreclr-hardening-flags.patch
deleted file mode 100644
index d58d735..0000000
--- a/coreclr-hardening-flags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/src/debug/createdump/CMakeLists.txt b/src/debug/createdump/CMakeLists.txt
---- a/src/debug/createdump/CMakeLists.txt
-+++ b/src/debug/createdump/CMakeLists.txt
-@@ -21,6 +21,7 @@ include_directories(BEFORE ${VM_DIR})
- add_definitions(-DPAL_STDCPP_COMPAT)
-
- add_compile_options(-fPIE)
-+add_link_options(-pie)
-
- set(CREATEDUMP_SOURCES
- createdump.cpp
diff --git a/corefx-39633-cgroupv2-mountpoints.patch b/corefx-39633-cgroupv2-mountpoints.patch
deleted file mode 100644
index 34fbecb..0000000
--- a/corefx-39633-cgroupv2-mountpoints.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 1864630f762160e1cb439362cc0577471624192a Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Fri, 19 Jul 2019 19:18:51 -0400
-Subject: [PATCH] Fix up cgroup2fs in Interop.MountPoints.FormatInfo
-
-`stat -fc %T /sys/fs/cgroup` calls this file system `cgroup2fs`
-
-Add the cgroup2fs file system magic number. Available from:
-
- - https://www.kernel.org/doc/Documentation/cgroup-v2.txt
- - man 2 statfs
-
-Move cgroup2fs next to cgroupfs in the drive type list, since it is also
-DriveType.Ram.
----
- .../Unix/System.Native/Interop.MountPoints.FormatInfo.cs | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
-index af38a2285ba2..4240bd4853ab 100644
---- a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
-+++ b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
-@@ -47,6 +47,7 @@ internal enum UnixFileSystemTypes : long
- btrfs = 0x9123683E,
- ceph = 0x00C36400,
- cgroupfs = 0x0027E0EB,
-+ cgroup2fs = 0x63677270,
- cifs = 0xFF534D42,
- coda = 0x73757245,
- coherent = 0x012FF7B7,
-@@ -231,7 +232,6 @@ private static DriveType GetDriveType(string fileSystemName)
- case "bpf_fs":
- case "btrfs":
- case "btrfs_test":
-- case "cgroup2fs":
- case "coh":
- case "daxfs":
- case "drvfs":
-@@ -384,6 +384,7 @@ private static DriveType GetDriveType(string fileSystemName)
- case "binfmt_misc":
- case "cgroup":
- case "cgroupfs":
-+ case "cgroup2fs":
- case "configfs":
- case "cramfs":
- case "cramfs-wend":
diff --git a/corefx-39686-cgroupv2-01.patch b/corefx-39686-cgroupv2-01.patch
deleted file mode 100644
index e7628e2..0000000
--- a/corefx-39686-cgroupv2-01.patch
+++ /dev/null
@@ -1,391 +0,0 @@
-From 2b2273ea4ea1c28472fa0d6ad2ffeb6374500550 Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Wed, 23 Oct 2019 17:45:59 -0400
-Subject: [PATCH 1/2] Add cgroup v2 support to Interop.cgroups
-
-Fix up code to adjust cgroup v1 assumptions and check cgroup v2 paths,
-locations and values.
-
-Continue using the older cgroup v1 terminology for APIs.
----
- .../Interop/Linux/cgroups/Interop.cgroups.cs | 116 ++++++++++++++----
- src/Common/tests/Common.Tests.csproj | 4 +
- .../tests/Tests/Interop/cgroupsTests.cs | 107 ++++++++++++++++
- .../tests/DescriptionNameTests.cs | 2 +-
- 4 files changed, 206 insertions(+), 23 deletions(-)
- create mode 100644 src/Common/tests/Tests/Interop/cgroupsTests.cs
-
-diff --git a/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs b/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
-index 0ffd4d7b7c03..186fe0516c5b 100644
---- a/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
-+++ b/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
-@@ -9,17 +9,22 @@
-
- internal static partial class Interop
- {
-+ /// <summary>Provides access to some cgroup (v1 and v2) features</summary>
- internal static partial class cgroups
- {
-+ // For cgroup v1, see https://www.kernel.org/doc/Documentation/cgroup-v1/
-+ // For cgroup v2, see https://www.kernel.org/doc/Documentation/cgroup-v2.txt
-+
-+ /// <summary>The version of cgroup that's being used </summary>
-+ internal enum CGroupVersion { None, CGroup1, CGroup2 };
-+
- /// <summary>Path to mountinfo file in procfs for the current process.</summary>
- private const string ProcMountInfoFilePath = "/proc/self/mountinfo";
- /// <summary>Path to cgroup directory in procfs for the current process.</summary>
- private const string ProcCGroupFilePath = "/proc/self/cgroup";
-
-- /// <summary>Path to the found cgroup location, or null if it couldn't be found.</summary>
-- internal static readonly string s_cgroupMemoryPath = FindCGroupPath("memory");
-- /// <summary>Path to the found cgroup memory limit_in_bytes path, or null if it couldn't be found.</summary>
-- private static readonly string s_cgroupMemoryLimitPath = s_cgroupMemoryPath != null ? s_cgroupMemoryPath + "/memory.limit_in_bytes" : null;
-+ /// <summary>Path to the found cgroup memory limit path, or null if it couldn't be found.</summary>
-+ internal static readonly string s_cgroupMemoryLimitPath = FindCGroupMemoryLimitPath();
-
- /// <summary>Tries to read the memory limit from the cgroup memory location.</summary>
- /// <param name="limit">The read limit, or 0 if it couldn't be read.</param>
-@@ -42,7 +47,7 @@ public static bool TryGetMemoryLimit(out ulong limit)
- /// <param name="path">The path to the file to parse.</param>
- /// <param name="result">The parsed result, or 0 if it couldn't be parsed.</param>
- /// <returns>true if the value was read successfully; otherwise, false.</returns>
-- private static bool TryReadMemoryValueFromFile(string path, out ulong result)
-+ internal static bool TryReadMemoryValueFromFile(string path, out ulong result)
- {
- if (File.Exists(path))
- {
-@@ -79,6 +84,11 @@ private static bool TryReadMemoryValueFromFile(string path, out ulong result)
- result = checked(ulongValue * multiplier);
- return true;
- }
-+
-+ // 'max' is also a possible valid value
-+ //
-+ // Treat this as 'no memory limit' and let the caller
-+ // fallback to reading the real limit via other means
- }
- catch (Exception e)
- {
-@@ -90,12 +100,35 @@ private static bool TryReadMemoryValueFromFile(string path, out ulong result)
- return false;
- }
-
-+ /// <summary>Find the cgroup memory limit path.</summary>
-+ /// <returns>The limit path if found; otherwise, null.</returns>
-+ private static string FindCGroupMemoryLimitPath()
-+ {
-+ string cgroupMemoryPath = FindCGroupPath("memory", out CGroupVersion version);
-+ if (cgroupMemoryPath != null)
-+ {
-+ if (version == CGroupVersion.CGroup1)
-+ {
-+ return cgroupMemoryPath + "/memory.limit_in_bytes";
-+ }
-+
-+ if (version == CGroupVersion.CGroup2)
-+ {
-+ // 'memory.high' is a soft limit; the process may get throttled
-+ // 'memory.max' is where OOM killer kicks in
-+ return cgroupMemoryPath + "/memory.max";
-+ }
-+ }
-+
-+ return null;
-+ }
-+
- /// <summary>Find the cgroup path for the specified subsystem.</summary>
- /// <param name="subsystem">The subsystem, e.g. "memory".</param>
- /// <returns>The cgroup path if found; otherwise, null.</returns>
-- private static string FindCGroupPath(string subsystem)
-+ private static string FindCGroupPath(string subsystem, out CGroupVersion version)
- {
-- if (TryFindHierarchyMount(subsystem, out string hierarchyRoot, out string hierarchyMount) &&
-+ if (TryFindHierarchyMount(subsystem, out version, out string hierarchyRoot, out string hierarchyMount) &&
- TryFindCGroupPathForSubsystem(subsystem, out string cgroupPathRelativeToMount))
- {
- // For a host cgroup, we need to append the relative path.
-@@ -113,19 +146,24 @@ private static string FindCGroupPath(string subsystem)
- /// <param name="root">The path of the directory in the filesystem which forms the root of this mount; null if not found.</param>
- /// <param name="path">The path of the mount point relative to the process's root directory; null if not found.</param>
- /// <returns>true if the mount was found; otherwise, null.</returns>
-- private static bool TryFindHierarchyMount(string subsystem, out string root, out string path)
-+ private static bool TryFindHierarchyMount(string subsystem, out CGroupVersion version, out string root, out string path)
- {
-- if (File.Exists(ProcMountInfoFilePath))
-+ return TryFindHierarchyMount(ProcMountInfoFilePath, subsystem, out version, out root, out path);
-+ }
-+
-+ internal static bool TryFindHierarchyMount(string mountInfoFilePath, string subsystem, out CGroupVersion version, out string root, out string path)
-+ {
-+ if (File.Exists(mountInfoFilePath))
- {
- try
- {
-- using (var reader = new StreamReader(ProcMountInfoFilePath))
-+ using (var reader = new StreamReader(mountInfoFilePath))
- {
- string line;
- while ((line = reader.ReadLine()) != null)
- {
- // Look for an entry that has cgroup as the "filesystem type"
-- // and that has options containing the specified subsystem.
-+ // and, for cgroup1, that has options containing the specified subsystem
- // See man page for /proc/[pid]/mountinfo for details, e.g.:
- // (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
- // 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
-@@ -148,17 +186,35 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
- continue;
- }
-
-- if (postSeparatorlineParts[0] != "cgroup" ||
-- Array.IndexOf(postSeparatorlineParts[2].Split(','), subsystem) < 0)
-+ bool validCGroup1Entry = ((postSeparatorlineParts[0] == "cgroup") &&
-+ (Array.IndexOf(postSeparatorlineParts[2].Split(','), subsystem) >= 0));
-+ bool validCGroup2Entry = postSeparatorlineParts[0] == "cgroup2";
-+
-+ if (!validCGroup1Entry && !validCGroup2Entry)
- {
- // Not the relevant entry.
- continue;
- }
-
-- // Found the relevant entry. Extract the mount root and path.
-+ // Found the relevant entry. Extract the cgroup version, mount root and path.
-+ switch (postSeparatorlineParts[0])
-+ {
-+ case "cgroup":
-+ version = CGroupVersion.CGroup1;
-+ break;
-+ case "cgroup2":
-+ version = CGroupVersion.CGroup2;
-+ break;
-+ default:
-+ version = CGroupVersion.None;
-+ Debug.Fail($"invalid value for CGroupVersion \"{postSeparatorlineParts[0]}\"");
-+ break;
-+ }
-+
- string[] lineParts = line.Substring(0, endOfOptionalFields).Split(' ');
- root = lineParts[3];
- path = lineParts[4];
-+
- return true;
- }
- }
-@@ -169,6 +225,7 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
- }
- }
-
-+ version = CGroupVersion.None;
- root = null;
- path = null;
- return false;
-@@ -180,27 +237,42 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
- /// <returns></returns>
- private static bool TryFindCGroupPathForSubsystem(string subsystem, out string path)
- {
-- if (File.Exists(ProcCGroupFilePath))
-+ return TryFindCGroupPathForSubsystem(ProcCGroupFilePath, subsystem, out path);
-+ }
-+
-+ internal static bool TryFindCGroupPathForSubsystem(string procCGroupFilePath, string subsystem, out string path)
-+ {
-+ if (File.Exists(procCGroupFilePath))
- {
- try
- {
-- using (var reader = new StreamReader(ProcCGroupFilePath))
-+ using (var reader = new StreamReader(procCGroupFilePath))
- {
- string line;
- while ((line = reader.ReadLine()) != null)
- {
-- // Find the first entry that has the subsystem listed in its controller
-- // list. See man page for cgroups for /proc/[pid]/cgroups format, e.g:
-- // hierarchy-ID:controller-list:cgroup-path
-- // 5:cpuacct,cpu,cpuset:/daemons
--
- string[] lineParts = line.Split(':');
-+
- if (lineParts.Length != 3)
- {
- // Malformed line.
- continue;
- }
-
-+ // cgroup v2: Find the first entry that matches the cgroup v2 hierarchy:
-+ // 0::$PATH
-+
-+ if ((lineParts[0] == "0") && (string.Empty == lineParts[1]))
-+ {
-+ path = lineParts[2];
-+ return true;
-+ }
-+
-+ // cgroup v1: Find the first entry that has the subsystem listed in its controller
-+ // list. See man page for cgroups for /proc/[pid]/cgroups format, e.g:
-+ // hierarchy-ID:controller-list:cgroup-path
-+ // 5:cpuacct,cpu,cpuset:/daemons
-+
- if (Array.IndexOf(lineParts[1].Split(','), subsystem) < 0)
- {
- // Not the relevant entry.
-@@ -214,7 +286,7 @@ private static bool TryFindCGroupPathForSubsystem(string subsystem, out string p
- }
- catch (Exception e)
- {
-- Debug.Fail($"Failed to read or parse \"{ProcMountInfoFilePath}\": {e}");
-+ Debug.Fail($"Failed to read or parse \"{procCGroupFilePath}\": {e}");
- }
- }
-
-diff --git a/src/Common/tests/Common.Tests.csproj b/src/Common/tests/Common.Tests.csproj
-index a189d856348b..979c8dd7fbe6 100644
---- a/src/Common/tests/Common.Tests.csproj
-+++ b/src/Common/tests/Common.Tests.csproj
-@@ -12,6 +12,9 @@
- <Compile Include="$(CommonTestPath)\System\Security\Cryptography\ByteUtils.cs">
- <Link>Common\System\Security\Cryptography\ByteUtils.cs</Link>
- </Compile>
-+ <Compile Include="$(CommonPath)\Interop\Linux\cgroups\Interop.cgroups.cs">
-+ <Link>Common\Interop\Linux\cgroups\Interop.cgroups.cs</Link>
-+ </Compile>
- <Compile Include="$(CommonPath)\Interop\Linux\procfs\Interop.ProcFsStat.cs">
- <Link>Common\Interop\Linux\procfs\Interop.ProcFsStat.cs</Link>
- </Compile>
-@@ -69,6 +72,7 @@
- <Compile Include="$(CommonPath)\CoreLib\System\PasteArguments.cs">
- <Link>Common\CoreLib\System\PasteArguments.cs</Link>
- </Compile>
-+ <Compile Include="Tests\Interop\cgroupsTests.cs" />
- <Compile Include="Tests\Interop\procfsTests.cs" />
- <Compile Include="Tests\System\CharArrayHelpersTests.cs" />
- <Compile Include="Tests\System\IO\PathInternal.Tests.cs" />
-diff --git a/src/Common/tests/Tests/Interop/cgroupsTests.cs b/src/Common/tests/Tests/Interop/cgroupsTests.cs
-new file mode 100644
-index 000000000000..f16d9242879c
---- /dev/null
-+++ b/src/Common/tests/Tests/Interop/cgroupsTests.cs
-@@ -0,0 +1,107 @@
-+// Licensed to the .NET Foundation under one or more agreements.
-+// The .NET Foundation licenses this file to you under the MIT license.
-+// See the LICENSE file in the project root for more information.
-+
-+using System;
-+using System.IO;
-+using System.Text;
-+using Xunit;
-+
-+namespace Common.Tests
-+{
-+ public class cgroupsTests
-+ {
-+ [Theory]
-+ [InlineData(true, "0", 0)]
-+ [InlineData(false, "max", 0)]
-+ [InlineData(true, "1k", 1024)]
-+ [InlineData(true, "1K", 1024)]
-+ public static void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
-+ {
-+ string path = Path.GetTempFileName();
-+ try
-+ {
-+ File.WriteAllText(path, valueText);
-+
-+ bool result = Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val);
-+
-+ Assert.Equal(expectedResult, result);
-+ if (result)
-+ {
-+ Assert.Equal(expectedValue, val);
-+ }
-+ }
-+ finally
-+ {
-+ File.Delete(path);
-+ }
-+ }
-+
-+ [Theory]
-+ [InlineData(false, "0 0 0:0 / /foo ignore ignore - overlay overlay ignore", "ignore", 0, "/", "/")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "ignore", 2, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "memory", 2, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo-with-dashes ignore ignore - cgroup2 cgroup2 ignore", "ignore", 2, "/", "/foo-with-dashes")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory", "memory", 1, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo-with-dashes ignore ignore - cgroup cgroup memory", "memory", 1, "/", "/foo-with-dashes")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu,memory", "memory", 1, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory,cpu", "memory", 1, "/", "/foo")]
-+ [InlineData(false, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu", "memory", 0, "/", "/foo")]
-+ public static void ParseValidateMountInfo(bool found, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
-+ {
-+ string path = Path.GetTempFileName();
-+ try
-+ {
-+ File.WriteAllText(path, procSelfMountInfoText);
-+
-+ bool result = Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount);
-+
-+ Assert.Equal(found, result);
-+ if (found)
-+ {
-+ Assert.Equal(expectedVersion, (int)version);
-+ Assert.Equal(expectedRoot, root);
-+ Assert.Equal(expectedMount, mount);
-+ }
-+ }
-+ finally
-+ {
-+ File.Delete(path);
-+ }
-+ }
-+
-+ [Theory]
-+ [InlineData(true, "0::/foo", "ignore", "/foo")]
-+ [InlineData(true, "0::/bar", "ignore", "/bar")]
-+ [InlineData(true, "0::frob", "ignore", "frob")]
-+ [InlineData(false, "1::frob", "ignore", "ignore")]
-+ [InlineData(true, "1:foo:bar", "foo", "bar")]
-+ [InlineData(true, "2:foo:bar", "foo", "bar")]
-+ [InlineData(false, "2:foo:bar", "bar", "ignore")]
-+ [InlineData(true, "1:foo:bar\n2:eggs:spam", "foo", "bar")]
-+ [InlineData(true, "1:foo:bar\n2:eggs:spam", "eggs", "spam")]
-+ public static void ParseValidateProcCGroup(bool found, string procSelfCgroupText, string subsystem, string expectedMountPath)
-+ {
-+ string path = Path.GetTempFileName();
-+ try
-+ {
-+ File.WriteAllText(path, procSelfCgroupText);
-+
-+ bool result = Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath);
-+
-+ Assert.Equal(found, result);
-+ if (found)
-+ {
-+ Assert.Equal(expectedMountPath, mountPath);
-+ }
-+ }
-+ finally
-+ {
-+ File.Delete(path);
-+ }
-+ }
-+ }
-+}
-diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
-index 910af2fd82b4..73f692898dbc 100644
---- a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
-+++ b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
-@@ -40,7 +40,7 @@ public void DumpRuntimeInformationToConsole()
-
- Console.WriteLine($"### CURRENT DIRECTORY: {Environment.CurrentDirectory}");
-
-- string cgroupsLocation = Interop.cgroups.s_cgroupMemoryPath;
-+ string cgroupsLocation = Interop.cgroups.s_cgroupMemoryLimitPath;
- if (cgroupsLocation != null)
- {
- Console.WriteLine($"### CGROUPS MEMORY: {cgroupsLocation}");
-
diff --git a/corefx-39686-cgroupv2-02.patch b/corefx-39686-cgroupv2-02.patch
deleted file mode 100644
index 88dcd99..0000000
--- a/corefx-39686-cgroupv2-02.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-From 9a8c5e4014ffca8aff70808cc0e50a403d38c292 Mon Sep 17 00:00:00 2001
-From: Stephen Toub <stoub(a)microsoft.com>
-Date: Wed, 23 Oct 2019 20:35:49 -0400
-Subject: [PATCH 2/2] Clean up new tests
-
----
- .../tests/Tests/Interop/cgroupsTests.cs | 79 ++++++-------------
- 1 file changed, 25 insertions(+), 54 deletions(-)
-
-diff --git a/src/Common/tests/Tests/Interop/cgroupsTests.cs b/src/Common/tests/Tests/Interop/cgroupsTests.cs
-index f16d9242879c..fc6ab5c9753c 100644
---- a/src/Common/tests/Tests/Interop/cgroupsTests.cs
-+++ b/src/Common/tests/Tests/Interop/cgroupsTests.cs
-@@ -2,38 +2,27 @@
- // The .NET Foundation licenses this file to you under the MIT license.
- // See the LICENSE file in the project root for more information.
-
--using System;
- using System.IO;
--using System.Text;
- using Xunit;
-
- namespace Common.Tests
- {
-- public class cgroupsTests
-+ public class cgroupsTests : FileCleanupTestBase
- {
- [Theory]
-- [InlineData(true, "0", 0)]
-- [InlineData(false, "max", 0)]
-- [InlineData(true, "1k", 1024)]
-- [InlineData(true, "1K", 1024)]
-- public static void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
-+ [InlineData(true, "0", 0)]
-+ [InlineData(false, "max", 0)]
-+ [InlineData(true, "1k", 1024)]
-+ [InlineData(true, "1K", 1024)]
-+ public void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
- {
-- string path = Path.GetTempFileName();
-- try
-- {
-- File.WriteAllText(path, valueText);
--
-- bool result = Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val);
-+ string path = GetTestFilePath();
-+ File.WriteAllText(path, valueText);
-
-- Assert.Equal(expectedResult, result);
-- if (result)
-- {
-- Assert.Equal(expectedValue, val);
-- }
-- }
-- finally
-+ Assert.Equal(expectedResult, Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val));
-+ if (expectedResult)
- {
-- File.Delete(path);
-+ Assert.Equal(expectedValue, val);
- }
- }
-
-@@ -50,26 +39,17 @@ public static void ValidateTryReadMemoryValue(bool expectedResult, string valueT
- [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu,memory", "memory", 1, "/", "/foo")]
- [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory,cpu", "memory", 1, "/", "/foo")]
- [InlineData(false, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu", "memory", 0, "/", "/foo")]
-- public static void ParseValidateMountInfo(bool found, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
-+ public void ParseValidateMountInfo(bool expectedFound, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
- {
-- string path = Path.GetTempFileName();
-- try
-- {
-- File.WriteAllText(path, procSelfMountInfoText);
--
-- bool result = Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount);
-+ string path = GetTestFilePath();
-+ File.WriteAllText(path, procSelfMountInfoText);
-
-- Assert.Equal(found, result);
-- if (found)
-- {
-- Assert.Equal(expectedVersion, (int)version);
-- Assert.Equal(expectedRoot, root);
-- Assert.Equal(expectedMount, mount);
-- }
-- }
-- finally
-+ Assert.Equal(expectedFound, Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount));
-+ if (expectedFound)
- {
-- File.Delete(path);
-+ Assert.Equal(expectedVersion, (int)version);
-+ Assert.Equal(expectedRoot, root);
-+ Assert.Equal(expectedMount, mount);
- }
- }
-
-@@ -83,24 +63,15 @@ public static void ParseValidateMountInfo(bool found, string procSelfMountInfoTe
- [InlineData(false, "2:foo:bar", "bar", "ignore")]
- [InlineData(true, "1:foo:bar\n2:eggs:spam", "foo", "bar")]
- [InlineData(true, "1:foo:bar\n2:eggs:spam", "eggs", "spam")]
-- public static void ParseValidateProcCGroup(bool found, string procSelfCgroupText, string subsystem, string expectedMountPath)
-+ public void ParseValidateProcCGroup(bool expectedFound, string procSelfCgroupText, string subsystem, string expectedMountPath)
- {
-- string path = Path.GetTempFileName();
-- try
-- {
-- File.WriteAllText(path, procSelfCgroupText);
-+ string path = GetTestFilePath();
-+ File.WriteAllText(path, procSelfCgroupText);
-
-- bool result = Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath);
--
-- Assert.Equal(found, result);
-- if (found)
-- {
-- Assert.Equal(expectedMountPath, mountPath);
-- }
-- }
-- finally
-+ Assert.Equal(expectedFound, Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath));
-+ if (expectedFound)
- {
-- File.Delete(path);
-+ Assert.Equal(expectedMountPath, mountPath);
- }
- }
- }
diff --git a/corefx-42871-fedora-33-rid.patch b/corefx-42871-fedora-33-rid.patch
deleted file mode 100644
index 2802dcd..0000000
--- a/corefx-42871-fedora-33-rid.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 6cf4ff086875eaf29381cf406ea85846d9f66178 Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Mon, 24 Feb 2020 14:11:03 -0500
-Subject: [PATCH] Add Fedora 33 runtime ids
-
-Fedora 32 is gearing up for release[1], and in-development version of
-Fedora has been offically labelled as being Fedora 33:
-
- $ podman run -it fedora:33 cat /etc/os-release
- NAME=Fedora
- VERSION="33 (Container Image)"
- ID=fedora
- VERSION_ID=33
- VERSION_CODENAME=""
- PLATFORM_ID="platform:f33"
- PRETTY_NAME="Fedora 33 (Container Image)"
- ANSI_COLOR="0;34"
- LOGO=fedora-logo-icon
- CPE_NAME="cpe:/o:fedoraproject:fedora:33"
- HOME_URL="https://fedoraproject.org/"
- DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators..."
- SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
- BUG_REPORT_URL="https://bugzilla.redhat.com/"
- REDHAT_BUGZILLA_PRODUCT="Fedora"
- REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
- REDHAT_SUPPORT_PRODUCT="Fedora"
- REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
- PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
- VARIANT="Container Image"
- VARIANT_ID=container
-
-[1] https://fedorapeople.org/groups/schedule/f-32/f-32-key-tasks.html
----
- eng/Packaging.props | 2 +-
- .../runtime.compatibility.json | 32 +++++++++++++++++++
- pkg/Microsoft.NETCore.Platforms/runtime.json | 17 ++++++++++
- .../runtimeGroups.props | 2 +-
- src/packages.builds | 3 ++
- 5 files changed, 54 insertions(+), 2 deletions(-)
-
-diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-index 1e5c380a7a6a..c20e35394d6b 100644
---- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-+++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-@@ -953,6 +953,38 @@
- "any",
- "base"
- ],
-+ "fedora.33": [
-+ "fedora.33",
-+ "fedora",
-+ "linux",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
-+ "fedora.33-arm64": [
-+ "fedora.33-arm64",
-+ "fedora.33",
-+ "fedora-arm64",
-+ "fedora",
-+ "linux-arm64",
-+ "linux",
-+ "unix-arm64",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
-+ "fedora.33-x64": [
-+ "fedora.33-x64",
-+ "fedora.33",
-+ "fedora-x64",
-+ "fedora",
-+ "linux-x64",
-+ "linux",
-+ "unix-x64",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
- "freebsd": [
- "freebsd",
- "unix",
-diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json
-index b2f286ea2479..b3380ecbbef3 100644
---- a/pkg/Microsoft.NETCore.Platforms/runtime.json
-+++ b/pkg/Microsoft.NETCore.Platforms/runtime.json
-@@ -488,6 +488,23 @@
- "fedora-x64"
- ]
- },
-+ "fedora.33": {
-+ "#import": [
-+ "fedora"
-+ ]
-+ },
-+ "fedora.33-arm64": {
-+ "#import": [
-+ "fedora.33",
-+ "fedora-arm64"
-+ ]
-+ },
-+ "fedora.33-x64": {
-+ "#import": [
-+ "fedora.33",
-+ "fedora-x64"
-+ ]
-+ },
- "freebsd": {
- "#import": [
- "unix"
-diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-index eeb8130b54fb..da48e5f9d09f 100644
---- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-+++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-@@ -43,7 +43,7 @@
- <RuntimeGroup Include="fedora">
- <Parent>linux</Parent>
- <Architectures>x64;arm64</Architectures>
-- <Versions>23;24;25;26;27;28;29;30;31;32</Versions>
-+ <Versions>23;24;25;26;27;28;29;30;31;32;33</Versions>
- <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
- </RuntimeGroup>
-
diff --git a/corefx-42900-clang-10.patch b/corefx-42900-clang-10.patch
deleted file mode 100644
index b898f34..0000000
--- a/corefx-42900-clang-10.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 58d6cd09bd2d5b1085c6572c1d97b8533cf8294b Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Fri, 3 Apr 2020 13:53:09 -0400
-Subject: [PATCH] Fix corefx to build on clang 10
-
-Clang 10 adds/enables new warnings, some of which is affecting
-the corefx code.
-
-Clang 10 has added -Walloca to warn about uses of alloca. This commit
-replaces the only non-compliant use of that with a single fixed
-stack-allocated buffer.
-
-Clang 10 has also added -Wimplicit-int-float-conversion. This commit
-uses explicit casts to double to avoid the warnings.
-
-This is a backport of dotnet/runtime#33734 to corefx.
-
-After this commit, I can build all of corefx with Clang 10.
----
- src/Native/Unix/System.Native/pal_io.c | 20 +++++++++++---------
- src/Native/Unix/System.Native/pal_time.c | 2 +-
- 2 files changed, 12 insertions(+), 10 deletions(-)
-
-diff --git a/src/Native/Unix/System.Native/pal_io.c b/src/Native/Unix/System.Native/pal_io.c
-index 2d51edacf5ee..c7c42eb3e72b 100644
---- a/src/Native/Unix/System.Native/pal_io.c
-+++ b/src/Native/Unix/System.Native/pal_io.c
-@@ -906,18 +906,20 @@ int32_t SystemNative_Poll(PollEvent* pollEvents, uint32_t eventCount, int32_t mi
- return Error_EINVAL;
- }
-
-- size_t bufferSize;
-- if (!multiply_s(sizeof(struct pollfd), (size_t)eventCount, &bufferSize))
-+ struct pollfd stackBuffer[(uint32_t)(2048/sizeof(struct pollfd))];
-+ int useStackBuffer = eventCount <= (sizeof(stackBuffer)/sizeof(stackBuffer[0]));
-+ struct pollfd* pollfds = NULL;
-+ if (useStackBuffer)
- {
-- return SystemNative_ConvertErrorPlatformToPal(EOVERFLOW);
-+ pollfds = (struct pollfd*)&stackBuffer[0];
- }
--
--
-- int useStackBuffer = bufferSize <= 2048;
-- struct pollfd* pollfds = (struct pollfd*)(useStackBuffer ? alloca(bufferSize) : malloc(bufferSize));
-- if (pollfds == NULL)
-+ else
- {
-- return Error_ENOMEM;
-+ pollfds = (struct pollfd*)calloc(eventCount, sizeof(*pollfds));
-+ if (pollfds == NULL)
-+ {
-+ return Error_ENOMEM;
-+ }
- }
-
- for (uint32_t i = 0; i < eventCount; i++)
-diff --git a/src/Native/Unix/System.Native/pal_time.c b/src/Native/Unix/System.Native/pal_time.c
-index 1a7c862749d1..54ebde60a83b 100644
---- a/src/Native/Unix/System.Native/pal_time.c
-+++ b/src/Native/Unix/System.Native/pal_time.c
-@@ -169,7 +169,7 @@ int32_t SystemNative_GetCpuUtilization(ProcessCpuInformation* previousCpuInfo)
- uint64_t resolution = SystemNative_GetTimestampResolution();
- uint64_t timestamp = SystemNative_GetTimestamp();
-
-- uint64_t currentTime = (uint64_t)(timestamp * ((double)SecondsToNanoSeconds / resolution));
-+ uint64_t currentTime = (uint64_t)((double)timestamp * ((double)SecondsToNanoSeconds / (double)resolution));
-
- uint64_t lastRecordedCurrentTime = previousCpuInfo->lastRecordedCurrentTime;
- uint64_t lastRecordedKernelTime = previousCpuInfo->lastRecordedKernelTime;
diff --git a/corefx-optflags-support.patch b/corefx-optflags-support.patch
deleted file mode 100644
index 9b08f1f..0000000
--- a/corefx-optflags-support.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/src/Native/Unix/CMakeLists.txt b/src/Native/Unix/CMakeLists.txt
-index 7d804a1e54..717c2718d7 100644
---- a/src/Native/Unix/CMakeLists.txt
-+++ b/src/Native/Unix/CMakeLists.txt
-@@ -25,7 +25,7 @@ add_compile_options(-fPIC)
- add_compile_options(-Wthread-safety)
- add_compile_options(-Wno-thread-safety-analysis)
-+ add_compile_options(-Wno-alloca)
- endif()
--add_compile_options(-Werror)
-
- if(CMAKE_SYSTEM_NAME STREQUAL Emscripten)
- set(CLR_CMAKE_PLATFORM_WASM 1)
-diff --git a/src/Native/Unix/configure.cmake b/src/Native/Unix/configure.cmake
-index f4a30ad6cb..f2db68402a 100644
---- a/src/Native/Unix/configure.cmake
-+++ b/src/Native/Unix/configure.cmake
-@@ -27,6 +27,12 @@ else ()
- message(FATAL_ERROR "Unknown platform. Cannot define PAL_UNIX_NAME, used by RuntimeInformation.")
- endif ()
-
-+
-+set (PREVIOUS_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-+set (CMAKE_CXX_FLAGS "-D_GNU_SOURCE")
-+set (PREVIOUS_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
-+set (CMAKE_C_FLAGS "-D_GNU_SOURCE")
-+
- # We compile with -Werror, so we need to make sure these code fragments compile without warnings.
- # Older CMake versions (3.8) do not assign the result of their tests, causing unused-value errors
- # which are not distinguished from the test failing. So no error for that one.
-@@ -698,6 +704,9 @@ endif()
-
- set (CMAKE_REQUIRED_LIBRARIES)
-
-+set (CMAKE_CXX_FLAGS "${PREVIOUS_CMAKE_CXX_FLAGS}")
-+set (CMAKE_C_FLAGS "${PREVIOUS_CMAKE_C_FLAGS}")
-+
- check_c_source_compiles(
- "
- #include <sys/inotify.h>
diff --git a/dotnet3.1.spec b/dotnet5.0.spec
similarity index 79%
rename from dotnet3.1.spec
rename to dotnet5.0.spec
index 44ff8fb..49221a4 100644
--- a/dotnet3.1.spec
+++ b/dotnet5.0.spec
@@ -1,4 +1,4 @@
-%bcond_with bootstrap
+%bcond_without bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -20,18 +20,20 @@
%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-%global host_version 3.1.3
-%global runtime_version 3.1.3
-%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 3.1.103
-# upstream respun this release, so the tag doesn't exactly match
-%global src_version %{sdk_version}.2
-%global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
+%global host_version 5.0.0-preview.4.20251.6
+%global runtime_version 5.0.0-preview.4.20251.6
+%global aspnetcore_runtime_version 5.0.0-preview.4.20257.10
+%global sdk_version 5.0.100-preview.4.20161.13
+%global templates_version 5.0.0-preview.4.20161.13
+#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
-%global host_rpm_version %{host_version}
-%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
-%global runtime_rpm_version %{runtime_version}
-%global sdk_rpm_version %{sdk_version}
+%global host_rpm_version 5.0.0
+%global aspnetcore_runtime_rpm_version 5.0.0
+%global runtime_rpm_version 5.0.0
+%global sdk_rpm_version 5.0.100
+
+# upstream can update releases without revving the SDK version so these don't always match
+%global src_version %{sdk_rpm_version}
%if 0%{?fedora} || 0%{?rhel} < 8
%global use_bundled_libunwind 0
@@ -39,6 +41,10 @@
%global use_bundled_libunwind 1
%endif
+%ifarch aarch64
+%global use_bundled_libunwind 1
+%endif
+
%ifarch x86_64
%global runtime_arch x64
%endif
@@ -56,42 +62,34 @@
%endif
%endif
-Name: dotnet3.1
+Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 0.2.preview4%{?dist}
Summary: .NET Core Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-SDK.tar.gz
+Source0: dotnet-v%{src_version}-preview4-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
-# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
-Patch100: corefx-optflags-support.patch
-
-# Add some support for cgroupv2 in corefx
-# All these patches are upstreamed for 5.0
-Patch101: corefx-39686-cgroupv2-01.patch
-Patch102: corefx-39686-cgroupv2-02.patch
-Patch103: corefx-39633-cgroupv2-mountpoints.patch
+# dotnet/runtime PR 39044
+Patch100: runtime-39044-cmake-downgrade.patch
-# Add Fedora 33 RID to corefx
-Patch104: corefx-42871-fedora-33-rid.patch
+# TODO: upstream this patch
+# Do not strip debuginfo from (native/unmanaged) binaries
+Patch101: runtime-dont-strip.patch
-# Build with with hardening flags, including -pie
-Patch200: coreclr-hardening-flags.patch
-# Fix build with clang 10; Already applied at tarball-build time
-# Patch201: coreclr-clang10.patch
-
-# Build with with hardening flags, including -pie
-Patch300: core-setup-hardening-flags.patch
+# TODO: upstream this patch
+# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
+Patch102: runtime-flags-support.patch
# Disable telemetry by default; make it opt-in
-Patch500: cli-telemetry-optout.patch
+Patch500: sdk-telemetry-optout.patch
+# ExclusiveArch: aarch64 x86_64
ExclusiveArch: x86_64
BuildRequires: clang
@@ -99,8 +97,8 @@ BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
BuildRequires: dotnet-build-reference-packages
-BuildRequires: dotnet-sdk-3.1
-BuildRequires: dotnet-sdk-3.1-source-built-artifacts
+BuildRequires: dotnet-sdk-5.0
+BuildRequires: dotnet-sdk-5.0-source-built-artifacts
%endif
BuildRequires: findutils
BuildRequires: git
@@ -141,7 +139,7 @@ application to drive everything.
Version: %{sdk_rpm_version}
Summary: .NET Core CLI tools and runtime
-Requires: dotnet-sdk-3.1%{?_isa} >= %{sdk_rpm_version}-%{release}
+Requires: dotnet-sdk-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
%description -n dotnet
.NET Core is a fast, lightweight and modular platform for creating
@@ -171,7 +169,7 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-hostfxr-3.1
+%package -n dotnet-hostfxr-5.0
Version: %{host_rpm_version}
Summary: .NET Core command line host resolver
@@ -180,7 +178,7 @@ Summary: .NET Core command line host resolver
# provided by this package, or from a newer version of .NET Core
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
-%description -n dotnet-hostfxr-3.1
+%description -n dotnet-hostfxr-5.0
The .NET Core host resolver contains the logic to resolve and select
the right version of the .NET Core SDK or runtime to use.
@@ -191,12 +189,12 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-runtime-3.1
+%package -n dotnet-runtime-5.0
Version: %{runtime_rpm_version}
-Summary: NET Core 3.1 runtime
+Summary: NET Core 5.0 runtime
-Requires: dotnet-hostfxr-3.1%{?_isa} >= %{host_rpm_version}-%{release}
+Requires: dotnet-hostfxr-5.0%{?_isa} >= %{host_rpm_version}-%{release}
# libicu is dlopen()ed
Requires: libicu%{?_isa}
@@ -205,7 +203,7 @@ Requires: libicu%{?_isa}
Provides: bundled(libunwind) = 1.3
%endif
-%description -n dotnet-runtime-3.1
+%description -n dotnet-runtime-5.0
The .NET Core runtime contains everything needed to run .NET Core applications.
It includes a high performance Virtual Machine as well as the framework
libraries used by .NET Core applications.
@@ -217,14 +215,14 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n aspnetcore-runtime-3.1
+%package -n aspnetcore-runtime-5.0
Version: %{aspnetcore_runtime_rpm_version}
-Summary: ASP.NET Core 3.1 runtime
+Summary: ASP.NET Core 5.0 runtime
-Requires: dotnet-runtime-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: dotnet-runtime-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
-%description -n aspnetcore-runtime-3.1
+%description -n aspnetcore-runtime-5.0
The ASP.NET Core runtime contains everything needed to run .NET Core
web applications. It includes a high performance Virtual Machine as
well as the framework libraries used by .NET Core applications.
@@ -236,16 +234,16 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-templates-3.1
+%package -n dotnet-templates-5.0
Version: %{sdk_rpm_version}
-Summary: .NET Core 3.1 templates
+Summary: .NET Core 5.0 templates
# Theoretically any version of the host should work. But lets aim for the one
# provided by this package, or from a newer version of .NET Core
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
-%description -n dotnet-templates-3.1
+%description -n dotnet-templates-5.0
This package contains templates used by the .NET Core SDK.
ASP.NET Core is a fast, lightweight and modular platform for creating
@@ -255,25 +253,25 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-sdk-3.1
+%package -n dotnet-sdk-5.0
Version: %{sdk_rpm_version}
-Summary: .NET Core 3.1 Software Development Kit
+Summary: .NET Core 5.0 Software Development Kit
Provides: bundled(js-jquery)
Provides: bundled(npm)
-Requires: dotnet-runtime-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: aspnetcore-runtime-3.1%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+Requires: dotnet-runtime-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-runtime-5.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
-Requires: dotnet-apphost-pack-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: dotnet-targeting-pack-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: aspnetcore-targeting-pack-3.1%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+Requires: dotnet-apphost-pack-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: dotnet-targeting-pack-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-targeting-pack-5.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
Requires: netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{release}
-Requires: dotnet-templates-3.1%{?_isa} >= %{sdk_rpm_version}-%{release}
+Requires: dotnet-templates-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
-%description -n dotnet-sdk-3.1
+%description -n dotnet-sdk-5.0
The .NET Core SDK is a collection of command line applications to
create, build, publish and run .NET Core applications.
@@ -302,18 +300,18 @@ applications using the .NET Core SDK.
%{_libdir}/dotnet/packs/%{5}
}
-%dotnet_targeting_pack dotnet-apphost-pack-3.1 %{runtime_rpm_version} Microsoft.NETCore.App 3.1 Microsoft.NETCore.App.Host.%{runtime_id}
-%dotnet_targeting_pack dotnet-targeting-pack-3.1 %{runtime_rpm_version} Microsoft.NETCore.App 3.1 Microsoft.NETCore.App.Ref
-%dotnet_targeting_pack aspnetcore-targeting-pack-3.1 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 3.1 Microsoft.AspNetCore.App.Ref
+%dotnet_targeting_pack dotnet-apphost-pack-5.0 %{runtime_rpm_version} Microsoft.NETCore.App 5.0 Microsoft.NETCore.App.Host.%{runtime_id}
+%dotnet_targeting_pack dotnet-targeting-pack-5.0 %{runtime_rpm_version} Microsoft.NETCore.App 5.0 Microsoft.NETCore.App.Ref
+%dotnet_targeting_pack aspnetcore-targeting-pack-5.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 5.0 Microsoft.AspNetCore.App.Ref
%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref
-%package -n dotnet-sdk-3.1-source-built-artifacts
+%package -n dotnet-sdk-5.0-source-built-artifacts
Version: %{sdk_rpm_version}
-Summary: Internal package for building .NET Core 3.1 Software Development Kit
+Summary: Internal package for building .NET Core 5.0 Software Development Kit
-%description -n dotnet-sdk-3.1-source-built-artifacts
+%description -n dotnet-sdk-5.0-source-built-artifacts
The .NET Core source-built archive is a collection of packages needed
to build the .NET Core SDK itself.
@@ -321,7 +319,7 @@ These are not meant for general use.
%prep
-%setup -q -n dotnet-v%{src_version}-SDK
+%setup -q -n dotnet-v%{src_version}-preview4-SDK
%if %{without bootstrap}
# Remove all prebuilts
@@ -331,49 +329,43 @@ find -iname '*.tar.gz' -type f -delete
find -iname '*.nupkg' -type f -delete
find -iname '*.zip' -type f -delete
rm -rf .dotnet/
-rm -r packages/source-built
+rm -rf packages/source-built
%endif
%if %{without bootstrap}
-sed -i -e 's|3.1.100-preview1-014459|3.1.102|' global.json
+sed -i -e 's|5.0.100-preview1-014459|5.0.103|' global.json
mkdir -p packages/archive
ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
%endif
# Fix bad hardcoded path in build
-sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/core-setup.*/src/corehost/common/pal.unix.cpp
+sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/corehost/cli/hostmisc/pal.unix.cpp
# Disable warnings
-sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.proj
+sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
-pushd src/corefx.*
+pushd src/runtime.*
%patch100 -p1
%patch101 -p1
%patch102 -p1
-%patch103 -p1
-%patch104 -p1
-popd
-
-pushd src/coreclr.*
-%patch200 -p1
-#%%patch201 -p1
popd
-pushd src/core-setup.*
-%patch300 -p1
-popd
-
-pushd src/cli.*
+pushd src/sdk.*
%patch500 -p1
popd
# If CLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE is misisng, add it back
-grep CLR_CMAKE_USE_SYSTEM_LIBUNWIND repos/coreclr.proj || \
- sed -i 's|\$(BuildArguments) </BuildArguments>|$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments>|' repos/coreclr.proj
+grep CLR_CMAKE_USE_SYSTEM_LIBUNWIND repos/runtime.common.props || \
+ sed -i 's|\$(BuildArguments) </BuildArguments>|$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments>|' repos/runtime.common.props
%if %{use_bundled_libunwind}
-sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/coreclr.proj
+sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/runtime.common.props
+%endif
+
+%ifnarch x86_64
+mkdir -p artifacts/obj/%{runtime_arch}/Release
+cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
%endif
cat source-build-info.txt
@@ -389,9 +381,9 @@ cat /etc/os-release
cp -a %{_libdir}/dotnet previously-built-dotnet
%endif
-export CFLAGS="%{dotnet_cflags}"
-export CXXFLAGS="%{dotnet_cflags}"
-export LDFLAGS="%{dotnet_ldflags}"
+export EXTRA_CFLAGS="%{dotnet_cflags}"
+export EXTRA_CXXFLAGS="%{dotnet_cflags}"
+export EXTRA_LDFLAGS="%%{dotnet_ldflags}"
#%%if %%{without bootstrap}
# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
@@ -416,11 +408,11 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
-ls bin/%{runtime_arch}/Release
-tar xf bin/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
+ls artifacts/%{runtime_arch}/Release
+tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_rpm_version}-preview.4.20161.13-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
# Install managed symbols
-tar xf bin/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
+tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
-C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
# Fix executable permissions on files
@@ -439,7 +431,7 @@ install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
install -dm 0755 %{buildroot}/%{_datadir}/bash-completion/completions
# dynamic completion needs the file to be named the same as the base command
-install src/cli.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
+install src/sdk.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
# TODO: the zsh completion script needs to be ported to use #compdef
#install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions
@@ -455,8 +447,8 @@ echo "%{_libdir}/dotnet" >> install_location
install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
install install_location %{buildroot}%{_sysconfdir}/dotnet/
-install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
-install bin/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+#install -dm 0755 %%{buildroot}%%{_libdir}/dotnet/source-built-artifacts
+#install artifacts/%%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %%{buildroot}/%%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
@@ -487,35 +479,60 @@ echo "Testing build results for debug symbols..."
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/dotnet
-%files -n dotnet-hostfxr-3.1
+%files -n dotnet-hostfxr-5.0
%dir %{_libdir}/dotnet/host/fxr
%{_libdir}/dotnet/host/fxr/%{host_version}
-%files -n dotnet-runtime-3.1
+%files -n dotnet-runtime-5.0
%dir %{_libdir}/dotnet/shared
%dir %{_libdir}/dotnet/shared/Microsoft.NETCore.App
%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}
-%files -n aspnetcore-runtime-3.1
+%files -n aspnetcore-runtime-5.0
%dir %{_libdir}/dotnet/shared
%dir %{_libdir}/dotnet/shared/Microsoft.AspNetCore.App
%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}
-%files -n dotnet-templates-3.1
+%files -n dotnet-templates-5.0
%dir %{_libdir}/dotnet/templates
%{_libdir}/dotnet/templates/%{templates_version}
-%files -n dotnet-sdk-3.1
+%files -n dotnet-sdk-5.0
%dir %{_libdir}/dotnet/sdk
%{_libdir}/dotnet/sdk/%{sdk_version}
%dir %{_libdir}/dotnet/packs
-%files -n dotnet-sdk-3.1-source-built-artifacts
-%dir %{_libdir}/dotnet
-%{_libdir}/dotnet/source-built-artifacts
+#%%files -n dotnet-sdk-5.0-source-built-artifacts
+#%%dir %%{_libdir}/dotnet
+#%%{_libdir}/dotnet/source-built-artifacts
%changelog
+* Fri Jul 10 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.2.preview4
+- Fix building with custom CFLAGS/CXXFLAGS/LDFLAGS
+- Clean up patches
+
+* Mon Jul 06 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.1.preview4
+- Initial build
+
+* Sat Jun 27 2020 Omair Majid <omajid(a)redhat.com> - 3.1.105-4
+- Disable bootstrap
+
+* Fri Jun 26 2020 Omair Majid <omajid(a)redhat.com> - 3.1.105-3
+- Re-bootstrap aarch64
+
+* Fri Jun 19 2020 Omair Majid <omajid(a)redhat.com> - 3.1.105-3
+- Disable bootstrap
+
+* Thu Jun 18 2020 Omair Majid <omajid(a)redhat.com> - 3.1.105-1
+- Bootstrap aarch64
+
+* Tue Jun 16 2020 Chris Rummel <crummel(a)microsoft.com> - 3.1.105-1
+- Update to .NET Core Runtime 3.1.5 and SDK 3.1.105
+
+* Fri Jun 05 2020 Chris Rummel <crummel(a)microsoft.com> - 3.1.104-1
+- Update to .NET Core Runtime 3.1.4 and SDK 3.1.104
+
* Thu Apr 09 2020 Chris Rummel <crummel(a)microsoft.com> - 3.1.103-1
- Update to .NET Core Runtime 3.1.3 and SDK 3.1.103
@@ -716,4 +733,3 @@ echo "Testing build results for debug symbols..."
- SPEC file cleanup
* Wed Jan 11 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-0
- Initial RPM for Fedora 25/26.
-
diff --git a/runtime-39044-cmake-downgrade.patch b/runtime-39044-cmake-downgrade.patch
new file mode 100644
index 0000000..71938d0
--- /dev/null
+++ b/runtime-39044-cmake-downgrade.patch
@@ -0,0 +1,1158 @@
+diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
+index 534f1d19de6..50d81842274 100644
+--- a/eng/common/cross/toolchain.cmake
++++ b/eng/common/cross/toolchain.cmake
+@@ -83,15 +83,26 @@ endif()
+
+ # Specify link flags
+
++function(add_toolchain_linker_flag Flag)
++ set(Config "${ARGV1}")
++ set(CONFIG_SUFFIX "")
++ if (NOT Config STREQUAL "")
++ set(CONFIG_SUFFIX "_${Config}")
++ endif()
++ set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
++ set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
++endfunction()
++
++
+ if(TARGET_ARCH_NAME STREQUAL "armel")
+ if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
+- add_link_options("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+- add_link_options("-L${CROSS_ROOTFS}/lib")
+- add_link_options("-L${CROSS_ROOTFS}/usr/lib")
+- add_link_options("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
++ add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
++ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
++ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib")
++ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ endif()
+ elseif(TARGET_ARCH_NAME STREQUAL "x86")
+- add_link_options(-m32)
++ add_toolchain_linker_flag(-m32)
+ endif()
+
+ # Specify compile options
+diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh
+index a1a975ce177..9a0c296ff66 100755
+--- a/eng/native/build-commons.sh
++++ b/eng/native/build-commons.sh
+@@ -51,12 +51,9 @@ check_prereqs()
+ # Check presence of CMake on the path
+ command -v cmake 2>/dev/null || { echo >&2 "Please install cmake before running this script"; exit 1; }
+
+- function version { echo "$@" | awk -F. '{ printf("%d%02d%02d\n", $1,$2,$3); }'; }
+-
+- local cmake_version="$(cmake --version | awk '/^cmake version [0-9]+\.[0-9]+\.[0-9]+$/ {print $3}')"
+-
+- if [[ "$(version "$cmake_version")" -lt "$(version 3.14.2)" ]]; then
+- echo "Please install CMake 3.14.2 or newer from http://www.cmake.org/download/ or https://apt.kitware.com and ensure it is on your path."; exit 1;
++ if [[ "$__HostOS" == "OSX" ]]; then
++ # Check presence of pkg-config on the path
++ command -v pkg-config 2>/dev/null || { echo >&2 "Please install pkg-config before running this script, see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/..."; exit 1; }
+ fi
+
+ if [[ "$__UseNinja" == 1 ]]; then
+@@ -156,8 +153,8 @@ build_native()
+ cmake_command="emcmake $cmake_command"
+ fi
+
+- echo "Executing $cmake_command --build \"$intermediatesDir\" --target install -j $__NumProc"
+- $cmake_command --build "$intermediatesDir" --target install -j "$__NumProc"
++ echo "Executing $cmake_command --build \"$intermediatesDir\" --target install -- -j $__NumProc"
++ $cmake_command --build "$intermediatesDir" --target install -- -j "$__NumProc"
+ fi
+
+ local exit_code="$?"
+diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake
+index 2937916ced9..07fd6f75f6f 100644
+--- a/eng/native/configurecompiler.cmake
++++ b/eng/native/configurecompiler.cmake
+@@ -8,8 +8,6 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+-cmake_policy(SET CMP0083 NEW)
+-
+ include(CheckCXXCompilerFlag)
+
+ # "configureoptimization.cmake" must be included after CLR_CMAKE_HOST_UNIX has been set.
+@@ -40,11 +38,18 @@ set(CMAKE_CXX_FLAGS_CHECKED "")
+ set(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
+ set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "")
+
++set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "")
++set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "")
++set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "")
++set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
++set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
++set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "")
++
+ add_compile_definitions("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1>")
+ add_compile_definitions("$<$<OR:$<CONFIG:RELEASE>,$<CONFIG:RELWITHDEBINFO>>:NDEBUG;URTBLDENV_FRIENDLY=Retail>")
+
+ if (MSVC)
+- add_link_options(/GUARD:CF)
++ add_linker_flag(/GUARD:CF)
+
+ # Linker flags
+ #
+@@ -57,48 +62,51 @@ if (MSVC)
+ endif ()
+
+ #Do not create Side-by-Side Assembly Manifest
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/MANIFEST:NO>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO")
+ # can handle addresses larger than 2 gigabytes
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/LARGEADDRESSAWARE>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LARGEADDRESSAWARE")
+ #Compatible with Data Execution Prevention
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/NXCOMPAT>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NXCOMPAT")
+ #Use address space layout randomization
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/DYNAMICBASE>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DYNAMICBASE")
+ #shrink pdb size
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/PDBCOMPRESS>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /PDBCOMPRESS")
+
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/DEBUG>)
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/IGNORE:4197,4013,4254,4070,4221>)
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/SUBSYSTEM:WINDOWS,${WINDOWS_SUBSYSTEM_VERSION}>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG")
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /IGNORE:4197,4013,4254,4070,4221")
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS,${WINDOWS_SUBSYSTEM_VERSION}")
+
+ set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
+
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/DEBUG>)
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/PDBCOMPRESS>)
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/STACK:1572864>)
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /PDBCOMPRESS")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1572864")
+
+ # Debug build specific flags
+- add_link_options($<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>>:/NOVCFEATURE>)
++ set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NOVCFEATURE")
++ set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "${CMAKE_SHARED_LINKER_FLAGS_CHECKED} /NOVCFEATURE")
+
+ # Checked build specific flags
+- add_link_options($<$<CONFIG:CHECKED>:/INCREMENTAL:NO>) # prevent "warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification"
+- add_link_options($<$<CONFIG:CHECKED>:/OPT:REF>)
+- add_link_options($<$<CONFIG:CHECKED>:/OPT:NOICF>)
++ add_linker_flag(/INCREMENTAL:NO CHECKED) # prevent "warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification"
++ add_linker_flag(/OPT:REF CHECKED)
++ add_linker_flag(/OPT:NOICF CHECKED)
+
+ # Release build specific flags
+- add_link_options($<$<CONFIG:RELEASE>:/LTCG>)
+- add_link_options($<$<CONFIG:RELEASE>:/OPT:REF>)
+- add_link_options($<$<CONFIG:RELEASE>:/OPT:ICF>)
++ add_linker_flag(/LTCG RELEASE)
++ add_linker_flag(/OPT:REF RELEASE)
++ add_linker_flag(/OPT:ICF RELEASE)
++ add_linker_flag(/INCREMENTAL:NO RELEASE)
+ set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
+
+ # ReleaseWithDebugInfo build specific flags
+- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/LTCG>)
+- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/OPT:REF>)
+- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/OPT:ICF>)
++ add_linker_flag(/LTCG RELWITHDEBINFO)
++ add_linker_flag(/OPT:REF RELWITHDEBINFO)
++ add_linker_flag(/OPT:ICF RELWITHDEBINFO)
+ set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
+
+ # Force uCRT to be dynamically linked for Release build
+- add_link_options("$<$<CONFIG:RELEASE>:/NODEFAULTLIB:libucrt.lib;/DEFAULTLIB:ucrt.lib>")
++ add_linker_flag(/NODEFAULTLIB:libucrt.lib RELEASE)
++ add_linker_flag(/DEFAULTLIB:ucrt.lib RELEASE)
+
+ elseif (CLR_CMAKE_HOST_UNIX)
+ # Set the values to display when interactively configuring CMAKE_BUILD_TYPE
+@@ -157,11 +165,10 @@ elseif (CLR_CMAKE_HOST_UNIX)
+
+ # -fdata-sections -ffunction-sections: each function has own section instead of one per .o file (needed for --gc-sections)
+ # -O1: optimization level used instead of -O0 to avoid compile error "invalid operand for inline asm constraint"
+- add_compile_definitions("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:${CLR_SANITIZE_CXX_OPTIONS};-fdata-sections;--ffunction-sections;-O1>")
+- add_link_options($<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>>:${CLR_SANITIZE_LINK_OPTIONS}>)
+-
++ add_compile_options("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:${CLR_SANITIZE_CXX_OPTIONS};-fdata-sections;--ffunction-sections;-O1>")
++ add_linker_flag("${CLR_SANITIZE_LINK_OPTIONS}" DEBUG CHECKED)
+ # -Wl and --gc-sections: drop unused sections\functions (similar to Windows /Gy function-level-linking)
+- add_link_options("$<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>>:${CLR_SANITIZE_LINK_OPTIONS};-Wl,--gc-sections>")
++ add_linker_flag("-Wl,--gc-sections" DEBUG CHECKED)
+ endif ()
+ endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
+ endif(MSVC)
+@@ -173,15 +180,18 @@ endif(MSVC)
+ # ./build-native.sh cmakeargs "-DCLR_ADDITIONAL_COMPILER_OPTIONS=<...>" cmakeargs "-DCLR_ADDITIONAL_LINKER_FLAGS=<...>"
+ #
+ if(CLR_CMAKE_HOST_UNIX)
+- add_link_options(${CLR_ADDITIONAL_LINKER_FLAGS})
++ foreach(ADDTL_LINKER_FLAG ${CLR_ADDITIONAL_LINKER_FLAGS})
++ add_linker_flag(${ADDTL_LINKER_FLAG})
++ endforeach()
+ endif(CLR_CMAKE_HOST_UNIX)
+
+ if(CLR_CMAKE_HOST_LINUX)
+ add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
+- add_link_options(-Wl,--build-id=sha1 -Wl,-z,relro,-z,now)
++ add_linker_flag(-Wl,--build-id=sha1)
++ add_linker_flag(-Wl,-z,relro,-z,now)
+ elseif(CLR_CMAKE_HOST_FREEBSD)
+ add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
+- add_link_options(LINKER:--build-id=sha1)
++ add_linker_flag("-Wl,--build-id=sha1")
+ elseif(CLR_CMAKE_HOST_SUNOS)
+ set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /opt/local/include)
+ set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /opt/local/lib)
+@@ -357,7 +367,7 @@ if (CLR_CMAKE_HOST_UNIX)
+ if(CLR_CMAKE_HOST_OSX)
+ set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=10.12)
+ add_compile_options(${MACOS_VERSION_MIN_FLAGS})
+- add_link_options(${MACOS_VERSION_MIN_FLAGS})
++ add_linker_flag(${MACOS_VERSION_MIN_FLAGS})
+ endif(CLR_CMAKE_HOST_OSX)
+ endif(CLR_CMAKE_HOST_UNIX)
+
+@@ -514,7 +524,7 @@ if(CLR_CMAKE_ENABLE_CODE_COVERAGE)
+
+ add_compile_options(-fprofile-arcs)
+ add_compile_options(-ftest-coverage)
+- add_link_options(--coverage)
++ add_linker_flag(--coverage)
+ else()
+ message(FATAL_ERROR "Code coverage builds not supported on current platform")
+ endif(CLR_CMAKE_HOST_UNIX)
+diff --git a/eng/native/configureplatform.cmake b/eng/native/configureplatform.cmake
+index 1c5254d8496..4a4131cb05d 100644
+--- a/eng/native/configureplatform.cmake
++++ b/eng/native/configureplatform.cmake
+@@ -1,4 +1,3 @@
+-include(CheckPIESupported)
+ include(${CMAKE_CURRENT_LIST_DIR}/functions.cmake)
+
+ # If set, indicates that this is not an officially supported release
+@@ -363,19 +362,10 @@ if(NOT CLR_CMAKE_TARGET_EMSCRIPTEN)
+ # but since we know that PIE is supported, we can safely skip this redundant check).
+ #
+ # The default linker on Solaris also does not support PIE.
+- if(NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_SUNOS)
+- # All code we build should be compiled as position independent
+- get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
+- if("CXX" IN_LIST languages)
+- set(CLR_PIE_LANGUAGE CXX)
+- else()
+- set(CLR_PIE_LANGUAGE C)
+- endif()
+- check_pie_supported(OUTPUT_VARIABLE PIE_SUPPORT_OUTPUT LANGUAGES ${CLR_PIE_LANGUAGE})
+- if(NOT MSVC AND NOT CMAKE_${CLR_PIE_LANGUAGE}_LINK_PIE_SUPPORTED)
+- message(WARNING "PIE is not supported at link time: ${PIE_SUPPORT_OUTPUT}.\n"
+- "PIE link options will not be passed to linker.")
+- endif()
++ if(NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_SUNOS AND NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_HOST_TVOS AND NOT CLR_CMAKE_HOST_IOS AND NOT MSVC)
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
++ add_compile_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-fPIE>)
++ add_compile_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-fPIC>)
+ endif()
+
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
+index b7f8f463804..f4a96cbe35e 100644
+--- a/eng/native/functions.cmake
++++ b/eng/native/functions.cmake
+@@ -123,7 +123,7 @@ function(preprocess_compile_asm)
+ set(options "")
+ set(oneValueArgs OUTPUT_OBJECTS)
+ set(multiValueArgs ASM_FILES)
+- cmake_parse_arguments(PARSE_ARGV 0 COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}")
++ cmake_parse_arguments(COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
+
+ get_include_directories_asm(ASM_INCLUDE_DIRECTORIES)
+
+@@ -209,7 +209,7 @@ function(target_precompile_header)
+ set(options "")
+ set(oneValueArgs TARGET HEADER)
+ set(multiValueArgs ADDITIONAL_INCLUDE_DIRECTORIES)
+- cmake_parse_arguments(PARSE_ARGV 0 PRECOMPILE_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}")
++ cmake_parse_arguments(PRECOMPILE_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
+
+ if ("${PRECOMPILE_HEADERS_TARGET}" STREQUAL "")
+ message(SEND_ERROR "No target supplied to target_precompile_header.")
+@@ -321,7 +321,7 @@ endfunction()
+ function(install_clr)
+ set(oneValueArgs ADDITIONAL_DESTINATION)
+ set(multiValueArgs TARGETS)
+- cmake_parse_arguments(PARSE_ARGV 0 INSTALL_CLR "${options}" "${oneValueArgs}" "${multiValueArgs}")
++ cmake_parse_arguments(INSTALL_CLR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
+
+ if ("${INSTALL_CLR_TARGETS}" STREQUAL "")
+ message(FATAL_ERROR "At least one target must be passed to install_clr(TARGETS )")
+@@ -377,6 +377,15 @@ function(disable_pax_mprotect targetName)
+ endif()
+ endfunction()
+
++if (CMAKE_VERSION VERSION_LESS "3.12")
++ # Polyfill add_compile_definitions when it is unavailable
++ function(add_compile_definitions)
++ get_directory_property(DIR_COMPILE_DEFINITIONS COMPILE_DEFINITIONS)
++ list(APPEND DIR_COMPILE_DEFINITIONS ${ARGV})
++ set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${DIR_COMPILE_DEFINITIONS}")
++ endfunction()
++endif()
++
+ function(_add_executable)
+ if(NOT WIN32)
+ add_executable(${ARGV} ${VERSION_FILE_PATH})
+@@ -415,3 +424,16 @@ endfunction()
+ function(add_executable_clr)
+ _add_executable(${ARGV})
+ endfunction()
++
++# add_linker_flag(Flag [Config1 Config2 ...])
++function(add_linker_flag Flag)
++ if (ARGN STREQUAL "")
++ set("CMAKE_EXE_LINKER_FLAGS" "${CMAKE_EXE_LINKER_FLAGS} ${Flag}" PARENT_SCOPE)
++ set("CMAKE_SHARED_LINKER_FLAGS" "${CMAKE_SHARED_LINKER_FLAGS} ${Flag}" PARENT_SCOPE)
++ else()
++ foreach(Config ${ARGN})
++ set("CMAKE_EXE_LINKER_FLAGS_${Config}" "${CMAKE_EXE_LINKER_FLAGS_${Config}} ${Flag}" PARENT_SCOPE)
++ set("CMAKE_SHARED_LINKER_FLAGS_${Config}" "${CMAKE_SHARED_LINKER_FLAGS_${Config}} ${Flag}" PARENT_SCOPE)
++ endforeach()
++ endif()
++endfunction()
+diff --git a/eng/native/gen-buildsys.sh b/eng/native/gen-buildsys.sh
+index f27bb33e357..1b4c2e02c59 100755
+--- a/eng/native/gen-buildsys.sh
++++ b/eng/native/gen-buildsys.sh
+@@ -91,6 +91,9 @@ if [[ "$build_arch" == "wasm" ]]; then
+ cmake_command="emcmake $cmake_command"
+ fi
+
++# We have to be able to build with CMake 3.6.2, so we can't use the -S or -B options
++pushd "$3"
++
+ # Include CMAKE_USER_MAKE_RULES_OVERRIDE as uninitialized since it will hold its value in the CMake cache otherwise can cause issues when branch switching
+ $cmake_command \
+ -G "$generator" \
+@@ -98,5 +101,6 @@ $cmake_command \
+ "-DCMAKE_INSTALL_PREFIX=$__CMakeBinDir" \
+ $cmake_extra_defines \
+ $__UnprocessedCMakeArgs \
+- -S "$1" \
+- -B "$3"
++ "$1"
++
++popd
+diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt
+index 5fa572c4fcd..071ac2cf5fa 100644
+--- a/src/coreclr/CMakeLists.txt
++++ b/src/coreclr/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.14.2)
++cmake_minimum_required(VERSION 3.6.2)
+
+ cmake_policy(SET CMP0042 NEW)
+
+diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake
+index 4b119809017..04bde2bc20b 100644
+--- a/src/coreclr/pgosupport.cmake
++++ b/src/coreclr/pgosupport.cmake
+@@ -1,5 +1,18 @@
+-include(CheckIPOSupported)
+-check_ipo_supported(RESULT HAVE_LTO)
++include(CheckCXXSourceCompiles)
++include(CheckCXXCompilerFlag)
++
++# VC++ guarantees support for LTCG (LTO's equivalent)
++if(NOT WIN32)
++ # Function required to give CMAKE_REQUIRED_* local scope
++ function(check_have_lto)
++ set(CMAKE_REQUIRED_FLAGS -flto)
++ set(CMAKE_REQUIRED_LIBRARIES -flto -fuse-ld=gold)
++ check_cxx_source_compiles("int main() { return 0; }" HAVE_LTO)
++ endfunction(check_have_lto)
++ check_have_lto()
++
++ check_cxx_compiler_flag(-faligned-new COMPILER_SUPPORTS_F_ALIGNED_NEW)
++endif(NOT WIN32)
+
+ # Adds Profile Guided Optimization (PGO) flags to the current target
+ function(add_pgo TargetName)
+diff --git a/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt b/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
+index dcd39e346c9..7b471d53726 100644
+--- a/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
++++ b/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
+@@ -1,3 +1,4 @@
++cmake_minimum_required(VERSION 3.8)
+ # Quick note: The CMake C# support is using the CSC bundled with the MSBuild that the native build runs on, not the one supplied by the local .NET SDK.
+
+ project(DacTableGen LANGUAGES CSharp)
+diff --git a/src/coreclr/src/binder/CMakeLists.txt b/src/coreclr/src/binder/CMakeLists.txt
+index 3a66c81e10e..208f1214dd0 100644
+--- a/src/coreclr/src/binder/CMakeLists.txt
++++ b/src/coreclr/src/binder/CMakeLists.txt
+@@ -82,11 +82,13 @@ endif(CLR_CMAKE_TARGET_WIN32)
+ convert_to_absolute_path(BINDER_SOURCES ${BINDER_SOURCES})
+ convert_to_absolute_path(BINDER_CROSSGEN_SOURCES ${BINDER_CROSSGEN_SOURCES})
+
+-add_library_clr(v3binder
+- STATIC
++add_library_clr(v3binder_obj
++ OBJECT
+ ${BINDER_SOURCES}
+ )
+-add_dependencies(v3binder eventing_headers)
++add_dependencies(v3binder_obj eventing_headers)
++add_library(v3binder INTERFACE)
++target_sources(v3binder INTERFACE $<TARGET_OBJECTS:v3binder_obj>)
+
+ add_library_clr(v3binder_crossgen
+ STATIC
+diff --git a/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt b/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
+index 391f70eff43..fdcf344c16a 100644
+--- a/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
++++ b/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
+@@ -10,9 +10,11 @@ set(BCLTYPE_SOURCES
+ variant.cpp
+ )
+
+-add_library_clr(bcltype
+- STATIC
++add_library_clr(bcltype_obj
++ OBJECT
+ ${BCLTYPE_SOURCES}
+ )
+
+-add_dependencies(bcltype eventing_headers)
++add_dependencies(bcltype_obj eventing_headers)
++add_library(bcltype INTERFACE)
++target_sources(bcltype INTERFACE $<TARGET_OBJECTS:bcltype_obj>)
+diff --git a/src/coreclr/src/classlibnative/float/CMakeLists.txt b/src/coreclr/src/classlibnative/float/CMakeLists.txt
+index 44d40c92592..3c066620f76 100644
+--- a/src/coreclr/src/classlibnative/float/CMakeLists.txt
++++ b/src/coreclr/src/classlibnative/float/CMakeLists.txt
+@@ -7,9 +7,12 @@ set(FLOAT_SOURCES
+ floatsingle.cpp
+ )
+
+-add_library_clr(comfloat_wks
+- STATIC
++add_library_clr(comfloat_wks_obj
++ OBJECT
+ ${FLOAT_SOURCES}
+ )
+
+-add_dependencies(comfloat_wks eventing_headers)
++add_dependencies(comfloat_wks_obj eventing_headers)
++
++add_library(comfloat_wks INTERFACE)
++target_sources(comfloat_wks INTERFACE $<TARGET_OBJECTS:comfloat_wks_obj>)
+diff --git a/src/coreclr/src/debug/debug-pal/CMakeLists.txt b/src/coreclr/src/debug/debug-pal/CMakeLists.txt
+index ac1e48fb5fb..213fa59e784 100644
+--- a/src/coreclr/src/debug/debug-pal/CMakeLists.txt
++++ b/src/coreclr/src/debug/debug-pal/CMakeLists.txt
+@@ -34,4 +34,6 @@ if(CLR_CMAKE_HOST_UNIX)
+
+ endif(CLR_CMAKE_HOST_UNIX)
+
+-_add_library(debug-pal STATIC ${TWO_WAY_PIPE_SOURCES})
++_add_library(debug-pal_obj OBJECT ${TWO_WAY_PIPE_SOURCES})
++add_library(debug-pal INTERFACE)
++target_sources(debug-pal INTERFACE $<TARGET_OBJECTS:debug-pal_obj>)
+diff --git a/src/coreclr/src/debug/ee/wks/CMakeLists.txt b/src/coreclr/src/debug/ee/wks/CMakeLists.txt
+index ee6c482ce76..3dd5e3612df 100644
+--- a/src/coreclr/src/debug/ee/wks/CMakeLists.txt
++++ b/src/coreclr/src/debug/ee/wks/CMakeLists.txt
+@@ -9,9 +9,9 @@ if (CLR_CMAKE_TARGET_WIN32)
+
+ if(CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64)
+
+- preprocess_compile_asm(ASM_FILES ${ASM_FILE} OUTPUT_OBJECTS ASM_OBJECTS)
++ preprocess_compile_asm(TARGET cordbee_wks_obj ASM_FILES ${ASM_FILE} OUTPUT_OBJECTS ASM_OBJECTS)
+
+- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${ASM_OBJECTS})
++ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ${ASM_FILE} ${ASM_OBJECTS})
+
+ else ()
+
+@@ -23,19 +23,21 @@ if (CLR_CMAKE_TARGET_WIN32)
+
+ set_source_files_properties(${ASM_FILE} PROPERTIES COMPILE_OPTIONS "${ASM_OPTIONS}")
+
+- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${ASM_FILE})
++ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ${ASM_FILE})
+
+ endif()
+
+ else ()
+
+ if(CLR_CMAKE_HOST_ARCH_AMD64 OR CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64 OR CLR_CMAKE_HOST_ARCH_I386)
+- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S)
++ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S)
+ else()
+ message(FATAL_ERROR "Unknown platform")
+ endif()
+
+ endif (CLR_CMAKE_TARGET_WIN32)
+
+-target_precompile_header(TARGET cordbee_wks HEADER stdafx.h)
+-add_dependencies(cordbee_wks eventing_headers)
++target_precompile_header(TARGET cordbee_wks_obj HEADER stdafx.h)
++add_dependencies(cordbee_wks_obj eventing_headers)
++add_library(cordbee_wks INTERFACE)
++target_sources(cordbee_wks INTERFACE $<TARGET_OBJECTS:cordbee_wks_obj>)
+diff --git a/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt b/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
+index 88364658f11..362da1f6483 100644
+--- a/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
++++ b/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
+@@ -10,5 +10,6 @@ set( ILDBSYMLIB_SOURCES
+ symwrite.cpp
+ )
+
+-add_library_clr(ildbsymlib ${ILDBSYMLIB_SOURCES})
+-
++add_library_clr(ildbsymlib_obj OBJECT ${ILDBSYMLIB_SOURCES})
++add_library(ildbsymlib INTERFACE)
++target_sources(ildbsymlib INTERFACE $<TARGET_OBJECTS:ildbsymlib_obj>)
+diff --git a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
+index 777a2869e4f..066b75ab01f 100644
+--- a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
++++ b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
+@@ -9,20 +9,20 @@ if (CLR_CMAKE_HOST_WIN32)
+
+ list(APPEND CLR_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def)
+
+- add_link_options(/ENTRY:CoreDllMain)
++ add_linker_flag("/ENTRY:CoreDllMain")
+
+ # Incremental linking results in the linker inserting extra padding and routing function calls via thunks that can break the
+ # invariants (e.g. size of region between Jit_PatchedCodeLast-Jit_PatchCodeStart needs to fit in a page).
+- add_link_options(/INCREMENTAL:NO)
++ add_linker_flag("/INCREMENTAL:NO")
+
+ # Delay load libraries required for WinRT as that is not supported on all platforms
+- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll")
+- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll")
+- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll")
+- add_link_options("/DELAYLOAD:api-ms-win-ro-typeresolution-l1-1-0.dll")
++ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll")
++ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll")
++ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll")
++ add_linker_flag("/DELAYLOAD:api-ms-win-ro-typeresolution-l1-1-0.dll")
+
+ # Delay load version.dll so that we can specify how to search when loading it as it is not part of Windows' known DLLs
+- add_link_options("/DELAYLOAD:version.dll")
++ add_linker_flag("/DELAYLOAD:version.dll")
+
+ # No library groups for Win32
+ set(START_LIBRARY_GROUP)
+@@ -35,7 +35,7 @@ else(CLR_CMAKE_HOST_WIN32)
+ if(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_NETBSD)
+ # This option is necessary to ensure that the overloaded delete operator defined inside
+ # of the utilcode will be used instead of the standard library delete operator.
+- add_link_options("LINKER:-Bsymbolic")
++ add_linker_flag("-Wl,-Bsymbolic")
+
+ # The following linked options can be inserted into the linker libraries list to
+ # ensure proper resolving of circular references between a subset of the libraries.
+@@ -110,7 +110,7 @@ set(CORECLR_LIBRARIES
+ utilcode
+ v3binder
+ libraries-native
+- System.Globalization.Native-Static
++ System.Globalization.Native-static
+ interop
+ )
+
+@@ -162,7 +162,12 @@ if(FEATURE_EVENT_TRACE)
+ endif(CLR_CMAKE_HOST_UNIX)
+ endif(FEATURE_EVENT_TRACE)
+
+-target_link_libraries(coreclr ${CORECLR_LIBRARIES})
++if(FEATURE_MERGE_JIT_AND_ENGINE)
++ set(CLRJIT_STATIC clrjit_static)
++endif(FEATURE_MERGE_JIT_AND_ENGINE)
++
++target_sources(coreclr PUBLIC $<TARGET_OBJECTS:cee_wks_core>)
++target_link_libraries(coreclr PUBLIC ${CORECLR_LIBRARIES} ${CLRJIT_STATIC} cee_wks)
+
+ # Create the runtime module index header file containing the coreclr build id
+ # for xplat and the timestamp/size on Windows.
+diff --git a/src/coreclr/src/dlls/mscorrc/CMakeLists.txt b/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
+index 08cf27aaf80..e114ec19cea 100644
+--- a/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
++++ b/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
+@@ -19,7 +19,9 @@ if(CLR_CMAKE_HOST_WIN32)
+ else()
+ build_resources(${CMAKE_CURRENT_SOURCE_DIR}/include.rc mscorrc TARGET_CPP_FILE)
+
+- add_library_clr(mscorrc STATIC
++ add_library_clr(mscorrc_obj OBJECT
+ ${TARGET_CPP_FILE}
+ )
++ add_library(mscorrc INTERFACE)
++ target_sources(mscorrc INTERFACE $<TARGET_OBJECTS:mscorrc_obj>)
+ endif(CLR_CMAKE_HOST_WIN32)
+diff --git a/src/coreclr/src/gcinfo/CMakeLists.txt b/src/coreclr/src/gcinfo/CMakeLists.txt
+index b0b67462562..50a1722a8ea 100644
+--- a/src/coreclr/src/gcinfo/CMakeLists.txt
++++ b/src/coreclr/src/gcinfo/CMakeLists.txt
+@@ -16,11 +16,14 @@ endif(CLR_CMAKE_TARGET_ARCH_I386)
+
+ convert_to_absolute_path(GCINFO_SOURCES ${GCINFO_SOURCES})
+
+-add_library_clr(gcinfo
+- STATIC
++add_library_clr(gcinfo_obj
++ OBJECT
+ ${GCINFO_SOURCES}
+ )
+
++add_library(gcinfo INTERFACE)
++target_sources(gcinfo INTERFACE $<TARGET_OBJECTS:gcinfo_obj>)
++
+ add_library_clr(gcinfo_crossgen
+ STATIC
+ ${GCINFO_SOURCES}
+diff --git a/src/coreclr/src/inc/CMakeLists.txt b/src/coreclr/src/inc/CMakeLists.txt
+index 60fad88e77d..4f75d3a882d 100644
+--- a/src/coreclr/src/inc/CMakeLists.txt
++++ b/src/coreclr/src/inc/CMakeLists.txt
+@@ -58,7 +58,9 @@ if(FEATURE_JIT_PITCHING)
+ endif(FEATURE_JIT_PITCHING)
+
+ # Compile *_i.cpp to lib
+-_add_library(corguids ${CORGUIDS_SOURCES})
++_add_library(corguids_obj OBJECT ${CORGUIDS_SOURCES})
++add_library(corguids INTERFACE)
++target_sources(corguids INTERFACE $<TARGET_OBJECTS:corguids_obj>)
+
+ # Binplace the inc files for packaging later.
+
+@@ -75,4 +77,3 @@ _install (FILES cfi.h
+ gcinfoencoder.h
+ gcinfotypes.h
+ DESTINATION inc)
+-_install (TARGETS corguids DESTINATION lib)
+diff --git a/src/coreclr/src/interop/CMakeLists.txt b/src/coreclr/src/interop/CMakeLists.txt
+index d7eaa1b04ae..3924b4fdbb4 100644
+--- a/src/coreclr/src/interop/CMakeLists.txt
++++ b/src/coreclr/src/interop/CMakeLists.txt
+@@ -30,7 +30,10 @@ endif(WIN32)
+
+ convert_to_absolute_path(INTEROP_SOURCES ${INTEROP_SOURCES})
+
+-add_library_clr(interop
+- STATIC
++add_library_clr(interop_obj
++ OBJECT
+ ${INTEROP_SOURCES}
+ )
++
++add_library(interop INTERFACE)
++target_sources(interop INTERFACE $<TARGET_OBJECTS:interop_obj>)
+diff --git a/src/coreclr/src/jit/dll/CMakeLists.txt b/src/coreclr/src/jit/dll/CMakeLists.txt
+index ec7cddc78ed..01bdbf5a731 100644
+--- a/src/coreclr/src/jit/dll/CMakeLists.txt
++++ b/src/coreclr/src/jit/dll/CMakeLists.txt
+@@ -2,17 +2,17 @@ project(ClrJit)
+
+ set_source_files_properties(${JIT_EXPORTS_FILE} PROPERTIES GENERATED TRUE)
+
++add_library_clr(clrjit_obj
++ OBJECT
++ ${JIT_CORE_SOURCES}
++ ${JIT_ARCH_SOURCES}
++)
++
+ if(CLR_CMAKE_HOST_UNIX)
+- add_library_clr(clrjit_static
+- STATIC
+- ${SHARED_LIB_SOURCES}
+- ${JIT_ARCH_SOURCES}
+- )
+- add_dependencies(clrjit_static coreclrpal gcinfo)
+-else()
+- add_library_clr(clrjit_static
+- ${SHARED_LIB_SOURCES}
+- ${JIT_ARCH_SOURCES}
+- )
++ add_dependencies(clrjit_obj coreclrpal gcinfo)
+ endif(CLR_CMAKE_HOST_UNIX)
+-target_precompile_header(TARGET clrjit_static HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR})
++
++target_precompile_header(TARGET clrjit_obj HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR})
++
++add_library(clrjit_static INTERFACE)
++target_sources(clrjit_static INTERFACE $<TARGET_OBJECTS:clrjit_obj>)
+diff --git a/src/coreclr/src/md/ceefilegen/CMakeLists.txt b/src/coreclr/src/md/ceefilegen/CMakeLists.txt
+index 90749c806b2..fd0f8424d97 100644
+--- a/src/coreclr/src/md/ceefilegen/CMakeLists.txt
++++ b/src/coreclr/src/md/ceefilegen/CMakeLists.txt
+@@ -25,8 +25,11 @@ if (CLR_CMAKE_TARGET_WIN32)
+ list(APPEND CEEFILEGEN_SOURCES ${CEEFILEGEN_HEADERS})
+ endif (CLR_CMAKE_TARGET_WIN32)
+
+-add_library_clr(ceefgen
+- STATIC
++add_library_clr(ceefgen_obj
++ OBJECT
+ ${CEEFILEGEN_SOURCES}
+ )
+-target_precompile_header(TARGET ceefgen HEADER stdafx.h)
++target_precompile_header(TARGET ceefgen_obj HEADER stdafx.h)
++
++add_library(ceefgen INTERFACE)
++target_sources(ceefgen INTERFACE $<TARGET_OBJECTS:ceefgen_obj>)
+diff --git a/src/coreclr/src/md/compiler/CMakeLists.txt b/src/coreclr/src/md/compiler/CMakeLists.txt
+index 3b916cdc9fe..f9f80db2500 100644
+--- a/src/coreclr/src/md/compiler/CMakeLists.txt
++++ b/src/coreclr/src/md/compiler/CMakeLists.txt
+@@ -58,9 +58,11 @@ add_library_clr(mdcompiler_dac ${MDCOMPILER_SOURCES})
+ set_target_properties(mdcompiler_dac PROPERTIES DAC_COMPONENT TRUE)
+ target_precompile_header(TARGET mdcompiler_dac HEADER stdafx.h)
+
+-add_library_clr(mdcompiler_wks ${MDCOMPILER_SOURCES})
+-target_compile_definitions(mdcompiler_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
+-target_precompile_header(TARGET mdcompiler_wks HEADER stdafx.h)
++add_library_clr(mdcompiler_wks_obj OBJECT ${MDCOMPILER_SOURCES})
++target_compile_definitions(mdcompiler_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
++target_precompile_header(TARGET mdcompiler_wks_obj HEADER stdafx.h)
++add_library(mdcompiler_wks INTERFACE)
++target_sources(mdcompiler_wks INTERFACE $<TARGET_OBJECTS:mdcompiler_wks_obj>)
+
+ add_library_clr(mdcompiler-dbi ${MDCOMPILER_SOURCES})
+ set_target_properties(mdcompiler-dbi PROPERTIES DBI_COMPONENT TRUE)
+diff --git a/src/coreclr/src/md/enc/CMakeLists.txt b/src/coreclr/src/md/enc/CMakeLists.txt
+index 7220736b9ca..82af8434296 100644
+--- a/src/coreclr/src/md/enc/CMakeLists.txt
++++ b/src/coreclr/src/md/enc/CMakeLists.txt
+@@ -48,9 +48,11 @@ add_library_clr(mdruntimerw_dac ${MDRUNTIMERW_SOURCES})
+ set_target_properties(mdruntimerw_dac PROPERTIES DAC_COMPONENT TRUE)
+ target_precompile_header(TARGET mdruntimerw_dac HEADER stdafx.h)
+
+-add_library_clr(mdruntimerw_wks ${MDRUNTIMERW_SOURCES})
+-target_compile_definitions(mdruntimerw_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
+-target_precompile_header(TARGET mdruntimerw_wks HEADER stdafx.h)
++add_library_clr(mdruntimerw_wks_obj OBJECT ${MDRUNTIMERW_SOURCES})
++target_compile_definitions(mdruntimerw_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
++target_precompile_header(TARGET mdruntimerw_wks_obj HEADER stdafx.h)
++add_library(mdruntimerw_wks INTERFACE)
++target_sources(mdruntimerw_wks INTERFACE $<TARGET_OBJECTS:mdruntimerw_wks_obj>)
+
+ add_library_clr(mdruntimerw-dbi ${MDRUNTIMERW_SOURCES})
+ set_target_properties(mdruntimerw-dbi PROPERTIES DBI_COMPONENT TRUE)
+diff --git a/src/coreclr/src/md/hotdata/CMakeLists.txt b/src/coreclr/src/md/hotdata/CMakeLists.txt
+index c6168d2a4b0..88475cb72f4 100644
+--- a/src/coreclr/src/md/hotdata/CMakeLists.txt
++++ b/src/coreclr/src/md/hotdata/CMakeLists.txt
+@@ -33,8 +33,10 @@ add_library_clr(mdhotdata_dac ${MDHOTDATA_SOURCES})
+ set_target_properties(mdhotdata_dac PROPERTIES DAC_COMPONENT TRUE)
+ target_precompile_header(TARGET mdhotdata_dac HEADER external.h)
+
+-add_library_clr(mdhotdata_full ${MDHOTDATA_SOURCES})
+-target_precompile_header(TARGET mdhotdata_full HEADER external.h)
++add_library_clr(mdhotdata_full_obj OBJECT ${MDHOTDATA_SOURCES})
++target_precompile_header(TARGET mdhotdata_full_obj HEADER external.h)
++add_library(mdhotdata_full INTERFACE)
++target_sources(mdhotdata_full INTERFACE $<TARGET_OBJECTS:mdhotdata_full_obj>)
+
+ add_library_clr(mdhotdata_crossgen ${MDHOTDATA_SOURCES})
+ set_target_properties(mdhotdata_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
+diff --git a/src/coreclr/src/md/runtime/CMakeLists.txt b/src/coreclr/src/md/runtime/CMakeLists.txt
+index 6dc193e14a7..7e0e83f1114 100644
+--- a/src/coreclr/src/md/runtime/CMakeLists.txt
++++ b/src/coreclr/src/md/runtime/CMakeLists.txt
+@@ -47,9 +47,11 @@ add_library_clr(mdruntime_dac ${MDRUNTIME_SOURCES})
+ set_target_properties(mdruntime_dac PROPERTIES DAC_COMPONENT TRUE)
+ target_precompile_header(TARGET mdruntime_dac HEADER stdafx.h)
+
+-add_library_clr(mdruntime_wks ${MDRUNTIME_SOURCES})
+-target_compile_definitions(mdruntime_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
+-target_precompile_header(TARGET mdruntime_wks HEADER stdafx.h)
++add_library_clr(mdruntime_wks_obj OBJECT ${MDRUNTIME_SOURCES})
++target_compile_definitions(mdruntime_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
++target_precompile_header(TARGET mdruntime_wks_obj HEADER stdafx.h)
++add_library(mdruntime_wks INTERFACE)
++target_sources(mdruntime_wks INTERFACE $<TARGET_OBJECTS:mdruntime_wks_obj>)
+
+ add_library_clr(mdruntime-dbi ${MDRUNTIME_SOURCES})
+ set_target_properties(mdruntime-dbi PROPERTIES DBI_COMPONENT TRUE)
+diff --git a/src/coreclr/src/pal/src/CMakeLists.txt b/src/coreclr/src/pal/src/CMakeLists.txt
+index e7c1629d5b2..7818deef050 100644
+--- a/src/coreclr/src/pal/src/CMakeLists.txt
++++ b/src/coreclr/src/pal/src/CMakeLists.txt
+@@ -256,10 +256,12 @@ add_library(coreclrpal
+ # > warning for library: libtracepointprovider.a the table of contents is empty (no object file members in the library define global symbols)
+ #
+ if(CLR_CMAKE_TARGET_LINUX)
+- add_library(tracepointprovider
+- STATIC
++ add_library(tracepointprovider_obj
++ OBJECT
+ misc/tracepointprovider.cpp
+ )
++ add_library(tracepointprovider INTERFACE)
++ target_sources(tracepointprovider INTERFACE $<TARGET_OBJECTS:tracepointprovider_obj>)
+ endif(CLR_CMAKE_TARGET_LINUX)
+
+ if(CLR_CMAKE_TARGET_OSX)
+diff --git a/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt b/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
+index 39b9826d1ab..8e6968cf783 100644
+--- a/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
++++ b/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
+@@ -1,8 +1,8 @@
+-include(FindPython)
++include(FindPythonInterp)
+
+ set (GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genDummyProvider.py)
+
+-set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
++set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
+
+ execute_process(
+ COMMAND ${GENERATE_COMMAND} --dry-run
+diff --git a/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt b/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
+index 234dea19b75..d55dab3557f 100644
+--- a/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
++++ b/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
+@@ -1,7 +1,7 @@
+-include(FindPython)
++include(FindPythonInterp)
+ set (GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genLttngProvider.py)
+
+-set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
++set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
+
+ execute_process(
+ COMMAND ${GENERATE_COMMAND} --dry-run
+diff --git a/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt b/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
+index 000ee2d2fb0..845fae656be 100644
+--- a/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
++++ b/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
+@@ -5,10 +5,10 @@ set(SOURCES
+ set(EVENT_MANIFEST ${VM_DIR}/ClrEtwAll.man)
+ set(TEST_GENERATOR ${CLR_DIR}/src/scripts/genEventingTests.py)
+
+-include(FindPython)
++include(FindPythonInterp)
+
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/clralltestevents.cpp
+- COMMAND ${Python_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}"
++ COMMAND ${PYTHON_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}"
+ DEPENDS ${EVENT_MANIFEST} ${TEST_GENERATOR}
+ COMMENT "Updating clralltestevents.cpp"
+ )
+diff --git a/src/coreclr/src/unwinder/CMakeLists.txt b/src/coreclr/src/unwinder/CMakeLists.txt
+index 4421ea9f6f6..41a0219bbf7 100644
+--- a/src/coreclr/src/unwinder/CMakeLists.txt
++++ b/src/coreclr/src/unwinder/CMakeLists.txt
+@@ -20,8 +20,10 @@ list(APPEND UNWINDER_SOURCES
+ convert_to_absolute_path(UNWINDER_SOURCES ${UNWINDER_SOURCES})
+
+ if(CLR_CMAKE_HOST_UNIX)
+- add_library_clr(unwinder_wks ${UNWINDER_SOURCES})
+- add_dependencies(unwinder_wks eventing_headers)
++ add_library_clr(unwinder_wks_obj OBJECT ${UNWINDER_SOURCES})
++ add_dependencies(unwinder_wks_obj eventing_headers)
++ add_library(unwinder_wks INTERFACE)
++ target_sources(unwinder_wks INTERFACE $<TARGET_OBJECTS:unwinder_wks_obj>)
+ endif(CLR_CMAKE_HOST_UNIX)
+
+ add_library_clr(unwinder_dac ${UNWINDER_SOURCES})
+diff --git a/src/coreclr/src/utilcode/CMakeLists.txt b/src/coreclr/src/utilcode/CMakeLists.txt
+index aa28b2db603..f8082fc9076 100644
+--- a/src/coreclr/src/utilcode/CMakeLists.txt
++++ b/src/coreclr/src/utilcode/CMakeLists.txt
+@@ -98,7 +98,9 @@ convert_to_absolute_path(UTILCODE_CROSSGEN_SOURCES ${UTILCODE_CROSSGEN_SOURCES})
+ convert_to_absolute_path(UTILCODE_STATICNOHOST_SOURCES ${UTILCODE_STATICNOHOST_SOURCES})
+
+ add_library_clr(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES})
+-add_library_clr(utilcode STATIC ${UTILCODE_SOURCES})
++add_library_clr(utilcode_obj OBJECT ${UTILCODE_SOURCES})
++add_library(utilcode INTERFACE)
++target_sources(utilcode INTERFACE $<TARGET_OBJECTS:utilcode_obj>)
+ add_library_clr(utilcodestaticnohost STATIC ${UTILCODE_STATICNOHOST_SOURCES})
+ add_library_clr(utilcode_crossgen STATIC ${UTILCODE_CROSSGEN_SOURCES})
+
+@@ -106,9 +108,9 @@ if(CLR_CMAKE_HOST_UNIX)
+ target_link_libraries(utilcodestaticnohost nativeresourcestring)
+ target_link_libraries(utilcode_crossgen nativeresourcestring)
+ target_link_libraries(utilcode_dac nativeresourcestring)
+- target_link_libraries(utilcode nativeresourcestring)
++ target_link_libraries(utilcode INTERFACE nativeresourcestring)
+ add_dependencies(utilcode_dac coreclrpal)
+- add_dependencies(utilcode coreclrpal)
++ add_dependencies(utilcode_obj coreclrpal)
+ endif(CLR_CMAKE_HOST_UNIX)
+
+
+@@ -121,10 +123,10 @@ set_target_properties(utilcode_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
+ target_compile_definitions(utilcode_dac PRIVATE SELF_NO_HOST)
+ target_compile_definitions(utilcodestaticnohost PRIVATE SELF_NO_HOST)
+ add_dependencies(utilcode_dac ${UTILCODE_DEPENDENCIES})
+-add_dependencies(utilcode ${UTILCODE_DEPENDENCIES})
++add_dependencies(utilcode_obj ${UTILCODE_DEPENDENCIES})
+ add_dependencies(utilcode_crossgen ${UTILCODE_DEPENDENCIES})
+ add_dependencies(utilcodestaticnohost ${UTILCODE_DEPENDENCIES})
+ target_precompile_header(TARGET utilcode_dac HEADER stdafx.h)
+-target_precompile_header(TARGET utilcode HEADER stdafx.h)
++target_precompile_header(TARGET utilcode_obj HEADER stdafx.h)
+ target_precompile_header(TARGET utilcode_crossgen HEADER stdafx.h)
+ target_precompile_header(TARGET utilcodestaticnohost HEADER stdafx.h)
+diff --git a/src/coreclr/src/vm/CMakeLists.txt b/src/coreclr/src/vm/CMakeLists.txt
+index 3e37cebdc10..2b20d7d910a 100644
+--- a/src/coreclr/src/vm/CMakeLists.txt
++++ b/src/coreclr/src/vm/CMakeLists.txt
+@@ -923,7 +923,7 @@ list(APPEND VM_HEADERS_DAC
+
+ if (CLR_CMAKE_TARGET_WIN32)
+ list(APPEND VM_SOURCES_WKS ${VM_HEADERS_WKS})
+- list(APPEND VM_SOURCES_WKS_ARCH_ASM ${VM_HEADERS_WKS_ARCH_ASM})
++ list(APPEND VM_SOURCES_WKS ${VM_HEADERS_WKS_ARCH_ASM})
+ list(APPEND VM_SOURCES_DAC ${VM_HEADERS_DAC})
+ endif(CLR_CMAKE_TARGET_WIN32)
+
+diff --git a/src/coreclr/src/vm/eventing/CMakeLists.txt b/src/coreclr/src/vm/eventing/CMakeLists.txt
+index 98dd158df54..e2bf024fc59 100644
+--- a/src/coreclr/src/vm/eventing/CMakeLists.txt
++++ b/src/coreclr/src/vm/eventing/CMakeLists.txt
+@@ -8,12 +8,13 @@ else()
+ set(NEED_XPLAT_HEADER ON)
+ endif()
+
+-include(FindPython)
++include(FindPythonInterp)
+
+ set (EventingHeaders
+ ${GENERATED_INCLUDE_DIR}/etmdummy.h
+ ${GENERATED_INCLUDE_DIR}/clretwallmain.h
+ ${GENERATED_INCLUDE_DIR}/clreventpipewriteevents.h
++ ${GENERATED_INCLUDE_DIR}/clrproviders.h
+ )
+
+ if (NEED_XPLAT_HEADER)
+@@ -24,7 +25,7 @@ endif()
+ set(GENEVENTING_SCRIPT ${CLR_DIR}/src/scripts/genEventing.py)
+
+ add_custom_target(eventing_headers
+- ${Python_EXECUTABLE} ${GENEVENTING_SCRIPT} --man ${EVENT_MANIFEST} --inc ${GENERATED_INCLUDE_DIR} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG}
++ ${PYTHON_EXECUTABLE} ${GENEVENTING_SCRIPT} --man ${EVENT_MANIFEST} --inc ${GENERATED_INCLUDE_DIR} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG}
+ DEPENDS ${EVENT_MANIFEST} ${GENEVENTING_SCRIPT}
+ VERBATIM
+ )
+diff --git a/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt b/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
+index 34a067e1ec5..4c7df2fbb3c 100644
+--- a/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
++++ b/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-include(FindPython)
++include(FindPythonInterp)
+
+ set(ETW_PROVIDER_SCRIPT ${CLR_DIR}/src/scripts/genEtwProvider.py)
+
+@@ -14,5 +14,5 @@ set (ETW_PROVIDER_OUTPUTS
+ set_source_files_properties(${ETW_PROVIDER_OUTPUTS} PROPERTIES GENERATED TRUE)
+
+ add_custom_target(eventprovider
+- ${Python_EXECUTABLE} ${ETW_PROVIDER_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${GENERATED_INCLUDE_DIR}
++ ${PYTHON_EXECUTABLE} ${ETW_PROVIDER_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${GENERATED_INCLUDE_DIR}
+ DEPENDS ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS} ${ETW_PROVIDER_SCRIPT})
+diff --git a/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt b/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
+index 00b3f6f386f..00d79737e54 100644
+--- a/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
++++ b/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
+@@ -1,9 +1,9 @@
+-include(FindPython)
++include(FindPythonInterp)
+
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+ set(GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genEventPipe.py)
+-set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${CMAKE_CURRENT_BINARY_DIR} ${NONEXTERN_ARG})
++set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${CMAKE_CURRENT_BINARY_DIR} ${NONEXTERN_ARG})
+
+ execute_process(
+ COMMAND ${GENERATE_COMMAND} --dry-run
+@@ -28,10 +28,8 @@ add_custom_command(OUTPUT ${EVENTPIPE_SOURCES}
+ COMMAND ${GENERATE_COMMAND}
+ DEPENDS ${GENERATE_SCRIPT} ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS})
+
+-add_library_clr(eventpipe STATIC ${EVENTPIPE_SOURCES})
+-set_target_properties(eventpipe PROPERTIES LINKER_LANGUAGE CXX)
+-add_dependencies(eventpipe eventing_headers)
+-
+-if (NOT CLR_CMAKE_TARGET_WIN32)
+- _install(TARGETS eventpipe DESTINATION lib)
+-endif()
++add_library_clr(eventpipe_obj OBJECT ${EVENTPIPE_SOURCES})
++set_target_properties(eventpipe_obj PROPERTIES LINKER_LANGUAGE CXX)
++add_dependencies(eventpipe_obj eventing_headers)
++add_library(eventpipe INTERFACE)
++target_sources(eventpipe INTERFACE $<TARGET_OBJECTS:eventpipe_obj>)
+diff --git a/src/coreclr/src/vm/wks/CMakeLists.txt b/src/coreclr/src/vm/wks/CMakeLists.txt
+index 1e94b575fd6..5d355f6adcb 100644
+--- a/src/coreclr/src/vm/wks/CMakeLists.txt
++++ b/src/coreclr/src/vm/wks/CMakeLists.txt
+@@ -7,13 +7,19 @@ if (CLR_CMAKE_TARGET_WIN32)
+
+ endif (CLR_CMAKE_TARGET_WIN32)
+
+-add_library_clr(cee_wks ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM})
+-target_precompile_header(TARGET cee_wks HEADER common.h)
++add_library_clr(cee_wks_core OBJECT ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM})
++add_library_clr(cee_wks_obj OBJECT ${VM_SOURCES_WKS_SPECIAL})
++
++target_precompile_header(TARGET cee_wks_core HEADER common.h)
++target_precompile_header(TARGET cee_wks_obj HEADER common.h)
++
+ if (MSVC)
+ # mscorlib.cpp does not compile with precompiled header file
+ set_source_files_properties(../mscorlib.cpp PROPERTIES COMPILE_FLAGS "/Y-")
+ endif()
+-add_dependencies(cee_wks eventing_headers)
++
++add_dependencies(cee_wks_core eventing_headers)
++add_dependencies(cee_wks_obj eventing_headers)
+
+ if (CLR_CMAKE_TARGET_WIN32)
+
+@@ -45,8 +51,16 @@ if (CLR_CMAKE_TARGET_WIN32)
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.inc
+ )
+
+- add_dependencies(cee_wks asmconstants_inc)
++ add_dependencies(cee_wks_core asmconstants_inc)
++ add_dependencies(cee_wks_obj asmconstants_inc)
+
+ endif(NOT CLR_CMAKE_HOST_ARCH_ARM AND NOT CLR_CMAKE_HOST_ARCH_ARM64)
+
+ endif (CLR_CMAKE_TARGET_WIN32)
++
++add_custom_target(preprocessd_asm DEPENDS ${VM_WKS_ARCH_ASM_OBJECTS})
++add_dependencies(cee_wks_core preprocessd_asm)
++add_dependencies(cee_wks_obj preprocessd_asm)
++
++add_library(cee_wks INTERFACE)
++target_sources(cee_wks INTERFACE $<TARGET_OBJECTS:cee_wks_obj> ${VM_WKS_ARCH_ASM_OBJECTS})
+diff --git a/src/coreclr/tests/CMakeLists.txt b/src/coreclr/tests/CMakeLists.txt
+index 53dbb85a58b..c5417cba7d0 100644
+--- a/src/coreclr/tests/CMakeLists.txt
++++ b/src/coreclr/tests/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.14.2)
++cmake_minimum_required(VERSION 3.6.2)
+
+ cmake_policy(SET CMP0042 NEW)
+ project(Tests)
+diff --git a/src/installer/corehost/CMakeLists.txt b/src/installer/corehost/CMakeLists.txt
+index 43a59a1a695..dff0496cdd8 100644
+--- a/src/installer/corehost/CMakeLists.txt
++++ b/src/installer/corehost/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.14.2)
++cmake_minimum_required(VERSION 3.6.2)
+
+ project(corehost)
+
+diff --git a/src/installer/corehost/cli/exe.cmake b/src/installer/corehost/cli/exe.cmake
+index de8cd49396b..732faf97ff9 100644
+--- a/src/installer/corehost/cli/exe.cmake
++++ b/src/installer/corehost/cli/exe.cmake
+@@ -5,7 +5,6 @@
+ project (${DOTNET_PROJECT_NAME})
+
+ cmake_policy(SET CMP0011 NEW)
+-cmake_policy(SET CMP0083 NEW)
+
+ include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)
+
+diff --git a/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt b/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
+index bcf6a051229..8572a6318ec 100644
+--- a/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
++++ b/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
+@@ -2,7 +2,6 @@
+ # The .NET Foundation licenses this file to you under the MIT license.
+ # See the LICENSE file in the project root for more information.
+
+-cmake_minimum_required (VERSION 2.6)
+ project(mockhostfxr_2_2)
+
+ set(DOTNET_PROJECT_NAME "mockhostfxr_2_2")
+diff --git a/src/libraries/Native/Unix/CMakeLists.txt b/src/libraries/Native/Unix/CMakeLists.txt
+index f14ada69fee..cb174fe5013 100644
+--- a/src/libraries/Native/Unix/CMakeLists.txt
++++ b/src/libraries/Native/Unix/CMakeLists.txt
+@@ -1,19 +1,14 @@
+-cmake_minimum_required(VERSION 3.14.2)
++cmake_minimum_required(VERSION 3.6.2)
++if(CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
++ # CMake 3.14.5 contains bug fixes for iOS
++ cmake_minimum_required(VERSION 3.14.5)
++ endif()
+ cmake_policy(SET CMP0042 NEW)
+
+ project(CoreFX C)
+
+ include(${CLR_ENG_NATIVE_DIR}/configuretools.cmake)
+
+-if(CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
+- # CMake 3.14.5 contains bug fixes for iOS
+- cmake_minimum_required(VERSION 3.14.5)
+-endif()
+-
+-if(NOT CLR_CMAKE_TARGET_ARCH_WASM)
+- cmake_policy(SET CMP0083 NEW)
+-endif(NOT CLR_CMAKE_TARGET_ARCH_WASM)
+-
+ set(CMAKE_MACOSX_RPATH ON)
+ set(CMAKE_INSTALL_PREFIX $ENV{__CMakeBinDir})
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+@@ -167,7 +162,8 @@ if(CLR_CMAKE_TARGET_UNIX)
+ if(NOT CLR_CMAKE_TARGET_ARCH_WASM AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS)
+ if(CLR_CMAKE_TARGET_OSX)
+ add_definitions(-DTARGET_OSX)
+- add_link_options(-Wl,-bind_at_load)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-bind_at_load")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-bind_at_load" )
+ else()
+ add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
+ if(CLR_CMAKE_TARGET_SUNOS)
+@@ -175,7 +171,8 @@ if(CLR_CMAKE_TARGET_UNIX)
+ else()
+ # -z,now is required for full relro.
+ # see https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-re...
+- add_link_options(-Wl,--build-id=sha1 -Wl,-z,relro,-z,now)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now" )
+ endif()
+ endif()
+ endif()
+diff --git a/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt b/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
+index bcfc5dd106a..ebcb5a02b3f 100644
+--- a/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
++++ b/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
+@@ -79,14 +79,15 @@ if (GEN_SHARED_LIB)
+ install_with_stripped_symbols (System.Globalization.Native PROGRAMS .)
+ endif()
+
+-add_library(System.Globalization.Native-Static
+- STATIC
++add_library(System.Globalization.Native-obj
++ OBJECT
+ ${NATIVEGLOBALIZATION_SOURCES}
+ )
+
+-set_target_properties(System.Globalization.Native-Static PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1)
++set_target_properties(System.Globalization.Native-obj PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1)
+
+-install (TARGETS System.Globalization.Native-Static DESTINATION .)
++add_library(System.Globalization.Native-static INTERFACE)
++target_sources(System.Globalization.Native-static INTERFACE $<TARGET_OBJECTS:System.Globalization.Native-obj>)
+
+ if(NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID)
+ if (GEN_SHARED_LIB)
diff --git a/runtime-dont-strip.patch b/runtime-dont-strip.patch
new file mode 100644
index 0000000..694face
--- /dev/null
+++ b/runtime-dont-strip.patch
@@ -0,0 +1,47 @@
+Do not strip native/unmanaged symbols from binaries
+
+This is a hack. It rips out the calls to strip directly.
+
+The correct/upstreamable fix is to add a configure/build option to
+keep symbols for some builds, such as those needed by upstream.
+
+diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
+index 8b73581ed14..7697908425e 100644
+--- a/eng/native/functions.cmake
++++ b/eng/native/functions.cmake
+@@ -282,7 +282,7 @@ function(target_precompile_header)
+ endif(MSVC)
+ endfunction()
+
+-function(strip_symbols targetName outputFilename)
++function(strip_symbols_renamed targetName outputFilename)
+ if (CLR_CMAKE_HOST_UNIX)
+ set(strip_source_file $<TARGET_FILE:${targetName}>)
+
+@@ -336,8 +336,8 @@ function(strip_symbols targetName outputFilename)
+ endfunction()
+
+ function(install_with_stripped_symbols targetName kind destination)
+- strip_symbols(${targetName} symbol_file)
+- install_symbols(${symbol_file} ${destination})
++ # strip_symbols_renamed(${targetName} symbol_file)
++ # install_symbols(${symbol_file} ${destination})
+ if ("${kind}" STREQUAL "TARGETS")
+ set(install_source ${targetName})
+ elseif("${kind}" STREQUAL "PROGRAMS")
+@@ -375,13 +375,13 @@ function(install_clr)
+ foreach(targetName ${INSTALL_CLR_TARGETS})
+ list(FIND CLR_CROSS_COMPONENTS_LIST ${targetName} INDEX)
+ if (NOT DEFINED CLR_CROSS_COMPONENTS_LIST OR NOT ${INDEX} EQUAL -1)
+- strip_symbols(${targetName} symbol_file)
++ # strip_symbols_renamed(${targetName} symbol_file)
+
+ foreach(destination ${destinations})
+ # We don't need to install the export libraries for our DLLs
+ # since they won't be directly linked against.
+ install(PROGRAMS $<TARGET_FILE:${targetName}> DESTINATION ${destination})
+- install_symbols(${symbol_file} ${destination})
++ # install_symbols(${symbol_file} ${destination})
+
+ if(CLR_CMAKE_PGO_INSTRUMENT)
+ if(WIN32)
diff --git a/runtime-flags-support.patch b/runtime-flags-support.patch
new file mode 100644
index 0000000..921e483
--- /dev/null
+++ b/runtime-flags-support.patch
@@ -0,0 +1,30 @@
+diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh
+index b976f5fdc6c..853580b1c7a 100755
+--- a/eng/native/build-commons.sh
++++ b/eng/native/build-commons.sh
+@@ -163,6 +163,14 @@ EOF
+ return
+ fi
+
++ SAVED_CFLAGS="${CFLAGS}"
++ SAVED_CXXFLAGS="${CXXFLAGS}"
++ SAVED_LDFLAGS="${LDFLAGS}"
++
++ export CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}"
++ export CXXFLAGS="${CXXFLAGS} ${EXTRA_CXXFLAGS}"
++ export LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}"
++
+ if [[ "$__StaticAnalyzer" == 1 ]]; then
+ pushd "$intermediatesDir"
+
+@@ -181,6 +189,10 @@ EOF
+ $cmake_command --build "$intermediatesDir" --target install -- -j "$__NumProc"
+ fi
+
++ CFLAGS="${SAVED_CFLAGS}"
++ CXXFLAGS="${SAVED_CXXFLAGS}"
++ LDFLAGS="${SAVED_LDFLAGS}"
++
+ local exit_code="$?"
+ if [[ "$exit_code" != 0 ]]; then
+ echo "${__ErrMsgPrefix}Failed to build \"$message\"."
diff --git a/cli-telemetry-optout.patch b/sdk-telemetry-optout.patch
similarity index 82%
rename from cli-telemetry-optout.patch
rename to sdk-telemetry-optout.patch
index 9b01f13..9b92f33 100644
--- a/cli-telemetry-optout.patch
+++ b/sdk-telemetry-optout.patch
@@ -1,7 +1,7 @@
-diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs
+diff --git a/src/Cli/dotnet/Program.cs b/src/Cli/dotnet/Program.cs
index de1ebb9e6..6bbf479de 100644
---- a/src/dotnet/Program.cs
-+++ b/src/dotnet/Program.cs
+--- a/src/Cli/dotnet/Program.cs
++++ b/src/Cli/dotnet/Program.cs
@@ -28,6 +28,13 @@ public class Program
public static int Main(string[] args)
diff --git a/sources b/sources
deleted file mode 100644
index 6762903..0000000
--- a/sources
+++ /dev/null
@@ -1 +0,0 @@
-SHA512 (dotnet-v3.1.103.2-SDK.tar.gz) = 6c4de4914f6d107e59300efb43fae24fffdbb983a5ffeb36fbe26c8071a87e76162ebde0f0aa270ab7cbb666b4ee0ab65cfab98f1dbba2ea9d48809372417ec2
diff --git a/tests/tests.yml b/tests/tests.yml
index ede9095..f3825cf 100644
--- a/tests/tests.yml
+++ b/tests/tests.yml
@@ -7,20 +7,18 @@
- container
- atomic
repositories:
- - repo: "https://github.com/redhat-developer/dotnet-bunny.git"
- dest: "dotnet-bunny"
- repo: "https://github.com/redhat-developer/dotnet-regular-tests.git"
dest: "dotnet-regular-tests"
tests:
- - build_test_suite:
- dir: dotnet-bunny
- run: make
- - print_test_suite_version:
- dir: dotnet-bunny
- run: bin/turkey --version
- - run_regular_tests:
- dir: dotnet-regular-tests
- run: ../dotnet-bunny/bin/turkey -l={{ remote_artifacts }}
+ - download_test_runner:
+ dir: ./
+ run: wget --no-verbose https://github.com/redhat-developer/dotnet-bunny/releases/latest/download... -m) -O turkey && chmod +x ./turkey
+ - print_test_runner_version:
+ dir: ./
+ run: ./turkey --version
+ - regular:
+ dir: ./
+ run: ./turkey -l={{ remote_artifacts }} -s=$(pwd)/nuget-prerelease dotnet-regular-tests
required_packages:
- babeltrace
- bash-completion
diff --git a/update-release b/update-release
index d8bcde7..da87262 100755
--- a/update-release
+++ b/update-release
@@ -26,7 +26,7 @@ while [[ "$#" -gt 0 ]]; do
esac
done
-spec_file=dotnet3.1.spec
+spec_file=dotnet5.0.spec
sdk_version=${positional_args[0]:-}
if [[ -z ${sdk_version} ]]; then
commit 2236128d3ef9488a2c9fd503322a1d7910ef28f0
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Apr 10 12:29:37 2020 -0400
Add some documentation to the empty README
diff --git a/README.md b/README.md
index d35adc1..816aba3 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,133 @@
-# dotnet3.1
+# Overview
-The dotnet3.1 package
\ No newline at end of file
+This is the .NET Core 3.1 package for Fedora.
+
+This package is maintained by the Fedora DotNet SIG (Special Interest
+Group). You can find out more about the DotNet SIG at:
+
+- https://fedoraproject.org/wiki/SIGs/DotNet
+- https://fedoraproject.org/wiki/DotNet
+- https://lists.fedoraproject.org/archives/list/dotnet-sig@lists.fedoraproj...
+
+Please report any issues [using
+bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet3.1).
+
+# Specification
+
+This package follows [package naming and contents suggested by
+upstream](https://docs.microsoft.com/en-us/dotnet/core/build/distribution-packaging),
+with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
+`%{_libdir}`).
+
+# Contributing
+
+## General Changes
+
+1. Fork the repo.
+
+2. Checkout the forked repository.
+
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet3.1.git`
+ - `cd dotnet3.1`
+
+3. Make your changes. Don't forget to add a changelog.
+
+4. Do local builds.
+
+ - `fedpkg local`
+
+5. Fix any errors that come up and rebuild until it works locally.
+
+6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+9. Create a pull request with your changes.
+
+10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+## Updating to an new upstream release
+
+1. Fork the repo.
+
+2. Checkout the forked repository.
+
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet3.1.git`
+ - `cd dotnet3.1`
+
+3. Build the new upstream source tarball. Update the versions in the
+ spec file. Add a changelog. This is generally automated by the
+ following.
+
+ - `./update-release <sdk-version> <runtime-version>`
+
+ If this fails because of compiler errors, you might have to figure
+ out a fix, then add the patch in `build-dotnet-tarball` script
+ rather than the spec file.
+
+4. Do local builds.
+
+ - `fedpkg local`
+
+5. Fix any errors that come up and rebuild until it works locally. Any
+ patches that are needed at this point should be added to the spec file.
+
+6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+7. Upload the source archive to the Fedora look-aside cache.
+
+ - `fedpkg new-sources path-to-generated-dotnet-source-tarball.tar.gz`
+
+8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+9. Create a pull request with your changes.
+
+10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+# Testing
+
+This package uses CI tests as defined in `tests/test.yml`. Creating a
+pull-request or running a build will fire off tests and flag any issues. We have
+enabled gating (via `gating.yaml`) on the tests. That prevents a build
+that fails any test from being released until the failures are waived.
+
+The tests themselves are contained in this external repository:
+https://github.com/redhat-developer/dotnet-regular-tests/
commit 835f5d753d45c6e638dc1519cd108a0a97bfa545
Author: Chris Rummel <crummel(a)microsoft.com>
Date: Thu Apr 9 18:40:42 2020 -0500
Update to 3.1.103 SDK and 3.1.3 runtime.
- Update version numbers and sources.
- Add CoreFx patch from PR#42900 to fix clang10 build.
diff --git a/.gitignore b/.gitignore
index 1337900..6fa687b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/dotnet-v3.1.101-SDK.tar.gz
/dotnet-v3.1.102-SDK.tar.gz
+/dotnet-v3.1.103.2-SDK.tar.gz
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index ef7f742..3314c7e 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -94,7 +94,11 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.proj
mkdir -p patches/coreclr/
cp ../../build-coreclr-clang10.patch patches/coreclr
- ./build-source-tarball.sh "${unmodified_tarball_name}"
+ mkdir -p patches/corefx/
+ cp ../../corefx-42900-clang-10.patch patches/corefx
+ cp -r /usr/lib64/dotnet "${temp_dir}"
+ ./build.sh --with-sdk ../dotnet /p:ArchiveDownloadedPackages=true
+ ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build --with-sdk ../dotnet
popd
popd
@@ -111,8 +115,8 @@ pushd "${tarball_name}"
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
find -type f -iname '*.tar.gz' -delete
-rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*
-find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r
+rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
+find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
find src/coreclr.*/ -depth -name tests -print0 | xargs -0 rm -r
popd
diff --git a/corefx-42900-clang-10.patch b/corefx-42900-clang-10.patch
new file mode 100644
index 0000000..b898f34
--- /dev/null
+++ b/corefx-42900-clang-10.patch
@@ -0,0 +1,70 @@
+From 58d6cd09bd2d5b1085c6572c1d97b8533cf8294b Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Fri, 3 Apr 2020 13:53:09 -0400
+Subject: [PATCH] Fix corefx to build on clang 10
+
+Clang 10 adds/enables new warnings, some of which is affecting
+the corefx code.
+
+Clang 10 has added -Walloca to warn about uses of alloca. This commit
+replaces the only non-compliant use of that with a single fixed
+stack-allocated buffer.
+
+Clang 10 has also added -Wimplicit-int-float-conversion. This commit
+uses explicit casts to double to avoid the warnings.
+
+This is a backport of dotnet/runtime#33734 to corefx.
+
+After this commit, I can build all of corefx with Clang 10.
+---
+ src/Native/Unix/System.Native/pal_io.c | 20 +++++++++++---------
+ src/Native/Unix/System.Native/pal_time.c | 2 +-
+ 2 files changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/src/Native/Unix/System.Native/pal_io.c b/src/Native/Unix/System.Native/pal_io.c
+index 2d51edacf5ee..c7c42eb3e72b 100644
+--- a/src/Native/Unix/System.Native/pal_io.c
++++ b/src/Native/Unix/System.Native/pal_io.c
+@@ -906,18 +906,20 @@ int32_t SystemNative_Poll(PollEvent* pollEvents, uint32_t eventCount, int32_t mi
+ return Error_EINVAL;
+ }
+
+- size_t bufferSize;
+- if (!multiply_s(sizeof(struct pollfd), (size_t)eventCount, &bufferSize))
++ struct pollfd stackBuffer[(uint32_t)(2048/sizeof(struct pollfd))];
++ int useStackBuffer = eventCount <= (sizeof(stackBuffer)/sizeof(stackBuffer[0]));
++ struct pollfd* pollfds = NULL;
++ if (useStackBuffer)
+ {
+- return SystemNative_ConvertErrorPlatformToPal(EOVERFLOW);
++ pollfds = (struct pollfd*)&stackBuffer[0];
+ }
+-
+-
+- int useStackBuffer = bufferSize <= 2048;
+- struct pollfd* pollfds = (struct pollfd*)(useStackBuffer ? alloca(bufferSize) : malloc(bufferSize));
+- if (pollfds == NULL)
++ else
+ {
+- return Error_ENOMEM;
++ pollfds = (struct pollfd*)calloc(eventCount, sizeof(*pollfds));
++ if (pollfds == NULL)
++ {
++ return Error_ENOMEM;
++ }
+ }
+
+ for (uint32_t i = 0; i < eventCount; i++)
+diff --git a/src/Native/Unix/System.Native/pal_time.c b/src/Native/Unix/System.Native/pal_time.c
+index 1a7c862749d1..54ebde60a83b 100644
+--- a/src/Native/Unix/System.Native/pal_time.c
++++ b/src/Native/Unix/System.Native/pal_time.c
+@@ -169,7 +169,7 @@ int32_t SystemNative_GetCpuUtilization(ProcessCpuInformation* previousCpuInfo)
+ uint64_t resolution = SystemNative_GetTimestampResolution();
+ uint64_t timestamp = SystemNative_GetTimestamp();
+
+- uint64_t currentTime = (uint64_t)(timestamp * ((double)SecondsToNanoSeconds / resolution));
++ uint64_t currentTime = (uint64_t)((double)timestamp * ((double)SecondsToNanoSeconds / (double)resolution));
+
+ uint64_t lastRecordedCurrentTime = previousCpuInfo->lastRecordedCurrentTime;
+ uint64_t lastRecordedKernelTime = previousCpuInfo->lastRecordedKernelTime;
diff --git a/corefx-optflags-support.patch b/corefx-optflags-support.patch
index 6f76d7f..9b08f1f 100644
--- a/corefx-optflags-support.patch
+++ b/corefx-optflags-support.patch
@@ -2,9 +2,10 @@ diff --git a/src/Native/Unix/CMakeLists.txt b/src/Native/Unix/CMakeLists.txt
index 7d804a1e54..717c2718d7 100644
--- a/src/Native/Unix/CMakeLists.txt
+++ b/src/Native/Unix/CMakeLists.txt
-@@ -25,7 +25,6 @@ add_compile_options(-fPIC)
+@@ -25,7 +25,7 @@ add_compile_options(-fPIC)
add_compile_options(-Wthread-safety)
add_compile_options(-Wno-thread-safety-analysis)
++ add_compile_options(-Wno-alloca)
endif()
-add_compile_options(-Werror)
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index c08312f..44ff8fb 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -20,10 +20,12 @@
%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-%global host_version 3.1.2
-%global runtime_version 3.1.2
+%global host_version 3.1.3
+%global runtime_version 3.1.3
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 3.1.102
+%global sdk_version 3.1.103
+# upstream respun this release, so the tag doesn't exactly match
+%global src_version %{sdk_version}.2
%global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version}
@@ -62,8 +64,8 @@ License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
-# ./build-dotnet-tarball v%%{sdk_version}-SDK
-Source0: dotnet-v%{sdk_version}-SDK.tar.gz
+# ./build-dotnet-tarball v%%{src_version}-SDK
+Source0: dotnet-v%{src_version}-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
@@ -319,7 +321,7 @@ These are not meant for general use.
%prep
-%setup -q -n dotnet-v%{sdk_version}-SDK
+%setup -q -n dotnet-v%{src_version}-SDK
%if %{without bootstrap}
# Remove all prebuilts
@@ -328,12 +330,12 @@ find -iname '*.so' -type f -delete
find -iname '*.tar.gz' -type f -delete
find -iname '*.nupkg' -type f -delete
find -iname '*.zip' -type f -delete
-rm -r .dotnet/
+rm -rf .dotnet/
rm -r packages/source-built
%endif
%if %{without bootstrap}
-sed -i -e 's|3.1.100-preview1-014459|3.1.101|' global.json
+sed -i -e 's|3.1.100-preview1-014459|3.1.102|' global.json
mkdir -p packages/archive
ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
@@ -514,6 +516,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Thu Apr 09 2020 Chris Rummel <crummel(a)microsoft.com> - 3.1.103-1
+- Update to .NET Core Runtime 3.1.3 and SDK 3.1.103
+
* Mon Mar 16 2020 Omair Majid <omajid(a)redhat.com> - 3.1.102-1
- Update to .NET Core Runtime 3.1.2 and SDK 3.1.102
diff --git a/sources b/sources
index 9bc51e2..6762903 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v3.1.102-SDK.tar.gz) = f46f54b996883ecced44d377e2052b59461781bd2a0c8453a31e90e6822998ca5e97957a4b16a2aa00f7e803c17ce68c2128b8aad9aa2e0a399b7b15ea5af168
+SHA512 (dotnet-v3.1.103.2-SDK.tar.gz) = 6c4de4914f6d107e59300efb43fae24fffdbb983a5ffeb36fbe26c8071a87e76162ebde0f0aa270ab7cbb666b4ee0ab65cfab98f1dbba2ea9d48809372417ec2
commit 115e095157e2dbe9e52bdba77dbffd7b9c262fa6
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Mar 17 10:08:19 2020 -0400
Add testing and enable gating
And enable building against itself.
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index 76a64b6..c08312f 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -67,8 +67,6 @@ Source0: dotnet-v%{sdk_version}-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
-Patch1: sdk-rid.patch
-
# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
Patch100: corefx-optflags-support.patch
@@ -102,6 +100,7 @@ BuildRequires: dotnet-build-reference-packages
BuildRequires: dotnet-sdk-3.1
BuildRequires: dotnet-sdk-3.1-source-built-artifacts
%endif
+BuildRequires: findutils
BuildRequires: git
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: glibc-langpack-en
@@ -384,8 +383,8 @@ find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
cat /etc/os-release
%if %{without bootstrap}
-cp -a %{_libdir}/dotnet .dotnet
-patch -p0 -i %{PATCH1}
+# We need to create a copy because we will mutate this
+cp -a %{_libdir}/dotnet previously-built-dotnet
%endif
export CFLAGS="%{dotnet_cflags}"
@@ -399,12 +398,15 @@ export LDFLAGS="%{dotnet_ldflags}"
#%%endif
VERBOSE=1 ./build.sh \
- -- \
- /v:n \
- /p:SkipPortableRuntimeBuild=true \
- /p:LogVerbosity=n \
- /p:MinimalConsoleLogOutput=false \
- /p:ContinueOnPrebuiltBaselineError=true \
+%if %{without bootstrap}
+ --with-sdk previously-built-dotnet \
+%endif
+ -- \
+ /v:n \
+ /p:SkipPortableRuntimeBuild=true \
+ /p:LogVerbosity=n \
+ /p:MinimalConsoleLogOutput=false \
+ /p:ContinueOnPrebuiltBaselineError=true \
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
diff --git a/gating.yaml b/gating.yaml
new file mode 100644
index 0000000..0d881de
--- /dev/null
+++ b/gating.yaml
@@ -0,0 +1,7 @@
+--- !Policy
+product_versions:
+ - fedora-*
+decision_context: bodhi_update_push_testing
+subject_type: koji_build
+rules:
+ - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
diff --git a/sdk-rid.patch b/sdk-rid.patch
deleted file mode 100644
index 99dda5b..0000000
--- a/sdk-rid.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json
-+++ .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json
-@@ -488,6 +488,23 @@
- "fedora-x64"
- ]
- },
-+ "fedora.33": {
-+ "#import": [
-+ "fedora"
-+ ]
-+ },
-+ "fedora.33-arm64": {
-+ "#import": [
-+ "fedora.33",
-+ "fedora-arm64"
-+ ]
-+ },
-+ "fedora.33-x64": {
-+ "#import": [
-+ "fedora.33",
-+ "fedora-x64"
-+ ]
-+ },
- "freebsd": {
- "#import": [
- "unix"
-@@ -2042,4 +2059,4 @@
- ]
- }
- }
--}
-\ No newline at end of file
-+}
diff --git a/tests/.fmf/version b/tests/.fmf/version
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/tests/.fmf/version
@@ -0,0 +1 @@
+2
diff --git a/tests/provision.fmf b/tests/provision.fmf
new file mode 100644
index 0000000..87b3807
--- /dev/null
+++ b/tests/provision.fmf
@@ -0,0 +1,6 @@
+---
+
+standard-inventory-qcow2:
+ qemu:
+ m: 5G
+
diff --git a/tests/tests.yml b/tests/tests.yml
new file mode 100644
index 0000000..ede9095
--- /dev/null
+++ b/tests/tests.yml
@@ -0,0 +1,38 @@
+---
+- hosts: localhost
+ roles:
+ - role: standard-test-basic
+ tags:
+ - classic
+ - container
+ - atomic
+ repositories:
+ - repo: "https://github.com/redhat-developer/dotnet-bunny.git"
+ dest: "dotnet-bunny"
+ - repo: "https://github.com/redhat-developer/dotnet-regular-tests.git"
+ dest: "dotnet-regular-tests"
+ tests:
+ - build_test_suite:
+ dir: dotnet-bunny
+ run: make
+ - print_test_suite_version:
+ dir: dotnet-bunny
+ run: bin/turkey --version
+ - run_regular_tests:
+ dir: dotnet-regular-tests
+ run: ../dotnet-bunny/bin/turkey -l={{ remote_artifacts }}
+ required_packages:
+ - babeltrace
+ - bash-completion
+ - binutils
+ - expect
+ - git
+ - jq
+ - lldb
+ - lttng-tools
+ - make
+ - npm
+ - python3
+ - strace
+ - wget
+ - which
commit 942e8b4298a91cc9da6eac84967cdffb5da062cd
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Mar 16 12:46:48 2020 -0400
Upload sources
diff --git a/.gitignore b/.gitignore
index 72735bd..1337900 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/dotnet-v3.1.101-SDK.tar.gz
+/dotnet-v3.1.102-SDK.tar.gz
diff --git a/sources b/sources
index e5c1d68..9bc51e2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v3.1.101-SDK.tar.gz) = b2eb9df091186e793e82ac7560496c9ac3478e41efa94e58300606e2883d9bdb187f588a48a7bd9cf7f10f3d8f641d0867eb013de9b159e3d471a71dd823278c
+SHA512 (dotnet-v3.1.102-SDK.tar.gz) = f46f54b996883ecced44d377e2052b59461781bd2a0c8453a31e90e6822998ca5e97957a4b16a2aa00f7e803c17ce68c2128b8aad9aa2e0a399b7b15ea5af168
commit afa7f9a38cd8368e41e41309d6bd4fae20a0e3a5
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Mar 16 12:30:04 2020 -0400
Update to .NET Core Runtime 3.1.2 and SDK 3.1.102
diff --git a/coreclr-clang10.patch b/build-coreclr-clang10.patch
similarity index 100%
rename from coreclr-clang10.patch
rename to build-coreclr-clang10.patch
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 0923778..ef7f742 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -92,6 +92,8 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git submodule update --init --recursive
clean_dotnet_cache
sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.proj
+ mkdir -p patches/coreclr/
+ cp ../../build-coreclr-clang10.patch patches/coreclr
./build-source-tarball.sh "${unmodified_tarball_name}"
popd
popd
@@ -108,6 +110,7 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
+find -type f -iname '*.tar.gz' -delete
rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*
find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r
rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index fe50a53..76a64b6 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -20,11 +20,11 @@
%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-%global host_version 3.1.1
-%global runtime_version 3.1.1
+%global host_version 3.1.2
+%global runtime_version 3.1.2
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 3.1.101
-%global templates_version %{runtime_version}
+%global sdk_version 3.1.102
+%global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version}
%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
@@ -56,7 +56,7 @@
Name: dotnet3.1
Version: %{sdk_rpm_version}
-Release: 4%{?dist}
+Release: 1%{?dist}
Summary: .NET Core Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -83,8 +83,8 @@ Patch104: corefx-42871-fedora-33-rid.patch
# Build with with hardening flags, including -pie
Patch200: coreclr-hardening-flags.patch
-# Fix build with clang 10
-Patch201: coreclr-clang10.patch
+# Fix build with clang 10; Already applied at tarball-build time
+# Patch201: coreclr-clang10.patch
# Build with with hardening flags, including -pie
Patch300: core-setup-hardening-flags.patch
@@ -341,7 +341,7 @@ ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages
%endif
# Fix bad hardcoded path in build
-sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/dotnet-core-setup.*/src/corehost/common/pal.unix.cpp
+sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/core-setup.*/src/corehost/common/pal.unix.cpp
# Disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.proj
@@ -356,14 +356,14 @@ popd
pushd src/coreclr.*
%patch200 -p1
-%patch201 -p1
+#%%patch201 -p1
popd
-pushd src/dotnet-core-setup.*
+pushd src/core-setup.*
%patch300 -p1
popd
-pushd src/dotnet-cli.*
+pushd src/cli.*
%patch500 -p1
popd
@@ -392,8 +392,16 @@ export CFLAGS="%{dotnet_cflags}"
export CXXFLAGS="%{dotnet_cflags}"
export LDFLAGS="%{dotnet_ldflags}"
+#%%if %%{without bootstrap}
+# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
+# --with-packages %%{_libdir}/dotnet/source-built-artifacts/*.tar.gz \
+# --with-sdk %%{_libdir}/dotnet \
+#%%endif
+
VERBOSE=1 ./build.sh \
+ -- \
/v:n \
+ /p:SkipPortableRuntimeBuild=true \
/p:LogVerbosity=n \
/p:MinimalConsoleLogOutput=false \
/p:ContinueOnPrebuiltBaselineError=true \
@@ -421,15 +429,13 @@ chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/app
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/nethost.h
-chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.1.0/obj/Microsoft.AspNetCore.App.Ref.csproj.nuget.cache
-chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.1.0/Microsoft.AspNetCore.App.Ref/3.1.0/Debug/netstandard2.0/Microsoft.AspNetCore.App.Ref.assets.cache
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
install -dm 0755 %{buildroot}/%{_datadir}/bash-completion/completions
# dynamic completion needs the file to be named the same as the base command
-install src/dotnet-cli.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
+install src/cli.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
# TODO: the zsh completion script needs to be ported to use #compdef
#install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions
@@ -506,6 +512,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Mon Mar 16 2020 Omair Majid <omajid(a)redhat.com> - 3.1.102-1
+- Update to .NET Core Runtime 3.1.2 and SDK 3.1.102
+
* Fri Feb 28 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-4
- Disable bootstrap
diff --git a/sdk-rid.patch b/sdk-rid.patch
index 85e97b5..99dda5b 100644
--- a/sdk-rid.patch
+++ b/sdk-rid.patch
@@ -1,5 +1,5 @@
---- .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json.orig 2020-02-27 19:48:57.286692828 -0500
-+++ .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json 2020-02-27 19:49:17.185262594 -0500
+--- .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json
++++ .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json
@@ -488,6 +488,23 @@
"fedora-x64"
]
diff --git a/update-release b/update-release
index 09eb509..d8bcde7 100755
--- a/update-release
+++ b/update-release
@@ -1,14 +1,14 @@
#!/bin/bash
# Usage:
-# ./update-release runtime-version sdk-version
+# ./update-release sdk-version runtime-version
set -euo pipefail
IFS=$'\n\t'
print_usage() {
echo " Usage:"
- echo " ./update-release runtime-version sdk-version"
+ echo " ./update-release sdk-version runtime-version"
}
positional_args=()
@@ -28,19 +28,20 @@ done
spec_file=dotnet3.1.spec
-runtime_version=${positional_args[0]:-}
-if [[ -z ${runtime_version} ]]; then
- echo "error: missing runtime version"
+sdk_version=${positional_args[0]:-}
+if [[ -z ${sdk_version} ]]; then
+ echo "error: missing sdk version"
exit 1
fi
-host_version="$runtime_version"
-sdk_version=${positional_args[1]:-}
-if [[ -z ${sdk_version} ]]; then
- echo "error: missing sdk version"
+runtime_version=${positional_args[1]:-}
+if [[ -z ${runtime_version} ]]; then
+ echo "error: missing runtime version"
exit 1
fi
+host_version="$runtime_version"
+
if [[ ! -f "dotnet-v${sdk_version}-SDK.tar.gz" ]]; then
./build-dotnet-tarball "v${sdk_version}-SDK"
fi
commit 87d13ef02a3e031d50160e2fcc635465169b581f
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Feb 28 14:26:16 2020 -0500
Disable bootstrap
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index 7fc1ded..fe50a53 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -1,4 +1,4 @@
-%bcond_without bootstrap
+%bcond_with bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -56,7 +56,7 @@
Name: dotnet3.1
Version: %{sdk_rpm_version}
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: .NET Core Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -506,6 +506,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Fri Feb 28 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-4
+- Disable bootstrap
+
* Fri Feb 28 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-3
- Enable bootstrap
- Add Fedora 33 runtime ids
commit 5a4961b806dc1de340a2b640d4a406d36fb00554
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Feb 28 10:22:16 2020 -0500
Enable bootstrap and add Fedora 33 runtime ids
diff --git a/corefx-42871-fedora-33-rid.patch b/corefx-42871-fedora-33-rid.patch
new file mode 100644
index 0000000..2802dcd
--- /dev/null
+++ b/corefx-42871-fedora-33-rid.patch
@@ -0,0 +1,124 @@
+From 6cf4ff086875eaf29381cf406ea85846d9f66178 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Mon, 24 Feb 2020 14:11:03 -0500
+Subject: [PATCH] Add Fedora 33 runtime ids
+
+Fedora 32 is gearing up for release[1], and in-development version of
+Fedora has been offically labelled as being Fedora 33:
+
+ $ podman run -it fedora:33 cat /etc/os-release
+ NAME=Fedora
+ VERSION="33 (Container Image)"
+ ID=fedora
+ VERSION_ID=33
+ VERSION_CODENAME=""
+ PLATFORM_ID="platform:f33"
+ PRETTY_NAME="Fedora 33 (Container Image)"
+ ANSI_COLOR="0;34"
+ LOGO=fedora-logo-icon
+ CPE_NAME="cpe:/o:fedoraproject:fedora:33"
+ HOME_URL="https://fedoraproject.org/"
+ DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators..."
+ SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
+ BUG_REPORT_URL="https://bugzilla.redhat.com/"
+ REDHAT_BUGZILLA_PRODUCT="Fedora"
+ REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
+ REDHAT_SUPPORT_PRODUCT="Fedora"
+ REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
+ PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
+ VARIANT="Container Image"
+ VARIANT_ID=container
+
+[1] https://fedorapeople.org/groups/schedule/f-32/f-32-key-tasks.html
+---
+ eng/Packaging.props | 2 +-
+ .../runtime.compatibility.json | 32 +++++++++++++++++++
+ pkg/Microsoft.NETCore.Platforms/runtime.json | 17 ++++++++++
+ .../runtimeGroups.props | 2 +-
+ src/packages.builds | 3 ++
+ 5 files changed, 54 insertions(+), 2 deletions(-)
+
+diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+index 1e5c380a7a6a..c20e35394d6b 100644
+--- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
++++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+@@ -953,6 +953,38 @@
+ "any",
+ "base"
+ ],
++ "fedora.33": [
++ "fedora.33",
++ "fedora",
++ "linux",
++ "unix",
++ "any",
++ "base"
++ ],
++ "fedora.33-arm64": [
++ "fedora.33-arm64",
++ "fedora.33",
++ "fedora-arm64",
++ "fedora",
++ "linux-arm64",
++ "linux",
++ "unix-arm64",
++ "unix",
++ "any",
++ "base"
++ ],
++ "fedora.33-x64": [
++ "fedora.33-x64",
++ "fedora.33",
++ "fedora-x64",
++ "fedora",
++ "linux-x64",
++ "linux",
++ "unix-x64",
++ "unix",
++ "any",
++ "base"
++ ],
+ "freebsd": [
+ "freebsd",
+ "unix",
+diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json
+index b2f286ea2479..b3380ecbbef3 100644
+--- a/pkg/Microsoft.NETCore.Platforms/runtime.json
++++ b/pkg/Microsoft.NETCore.Platforms/runtime.json
+@@ -488,6 +488,23 @@
+ "fedora-x64"
+ ]
+ },
++ "fedora.33": {
++ "#import": [
++ "fedora"
++ ]
++ },
++ "fedora.33-arm64": {
++ "#import": [
++ "fedora.33",
++ "fedora-arm64"
++ ]
++ },
++ "fedora.33-x64": {
++ "#import": [
++ "fedora.33",
++ "fedora-x64"
++ ]
++ },
+ "freebsd": {
+ "#import": [
+ "unix"
+diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+index eeb8130b54fb..da48e5f9d09f 100644
+--- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
++++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+@@ -43,7 +43,7 @@
+ <RuntimeGroup Include="fedora">
+ <Parent>linux</Parent>
+ <Architectures>x64;arm64</Architectures>
+- <Versions>23;24;25;26;27;28;29;30;31;32</Versions>
++ <Versions>23;24;25;26;27;28;29;30;31;32;33</Versions>
+ <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
+ </RuntimeGroup>
+
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index 7f89d4b..7fc1ded 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -1,4 +1,4 @@
-%bcond_with bootstrap
+%bcond_without bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -56,7 +56,7 @@
Name: dotnet3.1
Version: %{sdk_rpm_version}
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: .NET Core Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -67,6 +67,8 @@ Source0: dotnet-v%{sdk_version}-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
+Patch1: sdk-rid.patch
+
# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
Patch100: corefx-optflags-support.patch
@@ -76,6 +78,9 @@ Patch101: corefx-39686-cgroupv2-01.patch
Patch102: corefx-39686-cgroupv2-02.patch
Patch103: corefx-39633-cgroupv2-mountpoints.patch
+# Add Fedora 33 RID to corefx
+Patch104: corefx-42871-fedora-33-rid.patch
+
# Build with with hardening flags, including -pie
Patch200: coreclr-hardening-flags.patch
# Fix build with clang 10
@@ -346,6 +351,7 @@ pushd src/corefx.*
%patch101 -p1
%patch102 -p1
%patch103 -p1
+%patch104 -p1
popd
pushd src/coreclr.*
@@ -379,6 +385,7 @@ cat /etc/os-release
%if %{without bootstrap}
cp -a %{_libdir}/dotnet .dotnet
+patch -p0 -i %{PATCH1}
%endif
export CFLAGS="%{dotnet_cflags}"
@@ -499,6 +506,10 @@ echo "Testing build results for debug symbols..."
%changelog
+* Fri Feb 28 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-3
+- Enable bootstrap
+- Add Fedora 33 runtime ids
+
* Thu Feb 27 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-2
- Disable bootstrap
diff --git a/sdk-rid.patch b/sdk-rid.patch
new file mode 100644
index 0000000..85e97b5
--- /dev/null
+++ b/sdk-rid.patch
@@ -0,0 +1,33 @@
+--- .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json.orig 2020-02-27 19:48:57.286692828 -0500
++++ .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json 2020-02-27 19:49:17.185262594 -0500
+@@ -488,6 +488,23 @@
+ "fedora-x64"
+ ]
+ },
++ "fedora.33": {
++ "#import": [
++ "fedora"
++ ]
++ },
++ "fedora.33-arm64": {
++ "#import": [
++ "fedora.33",
++ "fedora-arm64"
++ ]
++ },
++ "fedora.33-x64": {
++ "#import": [
++ "fedora.33",
++ "fedora-x64"
++ ]
++ },
+ "freebsd": {
+ "#import": [
+ "unix"
+@@ -2042,4 +2059,4 @@
+ ]
+ }
+ }
+-}
+\ No newline at end of file
++}
commit b909e7156775b1d8c8ea7198c41f11eda135636a
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Feb 27 17:57:48 2020 -0500
Disable bootstrap
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index 32d18ba..7f89d4b 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -1,4 +1,4 @@
-%bcond_without bootstrap
+%bcond_with bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -56,7 +56,7 @@
Name: dotnet3.1
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: .NET Core Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -499,6 +499,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Thu Feb 27 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-2
+- Disable bootstrap
+
* Tue Jan 21 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-1
- Update to .NET Core Runtime 3.1.1 and SDK 3.1.101
commit 39697ab889857504725b0798acddec3d7848bad7
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Feb 26 21:56:12 2020 -0500
Fix build with clang 10
diff --git a/coreclr-clang10.patch b/coreclr-clang10.patch
new file mode 100644
index 0000000..3b13cb1
--- /dev/null
+++ b/coreclr-clang10.patch
@@ -0,0 +1,54 @@
+diff --git a/configurecompiler.cmake b/configurecompiler.cmake
+index d769e82f57..4936c8b00d 100644
+--- a/configurecompiler.cmake
++++ b/configurecompiler.cmake
+@@ -474,6 +474,7 @@ if (CLR_CMAKE_PLATFORM_UNIX)
+ add_compile_options(-Wno-unused-variable)
+ add_compile_options(-Wno-unused-value)
+ add_compile_options(-Wno-unused-function)
++ add_compile_options(-Wno-error=misleading-indentation)
+
+ #These seem to indicate real issues
+ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-invalid-offsetof>)
+diff --git a/src/inc/slist.h b/src/inc/slist.h
+index f05d763dc6..abebe04d47 100644
+--- a/src/inc/slist.h
++++ b/src/inc/slist.h
+@@ -160,13 +160,13 @@ public:
+ void Init()
+ {
+ LIMITED_METHOD_CONTRACT;
+- m_pHead = &m_link;
++ m_pHead = PTR_SLink(&m_link);
+ // NOTE :: fHead variable is template argument
+ // the following code is a compiled in, only if the fHead flag
+ // is set to false,
+ if (!fHead)
+ {
+- m_pTail = &m_link;
++ m_pTail = PTR_SLink(&m_link);
+ }
+ }
+
+@@ -274,7 +274,7 @@ public:
+ SLink *ret = SLink::FindAndRemove(m_pHead, GetLink(pObj), &prior);
+
+ if (ret == m_pTail)
+- m_pTail = prior;
++ m_pTail = PTR_SLink(prior);
+
+ return GetObject(ret);
+ }
+diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
+index 08a35c8f62..43eb648a14 100644
+--- a/src/pal/inc/pal.h
++++ b/src/pal/inc/pal.h
+@@ -145,7 +145,7 @@ typedef PVOID NATIVE_LIBRARY_HANDLE;
+
+ /******************* Compiler-specific glue *******************************/
+ #ifndef THROW_DECL
+-#if defined(_MSC_VER) || defined(__llvm__) || !defined(__cplusplus)
++#if defined(_MSC_VER) || !defined(__cplusplus)
+ #define THROW_DECL
+ #else
+ #define THROW_DECL throw()
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index 4536929..32d18ba 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -78,6 +78,8 @@ Patch103: corefx-39633-cgroupv2-mountpoints.patch
# Build with with hardening flags, including -pie
Patch200: coreclr-hardening-flags.patch
+# Fix build with clang 10
+Patch201: coreclr-clang10.patch
# Build with with hardening flags, including -pie
Patch300: core-setup-hardening-flags.patch
@@ -112,6 +114,7 @@ BuildRequires: lttng-ust-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: python3
+BuildRequires: systemtap-sdt-devel
BuildRequires: tar
BuildRequires: zlib-devel
@@ -347,6 +350,7 @@ popd
pushd src/coreclr.*
%patch200 -p1
+%patch201 -p1
popd
pushd src/dotnet-core-setup.*
commit b18622e4ac5651fd10701af3cb2ef6cdd933d32f
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Feb 20 20:23:21 2020 -0500
Initial import (#1802803)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..72735bd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/dotnet-v3.1.101-SDK.tar.gz
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
new file mode 100755
index 0000000..0923778
--- /dev/null
+++ b/build-dotnet-tarball
@@ -0,0 +1,117 @@
+#!/bin/bash
+
+# Usage:
+# build-dotnet-tarball <tag-from-source-build>
+#
+# Creates a source archive from a tag (or commit) at github.com/dotnet/source-build
+
+# Source-build is a little strange, we need to clone it, check out the
+# tag, build it and then create a tarball from the archive directory
+# it creates. Also, it is likely that the source archive is only
+# buildable on the OS it was initially created in.
+
+set -euo pipefail
+IFS=$'\n\t'
+
+print_usage() {
+ echo "Usage:"
+ echo "$0 <tag-from-source-build>"
+ echo
+ echo "Creates a source archive from a tag at https://github.com/dotnet/source-build"
+}
+
+clean_dotnet_cache() {
+ rm -rf ~/.aspnet ~/.dotnet/ ~/.nuget/ ~/.local/share/NuGet ~/.templateengine
+ rm -rf /tmp/NuGet /tmp/NuGetScratch /tmp/.NETCore* /tmp/.NETStandard* /tmp/.dotnet /tmp/dotnet.* /tmp/clr-debug-pipe* /tmp/Razor-Server /tmp/CoreFxPipe* /tmp/VBCSCompiler /tmp/.NETFramework*
+}
+
+function runtime_id {
+
+ declare -A archmap
+ archmap=(
+ ["aarch64"]="arm64"
+ ["amd64"]="x64"
+ ["armv8l"]="arm"
+ ["i686"]="x86"
+ ["i386"]="x86"
+ ["x86_64"]="x64"
+ )
+
+ arch=${archmap["$(uname -m)"]}
+
+ source /etc/os-release
+ case "${ID}" in
+ # Remove the RHEL minor version
+ rhel) rid_version=${VERSION_ID%.*} ;;
+
+ *) rid_version=${VERSION_ID} ;;
+ esac
+
+ echo "${ID}.${rid_version}-${arch}"
+}
+
+positional_args=()
+while [[ "$#" -gt 0 ]]; do
+ arg="${1}"
+ case "${arg}" in
+ -h|--help)
+ print_usage
+ exit 0
+ ;;
+ *)
+ positional_args+=("$1")
+ shift
+ ;;
+ esac
+done
+
+
+tag=${positional_args[0]:-}
+if [[ -z ${tag} ]]; then
+ echo "error: missing tag to build"
+ exit 1
+fi
+
+set -x
+
+dir_name="dotnet-${tag}"
+unmodified_tarball_name="${dir_name}-original"
+tarball_name="${dir_name}"
+
+if [ -f "${tarball_name}.tar.gz" ]; then
+ echo "error: ${tarball_name}.tar.gz already exists"
+ exit 1
+fi
+
+if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
+ temp_dir=$(mktemp -d -p "$(pwd)")
+ pushd "${temp_dir}"
+ git clone https://github.com/dotnet/source-build
+ pushd source-build
+ git checkout "${tag}"
+ git submodule update --init --recursive
+ clean_dotnet_cache
+ sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.proj
+ ./build-source-tarball.sh "${unmodified_tarball_name}"
+ popd
+ popd
+
+ tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}/source-build" "${unmodified_tarball_name}"
+
+ rm -rf "${temp_dir}"
+fi
+
+rm -rf "${tarball_name}"
+tar xf "${unmodified_tarball_name}.tar.gz"
+mv "${unmodified_tarball_name}" "${tarball_name}"
+
+pushd "${tarball_name}"
+# Remove files with funny licenses, crypto implementations and other
+# not-very-useful artifacts to reduce tarball size
+rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*
+find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r
+rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
+find src/coreclr.*/ -depth -name tests -print0 | xargs -0 rm -r
+popd
+
+tar czf "${tarball_name}.tar.gz" "${tarball_name}"
diff --git a/check-debug-symbols.py b/check-debug-symbols.py
new file mode 100755
index 0000000..be26d87
--- /dev/null
+++ b/check-debug-symbols.py
@@ -0,0 +1,136 @@
+#!/usr/bin/python3
+
+"""
+Check debug symbols are present in shared object and can identify
+code.
+
+It starts scanning from a directory and recursively scans all ELF
+files found in it for various symbols to ensure all debuginfo is
+present and nothing has been stripped.
+
+Usage:
+
+./check-debug-symbols /path/of/dir/to/scan/
+
+
+Example:
+
+./check-debug-symbols /usr/lib64
+"""
+
+# This technique was explained to me by Mark Wielaard (mjw).
+
+import collections
+import os
+import re
+import subprocess
+import sys
+
+ScanResult = collections.namedtuple('ScanResult',
+ 'file_name debug_info debug_abbrev file_symbols gnu_debuglink')
+
+
+def scan_file(file):
+ "Scan the provided file and return a ScanResult containing results of the scan."
+
+ # Test for .debug_* sections in the shared object. This is the main test.
+ # Stripped objects will not contain these.
+ readelf_S_result = subprocess.run(['eu-readelf', '-S', file],
+ stdout=subprocess.PIPE, encoding='utf-8', check=True)
+ has_debug_info = any(line for line in readelf_S_result.stdout.split('\n') if '] .debug_info' in line)
+
+ has_debug_abbrev = any(line for line in readelf_S_result.stdout.split('\n') if '] .debug_abbrev' in line)
+
+ # Test FILE symbols. These will most likely be removed by anyting that
+ # manipulates symbol tables because it's generally useless. So a nice test
+ # that nothing has messed with symbols.
+ def contains_file_symbols(line):
+ parts = line.split()
+ if len(parts) < 8:
+ return False
+ return \
+ parts[2] == '0' and parts[3] == 'FILE' and parts[4] == 'LOCAL' and parts[5] == 'DEFAULT' and \
+ parts[6] == 'ABS' and re.match(r'((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx))?', parts[7])
+
+ readelf_s_result = subprocess.run(["eu-readelf", '-s', file],
+ stdout=subprocess.PIPE, encoding='utf-8', check=True)
+ has_file_symbols = any(line for line in readelf_s_result.stdout.split('\n') if contains_file_symbols(line))
+
+ # Test that there are no .gnu_debuglink sections pointing to another
+ # debuginfo file. There shouldn't be any debuginfo files, so the link makes
+ # no sense either.
+ has_gnu_debuglink = any(line for line in readelf_s_result.stdout.split('\n') if '] .gnu_debuglink' in line)
+
+ return ScanResult(file, has_debug_info, has_debug_abbrev, has_file_symbols, has_gnu_debuglink)
+
+def is_elf(file):
+ result = subprocess.run(['file', file], stdout=subprocess.PIPE, encoding='utf-8', check=True)
+ return re.search('ELF 64-bit LSB (?:executable|shared object)', result.stdout)
+
+def scan_file_if_sensible(file):
+ if is_elf(file):
+ # print(file)
+ return scan_file(file)
+ return None
+
+def scan_dir(dir):
+ results = []
+ for root, _, files in os.walk(dir):
+ for name in files:
+ result = scan_file_if_sensible(os.path.join(root, name))
+ if result:
+ results.append(result)
+ return results
+
+def scan(file):
+ file = os.path.abspath(file)
+ if os.path.isdir(file):
+ return scan_dir(file)
+ elif os.path.isfile(file):
+ return [scan_file_if_sensible(file)]
+
+def is_bad_result(result):
+ return not result.debug_info or not result.debug_abbrev or not result.file_symbols or result.gnu_debuglink
+
+def print_scan_results(results, verbose):
+ # print(results)
+ for result in results:
+ file_name = result.file_name
+ found_issue = False
+ if not result.debug_info:
+ found_issue = True
+ print('error: missing .debug_info section in', file_name)
+ if not result.debug_abbrev:
+ found_issue = True
+ print('error: missing .debug_abbrev section in', file_name)
+ if not result.file_symbols:
+ found_issue = True
+ print('error: missing FILE symbols in', file_name)
+ if result.gnu_debuglink:
+ found_issue = True
+ print('error: unexpected .gnu_debuglink section in', file_name)
+ if verbose and not found_issue:
+ print('OK: ', file_name)
+
+def main(args):
+ verbose = False
+ files = []
+ for arg in args:
+ if arg == '--verbose' or arg == '-v':
+ verbose = True
+ else:
+ files.append(arg)
+
+ results = []
+ for file in files:
+ results.extend(scan(file))
+
+ print_scan_results(results, verbose)
+
+ if any(is_bad_result(result) for result in results):
+ return 1
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))
diff --git a/cli-telemetry-optout.patch b/cli-telemetry-optout.patch
new file mode 100644
index 0000000..9b01f13
--- /dev/null
+++ b/cli-telemetry-optout.patch
@@ -0,0 +1,18 @@
+diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs
+index de1ebb9e6..6bbf479de 100644
+--- a/src/dotnet/Program.cs
++++ b/src/dotnet/Program.cs
+@@ -28,6 +28,13 @@ public class Program
+
+ public static int Main(string[] args)
+ {
++ // opt out of telemetry by default if the env var is unset
++ string telemetryValue = Environment.GetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT");
++ if (String.IsNullOrEmpty(telemetryValue))
++ {
++ Environment.SetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1");
++ }
++
+ DebugHelper.HandleDebugSwitch(ref args);
+
+ new MulticoreJitActivator().TryActivateMulticoreJit();
diff --git a/core-setup-hardening-flags.patch b/core-setup-hardening-flags.patch
new file mode 100644
index 0000000..3f6b91c
--- /dev/null
+++ b/core-setup-hardening-flags.patch
@@ -0,0 +1,11 @@
+diff --git a/src/settings.cmake b/src/settings.cmake
+--- a/src/settings.cmake
++++ b/src/settings.cmake
+@@ -218,6 +218,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic -Bsymbolic-functions")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
+ add_compile_options(-fstack-protector-strong)
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ add_compile_options(-fstack-protector)
diff --git a/coreclr-hardening-flags.patch b/coreclr-hardening-flags.patch
new file mode 100644
index 0000000..d58d735
--- /dev/null
+++ b/coreclr-hardening-flags.patch
@@ -0,0 +1,11 @@
+diff --git a/src/debug/createdump/CMakeLists.txt b/src/debug/createdump/CMakeLists.txt
+--- a/src/debug/createdump/CMakeLists.txt
++++ b/src/debug/createdump/CMakeLists.txt
+@@ -21,6 +21,7 @@ include_directories(BEFORE ${VM_DIR})
+ add_definitions(-DPAL_STDCPP_COMPAT)
+
+ add_compile_options(-fPIE)
++add_link_options(-pie)
+
+ set(CREATEDUMP_SOURCES
+ createdump.cpp
diff --git a/corefx-39633-cgroupv2-mountpoints.patch b/corefx-39633-cgroupv2-mountpoints.patch
new file mode 100644
index 0000000..34fbecb
--- /dev/null
+++ b/corefx-39633-cgroupv2-mountpoints.patch
@@ -0,0 +1,46 @@
+From 1864630f762160e1cb439362cc0577471624192a Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Fri, 19 Jul 2019 19:18:51 -0400
+Subject: [PATCH] Fix up cgroup2fs in Interop.MountPoints.FormatInfo
+
+`stat -fc %T /sys/fs/cgroup` calls this file system `cgroup2fs`
+
+Add the cgroup2fs file system magic number. Available from:
+
+ - https://www.kernel.org/doc/Documentation/cgroup-v2.txt
+ - man 2 statfs
+
+Move cgroup2fs next to cgroupfs in the drive type list, since it is also
+DriveType.Ram.
+---
+ .../Unix/System.Native/Interop.MountPoints.FormatInfo.cs | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
+index af38a2285ba2..4240bd4853ab 100644
+--- a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
++++ b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
+@@ -47,6 +47,7 @@ internal enum UnixFileSystemTypes : long
+ btrfs = 0x9123683E,
+ ceph = 0x00C36400,
+ cgroupfs = 0x0027E0EB,
++ cgroup2fs = 0x63677270,
+ cifs = 0xFF534D42,
+ coda = 0x73757245,
+ coherent = 0x012FF7B7,
+@@ -231,7 +232,6 @@ private static DriveType GetDriveType(string fileSystemName)
+ case "bpf_fs":
+ case "btrfs":
+ case "btrfs_test":
+- case "cgroup2fs":
+ case "coh":
+ case "daxfs":
+ case "drvfs":
+@@ -384,6 +384,7 @@ private static DriveType GetDriveType(string fileSystemName)
+ case "binfmt_misc":
+ case "cgroup":
+ case "cgroupfs":
++ case "cgroup2fs":
+ case "configfs":
+ case "cramfs":
+ case "cramfs-wend":
diff --git a/corefx-39686-cgroupv2-01.patch b/corefx-39686-cgroupv2-01.patch
new file mode 100644
index 0000000..e7628e2
--- /dev/null
+++ b/corefx-39686-cgroupv2-01.patch
@@ -0,0 +1,391 @@
+From 2b2273ea4ea1c28472fa0d6ad2ffeb6374500550 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Wed, 23 Oct 2019 17:45:59 -0400
+Subject: [PATCH 1/2] Add cgroup v2 support to Interop.cgroups
+
+Fix up code to adjust cgroup v1 assumptions and check cgroup v2 paths,
+locations and values.
+
+Continue using the older cgroup v1 terminology for APIs.
+---
+ .../Interop/Linux/cgroups/Interop.cgroups.cs | 116 ++++++++++++++----
+ src/Common/tests/Common.Tests.csproj | 4 +
+ .../tests/Tests/Interop/cgroupsTests.cs | 107 ++++++++++++++++
+ .../tests/DescriptionNameTests.cs | 2 +-
+ 4 files changed, 206 insertions(+), 23 deletions(-)
+ create mode 100644 src/Common/tests/Tests/Interop/cgroupsTests.cs
+
+diff --git a/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs b/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
+index 0ffd4d7b7c03..186fe0516c5b 100644
+--- a/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
++++ b/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
+@@ -9,17 +9,22 @@
+
+ internal static partial class Interop
+ {
++ /// <summary>Provides access to some cgroup (v1 and v2) features</summary>
+ internal static partial class cgroups
+ {
++ // For cgroup v1, see https://www.kernel.org/doc/Documentation/cgroup-v1/
++ // For cgroup v2, see https://www.kernel.org/doc/Documentation/cgroup-v2.txt
++
++ /// <summary>The version of cgroup that's being used </summary>
++ internal enum CGroupVersion { None, CGroup1, CGroup2 };
++
+ /// <summary>Path to mountinfo file in procfs for the current process.</summary>
+ private const string ProcMountInfoFilePath = "/proc/self/mountinfo";
+ /// <summary>Path to cgroup directory in procfs for the current process.</summary>
+ private const string ProcCGroupFilePath = "/proc/self/cgroup";
+
+- /// <summary>Path to the found cgroup location, or null if it couldn't be found.</summary>
+- internal static readonly string s_cgroupMemoryPath = FindCGroupPath("memory");
+- /// <summary>Path to the found cgroup memory limit_in_bytes path, or null if it couldn't be found.</summary>
+- private static readonly string s_cgroupMemoryLimitPath = s_cgroupMemoryPath != null ? s_cgroupMemoryPath + "/memory.limit_in_bytes" : null;
++ /// <summary>Path to the found cgroup memory limit path, or null if it couldn't be found.</summary>
++ internal static readonly string s_cgroupMemoryLimitPath = FindCGroupMemoryLimitPath();
+
+ /// <summary>Tries to read the memory limit from the cgroup memory location.</summary>
+ /// <param name="limit">The read limit, or 0 if it couldn't be read.</param>
+@@ -42,7 +47,7 @@ public static bool TryGetMemoryLimit(out ulong limit)
+ /// <param name="path">The path to the file to parse.</param>
+ /// <param name="result">The parsed result, or 0 if it couldn't be parsed.</param>
+ /// <returns>true if the value was read successfully; otherwise, false.</returns>
+- private static bool TryReadMemoryValueFromFile(string path, out ulong result)
++ internal static bool TryReadMemoryValueFromFile(string path, out ulong result)
+ {
+ if (File.Exists(path))
+ {
+@@ -79,6 +84,11 @@ private static bool TryReadMemoryValueFromFile(string path, out ulong result)
+ result = checked(ulongValue * multiplier);
+ return true;
+ }
++
++ // 'max' is also a possible valid value
++ //
++ // Treat this as 'no memory limit' and let the caller
++ // fallback to reading the real limit via other means
+ }
+ catch (Exception e)
+ {
+@@ -90,12 +100,35 @@ private static bool TryReadMemoryValueFromFile(string path, out ulong result)
+ return false;
+ }
+
++ /// <summary>Find the cgroup memory limit path.</summary>
++ /// <returns>The limit path if found; otherwise, null.</returns>
++ private static string FindCGroupMemoryLimitPath()
++ {
++ string cgroupMemoryPath = FindCGroupPath("memory", out CGroupVersion version);
++ if (cgroupMemoryPath != null)
++ {
++ if (version == CGroupVersion.CGroup1)
++ {
++ return cgroupMemoryPath + "/memory.limit_in_bytes";
++ }
++
++ if (version == CGroupVersion.CGroup2)
++ {
++ // 'memory.high' is a soft limit; the process may get throttled
++ // 'memory.max' is where OOM killer kicks in
++ return cgroupMemoryPath + "/memory.max";
++ }
++ }
++
++ return null;
++ }
++
+ /// <summary>Find the cgroup path for the specified subsystem.</summary>
+ /// <param name="subsystem">The subsystem, e.g. "memory".</param>
+ /// <returns>The cgroup path if found; otherwise, null.</returns>
+- private static string FindCGroupPath(string subsystem)
++ private static string FindCGroupPath(string subsystem, out CGroupVersion version)
+ {
+- if (TryFindHierarchyMount(subsystem, out string hierarchyRoot, out string hierarchyMount) &&
++ if (TryFindHierarchyMount(subsystem, out version, out string hierarchyRoot, out string hierarchyMount) &&
+ TryFindCGroupPathForSubsystem(subsystem, out string cgroupPathRelativeToMount))
+ {
+ // For a host cgroup, we need to append the relative path.
+@@ -113,19 +146,24 @@ private static string FindCGroupPath(string subsystem)
+ /// <param name="root">The path of the directory in the filesystem which forms the root of this mount; null if not found.</param>
+ /// <param name="path">The path of the mount point relative to the process's root directory; null if not found.</param>
+ /// <returns>true if the mount was found; otherwise, null.</returns>
+- private static bool TryFindHierarchyMount(string subsystem, out string root, out string path)
++ private static bool TryFindHierarchyMount(string subsystem, out CGroupVersion version, out string root, out string path)
+ {
+- if (File.Exists(ProcMountInfoFilePath))
++ return TryFindHierarchyMount(ProcMountInfoFilePath, subsystem, out version, out root, out path);
++ }
++
++ internal static bool TryFindHierarchyMount(string mountInfoFilePath, string subsystem, out CGroupVersion version, out string root, out string path)
++ {
++ if (File.Exists(mountInfoFilePath))
+ {
+ try
+ {
+- using (var reader = new StreamReader(ProcMountInfoFilePath))
++ using (var reader = new StreamReader(mountInfoFilePath))
+ {
+ string line;
+ while ((line = reader.ReadLine()) != null)
+ {
+ // Look for an entry that has cgroup as the "filesystem type"
+- // and that has options containing the specified subsystem.
++ // and, for cgroup1, that has options containing the specified subsystem
+ // See man page for /proc/[pid]/mountinfo for details, e.g.:
+ // (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
+ // 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
+@@ -148,17 +186,35 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
+ continue;
+ }
+
+- if (postSeparatorlineParts[0] != "cgroup" ||
+- Array.IndexOf(postSeparatorlineParts[2].Split(','), subsystem) < 0)
++ bool validCGroup1Entry = ((postSeparatorlineParts[0] == "cgroup") &&
++ (Array.IndexOf(postSeparatorlineParts[2].Split(','), subsystem) >= 0));
++ bool validCGroup2Entry = postSeparatorlineParts[0] == "cgroup2";
++
++ if (!validCGroup1Entry && !validCGroup2Entry)
+ {
+ // Not the relevant entry.
+ continue;
+ }
+
+- // Found the relevant entry. Extract the mount root and path.
++ // Found the relevant entry. Extract the cgroup version, mount root and path.
++ switch (postSeparatorlineParts[0])
++ {
++ case "cgroup":
++ version = CGroupVersion.CGroup1;
++ break;
++ case "cgroup2":
++ version = CGroupVersion.CGroup2;
++ break;
++ default:
++ version = CGroupVersion.None;
++ Debug.Fail($"invalid value for CGroupVersion \"{postSeparatorlineParts[0]}\"");
++ break;
++ }
++
+ string[] lineParts = line.Substring(0, endOfOptionalFields).Split(' ');
+ root = lineParts[3];
+ path = lineParts[4];
++
+ return true;
+ }
+ }
+@@ -169,6 +225,7 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
+ }
+ }
+
++ version = CGroupVersion.None;
+ root = null;
+ path = null;
+ return false;
+@@ -180,27 +237,42 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
+ /// <returns></returns>
+ private static bool TryFindCGroupPathForSubsystem(string subsystem, out string path)
+ {
+- if (File.Exists(ProcCGroupFilePath))
++ return TryFindCGroupPathForSubsystem(ProcCGroupFilePath, subsystem, out path);
++ }
++
++ internal static bool TryFindCGroupPathForSubsystem(string procCGroupFilePath, string subsystem, out string path)
++ {
++ if (File.Exists(procCGroupFilePath))
+ {
+ try
+ {
+- using (var reader = new StreamReader(ProcCGroupFilePath))
++ using (var reader = new StreamReader(procCGroupFilePath))
+ {
+ string line;
+ while ((line = reader.ReadLine()) != null)
+ {
+- // Find the first entry that has the subsystem listed in its controller
+- // list. See man page for cgroups for /proc/[pid]/cgroups format, e.g:
+- // hierarchy-ID:controller-list:cgroup-path
+- // 5:cpuacct,cpu,cpuset:/daemons
+-
+ string[] lineParts = line.Split(':');
++
+ if (lineParts.Length != 3)
+ {
+ // Malformed line.
+ continue;
+ }
+
++ // cgroup v2: Find the first entry that matches the cgroup v2 hierarchy:
++ // 0::$PATH
++
++ if ((lineParts[0] == "0") && (string.Empty == lineParts[1]))
++ {
++ path = lineParts[2];
++ return true;
++ }
++
++ // cgroup v1: Find the first entry that has the subsystem listed in its controller
++ // list. See man page for cgroups for /proc/[pid]/cgroups format, e.g:
++ // hierarchy-ID:controller-list:cgroup-path
++ // 5:cpuacct,cpu,cpuset:/daemons
++
+ if (Array.IndexOf(lineParts[1].Split(','), subsystem) < 0)
+ {
+ // Not the relevant entry.
+@@ -214,7 +286,7 @@ private static bool TryFindCGroupPathForSubsystem(string subsystem, out string p
+ }
+ catch (Exception e)
+ {
+- Debug.Fail($"Failed to read or parse \"{ProcMountInfoFilePath}\": {e}");
++ Debug.Fail($"Failed to read or parse \"{procCGroupFilePath}\": {e}");
+ }
+ }
+
+diff --git a/src/Common/tests/Common.Tests.csproj b/src/Common/tests/Common.Tests.csproj
+index a189d856348b..979c8dd7fbe6 100644
+--- a/src/Common/tests/Common.Tests.csproj
++++ b/src/Common/tests/Common.Tests.csproj
+@@ -12,6 +12,9 @@
+ <Compile Include="$(CommonTestPath)\System\Security\Cryptography\ByteUtils.cs">
+ <Link>Common\System\Security\Cryptography\ByteUtils.cs</Link>
+ </Compile>
++ <Compile Include="$(CommonPath)\Interop\Linux\cgroups\Interop.cgroups.cs">
++ <Link>Common\Interop\Linux\cgroups\Interop.cgroups.cs</Link>
++ </Compile>
+ <Compile Include="$(CommonPath)\Interop\Linux\procfs\Interop.ProcFsStat.cs">
+ <Link>Common\Interop\Linux\procfs\Interop.ProcFsStat.cs</Link>
+ </Compile>
+@@ -69,6 +72,7 @@
+ <Compile Include="$(CommonPath)\CoreLib\System\PasteArguments.cs">
+ <Link>Common\CoreLib\System\PasteArguments.cs</Link>
+ </Compile>
++ <Compile Include="Tests\Interop\cgroupsTests.cs" />
+ <Compile Include="Tests\Interop\procfsTests.cs" />
+ <Compile Include="Tests\System\CharArrayHelpersTests.cs" />
+ <Compile Include="Tests\System\IO\PathInternal.Tests.cs" />
+diff --git a/src/Common/tests/Tests/Interop/cgroupsTests.cs b/src/Common/tests/Tests/Interop/cgroupsTests.cs
+new file mode 100644
+index 000000000000..f16d9242879c
+--- /dev/null
++++ b/src/Common/tests/Tests/Interop/cgroupsTests.cs
+@@ -0,0 +1,107 @@
++// Licensed to the .NET Foundation under one or more agreements.
++// The .NET Foundation licenses this file to you under the MIT license.
++// See the LICENSE file in the project root for more information.
++
++using System;
++using System.IO;
++using System.Text;
++using Xunit;
++
++namespace Common.Tests
++{
++ public class cgroupsTests
++ {
++ [Theory]
++ [InlineData(true, "0", 0)]
++ [InlineData(false, "max", 0)]
++ [InlineData(true, "1k", 1024)]
++ [InlineData(true, "1K", 1024)]
++ public static void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
++ {
++ string path = Path.GetTempFileName();
++ try
++ {
++ File.WriteAllText(path, valueText);
++
++ bool result = Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val);
++
++ Assert.Equal(expectedResult, result);
++ if (result)
++ {
++ Assert.Equal(expectedValue, val);
++ }
++ }
++ finally
++ {
++ File.Delete(path);
++ }
++ }
++
++ [Theory]
++ [InlineData(false, "0 0 0:0 / /foo ignore ignore - overlay overlay ignore", "ignore", 0, "/", "/")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "ignore", 2, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "memory", 2, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo-with-dashes ignore ignore - cgroup2 cgroup2 ignore", "ignore", 2, "/", "/foo-with-dashes")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory", "memory", 1, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo-with-dashes ignore ignore - cgroup cgroup memory", "memory", 1, "/", "/foo-with-dashes")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu,memory", "memory", 1, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory,cpu", "memory", 1, "/", "/foo")]
++ [InlineData(false, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu", "memory", 0, "/", "/foo")]
++ public static void ParseValidateMountInfo(bool found, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
++ {
++ string path = Path.GetTempFileName();
++ try
++ {
++ File.WriteAllText(path, procSelfMountInfoText);
++
++ bool result = Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount);
++
++ Assert.Equal(found, result);
++ if (found)
++ {
++ Assert.Equal(expectedVersion, (int)version);
++ Assert.Equal(expectedRoot, root);
++ Assert.Equal(expectedMount, mount);
++ }
++ }
++ finally
++ {
++ File.Delete(path);
++ }
++ }
++
++ [Theory]
++ [InlineData(true, "0::/foo", "ignore", "/foo")]
++ [InlineData(true, "0::/bar", "ignore", "/bar")]
++ [InlineData(true, "0::frob", "ignore", "frob")]
++ [InlineData(false, "1::frob", "ignore", "ignore")]
++ [InlineData(true, "1:foo:bar", "foo", "bar")]
++ [InlineData(true, "2:foo:bar", "foo", "bar")]
++ [InlineData(false, "2:foo:bar", "bar", "ignore")]
++ [InlineData(true, "1:foo:bar\n2:eggs:spam", "foo", "bar")]
++ [InlineData(true, "1:foo:bar\n2:eggs:spam", "eggs", "spam")]
++ public static void ParseValidateProcCGroup(bool found, string procSelfCgroupText, string subsystem, string expectedMountPath)
++ {
++ string path = Path.GetTempFileName();
++ try
++ {
++ File.WriteAllText(path, procSelfCgroupText);
++
++ bool result = Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath);
++
++ Assert.Equal(found, result);
++ if (found)
++ {
++ Assert.Equal(expectedMountPath, mountPath);
++ }
++ }
++ finally
++ {
++ File.Delete(path);
++ }
++ }
++ }
++}
+diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
+index 910af2fd82b4..73f692898dbc 100644
+--- a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
++++ b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
+@@ -40,7 +40,7 @@ public void DumpRuntimeInformationToConsole()
+
+ Console.WriteLine($"### CURRENT DIRECTORY: {Environment.CurrentDirectory}");
+
+- string cgroupsLocation = Interop.cgroups.s_cgroupMemoryPath;
++ string cgroupsLocation = Interop.cgroups.s_cgroupMemoryLimitPath;
+ if (cgroupsLocation != null)
+ {
+ Console.WriteLine($"### CGROUPS MEMORY: {cgroupsLocation}");
+
diff --git a/corefx-39686-cgroupv2-02.patch b/corefx-39686-cgroupv2-02.patch
new file mode 100644
index 0000000..88dcd99
--- /dev/null
+++ b/corefx-39686-cgroupv2-02.patch
@@ -0,0 +1,129 @@
+From 9a8c5e4014ffca8aff70808cc0e50a403d38c292 Mon Sep 17 00:00:00 2001
+From: Stephen Toub <stoub(a)microsoft.com>
+Date: Wed, 23 Oct 2019 20:35:49 -0400
+Subject: [PATCH 2/2] Clean up new tests
+
+---
+ .../tests/Tests/Interop/cgroupsTests.cs | 79 ++++++-------------
+ 1 file changed, 25 insertions(+), 54 deletions(-)
+
+diff --git a/src/Common/tests/Tests/Interop/cgroupsTests.cs b/src/Common/tests/Tests/Interop/cgroupsTests.cs
+index f16d9242879c..fc6ab5c9753c 100644
+--- a/src/Common/tests/Tests/Interop/cgroupsTests.cs
++++ b/src/Common/tests/Tests/Interop/cgroupsTests.cs
+@@ -2,38 +2,27 @@
+ // The .NET Foundation licenses this file to you under the MIT license.
+ // See the LICENSE file in the project root for more information.
+
+-using System;
+ using System.IO;
+-using System.Text;
+ using Xunit;
+
+ namespace Common.Tests
+ {
+- public class cgroupsTests
++ public class cgroupsTests : FileCleanupTestBase
+ {
+ [Theory]
+- [InlineData(true, "0", 0)]
+- [InlineData(false, "max", 0)]
+- [InlineData(true, "1k", 1024)]
+- [InlineData(true, "1K", 1024)]
+- public static void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
++ [InlineData(true, "0", 0)]
++ [InlineData(false, "max", 0)]
++ [InlineData(true, "1k", 1024)]
++ [InlineData(true, "1K", 1024)]
++ public void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
+ {
+- string path = Path.GetTempFileName();
+- try
+- {
+- File.WriteAllText(path, valueText);
+-
+- bool result = Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val);
++ string path = GetTestFilePath();
++ File.WriteAllText(path, valueText);
+
+- Assert.Equal(expectedResult, result);
+- if (result)
+- {
+- Assert.Equal(expectedValue, val);
+- }
+- }
+- finally
++ Assert.Equal(expectedResult, Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val));
++ if (expectedResult)
+ {
+- File.Delete(path);
++ Assert.Equal(expectedValue, val);
+ }
+ }
+
+@@ -50,26 +39,17 @@ public static void ValidateTryReadMemoryValue(bool expectedResult, string valueT
+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu,memory", "memory", 1, "/", "/foo")]
+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory,cpu", "memory", 1, "/", "/foo")]
+ [InlineData(false, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu", "memory", 0, "/", "/foo")]
+- public static void ParseValidateMountInfo(bool found, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
++ public void ParseValidateMountInfo(bool expectedFound, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
+ {
+- string path = Path.GetTempFileName();
+- try
+- {
+- File.WriteAllText(path, procSelfMountInfoText);
+-
+- bool result = Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount);
++ string path = GetTestFilePath();
++ File.WriteAllText(path, procSelfMountInfoText);
+
+- Assert.Equal(found, result);
+- if (found)
+- {
+- Assert.Equal(expectedVersion, (int)version);
+- Assert.Equal(expectedRoot, root);
+- Assert.Equal(expectedMount, mount);
+- }
+- }
+- finally
++ Assert.Equal(expectedFound, Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount));
++ if (expectedFound)
+ {
+- File.Delete(path);
++ Assert.Equal(expectedVersion, (int)version);
++ Assert.Equal(expectedRoot, root);
++ Assert.Equal(expectedMount, mount);
+ }
+ }
+
+@@ -83,24 +63,15 @@ public static void ParseValidateMountInfo(bool found, string procSelfMountInfoTe
+ [InlineData(false, "2:foo:bar", "bar", "ignore")]
+ [InlineData(true, "1:foo:bar\n2:eggs:spam", "foo", "bar")]
+ [InlineData(true, "1:foo:bar\n2:eggs:spam", "eggs", "spam")]
+- public static void ParseValidateProcCGroup(bool found, string procSelfCgroupText, string subsystem, string expectedMountPath)
++ public void ParseValidateProcCGroup(bool expectedFound, string procSelfCgroupText, string subsystem, string expectedMountPath)
+ {
+- string path = Path.GetTempFileName();
+- try
+- {
+- File.WriteAllText(path, procSelfCgroupText);
++ string path = GetTestFilePath();
++ File.WriteAllText(path, procSelfCgroupText);
+
+- bool result = Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath);
+-
+- Assert.Equal(found, result);
+- if (found)
+- {
+- Assert.Equal(expectedMountPath, mountPath);
+- }
+- }
+- finally
++ Assert.Equal(expectedFound, Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath));
++ if (expectedFound)
+ {
+- File.Delete(path);
++ Assert.Equal(expectedMountPath, mountPath);
+ }
+ }
+ }
diff --git a/corefx-optflags-support.patch b/corefx-optflags-support.patch
new file mode 100644
index 0000000..6f76d7f
--- /dev/null
+++ b/corefx-optflags-support.patch
@@ -0,0 +1,39 @@
+diff --git a/src/Native/Unix/CMakeLists.txt b/src/Native/Unix/CMakeLists.txt
+index 7d804a1e54..717c2718d7 100644
+--- a/src/Native/Unix/CMakeLists.txt
++++ b/src/Native/Unix/CMakeLists.txt
+@@ -25,7 +25,6 @@ add_compile_options(-fPIC)
+ add_compile_options(-Wthread-safety)
+ add_compile_options(-Wno-thread-safety-analysis)
+ endif()
+-add_compile_options(-Werror)
+
+ if(CMAKE_SYSTEM_NAME STREQUAL Emscripten)
+ set(CLR_CMAKE_PLATFORM_WASM 1)
+diff --git a/src/Native/Unix/configure.cmake b/src/Native/Unix/configure.cmake
+index f4a30ad6cb..f2db68402a 100644
+--- a/src/Native/Unix/configure.cmake
++++ b/src/Native/Unix/configure.cmake
+@@ -27,6 +27,12 @@ else ()
+ message(FATAL_ERROR "Unknown platform. Cannot define PAL_UNIX_NAME, used by RuntimeInformation.")
+ endif ()
+
++
++set (PREVIOUS_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
++set (CMAKE_CXX_FLAGS "-D_GNU_SOURCE")
++set (PREVIOUS_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
++set (CMAKE_C_FLAGS "-D_GNU_SOURCE")
++
+ # We compile with -Werror, so we need to make sure these code fragments compile without warnings.
+ # Older CMake versions (3.8) do not assign the result of their tests, causing unused-value errors
+ # which are not distinguished from the test failing. So no error for that one.
+@@ -698,6 +704,9 @@ endif()
+
+ set (CMAKE_REQUIRED_LIBRARIES)
+
++set (CMAKE_CXX_FLAGS "${PREVIOUS_CMAKE_CXX_FLAGS}")
++set (CMAKE_C_FLAGS "${PREVIOUS_CMAKE_C_FLAGS}")
++
+ check_c_source_compiles(
+ "
+ #include <sys/inotify.h>
diff --git a/dotnet.sh.in b/dotnet.sh.in
new file mode 100644
index 0000000..65b92a0
--- /dev/null
+++ b/dotnet.sh.in
@@ -0,0 +1,14 @@
+
+# Set location for AppHost lookup
+[ -z "$DOTNET_ROOT" ] && export DOTNET_ROOT=@LIBDIR@/dotnet
+
+# Add dotnet tools directory to PATH
+DOTNET_TOOLS_PATH="$HOME/.dotnet/tools"
+case "$PATH" in
+ *"$DOTNET_TOOLS_PATH"* ) true ;;
+ * ) PATH="$PATH:$DOTNET_TOOLS_PATH" ;;
+esac
+
+# Extract self-contained executables under HOME
+# to avoid multi-user issues from using the default '/var/tmp'.
+[ -z "$DOTNET_BUNDLE_EXTRACT_BASE_DIR" ] && export DOTNET_BUNDLE_EXTRACT_BASE_DIR="${XDG_CACHE_HOME:-"$HOME"/.cache}/dotnet_bundle_extract"
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
new file mode 100644
index 0000000..4536929
--- /dev/null
+++ b/dotnet3.1.spec
@@ -0,0 +1,682 @@
+%bcond_without bootstrap
+
+# Avoid provides/requires from private libraries
+%global privlibs libhostfxr
+%global privlibs %{privlibs}|libclrjit
+%global privlibs %{privlibs}|libcoreclr
+%global privlibs %{privlibs}|libcoreclrtraceptprovider
+%global privlibs %{privlibs}|libdbgshim
+%global privlibs %{privlibs}|libhostpolicy
+%global privlibs %{privlibs}|libmscordaccore
+%global privlibs %{privlibs}|libmscordbi
+%global privlibs %{privlibs}|libsos
+%global privlibs %{privlibs}|libsosplugin
+%global __provides_exclude ^(%{privlibs})\\.so
+%global __requires_exclude ^(%{privlibs})\\.so
+
+# Filter flags not supported by clang
+# -fstack-clash-protection
+# -specs=
+%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
+%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
+
+%global host_version 3.1.1
+%global runtime_version 3.1.1
+%global aspnetcore_runtime_version %{runtime_version}
+%global sdk_version 3.1.101
+%global templates_version %{runtime_version}
+
+%global host_rpm_version %{host_version}
+%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
+%global runtime_rpm_version %{runtime_version}
+%global sdk_rpm_version %{sdk_version}
+
+%if 0%{?fedora} || 0%{?rhel} < 8
+%global use_bundled_libunwind 0
+%else
+%global use_bundled_libunwind 1
+%endif
+
+%ifarch x86_64
+%global runtime_arch x64
+%endif
+%ifarch aarch64
+%global runtime_arch arm64
+%endif
+
+%if 0%{?fedora}
+%global runtime_id fedora.%{fedora}-%{runtime_arch}
+%else
+%if 0%{?centos}
+%global runtime_id centos.%{centos}-%{runtime_arch}
+%else
+%global runtime_id rhel.%{rhel}-%{runtime_arch}
+%endif
+%endif
+
+Name: dotnet3.1
+Version: %{sdk_rpm_version}
+Release: 1%{?dist}
+Summary: .NET Core Runtime and SDK
+License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
+URL: https://github.com/dotnet/
+
+# The source is generated on a Fedora box via:
+# ./build-dotnet-tarball v%%{sdk_version}-SDK
+Source0: dotnet-v%{sdk_version}-SDK.tar.gz
+Source1: check-debug-symbols.py
+Source2: dotnet.sh.in
+
+# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
+Patch100: corefx-optflags-support.patch
+
+# Add some support for cgroupv2 in corefx
+# All these patches are upstreamed for 5.0
+Patch101: corefx-39686-cgroupv2-01.patch
+Patch102: corefx-39686-cgroupv2-02.patch
+Patch103: corefx-39633-cgroupv2-mountpoints.patch
+
+# Build with with hardening flags, including -pie
+Patch200: coreclr-hardening-flags.patch
+
+# Build with with hardening flags, including -pie
+Patch300: core-setup-hardening-flags.patch
+
+# Disable telemetry by default; make it opt-in
+Patch500: cli-telemetry-optout.patch
+
+ExclusiveArch: x86_64
+
+BuildRequires: clang
+BuildRequires: cmake
+BuildRequires: coreutils
+%if %{without bootstrap}
+BuildRequires: dotnet-build-reference-packages
+BuildRequires: dotnet-sdk-3.1
+BuildRequires: dotnet-sdk-3.1-source-built-artifacts
+%endif
+BuildRequires: git
+%if 0%{?fedora} || 0%{?rhel} > 7
+BuildRequires: glibc-langpack-en
+%endif
+BuildRequires: hostname
+BuildRequires: krb5-devel
+BuildRequires: libcurl-devel
+BuildRequires: libicu-devel
+%if ! %{use_bundled_libunwind}
+BuildRequires: libunwind-devel
+%endif
+BuildRequires: lldb-devel
+BuildRequires: llvm
+BuildRequires: lttng-ust-devel
+BuildRequires: make
+BuildRequires: openssl-devel
+BuildRequires: python3
+BuildRequires: tar
+BuildRequires: zlib-devel
+
+%description
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, macOS and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+.NET Core contains a runtime conforming to .NET Standards a set of
+framework libraries, an SDK containing compilers and a 'dotnet'
+application to drive everything.
+
+
+%package -n dotnet
+
+Version: %{sdk_rpm_version}
+Summary: .NET Core CLI tools and runtime
+
+Requires: dotnet-sdk-3.1%{?_isa} >= %{sdk_rpm_version}-%{release}
+
+%description -n dotnet
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, macOS and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+.NET Core contains a runtime conforming to .NET Standards a set of
+framework libraries, an SDK containing compilers and a 'dotnet'
+application to drive everything.
+
+
+%package -n dotnet-host
+
+Version: %{host_rpm_version}
+Summary: .NET command line launcher
+
+%description -n dotnet-host
+The .NET Core host is a command line program that runs a standalone
+.NET core application or launches the SDK.
+
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%package -n dotnet-hostfxr-3.1
+
+Version: %{host_rpm_version}
+Summary: .NET Core command line host resolver
+
+# Theoretically any version of the host should work. But lets aim for the one
+# provided by this package, or from a newer version of .NET Core
+Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
+
+%description -n dotnet-hostfxr-3.1
+The .NET Core host resolver contains the logic to resolve and select
+the right version of the .NET Core SDK or runtime to use.
+
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%package -n dotnet-runtime-3.1
+
+Version: %{runtime_rpm_version}
+Summary: NET Core 3.1 runtime
+
+Requires: dotnet-hostfxr-3.1%{?_isa} >= %{host_rpm_version}-%{release}
+
+# libicu is dlopen()ed
+Requires: libicu%{?_isa}
+
+%if %{use_bundled_libunwind}
+Provides: bundled(libunwind) = 1.3
+%endif
+
+%description -n dotnet-runtime-3.1
+The .NET Core runtime contains everything needed to run .NET Core applications.
+It includes a high performance Virtual Machine as well as the framework
+libraries used by .NET Core applications.
+
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%package -n aspnetcore-runtime-3.1
+
+Version: %{aspnetcore_runtime_rpm_version}
+Summary: ASP.NET Core 3.1 runtime
+
+Requires: dotnet-runtime-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
+
+%description -n aspnetcore-runtime-3.1
+The ASP.NET Core runtime contains everything needed to run .NET Core
+web applications. It includes a high performance Virtual Machine as
+well as the framework libraries used by .NET Core applications.
+
+ASP.NET Core is a fast, lightweight and modular platform for creating
+cross platform web applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%package -n dotnet-templates-3.1
+
+Version: %{sdk_rpm_version}
+Summary: .NET Core 3.1 templates
+
+# Theoretically any version of the host should work. But lets aim for the one
+# provided by this package, or from a newer version of .NET Core
+Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
+
+%description -n dotnet-templates-3.1
+This package contains templates used by the .NET Core SDK.
+
+ASP.NET Core is a fast, lightweight and modular platform for creating
+cross platform web applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%package -n dotnet-sdk-3.1
+
+Version: %{sdk_rpm_version}
+Summary: .NET Core 3.1 Software Development Kit
+
+Provides: bundled(js-jquery)
+Provides: bundled(npm)
+
+Requires: dotnet-runtime-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-runtime-3.1%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+
+Requires: dotnet-apphost-pack-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: dotnet-targeting-pack-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-targeting-pack-3.1%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+Requires: netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{release}
+
+Requires: dotnet-templates-3.1%{?_isa} >= %{sdk_rpm_version}-%{release}
+
+%description -n dotnet-sdk-3.1
+The .NET Core SDK is a collection of command line applications to
+create, build, publish and run .NET Core applications.
+
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%global dotnet_targeting_pack() %{expand:
+%package -n %{1}
+
+Version: %{2}
+Summary: Targeting Pack for %{3} %{4}
+
+Requires: dotnet-host%{?_isa}
+
+%description -n %{1}
+This package provides a targeting pack for %{3} %{4}
+that allows developers to compile against and target %{3} %{4}
+applications using the .NET Core SDK.
+
+%files -n %{1}
+%dir %{_libdir}/dotnet/packs
+%{_libdir}/dotnet/packs/%{5}
+}
+
+%dotnet_targeting_pack dotnet-apphost-pack-3.1 %{runtime_rpm_version} Microsoft.NETCore.App 3.1 Microsoft.NETCore.App.Host.%{runtime_id}
+%dotnet_targeting_pack dotnet-targeting-pack-3.1 %{runtime_rpm_version} Microsoft.NETCore.App 3.1 Microsoft.NETCore.App.Ref
+%dotnet_targeting_pack aspnetcore-targeting-pack-3.1 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 3.1 Microsoft.AspNetCore.App.Ref
+%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref
+
+
+%package -n dotnet-sdk-3.1-source-built-artifacts
+
+Version: %{sdk_rpm_version}
+Summary: Internal package for building .NET Core 3.1 Software Development Kit
+
+%description -n dotnet-sdk-3.1-source-built-artifacts
+The .NET Core source-built archive is a collection of packages needed
+to build the .NET Core SDK itself.
+
+These are not meant for general use.
+
+
+%prep
+%setup -q -n dotnet-v%{sdk_version}-SDK
+
+%if %{without bootstrap}
+# Remove all prebuilts
+find -iname '*.dll' -type f -delete
+find -iname '*.so' -type f -delete
+find -iname '*.tar.gz' -type f -delete
+find -iname '*.nupkg' -type f -delete
+find -iname '*.zip' -type f -delete
+rm -r .dotnet/
+rm -r packages/source-built
+%endif
+
+%if %{without bootstrap}
+sed -i -e 's|3.1.100-preview1-014459|3.1.101|' global.json
+mkdir -p packages/archive
+ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
+ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
+%endif
+
+# Fix bad hardcoded path in build
+sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/dotnet-core-setup.*/src/corehost/common/pal.unix.cpp
+
+# Disable warnings
+sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.proj
+
+pushd src/corefx.*
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+popd
+
+pushd src/coreclr.*
+%patch200 -p1
+popd
+
+pushd src/dotnet-core-setup.*
+%patch300 -p1
+popd
+
+pushd src/dotnet-cli.*
+%patch500 -p1
+popd
+
+# If CLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE is misisng, add it back
+grep CLR_CMAKE_USE_SYSTEM_LIBUNWIND repos/coreclr.proj || \
+ sed -i 's|\$(BuildArguments) </BuildArguments>|$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments>|' repos/coreclr.proj
+
+%if %{use_bundled_libunwind}
+sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/coreclr.proj
+%endif
+
+cat source-build-info.txt
+
+find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
+
+
+%build
+cat /etc/os-release
+
+%if %{without bootstrap}
+cp -a %{_libdir}/dotnet .dotnet
+%endif
+
+export CFLAGS="%{dotnet_cflags}"
+export CXXFLAGS="%{dotnet_cflags}"
+export LDFLAGS="%{dotnet_ldflags}"
+
+VERBOSE=1 ./build.sh \
+ /v:n \
+ /p:LogVerbosity=n \
+ /p:MinimalConsoleLogOutput=false \
+ /p:ContinueOnPrebuiltBaselineError=true \
+
+
+sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
+
+
+%install
+install -dm 0755 %{buildroot}%{_libdir}/dotnet
+ls bin/%{runtime_arch}/Release
+tar xf bin/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
+
+# Install managed symbols
+tar xf bin/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
+ -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
+
+# Fix executable permissions on files
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/apphost
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/nethost.h
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.1.0/obj/Microsoft.AspNetCore.App.Ref.csproj.nuget.cache
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.1.0/Microsoft.AspNetCore.App.Ref/3.1.0/Debug/netstandard2.0/Microsoft.AspNetCore.App.Ref.assets.cache
+
+install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
+install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
+
+install -dm 0755 %{buildroot}/%{_datadir}/bash-completion/completions
+# dynamic completion needs the file to be named the same as the base command
+install src/dotnet-cli.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
+
+# TODO: the zsh completion script needs to be ported to use #compdef
+#install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions
+#install src/cli/scripts/register-completions.zsh %%{buildroot}/%%{_datadir}/zsh/site-functions/_dotnet
+
+install -dm 0755 %{buildroot}%{_bindir}
+ln -s ../../%{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/
+
+install -dm 0755 %{buildroot}%{_mandir}/man1/
+find -iname 'dotnet*.1' -type f -exec cp {} %{buildroot}%{_mandir}/man1/ \;
+
+echo "%{_libdir}/dotnet" >> install_location
+install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
+install install_location %{buildroot}%{_sysconfdir}/dotnet/
+
+install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
+install bin/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+
+# Check debug symbols in all elf objects. This is not in %%check
+# because native binaries are stripped by rpm-build after %%install.
+# So we need to do this check earlier.
+echo "Testing build results for debug symbols..."
+%{SOURCE1} -v %{buildroot}%{_libdir}/dotnet/
+
+
+%check
+%{buildroot}%{_libdir}/dotnet/dotnet --info
+
+
+%files -n dotnet
+# empty package useful for dependencies
+
+%files -n dotnet-host
+%dir %{_libdir}/dotnet
+%{_libdir}/dotnet/dotnet
+%dir %{_libdir}/dotnet/host
+%dir %{_libdir}/dotnet/host/fxr
+%{_bindir}/dotnet
+%license %{_libdir}/dotnet/LICENSE.txt
+%license %{_libdir}/dotnet/ThirdPartyNotices.txt
+%doc %{_mandir}/man1/dotnet*.1.gz
+%{_sysconfdir}/profile.d/dotnet.sh
+%{_sysconfdir}/dotnet
+%dir %{_datadir}/bash-completion
+%dir %{_datadir}/bash-completion/completions
+%{_datadir}/bash-completion/completions/dotnet
+
+%files -n dotnet-hostfxr-3.1
+%dir %{_libdir}/dotnet/host/fxr
+%{_libdir}/dotnet/host/fxr/%{host_version}
+
+%files -n dotnet-runtime-3.1
+%dir %{_libdir}/dotnet/shared
+%dir %{_libdir}/dotnet/shared/Microsoft.NETCore.App
+%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}
+
+%files -n aspnetcore-runtime-3.1
+%dir %{_libdir}/dotnet/shared
+%dir %{_libdir}/dotnet/shared/Microsoft.AspNetCore.App
+%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}
+
+%files -n dotnet-templates-3.1
+%dir %{_libdir}/dotnet/templates
+%{_libdir}/dotnet/templates/%{templates_version}
+
+%files -n dotnet-sdk-3.1
+%dir %{_libdir}/dotnet/sdk
+%{_libdir}/dotnet/sdk/%{sdk_version}
+%dir %{_libdir}/dotnet/packs
+
+%files -n dotnet-sdk-3.1-source-built-artifacts
+%dir %{_libdir}/dotnet
+%{_libdir}/dotnet/source-built-artifacts
+
+
+%changelog
+* Tue Jan 21 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-1
+- Update to .NET Core Runtime 3.1.1 and SDK 3.1.101
+
+* Thu Dec 05 2019 Omair Majid <omajid(a)redhat.com> - 3.1.100-1
+- Update to .NET Core Runtime 3.1.0 and SDK 3.1.100
+
+* Mon Nov 18 2019 Omair Majid <omajid(a)redhat.com> - 3.1.100-0.4.preview3
+- Fix apphost permissions
+
+* Fri Nov 15 2019 Omair Majid <omajid(a)redhat.com> - 3.1.100-0.3.preview3
+- Update to .NET Core Runtime 3.1.0-preview3.19553.2 and SDK
+ 3.1.100-preview3-014645
+
+* Wed Nov 06 2019 Omair Majid <omajid(a)redhat.com> - 3.1.100-0.2
+- Update to .NET Core 3.1 Preview 2
+
+* Wed Oct 30 2019 Omair Majid <omajid(a)redhat.com> - 3.1.100-0.1
+- Update to .NET Core 3.1 Preview 1
+
+* Thu Oct 24 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-5
+- Add cgroupv2 support to .NET Core
+
+* Wed Oct 16 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-4
+- Include fix from coreclr for building on Fedora 32
+
+* Wed Oct 16 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-3
+- Harden built binaries to pass annocheck
+
+* Fri Oct 11 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-2
+- Export DOTNET_ROOT in profile to make apphost lookup work
+
+* Fri Sep 27 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-1
+- Update to .NET Core Runtime 3.0.0 and SDK 3.0.100
+
+* Wed Sep 25 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.18.rc1
+- Update to .NET Core Runtime 3.0.0-rc1-19456-20 and SDK 3.0.100-rc1-014190
+
+* Tue Sep 17 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.16.preview9
+- Fix files duplicated between dotnet-apphost-pack-3.0 and dotnet-targeting-pack-3.0
+- Fix dependencies between .NET SDK and the targeting packs
+
+* Mon Sep 16 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.15.preview9
+- Update to .NET Core Runtime 3.0.0-preview 9 and SDK 3.0.100-preview9
+
+* Mon Aug 19 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.11.preview8
+- Update to .NET Core Runtime 3.0.0-preview8-28405-07 and SDK
+ 3.0.100-preview8-013656
+
+* Tue Jul 30 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.9.preview7
+- Update to .NET Core Runtime 3.0.0-preview7-27912-14 and SDK
+ 3.0.100-preview7-012821
+
+* Fri Jul 26 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.8.preview7
+- Update to .NET Core Runtime 3.0.0-preview7-27902-19 and SDK
+ 3.0.100-preview7-012802
+
+* Wed Jun 26 2019 Omair Majid <omajid(a)redhat.com> - 3.0.0-0.7.preview6
+- Obsolete dotnet-sdk-3.0.1xx
+- Add supackages for targeting packs
+- Add -fcf-protection to CFLAGS
+
+* Wed Jun 26 2019 Omair Majid <omajid(a)redhat.com> - 3.0.0-0.6.preview6
+- Update to .NET Core Runtime 3.0.0-preview6-27804-01 and SDK 3.0.100-preview6-012264
+- Set dotnet installation location in /etc/dotnet/install_location
+- Update targeting packs
+- Install managed symbols
+- Completely conditionalize libunwind bundling
+
+* Tue May 07 2019 Omair Majid <omajid(a)redhat.com> - 3.0.0-0.3.preview4
+- Update to .NET Core 3.0 preview 4
+
+* Tue Dec 18 2018 Omair Majid <omajid(a)redhat.com> - 3.0.0-0.1.preview1
+- Update to .NET Core 3.0 preview 1
+
+* Fri Dec 07 2018 Omair Majid <omajid(a)redhat.com> - 2.2.100
+- Update to .NET Core 2.2.0
+
+* Wed Nov 07 2018 Omair Majid <omajid(a)redhat.com> - 2.2.100-0.2.preview3
+- Update to .NET Core 2.2.0-preview3
+
+* Fri Nov 02 2018 Omair Majid <omajid(a)redhat.com> - 2.1.403-3
+- Add host-fxr-2.1 subpackage
+
+* Mon Oct 15 2018 Omair Majid <omajid(a)redhat.com> - 2.1.403-2
+- Disable telemetry by default
+- Users have to manually export DOTNET_CLI_TELEMETRY_OPTOUT=0 to enable
+
+* Tue Oct 02 2018 Omair Majid <omajid(a)redhat.com> - 2.1.403-1
+- Update to .NET Core Runtime 2.1.5 and SDK 2.1.403
+
+* Wed Sep 26 2018 Omair Majid <omajid(a)redhat.com> - 2.1.402-2
+- Add ~/.dotnet/tools to $PATH to make it easier to use dotnet tools
+
+* Thu Sep 13 2018 Omair Majid <omajid(a)redhat.com> - 2.1.402-1
+- Update to .NET Core Runtime 2.1.4 and SDK 2.1.402
+
+* Wed Sep 05 2018 Omair Majid <omajid(a)redhat.com> - 2.1.401-2
+- Use distro-standard flags when building .NET Core
+
+* Tue Aug 21 2018 Omair Majid <omajid(a)redhat.com> - 2.1.401-1
+- Update to .NET Core Runtime 2.1.3 and SDK 2.1.401
+
+* Mon Aug 20 2018 Omair Majid <omajid(a)redhat.com> - 2.1.302-1
+- Update to .NET Core Runtime 2.1.2 and SDK 2.1.302
+
+* Fri Jul 20 2018 Omair Majid <omajid(a)redhat.com> - 2.1.301-1
+- Update to .NET Core 2.1
+
+* Thu May 03 2018 Omair Majid <omajid(a)redhat.com> - 2.0.7-1
+- Update to .NET Core 2.0.7
+
+* Wed Mar 28 2018 Omair Majid <omajid(a)redhat.com> - 2.0.6-2
+- Enable bash completion for dotnet
+- Remove redundant buildrequires and requires
+
+* Wed Mar 14 2018 Omair Majid <omajid(a)redhat.com> - 2.0.6-1
+- Update to .NET Core 2.0.6
+
+* Fri Feb 23 2018 Omair Majid <omajid(a)redhat.com> - 2.0.5-1
+- Update to .NET Core 2.0.5
+
+* Wed Jan 24 2018 Omair Majid <omajid(a)redhat.com> - 2.0.3-5
+- Don't apply corefx clang warnings fix on clang < 5
+
+* Fri Jan 19 2018 Omair Majid <omajid(a)redhat.com> - 2.0.3-4
+- Add a test script to sanity check debug and symbol info.
+- Build with clang 5.0
+- Make main package real instead of using a virtual provides (see RHBZ 1519325)
+
+* Wed Nov 29 2017 Omair Majid <omajid(a)redhat.com> - 2.0.3-3
+- Add a Provides for 'dotnet'
+- Fix conditional macro
+
+* Tue Nov 28 2017 Omair Majid <omajid(a)redhat.com> - 2.0.3-2
+- Fix build on Fedora 27
+
+* Fri Nov 17 2017 Omair Majid <omajid(a)redhat.com> - 2.0.3-1
+- Update to .NET Core 2.0.3
+
+* Thu Oct 19 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-4
+- Add a hack to let omnisharp work
+
+* Wed Aug 30 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-3
+- Add a patch for building coreclr and core-setup correctly on Fedora >= 27
+
+* Fri Aug 25 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-2
+- Move libicu/libcurl/libunwind requires to runtime package
+- Make sdk depend on the exact version of the runtime package
+
+* Thu Aug 24 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-1
+- Update to 2.0.0 final release
+
+* Wed Jul 26 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-0.3.preview2
+- Add man pages
+
+* Tue Jul 25 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-0.2.preview2
+- Add Requires on libicu
+- Split into multiple packages
+- Do not repeat first-run message
+
+* Fri Jul 21 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-0.1.preview2
+- Update to .NET Core 2.0 Preview 2
+
+* Thu Mar 16 2017 Nemanja Milošević <nmilosevnm(a)gmail.com> - 1.1.0-7
+- rebuilt with latest libldb
+* Wed Feb 22 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-6
+- compat-openssl 1.0 for F26 for now
+* Sun Feb 19 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-5
+- Fix wrong commit id's
+* Sat Feb 18 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-4
+- Use commit id's instead of branch names
+* Sat Feb 18 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-3
+- Improper patch5 fix
+* Sat Feb 18 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-2
+- SPEC cleanup
+- git removal (using all tarballs for reproducible builds)
+- more reasonable versioning
+* Thu Feb 09 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-1
+- Fixed debuginfo going to separate package (Patch1)
+- Added F25/F26 RIL and fixed the version info (Patch2)
+- Added F25/F26 RIL in Microsoft.NETCore.App suported runtime graph (Patch3)
+- SPEC file cleanup
+* Wed Jan 11 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-0
+- Initial RPM for Fedora 25/26.
+
diff --git a/rename-tarball b/rename-tarball
new file mode 100755
index 0000000..b6b6086
--- /dev/null
+++ b/rename-tarball
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+# Usage:
+# ./rename-tarball original-name.tar.gz new-name.tar.gz
+
+set -euo pipefail
+IFS=$'\n\t'
+
+positional_args=()
+while [[ "$#" -gt 0 ]]; do
+ arg="${1}"
+ case "${arg}" in
+ -h|--help)
+ print_usage
+ exit 0
+ ;;
+ *)
+ positional_args+=("$1")
+ shift
+ ;;
+ esac
+done
+
+original_name=${positional_args[0]:-}
+if [[ -z ${original_name} ]]; then
+ echo "error: missing original tarball name"
+ exit 1
+fi
+
+new_name=${positional_args[1]:-}
+if [[ -z ${new_name} ]]; then
+ echo "error: missing new tarball name"
+ exit 1
+fi
+
+original_name=${original_name/%.tar.gz}
+new_name=${new_name/.tar.gz}
+
+echo "Original: ${original_name}.tar.gz"
+echo "New name: ${new_name}.tar.gz"
+
+mkdir "temp-${new_name}"
+pushd "temp-${new_name}"
+tar xf "../${original_name}.tar.gz"
+mv "${original_name}" "${new_name}"
+tar czf ../"${new_name}.tar.gz" "${new_name}"
+rm -rf "${new_name}"
+popd
+rmdir "temp-${new_name}"
diff --git a/sources b/sources
new file mode 100644
index 0000000..e5c1d68
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (dotnet-v3.1.101-SDK.tar.gz) = b2eb9df091186e793e82ac7560496c9ac3478e41efa94e58300606e2883d9bdb187f588a48a7bd9cf7f10f3d8f641d0867eb013de9b159e3d471a71dd823278c
diff --git a/update-release b/update-release
new file mode 100755
index 0000000..09eb509
--- /dev/null
+++ b/update-release
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+# Usage:
+# ./update-release runtime-version sdk-version
+
+set -euo pipefail
+IFS=$'\n\t'
+
+print_usage() {
+ echo " Usage:"
+ echo " ./update-release runtime-version sdk-version"
+}
+
+positional_args=()
+while [[ "$#" -gt 0 ]]; do
+ arg="${1}"
+ case "${arg}" in
+ -h|--help)
+ print_usage
+ exit 0
+ ;;
+ *)
+ positional_args+=("$1")
+ shift
+ ;;
+ esac
+done
+
+spec_file=dotnet3.1.spec
+
+runtime_version=${positional_args[0]:-}
+if [[ -z ${runtime_version} ]]; then
+ echo "error: missing runtime version"
+ exit 1
+fi
+host_version="$runtime_version"
+
+sdk_version=${positional_args[1]:-}
+if [[ -z ${sdk_version} ]]; then
+ echo "error: missing sdk version"
+ exit 1
+fi
+
+if [[ ! -f "dotnet-v${sdk_version}-SDK.tar.gz" ]]; then
+ ./build-dotnet-tarball "v${sdk_version}-SDK"
+fi
+
+set -x
+
+sed -i -E "s|^%global host_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%global host_version ${host_version}|" "$spec_file"
+sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%global runtime_version ${runtime_version}|" "$spec_file"
+sed -i -E "s|^%global sdk_version [[:digit:]]\.[[:digit:]]\.[[:digit:]][[:digit:]][[:digit:]]|%global sdk_version ${sdk_version}|" "$spec_file"
+
+comment="Update to .NET Core Runtime ${runtime_version} and SDK ${sdk_version}"
+
+rpmdev-bumpspec --comment="$comment" $spec_file
+
+# Reset release to 1 in 'Release' tag
+sed -i -E 's|^Release: [[:digit:]]+%|Release: 1%|' $spec_file
+# Reset Release in changelog comment
+# See https://stackoverflow.com/questions/18620153/find-matching-text-and-repla...
+sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-1/' $spec_file
commit d39668a409bd4abf8206b93d8173f0f2584ed887
Author: Gwyn Ciesla <limb(a)fedoraproject.org>
Date: Tue Feb 18 20:06:29 2020 +0000
Added the README
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d35adc1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# dotnet3.1
+
+The dotnet3.1 package
\ No newline at end of file
2 years, 4 months
Architecture specific change in rpms/dotnet6.0.git
by githook-noreply@fedoraproject.org
The package rpms/dotnet6.0.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=0fdb2e03...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=0fffd382...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=b9e285d2...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=96fb4c4f...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=12044336...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=ccec65f6...
https://src.fedoraproject.org/cgit/rpms/dotnet6.0.git/commit/?id=b18622e4....
Change:
-%ifnarch x86_64
+ExclusiveArch: x86_64
+%ifnarch x86_64
-%ifnarch x86_64
+%ifarch aarch64
+%ifnarch x86_64
+ExclusiveArch: x86_64
Thanks.
Full change:
============
commit d3412cc4b5b5aaa1842515da78c5a6424567aab6
Author: Omair Majid <omajid(a)redhat.com>
Date: Sun Dec 19 17:51:29 2021 -0500
Initial build for Fedora
diff --git a/.gitignore b/.gitignore
index b620824..0f04369 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,6 @@
/dotnet-v5.0.202-SDK.tar.gz
/dotnet-v5.0.203-SDK.tar.gz
/dotnet-v5.0.204-SDK.tar.gz
+/dotnet-9e8b04bbff820c93c142f99a507a46b976f5c14c-x64-bootstrap.tar.xz
+/dotnet-arm64-prebuilts-2021-10-29.tar.gz
+/dotnet-s390x-prebuilts-2021-10-29.tar.gz
diff --git a/copr-build b/copr-build
deleted file mode 100755
index f0d4ca3..0000000
--- a/copr-build
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-set -x
-
-fedpkg --release f34 srpm 2>&1 | tee fedpkg.output
-
-srpm_name=$(grep 'Wrote: ' fedpkg.output | cut -d' ' -f 2)
-
-copr-cli build @dotnet-sig/dotnet-preview "${srpm_name}"
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 2c6abf5..e137b93 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -22,9 +22,9 @@
%global host_version 6.0.0
%global runtime_version 6.0.0
-%global aspnetcore_runtime_version 6.0.0
+%global aspnetcore_runtime_version %{runtime_version}
%global sdk_version 6.0.100
-%global templates_version 6.0.0
+%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version}
@@ -664,7 +664,7 @@ export COMPlus_LTTng=0
%changelog
-* Wed Nov 10 2021 Omair Majid <omajid(a)redhat.com> - 6.0.100-1
+* Sun Dec 19 2021 Omair Majid <omajid(a)redhat.com> - 6.0.100-1
- Update to .NET 6
* Fri Oct 22 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.7.rc2
diff --git a/sources b/sources
new file mode 100644
index 0000000..e5277d1
--- /dev/null
+++ b/sources
@@ -0,0 +1,3 @@
+SHA512 (dotnet-9e8b04bbff820c93c142f99a507a46b976f5c14c-x64-bootstrap.tar.xz) = dedbc8619af5141f7cba108c4060cbbcf9c4c4c8968180ed1dc71d2afdf829a99c479b6daaf5c15018b8cd66de14eb6fee9fc4072f81546067544a6a6a20b641
+SHA512 (dotnet-arm64-prebuilts-2021-10-29.tar.gz) = e24fb8bb8b0fb24f52a68d472356574d8edf7af554b14618aeeae6ff76b54ce5e6d8a9deb056f9bc052bff8d17bae01c6475217039508bb0e08303f9f6c4b5d1
+SHA512 (dotnet-s390x-prebuilts-2021-10-29.tar.gz) = 6ea9d857edce50efd1cc35a73b3b3ccb170bbdb5cc4c8b20fb0ee1c7cb75cc573a565b01ef1bf4eec10a3e6e5209143957425cee5ff3fe24c7c1c89813272a99
commit 2e89959290ded7fa3b68f037f49ccd19123cbb86
Merge: 430e989 8b78620
Author: Omair Majid <omajid(a)redhat.com>
Date: Sun Dec 19 12:12:42 2021 -0500
Merge from dotnet-sig's dotnet6.0 repository
diff --cc README.md
index 13547e4,5289f61..a3681f2
--- a/README.md
+++ b/README.md
@@@ -1,3 -1,137 +1,137 @@@
# dotnet6.0
- The dotnet6.0 package
-This is the pre-release .NET 6.0 package for Fedora.
++This is the .NET 6.0 package for Fedora.
+
+ This package is maintained by the Fedora DotNet SIG (Special Interest
+ Group). You can find out more about the DotNet SIG at:
+
+ - https://fedoraproject.org/wiki/SIGs/DotNet
+ - https://fedoraproject.org/wiki/DotNet
+ - https://lists.fedoraproject.org/archives/list/dotnet-sig@lists.fedoraproj...
+
+ Please report any issues [using
-bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet5.0).
++bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet6.0).
+
+ # Specification
+
+ This package follows [package naming and contents suggested by
+ upstream](https://docs.microsoft.com/en-us/dotnet/core/build/distribution...,
+ with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
+ `%{_libdir}`).
+
+ # Contributing
+
+ The steps below are for the final package. Please only contribute to this
+ pre-release version this if you know what you are doing. Original instructions
+ follow.
+
+ ## General Changes
+
+ 1. Fork the repo.
+
+ 2. Checkout the forked repository.
+
- - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
- - `cd dotnet5.0`
++ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet6.0.git`
++ - `cd dotnet6.0`
+
+ 3. Make your changes. Don't forget to add a changelog.
+
+ 4. Do local builds.
+
+ - `fedpkg local`
+
+ 5. Fix any errors that come up and rebuild until it works locally.
+
+ 6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+ 8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+ 9. Create a pull request with your changes.
+
+ 10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+ 11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+ ## Updating to an new upstream release
+
+ 1. Fork the repo.
+
+ 2. Checkout the forked repository.
+
- - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
- - `cd dotnet5.0`
++ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet6.0.git`
++ - `cd dotnet6.0`
+
+ 3. Build the new upstream source tarball. Update the versions in the
+ spec file. Add a changelog. This is generally automated by the
+ following.
+
+ - `./update-release <sdk-version> <runtime-version>`
+
+ If this fails because of compiler errors, you might have to figure
+ out a fix, then add the patch in `build-dotnet-tarball` script
+ rather than the spec file.
+
+ 4. Do local builds.
+
+ - `fedpkg local`
+
+ 5. Fix any errors that come up and rebuild until it works locally. Any
+ patches that are needed at this point should be added to the spec file.
+
+ 6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+ 7. Upload the source archive to the Fedora look-aside cache.
+
+ - `fedpkg new-sources path-to-generated-dotnet-source-tarball.tar.gz`
+
+ 8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+ 9. Create a pull request with your changes.
+
+ 10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+ 11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+ # Testing
+
+ This package uses CI tests as defined in `tests/test.yml`. Creating a
+ pull-request or running a build will fire off tests and flag any issues. We have
+ enabled gating (via `gating.yaml`) on the tests. That prevents a build
+ that fails any test from being released until the failures are waived.
+
+ The tests themselves are contained in this external repository:
+ https://github.com/redhat-developer/dotnet-regular-tests/
commit 8b78620e7d10c6712e103717c9c9dc073baf0702
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Dec 2 16:43:41 2021 -0500
Fix Fedora macro
It needs to be optional, using %{?..} syntax to make sure it doesn't
error out on non-Fedora systems.
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 026fd19..2c6abf5 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -605,7 +605,7 @@ echo "Testing build results for debug symbols..."
%check
-%if 0%{fedora} > 35
+%if 0%{?fedora} > 35
# lttng in Fedora > 35 is incompatible with .NET
export COMPlus_LTTng=0
%endif
commit fcca190f6a4c7d3fad0bdb92a62fc35a117ec845
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Dec 2 12:23:20 2021 -0500
Disable lttng at runtime manually
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 7aed931..026fd19 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -409,9 +409,6 @@ ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages
# Fix bad hardcoded path in build
sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehost/hostmisc/pal.unix.cpp
-# Disable warnings
-# sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
-
pushd src/runtime.*
%patch100 -p1
%patch101 -p1
@@ -522,6 +519,11 @@ unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
+# Disable tracing, which is incompatible with certain versions of
+# lttng See https://github.com/dotnet/runtime/issues/57784. The
+# suggested compile-time change doesn't work, unfrotunately.
+export COMPlus_LTTng=0
+
VERBOSE=1 ./build.sh \
%if %{without bootstrap}
--with-sdk previously-built-dotnet \
@@ -603,6 +605,11 @@ echo "Testing build results for debug symbols..."
%check
+%if 0%{fedora} > 35
+# lttng in Fedora > 35 is incompatible with .NET
+export COMPlus_LTTng=0
+%endif
+
%{buildroot}%{_libdir}/dotnet/dotnet --info
commit 84b428a155cda8d96ddf3aa2a844d22b1ac27c50
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Nov 30 08:40:18 2021 -0500
Fix build against clang 13
diff --git a/copr-build b/copr-build
index 8a7cf46..f0d4ca3 100755
--- a/copr-build
+++ b/copr-build
@@ -4,7 +4,7 @@ set -euo pipefail
set -x
-fedpkg --release f32 srpm 2>&1 | tee fedpkg.output
+fedpkg --release f34 srpm 2>&1 | tee fedpkg.output
srpm_name=$(grep 'Wrote: ' fedpkg.output | cut -d' ' -f 2)
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index fc63a3f..7aed931 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -88,6 +88,8 @@ Patch100: runtime-arm64-lld-fix.patch
Patch101: runtime-mono-remove-ilstrip.patch
# https://github.com/dotnet/runtime/pull/61442
Patch102: runtime-61442-disable-werror.patch
+# https://github.com/dotnet/runtime/pull/62170
+Patch103: runtime-62170-clang13.patch
# https://github.com/dotnet/command-line-api/pull/1401
Patch300: command-line-api-use-work-tree-with-git-apply.patch
@@ -414,6 +416,7 @@ pushd src/runtime.*
%patch100 -p1
%patch101 -p1
%patch102 -p1
+%patch103 -p1
popd
pushd src/command-line-api.*
diff --git a/runtime-62170-clang13.patch b/runtime-62170-clang13.patch
new file mode 100644
index 0000000..8c47186
--- /dev/null
+++ b/runtime-62170-clang13.patch
@@ -0,0 +1,76 @@
+From 9cd95a5608b667e22727d9eb1a5330efd61dfe50 Mon Sep 17 00:00:00 2001
+From: Jan Vorlicek <janvorli(a)microsoft.com>
+Date: Mon, 29 Nov 2021 17:32:45 -0800
+Subject: [PATCH] Fix clang 13 induced runtime issues
+
+The clang 13 optimizer started to assume that "this" pointer is always
+properly aligned. That lead to elimination of some code that was actually
+needed.
+It also takes pointer aliasing rules more strictly in one place in jit.
+That caused the optimizer to falsely assume that a callee with an argument
+passed by reference is not modifying that argument and used a stale
+copy of the original value at the caller site.
+
+This change fixes both of the issues. With this fix, runtime compiled
+using clang 13 seems to be fully functional.
+---
+ src/coreclr/inc/corhlpr.h | 8 ++++----
+ src/coreclr/jit/bitsetasshortlong.h | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/coreclr/inc/corhlpr.h b/src/coreclr/inc/corhlpr.h
+index 450514da95c1..427e8cdc0ff5 100644
+--- a/src/coreclr/inc/corhlpr.h
++++ b/src/coreclr/inc/corhlpr.h
+@@ -336,7 +336,7 @@ struct COR_ILMETHOD_SECT
+ const COR_ILMETHOD_SECT* Next() const
+ {
+ if (!More()) return(0);
+- return ((COR_ILMETHOD_SECT*)(((BYTE *)this) + DataSize()))->Align();
++ return ((COR_ILMETHOD_SECT*)Align(((BYTE *)this) + DataSize()));
+ }
+
+ const BYTE* Data() const
+@@ -374,9 +374,9 @@ struct COR_ILMETHOD_SECT
+ return((AsSmall()->Kind & CorILMethod_Sect_FatFormat) != 0);
+ }
+
+- const COR_ILMETHOD_SECT* Align() const
++ static const void* Align(const void* p)
+ {
+- return((COR_ILMETHOD_SECT*) ((((UINT_PTR) this) + 3) & ~3));
++ return((void*) ((((UINT_PTR) p) + 3) & ~3));
+ }
+
+ protected:
+@@ -579,7 +579,7 @@ typedef struct tagCOR_ILMETHOD_FAT : IMAGE_COR_ILMETHOD_FAT
+
+ const COR_ILMETHOD_SECT* GetSect() const {
+ if (!More()) return (0);
+- return(((COR_ILMETHOD_SECT*) (GetCode() + GetCodeSize()))->Align());
++ return(((COR_ILMETHOD_SECT*) COR_ILMETHOD_SECT::Align(GetCode() + GetCodeSize())));
+ }
+ } COR_ILMETHOD_FAT;
+
+diff --git a/src/coreclr/jit/bitsetasshortlong.h b/src/coreclr/jit/bitsetasshortlong.h
+index d343edeeda4c..365cf346a10a 100644
+--- a/src/coreclr/jit/bitsetasshortlong.h
++++ b/src/coreclr/jit/bitsetasshortlong.h
+@@ -345,7 +345,7 @@ class BitSetOps</*BitSetType*/ BitSetShortLongRep,
+ {
+ if (IsShort(env))
+ {
+- (size_t&)out = (size_t)out & ((size_t)gen | (size_t)in);
++ out = (BitSetShortLongRep)((size_t)out & ((size_t)gen | (size_t)in));
+ }
+ else
+ {
+@@ -361,7 +361,7 @@ class BitSetOps</*BitSetType*/ BitSetShortLongRep,
+ {
+ if (IsShort(env))
+ {
+- (size_t&)in = (size_t)use | ((size_t)out & ~(size_t)def);
++ in = (BitSetShortLongRep)((size_t)use | ((size_t)out & ~(size_t)def));
+ }
+ else
+ {
commit abafa176a7ac41bc6b2ebf84040bd39bca21c15a
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Nov 16 08:20:56 2021 -0500
Fix build errors caused by Werror
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index d222adf..fc63a3f 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -86,6 +86,8 @@ Source11: dotnet.sh.in
Patch100: runtime-arm64-lld-fix.patch
# Mono still has a dependency on (now unbuildable) ILStrip which was removed from CoreCLR: https://github.com/dotnet/runtime/pull/60315
Patch101: runtime-mono-remove-ilstrip.patch
+# https://github.com/dotnet/runtime/pull/61442
+Patch102: runtime-61442-disable-werror.patch
# https://github.com/dotnet/command-line-api/pull/1401
Patch300: command-line-api-use-work-tree-with-git-apply.patch
@@ -411,6 +413,7 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehos
pushd src/runtime.*
%patch100 -p1
%patch101 -p1
+%patch102 -p1
popd
pushd src/command-line-api.*
diff --git a/runtime-61442-disable-werror.patch b/runtime-61442-disable-werror.patch
new file mode 100644
index 0000000..401440c
--- /dev/null
+++ b/runtime-61442-disable-werror.patch
@@ -0,0 +1,41 @@
+From f41c06ba040adf1930156340c5b03d9864d8a1d4 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Wed, 10 Nov 2021 17:54:45 -0500
+Subject: [PATCH] The 6.0 branch is no longer pre-release
+
+This has limited affects, but it should have been set to false since 6.0
+is now stable/released.
+
+The one difference it makes is that -Werror is disabled when building
+native code.
+---
+ Directory.Build.props | 2 +-
+ eng/native/configureplatform.cmake | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Directory.Build.props b/Directory.Build.props
+index f19ea9208c2c..5cb87bb7c257 100644
+--- a/Directory.Build.props
++++ b/Directory.Build.props
+@@ -255,7 +255,7 @@
+ <PackageReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</PackageReleaseNotes>
+ <!-- Indicates this is not an officially supported release. Release branches should set this to false. -->
+ <!-- Keep it in sync with PRERELEASE in eng/native/configureplatform.cmake -->
+- <IsPrerelease>true</IsPrerelease>
++ <IsPrerelease>false</IsPrerelease>
+ <IsPrivateAssembly>$(MSBuildProjectName.Contains('Private'))</IsPrivateAssembly>
+ <!-- Private packages should not be stable -->
+ <SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(IsPrivateAssembly)">true</SuppressFinalPackageVersion>
+diff --git a/eng/native/configureplatform.cmake b/eng/native/configureplatform.cmake
+index 519431772004..af1c88bce5b6 100644
+--- a/eng/native/configureplatform.cmake
++++ b/eng/native/configureplatform.cmake
+@@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/functions.cmake)
+
+ # If set, indicates that this is not an officially supported release
+ # Keep in sync with IsPrerelease in Directory.Build.props
+-set(PRERELEASE 1)
++set(PRERELEASE 0)
+
+ #----------------------------------------
+ # Detect and set platform variable names
commit 0fdb2e0331d111f1fe03c9418de35754cb71eac2
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Nov 11 08:10:43 2021 -0500
Update to .NET 6 GA
diff --git a/arcade-no-apphost.patch b/arcade-no-apphost.patch
new file mode 100644
index 0000000..cec03a1
--- /dev/null
+++ b/arcade-no-apphost.patch
@@ -0,0 +1,36 @@
+Index: a/src/Microsoft.DotNet.GitSync.CommitManager/Microsoft.DotNet.GitSync.CommitManager.csproj
+===================================================================
+--- a/src/Microsoft.DotNet.GitSync.CommitManager/Microsoft.DotNet.GitSync.CommitManager.csproj
++++ b/src/Microsoft.DotNet.GitSync.CommitManager/Microsoft.DotNet.GitSync.CommitManager.csproj
+@@ -5,6 +5,7 @@
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ <LangVersion>latest</LangVersion>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
++ <UseAppHost>false</UseAppHost>
+ </PropertyGroup>
+
+ <ItemGroup>
+Index: a/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.CmdLine/Microsoft.DotNet.SwaggerGenerator.CmdLine.csproj
+===================================================================
+--- a/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.CmdLine/Microsoft.DotNet.SwaggerGenerator.CmdLine.csproj
++++ b/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.CmdLine/Microsoft.DotNet.SwaggerGenerator.CmdLine.csproj
+@@ -9,6 +9,7 @@
+ <ToolCommandName>dotnet-swaggergen</ToolCommandName>
+ <SignAssembly>false</SignAssembly>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
++ <UseAppHost>false</UseAppHost>
+ </PropertyGroup>
+
+ <ItemGroup>
+Index: a/src/Microsoft.DotNet.XUnitConsoleRunner/src/Microsoft.DotNet.XUnitConsoleRunner.csproj
+===================================================================
+--- a/src/Microsoft.DotNet.XUnitConsoleRunner/src/Microsoft.DotNet.XUnitConsoleRunner.csproj
++++ b/src/Microsoft.DotNet.XUnitConsoleRunner/src/Microsoft.DotNet.XUnitConsoleRunner.csproj
+@@ -11,6 +11,7 @@
+ <VersionPrefix>2.5.1</VersionPrefix>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
+ <RollForward>Major</RollForward>
++ <UseAppHost>false</UseAppHost>
+ </PropertyGroup>
+
+ <ItemGroup>
diff --git a/build-arm64-bootstrap-tarball b/build-arm64-bootstrap-tarball
new file mode 100755
index 0000000..9f1cc7d
--- /dev/null
+++ b/build-arm64-bootstrap-tarball
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+set -euo pipefail
+
+set -x
+
+bootstrap_dir=$(readlink -f "$1")
+
+version=$(jq -r '.tools.dotnet' "$bootstrap_dir"/global.json)
+
+date=$(date +%F)
+
+mkdir -p "dotnet-arm64-prebuilts-$date"
+
+pushd "dotnet-arm64-prebuilts-$date"
+
+# Getting the exact matching rc2 version gets us an arm64 build without this
+# fix https://github.com/dotnet/runtime/pull/58959. That causes a segfault on
+# startup.
+# wget "https://dotnetcli.azureedge.net/dotnet/Sdk/$version/dotnet-sdk-$version-l..."
+
+wget https://aka.ms/dotnet/6.0.1XX-rc2/daily/dotnet-sdk-linux-arm64.tar.gz
+
+mapfile -t linux_x64_packages < <(tar tf "$bootstrap_dir"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz | grep linux-x64)
+
+for package in "${linux_x64_packages[@]}"; do
+ if [[ "$package" = *'.Intermediate.'* ]]; then
+ continue;
+ fi
+
+ filename=${package##*/}
+ name=${filename%.6.0*}
+ arm_name=${name/linux-x64/linux-arm64}
+ version="6.0${filename##*6.0}"
+ version=${version%.*}
+
+ nappo download --verbose "$arm_name" "$version"
+
+done
+
+popd
+
+tar czf "dotnet-arm64-prebuilts-$date.tar.gz" "dotnet-arm64-prebuilts-$date"
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 826752b..8f15c6f 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -1,11 +1,11 @@
#!/bin/bash
# Usage:
-# build-dotnet-tarball [--bootstrap] <tag-from-source-build>
+# build-dotnet-tarball [--bootstrap] <tag-from-installer>
#
-# Creates a source archive from a tag (or commit) at github.com/dotnet/source-build
+# Creates a source archive from a tag (or commit) at github.com/dotnet/installer
-# Source-build is a little strange, we need to clone it, check out the
+# installer is a little strange, we need to clone it, check out the
# tag, build it and then create a tarball from the archive directory
# it creates. Also, it is likely that the source archive is only
# buildable on the OS it was initially created in.
@@ -15,9 +15,9 @@ IFS=$'\n\t'
function print_usage {
echo "Usage:"
- echo "$0 [--bootstrap] <tag-from-source-build>"
+ echo "$0 [--bootstrap] <tag-from-installer>"
echo
- echo "Creates a source archive from a tag at https://github.com/dotnet/source-build"
+ echo "Creates a source archive from a tag at https://github.com/dotnet/installer"
echo ""
echo " --bootstrap build a source tarball usable for bootstrapping .NET"
}
@@ -102,14 +102,16 @@ set -x
dir_name="dotnet-${tag}"
unmodified_tarball_name="${dir_name}-original"
tarball_name="${dir_name}"
+tarball_suffix=.tar.gz
if [[ ${build_bootstrap} == true ]]; then
unmodified_tarball_name="${unmodified_tarball_name}-${arch}-bootstrap"
tarball_name="${tarball_name}-${arch}-bootstrap"
+ tarball_suffix=.tar.xz
fi
-if [ -f "${tarball_name}.tar.gz" ]; then
- echo "error: ${tarball_name}.tar.gz already exists"
+if [ -f "${tarball_name}${tarball_suffix}" ]; then
+ echo "error: ${tarball_name}${tarball_suffix} already exists"
exit 1
fi
@@ -125,15 +127,9 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
./build.sh /p:ArcadeBuildTarball=true /p:TarballDir="$(readlink -f ../"${unmodified_tarball_name}")"
popd
- if [[ ${build_bootstrap} == true ]]; then
- pushd "${unmodified_tarball_name}"
- ./prep.sh
- popd
- fi
-
popd
- tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}"
+ tar cf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}"
rm -rf "${temp_dir}"
fi
@@ -145,15 +141,36 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
if [[ ${build_bootstrap} == true ]]; then
+ if [[ "$(wc -l < packages/archive/archiveArtifacts.txt)" != 1 ]]; then
+ echo "error: this is not going to work! update $0 to fix this issue."
+ exit 1
+ fi
+
+ pushd packages/archive/
+ curl -O $(cat archiveArtifacts.txt)
+ popd
+
+ mkdir foo
+ pushd foo
+
+ tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+ sed -i -E 's|<MicrosoftNETHostModelPackageVersion>6.0.0-rtm.21521.1</|<MicrosoftNETHostModelPackageVersion>6.0.0-rtm.21521.4</|' PackageVersions.props
+ sed -i -E 's|<MicrosoftNETHostModelVersion>6.0.0-rtm.21521.1</|<MicrosoftNETHostModelVersion>6.0.0-rtm.21521.4</|' PackageVersions.props
+ cat PackageVersions.props
+
+ tar czf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
+
+ popd
+ rm -rf foo
+
+ ./prep.sh --bootstrap
+
mkdir -p fixup-previously-source-built-artifacts
pushd fixup-previously-source-built-artifacts
tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
find . -iname '*fedora*nupkg' -delete
- rm runtime.linux-x64.Microsoft.NETCore.IL*sm.*.nupkg
- wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_p...
- wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_p...
# We must keep the original file names in the archive, even prepending a ./ leads to issues
- tar -I 'gzip -9' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
+ tar -I 'gzip -1' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
popd
rm -rf fixup-previously-source-built-artifacts
@@ -164,12 +181,26 @@ fi
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
-# FIXME
-#rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
-#find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
-#rm -r src/nuget-client.*/test/EndToEnd
-#rm -r src/source-build.*/src/humanizer/samples/
+
+# Binaries for gradle
+rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
+
+# Unnecessary crypto implementation: IDEA
+rm -r src/runtime.*/src/tests/JIT/Performance/CodeQuality/Bytemark/
+
+# https://github.com/dotnet/aspnetcore/issues/34785
+find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
+
+# https://github.com/NuGet/Home/issues/11094
+rm -r src/nuget-client.*/test/EndToEnd
+
+# https://github.com/Humanizr/sample-aspnetmvc/issues/1
+rm -r src/source-build.*/src/humanizer/samples/
popd
-tar -I 'gzip -9' -cf "${tarball_name}.tar.gz" "${tarball_name}"
+if [[ ${build_bootstrap} == true ]]; then
+ tar -I 'xz -T 0' -cf "${tarball_name}${tarball_suffix}" "${tarball_name}"
+else
+ tar -czf "${tarball_name}${tarball_suffix}" "${tarball_name}"
+fi
diff --git a/check-debug-symbols.py b/check-debug-symbols.py
index be26d87..b873c77 100755
--- a/check-debug-symbols.py
+++ b/check-debug-symbols.py
@@ -65,7 +65,7 @@ def scan_file(file):
def is_elf(file):
result = subprocess.run(['file', file], stdout=subprocess.PIPE, encoding='utf-8', check=True)
- return re.search('ELF 64-bit LSB (?:executable|shared object)', result.stdout)
+ return re.search('ELF 64-bit LSB (?:pie )(?:executable|shared object)', result.stdout)
def scan_file_if_sensible(file):
if is_elf(file):
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 6f523a3..d222adf 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -20,21 +20,21 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 6.0.0-rc.2.21470.23
-%global runtime_version 6.0.0-rc.2.21470.23
-%global aspnetcore_runtime_version 6.0.0-rc.2.21470.37
-%global sdk_version 6.0.100-rc.2.21474.1
-%global templates_version 6.0.0-rc.2.21470.37
+%global host_version 6.0.0
+%global runtime_version 6.0.0
+%global aspnetcore_runtime_version 6.0.0
+%global sdk_version 6.0.100
+%global templates_version 6.0.0
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
-%global host_rpm_version 6.0.0
-%global runtime_rpm_version 6.0.0
-%global aspnetcore_runtime_rpm_version %{runtime_rpm_version}
-%global sdk_rpm_version 6.0.0
+%global host_rpm_version %{host_version}
+%global runtime_rpm_version %{runtime_version}
+%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
+%global sdk_rpm_version %{sdk_version}
# upstream can update releases without revving the SDK version so these don't always match
#%%global upstream_tag v%%{sdk_version}-SDK
-%global upstream_tag 28be3e9a006d90d8c6e87d4353b77882829df718
+%global upstream_tag 9e8b04bbff820c93c142f99a507a46b976f5c14c
%if 0%{?fedora} || 0%{?rhel} < 8
%global use_bundled_libunwind 0
@@ -42,7 +42,7 @@
%global use_bundled_libunwind 1
%endif
-%ifarch aarch64
+%ifarch aarch64 s390x
%global use_bundled_libunwind 1
%endif
@@ -52,49 +52,94 @@
%ifarch aarch64
%global runtime_arch arm64
%endif
+%ifarch s390x
+%global runtime_arch s390x
+%endif
%{!?runtime_id:%global runtime_id %(. /etc/os-release ; echo "${ID}.${VERSION_ID%%.*}")-%{runtime_arch}}
Name: dotnet6.0
Version: %{sdk_rpm_version}
-Release: 0.3.%{upstream_tag}%{?dist}
+Release: 1%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
+%if %{with bootstrap}
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball --bootstrap %%{upstream_tag}
-Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.gz
+Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.xz
+# Generated via ./build-arm64-bootstrap-tarball
+Source1: dotnet-arm64-prebuilts-2021-10-29.tar.gz
+# Generated manually, same pattern as the arm64 tarball
+Source2: dotnet-s390x-prebuilts-2021-10-29.tar.gz
+%else
+# The source is generated on a Fedora box via:
+# ./build-dotnet-tarball %%{upstream_tag}
+Source0: dotnet-%{upstream_tag}.tar.gz
+%endif
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
-# https://github.com/NuGet/NuGet.Client/pull/4254
-Patch200: nuget-client-use-work-tree-with-git-apply.patch
+# Fix using lld on Fedora
+Patch100: runtime-arm64-lld-fix.patch
+# Mono still has a dependency on (now unbuildable) ILStrip which was removed from CoreCLR: https://github.com/dotnet/runtime/pull/60315
+Patch101: runtime-mono-remove-ilstrip.patch
+
# https://github.com/dotnet/command-line-api/pull/1401
Patch300: command-line-api-use-work-tree-with-git-apply.patch
+
# https://github.com/microsoft/vstest/pull/3046
Patch400: vstest-use-work-tree-with-git-apply.patch
+# This is the suggestion from https://github.com/dotnet/source-build/pull/2450, applied
Patch500: fsharp-use-work-tree-with-git-apply.patch
+# Disable apphost, needed for s390x
+Patch501: fsharp-no-apphost.patch
+# This is the suggestion from https://github.com/dotnet/source-build/pull/2450, applied
Patch600: xliff-tasks-use-work-tree-with-git-apply.patch
+# Disable apphost, needed for s390x
+Patch700: arcade-no-apphost.patch
+
+# Named mutex fix for mono, needed for s390x. https://github.com/dotnet/roslyn/pull/57003
+Patch800: roslyn-57003-mono-named-mutex.patch
+# Disable apphost, needed for s390x
+Patch801: roslyn-no-apphost.patch
+
+# Disable apphost, needed for s390x
+Patch900: roslyn-analyzers-no-apphost.patch
+
+# Fix mono-specific runtime crashes running msbuild. CoreCLR does not
+# load types that are not actually used/invoked at runtime, while mono
+# does. System.Configuration and System.Security are missing in
+# source-build builds, which breaks msbuild.
+Patch1000: msbuild-no-systemsecurity.patch
+Patch1001: msbuild-no-systemconfiguration.patch
+
# Disable telemetry by default; make it opt-in
-Patch1500: sdk-telemetry-optout.patch
+Patch1500: sdk-telemetry-optout.patch
+# https://github.com/dotnet/sdk/pull/22373
+Patch1501: sdk-22373-portablerid.patch
+
+# https://github.com/dotnet/installer/pull/12516
+Patch1600: installer-12516-portablerid.patch
+# https://github.com/dotnet/installer/pull/12622
+Patch1601: installer-12622-fix-runtime-symbols.patch
-#%%if 0%%{?fedora} > 32 || 0%%{?rhel} > 8
-#ExclusiveArch: aarch64 x86_64
-#%%else
+%if 0%{?fedora} || 0%{?rhel} >= 8
+ExclusiveArch: aarch64 x86_64 s390x
+%else
ExclusiveArch: x86_64
-#%%endif
+%endif
BuildRequires: clang
BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
-BuildRequires: dotnet-sdk-6.0-build-reference-packages
BuildRequires: dotnet-sdk-6.0
BuildRequires: dotnet-sdk-6.0-source-built-artifacts
%endif
@@ -105,18 +150,20 @@ BuildRequires: glibc-langpack-en
%endif
BuildRequires: hostname
BuildRequires: krb5-devel
-BuildRequires: libcurl-devel
BuildRequires: libicu-devel
%if ! %{use_bundled_libunwind}
BuildRequires: libunwind-devel
%endif
-BuildRequires: lldb-devel
+%ifarch aarch64
+BuildRequires: lld
+%endif
BuildRequires: llvm
BuildRequires: lttng-ust-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: python3
BuildRequires: tar
+BuildRequires: util-linux
BuildRequires: zlib-devel
%description
@@ -319,12 +366,25 @@ These are not meant for general use.
%if %{without bootstrap}
%setup -q -n dotnet-%{upstream_tag}
%else
-%ifarch x86_64
-%setup -q -T -b 0 -n dotnet-%{upstream_tag}-%{runtime_arch}-bootstrap
-%endif
+
+%setup -q -T -b 0 -n dotnet-%{upstream_tag}-x64-bootstrap
+
+%ifnarch x86_64
+
+rm -rf .dotnet
%ifarch aarch64
-%setup -q -T -b 0 -n dotnet-%{upstream_tag}-%{runtime_arch}-bootstrap
+tar -x --strip-components=1 -f %{SOURCE1} -C packages/prebuilt
+%endif
+%ifarch s390x
+tar -x --strip-components=1 -f %{SOURCE2} -C packages/prebuilt
%endif
+mkdir -p .dotnet
+tar xf packages/prebuilt/dotnet-sdk*.tar.gz -C .dotnet/
+rm packages/prebuilt/dotnet-sdk*.tar.gz
+boot_sdk_version=$(ls -1 .dotnet/sdk/)
+sed -i -E 's|"dotnet": "[^"]+"|"dotnet" : "'$boot_sdk_version'"|' global.json
+%endif
+
%endif
%if %{without bootstrap}
@@ -336,9 +396,7 @@ find -iname '*.nupkg' -type f -delete
find -iname '*.zip' -type f -delete
rm -rf .dotnet/
rm -rf packages/source-built
-%endif
-%if %{without bootstrap}
mkdir -p packages/archive
ln -s %{_libdir}/dotnet/source-built-artifacts/Private.SourceBuilt.Artifacts.*.tar.gz packages/archive/
ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive/
@@ -351,10 +409,8 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehos
# sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
pushd src/runtime.*
-popd
-
-pushd src/nuget-client.*
-%patch200 -p1
+%patch100 -p1
+%patch101 -p1
popd
pushd src/command-line-api.*
@@ -367,26 +423,53 @@ popd
pushd src/fsharp.*
%patch500 -p1
+%patch501 -p1
popd
pushd src/xliff-tasks.*
%patch600 -p1
popd
+pushd src/arcade.*
+%patch700 -p1
+popd
+
+pushd src/roslyn.*
+%patch800 -p3
+%patch801 -p1
+popd
+
+pushd src/roslyn-analyzers.*
+%patch900 -p1
+popd
+
+pushd src/msbuild.*
+
+# These are mono-specific fixes. Mono is only used on s390x. Restrict
+# patch to s390x to avoid potential risk in other architectures.
+%ifarch s390x
+%patch1000 -p1
+%patch1001 -p1
+%endif
+
+popd
+
pushd src/sdk.*
%patch1500 -p1
+%patch1501 -p1
popd
-%if %{without bootstrap}
-%ifnarch x86_64
-mkdir -p artifacts/obj/%{runtime_arch}/Release
-cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
-%endif
-%endif
+pushd src/installer.*
+%patch1600 -p1
+popd
+
+# We need to apply the patch to the already-built tarball's
+# repos/runtime.common.targets, not to the installer's "source" copy.
+%patch1601 -p5
-# Disable package validation which breaks our build, even though we
-# are injecting "blessed" nuget packages produced by Microsoft.
+# Disable package validation which breaks our build.
# There's no need to run validation in RPM packages anyway.
+# See https://github.com/dotnet/runtime/pull/60881
sed -i -E 's|( /p:BuildDebPackage=false)|\1 /p:EnablePackageValidation=false|' src/runtime.*/eng/SourceBuild.props
%if ! %{use_bundled_libunwind}
@@ -455,10 +538,13 @@ install -dm 0755 %{buildroot}%{_libdir}/dotnet
ls artifacts/%{runtime_arch}/Release
tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
-# FIXME: no managed symbols in 6.0?
+# See https://github.com/dotnet/source-build/issues/2579
+find %{buildroot}%{_libdir}/dotnet/ -type f -name 'testhost.x86' -delete
+find %{buildroot}%{_libdir}/dotnet/ -type f -name 'vstest.console' -delete
+
# Install managed symbols
-#tar xf artifacts/%%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%%{runtime_version}-%%{runtime_id}.tar.gz \
-# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
+tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_id}-%{runtime_version}.tar.gz \
+ -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
# Fix executable permissions on files
find %{buildroot}%{_libdir}/dotnet/ -type f -name 'apphost' -exec chmod +x {} \;
@@ -505,9 +591,8 @@ install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
-# FIXME
-#echo "Testing build results for debug symbols..."
-#%%{SOURCE10} -v %%{buildroot}%%{_libdir}/dotnet/
+echo "Testing build results for debug symbols..."
+%{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
@@ -566,6 +651,24 @@ install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.
%changelog
+* Wed Nov 10 2021 Omair Majid <omajid(a)redhat.com> - 6.0.100-1
+- Update to .NET 6
+
+* Fri Oct 22 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.7.rc2
+- Update to .NET 6 RC2
+
+* Fri Oct 08 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.6.28be3e9a006d90d8c6e87d4353b77882829df718
+- Enable building on arm64
+- Related: RHBZ#1986017
+
+* Sun Oct 03 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.5.28be3e9a006d90d8c6e87d4353b77882829df718
+- Enable building on s390x
+- Related: RHBZ#1986017
+
+* Sun Oct 03 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.4.28be3e9a006d90d8c6e87d4353b77882829df718
+- Clean up tarball and add initial support for s390x
+- Related: RHBZ#1986017
+
* Sun Sep 26 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.3.28be3e9a006d90d8c6e87d4353b77882829df718
- Update to work-in-progress RC2 release
diff --git a/fsharp-no-apphost.patch b/fsharp-no-apphost.patch
new file mode 100644
index 0000000..1534888
--- /dev/null
+++ b/fsharp-no-apphost.patch
@@ -0,0 +1,21 @@
+--- a/tests/benchmarks/MicroPerf/MicroPerf.fsproj
++++ b/tests/benchmarks/MicroPerf/MicroPerf.fsproj
+@@ -9,6 +9,7 @@
+ <OtherFlags>$(OtherFlags) --nowarn:57</OtherFlags>
+ <OtherFlags>$(OtherFlags) --langversion:preview</OtherFlags>
+ <OtherFlags>$(OtherFlags) --define:PREVIEW</OtherFlags>
++ <UseAppHost>false</UseAppHost>
+ <!-- By default this project will compile with the proto compiler -->
+ <!-- Uncommenting this will build with a previous installed compiler -->
+ <!--
+--- a/tests/benchmarks/TaskPerf/TaskPerf.fsproj
++++ b/tests/benchmarks/TaskPerf/TaskPerf.fsproj
+@@ -4,6 +4,7 @@
+ <TargetFramework>net5.0</TargetFramework>
+ <OutputType>Exe</OutputType>
+ <DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
++ <UseAppHost>false</UseAppHost>
+ <!-- Turn off "This function is for use by compiled F# code and should not be used directly" -->
+ <OtherFlags>$(OtherFlags) --nowarn:1204</OtherFlags>
+ <!-- Turn off "Experimental" -->
+
diff --git a/installer-12516-portablerid.patch b/installer-12516-portablerid.patch
new file mode 100644
index 0000000..4cb4ab6
--- /dev/null
+++ b/installer-12516-portablerid.patch
@@ -0,0 +1,23 @@
+From 892222071f73062f969f4f6ed1df8f759b9327b7 Mon Sep 17 00:00:00 2001
+From: Tom Deseyn <tom.deseyn(a)gmail.com>
+Date: Wed, 3 Nov 2021 15:12:59 +0100
+Subject: [PATCH] GetRuntimeInformation.targets: determine
+ PortableProductMonikerRid based on HostOSName and Architecture.
+
+---
+ src/redist/targets/GetRuntimeInformation.targets | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/redist/targets/GetRuntimeInformation.targets b/src/redist/targets/GetRuntimeInformation.targets
+index 5133c3a3841..01f704c7d8e 100644
+--- a/src/redist/targets/GetRuntimeInformation.targets
++++ b/src/redist/targets/GetRuntimeInformation.targets
+@@ -28,6 +28,8 @@
+ '$(Rid)' == 'linux-musl-x64' ">$(Rid)</ProductMonikerRid>
+ <ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(OSName)-$(Architecture)</ProductMonikerRid>
+
++ <PortableProductMonikerRid Condition=" '$(PortableProductMonikerRid)' == '' ">$(HostOSName)-$(Architecture)</PortableProductMonikerRid>
++
+ <ArtifactNameSdk>dotnet-sdk-internal$(PgoTerm)</ArtifactNameSdk>
+ <ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk$(PgoTerm)</ArtifactNameCombinedHostHostFxrFrameworkSdk>
+
diff --git a/installer-12622-fix-runtime-symbols.patch b/installer-12622-fix-runtime-symbols.patch
new file mode 100644
index 0000000..fa2d46f
--- /dev/null
+++ b/installer-12622-fix-runtime-symbols.patch
@@ -0,0 +1,48 @@
+From 7365824ddc6ed66152cfc50f4c8508368953099c Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Tue, 9 Nov 2021 08:39:27 -0500
+Subject: [PATCH] Also publish non-portable RID runtime symbols tarball
+
+This fixes a regression in .NET 6 source-build compared to the .NET
+5 source-build.
+
+source-build wants to publish runtime symbols tarball for portable (eg,
+linux-x64) and non-portable (eg, fedora.33-x64) RIDs here after a build.
+Following .NET 5 conventions, I expected to see:
+
+ ./artifacts/x64/Release/runtime/dotnet-runtime-symbols-fedora.34-x64-6.0.0.tar.gz
+ ./artifacts/x64/Release/runtime/dotnet-runtime-symbols-linux-x64-6.0.0.tar.gz
+
+Unfortunately, only the portable RID (linux-x64) tarball is present
+after a full source-build in .NET 6.
+
+It turns out this is a bug in our build scripts. We try and copy
+binaries - including the symbol tarballs - after building each of
+runtime-portable and runtime. However, the target dependency is wrong:
+after `Build`, the intermediate package doesn't exist from the
+just-built repo.
+
+What ends up happening is that nothing is copied after building
+runtime-portable. However, after building runtime, the runtime-portable
+intermediate artifacts are found and copied over. So the end
+build has portable RID symbos, but not the non-portable ones.
+
+Fix that by changing the dependency of this target so it runs after
+intermediate packages are available.
+---
+ src/SourceBuild/tarball/content/repos/runtime.common.targets | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/SourceBuild/tarball/content/repos/runtime.common.targets b/src/SourceBuild/tarball/content/repos/runtime.common.targets
+index ca606b23d21..862b70dc832 100644
+--- a/src/SourceBuild/tarball/content/repos/runtime.common.targets
++++ b/src/SourceBuild/tarball/content/repos/runtime.common.targets
+@@ -23,7 +23,7 @@
+ </Target>
+
+ <Target Name="CopyBinariesToBinFolder"
+- AfterTargets="Build"
++ AfterTargets="ExtractIntermediatePackages"
+ Inputs="$(MSBuildProjectFullPath)"
+ Outputs="$(RepoCompletedSemaphorePath)CopyBinariesToBinFolder.complete">
+ <ItemGroup>
diff --git a/msbuild-no-systemconfiguration.patch b/msbuild-no-systemconfiguration.patch
new file mode 100644
index 0000000..537470d
--- /dev/null
+++ b/msbuild-no-systemconfiguration.patch
@@ -0,0 +1,46 @@
+--- a/src/Build/Definition/ProjectCollection.cs
++++ b/src/Build/Definition/ProjectCollection.cs
+@@ -1754,7 +1754,11 @@ namespace Microsoft.Build.Evaluation
+ #if FEATURE_WIN32_REGISTRY
+ ToolsetRegistryReader registryReader = null,
+ #endif
++#if FEATURE_SYSTEM_CONFIGURATION
+ ToolsetConfigurationReader configReader = null
++#else
++ object configReader = null
++#endif
+ )
+ {
+ _toolsets = new Dictionary<string, Toolset>(StringComparer.OrdinalIgnoreCase);
+--- a/src/Build/Definition/ToolsetReader.cs
++++ b/src/Build/Definition/ToolsetReader.cs
+@@ -101,7 +101,11 @@ namespace Microsoft.Build.Evaluation
+ #if FEATURE_WIN32_REGISTRY
+ ToolsetRegistryReader registryReader,
+ #endif
++#if FEATURE_SYSTEM_CONFIGURATION
+ ToolsetConfigurationReader configurationReader,
++#else
++ object _configurationReader,
++#endif
+ PropertyDictionary<ProjectPropertyInstance> environmentProperties,
+ PropertyDictionary<ProjectPropertyInstance> globalProperties,
+ ToolsetDefinitionLocations locations
+@@ -120,6 +124,7 @@ namespace Microsoft.Build.Evaluation
+
+ if ((locations & ToolsetDefinitionLocations.ConfigurationFile) == ToolsetDefinitionLocations.ConfigurationFile)
+ {
++#if FEATURE_SYSTEM_CONFIGURATION
+ if (configurationReader == null)
+ {
+ configurationReader = new ToolsetConfigurationReader(environmentProperties, globalProperties);
+@@ -129,6 +134,9 @@ namespace Microsoft.Build.Evaluation
+ defaultToolsVersionFromConfiguration = configurationReader.ReadToolsets(toolsets, globalProperties,
+ initialProperties, true /* accumulate properties */, out overrideTasksPathFromConfiguration,
+ out defaultOverrideToolsVersionFromConfiguration);
++#else
++ throw new InvalidOperationException("ToolsetDefinitionLocations.ConfigurationFile not supported");
++#endif
+ }
+
+ string defaultToolsVersionFromRegistry = null;
diff --git a/msbuild-no-systemsecurity.patch b/msbuild-no-systemsecurity.patch
new file mode 100644
index 0000000..dcf6809
--- /dev/null
+++ b/msbuild-no-systemsecurity.patch
@@ -0,0 +1,12 @@
+--- a/src/Shared/ExceptionHandling.cs
++++ b/src/Shared/ExceptionHandling.cs
+@@ -153,7 +153,9 @@ namespace Microsoft.Build.Shared
+ internal static bool IsXmlException(Exception e)
+ {
+ return e is XmlException
++#if FEATURE_SECURITY_PERMISSIONS
+ || e is XmlSyntaxException
++#endif
+ || e is XmlSchemaException
+ || e is UriFormatException; // XmlTextReader for example uses this under the covers
+ }
diff --git a/nuget-client-use-work-tree-with-git-apply.patch b/nuget-client-use-work-tree-with-git-apply.patch
deleted file mode 100644
index e1785ae..0000000
--- a/nuget-client-use-work-tree-with-git-apply.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 691babb1c8316e2f829fbcf9f2aa14f4b7711960 Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Thu, 9 Sep 2021 10:03:36 -0400
-Subject: [PATCH] [ArPow] Use --work-tree with git apply
-
-This makes things work bettern in a source-tarball build (where there
-may not be a .git directory), or there might be a .git directory but
-it's for a different repo than the one we are building.
----
- eng/source-build/source-build.proj | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/eng/source-build/source-build.proj b/eng/source-build/source-build.proj
-index 6f90f9793..72058ac88 100644
---- a/eng/source-build/source-build.proj
-+++ b/eng/source-build/source-build.proj
-@@ -55,7 +55,7 @@
- </ItemGroup>
-
- <Exec
-- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
-+ Command="git --work-tree="$(ProjectRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
- WorkingDirectory="$(ProjectRoot)"
- Condition="'@(SourceBuildPatchFile)' != ''" />
- </Target>
---
-2.31.1
-
diff --git a/roslyn-57003-mono-named-mutex.patch b/roslyn-57003-mono-named-mutex.patch
new file mode 100644
index 0000000..c264bff
--- /dev/null
+++ b/roslyn-57003-mono-named-mutex.patch
@@ -0,0 +1,453 @@
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
+@@ -31,5 +31,24 @@ namespace Roslyn.Utilities
+ }
+ }
+ }
++ /// <summary>
++ /// Are we running on .NET 5 or later using the Mono runtime?
++ /// Will also return true when running on Mono itself; if necessary
++ /// we can use IsRunningOnMono to distinguish.
++ /// </summary>
++ public static bool IsUsingMonoRuntime
++ {
++ get
++ {
++ try
++ {
++ return !(Type.GetType("Mono.RuntimeStructs", throwOnError: false) is null);
++ }
++ catch
++ {
++ return false;
++ }
++ }
++ }
+ }
+ }
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
+@@ -79,7 +79,7 @@ namespace Microsoft.CodeAnalysis.Compile
+ // to connect. When it fails it should fall back to in-proc
+ // compilation.
+ bool holdsMutex;
+- using (var serverMutex = new Mutex(initiallyOwned: true,
++ using (var serverMutex = BuildServerConnection.OpenOrCreateMutex(
+ name: BuildServerConnection.GetServerMutexName(_pipeName),
+ createdNew: out holdsMutex))
+ {
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
+@@ -103,7 +103,7 @@ class Hello
+ var mutexName = BuildServerConnection.GetServerMutexName(pipeName);
+
+ bool holdsMutex;
+- using (var mutex = new Mutex(initiallyOwned: true,
++ using (var mutex = BuildServerConnection.OpenOrCreateMutex(
+ name: mutexName,
+ createdNew: out holdsMutex))
+ {
+@@ -119,7 +119,7 @@ class Hello
+ }
+ finally
+ {
+- mutex.ReleaseMutex();
++ mutex.Dispose();
+ }
+ }
+ }
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
+@@ -304,7 +304,7 @@ End Module")
+ var newTempDir = _tempDirectory.CreateDirectory(new string('a', 100 - _tempDirectory.Path.Length));
+ await ApplyEnvironmentVariables(
+ new[] { new KeyValuePair<string, string>("TMPDIR", newTempDir.Path) },
+- async () =>
++ async () => await Task.Run(async () =>
+ {
+ using var serverData = await ServerUtil.CreateServer(_logger);
+ var result = RunCommandLineCompiler(
+@@ -317,7 +317,7 @@ End Module")
+
+ var listener = await serverData.Complete();
+ Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single());
+- });
++ }));
+ }
+
+ [Fact]
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
+@@ -101,7 +101,7 @@ namespace Microsoft.CodeAnalysis.Compile
+
+ var thread = new Thread(() =>
+ {
+- using (var mutex = new Mutex(initiallyOwned: true, name: mutexName, createdNew: out created))
++ using (var mutex = BuildServerConnection.OpenOrCreateMutex(name: mutexName, createdNew: out created))
+ using (var stream = NamedPipeUtil.CreateServer(pipeName))
+ {
+ readyMre.Set();
+@@ -112,7 +112,7 @@ namespace Microsoft.CodeAnalysis.Compile
+ stream.Close();
+
+ doneMre.WaitOne();
+- mutex.ReleaseMutex();
++ mutex.Dispose();
+ }
+ });
+
+@@ -153,7 +153,7 @@ namespace Microsoft.CodeAnalysis.Compile
+ {
+ using (var stream = NamedPipeUtil.CreateServer(pipeName))
+ {
+- var mutex = new Mutex(initiallyOwned: true, name: mutexName, createdNew: out created);
++ var mutex = BuildServerConnection.OpenOrCreateMutex(name: mutexName, createdNew: out created);
+ readyMre.Set();
+
+ stream.WaitForConnection();
+@@ -161,7 +161,6 @@ namespace Microsoft.CodeAnalysis.Compile
+
+ // Client is waiting for a response. Close the mutex now. Then close the connection
+ // so the client gets an error.
+- mutex.ReleaseMutex();
+ mutex.Dispose();
+ stream.Close();
+
+Index: tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Shared/BuildServerConnection.cs
+===================================================================
+--- tarball.6.0.1-rc2-6.0.100-rc2.orig/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Shared/BuildServerConnection.cs
++++ tarball.6.0.1-rc2-6.0.100-rc2/src/roslyn.8e1779e16298415843e85029d8b52a1ae9bb4c30/src/Compilers/Shared/BuildServerConnection.cs
+@@ -543,19 +543,10 @@ namespace Microsoft.CodeAnalysis.Command
+ {
+ try
+ {
+- if (PlatformInformation.IsRunningOnMono)
++ if (PlatformInformation.IsUsingMonoRuntime)
+ {
+- IServerMutex? mutex = null;
+- bool createdNew = false;
+- try
+- {
+- mutex = new ServerFileMutexPair(mutexName, false, out createdNew);
+- return !createdNew;
+- }
+- finally
+- {
+- mutex?.Dispose();
+- }
++ using var mutex = new ServerFileMutex(mutexName);
++ return !mutex.CouldLock();
+ }
+ else
+ {
+@@ -572,9 +563,11 @@ namespace Microsoft.CodeAnalysis.Command
+
+ internal static IServerMutex OpenOrCreateMutex(string name, out bool createdNew)
+ {
+- if (PlatformInformation.IsRunningOnMono)
++ if (PlatformInformation.IsUsingMonoRuntime)
+ {
+- return new ServerFileMutexPair(name, initiallyOwned: true, out createdNew);
++ var mutex = new ServerFileMutex(name);
++ createdNew = mutex.TryLock(0);
++ return mutex;
+ }
+ else
+ {
+@@ -648,19 +641,22 @@ namespace Microsoft.CodeAnalysis.Command
+ }
+
+ /// <summary>
+- /// An interprocess mutex abstraction based on OS advisory locking (FileStream.Lock/Unlock).
++ /// An interprocess mutex abstraction based on file sharing permission (FileShare.None).
+ /// If multiple processes running as the same user create FileMutex instances with the same name,
+ /// those instances will all point to the same file somewhere in a selected temporary directory.
+- /// The TryLock method can be used to attempt to acquire the mutex, with Unlock or Dispose used to release.
++ /// The TryLock method can be used to attempt to acquire the mutex, with Dispose used to release.
++ /// The CouldLock method can be used to check whether an attempt to acquire the mutex would have
++ /// succeeded at the current time, without actually acquiring it.
+ /// Unlike Win32 named mutexes, there is no mechanism for detecting an abandoned mutex. The file
+ /// will simply revert to being unlocked but remain where it is.
+ /// </summary>
+- internal sealed class FileMutex : IDisposable
++ internal sealed class ServerFileMutex : IServerMutex
+ {
+- public readonly FileStream Stream;
++ public FileStream? Stream;
+ public readonly string FilePath;
++ public readonly string GuardPath;
+
+- public bool IsLocked { get; private set; }
++ public bool IsDisposed { get; private set; }
+
+ internal static string GetMutexDirectory()
+ {
+@@ -670,61 +666,176 @@ namespace Microsoft.CodeAnalysis.Command
+ return result;
+ }
+
+- public FileMutex(string name)
++ public ServerFileMutex(string name)
+ {
+- FilePath = Path.Combine(GetMutexDirectory(), name);
+- Stream = new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
++ var mutexDirectory = GetMutexDirectory();
++ FilePath = Path.Combine(mutexDirectory, name);
++ GuardPath = Path.Combine(mutexDirectory, ".guard");
+ }
+
+- public bool TryLock(int timeoutMs)
++ /// <summary>
++ /// Acquire the guard by opening the guard file with FileShare.None. The guard must only ever
++ /// be held for very brief amounts of time, so we can simply spin until it is acquired. The
++ /// guard must be released by disposing the FileStream returned from this routine. Note the
++ /// guard file is never deleted; this is a leak, but only of a single file.
++ /// </summary>
++ internal FileStream LockGuard()
+ {
+- if (IsLocked)
+- throw new InvalidOperationException("Lock already held");
+-
+- var sw = Stopwatch.StartNew();
+- do
++ // We should be able to acquire the guard quickly. Limit the number of retries anyway
++ // by some arbitrary bound to avoid getting hung up in a possibly infinite loop.
++ for (var i = 0; i < 100; i++)
+ {
+ try
+ {
+- Stream.Lock(0, 0);
+- IsLocked = true;
+- return true;
++ return new FileStream(GuardPath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
+ }
+ catch (IOException)
+ {
+- // Lock currently held by someone else.
++ // Guard currently held by someone else.
+ // We want to sleep for a short period of time to ensure that other processes
+ // have an opportunity to finish their work and relinquish the lock.
+ // Spinning here (via Yield) would work but risks creating a priority
+ // inversion if the lock is held by a lower-priority process.
+ Thread.Sleep(1);
+ }
++ }
++ // Handle unexpected failure to acquire guard as error.
++ throw new InvalidOperationException("Unable to acquire guard");
++ }
++
++ /// <summary>
++ /// Attempt to acquire the lock by opening the lock file with FileShare.None. Sets "Stream"
++ /// and returns true if successful, returns false if the lock is already held by another
++ /// thread or process. Guard must be held when calling this routine.
++ /// </summary>
++ internal bool TryLockFile()
++ {
++ Debug.Assert(Stream is null);
++ FileStream? stream = null;
++ try
++ {
++ stream = new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
++ // On some targets, the file locking used to implement FileShare.None may not be
++ // atomic with opening/creating the file. This creates a race window when another
++ // thread holds the lock and is just about to unlock: we may be able to open the
++ // file here, then the other thread unlocks and deletes the file, and then we
++ // acquire the lock on our file handle - but the actual file is already deleted.
++ // To close this race, we verify that the file does in fact still exist now that
++ // we have successfull acquired the locked FileStream. (Note that this check is
++ // safe because we cannot race with an other attempt to create the file since we
++ // hold the guard, and after the FileStream constructor returned we can no race
++ // with file deletion because we hold the lock.)
++ if (!File.Exists(FilePath))
++ {
++ // To simplify the logic, we treat this case as "unable to acquire the lock"
++ // because it we caught another process while it owned the lock and was just
++ // giving it up. If the caller retries, we'll likely acquire the lock then.
++ stream.Dispose();
++ return false;
++ }
++ }
++ catch (Exception)
++ {
++ stream?.Dispose();
++ return false;
++ }
++ Stream = stream;
++ return true;
++ }
++
++ /// <summary>
++ /// Release the lock by deleting the lock file and disposing "Stream".
++ /// </summary>
++ internal void UnlockFile()
++ {
++ Debug.Assert(Stream is not null);
++ try
++ {
++ // Delete the lock file while the stream is not yet disposed
++ // and we therefore still hold the FileShare.None exclusion.
++ // There may still be a race with another thread attempting a
++ // TryLockFile in parallel, but that is safely handled there.
++ File.Delete(FilePath);
++ }
++ finally
++ {
++ Stream.Dispose();
++ Stream = null;
++ }
++ }
++
++ public bool TryLock(int timeoutMs)
++ {
++ if (IsDisposed)
++ throw new ObjectDisposedException("Mutex");
++ if (Stream is not null)
++ throw new InvalidOperationException("Lock already held");
++
++ var sw = Stopwatch.StartNew();
++ do
++ {
++ try
++ {
++ // Attempt to acquire lock while holding guard.
++ using var guard = LockGuard();
++ if (TryLockFile())
++ return true;
++ }
+ catch (Exception)
+ {
+- // Something else went wrong.
+ return false;
+ }
++
++ // See comment in LockGuard.
++ Thread.Sleep(1);
+ } while (sw.ElapsedMilliseconds < timeoutMs);
+
+ return false;
+ }
+
+- public void Unlock()
++ public bool CouldLock()
+ {
+- if (!IsLocked)
+- return;
+- Stream.Unlock(0, 0);
+- IsLocked = false;
++ if (IsDisposed)
++ return false;
++ if (Stream is not null)
++ return false;
++
++ try
++ {
++ // Attempt to acquire lock while holding guard, and if successful
++ // immediately unlock again while still holding guard. This ensures
++ // no other thread will spuriously observe the lock as held due to
++ // the lock attempt here.
++ using var guard = LockGuard();
++ if (TryLockFile())
++ {
++ UnlockFile();
++ return true;
++ }
++ }
++ catch (Exception)
++ {
++ return false;
++ }
++
++ return false;
+ }
+
+ public void Dispose()
+ {
+- var wasLocked = IsLocked;
+- if (wasLocked)
+- Unlock();
+- Stream.Dispose();
+- // We do not delete the lock file here because there is no reliable way to perform a
+- // 'delete if no one has the file open' operation atomically on *nix. This is a leak.
++ if (IsDisposed)
++ return;
++ IsDisposed = true;
++ if (Stream is not null)
++ {
++ try
++ {
++ UnlockFile();
++ }
++ catch (Exception)
++ {
++ }
++ }
+ }
+ }
+
+@@ -792,56 +903,4 @@ namespace Microsoft.CodeAnalysis.Command
+ }
+ }
+ }
+-
+- /// <summary>
+- /// Approximates a named mutex with 'locked', 'unlocked' and 'abandoned' states.
+- /// There is no reliable way to detect whether a mutex has been abandoned on some target platforms,
+- /// so we use the AliveMutex to manually track whether the creator of a mutex is still running,
+- /// while the HeldMutex represents the actual lock state of the mutex.
+- /// </summary>
+- internal sealed class ServerFileMutexPair : IServerMutex
+- {
+- public readonly FileMutex AliveMutex;
+- public readonly FileMutex HeldMutex;
+-
+- public bool IsDisposed { get; private set; }
+-
+- public ServerFileMutexPair(string mutexName, bool initiallyOwned, out bool createdNew)
+- {
+- AliveMutex = new FileMutex(mutexName + "-alive");
+- HeldMutex = new FileMutex(mutexName + "-held");
+- createdNew = AliveMutex.TryLock(0);
+- if (initiallyOwned && createdNew)
+- {
+- if (!TryLock(0))
+- throw new Exception("Failed to lock mutex after creating it");
+- }
+- }
+-
+- public bool TryLock(int timeoutMs)
+- {
+- if (IsDisposed)
+- throw new ObjectDisposedException("Mutex");
+- return HeldMutex.TryLock(timeoutMs);
+- }
+-
+- public void Dispose()
+- {
+- if (IsDisposed)
+- return;
+- IsDisposed = true;
+-
+- try
+- {
+- HeldMutex.Unlock();
+- AliveMutex.Unlock();
+- }
+- finally
+- {
+- AliveMutex.Dispose();
+- HeldMutex.Dispose();
+- }
+- }
+- }
+-
+ }
diff --git a/roslyn-analyzers-no-apphost.patch b/roslyn-analyzers-no-apphost.patch
new file mode 100644
index 0000000..c1fc3dd
--- /dev/null
+++ b/roslyn-analyzers-no-apphost.patch
@@ -0,0 +1,10 @@
+--- a/src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj
++++ b/src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj
+@@ -4,6 +4,7 @@
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ <NonShipping>true</NonShipping>
+ <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
++ <UseAppHost>false</UseAppHost>
+ </PropertyGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersion)" />
diff --git a/roslyn-no-apphost.patch b/roslyn-no-apphost.patch
new file mode 100644
index 0000000..f1767c7
--- /dev/null
+++ b/roslyn-no-apphost.patch
@@ -0,0 +1,10 @@
+--- a/src/Workspaces/Remote/ServiceHub.CoreComponents/Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.csproj
++++ b/src/Workspaces/Remote/ServiceHub.CoreComponents/Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.csproj
+@@ -5,6 +5,7 @@
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ <!-- The purpose of this project is to include all dependecies of Microsoft.CodeAnalysis.Remote.ServiceHub targeting .Net Core -->
++ <UseAppHost>false</UseAppHost>
+ <IsShipping>false</IsShipping>
+ </PropertyGroup>
+ <ItemGroup>
diff --git a/runtime-arm64-lld-fix.patch b/runtime-arm64-lld-fix.patch
new file mode 100644
index 0000000..5972f45
--- /dev/null
+++ b/runtime-arm64-lld-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/eng/native/init-compiler.sh b/eng/native/init-compiler.sh
+index 567d18da474..927b3071e92 100755
+--- a/eng/native/init-compiler.sh
++++ b/eng/native/init-compiler.sh
+@@ -108,7 +108,7 @@ if [[ -z "$CC" ]]; then
+ fi
+
+ if [[ "$compiler" == "clang" ]]; then
+- if command -v "lld$desired_version" > /dev/null; then
++ if command -v lld || command -v "lld$desired_version" > /dev/null; then
+ # Only lld version >= 9 can be considered stable
+ if [[ "$majorVersion" -ge 9 ]]; then
+ LDFLAGS="-fuse-ld=lld"
diff --git a/runtime-mono-remove-ilstrip.patch b/runtime-mono-remove-ilstrip.patch
new file mode 100644
index 0000000..9a711f8
--- /dev/null
+++ b/runtime-mono-remove-ilstrip.patch
@@ -0,0 +1,33 @@
+diff --git a/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Microsoft.NET.Runtime.MonoTargets.Sdk.pkgproj b/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Microsoft.NET.Runtime.MonoTargets.Sdk.pkgproj
+index 724b704f864..3dabdc81dae 100644
+--- a/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Microsoft.NET.Runtime.MonoTargets.Sdk.pkgproj
++++ b/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Microsoft.NET.Runtime.MonoTargets.Sdk.pkgproj
+@@ -6,7 +6,7 @@
+ </PropertyGroup>
+
+ <ItemGroup>
+- <ProjectReference Include="$(RepoTasksDir)ILStripTask\ILStrip.csproj" />
++ <ProjectReference Include="$(RepoTasksDir)ILStripTask\ILStrip.csproj" Condition="'$(DotNetBuildFromSource)' != 'true'" />
+ <ProjectReference Include="$(RepoTasksDir)RuntimeConfigParser\RuntimeConfigParser.csproj" />
+ <ProjectReference Include="$(RepoTasksDir)JsonToItemsTaskFactory\JsonToItemsTaskFactory.csproj" />
+ </ItemGroup>
+@@ -15,7 +15,7 @@
+ <PackageFile Include="Sdk\Sdk.props" TargetPath="Sdk" />
+ <PackageFile Include="Sdk\Sdk.targets" TargetPath="Sdk" />
+ <PackageFile Include="build\$(MSBuildProjectName).props" TargetPath="build" />
+- <PackageFile Include="Sdk\ILStripTask.props" TargetPath="Sdk" />
++ <PackageFile Include="Sdk\ILStripTask.props" TargetPath="Sdk" Condition="'$(DotNetBuildFromSource)' != 'true'" />
+ <PackageFile Include="Sdk\RuntimeConfigParserTask.props" TargetPath="Sdk" />
+ <PackageFile Include="Sdk\RuntimeComponentManifest.props" TargetPath="Sdk" />
+ <PackageFile Include="Sdk\RuntimeComponentManifest.targets" TargetPath="Sdk" />
+diff --git a/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props b/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props
+index 8a7ede79242..cfd515eeca9 100644
+--- a/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props
++++ b/src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/Sdk.props
+@@ -1,5 +1,5 @@
+ <Project>
+- <Import Project="$(MSBuildThisFileDirectory)\ILStripTask.props" />
++ <Import Project="$(MSBuildThisFileDirectory)\ILStripTask.props" Condition="'$(DotNetBuildFromSource)' != 'true'" />
+ <Import Project="$(MSBuildThisFileDirectory)\RuntimeConfigParserTask.props" />
+ <Import Project="$(MSBuildThisFileDirectory)\RuntimeComponentManifest.props" />
+ </Project>
diff --git a/sdk-22373-portablerid.patch b/sdk-22373-portablerid.patch
new file mode 100644
index 0000000..8b39eb3
--- /dev/null
+++ b/sdk-22373-portablerid.patch
@@ -0,0 +1,22 @@
+From 499fcf6e3b0e4b01a9c340a06f00cfc3e1fcc5d2 Mon Sep 17 00:00:00 2001
+From: Tom Deseyn <tom.deseyn(a)gmail.com>
+Date: Tue, 5 Oct 2021 09:04:14 +0200
+Subject: [PATCH] Use the portable rid for --use-current-runtime.
+
+---
+ .../targets/Microsoft.NET.RuntimeIdentifierInference.targets | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
+index 17308aa9160..e764b2d9845 100644
+--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
++++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets
+@@ -62,7 +62,7 @@ Copyright (c) .NET Foundation. All rights reserved.
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(UseCurrentRuntimeIdentifier)' == 'true'">
+- <RuntimeIdentifier>$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier>
++ <RuntimeIdentifier>$(NETCoreSdkPortableRuntimeIdentifier)</RuntimeIdentifier>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(PlatformTarget)' == ''">
commit 9bc7689eec09735652c954ea3d97febebb4dc0f5
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Sep 28 14:23:03 2021 -0400
Make it easier to build on RHEL 8 as well using the system libunwind
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 4279bba..826752b 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -148,7 +148,10 @@ if [[ ${build_bootstrap} == true ]]; then
mkdir -p fixup-previously-source-built-artifacts
pushd fixup-previously-source-built-artifacts
tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
- find -iname '*fedora*nupkg' -delete
+ find . -iname '*fedora*nupkg' -delete
+ rm runtime.linux-x64.Microsoft.NETCore.IL*sm.*.nupkg
+ wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_p...
+ wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_p...
# We must keep the original file names in the archive, even prepending a ./ leads to issues
tar -I 'gzip -9' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
popd
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index d1d6994..6f523a3 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -197,7 +197,8 @@ Requires: dotnet-hostfxr-6.0%{?_isa} >= %{host_rpm_version}-%{release}
Requires: libicu%{?_isa}
%if %{use_bundled_libunwind}
-Provides: bundled(libunwind) = 1.3
+# See runtime.*/src/coreclr/pal/src/libunwind/libunwind-version.txt
+Provides: bundled(libunwind) = 1.5.rc1.28.g9165d2a1
%endif
%description -n dotnet-runtime-6.0
@@ -383,6 +384,14 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}
%endif
%endif
+# Disable package validation which breaks our build, even though we
+# are injecting "blessed" nuget packages produced by Microsoft.
+# There's no need to run validation in RPM packages anyway.
+sed -i -E 's|( /p:BuildDebPackage=false)|\1 /p:EnablePackageValidation=false|' src/runtime.*/eng/SourceBuild.props
+
+%if ! %{use_bundled_libunwind}
+sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' src/runtime.*/eng/SourceBuild.props
+%endif
%build
cat /etc/os-release
commit 0fffd382bfeeeb57a9753cce6200c64e29b348dd
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Sep 27 09:39:50 2021 -0400
Update to work-in-progress RC2 release
This isn't even the final RC2 release.
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index c0fa8fd..4279bba 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -28,10 +28,6 @@ function clean_dotnet_cache {
}
function check_bootstrap_environment {
- if rpm -qa | grep libunwind-devel; then
- echo "error: libunwind-devel is installed. Not a good idea for bootstrapping."
- exit 1
- fi
if rpm -qa | grep dotnet ; then
echo "error: dotnet is installed. Not a good idea for bootstrapping."
exit 1
@@ -125,18 +121,16 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git checkout "${tag}"
git submodule update --init --recursive
clean_dotnet_cache
- # FIXME remove contineuonprebuilterror
- # ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true -p:UseSystemLibunwind=false
- # ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
mkdir -p "../${unmodified_tarball_name}"
./build.sh /p:ArcadeBuildTarball=true /p:TarballDir="$(readlink -f ../"${unmodified_tarball_name}")"
+ popd
if [[ ${build_bootstrap} == true ]]; then
- # FIXME
- # cp -a artifacts/"${arch}"/Release/Private.SourceBuilt.Artifacts.*.tar.gz "${unmodified_tarball_name}"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
- echo
+ pushd "${unmodified_tarball_name}"
+ ./prep.sh
+ popd
fi
- popd
+
popd
tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}"
@@ -150,20 +144,29 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
-if [[ ${build_bootstrap} != true ]]; then
+if [[ ${build_bootstrap} == true ]]; then
+ mkdir -p fixup-previously-source-built-artifacts
+ pushd fixup-previously-source-built-artifacts
+ tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+ find -iname '*fedora*nupkg' -delete
+ # We must keep the original file names in the archive, even prepending a ./ leads to issues
+ tar -I 'gzip -9' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
+ popd
+ rm -rf fixup-previously-source-built-artifacts
+
+else
find . -type f -iname '*.tar.gz' -delete
rm -rf .dotnet
-else
- ./prep.sh
fi
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
-rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
-find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
-rm -r src/nuget-client.*/test/EndToEnd
-rm -r src/source-build.*/src/humanizer/samples/
+# FIXME
+#rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
+#find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
+#rm -r src/nuget-client.*/test/EndToEnd
+#rm -r src/source-build.*/src/humanizer/samples/
popd
-tar czf "${tarball_name}.tar.gz" "${tarball_name}"
+tar -I 'gzip -9' -cf "${tarball_name}.tar.gz" "${tarball_name}"
diff --git a/command-line-api-use-work-tree-with-git-apply.patch b/command-line-api-use-work-tree-with-git-apply.patch
new file mode 100644
index 0000000..552d59d
--- /dev/null
+++ b/command-line-api-use-work-tree-with-git-apply.patch
@@ -0,0 +1,27 @@
+From 7a752928ed3588246c4b296feb6cf4946f1b29b7 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Thu, 9 Sep 2021 12:11:39 -0400
+Subject: [PATCH] [ArPow] Use --work-tree with git apply
+
+This makes things work better in a source-tarball build, where there may
+be a .git directory but it's for a different repo than command-line-api.
+---
+ eng/SourceBuild.props | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
+index 6cc85018..5e223747 100644
+--- a/eng/SourceBuild.props
++++ b/eng/SourceBuild.props
+@@ -15,7 +15,7 @@
+ </ItemGroup>
+
+ <Exec
+- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
++ Command="git --work-tree="$(RepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ WorkingDirectory="$(RepoRoot)"
+ Condition="'@(SourceBuildPatchFile)' != ''" />
+ </Target>
+--
+2.31.1
+
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 1ee4e19..d1d6994 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -20,11 +20,11 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 6.0.0-preview.7.21356.2
-%global runtime_version 6.0.0-preview.7.21356.2
-%global aspnetcore_runtime_version 6.0.0-preview.6.21355.2/
-%global sdk_version 6.0.100
-%global templates_version 6.0.0-rc.2.21420.26
+%global host_version 6.0.0-rc.2.21470.23
+%global runtime_version 6.0.0-rc.2.21470.23
+%global aspnetcore_runtime_version 6.0.0-rc.2.21470.37
+%global sdk_version 6.0.100-rc.2.21474.1
+%global templates_version 6.0.0-rc.2.21470.37
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version 6.0.0
@@ -34,7 +34,7 @@
# upstream can update releases without revving the SDK version so these don't always match
#%%global upstream_tag v%%{sdk_version}-SDK
-%global upstream_tag f3ea71b28f18719441d1e6995f134e22559131d6
+%global upstream_tag 28be3e9a006d90d8c6e87d4353b77882829df718
%if 0%{?fedora} || 0%{?rhel} < 8
%global use_bundled_libunwind 0
@@ -57,27 +57,38 @@
Name: dotnet6.0
Version: %{sdk_rpm_version}
-Release: 0.2.preview6%{?dist}
+Release: 0.3.%{upstream_tag}%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
-# ./build-dotnet-tarball --bootstrap $commit-id
+# ./build-dotnet-tarball --bootstrap %%{upstream_tag}
Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
+# https://github.com/NuGet/NuGet.Client/pull/4254
+Patch200: nuget-client-use-work-tree-with-git-apply.patch
+# https://github.com/dotnet/command-line-api/pull/1401
+Patch300: command-line-api-use-work-tree-with-git-apply.patch
+# https://github.com/microsoft/vstest/pull/3046
+Patch400: vstest-use-work-tree-with-git-apply.patch
+
+Patch500: fsharp-use-work-tree-with-git-apply.patch
+
+Patch600: xliff-tasks-use-work-tree-with-git-apply.patch
+
# Disable telemetry by default; make it opt-in
-Patch500: sdk-telemetry-optout.patch
+Patch1500: sdk-telemetry-optout.patch
-%if 0%{?fedora} > 32 || 0%{?rhel} > 8
-ExclusiveArch: aarch64 x86_64
-%else
-ExclusiveArch: x86_64
-%endif
+#%%if 0%%{?fedora} > 32 || 0%%{?rhel} > 8
+#ExclusiveArch: aarch64 x86_64
+#%%else
+ExclusiveArch: x86_64
+#%%endif
BuildRequires: clang
BuildRequires: cmake
@@ -338,10 +349,33 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehos
# Disable warnings
# sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
-pushd src/sdk.*
+pushd src/runtime.*
+popd
+
+pushd src/nuget-client.*
+%patch200 -p1
+popd
+
+pushd src/command-line-api.*
+%patch300 -p1
+popd
+
+pushd src/vstest.*
+%patch400 -p1
+popd
+
+pushd src/fsharp.*
%patch500 -p1
popd
+pushd src/xliff-tasks.*
+%patch600 -p1
+popd
+
+pushd src/sdk.*
+%patch1500 -p1
+popd
+
%if %{without bootstrap}
%ifnarch x86_64
mkdir -p artifacts/obj/%{runtime_arch}/Release
@@ -349,16 +383,6 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}
%endif
%endif
-%if %{use_bundled_libunwind}
- sed -i -E \
- 's/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=(TRUE|true|FALSE|false)/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE/' \
- src/runtime.*/eng/SourceBuild.props
-%else
- sed -i -E \
- 's/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=(TRUE|true|FALSE|false)/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE/' \
- src/runtime.*/eng/SourceBuild.props
-%endif
-
%build
cat /etc/os-release
@@ -400,17 +424,13 @@ unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
-#%%if %%{without bootstrap}
-# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
-# --with-packages %%{_libdir}/dotnet/source-built-artifacts/*.tar.gz \
-# --with-sdk %%{_libdir}/dotnet \
-#%%endif
-
VERBOSE=1 ./build.sh \
%if %{without bootstrap}
--with-sdk previously-built-dotnet \
%endif
-- \
+
+echo \
/v:n \
/p:SkipPortableRuntimeBuild=true \
/p:LogVerbosity=n \
@@ -432,9 +452,13 @@ tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}
# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
# Fix executable permissions on files
+find %{buildroot}%{_libdir}/dotnet/ -type f -name 'apphost' -exec chmod +x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name 'singlefilehost' -exec chmod +x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name 'lib*so' -exec chmod +x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.h' -exec chmod 0644 {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.json' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
@@ -459,9 +483,11 @@ ln -s ../../%{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/
install -dm 0755 %{buildroot}%{_mandir}/man1/
find -iname 'dotnet*.1' -type f -exec cp {} %{buildroot}%{_mandir}/man1/ \;
-echo "%{_libdir}/dotnet" >> install_location
install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
+echo "%{_libdir}/dotnet" >> install_location
install install_location %{buildroot}%{_sysconfdir}/dotnet/
+echo "%{_libdir}/dotnet" >> install_location_%{runtime_arch}
+install install_location_%{runtime_arch} %{buildroot}%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
@@ -520,7 +546,9 @@ install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.
%dir %{_libdir}/dotnet/sdk
%{_libdir}/dotnet/sdk/%{sdk_version}
%dir %{_libdir}/dotnet/sdk-manifests
-%{_libdir}/dotnet/sdk-manifests/%{sdk_version}
+# FIXME hardcoded version?
+%{_libdir}/dotnet/sdk-manifests/6.0.100
+%{_libdir}/dotnet/metadata
%dir %{_libdir}/dotnet/packs
%files -n dotnet-sdk-6.0-source-built-artifacts
@@ -529,6 +557,9 @@ install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.
%changelog
+* Sun Sep 26 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.3.28be3e9a006d90d8c6e87d4353b77882829df718
+- Update to work-in-progress RC2 release
+
* Wed Aug 25 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.2.preview6
- Updated to build the latest source-build preview
diff --git a/fsharp-use-work-tree-with-git-apply.patch b/fsharp-use-work-tree-with-git-apply.patch
new file mode 100644
index 0000000..810cf67
--- /dev/null
+++ b/fsharp-use-work-tree-with-git-apply.patch
@@ -0,0 +1,11 @@
+--- a/eng/SourceBuild.props
++++ b/eng/SourceBuild.props
+@@ -15,7 +15,7 @@
+ </ItemGroup>
+
+ <Exec
+- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
++ Command="git --work-tree="$(RepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ WorkingDirectory="$(RepoRoot)"
+ Condition="'@(SourceBuildPatchFile)' != ''" />
+ </Target>
diff --git a/nuget-client-use-work-tree-with-git-apply.patch b/nuget-client-use-work-tree-with-git-apply.patch
new file mode 100644
index 0000000..e1785ae
--- /dev/null
+++ b/nuget-client-use-work-tree-with-git-apply.patch
@@ -0,0 +1,28 @@
+From 691babb1c8316e2f829fbcf9f2aa14f4b7711960 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Thu, 9 Sep 2021 10:03:36 -0400
+Subject: [PATCH] [ArPow] Use --work-tree with git apply
+
+This makes things work bettern in a source-tarball build (where there
+may not be a .git directory), or there might be a .git directory but
+it's for a different repo than the one we are building.
+---
+ eng/source-build/source-build.proj | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/eng/source-build/source-build.proj b/eng/source-build/source-build.proj
+index 6f90f9793..72058ac88 100644
+--- a/eng/source-build/source-build.proj
++++ b/eng/source-build/source-build.proj
+@@ -55,7 +55,7 @@
+ </ItemGroup>
+
+ <Exec
+- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
++ Command="git --work-tree="$(ProjectRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ WorkingDirectory="$(ProjectRoot)"
+ Condition="'@(SourceBuildPatchFile)' != ''" />
+ </Target>
+--
+2.31.1
+
diff --git a/vstest-use-work-tree-with-git-apply.patch b/vstest-use-work-tree-with-git-apply.patch
new file mode 100644
index 0000000..58c139f
--- /dev/null
+++ b/vstest-use-work-tree-with-git-apply.patch
@@ -0,0 +1,33 @@
+From b2c4b2427d8c1a2410c4210789caccf1ec87e64a Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Thu, 9 Sep 2021 13:21:51 -0400
+Subject: [PATCH] [ArPow] Use --work-tree with git apply
+
+This makes things work better in a source-tarball build, where there may
+be a .git directory somewhere in our parent directories but it's for a
+different repo than vstest. In a situation like that a plain `git apply`
+will (silently!) ignore patches because they wont apply to the unrelated
+repository. That will (eventually) make the source-build fail.
+`--work-tree` makes git directly use the directory that we care about.
+
+See https://github.com/dotnet/source-build/issues/2445 for more details.
+---
+ eng/SourceBuild.props | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
+index b365645c..68f82592 100644
+--- a/eng/SourceBuild.props
++++ b/eng/SourceBuild.props
+@@ -24,7 +24,7 @@
+ </ItemGroup>
+
+ <Exec
+- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
++ Command="git --work-tree="$(InnerSourceBuildRepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ WorkingDirectory="$(InnerSourceBuildRepoRoot)"
+ Condition="'@(SourceBuildPatchFile)' != ''" />
+ </Target>
+--
+2.31.1
+
diff --git a/xliff-tasks-use-work-tree-with-git-apply.patch b/xliff-tasks-use-work-tree-with-git-apply.patch
new file mode 100644
index 0000000..810cf67
--- /dev/null
+++ b/xliff-tasks-use-work-tree-with-git-apply.patch
@@ -0,0 +1,11 @@
+--- a/eng/SourceBuild.props
++++ b/eng/SourceBuild.props
+@@ -15,7 +15,7 @@
+ </ItemGroup>
+
+ <Exec
+- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
++ Command="git --work-tree="$(RepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
+ WorkingDirectory="$(RepoRoot)"
+ Condition="'@(SourceBuildPatchFile)' != ''" />
+ </Target>
commit ab9ddbb0e7fe2b2c10a82c24f9004bcabd9f6941
Author: Omair Majid <omajid(a)redhat.com>
Date: Sat Aug 28 14:35:50 2021 -0400
Fix build
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 5499281..1ee4e19 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -349,7 +349,15 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}
%endif
%endif
-find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
+%if %{use_bundled_libunwind}
+ sed -i -E \
+ 's/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=(TRUE|true|FALSE|false)/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE/' \
+ src/runtime.*/eng/SourceBuild.props
+%else
+ sed -i -E \
+ 's/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=(TRUE|true|FALSE|false)/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE/' \
+ src/runtime.*/eng/SourceBuild.props
+%endif
%build
@@ -398,7 +406,7 @@ unset LDFLAGS
# --with-sdk %%{_libdir}/dotnet \
#%%endif
-VERBOSE=1 echo ./build.sh \
+VERBOSE=1 ./build.sh \
%if %{without bootstrap}
--with-sdk previously-built-dotnet \
%endif
@@ -408,11 +416,6 @@ VERBOSE=1 echo ./build.sh \
/p:LogVerbosity=n \
/p:MinimalConsoleLogOutput=false \
/p:ContinueOnPrebuiltBaselineError=true \
-%if %{use_bundled_libunwind}
- /p:UseSystemLibunwind=false \
-%else
- /p:UseSystemLibunwind=true \
-%endif
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
@@ -420,11 +423,13 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
+ls artifacts/%{runtime_arch}/Release
tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
+# FIXME: no managed symbols in 6.0?
# Install managed symbols
-tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
- -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
+#tar xf artifacts/%%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%%{runtime_version}-%%{runtime_id}.tar.gz \
+# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
# Fix executable permissions on files
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
@@ -459,15 +464,15 @@ install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
install install_location %{buildroot}%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
-#install -m 0644 artifacts/%%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %%{buildroot}/%%{_libdir}/dotnet/source-built-artifacts/
-install -m 0644 /home/omajid/rh-git/dotnet6.0/already-built-artifacts.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
-echo "Testing build results for debug symbols..."
-%{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
+# FIXME
+#echo "Testing build results for debug symbols..."
+#%%{SOURCE10} -v %%{buildroot}%%{_libdir}/dotnet/
commit 6eb79c130ad50a7e5137ee83e860449c8e26837b
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Aug 25 15:10:50 2021 -0400
Update to latest source-build 6.0 preview commit
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 98494bd..c0fa8fd 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -79,6 +79,7 @@ while [[ "$#" -gt 0 ]]; do
arg="${1}"
case "${arg}" in
--bootstrap)
+ check_bootstrap_environment
build_bootstrap=true
shift
;;
@@ -119,22 +120,26 @@ fi
if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
temp_dir=$(mktemp -d -p "$(pwd)")
pushd "${temp_dir}"
- git clone https://github.com/dotnet/source-build
- pushd source-build
+ git clone https://github.com/dotnet/installer
+ pushd installer
git checkout "${tag}"
git submodule update --init --recursive
clean_dotnet_cache
# FIXME remove contineuonprebuilterror
- ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true -p:UseSystemLibunwind=false
- ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
+ # ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true -p:UseSystemLibunwind=false
+ # ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
+ mkdir -p "../${unmodified_tarball_name}"
+ ./build.sh /p:ArcadeBuildTarball=true /p:TarballDir="$(readlink -f ../"${unmodified_tarball_name}")"
if [[ ${build_bootstrap} == true ]]; then
- cp -a artifacts/"${arch}"/Release/Private.SourceBuilt.Artifacts.*.tar.gz "${unmodified_tarball_name}"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+ # FIXME
+ # cp -a artifacts/"${arch}"/Release/Private.SourceBuilt.Artifacts.*.tar.gz "${unmodified_tarball_name}"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+ echo
fi
popd
popd
- tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}/source-build" "${unmodified_tarball_name}"
+ tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}"
rm -rf "${temp_dir}"
fi
@@ -148,15 +153,16 @@ pushd "${tarball_name}"
if [[ ${build_bootstrap} != true ]]; then
find . -type f -iname '*.tar.gz' -delete
rm -rf .dotnet
+else
+ ./prep.sh
fi
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
-rm -r src/nuget.client.*/test/EndToEnd
-rm -r src/runtime.*/src/mono/
-rm -r src/Humanizer.*/samples/
+rm -r src/nuget-client.*/test/EndToEnd
+rm -r src/source-build.*/src/humanizer/samples/
popd
diff --git a/dotnet6.0.spec b/dotnet6.0.spec
index 5617669..5499281 100644
--- a/dotnet6.0.spec
+++ b/dotnet6.0.spec
@@ -1,6 +1,3 @@
-#FIXME HACK
-%define debug_package %{nil}
-
%bcond_without bootstrap
# Avoid provides/requires from private libraries
@@ -23,11 +20,11 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 6.0.0-preview6
-%global runtime_version 6.0.0-preview6
-%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 6.0.0-preview6
-%global templates_version %{runtime_version}
+%global host_version 6.0.0-preview.7.21356.2
+%global runtime_version 6.0.0-preview.7.21356.2
+%global aspnetcore_runtime_version 6.0.0-preview.6.21355.2/
+%global sdk_version 6.0.100
+%global templates_version 6.0.0-rc.2.21420.26
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version 6.0.0
@@ -36,7 +33,8 @@
%global sdk_rpm_version 6.0.0
# upstream can update releases without revving the SDK version so these don't always match
-%global src_version %{sdk_version}
+#%%global upstream_tag v%%{sdk_version}-SDK
+%global upstream_tag f3ea71b28f18719441d1e6995f134e22559131d6
%if 0%{?fedora} || 0%{?rhel} < 8
%global use_bundled_libunwind 0
@@ -59,14 +57,14 @@
Name: dotnet6.0
Version: %{sdk_rpm_version}
-Release: 0.1.preview6%{?dist}
+Release: 0.2.preview6%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
-# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-6.0-preview6.tar.gz
+# ./build-dotnet-tarball --bootstrap $commit-id
+Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
@@ -307,13 +305,13 @@ These are not meant for general use.
%prep
%if %{without bootstrap}
-%setup -q -n dotnet-v%{src_version}-SDK
+%setup -q -n dotnet-%{upstream_tag}
%else
%ifarch x86_64
-%setup -q -T -b 0 -n tarball-6.0-preview6
+%setup -q -T -b 0 -n dotnet-%{upstream_tag}-%{runtime_arch}-bootstrap
%endif
%ifarch aarch64
-%setup -q -T -b 1 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
+%setup -q -T -b 0 -n dotnet-%{upstream_tag}-%{runtime_arch}-bootstrap
%endif
%endif
@@ -422,27 +420,11 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
-#tar xf artifacts/%%{runtime_arch}/Release/dotnet-sdk-%%{sdk_version}-%%{runtime_id}.tar.gz -C %%{buildroot}%%{_libdir}/dotnet/
-
-# FIXME this is a GIANT HACK to create a fake .NET installation on disk
-cat <<EOF > %{buildroot}%{_libdir}/dotnet/dotnet
-#!/usr/bin/bash
-
-echo "I am a fake dotnet command"
-EOF
-mkdir -p %{buildroot}%{_libdir}/dotnet/host/fxr/%{host_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/%{aspnetcore_runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Ref/%{runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/%{runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/sdk/%{sdk_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}/
-mkdir -p %{buildroot}%{_libdir}/dotnet/templates/%{templates_version}
+tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
# Install managed symbols
-# tar xf artifacts/%%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%%{runtime_version}-%%{runtime_id}.tar.gz \
-# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
+tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
+ -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
# Fix executable permissions on files
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
@@ -452,6 +434,7 @@ find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.txt' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.xml' -exec chmod -x {} \;
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
@@ -477,17 +460,19 @@ install install_location %{buildroot}%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
#install -m 0644 artifacts/%%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %%{buildroot}/%%{_libdir}/dotnet/source-built-artifacts/
+install -m 0644 /home/omajid/rh-git/dotnet6.0/already-built-artifacts.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
-# FIXME echo "Testing build results for debug symbols..."
-#%%{SOURCE10} -v %%{buildroot}%%{_libdir}/dotnet/
+echo "Testing build results for debug symbols..."
+%{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
%check
-#%%{buildroot}%%{_libdir}/dotnet/dotnet --info
+%{buildroot}%{_libdir}/dotnet/dotnet --info
%files -n dotnet
@@ -499,9 +484,8 @@ install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
%dir %{_libdir}/dotnet/host
%dir %{_libdir}/dotnet/host/fxr
%{_bindir}/dotnet
-# FIXME
-#%%license %%{_libdir}/dotnet/LICENSE.txt
-#%%license %%{_libdir}/dotnet/ThirdPartyNotices.txt
+%license %{_libdir}/dotnet/LICENSE.txt
+%license %{_libdir}/dotnet/ThirdPartyNotices.txt
%doc %{_mandir}/man1/dotnet*.1.gz
%config(noreplace) %{_sysconfdir}/profile.d/dotnet.sh
%config(noreplace) %{_sysconfdir}/dotnet
@@ -530,6 +514,8 @@ install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
%files -n dotnet-sdk-6.0
%dir %{_libdir}/dotnet/sdk
%{_libdir}/dotnet/sdk/%{sdk_version}
+%dir %{_libdir}/dotnet/sdk-manifests
+%{_libdir}/dotnet/sdk-manifests/%{sdk_version}
%dir %{_libdir}/dotnet/packs
%files -n dotnet-sdk-6.0-source-built-artifacts
@@ -538,6 +524,9 @@ install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
%changelog
+* Wed Aug 25 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.2.preview6
+- Updated to build the latest source-build preview
+
* Fri Jul 23 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.1.preview6
- Initial package for .NET 6
commit 363c3eae42893b844fd39beac5dc70e8d1920808
Author: Omair Majid <omajid(a)redhat.com>
Date: Sat Jul 24 14:22:54 2021 -0400
Update README
diff --git a/README.md b/README.md
index df95803..5289f61 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# dotnet5.0
+# dotnet6.0
-This is the .NET 5.0 package for Fedora.
+This is the pre-release .NET 6.0 package for Fedora.
This package is maintained by the Fedora DotNet SIG (Special Interest
Group). You can find out more about the DotNet SIG at:
@@ -21,6 +21,10 @@ with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
# Contributing
+The steps below are for the final package. Please only contribute to this
+pre-release version this if you know what you are doing. Original instructions
+follow.
+
## General Changes
1. Fork the repo.
commit ccf6794055940ee90a1db7a3aa9c290eb9158c22
Author: Omair Majid <omajid(a)redhat.com>
Date: Sat Jul 24 14:20:14 2021 -0400
Initial .NET 6 package
diff --git a/dotnet5.0.rpmlintrc b/dotnet6.0.rpmlintrc
similarity index 100%
rename from dotnet5.0.rpmlintrc
rename to dotnet6.0.rpmlintrc
diff --git a/dotnet5.0.spec b/dotnet6.0.spec
similarity index 84%
rename from dotnet5.0.spec
rename to dotnet6.0.spec
index 8facb47..5617669 100644
--- a/dotnet5.0.spec
+++ b/dotnet6.0.spec
@@ -1,4 +1,7 @@
-%bcond_with bootstrap
+#FIXME HACK
+%define debug_package %{nil}
+
+%bcond_without bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -20,17 +23,17 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.7
-%global runtime_version 5.0.7
+%global host_version 6.0.0-preview6
+%global runtime_version 6.0.0-preview6
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 5.0.204
+%global sdk_version 6.0.0-preview6
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
-%global host_rpm_version %{host_version}
-%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
-%global runtime_rpm_version %{runtime_version}
-%global sdk_rpm_version %{sdk_version}
+%global host_rpm_version 6.0.0
+%global runtime_rpm_version 6.0.0
+%global aspnetcore_runtime_rpm_version %{runtime_rpm_version}
+%global sdk_rpm_version 6.0.0
# upstream can update releases without revving the SDK version so these don't always match
%global src_version %{sdk_version}
@@ -54,16 +57,16 @@
%{!?runtime_id:%global runtime_id %(. /etc/os-release ; echo "${ID}.${VERSION_ID%%.*}")-%{runtime_arch}}
-Name: dotnet5.0
+Name: dotnet6.0
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 0.1.preview6%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-SDK.tar.gz
+Source0: dotnet-6.0-preview6.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
@@ -82,9 +85,9 @@ BuildRequires: clang
BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
-BuildRequires: dotnet5.0-build-reference-packages
-BuildRequires: dotnet-sdk-5.0
-BuildRequires: dotnet-sdk-5.0-source-built-artifacts
+BuildRequires: dotnet-sdk-6.0-build-reference-packages
+BuildRequires: dotnet-sdk-6.0
+BuildRequires: dotnet-sdk-6.0-source-built-artifacts
%endif
BuildRequires: findutils
BuildRequires: git
@@ -104,7 +107,6 @@ BuildRequires: lttng-ust-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: python3
-BuildRequires: systemtap-sdt-devel
BuildRequires: tar
BuildRequires: zlib-devel
@@ -125,7 +127,7 @@ application to drive everything.
Version: %{sdk_rpm_version}
Summary: .NET CLI tools and runtime
-Requires: dotnet-sdk-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
+Requires: dotnet-sdk-6.0%{?_isa} >= %{sdk_rpm_version}-%{release}
%description -n dotnet
.NET is a fast, lightweight and modular platform for creating
@@ -155,7 +157,7 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-hostfxr-5.0
+%package -n dotnet-hostfxr-6.0
Version: %{host_rpm_version}
Summary: .NET command line host resolver
@@ -164,7 +166,7 @@ Summary: .NET command line host resolver
# provided by this package, or from a newer version of .NET
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
-%description -n dotnet-hostfxr-5.0
+%description -n dotnet-hostfxr-6.0
The .NET host resolver contains the logic to resolve and select
the right version of the .NET SDK or runtime to use.
@@ -175,12 +177,12 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-runtime-5.0
+%package -n dotnet-runtime-6.0
Version: %{runtime_rpm_version}
-Summary: NET 5.0 runtime
+Summary: NET 6.0 runtime
-Requires: dotnet-hostfxr-5.0%{?_isa} >= %{host_rpm_version}-%{release}
+Requires: dotnet-hostfxr-6.0%{?_isa} >= %{host_rpm_version}-%{release}
# libicu is dlopen()ed
Requires: libicu%{?_isa}
@@ -189,7 +191,7 @@ Requires: libicu%{?_isa}
Provides: bundled(libunwind) = 1.3
%endif
-%description -n dotnet-runtime-5.0
+%description -n dotnet-runtime-6.0
The .NET runtime contains everything needed to run .NET applications.
It includes a high performance Virtual Machine as well as the framework
libraries used by .NET applications.
@@ -201,14 +203,14 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n aspnetcore-runtime-5.0
+%package -n aspnetcore-runtime-6.0
Version: %{aspnetcore_runtime_rpm_version}
-Summary: ASP.NET Core 5.0 runtime
+Summary: ASP.NET Core 6.0 runtime
-Requires: dotnet-runtime-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: dotnet-runtime-6.0%{?_isa} >= %{runtime_rpm_version}-%{release}
-%description -n aspnetcore-runtime-5.0
+%description -n aspnetcore-runtime-6.0
The ASP.NET Core runtime contains everything needed to run .NET
web applications. It includes a high performance Virtual Machine as
well as the framework libraries used by .NET applications.
@@ -220,16 +222,16 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-templates-5.0
+%package -n dotnet-templates-6.0
Version: %{sdk_rpm_version}
-Summary: .NET 5.0 templates
+Summary: .NET 6.0 templates
# Theoretically any version of the host should work. But lets aim for the one
# provided by this package, or from a newer version of .NET
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
-%description -n dotnet-templates-5.0
+%description -n dotnet-templates-6.0
This package contains templates used by the .NET SDK.
.NET is a fast, lightweight and modular platform for creating
@@ -239,25 +241,24 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-sdk-5.0
+%package -n dotnet-sdk-6.0
Version: %{sdk_rpm_version}
-Summary: .NET 5.0 Software Development Kit
+Summary: .NET 6.0 Software Development Kit
Provides: bundled(js-jquery)
-Provides: bundled(npm)
-Requires: dotnet-runtime-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: aspnetcore-runtime-5.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+Requires: dotnet-runtime-6.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-runtime-6.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
-Requires: dotnet-apphost-pack-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: dotnet-targeting-pack-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: aspnetcore-targeting-pack-5.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+Requires: dotnet-apphost-pack-6.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: dotnet-targeting-pack-6.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-targeting-pack-6.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
Requires: netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{release}
-Requires: dotnet-templates-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
+Requires: dotnet-templates-6.0%{?_isa} >= %{sdk_rpm_version}-%{release}
-%description -n dotnet-sdk-5.0
+%description -n dotnet-sdk-6.0
The .NET SDK is a collection of command line applications to
create, build, publish and run .NET applications.
@@ -286,18 +287,18 @@ applications using the .NET SDK.
%{_libdir}/dotnet/packs/%{5}
}
-%dotnet_targeting_pack dotnet-apphost-pack-5.0 %{runtime_rpm_version} Microsoft.NETCore.App 5.0 Microsoft.NETCore.App.Host.%{runtime_id}
-%dotnet_targeting_pack dotnet-targeting-pack-5.0 %{runtime_rpm_version} Microsoft.NETCore.App 5.0 Microsoft.NETCore.App.Ref
-%dotnet_targeting_pack aspnetcore-targeting-pack-5.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 5.0 Microsoft.AspNetCore.App.Ref
+%dotnet_targeting_pack dotnet-apphost-pack-6.0 %{runtime_rpm_version} Microsoft.NETCore.App 6.0 Microsoft.NETCore.App.Host.%{runtime_id}
+%dotnet_targeting_pack dotnet-targeting-pack-6.0 %{runtime_rpm_version} Microsoft.NETCore.App 6.0 Microsoft.NETCore.App.Ref
+%dotnet_targeting_pack aspnetcore-targeting-pack-6.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 6.0 Microsoft.AspNetCore.App.Ref
%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref
-%package -n dotnet-sdk-5.0-source-built-artifacts
+%package -n dotnet-sdk-6.0-source-built-artifacts
Version: %{sdk_rpm_version}
-Summary: Internal package for building .NET 5.0 Software Development Kit
+Summary: Internal package for building .NET 6.0 Software Development Kit
-%description -n dotnet-sdk-5.0-source-built-artifacts
+%description -n dotnet-sdk-6.0-source-built-artifacts
The .NET source-built archive is a collection of packages needed
to build the .NET SDK itself.
@@ -309,7 +310,7 @@ These are not meant for general use.
%setup -q -n dotnet-v%{src_version}-SDK
%else
%ifarch x86_64
-%setup -q -T -b 0 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
+%setup -q -T -b 0 -n tarball-6.0-preview6
%endif
%ifarch aarch64
%setup -q -T -b 1 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
@@ -334,10 +335,10 @@ ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages
%endif
# Fix bad hardcoded path in build
-sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/corehost/cli/hostmisc/pal.unix.cpp
+sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehost/hostmisc/pal.unix.cpp
# Disable warnings
-sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
+# sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
pushd src/sdk.*
%patch500 -p1
@@ -350,8 +351,6 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}
%endif
%endif
-cat source-build-info.txt
-
find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
@@ -401,7 +400,7 @@ unset LDFLAGS
# --with-sdk %%{_libdir}/dotnet \
#%%endif
-VERBOSE=1 ./build.sh \
+VERBOSE=1 echo ./build.sh \
%if %{without bootstrap}
--with-sdk previously-built-dotnet \
%endif
@@ -423,27 +422,37 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
-ls artifacts/%{runtime_arch}/Release
-tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
+#tar xf artifacts/%%{runtime_arch}/Release/dotnet-sdk-%%{sdk_version}-%%{runtime_id}.tar.gz -C %%{buildroot}%%{_libdir}/dotnet/
+
+# FIXME this is a GIANT HACK to create a fake .NET installation on disk
+cat <<EOF > %{buildroot}%{_libdir}/dotnet/dotnet
+#!/usr/bin/bash
+
+echo "I am a fake dotnet command"
+EOF
+mkdir -p %{buildroot}%{_libdir}/dotnet/host/fxr/%{host_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/%{aspnetcore_runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Ref/%{runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/%{runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/sdk/%{sdk_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}/
+mkdir -p %{buildroot}%{_libdir}/dotnet/templates/%{templates_version}
# Install managed symbols
-tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
- -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
+# tar xf artifacts/%%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%%{runtime_version}-%%{runtime_id}.tar.gz \
+# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
# Fix executable permissions on files
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
-find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.h' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.h' -exec chmod 0644 {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.xml' -exec chmod -x {} \;
-chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/apphost
-chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
-chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
-chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/nethost.h
-chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/singlefilehost
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
@@ -467,17 +476,18 @@ install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
install install_location %{buildroot}%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
-install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+#install -m 0644 artifacts/%%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %%{buildroot}/%%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
-echo "Testing build results for debug symbols..."
-%{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
+# FIXME echo "Testing build results for debug symbols..."
+#%%{SOURCE10} -v %%{buildroot}%%{_libdir}/dotnet/
+
%check
-%{buildroot}%{_libdir}/dotnet/dotnet --info
+#%%{buildroot}%%{_libdir}/dotnet/dotnet --info
%files -n dotnet
@@ -489,8 +499,9 @@ echo "Testing build results for debug symbols..."
%dir %{_libdir}/dotnet/host
%dir %{_libdir}/dotnet/host/fxr
%{_bindir}/dotnet
-%license %{_libdir}/dotnet/LICENSE.txt
-%license %{_libdir}/dotnet/ThirdPartyNotices.txt
+# FIXME
+#%%license %%{_libdir}/dotnet/LICENSE.txt
+#%%license %%{_libdir}/dotnet/ThirdPartyNotices.txt
%doc %{_mandir}/man1/dotnet*.1.gz
%config(noreplace) %{_sysconfdir}/profile.d/dotnet.sh
%config(noreplace) %{_sysconfdir}/dotnet
@@ -498,35 +509,38 @@ echo "Testing build results for debug symbols..."
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/dotnet
-%files -n dotnet-hostfxr-5.0
+%files -n dotnet-hostfxr-6.0
%dir %{_libdir}/dotnet/host/fxr
%{_libdir}/dotnet/host/fxr/%{host_version}
-%files -n dotnet-runtime-5.0
+%files -n dotnet-runtime-6.0
%dir %{_libdir}/dotnet/shared
%dir %{_libdir}/dotnet/shared/Microsoft.NETCore.App
%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}
-%files -n aspnetcore-runtime-5.0
+%files -n aspnetcore-runtime-6.0
%dir %{_libdir}/dotnet/shared
%dir %{_libdir}/dotnet/shared/Microsoft.AspNetCore.App
%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}
-%files -n dotnet-templates-5.0
+%files -n dotnet-templates-6.0
%dir %{_libdir}/dotnet/templates
%{_libdir}/dotnet/templates/%{templates_version}
-%files -n dotnet-sdk-5.0
+%files -n dotnet-sdk-6.0
%dir %{_libdir}/dotnet/sdk
%{_libdir}/dotnet/sdk/%{sdk_version}
%dir %{_libdir}/dotnet/packs
-%files -n dotnet-sdk-5.0-source-built-artifacts
+%files -n dotnet-sdk-6.0-source-built-artifacts
%dir %{_libdir}/dotnet
%{_libdir}/dotnet/source-built-artifacts
%changelog
+* Fri Jul 23 2021 Omair Majid <omajid(a)redhat.com> - 6.0.0-0.1.preview6
+- Initial package for .NET 6
+
* Thu Jun 10 2021 Omair Majid <omajid(a)redhat.com> - 5.0.204-1
- Update to .NET SDK 5.0.204 and Runtime 5.0.7
diff --git a/sources b/sources
deleted file mode 100644
index 3023834..0000000
--- a/sources
+++ /dev/null
@@ -1 +0,0 @@
-SHA512 (dotnet-v5.0.204-SDK.tar.gz) = ac6df26f4b36bc6da2bf1909d6f43f82bdfe95461ccb19558edafa4a6e8ceb287287da814aa30ba67d95154640ecfa708cdf42c714997c8d1afe8be2308310bb
commit 6e4203231baf641ee62293cbd9eeb2c94c2b5287
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Jun 10 14:03:16 2021 -0400
Update to .NET SDK 5.0.204 and Runtime 5.0.7
diff --git a/.gitignore b/.gitignore
index 263a869..b620824 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
/dotnet-v5.0.104-SDK.tar.gz
/dotnet-v5.0.202-SDK.tar.gz
/dotnet-v5.0.203-SDK.tar.gz
+/dotnet-v5.0.204-SDK.tar.gz
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 9856091..8facb47 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,10 +20,10 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.6
-%global runtime_version 5.0.6
+%global host_version 5.0.7
+%global runtime_version 5.0.7
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 5.0.203
+%global sdk_version 5.0.204
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
@@ -527,6 +527,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Thu Jun 10 2021 Omair Majid <omajid(a)redhat.com> - 5.0.204-1
+- Update to .NET SDK 5.0.204 and Runtime 5.0.7
+
* Wed May 12 2021 Omair Majid <omajid(a)redhat.com> - 5.0.203-1
- Update to .NET SDK 5.0.203 and Runtime 5.0.6
diff --git a/sources b/sources
index 690c031..3023834 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v5.0.203-SDK.tar.gz) = d2a6162c62d475ea3aab0055179a405b8b99fb698c30738db4d93c6f3372da438b2c8c7ad204b56e01f1ff53a6fd1c12e118dbc7a6a6d637b4bd9392794fa529
+SHA512 (dotnet-v5.0.204-SDK.tar.gz) = ac6df26f4b36bc6da2bf1909d6f43f82bdfe95461ccb19558edafa4a6e8ceb287287da814aa30ba67d95154640ecfa708cdf42c714997c8d1afe8be2308310bb
commit 44bde96015d3885c4f1d022d6825a3bced856001
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri May 14 10:40:29 2021 -0400
Update to .NET SDK 5.0.203 and Runtime 5.0.6
diff --git a/.gitignore b/.gitignore
index e9aebf0..263a869 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
/dotnet-v5.0.103-SDK.tar.gz
/dotnet-v5.0.104-SDK.tar.gz
/dotnet-v5.0.202-SDK.tar.gz
+/dotnet-v5.0.203-SDK.tar.gz
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 28764be..9856091 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,10 +20,10 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.5
-%global runtime_version 5.0.5
+%global host_version 5.0.6
+%global runtime_version 5.0.6
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 5.0.202
+%global sdk_version 5.0.203
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
@@ -329,8 +329,8 @@ rm -rf packages/source-built
%if %{without bootstrap}
mkdir -p packages/archive
-ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
-ln -s %{_libdir}/dotnet/reference-packages/*.tar.gz packages/archive
+ln -s %{_libdir}/dotnet/source-built-artifacts/Private.SourceBuilt.Artifacts.*.tar.gz packages/archive/
+ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive/
%endif
# Fix bad hardcoded path in build
@@ -527,6 +527,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Wed May 12 2021 Omair Majid <omajid(a)redhat.com> - 5.0.203-1
+- Update to .NET SDK 5.0.203 and Runtime 5.0.6
+
* Wed Apr 14 2021 Omair Majid <omajid(a)redhat.com> - 5.0.202-1
- Update to .NET SDK 5.0.202 and Runtime 5.0.5
diff --git a/sources b/sources
index 269959d..690c031 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v5.0.202-SDK.tar.gz) = ac69830aca58db95f7f48839867ebb2bb97dec2ef50c23ac7879ba217800a76c360d727a7e1db065bc4b0edd77b5fa93151d840e64c8b1564265819f8650c20e
+SHA512 (dotnet-v5.0.203-SDK.tar.gz) = d2a6162c62d475ea3aab0055179a405b8b99fb698c30738db4d93c6f3372da438b2c8c7ad204b56e01f1ff53a6fd1c12e118dbc7a6a6d637b4bd9392794fa529
commit 7f6b8ec3f9527a6fbc89018ce31cdcfecc474edd
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Apr 14 23:01:46 2021 -0400
Update to .NET SDK 5.0.202 and Runtime 5.0.5
Also make update-release more flexible with optional bug ids and
optional already-built tarballs.
diff --git a/.gitignore b/.gitignore
index 016368a..e9aebf0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
/dotnet-v5.0.102-SDK.tar.gz
/dotnet-v5.0.103-SDK.tar.gz
/dotnet-v5.0.104-SDK.tar.gz
+/dotnet-v5.0.202-SDK.tar.gz
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 990b208..98494bd 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -154,7 +154,7 @@ fi
# not-very-useful artifacts to reduce tarball size
rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
-rm -r src/NuGet.Client.*/test/EndToEnd
+rm -r src/nuget.client.*/test/EndToEnd
rm -r src/runtime.*/src/mono/
rm -r src/Humanizer.*/samples/
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index d960cba..28764be 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,10 +20,10 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.4
-%global runtime_version 5.0.4
+%global host_version 5.0.5
+%global runtime_version 5.0.5
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 5.0.104
+%global sdk_version 5.0.202
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
@@ -56,7 +56,7 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -68,10 +68,6 @@ Source0: dotnet-v%{src_version}-SDK.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
-# https://github.com/dotnet/runtime/pull/48203
-# Add Fedora 35 RID
-Patch100: runtime-48203-fedora-35-rid.patch
-
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
@@ -343,10 +339,6 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/core
# Disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
-pushd src/runtime.*
-%patch100 -p1
-popd
-
pushd src/sdk.*
%patch500 -p1
popd
@@ -535,6 +527,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Wed Apr 14 2021 Omair Majid <omajid(a)redhat.com> - 5.0.202-1
+- Update to .NET SDK 5.0.202 and Runtime 5.0.5
+
* Tue Apr 06 2021 Omair Majid <omajid(a)redhat.com> - 5.0.104-2
- Mark files under /etc/ as config(noreplace)
- Add an rpm-inspect configuration file
diff --git a/rename-tarball b/rename-tarball
index b6b6086..ea7e65c 100755
--- a/rename-tarball
+++ b/rename-tarball
@@ -21,12 +21,14 @@ while [[ "$#" -gt 0 ]]; do
esac
done
-original_name=${positional_args[0]:-}
-if [[ -z ${original_name} ]]; then
+if [[ -z "${positional_args[0]:-}" ]]; then
echo "error: missing original tarball name"
exit 1
fi
+original_path=$(readlink -f "${positional_args[0]:-}")
+original_name=$(basename "$original_path")
+
new_name=${positional_args[1]:-}
if [[ -z ${new_name} ]]; then
echo "error: missing new tarball name"
@@ -41,8 +43,8 @@ echo "New name: ${new_name}.tar.gz"
mkdir "temp-${new_name}"
pushd "temp-${new_name}"
-tar xf "../${original_name}.tar.gz"
-mv "${original_name}" "${new_name}"
+tar xf "${original_path}"
+mv -- * "${new_name}"
tar czf ../"${new_name}.tar.gz" "${new_name}"
rm -rf "${new_name}"
popd
diff --git a/runtime-48203-fedora-35-rid.patch b/runtime-48203-fedora-35-rid.patch
deleted file mode 100644
index cb8d6ea..0000000
--- a/runtime-48203-fedora-35-rid.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From e806448fdf844ca925c461b356b31363e844e902 Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Thu, 11 Feb 2021 20:13:18 -0500
-Subject: [PATCH 1/2] Add Fedora 35 RID
-
-Fedora rawhide now uses the fedora.35-x64 RID:
-
- $ podman run -it registry.fedoraproject.org/fedora:rawhide /bin/bash -c 'cat /etc/os-release'
- NAME=Fedora
- VERSION="35 (Container Image Prerelease)"
- ID=fedora
- VERSION_ID=35
- VERSION_CODENAME=""
- PLATFORM_ID="platform:f35"
- PRETTY_NAME="Fedora 35 (Container Image Prerelease)"
- ANSI_COLOR="0;38;2;60;110;180"
- LOGO=fedora-logo-icon
- CPE_NAME="cpe:/o:fedoraproject:fedora:35"
- HOME_URL="https://fedoraproject.org/"
- DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators..."
- SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
- BUG_REPORT_URL="https://bugzilla.redhat.com/"
- REDHAT_BUGZILLA_PRODUCT="Fedora"
- REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
- REDHAT_SUPPORT_PRODUCT="Fedora"
- REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
- PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
- VARIANT="Container Image"
- VARIANT_ID=container
----
- .../runtime.compatibility.json | 32 ++++++++++++++++++
- .../Microsoft.NETCore.Platforms/runtime.json | 17 ++++++++++
- .../runtimeGroups.props | 2 +-
- 6 files changed, 69 insertions(+), 18 deletions(-)
-
-diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-index 275929bf1fce..f56d7461e90c 100644
---- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-+++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-@@ -2376,6 +2376,38 @@
- "any",
- "base"
- ],
-+ "fedora.35": [
-+ "fedora.35",
-+ "fedora",
-+ "linux",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
-+ "fedora.35-arm64": [
-+ "fedora.35-arm64",
-+ "fedora.35",
-+ "fedora-arm64",
-+ "fedora",
-+ "linux-arm64",
-+ "linux",
-+ "unix-arm64",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
-+ "fedora.35-x64": [
-+ "fedora.35-x64",
-+ "fedora.35",
-+ "fedora-x64",
-+ "fedora",
-+ "linux-x64",
-+ "linux",
-+ "unix-x64",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
- "freebsd": [
- "freebsd",
- "unix",
-diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
-index 5a2631cccd9a..3e8b2e74e85f 100644
---- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
-+++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
-@@ -962,6 +962,23 @@
- "fedora-x64"
- ]
- },
-+ "fedora.35": {
-+ "#import": [
-+ "fedora"
-+ ]
-+ },
-+ "fedora.35-arm64": {
-+ "#import": [
-+ "fedora.35",
-+ "fedora-arm64"
-+ ]
-+ },
-+ "fedora.35-x64": {
-+ "#import": [
-+ "fedora.35",
-+ "fedora-x64"
-+ ]
-+ },
- "freebsd": {
- "#import": [
- "unix"
-diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-index 5bd4306409de..e78268c077fd 100644
---- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-+++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-@@ -60,7 +60,7 @@
- <RuntimeGroup Include="fedora">
- <Parent>linux</Parent>
- <Architectures>x64;arm64</Architectures>
-- <Versions>23;24;25;26;27;28;29;30;31;32;33;34</Versions>
-+ <Versions>23;24;25;26;27;28;29;30;31;32;33;34;35</Versions>
- <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
- </RuntimeGroup>
-
diff --git a/sdk-telemetry-optout.patch b/sdk-telemetry-optout.patch
index 9b92f33..d6e6464 100644
--- a/sdk-telemetry-optout.patch
+++ b/sdk-telemetry-optout.patch
@@ -15,4 +15,4 @@ index de1ebb9e6..6bbf479de 100644
+
DebugHelper.HandleDebugSwitch(ref args);
- new MulticoreJitActivator().TryActivateMulticoreJit();
+ // Capture the current timestamp to calculate the host overhead.
diff --git a/sources b/sources
index ebd7eb5..269959d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v5.0.104-SDK.tar.gz) = 3318750fb2437d7849f1dd8a3047fcbddab75420439dc60b6f2e50b71ad0ef8d7bbece54c7162254049eac5ed5e0835966b47adaa0255063160622bc6bdb9d68
+SHA512 (dotnet-v5.0.202-SDK.tar.gz) = ac69830aca58db95f7f48839867ebb2bb97dec2ef50c23ac7879ba217800a76c360d727a7e1db065bc4b0edd77b5fa93151d840e64c8b1564265819f8650c20e
diff --git a/update-release b/update-release
index 00996ca..70b3c87 100755
--- a/update-release
+++ b/update-release
@@ -1,24 +1,37 @@
#!/bin/bash
# Usage:
-# ./update-release sdk-version runtime-version [tarball-name]
+# ./update-release sdk-version runtime-version [--bug bug-id] [--tarball tarball-name]
set -euo pipefail
IFS=$'\n\t'
print_usage() {
echo " Usage:"
- echo " ./update-release sdk-version runtime-version [tarball-name]"
+ echo " ./update-release sdk-version runtime-version [--bug bug-id] [--tarball tarball-name]"
}
+user_provided_tarball_name=""
+
positional_args=()
+bug_ids=()
while [[ "$#" -gt 0 ]]; do
- arg="${1}"
+ arg="$1"
case "${arg}" in
+ --bug)
+ bug_ids+=("$2")
+ shift;
+ shift;
+ ;;
-h|--help)
print_usage
exit 0
;;
+ --tarball)
+ user_provided_tarball_name="$2"
+ shift;
+ shift;
+ ;;
*)
positional_args+=("$1")
shift
@@ -26,7 +39,8 @@ while [[ "$#" -gt 0 ]]; do
esac
done
-spec_file=dotnet5.0.spec
+spec_files=( ./*.spec )
+spec_file="${spec_files[0]}"
sdk_version=${positional_args[0]:-}
if [[ -z ${sdk_version} ]]; then
@@ -40,18 +54,22 @@ if [[ -z ${runtime_version} ]]; then
exit 1
fi
+host_version="$runtime_version"
+
tag=v${sdk_version}-SDK
-user_provided_tarball_name=${positional_args[2]:-}
-if [[ -n "${user_provided_tarball_name}" ]]; then
- # we know the format build-dotnet-tarball expects for the original tarball:
- # dotnet-${tag}-original.tar.gz
- ./rename-tarball "$user_provided_tarball_name" dotnet-${tag}-original.tar.gz
+if [[ -f "dotnet-${tag}-original.tar.gz" ]]; then
+ echo "dotnet-${tag}-original.tar.gz alredy exists, not rebuilding tarball"
+else
+ if [[ -n "${user_provided_tarball_name}" ]]; then
+ ./rename-tarball "$user_provided_tarball_name" "dotnet-${tag}-original.tar.gz"
+ elif [[ -f "dotnet-${sdk_version}-SDK.tar.gz" ]]; then
+ ./rename-tarball "dotnet-${sdk_version}-SDK.tar.gz" "dotnet-${tag}-original.tar.gz"
+ elif [[ -f "dotnet-${runtime_version}.tar.gz" ]]; then
+ ./rename-tarball "dotnet-${runtime_version}.tar.gz" "dotnet-${tag}-original.tar.gz"
+ fi
fi
-
-host_version="$runtime_version"
-
if [[ ! -f "dotnet-${tag}.tar.gz" ]]; then
./build-dotnet-tarball "${tag}"
fi
@@ -63,11 +81,15 @@ sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%gl
sed -i -E "s|^%global sdk_version [[:digit:]]\.[[:digit:]]\.[[:digit:]][[:digit:]][[:digit:]]|%global sdk_version ${sdk_version}|" "$spec_file"
comment="Update to .NET SDK ${sdk_version} and Runtime ${runtime_version}"
+for bug_id in "${bug_ids[@]}"; do
+ comment="$comment
+- Resolves: RHBZ#$bug_id"
+done
-rpmdev-bumpspec --comment="$comment" $spec_file
+rpmdev-bumpspec --comment="$comment" "$spec_file"
# Reset release to 1 in 'Release' tag
-sed -i -E 's|^Release: [[:digit:]]+%|Release: 1%|' $spec_file
+sed -i -E 's|^Release: [[:digit:]]+%|Release: 1%|' "$spec_file"
# Reset Release in changelog comment
# See https://stackoverflow.com/questions/18620153/find-matching-text-and-repla...
-sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-1/' $spec_file
+sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-1/' "$spec_file"
commit 6677e18b0936d55a4b505228b869e823aae1c60f
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Apr 6 11:39:49 2021 -0400
Mark files under /etc/ as config(noreplace)
- Add an rpm-inspect configuration file
- Add an rpmlintrc file
- Enable gating for release branches and ELN too
diff --git a/dotnet5.0.rpmlintrc b/dotnet5.0.rpmlintrc
new file mode 100644
index 0000000..1396c43
--- /dev/null
+++ b/dotnet5.0.rpmlintrc
@@ -0,0 +1,35 @@
+# Tarball is generated, no upstream URL
+addFilter("W:.*invalid-url Source0: dotnet-.*tar.gz")
+
+# macOS is the correct name
+addFilter("W: spelling-error %description -l en_US macOS ->.*")
+# The name of the nuget package includes NETCore
+addFilter("W: spelling-error .* NETCore -> Net Core.*")
+
+# Upstream really has no README or documentation files. They suggest using online resources.
+addFilter("W: no-documentation")
+
+# This is a script that we run; it's expected to have execute permissions
+addFilter("W: strange-permission check-debug-symbols.py")
+
+# libicu is a required dependency, but it's used via a dlopen()
+addFilter("E: explicit-lib-dependency libicu")
+
+# There's no devel package for us to place .h files
+addFilter("W: devel-file-in-non-devel-package /usr/lib64/dotnet/.*\.h")
+addFilter("W: devel-file-in-non-devel-package /usr/lib64/dotnet/.*\.a")
+
+# These paths are non-standard, so we need $ORIGIN to find these libraries
+addFilter("E: binary-or-shlib-defines-rpath /usr/lib64/dotnet/.*\['\$ORIGIN/netcoredeps'\]")
+addFilter("E: binary-or-shlib-defines-rpath /usr/lib64/dotnet/.*\['\$ORIGIN'\]")
+
+# We put dll files in /usr/lib/dotnet, but rpmlint somehow doesn't see it as a binary?
+addFilter("W: only-non-binary-in-usr-lib")
+
+# We use a number of zero-length files, including _._
+addFilter("E: zero-length /usr/lib64/dotnet/.*/_\._")
+
+# Upstream uses hidden files, even though we ask them not to, as much as possible
+addFilter("W: hidden-file-or-dir /usr/lib64/dotnet/.*/\.version")
+addFilter("W: hidden-file-or-dir /usr/lib64/dotnet/.*/\.toolsetversion")
+
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 044a298..d960cba 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -56,7 +56,7 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -475,7 +475,7 @@ install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
install install_location %{buildroot}%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
-install artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
@@ -500,8 +500,8 @@ echo "Testing build results for debug symbols..."
%license %{_libdir}/dotnet/LICENSE.txt
%license %{_libdir}/dotnet/ThirdPartyNotices.txt
%doc %{_mandir}/man1/dotnet*.1.gz
-%{_sysconfdir}/profile.d/dotnet.sh
-%{_sysconfdir}/dotnet
+%config(noreplace) %{_sysconfdir}/profile.d/dotnet.sh
+%config(noreplace) %{_sysconfdir}/dotnet
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/dotnet
@@ -535,6 +535,12 @@ echo "Testing build results for debug symbols..."
%changelog
+* Tue Apr 06 2021 Omair Majid <omajid(a)redhat.com> - 5.0.104-2
+- Mark files under /etc/ as config(noreplace)
+- Add an rpm-inspect configuration file
+- Add an rpmlintrc file
+- Enable gating for release branches and ELN too
+
* Tue Mar 16 2021 Omair Majid <omajid(a)redhat.com> - 5.0.104-1
- Update to .NET SDK 5.0.104 and Runtime 5.0.4
- Drop unneeded/upstreamed patches
commit 2eade32a3739a78fda898b0a23c5596d96c5e74d
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Apr 1 10:46:18 2021 -0400
Enable gating for stable branches and RHEL
diff --git a/gating.yaml b/gating.yaml
index 0d881de..8574546 100644
--- a/gating.yaml
+++ b/gating.yaml
@@ -5,3 +5,16 @@ decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
+--- !Policy
+product_versions:
+ - fedora-*
+decision_context: bodhi_update_push_stable
+subject_type: koji_build
+rules:
+ - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
+--- !Policy
+product_versions:
+ - rhel-*
+decision_context: osci_compose_gate
+rules:
+ - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
commit 7536c39a6b4cf414f9143b4b7cd54d388c18fa95
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Mar 22 11:56:59 2021 -0400
Add an rpminspect file for get rpminspect to pass
This requires a recent version of rpminspect, see
https://github.com/rpminspect/rpminspect/issues/335
diff --git a/rpminspect.yaml b/rpminspect.yaml
new file mode 100644
index 0000000..edc369a
--- /dev/null
+++ b/rpminspect.yaml
@@ -0,0 +1,12 @@
+---
+inspections:
+ # We ship an empty dotnet package that installs the latest SDK, but
+ # also a newer SDK when we have that
+ emptyrpm: off
+ # We patch upstream a lot, no need to reject patches
+ patches: off
+runpath:
+ # Upstream explicitly sets $ORIGIN/netcoredeps as an RPATH
+ # See https://github.com/dotnet/core/blob/main/Documentation/self-contained-lin...
+ allowed_origin_paths:
+ - /netcoredeps
commit 46ee7cc319d6aef5ba16e49ab1718a69fde95791
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Mar 17 09:27:35 2021 -0400
Add missing sources
diff --git a/.gitignore b/.gitignore
index 679a3d1..016368a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz
/dotnet-v5.0.102-SDK.tar.gz
/dotnet-v5.0.103-SDK.tar.gz
+/dotnet-v5.0.104-SDK.tar.gz
diff --git a/sources b/sources
index 77bcd05..ebd7eb5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v5.0.103-SDK.tar.gz) = 60705e65a757476dd8d45e0bd5f622cc90baa56b5337234fa8f040bd315639ae7456a30f11045159dafe2b0d16a87af3d7c0fde3d05cf3638ee9a5ce9d1b5141
+SHA512 (dotnet-v5.0.104-SDK.tar.gz) = 3318750fb2437d7849f1dd8a3047fcbddab75420439dc60b6f2e50b71ad0ef8d7bbece54c7162254049eac5ed5e0835966b47adaa0255063160622bc6bdb9d68
commit 68176abe60cd05a5e33604a056df678ebf33a9ff
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Mar 17 09:21:23 2021 -0400
Update to .NET SDK 5.0.104 and Runtime 5.0.4
Drop unneeded/upstreamed patches
diff --git a/SHAHashProvider.Browser.cs b/SHAHashProvider.Browser.cs
deleted file mode 100644
index 4515b8a..0000000
--- a/SHAHashProvider.Browser.cs
+++ /dev/null
@@ -1,1184 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.IO;
-using System.Diagnostics;
-using System.Numerics;
-using System.Security.Cryptography;
-
-namespace Internal.Cryptography
-{
- internal sealed class SHAHashProvider : HashProvider
- {
- private int hashSizeInBytes;
- private SHAManagedImplementationBase impl;
- private MemoryStream buffer;
-
- public SHAHashProvider(string hashAlgorithmId)
- {
- switch (hashAlgorithmId)
- {
- case HashAlgorithmNames.SHA1:
- impl = new SHA1ManagedImplementation();
- hashSizeInBytes = 20;
- break;
- case HashAlgorithmNames.SHA256:
- impl = new SHA256ManagedImplementation();
- hashSizeInBytes = 32;
- break;
- case HashAlgorithmNames.SHA384:
- impl = new SHA384ManagedImplementation();
- hashSizeInBytes = 48;
- break;
- case HashAlgorithmNames.SHA512:
- impl = new SHA512ManagedImplementation();
- hashSizeInBytes = 64;
- break;
- default:
- throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
- }
- }
-
- public override void AppendHashData(ReadOnlySpan<byte> data)
- {
- if (buffer == null)
- {
- buffer = new MemoryStream(1000);
- }
-
- buffer.Write(data);
- }
-
- public override int FinalizeHashAndReset(Span<byte> destination)
- {
- GetCurrentHash(destination);
- buffer = null;
-
- return hashSizeInBytes;
- }
-
- public override int GetCurrentHash(Span<byte> destination)
- {
- Debug.Assert(destination.Length >= hashSizeInBytes);
-
- impl.Initialize();
- if (buffer != null)
- {
- impl.HashCore(buffer.GetBuffer(), 0, (int)buffer.Length);
- }
- impl.HashFinal().CopyTo(destination);
-
- return hashSizeInBytes;
- }
-
- public override int HashSizeInBytes => hashSizeInBytes;
-
- public override void Dispose(bool disposing)
- {
- }
-
- private abstract class SHAManagedImplementationBase
- {
- public abstract void Initialize();
- public abstract void HashCore(byte[] partIn, int ibStart, int cbSize);
- public abstract byte[] HashFinal();
- }
-
- // Ported from src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs.
- // n.b. It's ok to use a "non-secret purposes" hashing implementation here, as this is only
- // used in wasm scenarios, and as of the current release we don't make any security guarantees
- // about our crypto primitives in wasm environments.
- private class SHA1ManagedImplementation : SHAManagedImplementationBase
- {
- private Sha1ForNonSecretPurposes _state; // mutable struct - don't make readonly
-
- public override void Initialize()
- {
- _state = default;
- _state.Start();
- }
-
- public override void HashCore(byte[] partIn, int ibStart, int cbSize)
- {
- _state.Append(partIn.AsSpan(ibStart, cbSize));
- }
-
- public override byte[] HashFinal()
- {
- byte[] output = new byte[20];
- _state.Finish(output);
- return output;
- }
-
- /// <summary>
- /// Implements the SHA1 hashing algorithm. Note that this
- /// implementation is for hashing public information. Do not
- /// use this code to hash private data, as this implementation does
- /// not take any steps to avoid information disclosure.
- /// </summary>
- private struct Sha1ForNonSecretPurposes
- {
- private long length; // Total message length in bits
- private uint[] w; // Workspace
- private int pos; // Length of current chunk in bytes
-
- /// <summary>
- /// Call Start() to initialize the hash object.
- /// </summary>
- public void Start()
- {
- this.w ??= new uint[85];
-
- this.length = 0;
- this.pos = 0;
- this.w[80] = 0x67452301;
- this.w[81] = 0xEFCDAB89;
- this.w[82] = 0x98BADCFE;
- this.w[83] = 0x10325476;
- this.w[84] = 0xC3D2E1F0;
- }
-
- /// <summary>
- /// Adds an input byte to the hash.
- /// </summary>
- /// <param name="input">Data to include in the hash.</param>
- public void Append(byte input)
- {
- this.w[this.pos / 4] = (this.w[this.pos / 4] << 8) | input;
- if (64 == ++this.pos)
- {
- this.Drain();
- }
- }
-
- /// <summary>
- /// Adds input bytes to the hash.
- /// </summary>
- /// <param name="input">
- /// Data to include in the hash. Must not be null.
- /// </param>
- public void Append(ReadOnlySpan<byte> input)
- {
- foreach (byte b in input)
- {
- this.Append(b);
- }
- }
-
- /// <summary>
- /// Retrieves the hash value.
- /// Note that after calling this function, the hash object should
- /// be considered uninitialized. Subsequent calls to Append or
- /// Finish will produce useless results. Call Start() to
- /// reinitialize.
- /// </summary>
- /// <param name="output">
- /// Buffer to receive the hash value. Must not be null.
- /// Up to 20 bytes of hash will be written to the output buffer.
- /// If the buffer is smaller than 20 bytes, the remaining hash
- /// bytes will be lost. If the buffer is larger than 20 bytes, the
- /// rest of the buffer is left unmodified.
- /// </param>
- public void Finish(byte[] output)
- {
- long l = this.length + 8 * this.pos;
- this.Append(0x80);
- while (this.pos != 56)
- {
- this.Append(0x00);
- }
-
- unchecked
- {
- this.Append((byte)(l >> 56));
- this.Append((byte)(l >> 48));
- this.Append((byte)(l >> 40));
- this.Append((byte)(l >> 32));
- this.Append((byte)(l >> 24));
- this.Append((byte)(l >> 16));
- this.Append((byte)(l >> 8));
- this.Append((byte)l);
-
- int end = output.Length < 20 ? output.Length : 20;
- for (int i = 0; i != end; i++)
- {
- uint temp = this.w[80 + i / 4];
- output[i] = (byte)(temp >> 24);
- this.w[80 + i / 4] = temp << 8;
- }
- }
- }
-
- /// <summary>
- /// Called when this.pos reaches 64.
- /// </summary>
- private void Drain()
- {
- for (int i = 16; i != 80; i++)
- {
- this.w[i] = BitOperations.RotateLeft(this.w[i - 3] ^ this.w[i - 8] ^ this.w[i - 14] ^ this.w[i - 16], 1);
- }
-
- unchecked
- {
- uint a = this.w[80];
- uint b = this.w[81];
- uint c = this.w[82];
- uint d = this.w[83];
- uint e = this.w[84];
-
- for (int i = 0; i != 20; i++)
- {
- const uint k = 0x5A827999;
- uint f = (b & c) | ((~b) & d);
- uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
- }
-
- for (int i = 20; i != 40; i++)
- {
- uint f = b ^ c ^ d;
- const uint k = 0x6ED9EBA1;
- uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
- }
-
- for (int i = 40; i != 60; i++)
- {
- uint f = (b & c) | (b & d) | (c & d);
- const uint k = 0x8F1BBCDC;
- uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
- }
-
- for (int i = 60; i != 80; i++)
- {
- uint f = b ^ c ^ d;
- const uint k = 0xCA62C1D6;
- uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
- }
-
- this.w[80] += a;
- this.w[81] += b;
- this.w[82] += c;
- this.w[83] += d;
- this.w[84] += e;
- }
-
- this.length += 512; // 64 bytes == 512 bits
- this.pos = 0;
- }
- }
- }
-
- // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
- private class SHA256ManagedImplementation : SHAManagedImplementationBase
- {
- private byte[] _buffer;
- private long _count; // Number of bytes in the hashed message
- private uint[] _stateSHA256;
- private uint[] _W;
-
- public SHA256ManagedImplementation()
- {
- _stateSHA256 = new uint[8];
- _buffer = new byte[64];
- _W = new uint[64];
-
- InitializeState();
- }
-
- public override void Initialize()
- {
- InitializeState();
-
- // Zeroize potentially sensitive information.
- Array.Clear(_buffer, 0, _buffer.Length);
- Array.Clear(_W, 0, _W.Length);
- }
-
- private void InitializeState()
- {
- _count = 0;
-
- _stateSHA256[0] = 0x6a09e667;
- _stateSHA256[1] = 0xbb67ae85;
- _stateSHA256[2] = 0x3c6ef372;
- _stateSHA256[3] = 0xa54ff53a;
- _stateSHA256[4] = 0x510e527f;
- _stateSHA256[5] = 0x9b05688c;
- _stateSHA256[6] = 0x1f83d9ab;
- _stateSHA256[7] = 0x5be0cd19;
- }
-
- /* SHA256 block update operation. Continues an SHA message-digest
- operation, processing another message block, and updating the
- context.
- */
- public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
- {
- int bufferLen;
- int partInLen = cbSize;
- int partInBase = ibStart;
-
- /* Compute length of buffer */
- bufferLen = (int)(_count & 0x3f);
-
- /* Update number of bytes */
- _count += partInLen;
-
- fixed (uint* stateSHA256 = _stateSHA256)
- {
- fixed (byte* buffer = _buffer)
- {
- fixed (uint* expandedBuffer = _W)
- {
- if ((bufferLen > 0) && (bufferLen + partInLen >= 64))
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 64 - bufferLen);
- partInBase += (64 - bufferLen);
- partInLen -= (64 - bufferLen);
- SHATransform(expandedBuffer, stateSHA256, buffer);
- bufferLen = 0;
- }
-
- /* Copy input to temporary buffer and hash */
- while (partInLen >= 64)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 64);
- partInBase += 64;
- partInLen -= 64;
- SHATransform(expandedBuffer, stateSHA256, buffer);
- }
-
- if (partInLen > 0)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
- }
- }
- }
- }
- }
-
- /* SHA256 finalization. Ends an SHA256 message-digest operation, writing
- the message digest.
- */
- public override byte[] HashFinal()
- {
- byte[] pad;
- int padLen;
- long bitCount;
- byte[] hash = new byte[32]; // HashSizeValue = 256
-
- /* Compute padding: 80 00 00 ... 00 00 <bit count>
- */
-
- padLen = 64 - (int)(_count & 0x3f);
- if (padLen <= 8)
- padLen += 64;
-
- pad = new byte[padLen];
- pad[0] = 0x80;
-
- // Convert count to bit count
- bitCount = _count * 8;
-
- pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
- pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
- pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
- pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
- pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
- pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
- pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
- pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
-
- /* Digest padding */
- HashCore(pad, 0, pad.Length);
-
- /* Store digest */
- SHAUtils.DWORDToBigEndian(hash, _stateSHA256, 8);
-
- return hash;
- }
-
- private static readonly uint[] _K = {
- 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
- 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
- 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
- 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
- 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
- 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
- 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
- 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
- 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
- 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
- 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
- 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
- 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
- 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
- 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
- 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
- };
-
- private static unsafe void SHATransform(uint* expandedBuffer, uint* state, byte* block)
- {
- uint a, b, c, d, e, f, h, g;
- uint aa, bb, cc, dd, ee, ff, hh, gg;
- uint T1;
-
- a = state[0];
- b = state[1];
- c = state[2];
- d = state[3];
- e = state[4];
- f = state[5];
- g = state[6];
- h = state[7];
-
- // fill in the first 16 bytes of W.
- SHAUtils.DWORDFromBigEndian(expandedBuffer, 16, block);
- SHA256Expand(expandedBuffer);
-
- /* Apply the SHA256 compression function */
- // We are trying to be smart here and avoid as many copies as we can
- // The perf gain with this method over the straightforward modify and shift
- // forward is >= 20%, so it's worth the pain
- for (int j = 0; j < 64;)
- {
- T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
- ee = d + T1;
- aa = T1 + Sigma_0(a) + Maj(a, b, c);
- j++;
-
- T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
- ff = c + T1;
- bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
- j++;
-
- T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
- gg = b + T1;
- cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
- j++;
-
- T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
- hh = a + T1;
- dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
- j++;
-
- T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
- h = aa + T1;
- d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
- j++;
-
- T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
- g = bb + T1;
- c = T1 + Sigma_0(d) + Maj(d, dd, cc);
- j++;
-
- T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
- f = cc + T1;
- b = T1 + Sigma_0(c) + Maj(c, d, dd);
- j++;
-
- T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
- e = dd + T1;
- a = T1 + Sigma_0(b) + Maj(b, c, d);
- j++;
- }
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
- state[4] += e;
- state[5] += f;
- state[6] += g;
- state[7] += h;
- }
-
- private static uint RotateRight(uint x, int n)
- {
- return (((x) >> (n)) | ((x) << (32 - (n))));
- }
-
- private static uint Ch(uint x, uint y, uint z)
- {
- return ((x & y) ^ ((x ^ 0xffffffff) & z));
- }
-
- private static uint Maj(uint x, uint y, uint z)
- {
- return ((x & y) ^ (x & z) ^ (y & z));
- }
-
- private static uint sigma_0(uint x)
- {
- return (RotateRight(x, 7) ^ RotateRight(x, 18) ^ (x >> 3));
- }
-
- private static uint sigma_1(uint x)
- {
- return (RotateRight(x, 17) ^ RotateRight(x, 19) ^ (x >> 10));
- }
-
- private static uint Sigma_0(uint x)
- {
- return (RotateRight(x, 2) ^ RotateRight(x, 13) ^ RotateRight(x, 22));
- }
-
- private static uint Sigma_1(uint x)
- {
- return (RotateRight(x, 6) ^ RotateRight(x, 11) ^ RotateRight(x, 25));
- }
-
- /* This function creates W_16,...,W_63 according to the formula
- W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
- */
- private static unsafe void SHA256Expand(uint* x)
- {
- for (int i = 16; i < 64; i++)
- {
- x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
- }
- }
- }
-
- // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
- private class SHA384ManagedImplementation : SHAManagedImplementationBase
- {
- private byte[] _buffer;
- private ulong _count; // Number of bytes in the hashed message
- private ulong[] _stateSHA384;
- private ulong[] _W;
-
- public SHA384ManagedImplementation()
- {
- _stateSHA384 = new ulong[8];
- _buffer = new byte[128];
- _W = new ulong[80];
-
- InitializeState();
- }
-
- public override void Initialize()
- {
- InitializeState();
-
- // Zeroize potentially sensitive information.
- Array.Clear(_buffer, 0, _buffer.Length);
- Array.Clear(_W, 0, _W.Length);
- }
-
- private void InitializeState()
- {
- _count = 0;
-
- _stateSHA384[0] = 0xcbbb9d5dc1059ed8;
- _stateSHA384[1] = 0x629a292a367cd507;
- _stateSHA384[2] = 0x9159015a3070dd17;
- _stateSHA384[3] = 0x152fecd8f70e5939;
- _stateSHA384[4] = 0x67332667ffc00b31;
- _stateSHA384[5] = 0x8eb44a8768581511;
- _stateSHA384[6] = 0xdb0c2e0d64f98fa7;
- _stateSHA384[7] = 0x47b5481dbefa4fa4;
- }
-
- /* SHA384 block update operation. Continues an SHA message-digest
- operation, processing another message block, and updating the
- context.
- */
- public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
- {
- int bufferLen;
- int partInLen = cbSize;
- int partInBase = ibStart;
-
- /* Compute length of buffer */
- bufferLen = (int)(_count & 0x7f);
-
- /* Update number of bytes */
- _count += (ulong)partInLen;
-
- fixed (ulong* stateSHA384 = _stateSHA384)
- {
- fixed (byte* buffer = _buffer)
- {
- fixed (ulong* expandedBuffer = _W)
- {
- if ((bufferLen > 0) && (bufferLen + partInLen >= 128))
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 128 - bufferLen);
- partInBase += (128 - bufferLen);
- partInLen -= (128 - bufferLen);
- SHATransform(expandedBuffer, stateSHA384, buffer);
- bufferLen = 0;
- }
-
- /* Copy input to temporary buffer and hash */
- while (partInLen >= 128)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 128);
- partInBase += 128;
- partInLen -= 128;
- SHATransform(expandedBuffer, stateSHA384, buffer);
- }
-
- if (partInLen > 0)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
- }
- }
- }
- }
- }
-
- /* SHA384 finalization. Ends an SHA384 message-digest operation, writing
- the message digest.
- */
- public override byte[] HashFinal()
- {
- byte[] pad;
- int padLen;
- ulong bitCount;
- byte[] hash = new byte[48]; // HashSizeValue = 384
-
- /* Compute padding: 80 00 00 ... 00 00 <bit count>
- */
-
- padLen = 128 - (int)(_count & 0x7f);
- if (padLen <= 16)
- padLen += 128;
-
- pad = new byte[padLen];
- pad[0] = 0x80;
-
- // Convert count to bit count
- bitCount = _count * 8;
-
- // bitCount is at most 8 * 128 = 1024. Its representation as a 128-bit number has all bits set to zero
- // except eventually the 11 lower bits
-
- //pad[padLen-16] = (byte) ((bitCount >> 120) & 0xff);
- //pad[padLen-15] = (byte) ((bitCount >> 112) & 0xff);
- //pad[padLen-14] = (byte) ((bitCount >> 104) & 0xff);
- //pad[padLen-13] = (byte) ((bitCount >> 96) & 0xff);
- //pad[padLen-12] = (byte) ((bitCount >> 88) & 0xff);
- //pad[padLen-11] = (byte) ((bitCount >> 80) & 0xff);
- //pad[padLen-10] = (byte) ((bitCount >> 72) & 0xff);
- //pad[padLen-9] = (byte) ((bitCount >> 64) & 0xff);
- pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
- pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
- pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
- pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
- pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
- pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
- pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
- pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
-
- /* Digest padding */
- HashCore(pad, 0, pad.Length);
-
- /* Store digest */
- SHAUtils.QuadWordToBigEndian(hash, _stateSHA384, 6);
-
- return hash;
- }
-
- private static readonly ulong[] _K = {
- 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc,
- 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,
- 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2,
- 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694,
- 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
- 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5,
- 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,
- 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70,
- 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df,
- 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,
- 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30,
- 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,
- 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8,
- 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3,
- 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,
- 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b,
- 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,
- 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b,
- 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c,
- 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817,
- };
-
- private static unsafe void SHATransform(ulong* expandedBuffer, ulong* state, byte* block)
- {
- ulong a, b, c, d, e, f, g, h;
- ulong aa, bb, cc, dd, ee, ff, hh, gg;
- ulong T1;
-
- a = state[0];
- b = state[1];
- c = state[2];
- d = state[3];
- e = state[4];
- f = state[5];
- g = state[6];
- h = state[7];
-
- // fill in the first 16 blocks of W.
- SHAUtils.QuadWordFromBigEndian(expandedBuffer, 16, block);
- SHA384Expand(expandedBuffer);
-
- /* Apply the SHA384 compression function */
- // We are trying to be smart here and avoid as many copies as we can
- // The perf gain with this method over the straightforward modify and shift
- // forward is >= 20%, so it's worth the pain
- for (int j = 0; j < 80;)
- {
- T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
- ee = d + T1;
- aa = T1 + Sigma_0(a) + Maj(a, b, c);
- j++;
-
- T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
- ff = c + T1;
- bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
- j++;
-
- T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
- gg = b + T1;
- cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
- j++;
-
- T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
- hh = a + T1;
- dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
- j++;
-
- T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
- h = aa + T1;
- d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
- j++;
-
- T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
- g = bb + T1;
- c = T1 + Sigma_0(d) + Maj(d, dd, cc);
- j++;
-
- T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
- f = cc + T1;
- b = T1 + Sigma_0(c) + Maj(c, d, dd);
- j++;
-
- T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
- e = dd + T1;
- a = T1 + Sigma_0(b) + Maj(b, c, d);
- j++;
- }
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
- state[4] += e;
- state[5] += f;
- state[6] += g;
- state[7] += h;
- }
-
- private static ulong RotateRight(ulong x, int n)
- {
- return (((x) >> (n)) | ((x) << (64 - (n))));
- }
-
- private static ulong Ch(ulong x, ulong y, ulong z)
- {
- return ((x & y) ^ ((x ^ 0xffffffffffffffff) & z));
- }
-
- private static ulong Maj(ulong x, ulong y, ulong z)
- {
- return ((x & y) ^ (x & z) ^ (y & z));
- }
-
- private static ulong Sigma_0(ulong x)
- {
- return (RotateRight(x, 28) ^ RotateRight(x, 34) ^ RotateRight(x, 39));
- }
-
- private static ulong Sigma_1(ulong x)
- {
- return (RotateRight(x, 14) ^ RotateRight(x, 18) ^ RotateRight(x, 41));
- }
-
- private static ulong sigma_0(ulong x)
- {
- return (RotateRight(x, 1) ^ RotateRight(x, 8) ^ (x >> 7));
- }
-
- private static ulong sigma_1(ulong x)
- {
- return (RotateRight(x, 19) ^ RotateRight(x, 61) ^ (x >> 6));
- }
-
- /* This function creates W_16,...,W_79 according to the formula
- W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
- */
- private static unsafe void SHA384Expand(ulong* x)
- {
- for (int i = 16; i < 80; i++)
- {
- x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
- }
- }
- }
-
- // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
- private class SHA512ManagedImplementation : SHAManagedImplementationBase
- {
- private byte[] _buffer;
- private ulong _count; // Number of bytes in the hashed message
- private ulong[] _stateSHA512;
- private ulong[] _W;
-
- public SHA512ManagedImplementation()
- {
- _stateSHA512 = new ulong[8];
- _buffer = new byte[128];
- _W = new ulong[80];
-
- InitializeState();
- }
-
- public override void Initialize()
- {
- InitializeState();
-
- // Zeroize potentially sensitive information.
- Array.Clear(_buffer, 0, _buffer.Length);
- Array.Clear(_W, 0, _W.Length);
- }
-
- private void InitializeState()
- {
- _count = 0;
-
- _stateSHA512[0] = 0x6a09e667f3bcc908;
- _stateSHA512[1] = 0xbb67ae8584caa73b;
- _stateSHA512[2] = 0x3c6ef372fe94f82b;
- _stateSHA512[3] = 0xa54ff53a5f1d36f1;
- _stateSHA512[4] = 0x510e527fade682d1;
- _stateSHA512[5] = 0x9b05688c2b3e6c1f;
- _stateSHA512[6] = 0x1f83d9abfb41bd6b;
- _stateSHA512[7] = 0x5be0cd19137e2179;
- }
-
- /* SHA512 block update operation. Continues an SHA message-digest
- operation, processing another message block, and updating the
- context.
- */
- public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
- {
- int bufferLen;
- int partInLen = cbSize;
- int partInBase = ibStart;
-
- /* Compute length of buffer */
- bufferLen = (int)(_count & 0x7f);
-
- /* Update number of bytes */
- _count += (ulong)partInLen;
-
- fixed (ulong* stateSHA512 = _stateSHA512)
- {
- fixed (byte* buffer = _buffer)
- {
- fixed (ulong* expandedBuffer = _W)
- {
- if ((bufferLen > 0) && (bufferLen + partInLen >= 128))
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 128 - bufferLen);
- partInBase += (128 - bufferLen);
- partInLen -= (128 - bufferLen);
- SHATransform(expandedBuffer, stateSHA512, buffer);
- bufferLen = 0;
- }
-
- /* Copy input to temporary buffer and hash */
- while (partInLen >= 128)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 128);
- partInBase += 128;
- partInLen -= 128;
- SHATransform(expandedBuffer, stateSHA512, buffer);
- }
-
- if (partInLen > 0)
- {
- Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
- }
- }
- }
- }
- }
-
- /* SHA512 finalization. Ends an SHA512 message-digest operation, writing
- the message digest.
- */
- public override byte[] HashFinal()
- {
- byte[] pad;
- int padLen;
- ulong bitCount;
- byte[] hash = new byte[64]; // HashSizeValue = 512
-
- /* Compute padding: 80 00 00 ... 00 00 <bit count>
- */
-
- padLen = 128 - (int)(_count & 0x7f);
- if (padLen <= 16)
- padLen += 128;
-
- pad = new byte[padLen];
- pad[0] = 0x80;
-
- // Convert count to bit count
- bitCount = _count * 8;
-
- // If we ever have UInt128 for bitCount, then these need to be uncommented.
- // Note that C# only looks at the low 6 bits of the shift value for ulongs,
- // so >>0 and >>64 are equal!
-
- //pad[padLen-16] = (byte) ((bitCount >> 120) & 0xff);
- //pad[padLen-15] = (byte) ((bitCount >> 112) & 0xff);
- //pad[padLen-14] = (byte) ((bitCount >> 104) & 0xff);
- //pad[padLen-13] = (byte) ((bitCount >> 96) & 0xff);
- //pad[padLen-12] = (byte) ((bitCount >> 88) & 0xff);
- //pad[padLen-11] = (byte) ((bitCount >> 80) & 0xff);
- //pad[padLen-10] = (byte) ((bitCount >> 72) & 0xff);
- //pad[padLen-9] = (byte) ((bitCount >> 64) & 0xff);
- pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
- pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
- pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
- pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
- pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
- pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
- pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
- pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
-
- /* Digest padding */
- HashCore(pad, 0, pad.Length);
-
- /* Store digest */
- SHAUtils.QuadWordToBigEndian(hash, _stateSHA512, 8);
-
- return hash;
- }
-
- private static readonly ulong[] _K = {
- 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc,
- 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,
- 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2,
- 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694,
- 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
- 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5,
- 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,
- 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70,
- 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df,
- 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,
- 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30,
- 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,
- 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8,
- 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3,
- 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,
- 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b,
- 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,
- 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b,
- 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c,
- 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817,
- };
-
- private static unsafe void SHATransform(ulong* expandedBuffer, ulong* state, byte* block)
- {
- ulong a, b, c, d, e, f, g, h;
- ulong aa, bb, cc, dd, ee, ff, hh, gg;
- ulong T1;
-
- a = state[0];
- b = state[1];
- c = state[2];
- d = state[3];
- e = state[4];
- f = state[5];
- g = state[6];
- h = state[7];
-
- // fill in the first 16 blocks of W.
- SHAUtils.QuadWordFromBigEndian(expandedBuffer, 16, block);
- SHA512Expand(expandedBuffer);
-
- /* Apply the SHA512 compression function */
- // We are trying to be smart here and avoid as many copies as we can
- // The perf gain with this method over the straightforward modify and shift
- // forward is >= 20%, so it's worth the pain
- for (int j = 0; j < 80;)
- {
- T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
- ee = d + T1;
- aa = T1 + Sigma_0(a) + Maj(a, b, c);
- j++;
-
- T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
- ff = c + T1;
- bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
- j++;
-
- T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
- gg = b + T1;
- cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
- j++;
-
- T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
- hh = a + T1;
- dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
- j++;
-
- T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
- h = aa + T1;
- d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
- j++;
-
- T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
- g = bb + T1;
- c = T1 + Sigma_0(d) + Maj(d, dd, cc);
- j++;
-
- T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
- f = cc + T1;
- b = T1 + Sigma_0(c) + Maj(c, d, dd);
- j++;
-
- T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
- e = dd + T1;
- a = T1 + Sigma_0(b) + Maj(b, c, d);
- j++;
- }
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
- state[4] += e;
- state[5] += f;
- state[6] += g;
- state[7] += h;
- }
-
- private static ulong RotateRight(ulong x, int n)
- {
- return (((x) >> (n)) | ((x) << (64 - (n))));
- }
-
- private static ulong Ch(ulong x, ulong y, ulong z)
- {
- return ((x & y) ^ ((x ^ 0xffffffffffffffff) & z));
- }
-
- private static ulong Maj(ulong x, ulong y, ulong z)
- {
- return ((x & y) ^ (x & z) ^ (y & z));
- }
-
- private static ulong Sigma_0(ulong x)
- {
- return (RotateRight(x, 28) ^ RotateRight(x, 34) ^ RotateRight(x, 39));
- }
-
- private static ulong Sigma_1(ulong x)
- {
- return (RotateRight(x, 14) ^ RotateRight(x, 18) ^ RotateRight(x, 41));
- }
-
- private static ulong sigma_0(ulong x)
- {
- return (RotateRight(x, 1) ^ RotateRight(x, 8) ^ (x >> 7));
- }
-
- private static ulong sigma_1(ulong x)
- {
- return (RotateRight(x, 19) ^ RotateRight(x, 61) ^ (x >> 6));
- }
-
- /* This function creates W_16,...,W_79 according to the formula
- W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
- */
- private static unsafe void SHA512Expand(ulong* x)
- {
- for (int i = 16; i < 80; i++)
- {
- x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
- }
- }
- }
-
- // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
- private class SHAUtils
- {
- // digits == number of DWORDs
- public static unsafe void DWORDFromBigEndian(uint* x, int digits, byte* block)
- {
- int i;
- int j;
-
- for (i = 0, j = 0; i < digits; i++, j += 4)
- x[i] = (uint)((block[j] << 24) | (block[j + 1] << 16) | (block[j + 2] << 8) | block[j + 3]);
- }
-
- // encodes x (DWORD) into block (unsigned char), most significant byte first.
- // digits == number of DWORDs
- public static void DWORDToBigEndian(byte[] block, uint[] x, int digits)
- {
- int i;
- int j;
-
- for (i = 0, j = 0; i < digits; i++, j += 4)
- {
- block[j] = (byte)((x[i] >> 24) & 0xff);
- block[j + 1] = (byte)((x[i] >> 16) & 0xff);
- block[j + 2] = (byte)((x[i] >> 8) & 0xff);
- block[j + 3] = (byte)(x[i] & 0xff);
- }
- }
-
- // digits == number of QWORDs
- public static unsafe void QuadWordFromBigEndian(ulong* x, int digits, byte* block)
- {
- int i;
- int j;
-
- for (i = 0, j = 0; i < digits; i++, j += 8)
- x[i] = (
- (((ulong)block[j]) << 56) | (((ulong)block[j + 1]) << 48) |
- (((ulong)block[j + 2]) << 40) | (((ulong)block[j + 3]) << 32) |
- (((ulong)block[j + 4]) << 24) | (((ulong)block[j + 5]) << 16) |
- (((ulong)block[j + 6]) << 8) | ((ulong)block[j + 7])
- );
- }
-
- // encodes x (DWORD) into block (unsigned char), most significant byte first.
- // digits = number of QWORDS
- public static void QuadWordToBigEndian(byte[] block, ulong[] x, int digits)
- {
- int i;
- int j;
-
- for (i = 0, j = 0; i < digits; i++, j += 8)
- {
- block[j] = (byte)((x[i] >> 56) & 0xff);
- block[j + 1] = (byte)((x[i] >> 48) & 0xff);
- block[j + 2] = (byte)((x[i] >> 40) & 0xff);
- block[j + 3] = (byte)((x[i] >> 32) & 0xff);
- block[j + 4] = (byte)((x[i] >> 24) & 0xff);
- block[j + 5] = (byte)((x[i] >> 16) & 0xff);
- block[j + 6] = (byte)((x[i] >> 8) & 0xff);
- block[j + 7] = (byte)(x[i] & 0xff);
- }
- }
- }
- }
-}
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 6135973..990b208 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -158,18 +158,6 @@ rm -r src/NuGet.Client.*/test/EndToEnd
rm -r src/runtime.*/src/mono/
rm -r src/Humanizer.*/samples/
-# FIXME delete when upstream has a new release with this file fixed
-if ! grep "RSA Data Security" src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/SHAHashProvider.Browser.cs; then
- echo "SHAHashProvider.Browser.cs has been fixed upstream. Please fix build-dotnet-tarball"
- exit 1
-fi
-# Delete the bad source
-rm src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/SHAHashProvider.Browser.cs
-# Delete the patch that modifies the bad source
-rm patches/runtime/0001-Use-substitute-SHA-1-implementation-in-wasm-44982.patch
-# Add pre-patched copy
-cp ../SHAHashProvider.Browser.cs src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/
-
popd
tar czf "${tarball_name}.tar.gz" "${tarball_name}"
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 5cf9541..044a298 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,10 +20,10 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.3
-%global runtime_version 5.0.3
+%global host_version 5.0.4
+%global runtime_version 5.0.4
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 5.0.103
+%global sdk_version 5.0.104
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
@@ -56,7 +56,7 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -68,21 +68,9 @@ Source0: dotnet-v%{src_version}-SDK.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
-# Fix up a patch included in source-build to apply after we apply the linker-order patch first
-Patch1: source-build-runtime-fixup-linker-order.patch
-
-# FIXME: upstream Fedora 35 RIDs; needed to unblock Fedora 35 for now
-Patch2: source-build-rids.patch
-
-# https://github.com/dotnet/runtime/pull/42094
-# Fix linker order when linking with --as-needed
-Patch100: runtime-linker-order.patch
-# https://github.com/dotnet/runtime/pull/47020
-# Fix build with gcc 11
-Patch101: runtime-47020-gcc11.patch
# https://github.com/dotnet/runtime/pull/48203
# Add Fedora 35 RID
-Patch102: runtime-48203-fedora-35-rid.patch
+Patch100: runtime-48203-fedora-35-rid.patch
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
@@ -355,13 +343,8 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/core
# Disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
-%patch1 -p1
-%patch2 -p1
-
pushd src/runtime.*
%patch100 -p1
-%patch101 -p1
-%patch102 -p1
popd
pushd src/sdk.*
@@ -552,6 +535,10 @@ echo "Testing build results for debug symbols..."
%changelog
+* Tue Mar 16 2021 Omair Majid <omajid(a)redhat.com> - 5.0.104-1
+- Update to .NET SDK 5.0.104 and Runtime 5.0.4
+- Drop unneeded/upstreamed patches
+
* Wed Feb 17 2021 Omair Majid <omajid(a)redhat.com> - 5.0.103-2
- Add Fedora 35 RIDs
diff --git a/runtime-47020-gcc11.patch b/runtime-47020-gcc11.patch
deleted file mode 100644
index 3751fcf..0000000
--- a/runtime-47020-gcc11.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 7123b8344ddc1c883483f13d34abbd22d4170452 Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Tue, 5 Jan 2021 18:50:18 -0500
-Subject: [PATCH] Fix build errors using GCC 11 (#46334)
-
-Building runtime with GCC 11 leads to some new errors. The errors are
-consistent with the "Header dependency changes" section documented at
-https://gcc.gnu.org/gcc-11/porting_to.html
-
-The first set of errors looks like this:
-
- runtime/src/coreclr/pal/src/misc/cgroup.cpp:403:29:
- error: no member named 'numeric_limits' in namespace 'std'
- if (temp > std::numeric_limits<size_t>::max())
- ~~~~~^
-
-Fix that by including <limits>.
-
-The second set of errors looks like this:
-
- runtime/src/installer/corehost/cli/test/nativehost/host_context_test.cpp:634:31:
- error: no member named 'sleep_for' in namespace 'std::this_thread'
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
- ~~~~~~~~~~~~~~~~~~^
-
-Fix that by including <thread>.
----
- src/coreclr/src/pal/src/misc/cgroup.cpp | 1 +
- src/installer/corehost/cli/test/nativehost/host_context_test.cpp | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/src/coreclr/src/pal/src/misc/cgroup.cpp b/src/coreclr/src/pal/src/misc/cgroup.cpp
-index f3e20012c539..24617359a21b 100644
---- a/src/coreclr/src/pal/src/misc/cgroup.cpp
-+++ b/src/coreclr/src/pal/src/misc/cgroup.cpp
-@@ -14,6 +14,7 @@ Module Name:
- #include "pal/dbgmsg.h"
- SET_DEFAULT_DEBUG_CHANNEL(MISC);
- #include "pal/palinternal.h"
-+#include <limits>
- #include <limits.h>
- #include <sys/resource.h>
- #include "pal/virtual.h"
-diff --git a/src/installer/corehost/cli/test/nativehost/host_context_test.cpp b/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
-index cea98db6673a..371ec2d7e2aa 100644
---- a/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
-+++ b/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
-@@ -11,6 +11,7 @@
- #include <corehost_context_contract.h>
- #include "hostfxr_exports.h"
- #include "host_context_test.h"
-+#include <thread>
- #include <utils.h>
-
- namespace
diff --git a/runtime-linker-order.patch b/runtime-linker-order.patch
deleted file mode 100644
index 6ca413f..0000000
--- a/runtime-linker-order.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/src/installer/corehost/cli/apphost/static/CMakeLists.txt b/src/installer/corehost/cli/apphost/static/CMakeLists.txt
-index 85ea6ffe642..e6369f6b9ad 100644
---- a/src/installer/corehost/cli/apphost/static/CMakeLists.txt
-+++ b/src/installer/corehost/cli/apphost/static/CMakeLists.txt
-@@ -204,11 +204,12 @@ target_link_libraries(singlefilehost
- libhostcommon
- ${CORECLR_LIBRARIES}
-
-+ ${START_WHOLE_ARCHIVE}
-+ ${NATIVE_LIBS}
-+ ${END_WHOLE_ARCHIVE}
-+
- ${ZLIB_LIBRARIES}
- ${LIBGSS}
- ${NATIVE_LIBS_EXTRA}
-
-- ${START_WHOLE_ARCHIVE}
-- ${NATIVE_LIBS}
-- ${END_WHOLE_ARCHIVE}
- )
diff --git a/source-build-rids.patch b/source-build-rids.patch
deleted file mode 100644
index d81bcc2..0000000
--- a/source-build-rids.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-index 363fdeee..0a39a0d0 100644
---- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-+++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-@@ -46,6 +46,8 @@ namespace Microsoft.DotNet.Build.Tasks
- ".fedora.32", "-fedora.32",
- ".fedora.33", "-fedora.33",
- ".fedora.34", "-fedora.34",
-+ ".fedora.35", "-fedora.35",
-+ ".fedora.36", "-fedora.36",
- "-linux", ".linux",
- "-osx", ".osx",
- "-OSX", ".OSX",
diff --git a/source-build-runtime-fixup-linker-order.patch b/source-build-runtime-fixup-linker-order.patch
deleted file mode 100644
index 5a74b5d..0000000
--- a/source-build-runtime-fixup-linker-order.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/patches/runtime/0014-Fix-singlefilehost-build-in-non-portable-mode-42415.patch
-+++ b/patches/runtime/0014-Fix-singlefilehost-build-in-non-portable-mode-42415.patch
-@@ -45,8 +45,8 @@
- # These options are used to force every object to be included even if it's unused.
- set(START_WHOLE_ARCHIVE -Wl,--whole-archive)
- @@ -212,3 +217,10 @@ target_link_libraries(singlefilehost
-- ${NATIVE_LIBS}
-- ${END_WHOLE_ARCHIVE}
-+ ${NATIVE_LIBS_EXTRA}
-+
- )
- +
- +if(NOT FEATURE_DISTRO_AGNOSTIC_SSL)
diff --git a/update-release b/update-release
index 8c6edfe..00996ca 100755
--- a/update-release
+++ b/update-release
@@ -1,14 +1,14 @@
#!/bin/bash
# Usage:
-# ./update-release sdk-version runtime-version
+# ./update-release sdk-version runtime-version [tarball-name]
set -euo pipefail
IFS=$'\n\t'
print_usage() {
echo " Usage:"
- echo " ./update-release sdk-version runtime-version"
+ echo " ./update-release sdk-version runtime-version [tarball-name]"
}
positional_args=()
@@ -40,10 +40,20 @@ if [[ -z ${runtime_version} ]]; then
exit 1
fi
+tag=v${sdk_version}-SDK
+
+user_provided_tarball_name=${positional_args[2]:-}
+if [[ -n "${user_provided_tarball_name}" ]]; then
+ # we know the format build-dotnet-tarball expects for the original tarball:
+ # dotnet-${tag}-original.tar.gz
+ ./rename-tarball "$user_provided_tarball_name" dotnet-${tag}-original.tar.gz
+fi
+
+
host_version="$runtime_version"
-if [[ ! -f "dotnet-v${sdk_version}-SDK.tar.gz" ]]; then
- ./build-dotnet-tarball "v${sdk_version}-SDK"
+if [[ ! -f "dotnet-${tag}.tar.gz" ]]; then
+ ./build-dotnet-tarball "${tag}"
fi
set -x
commit a36231563c01b8257a7a703e8505519b8773e895
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Feb 17 13:34:03 2021 -0500
Add Fedora 35 RIDs
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 6b1dc9d..5cf9541 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -56,7 +56,7 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -71,12 +71,18 @@ Source11: dotnet.sh.in
# Fix up a patch included in source-build to apply after we apply the linker-order patch first
Patch1: source-build-runtime-fixup-linker-order.patch
+# FIXME: upstream Fedora 35 RIDs; needed to unblock Fedora 35 for now
+Patch2: source-build-rids.patch
+
# https://github.com/dotnet/runtime/pull/42094
# Fix linker order when linking with --as-needed
Patch100: runtime-linker-order.patch
# https://github.com/dotnet/runtime/pull/47020
# Fix build with gcc 11
Patch101: runtime-47020-gcc11.patch
+# https://github.com/dotnet/runtime/pull/48203
+# Add Fedora 35 RID
+Patch102: runtime-48203-fedora-35-rid.patch
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
@@ -350,10 +356,12 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/core
sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
%patch1 -p1
+%patch2 -p1
pushd src/runtime.*
%patch100 -p1
%patch101 -p1
+%patch102 -p1
popd
pushd src/sdk.*
@@ -544,6 +552,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Wed Feb 17 2021 Omair Majid <omajid(a)redhat.com> - 5.0.103-2
+- Add Fedora 35 RIDs
+
* Thu Feb 11 2021 Omair Majid <omajid(a)redhat.com> - 5.0.103-1
- Update to .NET SDK 5.0.103 and Runtime 5.0.3
diff --git a/runtime-48203-fedora-35-rid.patch b/runtime-48203-fedora-35-rid.patch
new file mode 100644
index 0000000..cb8d6ea
--- /dev/null
+++ b/runtime-48203-fedora-35-rid.patch
@@ -0,0 +1,119 @@
+From e806448fdf844ca925c461b356b31363e844e902 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Thu, 11 Feb 2021 20:13:18 -0500
+Subject: [PATCH 1/2] Add Fedora 35 RID
+
+Fedora rawhide now uses the fedora.35-x64 RID:
+
+ $ podman run -it registry.fedoraproject.org/fedora:rawhide /bin/bash -c 'cat /etc/os-release'
+ NAME=Fedora
+ VERSION="35 (Container Image Prerelease)"
+ ID=fedora
+ VERSION_ID=35
+ VERSION_CODENAME=""
+ PLATFORM_ID="platform:f35"
+ PRETTY_NAME="Fedora 35 (Container Image Prerelease)"
+ ANSI_COLOR="0;38;2;60;110;180"
+ LOGO=fedora-logo-icon
+ CPE_NAME="cpe:/o:fedoraproject:fedora:35"
+ HOME_URL="https://fedoraproject.org/"
+ DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators..."
+ SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
+ BUG_REPORT_URL="https://bugzilla.redhat.com/"
+ REDHAT_BUGZILLA_PRODUCT="Fedora"
+ REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
+ REDHAT_SUPPORT_PRODUCT="Fedora"
+ REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
+ PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
+ VARIANT="Container Image"
+ VARIANT_ID=container
+---
+ .../runtime.compatibility.json | 32 ++++++++++++++++++
+ .../Microsoft.NETCore.Platforms/runtime.json | 17 ++++++++++
+ .../runtimeGroups.props | 2 +-
+ 6 files changed, 69 insertions(+), 18 deletions(-)
+
+diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+index 275929bf1fce..f56d7461e90c 100644
+--- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
++++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+@@ -2376,6 +2376,38 @@
+ "any",
+ "base"
+ ],
++ "fedora.35": [
++ "fedora.35",
++ "fedora",
++ "linux",
++ "unix",
++ "any",
++ "base"
++ ],
++ "fedora.35-arm64": [
++ "fedora.35-arm64",
++ "fedora.35",
++ "fedora-arm64",
++ "fedora",
++ "linux-arm64",
++ "linux",
++ "unix-arm64",
++ "unix",
++ "any",
++ "base"
++ ],
++ "fedora.35-x64": [
++ "fedora.35-x64",
++ "fedora.35",
++ "fedora-x64",
++ "fedora",
++ "linux-x64",
++ "linux",
++ "unix-x64",
++ "unix",
++ "any",
++ "base"
++ ],
+ "freebsd": [
+ "freebsd",
+ "unix",
+diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
+index 5a2631cccd9a..3e8b2e74e85f 100644
+--- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
++++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
+@@ -962,6 +962,23 @@
+ "fedora-x64"
+ ]
+ },
++ "fedora.35": {
++ "#import": [
++ "fedora"
++ ]
++ },
++ "fedora.35-arm64": {
++ "#import": [
++ "fedora.35",
++ "fedora-arm64"
++ ]
++ },
++ "fedora.35-x64": {
++ "#import": [
++ "fedora.35",
++ "fedora-x64"
++ ]
++ },
+ "freebsd": {
+ "#import": [
+ "unix"
+diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+index 5bd4306409de..e78268c077fd 100644
+--- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
++++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+@@ -60,7 +60,7 @@
+ <RuntimeGroup Include="fedora">
+ <Parent>linux</Parent>
+ <Architectures>x64;arm64</Architectures>
+- <Versions>23;24;25;26;27;28;29;30;31;32;33;34</Versions>
++ <Versions>23;24;25;26;27;28;29;30;31;32;33;34;35</Versions>
+ <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
+ </RuntimeGroup>
+
diff --git a/source-build-rids.patch b/source-build-rids.patch
new file mode 100644
index 0000000..d81bcc2
--- /dev/null
+++ b/source-build-rids.patch
@@ -0,0 +1,13 @@
+diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
+index 363fdeee..0a39a0d0 100644
+--- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
++++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
+@@ -46,6 +46,8 @@ namespace Microsoft.DotNet.Build.Tasks
+ ".fedora.32", "-fedora.32",
+ ".fedora.33", "-fedora.33",
+ ".fedora.34", "-fedora.34",
++ ".fedora.35", "-fedora.35",
++ ".fedora.36", "-fedora.36",
+ "-linux", ".linux",
+ "-osx", ".osx",
+ "-OSX", ".OSX",
commit 387708279ca7a98aefe9bee6b782f12d319d46d9
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Feb 11 17:25:22 2021 -0500
Update to .NET SDK 5.0.103 and Runtime 5.0.3
diff --git a/.gitignore b/.gitignore
index 69c1b65..679a3d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
/dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz
/dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz
/dotnet-v5.0.102-SDK.tar.gz
+/dotnet-v5.0.103-SDK.tar.gz
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 1e0613d..6b1dc9d 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,10 +20,10 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.2
-%global runtime_version 5.0.2
-%global aspnetcore_runtime_version 5.0.2
-%global sdk_version 5.0.102
+%global host_version 5.0.3
+%global runtime_version 5.0.3
+%global aspnetcore_runtime_version %{runtime_version}
+%global sdk_version 5.0.103
%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
@@ -56,7 +56,7 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -544,6 +544,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Thu Feb 11 2021 Omair Majid <omajid(a)redhat.com> - 5.0.103-1
+- Update to .NET SDK 5.0.103 and Runtime 5.0.3
+
* Fri Jan 29 2021 Omair Majid <omajid(a)redhat.com> - 5.0.102-2
- Disable bootstrap
diff --git a/sources b/sources
index a52be32..77bcd05 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v5.0.102-SDK.tar.gz) = 86208c0cfa4dc574e77265bac794387d3315d7097ec4e035a99333386e6254478bb4a3e6b866f36391de8dd98cba9d4b0aee19e0b54ca097cd02309786d22188
+SHA512 (dotnet-v5.0.103-SDK.tar.gz) = 60705e65a757476dd8d45e0bd5f622cc90baa56b5337234fa8f040bd315639ae7456a30f11045159dafe2b0d16a87af3d7c0fde3d05cf3638ee9a5ce9d1b5141
diff --git a/update-release b/update-release
index da87262..8c6edfe 100755
--- a/update-release
+++ b/update-release
@@ -52,7 +52,7 @@ sed -i -E "s|^%global host_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%globa
sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%global runtime_version ${runtime_version}|" "$spec_file"
sed -i -E "s|^%global sdk_version [[:digit:]]\.[[:digit:]]\.[[:digit:]][[:digit:]][[:digit:]]|%global sdk_version ${sdk_version}|" "$spec_file"
-comment="Update to .NET Core Runtime ${runtime_version} and SDK ${sdk_version}"
+comment="Update to .NET SDK ${sdk_version} and Runtime ${runtime_version}"
rpmdev-bumpspec --comment="$comment" $spec_file
commit 2e4240bf831b134d40326b808eee0b02eb7a4d11
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jan 29 17:55:10 2021 -0500
Disable bootstrap
diff --git a/.gitignore b/.gitignore
index d032b4e..69c1b65 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/dotnet-v3.1.103.2-SDK.tar.gz
/dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz
/dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz
+/dotnet-v5.0.102-SDK.tar.gz
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 6d2e962..1e0613d 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -1,4 +1,4 @@
-%bcond_without bootstrap
+%bcond_with bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -56,15 +56,14 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-SDK-x64-bootstrap.tar.gz
-Source1: dotnet-v%{src_version}-SDK-arm64-bootstrap.tar.gz
+Source0: dotnet-v%{src_version}-SDK.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
@@ -545,6 +544,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Fri Jan 29 2021 Omair Majid <omajid(a)redhat.com> - 5.0.102-2
+- Disable bootstrap
+
* Fri Dec 18 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-2
- Update to .NET Core Runtime 5.0.0 and SDK 5.0.100 commit 9c4e5de
diff --git a/sources b/sources
index 6d15575..a52be32 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-SHA512 (dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz) = 00369e72c7bf2391510c15804c4ad384862e93b92b941508b5ae33203ac8865bf792a8c961d776ef6622e542a4a8e76fd5822a3ddb5bd1d178497f3800acbe4b
-SHA512 (dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz) = cd01134cc33478bc3615c8c6ffc4d5ddd7a626908b3909d919dd081204f646be48101649db6be2197d98840004839e1fb7caa7a383cfb9b363506e7898f3a0c0
+SHA512 (dotnet-v5.0.102-SDK.tar.gz) = 86208c0cfa4dc574e77265bac794387d3315d7097ec4e035a99333386e6254478bb4a3e6b866f36391de8dd98cba9d4b0aee19e0b54ca097cd02309786d22188
commit d67974b77e2f927b6121d7591e9e51415ede43cc
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jan 29 14:28:00 2021 -0500
Add sources
diff --git a/.gitignore b/.gitignore
index 6fa687b..d032b4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
/dotnet-v3.1.101-SDK.tar.gz
/dotnet-v3.1.102-SDK.tar.gz
/dotnet-v3.1.103.2-SDK.tar.gz
+/dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz
+/dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz
diff --git a/sources b/sources
new file mode 100644
index 0000000..6d15575
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+SHA512 (dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz) = 00369e72c7bf2391510c15804c4ad384862e93b92b941508b5ae33203ac8865bf792a8c961d776ef6622e542a4a8e76fd5822a3ddb5bd1d178497f3800acbe4b
+SHA512 (dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz) = cd01134cc33478bc3615c8c6ffc4d5ddd7a626908b3909d919dd081204f646be48101649db6be2197d98840004839e1fb7caa7a383cfb9b363506e7898f3a0c0
commit 029284a8ad9a0186d7ab202b44afd4c5f1f77ba0
Merge: 7ec31ab a8e6394
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jan 29 12:51:16 2021 -0500
Merge branch 'pagure-master'
Merge the contents from dotnet-sig repo in pagure.
diff --cc README.md
index 9a67806,3990ea2..df95803
--- a/README.md
+++ b/README.md
@@@ -1,3 -1,133 +1,133 @@@
-# Overview
+# dotnet5.0
- The dotnet5.0 package
+ This is the .NET 5.0 package for Fedora.
+
+ This package is maintained by the Fedora DotNet SIG (Special Interest
+ Group). You can find out more about the DotNet SIG at:
+
+ - https://fedoraproject.org/wiki/SIGs/DotNet
+ - https://fedoraproject.org/wiki/DotNet
+ - https://lists.fedoraproject.org/archives/list/dotnet-sig@lists.fedoraproj...
+
+ Please report any issues [using
+ bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&compon....
+
+ # Specification
+
+ This package follows [package naming and contents suggested by
+ upstream](https://docs.microsoft.com/en-us/dotnet/core/build/distribution...,
+ with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
+ `%{_libdir}`).
+
+ # Contributing
+
+ ## General Changes
+
+ 1. Fork the repo.
+
+ 2. Checkout the forked repository.
+
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
+ - `cd dotnet5.0`
+
+ 3. Make your changes. Don't forget to add a changelog.
+
+ 4. Do local builds.
+
+ - `fedpkg local`
+
+ 5. Fix any errors that come up and rebuild until it works locally.
+
+ 6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+ 8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+ 9. Create a pull request with your changes.
+
+ 10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+ 11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+ ## Updating to an new upstream release
+
+ 1. Fork the repo.
+
+ 2. Checkout the forked repository.
+
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
+ - `cd dotnet5.0`
+
+ 3. Build the new upstream source tarball. Update the versions in the
+ spec file. Add a changelog. This is generally automated by the
+ following.
+
+ - `./update-release <sdk-version> <runtime-version>`
+
+ If this fails because of compiler errors, you might have to figure
+ out a fix, then add the patch in `build-dotnet-tarball` script
+ rather than the spec file.
+
+ 4. Do local builds.
+
+ - `fedpkg local`
+
+ 5. Fix any errors that come up and rebuild until it works locally. Any
+ patches that are needed at this point should be added to the spec file.
+
+ 6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+ 7. Upload the source archive to the Fedora look-aside cache.
+
+ - `fedpkg new-sources path-to-generated-dotnet-source-tarball.tar.gz`
+
+ 8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+ 9. Create a pull request with your changes.
+
+ 10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+ 11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+ # Testing
+
+ This package uses CI tests as defined in `tests/test.yml`. Creating a
+ pull-request or running a build will fire off tests and flag any issues. We have
+ enabled gating (via `gating.yaml`) on the tests. That prevents a build
+ that fails any test from being released until the failures are waived.
+
+ The tests themselves are contained in this external repository:
+ https://github.com/redhat-developer/dotnet-regular-tests/
commit a8e63940d4d93dfeebe5397994a37a608f1b734b
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jan 29 12:47:59 2021 -0500
Add a comment describing the patch
Requested in the package review.
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 7bccb47..6d2e962 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -69,6 +69,7 @@ Source1: dotnet-v%{src_version}-SDK-arm64-bootstrap.tar.gz
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
+# Fix up a patch included in source-build to apply after we apply the linker-order patch first
Patch1: source-build-runtime-fixup-linker-order.patch
# https://github.com/dotnet/runtime/pull/42094
commit 7ec31ab47baf71fc91f03e3306bd9c3f7685c91f
Author: Mohan Boddu <mohanboddu(a)fedoraproject.org>
Date: Fri Jan 29 16:59:14 2021 +0000
Added the README
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..9a67806
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# dotnet5.0
+
+The dotnet5.0 package
commit b9e285d220d38729101bed96ed18f20be8d3d0ad
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Jan 21 18:53:18 2021 -0500
Fix non-bootstrap build on aarch64
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index bd6c36e..7bccb47 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -360,6 +360,13 @@ pushd src/sdk.*
%patch500 -p1
popd
+%if %{without bootstrap}
+%ifnarch x86_64
+mkdir -p artifacts/obj/%{runtime_arch}/Release
+cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
+%endif
+%endif
+
cat source-build-info.txt
find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
commit b0a5c898c259c15d8c7969236ff34a77d5c05eaa
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Jan 21 10:05:23 2021 -0500
Change name of source-build-references-package
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 5cd020d..bd6c36e 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -92,7 +92,7 @@ BuildRequires: clang
BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
-BuildRequires: dotnet-5.0-build-reference-packages
+BuildRequires: dotnet5.0-build-reference-packages
BuildRequires: dotnet-sdk-5.0
BuildRequires: dotnet-sdk-5.0-source-built-artifacts
%endif
commit 96fb4c4fa914c5f1f92dabc920ab1f1079333a7d
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Jan 20 17:24:05 2021 -0500
Update for 5.0.102 and bootstrapping
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 6eba1bf..6135973 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -125,7 +125,7 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git submodule update --init --recursive
clean_dotnet_cache
# FIXME remove contineuonprebuilterror
- ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true
+ ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true -p:UseSystemLibunwind=false
./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
if [[ ${build_bootstrap} == true ]]; then
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 5523053..5cd020d 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,11 +20,11 @@
# until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil}
-%global host_version 5.0.0
-%global runtime_version 5.0.0
-%global aspnetcore_runtime_version 5.0.0
-%global sdk_version 5.0.100
-%global templates_version 5.0.0
+%global host_version 5.0.2
+%global runtime_version 5.0.2
+%global aspnetcore_runtime_version 5.0.2
+%global sdk_version 5.0.102
+%global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version}
@@ -63,15 +63,20 @@ URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-9c4e5de-x64-bootstrap.tar.gz
-Source1: check-debug-symbols.py
-Source2: dotnet.sh.in
+Source0: dotnet-v%{src_version}-SDK-x64-bootstrap.tar.gz
+Source1: dotnet-v%{src_version}-SDK-arm64-bootstrap.tar.gz
+
+Source10: check-debug-symbols.py
+Source11: dotnet.sh.in
Patch1: source-build-runtime-fixup-linker-order.patch
# https://github.com/dotnet/runtime/pull/42094
# Fix linker order when linking with --as-needed
Patch100: runtime-linker-order.patch
+# https://github.com/dotnet/runtime/pull/47020
+# Fix build with gcc 11
+Patch101: runtime-47020-gcc11.patch
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
@@ -310,7 +315,16 @@ These are not meant for general use.
%prep
-%setup -q -n dotnet-9c4e5de-x64-bootstrap
+%if %{without bootstrap}
+%setup -q -n dotnet-v%{src_version}-SDK
+%else
+%ifarch x86_64
+%setup -q -T -b 0 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
+%endif
+%ifarch aarch64
+%setup -q -T -b 1 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
+%endif
+%endif
%if %{without bootstrap}
# Remove all prebuilts
@@ -339,17 +353,13 @@ sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
pushd src/runtime.*
%patch100 -p1
+%patch101 -p1
popd
pushd src/sdk.*
%patch500 -p1
popd
-%ifnarch x86_64
-mkdir -p artifacts/obj/%{runtime_arch}/Release
-cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
-%endif
-
cat source-build-info.txt
find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
@@ -418,7 +428,7 @@ VERBOSE=1 ./build.sh \
%endif
-sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
+sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
%install
@@ -473,7 +483,7 @@ install artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
echo "Testing build results for debug symbols..."
-%{SOURCE1} -v %{buildroot}%{_libdir}/dotnet/
+%{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
%check
diff --git a/runtime-47020-gcc11.patch b/runtime-47020-gcc11.patch
new file mode 100644
index 0000000..3751fcf
--- /dev/null
+++ b/runtime-47020-gcc11.patch
@@ -0,0 +1,55 @@
+From 7123b8344ddc1c883483f13d34abbd22d4170452 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Tue, 5 Jan 2021 18:50:18 -0500
+Subject: [PATCH] Fix build errors using GCC 11 (#46334)
+
+Building runtime with GCC 11 leads to some new errors. The errors are
+consistent with the "Header dependency changes" section documented at
+https://gcc.gnu.org/gcc-11/porting_to.html
+
+The first set of errors looks like this:
+
+ runtime/src/coreclr/pal/src/misc/cgroup.cpp:403:29:
+ error: no member named 'numeric_limits' in namespace 'std'
+ if (temp > std::numeric_limits<size_t>::max())
+ ~~~~~^
+
+Fix that by including <limits>.
+
+The second set of errors looks like this:
+
+ runtime/src/installer/corehost/cli/test/nativehost/host_context_test.cpp:634:31:
+ error: no member named 'sleep_for' in namespace 'std::this_thread'
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
+ ~~~~~~~~~~~~~~~~~~^
+
+Fix that by including <thread>.
+---
+ src/coreclr/src/pal/src/misc/cgroup.cpp | 1 +
+ src/installer/corehost/cli/test/nativehost/host_context_test.cpp | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/coreclr/src/pal/src/misc/cgroup.cpp b/src/coreclr/src/pal/src/misc/cgroup.cpp
+index f3e20012c539..24617359a21b 100644
+--- a/src/coreclr/src/pal/src/misc/cgroup.cpp
++++ b/src/coreclr/src/pal/src/misc/cgroup.cpp
+@@ -14,6 +14,7 @@ Module Name:
+ #include "pal/dbgmsg.h"
+ SET_DEFAULT_DEBUG_CHANNEL(MISC);
+ #include "pal/palinternal.h"
++#include <limits>
+ #include <limits.h>
+ #include <sys/resource.h>
+ #include "pal/virtual.h"
+diff --git a/src/installer/corehost/cli/test/nativehost/host_context_test.cpp b/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
+index cea98db6673a..371ec2d7e2aa 100644
+--- a/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
++++ b/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
+@@ -11,6 +11,7 @@
+ #include <corehost_context_contract.h>
+ #include "hostfxr_exports.h"
+ #include "host_context_test.h"
++#include <thread>
+ #include <utils.h>
+
+ namespace
commit 12422fd0a6ac964bde1cb1a90a611a343a1c914f
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Jan 18 10:26:45 2021 -0500
Update for bootstrapping 5.0
diff --git a/build-bootstrap-tarball b/build-bootstrap-tarball
deleted file mode 100755
index d3f3547..0000000
--- a/build-bootstrap-tarball
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-set -x
-
-sdk_version=3.1.105
-
-arch=$(uname -m)
-if [[ $arch == "x86_64" ]]; then
- arch=x64
-elif [[ $arch == "aarch64" ]]; then
- arch=arm64
-fi
-
-if rpm -qa | grep libunwind; then
- echo "error: libunwind is installed. Not a good idea for bootstrapping."
- exit 1
-fi
-if rpm -qa | grep dotnet ; then
- echo "error: dotnet is installed. Not a good idea for bootstrapping."
- exit 1
-fi
-if [ -d /usr/lib/dotnet ] || [ -d /usr/lib64/dotnet ] || [ -d /usr/share/dotnet ] ; then
- echo "error: one of /usr/lib/dotnet /usr/lib64/dotnet or /usr/share/dotnet/ exists. Not a good idea for bootstrapping."
- exit 1
-fi
-if command -v dotnet ; then
- echo "error: dotnet is in $PATH. Not a good idea for bootstrapping."
- exit 1
-fi
-
-if [ ! -d dotnet-source-build-tarball ]; then
- if [ ! -d source-build ]; then
- git clone https://github.com/dotnet/source-build
- fi
- pushd source-build
- sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.common.props
- git clean -xdf
- ./build-source-tarball.sh ../dotnet-source-build-tarball/ -- -p:DownloadSourceBuildReferencePackagesTimeoutSeconds=100000
- popd
-fi
-
-rm -rf dotnet-v${sdk_version}-SDK dotnet-v${sdk_version}-SDK.tar.gz
-
-cp -a dotnet-source-build-tarball dotnet-v${sdk_version}-SDK
-cp -a source-build/artifacts/$arch/Release/Private.SourceBuilt.Artifacts.*.tar.gz dotnet-v${sdk_version}-SDK/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
-
-tar czf dotnet-v${sdk_version}-SDK-$arch.tar.gz dotnet-v${sdk_version}-SDK
-
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index c250937..6eba1bf 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -1,7 +1,7 @@
#!/bin/bash
# Usage:
-# build-dotnet-tarball <tag-from-source-build>
+# build-dotnet-tarball [--bootstrap] <tag-from-source-build>
#
# Creates a source archive from a tag (or commit) at github.com/dotnet/source-build
@@ -13,31 +13,40 @@
set -euo pipefail
IFS=$'\n\t'
-print_usage() {
+function print_usage {
echo "Usage:"
- echo "$0 <tag-from-source-build>"
+ echo "$0 [--bootstrap] <tag-from-source-build>"
echo
echo "Creates a source archive from a tag at https://github.com/dotnet/source-build"
+ echo ""
+ echo " --bootstrap build a source tarball usable for bootstrapping .NET"
}
-clean_dotnet_cache() {
+function clean_dotnet_cache {
rm -rf ~/.aspnet ~/.dotnet/ ~/.nuget/ ~/.local/share/NuGet ~/.templateengine
rm -rf /tmp/NuGet /tmp/NuGetScratch /tmp/.NETCore* /tmp/.NETStandard* /tmp/.dotnet /tmp/dotnet.* /tmp/clr-debug-pipe* /tmp/Razor-Server /tmp/CoreFxPipe* /tmp/VBCSCompiler /tmp/.NETFramework*
}
-function runtime_id {
-
- declare -A archmap
- archmap=(
- ["aarch64"]="arm64"
- ["amd64"]="x64"
- ["armv8l"]="arm"
- ["i686"]="x86"
- ["i386"]="x86"
- ["x86_64"]="x64"
- )
+function check_bootstrap_environment {
+ if rpm -qa | grep libunwind-devel; then
+ echo "error: libunwind-devel is installed. Not a good idea for bootstrapping."
+ exit 1
+ fi
+ if rpm -qa | grep dotnet ; then
+ echo "error: dotnet is installed. Not a good idea for bootstrapping."
+ exit 1
+ fi
+ if [ -d /usr/lib/dotnet ] || [ -d /usr/lib64/dotnet ] || [ -d /usr/share/dotnet ] ; then
+ echo "error: one of /usr/lib/dotnet /usr/lib64/dotnet or /usr/share/dotnet/ exists. Not a good idea for bootstrapping."
+ exit 1
+ fi
+ if command -v dotnet ; then
+ echo "error: dotnet is in $PATH. Not a good idea for bootstrapping."
+ exit 1
+ fi
+}
- arch=${archmap["$(uname -m)"]}
+function runtime_id {
source /etc/os-release
case "${ID}" in
@@ -50,10 +59,29 @@ function runtime_id {
echo "${ID}.${rid_version}-${arch}"
}
+build_bootstrap=false
+
+declare -A archmap
+archmap=(
+ ["aarch64"]="arm64"
+ ["amd64"]="x64"
+ ["armv8l"]="arm"
+ ["i686"]="x86"
+ ["i386"]="x86"
+ ["x86_64"]="x64"
+)
+
+arch=${archmap["$(uname -m)"]}
+
+
positional_args=()
while [[ "$#" -gt 0 ]]; do
arg="${1}"
case "${arg}" in
+ --bootstrap)
+ build_bootstrap=true
+ shift
+ ;;
-h|--help)
print_usage
exit 0
@@ -78,6 +106,11 @@ dir_name="dotnet-${tag}"
unmodified_tarball_name="${dir_name}-original"
tarball_name="${dir_name}"
+if [[ ${build_bootstrap} == true ]]; then
+ unmodified_tarball_name="${unmodified_tarball_name}-${arch}-bootstrap"
+ tarball_name="${tarball_name}-${arch}-bootstrap"
+fi
+
if [ -f "${tarball_name}.tar.gz" ]; then
echo "error: ${tarball_name}.tar.gz already exists"
exit 1
@@ -94,6 +127,10 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
# FIXME remove contineuonprebuilterror
./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true
./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
+
+ if [[ ${build_bootstrap} == true ]]; then
+ cp -a artifacts/"${arch}"/Release/Private.SourceBuilt.Artifacts.*.tar.gz "${unmodified_tarball_name}"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+ fi
popd
popd
@@ -107,12 +144,17 @@ tar xf "${unmodified_tarball_name}.tar.gz"
mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
+
+if [[ ${build_bootstrap} != true ]]; then
+ find . -type f -iname '*.tar.gz' -delete
+ rm -rf .dotnet
+fi
+
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
rm -r src/NuGet.Client.*/test/EndToEnd
-find src/runtime.*/ -depth -name tests -print0 | xargs -0 rm -r
rm -r src/runtime.*/src/mono/
rm -r src/Humanizer.*/samples/
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 9aad30e..5523053 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -63,7 +63,7 @@ URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-SDK-337413b.tar.gz
+Source0: dotnet-9c4e5de-x64-bootstrap.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
@@ -87,7 +87,7 @@ BuildRequires: clang
BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
-BuildRequires: dotnet-build-reference-packages
+BuildRequires: dotnet-5.0-build-reference-packages
BuildRequires: dotnet-sdk-5.0
BuildRequires: dotnet-sdk-5.0-source-built-artifacts
%endif
@@ -310,7 +310,7 @@ These are not meant for general use.
%prep
-%setup -q -n dotnet-v%{src_version}-SDK-337413b
+%setup -q -n dotnet-9c4e5de-x64-bootstrap
%if %{without bootstrap}
# Remove all prebuilts
@@ -324,10 +324,9 @@ rm -rf packages/source-built
%endif
%if %{without bootstrap}
-sed -i -e 's|5.0.100-preview1-014459|5.0.103|' global.json
mkdir -p packages/archive
ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
-ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
+ln -s %{_libdir}/dotnet/reference-packages/*.tar.gz packages/archive
%endif
# Fix bad hardcoded path in build
@@ -467,8 +466,8 @@ echo "%{_libdir}/dotnet" >> install_location
install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
install install_location %{buildroot}%{_sysconfdir}/dotnet/
-#install -dm 0755 %%{buildroot}%%{_libdir}/dotnet/source-built-artifacts
-#install artifacts/%%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %%{buildroot}/%%{_libdir}/dotnet/source-built-artifacts/
+install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
+install artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
@@ -522,13 +521,16 @@ echo "Testing build results for debug symbols..."
%{_libdir}/dotnet/sdk/%{sdk_version}
%dir %{_libdir}/dotnet/packs
-#%%files -n dotnet-sdk-5.0-source-built-artifacts
-#%%dir %%{_libdir}/dotnet
-#%%{_libdir}/dotnet/source-built-artifacts
+%files -n dotnet-sdk-5.0-source-built-artifacts
+%dir %{_libdir}/dotnet
+%{_libdir}/dotnet/source-built-artifacts
%changelog
-* Fri Dec 04 13:22:13 EST 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-1
+* Fri Dec 18 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-2
+- Update to .NET Core Runtime 5.0.0 and SDK 5.0.100 commit 9c4e5de
+
+* Fri Dec 04 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-1
- Update to .NET Core Runtime 5.0.0 and SDK 5.0.100
* Thu Dec 03 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.4.20201202git337413b
commit 120443366777f7d79f381716ae2b97a12340c874
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Dec 4 17:09:37 2020 -0500
Update to .NET Core Runtime 5.0.0 and SDK 5.0.100
diff --git a/README.md b/README.md
index 4d4fb58..3990ea2 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Overview
-This is the .NET Core 5.0 package for Fedora.
+This is the .NET 5.0 package for Fedora.
This package is maintained by the Fedora DotNet SIG (Special Interest
Group). You can find out more about the DotNet SIG at:
diff --git a/SHAHashProvider.Browser.cs b/SHAHashProvider.Browser.cs
new file mode 100644
index 0000000..4515b8a
--- /dev/null
+++ b/SHAHashProvider.Browser.cs
@@ -0,0 +1,1184 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.IO;
+using System.Diagnostics;
+using System.Numerics;
+using System.Security.Cryptography;
+
+namespace Internal.Cryptography
+{
+ internal sealed class SHAHashProvider : HashProvider
+ {
+ private int hashSizeInBytes;
+ private SHAManagedImplementationBase impl;
+ private MemoryStream buffer;
+
+ public SHAHashProvider(string hashAlgorithmId)
+ {
+ switch (hashAlgorithmId)
+ {
+ case HashAlgorithmNames.SHA1:
+ impl = new SHA1ManagedImplementation();
+ hashSizeInBytes = 20;
+ break;
+ case HashAlgorithmNames.SHA256:
+ impl = new SHA256ManagedImplementation();
+ hashSizeInBytes = 32;
+ break;
+ case HashAlgorithmNames.SHA384:
+ impl = new SHA384ManagedImplementation();
+ hashSizeInBytes = 48;
+ break;
+ case HashAlgorithmNames.SHA512:
+ impl = new SHA512ManagedImplementation();
+ hashSizeInBytes = 64;
+ break;
+ default:
+ throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithmId));
+ }
+ }
+
+ public override void AppendHashData(ReadOnlySpan<byte> data)
+ {
+ if (buffer == null)
+ {
+ buffer = new MemoryStream(1000);
+ }
+
+ buffer.Write(data);
+ }
+
+ public override int FinalizeHashAndReset(Span<byte> destination)
+ {
+ GetCurrentHash(destination);
+ buffer = null;
+
+ return hashSizeInBytes;
+ }
+
+ public override int GetCurrentHash(Span<byte> destination)
+ {
+ Debug.Assert(destination.Length >= hashSizeInBytes);
+
+ impl.Initialize();
+ if (buffer != null)
+ {
+ impl.HashCore(buffer.GetBuffer(), 0, (int)buffer.Length);
+ }
+ impl.HashFinal().CopyTo(destination);
+
+ return hashSizeInBytes;
+ }
+
+ public override int HashSizeInBytes => hashSizeInBytes;
+
+ public override void Dispose(bool disposing)
+ {
+ }
+
+ private abstract class SHAManagedImplementationBase
+ {
+ public abstract void Initialize();
+ public abstract void HashCore(byte[] partIn, int ibStart, int cbSize);
+ public abstract byte[] HashFinal();
+ }
+
+ // Ported from src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs.
+ // n.b. It's ok to use a "non-secret purposes" hashing implementation here, as this is only
+ // used in wasm scenarios, and as of the current release we don't make any security guarantees
+ // about our crypto primitives in wasm environments.
+ private class SHA1ManagedImplementation : SHAManagedImplementationBase
+ {
+ private Sha1ForNonSecretPurposes _state; // mutable struct - don't make readonly
+
+ public override void Initialize()
+ {
+ _state = default;
+ _state.Start();
+ }
+
+ public override void HashCore(byte[] partIn, int ibStart, int cbSize)
+ {
+ _state.Append(partIn.AsSpan(ibStart, cbSize));
+ }
+
+ public override byte[] HashFinal()
+ {
+ byte[] output = new byte[20];
+ _state.Finish(output);
+ return output;
+ }
+
+ /// <summary>
+ /// Implements the SHA1 hashing algorithm. Note that this
+ /// implementation is for hashing public information. Do not
+ /// use this code to hash private data, as this implementation does
+ /// not take any steps to avoid information disclosure.
+ /// </summary>
+ private struct Sha1ForNonSecretPurposes
+ {
+ private long length; // Total message length in bits
+ private uint[] w; // Workspace
+ private int pos; // Length of current chunk in bytes
+
+ /// <summary>
+ /// Call Start() to initialize the hash object.
+ /// </summary>
+ public void Start()
+ {
+ this.w ??= new uint[85];
+
+ this.length = 0;
+ this.pos = 0;
+ this.w[80] = 0x67452301;
+ this.w[81] = 0xEFCDAB89;
+ this.w[82] = 0x98BADCFE;
+ this.w[83] = 0x10325476;
+ this.w[84] = 0xC3D2E1F0;
+ }
+
+ /// <summary>
+ /// Adds an input byte to the hash.
+ /// </summary>
+ /// <param name="input">Data to include in the hash.</param>
+ public void Append(byte input)
+ {
+ this.w[this.pos / 4] = (this.w[this.pos / 4] << 8) | input;
+ if (64 == ++this.pos)
+ {
+ this.Drain();
+ }
+ }
+
+ /// <summary>
+ /// Adds input bytes to the hash.
+ /// </summary>
+ /// <param name="input">
+ /// Data to include in the hash. Must not be null.
+ /// </param>
+ public void Append(ReadOnlySpan<byte> input)
+ {
+ foreach (byte b in input)
+ {
+ this.Append(b);
+ }
+ }
+
+ /// <summary>
+ /// Retrieves the hash value.
+ /// Note that after calling this function, the hash object should
+ /// be considered uninitialized. Subsequent calls to Append or
+ /// Finish will produce useless results. Call Start() to
+ /// reinitialize.
+ /// </summary>
+ /// <param name="output">
+ /// Buffer to receive the hash value. Must not be null.
+ /// Up to 20 bytes of hash will be written to the output buffer.
+ /// If the buffer is smaller than 20 bytes, the remaining hash
+ /// bytes will be lost. If the buffer is larger than 20 bytes, the
+ /// rest of the buffer is left unmodified.
+ /// </param>
+ public void Finish(byte[] output)
+ {
+ long l = this.length + 8 * this.pos;
+ this.Append(0x80);
+ while (this.pos != 56)
+ {
+ this.Append(0x00);
+ }
+
+ unchecked
+ {
+ this.Append((byte)(l >> 56));
+ this.Append((byte)(l >> 48));
+ this.Append((byte)(l >> 40));
+ this.Append((byte)(l >> 32));
+ this.Append((byte)(l >> 24));
+ this.Append((byte)(l >> 16));
+ this.Append((byte)(l >> 8));
+ this.Append((byte)l);
+
+ int end = output.Length < 20 ? output.Length : 20;
+ for (int i = 0; i != end; i++)
+ {
+ uint temp = this.w[80 + i / 4];
+ output[i] = (byte)(temp >> 24);
+ this.w[80 + i / 4] = temp << 8;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Called when this.pos reaches 64.
+ /// </summary>
+ private void Drain()
+ {
+ for (int i = 16; i != 80; i++)
+ {
+ this.w[i] = BitOperations.RotateLeft(this.w[i - 3] ^ this.w[i - 8] ^ this.w[i - 14] ^ this.w[i - 16], 1);
+ }
+
+ unchecked
+ {
+ uint a = this.w[80];
+ uint b = this.w[81];
+ uint c = this.w[82];
+ uint d = this.w[83];
+ uint e = this.w[84];
+
+ for (int i = 0; i != 20; i++)
+ {
+ const uint k = 0x5A827999;
+ uint f = (b & c) | ((~b) & d);
+ uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
+ }
+
+ for (int i = 20; i != 40; i++)
+ {
+ uint f = b ^ c ^ d;
+ const uint k = 0x6ED9EBA1;
+ uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
+ }
+
+ for (int i = 40; i != 60; i++)
+ {
+ uint f = (b & c) | (b & d) | (c & d);
+ const uint k = 0x8F1BBCDC;
+ uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
+ }
+
+ for (int i = 60; i != 80; i++)
+ {
+ uint f = b ^ c ^ d;
+ const uint k = 0xCA62C1D6;
+ uint temp = BitOperations.RotateLeft(a, 5) + f + e + k + this.w[i]; e = d; d = c; c = BitOperations.RotateLeft(b, 30); b = a; a = temp;
+ }
+
+ this.w[80] += a;
+ this.w[81] += b;
+ this.w[82] += c;
+ this.w[83] += d;
+ this.w[84] += e;
+ }
+
+ this.length += 512; // 64 bytes == 512 bits
+ this.pos = 0;
+ }
+ }
+ }
+
+ // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
+ private class SHA256ManagedImplementation : SHAManagedImplementationBase
+ {
+ private byte[] _buffer;
+ private long _count; // Number of bytes in the hashed message
+ private uint[] _stateSHA256;
+ private uint[] _W;
+
+ public SHA256ManagedImplementation()
+ {
+ _stateSHA256 = new uint[8];
+ _buffer = new byte[64];
+ _W = new uint[64];
+
+ InitializeState();
+ }
+
+ public override void Initialize()
+ {
+ InitializeState();
+
+ // Zeroize potentially sensitive information.
+ Array.Clear(_buffer, 0, _buffer.Length);
+ Array.Clear(_W, 0, _W.Length);
+ }
+
+ private void InitializeState()
+ {
+ _count = 0;
+
+ _stateSHA256[0] = 0x6a09e667;
+ _stateSHA256[1] = 0xbb67ae85;
+ _stateSHA256[2] = 0x3c6ef372;
+ _stateSHA256[3] = 0xa54ff53a;
+ _stateSHA256[4] = 0x510e527f;
+ _stateSHA256[5] = 0x9b05688c;
+ _stateSHA256[6] = 0x1f83d9ab;
+ _stateSHA256[7] = 0x5be0cd19;
+ }
+
+ /* SHA256 block update operation. Continues an SHA message-digest
+ operation, processing another message block, and updating the
+ context.
+ */
+ public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
+ {
+ int bufferLen;
+ int partInLen = cbSize;
+ int partInBase = ibStart;
+
+ /* Compute length of buffer */
+ bufferLen = (int)(_count & 0x3f);
+
+ /* Update number of bytes */
+ _count += partInLen;
+
+ fixed (uint* stateSHA256 = _stateSHA256)
+ {
+ fixed (byte* buffer = _buffer)
+ {
+ fixed (uint* expandedBuffer = _W)
+ {
+ if ((bufferLen > 0) && (bufferLen + partInLen >= 64))
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 64 - bufferLen);
+ partInBase += (64 - bufferLen);
+ partInLen -= (64 - bufferLen);
+ SHATransform(expandedBuffer, stateSHA256, buffer);
+ bufferLen = 0;
+ }
+
+ /* Copy input to temporary buffer and hash */
+ while (partInLen >= 64)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 64);
+ partInBase += 64;
+ partInLen -= 64;
+ SHATransform(expandedBuffer, stateSHA256, buffer);
+ }
+
+ if (partInLen > 0)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
+ }
+ }
+ }
+ }
+ }
+
+ /* SHA256 finalization. Ends an SHA256 message-digest operation, writing
+ the message digest.
+ */
+ public override byte[] HashFinal()
+ {
+ byte[] pad;
+ int padLen;
+ long bitCount;
+ byte[] hash = new byte[32]; // HashSizeValue = 256
+
+ /* Compute padding: 80 00 00 ... 00 00 <bit count>
+ */
+
+ padLen = 64 - (int)(_count & 0x3f);
+ if (padLen <= 8)
+ padLen += 64;
+
+ pad = new byte[padLen];
+ pad[0] = 0x80;
+
+ // Convert count to bit count
+ bitCount = _count * 8;
+
+ pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
+ pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
+ pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
+ pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
+ pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
+ pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
+ pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
+ pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
+
+ /* Digest padding */
+ HashCore(pad, 0, pad.Length);
+
+ /* Store digest */
+ SHAUtils.DWORDToBigEndian(hash, _stateSHA256, 8);
+
+ return hash;
+ }
+
+ private static readonly uint[] _K = {
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
+ 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
+ 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
+ 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
+ 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
+ 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
+ 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
+ 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
+ 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
+ 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
+ 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
+ };
+
+ private static unsafe void SHATransform(uint* expandedBuffer, uint* state, byte* block)
+ {
+ uint a, b, c, d, e, f, h, g;
+ uint aa, bb, cc, dd, ee, ff, hh, gg;
+ uint T1;
+
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+ e = state[4];
+ f = state[5];
+ g = state[6];
+ h = state[7];
+
+ // fill in the first 16 bytes of W.
+ SHAUtils.DWORDFromBigEndian(expandedBuffer, 16, block);
+ SHA256Expand(expandedBuffer);
+
+ /* Apply the SHA256 compression function */
+ // We are trying to be smart here and avoid as many copies as we can
+ // The perf gain with this method over the straightforward modify and shift
+ // forward is >= 20%, so it's worth the pain
+ for (int j = 0; j < 64;)
+ {
+ T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
+ ee = d + T1;
+ aa = T1 + Sigma_0(a) + Maj(a, b, c);
+ j++;
+
+ T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
+ ff = c + T1;
+ bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
+ j++;
+
+ T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
+ gg = b + T1;
+ cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
+ j++;
+
+ T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
+ hh = a + T1;
+ dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
+ j++;
+
+ T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
+ h = aa + T1;
+ d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
+ j++;
+
+ T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
+ g = bb + T1;
+ c = T1 + Sigma_0(d) + Maj(d, dd, cc);
+ j++;
+
+ T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
+ f = cc + T1;
+ b = T1 + Sigma_0(c) + Maj(c, d, dd);
+ j++;
+
+ T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
+ e = dd + T1;
+ a = T1 + Sigma_0(b) + Maj(b, c, d);
+ j++;
+ }
+
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+ state[4] += e;
+ state[5] += f;
+ state[6] += g;
+ state[7] += h;
+ }
+
+ private static uint RotateRight(uint x, int n)
+ {
+ return (((x) >> (n)) | ((x) << (32 - (n))));
+ }
+
+ private static uint Ch(uint x, uint y, uint z)
+ {
+ return ((x & y) ^ ((x ^ 0xffffffff) & z));
+ }
+
+ private static uint Maj(uint x, uint y, uint z)
+ {
+ return ((x & y) ^ (x & z) ^ (y & z));
+ }
+
+ private static uint sigma_0(uint x)
+ {
+ return (RotateRight(x, 7) ^ RotateRight(x, 18) ^ (x >> 3));
+ }
+
+ private static uint sigma_1(uint x)
+ {
+ return (RotateRight(x, 17) ^ RotateRight(x, 19) ^ (x >> 10));
+ }
+
+ private static uint Sigma_0(uint x)
+ {
+ return (RotateRight(x, 2) ^ RotateRight(x, 13) ^ RotateRight(x, 22));
+ }
+
+ private static uint Sigma_1(uint x)
+ {
+ return (RotateRight(x, 6) ^ RotateRight(x, 11) ^ RotateRight(x, 25));
+ }
+
+ /* This function creates W_16,...,W_63 according to the formula
+ W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
+ */
+ private static unsafe void SHA256Expand(uint* x)
+ {
+ for (int i = 16; i < 64; i++)
+ {
+ x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
+ }
+ }
+ }
+
+ // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
+ private class SHA384ManagedImplementation : SHAManagedImplementationBase
+ {
+ private byte[] _buffer;
+ private ulong _count; // Number of bytes in the hashed message
+ private ulong[] _stateSHA384;
+ private ulong[] _W;
+
+ public SHA384ManagedImplementation()
+ {
+ _stateSHA384 = new ulong[8];
+ _buffer = new byte[128];
+ _W = new ulong[80];
+
+ InitializeState();
+ }
+
+ public override void Initialize()
+ {
+ InitializeState();
+
+ // Zeroize potentially sensitive information.
+ Array.Clear(_buffer, 0, _buffer.Length);
+ Array.Clear(_W, 0, _W.Length);
+ }
+
+ private void InitializeState()
+ {
+ _count = 0;
+
+ _stateSHA384[0] = 0xcbbb9d5dc1059ed8;
+ _stateSHA384[1] = 0x629a292a367cd507;
+ _stateSHA384[2] = 0x9159015a3070dd17;
+ _stateSHA384[3] = 0x152fecd8f70e5939;
+ _stateSHA384[4] = 0x67332667ffc00b31;
+ _stateSHA384[5] = 0x8eb44a8768581511;
+ _stateSHA384[6] = 0xdb0c2e0d64f98fa7;
+ _stateSHA384[7] = 0x47b5481dbefa4fa4;
+ }
+
+ /* SHA384 block update operation. Continues an SHA message-digest
+ operation, processing another message block, and updating the
+ context.
+ */
+ public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
+ {
+ int bufferLen;
+ int partInLen = cbSize;
+ int partInBase = ibStart;
+
+ /* Compute length of buffer */
+ bufferLen = (int)(_count & 0x7f);
+
+ /* Update number of bytes */
+ _count += (ulong)partInLen;
+
+ fixed (ulong* stateSHA384 = _stateSHA384)
+ {
+ fixed (byte* buffer = _buffer)
+ {
+ fixed (ulong* expandedBuffer = _W)
+ {
+ if ((bufferLen > 0) && (bufferLen + partInLen >= 128))
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 128 - bufferLen);
+ partInBase += (128 - bufferLen);
+ partInLen -= (128 - bufferLen);
+ SHATransform(expandedBuffer, stateSHA384, buffer);
+ bufferLen = 0;
+ }
+
+ /* Copy input to temporary buffer and hash */
+ while (partInLen >= 128)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 128);
+ partInBase += 128;
+ partInLen -= 128;
+ SHATransform(expandedBuffer, stateSHA384, buffer);
+ }
+
+ if (partInLen > 0)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
+ }
+ }
+ }
+ }
+ }
+
+ /* SHA384 finalization. Ends an SHA384 message-digest operation, writing
+ the message digest.
+ */
+ public override byte[] HashFinal()
+ {
+ byte[] pad;
+ int padLen;
+ ulong bitCount;
+ byte[] hash = new byte[48]; // HashSizeValue = 384
+
+ /* Compute padding: 80 00 00 ... 00 00 <bit count>
+ */
+
+ padLen = 128 - (int)(_count & 0x7f);
+ if (padLen <= 16)
+ padLen += 128;
+
+ pad = new byte[padLen];
+ pad[0] = 0x80;
+
+ // Convert count to bit count
+ bitCount = _count * 8;
+
+ // bitCount is at most 8 * 128 = 1024. Its representation as a 128-bit number has all bits set to zero
+ // except eventually the 11 lower bits
+
+ //pad[padLen-16] = (byte) ((bitCount >> 120) & 0xff);
+ //pad[padLen-15] = (byte) ((bitCount >> 112) & 0xff);
+ //pad[padLen-14] = (byte) ((bitCount >> 104) & 0xff);
+ //pad[padLen-13] = (byte) ((bitCount >> 96) & 0xff);
+ //pad[padLen-12] = (byte) ((bitCount >> 88) & 0xff);
+ //pad[padLen-11] = (byte) ((bitCount >> 80) & 0xff);
+ //pad[padLen-10] = (byte) ((bitCount >> 72) & 0xff);
+ //pad[padLen-9] = (byte) ((bitCount >> 64) & 0xff);
+ pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
+ pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
+ pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
+ pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
+ pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
+ pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
+ pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
+ pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
+
+ /* Digest padding */
+ HashCore(pad, 0, pad.Length);
+
+ /* Store digest */
+ SHAUtils.QuadWordToBigEndian(hash, _stateSHA384, 6);
+
+ return hash;
+ }
+
+ private static readonly ulong[] _K = {
+ 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc,
+ 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,
+ 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2,
+ 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694,
+ 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
+ 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5,
+ 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,
+ 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70,
+ 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df,
+ 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,
+ 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30,
+ 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,
+ 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8,
+ 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3,
+ 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,
+ 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b,
+ 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,
+ 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b,
+ 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c,
+ 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817,
+ };
+
+ private static unsafe void SHATransform(ulong* expandedBuffer, ulong* state, byte* block)
+ {
+ ulong a, b, c, d, e, f, g, h;
+ ulong aa, bb, cc, dd, ee, ff, hh, gg;
+ ulong T1;
+
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+ e = state[4];
+ f = state[5];
+ g = state[6];
+ h = state[7];
+
+ // fill in the first 16 blocks of W.
+ SHAUtils.QuadWordFromBigEndian(expandedBuffer, 16, block);
+ SHA384Expand(expandedBuffer);
+
+ /* Apply the SHA384 compression function */
+ // We are trying to be smart here and avoid as many copies as we can
+ // The perf gain with this method over the straightforward modify and shift
+ // forward is >= 20%, so it's worth the pain
+ for (int j = 0; j < 80;)
+ {
+ T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
+ ee = d + T1;
+ aa = T1 + Sigma_0(a) + Maj(a, b, c);
+ j++;
+
+ T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
+ ff = c + T1;
+ bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
+ j++;
+
+ T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
+ gg = b + T1;
+ cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
+ j++;
+
+ T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
+ hh = a + T1;
+ dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
+ j++;
+
+ T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
+ h = aa + T1;
+ d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
+ j++;
+
+ T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
+ g = bb + T1;
+ c = T1 + Sigma_0(d) + Maj(d, dd, cc);
+ j++;
+
+ T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
+ f = cc + T1;
+ b = T1 + Sigma_0(c) + Maj(c, d, dd);
+ j++;
+
+ T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
+ e = dd + T1;
+ a = T1 + Sigma_0(b) + Maj(b, c, d);
+ j++;
+ }
+
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+ state[4] += e;
+ state[5] += f;
+ state[6] += g;
+ state[7] += h;
+ }
+
+ private static ulong RotateRight(ulong x, int n)
+ {
+ return (((x) >> (n)) | ((x) << (64 - (n))));
+ }
+
+ private static ulong Ch(ulong x, ulong y, ulong z)
+ {
+ return ((x & y) ^ ((x ^ 0xffffffffffffffff) & z));
+ }
+
+ private static ulong Maj(ulong x, ulong y, ulong z)
+ {
+ return ((x & y) ^ (x & z) ^ (y & z));
+ }
+
+ private static ulong Sigma_0(ulong x)
+ {
+ return (RotateRight(x, 28) ^ RotateRight(x, 34) ^ RotateRight(x, 39));
+ }
+
+ private static ulong Sigma_1(ulong x)
+ {
+ return (RotateRight(x, 14) ^ RotateRight(x, 18) ^ RotateRight(x, 41));
+ }
+
+ private static ulong sigma_0(ulong x)
+ {
+ return (RotateRight(x, 1) ^ RotateRight(x, 8) ^ (x >> 7));
+ }
+
+ private static ulong sigma_1(ulong x)
+ {
+ return (RotateRight(x, 19) ^ RotateRight(x, 61) ^ (x >> 6));
+ }
+
+ /* This function creates W_16,...,W_79 according to the formula
+ W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
+ */
+ private static unsafe void SHA384Expand(ulong* x)
+ {
+ for (int i = 16; i < 80; i++)
+ {
+ x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
+ }
+ }
+ }
+
+ // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
+ private class SHA512ManagedImplementation : SHAManagedImplementationBase
+ {
+ private byte[] _buffer;
+ private ulong _count; // Number of bytes in the hashed message
+ private ulong[] _stateSHA512;
+ private ulong[] _W;
+
+ public SHA512ManagedImplementation()
+ {
+ _stateSHA512 = new ulong[8];
+ _buffer = new byte[128];
+ _W = new ulong[80];
+
+ InitializeState();
+ }
+
+ public override void Initialize()
+ {
+ InitializeState();
+
+ // Zeroize potentially sensitive information.
+ Array.Clear(_buffer, 0, _buffer.Length);
+ Array.Clear(_W, 0, _W.Length);
+ }
+
+ private void InitializeState()
+ {
+ _count = 0;
+
+ _stateSHA512[0] = 0x6a09e667f3bcc908;
+ _stateSHA512[1] = 0xbb67ae8584caa73b;
+ _stateSHA512[2] = 0x3c6ef372fe94f82b;
+ _stateSHA512[3] = 0xa54ff53a5f1d36f1;
+ _stateSHA512[4] = 0x510e527fade682d1;
+ _stateSHA512[5] = 0x9b05688c2b3e6c1f;
+ _stateSHA512[6] = 0x1f83d9abfb41bd6b;
+ _stateSHA512[7] = 0x5be0cd19137e2179;
+ }
+
+ /* SHA512 block update operation. Continues an SHA message-digest
+ operation, processing another message block, and updating the
+ context.
+ */
+ public override unsafe void HashCore(byte[] partIn, int ibStart, int cbSize)
+ {
+ int bufferLen;
+ int partInLen = cbSize;
+ int partInBase = ibStart;
+
+ /* Compute length of buffer */
+ bufferLen = (int)(_count & 0x7f);
+
+ /* Update number of bytes */
+ _count += (ulong)partInLen;
+
+ fixed (ulong* stateSHA512 = _stateSHA512)
+ {
+ fixed (byte* buffer = _buffer)
+ {
+ fixed (ulong* expandedBuffer = _W)
+ {
+ if ((bufferLen > 0) && (bufferLen + partInLen >= 128))
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, 128 - bufferLen);
+ partInBase += (128 - bufferLen);
+ partInLen -= (128 - bufferLen);
+ SHATransform(expandedBuffer, stateSHA512, buffer);
+ bufferLen = 0;
+ }
+
+ /* Copy input to temporary buffer and hash */
+ while (partInLen >= 128)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, 0, 128);
+ partInBase += 128;
+ partInLen -= 128;
+ SHATransform(expandedBuffer, stateSHA512, buffer);
+ }
+
+ if (partInLen > 0)
+ {
+ Buffer.BlockCopy(partIn, partInBase, _buffer, bufferLen, partInLen);
+ }
+ }
+ }
+ }
+ }
+
+ /* SHA512 finalization. Ends an SHA512 message-digest operation, writing
+ the message digest.
+ */
+ public override byte[] HashFinal()
+ {
+ byte[] pad;
+ int padLen;
+ ulong bitCount;
+ byte[] hash = new byte[64]; // HashSizeValue = 512
+
+ /* Compute padding: 80 00 00 ... 00 00 <bit count>
+ */
+
+ padLen = 128 - (int)(_count & 0x7f);
+ if (padLen <= 16)
+ padLen += 128;
+
+ pad = new byte[padLen];
+ pad[0] = 0x80;
+
+ // Convert count to bit count
+ bitCount = _count * 8;
+
+ // If we ever have UInt128 for bitCount, then these need to be uncommented.
+ // Note that C# only looks at the low 6 bits of the shift value for ulongs,
+ // so >>0 and >>64 are equal!
+
+ //pad[padLen-16] = (byte) ((bitCount >> 120) & 0xff);
+ //pad[padLen-15] = (byte) ((bitCount >> 112) & 0xff);
+ //pad[padLen-14] = (byte) ((bitCount >> 104) & 0xff);
+ //pad[padLen-13] = (byte) ((bitCount >> 96) & 0xff);
+ //pad[padLen-12] = (byte) ((bitCount >> 88) & 0xff);
+ //pad[padLen-11] = (byte) ((bitCount >> 80) & 0xff);
+ //pad[padLen-10] = (byte) ((bitCount >> 72) & 0xff);
+ //pad[padLen-9] = (byte) ((bitCount >> 64) & 0xff);
+ pad[padLen - 8] = (byte)((bitCount >> 56) & 0xff);
+ pad[padLen - 7] = (byte)((bitCount >> 48) & 0xff);
+ pad[padLen - 6] = (byte)((bitCount >> 40) & 0xff);
+ pad[padLen - 5] = (byte)((bitCount >> 32) & 0xff);
+ pad[padLen - 4] = (byte)((bitCount >> 24) & 0xff);
+ pad[padLen - 3] = (byte)((bitCount >> 16) & 0xff);
+ pad[padLen - 2] = (byte)((bitCount >> 8) & 0xff);
+ pad[padLen - 1] = (byte)((bitCount >> 0) & 0xff);
+
+ /* Digest padding */
+ HashCore(pad, 0, pad.Length);
+
+ /* Store digest */
+ SHAUtils.QuadWordToBigEndian(hash, _stateSHA512, 8);
+
+ return hash;
+ }
+
+ private static readonly ulong[] _K = {
+ 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc,
+ 0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,
+ 0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2,
+ 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694,
+ 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
+ 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5,
+ 0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,
+ 0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70,
+ 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df,
+ 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,
+ 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30,
+ 0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,
+ 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8,
+ 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3,
+ 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,
+ 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b,
+ 0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,
+ 0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b,
+ 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c,
+ 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817,
+ };
+
+ private static unsafe void SHATransform(ulong* expandedBuffer, ulong* state, byte* block)
+ {
+ ulong a, b, c, d, e, f, g, h;
+ ulong aa, bb, cc, dd, ee, ff, hh, gg;
+ ulong T1;
+
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+ e = state[4];
+ f = state[5];
+ g = state[6];
+ h = state[7];
+
+ // fill in the first 16 blocks of W.
+ SHAUtils.QuadWordFromBigEndian(expandedBuffer, 16, block);
+ SHA512Expand(expandedBuffer);
+
+ /* Apply the SHA512 compression function */
+ // We are trying to be smart here and avoid as many copies as we can
+ // The perf gain with this method over the straightforward modify and shift
+ // forward is >= 20%, so it's worth the pain
+ for (int j = 0; j < 80;)
+ {
+ T1 = h + Sigma_1(e) + Ch(e, f, g) + _K[j] + expandedBuffer[j];
+ ee = d + T1;
+ aa = T1 + Sigma_0(a) + Maj(a, b, c);
+ j++;
+
+ T1 = g + Sigma_1(ee) + Ch(ee, e, f) + _K[j] + expandedBuffer[j];
+ ff = c + T1;
+ bb = T1 + Sigma_0(aa) + Maj(aa, a, b);
+ j++;
+
+ T1 = f + Sigma_1(ff) + Ch(ff, ee, e) + _K[j] + expandedBuffer[j];
+ gg = b + T1;
+ cc = T1 + Sigma_0(bb) + Maj(bb, aa, a);
+ j++;
+
+ T1 = e + Sigma_1(gg) + Ch(gg, ff, ee) + _K[j] + expandedBuffer[j];
+ hh = a + T1;
+ dd = T1 + Sigma_0(cc) + Maj(cc, bb, aa);
+ j++;
+
+ T1 = ee + Sigma_1(hh) + Ch(hh, gg, ff) + _K[j] + expandedBuffer[j];
+ h = aa + T1;
+ d = T1 + Sigma_0(dd) + Maj(dd, cc, bb);
+ j++;
+
+ T1 = ff + Sigma_1(h) + Ch(h, hh, gg) + _K[j] + expandedBuffer[j];
+ g = bb + T1;
+ c = T1 + Sigma_0(d) + Maj(d, dd, cc);
+ j++;
+
+ T1 = gg + Sigma_1(g) + Ch(g, h, hh) + _K[j] + expandedBuffer[j];
+ f = cc + T1;
+ b = T1 + Sigma_0(c) + Maj(c, d, dd);
+ j++;
+
+ T1 = hh + Sigma_1(f) + Ch(f, g, h) + _K[j] + expandedBuffer[j];
+ e = dd + T1;
+ a = T1 + Sigma_0(b) + Maj(b, c, d);
+ j++;
+ }
+
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+ state[4] += e;
+ state[5] += f;
+ state[6] += g;
+ state[7] += h;
+ }
+
+ private static ulong RotateRight(ulong x, int n)
+ {
+ return (((x) >> (n)) | ((x) << (64 - (n))));
+ }
+
+ private static ulong Ch(ulong x, ulong y, ulong z)
+ {
+ return ((x & y) ^ ((x ^ 0xffffffffffffffff) & z));
+ }
+
+ private static ulong Maj(ulong x, ulong y, ulong z)
+ {
+ return ((x & y) ^ (x & z) ^ (y & z));
+ }
+
+ private static ulong Sigma_0(ulong x)
+ {
+ return (RotateRight(x, 28) ^ RotateRight(x, 34) ^ RotateRight(x, 39));
+ }
+
+ private static ulong Sigma_1(ulong x)
+ {
+ return (RotateRight(x, 14) ^ RotateRight(x, 18) ^ RotateRight(x, 41));
+ }
+
+ private static ulong sigma_0(ulong x)
+ {
+ return (RotateRight(x, 1) ^ RotateRight(x, 8) ^ (x >> 7));
+ }
+
+ private static ulong sigma_1(ulong x)
+ {
+ return (RotateRight(x, 19) ^ RotateRight(x, 61) ^ (x >> 6));
+ }
+
+ /* This function creates W_16,...,W_79 according to the formula
+ W_j <- sigma_1(W_{j-2}) + W_{j-7} + sigma_0(W_{j-15}) + W_{j-16};
+ */
+ private static unsafe void SHA512Expand(ulong* x)
+ {
+ for (int i = 16; i < 80; i++)
+ {
+ x[i] = sigma_1(x[i - 2]) + x[i - 7] + sigma_0(x[i - 15]) + x[i - 16];
+ }
+ }
+ }
+
+ // ported from https://github.com/microsoft/referencesource/blob/a48449cb48a9a693903668a...
+ private class SHAUtils
+ {
+ // digits == number of DWORDs
+ public static unsafe void DWORDFromBigEndian(uint* x, int digits, byte* block)
+ {
+ int i;
+ int j;
+
+ for (i = 0, j = 0; i < digits; i++, j += 4)
+ x[i] = (uint)((block[j] << 24) | (block[j + 1] << 16) | (block[j + 2] << 8) | block[j + 3]);
+ }
+
+ // encodes x (DWORD) into block (unsigned char), most significant byte first.
+ // digits == number of DWORDs
+ public static void DWORDToBigEndian(byte[] block, uint[] x, int digits)
+ {
+ int i;
+ int j;
+
+ for (i = 0, j = 0; i < digits; i++, j += 4)
+ {
+ block[j] = (byte)((x[i] >> 24) & 0xff);
+ block[j + 1] = (byte)((x[i] >> 16) & 0xff);
+ block[j + 2] = (byte)((x[i] >> 8) & 0xff);
+ block[j + 3] = (byte)(x[i] & 0xff);
+ }
+ }
+
+ // digits == number of QWORDs
+ public static unsafe void QuadWordFromBigEndian(ulong* x, int digits, byte* block)
+ {
+ int i;
+ int j;
+
+ for (i = 0, j = 0; i < digits; i++, j += 8)
+ x[i] = (
+ (((ulong)block[j]) << 56) | (((ulong)block[j + 1]) << 48) |
+ (((ulong)block[j + 2]) << 40) | (((ulong)block[j + 3]) << 32) |
+ (((ulong)block[j + 4]) << 24) | (((ulong)block[j + 5]) << 16) |
+ (((ulong)block[j + 6]) << 8) | ((ulong)block[j + 7])
+ );
+ }
+
+ // encodes x (DWORD) into block (unsigned char), most significant byte first.
+ // digits = number of QWORDS
+ public static void QuadWordToBigEndian(byte[] block, ulong[] x, int digits)
+ {
+ int i;
+ int j;
+
+ for (i = 0, j = 0; i < digits; i++, j += 8)
+ {
+ block[j] = (byte)((x[i] >> 56) & 0xff);
+ block[j + 1] = (byte)((x[i] >> 48) & 0xff);
+ block[j + 2] = (byte)((x[i] >> 40) & 0xff);
+ block[j + 3] = (byte)((x[i] >> 32) & 0xff);
+ block[j + 4] = (byte)((x[i] >> 24) & 0xff);
+ block[j + 5] = (byte)((x[i] >> 16) & 0xff);
+ block[j + 6] = (byte)((x[i] >> 8) & 0xff);
+ block[j + 7] = (byte)(x[i] & 0xff);
+ }
+ }
+ }
+ }
+}
diff --git a/build-additional-rids.patch b/build-additional-rids.patch
deleted file mode 100644
index 5bfba35..0000000
--- a/build-additional-rids.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-index 4394a8b..e32d338 100644
---- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-+++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
-@@ -36,12 +36,15 @@ namespace Microsoft.DotNet.Build.Tasks
- // should include the delimiter immediately before the RID, arch, or extension.
- protected string[] BadAtoms = new[] { "-x64", ".x64",
- ".tar", ".gz",
-- "-rhel.7", "-rhel.8",
-- ".rhel.7", ".rhel.8",
-- "-centos.7", "-centos.8",
-- ".centos.7", ".centos.8",
-+ "-rhel.7", "-rhel.8", "-rhel.9",
-+ ".rhel.7", ".rhel.8", ".rhel.9",
-+ "-centos.7", "-centos.8", "-centos.9",
-+ ".centos.7", ".centos.8", ".centos.9",
- ".fedora.30", "-fedora.30",
- ".fedora.31", "-fedora.31",
-+ ".fedora.32", "-fedora.32",
-+ ".fedora.33", "-fedora.33",
-+ ".fedora.34", "-fedora.34",
- "-linux", ".linux",
- "-osx", ".osx",
- "-OSX", ".OSX",
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index fbaea55..c250937 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -91,10 +91,8 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git checkout "${tag}"
git submodule update --init --recursive
clean_dotnet_cache
- sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/runtime.common.props
# FIXME remove contineuonprebuilterror
- patch -p1 -i ../../build-additional-rids.patch
- ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true
+ ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true
./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
popd
popd
@@ -113,8 +111,23 @@ pushd "${tarball_name}"
# not-very-useful artifacts to reduce tarball size
rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
-rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
+rm -r src/NuGet.Client.*/test/EndToEnd
find src/runtime.*/ -depth -name tests -print0 | xargs -0 rm -r
+rm -r src/runtime.*/src/mono/
+rm -r src/Humanizer.*/samples/
+
+# FIXME delete when upstream has a new release with this file fixed
+if ! grep "RSA Data Security" src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/SHAHashProvider.Browser.cs; then
+ echo "SHAHashProvider.Browser.cs has been fixed upstream. Please fix build-dotnet-tarball"
+ exit 1
+fi
+# Delete the bad source
+rm src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/SHAHashProvider.Browser.cs
+# Delete the patch that modifies the bad source
+rm patches/runtime/0001-Use-substitute-SHA-1-implementation-in-wasm-44982.patch
+# Add pre-patched copy
+cp ../SHAHashProvider.Browser.cs src/runtime.*/src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/
+
popd
tar czf "${tarball_name}.tar.gz" "${tarball_name}"
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 8305ab1..9aad30e 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -14,23 +14,23 @@
%global __provides_exclude ^(%{privlibs})\\.so
%global __requires_exclude ^(%{privlibs})\\.so
-# Filter flags not supported by clang
-# -fstack-clash-protection
-# -specs=
-%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
-%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-
-%global host_version 5.0.0-preview.8.20407.11
-%global runtime_version 5.0.0-preview.8.20407.11
-%global aspnetcore_runtime_version 5.0.0-preview.8.20414.8
-%global sdk_version 5.0.100-preview.8.20417.9
-%global templates_version 5.0.0-preview.8.20417.9
+# LTO triggers a compilation error for a source level issue. Given that LTO should not
+# change the validity of any given source and the nature of the error (undefined enum), I
+# suspect a generator program is mis-behaving in some way. This needs further debugging,
+# until that's done, disable LTO. This has to happen before setting the flags below.
+%define _lto_cflags %{nil}
+
+%global host_version 5.0.0
+%global runtime_version 5.0.0
+%global aspnetcore_runtime_version 5.0.0
+%global sdk_version 5.0.100
+%global templates_version 5.0.0
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
-%global host_rpm_version 5.0.0
-%global aspnetcore_runtime_rpm_version 5.0.0
-%global runtime_rpm_version 5.0.0
-%global sdk_rpm_version 5.0.100
+%global host_rpm_version %{host_version}
+%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
+%global runtime_rpm_version %{runtime_version}
+%global sdk_rpm_version %{sdk_version}
# upstream can update releases without revving the SDK version so these don't always match
%global src_version %{sdk_version}
@@ -52,44 +52,36 @@
%global runtime_arch arm64
%endif
-%if 0%{?fedora}
-%global runtime_id fedora.%{fedora}-%{runtime_arch}
-%else
-%if 0%{?centos}
-%global runtime_id centos.%{centos}-%{runtime_arch}
-%else
-%global runtime_id rhel.%{rhel}-%{runtime_arch}
-%endif
-%endif
+%{!?runtime_id:%global runtime_id %(. /etc/os-release ; echo "${ID}.${VERSION_ID%%.*}")-%{runtime_arch}}
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 0.3.preview8%{?dist}
+Release: 1%{?dist}
Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-SDK.tar.gz
+Source0: dotnet-v%{src_version}-SDK-337413b.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
-# https://github.com/dotnet/runtime/pull/39203
-# Do not strip debuginfo from (native/unmanaged) binaries
-Patch100: runtime-dont-strip.patch
+Patch1: source-build-runtime-fixup-linker-order.patch
+
# https://github.com/dotnet/runtime/pull/42094
# Fix linker order when linking with --as-needed
-Patch101: runtime-linker-order.patch
-# https://github.com/dotnet/runtime/pull/39191
-# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
-Patch102: runtime-flags-support.patch
+Patch100: runtime-linker-order.patch
# Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch
-# ExclusiveArch: aarch64 x86_64
+%if 0%{?fedora} > 32 || 0%{?rhel} > 8
+ExclusiveArch: aarch64 x86_64
+%else
ExclusiveArch: x86_64
+%endif
+
BuildRequires: clang
BuildRequires: cmake
@@ -318,7 +310,7 @@ These are not meant for general use.
%prep
-%setup -q -n dotnet-v%{src_version}-SDK
+%setup -q -n dotnet-v%{src_version}-SDK-337413b
%if %{without bootstrap}
# Remove all prebuilts
@@ -344,24 +336,16 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/core
# Disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
+%patch1 -p1
+
pushd src/runtime.*
%patch100 -p1
-%patch101 -p1
-%patch102 -p1
popd
pushd src/sdk.*
%patch500 -p1
popd
-# If CLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE is misisng, add it back
-grep CLR_CMAKE_USE_SYSTEM_LIBUNWIND repos/runtime.common.props || \
- sed -i 's|\$(BuildArguments) </BuildArguments>|$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments>|' repos/runtime.common.props
-
-%if %{use_bundled_libunwind}
-sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/runtime.common.props
-%endif
-
%ifnarch x86_64
mkdir -p artifacts/obj/%{runtime_arch}/Release
cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
@@ -380,9 +364,37 @@ cat /etc/os-release
cp -a %{_libdir}/dotnet previously-built-dotnet
%endif
-export EXTRA_CFLAGS="%{dotnet_cflags}"
-export EXTRA_CXXFLAGS="%{dotnet_cflags}"
-export EXTRA_LDFLAGS="%{dotnet_ldflags}"
+%if 0%{?fedora} > 32 || 0%{?rhel} > 8
+# Setting this macro ensures that only clang supported options will be
+# added to ldflags and cflags.
+%global toolchain clang
+%set_build_flags
+%else
+# Filter flags not supported by clang
+%global dotnet_cflags %(echo %optflags | sed -re 's/-specs=[^ ]*//g')
+%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
+export CFLAGS="%{dotnet_cflags}"
+export CXXFLAGS="%{dotnet_cflags}"
+export LDFLAGS="%{dotnet_ldflags}"
+%endif
+
+%ifarch aarch64
+# -mbranch-protection=standard breaks unwinding in CoreCLR through libunwind
+CFLAGS=$(echo $CFLAGS | sed -e 's/-mbranch-protection=standard //')
+CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-mbranch-protection=standard //')
+%endif
+
+# -fstack-clash-protection breaks CoreCLR
+CFLAGS=$(echo $CFLAGS | sed -e 's/-fstack-clash-protection//' )
+CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-fstack-clash-protection//' )
+
+export EXTRA_CFLAGS="$CFLAGS"
+export EXTRA_CXXFLAGS="$CXXFLAGS"
+export EXTRA_LDFLAGS="$LDFLAGS"
+
+unset CFLAGS
+unset CXXFLAGS
+unset LDFLAGS
#%%if %%{without bootstrap}
# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
@@ -400,6 +412,11 @@ VERBOSE=1 ./build.sh \
/p:LogVerbosity=n \
/p:MinimalConsoleLogOutput=false \
/p:ContinueOnPrebuiltBaselineError=true \
+%if %{use_bundled_libunwind}
+ /p:UseSystemLibunwind=false \
+%else
+ /p:UseSystemLibunwind=true \
+%endif
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
@@ -415,12 +432,14 @@ tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtim
-C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
# Fix executable permissions on files
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.h' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
-find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.xml' -exec chmod -x {} \;
chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/apphost
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
@@ -509,6 +528,15 @@ echo "Testing build results for debug symbols..."
%changelog
+* Fri Dec 04 13:22:13 EST 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-1
+- Update to .NET Core Runtime 5.0.0 and SDK 5.0.100
+
+* Thu Dec 03 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.4.20201202git337413b
+- Update to latest 5.0 pre-GA commit
+
+* Tue Nov 24 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.4.20201123gitdee899c
+- Update to 5.0 pre-GA commit
+
* Mon Sep 14 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.3.preview8
- Update to Preview 8
diff --git a/runtime-dont-strip.patch b/runtime-dont-strip.patch
deleted file mode 100644
index 694face..0000000
--- a/runtime-dont-strip.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Do not strip native/unmanaged symbols from binaries
-
-This is a hack. It rips out the calls to strip directly.
-
-The correct/upstreamable fix is to add a configure/build option to
-keep symbols for some builds, such as those needed by upstream.
-
-diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
-index 8b73581ed14..7697908425e 100644
---- a/eng/native/functions.cmake
-+++ b/eng/native/functions.cmake
-@@ -282,7 +282,7 @@ function(target_precompile_header)
- endif(MSVC)
- endfunction()
-
--function(strip_symbols targetName outputFilename)
-+function(strip_symbols_renamed targetName outputFilename)
- if (CLR_CMAKE_HOST_UNIX)
- set(strip_source_file $<TARGET_FILE:${targetName}>)
-
-@@ -336,8 +336,8 @@ function(strip_symbols targetName outputFilename)
- endfunction()
-
- function(install_with_stripped_symbols targetName kind destination)
-- strip_symbols(${targetName} symbol_file)
-- install_symbols(${symbol_file} ${destination})
-+ # strip_symbols_renamed(${targetName} symbol_file)
-+ # install_symbols(${symbol_file} ${destination})
- if ("${kind}" STREQUAL "TARGETS")
- set(install_source ${targetName})
- elseif("${kind}" STREQUAL "PROGRAMS")
-@@ -375,13 +375,13 @@ function(install_clr)
- foreach(targetName ${INSTALL_CLR_TARGETS})
- list(FIND CLR_CROSS_COMPONENTS_LIST ${targetName} INDEX)
- if (NOT DEFINED CLR_CROSS_COMPONENTS_LIST OR NOT ${INDEX} EQUAL -1)
-- strip_symbols(${targetName} symbol_file)
-+ # strip_symbols_renamed(${targetName} symbol_file)
-
- foreach(destination ${destinations})
- # We don't need to install the export libraries for our DLLs
- # since they won't be directly linked against.
- install(PROGRAMS $<TARGET_FILE:${targetName}> DESTINATION ${destination})
-- install_symbols(${symbol_file} ${destination})
-+ # install_symbols(${symbol_file} ${destination})
-
- if(CLR_CMAKE_PGO_INSTRUMENT)
- if(WIN32)
diff --git a/runtime-flags-support.patch b/runtime-flags-support.patch
deleted file mode 100644
index 921e483..0000000
--- a/runtime-flags-support.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh
-index b976f5fdc6c..853580b1c7a 100755
---- a/eng/native/build-commons.sh
-+++ b/eng/native/build-commons.sh
-@@ -163,6 +163,14 @@ EOF
- return
- fi
-
-+ SAVED_CFLAGS="${CFLAGS}"
-+ SAVED_CXXFLAGS="${CXXFLAGS}"
-+ SAVED_LDFLAGS="${LDFLAGS}"
-+
-+ export CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}"
-+ export CXXFLAGS="${CXXFLAGS} ${EXTRA_CXXFLAGS}"
-+ export LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}"
-+
- if [[ "$__StaticAnalyzer" == 1 ]]; then
- pushd "$intermediatesDir"
-
-@@ -181,6 +189,10 @@ EOF
- $cmake_command --build "$intermediatesDir" --target install -- -j "$__NumProc"
- fi
-
-+ CFLAGS="${SAVED_CFLAGS}"
-+ CXXFLAGS="${SAVED_CXXFLAGS}"
-+ LDFLAGS="${SAVED_LDFLAGS}"
-+
- local exit_code="$?"
- if [[ "$exit_code" != 0 ]]; then
- echo "${__ErrMsgPrefix}Failed to build \"$message\"."
diff --git a/source-build-runtime-fixup-linker-order.patch b/source-build-runtime-fixup-linker-order.patch
new file mode 100644
index 0000000..5a74b5d
--- /dev/null
+++ b/source-build-runtime-fixup-linker-order.patch
@@ -0,0 +1,13 @@
+--- a/patches/runtime/0014-Fix-singlefilehost-build-in-non-portable-mode-42415.patch
++++ b/patches/runtime/0014-Fix-singlefilehost-build-in-non-portable-mode-42415.patch
+@@ -45,8 +45,8 @@
+ # These options are used to force every object to be included even if it's unused.
+ set(START_WHOLE_ARCHIVE -Wl,--whole-archive)
+ @@ -212,3 +217,10 @@ target_link_libraries(singlefilehost
+- ${NATIVE_LIBS}
+- ${END_WHOLE_ARCHIVE}
++ ${NATIVE_LIBS_EXTRA}
++
+ )
+ +
+ +if(NOT FEATURE_DISTRO_AGNOSTIC_SSL)
diff --git a/tests/tests.yml b/tests/tests.yml
index f3825cf..d63f183 100644
--- a/tests/tests.yml
+++ b/tests/tests.yml
@@ -9,6 +9,7 @@
repositories:
- repo: "https://github.com/redhat-developer/dotnet-regular-tests.git"
dest: "dotnet-regular-tests"
+ version: main
tests:
- download_test_runner:
dir: ./
@@ -18,17 +19,15 @@
run: ./turkey --version
- regular:
dir: ./
- run: ./turkey -l={{ remote_artifacts }} -s=$(pwd)/nuget-prerelease dotnet-regular-tests
+ run: ./turkey -l={{ remote_artifacts }} dotnet-regular-tests
required_packages:
- babeltrace
- bash-completion
- binutils
- expect
- - git
- jq
- lldb
- lttng-tools
- - make
- npm
- python3
- strace
commit 260d2eab645885b86643a9c6da358d3b38941f56
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Sep 14 11:29:00 2020 -0400
Update to Preview 8
diff --git a/build-additional-rids.patch b/build-additional-rids.patch
new file mode 100644
index 0000000..5bfba35
--- /dev/null
+++ b/build-additional-rids.patch
@@ -0,0 +1,24 @@
+diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
+index 4394a8b..e32d338 100644
+--- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
++++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs
+@@ -36,12 +36,15 @@ namespace Microsoft.DotNet.Build.Tasks
+ // should include the delimiter immediately before the RID, arch, or extension.
+ protected string[] BadAtoms = new[] { "-x64", ".x64",
+ ".tar", ".gz",
+- "-rhel.7", "-rhel.8",
+- ".rhel.7", ".rhel.8",
+- "-centos.7", "-centos.8",
+- ".centos.7", ".centos.8",
++ "-rhel.7", "-rhel.8", "-rhel.9",
++ ".rhel.7", ".rhel.8", ".rhel.9",
++ "-centos.7", "-centos.8", "-centos.9",
++ ".centos.7", ".centos.8", ".centos.9",
+ ".fedora.30", "-fedora.30",
+ ".fedora.31", "-fedora.31",
++ ".fedora.32", "-fedora.32",
++ ".fedora.33", "-fedora.33",
++ ".fedora.34", "-fedora.34",
+ "-linux", ".linux",
+ "-osx", ".osx",
+ "-OSX", ".OSX",
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index f32d847..fbaea55 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -93,6 +93,7 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
clean_dotnet_cache
sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/runtime.common.props
# FIXME remove contineuonprebuilterror
+ patch -p1 -i ../../build-additional-rids.patch
./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true
./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
popd
@@ -110,10 +111,8 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
-rm -rf .dotnet
-find -type f -iname '*.tar.gz' -delete
-rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*
-find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r
+rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
+find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
find src/runtime.*/ -depth -name tests -print0 | xargs -0 rm -r
popd
diff --git a/dotnet5.0.spec b/dotnet5.0.spec
index 49221a4..8305ab1 100644
--- a/dotnet5.0.spec
+++ b/dotnet5.0.spec
@@ -20,11 +20,11 @@
%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-%global host_version 5.0.0-preview.4.20251.6
-%global runtime_version 5.0.0-preview.4.20251.6
-%global aspnetcore_runtime_version 5.0.0-preview.4.20257.10
-%global sdk_version 5.0.100-preview.4.20161.13
-%global templates_version 5.0.0-preview.4.20161.13
+%global host_version 5.0.0-preview.8.20407.11
+%global runtime_version 5.0.0-preview.8.20407.11
+%global aspnetcore_runtime_version 5.0.0-preview.8.20414.8
+%global sdk_version 5.0.100-preview.8.20417.9
+%global templates_version 5.0.0-preview.8.20417.9
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version 5.0.0
@@ -33,7 +33,7 @@
%global sdk_rpm_version 5.0.100
# upstream can update releases without revving the SDK version so these don't always match
-%global src_version %{sdk_rpm_version}
+%global src_version %{sdk_version}
%if 0%{?fedora} || 0%{?rhel} < 8
%global use_bundled_libunwind 0
@@ -64,25 +64,24 @@
Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 0.2.preview4%{?dist}
-Summary: .NET Core Runtime and SDK
+Release: 0.3.preview8%{?dist}
+Summary: .NET Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-preview4-SDK.tar.gz
+Source0: dotnet-v%{src_version}-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
-# dotnet/runtime PR 39044
-Patch100: runtime-39044-cmake-downgrade.patch
-
-# TODO: upstream this patch
+# https://github.com/dotnet/runtime/pull/39203
# Do not strip debuginfo from (native/unmanaged) binaries
-Patch101: runtime-dont-strip.patch
-
-# TODO: upstream this patch
+Patch100: runtime-dont-strip.patch
+# https://github.com/dotnet/runtime/pull/42094
+# Fix linker order when linking with --as-needed
+Patch101: runtime-linker-order.patch
+# https://github.com/dotnet/runtime/pull/39191
# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
Patch102: runtime-flags-support.patch
@@ -123,13 +122,13 @@ BuildRequires: tar
BuildRequires: zlib-devel
%description
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, macOS and Windows.
It particularly focuses on creating console applications, web
applications and micro-services.
-.NET Core contains a runtime conforming to .NET Standards a set of
+.NET contains a runtime conforming to .NET Standards a set of
framework libraries, an SDK containing compilers and a 'dotnet'
application to drive everything.
@@ -137,18 +136,18 @@ application to drive everything.
%package -n dotnet
Version: %{sdk_rpm_version}
-Summary: .NET Core CLI tools and runtime
+Summary: .NET CLI tools and runtime
Requires: dotnet-sdk-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
%description -n dotnet
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, macOS and Windows.
It particularly focuses on creating console applications, web
applications and micro-services.
-.NET Core contains a runtime conforming to .NET Standards a set of
+.NET contains a runtime conforming to .NET Standards a set of
framework libraries, an SDK containing compilers and a 'dotnet'
application to drive everything.
@@ -159,10 +158,10 @@ Version: %{host_rpm_version}
Summary: .NET command line launcher
%description -n dotnet-host
-The .NET Core host is a command line program that runs a standalone
-.NET core application or launches the SDK.
+The .NET host is a command line program that runs a standalone
+.NET application or launches the SDK.
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, Mac and Windows.
It particularly focuses on creating console applications, web
@@ -172,17 +171,17 @@ applications and micro-services.
%package -n dotnet-hostfxr-5.0
Version: %{host_rpm_version}
-Summary: .NET Core command line host resolver
+Summary: .NET command line host resolver
# Theoretically any version of the host should work. But lets aim for the one
-# provided by this package, or from a newer version of .NET Core
+# provided by this package, or from a newer version of .NET
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
%description -n dotnet-hostfxr-5.0
-The .NET Core host resolver contains the logic to resolve and select
-the right version of the .NET Core SDK or runtime to use.
+The .NET host resolver contains the logic to resolve and select
+the right version of the .NET SDK or runtime to use.
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, Mac and Windows.
It particularly focuses on creating console applications, web
@@ -192,7 +191,7 @@ applications and micro-services.
%package -n dotnet-runtime-5.0
Version: %{runtime_rpm_version}
-Summary: NET Core 5.0 runtime
+Summary: NET 5.0 runtime
Requires: dotnet-hostfxr-5.0%{?_isa} >= %{host_rpm_version}-%{release}
@@ -204,11 +203,11 @@ Provides: bundled(libunwind) = 1.3
%endif
%description -n dotnet-runtime-5.0
-The .NET Core runtime contains everything needed to run .NET Core applications.
+The .NET runtime contains everything needed to run .NET applications.
It includes a high performance Virtual Machine as well as the framework
-libraries used by .NET Core applications.
+libraries used by .NET applications.
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, Mac and Windows.
It particularly focuses on creating console applications, web
@@ -223,9 +222,9 @@ Summary: ASP.NET Core 5.0 runtime
Requires: dotnet-runtime-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
%description -n aspnetcore-runtime-5.0
-The ASP.NET Core runtime contains everything needed to run .NET Core
+The ASP.NET Core runtime contains everything needed to run .NET
web applications. It includes a high performance Virtual Machine as
-well as the framework libraries used by .NET Core applications.
+well as the framework libraries used by .NET applications.
ASP.NET Core is a fast, lightweight and modular platform for creating
cross platform web applications that work on Linux, Mac and Windows.
@@ -237,17 +236,17 @@ applications and micro-services.
%package -n dotnet-templates-5.0
Version: %{sdk_rpm_version}
-Summary: .NET Core 5.0 templates
+Summary: .NET 5.0 templates
# Theoretically any version of the host should work. But lets aim for the one
-# provided by this package, or from a newer version of .NET Core
+# provided by this package, or from a newer version of .NET
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
%description -n dotnet-templates-5.0
-This package contains templates used by the .NET Core SDK.
+This package contains templates used by the .NET SDK.
-ASP.NET Core is a fast, lightweight and modular platform for creating
-cross platform web applications that work on Linux, Mac and Windows.
+.NET is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, Mac and Windows.
It particularly focuses on creating console applications, web
applications and micro-services.
@@ -256,7 +255,7 @@ applications and micro-services.
%package -n dotnet-sdk-5.0
Version: %{sdk_rpm_version}
-Summary: .NET Core 5.0 Software Development Kit
+Summary: .NET 5.0 Software Development Kit
Provides: bundled(js-jquery)
Provides: bundled(npm)
@@ -272,10 +271,10 @@ Requires: netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{r
Requires: dotnet-templates-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
%description -n dotnet-sdk-5.0
-The .NET Core SDK is a collection of command line applications to
-create, build, publish and run .NET Core applications.
+The .NET SDK is a collection of command line applications to
+create, build, publish and run .NET applications.
-.NET Core is a fast, lightweight and modular platform for creating
+.NET is a fast, lightweight and modular platform for creating
cross platform applications that work on Linux, Mac and Windows.
It particularly focuses on creating console applications, web
@@ -293,7 +292,7 @@ Requires: dotnet-host%{?_isa}
%description -n %{1}
This package provides a targeting pack for %{3} %{4}
that allows developers to compile against and target %{3} %{4}
-applications using the .NET Core SDK.
+applications using the .NET SDK.
%files -n %{1}
%dir %{_libdir}/dotnet/packs
@@ -309,17 +308,17 @@ applications using the .NET Core SDK.
%package -n dotnet-sdk-5.0-source-built-artifacts
Version: %{sdk_rpm_version}
-Summary: Internal package for building .NET Core 5.0 Software Development Kit
+Summary: Internal package for building .NET 5.0 Software Development Kit
%description -n dotnet-sdk-5.0-source-built-artifacts
-The .NET Core source-built archive is a collection of packages needed
-to build the .NET Core SDK itself.
+The .NET source-built archive is a collection of packages needed
+to build the .NET SDK itself.
These are not meant for general use.
%prep
-%setup -q -n dotnet-v%{src_version}-preview4-SDK
+%setup -q -n dotnet-v%{src_version}-SDK
%if %{without bootstrap}
# Remove all prebuilts
@@ -383,7 +382,7 @@ cp -a %{_libdir}/dotnet previously-built-dotnet
export EXTRA_CFLAGS="%{dotnet_cflags}"
export EXTRA_CXXFLAGS="%{dotnet_cflags}"
-export EXTRA_LDFLAGS="%%{dotnet_ldflags}"
+export EXTRA_LDFLAGS="%{dotnet_ldflags}"
#%%if %%{without bootstrap}
# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
@@ -409,7 +408,7 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
ls artifacts/%{runtime_arch}/Release
-tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_rpm_version}-preview.4.20161.13-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
+tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
# Install managed symbols
tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
@@ -421,10 +420,12 @@ find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/apphost
-chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/nethost.h
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/singlefilehost
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
@@ -508,6 +509,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Mon Sep 14 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.3.preview8
+- Update to Preview 8
+
* Fri Jul 10 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.2.preview4
- Fix building with custom CFLAGS/CXXFLAGS/LDFLAGS
- Clean up patches
diff --git a/runtime-39044-cmake-downgrade.patch b/runtime-39044-cmake-downgrade.patch
deleted file mode 100644
index 71938d0..0000000
--- a/runtime-39044-cmake-downgrade.patch
+++ /dev/null
@@ -1,1158 +0,0 @@
-diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
-index 534f1d19de6..50d81842274 100644
---- a/eng/common/cross/toolchain.cmake
-+++ b/eng/common/cross/toolchain.cmake
-@@ -83,15 +83,26 @@ endif()
-
- # Specify link flags
-
-+function(add_toolchain_linker_flag Flag)
-+ set(Config "${ARGV1}")
-+ set(CONFIG_SUFFIX "")
-+ if (NOT Config STREQUAL "")
-+ set(CONFIG_SUFFIX "_${Config}")
-+ endif()
-+ set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
-+ set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
-+endfunction()
-+
-+
- if(TARGET_ARCH_NAME STREQUAL "armel")
- if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
-- add_link_options("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
-- add_link_options("-L${CROSS_ROOTFS}/lib")
-- add_link_options("-L${CROSS_ROOTFS}/usr/lib")
-- add_link_options("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
-+ add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
-+ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
-+ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib")
-+ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
- endif()
- elseif(TARGET_ARCH_NAME STREQUAL "x86")
-- add_link_options(-m32)
-+ add_toolchain_linker_flag(-m32)
- endif()
-
- # Specify compile options
-diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh
-index a1a975ce177..9a0c296ff66 100755
---- a/eng/native/build-commons.sh
-+++ b/eng/native/build-commons.sh
-@@ -51,12 +51,9 @@ check_prereqs()
- # Check presence of CMake on the path
- command -v cmake 2>/dev/null || { echo >&2 "Please install cmake before running this script"; exit 1; }
-
-- function version { echo "$@" | awk -F. '{ printf("%d%02d%02d\n", $1,$2,$3); }'; }
--
-- local cmake_version="$(cmake --version | awk '/^cmake version [0-9]+\.[0-9]+\.[0-9]+$/ {print $3}')"
--
-- if [[ "$(version "$cmake_version")" -lt "$(version 3.14.2)" ]]; then
-- echo "Please install CMake 3.14.2 or newer from http://www.cmake.org/download/ or https://apt.kitware.com and ensure it is on your path."; exit 1;
-+ if [[ "$__HostOS" == "OSX" ]]; then
-+ # Check presence of pkg-config on the path
-+ command -v pkg-config 2>/dev/null || { echo >&2 "Please install pkg-config before running this script, see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/..."; exit 1; }
- fi
-
- if [[ "$__UseNinja" == 1 ]]; then
-@@ -156,8 +153,8 @@ build_native()
- cmake_command="emcmake $cmake_command"
- fi
-
-- echo "Executing $cmake_command --build \"$intermediatesDir\" --target install -j $__NumProc"
-- $cmake_command --build "$intermediatesDir" --target install -j "$__NumProc"
-+ echo "Executing $cmake_command --build \"$intermediatesDir\" --target install -- -j $__NumProc"
-+ $cmake_command --build "$intermediatesDir" --target install -- -j "$__NumProc"
- fi
-
- local exit_code="$?"
-diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake
-index 2937916ced9..07fd6f75f6f 100644
---- a/eng/native/configurecompiler.cmake
-+++ b/eng/native/configurecompiler.cmake
-@@ -8,8 +8,6 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
- set(CMAKE_CXX_STANDARD 11)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
--cmake_policy(SET CMP0083 NEW)
--
- include(CheckCXXCompilerFlag)
-
- # "configureoptimization.cmake" must be included after CLR_CMAKE_HOST_UNIX has been set.
-@@ -40,11 +38,18 @@ set(CMAKE_CXX_FLAGS_CHECKED "")
- set(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
- set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "")
-
-+set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "")
-+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "")
-+set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "")
-+set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
-+set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
-+set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "")
-+
- add_compile_definitions("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1>")
- add_compile_definitions("$<$<OR:$<CONFIG:RELEASE>,$<CONFIG:RELWITHDEBINFO>>:NDEBUG;URTBLDENV_FRIENDLY=Retail>")
-
- if (MSVC)
-- add_link_options(/GUARD:CF)
-+ add_linker_flag(/GUARD:CF)
-
- # Linker flags
- #
-@@ -57,48 +62,51 @@ if (MSVC)
- endif ()
-
- #Do not create Side-by-Side Assembly Manifest
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/MANIFEST:NO>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO")
- # can handle addresses larger than 2 gigabytes
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/LARGEADDRESSAWARE>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LARGEADDRESSAWARE")
- #Compatible with Data Execution Prevention
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/NXCOMPAT>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NXCOMPAT")
- #Use address space layout randomization
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/DYNAMICBASE>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DYNAMICBASE")
- #shrink pdb size
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/PDBCOMPRESS>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /PDBCOMPRESS")
-
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/DEBUG>)
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/IGNORE:4197,4013,4254,4070,4221>)
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/SUBSYSTEM:WINDOWS,${WINDOWS_SUBSYSTEM_VERSION}>)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG")
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /IGNORE:4197,4013,4254,4070,4221")
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS,${WINDOWS_SUBSYSTEM_VERSION}")
-
- set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
-
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/DEBUG>)
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/PDBCOMPRESS>)
-- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/STACK:1572864>)
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /PDBCOMPRESS")
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1572864")
-
- # Debug build specific flags
-- add_link_options($<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>>:/NOVCFEATURE>)
-+ set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NOVCFEATURE")
-+ set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "${CMAKE_SHARED_LINKER_FLAGS_CHECKED} /NOVCFEATURE")
-
- # Checked build specific flags
-- add_link_options($<$<CONFIG:CHECKED>:/INCREMENTAL:NO>) # prevent "warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification"
-- add_link_options($<$<CONFIG:CHECKED>:/OPT:REF>)
-- add_link_options($<$<CONFIG:CHECKED>:/OPT:NOICF>)
-+ add_linker_flag(/INCREMENTAL:NO CHECKED) # prevent "warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification"
-+ add_linker_flag(/OPT:REF CHECKED)
-+ add_linker_flag(/OPT:NOICF CHECKED)
-
- # Release build specific flags
-- add_link_options($<$<CONFIG:RELEASE>:/LTCG>)
-- add_link_options($<$<CONFIG:RELEASE>:/OPT:REF>)
-- add_link_options($<$<CONFIG:RELEASE>:/OPT:ICF>)
-+ add_linker_flag(/LTCG RELEASE)
-+ add_linker_flag(/OPT:REF RELEASE)
-+ add_linker_flag(/OPT:ICF RELEASE)
-+ add_linker_flag(/INCREMENTAL:NO RELEASE)
- set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
-
- # ReleaseWithDebugInfo build specific flags
-- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/LTCG>)
-- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/OPT:REF>)
-- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/OPT:ICF>)
-+ add_linker_flag(/LTCG RELWITHDEBINFO)
-+ add_linker_flag(/OPT:REF RELWITHDEBINFO)
-+ add_linker_flag(/OPT:ICF RELWITHDEBINFO)
- set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
-
- # Force uCRT to be dynamically linked for Release build
-- add_link_options("$<$<CONFIG:RELEASE>:/NODEFAULTLIB:libucrt.lib;/DEFAULTLIB:ucrt.lib>")
-+ add_linker_flag(/NODEFAULTLIB:libucrt.lib RELEASE)
-+ add_linker_flag(/DEFAULTLIB:ucrt.lib RELEASE)
-
- elseif (CLR_CMAKE_HOST_UNIX)
- # Set the values to display when interactively configuring CMAKE_BUILD_TYPE
-@@ -157,11 +165,10 @@ elseif (CLR_CMAKE_HOST_UNIX)
-
- # -fdata-sections -ffunction-sections: each function has own section instead of one per .o file (needed for --gc-sections)
- # -O1: optimization level used instead of -O0 to avoid compile error "invalid operand for inline asm constraint"
-- add_compile_definitions("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:${CLR_SANITIZE_CXX_OPTIONS};-fdata-sections;--ffunction-sections;-O1>")
-- add_link_options($<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>>:${CLR_SANITIZE_LINK_OPTIONS}>)
--
-+ add_compile_options("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:${CLR_SANITIZE_CXX_OPTIONS};-fdata-sections;--ffunction-sections;-O1>")
-+ add_linker_flag("${CLR_SANITIZE_LINK_OPTIONS}" DEBUG CHECKED)
- # -Wl and --gc-sections: drop unused sections\functions (similar to Windows /Gy function-level-linking)
-- add_link_options("$<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>>:${CLR_SANITIZE_LINK_OPTIONS};-Wl,--gc-sections>")
-+ add_linker_flag("-Wl,--gc-sections" DEBUG CHECKED)
- endif ()
- endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
- endif(MSVC)
-@@ -173,15 +180,18 @@ endif(MSVC)
- # ./build-native.sh cmakeargs "-DCLR_ADDITIONAL_COMPILER_OPTIONS=<...>" cmakeargs "-DCLR_ADDITIONAL_LINKER_FLAGS=<...>"
- #
- if(CLR_CMAKE_HOST_UNIX)
-- add_link_options(${CLR_ADDITIONAL_LINKER_FLAGS})
-+ foreach(ADDTL_LINKER_FLAG ${CLR_ADDITIONAL_LINKER_FLAGS})
-+ add_linker_flag(${ADDTL_LINKER_FLAG})
-+ endforeach()
- endif(CLR_CMAKE_HOST_UNIX)
-
- if(CLR_CMAKE_HOST_LINUX)
- add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
-- add_link_options(-Wl,--build-id=sha1 -Wl,-z,relro,-z,now)
-+ add_linker_flag(-Wl,--build-id=sha1)
-+ add_linker_flag(-Wl,-z,relro,-z,now)
- elseif(CLR_CMAKE_HOST_FREEBSD)
- add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
-- add_link_options(LINKER:--build-id=sha1)
-+ add_linker_flag("-Wl,--build-id=sha1")
- elseif(CLR_CMAKE_HOST_SUNOS)
- set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /opt/local/include)
- set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /opt/local/lib)
-@@ -357,7 +367,7 @@ if (CLR_CMAKE_HOST_UNIX)
- if(CLR_CMAKE_HOST_OSX)
- set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=10.12)
- add_compile_options(${MACOS_VERSION_MIN_FLAGS})
-- add_link_options(${MACOS_VERSION_MIN_FLAGS})
-+ add_linker_flag(${MACOS_VERSION_MIN_FLAGS})
- endif(CLR_CMAKE_HOST_OSX)
- endif(CLR_CMAKE_HOST_UNIX)
-
-@@ -514,7 +524,7 @@ if(CLR_CMAKE_ENABLE_CODE_COVERAGE)
-
- add_compile_options(-fprofile-arcs)
- add_compile_options(-ftest-coverage)
-- add_link_options(--coverage)
-+ add_linker_flag(--coverage)
- else()
- message(FATAL_ERROR "Code coverage builds not supported on current platform")
- endif(CLR_CMAKE_HOST_UNIX)
-diff --git a/eng/native/configureplatform.cmake b/eng/native/configureplatform.cmake
-index 1c5254d8496..4a4131cb05d 100644
---- a/eng/native/configureplatform.cmake
-+++ b/eng/native/configureplatform.cmake
-@@ -1,4 +1,3 @@
--include(CheckPIESupported)
- include(${CMAKE_CURRENT_LIST_DIR}/functions.cmake)
-
- # If set, indicates that this is not an officially supported release
-@@ -363,19 +362,10 @@ if(NOT CLR_CMAKE_TARGET_EMSCRIPTEN)
- # but since we know that PIE is supported, we can safely skip this redundant check).
- #
- # The default linker on Solaris also does not support PIE.
-- if(NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_SUNOS)
-- # All code we build should be compiled as position independent
-- get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
-- if("CXX" IN_LIST languages)
-- set(CLR_PIE_LANGUAGE CXX)
-- else()
-- set(CLR_PIE_LANGUAGE C)
-- endif()
-- check_pie_supported(OUTPUT_VARIABLE PIE_SUPPORT_OUTPUT LANGUAGES ${CLR_PIE_LANGUAGE})
-- if(NOT MSVC AND NOT CMAKE_${CLR_PIE_LANGUAGE}_LINK_PIE_SUPPORTED)
-- message(WARNING "PIE is not supported at link time: ${PIE_SUPPORT_OUTPUT}.\n"
-- "PIE link options will not be passed to linker.")
-- endif()
-+ if(NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_SUNOS AND NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_HOST_TVOS AND NOT CLR_CMAKE_HOST_IOS AND NOT MSVC)
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
-+ add_compile_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-fPIE>)
-+ add_compile_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-fPIC>)
- endif()
-
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
-index b7f8f463804..f4a96cbe35e 100644
---- a/eng/native/functions.cmake
-+++ b/eng/native/functions.cmake
-@@ -123,7 +123,7 @@ function(preprocess_compile_asm)
- set(options "")
- set(oneValueArgs OUTPUT_OBJECTS)
- set(multiValueArgs ASM_FILES)
-- cmake_parse_arguments(PARSE_ARGV 0 COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}")
-+ cmake_parse_arguments(COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
-
- get_include_directories_asm(ASM_INCLUDE_DIRECTORIES)
-
-@@ -209,7 +209,7 @@ function(target_precompile_header)
- set(options "")
- set(oneValueArgs TARGET HEADER)
- set(multiValueArgs ADDITIONAL_INCLUDE_DIRECTORIES)
-- cmake_parse_arguments(PARSE_ARGV 0 PRECOMPILE_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}")
-+ cmake_parse_arguments(PRECOMPILE_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
-
- if ("${PRECOMPILE_HEADERS_TARGET}" STREQUAL "")
- message(SEND_ERROR "No target supplied to target_precompile_header.")
-@@ -321,7 +321,7 @@ endfunction()
- function(install_clr)
- set(oneValueArgs ADDITIONAL_DESTINATION)
- set(multiValueArgs TARGETS)
-- cmake_parse_arguments(PARSE_ARGV 0 INSTALL_CLR "${options}" "${oneValueArgs}" "${multiValueArgs}")
-+ cmake_parse_arguments(INSTALL_CLR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
-
- if ("${INSTALL_CLR_TARGETS}" STREQUAL "")
- message(FATAL_ERROR "At least one target must be passed to install_clr(TARGETS )")
-@@ -377,6 +377,15 @@ function(disable_pax_mprotect targetName)
- endif()
- endfunction()
-
-+if (CMAKE_VERSION VERSION_LESS "3.12")
-+ # Polyfill add_compile_definitions when it is unavailable
-+ function(add_compile_definitions)
-+ get_directory_property(DIR_COMPILE_DEFINITIONS COMPILE_DEFINITIONS)
-+ list(APPEND DIR_COMPILE_DEFINITIONS ${ARGV})
-+ set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${DIR_COMPILE_DEFINITIONS}")
-+ endfunction()
-+endif()
-+
- function(_add_executable)
- if(NOT WIN32)
- add_executable(${ARGV} ${VERSION_FILE_PATH})
-@@ -415,3 +424,16 @@ endfunction()
- function(add_executable_clr)
- _add_executable(${ARGV})
- endfunction()
-+
-+# add_linker_flag(Flag [Config1 Config2 ...])
-+function(add_linker_flag Flag)
-+ if (ARGN STREQUAL "")
-+ set("CMAKE_EXE_LINKER_FLAGS" "${CMAKE_EXE_LINKER_FLAGS} ${Flag}" PARENT_SCOPE)
-+ set("CMAKE_SHARED_LINKER_FLAGS" "${CMAKE_SHARED_LINKER_FLAGS} ${Flag}" PARENT_SCOPE)
-+ else()
-+ foreach(Config ${ARGN})
-+ set("CMAKE_EXE_LINKER_FLAGS_${Config}" "${CMAKE_EXE_LINKER_FLAGS_${Config}} ${Flag}" PARENT_SCOPE)
-+ set("CMAKE_SHARED_LINKER_FLAGS_${Config}" "${CMAKE_SHARED_LINKER_FLAGS_${Config}} ${Flag}" PARENT_SCOPE)
-+ endforeach()
-+ endif()
-+endfunction()
-diff --git a/eng/native/gen-buildsys.sh b/eng/native/gen-buildsys.sh
-index f27bb33e357..1b4c2e02c59 100755
---- a/eng/native/gen-buildsys.sh
-+++ b/eng/native/gen-buildsys.sh
-@@ -91,6 +91,9 @@ if [[ "$build_arch" == "wasm" ]]; then
- cmake_command="emcmake $cmake_command"
- fi
-
-+# We have to be able to build with CMake 3.6.2, so we can't use the -S or -B options
-+pushd "$3"
-+
- # Include CMAKE_USER_MAKE_RULES_OVERRIDE as uninitialized since it will hold its value in the CMake cache otherwise can cause issues when branch switching
- $cmake_command \
- -G "$generator" \
-@@ -98,5 +101,6 @@ $cmake_command \
- "-DCMAKE_INSTALL_PREFIX=$__CMakeBinDir" \
- $cmake_extra_defines \
- $__UnprocessedCMakeArgs \
-- -S "$1" \
-- -B "$3"
-+ "$1"
-+
-+popd
-diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt
-index 5fa572c4fcd..071ac2cf5fa 100644
---- a/src/coreclr/CMakeLists.txt
-+++ b/src/coreclr/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required(VERSION 3.14.2)
-+cmake_minimum_required(VERSION 3.6.2)
-
- cmake_policy(SET CMP0042 NEW)
-
-diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake
-index 4b119809017..04bde2bc20b 100644
---- a/src/coreclr/pgosupport.cmake
-+++ b/src/coreclr/pgosupport.cmake
-@@ -1,5 +1,18 @@
--include(CheckIPOSupported)
--check_ipo_supported(RESULT HAVE_LTO)
-+include(CheckCXXSourceCompiles)
-+include(CheckCXXCompilerFlag)
-+
-+# VC++ guarantees support for LTCG (LTO's equivalent)
-+if(NOT WIN32)
-+ # Function required to give CMAKE_REQUIRED_* local scope
-+ function(check_have_lto)
-+ set(CMAKE_REQUIRED_FLAGS -flto)
-+ set(CMAKE_REQUIRED_LIBRARIES -flto -fuse-ld=gold)
-+ check_cxx_source_compiles("int main() { return 0; }" HAVE_LTO)
-+ endfunction(check_have_lto)
-+ check_have_lto()
-+
-+ check_cxx_compiler_flag(-faligned-new COMPILER_SUPPORTS_F_ALIGNED_NEW)
-+endif(NOT WIN32)
-
- # Adds Profile Guided Optimization (PGO) flags to the current target
- function(add_pgo TargetName)
-diff --git a/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt b/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
-index dcd39e346c9..7b471d53726 100644
---- a/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
-+++ b/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
-@@ -1,3 +1,4 @@
-+cmake_minimum_required(VERSION 3.8)
- # Quick note: The CMake C# support is using the CSC bundled with the MSBuild that the native build runs on, not the one supplied by the local .NET SDK.
-
- project(DacTableGen LANGUAGES CSharp)
-diff --git a/src/coreclr/src/binder/CMakeLists.txt b/src/coreclr/src/binder/CMakeLists.txt
-index 3a66c81e10e..208f1214dd0 100644
---- a/src/coreclr/src/binder/CMakeLists.txt
-+++ b/src/coreclr/src/binder/CMakeLists.txt
-@@ -82,11 +82,13 @@ endif(CLR_CMAKE_TARGET_WIN32)
- convert_to_absolute_path(BINDER_SOURCES ${BINDER_SOURCES})
- convert_to_absolute_path(BINDER_CROSSGEN_SOURCES ${BINDER_CROSSGEN_SOURCES})
-
--add_library_clr(v3binder
-- STATIC
-+add_library_clr(v3binder_obj
-+ OBJECT
- ${BINDER_SOURCES}
- )
--add_dependencies(v3binder eventing_headers)
-+add_dependencies(v3binder_obj eventing_headers)
-+add_library(v3binder INTERFACE)
-+target_sources(v3binder INTERFACE $<TARGET_OBJECTS:v3binder_obj>)
-
- add_library_clr(v3binder_crossgen
- STATIC
-diff --git a/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt b/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
-index 391f70eff43..fdcf344c16a 100644
---- a/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
-+++ b/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
-@@ -10,9 +10,11 @@ set(BCLTYPE_SOURCES
- variant.cpp
- )
-
--add_library_clr(bcltype
-- STATIC
-+add_library_clr(bcltype_obj
-+ OBJECT
- ${BCLTYPE_SOURCES}
- )
-
--add_dependencies(bcltype eventing_headers)
-+add_dependencies(bcltype_obj eventing_headers)
-+add_library(bcltype INTERFACE)
-+target_sources(bcltype INTERFACE $<TARGET_OBJECTS:bcltype_obj>)
-diff --git a/src/coreclr/src/classlibnative/float/CMakeLists.txt b/src/coreclr/src/classlibnative/float/CMakeLists.txt
-index 44d40c92592..3c066620f76 100644
---- a/src/coreclr/src/classlibnative/float/CMakeLists.txt
-+++ b/src/coreclr/src/classlibnative/float/CMakeLists.txt
-@@ -7,9 +7,12 @@ set(FLOAT_SOURCES
- floatsingle.cpp
- )
-
--add_library_clr(comfloat_wks
-- STATIC
-+add_library_clr(comfloat_wks_obj
-+ OBJECT
- ${FLOAT_SOURCES}
- )
-
--add_dependencies(comfloat_wks eventing_headers)
-+add_dependencies(comfloat_wks_obj eventing_headers)
-+
-+add_library(comfloat_wks INTERFACE)
-+target_sources(comfloat_wks INTERFACE $<TARGET_OBJECTS:comfloat_wks_obj>)
-diff --git a/src/coreclr/src/debug/debug-pal/CMakeLists.txt b/src/coreclr/src/debug/debug-pal/CMakeLists.txt
-index ac1e48fb5fb..213fa59e784 100644
---- a/src/coreclr/src/debug/debug-pal/CMakeLists.txt
-+++ b/src/coreclr/src/debug/debug-pal/CMakeLists.txt
-@@ -34,4 +34,6 @@ if(CLR_CMAKE_HOST_UNIX)
-
- endif(CLR_CMAKE_HOST_UNIX)
-
--_add_library(debug-pal STATIC ${TWO_WAY_PIPE_SOURCES})
-+_add_library(debug-pal_obj OBJECT ${TWO_WAY_PIPE_SOURCES})
-+add_library(debug-pal INTERFACE)
-+target_sources(debug-pal INTERFACE $<TARGET_OBJECTS:debug-pal_obj>)
-diff --git a/src/coreclr/src/debug/ee/wks/CMakeLists.txt b/src/coreclr/src/debug/ee/wks/CMakeLists.txt
-index ee6c482ce76..3dd5e3612df 100644
---- a/src/coreclr/src/debug/ee/wks/CMakeLists.txt
-+++ b/src/coreclr/src/debug/ee/wks/CMakeLists.txt
-@@ -9,9 +9,9 @@ if (CLR_CMAKE_TARGET_WIN32)
-
- if(CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64)
-
-- preprocess_compile_asm(ASM_FILES ${ASM_FILE} OUTPUT_OBJECTS ASM_OBJECTS)
-+ preprocess_compile_asm(TARGET cordbee_wks_obj ASM_FILES ${ASM_FILE} OUTPUT_OBJECTS ASM_OBJECTS)
-
-- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${ASM_OBJECTS})
-+ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ${ASM_FILE} ${ASM_OBJECTS})
-
- else ()
-
-@@ -23,19 +23,21 @@ if (CLR_CMAKE_TARGET_WIN32)
-
- set_source_files_properties(${ASM_FILE} PROPERTIES COMPILE_OPTIONS "${ASM_OPTIONS}")
-
-- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${ASM_FILE})
-+ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ${ASM_FILE})
-
- endif()
-
- else ()
-
- if(CLR_CMAKE_HOST_ARCH_AMD64 OR CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64 OR CLR_CMAKE_HOST_ARCH_I386)
-- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S)
-+ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S)
- else()
- message(FATAL_ERROR "Unknown platform")
- endif()
-
- endif (CLR_CMAKE_TARGET_WIN32)
-
--target_precompile_header(TARGET cordbee_wks HEADER stdafx.h)
--add_dependencies(cordbee_wks eventing_headers)
-+target_precompile_header(TARGET cordbee_wks_obj HEADER stdafx.h)
-+add_dependencies(cordbee_wks_obj eventing_headers)
-+add_library(cordbee_wks INTERFACE)
-+target_sources(cordbee_wks INTERFACE $<TARGET_OBJECTS:cordbee_wks_obj>)
-diff --git a/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt b/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
-index 88364658f11..362da1f6483 100644
---- a/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
-+++ b/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
-@@ -10,5 +10,6 @@ set( ILDBSYMLIB_SOURCES
- symwrite.cpp
- )
-
--add_library_clr(ildbsymlib ${ILDBSYMLIB_SOURCES})
--
-+add_library_clr(ildbsymlib_obj OBJECT ${ILDBSYMLIB_SOURCES})
-+add_library(ildbsymlib INTERFACE)
-+target_sources(ildbsymlib INTERFACE $<TARGET_OBJECTS:ildbsymlib_obj>)
-diff --git a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
-index 777a2869e4f..066b75ab01f 100644
---- a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
-+++ b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
-@@ -9,20 +9,20 @@ if (CLR_CMAKE_HOST_WIN32)
-
- list(APPEND CLR_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def)
-
-- add_link_options(/ENTRY:CoreDllMain)
-+ add_linker_flag("/ENTRY:CoreDllMain")
-
- # Incremental linking results in the linker inserting extra padding and routing function calls via thunks that can break the
- # invariants (e.g. size of region between Jit_PatchedCodeLast-Jit_PatchCodeStart needs to fit in a page).
-- add_link_options(/INCREMENTAL:NO)
-+ add_linker_flag("/INCREMENTAL:NO")
-
- # Delay load libraries required for WinRT as that is not supported on all platforms
-- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll")
-- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll")
-- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll")
-- add_link_options("/DELAYLOAD:api-ms-win-ro-typeresolution-l1-1-0.dll")
-+ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll")
-+ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll")
-+ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll")
-+ add_linker_flag("/DELAYLOAD:api-ms-win-ro-typeresolution-l1-1-0.dll")
-
- # Delay load version.dll so that we can specify how to search when loading it as it is not part of Windows' known DLLs
-- add_link_options("/DELAYLOAD:version.dll")
-+ add_linker_flag("/DELAYLOAD:version.dll")
-
- # No library groups for Win32
- set(START_LIBRARY_GROUP)
-@@ -35,7 +35,7 @@ else(CLR_CMAKE_HOST_WIN32)
- if(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_NETBSD)
- # This option is necessary to ensure that the overloaded delete operator defined inside
- # of the utilcode will be used instead of the standard library delete operator.
-- add_link_options("LINKER:-Bsymbolic")
-+ add_linker_flag("-Wl,-Bsymbolic")
-
- # The following linked options can be inserted into the linker libraries list to
- # ensure proper resolving of circular references between a subset of the libraries.
-@@ -110,7 +110,7 @@ set(CORECLR_LIBRARIES
- utilcode
- v3binder
- libraries-native
-- System.Globalization.Native-Static
-+ System.Globalization.Native-static
- interop
- )
-
-@@ -162,7 +162,12 @@ if(FEATURE_EVENT_TRACE)
- endif(CLR_CMAKE_HOST_UNIX)
- endif(FEATURE_EVENT_TRACE)
-
--target_link_libraries(coreclr ${CORECLR_LIBRARIES})
-+if(FEATURE_MERGE_JIT_AND_ENGINE)
-+ set(CLRJIT_STATIC clrjit_static)
-+endif(FEATURE_MERGE_JIT_AND_ENGINE)
-+
-+target_sources(coreclr PUBLIC $<TARGET_OBJECTS:cee_wks_core>)
-+target_link_libraries(coreclr PUBLIC ${CORECLR_LIBRARIES} ${CLRJIT_STATIC} cee_wks)
-
- # Create the runtime module index header file containing the coreclr build id
- # for xplat and the timestamp/size on Windows.
-diff --git a/src/coreclr/src/dlls/mscorrc/CMakeLists.txt b/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
-index 08cf27aaf80..e114ec19cea 100644
---- a/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
-+++ b/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
-@@ -19,7 +19,9 @@ if(CLR_CMAKE_HOST_WIN32)
- else()
- build_resources(${CMAKE_CURRENT_SOURCE_DIR}/include.rc mscorrc TARGET_CPP_FILE)
-
-- add_library_clr(mscorrc STATIC
-+ add_library_clr(mscorrc_obj OBJECT
- ${TARGET_CPP_FILE}
- )
-+ add_library(mscorrc INTERFACE)
-+ target_sources(mscorrc INTERFACE $<TARGET_OBJECTS:mscorrc_obj>)
- endif(CLR_CMAKE_HOST_WIN32)
-diff --git a/src/coreclr/src/gcinfo/CMakeLists.txt b/src/coreclr/src/gcinfo/CMakeLists.txt
-index b0b67462562..50a1722a8ea 100644
---- a/src/coreclr/src/gcinfo/CMakeLists.txt
-+++ b/src/coreclr/src/gcinfo/CMakeLists.txt
-@@ -16,11 +16,14 @@ endif(CLR_CMAKE_TARGET_ARCH_I386)
-
- convert_to_absolute_path(GCINFO_SOURCES ${GCINFO_SOURCES})
-
--add_library_clr(gcinfo
-- STATIC
-+add_library_clr(gcinfo_obj
-+ OBJECT
- ${GCINFO_SOURCES}
- )
-
-+add_library(gcinfo INTERFACE)
-+target_sources(gcinfo INTERFACE $<TARGET_OBJECTS:gcinfo_obj>)
-+
- add_library_clr(gcinfo_crossgen
- STATIC
- ${GCINFO_SOURCES}
-diff --git a/src/coreclr/src/inc/CMakeLists.txt b/src/coreclr/src/inc/CMakeLists.txt
-index 60fad88e77d..4f75d3a882d 100644
---- a/src/coreclr/src/inc/CMakeLists.txt
-+++ b/src/coreclr/src/inc/CMakeLists.txt
-@@ -58,7 +58,9 @@ if(FEATURE_JIT_PITCHING)
- endif(FEATURE_JIT_PITCHING)
-
- # Compile *_i.cpp to lib
--_add_library(corguids ${CORGUIDS_SOURCES})
-+_add_library(corguids_obj OBJECT ${CORGUIDS_SOURCES})
-+add_library(corguids INTERFACE)
-+target_sources(corguids INTERFACE $<TARGET_OBJECTS:corguids_obj>)
-
- # Binplace the inc files for packaging later.
-
-@@ -75,4 +77,3 @@ _install (FILES cfi.h
- gcinfoencoder.h
- gcinfotypes.h
- DESTINATION inc)
--_install (TARGETS corguids DESTINATION lib)
-diff --git a/src/coreclr/src/interop/CMakeLists.txt b/src/coreclr/src/interop/CMakeLists.txt
-index d7eaa1b04ae..3924b4fdbb4 100644
---- a/src/coreclr/src/interop/CMakeLists.txt
-+++ b/src/coreclr/src/interop/CMakeLists.txt
-@@ -30,7 +30,10 @@ endif(WIN32)
-
- convert_to_absolute_path(INTEROP_SOURCES ${INTEROP_SOURCES})
-
--add_library_clr(interop
-- STATIC
-+add_library_clr(interop_obj
-+ OBJECT
- ${INTEROP_SOURCES}
- )
-+
-+add_library(interop INTERFACE)
-+target_sources(interop INTERFACE $<TARGET_OBJECTS:interop_obj>)
-diff --git a/src/coreclr/src/jit/dll/CMakeLists.txt b/src/coreclr/src/jit/dll/CMakeLists.txt
-index ec7cddc78ed..01bdbf5a731 100644
---- a/src/coreclr/src/jit/dll/CMakeLists.txt
-+++ b/src/coreclr/src/jit/dll/CMakeLists.txt
-@@ -2,17 +2,17 @@ project(ClrJit)
-
- set_source_files_properties(${JIT_EXPORTS_FILE} PROPERTIES GENERATED TRUE)
-
-+add_library_clr(clrjit_obj
-+ OBJECT
-+ ${JIT_CORE_SOURCES}
-+ ${JIT_ARCH_SOURCES}
-+)
-+
- if(CLR_CMAKE_HOST_UNIX)
-- add_library_clr(clrjit_static
-- STATIC
-- ${SHARED_LIB_SOURCES}
-- ${JIT_ARCH_SOURCES}
-- )
-- add_dependencies(clrjit_static coreclrpal gcinfo)
--else()
-- add_library_clr(clrjit_static
-- ${SHARED_LIB_SOURCES}
-- ${JIT_ARCH_SOURCES}
-- )
-+ add_dependencies(clrjit_obj coreclrpal gcinfo)
- endif(CLR_CMAKE_HOST_UNIX)
--target_precompile_header(TARGET clrjit_static HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR})
-+
-+target_precompile_header(TARGET clrjit_obj HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR})
-+
-+add_library(clrjit_static INTERFACE)
-+target_sources(clrjit_static INTERFACE $<TARGET_OBJECTS:clrjit_obj>)
-diff --git a/src/coreclr/src/md/ceefilegen/CMakeLists.txt b/src/coreclr/src/md/ceefilegen/CMakeLists.txt
-index 90749c806b2..fd0f8424d97 100644
---- a/src/coreclr/src/md/ceefilegen/CMakeLists.txt
-+++ b/src/coreclr/src/md/ceefilegen/CMakeLists.txt
-@@ -25,8 +25,11 @@ if (CLR_CMAKE_TARGET_WIN32)
- list(APPEND CEEFILEGEN_SOURCES ${CEEFILEGEN_HEADERS})
- endif (CLR_CMAKE_TARGET_WIN32)
-
--add_library_clr(ceefgen
-- STATIC
-+add_library_clr(ceefgen_obj
-+ OBJECT
- ${CEEFILEGEN_SOURCES}
- )
--target_precompile_header(TARGET ceefgen HEADER stdafx.h)
-+target_precompile_header(TARGET ceefgen_obj HEADER stdafx.h)
-+
-+add_library(ceefgen INTERFACE)
-+target_sources(ceefgen INTERFACE $<TARGET_OBJECTS:ceefgen_obj>)
-diff --git a/src/coreclr/src/md/compiler/CMakeLists.txt b/src/coreclr/src/md/compiler/CMakeLists.txt
-index 3b916cdc9fe..f9f80db2500 100644
---- a/src/coreclr/src/md/compiler/CMakeLists.txt
-+++ b/src/coreclr/src/md/compiler/CMakeLists.txt
-@@ -58,9 +58,11 @@ add_library_clr(mdcompiler_dac ${MDCOMPILER_SOURCES})
- set_target_properties(mdcompiler_dac PROPERTIES DAC_COMPONENT TRUE)
- target_precompile_header(TARGET mdcompiler_dac HEADER stdafx.h)
-
--add_library_clr(mdcompiler_wks ${MDCOMPILER_SOURCES})
--target_compile_definitions(mdcompiler_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
--target_precompile_header(TARGET mdcompiler_wks HEADER stdafx.h)
-+add_library_clr(mdcompiler_wks_obj OBJECT ${MDCOMPILER_SOURCES})
-+target_compile_definitions(mdcompiler_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
-+target_precompile_header(TARGET mdcompiler_wks_obj HEADER stdafx.h)
-+add_library(mdcompiler_wks INTERFACE)
-+target_sources(mdcompiler_wks INTERFACE $<TARGET_OBJECTS:mdcompiler_wks_obj>)
-
- add_library_clr(mdcompiler-dbi ${MDCOMPILER_SOURCES})
- set_target_properties(mdcompiler-dbi PROPERTIES DBI_COMPONENT TRUE)
-diff --git a/src/coreclr/src/md/enc/CMakeLists.txt b/src/coreclr/src/md/enc/CMakeLists.txt
-index 7220736b9ca..82af8434296 100644
---- a/src/coreclr/src/md/enc/CMakeLists.txt
-+++ b/src/coreclr/src/md/enc/CMakeLists.txt
-@@ -48,9 +48,11 @@ add_library_clr(mdruntimerw_dac ${MDRUNTIMERW_SOURCES})
- set_target_properties(mdruntimerw_dac PROPERTIES DAC_COMPONENT TRUE)
- target_precompile_header(TARGET mdruntimerw_dac HEADER stdafx.h)
-
--add_library_clr(mdruntimerw_wks ${MDRUNTIMERW_SOURCES})
--target_compile_definitions(mdruntimerw_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
--target_precompile_header(TARGET mdruntimerw_wks HEADER stdafx.h)
-+add_library_clr(mdruntimerw_wks_obj OBJECT ${MDRUNTIMERW_SOURCES})
-+target_compile_definitions(mdruntimerw_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
-+target_precompile_header(TARGET mdruntimerw_wks_obj HEADER stdafx.h)
-+add_library(mdruntimerw_wks INTERFACE)
-+target_sources(mdruntimerw_wks INTERFACE $<TARGET_OBJECTS:mdruntimerw_wks_obj>)
-
- add_library_clr(mdruntimerw-dbi ${MDRUNTIMERW_SOURCES})
- set_target_properties(mdruntimerw-dbi PROPERTIES DBI_COMPONENT TRUE)
-diff --git a/src/coreclr/src/md/hotdata/CMakeLists.txt b/src/coreclr/src/md/hotdata/CMakeLists.txt
-index c6168d2a4b0..88475cb72f4 100644
---- a/src/coreclr/src/md/hotdata/CMakeLists.txt
-+++ b/src/coreclr/src/md/hotdata/CMakeLists.txt
-@@ -33,8 +33,10 @@ add_library_clr(mdhotdata_dac ${MDHOTDATA_SOURCES})
- set_target_properties(mdhotdata_dac PROPERTIES DAC_COMPONENT TRUE)
- target_precompile_header(TARGET mdhotdata_dac HEADER external.h)
-
--add_library_clr(mdhotdata_full ${MDHOTDATA_SOURCES})
--target_precompile_header(TARGET mdhotdata_full HEADER external.h)
-+add_library_clr(mdhotdata_full_obj OBJECT ${MDHOTDATA_SOURCES})
-+target_precompile_header(TARGET mdhotdata_full_obj HEADER external.h)
-+add_library(mdhotdata_full INTERFACE)
-+target_sources(mdhotdata_full INTERFACE $<TARGET_OBJECTS:mdhotdata_full_obj>)
-
- add_library_clr(mdhotdata_crossgen ${MDHOTDATA_SOURCES})
- set_target_properties(mdhotdata_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
-diff --git a/src/coreclr/src/md/runtime/CMakeLists.txt b/src/coreclr/src/md/runtime/CMakeLists.txt
-index 6dc193e14a7..7e0e83f1114 100644
---- a/src/coreclr/src/md/runtime/CMakeLists.txt
-+++ b/src/coreclr/src/md/runtime/CMakeLists.txt
-@@ -47,9 +47,11 @@ add_library_clr(mdruntime_dac ${MDRUNTIME_SOURCES})
- set_target_properties(mdruntime_dac PROPERTIES DAC_COMPONENT TRUE)
- target_precompile_header(TARGET mdruntime_dac HEADER stdafx.h)
-
--add_library_clr(mdruntime_wks ${MDRUNTIME_SOURCES})
--target_compile_definitions(mdruntime_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
--target_precompile_header(TARGET mdruntime_wks HEADER stdafx.h)
-+add_library_clr(mdruntime_wks_obj OBJECT ${MDRUNTIME_SOURCES})
-+target_compile_definitions(mdruntime_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
-+target_precompile_header(TARGET mdruntime_wks_obj HEADER stdafx.h)
-+add_library(mdruntime_wks INTERFACE)
-+target_sources(mdruntime_wks INTERFACE $<TARGET_OBJECTS:mdruntime_wks_obj>)
-
- add_library_clr(mdruntime-dbi ${MDRUNTIME_SOURCES})
- set_target_properties(mdruntime-dbi PROPERTIES DBI_COMPONENT TRUE)
-diff --git a/src/coreclr/src/pal/src/CMakeLists.txt b/src/coreclr/src/pal/src/CMakeLists.txt
-index e7c1629d5b2..7818deef050 100644
---- a/src/coreclr/src/pal/src/CMakeLists.txt
-+++ b/src/coreclr/src/pal/src/CMakeLists.txt
-@@ -256,10 +256,12 @@ add_library(coreclrpal
- # > warning for library: libtracepointprovider.a the table of contents is empty (no object file members in the library define global symbols)
- #
- if(CLR_CMAKE_TARGET_LINUX)
-- add_library(tracepointprovider
-- STATIC
-+ add_library(tracepointprovider_obj
-+ OBJECT
- misc/tracepointprovider.cpp
- )
-+ add_library(tracepointprovider INTERFACE)
-+ target_sources(tracepointprovider INTERFACE $<TARGET_OBJECTS:tracepointprovider_obj>)
- endif(CLR_CMAKE_TARGET_LINUX)
-
- if(CLR_CMAKE_TARGET_OSX)
-diff --git a/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt b/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
-index 39b9826d1ab..8e6968cf783 100644
---- a/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
-+++ b/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
-@@ -1,8 +1,8 @@
--include(FindPython)
-+include(FindPythonInterp)
-
- set (GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genDummyProvider.py)
-
--set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
-+set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
-
- execute_process(
- COMMAND ${GENERATE_COMMAND} --dry-run
-diff --git a/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt b/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
-index 234dea19b75..d55dab3557f 100644
---- a/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
-+++ b/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
-@@ -1,7 +1,7 @@
--include(FindPython)
-+include(FindPythonInterp)
- set (GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genLttngProvider.py)
-
--set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
-+set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
-
- execute_process(
- COMMAND ${GENERATE_COMMAND} --dry-run
-diff --git a/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt b/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
-index 000ee2d2fb0..845fae656be 100644
---- a/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
-+++ b/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
-@@ -5,10 +5,10 @@ set(SOURCES
- set(EVENT_MANIFEST ${VM_DIR}/ClrEtwAll.man)
- set(TEST_GENERATOR ${CLR_DIR}/src/scripts/genEventingTests.py)
-
--include(FindPython)
-+include(FindPythonInterp)
-
- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/clralltestevents.cpp
-- COMMAND ${Python_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}"
-+ COMMAND ${PYTHON_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}"
- DEPENDS ${EVENT_MANIFEST} ${TEST_GENERATOR}
- COMMENT "Updating clralltestevents.cpp"
- )
-diff --git a/src/coreclr/src/unwinder/CMakeLists.txt b/src/coreclr/src/unwinder/CMakeLists.txt
-index 4421ea9f6f6..41a0219bbf7 100644
---- a/src/coreclr/src/unwinder/CMakeLists.txt
-+++ b/src/coreclr/src/unwinder/CMakeLists.txt
-@@ -20,8 +20,10 @@ list(APPEND UNWINDER_SOURCES
- convert_to_absolute_path(UNWINDER_SOURCES ${UNWINDER_SOURCES})
-
- if(CLR_CMAKE_HOST_UNIX)
-- add_library_clr(unwinder_wks ${UNWINDER_SOURCES})
-- add_dependencies(unwinder_wks eventing_headers)
-+ add_library_clr(unwinder_wks_obj OBJECT ${UNWINDER_SOURCES})
-+ add_dependencies(unwinder_wks_obj eventing_headers)
-+ add_library(unwinder_wks INTERFACE)
-+ target_sources(unwinder_wks INTERFACE $<TARGET_OBJECTS:unwinder_wks_obj>)
- endif(CLR_CMAKE_HOST_UNIX)
-
- add_library_clr(unwinder_dac ${UNWINDER_SOURCES})
-diff --git a/src/coreclr/src/utilcode/CMakeLists.txt b/src/coreclr/src/utilcode/CMakeLists.txt
-index aa28b2db603..f8082fc9076 100644
---- a/src/coreclr/src/utilcode/CMakeLists.txt
-+++ b/src/coreclr/src/utilcode/CMakeLists.txt
-@@ -98,7 +98,9 @@ convert_to_absolute_path(UTILCODE_CROSSGEN_SOURCES ${UTILCODE_CROSSGEN_SOURCES})
- convert_to_absolute_path(UTILCODE_STATICNOHOST_SOURCES ${UTILCODE_STATICNOHOST_SOURCES})
-
- add_library_clr(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES})
--add_library_clr(utilcode STATIC ${UTILCODE_SOURCES})
-+add_library_clr(utilcode_obj OBJECT ${UTILCODE_SOURCES})
-+add_library(utilcode INTERFACE)
-+target_sources(utilcode INTERFACE $<TARGET_OBJECTS:utilcode_obj>)
- add_library_clr(utilcodestaticnohost STATIC ${UTILCODE_STATICNOHOST_SOURCES})
- add_library_clr(utilcode_crossgen STATIC ${UTILCODE_CROSSGEN_SOURCES})
-
-@@ -106,9 +108,9 @@ if(CLR_CMAKE_HOST_UNIX)
- target_link_libraries(utilcodestaticnohost nativeresourcestring)
- target_link_libraries(utilcode_crossgen nativeresourcestring)
- target_link_libraries(utilcode_dac nativeresourcestring)
-- target_link_libraries(utilcode nativeresourcestring)
-+ target_link_libraries(utilcode INTERFACE nativeresourcestring)
- add_dependencies(utilcode_dac coreclrpal)
-- add_dependencies(utilcode coreclrpal)
-+ add_dependencies(utilcode_obj coreclrpal)
- endif(CLR_CMAKE_HOST_UNIX)
-
-
-@@ -121,10 +123,10 @@ set_target_properties(utilcode_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
- target_compile_definitions(utilcode_dac PRIVATE SELF_NO_HOST)
- target_compile_definitions(utilcodestaticnohost PRIVATE SELF_NO_HOST)
- add_dependencies(utilcode_dac ${UTILCODE_DEPENDENCIES})
--add_dependencies(utilcode ${UTILCODE_DEPENDENCIES})
-+add_dependencies(utilcode_obj ${UTILCODE_DEPENDENCIES})
- add_dependencies(utilcode_crossgen ${UTILCODE_DEPENDENCIES})
- add_dependencies(utilcodestaticnohost ${UTILCODE_DEPENDENCIES})
- target_precompile_header(TARGET utilcode_dac HEADER stdafx.h)
--target_precompile_header(TARGET utilcode HEADER stdafx.h)
-+target_precompile_header(TARGET utilcode_obj HEADER stdafx.h)
- target_precompile_header(TARGET utilcode_crossgen HEADER stdafx.h)
- target_precompile_header(TARGET utilcodestaticnohost HEADER stdafx.h)
-diff --git a/src/coreclr/src/vm/CMakeLists.txt b/src/coreclr/src/vm/CMakeLists.txt
-index 3e37cebdc10..2b20d7d910a 100644
---- a/src/coreclr/src/vm/CMakeLists.txt
-+++ b/src/coreclr/src/vm/CMakeLists.txt
-@@ -923,7 +923,7 @@ list(APPEND VM_HEADERS_DAC
-
- if (CLR_CMAKE_TARGET_WIN32)
- list(APPEND VM_SOURCES_WKS ${VM_HEADERS_WKS})
-- list(APPEND VM_SOURCES_WKS_ARCH_ASM ${VM_HEADERS_WKS_ARCH_ASM})
-+ list(APPEND VM_SOURCES_WKS ${VM_HEADERS_WKS_ARCH_ASM})
- list(APPEND VM_SOURCES_DAC ${VM_HEADERS_DAC})
- endif(CLR_CMAKE_TARGET_WIN32)
-
-diff --git a/src/coreclr/src/vm/eventing/CMakeLists.txt b/src/coreclr/src/vm/eventing/CMakeLists.txt
-index 98dd158df54..e2bf024fc59 100644
---- a/src/coreclr/src/vm/eventing/CMakeLists.txt
-+++ b/src/coreclr/src/vm/eventing/CMakeLists.txt
-@@ -8,12 +8,13 @@ else()
- set(NEED_XPLAT_HEADER ON)
- endif()
-
--include(FindPython)
-+include(FindPythonInterp)
-
- set (EventingHeaders
- ${GENERATED_INCLUDE_DIR}/etmdummy.h
- ${GENERATED_INCLUDE_DIR}/clretwallmain.h
- ${GENERATED_INCLUDE_DIR}/clreventpipewriteevents.h
-+ ${GENERATED_INCLUDE_DIR}/clrproviders.h
- )
-
- if (NEED_XPLAT_HEADER)
-@@ -24,7 +25,7 @@ endif()
- set(GENEVENTING_SCRIPT ${CLR_DIR}/src/scripts/genEventing.py)
-
- add_custom_target(eventing_headers
-- ${Python_EXECUTABLE} ${GENEVENTING_SCRIPT} --man ${EVENT_MANIFEST} --inc ${GENERATED_INCLUDE_DIR} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG}
-+ ${PYTHON_EXECUTABLE} ${GENEVENTING_SCRIPT} --man ${EVENT_MANIFEST} --inc ${GENERATED_INCLUDE_DIR} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG}
- DEPENDS ${EVENT_MANIFEST} ${GENEVENTING_SCRIPT}
- VERBATIM
- )
-diff --git a/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt b/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
-index 34a067e1ec5..4c7df2fbb3c 100644
---- a/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
-+++ b/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
-@@ -1,4 +1,4 @@
--include(FindPython)
-+include(FindPythonInterp)
-
- set(ETW_PROVIDER_SCRIPT ${CLR_DIR}/src/scripts/genEtwProvider.py)
-
-@@ -14,5 +14,5 @@ set (ETW_PROVIDER_OUTPUTS
- set_source_files_properties(${ETW_PROVIDER_OUTPUTS} PROPERTIES GENERATED TRUE)
-
- add_custom_target(eventprovider
-- ${Python_EXECUTABLE} ${ETW_PROVIDER_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${GENERATED_INCLUDE_DIR}
-+ ${PYTHON_EXECUTABLE} ${ETW_PROVIDER_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${GENERATED_INCLUDE_DIR}
- DEPENDS ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS} ${ETW_PROVIDER_SCRIPT})
-diff --git a/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt b/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
-index 00b3f6f386f..00d79737e54 100644
---- a/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
-+++ b/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
-@@ -1,9 +1,9 @@
--include(FindPython)
-+include(FindPythonInterp)
-
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
- set(GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genEventPipe.py)
--set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${CMAKE_CURRENT_BINARY_DIR} ${NONEXTERN_ARG})
-+set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${CMAKE_CURRENT_BINARY_DIR} ${NONEXTERN_ARG})
-
- execute_process(
- COMMAND ${GENERATE_COMMAND} --dry-run
-@@ -28,10 +28,8 @@ add_custom_command(OUTPUT ${EVENTPIPE_SOURCES}
- COMMAND ${GENERATE_COMMAND}
- DEPENDS ${GENERATE_SCRIPT} ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS})
-
--add_library_clr(eventpipe STATIC ${EVENTPIPE_SOURCES})
--set_target_properties(eventpipe PROPERTIES LINKER_LANGUAGE CXX)
--add_dependencies(eventpipe eventing_headers)
--
--if (NOT CLR_CMAKE_TARGET_WIN32)
-- _install(TARGETS eventpipe DESTINATION lib)
--endif()
-+add_library_clr(eventpipe_obj OBJECT ${EVENTPIPE_SOURCES})
-+set_target_properties(eventpipe_obj PROPERTIES LINKER_LANGUAGE CXX)
-+add_dependencies(eventpipe_obj eventing_headers)
-+add_library(eventpipe INTERFACE)
-+target_sources(eventpipe INTERFACE $<TARGET_OBJECTS:eventpipe_obj>)
-diff --git a/src/coreclr/src/vm/wks/CMakeLists.txt b/src/coreclr/src/vm/wks/CMakeLists.txt
-index 1e94b575fd6..5d355f6adcb 100644
---- a/src/coreclr/src/vm/wks/CMakeLists.txt
-+++ b/src/coreclr/src/vm/wks/CMakeLists.txt
-@@ -7,13 +7,19 @@ if (CLR_CMAKE_TARGET_WIN32)
-
- endif (CLR_CMAKE_TARGET_WIN32)
-
--add_library_clr(cee_wks ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM})
--target_precompile_header(TARGET cee_wks HEADER common.h)
-+add_library_clr(cee_wks_core OBJECT ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM})
-+add_library_clr(cee_wks_obj OBJECT ${VM_SOURCES_WKS_SPECIAL})
-+
-+target_precompile_header(TARGET cee_wks_core HEADER common.h)
-+target_precompile_header(TARGET cee_wks_obj HEADER common.h)
-+
- if (MSVC)
- # mscorlib.cpp does not compile with precompiled header file
- set_source_files_properties(../mscorlib.cpp PROPERTIES COMPILE_FLAGS "/Y-")
- endif()
--add_dependencies(cee_wks eventing_headers)
-+
-+add_dependencies(cee_wks_core eventing_headers)
-+add_dependencies(cee_wks_obj eventing_headers)
-
- if (CLR_CMAKE_TARGET_WIN32)
-
-@@ -45,8 +51,16 @@ if (CLR_CMAKE_TARGET_WIN32)
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.inc
- )
-
-- add_dependencies(cee_wks asmconstants_inc)
-+ add_dependencies(cee_wks_core asmconstants_inc)
-+ add_dependencies(cee_wks_obj asmconstants_inc)
-
- endif(NOT CLR_CMAKE_HOST_ARCH_ARM AND NOT CLR_CMAKE_HOST_ARCH_ARM64)
-
- endif (CLR_CMAKE_TARGET_WIN32)
-+
-+add_custom_target(preprocessd_asm DEPENDS ${VM_WKS_ARCH_ASM_OBJECTS})
-+add_dependencies(cee_wks_core preprocessd_asm)
-+add_dependencies(cee_wks_obj preprocessd_asm)
-+
-+add_library(cee_wks INTERFACE)
-+target_sources(cee_wks INTERFACE $<TARGET_OBJECTS:cee_wks_obj> ${VM_WKS_ARCH_ASM_OBJECTS})
-diff --git a/src/coreclr/tests/CMakeLists.txt b/src/coreclr/tests/CMakeLists.txt
-index 53dbb85a58b..c5417cba7d0 100644
---- a/src/coreclr/tests/CMakeLists.txt
-+++ b/src/coreclr/tests/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required(VERSION 3.14.2)
-+cmake_minimum_required(VERSION 3.6.2)
-
- cmake_policy(SET CMP0042 NEW)
- project(Tests)
-diff --git a/src/installer/corehost/CMakeLists.txt b/src/installer/corehost/CMakeLists.txt
-index 43a59a1a695..dff0496cdd8 100644
---- a/src/installer/corehost/CMakeLists.txt
-+++ b/src/installer/corehost/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required(VERSION 3.14.2)
-+cmake_minimum_required(VERSION 3.6.2)
-
- project(corehost)
-
-diff --git a/src/installer/corehost/cli/exe.cmake b/src/installer/corehost/cli/exe.cmake
-index de8cd49396b..732faf97ff9 100644
---- a/src/installer/corehost/cli/exe.cmake
-+++ b/src/installer/corehost/cli/exe.cmake
-@@ -5,7 +5,6 @@
- project (${DOTNET_PROJECT_NAME})
-
- cmake_policy(SET CMP0011 NEW)
--cmake_policy(SET CMP0083 NEW)
-
- include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)
-
-diff --git a/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt b/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
-index bcf6a051229..8572a6318ec 100644
---- a/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
-+++ b/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
-@@ -2,7 +2,6 @@
- # The .NET Foundation licenses this file to you under the MIT license.
- # See the LICENSE file in the project root for more information.
-
--cmake_minimum_required (VERSION 2.6)
- project(mockhostfxr_2_2)
-
- set(DOTNET_PROJECT_NAME "mockhostfxr_2_2")
-diff --git a/src/libraries/Native/Unix/CMakeLists.txt b/src/libraries/Native/Unix/CMakeLists.txt
-index f14ada69fee..cb174fe5013 100644
---- a/src/libraries/Native/Unix/CMakeLists.txt
-+++ b/src/libraries/Native/Unix/CMakeLists.txt
-@@ -1,19 +1,14 @@
--cmake_minimum_required(VERSION 3.14.2)
-+cmake_minimum_required(VERSION 3.6.2)
-+if(CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
-+ # CMake 3.14.5 contains bug fixes for iOS
-+ cmake_minimum_required(VERSION 3.14.5)
-+ endif()
- cmake_policy(SET CMP0042 NEW)
-
- project(CoreFX C)
-
- include(${CLR_ENG_NATIVE_DIR}/configuretools.cmake)
-
--if(CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
-- # CMake 3.14.5 contains bug fixes for iOS
-- cmake_minimum_required(VERSION 3.14.5)
--endif()
--
--if(NOT CLR_CMAKE_TARGET_ARCH_WASM)
-- cmake_policy(SET CMP0083 NEW)
--endif(NOT CLR_CMAKE_TARGET_ARCH_WASM)
--
- set(CMAKE_MACOSX_RPATH ON)
- set(CMAKE_INSTALL_PREFIX $ENV{__CMakeBinDir})
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
-@@ -167,7 +162,8 @@ if(CLR_CMAKE_TARGET_UNIX)
- if(NOT CLR_CMAKE_TARGET_ARCH_WASM AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS)
- if(CLR_CMAKE_TARGET_OSX)
- add_definitions(-DTARGET_OSX)
-- add_link_options(-Wl,-bind_at_load)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-bind_at_load")
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-bind_at_load" )
- else()
- add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
- if(CLR_CMAKE_TARGET_SUNOS)
-@@ -175,7 +171,8 @@ if(CLR_CMAKE_TARGET_UNIX)
- else()
- # -z,now is required for full relro.
- # see https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-re...
-- add_link_options(-Wl,--build-id=sha1 -Wl,-z,relro,-z,now)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now")
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now" )
- endif()
- endif()
- endif()
-diff --git a/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt b/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
-index bcfc5dd106a..ebcb5a02b3f 100644
---- a/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
-+++ b/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
-@@ -79,14 +79,15 @@ if (GEN_SHARED_LIB)
- install_with_stripped_symbols (System.Globalization.Native PROGRAMS .)
- endif()
-
--add_library(System.Globalization.Native-Static
-- STATIC
-+add_library(System.Globalization.Native-obj
-+ OBJECT
- ${NATIVEGLOBALIZATION_SOURCES}
- )
-
--set_target_properties(System.Globalization.Native-Static PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1)
-+set_target_properties(System.Globalization.Native-obj PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1)
-
--install (TARGETS System.Globalization.Native-Static DESTINATION .)
-+add_library(System.Globalization.Native-static INTERFACE)
-+target_sources(System.Globalization.Native-static INTERFACE $<TARGET_OBJECTS:System.Globalization.Native-obj>)
-
- if(NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID)
- if (GEN_SHARED_LIB)
diff --git a/runtime-linker-order.patch b/runtime-linker-order.patch
new file mode 100644
index 0000000..6ca413f
--- /dev/null
+++ b/runtime-linker-order.patch
@@ -0,0 +1,20 @@
+diff --git a/src/installer/corehost/cli/apphost/static/CMakeLists.txt b/src/installer/corehost/cli/apphost/static/CMakeLists.txt
+index 85ea6ffe642..e6369f6b9ad 100644
+--- a/src/installer/corehost/cli/apphost/static/CMakeLists.txt
++++ b/src/installer/corehost/cli/apphost/static/CMakeLists.txt
+@@ -204,11 +204,12 @@ target_link_libraries(singlefilehost
+ libhostcommon
+ ${CORECLR_LIBRARIES}
+
++ ${START_WHOLE_ARCHIVE}
++ ${NATIVE_LIBS}
++ ${END_WHOLE_ARCHIVE}
++
+ ${ZLIB_LIBRARIES}
+ ${LIBGSS}
+ ${NATIVE_LIBS_EXTRA}
+
+- ${START_WHOLE_ARCHIVE}
+- ${NATIVE_LIBS}
+- ${END_WHOLE_ARCHIVE}
+ )
commit ccec65f6fac2e9f96e34068fe4f31bf72648e1af
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Aug 10 11:10:29 2020 -0400
Iniitial update to .NET 5.0
diff --git a/README.md b/README.md
index 816aba3..4d4fb58 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Overview
-This is the .NET Core 3.1 package for Fedora.
+This is the .NET Core 5.0 package for Fedora.
This package is maintained by the Fedora DotNet SIG (Special Interest
Group). You can find out more about the DotNet SIG at:
@@ -10,7 +10,7 @@ Group). You can find out more about the DotNet SIG at:
- https://lists.fedoraproject.org/archives/list/dotnet-sig@lists.fedoraproj...
Please report any issues [using
-bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet3.1).
+bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet5.0).
# Specification
@@ -27,8 +27,8 @@ with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
2. Checkout the forked repository.
- - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet3.1.git`
- - `cd dotnet3.1`
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
+ - `cd dotnet5.0`
3. Make your changes. Don't forget to add a changelog.
@@ -71,8 +71,8 @@ with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
2. Checkout the forked repository.
- - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet3.1.git`
- - `cd dotnet3.1`
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet5.0.git`
+ - `cd dotnet5.0`
3. Build the new upstream source tarball. Update the versions in the
spec file. Add a changelog. This is generally automated by the
diff --git a/build-bootstrap-tarball b/build-bootstrap-tarball
new file mode 100755
index 0000000..d3f3547
--- /dev/null
+++ b/build-bootstrap-tarball
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+set -euo pipefail
+
+set -x
+
+sdk_version=3.1.105
+
+arch=$(uname -m)
+if [[ $arch == "x86_64" ]]; then
+ arch=x64
+elif [[ $arch == "aarch64" ]]; then
+ arch=arm64
+fi
+
+if rpm -qa | grep libunwind; then
+ echo "error: libunwind is installed. Not a good idea for bootstrapping."
+ exit 1
+fi
+if rpm -qa | grep dotnet ; then
+ echo "error: dotnet is installed. Not a good idea for bootstrapping."
+ exit 1
+fi
+if [ -d /usr/lib/dotnet ] || [ -d /usr/lib64/dotnet ] || [ -d /usr/share/dotnet ] ; then
+ echo "error: one of /usr/lib/dotnet /usr/lib64/dotnet or /usr/share/dotnet/ exists. Not a good idea for bootstrapping."
+ exit 1
+fi
+if command -v dotnet ; then
+ echo "error: dotnet is in $PATH. Not a good idea for bootstrapping."
+ exit 1
+fi
+
+if [ ! -d dotnet-source-build-tarball ]; then
+ if [ ! -d source-build ]; then
+ git clone https://github.com/dotnet/source-build
+ fi
+ pushd source-build
+ sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.common.props
+ git clean -xdf
+ ./build-source-tarball.sh ../dotnet-source-build-tarball/ -- -p:DownloadSourceBuildReferencePackagesTimeoutSeconds=100000
+ popd
+fi
+
+rm -rf dotnet-v${sdk_version}-SDK dotnet-v${sdk_version}-SDK.tar.gz
+
+cp -a dotnet-source-build-tarball dotnet-v${sdk_version}-SDK
+cp -a source-build/artifacts/$arch/Release/Private.SourceBuilt.Artifacts.*.tar.gz dotnet-v${sdk_version}-SDK/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
+
+tar czf dotnet-v${sdk_version}-SDK-$arch.tar.gz dotnet-v${sdk_version}-SDK
+
diff --git a/build-coreclr-clang10.patch b/build-coreclr-clang10.patch
deleted file mode 100644
index 3b13cb1..0000000
--- a/build-coreclr-clang10.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff --git a/configurecompiler.cmake b/configurecompiler.cmake
-index d769e82f57..4936c8b00d 100644
---- a/configurecompiler.cmake
-+++ b/configurecompiler.cmake
-@@ -474,6 +474,7 @@ if (CLR_CMAKE_PLATFORM_UNIX)
- add_compile_options(-Wno-unused-variable)
- add_compile_options(-Wno-unused-value)
- add_compile_options(-Wno-unused-function)
-+ add_compile_options(-Wno-error=misleading-indentation)
-
- #These seem to indicate real issues
- add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-invalid-offsetof>)
-diff --git a/src/inc/slist.h b/src/inc/slist.h
-index f05d763dc6..abebe04d47 100644
---- a/src/inc/slist.h
-+++ b/src/inc/slist.h
-@@ -160,13 +160,13 @@ public:
- void Init()
- {
- LIMITED_METHOD_CONTRACT;
-- m_pHead = &m_link;
-+ m_pHead = PTR_SLink(&m_link);
- // NOTE :: fHead variable is template argument
- // the following code is a compiled in, only if the fHead flag
- // is set to false,
- if (!fHead)
- {
-- m_pTail = &m_link;
-+ m_pTail = PTR_SLink(&m_link);
- }
- }
-
-@@ -274,7 +274,7 @@ public:
- SLink *ret = SLink::FindAndRemove(m_pHead, GetLink(pObj), &prior);
-
- if (ret == m_pTail)
-- m_pTail = prior;
-+ m_pTail = PTR_SLink(prior);
-
- return GetObject(ret);
- }
-diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
-index 08a35c8f62..43eb648a14 100644
---- a/src/pal/inc/pal.h
-+++ b/src/pal/inc/pal.h
-@@ -145,7 +145,7 @@ typedef PVOID NATIVE_LIBRARY_HANDLE;
-
- /******************* Compiler-specific glue *******************************/
- #ifndef THROW_DECL
--#if defined(_MSC_VER) || defined(__llvm__) || !defined(__cplusplus)
-+#if defined(_MSC_VER) || !defined(__cplusplus)
- #define THROW_DECL
- #else
- #define THROW_DECL throw()
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 3314c7e..f32d847 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -91,14 +91,10 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git checkout "${tag}"
git submodule update --init --recursive
clean_dotnet_cache
- sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.proj
- mkdir -p patches/coreclr/
- cp ../../build-coreclr-clang10.patch patches/coreclr
- mkdir -p patches/corefx/
- cp ../../corefx-42900-clang-10.patch patches/corefx
- cp -r /usr/lib64/dotnet "${temp_dir}"
- ./build.sh --with-sdk ../dotnet /p:ArchiveDownloadedPackages=true
- ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build --with-sdk ../dotnet
+ sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/runtime.common.props
+ # FIXME remove contineuonprebuilterror
+ ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true
+ ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
popd
popd
@@ -114,11 +110,12 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
+rm -rf .dotnet
find -type f -iname '*.tar.gz' -delete
-rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
-find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
+rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*
+find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r
rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
-find src/coreclr.*/ -depth -name tests -print0 | xargs -0 rm -r
+find src/runtime.*/ -depth -name tests -print0 | xargs -0 rm -r
popd
tar czf "${tarball_name}.tar.gz" "${tarball_name}"
diff --git a/copr-build b/copr-build
new file mode 100755
index 0000000..8a7cf46
--- /dev/null
+++ b/copr-build
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -euo pipefail
+
+set -x
+
+fedpkg --release f32 srpm 2>&1 | tee fedpkg.output
+
+srpm_name=$(grep 'Wrote: ' fedpkg.output | cut -d' ' -f 2)
+
+copr-cli build @dotnet-sig/dotnet-preview "${srpm_name}"
diff --git a/core-setup-hardening-flags.patch b/core-setup-hardening-flags.patch
deleted file mode 100644
index 3f6b91c..0000000
--- a/core-setup-hardening-flags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/src/settings.cmake b/src/settings.cmake
---- a/src/settings.cmake
-+++ b/src/settings.cmake
-@@ -218,6 +218,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic -Bsymbolic-functions")
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1")
-+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
- add_compile_options(-fstack-protector-strong)
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- add_compile_options(-fstack-protector)
diff --git a/coreclr-hardening-flags.patch b/coreclr-hardening-flags.patch
deleted file mode 100644
index d58d735..0000000
--- a/coreclr-hardening-flags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/src/debug/createdump/CMakeLists.txt b/src/debug/createdump/CMakeLists.txt
---- a/src/debug/createdump/CMakeLists.txt
-+++ b/src/debug/createdump/CMakeLists.txt
-@@ -21,6 +21,7 @@ include_directories(BEFORE ${VM_DIR})
- add_definitions(-DPAL_STDCPP_COMPAT)
-
- add_compile_options(-fPIE)
-+add_link_options(-pie)
-
- set(CREATEDUMP_SOURCES
- createdump.cpp
diff --git a/corefx-39633-cgroupv2-mountpoints.patch b/corefx-39633-cgroupv2-mountpoints.patch
deleted file mode 100644
index 34fbecb..0000000
--- a/corefx-39633-cgroupv2-mountpoints.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 1864630f762160e1cb439362cc0577471624192a Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Fri, 19 Jul 2019 19:18:51 -0400
-Subject: [PATCH] Fix up cgroup2fs in Interop.MountPoints.FormatInfo
-
-`stat -fc %T /sys/fs/cgroup` calls this file system `cgroup2fs`
-
-Add the cgroup2fs file system magic number. Available from:
-
- - https://www.kernel.org/doc/Documentation/cgroup-v2.txt
- - man 2 statfs
-
-Move cgroup2fs next to cgroupfs in the drive type list, since it is also
-DriveType.Ram.
----
- .../Unix/System.Native/Interop.MountPoints.FormatInfo.cs | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
-index af38a2285ba2..4240bd4853ab 100644
---- a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
-+++ b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
-@@ -47,6 +47,7 @@ internal enum UnixFileSystemTypes : long
- btrfs = 0x9123683E,
- ceph = 0x00C36400,
- cgroupfs = 0x0027E0EB,
-+ cgroup2fs = 0x63677270,
- cifs = 0xFF534D42,
- coda = 0x73757245,
- coherent = 0x012FF7B7,
-@@ -231,7 +232,6 @@ private static DriveType GetDriveType(string fileSystemName)
- case "bpf_fs":
- case "btrfs":
- case "btrfs_test":
-- case "cgroup2fs":
- case "coh":
- case "daxfs":
- case "drvfs":
-@@ -384,6 +384,7 @@ private static DriveType GetDriveType(string fileSystemName)
- case "binfmt_misc":
- case "cgroup":
- case "cgroupfs":
-+ case "cgroup2fs":
- case "configfs":
- case "cramfs":
- case "cramfs-wend":
diff --git a/corefx-39686-cgroupv2-01.patch b/corefx-39686-cgroupv2-01.patch
deleted file mode 100644
index e7628e2..0000000
--- a/corefx-39686-cgroupv2-01.patch
+++ /dev/null
@@ -1,391 +0,0 @@
-From 2b2273ea4ea1c28472fa0d6ad2ffeb6374500550 Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Wed, 23 Oct 2019 17:45:59 -0400
-Subject: [PATCH 1/2] Add cgroup v2 support to Interop.cgroups
-
-Fix up code to adjust cgroup v1 assumptions and check cgroup v2 paths,
-locations and values.
-
-Continue using the older cgroup v1 terminology for APIs.
----
- .../Interop/Linux/cgroups/Interop.cgroups.cs | 116 ++++++++++++++----
- src/Common/tests/Common.Tests.csproj | 4 +
- .../tests/Tests/Interop/cgroupsTests.cs | 107 ++++++++++++++++
- .../tests/DescriptionNameTests.cs | 2 +-
- 4 files changed, 206 insertions(+), 23 deletions(-)
- create mode 100644 src/Common/tests/Tests/Interop/cgroupsTests.cs
-
-diff --git a/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs b/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
-index 0ffd4d7b7c03..186fe0516c5b 100644
---- a/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
-+++ b/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
-@@ -9,17 +9,22 @@
-
- internal static partial class Interop
- {
-+ /// <summary>Provides access to some cgroup (v1 and v2) features</summary>
- internal static partial class cgroups
- {
-+ // For cgroup v1, see https://www.kernel.org/doc/Documentation/cgroup-v1/
-+ // For cgroup v2, see https://www.kernel.org/doc/Documentation/cgroup-v2.txt
-+
-+ /// <summary>The version of cgroup that's being used </summary>
-+ internal enum CGroupVersion { None, CGroup1, CGroup2 };
-+
- /// <summary>Path to mountinfo file in procfs for the current process.</summary>
- private const string ProcMountInfoFilePath = "/proc/self/mountinfo";
- /// <summary>Path to cgroup directory in procfs for the current process.</summary>
- private const string ProcCGroupFilePath = "/proc/self/cgroup";
-
-- /// <summary>Path to the found cgroup location, or null if it couldn't be found.</summary>
-- internal static readonly string s_cgroupMemoryPath = FindCGroupPath("memory");
-- /// <summary>Path to the found cgroup memory limit_in_bytes path, or null if it couldn't be found.</summary>
-- private static readonly string s_cgroupMemoryLimitPath = s_cgroupMemoryPath != null ? s_cgroupMemoryPath + "/memory.limit_in_bytes" : null;
-+ /// <summary>Path to the found cgroup memory limit path, or null if it couldn't be found.</summary>
-+ internal static readonly string s_cgroupMemoryLimitPath = FindCGroupMemoryLimitPath();
-
- /// <summary>Tries to read the memory limit from the cgroup memory location.</summary>
- /// <param name="limit">The read limit, or 0 if it couldn't be read.</param>
-@@ -42,7 +47,7 @@ public static bool TryGetMemoryLimit(out ulong limit)
- /// <param name="path">The path to the file to parse.</param>
- /// <param name="result">The parsed result, or 0 if it couldn't be parsed.</param>
- /// <returns>true if the value was read successfully; otherwise, false.</returns>
-- private static bool TryReadMemoryValueFromFile(string path, out ulong result)
-+ internal static bool TryReadMemoryValueFromFile(string path, out ulong result)
- {
- if (File.Exists(path))
- {
-@@ -79,6 +84,11 @@ private static bool TryReadMemoryValueFromFile(string path, out ulong result)
- result = checked(ulongValue * multiplier);
- return true;
- }
-+
-+ // 'max' is also a possible valid value
-+ //
-+ // Treat this as 'no memory limit' and let the caller
-+ // fallback to reading the real limit via other means
- }
- catch (Exception e)
- {
-@@ -90,12 +100,35 @@ private static bool TryReadMemoryValueFromFile(string path, out ulong result)
- return false;
- }
-
-+ /// <summary>Find the cgroup memory limit path.</summary>
-+ /// <returns>The limit path if found; otherwise, null.</returns>
-+ private static string FindCGroupMemoryLimitPath()
-+ {
-+ string cgroupMemoryPath = FindCGroupPath("memory", out CGroupVersion version);
-+ if (cgroupMemoryPath != null)
-+ {
-+ if (version == CGroupVersion.CGroup1)
-+ {
-+ return cgroupMemoryPath + "/memory.limit_in_bytes";
-+ }
-+
-+ if (version == CGroupVersion.CGroup2)
-+ {
-+ // 'memory.high' is a soft limit; the process may get throttled
-+ // 'memory.max' is where OOM killer kicks in
-+ return cgroupMemoryPath + "/memory.max";
-+ }
-+ }
-+
-+ return null;
-+ }
-+
- /// <summary>Find the cgroup path for the specified subsystem.</summary>
- /// <param name="subsystem">The subsystem, e.g. "memory".</param>
- /// <returns>The cgroup path if found; otherwise, null.</returns>
-- private static string FindCGroupPath(string subsystem)
-+ private static string FindCGroupPath(string subsystem, out CGroupVersion version)
- {
-- if (TryFindHierarchyMount(subsystem, out string hierarchyRoot, out string hierarchyMount) &&
-+ if (TryFindHierarchyMount(subsystem, out version, out string hierarchyRoot, out string hierarchyMount) &&
- TryFindCGroupPathForSubsystem(subsystem, out string cgroupPathRelativeToMount))
- {
- // For a host cgroup, we need to append the relative path.
-@@ -113,19 +146,24 @@ private static string FindCGroupPath(string subsystem)
- /// <param name="root">The path of the directory in the filesystem which forms the root of this mount; null if not found.</param>
- /// <param name="path">The path of the mount point relative to the process's root directory; null if not found.</param>
- /// <returns>true if the mount was found; otherwise, null.</returns>
-- private static bool TryFindHierarchyMount(string subsystem, out string root, out string path)
-+ private static bool TryFindHierarchyMount(string subsystem, out CGroupVersion version, out string root, out string path)
- {
-- if (File.Exists(ProcMountInfoFilePath))
-+ return TryFindHierarchyMount(ProcMountInfoFilePath, subsystem, out version, out root, out path);
-+ }
-+
-+ internal static bool TryFindHierarchyMount(string mountInfoFilePath, string subsystem, out CGroupVersion version, out string root, out string path)
-+ {
-+ if (File.Exists(mountInfoFilePath))
- {
- try
- {
-- using (var reader = new StreamReader(ProcMountInfoFilePath))
-+ using (var reader = new StreamReader(mountInfoFilePath))
- {
- string line;
- while ((line = reader.ReadLine()) != null)
- {
- // Look for an entry that has cgroup as the "filesystem type"
-- // and that has options containing the specified subsystem.
-+ // and, for cgroup1, that has options containing the specified subsystem
- // See man page for /proc/[pid]/mountinfo for details, e.g.:
- // (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
- // 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
-@@ -148,17 +186,35 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
- continue;
- }
-
-- if (postSeparatorlineParts[0] != "cgroup" ||
-- Array.IndexOf(postSeparatorlineParts[2].Split(','), subsystem) < 0)
-+ bool validCGroup1Entry = ((postSeparatorlineParts[0] == "cgroup") &&
-+ (Array.IndexOf(postSeparatorlineParts[2].Split(','), subsystem) >= 0));
-+ bool validCGroup2Entry = postSeparatorlineParts[0] == "cgroup2";
-+
-+ if (!validCGroup1Entry && !validCGroup2Entry)
- {
- // Not the relevant entry.
- continue;
- }
-
-- // Found the relevant entry. Extract the mount root and path.
-+ // Found the relevant entry. Extract the cgroup version, mount root and path.
-+ switch (postSeparatorlineParts[0])
-+ {
-+ case "cgroup":
-+ version = CGroupVersion.CGroup1;
-+ break;
-+ case "cgroup2":
-+ version = CGroupVersion.CGroup2;
-+ break;
-+ default:
-+ version = CGroupVersion.None;
-+ Debug.Fail($"invalid value for CGroupVersion \"{postSeparatorlineParts[0]}\"");
-+ break;
-+ }
-+
- string[] lineParts = line.Substring(0, endOfOptionalFields).Split(' ');
- root = lineParts[3];
- path = lineParts[4];
-+
- return true;
- }
- }
-@@ -169,6 +225,7 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
- }
- }
-
-+ version = CGroupVersion.None;
- root = null;
- path = null;
- return false;
-@@ -180,27 +237,42 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
- /// <returns></returns>
- private static bool TryFindCGroupPathForSubsystem(string subsystem, out string path)
- {
-- if (File.Exists(ProcCGroupFilePath))
-+ return TryFindCGroupPathForSubsystem(ProcCGroupFilePath, subsystem, out path);
-+ }
-+
-+ internal static bool TryFindCGroupPathForSubsystem(string procCGroupFilePath, string subsystem, out string path)
-+ {
-+ if (File.Exists(procCGroupFilePath))
- {
- try
- {
-- using (var reader = new StreamReader(ProcCGroupFilePath))
-+ using (var reader = new StreamReader(procCGroupFilePath))
- {
- string line;
- while ((line = reader.ReadLine()) != null)
- {
-- // Find the first entry that has the subsystem listed in its controller
-- // list. See man page for cgroups for /proc/[pid]/cgroups format, e.g:
-- // hierarchy-ID:controller-list:cgroup-path
-- // 5:cpuacct,cpu,cpuset:/daemons
--
- string[] lineParts = line.Split(':');
-+
- if (lineParts.Length != 3)
- {
- // Malformed line.
- continue;
- }
-
-+ // cgroup v2: Find the first entry that matches the cgroup v2 hierarchy:
-+ // 0::$PATH
-+
-+ if ((lineParts[0] == "0") && (string.Empty == lineParts[1]))
-+ {
-+ path = lineParts[2];
-+ return true;
-+ }
-+
-+ // cgroup v1: Find the first entry that has the subsystem listed in its controller
-+ // list. See man page for cgroups for /proc/[pid]/cgroups format, e.g:
-+ // hierarchy-ID:controller-list:cgroup-path
-+ // 5:cpuacct,cpu,cpuset:/daemons
-+
- if (Array.IndexOf(lineParts[1].Split(','), subsystem) < 0)
- {
- // Not the relevant entry.
-@@ -214,7 +286,7 @@ private static bool TryFindCGroupPathForSubsystem(string subsystem, out string p
- }
- catch (Exception e)
- {
-- Debug.Fail($"Failed to read or parse \"{ProcMountInfoFilePath}\": {e}");
-+ Debug.Fail($"Failed to read or parse \"{procCGroupFilePath}\": {e}");
- }
- }
-
-diff --git a/src/Common/tests/Common.Tests.csproj b/src/Common/tests/Common.Tests.csproj
-index a189d856348b..979c8dd7fbe6 100644
---- a/src/Common/tests/Common.Tests.csproj
-+++ b/src/Common/tests/Common.Tests.csproj
-@@ -12,6 +12,9 @@
- <Compile Include="$(CommonTestPath)\System\Security\Cryptography\ByteUtils.cs">
- <Link>Common\System\Security\Cryptography\ByteUtils.cs</Link>
- </Compile>
-+ <Compile Include="$(CommonPath)\Interop\Linux\cgroups\Interop.cgroups.cs">
-+ <Link>Common\Interop\Linux\cgroups\Interop.cgroups.cs</Link>
-+ </Compile>
- <Compile Include="$(CommonPath)\Interop\Linux\procfs\Interop.ProcFsStat.cs">
- <Link>Common\Interop\Linux\procfs\Interop.ProcFsStat.cs</Link>
- </Compile>
-@@ -69,6 +72,7 @@
- <Compile Include="$(CommonPath)\CoreLib\System\PasteArguments.cs">
- <Link>Common\CoreLib\System\PasteArguments.cs</Link>
- </Compile>
-+ <Compile Include="Tests\Interop\cgroupsTests.cs" />
- <Compile Include="Tests\Interop\procfsTests.cs" />
- <Compile Include="Tests\System\CharArrayHelpersTests.cs" />
- <Compile Include="Tests\System\IO\PathInternal.Tests.cs" />
-diff --git a/src/Common/tests/Tests/Interop/cgroupsTests.cs b/src/Common/tests/Tests/Interop/cgroupsTests.cs
-new file mode 100644
-index 000000000000..f16d9242879c
---- /dev/null
-+++ b/src/Common/tests/Tests/Interop/cgroupsTests.cs
-@@ -0,0 +1,107 @@
-+// Licensed to the .NET Foundation under one or more agreements.
-+// The .NET Foundation licenses this file to you under the MIT license.
-+// See the LICENSE file in the project root for more information.
-+
-+using System;
-+using System.IO;
-+using System.Text;
-+using Xunit;
-+
-+namespace Common.Tests
-+{
-+ public class cgroupsTests
-+ {
-+ [Theory]
-+ [InlineData(true, "0", 0)]
-+ [InlineData(false, "max", 0)]
-+ [InlineData(true, "1k", 1024)]
-+ [InlineData(true, "1K", 1024)]
-+ public static void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
-+ {
-+ string path = Path.GetTempFileName();
-+ try
-+ {
-+ File.WriteAllText(path, valueText);
-+
-+ bool result = Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val);
-+
-+ Assert.Equal(expectedResult, result);
-+ if (result)
-+ {
-+ Assert.Equal(expectedValue, val);
-+ }
-+ }
-+ finally
-+ {
-+ File.Delete(path);
-+ }
-+ }
-+
-+ [Theory]
-+ [InlineData(false, "0 0 0:0 / /foo ignore ignore - overlay overlay ignore", "ignore", 0, "/", "/")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "ignore", 2, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "memory", 2, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo-with-dashes ignore ignore - cgroup2 cgroup2 ignore", "ignore", 2, "/", "/foo-with-dashes")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory", "memory", 1, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo-with-dashes ignore ignore - cgroup cgroup memory", "memory", 1, "/", "/foo-with-dashes")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu,memory", "memory", 1, "/", "/foo")]
-+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory,cpu", "memory", 1, "/", "/foo")]
-+ [InlineData(false, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu", "memory", 0, "/", "/foo")]
-+ public static void ParseValidateMountInfo(bool found, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
-+ {
-+ string path = Path.GetTempFileName();
-+ try
-+ {
-+ File.WriteAllText(path, procSelfMountInfoText);
-+
-+ bool result = Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount);
-+
-+ Assert.Equal(found, result);
-+ if (found)
-+ {
-+ Assert.Equal(expectedVersion, (int)version);
-+ Assert.Equal(expectedRoot, root);
-+ Assert.Equal(expectedMount, mount);
-+ }
-+ }
-+ finally
-+ {
-+ File.Delete(path);
-+ }
-+ }
-+
-+ [Theory]
-+ [InlineData(true, "0::/foo", "ignore", "/foo")]
-+ [InlineData(true, "0::/bar", "ignore", "/bar")]
-+ [InlineData(true, "0::frob", "ignore", "frob")]
-+ [InlineData(false, "1::frob", "ignore", "ignore")]
-+ [InlineData(true, "1:foo:bar", "foo", "bar")]
-+ [InlineData(true, "2:foo:bar", "foo", "bar")]
-+ [InlineData(false, "2:foo:bar", "bar", "ignore")]
-+ [InlineData(true, "1:foo:bar\n2:eggs:spam", "foo", "bar")]
-+ [InlineData(true, "1:foo:bar\n2:eggs:spam", "eggs", "spam")]
-+ public static void ParseValidateProcCGroup(bool found, string procSelfCgroupText, string subsystem, string expectedMountPath)
-+ {
-+ string path = Path.GetTempFileName();
-+ try
-+ {
-+ File.WriteAllText(path, procSelfCgroupText);
-+
-+ bool result = Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath);
-+
-+ Assert.Equal(found, result);
-+ if (found)
-+ {
-+ Assert.Equal(expectedMountPath, mountPath);
-+ }
-+ }
-+ finally
-+ {
-+ File.Delete(path);
-+ }
-+ }
-+ }
-+}
-diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
-index 910af2fd82b4..73f692898dbc 100644
---- a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
-+++ b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
-@@ -40,7 +40,7 @@ public void DumpRuntimeInformationToConsole()
-
- Console.WriteLine($"### CURRENT DIRECTORY: {Environment.CurrentDirectory}");
-
-- string cgroupsLocation = Interop.cgroups.s_cgroupMemoryPath;
-+ string cgroupsLocation = Interop.cgroups.s_cgroupMemoryLimitPath;
- if (cgroupsLocation != null)
- {
- Console.WriteLine($"### CGROUPS MEMORY: {cgroupsLocation}");
-
diff --git a/corefx-39686-cgroupv2-02.patch b/corefx-39686-cgroupv2-02.patch
deleted file mode 100644
index 88dcd99..0000000
--- a/corefx-39686-cgroupv2-02.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-From 9a8c5e4014ffca8aff70808cc0e50a403d38c292 Mon Sep 17 00:00:00 2001
-From: Stephen Toub <stoub(a)microsoft.com>
-Date: Wed, 23 Oct 2019 20:35:49 -0400
-Subject: [PATCH 2/2] Clean up new tests
-
----
- .../tests/Tests/Interop/cgroupsTests.cs | 79 ++++++-------------
- 1 file changed, 25 insertions(+), 54 deletions(-)
-
-diff --git a/src/Common/tests/Tests/Interop/cgroupsTests.cs b/src/Common/tests/Tests/Interop/cgroupsTests.cs
-index f16d9242879c..fc6ab5c9753c 100644
---- a/src/Common/tests/Tests/Interop/cgroupsTests.cs
-+++ b/src/Common/tests/Tests/Interop/cgroupsTests.cs
-@@ -2,38 +2,27 @@
- // The .NET Foundation licenses this file to you under the MIT license.
- // See the LICENSE file in the project root for more information.
-
--using System;
- using System.IO;
--using System.Text;
- using Xunit;
-
- namespace Common.Tests
- {
-- public class cgroupsTests
-+ public class cgroupsTests : FileCleanupTestBase
- {
- [Theory]
-- [InlineData(true, "0", 0)]
-- [InlineData(false, "max", 0)]
-- [InlineData(true, "1k", 1024)]
-- [InlineData(true, "1K", 1024)]
-- public static void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
-+ [InlineData(true, "0", 0)]
-+ [InlineData(false, "max", 0)]
-+ [InlineData(true, "1k", 1024)]
-+ [InlineData(true, "1K", 1024)]
-+ public void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
- {
-- string path = Path.GetTempFileName();
-- try
-- {
-- File.WriteAllText(path, valueText);
--
-- bool result = Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val);
-+ string path = GetTestFilePath();
-+ File.WriteAllText(path, valueText);
-
-- Assert.Equal(expectedResult, result);
-- if (result)
-- {
-- Assert.Equal(expectedValue, val);
-- }
-- }
-- finally
-+ Assert.Equal(expectedResult, Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val));
-+ if (expectedResult)
- {
-- File.Delete(path);
-+ Assert.Equal(expectedValue, val);
- }
- }
-
-@@ -50,26 +39,17 @@ public static void ValidateTryReadMemoryValue(bool expectedResult, string valueT
- [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu,memory", "memory", 1, "/", "/foo")]
- [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory,cpu", "memory", 1, "/", "/foo")]
- [InlineData(false, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu", "memory", 0, "/", "/foo")]
-- public static void ParseValidateMountInfo(bool found, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
-+ public void ParseValidateMountInfo(bool expectedFound, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
- {
-- string path = Path.GetTempFileName();
-- try
-- {
-- File.WriteAllText(path, procSelfMountInfoText);
--
-- bool result = Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount);
-+ string path = GetTestFilePath();
-+ File.WriteAllText(path, procSelfMountInfoText);
-
-- Assert.Equal(found, result);
-- if (found)
-- {
-- Assert.Equal(expectedVersion, (int)version);
-- Assert.Equal(expectedRoot, root);
-- Assert.Equal(expectedMount, mount);
-- }
-- }
-- finally
-+ Assert.Equal(expectedFound, Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount));
-+ if (expectedFound)
- {
-- File.Delete(path);
-+ Assert.Equal(expectedVersion, (int)version);
-+ Assert.Equal(expectedRoot, root);
-+ Assert.Equal(expectedMount, mount);
- }
- }
-
-@@ -83,24 +63,15 @@ public static void ParseValidateMountInfo(bool found, string procSelfMountInfoTe
- [InlineData(false, "2:foo:bar", "bar", "ignore")]
- [InlineData(true, "1:foo:bar\n2:eggs:spam", "foo", "bar")]
- [InlineData(true, "1:foo:bar\n2:eggs:spam", "eggs", "spam")]
-- public static void ParseValidateProcCGroup(bool found, string procSelfCgroupText, string subsystem, string expectedMountPath)
-+ public void ParseValidateProcCGroup(bool expectedFound, string procSelfCgroupText, string subsystem, string expectedMountPath)
- {
-- string path = Path.GetTempFileName();
-- try
-- {
-- File.WriteAllText(path, procSelfCgroupText);
-+ string path = GetTestFilePath();
-+ File.WriteAllText(path, procSelfCgroupText);
-
-- bool result = Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath);
--
-- Assert.Equal(found, result);
-- if (found)
-- {
-- Assert.Equal(expectedMountPath, mountPath);
-- }
-- }
-- finally
-+ Assert.Equal(expectedFound, Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath));
-+ if (expectedFound)
- {
-- File.Delete(path);
-+ Assert.Equal(expectedMountPath, mountPath);
- }
- }
- }
diff --git a/corefx-42871-fedora-33-rid.patch b/corefx-42871-fedora-33-rid.patch
deleted file mode 100644
index 2802dcd..0000000
--- a/corefx-42871-fedora-33-rid.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 6cf4ff086875eaf29381cf406ea85846d9f66178 Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Mon, 24 Feb 2020 14:11:03 -0500
-Subject: [PATCH] Add Fedora 33 runtime ids
-
-Fedora 32 is gearing up for release[1], and in-development version of
-Fedora has been offically labelled as being Fedora 33:
-
- $ podman run -it fedora:33 cat /etc/os-release
- NAME=Fedora
- VERSION="33 (Container Image)"
- ID=fedora
- VERSION_ID=33
- VERSION_CODENAME=""
- PLATFORM_ID="platform:f33"
- PRETTY_NAME="Fedora 33 (Container Image)"
- ANSI_COLOR="0;34"
- LOGO=fedora-logo-icon
- CPE_NAME="cpe:/o:fedoraproject:fedora:33"
- HOME_URL="https://fedoraproject.org/"
- DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators..."
- SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
- BUG_REPORT_URL="https://bugzilla.redhat.com/"
- REDHAT_BUGZILLA_PRODUCT="Fedora"
- REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
- REDHAT_SUPPORT_PRODUCT="Fedora"
- REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
- PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
- VARIANT="Container Image"
- VARIANT_ID=container
-
-[1] https://fedorapeople.org/groups/schedule/f-32/f-32-key-tasks.html
----
- eng/Packaging.props | 2 +-
- .../runtime.compatibility.json | 32 +++++++++++++++++++
- pkg/Microsoft.NETCore.Platforms/runtime.json | 17 ++++++++++
- .../runtimeGroups.props | 2 +-
- src/packages.builds | 3 ++
- 5 files changed, 54 insertions(+), 2 deletions(-)
-
-diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-index 1e5c380a7a6a..c20e35394d6b 100644
---- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-+++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
-@@ -953,6 +953,38 @@
- "any",
- "base"
- ],
-+ "fedora.33": [
-+ "fedora.33",
-+ "fedora",
-+ "linux",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
-+ "fedora.33-arm64": [
-+ "fedora.33-arm64",
-+ "fedora.33",
-+ "fedora-arm64",
-+ "fedora",
-+ "linux-arm64",
-+ "linux",
-+ "unix-arm64",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
-+ "fedora.33-x64": [
-+ "fedora.33-x64",
-+ "fedora.33",
-+ "fedora-x64",
-+ "fedora",
-+ "linux-x64",
-+ "linux",
-+ "unix-x64",
-+ "unix",
-+ "any",
-+ "base"
-+ ],
- "freebsd": [
- "freebsd",
- "unix",
-diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json
-index b2f286ea2479..b3380ecbbef3 100644
---- a/pkg/Microsoft.NETCore.Platforms/runtime.json
-+++ b/pkg/Microsoft.NETCore.Platforms/runtime.json
-@@ -488,6 +488,23 @@
- "fedora-x64"
- ]
- },
-+ "fedora.33": {
-+ "#import": [
-+ "fedora"
-+ ]
-+ },
-+ "fedora.33-arm64": {
-+ "#import": [
-+ "fedora.33",
-+ "fedora-arm64"
-+ ]
-+ },
-+ "fedora.33-x64": {
-+ "#import": [
-+ "fedora.33",
-+ "fedora-x64"
-+ ]
-+ },
- "freebsd": {
- "#import": [
- "unix"
-diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-index eeb8130b54fb..da48e5f9d09f 100644
---- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-+++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
-@@ -43,7 +43,7 @@
- <RuntimeGroup Include="fedora">
- <Parent>linux</Parent>
- <Architectures>x64;arm64</Architectures>
-- <Versions>23;24;25;26;27;28;29;30;31;32</Versions>
-+ <Versions>23;24;25;26;27;28;29;30;31;32;33</Versions>
- <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
- </RuntimeGroup>
-
diff --git a/corefx-42900-clang-10.patch b/corefx-42900-clang-10.patch
deleted file mode 100644
index b898f34..0000000
--- a/corefx-42900-clang-10.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 58d6cd09bd2d5b1085c6572c1d97b8533cf8294b Mon Sep 17 00:00:00 2001
-From: Omair Majid <omajid(a)redhat.com>
-Date: Fri, 3 Apr 2020 13:53:09 -0400
-Subject: [PATCH] Fix corefx to build on clang 10
-
-Clang 10 adds/enables new warnings, some of which is affecting
-the corefx code.
-
-Clang 10 has added -Walloca to warn about uses of alloca. This commit
-replaces the only non-compliant use of that with a single fixed
-stack-allocated buffer.
-
-Clang 10 has also added -Wimplicit-int-float-conversion. This commit
-uses explicit casts to double to avoid the warnings.
-
-This is a backport of dotnet/runtime#33734 to corefx.
-
-After this commit, I can build all of corefx with Clang 10.
----
- src/Native/Unix/System.Native/pal_io.c | 20 +++++++++++---------
- src/Native/Unix/System.Native/pal_time.c | 2 +-
- 2 files changed, 12 insertions(+), 10 deletions(-)
-
-diff --git a/src/Native/Unix/System.Native/pal_io.c b/src/Native/Unix/System.Native/pal_io.c
-index 2d51edacf5ee..c7c42eb3e72b 100644
---- a/src/Native/Unix/System.Native/pal_io.c
-+++ b/src/Native/Unix/System.Native/pal_io.c
-@@ -906,18 +906,20 @@ int32_t SystemNative_Poll(PollEvent* pollEvents, uint32_t eventCount, int32_t mi
- return Error_EINVAL;
- }
-
-- size_t bufferSize;
-- if (!multiply_s(sizeof(struct pollfd), (size_t)eventCount, &bufferSize))
-+ struct pollfd stackBuffer[(uint32_t)(2048/sizeof(struct pollfd))];
-+ int useStackBuffer = eventCount <= (sizeof(stackBuffer)/sizeof(stackBuffer[0]));
-+ struct pollfd* pollfds = NULL;
-+ if (useStackBuffer)
- {
-- return SystemNative_ConvertErrorPlatformToPal(EOVERFLOW);
-+ pollfds = (struct pollfd*)&stackBuffer[0];
- }
--
--
-- int useStackBuffer = bufferSize <= 2048;
-- struct pollfd* pollfds = (struct pollfd*)(useStackBuffer ? alloca(bufferSize) : malloc(bufferSize));
-- if (pollfds == NULL)
-+ else
- {
-- return Error_ENOMEM;
-+ pollfds = (struct pollfd*)calloc(eventCount, sizeof(*pollfds));
-+ if (pollfds == NULL)
-+ {
-+ return Error_ENOMEM;
-+ }
- }
-
- for (uint32_t i = 0; i < eventCount; i++)
-diff --git a/src/Native/Unix/System.Native/pal_time.c b/src/Native/Unix/System.Native/pal_time.c
-index 1a7c862749d1..54ebde60a83b 100644
---- a/src/Native/Unix/System.Native/pal_time.c
-+++ b/src/Native/Unix/System.Native/pal_time.c
-@@ -169,7 +169,7 @@ int32_t SystemNative_GetCpuUtilization(ProcessCpuInformation* previousCpuInfo)
- uint64_t resolution = SystemNative_GetTimestampResolution();
- uint64_t timestamp = SystemNative_GetTimestamp();
-
-- uint64_t currentTime = (uint64_t)(timestamp * ((double)SecondsToNanoSeconds / resolution));
-+ uint64_t currentTime = (uint64_t)((double)timestamp * ((double)SecondsToNanoSeconds / (double)resolution));
-
- uint64_t lastRecordedCurrentTime = previousCpuInfo->lastRecordedCurrentTime;
- uint64_t lastRecordedKernelTime = previousCpuInfo->lastRecordedKernelTime;
diff --git a/corefx-optflags-support.patch b/corefx-optflags-support.patch
deleted file mode 100644
index 9b08f1f..0000000
--- a/corefx-optflags-support.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/src/Native/Unix/CMakeLists.txt b/src/Native/Unix/CMakeLists.txt
-index 7d804a1e54..717c2718d7 100644
---- a/src/Native/Unix/CMakeLists.txt
-+++ b/src/Native/Unix/CMakeLists.txt
-@@ -25,7 +25,7 @@ add_compile_options(-fPIC)
- add_compile_options(-Wthread-safety)
- add_compile_options(-Wno-thread-safety-analysis)
-+ add_compile_options(-Wno-alloca)
- endif()
--add_compile_options(-Werror)
-
- if(CMAKE_SYSTEM_NAME STREQUAL Emscripten)
- set(CLR_CMAKE_PLATFORM_WASM 1)
-diff --git a/src/Native/Unix/configure.cmake b/src/Native/Unix/configure.cmake
-index f4a30ad6cb..f2db68402a 100644
---- a/src/Native/Unix/configure.cmake
-+++ b/src/Native/Unix/configure.cmake
-@@ -27,6 +27,12 @@ else ()
- message(FATAL_ERROR "Unknown platform. Cannot define PAL_UNIX_NAME, used by RuntimeInformation.")
- endif ()
-
-+
-+set (PREVIOUS_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-+set (CMAKE_CXX_FLAGS "-D_GNU_SOURCE")
-+set (PREVIOUS_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
-+set (CMAKE_C_FLAGS "-D_GNU_SOURCE")
-+
- # We compile with -Werror, so we need to make sure these code fragments compile without warnings.
- # Older CMake versions (3.8) do not assign the result of their tests, causing unused-value errors
- # which are not distinguished from the test failing. So no error for that one.
-@@ -698,6 +704,9 @@ endif()
-
- set (CMAKE_REQUIRED_LIBRARIES)
-
-+set (CMAKE_CXX_FLAGS "${PREVIOUS_CMAKE_CXX_FLAGS}")
-+set (CMAKE_C_FLAGS "${PREVIOUS_CMAKE_C_FLAGS}")
-+
- check_c_source_compiles(
- "
- #include <sys/inotify.h>
diff --git a/dotnet3.1.spec b/dotnet5.0.spec
similarity index 79%
rename from dotnet3.1.spec
rename to dotnet5.0.spec
index 44ff8fb..49221a4 100644
--- a/dotnet3.1.spec
+++ b/dotnet5.0.spec
@@ -1,4 +1,4 @@
-%bcond_with bootstrap
+%bcond_without bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -20,18 +20,20 @@
%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-%global host_version 3.1.3
-%global runtime_version 3.1.3
-%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 3.1.103
-# upstream respun this release, so the tag doesn't exactly match
-%global src_version %{sdk_version}.2
-%global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
+%global host_version 5.0.0-preview.4.20251.6
+%global runtime_version 5.0.0-preview.4.20251.6
+%global aspnetcore_runtime_version 5.0.0-preview.4.20257.10
+%global sdk_version 5.0.100-preview.4.20161.13
+%global templates_version 5.0.0-preview.4.20161.13
+#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
-%global host_rpm_version %{host_version}
-%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
-%global runtime_rpm_version %{runtime_version}
-%global sdk_rpm_version %{sdk_version}
+%global host_rpm_version 5.0.0
+%global aspnetcore_runtime_rpm_version 5.0.0
+%global runtime_rpm_version 5.0.0
+%global sdk_rpm_version 5.0.100
+
+# upstream can update releases without revving the SDK version so these don't always match
+%global src_version %{sdk_rpm_version}
%if 0%{?fedora} || 0%{?rhel} < 8
%global use_bundled_libunwind 0
@@ -39,6 +41,10 @@
%global use_bundled_libunwind 1
%endif
+%ifarch aarch64
+%global use_bundled_libunwind 1
+%endif
+
%ifarch x86_64
%global runtime_arch x64
%endif
@@ -56,42 +62,34 @@
%endif
%endif
-Name: dotnet3.1
+Name: dotnet5.0
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 0.2.preview4%{?dist}
Summary: .NET Core Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK
-Source0: dotnet-v%{src_version}-SDK.tar.gz
+Source0: dotnet-v%{src_version}-preview4-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
-# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
-Patch100: corefx-optflags-support.patch
-
-# Add some support for cgroupv2 in corefx
-# All these patches are upstreamed for 5.0
-Patch101: corefx-39686-cgroupv2-01.patch
-Patch102: corefx-39686-cgroupv2-02.patch
-Patch103: corefx-39633-cgroupv2-mountpoints.patch
+# dotnet/runtime PR 39044
+Patch100: runtime-39044-cmake-downgrade.patch
-# Add Fedora 33 RID to corefx
-Patch104: corefx-42871-fedora-33-rid.patch
+# TODO: upstream this patch
+# Do not strip debuginfo from (native/unmanaged) binaries
+Patch101: runtime-dont-strip.patch
-# Build with with hardening flags, including -pie
-Patch200: coreclr-hardening-flags.patch
-# Fix build with clang 10; Already applied at tarball-build time
-# Patch201: coreclr-clang10.patch
-
-# Build with with hardening flags, including -pie
-Patch300: core-setup-hardening-flags.patch
+# TODO: upstream this patch
+# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
+Patch102: runtime-flags-support.patch
# Disable telemetry by default; make it opt-in
-Patch500: cli-telemetry-optout.patch
+Patch500: sdk-telemetry-optout.patch
+# ExclusiveArch: aarch64 x86_64
ExclusiveArch: x86_64
BuildRequires: clang
@@ -99,8 +97,8 @@ BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
BuildRequires: dotnet-build-reference-packages
-BuildRequires: dotnet-sdk-3.1
-BuildRequires: dotnet-sdk-3.1-source-built-artifacts
+BuildRequires: dotnet-sdk-5.0
+BuildRequires: dotnet-sdk-5.0-source-built-artifacts
%endif
BuildRequires: findutils
BuildRequires: git
@@ -141,7 +139,7 @@ application to drive everything.
Version: %{sdk_rpm_version}
Summary: .NET Core CLI tools and runtime
-Requires: dotnet-sdk-3.1%{?_isa} >= %{sdk_rpm_version}-%{release}
+Requires: dotnet-sdk-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
%description -n dotnet
.NET Core is a fast, lightweight and modular platform for creating
@@ -171,7 +169,7 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-hostfxr-3.1
+%package -n dotnet-hostfxr-5.0
Version: %{host_rpm_version}
Summary: .NET Core command line host resolver
@@ -180,7 +178,7 @@ Summary: .NET Core command line host resolver
# provided by this package, or from a newer version of .NET Core
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
-%description -n dotnet-hostfxr-3.1
+%description -n dotnet-hostfxr-5.0
The .NET Core host resolver contains the logic to resolve and select
the right version of the .NET Core SDK or runtime to use.
@@ -191,12 +189,12 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-runtime-3.1
+%package -n dotnet-runtime-5.0
Version: %{runtime_rpm_version}
-Summary: NET Core 3.1 runtime
+Summary: NET Core 5.0 runtime
-Requires: dotnet-hostfxr-3.1%{?_isa} >= %{host_rpm_version}-%{release}
+Requires: dotnet-hostfxr-5.0%{?_isa} >= %{host_rpm_version}-%{release}
# libicu is dlopen()ed
Requires: libicu%{?_isa}
@@ -205,7 +203,7 @@ Requires: libicu%{?_isa}
Provides: bundled(libunwind) = 1.3
%endif
-%description -n dotnet-runtime-3.1
+%description -n dotnet-runtime-5.0
The .NET Core runtime contains everything needed to run .NET Core applications.
It includes a high performance Virtual Machine as well as the framework
libraries used by .NET Core applications.
@@ -217,14 +215,14 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n aspnetcore-runtime-3.1
+%package -n aspnetcore-runtime-5.0
Version: %{aspnetcore_runtime_rpm_version}
-Summary: ASP.NET Core 3.1 runtime
+Summary: ASP.NET Core 5.0 runtime
-Requires: dotnet-runtime-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: dotnet-runtime-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
-%description -n aspnetcore-runtime-3.1
+%description -n aspnetcore-runtime-5.0
The ASP.NET Core runtime contains everything needed to run .NET Core
web applications. It includes a high performance Virtual Machine as
well as the framework libraries used by .NET Core applications.
@@ -236,16 +234,16 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-templates-3.1
+%package -n dotnet-templates-5.0
Version: %{sdk_rpm_version}
-Summary: .NET Core 3.1 templates
+Summary: .NET Core 5.0 templates
# Theoretically any version of the host should work. But lets aim for the one
# provided by this package, or from a newer version of .NET Core
Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
-%description -n dotnet-templates-3.1
+%description -n dotnet-templates-5.0
This package contains templates used by the .NET Core SDK.
ASP.NET Core is a fast, lightweight and modular platform for creating
@@ -255,25 +253,25 @@ It particularly focuses on creating console applications, web
applications and micro-services.
-%package -n dotnet-sdk-3.1
+%package -n dotnet-sdk-5.0
Version: %{sdk_rpm_version}
-Summary: .NET Core 3.1 Software Development Kit
+Summary: .NET Core 5.0 Software Development Kit
Provides: bundled(js-jquery)
Provides: bundled(npm)
-Requires: dotnet-runtime-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: aspnetcore-runtime-3.1%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+Requires: dotnet-runtime-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-runtime-5.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
-Requires: dotnet-apphost-pack-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: dotnet-targeting-pack-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
-Requires: aspnetcore-targeting-pack-3.1%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+Requires: dotnet-apphost-pack-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: dotnet-targeting-pack-5.0%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-targeting-pack-5.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
Requires: netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{release}
-Requires: dotnet-templates-3.1%{?_isa} >= %{sdk_rpm_version}-%{release}
+Requires: dotnet-templates-5.0%{?_isa} >= %{sdk_rpm_version}-%{release}
-%description -n dotnet-sdk-3.1
+%description -n dotnet-sdk-5.0
The .NET Core SDK is a collection of command line applications to
create, build, publish and run .NET Core applications.
@@ -302,18 +300,18 @@ applications using the .NET Core SDK.
%{_libdir}/dotnet/packs/%{5}
}
-%dotnet_targeting_pack dotnet-apphost-pack-3.1 %{runtime_rpm_version} Microsoft.NETCore.App 3.1 Microsoft.NETCore.App.Host.%{runtime_id}
-%dotnet_targeting_pack dotnet-targeting-pack-3.1 %{runtime_rpm_version} Microsoft.NETCore.App 3.1 Microsoft.NETCore.App.Ref
-%dotnet_targeting_pack aspnetcore-targeting-pack-3.1 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 3.1 Microsoft.AspNetCore.App.Ref
+%dotnet_targeting_pack dotnet-apphost-pack-5.0 %{runtime_rpm_version} Microsoft.NETCore.App 5.0 Microsoft.NETCore.App.Host.%{runtime_id}
+%dotnet_targeting_pack dotnet-targeting-pack-5.0 %{runtime_rpm_version} Microsoft.NETCore.App 5.0 Microsoft.NETCore.App.Ref
+%dotnet_targeting_pack aspnetcore-targeting-pack-5.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 5.0 Microsoft.AspNetCore.App.Ref
%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref
-%package -n dotnet-sdk-3.1-source-built-artifacts
+%package -n dotnet-sdk-5.0-source-built-artifacts
Version: %{sdk_rpm_version}
-Summary: Internal package for building .NET Core 3.1 Software Development Kit
+Summary: Internal package for building .NET Core 5.0 Software Development Kit
-%description -n dotnet-sdk-3.1-source-built-artifacts
+%description -n dotnet-sdk-5.0-source-built-artifacts
The .NET Core source-built archive is a collection of packages needed
to build the .NET Core SDK itself.
@@ -321,7 +319,7 @@ These are not meant for general use.
%prep
-%setup -q -n dotnet-v%{src_version}-SDK
+%setup -q -n dotnet-v%{src_version}-preview4-SDK
%if %{without bootstrap}
# Remove all prebuilts
@@ -331,49 +329,43 @@ find -iname '*.tar.gz' -type f -delete
find -iname '*.nupkg' -type f -delete
find -iname '*.zip' -type f -delete
rm -rf .dotnet/
-rm -r packages/source-built
+rm -rf packages/source-built
%endif
%if %{without bootstrap}
-sed -i -e 's|3.1.100-preview1-014459|3.1.102|' global.json
+sed -i -e 's|5.0.100-preview1-014459|5.0.103|' global.json
mkdir -p packages/archive
ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
%endif
# Fix bad hardcoded path in build
-sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/core-setup.*/src/corehost/common/pal.unix.cpp
+sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/installer/corehost/cli/hostmisc/pal.unix.cpp
# Disable warnings
-sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.proj
+sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
-pushd src/corefx.*
+pushd src/runtime.*
%patch100 -p1
%patch101 -p1
%patch102 -p1
-%patch103 -p1
-%patch104 -p1
-popd
-
-pushd src/coreclr.*
-%patch200 -p1
-#%%patch201 -p1
popd
-pushd src/core-setup.*
-%patch300 -p1
-popd
-
-pushd src/cli.*
+pushd src/sdk.*
%patch500 -p1
popd
# If CLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE is misisng, add it back
-grep CLR_CMAKE_USE_SYSTEM_LIBUNWIND repos/coreclr.proj || \
- sed -i 's|\$(BuildArguments) </BuildArguments>|$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments>|' repos/coreclr.proj
+grep CLR_CMAKE_USE_SYSTEM_LIBUNWIND repos/runtime.common.props || \
+ sed -i 's|\$(BuildArguments) </BuildArguments>|$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments>|' repos/runtime.common.props
%if %{use_bundled_libunwind}
-sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/coreclr.proj
+sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/runtime.common.props
+%endif
+
+%ifnarch x86_64
+mkdir -p artifacts/obj/%{runtime_arch}/Release
+cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
%endif
cat source-build-info.txt
@@ -389,9 +381,9 @@ cat /etc/os-release
cp -a %{_libdir}/dotnet previously-built-dotnet
%endif
-export CFLAGS="%{dotnet_cflags}"
-export CXXFLAGS="%{dotnet_cflags}"
-export LDFLAGS="%{dotnet_ldflags}"
+export EXTRA_CFLAGS="%{dotnet_cflags}"
+export EXTRA_CXXFLAGS="%{dotnet_cflags}"
+export EXTRA_LDFLAGS="%%{dotnet_ldflags}"
#%%if %%{without bootstrap}
# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
@@ -416,11 +408,11 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
-ls bin/%{runtime_arch}/Release
-tar xf bin/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
+ls artifacts/%{runtime_arch}/Release
+tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_rpm_version}-preview.4.20161.13-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
# Install managed symbols
-tar xf bin/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
+tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
-C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
# Fix executable permissions on files
@@ -439,7 +431,7 @@ install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
install -dm 0755 %{buildroot}/%{_datadir}/bash-completion/completions
# dynamic completion needs the file to be named the same as the base command
-install src/cli.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
+install src/sdk.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
# TODO: the zsh completion script needs to be ported to use #compdef
#install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions
@@ -455,8 +447,8 @@ echo "%{_libdir}/dotnet" >> install_location
install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
install install_location %{buildroot}%{_sysconfdir}/dotnet/
-install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
-install bin/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+#install -dm 0755 %%{buildroot}%%{_libdir}/dotnet/source-built-artifacts
+#install artifacts/%%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %%{buildroot}/%%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
@@ -487,35 +479,60 @@ echo "Testing build results for debug symbols..."
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/dotnet
-%files -n dotnet-hostfxr-3.1
+%files -n dotnet-hostfxr-5.0
%dir %{_libdir}/dotnet/host/fxr
%{_libdir}/dotnet/host/fxr/%{host_version}
-%files -n dotnet-runtime-3.1
+%files -n dotnet-runtime-5.0
%dir %{_libdir}/dotnet/shared
%dir %{_libdir}/dotnet/shared/Microsoft.NETCore.App
%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}
-%files -n aspnetcore-runtime-3.1
+%files -n aspnetcore-runtime-5.0
%dir %{_libdir}/dotnet/shared
%dir %{_libdir}/dotnet/shared/Microsoft.AspNetCore.App
%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}
-%files -n dotnet-templates-3.1
+%files -n dotnet-templates-5.0
%dir %{_libdir}/dotnet/templates
%{_libdir}/dotnet/templates/%{templates_version}
-%files -n dotnet-sdk-3.1
+%files -n dotnet-sdk-5.0
%dir %{_libdir}/dotnet/sdk
%{_libdir}/dotnet/sdk/%{sdk_version}
%dir %{_libdir}/dotnet/packs
-%files -n dotnet-sdk-3.1-source-built-artifacts
-%dir %{_libdir}/dotnet
-%{_libdir}/dotnet/source-built-artifacts
+#%%files -n dotnet-sdk-5.0-source-built-artifacts
+#%%dir %%{_libdir}/dotnet
+#%%{_libdir}/dotnet/source-built-artifacts
%changelog
+* Fri Jul 10 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.2.preview4
+- Fix building with custom CFLAGS/CXXFLAGS/LDFLAGS
+- Clean up patches
+
+* Mon Jul 06 2020 Omair Majid <omajid(a)redhat.com> - 5.0.100-0.1.preview4
+- Initial build
+
+* Sat Jun 27 2020 Omair Majid <omajid(a)redhat.com> - 3.1.105-4
+- Disable bootstrap
+
+* Fri Jun 26 2020 Omair Majid <omajid(a)redhat.com> - 3.1.105-3
+- Re-bootstrap aarch64
+
+* Fri Jun 19 2020 Omair Majid <omajid(a)redhat.com> - 3.1.105-3
+- Disable bootstrap
+
+* Thu Jun 18 2020 Omair Majid <omajid(a)redhat.com> - 3.1.105-1
+- Bootstrap aarch64
+
+* Tue Jun 16 2020 Chris Rummel <crummel(a)microsoft.com> - 3.1.105-1
+- Update to .NET Core Runtime 3.1.5 and SDK 3.1.105
+
+* Fri Jun 05 2020 Chris Rummel <crummel(a)microsoft.com> - 3.1.104-1
+- Update to .NET Core Runtime 3.1.4 and SDK 3.1.104
+
* Thu Apr 09 2020 Chris Rummel <crummel(a)microsoft.com> - 3.1.103-1
- Update to .NET Core Runtime 3.1.3 and SDK 3.1.103
@@ -716,4 +733,3 @@ echo "Testing build results for debug symbols..."
- SPEC file cleanup
* Wed Jan 11 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-0
- Initial RPM for Fedora 25/26.
-
diff --git a/runtime-39044-cmake-downgrade.patch b/runtime-39044-cmake-downgrade.patch
new file mode 100644
index 0000000..71938d0
--- /dev/null
+++ b/runtime-39044-cmake-downgrade.patch
@@ -0,0 +1,1158 @@
+diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
+index 534f1d19de6..50d81842274 100644
+--- a/eng/common/cross/toolchain.cmake
++++ b/eng/common/cross/toolchain.cmake
+@@ -83,15 +83,26 @@ endif()
+
+ # Specify link flags
+
++function(add_toolchain_linker_flag Flag)
++ set(Config "${ARGV1}")
++ set(CONFIG_SUFFIX "")
++ if (NOT Config STREQUAL "")
++ set(CONFIG_SUFFIX "_${Config}")
++ endif()
++ set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
++ set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
++endfunction()
++
++
+ if(TARGET_ARCH_NAME STREQUAL "armel")
+ if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
+- add_link_options("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+- add_link_options("-L${CROSS_ROOTFS}/lib")
+- add_link_options("-L${CROSS_ROOTFS}/usr/lib")
+- add_link_options("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
++ add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
++ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
++ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib")
++ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ endif()
+ elseif(TARGET_ARCH_NAME STREQUAL "x86")
+- add_link_options(-m32)
++ add_toolchain_linker_flag(-m32)
+ endif()
+
+ # Specify compile options
+diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh
+index a1a975ce177..9a0c296ff66 100755
+--- a/eng/native/build-commons.sh
++++ b/eng/native/build-commons.sh
+@@ -51,12 +51,9 @@ check_prereqs()
+ # Check presence of CMake on the path
+ command -v cmake 2>/dev/null || { echo >&2 "Please install cmake before running this script"; exit 1; }
+
+- function version { echo "$@" | awk -F. '{ printf("%d%02d%02d\n", $1,$2,$3); }'; }
+-
+- local cmake_version="$(cmake --version | awk '/^cmake version [0-9]+\.[0-9]+\.[0-9]+$/ {print $3}')"
+-
+- if [[ "$(version "$cmake_version")" -lt "$(version 3.14.2)" ]]; then
+- echo "Please install CMake 3.14.2 or newer from http://www.cmake.org/download/ or https://apt.kitware.com and ensure it is on your path."; exit 1;
++ if [[ "$__HostOS" == "OSX" ]]; then
++ # Check presence of pkg-config on the path
++ command -v pkg-config 2>/dev/null || { echo >&2 "Please install pkg-config before running this script, see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/..."; exit 1; }
+ fi
+
+ if [[ "$__UseNinja" == 1 ]]; then
+@@ -156,8 +153,8 @@ build_native()
+ cmake_command="emcmake $cmake_command"
+ fi
+
+- echo "Executing $cmake_command --build \"$intermediatesDir\" --target install -j $__NumProc"
+- $cmake_command --build "$intermediatesDir" --target install -j "$__NumProc"
++ echo "Executing $cmake_command --build \"$intermediatesDir\" --target install -- -j $__NumProc"
++ $cmake_command --build "$intermediatesDir" --target install -- -j "$__NumProc"
+ fi
+
+ local exit_code="$?"
+diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake
+index 2937916ced9..07fd6f75f6f 100644
+--- a/eng/native/configurecompiler.cmake
++++ b/eng/native/configurecompiler.cmake
+@@ -8,8 +8,6 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+-cmake_policy(SET CMP0083 NEW)
+-
+ include(CheckCXXCompilerFlag)
+
+ # "configureoptimization.cmake" must be included after CLR_CMAKE_HOST_UNIX has been set.
+@@ -40,11 +38,18 @@ set(CMAKE_CXX_FLAGS_CHECKED "")
+ set(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
+ set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "")
+
++set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "")
++set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "")
++set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "")
++set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
++set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
++set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "")
++
+ add_compile_definitions("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1>")
+ add_compile_definitions("$<$<OR:$<CONFIG:RELEASE>,$<CONFIG:RELWITHDEBINFO>>:NDEBUG;URTBLDENV_FRIENDLY=Retail>")
+
+ if (MSVC)
+- add_link_options(/GUARD:CF)
++ add_linker_flag(/GUARD:CF)
+
+ # Linker flags
+ #
+@@ -57,48 +62,51 @@ if (MSVC)
+ endif ()
+
+ #Do not create Side-by-Side Assembly Manifest
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/MANIFEST:NO>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO")
+ # can handle addresses larger than 2 gigabytes
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/LARGEADDRESSAWARE>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LARGEADDRESSAWARE")
+ #Compatible with Data Execution Prevention
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/NXCOMPAT>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NXCOMPAT")
+ #Use address space layout randomization
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/DYNAMICBASE>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DYNAMICBASE")
+ #shrink pdb size
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/PDBCOMPRESS>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /PDBCOMPRESS")
+
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/DEBUG>)
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/IGNORE:4197,4013,4254,4070,4221>)
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:/SUBSYSTEM:WINDOWS,${WINDOWS_SUBSYSTEM_VERSION}>)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG")
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /IGNORE:4197,4013,4254,4070,4221")
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS,${WINDOWS_SUBSYSTEM_VERSION}")
+
+ set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
+
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/DEBUG>)
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/PDBCOMPRESS>)
+- add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:/STACK:1572864>)
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /PDBCOMPRESS")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1572864")
+
+ # Debug build specific flags
+- add_link_options($<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>>:/NOVCFEATURE>)
++ set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NOVCFEATURE")
++ set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "${CMAKE_SHARED_LINKER_FLAGS_CHECKED} /NOVCFEATURE")
+
+ # Checked build specific flags
+- add_link_options($<$<CONFIG:CHECKED>:/INCREMENTAL:NO>) # prevent "warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification"
+- add_link_options($<$<CONFIG:CHECKED>:/OPT:REF>)
+- add_link_options($<$<CONFIG:CHECKED>:/OPT:NOICF>)
++ add_linker_flag(/INCREMENTAL:NO CHECKED) # prevent "warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification"
++ add_linker_flag(/OPT:REF CHECKED)
++ add_linker_flag(/OPT:NOICF CHECKED)
+
+ # Release build specific flags
+- add_link_options($<$<CONFIG:RELEASE>:/LTCG>)
+- add_link_options($<$<CONFIG:RELEASE>:/OPT:REF>)
+- add_link_options($<$<CONFIG:RELEASE>:/OPT:ICF>)
++ add_linker_flag(/LTCG RELEASE)
++ add_linker_flag(/OPT:REF RELEASE)
++ add_linker_flag(/OPT:ICF RELEASE)
++ add_linker_flag(/INCREMENTAL:NO RELEASE)
+ set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
+
+ # ReleaseWithDebugInfo build specific flags
+- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/LTCG>)
+- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/OPT:REF>)
+- add_link_options($<$<CONFIG:RELWITHDEBINFO>:/OPT:ICF>)
++ add_linker_flag(/LTCG RELWITHDEBINFO)
++ add_linker_flag(/OPT:REF RELWITHDEBINFO)
++ add_linker_flag(/OPT:ICF RELWITHDEBINFO)
+ set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
+
+ # Force uCRT to be dynamically linked for Release build
+- add_link_options("$<$<CONFIG:RELEASE>:/NODEFAULTLIB:libucrt.lib;/DEFAULTLIB:ucrt.lib>")
++ add_linker_flag(/NODEFAULTLIB:libucrt.lib RELEASE)
++ add_linker_flag(/DEFAULTLIB:ucrt.lib RELEASE)
+
+ elseif (CLR_CMAKE_HOST_UNIX)
+ # Set the values to display when interactively configuring CMAKE_BUILD_TYPE
+@@ -157,11 +165,10 @@ elseif (CLR_CMAKE_HOST_UNIX)
+
+ # -fdata-sections -ffunction-sections: each function has own section instead of one per .o file (needed for --gc-sections)
+ # -O1: optimization level used instead of -O0 to avoid compile error "invalid operand for inline asm constraint"
+- add_compile_definitions("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:${CLR_SANITIZE_CXX_OPTIONS};-fdata-sections;--ffunction-sections;-O1>")
+- add_link_options($<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>>:${CLR_SANITIZE_LINK_OPTIONS}>)
+-
++ add_compile_options("$<$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>:${CLR_SANITIZE_CXX_OPTIONS};-fdata-sections;--ffunction-sections;-O1>")
++ add_linker_flag("${CLR_SANITIZE_LINK_OPTIONS}" DEBUG CHECKED)
+ # -Wl and --gc-sections: drop unused sections\functions (similar to Windows /Gy function-level-linking)
+- add_link_options("$<$<AND:$<OR:$<CONFIG:DEBUG>,$<CONFIG:CHECKED>>,$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>>:${CLR_SANITIZE_LINK_OPTIONS};-Wl,--gc-sections>")
++ add_linker_flag("-Wl,--gc-sections" DEBUG CHECKED)
+ endif ()
+ endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
+ endif(MSVC)
+@@ -173,15 +180,18 @@ endif(MSVC)
+ # ./build-native.sh cmakeargs "-DCLR_ADDITIONAL_COMPILER_OPTIONS=<...>" cmakeargs "-DCLR_ADDITIONAL_LINKER_FLAGS=<...>"
+ #
+ if(CLR_CMAKE_HOST_UNIX)
+- add_link_options(${CLR_ADDITIONAL_LINKER_FLAGS})
++ foreach(ADDTL_LINKER_FLAG ${CLR_ADDITIONAL_LINKER_FLAGS})
++ add_linker_flag(${ADDTL_LINKER_FLAG})
++ endforeach()
+ endif(CLR_CMAKE_HOST_UNIX)
+
+ if(CLR_CMAKE_HOST_LINUX)
+ add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
+- add_link_options(-Wl,--build-id=sha1 -Wl,-z,relro,-z,now)
++ add_linker_flag(-Wl,--build-id=sha1)
++ add_linker_flag(-Wl,-z,relro,-z,now)
+ elseif(CLR_CMAKE_HOST_FREEBSD)
+ add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
+- add_link_options(LINKER:--build-id=sha1)
++ add_linker_flag("-Wl,--build-id=sha1")
+ elseif(CLR_CMAKE_HOST_SUNOS)
+ set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /opt/local/include)
+ set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /opt/local/lib)
+@@ -357,7 +367,7 @@ if (CLR_CMAKE_HOST_UNIX)
+ if(CLR_CMAKE_HOST_OSX)
+ set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=10.12)
+ add_compile_options(${MACOS_VERSION_MIN_FLAGS})
+- add_link_options(${MACOS_VERSION_MIN_FLAGS})
++ add_linker_flag(${MACOS_VERSION_MIN_FLAGS})
+ endif(CLR_CMAKE_HOST_OSX)
+ endif(CLR_CMAKE_HOST_UNIX)
+
+@@ -514,7 +524,7 @@ if(CLR_CMAKE_ENABLE_CODE_COVERAGE)
+
+ add_compile_options(-fprofile-arcs)
+ add_compile_options(-ftest-coverage)
+- add_link_options(--coverage)
++ add_linker_flag(--coverage)
+ else()
+ message(FATAL_ERROR "Code coverage builds not supported on current platform")
+ endif(CLR_CMAKE_HOST_UNIX)
+diff --git a/eng/native/configureplatform.cmake b/eng/native/configureplatform.cmake
+index 1c5254d8496..4a4131cb05d 100644
+--- a/eng/native/configureplatform.cmake
++++ b/eng/native/configureplatform.cmake
+@@ -1,4 +1,3 @@
+-include(CheckPIESupported)
+ include(${CMAKE_CURRENT_LIST_DIR}/functions.cmake)
+
+ # If set, indicates that this is not an officially supported release
+@@ -363,19 +362,10 @@ if(NOT CLR_CMAKE_TARGET_EMSCRIPTEN)
+ # but since we know that PIE is supported, we can safely skip this redundant check).
+ #
+ # The default linker on Solaris also does not support PIE.
+- if(NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_SUNOS)
+- # All code we build should be compiled as position independent
+- get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
+- if("CXX" IN_LIST languages)
+- set(CLR_PIE_LANGUAGE CXX)
+- else()
+- set(CLR_PIE_LANGUAGE C)
+- endif()
+- check_pie_supported(OUTPUT_VARIABLE PIE_SUPPORT_OUTPUT LANGUAGES ${CLR_PIE_LANGUAGE})
+- if(NOT MSVC AND NOT CMAKE_${CLR_PIE_LANGUAGE}_LINK_PIE_SUPPORTED)
+- message(WARNING "PIE is not supported at link time: ${PIE_SUPPORT_OUTPUT}.\n"
+- "PIE link options will not be passed to linker.")
+- endif()
++ if(NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_SUNOS AND NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_HOST_TVOS AND NOT CLR_CMAKE_HOST_IOS AND NOT MSVC)
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
++ add_compile_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-fPIE>)
++ add_compile_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-fPIC>)
+ endif()
+
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
+index b7f8f463804..f4a96cbe35e 100644
+--- a/eng/native/functions.cmake
++++ b/eng/native/functions.cmake
+@@ -123,7 +123,7 @@ function(preprocess_compile_asm)
+ set(options "")
+ set(oneValueArgs OUTPUT_OBJECTS)
+ set(multiValueArgs ASM_FILES)
+- cmake_parse_arguments(PARSE_ARGV 0 COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}")
++ cmake_parse_arguments(COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
+
+ get_include_directories_asm(ASM_INCLUDE_DIRECTORIES)
+
+@@ -209,7 +209,7 @@ function(target_precompile_header)
+ set(options "")
+ set(oneValueArgs TARGET HEADER)
+ set(multiValueArgs ADDITIONAL_INCLUDE_DIRECTORIES)
+- cmake_parse_arguments(PARSE_ARGV 0 PRECOMPILE_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}")
++ cmake_parse_arguments(PRECOMPILE_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
+
+ if ("${PRECOMPILE_HEADERS_TARGET}" STREQUAL "")
+ message(SEND_ERROR "No target supplied to target_precompile_header.")
+@@ -321,7 +321,7 @@ endfunction()
+ function(install_clr)
+ set(oneValueArgs ADDITIONAL_DESTINATION)
+ set(multiValueArgs TARGETS)
+- cmake_parse_arguments(PARSE_ARGV 0 INSTALL_CLR "${options}" "${oneValueArgs}" "${multiValueArgs}")
++ cmake_parse_arguments(INSTALL_CLR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
+
+ if ("${INSTALL_CLR_TARGETS}" STREQUAL "")
+ message(FATAL_ERROR "At least one target must be passed to install_clr(TARGETS )")
+@@ -377,6 +377,15 @@ function(disable_pax_mprotect targetName)
+ endif()
+ endfunction()
+
++if (CMAKE_VERSION VERSION_LESS "3.12")
++ # Polyfill add_compile_definitions when it is unavailable
++ function(add_compile_definitions)
++ get_directory_property(DIR_COMPILE_DEFINITIONS COMPILE_DEFINITIONS)
++ list(APPEND DIR_COMPILE_DEFINITIONS ${ARGV})
++ set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${DIR_COMPILE_DEFINITIONS}")
++ endfunction()
++endif()
++
+ function(_add_executable)
+ if(NOT WIN32)
+ add_executable(${ARGV} ${VERSION_FILE_PATH})
+@@ -415,3 +424,16 @@ endfunction()
+ function(add_executable_clr)
+ _add_executable(${ARGV})
+ endfunction()
++
++# add_linker_flag(Flag [Config1 Config2 ...])
++function(add_linker_flag Flag)
++ if (ARGN STREQUAL "")
++ set("CMAKE_EXE_LINKER_FLAGS" "${CMAKE_EXE_LINKER_FLAGS} ${Flag}" PARENT_SCOPE)
++ set("CMAKE_SHARED_LINKER_FLAGS" "${CMAKE_SHARED_LINKER_FLAGS} ${Flag}" PARENT_SCOPE)
++ else()
++ foreach(Config ${ARGN})
++ set("CMAKE_EXE_LINKER_FLAGS_${Config}" "${CMAKE_EXE_LINKER_FLAGS_${Config}} ${Flag}" PARENT_SCOPE)
++ set("CMAKE_SHARED_LINKER_FLAGS_${Config}" "${CMAKE_SHARED_LINKER_FLAGS_${Config}} ${Flag}" PARENT_SCOPE)
++ endforeach()
++ endif()
++endfunction()
+diff --git a/eng/native/gen-buildsys.sh b/eng/native/gen-buildsys.sh
+index f27bb33e357..1b4c2e02c59 100755
+--- a/eng/native/gen-buildsys.sh
++++ b/eng/native/gen-buildsys.sh
+@@ -91,6 +91,9 @@ if [[ "$build_arch" == "wasm" ]]; then
+ cmake_command="emcmake $cmake_command"
+ fi
+
++# We have to be able to build with CMake 3.6.2, so we can't use the -S or -B options
++pushd "$3"
++
+ # Include CMAKE_USER_MAKE_RULES_OVERRIDE as uninitialized since it will hold its value in the CMake cache otherwise can cause issues when branch switching
+ $cmake_command \
+ -G "$generator" \
+@@ -98,5 +101,6 @@ $cmake_command \
+ "-DCMAKE_INSTALL_PREFIX=$__CMakeBinDir" \
+ $cmake_extra_defines \
+ $__UnprocessedCMakeArgs \
+- -S "$1" \
+- -B "$3"
++ "$1"
++
++popd
+diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt
+index 5fa572c4fcd..071ac2cf5fa 100644
+--- a/src/coreclr/CMakeLists.txt
++++ b/src/coreclr/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.14.2)
++cmake_minimum_required(VERSION 3.6.2)
+
+ cmake_policy(SET CMP0042 NEW)
+
+diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake
+index 4b119809017..04bde2bc20b 100644
+--- a/src/coreclr/pgosupport.cmake
++++ b/src/coreclr/pgosupport.cmake
+@@ -1,5 +1,18 @@
+-include(CheckIPOSupported)
+-check_ipo_supported(RESULT HAVE_LTO)
++include(CheckCXXSourceCompiles)
++include(CheckCXXCompilerFlag)
++
++# VC++ guarantees support for LTCG (LTO's equivalent)
++if(NOT WIN32)
++ # Function required to give CMAKE_REQUIRED_* local scope
++ function(check_have_lto)
++ set(CMAKE_REQUIRED_FLAGS -flto)
++ set(CMAKE_REQUIRED_LIBRARIES -flto -fuse-ld=gold)
++ check_cxx_source_compiles("int main() { return 0; }" HAVE_LTO)
++ endfunction(check_have_lto)
++ check_have_lto()
++
++ check_cxx_compiler_flag(-faligned-new COMPILER_SUPPORTS_F_ALIGNED_NEW)
++endif(NOT WIN32)
+
+ # Adds Profile Guided Optimization (PGO) flags to the current target
+ function(add_pgo TargetName)
+diff --git a/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt b/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
+index dcd39e346c9..7b471d53726 100644
+--- a/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
++++ b/src/coreclr/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
+@@ -1,3 +1,4 @@
++cmake_minimum_required(VERSION 3.8)
+ # Quick note: The CMake C# support is using the CSC bundled with the MSBuild that the native build runs on, not the one supplied by the local .NET SDK.
+
+ project(DacTableGen LANGUAGES CSharp)
+diff --git a/src/coreclr/src/binder/CMakeLists.txt b/src/coreclr/src/binder/CMakeLists.txt
+index 3a66c81e10e..208f1214dd0 100644
+--- a/src/coreclr/src/binder/CMakeLists.txt
++++ b/src/coreclr/src/binder/CMakeLists.txt
+@@ -82,11 +82,13 @@ endif(CLR_CMAKE_TARGET_WIN32)
+ convert_to_absolute_path(BINDER_SOURCES ${BINDER_SOURCES})
+ convert_to_absolute_path(BINDER_CROSSGEN_SOURCES ${BINDER_CROSSGEN_SOURCES})
+
+-add_library_clr(v3binder
+- STATIC
++add_library_clr(v3binder_obj
++ OBJECT
+ ${BINDER_SOURCES}
+ )
+-add_dependencies(v3binder eventing_headers)
++add_dependencies(v3binder_obj eventing_headers)
++add_library(v3binder INTERFACE)
++target_sources(v3binder INTERFACE $<TARGET_OBJECTS:v3binder_obj>)
+
+ add_library_clr(v3binder_crossgen
+ STATIC
+diff --git a/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt b/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
+index 391f70eff43..fdcf344c16a 100644
+--- a/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
++++ b/src/coreclr/src/classlibnative/bcltype/CMakeLists.txt
+@@ -10,9 +10,11 @@ set(BCLTYPE_SOURCES
+ variant.cpp
+ )
+
+-add_library_clr(bcltype
+- STATIC
++add_library_clr(bcltype_obj
++ OBJECT
+ ${BCLTYPE_SOURCES}
+ )
+
+-add_dependencies(bcltype eventing_headers)
++add_dependencies(bcltype_obj eventing_headers)
++add_library(bcltype INTERFACE)
++target_sources(bcltype INTERFACE $<TARGET_OBJECTS:bcltype_obj>)
+diff --git a/src/coreclr/src/classlibnative/float/CMakeLists.txt b/src/coreclr/src/classlibnative/float/CMakeLists.txt
+index 44d40c92592..3c066620f76 100644
+--- a/src/coreclr/src/classlibnative/float/CMakeLists.txt
++++ b/src/coreclr/src/classlibnative/float/CMakeLists.txt
+@@ -7,9 +7,12 @@ set(FLOAT_SOURCES
+ floatsingle.cpp
+ )
+
+-add_library_clr(comfloat_wks
+- STATIC
++add_library_clr(comfloat_wks_obj
++ OBJECT
+ ${FLOAT_SOURCES}
+ )
+
+-add_dependencies(comfloat_wks eventing_headers)
++add_dependencies(comfloat_wks_obj eventing_headers)
++
++add_library(comfloat_wks INTERFACE)
++target_sources(comfloat_wks INTERFACE $<TARGET_OBJECTS:comfloat_wks_obj>)
+diff --git a/src/coreclr/src/debug/debug-pal/CMakeLists.txt b/src/coreclr/src/debug/debug-pal/CMakeLists.txt
+index ac1e48fb5fb..213fa59e784 100644
+--- a/src/coreclr/src/debug/debug-pal/CMakeLists.txt
++++ b/src/coreclr/src/debug/debug-pal/CMakeLists.txt
+@@ -34,4 +34,6 @@ if(CLR_CMAKE_HOST_UNIX)
+
+ endif(CLR_CMAKE_HOST_UNIX)
+
+-_add_library(debug-pal STATIC ${TWO_WAY_PIPE_SOURCES})
++_add_library(debug-pal_obj OBJECT ${TWO_WAY_PIPE_SOURCES})
++add_library(debug-pal INTERFACE)
++target_sources(debug-pal INTERFACE $<TARGET_OBJECTS:debug-pal_obj>)
+diff --git a/src/coreclr/src/debug/ee/wks/CMakeLists.txt b/src/coreclr/src/debug/ee/wks/CMakeLists.txt
+index ee6c482ce76..3dd5e3612df 100644
+--- a/src/coreclr/src/debug/ee/wks/CMakeLists.txt
++++ b/src/coreclr/src/debug/ee/wks/CMakeLists.txt
+@@ -9,9 +9,9 @@ if (CLR_CMAKE_TARGET_WIN32)
+
+ if(CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64)
+
+- preprocess_compile_asm(ASM_FILES ${ASM_FILE} OUTPUT_OBJECTS ASM_OBJECTS)
++ preprocess_compile_asm(TARGET cordbee_wks_obj ASM_FILES ${ASM_FILE} OUTPUT_OBJECTS ASM_OBJECTS)
+
+- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${ASM_OBJECTS})
++ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ${ASM_FILE} ${ASM_OBJECTS})
+
+ else ()
+
+@@ -23,19 +23,21 @@ if (CLR_CMAKE_TARGET_WIN32)
+
+ set_source_files_properties(${ASM_FILE} PROPERTIES COMPILE_OPTIONS "${ASM_OPTIONS}")
+
+- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${ASM_FILE})
++ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ${ASM_FILE})
+
+ endif()
+
+ else ()
+
+ if(CLR_CMAKE_HOST_ARCH_AMD64 OR CLR_CMAKE_HOST_ARCH_ARM OR CLR_CMAKE_HOST_ARCH_ARM64 OR CLR_CMAKE_HOST_ARCH_I386)
+- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S)
++ add_library_clr(cordbee_wks_obj OBJECT ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S)
+ else()
+ message(FATAL_ERROR "Unknown platform")
+ endif()
+
+ endif (CLR_CMAKE_TARGET_WIN32)
+
+-target_precompile_header(TARGET cordbee_wks HEADER stdafx.h)
+-add_dependencies(cordbee_wks eventing_headers)
++target_precompile_header(TARGET cordbee_wks_obj HEADER stdafx.h)
++add_dependencies(cordbee_wks_obj eventing_headers)
++add_library(cordbee_wks INTERFACE)
++target_sources(cordbee_wks INTERFACE $<TARGET_OBJECTS:cordbee_wks_obj>)
+diff --git a/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt b/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
+index 88364658f11..362da1f6483 100644
+--- a/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
++++ b/src/coreclr/src/debug/ildbsymlib/CMakeLists.txt
+@@ -10,5 +10,6 @@ set( ILDBSYMLIB_SOURCES
+ symwrite.cpp
+ )
+
+-add_library_clr(ildbsymlib ${ILDBSYMLIB_SOURCES})
+-
++add_library_clr(ildbsymlib_obj OBJECT ${ILDBSYMLIB_SOURCES})
++add_library(ildbsymlib INTERFACE)
++target_sources(ildbsymlib INTERFACE $<TARGET_OBJECTS:ildbsymlib_obj>)
+diff --git a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
+index 777a2869e4f..066b75ab01f 100644
+--- a/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
++++ b/src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
+@@ -9,20 +9,20 @@ if (CLR_CMAKE_HOST_WIN32)
+
+ list(APPEND CLR_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def)
+
+- add_link_options(/ENTRY:CoreDllMain)
++ add_linker_flag("/ENTRY:CoreDllMain")
+
+ # Incremental linking results in the linker inserting extra padding and routing function calls via thunks that can break the
+ # invariants (e.g. size of region between Jit_PatchedCodeLast-Jit_PatchCodeStart needs to fit in a page).
+- add_link_options(/INCREMENTAL:NO)
++ add_linker_flag("/INCREMENTAL:NO")
+
+ # Delay load libraries required for WinRT as that is not supported on all platforms
+- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll")
+- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll")
+- add_link_options("/DELAYLOAD:api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll")
+- add_link_options("/DELAYLOAD:api-ms-win-ro-typeresolution-l1-1-0.dll")
++ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll")
++ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll")
++ add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll")
++ add_linker_flag("/DELAYLOAD:api-ms-win-ro-typeresolution-l1-1-0.dll")
+
+ # Delay load version.dll so that we can specify how to search when loading it as it is not part of Windows' known DLLs
+- add_link_options("/DELAYLOAD:version.dll")
++ add_linker_flag("/DELAYLOAD:version.dll")
+
+ # No library groups for Win32
+ set(START_LIBRARY_GROUP)
+@@ -35,7 +35,7 @@ else(CLR_CMAKE_HOST_WIN32)
+ if(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_NETBSD)
+ # This option is necessary to ensure that the overloaded delete operator defined inside
+ # of the utilcode will be used instead of the standard library delete operator.
+- add_link_options("LINKER:-Bsymbolic")
++ add_linker_flag("-Wl,-Bsymbolic")
+
+ # The following linked options can be inserted into the linker libraries list to
+ # ensure proper resolving of circular references between a subset of the libraries.
+@@ -110,7 +110,7 @@ set(CORECLR_LIBRARIES
+ utilcode
+ v3binder
+ libraries-native
+- System.Globalization.Native-Static
++ System.Globalization.Native-static
+ interop
+ )
+
+@@ -162,7 +162,12 @@ if(FEATURE_EVENT_TRACE)
+ endif(CLR_CMAKE_HOST_UNIX)
+ endif(FEATURE_EVENT_TRACE)
+
+-target_link_libraries(coreclr ${CORECLR_LIBRARIES})
++if(FEATURE_MERGE_JIT_AND_ENGINE)
++ set(CLRJIT_STATIC clrjit_static)
++endif(FEATURE_MERGE_JIT_AND_ENGINE)
++
++target_sources(coreclr PUBLIC $<TARGET_OBJECTS:cee_wks_core>)
++target_link_libraries(coreclr PUBLIC ${CORECLR_LIBRARIES} ${CLRJIT_STATIC} cee_wks)
+
+ # Create the runtime module index header file containing the coreclr build id
+ # for xplat and the timestamp/size on Windows.
+diff --git a/src/coreclr/src/dlls/mscorrc/CMakeLists.txt b/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
+index 08cf27aaf80..e114ec19cea 100644
+--- a/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
++++ b/src/coreclr/src/dlls/mscorrc/CMakeLists.txt
+@@ -19,7 +19,9 @@ if(CLR_CMAKE_HOST_WIN32)
+ else()
+ build_resources(${CMAKE_CURRENT_SOURCE_DIR}/include.rc mscorrc TARGET_CPP_FILE)
+
+- add_library_clr(mscorrc STATIC
++ add_library_clr(mscorrc_obj OBJECT
+ ${TARGET_CPP_FILE}
+ )
++ add_library(mscorrc INTERFACE)
++ target_sources(mscorrc INTERFACE $<TARGET_OBJECTS:mscorrc_obj>)
+ endif(CLR_CMAKE_HOST_WIN32)
+diff --git a/src/coreclr/src/gcinfo/CMakeLists.txt b/src/coreclr/src/gcinfo/CMakeLists.txt
+index b0b67462562..50a1722a8ea 100644
+--- a/src/coreclr/src/gcinfo/CMakeLists.txt
++++ b/src/coreclr/src/gcinfo/CMakeLists.txt
+@@ -16,11 +16,14 @@ endif(CLR_CMAKE_TARGET_ARCH_I386)
+
+ convert_to_absolute_path(GCINFO_SOURCES ${GCINFO_SOURCES})
+
+-add_library_clr(gcinfo
+- STATIC
++add_library_clr(gcinfo_obj
++ OBJECT
+ ${GCINFO_SOURCES}
+ )
+
++add_library(gcinfo INTERFACE)
++target_sources(gcinfo INTERFACE $<TARGET_OBJECTS:gcinfo_obj>)
++
+ add_library_clr(gcinfo_crossgen
+ STATIC
+ ${GCINFO_SOURCES}
+diff --git a/src/coreclr/src/inc/CMakeLists.txt b/src/coreclr/src/inc/CMakeLists.txt
+index 60fad88e77d..4f75d3a882d 100644
+--- a/src/coreclr/src/inc/CMakeLists.txt
++++ b/src/coreclr/src/inc/CMakeLists.txt
+@@ -58,7 +58,9 @@ if(FEATURE_JIT_PITCHING)
+ endif(FEATURE_JIT_PITCHING)
+
+ # Compile *_i.cpp to lib
+-_add_library(corguids ${CORGUIDS_SOURCES})
++_add_library(corguids_obj OBJECT ${CORGUIDS_SOURCES})
++add_library(corguids INTERFACE)
++target_sources(corguids INTERFACE $<TARGET_OBJECTS:corguids_obj>)
+
+ # Binplace the inc files for packaging later.
+
+@@ -75,4 +77,3 @@ _install (FILES cfi.h
+ gcinfoencoder.h
+ gcinfotypes.h
+ DESTINATION inc)
+-_install (TARGETS corguids DESTINATION lib)
+diff --git a/src/coreclr/src/interop/CMakeLists.txt b/src/coreclr/src/interop/CMakeLists.txt
+index d7eaa1b04ae..3924b4fdbb4 100644
+--- a/src/coreclr/src/interop/CMakeLists.txt
++++ b/src/coreclr/src/interop/CMakeLists.txt
+@@ -30,7 +30,10 @@ endif(WIN32)
+
+ convert_to_absolute_path(INTEROP_SOURCES ${INTEROP_SOURCES})
+
+-add_library_clr(interop
+- STATIC
++add_library_clr(interop_obj
++ OBJECT
+ ${INTEROP_SOURCES}
+ )
++
++add_library(interop INTERFACE)
++target_sources(interop INTERFACE $<TARGET_OBJECTS:interop_obj>)
+diff --git a/src/coreclr/src/jit/dll/CMakeLists.txt b/src/coreclr/src/jit/dll/CMakeLists.txt
+index ec7cddc78ed..01bdbf5a731 100644
+--- a/src/coreclr/src/jit/dll/CMakeLists.txt
++++ b/src/coreclr/src/jit/dll/CMakeLists.txt
+@@ -2,17 +2,17 @@ project(ClrJit)
+
+ set_source_files_properties(${JIT_EXPORTS_FILE} PROPERTIES GENERATED TRUE)
+
++add_library_clr(clrjit_obj
++ OBJECT
++ ${JIT_CORE_SOURCES}
++ ${JIT_ARCH_SOURCES}
++)
++
+ if(CLR_CMAKE_HOST_UNIX)
+- add_library_clr(clrjit_static
+- STATIC
+- ${SHARED_LIB_SOURCES}
+- ${JIT_ARCH_SOURCES}
+- )
+- add_dependencies(clrjit_static coreclrpal gcinfo)
+-else()
+- add_library_clr(clrjit_static
+- ${SHARED_LIB_SOURCES}
+- ${JIT_ARCH_SOURCES}
+- )
++ add_dependencies(clrjit_obj coreclrpal gcinfo)
+ endif(CLR_CMAKE_HOST_UNIX)
+-target_precompile_header(TARGET clrjit_static HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR})
++
++target_precompile_header(TARGET clrjit_obj HEADER jitpch.h ADDITIONAL_INCLUDE_DIRECTORIES ${JIT_SOURCE_DIR})
++
++add_library(clrjit_static INTERFACE)
++target_sources(clrjit_static INTERFACE $<TARGET_OBJECTS:clrjit_obj>)
+diff --git a/src/coreclr/src/md/ceefilegen/CMakeLists.txt b/src/coreclr/src/md/ceefilegen/CMakeLists.txt
+index 90749c806b2..fd0f8424d97 100644
+--- a/src/coreclr/src/md/ceefilegen/CMakeLists.txt
++++ b/src/coreclr/src/md/ceefilegen/CMakeLists.txt
+@@ -25,8 +25,11 @@ if (CLR_CMAKE_TARGET_WIN32)
+ list(APPEND CEEFILEGEN_SOURCES ${CEEFILEGEN_HEADERS})
+ endif (CLR_CMAKE_TARGET_WIN32)
+
+-add_library_clr(ceefgen
+- STATIC
++add_library_clr(ceefgen_obj
++ OBJECT
+ ${CEEFILEGEN_SOURCES}
+ )
+-target_precompile_header(TARGET ceefgen HEADER stdafx.h)
++target_precompile_header(TARGET ceefgen_obj HEADER stdafx.h)
++
++add_library(ceefgen INTERFACE)
++target_sources(ceefgen INTERFACE $<TARGET_OBJECTS:ceefgen_obj>)
+diff --git a/src/coreclr/src/md/compiler/CMakeLists.txt b/src/coreclr/src/md/compiler/CMakeLists.txt
+index 3b916cdc9fe..f9f80db2500 100644
+--- a/src/coreclr/src/md/compiler/CMakeLists.txt
++++ b/src/coreclr/src/md/compiler/CMakeLists.txt
+@@ -58,9 +58,11 @@ add_library_clr(mdcompiler_dac ${MDCOMPILER_SOURCES})
+ set_target_properties(mdcompiler_dac PROPERTIES DAC_COMPONENT TRUE)
+ target_precompile_header(TARGET mdcompiler_dac HEADER stdafx.h)
+
+-add_library_clr(mdcompiler_wks ${MDCOMPILER_SOURCES})
+-target_compile_definitions(mdcompiler_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
+-target_precompile_header(TARGET mdcompiler_wks HEADER stdafx.h)
++add_library_clr(mdcompiler_wks_obj OBJECT ${MDCOMPILER_SOURCES})
++target_compile_definitions(mdcompiler_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
++target_precompile_header(TARGET mdcompiler_wks_obj HEADER stdafx.h)
++add_library(mdcompiler_wks INTERFACE)
++target_sources(mdcompiler_wks INTERFACE $<TARGET_OBJECTS:mdcompiler_wks_obj>)
+
+ add_library_clr(mdcompiler-dbi ${MDCOMPILER_SOURCES})
+ set_target_properties(mdcompiler-dbi PROPERTIES DBI_COMPONENT TRUE)
+diff --git a/src/coreclr/src/md/enc/CMakeLists.txt b/src/coreclr/src/md/enc/CMakeLists.txt
+index 7220736b9ca..82af8434296 100644
+--- a/src/coreclr/src/md/enc/CMakeLists.txt
++++ b/src/coreclr/src/md/enc/CMakeLists.txt
+@@ -48,9 +48,11 @@ add_library_clr(mdruntimerw_dac ${MDRUNTIMERW_SOURCES})
+ set_target_properties(mdruntimerw_dac PROPERTIES DAC_COMPONENT TRUE)
+ target_precompile_header(TARGET mdruntimerw_dac HEADER stdafx.h)
+
+-add_library_clr(mdruntimerw_wks ${MDRUNTIMERW_SOURCES})
+-target_compile_definitions(mdruntimerw_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
+-target_precompile_header(TARGET mdruntimerw_wks HEADER stdafx.h)
++add_library_clr(mdruntimerw_wks_obj OBJECT ${MDRUNTIMERW_SOURCES})
++target_compile_definitions(mdruntimerw_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
++target_precompile_header(TARGET mdruntimerw_wks_obj HEADER stdafx.h)
++add_library(mdruntimerw_wks INTERFACE)
++target_sources(mdruntimerw_wks INTERFACE $<TARGET_OBJECTS:mdruntimerw_wks_obj>)
+
+ add_library_clr(mdruntimerw-dbi ${MDRUNTIMERW_SOURCES})
+ set_target_properties(mdruntimerw-dbi PROPERTIES DBI_COMPONENT TRUE)
+diff --git a/src/coreclr/src/md/hotdata/CMakeLists.txt b/src/coreclr/src/md/hotdata/CMakeLists.txt
+index c6168d2a4b0..88475cb72f4 100644
+--- a/src/coreclr/src/md/hotdata/CMakeLists.txt
++++ b/src/coreclr/src/md/hotdata/CMakeLists.txt
+@@ -33,8 +33,10 @@ add_library_clr(mdhotdata_dac ${MDHOTDATA_SOURCES})
+ set_target_properties(mdhotdata_dac PROPERTIES DAC_COMPONENT TRUE)
+ target_precompile_header(TARGET mdhotdata_dac HEADER external.h)
+
+-add_library_clr(mdhotdata_full ${MDHOTDATA_SOURCES})
+-target_precompile_header(TARGET mdhotdata_full HEADER external.h)
++add_library_clr(mdhotdata_full_obj OBJECT ${MDHOTDATA_SOURCES})
++target_precompile_header(TARGET mdhotdata_full_obj HEADER external.h)
++add_library(mdhotdata_full INTERFACE)
++target_sources(mdhotdata_full INTERFACE $<TARGET_OBJECTS:mdhotdata_full_obj>)
+
+ add_library_clr(mdhotdata_crossgen ${MDHOTDATA_SOURCES})
+ set_target_properties(mdhotdata_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
+diff --git a/src/coreclr/src/md/runtime/CMakeLists.txt b/src/coreclr/src/md/runtime/CMakeLists.txt
+index 6dc193e14a7..7e0e83f1114 100644
+--- a/src/coreclr/src/md/runtime/CMakeLists.txt
++++ b/src/coreclr/src/md/runtime/CMakeLists.txt
+@@ -47,9 +47,11 @@ add_library_clr(mdruntime_dac ${MDRUNTIME_SOURCES})
+ set_target_properties(mdruntime_dac PROPERTIES DAC_COMPONENT TRUE)
+ target_precompile_header(TARGET mdruntime_dac HEADER stdafx.h)
+
+-add_library_clr(mdruntime_wks ${MDRUNTIME_SOURCES})
+-target_compile_definitions(mdruntime_wks PRIVATE FEATURE_METADATA_EMIT_ALL)
+-target_precompile_header(TARGET mdruntime_wks HEADER stdafx.h)
++add_library_clr(mdruntime_wks_obj OBJECT ${MDRUNTIME_SOURCES})
++target_compile_definitions(mdruntime_wks_obj PRIVATE FEATURE_METADATA_EMIT_ALL)
++target_precompile_header(TARGET mdruntime_wks_obj HEADER stdafx.h)
++add_library(mdruntime_wks INTERFACE)
++target_sources(mdruntime_wks INTERFACE $<TARGET_OBJECTS:mdruntime_wks_obj>)
+
+ add_library_clr(mdruntime-dbi ${MDRUNTIME_SOURCES})
+ set_target_properties(mdruntime-dbi PROPERTIES DBI_COMPONENT TRUE)
+diff --git a/src/coreclr/src/pal/src/CMakeLists.txt b/src/coreclr/src/pal/src/CMakeLists.txt
+index e7c1629d5b2..7818deef050 100644
+--- a/src/coreclr/src/pal/src/CMakeLists.txt
++++ b/src/coreclr/src/pal/src/CMakeLists.txt
+@@ -256,10 +256,12 @@ add_library(coreclrpal
+ # > warning for library: libtracepointprovider.a the table of contents is empty (no object file members in the library define global symbols)
+ #
+ if(CLR_CMAKE_TARGET_LINUX)
+- add_library(tracepointprovider
+- STATIC
++ add_library(tracepointprovider_obj
++ OBJECT
+ misc/tracepointprovider.cpp
+ )
++ add_library(tracepointprovider INTERFACE)
++ target_sources(tracepointprovider INTERFACE $<TARGET_OBJECTS:tracepointprovider_obj>)
+ endif(CLR_CMAKE_TARGET_LINUX)
+
+ if(CLR_CMAKE_TARGET_OSX)
+diff --git a/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt b/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
+index 39b9826d1ab..8e6968cf783 100644
+--- a/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
++++ b/src/coreclr/src/pal/src/eventprovider/dummyprovider/CMakeLists.txt
+@@ -1,8 +1,8 @@
+-include(FindPython)
++include(FindPythonInterp)
+
+ set (GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genDummyProvider.py)
+
+-set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
++set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
+
+ execute_process(
+ COMMAND ${GENERATE_COMMAND} --dry-run
+diff --git a/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt b/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
+index 234dea19b75..d55dab3557f 100644
+--- a/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
++++ b/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt
+@@ -1,7 +1,7 @@
+-include(FindPython)
++include(FindPythonInterp)
+ set (GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genLttngProvider.py)
+
+-set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
++set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR})
+
+ execute_process(
+ COMMAND ${GENERATE_COMMAND} --dry-run
+diff --git a/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt b/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
+index 000ee2d2fb0..845fae656be 100644
+--- a/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
++++ b/src/coreclr/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
+@@ -5,10 +5,10 @@ set(SOURCES
+ set(EVENT_MANIFEST ${VM_DIR}/ClrEtwAll.man)
+ set(TEST_GENERATOR ${CLR_DIR}/src/scripts/genEventingTests.py)
+
+-include(FindPython)
++include(FindPythonInterp)
+
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/clralltestevents.cpp
+- COMMAND ${Python_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}"
++ COMMAND ${PYTHON_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}"
+ DEPENDS ${EVENT_MANIFEST} ${TEST_GENERATOR}
+ COMMENT "Updating clralltestevents.cpp"
+ )
+diff --git a/src/coreclr/src/unwinder/CMakeLists.txt b/src/coreclr/src/unwinder/CMakeLists.txt
+index 4421ea9f6f6..41a0219bbf7 100644
+--- a/src/coreclr/src/unwinder/CMakeLists.txt
++++ b/src/coreclr/src/unwinder/CMakeLists.txt
+@@ -20,8 +20,10 @@ list(APPEND UNWINDER_SOURCES
+ convert_to_absolute_path(UNWINDER_SOURCES ${UNWINDER_SOURCES})
+
+ if(CLR_CMAKE_HOST_UNIX)
+- add_library_clr(unwinder_wks ${UNWINDER_SOURCES})
+- add_dependencies(unwinder_wks eventing_headers)
++ add_library_clr(unwinder_wks_obj OBJECT ${UNWINDER_SOURCES})
++ add_dependencies(unwinder_wks_obj eventing_headers)
++ add_library(unwinder_wks INTERFACE)
++ target_sources(unwinder_wks INTERFACE $<TARGET_OBJECTS:unwinder_wks_obj>)
+ endif(CLR_CMAKE_HOST_UNIX)
+
+ add_library_clr(unwinder_dac ${UNWINDER_SOURCES})
+diff --git a/src/coreclr/src/utilcode/CMakeLists.txt b/src/coreclr/src/utilcode/CMakeLists.txt
+index aa28b2db603..f8082fc9076 100644
+--- a/src/coreclr/src/utilcode/CMakeLists.txt
++++ b/src/coreclr/src/utilcode/CMakeLists.txt
+@@ -98,7 +98,9 @@ convert_to_absolute_path(UTILCODE_CROSSGEN_SOURCES ${UTILCODE_CROSSGEN_SOURCES})
+ convert_to_absolute_path(UTILCODE_STATICNOHOST_SOURCES ${UTILCODE_STATICNOHOST_SOURCES})
+
+ add_library_clr(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES})
+-add_library_clr(utilcode STATIC ${UTILCODE_SOURCES})
++add_library_clr(utilcode_obj OBJECT ${UTILCODE_SOURCES})
++add_library(utilcode INTERFACE)
++target_sources(utilcode INTERFACE $<TARGET_OBJECTS:utilcode_obj>)
+ add_library_clr(utilcodestaticnohost STATIC ${UTILCODE_STATICNOHOST_SOURCES})
+ add_library_clr(utilcode_crossgen STATIC ${UTILCODE_CROSSGEN_SOURCES})
+
+@@ -106,9 +108,9 @@ if(CLR_CMAKE_HOST_UNIX)
+ target_link_libraries(utilcodestaticnohost nativeresourcestring)
+ target_link_libraries(utilcode_crossgen nativeresourcestring)
+ target_link_libraries(utilcode_dac nativeresourcestring)
+- target_link_libraries(utilcode nativeresourcestring)
++ target_link_libraries(utilcode INTERFACE nativeresourcestring)
+ add_dependencies(utilcode_dac coreclrpal)
+- add_dependencies(utilcode coreclrpal)
++ add_dependencies(utilcode_obj coreclrpal)
+ endif(CLR_CMAKE_HOST_UNIX)
+
+
+@@ -121,10 +123,10 @@ set_target_properties(utilcode_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
+ target_compile_definitions(utilcode_dac PRIVATE SELF_NO_HOST)
+ target_compile_definitions(utilcodestaticnohost PRIVATE SELF_NO_HOST)
+ add_dependencies(utilcode_dac ${UTILCODE_DEPENDENCIES})
+-add_dependencies(utilcode ${UTILCODE_DEPENDENCIES})
++add_dependencies(utilcode_obj ${UTILCODE_DEPENDENCIES})
+ add_dependencies(utilcode_crossgen ${UTILCODE_DEPENDENCIES})
+ add_dependencies(utilcodestaticnohost ${UTILCODE_DEPENDENCIES})
+ target_precompile_header(TARGET utilcode_dac HEADER stdafx.h)
+-target_precompile_header(TARGET utilcode HEADER stdafx.h)
++target_precompile_header(TARGET utilcode_obj HEADER stdafx.h)
+ target_precompile_header(TARGET utilcode_crossgen HEADER stdafx.h)
+ target_precompile_header(TARGET utilcodestaticnohost HEADER stdafx.h)
+diff --git a/src/coreclr/src/vm/CMakeLists.txt b/src/coreclr/src/vm/CMakeLists.txt
+index 3e37cebdc10..2b20d7d910a 100644
+--- a/src/coreclr/src/vm/CMakeLists.txt
++++ b/src/coreclr/src/vm/CMakeLists.txt
+@@ -923,7 +923,7 @@ list(APPEND VM_HEADERS_DAC
+
+ if (CLR_CMAKE_TARGET_WIN32)
+ list(APPEND VM_SOURCES_WKS ${VM_HEADERS_WKS})
+- list(APPEND VM_SOURCES_WKS_ARCH_ASM ${VM_HEADERS_WKS_ARCH_ASM})
++ list(APPEND VM_SOURCES_WKS ${VM_HEADERS_WKS_ARCH_ASM})
+ list(APPEND VM_SOURCES_DAC ${VM_HEADERS_DAC})
+ endif(CLR_CMAKE_TARGET_WIN32)
+
+diff --git a/src/coreclr/src/vm/eventing/CMakeLists.txt b/src/coreclr/src/vm/eventing/CMakeLists.txt
+index 98dd158df54..e2bf024fc59 100644
+--- a/src/coreclr/src/vm/eventing/CMakeLists.txt
++++ b/src/coreclr/src/vm/eventing/CMakeLists.txt
+@@ -8,12 +8,13 @@ else()
+ set(NEED_XPLAT_HEADER ON)
+ endif()
+
+-include(FindPython)
++include(FindPythonInterp)
+
+ set (EventingHeaders
+ ${GENERATED_INCLUDE_DIR}/etmdummy.h
+ ${GENERATED_INCLUDE_DIR}/clretwallmain.h
+ ${GENERATED_INCLUDE_DIR}/clreventpipewriteevents.h
++ ${GENERATED_INCLUDE_DIR}/clrproviders.h
+ )
+
+ if (NEED_XPLAT_HEADER)
+@@ -24,7 +25,7 @@ endif()
+ set(GENEVENTING_SCRIPT ${CLR_DIR}/src/scripts/genEventing.py)
+
+ add_custom_target(eventing_headers
+- ${Python_EXECUTABLE} ${GENEVENTING_SCRIPT} --man ${EVENT_MANIFEST} --inc ${GENERATED_INCLUDE_DIR} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG}
++ ${PYTHON_EXECUTABLE} ${GENEVENTING_SCRIPT} --man ${EVENT_MANIFEST} --inc ${GENERATED_INCLUDE_DIR} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG}
+ DEPENDS ${EVENT_MANIFEST} ${GENEVENTING_SCRIPT}
+ VERBATIM
+ )
+diff --git a/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt b/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
+index 34a067e1ec5..4c7df2fbb3c 100644
+--- a/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
++++ b/src/coreclr/src/vm/eventing/EtwProvider/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-include(FindPython)
++include(FindPythonInterp)
+
+ set(ETW_PROVIDER_SCRIPT ${CLR_DIR}/src/scripts/genEtwProvider.py)
+
+@@ -14,5 +14,5 @@ set (ETW_PROVIDER_OUTPUTS
+ set_source_files_properties(${ETW_PROVIDER_OUTPUTS} PROPERTIES GENERATED TRUE)
+
+ add_custom_target(eventprovider
+- ${Python_EXECUTABLE} ${ETW_PROVIDER_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${GENERATED_INCLUDE_DIR}
++ ${PYTHON_EXECUTABLE} ${ETW_PROVIDER_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${GENERATED_INCLUDE_DIR}
+ DEPENDS ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS} ${ETW_PROVIDER_SCRIPT})
+diff --git a/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt b/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
+index 00b3f6f386f..00d79737e54 100644
+--- a/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
++++ b/src/coreclr/src/vm/eventing/eventpipe/CMakeLists.txt
+@@ -1,9 +1,9 @@
+-include(FindPython)
++include(FindPythonInterp)
+
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+ set(GENERATE_SCRIPT ${CLR_DIR}/src/scripts/genEventPipe.py)
+-set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${CMAKE_CURRENT_BINARY_DIR} ${NONEXTERN_ARG})
++set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${CMAKE_CURRENT_BINARY_DIR} ${NONEXTERN_ARG})
+
+ execute_process(
+ COMMAND ${GENERATE_COMMAND} --dry-run
+@@ -28,10 +28,8 @@ add_custom_command(OUTPUT ${EVENTPIPE_SOURCES}
+ COMMAND ${GENERATE_COMMAND}
+ DEPENDS ${GENERATE_SCRIPT} ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS})
+
+-add_library_clr(eventpipe STATIC ${EVENTPIPE_SOURCES})
+-set_target_properties(eventpipe PROPERTIES LINKER_LANGUAGE CXX)
+-add_dependencies(eventpipe eventing_headers)
+-
+-if (NOT CLR_CMAKE_TARGET_WIN32)
+- _install(TARGETS eventpipe DESTINATION lib)
+-endif()
++add_library_clr(eventpipe_obj OBJECT ${EVENTPIPE_SOURCES})
++set_target_properties(eventpipe_obj PROPERTIES LINKER_LANGUAGE CXX)
++add_dependencies(eventpipe_obj eventing_headers)
++add_library(eventpipe INTERFACE)
++target_sources(eventpipe INTERFACE $<TARGET_OBJECTS:eventpipe_obj>)
+diff --git a/src/coreclr/src/vm/wks/CMakeLists.txt b/src/coreclr/src/vm/wks/CMakeLists.txt
+index 1e94b575fd6..5d355f6adcb 100644
+--- a/src/coreclr/src/vm/wks/CMakeLists.txt
++++ b/src/coreclr/src/vm/wks/CMakeLists.txt
+@@ -7,13 +7,19 @@ if (CLR_CMAKE_TARGET_WIN32)
+
+ endif (CLR_CMAKE_TARGET_WIN32)
+
+-add_library_clr(cee_wks ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM})
+-target_precompile_header(TARGET cee_wks HEADER common.h)
++add_library_clr(cee_wks_core OBJECT ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM})
++add_library_clr(cee_wks_obj OBJECT ${VM_SOURCES_WKS_SPECIAL})
++
++target_precompile_header(TARGET cee_wks_core HEADER common.h)
++target_precompile_header(TARGET cee_wks_obj HEADER common.h)
++
+ if (MSVC)
+ # mscorlib.cpp does not compile with precompiled header file
+ set_source_files_properties(../mscorlib.cpp PROPERTIES COMPILE_FLAGS "/Y-")
+ endif()
+-add_dependencies(cee_wks eventing_headers)
++
++add_dependencies(cee_wks_core eventing_headers)
++add_dependencies(cee_wks_obj eventing_headers)
+
+ if (CLR_CMAKE_TARGET_WIN32)
+
+@@ -45,8 +51,16 @@ if (CLR_CMAKE_TARGET_WIN32)
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.inc
+ )
+
+- add_dependencies(cee_wks asmconstants_inc)
++ add_dependencies(cee_wks_core asmconstants_inc)
++ add_dependencies(cee_wks_obj asmconstants_inc)
+
+ endif(NOT CLR_CMAKE_HOST_ARCH_ARM AND NOT CLR_CMAKE_HOST_ARCH_ARM64)
+
+ endif (CLR_CMAKE_TARGET_WIN32)
++
++add_custom_target(preprocessd_asm DEPENDS ${VM_WKS_ARCH_ASM_OBJECTS})
++add_dependencies(cee_wks_core preprocessd_asm)
++add_dependencies(cee_wks_obj preprocessd_asm)
++
++add_library(cee_wks INTERFACE)
++target_sources(cee_wks INTERFACE $<TARGET_OBJECTS:cee_wks_obj> ${VM_WKS_ARCH_ASM_OBJECTS})
+diff --git a/src/coreclr/tests/CMakeLists.txt b/src/coreclr/tests/CMakeLists.txt
+index 53dbb85a58b..c5417cba7d0 100644
+--- a/src/coreclr/tests/CMakeLists.txt
++++ b/src/coreclr/tests/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.14.2)
++cmake_minimum_required(VERSION 3.6.2)
+
+ cmake_policy(SET CMP0042 NEW)
+ project(Tests)
+diff --git a/src/installer/corehost/CMakeLists.txt b/src/installer/corehost/CMakeLists.txt
+index 43a59a1a695..dff0496cdd8 100644
+--- a/src/installer/corehost/CMakeLists.txt
++++ b/src/installer/corehost/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.14.2)
++cmake_minimum_required(VERSION 3.6.2)
+
+ project(corehost)
+
+diff --git a/src/installer/corehost/cli/exe.cmake b/src/installer/corehost/cli/exe.cmake
+index de8cd49396b..732faf97ff9 100644
+--- a/src/installer/corehost/cli/exe.cmake
++++ b/src/installer/corehost/cli/exe.cmake
+@@ -5,7 +5,6 @@
+ project (${DOTNET_PROJECT_NAME})
+
+ cmake_policy(SET CMP0011 NEW)
+-cmake_policy(SET CMP0083 NEW)
+
+ include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)
+
+diff --git a/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt b/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
+index bcf6a051229..8572a6318ec 100644
+--- a/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
++++ b/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
+@@ -2,7 +2,6 @@
+ # The .NET Foundation licenses this file to you under the MIT license.
+ # See the LICENSE file in the project root for more information.
+
+-cmake_minimum_required (VERSION 2.6)
+ project(mockhostfxr_2_2)
+
+ set(DOTNET_PROJECT_NAME "mockhostfxr_2_2")
+diff --git a/src/libraries/Native/Unix/CMakeLists.txt b/src/libraries/Native/Unix/CMakeLists.txt
+index f14ada69fee..cb174fe5013 100644
+--- a/src/libraries/Native/Unix/CMakeLists.txt
++++ b/src/libraries/Native/Unix/CMakeLists.txt
+@@ -1,19 +1,14 @@
+-cmake_minimum_required(VERSION 3.14.2)
++cmake_minimum_required(VERSION 3.6.2)
++if(CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
++ # CMake 3.14.5 contains bug fixes for iOS
++ cmake_minimum_required(VERSION 3.14.5)
++ endif()
+ cmake_policy(SET CMP0042 NEW)
+
+ project(CoreFX C)
+
+ include(${CLR_ENG_NATIVE_DIR}/configuretools.cmake)
+
+-if(CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
+- # CMake 3.14.5 contains bug fixes for iOS
+- cmake_minimum_required(VERSION 3.14.5)
+-endif()
+-
+-if(NOT CLR_CMAKE_TARGET_ARCH_WASM)
+- cmake_policy(SET CMP0083 NEW)
+-endif(NOT CLR_CMAKE_TARGET_ARCH_WASM)
+-
+ set(CMAKE_MACOSX_RPATH ON)
+ set(CMAKE_INSTALL_PREFIX $ENV{__CMakeBinDir})
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+@@ -167,7 +162,8 @@ if(CLR_CMAKE_TARGET_UNIX)
+ if(NOT CLR_CMAKE_TARGET_ARCH_WASM AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS)
+ if(CLR_CMAKE_TARGET_OSX)
+ add_definitions(-DTARGET_OSX)
+- add_link_options(-Wl,-bind_at_load)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-bind_at_load")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-bind_at_load" )
+ else()
+ add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
+ if(CLR_CMAKE_TARGET_SUNOS)
+@@ -175,7 +171,8 @@ if(CLR_CMAKE_TARGET_UNIX)
+ else()
+ # -z,now is required for full relro.
+ # see https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-re...
+- add_link_options(-Wl,--build-id=sha1 -Wl,-z,relro,-z,now)
++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now" )
+ endif()
+ endif()
+ endif()
+diff --git a/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt b/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
+index bcfc5dd106a..ebcb5a02b3f 100644
+--- a/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
++++ b/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt
+@@ -79,14 +79,15 @@ if (GEN_SHARED_LIB)
+ install_with_stripped_symbols (System.Globalization.Native PROGRAMS .)
+ endif()
+
+-add_library(System.Globalization.Native-Static
+- STATIC
++add_library(System.Globalization.Native-obj
++ OBJECT
+ ${NATIVEGLOBALIZATION_SOURCES}
+ )
+
+-set_target_properties(System.Globalization.Native-Static PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1)
++set_target_properties(System.Globalization.Native-obj PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1)
+
+-install (TARGETS System.Globalization.Native-Static DESTINATION .)
++add_library(System.Globalization.Native-static INTERFACE)
++target_sources(System.Globalization.Native-static INTERFACE $<TARGET_OBJECTS:System.Globalization.Native-obj>)
+
+ if(NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID)
+ if (GEN_SHARED_LIB)
diff --git a/runtime-dont-strip.patch b/runtime-dont-strip.patch
new file mode 100644
index 0000000..694face
--- /dev/null
+++ b/runtime-dont-strip.patch
@@ -0,0 +1,47 @@
+Do not strip native/unmanaged symbols from binaries
+
+This is a hack. It rips out the calls to strip directly.
+
+The correct/upstreamable fix is to add a configure/build option to
+keep symbols for some builds, such as those needed by upstream.
+
+diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
+index 8b73581ed14..7697908425e 100644
+--- a/eng/native/functions.cmake
++++ b/eng/native/functions.cmake
+@@ -282,7 +282,7 @@ function(target_precompile_header)
+ endif(MSVC)
+ endfunction()
+
+-function(strip_symbols targetName outputFilename)
++function(strip_symbols_renamed targetName outputFilename)
+ if (CLR_CMAKE_HOST_UNIX)
+ set(strip_source_file $<TARGET_FILE:${targetName}>)
+
+@@ -336,8 +336,8 @@ function(strip_symbols targetName outputFilename)
+ endfunction()
+
+ function(install_with_stripped_symbols targetName kind destination)
+- strip_symbols(${targetName} symbol_file)
+- install_symbols(${symbol_file} ${destination})
++ # strip_symbols_renamed(${targetName} symbol_file)
++ # install_symbols(${symbol_file} ${destination})
+ if ("${kind}" STREQUAL "TARGETS")
+ set(install_source ${targetName})
+ elseif("${kind}" STREQUAL "PROGRAMS")
+@@ -375,13 +375,13 @@ function(install_clr)
+ foreach(targetName ${INSTALL_CLR_TARGETS})
+ list(FIND CLR_CROSS_COMPONENTS_LIST ${targetName} INDEX)
+ if (NOT DEFINED CLR_CROSS_COMPONENTS_LIST OR NOT ${INDEX} EQUAL -1)
+- strip_symbols(${targetName} symbol_file)
++ # strip_symbols_renamed(${targetName} symbol_file)
+
+ foreach(destination ${destinations})
+ # We don't need to install the export libraries for our DLLs
+ # since they won't be directly linked against.
+ install(PROGRAMS $<TARGET_FILE:${targetName}> DESTINATION ${destination})
+- install_symbols(${symbol_file} ${destination})
++ # install_symbols(${symbol_file} ${destination})
+
+ if(CLR_CMAKE_PGO_INSTRUMENT)
+ if(WIN32)
diff --git a/runtime-flags-support.patch b/runtime-flags-support.patch
new file mode 100644
index 0000000..921e483
--- /dev/null
+++ b/runtime-flags-support.patch
@@ -0,0 +1,30 @@
+diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh
+index b976f5fdc6c..853580b1c7a 100755
+--- a/eng/native/build-commons.sh
++++ b/eng/native/build-commons.sh
+@@ -163,6 +163,14 @@ EOF
+ return
+ fi
+
++ SAVED_CFLAGS="${CFLAGS}"
++ SAVED_CXXFLAGS="${CXXFLAGS}"
++ SAVED_LDFLAGS="${LDFLAGS}"
++
++ export CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}"
++ export CXXFLAGS="${CXXFLAGS} ${EXTRA_CXXFLAGS}"
++ export LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}"
++
+ if [[ "$__StaticAnalyzer" == 1 ]]; then
+ pushd "$intermediatesDir"
+
+@@ -181,6 +189,10 @@ EOF
+ $cmake_command --build "$intermediatesDir" --target install -- -j "$__NumProc"
+ fi
+
++ CFLAGS="${SAVED_CFLAGS}"
++ CXXFLAGS="${SAVED_CXXFLAGS}"
++ LDFLAGS="${SAVED_LDFLAGS}"
++
+ local exit_code="$?"
+ if [[ "$exit_code" != 0 ]]; then
+ echo "${__ErrMsgPrefix}Failed to build \"$message\"."
diff --git a/cli-telemetry-optout.patch b/sdk-telemetry-optout.patch
similarity index 82%
rename from cli-telemetry-optout.patch
rename to sdk-telemetry-optout.patch
index 9b01f13..9b92f33 100644
--- a/cli-telemetry-optout.patch
+++ b/sdk-telemetry-optout.patch
@@ -1,7 +1,7 @@
-diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs
+diff --git a/src/Cli/dotnet/Program.cs b/src/Cli/dotnet/Program.cs
index de1ebb9e6..6bbf479de 100644
---- a/src/dotnet/Program.cs
-+++ b/src/dotnet/Program.cs
+--- a/src/Cli/dotnet/Program.cs
++++ b/src/Cli/dotnet/Program.cs
@@ -28,6 +28,13 @@ public class Program
public static int Main(string[] args)
diff --git a/sources b/sources
deleted file mode 100644
index 6762903..0000000
--- a/sources
+++ /dev/null
@@ -1 +0,0 @@
-SHA512 (dotnet-v3.1.103.2-SDK.tar.gz) = 6c4de4914f6d107e59300efb43fae24fffdbb983a5ffeb36fbe26c8071a87e76162ebde0f0aa270ab7cbb666b4ee0ab65cfab98f1dbba2ea9d48809372417ec2
diff --git a/tests/tests.yml b/tests/tests.yml
index ede9095..f3825cf 100644
--- a/tests/tests.yml
+++ b/tests/tests.yml
@@ -7,20 +7,18 @@
- container
- atomic
repositories:
- - repo: "https://github.com/redhat-developer/dotnet-bunny.git"
- dest: "dotnet-bunny"
- repo: "https://github.com/redhat-developer/dotnet-regular-tests.git"
dest: "dotnet-regular-tests"
tests:
- - build_test_suite:
- dir: dotnet-bunny
- run: make
- - print_test_suite_version:
- dir: dotnet-bunny
- run: bin/turkey --version
- - run_regular_tests:
- dir: dotnet-regular-tests
- run: ../dotnet-bunny/bin/turkey -l={{ remote_artifacts }}
+ - download_test_runner:
+ dir: ./
+ run: wget --no-verbose https://github.com/redhat-developer/dotnet-bunny/releases/latest/download... -m) -O turkey && chmod +x ./turkey
+ - print_test_runner_version:
+ dir: ./
+ run: ./turkey --version
+ - regular:
+ dir: ./
+ run: ./turkey -l={{ remote_artifacts }} -s=$(pwd)/nuget-prerelease dotnet-regular-tests
required_packages:
- babeltrace
- bash-completion
diff --git a/update-release b/update-release
index d8bcde7..da87262 100755
--- a/update-release
+++ b/update-release
@@ -26,7 +26,7 @@ while [[ "$#" -gt 0 ]]; do
esac
done
-spec_file=dotnet3.1.spec
+spec_file=dotnet5.0.spec
sdk_version=${positional_args[0]:-}
if [[ -z ${sdk_version} ]]; then
commit 2236128d3ef9488a2c9fd503322a1d7910ef28f0
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Apr 10 12:29:37 2020 -0400
Add some documentation to the empty README
diff --git a/README.md b/README.md
index d35adc1..816aba3 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,133 @@
-# dotnet3.1
+# Overview
-The dotnet3.1 package
\ No newline at end of file
+This is the .NET Core 3.1 package for Fedora.
+
+This package is maintained by the Fedora DotNet SIG (Special Interest
+Group). You can find out more about the DotNet SIG at:
+
+- https://fedoraproject.org/wiki/SIGs/DotNet
+- https://fedoraproject.org/wiki/DotNet
+- https://lists.fedoraproject.org/archives/list/dotnet-sig@lists.fedoraproj...
+
+Please report any issues [using
+bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet3.1).
+
+# Specification
+
+This package follows [package naming and contents suggested by
+upstream](https://docs.microsoft.com/en-us/dotnet/core/build/distribution-packaging),
+with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
+`%{_libdir}`).
+
+# Contributing
+
+## General Changes
+
+1. Fork the repo.
+
+2. Checkout the forked repository.
+
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet3.1.git`
+ - `cd dotnet3.1`
+
+3. Make your changes. Don't forget to add a changelog.
+
+4. Do local builds.
+
+ - `fedpkg local`
+
+5. Fix any errors that come up and rebuild until it works locally.
+
+6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+9. Create a pull request with your changes.
+
+10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+## Updating to an new upstream release
+
+1. Fork the repo.
+
+2. Checkout the forked repository.
+
+ - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet3.1.git`
+ - `cd dotnet3.1`
+
+3. Build the new upstream source tarball. Update the versions in the
+ spec file. Add a changelog. This is generally automated by the
+ following.
+
+ - `./update-release <sdk-version> <runtime-version>`
+
+ If this fails because of compiler errors, you might have to figure
+ out a fix, then add the patch in `build-dotnet-tarball` script
+ rather than the spec file.
+
+4. Do local builds.
+
+ - `fedpkg local`
+
+5. Fix any errors that come up and rebuild until it works locally. Any
+ patches that are needed at this point should be added to the spec file.
+
+6. Do builds in koji.
+
+ - `fedpkg scratch-build --srpm`
+
+7. Upload the source archive to the Fedora look-aside cache.
+
+ - `fedpkg new-sources path-to-generated-dotnet-source-tarball.tar.gz`
+
+8. Commit the changes to the git repo.
+
+ - `git add` any new patches
+ - `git remove` any now-unnecessary patches
+ - `git commit -a`
+ - `git push`
+
+9. Create a pull request with your changes.
+
+10. Once the tests in the pull-request pass, and reviewers are happy, do a real
+ build.
+
+ - `fedpkg build`
+
+11. For non-rawhide releases, file updates using bodhi to ship the just-built
+ package out to users.
+
+ - https://bodhi.fedoraproject.org/updates/new
+
+ OR
+
+ - `fedpkg update`
+
+# Testing
+
+This package uses CI tests as defined in `tests/test.yml`. Creating a
+pull-request or running a build will fire off tests and flag any issues. We have
+enabled gating (via `gating.yaml`) on the tests. That prevents a build
+that fails any test from being released until the failures are waived.
+
+The tests themselves are contained in this external repository:
+https://github.com/redhat-developer/dotnet-regular-tests/
commit 835f5d753d45c6e638dc1519cd108a0a97bfa545
Author: Chris Rummel <crummel(a)microsoft.com>
Date: Thu Apr 9 18:40:42 2020 -0500
Update to 3.1.103 SDK and 3.1.3 runtime.
- Update version numbers and sources.
- Add CoreFx patch from PR#42900 to fix clang10 build.
diff --git a/.gitignore b/.gitignore
index 1337900..6fa687b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/dotnet-v3.1.101-SDK.tar.gz
/dotnet-v3.1.102-SDK.tar.gz
+/dotnet-v3.1.103.2-SDK.tar.gz
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index ef7f742..3314c7e 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -94,7 +94,11 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.proj
mkdir -p patches/coreclr/
cp ../../build-coreclr-clang10.patch patches/coreclr
- ./build-source-tarball.sh "${unmodified_tarball_name}"
+ mkdir -p patches/corefx/
+ cp ../../corefx-42900-clang-10.patch patches/corefx
+ cp -r /usr/lib64/dotnet "${temp_dir}"
+ ./build.sh --with-sdk ../dotnet /p:ArchiveDownloadedPackages=true
+ ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build --with-sdk ../dotnet
popd
popd
@@ -111,8 +115,8 @@ pushd "${tarball_name}"
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
find -type f -iname '*.tar.gz' -delete
-rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*
-find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r
+rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
+find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
find src/coreclr.*/ -depth -name tests -print0 | xargs -0 rm -r
popd
diff --git a/corefx-42900-clang-10.patch b/corefx-42900-clang-10.patch
new file mode 100644
index 0000000..b898f34
--- /dev/null
+++ b/corefx-42900-clang-10.patch
@@ -0,0 +1,70 @@
+From 58d6cd09bd2d5b1085c6572c1d97b8533cf8294b Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Fri, 3 Apr 2020 13:53:09 -0400
+Subject: [PATCH] Fix corefx to build on clang 10
+
+Clang 10 adds/enables new warnings, some of which is affecting
+the corefx code.
+
+Clang 10 has added -Walloca to warn about uses of alloca. This commit
+replaces the only non-compliant use of that with a single fixed
+stack-allocated buffer.
+
+Clang 10 has also added -Wimplicit-int-float-conversion. This commit
+uses explicit casts to double to avoid the warnings.
+
+This is a backport of dotnet/runtime#33734 to corefx.
+
+After this commit, I can build all of corefx with Clang 10.
+---
+ src/Native/Unix/System.Native/pal_io.c | 20 +++++++++++---------
+ src/Native/Unix/System.Native/pal_time.c | 2 +-
+ 2 files changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/src/Native/Unix/System.Native/pal_io.c b/src/Native/Unix/System.Native/pal_io.c
+index 2d51edacf5ee..c7c42eb3e72b 100644
+--- a/src/Native/Unix/System.Native/pal_io.c
++++ b/src/Native/Unix/System.Native/pal_io.c
+@@ -906,18 +906,20 @@ int32_t SystemNative_Poll(PollEvent* pollEvents, uint32_t eventCount, int32_t mi
+ return Error_EINVAL;
+ }
+
+- size_t bufferSize;
+- if (!multiply_s(sizeof(struct pollfd), (size_t)eventCount, &bufferSize))
++ struct pollfd stackBuffer[(uint32_t)(2048/sizeof(struct pollfd))];
++ int useStackBuffer = eventCount <= (sizeof(stackBuffer)/sizeof(stackBuffer[0]));
++ struct pollfd* pollfds = NULL;
++ if (useStackBuffer)
+ {
+- return SystemNative_ConvertErrorPlatformToPal(EOVERFLOW);
++ pollfds = (struct pollfd*)&stackBuffer[0];
+ }
+-
+-
+- int useStackBuffer = bufferSize <= 2048;
+- struct pollfd* pollfds = (struct pollfd*)(useStackBuffer ? alloca(bufferSize) : malloc(bufferSize));
+- if (pollfds == NULL)
++ else
+ {
+- return Error_ENOMEM;
++ pollfds = (struct pollfd*)calloc(eventCount, sizeof(*pollfds));
++ if (pollfds == NULL)
++ {
++ return Error_ENOMEM;
++ }
+ }
+
+ for (uint32_t i = 0; i < eventCount; i++)
+diff --git a/src/Native/Unix/System.Native/pal_time.c b/src/Native/Unix/System.Native/pal_time.c
+index 1a7c862749d1..54ebde60a83b 100644
+--- a/src/Native/Unix/System.Native/pal_time.c
++++ b/src/Native/Unix/System.Native/pal_time.c
+@@ -169,7 +169,7 @@ int32_t SystemNative_GetCpuUtilization(ProcessCpuInformation* previousCpuInfo)
+ uint64_t resolution = SystemNative_GetTimestampResolution();
+ uint64_t timestamp = SystemNative_GetTimestamp();
+
+- uint64_t currentTime = (uint64_t)(timestamp * ((double)SecondsToNanoSeconds / resolution));
++ uint64_t currentTime = (uint64_t)((double)timestamp * ((double)SecondsToNanoSeconds / (double)resolution));
+
+ uint64_t lastRecordedCurrentTime = previousCpuInfo->lastRecordedCurrentTime;
+ uint64_t lastRecordedKernelTime = previousCpuInfo->lastRecordedKernelTime;
diff --git a/corefx-optflags-support.patch b/corefx-optflags-support.patch
index 6f76d7f..9b08f1f 100644
--- a/corefx-optflags-support.patch
+++ b/corefx-optflags-support.patch
@@ -2,9 +2,10 @@ diff --git a/src/Native/Unix/CMakeLists.txt b/src/Native/Unix/CMakeLists.txt
index 7d804a1e54..717c2718d7 100644
--- a/src/Native/Unix/CMakeLists.txt
+++ b/src/Native/Unix/CMakeLists.txt
-@@ -25,7 +25,6 @@ add_compile_options(-fPIC)
+@@ -25,7 +25,7 @@ add_compile_options(-fPIC)
add_compile_options(-Wthread-safety)
add_compile_options(-Wno-thread-safety-analysis)
++ add_compile_options(-Wno-alloca)
endif()
-add_compile_options(-Werror)
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index c08312f..44ff8fb 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -20,10 +20,12 @@
%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-%global host_version 3.1.2
-%global runtime_version 3.1.2
+%global host_version 3.1.3
+%global runtime_version 3.1.3
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 3.1.102
+%global sdk_version 3.1.103
+# upstream respun this release, so the tag doesn't exactly match
+%global src_version %{sdk_version}.2
%global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version}
@@ -62,8 +64,8 @@ License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL
URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
-# ./build-dotnet-tarball v%%{sdk_version}-SDK
-Source0: dotnet-v%{sdk_version}-SDK.tar.gz
+# ./build-dotnet-tarball v%%{src_version}-SDK
+Source0: dotnet-v%{src_version}-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
@@ -319,7 +321,7 @@ These are not meant for general use.
%prep
-%setup -q -n dotnet-v%{sdk_version}-SDK
+%setup -q -n dotnet-v%{src_version}-SDK
%if %{without bootstrap}
# Remove all prebuilts
@@ -328,12 +330,12 @@ find -iname '*.so' -type f -delete
find -iname '*.tar.gz' -type f -delete
find -iname '*.nupkg' -type f -delete
find -iname '*.zip' -type f -delete
-rm -r .dotnet/
+rm -rf .dotnet/
rm -r packages/source-built
%endif
%if %{without bootstrap}
-sed -i -e 's|3.1.100-preview1-014459|3.1.101|' global.json
+sed -i -e 's|3.1.100-preview1-014459|3.1.102|' global.json
mkdir -p packages/archive
ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
@@ -514,6 +516,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Thu Apr 09 2020 Chris Rummel <crummel(a)microsoft.com> - 3.1.103-1
+- Update to .NET Core Runtime 3.1.3 and SDK 3.1.103
+
* Mon Mar 16 2020 Omair Majid <omajid(a)redhat.com> - 3.1.102-1
- Update to .NET Core Runtime 3.1.2 and SDK 3.1.102
diff --git a/sources b/sources
index 9bc51e2..6762903 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v3.1.102-SDK.tar.gz) = f46f54b996883ecced44d377e2052b59461781bd2a0c8453a31e90e6822998ca5e97957a4b16a2aa00f7e803c17ce68c2128b8aad9aa2e0a399b7b15ea5af168
+SHA512 (dotnet-v3.1.103.2-SDK.tar.gz) = 6c4de4914f6d107e59300efb43fae24fffdbb983a5ffeb36fbe26c8071a87e76162ebde0f0aa270ab7cbb666b4ee0ab65cfab98f1dbba2ea9d48809372417ec2
commit 115e095157e2dbe9e52bdba77dbffd7b9c262fa6
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Mar 17 10:08:19 2020 -0400
Add testing and enable gating
And enable building against itself.
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index 76a64b6..c08312f 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -67,8 +67,6 @@ Source0: dotnet-v%{sdk_version}-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
-Patch1: sdk-rid.patch
-
# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
Patch100: corefx-optflags-support.patch
@@ -102,6 +100,7 @@ BuildRequires: dotnet-build-reference-packages
BuildRequires: dotnet-sdk-3.1
BuildRequires: dotnet-sdk-3.1-source-built-artifacts
%endif
+BuildRequires: findutils
BuildRequires: git
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: glibc-langpack-en
@@ -384,8 +383,8 @@ find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
cat /etc/os-release
%if %{without bootstrap}
-cp -a %{_libdir}/dotnet .dotnet
-patch -p0 -i %{PATCH1}
+# We need to create a copy because we will mutate this
+cp -a %{_libdir}/dotnet previously-built-dotnet
%endif
export CFLAGS="%{dotnet_cflags}"
@@ -399,12 +398,15 @@ export LDFLAGS="%{dotnet_ldflags}"
#%%endif
VERBOSE=1 ./build.sh \
- -- \
- /v:n \
- /p:SkipPortableRuntimeBuild=true \
- /p:LogVerbosity=n \
- /p:MinimalConsoleLogOutput=false \
- /p:ContinueOnPrebuiltBaselineError=true \
+%if %{without bootstrap}
+ --with-sdk previously-built-dotnet \
+%endif
+ -- \
+ /v:n \
+ /p:SkipPortableRuntimeBuild=true \
+ /p:LogVerbosity=n \
+ /p:MinimalConsoleLogOutput=false \
+ /p:ContinueOnPrebuiltBaselineError=true \
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
diff --git a/gating.yaml b/gating.yaml
new file mode 100644
index 0000000..0d881de
--- /dev/null
+++ b/gating.yaml
@@ -0,0 +1,7 @@
+--- !Policy
+product_versions:
+ - fedora-*
+decision_context: bodhi_update_push_testing
+subject_type: koji_build
+rules:
+ - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
diff --git a/sdk-rid.patch b/sdk-rid.patch
deleted file mode 100644
index 99dda5b..0000000
--- a/sdk-rid.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json
-+++ .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json
-@@ -488,6 +488,23 @@
- "fedora-x64"
- ]
- },
-+ "fedora.33": {
-+ "#import": [
-+ "fedora"
-+ ]
-+ },
-+ "fedora.33-arm64": {
-+ "#import": [
-+ "fedora.33",
-+ "fedora-arm64"
-+ ]
-+ },
-+ "fedora.33-x64": {
-+ "#import": [
-+ "fedora.33",
-+ "fedora-x64"
-+ ]
-+ },
- "freebsd": {
- "#import": [
- "unix"
-@@ -2042,4 +2059,4 @@
- ]
- }
- }
--}
-\ No newline at end of file
-+}
diff --git a/tests/.fmf/version b/tests/.fmf/version
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/tests/.fmf/version
@@ -0,0 +1 @@
+2
diff --git a/tests/provision.fmf b/tests/provision.fmf
new file mode 100644
index 0000000..87b3807
--- /dev/null
+++ b/tests/provision.fmf
@@ -0,0 +1,6 @@
+---
+
+standard-inventory-qcow2:
+ qemu:
+ m: 5G
+
diff --git a/tests/tests.yml b/tests/tests.yml
new file mode 100644
index 0000000..ede9095
--- /dev/null
+++ b/tests/tests.yml
@@ -0,0 +1,38 @@
+---
+- hosts: localhost
+ roles:
+ - role: standard-test-basic
+ tags:
+ - classic
+ - container
+ - atomic
+ repositories:
+ - repo: "https://github.com/redhat-developer/dotnet-bunny.git"
+ dest: "dotnet-bunny"
+ - repo: "https://github.com/redhat-developer/dotnet-regular-tests.git"
+ dest: "dotnet-regular-tests"
+ tests:
+ - build_test_suite:
+ dir: dotnet-bunny
+ run: make
+ - print_test_suite_version:
+ dir: dotnet-bunny
+ run: bin/turkey --version
+ - run_regular_tests:
+ dir: dotnet-regular-tests
+ run: ../dotnet-bunny/bin/turkey -l={{ remote_artifacts }}
+ required_packages:
+ - babeltrace
+ - bash-completion
+ - binutils
+ - expect
+ - git
+ - jq
+ - lldb
+ - lttng-tools
+ - make
+ - npm
+ - python3
+ - strace
+ - wget
+ - which
commit 942e8b4298a91cc9da6eac84967cdffb5da062cd
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Mar 16 12:46:48 2020 -0400
Upload sources
diff --git a/.gitignore b/.gitignore
index 72735bd..1337900 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/dotnet-v3.1.101-SDK.tar.gz
+/dotnet-v3.1.102-SDK.tar.gz
diff --git a/sources b/sources
index e5c1d68..9bc51e2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-v3.1.101-SDK.tar.gz) = b2eb9df091186e793e82ac7560496c9ac3478e41efa94e58300606e2883d9bdb187f588a48a7bd9cf7f10f3d8f641d0867eb013de9b159e3d471a71dd823278c
+SHA512 (dotnet-v3.1.102-SDK.tar.gz) = f46f54b996883ecced44d377e2052b59461781bd2a0c8453a31e90e6822998ca5e97957a4b16a2aa00f7e803c17ce68c2128b8aad9aa2e0a399b7b15ea5af168
commit afa7f9a38cd8368e41e41309d6bd4fae20a0e3a5
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Mar 16 12:30:04 2020 -0400
Update to .NET Core Runtime 3.1.2 and SDK 3.1.102
diff --git a/coreclr-clang10.patch b/build-coreclr-clang10.patch
similarity index 100%
rename from coreclr-clang10.patch
rename to build-coreclr-clang10.patch
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
index 0923778..ef7f742 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -92,6 +92,8 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git submodule update --init --recursive
clean_dotnet_cache
sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.proj
+ mkdir -p patches/coreclr/
+ cp ../../build-coreclr-clang10.patch patches/coreclr
./build-source-tarball.sh "${unmodified_tarball_name}"
popd
popd
@@ -108,6 +110,7 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
pushd "${tarball_name}"
# Remove files with funny licenses, crypto implementations and other
# not-very-useful artifacts to reduce tarball size
+find -type f -iname '*.tar.gz' -delete
rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*
find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r
rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index fe50a53..76a64b6 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -20,11 +20,11 @@
%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-%global host_version 3.1.1
-%global runtime_version 3.1.1
+%global host_version 3.1.2
+%global runtime_version 3.1.2
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 3.1.101
-%global templates_version %{runtime_version}
+%global sdk_version 3.1.102
+%global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version}
%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
@@ -56,7 +56,7 @@
Name: dotnet3.1
Version: %{sdk_rpm_version}
-Release: 4%{?dist}
+Release: 1%{?dist}
Summary: .NET Core Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -83,8 +83,8 @@ Patch104: corefx-42871-fedora-33-rid.patch
# Build with with hardening flags, including -pie
Patch200: coreclr-hardening-flags.patch
-# Fix build with clang 10
-Patch201: coreclr-clang10.patch
+# Fix build with clang 10; Already applied at tarball-build time
+# Patch201: coreclr-clang10.patch
# Build with with hardening flags, including -pie
Patch300: core-setup-hardening-flags.patch
@@ -341,7 +341,7 @@ ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages
%endif
# Fix bad hardcoded path in build
-sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/dotnet-core-setup.*/src/corehost/common/pal.unix.cpp
+sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/core-setup.*/src/corehost/common/pal.unix.cpp
# Disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.proj
@@ -356,14 +356,14 @@ popd
pushd src/coreclr.*
%patch200 -p1
-%patch201 -p1
+#%%patch201 -p1
popd
-pushd src/dotnet-core-setup.*
+pushd src/core-setup.*
%patch300 -p1
popd
-pushd src/dotnet-cli.*
+pushd src/cli.*
%patch500 -p1
popd
@@ -392,8 +392,16 @@ export CFLAGS="%{dotnet_cflags}"
export CXXFLAGS="%{dotnet_cflags}"
export LDFLAGS="%{dotnet_ldflags}"
+#%%if %%{without bootstrap}
+# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
+# --with-packages %%{_libdir}/dotnet/source-built-artifacts/*.tar.gz \
+# --with-sdk %%{_libdir}/dotnet \
+#%%endif
+
VERBOSE=1 ./build.sh \
+ -- \
/v:n \
+ /p:SkipPortableRuntimeBuild=true \
/p:LogVerbosity=n \
/p:MinimalConsoleLogOutput=false \
/p:ContinueOnPrebuiltBaselineError=true \
@@ -421,15 +429,13 @@ chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/app
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/nethost.h
-chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.1.0/obj/Microsoft.AspNetCore.App.Ref.csproj.nuget.cache
-chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.1.0/Microsoft.AspNetCore.App.Ref/3.1.0/Debug/netstandard2.0/Microsoft.AspNetCore.App.Ref.assets.cache
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
install -dm 0755 %{buildroot}/%{_datadir}/bash-completion/completions
# dynamic completion needs the file to be named the same as the base command
-install src/dotnet-cli.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
+install src/cli.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
# TODO: the zsh completion script needs to be ported to use #compdef
#install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions
@@ -506,6 +512,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Mon Mar 16 2020 Omair Majid <omajid(a)redhat.com> - 3.1.102-1
+- Update to .NET Core Runtime 3.1.2 and SDK 3.1.102
+
* Fri Feb 28 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-4
- Disable bootstrap
diff --git a/sdk-rid.patch b/sdk-rid.patch
index 85e97b5..99dda5b 100644
--- a/sdk-rid.patch
+++ b/sdk-rid.patch
@@ -1,5 +1,5 @@
---- .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json.orig 2020-02-27 19:48:57.286692828 -0500
-+++ .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json 2020-02-27 19:49:17.185262594 -0500
+--- .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json
++++ .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json
@@ -488,6 +488,23 @@
"fedora-x64"
]
diff --git a/update-release b/update-release
index 09eb509..d8bcde7 100755
--- a/update-release
+++ b/update-release
@@ -1,14 +1,14 @@
#!/bin/bash
# Usage:
-# ./update-release runtime-version sdk-version
+# ./update-release sdk-version runtime-version
set -euo pipefail
IFS=$'\n\t'
print_usage() {
echo " Usage:"
- echo " ./update-release runtime-version sdk-version"
+ echo " ./update-release sdk-version runtime-version"
}
positional_args=()
@@ -28,19 +28,20 @@ done
spec_file=dotnet3.1.spec
-runtime_version=${positional_args[0]:-}
-if [[ -z ${runtime_version} ]]; then
- echo "error: missing runtime version"
+sdk_version=${positional_args[0]:-}
+if [[ -z ${sdk_version} ]]; then
+ echo "error: missing sdk version"
exit 1
fi
-host_version="$runtime_version"
-sdk_version=${positional_args[1]:-}
-if [[ -z ${sdk_version} ]]; then
- echo "error: missing sdk version"
+runtime_version=${positional_args[1]:-}
+if [[ -z ${runtime_version} ]]; then
+ echo "error: missing runtime version"
exit 1
fi
+host_version="$runtime_version"
+
if [[ ! -f "dotnet-v${sdk_version}-SDK.tar.gz" ]]; then
./build-dotnet-tarball "v${sdk_version}-SDK"
fi
commit 87d13ef02a3e031d50160e2fcc635465169b581f
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Feb 28 14:26:16 2020 -0500
Disable bootstrap
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index 7fc1ded..fe50a53 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -1,4 +1,4 @@
-%bcond_without bootstrap
+%bcond_with bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -56,7 +56,7 @@
Name: dotnet3.1
Version: %{sdk_rpm_version}
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: .NET Core Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -506,6 +506,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Fri Feb 28 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-4
+- Disable bootstrap
+
* Fri Feb 28 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-3
- Enable bootstrap
- Add Fedora 33 runtime ids
commit 5a4961b806dc1de340a2b640d4a406d36fb00554
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Feb 28 10:22:16 2020 -0500
Enable bootstrap and add Fedora 33 runtime ids
diff --git a/corefx-42871-fedora-33-rid.patch b/corefx-42871-fedora-33-rid.patch
new file mode 100644
index 0000000..2802dcd
--- /dev/null
+++ b/corefx-42871-fedora-33-rid.patch
@@ -0,0 +1,124 @@
+From 6cf4ff086875eaf29381cf406ea85846d9f66178 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Mon, 24 Feb 2020 14:11:03 -0500
+Subject: [PATCH] Add Fedora 33 runtime ids
+
+Fedora 32 is gearing up for release[1], and in-development version of
+Fedora has been offically labelled as being Fedora 33:
+
+ $ podman run -it fedora:33 cat /etc/os-release
+ NAME=Fedora
+ VERSION="33 (Container Image)"
+ ID=fedora
+ VERSION_ID=33
+ VERSION_CODENAME=""
+ PLATFORM_ID="platform:f33"
+ PRETTY_NAME="Fedora 33 (Container Image)"
+ ANSI_COLOR="0;34"
+ LOGO=fedora-logo-icon
+ CPE_NAME="cpe:/o:fedoraproject:fedora:33"
+ HOME_URL="https://fedoraproject.org/"
+ DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators..."
+ SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
+ BUG_REPORT_URL="https://bugzilla.redhat.com/"
+ REDHAT_BUGZILLA_PRODUCT="Fedora"
+ REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
+ REDHAT_SUPPORT_PRODUCT="Fedora"
+ REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
+ PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
+ VARIANT="Container Image"
+ VARIANT_ID=container
+
+[1] https://fedorapeople.org/groups/schedule/f-32/f-32-key-tasks.html
+---
+ eng/Packaging.props | 2 +-
+ .../runtime.compatibility.json | 32 +++++++++++++++++++
+ pkg/Microsoft.NETCore.Platforms/runtime.json | 17 ++++++++++
+ .../runtimeGroups.props | 2 +-
+ src/packages.builds | 3 ++
+ 5 files changed, 54 insertions(+), 2 deletions(-)
+
+diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+index 1e5c380a7a6a..c20e35394d6b 100644
+--- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
++++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+@@ -953,6 +953,38 @@
+ "any",
+ "base"
+ ],
++ "fedora.33": [
++ "fedora.33",
++ "fedora",
++ "linux",
++ "unix",
++ "any",
++ "base"
++ ],
++ "fedora.33-arm64": [
++ "fedora.33-arm64",
++ "fedora.33",
++ "fedora-arm64",
++ "fedora",
++ "linux-arm64",
++ "linux",
++ "unix-arm64",
++ "unix",
++ "any",
++ "base"
++ ],
++ "fedora.33-x64": [
++ "fedora.33-x64",
++ "fedora.33",
++ "fedora-x64",
++ "fedora",
++ "linux-x64",
++ "linux",
++ "unix-x64",
++ "unix",
++ "any",
++ "base"
++ ],
+ "freebsd": [
+ "freebsd",
+ "unix",
+diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json
+index b2f286ea2479..b3380ecbbef3 100644
+--- a/pkg/Microsoft.NETCore.Platforms/runtime.json
++++ b/pkg/Microsoft.NETCore.Platforms/runtime.json
+@@ -488,6 +488,23 @@
+ "fedora-x64"
+ ]
+ },
++ "fedora.33": {
++ "#import": [
++ "fedora"
++ ]
++ },
++ "fedora.33-arm64": {
++ "#import": [
++ "fedora.33",
++ "fedora-arm64"
++ ]
++ },
++ "fedora.33-x64": {
++ "#import": [
++ "fedora.33",
++ "fedora-x64"
++ ]
++ },
+ "freebsd": {
+ "#import": [
+ "unix"
+diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+index eeb8130b54fb..da48e5f9d09f 100644
+--- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
++++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+@@ -43,7 +43,7 @@
+ <RuntimeGroup Include="fedora">
+ <Parent>linux</Parent>
+ <Architectures>x64;arm64</Architectures>
+- <Versions>23;24;25;26;27;28;29;30;31;32</Versions>
++ <Versions>23;24;25;26;27;28;29;30;31;32;33</Versions>
+ <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
+ </RuntimeGroup>
+
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index 7f89d4b..7fc1ded 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -1,4 +1,4 @@
-%bcond_with bootstrap
+%bcond_without bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -56,7 +56,7 @@
Name: dotnet3.1
Version: %{sdk_rpm_version}
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: .NET Core Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -67,6 +67,8 @@ Source0: dotnet-v%{sdk_version}-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
+Patch1: sdk-rid.patch
+
# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
Patch100: corefx-optflags-support.patch
@@ -76,6 +78,9 @@ Patch101: corefx-39686-cgroupv2-01.patch
Patch102: corefx-39686-cgroupv2-02.patch
Patch103: corefx-39633-cgroupv2-mountpoints.patch
+# Add Fedora 33 RID to corefx
+Patch104: corefx-42871-fedora-33-rid.patch
+
# Build with with hardening flags, including -pie
Patch200: coreclr-hardening-flags.patch
# Fix build with clang 10
@@ -346,6 +351,7 @@ pushd src/corefx.*
%patch101 -p1
%patch102 -p1
%patch103 -p1
+%patch104 -p1
popd
pushd src/coreclr.*
@@ -379,6 +385,7 @@ cat /etc/os-release
%if %{without bootstrap}
cp -a %{_libdir}/dotnet .dotnet
+patch -p0 -i %{PATCH1}
%endif
export CFLAGS="%{dotnet_cflags}"
@@ -499,6 +506,10 @@ echo "Testing build results for debug symbols..."
%changelog
+* Fri Feb 28 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-3
+- Enable bootstrap
+- Add Fedora 33 runtime ids
+
* Thu Feb 27 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-2
- Disable bootstrap
diff --git a/sdk-rid.patch b/sdk-rid.patch
new file mode 100644
index 0000000..85e97b5
--- /dev/null
+++ b/sdk-rid.patch
@@ -0,0 +1,33 @@
+--- .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json.orig 2020-02-27 19:48:57.286692828 -0500
++++ .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json 2020-02-27 19:49:17.185262594 -0500
+@@ -488,6 +488,23 @@
+ "fedora-x64"
+ ]
+ },
++ "fedora.33": {
++ "#import": [
++ "fedora"
++ ]
++ },
++ "fedora.33-arm64": {
++ "#import": [
++ "fedora.33",
++ "fedora-arm64"
++ ]
++ },
++ "fedora.33-x64": {
++ "#import": [
++ "fedora.33",
++ "fedora-x64"
++ ]
++ },
+ "freebsd": {
+ "#import": [
+ "unix"
+@@ -2042,4 +2059,4 @@
+ ]
+ }
+ }
+-}
+\ No newline at end of file
++}
commit b909e7156775b1d8c8ea7198c41f11eda135636a
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Feb 27 17:57:48 2020 -0500
Disable bootstrap
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index 32d18ba..7f89d4b 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -1,4 +1,4 @@
-%bcond_without bootstrap
+%bcond_with bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
@@ -56,7 +56,7 @@
Name: dotnet3.1
Version: %{sdk_rpm_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: .NET Core Runtime and SDK
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
URL: https://github.com/dotnet/
@@ -499,6 +499,9 @@ echo "Testing build results for debug symbols..."
%changelog
+* Thu Feb 27 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-2
+- Disable bootstrap
+
* Tue Jan 21 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-1
- Update to .NET Core Runtime 3.1.1 and SDK 3.1.101
commit 39697ab889857504725b0798acddec3d7848bad7
Author: Omair Majid <omajid(a)redhat.com>
Date: Wed Feb 26 21:56:12 2020 -0500
Fix build with clang 10
diff --git a/coreclr-clang10.patch b/coreclr-clang10.patch
new file mode 100644
index 0000000..3b13cb1
--- /dev/null
+++ b/coreclr-clang10.patch
@@ -0,0 +1,54 @@
+diff --git a/configurecompiler.cmake b/configurecompiler.cmake
+index d769e82f57..4936c8b00d 100644
+--- a/configurecompiler.cmake
++++ b/configurecompiler.cmake
+@@ -474,6 +474,7 @@ if (CLR_CMAKE_PLATFORM_UNIX)
+ add_compile_options(-Wno-unused-variable)
+ add_compile_options(-Wno-unused-value)
+ add_compile_options(-Wno-unused-function)
++ add_compile_options(-Wno-error=misleading-indentation)
+
+ #These seem to indicate real issues
+ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-invalid-offsetof>)
+diff --git a/src/inc/slist.h b/src/inc/slist.h
+index f05d763dc6..abebe04d47 100644
+--- a/src/inc/slist.h
++++ b/src/inc/slist.h
+@@ -160,13 +160,13 @@ public:
+ void Init()
+ {
+ LIMITED_METHOD_CONTRACT;
+- m_pHead = &m_link;
++ m_pHead = PTR_SLink(&m_link);
+ // NOTE :: fHead variable is template argument
+ // the following code is a compiled in, only if the fHead flag
+ // is set to false,
+ if (!fHead)
+ {
+- m_pTail = &m_link;
++ m_pTail = PTR_SLink(&m_link);
+ }
+ }
+
+@@ -274,7 +274,7 @@ public:
+ SLink *ret = SLink::FindAndRemove(m_pHead, GetLink(pObj), &prior);
+
+ if (ret == m_pTail)
+- m_pTail = prior;
++ m_pTail = PTR_SLink(prior);
+
+ return GetObject(ret);
+ }
+diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
+index 08a35c8f62..43eb648a14 100644
+--- a/src/pal/inc/pal.h
++++ b/src/pal/inc/pal.h
+@@ -145,7 +145,7 @@ typedef PVOID NATIVE_LIBRARY_HANDLE;
+
+ /******************* Compiler-specific glue *******************************/
+ #ifndef THROW_DECL
+-#if defined(_MSC_VER) || defined(__llvm__) || !defined(__cplusplus)
++#if defined(_MSC_VER) || !defined(__cplusplus)
+ #define THROW_DECL
+ #else
+ #define THROW_DECL throw()
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
index 4536929..32d18ba 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -78,6 +78,8 @@ Patch103: corefx-39633-cgroupv2-mountpoints.patch
# Build with with hardening flags, including -pie
Patch200: coreclr-hardening-flags.patch
+# Fix build with clang 10
+Patch201: coreclr-clang10.patch
# Build with with hardening flags, including -pie
Patch300: core-setup-hardening-flags.patch
@@ -112,6 +114,7 @@ BuildRequires: lttng-ust-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: python3
+BuildRequires: systemtap-sdt-devel
BuildRequires: tar
BuildRequires: zlib-devel
@@ -347,6 +350,7 @@ popd
pushd src/coreclr.*
%patch200 -p1
+%patch201 -p1
popd
pushd src/dotnet-core-setup.*
commit b18622e4ac5651fd10701af3cb2ef6cdd933d32f
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Feb 20 20:23:21 2020 -0500
Initial import (#1802803)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..72735bd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/dotnet-v3.1.101-SDK.tar.gz
diff --git a/build-dotnet-tarball b/build-dotnet-tarball
new file mode 100755
index 0000000..0923778
--- /dev/null
+++ b/build-dotnet-tarball
@@ -0,0 +1,117 @@
+#!/bin/bash
+
+# Usage:
+# build-dotnet-tarball <tag-from-source-build>
+#
+# Creates a source archive from a tag (or commit) at github.com/dotnet/source-build
+
+# Source-build is a little strange, we need to clone it, check out the
+# tag, build it and then create a tarball from the archive directory
+# it creates. Also, it is likely that the source archive is only
+# buildable on the OS it was initially created in.
+
+set -euo pipefail
+IFS=$'\n\t'
+
+print_usage() {
+ echo "Usage:"
+ echo "$0 <tag-from-source-build>"
+ echo
+ echo "Creates a source archive from a tag at https://github.com/dotnet/source-build"
+}
+
+clean_dotnet_cache() {
+ rm -rf ~/.aspnet ~/.dotnet/ ~/.nuget/ ~/.local/share/NuGet ~/.templateengine
+ rm -rf /tmp/NuGet /tmp/NuGetScratch /tmp/.NETCore* /tmp/.NETStandard* /tmp/.dotnet /tmp/dotnet.* /tmp/clr-debug-pipe* /tmp/Razor-Server /tmp/CoreFxPipe* /tmp/VBCSCompiler /tmp/.NETFramework*
+}
+
+function runtime_id {
+
+ declare -A archmap
+ archmap=(
+ ["aarch64"]="arm64"
+ ["amd64"]="x64"
+ ["armv8l"]="arm"
+ ["i686"]="x86"
+ ["i386"]="x86"
+ ["x86_64"]="x64"
+ )
+
+ arch=${archmap["$(uname -m)"]}
+
+ source /etc/os-release
+ case "${ID}" in
+ # Remove the RHEL minor version
+ rhel) rid_version=${VERSION_ID%.*} ;;
+
+ *) rid_version=${VERSION_ID} ;;
+ esac
+
+ echo "${ID}.${rid_version}-${arch}"
+}
+
+positional_args=()
+while [[ "$#" -gt 0 ]]; do
+ arg="${1}"
+ case "${arg}" in
+ -h|--help)
+ print_usage
+ exit 0
+ ;;
+ *)
+ positional_args+=("$1")
+ shift
+ ;;
+ esac
+done
+
+
+tag=${positional_args[0]:-}
+if [[ -z ${tag} ]]; then
+ echo "error: missing tag to build"
+ exit 1
+fi
+
+set -x
+
+dir_name="dotnet-${tag}"
+unmodified_tarball_name="${dir_name}-original"
+tarball_name="${dir_name}"
+
+if [ -f "${tarball_name}.tar.gz" ]; then
+ echo "error: ${tarball_name}.tar.gz already exists"
+ exit 1
+fi
+
+if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
+ temp_dir=$(mktemp -d -p "$(pwd)")
+ pushd "${temp_dir}"
+ git clone https://github.com/dotnet/source-build
+ pushd source-build
+ git checkout "${tag}"
+ git submodule update --init --recursive
+ clean_dotnet_cache
+ sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.proj
+ ./build-source-tarball.sh "${unmodified_tarball_name}"
+ popd
+ popd
+
+ tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}/source-build" "${unmodified_tarball_name}"
+
+ rm -rf "${temp_dir}"
+fi
+
+rm -rf "${tarball_name}"
+tar xf "${unmodified_tarball_name}.tar.gz"
+mv "${unmodified_tarball_name}" "${tarball_name}"
+
+pushd "${tarball_name}"
+# Remove files with funny licenses, crypto implementations and other
+# not-very-useful artifacts to reduce tarball size
+rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*
+find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r
+rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip
+find src/coreclr.*/ -depth -name tests -print0 | xargs -0 rm -r
+popd
+
+tar czf "${tarball_name}.tar.gz" "${tarball_name}"
diff --git a/check-debug-symbols.py b/check-debug-symbols.py
new file mode 100755
index 0000000..be26d87
--- /dev/null
+++ b/check-debug-symbols.py
@@ -0,0 +1,136 @@
+#!/usr/bin/python3
+
+"""
+Check debug symbols are present in shared object and can identify
+code.
+
+It starts scanning from a directory and recursively scans all ELF
+files found in it for various symbols to ensure all debuginfo is
+present and nothing has been stripped.
+
+Usage:
+
+./check-debug-symbols /path/of/dir/to/scan/
+
+
+Example:
+
+./check-debug-symbols /usr/lib64
+"""
+
+# This technique was explained to me by Mark Wielaard (mjw).
+
+import collections
+import os
+import re
+import subprocess
+import sys
+
+ScanResult = collections.namedtuple('ScanResult',
+ 'file_name debug_info debug_abbrev file_symbols gnu_debuglink')
+
+
+def scan_file(file):
+ "Scan the provided file and return a ScanResult containing results of the scan."
+
+ # Test for .debug_* sections in the shared object. This is the main test.
+ # Stripped objects will not contain these.
+ readelf_S_result = subprocess.run(['eu-readelf', '-S', file],
+ stdout=subprocess.PIPE, encoding='utf-8', check=True)
+ has_debug_info = any(line for line in readelf_S_result.stdout.split('\n') if '] .debug_info' in line)
+
+ has_debug_abbrev = any(line for line in readelf_S_result.stdout.split('\n') if '] .debug_abbrev' in line)
+
+ # Test FILE symbols. These will most likely be removed by anyting that
+ # manipulates symbol tables because it's generally useless. So a nice test
+ # that nothing has messed with symbols.
+ def contains_file_symbols(line):
+ parts = line.split()
+ if len(parts) < 8:
+ return False
+ return \
+ parts[2] == '0' and parts[3] == 'FILE' and parts[4] == 'LOCAL' and parts[5] == 'DEFAULT' and \
+ parts[6] == 'ABS' and re.match(r'((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx))?', parts[7])
+
+ readelf_s_result = subprocess.run(["eu-readelf", '-s', file],
+ stdout=subprocess.PIPE, encoding='utf-8', check=True)
+ has_file_symbols = any(line for line in readelf_s_result.stdout.split('\n') if contains_file_symbols(line))
+
+ # Test that there are no .gnu_debuglink sections pointing to another
+ # debuginfo file. There shouldn't be any debuginfo files, so the link makes
+ # no sense either.
+ has_gnu_debuglink = any(line for line in readelf_s_result.stdout.split('\n') if '] .gnu_debuglink' in line)
+
+ return ScanResult(file, has_debug_info, has_debug_abbrev, has_file_symbols, has_gnu_debuglink)
+
+def is_elf(file):
+ result = subprocess.run(['file', file], stdout=subprocess.PIPE, encoding='utf-8', check=True)
+ return re.search('ELF 64-bit LSB (?:executable|shared object)', result.stdout)
+
+def scan_file_if_sensible(file):
+ if is_elf(file):
+ # print(file)
+ return scan_file(file)
+ return None
+
+def scan_dir(dir):
+ results = []
+ for root, _, files in os.walk(dir):
+ for name in files:
+ result = scan_file_if_sensible(os.path.join(root, name))
+ if result:
+ results.append(result)
+ return results
+
+def scan(file):
+ file = os.path.abspath(file)
+ if os.path.isdir(file):
+ return scan_dir(file)
+ elif os.path.isfile(file):
+ return [scan_file_if_sensible(file)]
+
+def is_bad_result(result):
+ return not result.debug_info or not result.debug_abbrev or not result.file_symbols or result.gnu_debuglink
+
+def print_scan_results(results, verbose):
+ # print(results)
+ for result in results:
+ file_name = result.file_name
+ found_issue = False
+ if not result.debug_info:
+ found_issue = True
+ print('error: missing .debug_info section in', file_name)
+ if not result.debug_abbrev:
+ found_issue = True
+ print('error: missing .debug_abbrev section in', file_name)
+ if not result.file_symbols:
+ found_issue = True
+ print('error: missing FILE symbols in', file_name)
+ if result.gnu_debuglink:
+ found_issue = True
+ print('error: unexpected .gnu_debuglink section in', file_name)
+ if verbose and not found_issue:
+ print('OK: ', file_name)
+
+def main(args):
+ verbose = False
+ files = []
+ for arg in args:
+ if arg == '--verbose' or arg == '-v':
+ verbose = True
+ else:
+ files.append(arg)
+
+ results = []
+ for file in files:
+ results.extend(scan(file))
+
+ print_scan_results(results, verbose)
+
+ if any(is_bad_result(result) for result in results):
+ return 1
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))
diff --git a/cli-telemetry-optout.patch b/cli-telemetry-optout.patch
new file mode 100644
index 0000000..9b01f13
--- /dev/null
+++ b/cli-telemetry-optout.patch
@@ -0,0 +1,18 @@
+diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs
+index de1ebb9e6..6bbf479de 100644
+--- a/src/dotnet/Program.cs
++++ b/src/dotnet/Program.cs
+@@ -28,6 +28,13 @@ public class Program
+
+ public static int Main(string[] args)
+ {
++ // opt out of telemetry by default if the env var is unset
++ string telemetryValue = Environment.GetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT");
++ if (String.IsNullOrEmpty(telemetryValue))
++ {
++ Environment.SetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1");
++ }
++
+ DebugHelper.HandleDebugSwitch(ref args);
+
+ new MulticoreJitActivator().TryActivateMulticoreJit();
diff --git a/core-setup-hardening-flags.patch b/core-setup-hardening-flags.patch
new file mode 100644
index 0000000..3f6b91c
--- /dev/null
+++ b/core-setup-hardening-flags.patch
@@ -0,0 +1,11 @@
+diff --git a/src/settings.cmake b/src/settings.cmake
+--- a/src/settings.cmake
++++ b/src/settings.cmake
+@@ -218,6 +218,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic -Bsymbolic-functions")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
+ add_compile_options(-fstack-protector-strong)
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ add_compile_options(-fstack-protector)
diff --git a/coreclr-hardening-flags.patch b/coreclr-hardening-flags.patch
new file mode 100644
index 0000000..d58d735
--- /dev/null
+++ b/coreclr-hardening-flags.patch
@@ -0,0 +1,11 @@
+diff --git a/src/debug/createdump/CMakeLists.txt b/src/debug/createdump/CMakeLists.txt
+--- a/src/debug/createdump/CMakeLists.txt
++++ b/src/debug/createdump/CMakeLists.txt
+@@ -21,6 +21,7 @@ include_directories(BEFORE ${VM_DIR})
+ add_definitions(-DPAL_STDCPP_COMPAT)
+
+ add_compile_options(-fPIE)
++add_link_options(-pie)
+
+ set(CREATEDUMP_SOURCES
+ createdump.cpp
diff --git a/corefx-39633-cgroupv2-mountpoints.patch b/corefx-39633-cgroupv2-mountpoints.patch
new file mode 100644
index 0000000..34fbecb
--- /dev/null
+++ b/corefx-39633-cgroupv2-mountpoints.patch
@@ -0,0 +1,46 @@
+From 1864630f762160e1cb439362cc0577471624192a Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Fri, 19 Jul 2019 19:18:51 -0400
+Subject: [PATCH] Fix up cgroup2fs in Interop.MountPoints.FormatInfo
+
+`stat -fc %T /sys/fs/cgroup` calls this file system `cgroup2fs`
+
+Add the cgroup2fs file system magic number. Available from:
+
+ - https://www.kernel.org/doc/Documentation/cgroup-v2.txt
+ - man 2 statfs
+
+Move cgroup2fs next to cgroupfs in the drive type list, since it is also
+DriveType.Ram.
+---
+ .../Unix/System.Native/Interop.MountPoints.FormatInfo.cs | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
+index af38a2285ba2..4240bd4853ab 100644
+--- a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
++++ b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
+@@ -47,6 +47,7 @@ internal enum UnixFileSystemTypes : long
+ btrfs = 0x9123683E,
+ ceph = 0x00C36400,
+ cgroupfs = 0x0027E0EB,
++ cgroup2fs = 0x63677270,
+ cifs = 0xFF534D42,
+ coda = 0x73757245,
+ coherent = 0x012FF7B7,
+@@ -231,7 +232,6 @@ private static DriveType GetDriveType(string fileSystemName)
+ case "bpf_fs":
+ case "btrfs":
+ case "btrfs_test":
+- case "cgroup2fs":
+ case "coh":
+ case "daxfs":
+ case "drvfs":
+@@ -384,6 +384,7 @@ private static DriveType GetDriveType(string fileSystemName)
+ case "binfmt_misc":
+ case "cgroup":
+ case "cgroupfs":
++ case "cgroup2fs":
+ case "configfs":
+ case "cramfs":
+ case "cramfs-wend":
diff --git a/corefx-39686-cgroupv2-01.patch b/corefx-39686-cgroupv2-01.patch
new file mode 100644
index 0000000..e7628e2
--- /dev/null
+++ b/corefx-39686-cgroupv2-01.patch
@@ -0,0 +1,391 @@
+From 2b2273ea4ea1c28472fa0d6ad2ffeb6374500550 Mon Sep 17 00:00:00 2001
+From: Omair Majid <omajid(a)redhat.com>
+Date: Wed, 23 Oct 2019 17:45:59 -0400
+Subject: [PATCH 1/2] Add cgroup v2 support to Interop.cgroups
+
+Fix up code to adjust cgroup v1 assumptions and check cgroup v2 paths,
+locations and values.
+
+Continue using the older cgroup v1 terminology for APIs.
+---
+ .../Interop/Linux/cgroups/Interop.cgroups.cs | 116 ++++++++++++++----
+ src/Common/tests/Common.Tests.csproj | 4 +
+ .../tests/Tests/Interop/cgroupsTests.cs | 107 ++++++++++++++++
+ .../tests/DescriptionNameTests.cs | 2 +-
+ 4 files changed, 206 insertions(+), 23 deletions(-)
+ create mode 100644 src/Common/tests/Tests/Interop/cgroupsTests.cs
+
+diff --git a/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs b/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
+index 0ffd4d7b7c03..186fe0516c5b 100644
+--- a/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
++++ b/src/Common/src/Interop/Linux/cgroups/Interop.cgroups.cs
+@@ -9,17 +9,22 @@
+
+ internal static partial class Interop
+ {
++ /// <summary>Provides access to some cgroup (v1 and v2) features</summary>
+ internal static partial class cgroups
+ {
++ // For cgroup v1, see https://www.kernel.org/doc/Documentation/cgroup-v1/
++ // For cgroup v2, see https://www.kernel.org/doc/Documentation/cgroup-v2.txt
++
++ /// <summary>The version of cgroup that's being used </summary>
++ internal enum CGroupVersion { None, CGroup1, CGroup2 };
++
+ /// <summary>Path to mountinfo file in procfs for the current process.</summary>
+ private const string ProcMountInfoFilePath = "/proc/self/mountinfo";
+ /// <summary>Path to cgroup directory in procfs for the current process.</summary>
+ private const string ProcCGroupFilePath = "/proc/self/cgroup";
+
+- /// <summary>Path to the found cgroup location, or null if it couldn't be found.</summary>
+- internal static readonly string s_cgroupMemoryPath = FindCGroupPath("memory");
+- /// <summary>Path to the found cgroup memory limit_in_bytes path, or null if it couldn't be found.</summary>
+- private static readonly string s_cgroupMemoryLimitPath = s_cgroupMemoryPath != null ? s_cgroupMemoryPath + "/memory.limit_in_bytes" : null;
++ /// <summary>Path to the found cgroup memory limit path, or null if it couldn't be found.</summary>
++ internal static readonly string s_cgroupMemoryLimitPath = FindCGroupMemoryLimitPath();
+
+ /// <summary>Tries to read the memory limit from the cgroup memory location.</summary>
+ /// <param name="limit">The read limit, or 0 if it couldn't be read.</param>
+@@ -42,7 +47,7 @@ public static bool TryGetMemoryLimit(out ulong limit)
+ /// <param name="path">The path to the file to parse.</param>
+ /// <param name="result">The parsed result, or 0 if it couldn't be parsed.</param>
+ /// <returns>true if the value was read successfully; otherwise, false.</returns>
+- private static bool TryReadMemoryValueFromFile(string path, out ulong result)
++ internal static bool TryReadMemoryValueFromFile(string path, out ulong result)
+ {
+ if (File.Exists(path))
+ {
+@@ -79,6 +84,11 @@ private static bool TryReadMemoryValueFromFile(string path, out ulong result)
+ result = checked(ulongValue * multiplier);
+ return true;
+ }
++
++ // 'max' is also a possible valid value
++ //
++ // Treat this as 'no memory limit' and let the caller
++ // fallback to reading the real limit via other means
+ }
+ catch (Exception e)
+ {
+@@ -90,12 +100,35 @@ private static bool TryReadMemoryValueFromFile(string path, out ulong result)
+ return false;
+ }
+
++ /// <summary>Find the cgroup memory limit path.</summary>
++ /// <returns>The limit path if found; otherwise, null.</returns>
++ private static string FindCGroupMemoryLimitPath()
++ {
++ string cgroupMemoryPath = FindCGroupPath("memory", out CGroupVersion version);
++ if (cgroupMemoryPath != null)
++ {
++ if (version == CGroupVersion.CGroup1)
++ {
++ return cgroupMemoryPath + "/memory.limit_in_bytes";
++ }
++
++ if (version == CGroupVersion.CGroup2)
++ {
++ // 'memory.high' is a soft limit; the process may get throttled
++ // 'memory.max' is where OOM killer kicks in
++ return cgroupMemoryPath + "/memory.max";
++ }
++ }
++
++ return null;
++ }
++
+ /// <summary>Find the cgroup path for the specified subsystem.</summary>
+ /// <param name="subsystem">The subsystem, e.g. "memory".</param>
+ /// <returns>The cgroup path if found; otherwise, null.</returns>
+- private static string FindCGroupPath(string subsystem)
++ private static string FindCGroupPath(string subsystem, out CGroupVersion version)
+ {
+- if (TryFindHierarchyMount(subsystem, out string hierarchyRoot, out string hierarchyMount) &&
++ if (TryFindHierarchyMount(subsystem, out version, out string hierarchyRoot, out string hierarchyMount) &&
+ TryFindCGroupPathForSubsystem(subsystem, out string cgroupPathRelativeToMount))
+ {
+ // For a host cgroup, we need to append the relative path.
+@@ -113,19 +146,24 @@ private static string FindCGroupPath(string subsystem)
+ /// <param name="root">The path of the directory in the filesystem which forms the root of this mount; null if not found.</param>
+ /// <param name="path">The path of the mount point relative to the process's root directory; null if not found.</param>
+ /// <returns>true if the mount was found; otherwise, null.</returns>
+- private static bool TryFindHierarchyMount(string subsystem, out string root, out string path)
++ private static bool TryFindHierarchyMount(string subsystem, out CGroupVersion version, out string root, out string path)
+ {
+- if (File.Exists(ProcMountInfoFilePath))
++ return TryFindHierarchyMount(ProcMountInfoFilePath, subsystem, out version, out root, out path);
++ }
++
++ internal static bool TryFindHierarchyMount(string mountInfoFilePath, string subsystem, out CGroupVersion version, out string root, out string path)
++ {
++ if (File.Exists(mountInfoFilePath))
+ {
+ try
+ {
+- using (var reader = new StreamReader(ProcMountInfoFilePath))
++ using (var reader = new StreamReader(mountInfoFilePath))
+ {
+ string line;
+ while ((line = reader.ReadLine()) != null)
+ {
+ // Look for an entry that has cgroup as the "filesystem type"
+- // and that has options containing the specified subsystem.
++ // and, for cgroup1, that has options containing the specified subsystem
+ // See man page for /proc/[pid]/mountinfo for details, e.g.:
+ // (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
+ // 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
+@@ -148,17 +186,35 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
+ continue;
+ }
+
+- if (postSeparatorlineParts[0] != "cgroup" ||
+- Array.IndexOf(postSeparatorlineParts[2].Split(','), subsystem) < 0)
++ bool validCGroup1Entry = ((postSeparatorlineParts[0] == "cgroup") &&
++ (Array.IndexOf(postSeparatorlineParts[2].Split(','), subsystem) >= 0));
++ bool validCGroup2Entry = postSeparatorlineParts[0] == "cgroup2";
++
++ if (!validCGroup1Entry && !validCGroup2Entry)
+ {
+ // Not the relevant entry.
+ continue;
+ }
+
+- // Found the relevant entry. Extract the mount root and path.
++ // Found the relevant entry. Extract the cgroup version, mount root and path.
++ switch (postSeparatorlineParts[0])
++ {
++ case "cgroup":
++ version = CGroupVersion.CGroup1;
++ break;
++ case "cgroup2":
++ version = CGroupVersion.CGroup2;
++ break;
++ default:
++ version = CGroupVersion.None;
++ Debug.Fail($"invalid value for CGroupVersion \"{postSeparatorlineParts[0]}\"");
++ break;
++ }
++
+ string[] lineParts = line.Substring(0, endOfOptionalFields).Split(' ');
+ root = lineParts[3];
+ path = lineParts[4];
++
+ return true;
+ }
+ }
+@@ -169,6 +225,7 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
+ }
+ }
+
++ version = CGroupVersion.None;
+ root = null;
+ path = null;
+ return false;
+@@ -180,27 +237,42 @@ private static bool TryFindHierarchyMount(string subsystem, out string root, out
+ /// <returns></returns>
+ private static bool TryFindCGroupPathForSubsystem(string subsystem, out string path)
+ {
+- if (File.Exists(ProcCGroupFilePath))
++ return TryFindCGroupPathForSubsystem(ProcCGroupFilePath, subsystem, out path);
++ }
++
++ internal static bool TryFindCGroupPathForSubsystem(string procCGroupFilePath, string subsystem, out string path)
++ {
++ if (File.Exists(procCGroupFilePath))
+ {
+ try
+ {
+- using (var reader = new StreamReader(ProcCGroupFilePath))
++ using (var reader = new StreamReader(procCGroupFilePath))
+ {
+ string line;
+ while ((line = reader.ReadLine()) != null)
+ {
+- // Find the first entry that has the subsystem listed in its controller
+- // list. See man page for cgroups for /proc/[pid]/cgroups format, e.g:
+- // hierarchy-ID:controller-list:cgroup-path
+- // 5:cpuacct,cpu,cpuset:/daemons
+-
+ string[] lineParts = line.Split(':');
++
+ if (lineParts.Length != 3)
+ {
+ // Malformed line.
+ continue;
+ }
+
++ // cgroup v2: Find the first entry that matches the cgroup v2 hierarchy:
++ // 0::$PATH
++
++ if ((lineParts[0] == "0") && (string.Empty == lineParts[1]))
++ {
++ path = lineParts[2];
++ return true;
++ }
++
++ // cgroup v1: Find the first entry that has the subsystem listed in its controller
++ // list. See man page for cgroups for /proc/[pid]/cgroups format, e.g:
++ // hierarchy-ID:controller-list:cgroup-path
++ // 5:cpuacct,cpu,cpuset:/daemons
++
+ if (Array.IndexOf(lineParts[1].Split(','), subsystem) < 0)
+ {
+ // Not the relevant entry.
+@@ -214,7 +286,7 @@ private static bool TryFindCGroupPathForSubsystem(string subsystem, out string p
+ }
+ catch (Exception e)
+ {
+- Debug.Fail($"Failed to read or parse \"{ProcMountInfoFilePath}\": {e}");
++ Debug.Fail($"Failed to read or parse \"{procCGroupFilePath}\": {e}");
+ }
+ }
+
+diff --git a/src/Common/tests/Common.Tests.csproj b/src/Common/tests/Common.Tests.csproj
+index a189d856348b..979c8dd7fbe6 100644
+--- a/src/Common/tests/Common.Tests.csproj
++++ b/src/Common/tests/Common.Tests.csproj
+@@ -12,6 +12,9 @@
+ <Compile Include="$(CommonTestPath)\System\Security\Cryptography\ByteUtils.cs">
+ <Link>Common\System\Security\Cryptography\ByteUtils.cs</Link>
+ </Compile>
++ <Compile Include="$(CommonPath)\Interop\Linux\cgroups\Interop.cgroups.cs">
++ <Link>Common\Interop\Linux\cgroups\Interop.cgroups.cs</Link>
++ </Compile>
+ <Compile Include="$(CommonPath)\Interop\Linux\procfs\Interop.ProcFsStat.cs">
+ <Link>Common\Interop\Linux\procfs\Interop.ProcFsStat.cs</Link>
+ </Compile>
+@@ -69,6 +72,7 @@
+ <Compile Include="$(CommonPath)\CoreLib\System\PasteArguments.cs">
+ <Link>Common\CoreLib\System\PasteArguments.cs</Link>
+ </Compile>
++ <Compile Include="Tests\Interop\cgroupsTests.cs" />
+ <Compile Include="Tests\Interop\procfsTests.cs" />
+ <Compile Include="Tests\System\CharArrayHelpersTests.cs" />
+ <Compile Include="Tests\System\IO\PathInternal.Tests.cs" />
+diff --git a/src/Common/tests/Tests/Interop/cgroupsTests.cs b/src/Common/tests/Tests/Interop/cgroupsTests.cs
+new file mode 100644
+index 000000000000..f16d9242879c
+--- /dev/null
++++ b/src/Common/tests/Tests/Interop/cgroupsTests.cs
+@@ -0,0 +1,107 @@
++// Licensed to the .NET Foundation under one or more agreements.
++// The .NET Foundation licenses this file to you under the MIT license.
++// See the LICENSE file in the project root for more information.
++
++using System;
++using System.IO;
++using System.Text;
++using Xunit;
++
++namespace Common.Tests
++{
++ public class cgroupsTests
++ {
++ [Theory]
++ [InlineData(true, "0", 0)]
++ [InlineData(false, "max", 0)]
++ [InlineData(true, "1k", 1024)]
++ [InlineData(true, "1K", 1024)]
++ public static void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
++ {
++ string path = Path.GetTempFileName();
++ try
++ {
++ File.WriteAllText(path, valueText);
++
++ bool result = Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val);
++
++ Assert.Equal(expectedResult, result);
++ if (result)
++ {
++ Assert.Equal(expectedValue, val);
++ }
++ }
++ finally
++ {
++ File.Delete(path);
++ }
++ }
++
++ [Theory]
++ [InlineData(false, "0 0 0:0 / /foo ignore ignore - overlay overlay ignore", "ignore", 0, "/", "/")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "ignore", 2, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "memory", 2, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore ignore - cgroup2 cgroup2 ignore", "cpu", 2, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo-with-dashes ignore ignore - cgroup2 cgroup2 ignore", "ignore", 2, "/", "/foo-with-dashes")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory", "memory", 1, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo-with-dashes ignore ignore - cgroup cgroup memory", "memory", 1, "/", "/foo-with-dashes")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu,memory", "memory", 1, "/", "/foo")]
++ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory,cpu", "memory", 1, "/", "/foo")]
++ [InlineData(false, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu", "memory", 0, "/", "/foo")]
++ public static void ParseValidateMountInfo(bool found, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
++ {
++ string path = Path.GetTempFileName();
++ try
++ {
++ File.WriteAllText(path, procSelfMountInfoText);
++
++ bool result = Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount);
++
++ Assert.Equal(found, result);
++ if (found)
++ {
++ Assert.Equal(expectedVersion, (int)version);
++ Assert.Equal(expectedRoot, root);
++ Assert.Equal(expectedMount, mount);
++ }
++ }
++ finally
++ {
++ File.Delete(path);
++ }
++ }
++
++ [Theory]
++ [InlineData(true, "0::/foo", "ignore", "/foo")]
++ [InlineData(true, "0::/bar", "ignore", "/bar")]
++ [InlineData(true, "0::frob", "ignore", "frob")]
++ [InlineData(false, "1::frob", "ignore", "ignore")]
++ [InlineData(true, "1:foo:bar", "foo", "bar")]
++ [InlineData(true, "2:foo:bar", "foo", "bar")]
++ [InlineData(false, "2:foo:bar", "bar", "ignore")]
++ [InlineData(true, "1:foo:bar\n2:eggs:spam", "foo", "bar")]
++ [InlineData(true, "1:foo:bar\n2:eggs:spam", "eggs", "spam")]
++ public static void ParseValidateProcCGroup(bool found, string procSelfCgroupText, string subsystem, string expectedMountPath)
++ {
++ string path = Path.GetTempFileName();
++ try
++ {
++ File.WriteAllText(path, procSelfCgroupText);
++
++ bool result = Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath);
++
++ Assert.Equal(found, result);
++ if (found)
++ {
++ Assert.Equal(expectedMountPath, mountPath);
++ }
++ }
++ finally
++ {
++ File.Delete(path);
++ }
++ }
++ }
++}
+diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
+index 910af2fd82b4..73f692898dbc 100644
+--- a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
++++ b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs
+@@ -40,7 +40,7 @@ public void DumpRuntimeInformationToConsole()
+
+ Console.WriteLine($"### CURRENT DIRECTORY: {Environment.CurrentDirectory}");
+
+- string cgroupsLocation = Interop.cgroups.s_cgroupMemoryPath;
++ string cgroupsLocation = Interop.cgroups.s_cgroupMemoryLimitPath;
+ if (cgroupsLocation != null)
+ {
+ Console.WriteLine($"### CGROUPS MEMORY: {cgroupsLocation}");
+
diff --git a/corefx-39686-cgroupv2-02.patch b/corefx-39686-cgroupv2-02.patch
new file mode 100644
index 0000000..88dcd99
--- /dev/null
+++ b/corefx-39686-cgroupv2-02.patch
@@ -0,0 +1,129 @@
+From 9a8c5e4014ffca8aff70808cc0e50a403d38c292 Mon Sep 17 00:00:00 2001
+From: Stephen Toub <stoub(a)microsoft.com>
+Date: Wed, 23 Oct 2019 20:35:49 -0400
+Subject: [PATCH 2/2] Clean up new tests
+
+---
+ .../tests/Tests/Interop/cgroupsTests.cs | 79 ++++++-------------
+ 1 file changed, 25 insertions(+), 54 deletions(-)
+
+diff --git a/src/Common/tests/Tests/Interop/cgroupsTests.cs b/src/Common/tests/Tests/Interop/cgroupsTests.cs
+index f16d9242879c..fc6ab5c9753c 100644
+--- a/src/Common/tests/Tests/Interop/cgroupsTests.cs
++++ b/src/Common/tests/Tests/Interop/cgroupsTests.cs
+@@ -2,38 +2,27 @@
+ // The .NET Foundation licenses this file to you under the MIT license.
+ // See the LICENSE file in the project root for more information.
+
+-using System;
+ using System.IO;
+-using System.Text;
+ using Xunit;
+
+ namespace Common.Tests
+ {
+- public class cgroupsTests
++ public class cgroupsTests : FileCleanupTestBase
+ {
+ [Theory]
+- [InlineData(true, "0", 0)]
+- [InlineData(false, "max", 0)]
+- [InlineData(true, "1k", 1024)]
+- [InlineData(true, "1K", 1024)]
+- public static void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
++ [InlineData(true, "0", 0)]
++ [InlineData(false, "max", 0)]
++ [InlineData(true, "1k", 1024)]
++ [InlineData(true, "1K", 1024)]
++ public void ValidateTryReadMemoryValue(bool expectedResult, string valueText, ulong expectedValue)
+ {
+- string path = Path.GetTempFileName();
+- try
+- {
+- File.WriteAllText(path, valueText);
+-
+- bool result = Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val);
++ string path = GetTestFilePath();
++ File.WriteAllText(path, valueText);
+
+- Assert.Equal(expectedResult, result);
+- if (result)
+- {
+- Assert.Equal(expectedValue, val);
+- }
+- }
+- finally
++ Assert.Equal(expectedResult, Interop.cgroups.TryReadMemoryValueFromFile(path, out ulong val));
++ if (expectedResult)
+ {
+- File.Delete(path);
++ Assert.Equal(expectedValue, val);
+ }
+ }
+
+@@ -50,26 +39,17 @@ public static void ValidateTryReadMemoryValue(bool expectedResult, string valueT
+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu,memory", "memory", 1, "/", "/foo")]
+ [InlineData(true, "0 0 0:0 / /foo ignore ignore - cgroup cgroup memory,cpu", "memory", 1, "/", "/foo")]
+ [InlineData(false, "0 0 0:0 / /foo ignore ignore - cgroup cgroup cpu", "memory", 0, "/", "/foo")]
+- public static void ParseValidateMountInfo(bool found, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
++ public void ParseValidateMountInfo(bool expectedFound, string procSelfMountInfoText, string subsystem, int expectedVersion, string expectedRoot, string expectedMount)
+ {
+- string path = Path.GetTempFileName();
+- try
+- {
+- File.WriteAllText(path, procSelfMountInfoText);
+-
+- bool result = Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount);
++ string path = GetTestFilePath();
++ File.WriteAllText(path, procSelfMountInfoText);
+
+- Assert.Equal(found, result);
+- if (found)
+- {
+- Assert.Equal(expectedVersion, (int)version);
+- Assert.Equal(expectedRoot, root);
+- Assert.Equal(expectedMount, mount);
+- }
+- }
+- finally
++ Assert.Equal(expectedFound, Interop.cgroups.TryFindHierarchyMount(path, subsystem, out Interop.cgroups.CGroupVersion version, out string root, out string mount));
++ if (expectedFound)
+ {
+- File.Delete(path);
++ Assert.Equal(expectedVersion, (int)version);
++ Assert.Equal(expectedRoot, root);
++ Assert.Equal(expectedMount, mount);
+ }
+ }
+
+@@ -83,24 +63,15 @@ public static void ParseValidateMountInfo(bool found, string procSelfMountInfoTe
+ [InlineData(false, "2:foo:bar", "bar", "ignore")]
+ [InlineData(true, "1:foo:bar\n2:eggs:spam", "foo", "bar")]
+ [InlineData(true, "1:foo:bar\n2:eggs:spam", "eggs", "spam")]
+- public static void ParseValidateProcCGroup(bool found, string procSelfCgroupText, string subsystem, string expectedMountPath)
++ public void ParseValidateProcCGroup(bool expectedFound, string procSelfCgroupText, string subsystem, string expectedMountPath)
+ {
+- string path = Path.GetTempFileName();
+- try
+- {
+- File.WriteAllText(path, procSelfCgroupText);
++ string path = GetTestFilePath();
++ File.WriteAllText(path, procSelfCgroupText);
+
+- bool result = Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath);
+-
+- Assert.Equal(found, result);
+- if (found)
+- {
+- Assert.Equal(expectedMountPath, mountPath);
+- }
+- }
+- finally
++ Assert.Equal(expectedFound, Interop.cgroups.TryFindCGroupPathForSubsystem(path, subsystem, out string mountPath));
++ if (expectedFound)
+ {
+- File.Delete(path);
++ Assert.Equal(expectedMountPath, mountPath);
+ }
+ }
+ }
diff --git a/corefx-optflags-support.patch b/corefx-optflags-support.patch
new file mode 100644
index 0000000..6f76d7f
--- /dev/null
+++ b/corefx-optflags-support.patch
@@ -0,0 +1,39 @@
+diff --git a/src/Native/Unix/CMakeLists.txt b/src/Native/Unix/CMakeLists.txt
+index 7d804a1e54..717c2718d7 100644
+--- a/src/Native/Unix/CMakeLists.txt
++++ b/src/Native/Unix/CMakeLists.txt
+@@ -25,7 +25,6 @@ add_compile_options(-fPIC)
+ add_compile_options(-Wthread-safety)
+ add_compile_options(-Wno-thread-safety-analysis)
+ endif()
+-add_compile_options(-Werror)
+
+ if(CMAKE_SYSTEM_NAME STREQUAL Emscripten)
+ set(CLR_CMAKE_PLATFORM_WASM 1)
+diff --git a/src/Native/Unix/configure.cmake b/src/Native/Unix/configure.cmake
+index f4a30ad6cb..f2db68402a 100644
+--- a/src/Native/Unix/configure.cmake
++++ b/src/Native/Unix/configure.cmake
+@@ -27,6 +27,12 @@ else ()
+ message(FATAL_ERROR "Unknown platform. Cannot define PAL_UNIX_NAME, used by RuntimeInformation.")
+ endif ()
+
++
++set (PREVIOUS_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
++set (CMAKE_CXX_FLAGS "-D_GNU_SOURCE")
++set (PREVIOUS_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
++set (CMAKE_C_FLAGS "-D_GNU_SOURCE")
++
+ # We compile with -Werror, so we need to make sure these code fragments compile without warnings.
+ # Older CMake versions (3.8) do not assign the result of their tests, causing unused-value errors
+ # which are not distinguished from the test failing. So no error for that one.
+@@ -698,6 +704,9 @@ endif()
+
+ set (CMAKE_REQUIRED_LIBRARIES)
+
++set (CMAKE_CXX_FLAGS "${PREVIOUS_CMAKE_CXX_FLAGS}")
++set (CMAKE_C_FLAGS "${PREVIOUS_CMAKE_C_FLAGS}")
++
+ check_c_source_compiles(
+ "
+ #include <sys/inotify.h>
diff --git a/dotnet.sh.in b/dotnet.sh.in
new file mode 100644
index 0000000..65b92a0
--- /dev/null
+++ b/dotnet.sh.in
@@ -0,0 +1,14 @@
+
+# Set location for AppHost lookup
+[ -z "$DOTNET_ROOT" ] && export DOTNET_ROOT=@LIBDIR@/dotnet
+
+# Add dotnet tools directory to PATH
+DOTNET_TOOLS_PATH="$HOME/.dotnet/tools"
+case "$PATH" in
+ *"$DOTNET_TOOLS_PATH"* ) true ;;
+ * ) PATH="$PATH:$DOTNET_TOOLS_PATH" ;;
+esac
+
+# Extract self-contained executables under HOME
+# to avoid multi-user issues from using the default '/var/tmp'.
+[ -z "$DOTNET_BUNDLE_EXTRACT_BASE_DIR" ] && export DOTNET_BUNDLE_EXTRACT_BASE_DIR="${XDG_CACHE_HOME:-"$HOME"/.cache}/dotnet_bundle_extract"
diff --git a/dotnet3.1.spec b/dotnet3.1.spec
new file mode 100644
index 0000000..4536929
--- /dev/null
+++ b/dotnet3.1.spec
@@ -0,0 +1,682 @@
+%bcond_without bootstrap
+
+# Avoid provides/requires from private libraries
+%global privlibs libhostfxr
+%global privlibs %{privlibs}|libclrjit
+%global privlibs %{privlibs}|libcoreclr
+%global privlibs %{privlibs}|libcoreclrtraceptprovider
+%global privlibs %{privlibs}|libdbgshim
+%global privlibs %{privlibs}|libhostpolicy
+%global privlibs %{privlibs}|libmscordaccore
+%global privlibs %{privlibs}|libmscordbi
+%global privlibs %{privlibs}|libsos
+%global privlibs %{privlibs}|libsosplugin
+%global __provides_exclude ^(%{privlibs})\\.so
+%global __requires_exclude ^(%{privlibs})\\.so
+
+# Filter flags not supported by clang
+# -fstack-clash-protection
+# -specs=
+%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')
+%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
+
+%global host_version 3.1.1
+%global runtime_version 3.1.1
+%global aspnetcore_runtime_version %{runtime_version}
+%global sdk_version 3.1.101
+%global templates_version %{runtime_version}
+
+%global host_rpm_version %{host_version}
+%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
+%global runtime_rpm_version %{runtime_version}
+%global sdk_rpm_version %{sdk_version}
+
+%if 0%{?fedora} || 0%{?rhel} < 8
+%global use_bundled_libunwind 0
+%else
+%global use_bundled_libunwind 1
+%endif
+
+%ifarch x86_64
+%global runtime_arch x64
+%endif
+%ifarch aarch64
+%global runtime_arch arm64
+%endif
+
+%if 0%{?fedora}
+%global runtime_id fedora.%{fedora}-%{runtime_arch}
+%else
+%if 0%{?centos}
+%global runtime_id centos.%{centos}-%{runtime_arch}
+%else
+%global runtime_id rhel.%{rhel}-%{runtime_arch}
+%endif
+%endif
+
+Name: dotnet3.1
+Version: %{sdk_rpm_version}
+Release: 1%{?dist}
+Summary: .NET Core Runtime and SDK
+License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
+URL: https://github.com/dotnet/
+
+# The source is generated on a Fedora box via:
+# ./build-dotnet-tarball v%%{sdk_version}-SDK
+Source0: dotnet-v%{sdk_version}-SDK.tar.gz
+Source1: check-debug-symbols.py
+Source2: dotnet.sh.in
+
+# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
+Patch100: corefx-optflags-support.patch
+
+# Add some support for cgroupv2 in corefx
+# All these patches are upstreamed for 5.0
+Patch101: corefx-39686-cgroupv2-01.patch
+Patch102: corefx-39686-cgroupv2-02.patch
+Patch103: corefx-39633-cgroupv2-mountpoints.patch
+
+# Build with with hardening flags, including -pie
+Patch200: coreclr-hardening-flags.patch
+
+# Build with with hardening flags, including -pie
+Patch300: core-setup-hardening-flags.patch
+
+# Disable telemetry by default; make it opt-in
+Patch500: cli-telemetry-optout.patch
+
+ExclusiveArch: x86_64
+
+BuildRequires: clang
+BuildRequires: cmake
+BuildRequires: coreutils
+%if %{without bootstrap}
+BuildRequires: dotnet-build-reference-packages
+BuildRequires: dotnet-sdk-3.1
+BuildRequires: dotnet-sdk-3.1-source-built-artifacts
+%endif
+BuildRequires: git
+%if 0%{?fedora} || 0%{?rhel} > 7
+BuildRequires: glibc-langpack-en
+%endif
+BuildRequires: hostname
+BuildRequires: krb5-devel
+BuildRequires: libcurl-devel
+BuildRequires: libicu-devel
+%if ! %{use_bundled_libunwind}
+BuildRequires: libunwind-devel
+%endif
+BuildRequires: lldb-devel
+BuildRequires: llvm
+BuildRequires: lttng-ust-devel
+BuildRequires: make
+BuildRequires: openssl-devel
+BuildRequires: python3
+BuildRequires: tar
+BuildRequires: zlib-devel
+
+%description
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, macOS and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+.NET Core contains a runtime conforming to .NET Standards a set of
+framework libraries, an SDK containing compilers and a 'dotnet'
+application to drive everything.
+
+
+%package -n dotnet
+
+Version: %{sdk_rpm_version}
+Summary: .NET Core CLI tools and runtime
+
+Requires: dotnet-sdk-3.1%{?_isa} >= %{sdk_rpm_version}-%{release}
+
+%description -n dotnet
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, macOS and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+.NET Core contains a runtime conforming to .NET Standards a set of
+framework libraries, an SDK containing compilers and a 'dotnet'
+application to drive everything.
+
+
+%package -n dotnet-host
+
+Version: %{host_rpm_version}
+Summary: .NET command line launcher
+
+%description -n dotnet-host
+The .NET Core host is a command line program that runs a standalone
+.NET core application or launches the SDK.
+
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%package -n dotnet-hostfxr-3.1
+
+Version: %{host_rpm_version}
+Summary: .NET Core command line host resolver
+
+# Theoretically any version of the host should work. But lets aim for the one
+# provided by this package, or from a newer version of .NET Core
+Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
+
+%description -n dotnet-hostfxr-3.1
+The .NET Core host resolver contains the logic to resolve and select
+the right version of the .NET Core SDK or runtime to use.
+
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%package -n dotnet-runtime-3.1
+
+Version: %{runtime_rpm_version}
+Summary: NET Core 3.1 runtime
+
+Requires: dotnet-hostfxr-3.1%{?_isa} >= %{host_rpm_version}-%{release}
+
+# libicu is dlopen()ed
+Requires: libicu%{?_isa}
+
+%if %{use_bundled_libunwind}
+Provides: bundled(libunwind) = 1.3
+%endif
+
+%description -n dotnet-runtime-3.1
+The .NET Core runtime contains everything needed to run .NET Core applications.
+It includes a high performance Virtual Machine as well as the framework
+libraries used by .NET Core applications.
+
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%package -n aspnetcore-runtime-3.1
+
+Version: %{aspnetcore_runtime_rpm_version}
+Summary: ASP.NET Core 3.1 runtime
+
+Requires: dotnet-runtime-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
+
+%description -n aspnetcore-runtime-3.1
+The ASP.NET Core runtime contains everything needed to run .NET Core
+web applications. It includes a high performance Virtual Machine as
+well as the framework libraries used by .NET Core applications.
+
+ASP.NET Core is a fast, lightweight and modular platform for creating
+cross platform web applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%package -n dotnet-templates-3.1
+
+Version: %{sdk_rpm_version}
+Summary: .NET Core 3.1 templates
+
+# Theoretically any version of the host should work. But lets aim for the one
+# provided by this package, or from a newer version of .NET Core
+Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
+
+%description -n dotnet-templates-3.1
+This package contains templates used by the .NET Core SDK.
+
+ASP.NET Core is a fast, lightweight and modular platform for creating
+cross platform web applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%package -n dotnet-sdk-3.1
+
+Version: %{sdk_rpm_version}
+Summary: .NET Core 3.1 Software Development Kit
+
+Provides: bundled(js-jquery)
+Provides: bundled(npm)
+
+Requires: dotnet-runtime-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-runtime-3.1%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+
+Requires: dotnet-apphost-pack-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: dotnet-targeting-pack-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
+Requires: aspnetcore-targeting-pack-3.1%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
+Requires: netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{release}
+
+Requires: dotnet-templates-3.1%{?_isa} >= %{sdk_rpm_version}-%{release}
+
+%description -n dotnet-sdk-3.1
+The .NET Core SDK is a collection of command line applications to
+create, build, publish and run .NET Core applications.
+
+.NET Core is a fast, lightweight and modular platform for creating
+cross platform applications that work on Linux, Mac and Windows.
+
+It particularly focuses on creating console applications, web
+applications and micro-services.
+
+
+%global dotnet_targeting_pack() %{expand:
+%package -n %{1}
+
+Version: %{2}
+Summary: Targeting Pack for %{3} %{4}
+
+Requires: dotnet-host%{?_isa}
+
+%description -n %{1}
+This package provides a targeting pack for %{3} %{4}
+that allows developers to compile against and target %{3} %{4}
+applications using the .NET Core SDK.
+
+%files -n %{1}
+%dir %{_libdir}/dotnet/packs
+%{_libdir}/dotnet/packs/%{5}
+}
+
+%dotnet_targeting_pack dotnet-apphost-pack-3.1 %{runtime_rpm_version} Microsoft.NETCore.App 3.1 Microsoft.NETCore.App.Host.%{runtime_id}
+%dotnet_targeting_pack dotnet-targeting-pack-3.1 %{runtime_rpm_version} Microsoft.NETCore.App 3.1 Microsoft.NETCore.App.Ref
+%dotnet_targeting_pack aspnetcore-targeting-pack-3.1 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 3.1 Microsoft.AspNetCore.App.Ref
+%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref
+
+
+%package -n dotnet-sdk-3.1-source-built-artifacts
+
+Version: %{sdk_rpm_version}
+Summary: Internal package for building .NET Core 3.1 Software Development Kit
+
+%description -n dotnet-sdk-3.1-source-built-artifacts
+The .NET Core source-built archive is a collection of packages needed
+to build the .NET Core SDK itself.
+
+These are not meant for general use.
+
+
+%prep
+%setup -q -n dotnet-v%{sdk_version}-SDK
+
+%if %{without bootstrap}
+# Remove all prebuilts
+find -iname '*.dll' -type f -delete
+find -iname '*.so' -type f -delete
+find -iname '*.tar.gz' -type f -delete
+find -iname '*.nupkg' -type f -delete
+find -iname '*.zip' -type f -delete
+rm -r .dotnet/
+rm -r packages/source-built
+%endif
+
+%if %{without bootstrap}
+sed -i -e 's|3.1.100-preview1-014459|3.1.101|' global.json
+mkdir -p packages/archive
+ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
+ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
+%endif
+
+# Fix bad hardcoded path in build
+sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/dotnet-core-setup.*/src/corehost/common/pal.unix.cpp
+
+# Disable warnings
+sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.proj
+
+pushd src/corefx.*
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+popd
+
+pushd src/coreclr.*
+%patch200 -p1
+popd
+
+pushd src/dotnet-core-setup.*
+%patch300 -p1
+popd
+
+pushd src/dotnet-cli.*
+%patch500 -p1
+popd
+
+# If CLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE is misisng, add it back
+grep CLR_CMAKE_USE_SYSTEM_LIBUNWIND repos/coreclr.proj || \
+ sed -i 's|\$(BuildArguments) </BuildArguments>|$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments>|' repos/coreclr.proj
+
+%if %{use_bundled_libunwind}
+sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/coreclr.proj
+%endif
+
+cat source-build-info.txt
+
+find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
+
+
+%build
+cat /etc/os-release
+
+%if %{without bootstrap}
+cp -a %{_libdir}/dotnet .dotnet
+%endif
+
+export CFLAGS="%{dotnet_cflags}"
+export CXXFLAGS="%{dotnet_cflags}"
+export LDFLAGS="%{dotnet_ldflags}"
+
+VERBOSE=1 ./build.sh \
+ /v:n \
+ /p:LogVerbosity=n \
+ /p:MinimalConsoleLogOutput=false \
+ /p:ContinueOnPrebuiltBaselineError=true \
+
+
+sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
+
+
+%install
+install -dm 0755 %{buildroot}%{_libdir}/dotnet
+ls bin/%{runtime_arch}/Release
+tar xf bin/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
+
+# Install managed symbols
+tar xf bin/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
+ -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
+
+# Fix executable permissions on files
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
+find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/apphost
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/nethost.h
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.1.0/obj/Microsoft.AspNetCore.App.Ref.csproj.nuget.cache
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.1.0/Microsoft.AspNetCore.App.Ref/3.1.0/Debug/netstandard2.0/Microsoft.AspNetCore.App.Ref.assets.cache
+
+install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
+install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
+
+install -dm 0755 %{buildroot}/%{_datadir}/bash-completion/completions
+# dynamic completion needs the file to be named the same as the base command
+install src/dotnet-cli.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
+
+# TODO: the zsh completion script needs to be ported to use #compdef
+#install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions
+#install src/cli/scripts/register-completions.zsh %%{buildroot}/%%{_datadir}/zsh/site-functions/_dotnet
+
+install -dm 0755 %{buildroot}%{_bindir}
+ln -s ../../%{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/
+
+install -dm 0755 %{buildroot}%{_mandir}/man1/
+find -iname 'dotnet*.1' -type f -exec cp {} %{buildroot}%{_mandir}/man1/ \;
+
+echo "%{_libdir}/dotnet" >> install_location
+install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
+install install_location %{buildroot}%{_sysconfdir}/dotnet/
+
+install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
+install bin/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
+
+# Check debug symbols in all elf objects. This is not in %%check
+# because native binaries are stripped by rpm-build after %%install.
+# So we need to do this check earlier.
+echo "Testing build results for debug symbols..."
+%{SOURCE1} -v %{buildroot}%{_libdir}/dotnet/
+
+
+%check
+%{buildroot}%{_libdir}/dotnet/dotnet --info
+
+
+%files -n dotnet
+# empty package useful for dependencies
+
+%files -n dotnet-host
+%dir %{_libdir}/dotnet
+%{_libdir}/dotnet/dotnet
+%dir %{_libdir}/dotnet/host
+%dir %{_libdir}/dotnet/host/fxr
+%{_bindir}/dotnet
+%license %{_libdir}/dotnet/LICENSE.txt
+%license %{_libdir}/dotnet/ThirdPartyNotices.txt
+%doc %{_mandir}/man1/dotnet*.1.gz
+%{_sysconfdir}/profile.d/dotnet.sh
+%{_sysconfdir}/dotnet
+%dir %{_datadir}/bash-completion
+%dir %{_datadir}/bash-completion/completions
+%{_datadir}/bash-completion/completions/dotnet
+
+%files -n dotnet-hostfxr-3.1
+%dir %{_libdir}/dotnet/host/fxr
+%{_libdir}/dotnet/host/fxr/%{host_version}
+
+%files -n dotnet-runtime-3.1
+%dir %{_libdir}/dotnet/shared
+%dir %{_libdir}/dotnet/shared/Microsoft.NETCore.App
+%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}
+
+%files -n aspnetcore-runtime-3.1
+%dir %{_libdir}/dotnet/shared
+%dir %{_libdir}/dotnet/shared/Microsoft.AspNetCore.App
+%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}
+
+%files -n dotnet-templates-3.1
+%dir %{_libdir}/dotnet/templates
+%{_libdir}/dotnet/templates/%{templates_version}
+
+%files -n dotnet-sdk-3.1
+%dir %{_libdir}/dotnet/sdk
+%{_libdir}/dotnet/sdk/%{sdk_version}
+%dir %{_libdir}/dotnet/packs
+
+%files -n dotnet-sdk-3.1-source-built-artifacts
+%dir %{_libdir}/dotnet
+%{_libdir}/dotnet/source-built-artifacts
+
+
+%changelog
+* Tue Jan 21 2020 Omair Majid <omajid(a)redhat.com> - 3.1.101-1
+- Update to .NET Core Runtime 3.1.1 and SDK 3.1.101
+
+* Thu Dec 05 2019 Omair Majid <omajid(a)redhat.com> - 3.1.100-1
+- Update to .NET Core Runtime 3.1.0 and SDK 3.1.100
+
+* Mon Nov 18 2019 Omair Majid <omajid(a)redhat.com> - 3.1.100-0.4.preview3
+- Fix apphost permissions
+
+* Fri Nov 15 2019 Omair Majid <omajid(a)redhat.com> - 3.1.100-0.3.preview3
+- Update to .NET Core Runtime 3.1.0-preview3.19553.2 and SDK
+ 3.1.100-preview3-014645
+
+* Wed Nov 06 2019 Omair Majid <omajid(a)redhat.com> - 3.1.100-0.2
+- Update to .NET Core 3.1 Preview 2
+
+* Wed Oct 30 2019 Omair Majid <omajid(a)redhat.com> - 3.1.100-0.1
+- Update to .NET Core 3.1 Preview 1
+
+* Thu Oct 24 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-5
+- Add cgroupv2 support to .NET Core
+
+* Wed Oct 16 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-4
+- Include fix from coreclr for building on Fedora 32
+
+* Wed Oct 16 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-3
+- Harden built binaries to pass annocheck
+
+* Fri Oct 11 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-2
+- Export DOTNET_ROOT in profile to make apphost lookup work
+
+* Fri Sep 27 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-1
+- Update to .NET Core Runtime 3.0.0 and SDK 3.0.100
+
+* Wed Sep 25 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.18.rc1
+- Update to .NET Core Runtime 3.0.0-rc1-19456-20 and SDK 3.0.100-rc1-014190
+
+* Tue Sep 17 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.16.preview9
+- Fix files duplicated between dotnet-apphost-pack-3.0 and dotnet-targeting-pack-3.0
+- Fix dependencies between .NET SDK and the targeting packs
+
+* Mon Sep 16 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.15.preview9
+- Update to .NET Core Runtime 3.0.0-preview 9 and SDK 3.0.100-preview9
+
+* Mon Aug 19 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.11.preview8
+- Update to .NET Core Runtime 3.0.0-preview8-28405-07 and SDK
+ 3.0.100-preview8-013656
+
+* Tue Jul 30 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.9.preview7
+- Update to .NET Core Runtime 3.0.0-preview7-27912-14 and SDK
+ 3.0.100-preview7-012821
+
+* Fri Jul 26 2019 Omair Majid <omajid(a)redhat.com> - 3.0.100-0.8.preview7
+- Update to .NET Core Runtime 3.0.0-preview7-27902-19 and SDK
+ 3.0.100-preview7-012802
+
+* Wed Jun 26 2019 Omair Majid <omajid(a)redhat.com> - 3.0.0-0.7.preview6
+- Obsolete dotnet-sdk-3.0.1xx
+- Add supackages for targeting packs
+- Add -fcf-protection to CFLAGS
+
+* Wed Jun 26 2019 Omair Majid <omajid(a)redhat.com> - 3.0.0-0.6.preview6
+- Update to .NET Core Runtime 3.0.0-preview6-27804-01 and SDK 3.0.100-preview6-012264
+- Set dotnet installation location in /etc/dotnet/install_location
+- Update targeting packs
+- Install managed symbols
+- Completely conditionalize libunwind bundling
+
+* Tue May 07 2019 Omair Majid <omajid(a)redhat.com> - 3.0.0-0.3.preview4
+- Update to .NET Core 3.0 preview 4
+
+* Tue Dec 18 2018 Omair Majid <omajid(a)redhat.com> - 3.0.0-0.1.preview1
+- Update to .NET Core 3.0 preview 1
+
+* Fri Dec 07 2018 Omair Majid <omajid(a)redhat.com> - 2.2.100
+- Update to .NET Core 2.2.0
+
+* Wed Nov 07 2018 Omair Majid <omajid(a)redhat.com> - 2.2.100-0.2.preview3
+- Update to .NET Core 2.2.0-preview3
+
+* Fri Nov 02 2018 Omair Majid <omajid(a)redhat.com> - 2.1.403-3
+- Add host-fxr-2.1 subpackage
+
+* Mon Oct 15 2018 Omair Majid <omajid(a)redhat.com> - 2.1.403-2
+- Disable telemetry by default
+- Users have to manually export DOTNET_CLI_TELEMETRY_OPTOUT=0 to enable
+
+* Tue Oct 02 2018 Omair Majid <omajid(a)redhat.com> - 2.1.403-1
+- Update to .NET Core Runtime 2.1.5 and SDK 2.1.403
+
+* Wed Sep 26 2018 Omair Majid <omajid(a)redhat.com> - 2.1.402-2
+- Add ~/.dotnet/tools to $PATH to make it easier to use dotnet tools
+
+* Thu Sep 13 2018 Omair Majid <omajid(a)redhat.com> - 2.1.402-1
+- Update to .NET Core Runtime 2.1.4 and SDK 2.1.402
+
+* Wed Sep 05 2018 Omair Majid <omajid(a)redhat.com> - 2.1.401-2
+- Use distro-standard flags when building .NET Core
+
+* Tue Aug 21 2018 Omair Majid <omajid(a)redhat.com> - 2.1.401-1
+- Update to .NET Core Runtime 2.1.3 and SDK 2.1.401
+
+* Mon Aug 20 2018 Omair Majid <omajid(a)redhat.com> - 2.1.302-1
+- Update to .NET Core Runtime 2.1.2 and SDK 2.1.302
+
+* Fri Jul 20 2018 Omair Majid <omajid(a)redhat.com> - 2.1.301-1
+- Update to .NET Core 2.1
+
+* Thu May 03 2018 Omair Majid <omajid(a)redhat.com> - 2.0.7-1
+- Update to .NET Core 2.0.7
+
+* Wed Mar 28 2018 Omair Majid <omajid(a)redhat.com> - 2.0.6-2
+- Enable bash completion for dotnet
+- Remove redundant buildrequires and requires
+
+* Wed Mar 14 2018 Omair Majid <omajid(a)redhat.com> - 2.0.6-1
+- Update to .NET Core 2.0.6
+
+* Fri Feb 23 2018 Omair Majid <omajid(a)redhat.com> - 2.0.5-1
+- Update to .NET Core 2.0.5
+
+* Wed Jan 24 2018 Omair Majid <omajid(a)redhat.com> - 2.0.3-5
+- Don't apply corefx clang warnings fix on clang < 5
+
+* Fri Jan 19 2018 Omair Majid <omajid(a)redhat.com> - 2.0.3-4
+- Add a test script to sanity check debug and symbol info.
+- Build with clang 5.0
+- Make main package real instead of using a virtual provides (see RHBZ 1519325)
+
+* Wed Nov 29 2017 Omair Majid <omajid(a)redhat.com> - 2.0.3-3
+- Add a Provides for 'dotnet'
+- Fix conditional macro
+
+* Tue Nov 28 2017 Omair Majid <omajid(a)redhat.com> - 2.0.3-2
+- Fix build on Fedora 27
+
+* Fri Nov 17 2017 Omair Majid <omajid(a)redhat.com> - 2.0.3-1
+- Update to .NET Core 2.0.3
+
+* Thu Oct 19 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-4
+- Add a hack to let omnisharp work
+
+* Wed Aug 30 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-3
+- Add a patch for building coreclr and core-setup correctly on Fedora >= 27
+
+* Fri Aug 25 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-2
+- Move libicu/libcurl/libunwind requires to runtime package
+- Make sdk depend on the exact version of the runtime package
+
+* Thu Aug 24 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-1
+- Update to 2.0.0 final release
+
+* Wed Jul 26 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-0.3.preview2
+- Add man pages
+
+* Tue Jul 25 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-0.2.preview2
+- Add Requires on libicu
+- Split into multiple packages
+- Do not repeat first-run message
+
+* Fri Jul 21 2017 Omair Majid <omajid(a)redhat.com> - 2.0.0-0.1.preview2
+- Update to .NET Core 2.0 Preview 2
+
+* Thu Mar 16 2017 Nemanja Milošević <nmilosevnm(a)gmail.com> - 1.1.0-7
+- rebuilt with latest libldb
+* Wed Feb 22 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-6
+- compat-openssl 1.0 for F26 for now
+* Sun Feb 19 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-5
+- Fix wrong commit id's
+* Sat Feb 18 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-4
+- Use commit id's instead of branch names
+* Sat Feb 18 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-3
+- Improper patch5 fix
+* Sat Feb 18 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-2
+- SPEC cleanup
+- git removal (using all tarballs for reproducible builds)
+- more reasonable versioning
+* Thu Feb 09 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-1
+- Fixed debuginfo going to separate package (Patch1)
+- Added F25/F26 RIL and fixed the version info (Patch2)
+- Added F25/F26 RIL in Microsoft.NETCore.App suported runtime graph (Patch3)
+- SPEC file cleanup
+* Wed Jan 11 2017 Nemanja Milosevic <nmilosev(a)fedoraproject.org> - 1.1.0-0
+- Initial RPM for Fedora 25/26.
+
diff --git a/rename-tarball b/rename-tarball
new file mode 100755
index 0000000..b6b6086
--- /dev/null
+++ b/rename-tarball
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+# Usage:
+# ./rename-tarball original-name.tar.gz new-name.tar.gz
+
+set -euo pipefail
+IFS=$'\n\t'
+
+positional_args=()
+while [[ "$#" -gt 0 ]]; do
+ arg="${1}"
+ case "${arg}" in
+ -h|--help)
+ print_usage
+ exit 0
+ ;;
+ *)
+ positional_args+=("$1")
+ shift
+ ;;
+ esac
+done
+
+original_name=${positional_args[0]:-}
+if [[ -z ${original_name} ]]; then
+ echo "error: missing original tarball name"
+ exit 1
+fi
+
+new_name=${positional_args[1]:-}
+if [[ -z ${new_name} ]]; then
+ echo "error: missing new tarball name"
+ exit 1
+fi
+
+original_name=${original_name/%.tar.gz}
+new_name=${new_name/.tar.gz}
+
+echo "Original: ${original_name}.tar.gz"
+echo "New name: ${new_name}.tar.gz"
+
+mkdir "temp-${new_name}"
+pushd "temp-${new_name}"
+tar xf "../${original_name}.tar.gz"
+mv "${original_name}" "${new_name}"
+tar czf ../"${new_name}.tar.gz" "${new_name}"
+rm -rf "${new_name}"
+popd
+rmdir "temp-${new_name}"
diff --git a/sources b/sources
new file mode 100644
index 0000000..e5c1d68
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (dotnet-v3.1.101-SDK.tar.gz) = b2eb9df091186e793e82ac7560496c9ac3478e41efa94e58300606e2883d9bdb187f588a48a7bd9cf7f10f3d8f641d0867eb013de9b159e3d471a71dd823278c
diff --git a/update-release b/update-release
new file mode 100755
index 0000000..09eb509
--- /dev/null
+++ b/update-release
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+# Usage:
+# ./update-release runtime-version sdk-version
+
+set -euo pipefail
+IFS=$'\n\t'
+
+print_usage() {
+ echo " Usage:"
+ echo " ./update-release runtime-version sdk-version"
+}
+
+positional_args=()
+while [[ "$#" -gt 0 ]]; do
+ arg="${1}"
+ case "${arg}" in
+ -h|--help)
+ print_usage
+ exit 0
+ ;;
+ *)
+ positional_args+=("$1")
+ shift
+ ;;
+ esac
+done
+
+spec_file=dotnet3.1.spec
+
+runtime_version=${positional_args[0]:-}
+if [[ -z ${runtime_version} ]]; then
+ echo "error: missing runtime version"
+ exit 1
+fi
+host_version="$runtime_version"
+
+sdk_version=${positional_args[1]:-}
+if [[ -z ${sdk_version} ]]; then
+ echo "error: missing sdk version"
+ exit 1
+fi
+
+if [[ ! -f "dotnet-v${sdk_version}-SDK.tar.gz" ]]; then
+ ./build-dotnet-tarball "v${sdk_version}-SDK"
+fi
+
+set -x
+
+sed -i -E "s|^%global host_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%global host_version ${host_version}|" "$spec_file"
+sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%global runtime_version ${runtime_version}|" "$spec_file"
+sed -i -E "s|^%global sdk_version [[:digit:]]\.[[:digit:]]\.[[:digit:]][[:digit:]][[:digit:]]|%global sdk_version ${sdk_version}|" "$spec_file"
+
+comment="Update to .NET Core Runtime ${runtime_version} and SDK ${sdk_version}"
+
+rpmdev-bumpspec --comment="$comment" $spec_file
+
+# Reset release to 1 in 'Release' tag
+sed -i -E 's|^Release: [[:digit:]]+%|Release: 1%|' $spec_file
+# Reset Release in changelog comment
+# See https://stackoverflow.com/questions/18620153/find-matching-text-and-repla...
+sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-1/' $spec_file
commit d39668a409bd4abf8206b93d8173f0f2584ed887
Author: Gwyn Ciesla <limb(a)fedoraproject.org>
Date: Tue Feb 18 20:06:29 2020 +0000
Added the README
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d35adc1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# dotnet3.1
+
+The dotnet3.1 package
\ No newline at end of file
2 years, 4 months
Architecture specific change in rpms/rust-darling0.12.git
by githook-noreply@fedoraproject.org
The package rpms/rust-darling0.12.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-darling0.12.git/commit/?id=2....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 2f53c4574de2c2825e6c090bce1280a8db1c179d
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Mon Dec 20 18:38:30 2021 +0100
Initial import (darling 0.12 compat package)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e24e126
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/results_*/
+/*.src.rpm
+
+/darling-0.12.4.crate
diff --git a/README.md b/README.md
deleted file mode 100644
index b14df30..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-darling0.12
-
-The rust-darling0.12 package
diff --git a/rust-darling0.12.spec b/rust-darling0.12.spec
new file mode 100644
index 0000000..323493d
--- /dev/null
+++ b/rust-darling0.12.spec
@@ -0,0 +1,96 @@
+# Generated by rust2rpm 20
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate darling
+
+Name: rust-%{crate}0.12
+Version: 0.12.4
+Release: %autorelease
+Summary: Proc-macro library for reading attributes into structs
+
+# Upstream license specification: MIT
+License: MIT
+URL: https://crates.io/crates/darling
+Source: %{crates_source}
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Proc-macro library for reading attributes into structs when implementing custom
+derives.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license LICENSE
+%doc CHANGELOG.md README.md
+%{cargo_registry}/%{crate}-%{version_no_tilde}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+diagnostics-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+diagnostics-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "diagnostics" feature of the "%{crate}" crate.
+
+%files -n %{name}+diagnostics-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+suggestions-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+suggestions-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "suggestions" feature of the "%{crate}" crate.
+
+%files -n %{name}+suggestions-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..32b5f95
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (darling-0.12.4.crate) = 12358298bbbe4c18a6b8b1ff838c210806980973f7fa2307af97f0b33df2e3f1bb43dc2b990b5e8bbdd4f8ec97e1785ece556ada8ad6d6957f9dfb37316ab7a6
2 years, 4 months
Architecture specific change in rpms/rust-darling0.12.git
by githook-noreply@fedoraproject.org
The package rpms/rust-darling0.12.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-darling0.12.git/commit/?id=2....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 2f53c4574de2c2825e6c090bce1280a8db1c179d
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Mon Dec 20 18:38:30 2021 +0100
Initial import (darling 0.12 compat package)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e24e126
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/results_*/
+/*.src.rpm
+
+/darling-0.12.4.crate
diff --git a/README.md b/README.md
deleted file mode 100644
index b14df30..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-darling0.12
-
-The rust-darling0.12 package
diff --git a/rust-darling0.12.spec b/rust-darling0.12.spec
new file mode 100644
index 0000000..323493d
--- /dev/null
+++ b/rust-darling0.12.spec
@@ -0,0 +1,96 @@
+# Generated by rust2rpm 20
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate darling
+
+Name: rust-%{crate}0.12
+Version: 0.12.4
+Release: %autorelease
+Summary: Proc-macro library for reading attributes into structs
+
+# Upstream license specification: MIT
+License: MIT
+URL: https://crates.io/crates/darling
+Source: %{crates_source}
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Proc-macro library for reading attributes into structs when implementing custom
+derives.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license LICENSE
+%doc CHANGELOG.md README.md
+%{cargo_registry}/%{crate}-%{version_no_tilde}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+diagnostics-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+diagnostics-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "diagnostics" feature of the "%{crate}" crate.
+
+%files -n %{name}+diagnostics-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+suggestions-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+suggestions-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "suggestions" feature of the "%{crate}" crate.
+
+%files -n %{name}+suggestions-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..32b5f95
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (darling-0.12.4.crate) = 12358298bbbe4c18a6b8b1ff838c210806980973f7fa2307af97f0b33df2e3f1bb43dc2b990b5e8bbdd4f8ec97e1785ece556ada8ad6d6957f9dfb37316ab7a6
2 years, 4 months
Architecture specific change in rpms/rust-darling_macro0.12.git
by githook-noreply@fedoraproject.org
The package rpms/rust-darling_macro0.12.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-darling_macro0.12.git/commit....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit fb424b201e708100a6ccdf7f9d672d44e58f6a76
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Mon Dec 20 18:35:14 2021 +0100
Initial import (darling_macro 0.12 compat package)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..00abbca
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/results_*/
+/*.src.rpm
+
+/darling_macro-0.12.4.crate
diff --git a/README.md b/README.md
deleted file mode 100644
index d294263..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-darling_macro0.12
-
-The rust-darling_macro0.12 package
diff --git a/rust-darling_macro0.12.spec b/rust-darling_macro0.12.spec
new file mode 100644
index 0000000..a748548
--- /dev/null
+++ b/rust-darling_macro0.12.spec
@@ -0,0 +1,72 @@
+# Generated by rust2rpm 20
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate darling_macro
+
+Name: rust-%{crate}0.12
+Version: 0.12.4
+Release: %autorelease
+Summary: Internal support for a proc-macro library for reading attributes into structs
+
+# Upstream license specification: MIT
+License: MIT
+URL: https://crates.io/crates/darling_macro
+Source: %{crates_source}
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Internal support for a proc-macro library for reading attributes into structs
+when implementing custom derives. Use https://crates.io/crates/darling in your
+code.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license LICENSE
+%{cargo_registry}/%{crate}-%{version_no_tilde}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..32595b1
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (darling_macro-0.12.4.crate) = 324c778f4243b0d34d10998dd1ef7f911fba9392928eb8626c8ce389c599f6fe39791b1558a4480d366bdaea8be78f9d6a4f7ded48a4a020e721bda240804e1f
2 years, 4 months
Architecture specific change in rpms/rust-darling_macro0.12.git
by githook-noreply@fedoraproject.org
The package rpms/rust-darling_macro0.12.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-darling_macro0.12.git/commit....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit fb424b201e708100a6ccdf7f9d672d44e58f6a76
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Mon Dec 20 18:35:14 2021 +0100
Initial import (darling_macro 0.12 compat package)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..00abbca
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/results_*/
+/*.src.rpm
+
+/darling_macro-0.12.4.crate
diff --git a/README.md b/README.md
deleted file mode 100644
index d294263..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-darling_macro0.12
-
-The rust-darling_macro0.12 package
diff --git a/rust-darling_macro0.12.spec b/rust-darling_macro0.12.spec
new file mode 100644
index 0000000..a748548
--- /dev/null
+++ b/rust-darling_macro0.12.spec
@@ -0,0 +1,72 @@
+# Generated by rust2rpm 20
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate darling_macro
+
+Name: rust-%{crate}0.12
+Version: 0.12.4
+Release: %autorelease
+Summary: Internal support for a proc-macro library for reading attributes into structs
+
+# Upstream license specification: MIT
+License: MIT
+URL: https://crates.io/crates/darling_macro
+Source: %{crates_source}
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Internal support for a proc-macro library for reading attributes into structs
+when implementing custom derives. Use https://crates.io/crates/darling in your
+code.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license LICENSE
+%{cargo_registry}/%{crate}-%{version_no_tilde}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..32595b1
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (darling_macro-0.12.4.crate) = 324c778f4243b0d34d10998dd1ef7f911fba9392928eb8626c8ce389c599f6fe39791b1558a4480d366bdaea8be78f9d6a4f7ded48a4a020e721bda240804e1f
2 years, 4 months
Architecture specific change in rpms/rust-darling_core0.12.git
by githook-noreply@fedoraproject.org
The package rpms/rust-darling_core0.12.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-darling_core0.12.git/commit/....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 98edb43df1f12eb806b29438bc1f8b915939448e
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Mon Dec 20 18:34:36 2021 +0100
Initial import (darling_core 0.12 compat package)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7c9571d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/results_*/
+/*.src.rpm
+
+/darling_core-0.12.4.crate
diff --git a/README.md b/README.md
deleted file mode 100644
index 28d612a..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-darling_core0.12
-
-The rust-darling_core0.12 package
diff --git a/rust-darling_core0.12.spec b/rust-darling_core0.12.spec
new file mode 100644
index 0000000..d4f9b0b
--- /dev/null
+++ b/rust-darling_core0.12.spec
@@ -0,0 +1,107 @@
+# Generated by rust2rpm 20
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate darling_core
+
+Name: rust-%{crate}0.12
+Version: 0.12.4
+Release: %autorelease
+Summary: Helper crate for proc-macro library for reading attributes into structs
+
+# Upstream license specification: MIT
+License: MIT
+URL: https://crates.io/crates/darling_core
+Source: %{crates_source}
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Helper crate for proc-macro library for reading attributes into structs when
+implementing custom derives. Use https://crates.io/crates/darling in your code.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license LICENSE
+%{cargo_registry}/%{crate}-%{version_no_tilde}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+diagnostics-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+diagnostics-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "diagnostics" feature of the "%{crate}" crate.
+
+%files -n %{name}+diagnostics-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+strsim-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+strsim-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "strsim" feature of the "%{crate}" crate.
+
+%files -n %{name}+strsim-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+suggestions-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+suggestions-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "suggestions" feature of the "%{crate}" crate.
+
+%files -n %{name}+suggestions-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..1fc8bd2
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (darling_core-0.12.4.crate) = 0e89867284cf34506d0dee4423120c8e1f40efcc66d510e111959fe0c8eecc956b9a03c85b81ea0489be067b18113586909d1ee36f78495b123e4d64d41b300f
2 years, 4 months
Architecture specific change in rpms/rust-darling_core0.12.git
by githook-noreply@fedoraproject.org
The package rpms/rust-darling_core0.12.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-darling_core0.12.git/commit/....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 98edb43df1f12eb806b29438bc1f8b915939448e
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Mon Dec 20 18:34:36 2021 +0100
Initial import (darling_core 0.12 compat package)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7c9571d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/results_*/
+/*.src.rpm
+
+/darling_core-0.12.4.crate
diff --git a/README.md b/README.md
deleted file mode 100644
index 28d612a..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-darling_core0.12
-
-The rust-darling_core0.12 package
diff --git a/rust-darling_core0.12.spec b/rust-darling_core0.12.spec
new file mode 100644
index 0000000..d4f9b0b
--- /dev/null
+++ b/rust-darling_core0.12.spec
@@ -0,0 +1,107 @@
+# Generated by rust2rpm 20
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate darling_core
+
+Name: rust-%{crate}0.12
+Version: 0.12.4
+Release: %autorelease
+Summary: Helper crate for proc-macro library for reading attributes into structs
+
+# Upstream license specification: MIT
+License: MIT
+URL: https://crates.io/crates/darling_core
+Source: %{crates_source}
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Helper crate for proc-macro library for reading attributes into structs when
+implementing custom derives. Use https://crates.io/crates/darling in your code.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license LICENSE
+%{cargo_registry}/%{crate}-%{version_no_tilde}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+diagnostics-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+diagnostics-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "diagnostics" feature of the "%{crate}" crate.
+
+%files -n %{name}+diagnostics-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+strsim-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+strsim-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "strsim" feature of the "%{crate}" crate.
+
+%files -n %{name}+strsim-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+suggestions-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+suggestions-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "suggestions" feature of the "%{crate}" crate.
+
+%files -n %{name}+suggestions-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..1fc8bd2
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (darling_core-0.12.4.crate) = 0e89867284cf34506d0dee4423120c8e1f40efcc66d510e111959fe0c8eecc956b9a03c85b81ea0489be067b18113586909d1ee36f78495b123e4d64d41b300f
2 years, 4 months