From cd326e5e54665959988bab618e41a0ecf0a587f5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 06 2021 10:10:34 +0000 Subject: import dotnet3.1-3.1.118-1.el8 --- diff --git a/.dotnet3.1.metadata b/.dotnet3.1.metadata index ec7460e..923c2ba 100644 --- a/.dotnet3.1.metadata +++ b/.dotnet3.1.metadata @@ -1 +1 @@ -3b7c4b8f2ddc39468c490ce35bf1dc3dc60934ea SOURCES/dotnet-v3.1.112-SDK.tar.gz +2a9b5570e94fc781626a372b526782b867ba95a1 SOURCES/dotnet-v3.1.118-SDK.tar.gz diff --git a/.gitignore b/.gitignore index 552c71b..7db3884 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/dotnet-v3.1.112-SDK.tar.gz +SOURCES/dotnet-v3.1.118-SDK.tar.gz diff --git a/SOURCES/core-setup-hardening-flags.patch b/SOURCES/core-setup-hardening-flags.patch deleted file mode 100644 index 5eb3848..0000000 --- a/SOURCES/core-setup-hardening-flags.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/src/settings.cmake b/src/settings.cmake ---- a/src/settings.cmake -+++ b/src/settings.cmake -@@ -218,6 +218,8 @@ 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_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pie") - 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) ---- a/src/corehost/cli/apphost/CMakeLists.txt -+++ b/src/corehost/cli/apphost/CMakeLists.txt -@@ -50,6 +50,8 @@ - - add_definitions(-DFEATURE_APPHOST=1) - -+set_target_properties("apphost" PROPERTIES LINK_FLAGS -pie) -+ - # Disable manifest generation into the file .exe on Windows - if(WIN32) - set_property(TARGET ${PROJECT_NAME} PROPERTY diff --git a/SOURCES/coreclr-hardening-flags.patch b/SOURCES/coreclr-hardening-flags.patch deleted file mode 100644 index bd9a4ba..0000000 --- a/SOURCES/coreclr-hardening-flags.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/debug/createdump/CMakeLists.txt -+++ b/src/debug/createdump/CMakeLists.txt -@@ -38,6 +38,8 @@ - - add_dependencies(createdump pal_redefines_file) - -+SET_TARGET_PROPERTIES(createdump PROPERTIES LINK_FLAGS -pie) -+ - target_link_libraries(createdump - createdump_lib - # share the PAL/corguids in the dac module ---- a/src/corefx/System.Globalization.Native/CMakeLists.txt -+++ b/src/corefx/System.Globalization.Native/CMakeLists.txt -@@ -71,6 +71,8 @@ - set_target_properties(System.Globalization.Native_Static PROPERTIES PREFIX "") - set_target_properties(System.Globalization.Native_Static PROPERTIES OUTPUT_NAME System.Globalization.Native) - -+set_target_properties(System.Globalization.Native PROPERTIES LINK_FLAGS -pie) -+ - if(NOT CLR_CMAKE_PLATFORM_DARWIN) - if (NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD) - target_link_libraries(System.Globalization.Native diff --git a/SOURCES/coreclr-libunwind-fno-common.patch b/SOURCES/coreclr-libunwind-fno-common.patch deleted file mode 100644 index 5a1d407..0000000 --- a/SOURCES/coreclr-libunwind-fno-common.patch +++ /dev/null @@ -1,402 +0,0 @@ -From 29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e Mon Sep 17 00:00:00 2001 -From: Yichao Yu -Date: Tue, 31 Mar 2020 00:43:32 -0400 -Subject: [PATCH] Fix compilation with -fno-common. - -Making all other archs consistent with IA64 which should not have this problem. -Also move the FIXME to the correct place. - -Also add some minimum comments about this... ---- - src/aarch64/Ginit.c | 15 +++++++-------- - src/arm/Ginit.c | 15 +++++++-------- - src/coredump/_UPT_get_dyn_info_list_addr.c | 5 +++++ - src/hppa/Ginit.c | 15 +++++++-------- - src/ia64/Ginit.c | 1 + - src/mi/Gfind_dynamic_proc_info.c | 1 + - src/mips/Ginit.c | 15 +++++++-------- - src/ppc32/Ginit.c | 11 +++++++---- - src/ppc64/Ginit.c | 11 +++++++---- - src/ptrace/_UPT_get_dyn_info_list_addr.c | 5 +++++ - src/s390x/Ginit.c | 15 +++++++-------- - src/sh/Ginit.c | 15 +++++++-------- - src/tilegx/Ginit.c | 15 +++++++-------- - src/x86/Ginit.c | 15 +++++++-------- - src/x86_64/Ginit.c | 15 +++++++-------- - 15 files changed, 89 insertions(+), 80 deletions(-) - -diff --git a/src/pal/src/libunwind/src/aarch64/Ginit.c b/src/pal/src/libunwind/src/aarch64/Ginit.c -index dec235c82..35389762f 100644 ---- a/src/pal/src/libunwind/src/aarch64/Ginit.c -+++ b/src/pal/src/libunwind/src/aarch64/Ginit.c -@@ -61,13 +61,6 @@ tdep_uc_addr (unw_tdep_context_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- --/* XXX fix me: there is currently no way to locate the dyn-info list -- by a remote unwinder. On ia64, this is done via a special -- unwind-table entry. Perhaps something similar can be done with -- DWARF2 unwind info. */ -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -78,7 +71,13 @@ static int - get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) - { -- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; -+#ifndef UNW_LOCAL_ONLY -+# pragma weak _U_dyn_info_list_addr -+ if (!_U_dyn_info_list_addr) -+ return -UNW_ENOINFO; -+#endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. -+ *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } - -diff --git a/src/pal/src/libunwind/src/arm/Ginit.c b/ssrc/pal/src/libunwind/src/arm/Ginit.c -index 2720d063a..0bac0d72d 100644 ---- a/src/pal/src/libunwind/src/arm/Ginit.c -+++ b/src/pal/src/libunwind/src/arm/Ginit.c -@@ -57,18 +57,17 @@ tdep_uc_addr (unw_tdep_context_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- --/* XXX fix me: there is currently no way to locate the dyn-info list -- by a remote unwinder. On ia64, this is done via a special -- unwind-table entry. Perhaps something similar can be done with -- DWARF2 unwind info. */ -- - static int - get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) - { -- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; -+#ifndef UNW_LOCAL_ONLY -+# pragma weak _U_dyn_info_list_addr -+ if (!_U_dyn_info_list_addr) -+ return -UNW_ENOINFO; -+#endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. -+ *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } - -diff --git a/src/pal/src/libunwind/src/coredump/_UPT_get_dyn_info_list_addr.c b/src/pal/src/libunwind/src/coredump/_UPT_get_dyn_info_list_addr.c -index 0d1190556..739ed0569 100644 ---- a/src/pal/src/libunwind/src/coredump/_UPT_get_dyn_info_list_addr.c -+++ b/src/pal/src/libunwind/src/coredump/_UPT_get_dyn_info_list_addr.c -@@ -74,6 +74,11 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, - - #else - -+/* XXX fix me: there is currently no way to locate the dyn-info list -+ by a remote unwinder. On ia64, this is done via a special -+ unwind-table entry. Perhaps something similar can be done with -+ DWARF2 unwind info. */ -+ - static inline int - get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, - int *countp) -diff --git a/src/pal/src/libunwind/src/hppa/Ginit.c b/src/pal/src/libunwind/src/hppa/Ginit.c -index 461e4b93d..265455a68 100644 ---- a/src/pal/src/libunwind/src/hppa/Ginit.c -+++ b/src/pal/src/libunwind/src/hppa/Ginit.c -@@ -64,13 +64,6 @@ _Uhppa_uc_addr (ucontext_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- --/* XXX fix me: there is currently no way to locate the dyn-info list -- by a remote unwinder. On ia64, this is done via a special -- unwind-table entry. Perhaps something similar can be done with -- DWARF2 unwind info. */ -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -81,7 +74,13 @@ static int - get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) - { -- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; -+#ifndef UNW_LOCAL_ONLY -+# pragma weak _U_dyn_info_list_addr -+ if (!_U_dyn_info_list_addr) -+ return -UNW_ENOINFO; -+#endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. -+ *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } - -diff --git a/src/pal/src/libunwind/src/ia64/Ginit.c b/src/pal/src/libunwind/src/ia64/Ginit.c -index b09a2ad57..8601bb3ca 100644 ---- a/src/pal/src/libunwind/src/ia64/Ginit.c -+++ b/src/pal/src/libunwind/src/ia64/Ginit.c -@@ -68,6 +68,7 @@ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - if (!_U_dyn_info_list_addr) - return -UNW_ENOINFO; - #endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. - *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } -diff --git a/src/pal/src/libunwind/src/mi/Gfind_dynamic_proc_info.c b/src/pal/src/libunwind/src/mi/Gfind_dynamic_proc_info.c -index 98d350128..2e7c62e5e 100644 ---- a/src/pal/src/libunwind/src/mi/Gfind_dynamic_proc_info.c -+++ b/src/pal/src/libunwind/src/mi/Gfind_dynamic_proc_info.c -@@ -49,6 +49,7 @@ local_find_proc_info (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi, - return -UNW_ENOINFO; - #endif - -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. - list = (unw_dyn_info_list_t *) (uintptr_t) _U_dyn_info_list_addr (); - for (di = list->first; di; di = di->next) - if (ip >= di->start_ip && ip < di->end_ip) -diff --git a/src/pal/src/libunwind/src/mips/Ginit.c b/src/pal/src/libunwind/src/mips/Ginit.c -index 3df170c75..bf7a8f5a8 100644 ---- a/src/pal/src/libunwind/src/mips/Ginit.c -+++ b/src/pal/src/libunwind/src/mips/Ginit.c -@@ -69,13 +69,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- --/* XXX fix me: there is currently no way to locate the dyn-info list -- by a remote unwinder. On ia64, this is done via a special -- unwind-table entry. Perhaps something similar can be done with -- DWARF2 unwind info. */ -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -86,7 +79,13 @@ static int - get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) - { -- *dyn_info_list_addr = (unw_word_t) (intptr_t) &_U_dyn_info_list; -+#ifndef UNW_LOCAL_ONLY -+# pragma weak _U_dyn_info_list_addr -+ if (!_U_dyn_info_list_addr) -+ return -UNW_ENOINFO; -+#endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. -+ *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } - -diff --git a/src/pal/src/libunwind/src/ppc32/Ginit.c b/src/pal/src/libunwind/src/ppc32/Ginit.c -index ba302448a..7b4545580 100644 ---- a/src/pal/src/libunwind/src/ppc32/Ginit.c -+++ b/src/pal/src/libunwind/src/ppc32/Ginit.c -@@ -91,9 +91,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -104,7 +101,13 @@ static int - get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) - { -- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; -+#ifndef UNW_LOCAL_ONLY -+# pragma weak _U_dyn_info_list_addr -+ if (!_U_dyn_info_list_addr) -+ return -UNW_ENOINFO; -+#endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. -+ *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } - -diff --git a/src/pal/src/libunwind/src/ppc64/Ginit.c b/src/pal/src/libunwind/src/ppc64/Ginit.c -index 4c88cd6e7..7bfb395a7 100644 ---- a/src/pal/src/libunwind/src/ppc64/Ginit.c -+++ b/src/pal/src/libunwind/src/ppc64/Ginit.c -@@ -95,9 +95,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -108,7 +105,13 @@ static int - get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) - { -- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; -+#ifndef UNW_LOCAL_ONLY -+# pragma weak _U_dyn_info_list_addr -+ if (!_U_dyn_info_list_addr) -+ return -UNW_ENOINFO; -+#endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. -+ *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } - -diff --git a/src/pal/src/libunwind/src/ptrace/_UPT_get_dyn_info_list_addr.c b/src/pal/src/libunwind/src/ptrace/_UPT_get_dyn_info_list_addr.c -index cc5ed0441..16671d453 100644 ---- a/src/pal/src/libunwind/src/ptrace/_UPT_get_dyn_info_list_addr.c -+++ b/src/pal/src/libunwind/src/ptrace/_UPT_get_dyn_info_list_addr.c -@@ -71,6 +71,11 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, - - #else - -+/* XXX fix me: there is currently no way to locate the dyn-info list -+ by a remote unwinder. On ia64, this is done via a special -+ unwind-table entry. Perhaps something similar can be done with -+ DWARF2 unwind info. */ -+ - static inline int - get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, - int *countp) -diff --git a/src/pal/src/libunwind/src/sh/Ginit.c b/src/pal/src/libunwind/src/sh/Ginit.c -index 52988a721..9fe96d2bd 100644 ---- a/src/pal/src/libunwind/src/sh/Ginit.c -+++ b/src/pal/src/libunwind/src/sh/Ginit.c -@@ -58,13 +58,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- --/* XXX fix me: there is currently no way to locate the dyn-info list -- by a remote unwinder. On ia64, this is done via a special -- unwind-table entry. Perhaps something similar can be done with -- DWARF2 unwind info. */ -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -75,7 +68,13 @@ static int - get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) - { -- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; -+#ifndef UNW_LOCAL_ONLY -+# pragma weak _U_dyn_info_list_addr -+ if (!_U_dyn_info_list_addr) -+ return -UNW_ENOINFO; -+#endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. -+ *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } - -diff --git a/src/pal/src/libunwind/src/tilegx/Ginit.c b/src/pal/src/libunwind/src/tilegx/Ginit.c -index 7564a558b..925e64132 100644 ---- a/src/pal/src/libunwind/src/tilegx/Ginit.c -+++ b/src/pal/src/libunwind/src/tilegx/Ginit.c -@@ -64,13 +64,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- --/* XXX fix me: there is currently no way to locate the dyn-info list -- by a remote unwinder. On ia64, this is done via a special -- unwind-table entry. Perhaps something similar can be done with -- DWARF2 unwind info. */ -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -81,7 +74,13 @@ static int - get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) - { -- *dyn_info_list_addr = (unw_word_t) (intptr_t) &_U_dyn_info_list; -+#ifndef UNW_LOCAL_ONLY -+# pragma weak _U_dyn_info_list_addr -+ if (!_U_dyn_info_list_addr) -+ return -UNW_ENOINFO; -+#endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. -+ *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } - -diff --git a/src/pal/src/libunwind/src/x86/Ginit.c b/src/pal/src/libunwind/src/x86/Ginit.c -index f6b8dc27d..3cec74a21 100644 ---- a/src/pal/src/libunwind/src/x86/Ginit.c -+++ b/src/pal/src/libunwind/src/x86/Ginit.c -@@ -54,13 +54,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) - - # endif /* UNW_LOCAL_ONLY */ - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- --/* XXX fix me: there is currently no way to locate the dyn-info list -- by a remote unwinder. On ia64, this is done via a special -- unwind-table entry. Perhaps something similar can be done with -- DWARF2 unwind info. */ -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -71,7 +64,13 @@ static int - get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) - { -- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; -+#ifndef UNW_LOCAL_ONLY -+# pragma weak _U_dyn_info_list_addr -+ if (!_U_dyn_info_list_addr) -+ return -UNW_ENOINFO; -+#endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. -+ *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } - -diff --git a/src/pal/src/libunwind/src/x86_64/Ginit.c b/src/pal/src/libunwind/src/x86_64/Ginit.c -index a865d3385..fd8d418b1 100644 ---- a/src/pal/src/libunwind/src/x86_64/Ginit.c -+++ b/src/pal/src/libunwind/src/x86_64/Ginit.c -@@ -49,13 +49,6 @@ static struct unw_addr_space local_addr_space; - - unw_addr_space_t unw_local_addr_space = &local_addr_space; - --HIDDEN unw_dyn_info_list_t _U_dyn_info_list; -- --/* XXX fix me: there is currently no way to locate the dyn-info list -- by a remote unwinder. On ia64, this is done via a special -- unwind-table entry. Perhaps something similar can be done with -- DWARF2 unwind info. */ -- - static void - put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) - { -@@ -66,7 +59,13 @@ static int - get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, - void *arg) - { -- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; -+#ifndef UNW_LOCAL_ONLY -+# pragma weak _U_dyn_info_list_addr -+ if (!_U_dyn_info_list_addr) -+ return -UNW_ENOINFO; -+#endif -+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so. -+ *dyn_info_list_addr = _U_dyn_info_list_addr (); - return 0; - } - diff --git a/SOURCES/corefx-hardening-flags.patch b/SOURCES/corefx-hardening-flags.patch deleted file mode 100644 index b1588e2..0000000 --- a/SOURCES/corefx-hardening-flags.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/Native/Unix/System.Native/CMakeLists.txt -+++ b/src/Native/Unix/System.Native/CMakeLists.txt -@@ -48,6 +48,8 @@ - set_target_properties(System.Native-Static PROPERTIES PREFIX "") - set_target_properties(System.Native-Static PROPERTIES OUTPUT_NAME System.Native CLEAN_DIRECT_OUTPUT 1) - -+set_target_properties(System.Native PROPERTIES LINK_FLAGS -pie) -+ - if (CMAKE_SYSTEM_NAME STREQUAL Linux AND NOT CLR_CMAKE_PLATFORM_ANDROID) - target_link_libraries(System.Native rt) - endif () diff --git a/SOURCES/source-build-ilasm-ildasm-path-fix.patch b/SOURCES/source-build-ilasm-ildasm-path-fix.patch new file mode 100644 index 0000000..298b50f --- /dev/null +++ b/SOURCES/source-build-ilasm-ildasm-path-fix.patch @@ -0,0 +1,15 @@ +diff --git a/Directory.Build.props b/Directory.Build.props +index f6a6f54a..8247c3ee 100644 +--- a/Directory.Build.props ++++ b/Directory.Build.props +@@ -133,8 +133,8 @@ + $(BaseOutputPath)aspnet-debug + $(AspNetRazorBuildServerLogDir)razor-build-server.log + invalid: ILAsm is not expected to be needed in the online build +- $(PrebuiltSourceBuiltPackagesPath)coreclr-tools/$(BuildArchitecture)/ilasm +- $(ToolPackageExtractDir)coreclr-tools/$(BuildArchitecture)/ildasm ++ $(PrebuiltSourceBuiltPackagesPath)coreclr-tools/ilasm ++ $(ToolPackageExtractDir)coreclr-tools/ildasm + invalid: ILDasm is not expected to be needed in the offline build + + $(BaseOutputPath)git-info/ diff --git a/SPECS/dotnet3.1.spec b/SPECS/dotnet3.1.spec index 5760318..0cc4a64 100644 --- a/SPECS/dotnet3.1.spec +++ b/SPECS/dotnet3.1.spec @@ -1,3 +1,5 @@ +%bcond_with bootstrap + # Avoid provides/requires from private libraries %global privlibs libhostfxr %global privlibs %{privlibs}|libclrjit @@ -23,10 +25,10 @@ %endif %global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g') -%global host_version 3.1.12 -%global runtime_version 3.1.12 +%global host_version 3.1.18 +%global runtime_version 3.1.18 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 3.1.112 +%global sdk_version 3.1.118 %global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }') %global host_rpm_version %{host_version} @@ -59,7 +61,7 @@ Name: dotnet3.1 Version: %{sdk_rpm_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: .NET Core CLI tools and runtime License: MIT and ASL 2.0 and BSD URL: https://github.com/dotnet/ @@ -71,16 +73,16 @@ Source0: dotnet-v%{sdk_version}-SDK.tar.gz Source100: check-debug-symbols.py Source101: dotnet.sh.in +Patch1: source-build-ilasm-ildasm-path-fix.patch + Patch100: corefx-optflags-support.patch Patch103: corefx-39633-cgroupv2-mountpoints.patch -Patch104: corefx-hardening-flags.patch Patch200: coreclr-27048-sysctl-deprecation.patch -Patch201: coreclr-hardening-flags.patch -Patch202: coreclr-libunwind-fno-common.patch +# Already applied at tarball build time +#Patch201: coreclr-libunwind-fno-common.patch Patch300: core-setup-do-not-strip.patch -Patch301: core-setup-hardening-flags.patch Patch500: cli-telemetry-optout.patch @@ -89,6 +91,11 @@ 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 @@ -288,6 +295,17 @@ applications using the .NET Core SDK. %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 %ifarch x86_64 @@ -297,30 +315,46 @@ applications using the .NET Core SDK. %setup T -b1 -q -n dotnet-v%{sdk_version}-SDK-rhel.8-arm64 %endif +%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 -rf .dotnet/ +rm -rf packages/source-built +%endif + +%if %{without bootstrap} +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 +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.common.props -pushd src/dotnet-corefx.* +%patch1 -p1 + +pushd src/corefx.* %patch100 -p1 %patch103 -p1 -%patch104 -p1 popd pushd src/coreclr.* %patch200 -p1 -%patch201 -p1 -%patch202 -p1 +#%%patch201 -p1 popd -pushd src/dotnet-core-setup.* +pushd src/core-setup.* %patch300 -p1 -%patch301 -p1 popd -pushd src/dotnet-cli.* +pushd src/cli.* %patch500 -p1 popd @@ -340,16 +374,25 @@ find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \; %build cat /etc/os-release +%if %{without bootstrap} +# We need to create a copy because we will mutate this +cp -a %{_libdir}/dotnet previously-built-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 \ +%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' %{SOURCE101} > dotnet.sh @@ -357,7 +400,7 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE101} > dotnet.sh %install install -dm 0755 %{buildroot}%{_libdir}/dotnet -ls artifacts/%{runtime_arch}/Release +find artifacts/%{runtime_arch}/Release tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/ # Install managed symbols @@ -410,6 +453,9 @@ chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{run #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/ + # 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. @@ -450,7 +496,33 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %{_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 +* Sat Aug 14 2021 Omair Majid - 3.1.118-1 +- Update to .NET SDK 3.1.118 and Runtime 3.1.18 +- Resolves: RHBZ#1990174 + +* Wed Aug 11 2021 Omair Majid - 3.1.117-1 +- Update to .NET SDK 3.1.117 and Runtime 3.1.17 +- Resolves: RHBZ#1978389 + +* Fri Jun 11 2021 Omair Majid - 3.1.116-1 +- Update to .NET SDK 3.1.116 and Runtime 3.1.16 +- Resolves: RHBZ#1965499 +- Resolves: RHBZ#1966998 + +* Wed Jun 02 2021 Omair Majid - 3.1.115-1 +- Update to .NET SDK 3.1.115 and Runtime 3.1.15 +- Resolves: RHBZ#1954324 + +* Thu Apr 22 2021 Omair Majid - 3.1.114-2 +- Update to .NET SDK 3.1.114 and Runtime 3.1.14 +- Add dotnet-sdk-3.1-source-built-artifacts subpackage +- Resolves: RHBZ#1946721 + * Wed Feb 10 2021 Omair Majid - 3.1.112-2 - Update to .NET Core SDK 3.1.112 and Runtime 3.1.12 - Resolves: RHBZ#1923370