Architecture specific change in rpms/firefox.git
by githook-noreply@fedoraproject.org
The package rpms/firefox.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/firefox.git/commit/?id=96e0061c83....
Change:
+ExcludeArch: armv7hl
Thanks.
Full change:
============
commit 96e0061c8369180f3ca87f896d83a53e90e4e2d1
Author: Martin Stransky <stransky(a)redhat.com>
Date: Sat Jan 30 15:20:47 2021 +0100
ARM / Rawhide PGO updates to produce rahide build
diff --git a/firefox.spec b/firefox.spec
index 6e13020..4defa6e 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -25,6 +25,12 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=1897522
ExcludeArch: s390x
+# Exclude ARM due to
+# https://bugzilla.redhat.com/show_bug.cgi?id=1922599
+%if 0%{?fedora} > 33
+ExcludeArch: armv7hl
+%endif
+
# Temporary disable tests on Rawhide/arm/i686 due to failures
%if 0%{?fedora} > 33
%ifarch armv7hl
@@ -76,6 +82,11 @@ ExcludeArch: s390x
%global build_with_pgo 1
%endif
%endif
+# Disable PGO on Rawhide due to
+# https://bugzilla.redhat.com/show_bug.cgi?id=1922600
+%if 0%{?fedora} > 33
+%global build_with_pgo 0
+%endif
%if 0%{?flatpak}
%global build_with_pgo 0
%endif
diff --git a/mozilla-1631061-1.patch b/mozilla-1631061-1.patch
new file mode 100644
index 0000000..d1bf650
--- /dev/null
+++ b/mozilla-1631061-1.patch
@@ -0,0 +1,331 @@
+diff --git a/widget/gtk/nsClipboardWayland.cpp b/widget/gtk/nsClipboardWayland.cpp
+--- a/widget/gtk/nsClipboardWayland.cpp
++++ b/widget/gtk/nsClipboardWayland.cpp
+@@ -155,6 +155,8 @@
+ }
+
+ bool WaylandDataOffer::RequestDataTransfer(const char* aMimeType, int fd) {
++ LOGCLIP(
++ ("WaylandDataOffer::RequestDataTransfer MIME %s FD %d\n", aMimeType, fd));
+ if (mWaylandDataOffer) {
+ wl_data_offer_receive(mWaylandDataOffer, aMimeType, fd);
+ return true;
+@@ -164,6 +166,8 @@
+ }
+
+ void WaylandDataOffer::DragOfferAccept(const char* aMimeType, uint32_t aTime) {
++ LOGDRAG(("WaylandDataOffer::DragOfferAccept MIME %s aTime %d\n", aMimeType,
++ aTime));
+ wl_data_offer_accept(mWaylandDataOffer, aTime, aMimeType);
+ }
+
+@@ -175,6 +179,9 @@
+ uint32_t preferredAction = gdk_to_wl_actions(aPreferredAction);
+ uint32_t allActions = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE;
+
++ LOGDRAG(("WaylandDataOffer::SetDragStatus aPreferredAction %d\n",
++ aPreferredAction));
++
+ /* We only don't choose a preferred action if we don't accept any.
+ * If we do accept any, it is currently alway copy and move
+ */
+@@ -412,12 +419,17 @@
+
+ char* nsWaylandDragContext::GetData(const char* aMimeType,
+ uint32_t* aContentLength) {
++ LOGDRAG(("nsWaylandDragContext::GetData %s\n", aMimeType));
+ mDataOffer->DragOfferAccept(aMimeType, mTime);
+ return mDataOffer->GetData(mDisplay, aMimeType, aContentLength);
+ }
+
+ void nsRetrievalContextWayland::RegisterNewDataOffer(
+ wl_data_offer* aWaylandDataOffer) {
++ LOGCLIP(
++ ("nsRetrievalContextWayland::RegisterNewDataOffer (wl_data_offer) %p\n",
++ aWaylandDataOffer));
++
+ DataOffer* dataOffer = static_cast<DataOffer*>(
+ g_hash_table_lookup(mActiveOffers, aWaylandDataOffer));
+ MOZ_ASSERT(
+@@ -432,6 +444,9 @@
+
+ void nsRetrievalContextWayland::RegisterNewDataOffer(
+ gtk_primary_selection_offer* aPrimaryDataOffer) {
++ LOGCLIP(("nsRetrievalContextWayland::RegisterNewDataOffer (primary) %p\n",
++ aPrimaryDataOffer));
++
+ DataOffer* dataOffer = static_cast<DataOffer*>(
+ g_hash_table_lookup(mActiveOffers, aPrimaryDataOffer));
+ MOZ_ASSERT(
+@@ -446,6 +461,9 @@
+
+ void nsRetrievalContextWayland::RegisterNewDataOffer(
+ zwp_primary_selection_offer_v1* aPrimaryDataOffer) {
++ LOGCLIP(("nsRetrievalContextWayland::RegisterNewDataOffer (primary ZWP) %p\n",
++ aPrimaryDataOffer));
++
+ DataOffer* dataOffer = static_cast<DataOffer*>(
+ g_hash_table_lookup(mActiveOffers, aPrimaryDataOffer));
+ MOZ_ASSERT(
+@@ -460,6 +478,10 @@
+
+ void nsRetrievalContextWayland::SetClipboardDataOffer(
+ wl_data_offer* aWaylandDataOffer) {
++ LOGCLIP(
++ ("nsRetrievalContextWayland::SetClipboardDataOffer (wl_data_offer) %p\n",
++ aWaylandDataOffer));
++
+ // Delete existing clipboard data offer
+ mClipboardOffer = nullptr;
+
+@@ -468,7 +490,11 @@
+ if (aWaylandDataOffer != nullptr) {
+ DataOffer* dataOffer = static_cast<DataOffer*>(
+ g_hash_table_lookup(mActiveOffers, aWaylandDataOffer));
+- NS_ASSERTION(dataOffer, "We're missing stored clipboard data offer!");
++#ifdef MOZ_LOGGING
++ if (!dataOffer) {
++ LOGCLIP((" We're missing stored clipboard data offer!\n"));
++ }
++#endif
+ if (dataOffer) {
+ g_hash_table_remove(mActiveOffers, aWaylandDataOffer);
+ mClipboardOffer = WrapUnique(dataOffer);
+@@ -478,6 +504,9 @@
+
+ void nsRetrievalContextWayland::SetPrimaryDataOffer(
+ gtk_primary_selection_offer* aPrimaryDataOffer) {
++ LOGCLIP(("nsRetrievalContextWayland::SetPrimaryDataOffer (primary) %p\n",
++ aPrimaryDataOffer));
++
+ // Release any primary offer we have.
+ mPrimaryOffer = nullptr;
+
+@@ -486,7 +515,11 @@
+ if (aPrimaryDataOffer) {
+ DataOffer* dataOffer = static_cast<DataOffer*>(
+ g_hash_table_lookup(mActiveOffers, aPrimaryDataOffer));
+- NS_ASSERTION(dataOffer, "We're missing primary data offer!");
++#ifdef MOZ_LOGGING
++ if (!dataOffer) {
++ LOGCLIP((" We're missing stored primary data offer!\n"));
++ }
++#endif
+ if (dataOffer) {
+ g_hash_table_remove(mActiveOffers, aPrimaryDataOffer);
+ mPrimaryOffer = WrapUnique(dataOffer);
+@@ -496,6 +529,9 @@
+
+ void nsRetrievalContextWayland::SetPrimaryDataOffer(
+ zwp_primary_selection_offer_v1* aPrimaryDataOffer) {
++ LOGCLIP(("nsRetrievalContextWayland::SetPrimaryDataOffer (primary ZWP)%p\n",
++ aPrimaryDataOffer));
++
+ // Release any primary offer we have.
+ mPrimaryOffer = nullptr;
+
+@@ -504,7 +540,11 @@
+ if (aPrimaryDataOffer) {
+ DataOffer* dataOffer = static_cast<DataOffer*>(
+ g_hash_table_lookup(mActiveOffers, aPrimaryDataOffer));
+- NS_ASSERTION(dataOffer, "We're missing primary data offer!");
++#ifdef MOZ_LOGGING
++ if (!dataOffer) {
++ LOGCLIP((" We're missing stored primary data offer!\n"));
++ }
++#endif
+ if (dataOffer) {
+ g_hash_table_remove(mActiveOffers, aPrimaryDataOffer);
+ mPrimaryOffer = WrapUnique(dataOffer);
+@@ -514,12 +554,19 @@
+
+ void nsRetrievalContextWayland::AddDragAndDropDataOffer(
+ wl_data_offer* aDropDataOffer) {
++ LOGCLIP(("nsRetrievalContextWayland::AddDragAndDropDataOffer %p\n",
++ aDropDataOffer));
++
+ // Remove any existing D&D contexts.
+ mDragContext = nullptr;
+
+ WaylandDataOffer* dataOffer = static_cast<WaylandDataOffer*>(
+ g_hash_table_lookup(mActiveOffers, aDropDataOffer));
+- NS_ASSERTION(dataOffer, "We're missing drag and drop data offer!");
++#ifdef MOZ_LOGGING
++ if (!dataOffer) {
++ LOGCLIP((" We're missing stored Drag & Drop data offer!\n"));
++ }
++#endif
+ if (dataOffer) {
+ g_hash_table_remove(mActiveOffers, aDropDataOffer);
+ mDragContext = new nsWaylandDragContext(dataOffer, mDisplay->GetDisplay());
+@@ -531,6 +578,7 @@
+ }
+
+ void nsRetrievalContextWayland::ClearDragAndDropDataOffer(void) {
++ LOGCLIP(("nsRetrievalContextWayland::ClearDragAndDropDataOffer()\n"));
+ mDragContext = nullptr;
+ }
+
+@@ -539,7 +587,7 @@
+ static void data_device_data_offer(void* data,
+ struct wl_data_device* data_device,
+ struct wl_data_offer* offer) {
+- LOGCLIP(("data_device_data_offer() callback\n"));
++ LOGCLIP(("data_device_data_offer(), wl_data_offer %p\n", offer));
+ nsRetrievalContextWayland* context =
+ static_cast<nsRetrievalContextWayland*>(data);
+ context->RegisterNewDataOffer(offer);
+@@ -549,7 +597,7 @@
+ static void data_device_selection(void* data,
+ struct wl_data_device* wl_data_device,
+ struct wl_data_offer* offer) {
+- LOGCLIP(("data_device_selection() callback\n"));
++ LOGCLIP(("data_device_selection(), set wl_data_offer %p\n", offer));
+ nsRetrievalContextWayland* context =
+ static_cast<nsRetrievalContextWayland*>(data);
+ context->SetClipboardDataOffer(offer);
+@@ -650,7 +698,7 @@
+ static void primary_selection_data_offer(
+ void* data, struct gtk_primary_selection_device* primary_selection_device,
+ struct gtk_primary_selection_offer* primary_offer) {
+- LOGCLIP(("primary_selection_data_offer() callback\n"));
++ LOGCLIP(("primary_selection_data_offer()\n"));
+ // create and add listener
+ nsRetrievalContextWayland* context =
+ static_cast<nsRetrievalContextWayland*>(data);
+@@ -661,7 +709,7 @@
+ void* data,
+ struct zwp_primary_selection_device_v1* primary_selection_device,
+ struct zwp_primary_selection_offer_v1* primary_offer) {
+- LOGCLIP(("primary_selection_data_offer() callback\n"));
++ LOGCLIP(("primary_selection_data_offer()\n"));
+ // create and add listener
+ nsRetrievalContextWayland* context =
+ static_cast<nsRetrievalContextWayland*>(data);
+@@ -671,7 +719,7 @@
+ static void primary_selection_selection(
+ void* data, struct gtk_primary_selection_device* primary_selection_device,
+ struct gtk_primary_selection_offer* primary_offer) {
+- LOGCLIP(("primary_selection_selection() callback\n"));
++ LOGCLIP(("primary_selection_selection()\n"));
+ nsRetrievalContextWayland* context =
+ static_cast<nsRetrievalContextWayland*>(data);
+ context->SetPrimaryDataOffer(primary_offer);
+@@ -681,7 +729,7 @@
+ void* data,
+ struct zwp_primary_selection_device_v1* primary_selection_device,
+ struct zwp_primary_selection_offer_v1* primary_offer) {
+- LOGCLIP(("primary_selection_selection() callback\n"));
++ LOGCLIP(("primary_selection_selection()\n"));
+ nsRetrievalContextWayland* context =
+ static_cast<nsRetrievalContextWayland*>(data);
+ context->SetPrimaryDataOffer(primary_offer);
+@@ -803,17 +851,26 @@
+
+ void nsRetrievalContextWayland::TransferFastTrackClipboard(
+ int aClipboardRequestNumber, GtkSelectionData* aSelectionData) {
++ LOGCLIP(("nsRetrievalContextWayland::TransferFastTrackClipboard()\n"));
++
+ if (mClipboardRequestNumber == aClipboardRequestNumber) {
++ LOGCLIP((" request number matches\n"));
+ int dataLength = gtk_selection_data_get_length(aSelectionData);
+- if (dataLength > 0) {
+- mClipboardDataLength = dataLength;
+- mClipboardData = reinterpret_cast<char*>(
+- g_malloc(sizeof(char) * (mClipboardDataLength + 1)));
+- memcpy(mClipboardData, gtk_selection_data_get_data(aSelectionData),
+- sizeof(char) * mClipboardDataLength);
+- mClipboardData[mClipboardDataLength] = '\0';
++ if (!dataLength) {
++ LOGCLIP(
++ (" gtk_selection_data_get_length() returned 0 data length!\n"));
++ return;
+ }
++ LOGCLIP((" fastracking %d bytes of data.\n", dataLength));
++ mClipboardDataLength = dataLength;
++ mClipboardData = reinterpret_cast<char*>(
++ g_malloc(sizeof(char) * (mClipboardDataLength + 1)));
++ memcpy(mClipboardData, gtk_selection_data_get_data(aSelectionData),
++ sizeof(char) * mClipboardDataLength);
++ mClipboardData[mClipboardDataLength] = '\0';
++ LOGCLIP((" done, mClipboardData = %p\n", mClipboardData));
+ } else {
++ LOGCLIP((" request number does not match!\n"));
+ NS_WARNING("Received obsoleted clipboard data!");
+ }
+ }
+@@ -833,25 +890,29 @@
+ */
+ GdkAtom selection = GetSelectionAtom(aWhichClipboard);
+ if (gdk_selection_owner_get(selection)) {
+- LOGCLIP((" Internal clipboard content\n"));
++ LOGCLIP((" Asking for internal clipboard content.\n"));
+ mClipboardRequestNumber++;
+ gtk_clipboard_request_contents(
+ gtk_clipboard_get(selection), gdk_atom_intern(aMimeType, FALSE),
+ wayland_clipboard_contents_received,
+ new FastTrackClipboard(mClipboardRequestNumber, this));
+ } else {
+- LOGCLIP((" Remote clipboard content\n"));
++ LOGCLIP((" Asking for remote clipboard content.\n"));
+ const auto& dataOffer =
+ (selection == GDK_SELECTION_PRIMARY) ? mPrimaryOffer : mClipboardOffer;
+ if (!dataOffer) {
+ // Something went wrong. We're requested to provide clipboard data
+ // but we haven't got any from wayland.
+- NS_WARNING("Requested data without valid DataOffer!");
++ LOGCLIP((" We're missing dataOffer! mClipboardData = null\n"));
+ mClipboardData = nullptr;
+ mClipboardDataLength = 0;
+ } else {
++ LOGCLIP(
++ (" Getting clipboard data from compositor, MIME %s\n", aMimeType));
+ mClipboardData = dataOffer->GetData(mDisplay->GetDisplay(), aMimeType,
+ &mClipboardDataLength);
++ LOGCLIP((" Got %d bytes of data, mClipboardData = %p\n",
++ mClipboardDataLength, mClipboardData));
+ }
+ }
+
+@@ -861,25 +922,36 @@
+
+ const char* nsRetrievalContextWayland::GetClipboardText(
+ int32_t aWhichClipboard) {
+- LOGCLIP(("nsRetrievalContextWayland::GetClipboardText [%p]\n", this));
++ GdkAtom selection = GetSelectionAtom(aWhichClipboard);
+
+- GdkAtom selection = GetSelectionAtom(aWhichClipboard);
++ LOGCLIP(("nsRetrievalContextWayland::GetClipboardText [%p], clipboard %s\n",
++ this,
++ (selection == GDK_SELECTION_PRIMARY) ? "Primary" : "Selection"));
++
+ const auto& dataOffer =
+ (selection == GDK_SELECTION_PRIMARY) ? mPrimaryOffer : mClipboardOffer;
+- if (!dataOffer) return nullptr;
++ if (!dataOffer) {
++ LOGCLIP((" We're missing data offer!\n"));
++ return nullptr;
++ }
+
+ for (unsigned int i = 0; i < TEXT_MIME_TYPES_NUM; i++) {
+ if (dataOffer->HasTarget(sTextMimeTypes[i])) {
++ LOGCLIP((" We have %s MIME type in clipboard, ask for it.\n",
++ sTextMimeTypes[i]));
+ uint32_t unused;
+ return GetClipboardData(sTextMimeTypes[i], aWhichClipboard, &unused);
+ }
+ }
++
++ LOGCLIP((" There isn't text MIME type in clipboard!\n"));
+ return nullptr;
+ }
+
+ void nsRetrievalContextWayland::ReleaseClipboardData(
+ const char* aClipboardData) {
+- LOGCLIP(("nsRetrievalContextWayland::ReleaseClipboardData [%p]\n", this));
++ LOGCLIP(("nsRetrievalContextWayland::ReleaseClipboardData [%p]\n",
++ aClipboardData));
+
+ NS_ASSERTION(aClipboardData == mClipboardData,
+ "Releasing unknown clipboard data!");
+
diff --git a/mozilla-1631061-2.patch b/mozilla-1631061-2.patch
new file mode 100644
index 0000000..ae90baa
--- /dev/null
+++ b/mozilla-1631061-2.patch
@@ -0,0 +1,91 @@
+changeset: 567293:4d5e5e9f146e
+tag: tip
+parent: 567291:3bdf0c33844f
+user: stransky <stransky(a)redhat.com>
+date: Fri Jan 29 12:13:15 2021 +0100
+files: widget/gtk/nsClipboardWayland.cpp
+description:
+Bug 1631061 [Wayland] Clear clipboard content when gtk_clipboard_request_contents() fails, r?jhorak
+
+Differential Revision: https://phabricator.services.mozilla.com/D103461
+
+
+diff --git a/widget/gtk/nsClipboardWayland.cpp b/widget/gtk/nsClipboardWayland.cpp
+--- a/widget/gtk/nsClipboardWayland.cpp
++++ b/widget/gtk/nsClipboardWayland.cpp
+@@ -842,7 +842,8 @@ struct FastTrackClipboard {
+
+ static void wayland_clipboard_contents_received(
+ GtkClipboard* clipboard, GtkSelectionData* selection_data, gpointer data) {
+- LOGCLIP(("wayland_clipboard_contents_received() callback\n"));
++ LOGCLIP(("wayland_clipboard_contents_received() selection_data = %p\n",
++ selection_data));
+ FastTrackClipboard* fastTrack = static_cast<FastTrackClipboard*>(data);
+ fastTrack->mRetrievalContex->TransferFastTrackClipboard(
+ fastTrack->mClipboardRequestNumber, selection_data);
+@@ -851,24 +852,34 @@ static void wayland_clipboard_contents_r
+
+ void nsRetrievalContextWayland::TransferFastTrackClipboard(
+ int aClipboardRequestNumber, GtkSelectionData* aSelectionData) {
+- LOGCLIP(("nsRetrievalContextWayland::TransferFastTrackClipboard()\n"));
++ LOGCLIP(
++ ("nsRetrievalContextWayland::TransferFastTrackClipboard(), "
++ "aSelectionData = %p\n",
++ aSelectionData));
++
++ int dataLength = gtk_selection_data_get_length(aSelectionData);
++ if (dataLength < 0) {
++ LOGCLIP(
++ (" gtk_clipboard_request_contents() failed to get clipboard "
++ "data!\n"));
++ ReleaseClipboardData(mClipboardData);
++ return;
++ }
+
+ if (mClipboardRequestNumber == aClipboardRequestNumber) {
+ LOGCLIP((" request number matches\n"));
+- int dataLength = gtk_selection_data_get_length(aSelectionData);
+- if (!dataLength) {
+- LOGCLIP(
+- (" gtk_selection_data_get_length() returned 0 data length!\n"));
+- return;
+- }
+ LOGCLIP((" fastracking %d bytes of data.\n", dataLength));
+ mClipboardDataLength = dataLength;
+- mClipboardData = reinterpret_cast<char*>(
+- g_malloc(sizeof(char) * (mClipboardDataLength + 1)));
+- memcpy(mClipboardData, gtk_selection_data_get_data(aSelectionData),
+- sizeof(char) * mClipboardDataLength);
+- mClipboardData[mClipboardDataLength] = '\0';
+- LOGCLIP((" done, mClipboardData = %p\n", mClipboardData));
++ if (dataLength > 0) {
++ mClipboardData = reinterpret_cast<char*>(
++ g_malloc(sizeof(char) * (mClipboardDataLength + 1)));
++ memcpy(mClipboardData, gtk_selection_data_get_data(aSelectionData),
++ sizeof(char) * mClipboardDataLength);
++ mClipboardData[mClipboardDataLength] = '\0';
++ LOGCLIP((" done, mClipboardData = %p\n", mClipboardData));
++ } else {
++ ReleaseClipboardData(mClipboardData);
++ }
+ } else {
+ LOGCLIP((" request number does not match!\n"));
+ NS_WARNING("Received obsoleted clipboard data!");
+@@ -952,11 +963,10 @@ void nsRetrievalContextWayland::ReleaseC
+ const char* aClipboardData) {
+ LOGCLIP(("nsRetrievalContextWayland::ReleaseClipboardData [%p]\n",
+ aClipboardData));
+-
+- NS_ASSERTION(aClipboardData == mClipboardData,
+- "Releasing unknown clipboard data!");
+- g_free((void*)aClipboardData);
+-
++ if (aClipboardData != mClipboardData) {
++ NS_WARNING("Wayland clipboard: Releasing unknown clipboard data!");
++ }
++ g_free((void*)mClipboardData);
++ mClipboardDataLength = 0;
+ mClipboardData = nullptr;
+- mClipboardDataLength = 0;
+ }
+
2 years, 10 months
[Report] Packages Restricting Arches
by root
New package excluding arches (3)
============================
- dotnet5.0
ExclusiveArch: aarch64 x86_64
ExclusiveArch: x86_64
- dotnet5.0-build-reference-packages
ExclusiveArch: aarch64 x86_64
ExclusiveArch: x86_64
- efifs
ExclusiveArch: %{efi}
List of packages currently excluding arches (1876)
===========================================
- 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}
- OpenImageIO
ExclusiveArch: x86_64 ppc64le
- 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
- anet
ExclusiveArch: %{GPRbuild_arches}
- anki
ExclusiveArch: %{qt5_qtwebengine_arches} noarch
- apmd
ExclusiveArch: %{ix86}
- appstream-generator
ExclusiveArch: x86_64 %{ix86} %{arm}
- arduino
ExclusiveArch: %{go_arches}
- arduino-builder
ExclusiveArch: %{go_arches}
- arm-trusted-firmware
ExclusiveArch: aarch64
- aunit
ExclusiveArch: %GPRbuild_arches
- avgtime
ExclusiveArch: %{ldc_arches}
- aws
ExclusiveArch: %GPRbuild_arches
- banshee-community-extensions
ExclusiveArch: %ix86 x86_64 ppc ppc64 ia64 %{arm} sparcv9 alpha s390x
- bareftp
ExclusiveArch: %{mono_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
- bless
ExclusiveArch: %mono_arches
- boo
ExclusiveArch: %{mono_arches}
- bpftrace
ExclusiveArch: x86_64 %{power64} aarch64 s390x
- calamares
ExclusiveArch: %{ix86} x86_64
- 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 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
- cpuid
ExclusiveArch: %{ix86} x86_64
- cqrlog
ExclusiveArch: %{fpc_arches}
- crash
ExclusiveArch: %{ix86} ia64 x86_64 ppc ppc64 s390 s390x %{arm} aarch64 ppc64le
- 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
- 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
- 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
- doublecmd
ExclusiveArch: %{ix86} x86_64
- dpdk
ExclusiveArch: x86_64 i686 aarch64 ppc64le
- dssi-vst
ExclusiveArch: %{ix86} x86_64
- dyninst
ExclusiveArch: %{ix86} x86_64 ppc64le aarch64
- e3
ExclusiveArch: %{ix86} x86_64
- edac-utils
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 %{power64}
- edk2
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
ExclusiveArch: x86_64 aarch64
- efibootmgr
ExclusiveArch: %{efi}
- efifs
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
- embree
ExclusiveArch: x86_64
- enki
ExclusiveArch: %{qt5_qtwebengine_arches} noarch
- envytools
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
- eric
ExclusiveArch: %{qt5_qtwebengine_arches} noarch
- extlinux-bootloader
ExclusiveArch: %{arm} aarch64
- fcitx-libpinyin
ExclusiveArch: %{qt5_qtwebengine_arches}
- fedora-dockerfiles
ExclusiveArch: %{go_arches}
- fes
ExclusiveArch: %{ix86} x86_64
- flannel
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le s390x
- florist
ExclusiveArch: %{GPRbuild_arches}
- 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}
- ga
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le
- gbrainy
ExclusiveArch: %mono_arches
- gdata-sharp
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}}
- 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-guitar
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
- 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-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
- ipw2100-firmware
ExclusiveArch: noarch i386 x86_64
- ipw2200-firmware
ExclusiveArch: noarch i386 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}
- keepass
ExclusiveArch: %{mono_arches}
- kernel
ExclusiveArch: 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-kmailtransport
ExclusiveArch: x86_64 %{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}
- 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
- libguestfs
ExclusiveArch: %{kernel_arches}
- libica
ExclusiveArch: s390 s390x
- libipt
ExclusiveArch: %{ix86} x86_64
ExclusiveArch: %{ix86} x86_64
- libnxz
ExclusiveArch: ppc64le
- libocxl
ExclusiveArch: ppc64le
- libpmemobj-cpp
ExclusiveArch: x86_64
- 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
- libzfcphbaapi
ExclusiveArch: s390 s390x
- lightdm
ExclusiveArch: x86_64 ppc64le
- log4net
ExclusiveArch: %mono_arches
- lrmi
ExclusiveArch: %{ix86}
- lsvpd
ExclusiveArch: %{power64}
- luajit
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64 s390x ppc64le
- luxcorerender
ExclusiveArch: x86_64
- mactel-boot
ExclusiveArch: x86_64
- manifest-tool
ExclusiveArch: x86_64 aarch64 ppc64le s390x
- mantle
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
- 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
- mediaconch
ExclusiveArch: %{qt5_qtwebengine_arches}
- megapixels
ExclusiveArch: aarch64 armv7hl
- 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-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
- 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
- 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}
- nim
ExclusiveArch: %{nim_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-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-shelljs
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}
- 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-kvm-hook
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
- 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-netutils
ExclusiveArch: %{ix86} %{arm}
- olpc-utils
ExclusiveArch: %{ix86} %{arm}
- onednn
ExclusiveArch: x86_64 aarch64 ppc64le
- onedrive
ExclusiveArch: %{ldc_arches}
- opae
ExclusiveArch: x86_64
- opal-prd
ExclusiveArch: ppc64le
- open-vm-tools
ExclusiveArch: x86_64
ExclusiveArch: %{ix86} x86_64
- 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
- paflib
ExclusiveArch: ppc %{power64}
- parsec
ExclusiveArch: %{rust_arches}
- parsec-tool
ExclusiveArch: %{rust_arches}
- pcc
ExclusiveArch: %{ix86} x86_64
- pcmciautils
ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 %{arm}
- 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
- pmdk-convert
ExclusiveArch: x86_64
- pmemkv
ExclusiveArch: x86_64
- 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}
- psi-plus
ExclusiveArch: %{qt5_qtwebengine_arches}
- pveclib
ExclusiveArch: ppc %{power64}
- pvs-sbcl
ExclusiveArch: %{ix86} x86_64 ppc sparcv9
- pyqtwebengine
ExclusiveArch: %{qt5_qtwebengine_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-rpi-gpio
ExclusiveArch: %{arm} aarch64
- python-setuptools-rust
ExclusiveArch: %{rust_arches}
- q4wine
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
- 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}
ExclusiveArch: x86_64 %{ix86}
- quentier
ExclusiveArch: %{qt5_qtwebengine_arches}
- rear
ExclusiveArch: %ix86 x86_64 ppc ppc64 ppc64le ia64
- redhat-lsb
ExclusiveArch: %{ix86} ia64 x86_64 ppc ppc64 s390 s390x %{arm} aarch64 ppc64le
- reg
ExclusiveArch: x86_64
- renderdoc
ExclusiveArch: x86_64
- reptyr
ExclusiveArch: %{ix86} x86_64 %{arm}
- rescene
ExclusiveArch: %{mono_arches}
- restsharp
ExclusiveArch: %{mono_arches}
- rhythmbox-alternative-toolbar
ExclusiveArch: %{ix86} %{arm} x86_64 ppc64 ppc64le
- rmd
ExclusiveArch: %{ix86} x86_64
- rocm-runtime
ExclusiveArch: x86_64 aarch64
- rocminfo
ExclusiveArch: x86_64 aarch64
- rpm-ostree
ExclusiveArch: %{rust_arches}
- rr
ExclusiveArch: %{ix86} x86_64
- 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-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-files
ExclusiveArch: %{rust_arches}
- rust-actix-http
ExclusiveArch: %{rust_arches}
- rust-actix-macros
ExclusiveArch: %{rust_arches}
- rust-actix-router
ExclusiveArch: %{rust_arches}
- rust-actix-rt
ExclusiveArch: %{rust_arches}
- rust-actix-server
ExclusiveArch: %{rust_arches}
- rust-actix-server-config
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-actix_derive
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-aes-soft
ExclusiveArch: %{rust_arches}
- rust-afterburn
ExclusiveArch: %{rust_arches}
- rust-ahash
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-alloc-no-stdlib
ExclusiveArch: %{rust_arches}
- rust-alloc-stdlib
ExclusiveArch: %{rust_arches}
- rust-alphanumeric-sort
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-anymap
ExclusiveArch: %{rust_arches}
- rust-aom-sys
ExclusiveArch: %{rust_arches}
- rust-app_dirs
ExclusiveArch: %{rust_arches}
- rust-approx
ExclusiveArch: %{rust_arches}
- rust-arbitrary
ExclusiveArch: %{rust_arches}
- rust-arc-swap
ExclusiveArch: %{rust_arches}
- rust-arg_enum_proc_macro
ExclusiveArch: %{rust_arches}
- rust-argparse
ExclusiveArch: %{rust_arches}
- rust-array-init
ExclusiveArch: %{rust_arches}
- rust-arraydeque
ExclusiveArch: %{rust_arches}
- rust-arrayref
ExclusiveArch: %{rust_arches}
- rust-arrayvec
ExclusiveArch: %{rust_arches}
- rust-article_scraper
ExclusiveArch: %{rust_arches}
- rust-ascii
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-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-compression
ExclusiveArch: %{rust_arches}
- rust-async-io
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-atomicwrites
ExclusiveArch: %{rust_arches}
- rust-attohttpc
ExclusiveArch: %{rust_arches}
- rust-atty
ExclusiveArch: %{rust_arches}
- rust-autocfg
ExclusiveArch: %{rust_arches}
- rust-av-metrics
ExclusiveArch: %{rust_arches}
- rust-average
ExclusiveArch: %{rust_arches}
- rust-awc
ExclusiveArch: %{rust_arches}
- rust-backtrace
ExclusiveArch: %{rust_arches}
- rust-backtrace-sys
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-bat
ExclusiveArch: %{rust_arches}
- rust-battery
ExclusiveArch: %{rust_arches}
- rust-bencher
ExclusiveArch: %{rust_arches}
- rust-better-panic
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-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-buffer0.7
ExclusiveArch: %{rust_arches}
- rust-block-cipher
ExclusiveArch: %{rust_arches}
- rust-block-modes
ExclusiveArch: %{rust_arches}
- rust-block-padding
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-brev
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-buf-min
ExclusiveArch: %{rust_arches}
- rust-buf_redux
ExclusiveArch: %{rust_arches}
- rust-bufsize
ExclusiveArch: %{rust_arches}
- rust-bufstream
ExclusiveArch: %{rust_arches}
- rust-build_const
ExclusiveArch: %{rust_arches}
- rust-bumpalo
ExclusiveArch: %{rust_arches}
- rust-byte-tools
ExclusiveArch: %{rust_arches}
- rust-byte-unit
ExclusiveArch: %{rust_arches}
- rust-byte-unit3
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.3
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-c_vec
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-caps
ExclusiveArch: %{rust_arches}
- rust-cargo
ExclusiveArch: %{rust_arches}
- rust-cargo-bloat
ExclusiveArch: %{rust_arches}
- rust-cargo-c
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_metadata
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-if
ExclusiveArch: %{rust_arches}
- rust-cfg-if0.1
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-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-sys
ExclusiveArch: %{rust_arches}
- rust-clap
ExclusiveArch: %{rust_arches}
- rust-clap2
ExclusiveArch: %{rust_arches}
- rust-clap_derive
ExclusiveArch: %{rust_arches}
- rust-clicolors-control
ExclusiveArch: %{rust_arches}
- rust-cmake
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-compiletest_rs
ExclusiveArch: %{rust_arches}
- rust-comrak
ExclusiveArch: %{rust_arches}
- rust-concurrent-queue
ExclusiveArch: %{rust_arches}
- rust-config
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-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-content_inspector
ExclusiveArch: %{rust_arches}
- rust-conv
ExclusiveArch: %{rust_arches}
- rust-cookie
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-coreos-installer
ExclusiveArch: %{rust_arches}
- rust-cpio
ExclusiveArch: %{rust_arches}
- rust-cpp_demangle
ExclusiveArch: %{rust_arches}
- rust-cpuid-bool
ExclusiveArch: %{rust_arches}
- rust-cpython
ExclusiveArch: %{rust_arches}
- rust-crates-io
ExclusiveArch: %{rust_arches}
- rust-crc
ExclusiveArch: %{rust_arches}
- rust-crc-any
ExclusiveArch: %{rust_arches}
- rust-crc-core
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-crosstermion
ExclusiveArch: %{rust_arches}
- rust-crypto-hash
ExclusiveArch: %{rust_arches}
- rust-crypto-mac
ExclusiveArch: %{rust_arches}
- rust-crypto-mac0.8
ExclusiveArch: %{rust_arches}
- rust-cryptovec
ExclusiveArch: %{rust_arches}
- rust-cssparser
ExclusiveArch: %{rust_arches}
- rust-cssparser-macros
ExclusiveArch: %{rust_arches}
- rust-csv
ExclusiveArch: %{rust_arches}
- rust-csv-core
ExclusiveArch: %{rust_arches}
- rust-ctor
ExclusiveArch: %{rust_arches}
- rust-ctr
ExclusiveArch: %{rust_arches}
- rust-ctrlc
ExclusiveArch: %{rust_arches}
- rust-curl
ExclusiveArch: %{rust_arches}
- rust-curl-sys
ExclusiveArch: %{rust_arches}
- rust-custom_derive
ExclusiveArch: %{rust_arches}
- rust-darling
ExclusiveArch: %{rust_arches}
- rust-darling_core
ExclusiveArch: %{rust_arches}
- rust-darling_macro
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-dbus0.2
ExclusiveArch: %{rust_arches}
- rust-dbus0.6
ExclusiveArch: %{rust_arches}
- rust-dbus0.8
ExclusiveArch: %{rust_arches}
- rust-debug-helper
ExclusiveArch: %{rust_arches}
- rust-decimal
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_arbitrary
ExclusiveArch: %{rust_arches}
- rust-derive_builder
ExclusiveArch: %{rust_arches}
- rust-derive_builder_core
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-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-digest
ExclusiveArch: %{rust_arches}
- rust-digest0.8
ExclusiveArch: %{rust_arches}
- rust-directories
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-diskonaut
ExclusiveArch: %{rust_arches}
- rust-dissimilar
ExclusiveArch: %{rust_arches}
- rust-dlib
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-rs
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-easy-parallel
ExclusiveArch: %{rust_arches}
- rust-edit-distance
ExclusiveArch: %{rust_arches}
- rust-either
ExclusiveArch: %{rust_arches}
- rust-elasticlunr-rs
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-entities
ExclusiveArch: %{rust_arches}
- rust-enum-as-inner
ExclusiveArch: %{rust_arches}
- rust-enum_primitive
ExclusiveArch: %{rust_arches}
- rust-enumflags2
ExclusiveArch: %{rust_arches}
- rust-enumflags2_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-environment
ExclusiveArch: %{rust_arches}
- rust-envsubst
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-exa
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-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-fake_clock
ExclusiveArch: %{rust_arches}
- rust-fallible-iterator
ExclusiveArch: %{rust_arches}
- rust-fastrand
ExclusiveArch: %{rust_arches}
- rust-fbthrift_codegen_includer_proc_macro
ExclusiveArch: %{rust_arches}
- rust-fd-find
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-fern
ExclusiveArch: %{rust_arches}
- rust-fever_api
ExclusiveArch: %{rust_arches}
- rust-ffsend
ExclusiveArch: %{rust_arches}
- rust-ffsend-api
ExclusiveArch: %{rust_arches}
- rust-filesize
ExclusiveArch: %{rust_arches}
- rust-filetime
ExclusiveArch: %{rust_arches}
- rust-findshlibs
ExclusiveArch: %{rust_arches}
- rust-fixedbitset
ExclusiveArch: %{rust_arches}
- rust-flame
ExclusiveArch: %{rust_arches}
- rust-flate2
ExclusiveArch: %{rust_arches}
- rust-float-cmp
ExclusiveArch: %{rust_arches}
- rust-float-cmp0.6
ExclusiveArch: %{rust_arches}
- rust-float-ord
ExclusiveArch: %{rust_arches}
- rust-flume
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-fs2
ExclusiveArch: %{rust_arches}
- rust-fs_extra
ExclusiveArch: %{rust_arches}
- rust-funty
ExclusiveArch: %{rust_arches}
- rust-fuse
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-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-gcsf
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-generic-array
ExclusiveArch: %{rust_arches}
- rust-generic-array0.12
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-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-gif0.10
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-git2
ExclusiveArch: %{rust_arches}
- rust-git2-curl
ExclusiveArch: %{rust_arches}
- rust-gitui
ExclusiveArch: %{rust_arches}
- rust-gl_generator
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-google-drive3-fork
ExclusiveArch: %{rust_arches}
- rust-gptman
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-gspell
ExclusiveArch: %{rust_arches}
- rust-gspell-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-macros
ExclusiveArch: %{rust_arches}
- rust-gtk-rs-lgpl-docs
ExclusiveArch: %{rust_arches}
- rust-gtk-source-sys
ExclusiveArch: %{rust_arches}
- rust-gtk-sys
ExclusiveArch: %{rust_arches}
- rust-gzip-header
ExclusiveArch: %{rust_arches}
- rust-h2
ExclusiveArch: %{rust_arches}
- rust-half
ExclusiveArch: %{rust_arches}
- rust-hamcrest
ExclusiveArch: %{rust_arches}
- rust-handlebars
ExclusiveArch: %{rust_arches}
- rust-hashbrown
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-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-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-html2pango
ExclusiveArch: %{rust_arches}
- rust-html5ever
ExclusiveArch: %{rust_arches}
- rust-http
ExclusiveArch: %{rust_arches}
- rust-http-body
ExclusiveArch: %{rust_arches}
- rust-http0.1
ExclusiveArch: %{rust_arches}
- rust-httparse
ExclusiveArch: %{rust_arches}
- rust-httpdate
ExclusiveArch: %{rust_arches}
- rust-humansize
ExclusiveArch: %{rust_arches}
- rust-humantime
ExclusiveArch: %{rust_arches}
- rust-humantime1
ExclusiveArch: %{rust_arches}
- rust-hyper
ExclusiveArch: %{rust_arches}
- rust-hyper-native-tls
ExclusiveArch: %{rust_arches}
- rust-hyper-staticfile
ExclusiveArch: %{rust_arches}
- rust-hyper-tls
ExclusiveArch: %{rust_arches}
- rust-hyper0.10
ExclusiveArch: %{rust_arches}
- rust-hyperfine
ExclusiveArch: %{rust_arches}
- rust-i3ipc
ExclusiveArch: %{rust_arches}
- rust-id_tree
ExclusiveArch: %{rust_arches}
- rust-ident_case
ExclusiveArch: %{rust_arches}
- rust-idna
ExclusiveArch: %{rust_arches}
- rust-idna0.1
ExclusiveArch: %{rust_arches}
- rust-ignore
ExclusiveArch: %{rust_arches}
- rust-im-rc
ExclusiveArch: %{rust_arches}
- rust-image
ExclusiveArch: %{rust_arches}
- rust-imgref
ExclusiveArch: %{rust_arches}
- rust-indexmap
ExclusiveArch: %{rust_arches}
- rust-indicatif
ExclusiveArch: %{rust_arches}
- rust-indoc
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-invalidstring
ExclusiveArch: %{rust_arches}
- rust-inventory
ExclusiveArch: %{rust_arches}
- rust-inventory-impl
ExclusiveArch: %{rust_arches}
- rust-iocuddle
ExclusiveArch: %{rust_arches}
- rust-iovec
ExclusiveArch: %{rust_arches}
- rust-ipnet
ExclusiveArch: %{rust_arches}
- rust-ipnetwork
ExclusiveArch: %{rust_arches}
- rust-iron
ExclusiveArch: %{rust_arches}
- rust-isahc
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-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-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-jwalk
ExclusiveArch: %{rust_arches}
- rust-keccak
ExclusiveArch: %{rust_arches}
- rust-khronos_api
ExclusiveArch: %{rust_arches}
- rust-kstring
ExclusiveArch: %{rust_arches}
- rust-kv-log-macro
ExclusiveArch: %{rust_arches}
- rust-lab
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-letter-avatar
ExclusiveArch: %{rust_arches}
- rust-lexical-core
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-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-libm
ExclusiveArch: %{rust_arches}
- rust-libmount
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-libudev
ExclusiveArch: %{rust_arches}
- rust-libudev-sys
ExclusiveArch: %{rust_arches}
- rust-libxml
ExclusiveArch: %{rust_arches}
- rust-libz-sys
ExclusiveArch: %{rust_arches}
- rust-line-wrap
ExclusiveArch: %{rust_arches}
- rust-line_drawing
ExclusiveArch: %{rust_arches}
- rust-linked-hash-map
ExclusiveArch: %{rust_arches}
- rust-linkify
ExclusiveArch: %{rust_arches}
- rust-lipsum
ExclusiveArch: %{rust_arches}
- rust-liquid
ExclusiveArch: %{rust_arches}
- rust-liquid-core
ExclusiveArch: %{rust_arches}
- rust-liquid-derive
ExclusiveArch: %{rust_arches}
- rust-liquid-lib
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-lru_time_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-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-matrixmultiply
ExclusiveArch: %{rust_arches}
- rust-maxminddb
ExclusiveArch: %{rust_arches}
- rust-maybe-uninit
ExclusiveArch: %{rust_arches}
- rust-mbox
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-memoffset
ExclusiveArch: %{rust_arches}
- rust-memoffset0.5
ExclusiveArch: %{rust_arches}
- rust-metadeps
ExclusiveArch: %{rust_arches}
- rust-migrations_internals
ExclusiveArch: %{rust_arches}
- rust-migrations_macros
ExclusiveArch: %{rust_arches}
- rust-mime
ExclusiveArch: %{rust_arches}
- rust-mime-sniffer
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-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-mockito
ExclusiveArch: %{rust_arches}
- rust-modifier
ExclusiveArch: %{rust_arches}
- rust-more-asserts
ExclusiveArch: %{rust_arches}
- rust-muldiv
ExclusiveArch: %{rust_arches}
- rust-multimap
ExclusiveArch: %{rust_arches}
- rust-multipart
ExclusiveArch: %{rust_arches}
- rust-mustache
ExclusiveArch: %{rust_arches}
- rust-nasm-rs
ExclusiveArch: %{rust_arches}
- rust-native-tls
ExclusiveArch: %{rust_arches}
- rust-natord
ExclusiveArch: %{rust_arches}
- rust-nb-connect
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-new_debug_unreachable
ExclusiveArch: %{rust_arches}
- rust-news-flash
ExclusiveArch: %{rust_arches}
- rust-newtype_derive
ExclusiveArch: %{rust_arches}
- rust-nickel
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-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-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-complex
ExclusiveArch: %{rust_arches}
- rust-num-derive
ExclusiveArch: %{rust_arches}
- rust-num-integer
ExclusiveArch: %{rust_arches}
- rust-num-iter
ExclusiveArch: %{rust_arches}
- rust-num-rational
ExclusiveArch: %{rust_arches}
- rust-num-traits
ExclusiveArch: %{rust_arches}
- rust-num-traits0.1
ExclusiveArch: %{rust_arches}
- rust-num_cpus
ExclusiveArch: %{rust_arches}
- rust-number_prefix
ExclusiveArch: %{rust_arches}
- rust-numtoa
ExclusiveArch: %{rust_arches}
- rust-obfstr
ExclusiveArch: %{rust_arches}
- rust-object
ExclusiveArch: %{rust_arches}
- rust-odds
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-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-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-osmesa-sys
ExclusiveArch: %{rust_arches}
- rust-osstrtools
ExclusiveArch: %{rust_arches}
- rust-ostree
ExclusiveArch: %{rust_arches}
- rust-ostree-sys
ExclusiveArch: %{rust_arches}
- rust-owned-alloc
ExclusiveArch: %{rust_arches}
- rust-owned_ttf_parser
ExclusiveArch: %{rust_arches}
- rust-owning_ref
ExclusiveArch: %{rust_arches}
- rust-packaging
ExclusiveArch: %{rust_arches}
- rust-pad
ExclusiveArch: %{rust_arches}
- rust-pager
ExclusiveArch: %{rust_arches}
- rust-palette
ExclusiveArch: %{rust_arches}
- rust-palette_derive
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-paste
ExclusiveArch: %{rust_arches}
- rust-paste-impl
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-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-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-platform-dirs
ExclusiveArch: %{rust_arches}
- rust-platforms
ExclusiveArch: %{rust_arches}
- rust-plist
ExclusiveArch: %{rust_arches}
- rust-plotters
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-pommes
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-pretty-git-prompt
ExclusiveArch: %{rust_arches}
- rust-pretty-hex
ExclusiveArch: %{rust_arches}
- rust-pretty_assertions
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-error
ExclusiveArch: %{rust_arches}
- rust-proc-macro-error-attr
ExclusiveArch: %{rust_arches}
- rust-proc-macro-hack
ExclusiveArch: %{rust_arches}
- rust-proc-macro-nested
ExclusiveArch: %{rust_arches}
- rust-proc-macro2
ExclusiveArch: %{rust_arches}
- rust-proc-macro2-0.4
ExclusiveArch: %{rust_arches}
- rust-proc-quote-impl
ExclusiveArch: %{rust_arches}
- rust-procedural-masquerade
ExclusiveArch: %{rust_arches}
- rust-process_path
ExclusiveArch: %{rust_arches}
- rust-procfs
ExclusiveArch: %{rust_arches}
- rust-procfs0.8
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-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-psm
ExclusiveArch: %{rust_arches}
- rust-psutil
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-macros
ExclusiveArch: %{rust_arches}
- rust-pyo3-macros-backend
ExclusiveArch: %{rust_arches}
- rust-python3-sys
ExclusiveArch: %{rust_arches}
- rust-qr2term
ExclusiveArch: %{rust_arches}
- rust-qrcode
ExclusiveArch: %{rust_arches}
- rust-quick-error
ExclusiveArch: %{rust_arches}
- rust-quick-error1
ExclusiveArch: %{rust_arches}
- rust-quick-xml
ExclusiveArch: %{rust_arches}
- rust-quickcheck
ExclusiveArch: %{rust_arches}
- rust-quickcheck0.6
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-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_distr0.2
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_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_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-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-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-remove_dir_all
ExclusiveArch: %{rust_arches}
- rust-reqwest
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-rle-decode-fast
ExclusiveArch: %{rust_arches}
- rust-rmp
ExclusiveArch: %{rust_arches}
- rust-rmp-serde
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-rtnetlink
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
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-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-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-rustdoc-stripper
ExclusiveArch: %{rust_arches}
- rust-rustfilt
ExclusiveArch: %{rust_arches}
- rust-rustfix
ExclusiveArch: %{rust_arches}
- rust-rustio
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-safemem
ExclusiveArch: %{rust_arches}
- rust-same-file
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-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-secrecy
ExclusiveArch: %{rust_arches}
- rust-secret-service
ExclusiveArch: %{rust_arches}
- rust-semver
ExclusiveArch: %{rust_arches}
- rust-semver-parser
ExclusiveArch: %{rust_arches}
- rust-semver-parser0.7
ExclusiveArch: %{rust_arches}
- rust-semver-parser0.9
ExclusiveArch: %{rust_arches}
- rust-semver0.10
ExclusiveArch: %{rust_arches}
- rust-semver0.9
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_bytes
ExclusiveArch: %{rust_arches}
- rust-serde_cbor
ExclusiveArch: %{rust_arches}
- rust-serde_derive
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_macros
ExclusiveArch: %{rust_arches}
- rust-serde_yaml
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-sha-1
ExclusiveArch: %{rust_arches}
- rust-sha1
ExclusiveArch: %{rust_arches}
- rust-sha2
ExclusiveArch: %{rust_arches}
- rust-sha3
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-shlex
ExclusiveArch: %{rust_arches}
- rust-signal-hook
ExclusiveArch: %{rust_arches}
- rust-signal-hook-registry
ExclusiveArch: %{rust_arches}
- rust-silver
ExclusiveArch: %{rust_arches}
- rust-simd_helpers
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-slash-formatter
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-smallvec
ExclusiveArch: %{rust_arches}
- rust-smart-default
ExclusiveArch: %{rust_arches}
- rust-smawk
ExclusiveArch: %{rust_arches}
- rust-smithay-client-toolkit
ExclusiveArch: %{rust_arches}
- rust-smithay-clipboard
ExclusiveArch: %{rust_arches}
- rust-snafu
ExclusiveArch: %{rust_arches}
- rust-snafu-derive
ExclusiveArch: %{rust_arches}
- rust-snowflake
ExclusiveArch: %{rust_arches}
- rust-socket2
ExclusiveArch: %{rust_arches}
- rust-soup-sys
ExclusiveArch: %{rust_arches}
- rust-sourceview
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-stb_truetype
ExclusiveArch: %{rust_arches}
- rust-stream-cipher
ExclusiveArch: %{rust_arches}
- rust-streaming-stats
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-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-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-svg_metadata
ExclusiveArch: %{rust_arches}
- rust-sxd-document
ExclusiveArch: %{rust_arches}
- rust-syn
ExclusiveArch: %{rust_arches}
- rust-syn-mid
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-sysinfo
ExclusiveArch: %{rust_arches}
- rust-system-deps
ExclusiveArch: %{rust_arches}
- rust-tabwriter
ExclusiveArch: %{rust_arches}
- rust-take
ExclusiveArch: %{rust_arches}
- rust-take_mut
ExclusiveArch: %{rust_arches}
- rust-tap
ExclusiveArch: %{rust_arches}
- rust-tar
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-tendril
ExclusiveArch: %{rust_arches}
- rust-tera
ExclusiveArch: %{rust_arches}
- rust-term
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-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-scoped
ExclusiveArch: %{rust_arches}
- rust-thread_local
ExclusiveArch: %{rust_arches}
- rust-threadpool
ExclusiveArch: %{rust_arches}
- rust-tiff
ExclusiveArch: %{rust_arches}
- rust-tiger-digest
ExclusiveArch: %{rust_arches}
- rust-time
ExclusiveArch: %{rust_arches}
- rust-time-macros
ExclusiveArch: %{rust_arches}
- rust-time-macros-impl
ExclusiveArch: %{rust_arches}
- rust-time0.1
ExclusiveArch: %{rust_arches}
- rust-timebomb
ExclusiveArch: %{rust_arches}
- rust-timer
ExclusiveArch: %{rust_arches}
- rust-timerfd
ExclusiveArch: %{rust_arches}
- rust-tiny_http
ExclusiveArch: %{rust_arches}
- rust-tinytemplate
ExclusiveArch: %{rust_arches}
- rust-tinyvec
ExclusiveArch: %{rust_arches}
- rust-tinyvec0.3
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-io-pool
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-openssl
ExclusiveArch: %{rust_arches}
- rust-tokio-reactor
ExclusiveArch: %{rust_arches}
- rust-tokio-socks
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.2
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-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-treebitmap
ExclusiveArch: %{rust_arches}
- rust-treeline
ExclusiveArch: %{rust_arches}
- rust-trust-dns-native-tls
ExclusiveArch: %{rust_arches}
- rust-trust-dns-openssl
ExclusiveArch: %{rust_arches}
- rust-trust-dns-proto
ExclusiveArch: %{rust_arches}
- rust-trust-dns-resolver
ExclusiveArch: %{rust_arches}
- rust-try-lock
ExclusiveArch: %{rust_arches}
- rust-try_from
ExclusiveArch: %{rust_arches}
- rust-try_or
ExclusiveArch: %{rust_arches}
- rust-trybuild
ExclusiveArch: %{rust_arches}
- rust-tss-esapi
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-typeable
ExclusiveArch: %{rust_arches}
- rust-typed-arena
ExclusiveArch: %{rust_arches}
- rust-typemap
ExclusiveArch: %{rust_arches}
- rust-typenum
ExclusiveArch: %{rust_arches}
- rust-typetag-impl
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-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-normalization
ExclusiveArch: %{rust_arches}
- rust-unicode-segmentation
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-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-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_escape
ExclusiveArch: %{rust_arches}
- rust-v_escape_derive
ExclusiveArch: %{rust_arches}
- rust-v_frame
ExclusiveArch: %{rust_arches}
- rust-v_htmlescape
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-vec-arena
ExclusiveArch: %{rust_arches}
- rust-vec_map
ExclusiveArch: %{rust_arches}
- rust-vergen
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-vmw_backdoor
ExclusiveArch: %{rust_arches}
- rust-void
ExclusiveArch: %{rust_arches}
- rust-vte
ExclusiveArch: %{rust_arches}
- rust-vte0.3
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-macro
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen-macro-support
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen-shared
ExclusiveArch: %{rust_arches}
- rust-wasm-bindgen-test-macro
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-webkit2gtk
ExclusiveArch: %{rust_arches}
- rust-webkit2gtk-sys
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-wild
ExclusiveArch: %{rust_arches}
- rust-wildmatch
ExclusiveArch: %{rust_arches}
- rust-winit
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-xkbcommon
ExclusiveArch: %{rust_arches}
- rust-xml-rs
ExclusiveArch: %{rust_arches}
- rust-xml5ever
ExclusiveArch: %{rust_arches}
- rust-xmlparser
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-ytop
ExclusiveArch: %{rust_arches}
- rust-yubibomb
ExclusiveArch: %{rust_arches}
- rust-yup-oauth2
ExclusiveArch: %{rust_arches}
- rust-zbus
ExclusiveArch: %{rust_arches}
- rust-zbus_macros
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-zoneinfo_compiled
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}
- 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
- 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}
- source-to-image
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
- 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}
- 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
- syslinux
ExclusiveArch: %{ix86} x86_64
ExclusiveArch: %{ix86} x86_64
- 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}
- 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
- ugene
ExclusiveArch: %{ix86} x86_64
- uglify-js
ExclusiveArch: %{nodejs_arches} noarch
- uglify-js1
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
- unetbootin
ExclusiveArch: %{ix86} x86_64
- ursa-major
ExclusiveArch: noarch aarch64 ppc64le s390x x86_64
- v8-314
ExclusiveArch: %{ix86} x86_64 %{arm} mips mipsel ppc ppc64
- valgrind
ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64
- vapoursynth
ExclusiveArch: %{ix86} x86_64
- 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
- virtualplanet
ExclusiveArch: %{fpc_arches}
- vkd3d
ExclusiveArch: %{ix86} x86_64 %{arm}
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
- vmaf
ExclusiveArch: x86_64
- vmem
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
- zeromq-ada
ExclusiveArch: %{GPRbuild_arches}
- zlib-ada
ExclusiveArch: %{GPRbuild_arches}
- zlib-ng
ExclusiveArch: aarch64 i686 ppc64le s390x x86_64
- zola
ExclusiveArch: %{rust_arches}
2 years, 10 months
Architecture specific change in rpms/dotnet5.0-build-reference-packages.git
by githook-noreply@fedoraproject.org
The package rpms/dotnet5.0-build-reference-packages.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/dotnet5.0-build-reference-package...
https://src.fedoraproject.org/cgit/rpms/dotnet5.0-build-reference-package...
https://src.fedoraproject.org/cgit/rpms/dotnet5.0-build-reference-package....
Change:
+ExclusiveArch: x86_64
+ExclusiveArch: x86_64 aarch64
+ExclusiveArch: x86_64
Thanks.
Full change:
============
commit 3f97623172536ef9b6f5aa5d14e4bdee50312e59
Merge: 1d22b27 dafdd24
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jan 29 16:48:08 2021 -0500
Merge from pagure repo
diff --cc .gitignore
index 0000000,da32694..c21700e
mode 000000,100644..100644
--- a/.gitignore
+++ b/.gitignore
@@@ -1,0 -1,5 +1,6 @@@
+ /dotnet-build-reference-packages-9cc7dad.tar.gz
+ /dotnet-build-reference-packages-6e2aee6.tar.gz
+ /dotnet-build-reference-packages-5aaf20d.tar.gz
+ /dotnet-build-reference-packages-1b1a695.tar.gz
+ /dotnet-build-reference-packages-cd5a8c6.tar.gz
++/dotnet5.0-build-reference-packages-e1bdd33.tar.gz
diff --cc README.md
index c28a76a,b5400c1..ef5153a
--- a/README.md
+++ b/README.md
@@@ -1,3 -1,9 +1,9 @@@
-# dotnet-build-reference-packages
+# dotnet5.0-build-reference-packages
- The dotnet5.0-build-reference-packages package
-The dotnet-build-reference-packages package contains reference assemblies needed to build .NET Core.
++The dotnet-build-reference-packages package contains reference assemblies needed to build .NET 5.0.
+
+ This package is not meant to be used by end-users.
+
+ For developers, you can easily update this package using:
+
+ ./update-release <new-upstream-git-sha>
diff --cc sources
index 0000000,0000000..baf5e13
new file mode 100644
--- /dev/null
+++ b/sources
@@@ -1,0 -1,0 +1,1 @@@
++SHA512 (dotnet5.0-build-reference-packages-e1bdd33.tar.gz) = bae760e3d1a2a52af5e0d3e4507d34d5a6fc077f9cb2aa0542be678e57dedfb94542d554c8e49e69218fc958ef80002dd378c5739b8e2c0e8c16590f0753d2ec
commit dafdd2463e4cd25858c60f0a16b27ae686bd57db
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Jan 21 09:35:30 2021 -0500
Fix changelog format
diff --git a/update-release b/update-release
index d6d3fe4..5be94bd 100755
--- a/update-release
+++ b/update-release
@@ -45,4 +45,4 @@ spectool -g "${spec_file}"
comment="Update to upstream commit ${commit_sha:0:7}"
-rpmdev-bumpspec --comment="$comment" $spec_file
+rpmdev-bumpspec -D --comment="$comment" $spec_file
commit d334ac8dfe122d9dc02a2b997f84d9881abb8640
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Jan 21 09:34:14 2021 -0500
Update for 5.0
diff --git a/dotnet-build-reference-packages.spec b/dotnet5.0-build-reference-packages.spec
similarity index 79%
rename from dotnet-build-reference-packages.spec
rename to dotnet5.0-build-reference-packages.spec
index be9d171..d0d9fc7 100644
--- a/dotnet-build-reference-packages.spec
+++ b/dotnet5.0-build-reference-packages.spec
@@ -1,12 +1,12 @@
%global debug_package %{nil}
-%global commit cd5a8c6f5c67cbaa87755aafa8765e812ceaa2dc
+%global commit e1bdd33da5caadf0c1bc12d2da5212cee50c6c06
%global shortcommit %(c=%{commit}; echo ${c:0:7})
-Name: dotnet-build-reference-packages
+Name: dotnet5.0-build-reference-packages
Version: 0
-Release: 7.20200608git%{shortcommit}%{?dist}
-Summary: Reference packages needed by the .NET Core SDK build
+Release: 9.20201223git%{shortcommit}%{?dist}
+Summary: Reference packages needed by the .NET 5.0 SDK build
License: MIT
URL: https://github.com/dotnet/source-build-reference-packages
@@ -18,11 +18,11 @@ ExclusiveArch: aarch64 x86_64
ExclusiveArch: x86_64
%endif
-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
%description
-This contains references packages used for building .NET Core.
+This contains references packages used for building .NET 5.
This is not meant to be used by end-users.
@@ -62,6 +62,12 @@ cp -a Private.SourceBuild.ReferencePackages.%{version}.tar.gz %{buildroot}/%{_li
%changelog
+* Thu Jan 07 2020 Omair Majid <omajid(a)redhat.com> - 0-9.20201223gite1bdd33
+- Update to upstream commit f07c2d3
+
+* Tue Dec 08 2020 Omair Majid <omajid(a)redhat.com> - 0-8.20201208gitf07c2d3
+- Update to upstream commit f07c2d3
+
* Mon Jul 27 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-7.20200608gitcd5a8c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
diff --git a/sources b/sources
deleted file mode 100644
index 5573443..0000000
--- a/sources
+++ /dev/null
@@ -1 +0,0 @@
-SHA512 (dotnet-build-reference-packages-cd5a8c6.tar.gz) = 416967b6cb1c0cedaa664d8d065ff1ae63bc5cb5be6296a97228f0277914c32d806d2b00508e67d0d778a57e7e661ed7eca8badd31a1214f87d734dc0f9e4a44
commit e7b448e64a2c6a997dad61c7a46792f0b8508104
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Mon Jul 27 15:41:06 2020 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/dotnet-build-reference-packages.spec b/dotnet-build-reference-packages.spec
index 1bed9d1..be9d171 100644
--- a/dotnet-build-reference-packages.spec
+++ b/dotnet-build-reference-packages.spec
@@ -5,7 +5,7 @@
Name: dotnet-build-reference-packages
Version: 0
-Release: 6.20200608git%{shortcommit}%{?dist}
+Release: 7.20200608git%{shortcommit}%{?dist}
Summary: Reference packages needed by the .NET Core SDK build
License: MIT
@@ -62,6 +62,9 @@ cp -a Private.SourceBuild.ReferencePackages.%{version}.tar.gz %{buildroot}/%{_li
%changelog
+* Mon Jul 27 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-7.20200608gitcd5a8c6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
* Tue Jul 21 2020 Omair Majid <omajid(a)redhat.com> - 0-6.20200608gitcd5a8c6
- Update to upstream commit cd5a8c6
commit 960bf91226cbaaa3fb6eee9fcdeacebffbb9d4ce
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Jul 21 19:53:57 2020 -0400
Update to upstream commit cd5a8c6
diff --git a/.gitignore b/.gitignore
index b27968d..da32694 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/dotnet-build-reference-packages-6e2aee6.tar.gz
/dotnet-build-reference-packages-5aaf20d.tar.gz
/dotnet-build-reference-packages-1b1a695.tar.gz
+/dotnet-build-reference-packages-cd5a8c6.tar.gz
diff --git a/dotnet-build-reference-packages.spec b/dotnet-build-reference-packages.spec
index 9a0703a..1bed9d1 100644
--- a/dotnet-build-reference-packages.spec
+++ b/dotnet-build-reference-packages.spec
@@ -1,11 +1,11 @@
%global debug_package %{nil}
-%global commit 1b1a69573fab5799531bd60113592f293e6b9a66
+%global commit cd5a8c6f5c67cbaa87755aafa8765e812ceaa2dc
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: dotnet-build-reference-packages
Version: 0
-Release: 5.20200608git%{shortcommit}%{?dist}
+Release: 6.20200608git%{shortcommit}%{?dist}
Summary: Reference packages needed by the .NET Core SDK build
License: MIT
@@ -62,6 +62,9 @@ cp -a Private.SourceBuild.ReferencePackages.%{version}.tar.gz %{buildroot}/%{_li
%changelog
+* Tue Jul 21 2020 Omair Majid <omajid(a)redhat.com> - 0-6.20200608gitcd5a8c6
+- Update to upstream commit cd5a8c6
+
* Mon Jul 20 2020 Omair Majid <omajid(a)redhat.com> - 0-5.20200608git1b1a695
- Update to upstream commit 1b1a695
diff --git a/sources b/sources
index e5e47f1..5573443 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-build-reference-packages-1b1a695.tar.gz) = 6e9796a9342dd37d0a5b02d9791a5c639dcd2c05c730607ec9932b57e427a6d40e27bc132951308beb367fe823a563a91babacc8784f583d1d9cd4532662ac64
+SHA512 (dotnet-build-reference-packages-cd5a8c6.tar.gz) = 416967b6cb1c0cedaa664d8d065ff1ae63bc5cb5be6296a97228f0277914c32d806d2b00508e67d0d778a57e7e661ed7eca8badd31a1214f87d734dc0f9e4a44
commit 0ac095bee84753110fd297b24c920869cc0b2504
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Jul 20 17:25:28 2020 -0400
Update to upstream commit 1b1a695
diff --git a/.gitignore b/.gitignore
index 5eb5d8e..b27968d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/dotnet-build-reference-packages-9cc7dad.tar.gz
/dotnet-build-reference-packages-6e2aee6.tar.gz
/dotnet-build-reference-packages-5aaf20d.tar.gz
+/dotnet-build-reference-packages-1b1a695.tar.gz
diff --git a/dotnet-build-reference-packages.spec b/dotnet-build-reference-packages.spec
index 969dd56..9a0703a 100644
--- a/dotnet-build-reference-packages.spec
+++ b/dotnet-build-reference-packages.spec
@@ -1,18 +1,22 @@
%global debug_package %{nil}
-%global commit 5aaf20dca19adfd99433bb962306d859cf014d1b
+%global commit 1b1a69573fab5799531bd60113592f293e6b9a66
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: dotnet-build-reference-packages
Version: 0
-Release: 4.20200608git%{shortcommit}%{?dist}
+Release: 5.20200608git%{shortcommit}%{?dist}
Summary: Reference packages needed by the .NET Core SDK build
License: MIT
URL: https://github.com/dotnet/source-build-reference-packages
Source0: https://github.com/dotnet/source-build-reference-packages/archive/%{commi...
-ExclusiveArch: x86_64 aarch64
+%if 0%{?fedora} > 32 || 0%{?rhel} > 8
+ExclusiveArch: aarch64 x86_64
+%else
+ExclusiveArch: x86_64
+%endif
BuildRequires: dotnet-sdk-3.1
BuildRequires: dotnet-sdk-3.1-source-built-artifacts
@@ -58,6 +62,9 @@ cp -a Private.SourceBuild.ReferencePackages.%{version}.tar.gz %{buildroot}/%{_li
%changelog
+* Mon Jul 20 2020 Omair Majid <omajid(a)redhat.com> - 0-5.20200608git1b1a695
+- Update to upstream commit 1b1a695
+
* Fri Jun 19 2020 Omair Majid <omajid(a)redhat.com> - 0-4.20200608git5aaf20d
- Enable building on aarch64
diff --git a/sources b/sources
index 7ee4db7..e5e47f1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-build-reference-packages-5aaf20d.tar.gz) = 643d0c80ef8db9aead76a896834a5960e3403c92c194db1b54c417313ed2409d33d0f4e50c81155c844ec1980fa4328df74b1937803747bcca3713b23d01bce9
+SHA512 (dotnet-build-reference-packages-1b1a695.tar.gz) = 6e9796a9342dd37d0a5b02d9791a5c639dcd2c05c730607ec9932b57e427a6d40e27bc132951308beb367fe823a563a91babacc8784f583d1d9cd4532662ac64
commit 56e6630159ff94b8c5de36a67fe81702de65aaa3
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jun 19 14:21:35 2020 -0400
Fix dotnet --info printing
diff --git a/dotnet-build-reference-packages.spec b/dotnet-build-reference-packages.spec
index 7ff4687..969dd56 100644
--- a/dotnet-build-reference-packages.spec
+++ b/dotnet-build-reference-packages.spec
@@ -34,7 +34,7 @@ find -name '*.tar.gz' -type f -delete
%build
find -iname 'nuget.config' -exec echo {} \; -exec cat {} \;
-%{_libdir}/dotnet --info
+%{_libdir}/dotnet/dotnet --info
./build.sh \
--with-sdk %{_libdir}/dotnet \
commit 122a7ef4af98446caa634f14084f83c97c3dc82a
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jun 19 14:14:37 2020 -0400
Print SDK information for debugging
diff --git a/dotnet-build-reference-packages.spec b/dotnet-build-reference-packages.spec
index 9255ca9..7ff4687 100644
--- a/dotnet-build-reference-packages.spec
+++ b/dotnet-build-reference-packages.spec
@@ -34,6 +34,8 @@ find -name '*.tar.gz' -type f -delete
%build
find -iname 'nuget.config' -exec echo {} \; -exec cat {} \;
+%{_libdir}/dotnet --info
+
./build.sh \
--with-sdk %{_libdir}/dotnet \
--with-packages %{_libdir}/dotnet/source-built-artifacts/*.tar.gz
commit dd20de5416a56d93d2e9d5c2093e100435d91b9a
Author: Omair Majid <omajid(a)redhat.com>
Date: Fri Jun 19 13:33:46 2020 -0400
Enable building on aarch64
Also fix a bad date (date and day mismatch) in changelog. Updated it
based on the git commit date.
diff --git a/dotnet-build-reference-packages.spec b/dotnet-build-reference-packages.spec
index 2e8e506..9255ca9 100644
--- a/dotnet-build-reference-packages.spec
+++ b/dotnet-build-reference-packages.spec
@@ -5,14 +5,14 @@
Name: dotnet-build-reference-packages
Version: 0
-Release: 3.20200608git%{shortcommit}%{?dist}
+Release: 4.20200608git%{shortcommit}%{?dist}
Summary: Reference packages needed by the .NET Core SDK build
License: MIT
URL: https://github.com/dotnet/source-build-reference-packages
Source0: https://github.com/dotnet/source-build-reference-packages/archive/%{commi...
-ExclusiveArch: x86_64
+ExclusiveArch: x86_64 aarch64
BuildRequires: dotnet-sdk-3.1
BuildRequires: dotnet-sdk-3.1-source-built-artifacts
@@ -56,7 +56,10 @@ cp -a Private.SourceBuild.ReferencePackages.%{version}.tar.gz %{buildroot}/%{_li
%changelog
-* Mon Jun 06 2020 Chris Rummel <crummel(a)microsoft.com> - 0-3.20200608git5aaf20d
+* Fri Jun 19 2020 Omair Majid <omajid(a)redhat.com> - 0-4.20200608git5aaf20d
+- Enable building on aarch64
+
+* Mon Jun 08 2020 Chris Rummel <crummel(a)microsoft.com> - 0-3.20200608git5aaf20d
- Updated to upstream commit 5aaf20d
* Tue Jun 02 2020 Omair Majid <omajid(a)redhat.com> - 0-3.20200528git6e2aee66e2aee6
commit 70977ff5ca24292ace95a409d2af0d0270a229ca
Author: Omair Majid <omajid(a)redhat.com>
Date: Mon Jun 8 13:51:08 2020 -0400
Add a script to automate updates
diff --git a/README.md b/README.md
index 6e1d18a..b5400c1 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,9 @@
# dotnet-build-reference-packages
-The dotnet-build-reference-packages package
\ No newline at end of file
+The dotnet-build-reference-packages package contains reference assemblies needed to build .NET Core.
+
+This package is not meant to be used by end-users.
+
+For developers, you can easily update this package using:
+
+ ./update-release <new-upstream-git-sha>
diff --git a/update-release b/update-release
new file mode 100755
index 0000000..d6d3fe4
--- /dev/null
+++ b/update-release
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# Usage:
+# ./update-release commit-sha
+
+set -euo pipefail
+IFS=$'\n\t'
+
+print_usage() {
+ echo " Usage:"
+ echo " ./update-release commit-sha"
+ echo ""
+ echo "Update the source-build-reference-packages package to the upstream commit sha"
+}
+
+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=dotnet-build-reference-packages.spec
+
+commit_sha=${positional_args[0]:-}
+if [[ -z ${commit_sha} ]]; then
+ echo "error: missing commit sha"
+ exit 1
+fi
+
+set -x
+
+sed -i -E "s|^%global commit [a-f0-9]+$|%global commit ${commit_sha}|" "$spec_file"
+sed -i -E "s|^(Release: +[[:digit:]]+\.)([[:digit:]]{8})git|\1$(date '+%4Y%m%d')git|" "$spec_file"
+
+spectool -g "${spec_file}"
+
+comment="Update to upstream commit ${commit_sha:0:7}"
+
+rpmdev-bumpspec --comment="$comment" $spec_file
commit 427cfa540f696ccca9f645ee51651cb9a081c6b0
Author: Chris Rummel <crummel(a)microsoft.com>
Date: Mon Jun 8 09:30:06 2020 -0500
Update to upstream commit 5aaf20d.
diff --git a/.gitignore b/.gitignore
index ec83bd2..5eb5d8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/dotnet-build-reference-packages-9cc7dad.tar.gz
/dotnet-build-reference-packages-6e2aee6.tar.gz
+/dotnet-build-reference-packages-5aaf20d.tar.gz
diff --git a/dotnet-build-reference-packages.spec b/dotnet-build-reference-packages.spec
index c703446..2e8e506 100644
--- a/dotnet-build-reference-packages.spec
+++ b/dotnet-build-reference-packages.spec
@@ -1,11 +1,11 @@
%global debug_package %{nil}
-%global commit 6e2aee66b0e7a01664bde0f6b495bdbb4099f84c
+%global commit 5aaf20dca19adfd99433bb962306d859cf014d1b
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: dotnet-build-reference-packages
Version: 0
-Release: 3.20200528git%{shortcommit}%{?dist}
+Release: 3.20200608git%{shortcommit}%{?dist}
Summary: Reference packages needed by the .NET Core SDK build
License: MIT
@@ -56,6 +56,9 @@ cp -a Private.SourceBuild.ReferencePackages.%{version}.tar.gz %{buildroot}/%{_li
%changelog
+* Mon Jun 06 2020 Chris Rummel <crummel(a)microsoft.com> - 0-3.20200608git5aaf20d
+- Updated to upstream commit 5aaf20d
+
* Tue Jun 02 2020 Omair Majid <omajid(a)redhat.com> - 0-3.20200528git6e2aee66e2aee6
- Updated to upstream commit 6e2aee6
diff --git a/sources b/sources
index 3f6a986..7ee4db7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-build-reference-packages-6e2aee6.tar.gz) = 2a8bfe614dde7e1a383eeb867e28d587504b92f969feb3158a5574c11a1e1afde9924a286e23eae73f0f1e26a3e4b15dd5e006213a20152087cc086ee206c851
+SHA512 (dotnet-build-reference-packages-5aaf20d.tar.gz) = 643d0c80ef8db9aead76a896834a5960e3403c92c194db1b54c417313ed2409d33d0f4e50c81155c844ec1980fa4328df74b1937803747bcca3713b23d01bce9
commit a6d495179d20c2c534863b5a7ade4ba0e6388699
Author: Omair Majid <omajid(a)redhat.com>
Date: Tue Jun 2 13:05:07 2020 -0400
Updated to upstream commit 6e2aee6
diff --git a/.gitignore b/.gitignore
index 18be405..ec83bd2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/dotnet-build-reference-packages-9cc7dad.tar.gz
+/dotnet-build-reference-packages-6e2aee6.tar.gz
diff --git a/dotnet-build-reference-packages.spec b/dotnet-build-reference-packages.spec
index 3b6f5f8..c703446 100644
--- a/dotnet-build-reference-packages.spec
+++ b/dotnet-build-reference-packages.spec
@@ -1,11 +1,11 @@
%global debug_package %{nil}
-%global commit 9cc7dad6c4d9302c00803df5dea41c8a7a59e047
+%global commit 6e2aee66b0e7a01664bde0f6b495bdbb4099f84c
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: dotnet-build-reference-packages
Version: 0
-Release: 2.20200108git%{shortcommit}%{?dist}
+Release: 3.20200528git%{shortcommit}%{?dist}
Summary: Reference packages needed by the .NET Core SDK build
License: MIT
@@ -56,6 +56,9 @@ cp -a Private.SourceBuild.ReferencePackages.%{version}.tar.gz %{buildroot}/%{_li
%changelog
+* Tue Jun 02 2020 Omair Majid <omajid(a)redhat.com> - 0-3.20200528git6e2aee66e2aee6
+- Updated to upstream commit 6e2aee6
+
* Wed Feb 19 2020 Radka Janekova <rjanekov(a)redhat.com> - 0-2.20200108git9cc7dad
- Added license reference
* Tue Feb 11 2020 Omair Majid <omajid(a)redhat.com> - 0-1.20200108git9cc7dad
diff --git a/sources b/sources
index cd8ec0a..3f6a986 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dotnet-build-reference-packages-9cc7dad.tar.gz) = 52de58382efcbaf56da36f5bd21112212d4f0224d74251cf17f90db6bd55a07b724f1fbc2bd59f21d6f69410c5ee7345d3a83fd6b20b3458a37cae4f3f207188
+SHA512 (dotnet-build-reference-packages-6e2aee6.tar.gz) = 2a8bfe614dde7e1a383eeb867e28d587504b92f969feb3158a5574c11a1e1afde9924a286e23eae73f0f1e26a3e4b15dd5e006213a20152087cc086ee206c851
commit 19e4b3e8bf312989014de17e61264caae5f4ed81
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Feb 27 15:52:18 2020 -0500
Build on x864_64 only and generate the package archive
diff --git a/dotnet-build-reference-packages.spec b/dotnet-build-reference-packages.spec
index 3fb26d5..3b6f5f8 100644
--- a/dotnet-build-reference-packages.spec
+++ b/dotnet-build-reference-packages.spec
@@ -12,6 +12,8 @@ License: MIT
URL: https://github.com/dotnet/source-build-reference-packages
Source0: https://github.com/dotnet/source-build-reference-packages/archive/%{commi...
+ExclusiveArch: x86_64
+
BuildRequires: dotnet-sdk-3.1
BuildRequires: dotnet-sdk-3.1-source-built-artifacts
@@ -36,6 +38,10 @@ find -iname 'nuget.config' -exec echo {} \; -exec cat {} \;
--with-sdk %{_libdir}/dotnet \
--with-packages %{_libdir}/dotnet/source-built-artifacts/*.tar.gz
+pushd artifacts/reference-packages
+tar cvzf Private.SourceBuild.ReferencePackages.%{version}.tar.gz *.nupkg
+popd
+mv artifacts/reference-packages/Private.SourceBuild.ReferencePackages.%{version}.tar.gz .
%install
mkdir -p %{buildroot}/%{_libdir}/dotnet
commit b9491e1f03ffb84b75c26eb3fdbbb720ba95e7e2
Author: Omair Majid <omajid(a)redhat.com>
Date: Thu Feb 27 11:41:08 2020 -0500
Initial import (#1803942)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..18be405
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/dotnet-build-reference-packages-9cc7dad.tar.gz
diff --git a/dotnet-build-reference-packages.spec b/dotnet-build-reference-packages.spec
new file mode 100644
index 0000000..3fb26d5
--- /dev/null
+++ b/dotnet-build-reference-packages.spec
@@ -0,0 +1,56 @@
+%global debug_package %{nil}
+
+%global commit 9cc7dad6c4d9302c00803df5dea41c8a7a59e047
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+Name: dotnet-build-reference-packages
+Version: 0
+Release: 2.20200108git%{shortcommit}%{?dist}
+Summary: Reference packages needed by the .NET Core SDK build
+
+License: MIT
+URL: https://github.com/dotnet/source-build-reference-packages
+Source0: https://github.com/dotnet/source-build-reference-packages/archive/%{commi...
+
+BuildRequires: dotnet-sdk-3.1
+BuildRequires: dotnet-sdk-3.1-source-built-artifacts
+
+%description
+This contains references packages used for building .NET Core.
+
+This is not meant to be used by end-users.
+
+
+%prep
+%setup -q -n source-build-reference-packages-%{commit}
+
+find -name '*.nupkg' -type f -delete
+find -name '*.dll' -type f -delete
+find -name '*.so' -type f -delete
+find -name '*.tar.gz' -type f -delete
+
+%build
+find -iname 'nuget.config' -exec echo {} \; -exec cat {} \;
+
+./build.sh \
+ --with-sdk %{_libdir}/dotnet \
+ --with-packages %{_libdir}/dotnet/source-built-artifacts/*.tar.gz
+
+
+%install
+mkdir -p %{buildroot}/%{_libdir}/dotnet
+cp -a artifacts/reference-packages %{buildroot}/%{_libdir}/dotnet/
+cp -a Private.SourceBuild.ReferencePackages.%{version}.tar.gz %{buildroot}/%{_libdir}/dotnet/reference-packages/
+
+
+%files
+%dir %{_libdir}/dotnet/
+%{_libdir}/dotnet/reference-packages/
+%license LICENSE.txt
+
+
+%changelog
+* Wed Feb 19 2020 Radka Janekova <rjanekov(a)redhat.com> - 0-2.20200108git9cc7dad
+- Added license reference
+* Tue Feb 11 2020 Omair Majid <omajid(a)redhat.com> - 0-1.20200108git9cc7dad
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..cd8ec0a
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (dotnet-build-reference-packages-9cc7dad.tar.gz) = 52de58382efcbaf56da36f5bd21112212d4f0224d74251cf17f90db6bd55a07b724f1fbc2bd59f21d6f69410c5ee7345d3a83fd6b20b3458a37cae4f3f207188
commit 5b875262317b87fb8c66c8bdc6c0e85c3234177e
Author: Gwyn Ciesla <limb(a)fedoraproject.org>
Date: Tue Feb 25 15:48:58 2020 +0000
Added the README
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6e1d18a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# dotnet-build-reference-packages
+
+The dotnet-build-reference-packages package
\ No newline at end of file
2 years, 10 months
Architecture specific change in rpms/efifs.git
by githook-noreply@fedoraproject.org
The package rpms/efifs.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/efifs.git/commit/?id=c236306db534....
Change:
+%ifarch %{arm}
Thanks.
Full change:
============
commit c236306db5341adfca562f60f8e0d365d1f626e7
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Fri Jan 29 21:22:51 2021 +0100
Initial import
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..eb913ea
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/efifs-*.tar.gz
+/edk2-*.tar.gz
+/grub-*.tar.gz
diff --git a/efifs-enable.sh b/efifs-enable.sh
new file mode 100644
index 0000000..0772fc4
--- /dev/null
+++ b/efifs-enable.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+#
+# Small helper script to enable EfiFs drivers using efibootmgr
+# Copyright (C) 2020 Robert Scheck <robert(a)fedoraproject.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+
+[ $# -lt 1 ] && { echo "Usage: $(readlink -f "$0") </path/to/driver.efi>" >&2; exit 1; }
+command -v efibootmgr &> /dev/null || { echo "Error: efibootmgr(1) is missing!" >&2; exit 1; }
+
+for file in $@; do
+ if [ -f "${file}" ]; then
+ drv="$(readlink -f "${file}")"
+ esp="/boot/efi"
+ drv="${drv/$esp/}"
+ lbl="${drv##*/}"
+ lbl="${lbl%%.*}"
+ efi="${drv//\//\\}"
+ dev="$(findmnt -n -o source -T "${esp}")"
+ part=${dev#${dev%%[0-9]*}}
+ pdev="$(lsblk -dpno PKNAME "${dev}")"
+
+ efibootmgr -r -c -d "${pdev}" -p "${part}" -L "EfiFs ${lbl}" -l "${efi}" -q
+ else
+ echo "$(readlink -f "${file}"): File does not exist, skipping." >&2;
+ fi
+done
+
+efibootmgr -r -v
diff --git a/efifs.spec b/efifs.spec
new file mode 100644
index 0000000..0c330de
--- /dev/null
+++ b/efifs.spec
@@ -0,0 +1,109 @@
+# EFI/UEFI binaries are not ELF, but PE32/PE32+/COFF
+%global debug_package %{nil}
+
+# Vendor name for the EFI System Partition directory
+%global efi_vendor %{name}
+
+# Git commit mentioned at https://github.com/pbatard/efifs
+%global grub2_version 2.05-0
+%global grub2_commit d7cac52eb21b866ffec66dc8d1319cc0695c94ee
+
+# Preferrably the latest stable version shipped in Fedora
+%global edk2_stable_date 202008
+%global edk2_stable_str edk2-stable%{edk2_stable_date}
+
+Summary: Free software EFI/UEFI standalone file system drivers
+Name: efifs
+Version: 1.7
+Release: 2%{?dist}
+License: GPLv3+
+URL: https://efi.akeo.ie/
+Source0: https://github.com/pbatard/efifs/archive/v%{version}/%{name}-%{version}.t...
+# Fedora's grub2 RPM packages don't provide neither a -devel subpackage nor any
+# patched GRUB2 sources such as grub-core/{kern/{err,list,misc},fs/{fshelp,<fs>}.c
+Source1: https://git.savannah.gnu.org/cgit/grub.git/snapshot/grub-%{grub2_commit}....
+# Fedora's edk2 RPM packages might be nice, but unusable for EfiFs depending on
+# EDK II build artifacts and files such as MdePkg/MdePkg.dec, ShellPkg/ShellPkg.dec
+Source2: https://github.com/tianocore/edk2/archive/%{edk2_stable_str}.tar.gz
+# Small helper script to enable EfiFs drivers using efibootmgr
+Source3: efifs-enable.sh
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: make
+BuildRequires: libuuid-devel
+BuildRequires: python3
+%ifarch x86_64 %{ix86}
+BuildRequires: nasm
+%endif
+BuildRequires: efi-srpm-macros
+ExclusiveArch: %{efi}
+Requires: efi-filesystem
+Provides: bundled(grub2-efi-modules) = %{grub2_version}.git%(c=%{grub2_commit}; echo ${c:0:7})
+Provides: bundled(edk2-tools) = %{edk2_stable_date}01stable
+
+%description
+Free software EFI/UEFI standalone file system drivers, based on the GRUB 2.0
+read-only drivers: AFFS (Amiga Fast FileSystem), BFS (BeOS FileSystem), btrfs,
+exFAT, ext2/ext3/ext4, F2FS (experimental), HFS and HFS+ (Mac OS, including
+the compression support), ISO9660, JFS (Journaled FileSystem), nilfs2, NTFS
+(including compression support), ReiserFS, SFS (Amiga Smart FileSystem), UDF,
+UFS/FFS, UFS2/FFS2, XFS, ZFS and more.
+
+%prep
+%setup -q -T -c %{name}-%{version} -a 0 -a 2
+cp -p %{SOURCE3} .
+
+pushd %{name}-%{version}
+# Extract GRUB2 into place (Git submodule)
+tar -xf %{SOURCE1} --strip-components=1 --directory grub
+
+# Apply EfiFs upstream patch to GRUB2
+cd grub && patch -Np1 -i ../0001-GRUB-fixes.patch
+popd
+
+pushd edk2-%{edk2_stable_str}
+# Do not build BrotliCompress (because it's unused)
+sed -e '/BrotliCompress/d' -i BaseTools/Source/C/GNUmakefile
+
+# Symlink EfiFs into EDK II build-time working directory
+ln -s ../%{name}-%{version} EfiFsPkg
+popd
+
+%build
+pushd edk2-%{edk2_stable_str}
+export PYTHON_COMMAND=%{__python3}
+%make_build -C BaseTools EXTRA_OPTFLAGS="$RPM_OPT_FLAGS" EXTRA_LDFLAGS="$RPM_LD_FLAGS"
+source ./edksetup.sh --reconfig
+
+# EDK II violates UEFI 2.8 specification by not using AA64
+%ifarch aarch64
+%global efi_arch_upper AARCH64
+%endif
+
+# Fedora's armv7hl expects hardware floating-point ABI
+%ifarch %{arm}
+sed -e 's/-mfloat-abi=soft/-mfloat-abi=hard/' -i Conf/tools_def.txt
+%endif
+
+./EfiFsPkg/set_grub_cpu.sh %{efi_arch_upper}
+build -a %{efi_arch_upper} -b RELEASE -t GCC5 -p EfiFsPkg/EfiFsPkg.dsc
+
+%install
+install -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_dir}/
+install -p -m 0700 edk2-%{edk2_stable_str}/Build/EfiFs/RELEASE_GCC5/%{efi_arch_upper}/*.efi $RPM_BUILD_ROOT%{efi_esp_dir}/
+
+%files
+%license %{name}-%{version}/LICENSE %{name}-%{version}/grub/COPYING
+%doc %{name}-%{version}/ChangeLog.txt %{name}-%{version}/README.md efifs-enable.sh
+%{efi_esp_dir}/
+
+%changelog
+* Sun Nov 29 2020 Robert Scheck <robert(a)fedoraproject.org> 1.7-2
+- Changes to match the Fedora Packaging Guidelines (#1902498)
+
+* Wed Nov 25 2020 Robert Scheck <robert(a)fedoraproject.org> 1.7-1
+- Upgrade to 1.7
+
+* Fri May 01 2020 Robert Scheck <robert(a)fedoraproject.org> 1.5-1
+- Upgrade to 1.5
+- Initial spec file for Fedora and Red Hat Enterprise Linux
diff --git a/sources b/sources
new file mode 100644
index 0000000..489f2b0
--- /dev/null
+++ b/sources
@@ -0,0 +1,3 @@
+SHA512 (efifs-1.7.tar.gz) = 51ccfdd6514201ed4d8d694e86d108cc6b7057e4a0fc2b85fb3d848315e8a922a164612f4860473074e8fec9b3ef44cf966a5a8787726c624ca8548174de9df9
+SHA512 (edk2-stable202008.tar.gz) = c32340104f27b9b85f79e934cc9eeb739d47b01e13975c88f39b053e9bc5a1ecfe579ab3b63fc7747cc328e104b337b53d41deb4470c3f20dbbd5552173a4666
+SHA512 (grub-d7cac52eb21b866ffec66dc8d1319cc0695c94ee.tar.gz) = 098b4c489818fd52fdff3d55eabb9e2f6c31d711039c92a8ebd5affaa2eae5bc659c759df25b63418a7791720ff34de05ffaa9053d18696ac51e551bae66af87
2 years, 10 months
Architecture specific change in rpms/efifs.git
by githook-noreply@fedoraproject.org
The package rpms/efifs.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/efifs.git/commit/?id=c236306db534....
Change:
+%ifarch %{arm}
Thanks.
Full change:
============
commit c236306db5341adfca562f60f8e0d365d1f626e7
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Fri Jan 29 21:22:51 2021 +0100
Initial import
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..eb913ea
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/efifs-*.tar.gz
+/edk2-*.tar.gz
+/grub-*.tar.gz
diff --git a/efifs-enable.sh b/efifs-enable.sh
new file mode 100644
index 0000000..0772fc4
--- /dev/null
+++ b/efifs-enable.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+#
+# Small helper script to enable EfiFs drivers using efibootmgr
+# Copyright (C) 2020 Robert Scheck <robert(a)fedoraproject.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+
+[ $# -lt 1 ] && { echo "Usage: $(readlink -f "$0") </path/to/driver.efi>" >&2; exit 1; }
+command -v efibootmgr &> /dev/null || { echo "Error: efibootmgr(1) is missing!" >&2; exit 1; }
+
+for file in $@; do
+ if [ -f "${file}" ]; then
+ drv="$(readlink -f "${file}")"
+ esp="/boot/efi"
+ drv="${drv/$esp/}"
+ lbl="${drv##*/}"
+ lbl="${lbl%%.*}"
+ efi="${drv//\//\\}"
+ dev="$(findmnt -n -o source -T "${esp}")"
+ part=${dev#${dev%%[0-9]*}}
+ pdev="$(lsblk -dpno PKNAME "${dev}")"
+
+ efibootmgr -r -c -d "${pdev}" -p "${part}" -L "EfiFs ${lbl}" -l "${efi}" -q
+ else
+ echo "$(readlink -f "${file}"): File does not exist, skipping." >&2;
+ fi
+done
+
+efibootmgr -r -v
diff --git a/efifs.spec b/efifs.spec
new file mode 100644
index 0000000..0c330de
--- /dev/null
+++ b/efifs.spec
@@ -0,0 +1,109 @@
+# EFI/UEFI binaries are not ELF, but PE32/PE32+/COFF
+%global debug_package %{nil}
+
+# Vendor name for the EFI System Partition directory
+%global efi_vendor %{name}
+
+# Git commit mentioned at https://github.com/pbatard/efifs
+%global grub2_version 2.05-0
+%global grub2_commit d7cac52eb21b866ffec66dc8d1319cc0695c94ee
+
+# Preferrably the latest stable version shipped in Fedora
+%global edk2_stable_date 202008
+%global edk2_stable_str edk2-stable%{edk2_stable_date}
+
+Summary: Free software EFI/UEFI standalone file system drivers
+Name: efifs
+Version: 1.7
+Release: 2%{?dist}
+License: GPLv3+
+URL: https://efi.akeo.ie/
+Source0: https://github.com/pbatard/efifs/archive/v%{version}/%{name}-%{version}.t...
+# Fedora's grub2 RPM packages don't provide neither a -devel subpackage nor any
+# patched GRUB2 sources such as grub-core/{kern/{err,list,misc},fs/{fshelp,<fs>}.c
+Source1: https://git.savannah.gnu.org/cgit/grub.git/snapshot/grub-%{grub2_commit}....
+# Fedora's edk2 RPM packages might be nice, but unusable for EfiFs depending on
+# EDK II build artifacts and files such as MdePkg/MdePkg.dec, ShellPkg/ShellPkg.dec
+Source2: https://github.com/tianocore/edk2/archive/%{edk2_stable_str}.tar.gz
+# Small helper script to enable EfiFs drivers using efibootmgr
+Source3: efifs-enable.sh
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: make
+BuildRequires: libuuid-devel
+BuildRequires: python3
+%ifarch x86_64 %{ix86}
+BuildRequires: nasm
+%endif
+BuildRequires: efi-srpm-macros
+ExclusiveArch: %{efi}
+Requires: efi-filesystem
+Provides: bundled(grub2-efi-modules) = %{grub2_version}.git%(c=%{grub2_commit}; echo ${c:0:7})
+Provides: bundled(edk2-tools) = %{edk2_stable_date}01stable
+
+%description
+Free software EFI/UEFI standalone file system drivers, based on the GRUB 2.0
+read-only drivers: AFFS (Amiga Fast FileSystem), BFS (BeOS FileSystem), btrfs,
+exFAT, ext2/ext3/ext4, F2FS (experimental), HFS and HFS+ (Mac OS, including
+the compression support), ISO9660, JFS (Journaled FileSystem), nilfs2, NTFS
+(including compression support), ReiserFS, SFS (Amiga Smart FileSystem), UDF,
+UFS/FFS, UFS2/FFS2, XFS, ZFS and more.
+
+%prep
+%setup -q -T -c %{name}-%{version} -a 0 -a 2
+cp -p %{SOURCE3} .
+
+pushd %{name}-%{version}
+# Extract GRUB2 into place (Git submodule)
+tar -xf %{SOURCE1} --strip-components=1 --directory grub
+
+# Apply EfiFs upstream patch to GRUB2
+cd grub && patch -Np1 -i ../0001-GRUB-fixes.patch
+popd
+
+pushd edk2-%{edk2_stable_str}
+# Do not build BrotliCompress (because it's unused)
+sed -e '/BrotliCompress/d' -i BaseTools/Source/C/GNUmakefile
+
+# Symlink EfiFs into EDK II build-time working directory
+ln -s ../%{name}-%{version} EfiFsPkg
+popd
+
+%build
+pushd edk2-%{edk2_stable_str}
+export PYTHON_COMMAND=%{__python3}
+%make_build -C BaseTools EXTRA_OPTFLAGS="$RPM_OPT_FLAGS" EXTRA_LDFLAGS="$RPM_LD_FLAGS"
+source ./edksetup.sh --reconfig
+
+# EDK II violates UEFI 2.8 specification by not using AA64
+%ifarch aarch64
+%global efi_arch_upper AARCH64
+%endif
+
+# Fedora's armv7hl expects hardware floating-point ABI
+%ifarch %{arm}
+sed -e 's/-mfloat-abi=soft/-mfloat-abi=hard/' -i Conf/tools_def.txt
+%endif
+
+./EfiFsPkg/set_grub_cpu.sh %{efi_arch_upper}
+build -a %{efi_arch_upper} -b RELEASE -t GCC5 -p EfiFsPkg/EfiFsPkg.dsc
+
+%install
+install -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_dir}/
+install -p -m 0700 edk2-%{edk2_stable_str}/Build/EfiFs/RELEASE_GCC5/%{efi_arch_upper}/*.efi $RPM_BUILD_ROOT%{efi_esp_dir}/
+
+%files
+%license %{name}-%{version}/LICENSE %{name}-%{version}/grub/COPYING
+%doc %{name}-%{version}/ChangeLog.txt %{name}-%{version}/README.md efifs-enable.sh
+%{efi_esp_dir}/
+
+%changelog
+* Sun Nov 29 2020 Robert Scheck <robert(a)fedoraproject.org> 1.7-2
+- Changes to match the Fedora Packaging Guidelines (#1902498)
+
+* Wed Nov 25 2020 Robert Scheck <robert(a)fedoraproject.org> 1.7-1
+- Upgrade to 1.7
+
+* Fri May 01 2020 Robert Scheck <robert(a)fedoraproject.org> 1.5-1
+- Upgrade to 1.5
+- Initial spec file for Fedora and Red Hat Enterprise Linux
diff --git a/sources b/sources
new file mode 100644
index 0000000..489f2b0
--- /dev/null
+++ b/sources
@@ -0,0 +1,3 @@
+SHA512 (efifs-1.7.tar.gz) = 51ccfdd6514201ed4d8d694e86d108cc6b7057e4a0fc2b85fb3d848315e8a922a164612f4860473074e8fec9b3ef44cf966a5a8787726c624ca8548174de9df9
+SHA512 (edk2-stable202008.tar.gz) = c32340104f27b9b85f79e934cc9eeb739d47b01e13975c88f39b053e9bc5a1ecfe579ab3b63fc7747cc328e104b337b53d41deb4470c3f20dbbd5552173a4666
+SHA512 (grub-d7cac52eb21b866ffec66dc8d1319cc0695c94ee.tar.gz) = 098b4c489818fd52fdff3d55eabb9e2f6c31d711039c92a8ebd5affaa2eae5bc659c759df25b63418a7791720ff34de05ffaa9053d18696ac51e551bae66af87
2 years, 10 months
Architecture specific change in rpms/efifs.git
by githook-noreply@fedoraproject.org
The package rpms/efifs.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/efifs.git/commit/?id=c236306db534....
Change:
+%ifarch %{arm}
Thanks.
Full change:
============
commit c236306db5341adfca562f60f8e0d365d1f626e7
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Fri Jan 29 21:22:51 2021 +0100
Initial import
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..eb913ea
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/efifs-*.tar.gz
+/edk2-*.tar.gz
+/grub-*.tar.gz
diff --git a/efifs-enable.sh b/efifs-enable.sh
new file mode 100644
index 0000000..0772fc4
--- /dev/null
+++ b/efifs-enable.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+#
+# Small helper script to enable EfiFs drivers using efibootmgr
+# Copyright (C) 2020 Robert Scheck <robert(a)fedoraproject.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+
+[ $# -lt 1 ] && { echo "Usage: $(readlink -f "$0") </path/to/driver.efi>" >&2; exit 1; }
+command -v efibootmgr &> /dev/null || { echo "Error: efibootmgr(1) is missing!" >&2; exit 1; }
+
+for file in $@; do
+ if [ -f "${file}" ]; then
+ drv="$(readlink -f "${file}")"
+ esp="/boot/efi"
+ drv="${drv/$esp/}"
+ lbl="${drv##*/}"
+ lbl="${lbl%%.*}"
+ efi="${drv//\//\\}"
+ dev="$(findmnt -n -o source -T "${esp}")"
+ part=${dev#${dev%%[0-9]*}}
+ pdev="$(lsblk -dpno PKNAME "${dev}")"
+
+ efibootmgr -r -c -d "${pdev}" -p "${part}" -L "EfiFs ${lbl}" -l "${efi}" -q
+ else
+ echo "$(readlink -f "${file}"): File does not exist, skipping." >&2;
+ fi
+done
+
+efibootmgr -r -v
diff --git a/efifs.spec b/efifs.spec
new file mode 100644
index 0000000..0c330de
--- /dev/null
+++ b/efifs.spec
@@ -0,0 +1,109 @@
+# EFI/UEFI binaries are not ELF, but PE32/PE32+/COFF
+%global debug_package %{nil}
+
+# Vendor name for the EFI System Partition directory
+%global efi_vendor %{name}
+
+# Git commit mentioned at https://github.com/pbatard/efifs
+%global grub2_version 2.05-0
+%global grub2_commit d7cac52eb21b866ffec66dc8d1319cc0695c94ee
+
+# Preferrably the latest stable version shipped in Fedora
+%global edk2_stable_date 202008
+%global edk2_stable_str edk2-stable%{edk2_stable_date}
+
+Summary: Free software EFI/UEFI standalone file system drivers
+Name: efifs
+Version: 1.7
+Release: 2%{?dist}
+License: GPLv3+
+URL: https://efi.akeo.ie/
+Source0: https://github.com/pbatard/efifs/archive/v%{version}/%{name}-%{version}.t...
+# Fedora's grub2 RPM packages don't provide neither a -devel subpackage nor any
+# patched GRUB2 sources such as grub-core/{kern/{err,list,misc},fs/{fshelp,<fs>}.c
+Source1: https://git.savannah.gnu.org/cgit/grub.git/snapshot/grub-%{grub2_commit}....
+# Fedora's edk2 RPM packages might be nice, but unusable for EfiFs depending on
+# EDK II build artifacts and files such as MdePkg/MdePkg.dec, ShellPkg/ShellPkg.dec
+Source2: https://github.com/tianocore/edk2/archive/%{edk2_stable_str}.tar.gz
+# Small helper script to enable EfiFs drivers using efibootmgr
+Source3: efifs-enable.sh
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: make
+BuildRequires: libuuid-devel
+BuildRequires: python3
+%ifarch x86_64 %{ix86}
+BuildRequires: nasm
+%endif
+BuildRequires: efi-srpm-macros
+ExclusiveArch: %{efi}
+Requires: efi-filesystem
+Provides: bundled(grub2-efi-modules) = %{grub2_version}.git%(c=%{grub2_commit}; echo ${c:0:7})
+Provides: bundled(edk2-tools) = %{edk2_stable_date}01stable
+
+%description
+Free software EFI/UEFI standalone file system drivers, based on the GRUB 2.0
+read-only drivers: AFFS (Amiga Fast FileSystem), BFS (BeOS FileSystem), btrfs,
+exFAT, ext2/ext3/ext4, F2FS (experimental), HFS and HFS+ (Mac OS, including
+the compression support), ISO9660, JFS (Journaled FileSystem), nilfs2, NTFS
+(including compression support), ReiserFS, SFS (Amiga Smart FileSystem), UDF,
+UFS/FFS, UFS2/FFS2, XFS, ZFS and more.
+
+%prep
+%setup -q -T -c %{name}-%{version} -a 0 -a 2
+cp -p %{SOURCE3} .
+
+pushd %{name}-%{version}
+# Extract GRUB2 into place (Git submodule)
+tar -xf %{SOURCE1} --strip-components=1 --directory grub
+
+# Apply EfiFs upstream patch to GRUB2
+cd grub && patch -Np1 -i ../0001-GRUB-fixes.patch
+popd
+
+pushd edk2-%{edk2_stable_str}
+# Do not build BrotliCompress (because it's unused)
+sed -e '/BrotliCompress/d' -i BaseTools/Source/C/GNUmakefile
+
+# Symlink EfiFs into EDK II build-time working directory
+ln -s ../%{name}-%{version} EfiFsPkg
+popd
+
+%build
+pushd edk2-%{edk2_stable_str}
+export PYTHON_COMMAND=%{__python3}
+%make_build -C BaseTools EXTRA_OPTFLAGS="$RPM_OPT_FLAGS" EXTRA_LDFLAGS="$RPM_LD_FLAGS"
+source ./edksetup.sh --reconfig
+
+# EDK II violates UEFI 2.8 specification by not using AA64
+%ifarch aarch64
+%global efi_arch_upper AARCH64
+%endif
+
+# Fedora's armv7hl expects hardware floating-point ABI
+%ifarch %{arm}
+sed -e 's/-mfloat-abi=soft/-mfloat-abi=hard/' -i Conf/tools_def.txt
+%endif
+
+./EfiFsPkg/set_grub_cpu.sh %{efi_arch_upper}
+build -a %{efi_arch_upper} -b RELEASE -t GCC5 -p EfiFsPkg/EfiFsPkg.dsc
+
+%install
+install -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_dir}/
+install -p -m 0700 edk2-%{edk2_stable_str}/Build/EfiFs/RELEASE_GCC5/%{efi_arch_upper}/*.efi $RPM_BUILD_ROOT%{efi_esp_dir}/
+
+%files
+%license %{name}-%{version}/LICENSE %{name}-%{version}/grub/COPYING
+%doc %{name}-%{version}/ChangeLog.txt %{name}-%{version}/README.md efifs-enable.sh
+%{efi_esp_dir}/
+
+%changelog
+* Sun Nov 29 2020 Robert Scheck <robert(a)fedoraproject.org> 1.7-2
+- Changes to match the Fedora Packaging Guidelines (#1902498)
+
+* Wed Nov 25 2020 Robert Scheck <robert(a)fedoraproject.org> 1.7-1
+- Upgrade to 1.7
+
+* Fri May 01 2020 Robert Scheck <robert(a)fedoraproject.org> 1.5-1
+- Upgrade to 1.5
+- Initial spec file for Fedora and Red Hat Enterprise Linux
diff --git a/sources b/sources
new file mode 100644
index 0000000..489f2b0
--- /dev/null
+++ b/sources
@@ -0,0 +1,3 @@
+SHA512 (efifs-1.7.tar.gz) = 51ccfdd6514201ed4d8d694e86d108cc6b7057e4a0fc2b85fb3d848315e8a922a164612f4860473074e8fec9b3ef44cf966a5a8787726c624ca8548174de9df9
+SHA512 (edk2-stable202008.tar.gz) = c32340104f27b9b85f79e934cc9eeb739d47b01e13975c88f39b053e9bc5a1ecfe579ab3b63fc7747cc328e104b337b53d41deb4470c3f20dbbd5552173a4666
+SHA512 (grub-d7cac52eb21b866ffec66dc8d1319cc0695c94ee.tar.gz) = 098b4c489818fd52fdff3d55eabb9e2f6c31d711039c92a8ebd5affaa2eae5bc659c759df25b63418a7791720ff34de05ffaa9053d18696ac51e551bae66af87
2 years, 10 months
Architecture specific change in rpms/lz4-java.git
by githook-noreply@fedoraproject.org
The package rpms/lz4-java.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/lz4-java.git/commit/?id=0e7a00965....
Change:
-%ifnarch %{arm} aarch64 ppc64
Thanks.
Full change:
============
commit 451fa6b8537e48f9af40f07cc7c0882c25686ade
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Wed Jan 13 13:40:37 2021 -0500
remove hardcoded lib path in the Makefile
diff --git a/2-remove-cpptasks.patch b/2-remove-cpptasks.patch
index 42cd5dd..f896d55 100644
--- a/2-remove-cpptasks.patch
+++ b/2-remove-cpptasks.patch
@@ -34,8 +34,8 @@ index 0000000..01934f1
+generate_so:
+ gcc -fPIC -shared \
+ $(OBJECTS_DIR)/*.o \
-+ /usr/lib64/liblz4.so \
-+ /usr/lib64/libxxhash.so \
++ $(LIB_DIR)/liblz4.so \
++ $(LIB_DIR)/libxxhash.so \
+ -o $(BUILD_DIR)/jni/net/jpountz/util/$(PLATFORM)/$(ARCH)/liblz4-java.so
diff --git a/build.xml b/build.xml
index 1d4cff5..13d8ce3 100644
diff --git a/lz4-java.spec b/lz4-java.spec
index e7c4f9f..3e6f714 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -3,7 +3,7 @@
Name: lz4-java
Version: 1.7.1
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: LZ4 compression for Java
License: ASL 2.0
# GPLv2+ and BSD for lz4 and xxhash libs that are shared in liblz4-java.so
@@ -84,6 +84,7 @@ find -name '*.dylib' -print -delete
find -name '*.so' -print -delete
%build
+export LIB_DIR=%{_libdir}
%if 0%{?fedora} >= 33
export JAVA_HOME=/usr/lib/jvm/java-11/
%else
@@ -104,6 +105,9 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
%license LICENSE.txt
%changelog
+* Wed Jan 13 2021 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-12
+- remove hardcoded lib directory in the Makefile
+
* Fri Jan 08 2021 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-11
- remove hardcoded "amd64" directory path in the Makefile
commit e52efa26f4d47a6c369e76566301b6a14040f304
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Fri Jan 8 16:40:03 2021 -0500
remove hardcoded amd64 path in the Makefile patch
diff --git a/2-remove-cpptasks.patch b/2-remove-cpptasks.patch
index 321bb7f..42cd5dd 100644
--- a/2-remove-cpptasks.patch
+++ b/2-remove-cpptasks.patch
@@ -1,6 +1,6 @@
diff --git a/Makefile b/Makefile
new file mode 100644
-index 0000000..bcd18ae
+index 0000000..01934f1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
@@ -36,9 +36,9 @@ index 0000000..bcd18ae
+ $(OBJECTS_DIR)/*.o \
+ /usr/lib64/liblz4.so \
+ /usr/lib64/libxxhash.so \
-+ -o $(BUILD_DIR)/jni/net/jpountz/util/linux/amd64/liblz4-java.so
++ -o $(BUILD_DIR)/jni/net/jpountz/util/$(PLATFORM)/$(ARCH)/liblz4-java.so
diff --git a/build.xml b/build.xml
-index 1d4cff5..1bdc702 100644
+index 1d4cff5..13d8ce3 100644
--- a/build.xml
+++ b/build.xml
@@ -13,7 +13,6 @@
@@ -63,7 +63,7 @@ index 1d4cff5..1bdc702 100644
<target name="install-maven-ant-tasks" unless="maven-ant-tasks.available">
<ivy:cachepath organisation="org.apache.maven" module="maven-ant-tasks" revision="2.1.3"
inline="true" conf="default" transitive="true" pathid="maven-ant-tasks.classpath"/>
-@@ -184,27 +176,10 @@
+@@ -184,27 +176,13 @@
</javah>
</target>
@@ -89,7 +89,10 @@ index 1d4cff5..1bdc702 100644
- <linker />
- <compilerarg value="-mmacosx-version-min=10.9" if="isMacOS"/>
- </cpptasks:cc>
-+ <exec executable="make" failonerror="true"/>
++ <exec executable="make" failonerror="true">
++ <env key="ARCH" value="${os.arch}"/>
++ <env key="PLATFORM" value="${platform}"/>
++ </exec>
</target>
<target name="compile" depends="compile-java, compile-jni" />
diff --git a/lz4-java.spec b/lz4-java.spec
index 9d74daf..e7c4f9f 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -3,7 +3,7 @@
Name: lz4-java
Version: 1.7.1
-Release: 10%{?dist}
+Release: 11%{?dist}
Summary: LZ4 compression for Java
License: ASL 2.0
# GPLv2+ and BSD for lz4 and xxhash libs that are shared in liblz4-java.so
@@ -104,6 +104,9 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
%license LICENSE.txt
%changelog
+* Fri Jan 08 2021 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-11
+- remove hardcoded "amd64" directory path in the Makefile
+
* Wed Dec 09 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-10
- remove BuildArch: noarch
commit ee3851b43cf9bed1941d46bdd5856c7fe48abe1a
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Wed Dec 9 10:19:26 2020 -0500
remove BuildArch: noarch
diff --git a/lz4-java.spec b/lz4-java.spec
index c7f85be..9d74daf 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -3,7 +3,7 @@
Name: lz4-java
Version: 1.7.1
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: LZ4 compression for Java
License: ASL 2.0
# GPLv2+ and BSD for lz4 and xxhash libs that are shared in liblz4-java.so
@@ -43,8 +43,6 @@ BuildRequires: objectweb-asm
BuildRequires: xerces-j2
BuildRequires: xxhash-devel
-BuildArch: noarch
-
%description
LZ4 compression for Java, based on Yann Collet's work.
This library provides access to two compression methods
@@ -106,6 +104,9 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
%license LICENSE.txt
%changelog
+* Wed Dec 09 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-10
+- remove BuildArch: noarch
+
* Tue Dec 01 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-9
- run unit tests on classes that do not require randomizedtesting
- add liblz4-java.so generation step to Makefile
commit a60ea87713f7ea7ed7fa0f37addaca5b8a3f9580
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Tue Dec 1 14:02:53 2020 -0500
run unit tests that do not require randomizedtesting
diff --git a/0-remove-tests.patch b/0-remove-tests.patch
deleted file mode 100644
index a12b749..0000000
--- a/0-remove-tests.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/ivy-pure-java.xml b/ivy-pure-java.xml
-index 6e99e19..58f4c53 100644
---- a/ivy-pure-java.xml
-+++ b/ivy-pure-java.xml
-@@ -19,8 +19,4 @@
- <conf name="default" />
- <conf name="test" extends="default" />
- </configurations>
--
-- <dependencies>
-- <dependency org="com.carrotsearch.randomizedtesting" name="junit4-ant" rev="2.7.3" transitive="true" conf="test->*,!sources,!javadoc" />
-- </dependencies>
- </ivy-module>
-diff --git a/ivy.xml b/ivy.xml
-index 6643da7..4e3798c 100644
---- a/ivy.xml
-+++ b/ivy.xml
-@@ -19,8 +19,4 @@
- <conf name="default" />
- <conf name="test" extends="default" />
- </configurations>
--
-- <dependencies>
-- <dependency org="com.carrotsearch.randomizedtesting" name="junit4-ant" rev="2.7.3" transitive="true" conf="test->*,!sources,!javadoc" />
-- </dependencies>
- </ivy-module>
diff --git a/1-remove-unsafe.patch b/0-remove-unsafe.patch
similarity index 87%
rename from 1-remove-unsafe.patch
rename to 0-remove-unsafe.patch
index 90adaf3..416658f 100644
--- a/1-remove-unsafe.patch
+++ b/0-remove-unsafe.patch
@@ -776,96 +776,6 @@ index c4ef05e..b8b33d7 100644
assertEquals(LZ4JavaSafeSafeDecompressor.INSTANCE, LZ4Factory.safeInstance().safeDecompressor());
}
-diff --git a/src/test/net/jpountz/lz4/LZ4Test.java b/src/test/net/jpountz/lz4/LZ4Test.java
-index 161899c..6a3a597 100644
---- a/src/test/net/jpountz/lz4/LZ4Test.java
-+++ b/src/test/net/jpountz/lz4/LZ4Test.java
-@@ -247,11 +247,9 @@ public class LZ4Test extends AbstractLZ4Test {
- public void testRoundTrip(byte[] data, int off, int len) {
- for (LZ4Factory compressorFactory : Arrays.asList(
- LZ4Factory.nativeInstance(),
-- LZ4Factory.unsafeInstance(),
- LZ4Factory.safeInstance())) {
- for (LZ4Factory decompressorFactory : Arrays.asList(
- LZ4Factory.nativeInstance(),
-- LZ4Factory.unsafeInstance(),
- LZ4Factory.safeInstance())) {
- testRoundTrip(data, off, len, compressorFactory, decompressorFactory);
- }
-diff --git a/src/test/net/jpountz/xxhash/XXHash32Test.java b/src/test/net/jpountz/xxhash/XXHash32Test.java
-index 98c9436..30f985d 100644
---- a/src/test/net/jpountz/xxhash/XXHash32Test.java
-+++ b/src/test/net/jpountz/xxhash/XXHash32Test.java
-@@ -74,18 +74,12 @@ public class XXHash32Test extends AbstractLZ4Test {
-
- private static XXHash32[] INSTANCES = new XXHash32[] {
- XXHashFactory.nativeInstance().hash32(),
-- XXHashFactory.unsafeInstance().hash32(),
- XXHashFactory.safeInstance().hash32(),
- new StreamingXXHash32Adapter() {
- protected StreamingXXHash32 streamingHash(int seed) {
- return XXHashFactory.nativeInstance().newStreamingHash32(seed);
- }
- },
-- new StreamingXXHash32Adapter() {
-- protected StreamingXXHash32 streamingHash(int seed) {
-- return XXHashFactory.unsafeInstance().newStreamingHash32(seed);
-- }
-- },
- new StreamingXXHash32Adapter() {
- protected StreamingXXHash32 streamingHash(int seed) {
- return XXHashFactory.safeInstance().newStreamingHash32(seed);
-@@ -150,13 +144,10 @@ public class XXHash32Test extends AbstractLZ4Test {
- long totalLen = 0;
- final int seed = randomInt();
- StreamingXXHash32 hash1 = XXHashFactory.nativeInstance().newStreamingHash32(seed);
-- StreamingXXHash32 hash2 = XXHashFactory.unsafeInstance().newStreamingHash32(seed);
- StreamingXXHash32 hash3 = XXHashFactory.safeInstance().newStreamingHash32(seed);
- while (totalLen < (1L << 33)) {
- hash1.update(bytes, off, len);
-- hash2.update(bytes, off, len);
- hash3.update(bytes, off, len);
-- assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
- assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
- totalLen += len;
- }
-diff --git a/src/test/net/jpountz/xxhash/XXHash64Test.java b/src/test/net/jpountz/xxhash/XXHash64Test.java
-index dadbeda..b767c99 100644
---- a/src/test/net/jpountz/xxhash/XXHash64Test.java
-+++ b/src/test/net/jpountz/xxhash/XXHash64Test.java
-@@ -74,18 +74,12 @@ public class XXHash64Test extends AbstractLZ4Test {
-
- private static XXHash64[] INSTANCES = new XXHash64[] {
- XXHashFactory.nativeInstance().hash64(),
-- XXHashFactory.unsafeInstance().hash64(),
- XXHashFactory.safeInstance().hash64(),
- new StreamingXXHash64Adapter() {
- protected StreamingXXHash64 streamingHash(long seed) {
- return XXHashFactory.nativeInstance().newStreamingHash64(seed);
- }
- },
-- new StreamingXXHash64Adapter() {
-- protected StreamingXXHash64 streamingHash(long seed) {
-- return XXHashFactory.unsafeInstance().newStreamingHash64(seed);
-- }
-- },
- new StreamingXXHash64Adapter() {
- protected StreamingXXHash64 streamingHash(long seed) {
- return XXHashFactory.safeInstance().newStreamingHash64(seed);
-@@ -155,13 +149,10 @@ public class XXHash64Test extends AbstractLZ4Test {
- long totalLen = 0;
- final long seed = randomLong();
- StreamingXXHash64 hash1 = XXHashFactory.nativeInstance().newStreamingHash64(seed);
-- StreamingXXHash64 hash2 = XXHashFactory.unsafeInstance().newStreamingHash64(seed);
- StreamingXXHash64 hash3 = XXHashFactory.safeInstance().newStreamingHash64(seed);
- while (totalLen < (1L << 33)) {
- hash1.update(bytes, off, len);
-- hash2.update(bytes, off, len);
- hash3.update(bytes, off, len);
-- assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
- assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
- totalLen += len;
- }
diff --git a/src/test/net/jpountz/xxhash/XXHashFactoryTest.java b/src/test/net/jpountz/xxhash/XXHashFactoryTest.java
index c410220..2aae562 100644
--- a/src/test/net/jpountz/xxhash/XXHashFactoryTest.java
diff --git a/2-remove-comments-from-templates.patch b/1-remove-comments-from-templates.patch
similarity index 100%
rename from 2-remove-comments-from-templates.patch
rename to 1-remove-comments-from-templates.patch
diff --git a/3-remove-cpptasks.patch b/2-remove-cpptasks.patch
similarity index 87%
rename from 3-remove-cpptasks.patch
rename to 2-remove-cpptasks.patch
index c03318b..321bb7f 100644
--- a/3-remove-cpptasks.patch
+++ b/2-remove-cpptasks.patch
@@ -1,9 +1,9 @@
diff --git a/Makefile b/Makefile
new file mode 100644
-index 0000000..d762404
+index 0000000..bcd18ae
--- /dev/null
+++ b/Makefile
-@@ -0,0 +1,26 @@
+@@ -0,0 +1,33 @@
+CC = gcc
+
+BUILD_DIR = build
@@ -15,27 +15,33 @@ index 0000000..d762404
+LIBS = -llz4 -lxxhash
+JNI_PREFIX = net_jpountz_
+
-+default: all move_objects
++default: all move_objects generate_so
+
+all:
-+ $(CC) -I $(JNI_HEADERS_DIR) \
++ $(CC) -fPIC -I $(JNI_HEADERS_DIR) \
+ $(INCLUDE) \
+ $(LIBS) \
+ -c $(JNI_SOURCES_DIR)/$(JNI_PREFIX)lz4_LZ4JNI.c
+
-+ $(CC) -I $(JNI_HEADERS_DIR) \
++ $(CC) -fPIC -I $(JNI_HEADERS_DIR) \
+ $(INCLUDE) \
+ $(LIBS) \
+ -c $(JNI_SOURCES_DIR)/$(JNI_PREFIX)xxhash_XXHashJNI.c
+
+move_objects:
+ mv *.o $(OBJECTS_DIR)
-\ No newline at end of file
++
++generate_so:
++ gcc -fPIC -shared \
++ $(OBJECTS_DIR)/*.o \
++ /usr/lib64/liblz4.so \
++ /usr/lib64/libxxhash.so \
++ -o $(BUILD_DIR)/jni/net/jpountz/util/linux/amd64/liblz4-java.so
diff --git a/build.xml b/build.xml
-index 7a63933..dc1a112 100644
+index 1d4cff5..1bdc702 100644
--- a/build.xml
+++ b/build.xml
-@@ -15,7 +15,6 @@
+@@ -13,7 +13,6 @@
-->
<project name="lz4" default="dist" basedir="."
@@ -43,7 +49,7 @@ index 7a63933..dc1a112 100644
xmlns:ivy="antlib:org.apache.ivy.ant"
xmlns:junit4="antlib:com.carrotsearch.junit4"
xmlns:mvn="antlib:org.apache.maven.artifact.ant">
-@@ -80,13 +79,6 @@
+@@ -78,13 +77,6 @@
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.jar.version}/${iv..." dest="${user.home}/.ant/lib/${ivy.jar.name}"/>
</target>
@@ -57,7 +63,7 @@ index 7a63933..dc1a112 100644
<target name="install-maven-ant-tasks" unless="maven-ant-tasks.available">
<ivy:cachepath organisation="org.apache.maven" module="maven-ant-tasks" revision="2.1.3"
inline="true" conf="default" transitive="true" pathid="maven-ant-tasks.classpath"/>
-@@ -197,27 +189,10 @@
+@@ -184,27 +176,10 @@
</javah>
</target>
diff --git a/3-remove-randomizedtesting-tests.patch b/3-remove-randomizedtesting-tests.patch
new file mode 100644
index 0000000..c7d2282
--- /dev/null
+++ b/3-remove-randomizedtesting-tests.patch
@@ -0,0 +1,1689 @@
+diff --git a/.classpath b/.classpath
+index 058b340..c48898b 100644
+--- a/.classpath
++++ b/.classpath
+@@ -7,7 +7,5 @@
+ <classpathentry kind="src" path="src/test"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="lib/hamcrest-core-1.1.jar"/>
+- <classpathentry kind="lib" path="lib/junit-4.10.jar"/>
+- <classpathentry kind="lib" path="lib/randomizedtesting-runner-2.0.9.jar"/>
+ <classpathentry kind="output" path="bin"/>
+ </classpath>
+
+diff --git a/build.xml b/build.xml
+index 1bdc702..919386f 100644
+--- a/build.xml
++++ b/build.xml
+@@ -14,7 +14,6 @@
+
+ <project name="lz4" default="dist" basedir="."
+ xmlns:ivy="antlib:org.apache.ivy.ant"
+- xmlns:junit4="antlib:com.carrotsearch.junit4"
+ xmlns:mvn="antlib:org.apache.maven.artifact.ant">
+
+ <property name="src" location="src"/>
+@@ -105,15 +104,6 @@
+ <ivy:retrieve />
+ </target>
+
+- <target name="install-junit4" depends="init" unless="junit4.available">
+- <taskdef uri="antlib:com.carrotsearch.junit4">
+- <classpath>
+- <fileset dir="${lib}" includes="*.jar" />
+- </classpath>
+- </taskdef>
+- <property name="junit4.available" value="true" />
+- </target>
+-
+ <target name="generate-sources" depends="init">
+ <ivy:cachepath organisation="org.mvel" module="mvel2" revision="2.3.2.Final"
+ inline="true" conf="default" transitive="true" pathid="mvel.classpath"/>
+@@ -236,37 +226,14 @@
+ <antcall target="-test" />
+ </target>
+
+- <target name="-test" depends="compile-tests, install-junit4">
+- <mkdir dir="${build}/tests" />
+- <junit4:junit4
+- dir="${java.io.tmpdir}"
+- maxmemory="300m"
+- parallelism="auto">
+- <assertions>
+- <enable package="net.jpountz.lz4"/>
+- </assertions>
++ <target name="-test" depends="compile-tests">
++ <junit printsummary="on" showoutput="true" failureProperty="test.failure">
+ <classpath refid="${prop.test.classpath}" />
+- <fileset dir="${build}/test-classes/">
+- <include name="**/*Test.class" />
+- <exclude name="**/*$*" />
+- <exclude name="**/Abstract*" />
+- </fileset>
+- <listeners>
+- <junit4:report-text
+- showThrowable="true"
+- showStackTraces="true"
+- showOutput="never"
+-
+- showStatusOk="true"
+- showStatusError="true"
+- showStatusFailure="true"
+- showStatusIgnored="true"
+-
+- showSuiteSummary="false" />
+- <!-- For enkins -->
+- <junit4:report-ant-xml dir="${build}/tests" />
+- </listeners>
+- </junit4:junit4>
++ <test name="net.jpountz.lz4.LZ4FrameIOStreamTest" />
++ <test name="net.jpountz.lz4.LZ4FactoryTest" />
++ <test name="net.jpountz.xxhash.XXHashFactoryTest" />
++ </junit>
++ <fail message="tests failed" if="test.failure" />
+ </target>
+
+ <target name="test-skip-jni" description="run tests without building JNI">
+diff --git a/ivy-pure-java.xml b/ivy-pure-java.xml
+index 6e99e19..9c1c99b 100644
+--- a/ivy-pure-java.xml
++++ b/ivy-pure-java.xml
+@@ -21,6 +21,6 @@
+ </configurations>
+
+ <dependencies>
+- <dependency org="com.carrotsearch.randomizedtesting" name="junit4-ant" rev="2.7.3" transitive="true" conf="test->*,!sources,!javadoc" />
++ <dependency org="junit" name="junit" rev="4.12" conf="test->default" />
+ </dependencies>
+ </ivy-module>
+diff --git a/ivy.xml b/ivy.xml
+index 6643da7..e5a9620 100644
+--- a/ivy.xml
++++ b/ivy.xml
+@@ -21,6 +21,6 @@
+ </configurations>
+
+ <dependencies>
+- <dependency org="com.carrotsearch.randomizedtesting" name="junit4-ant" rev="2.7.3" transitive="true" conf="test->*,!sources,!javadoc" />
++ <dependency org="junit" name="junit" rev="4.12" conf="test->default" />
+ </dependencies>
+ </ivy-module>
+diff --git a/src/test/net/jpountz/lz4/AbstractLZ4Test.java b/src/test/net/jpountz/lz4/AbstractLZ4Test.java
+deleted file mode 100644
+index 8c5cd38..0000000
+--- a/src/test/net/jpountz/lz4/AbstractLZ4Test.java
++++ /dev/null
+@@ -1,257 +0,0 @@
+-package net.jpountz.lz4;
+-
+-/*
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-import java.io.ByteArrayOutputStream;
+-import java.io.IOException;
+-import java.io.InputStream;
+-import java.nio.ByteBuffer;
+-import java.nio.ByteOrder;
+-import java.util.Arrays;
+-
+-import com.carrotsearch.randomizedtesting.RandomizedTest;
+-
+-public abstract class AbstractLZ4Test extends RandomizedTest {
+-
+- public interface Tester<T> {
+-
+- T allocate(int length);
+- T copyOf(byte[] array);
+- byte[] copyOf(T data, int off, int len);
+- int maxCompressedLength(int len);
+- int compress(LZ4Compressor compressor, T src, int srcOff, int srcLen, T dest, int destOff, int maxDestLen);
+- int decompress(LZ4FastDecompressor decompressor, T src, int srcOff, T dest, int destOff, int destLen);
+- int decompress(LZ4SafeDecompressor decompressor, T src, int srcOff, int srcLen, T dest, int destOff, int maxDestLen);
+- void fill(T instance, byte b);
+-
+- public static class ByteArrayTester implements Tester<byte[]> {
+-
+- @Override
+- public byte[] allocate(int length) {
+- return new byte[length];
+- }
+-
+- @Override
+- public byte[] copyOf(byte[] array) {
+- return Arrays.copyOf(array, array.length);
+- }
+-
+- @Override
+- public byte[] copyOf(byte[] data, int off, int len) {
+- return Arrays.copyOfRange(data, off, off + len);
+- }
+-
+- @Override
+- public int maxCompressedLength(int len) {
+- return LZ4Utils.maxCompressedLength(len);
+- }
+-
+- @Override
+- public int compress(LZ4Compressor compressor, byte[] src, int srcOff,
+- int srcLen, byte[] dest, int destOff, int maxDestLen) {
+- return compressor.compress(src, srcOff, srcLen, dest, destOff, maxDestLen);
+- }
+-
+- @Override
+- public int decompress(LZ4FastDecompressor decompressor,
+- byte[] src, int srcOff, byte[] dest, int destOff, int destLen) {
+- return decompressor.decompress(src, srcOff, dest, destOff, destLen);
+- }
+-
+- @Override
+- public int decompress(LZ4SafeDecompressor decompressor,
+- byte[] src, int srcOff, int srcLen, byte[] dest, int destOff, int maxDestLen) {
+- return decompressor.decompress(src, srcOff, srcLen, dest, destOff, maxDestLen);
+- }
+-
+- @Override
+- public void fill(byte[] instance, byte b) {
+- Arrays.fill(instance, b);
+- }
+- }
+- public static final Tester<byte[]> BYTE_ARRAY = new ByteArrayTester();
+- public static final Tester<byte[]> BYTE_ARRAY_WITH_LENGTH = new ByteArrayTester() {
+- @Override
+- public int compress(LZ4Compressor compressor, byte[] src, int srcOff,
+- int srcLen, byte[] dest, int destOff, int maxDestLen) {
+- return new LZ4CompressorWithLength(compressor).compress(src, srcOff, srcLen, dest, destOff, maxDestLen);
+- }
+-
+- @Override
+- public int decompress(LZ4FastDecompressor decompressor,
+- byte[] src, int srcOff, byte[] dest, int destOff, int destLen) {
+- return new LZ4DecompressorWithLength(decompressor).decompress(src, srcOff, dest, destOff);
+- }
+-
+- @Override
+- public int decompress(LZ4SafeDecompressor decompressor,
+- byte[] src, int srcOff, int srcLen, byte[] dest, int destOff, int maxDestLen) {
+- return -1;
+- }
+- };
+-
+- public static class ByteBufferTester implements Tester<ByteBuffer> {
+-
+- @Override
+- public ByteBuffer allocate(int length) {
+- ByteBuffer bb;
+- int slice = randomInt(5);
+- if (randomBoolean()) {
+- bb = ByteBuffer.allocate(length + slice);
+- } else {
+- bb = ByteBuffer.allocateDirect(length + slice);
+- }
+- bb.position(slice);
+- bb = bb.slice();
+- if (randomBoolean()) {
+- bb.order(ByteOrder.LITTLE_ENDIAN);
+- } else {
+- bb.order(ByteOrder.BIG_ENDIAN);
+- }
+- return bb;
+- }
+-
+- @Override
+- public ByteBuffer copyOf(byte[] array) {
+- ByteBuffer bb = allocate(array.length).put(array);
+- if (randomBoolean()) {
+- bb = bb.asReadOnlyBuffer();
+- }
+- bb.position(0);
+- return bb;
+- }
+-
+- @Override
+- public byte[] copyOf(ByteBuffer data, int off, int len) {
+- byte[] copy = new byte[len];
+- data.position(off);
+- data.get(copy);
+- return copy;
+- }
+-
+- @Override
+- public int maxCompressedLength(int len) {
+- return LZ4Utils.maxCompressedLength(len);
+- }
+-
+- @Override
+- public int compress(LZ4Compressor compressor, ByteBuffer src, int srcOff,
+- int srcLen, ByteBuffer dest, int destOff, int maxDestLen) {
+- return compressor.compress(src, srcOff, srcLen, dest, destOff, maxDestLen);
+- }
+-
+- @Override
+- public int decompress(LZ4FastDecompressor decompressor, ByteBuffer src,
+- int srcOff, ByteBuffer dest, int destOff, int destLen) {
+- return decompressor.decompress(src, srcOff, dest, destOff, destLen);
+- }
+-
+- @Override
+- public int decompress(LZ4SafeDecompressor decompressor, ByteBuffer src,
+- int srcOff, int srcLen, ByteBuffer dest, int destOff, int maxDestLen) {
+- return decompressor.decompress(src, srcOff, srcLen, dest, destOff, maxDestLen);
+- }
+-
+- @Override
+- public void fill(ByteBuffer instance, byte b) {
+- for (int i = 0; i < instance.capacity(); ++i) {
+- instance.put(i, b);
+- }
+- }
+- }
+- public static final Tester<ByteBuffer> BYTE_BUFFER = new ByteBufferTester();
+- public static final Tester<ByteBuffer> BYTE_BUFFER_WITH_LENGTH = new ByteBufferTester() {
+- @Override
+- public int compress(LZ4Compressor compressor, ByteBuffer src, int srcOff,
+- int srcLen, ByteBuffer dest, int destOff, int maxDestLen) {
+- return new LZ4CompressorWithLength(compressor).compress(src, srcOff, srcLen, dest, destOff, maxDestLen);
+- }
+-
+- @Override
+- public int decompress(LZ4FastDecompressor decompressor, ByteBuffer src,
+- int srcOff, ByteBuffer dest, int destOff, int destLen) {
+- return new LZ4DecompressorWithLength(decompressor).decompress(src, srcOff, dest, destOff);
+- }
+-
+- @Override
+- public int decompress(LZ4SafeDecompressor decompressor, ByteBuffer src,
+- int srcOff, int srcLen, ByteBuffer dest, int destOff, int maxDestLen) {
+- return -1;
+- }
+- };
+- }
+-
+- protected class RandomBytes {
+- private final byte[] bytes;
+- RandomBytes(int n) {
+- assert n > 0 && n <= 256;
+- bytes = new byte[n];
+- for (int i = 0; i < n; ++i) {
+- bytes[i] = (byte) randomInt(255);
+- }
+- }
+- byte next() {
+- final int i = randomInt(bytes.length - 1);
+- return bytes[i];
+- }
+- }
+-
+- protected static byte[] readResource(String resource) throws IOException {
+- InputStream is = LZ4Test.class.getResourceAsStream(resource);
+- if (is == null) {
+- throw new IllegalStateException("Cannot find " + resource);
+- }
+- byte[] buf = new byte[4096];
+- ByteArrayOutputStream baos = new ByteArrayOutputStream();
+- try {
+- while (true) {
+- final int read = is.read(buf);
+- if (read == -1) {
+- break;
+- }
+- baos.write(buf, 0, read);
+- }
+- } finally {
+- is.close();
+- }
+- return baos.toByteArray();
+- }
+-
+- protected byte[] randomArray(int len, int n) {
+- byte[] result = new byte[len];
+- RandomBytes randomBytes = new RandomBytes(n);
+- for (int i = 0; i < result.length; ++i) {
+- result[i] = randomBytes.next();
+- }
+- return result;
+- }
+-
+- protected ByteBuffer copyOf(byte[] bytes, int offset, int len) {
+- ByteBuffer buffer;
+- if (randomBoolean()) {
+- buffer = ByteBuffer.allocate(bytes.length);
+- } else {
+- buffer = ByteBuffer.allocateDirect(bytes.length);
+- }
+- buffer.put(bytes);
+- buffer.position(offset);
+- buffer.limit(offset + len);
+- if (randomBoolean()) {
+- buffer = buffer.asReadOnlyBuffer();
+- }
+- return buffer;
+- }
+-
+-}
+diff --git a/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java b/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java
+deleted file mode 100644
+index 9d6fc5b..0000000
+--- a/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java
++++ /dev/null
+@@ -1,347 +0,0 @@
+-package net.jpountz.lz4;
+-
+-/*
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-import java.io.ByteArrayInputStream;
+-import java.io.ByteArrayOutputStream;
+-import java.io.FilterInputStream;
+-import java.io.FilterOutputStream;
+-import java.io.IOException;
+-import java.io.InputStream;
+-import java.io.OutputStream;
+-import java.nio.charset.Charset;
+-import java.util.Arrays;
+-import java.util.zip.Adler32;
+-import java.util.zip.CRC32;
+-import java.util.zip.Checksum;
+-
+-import net.jpountz.xxhash.XXHashFactory;
+-
+-import org.junit.Test;
+-import static org.junit.Assert.*;
+-
+-import com.carrotsearch.randomizedtesting.annotations.Repeat;
+-
+-public class LZ4BlockStreamingTest extends AbstractLZ4Test {
+-
+- // An input stream that might read less data than it is able to
+- class MockInputStream extends FilterInputStream {
+-
+- MockInputStream(InputStream in) {
+- super(in);
+- }
+-
+- @Override
+- public int read(byte[] b, int off, int len) throws IOException {
+- return super.read(b, off, randomIntBetween(0, len));
+- }
+-
+- @Override
+- public long skip(long n) throws IOException {
+- return super.skip(randomInt((int) Math.min(n, Integer.MAX_VALUE)));
+- }
+-
+- }
+-
+- // an output stream that delays the actual writes
+- class MockOutputStream extends FilterOutputStream {
+-
+- private final byte[] buffer;
+- private int delayedBytes;
+-
+- MockOutputStream(OutputStream out) {
+- super(out);
+- buffer = new byte[randomIntBetween(10, 1000)];
+- delayedBytes = 0;
+- }
+-
+- private void flushIfNecessary() throws IOException {
+- if (delayedBytes == buffer.length) {
+- flushPendingData();
+- }
+- }
+-
+- private void flushPendingData() throws IOException {
+- out.write(buffer, 0, delayedBytes);
+- delayedBytes = 0;
+- }
+-
+- @Override
+- public void write(int b) throws IOException {
+- if (rarely()) {
+- flushPendingData();
+- } else {
+- flushIfNecessary();
+- }
+- buffer[delayedBytes++] = (byte) b;
+- }
+-
+- @Override
+- public void write(byte[] b, int off, int len) throws IOException {
+- if (rarely()) {
+- flushPendingData();
+- }
+- if (len + delayedBytes > buffer.length) {
+- flushPendingData();
+- delayedBytes = randomInt(Math.min(len, buffer.length));
+- out.write(b, off, len - delayedBytes);
+- System.arraycopy(b, off + len - delayedBytes, buffer, 0, delayedBytes);
+- } else {
+- System.arraycopy(b, off, buffer, delayedBytes, len);
+- delayedBytes += len;
+- }
+- }
+-
+- @Override
+- public void write(byte[] b) throws IOException {
+- write(b, 0, b.length);
+- }
+-
+- @Override
+- public void flush() throws IOException {
+- // no-op
+- }
+-
+- @Override
+- public void close() throws IOException {
+- flushPendingData();
+- out.close();
+- }
+-
+- }
+-
+- private InputStream open(byte[] data) {
+- return new MockInputStream(new ByteArrayInputStream(data));
+- }
+-
+- private OutputStream wrap(OutputStream other) {
+- return new MockOutputStream(other);
+- }
+-
+- @Test
+- @Repeat(iterations=5)
+- public void testRoundtripGeo() throws IOException {
+- testRoundTrip("/calgary/geo");
+- }
+-
+- @Test
+- @Repeat(iterations=5)
+- public void testRoundtripBook1() throws IOException {
+- testRoundTrip("/calgary/book1");
+- }
+-
+- @Test
+- @Repeat(iterations=5)
+- public void testRoundtripPic() throws IOException {
+- testRoundTrip("/calgary/pic");
+- }
+-
+- public void testRoundTrip(String resource) throws IOException {
+- testRoundTrip(readResource(resource));
+- }
+-
+- public void testRoundTrip(byte[] data) throws IOException {
+- final ByteArrayOutputStream compressed = new ByteArrayOutputStream();
+- final int blockSize;
+- switch (randomInt(2)) {
+- case 0:
+- blockSize = LZ4BlockOutputStream.MIN_BLOCK_SIZE;
+- break;
+- case 1:
+- blockSize = LZ4BlockOutputStream.MAX_BLOCK_SIZE;
+- break;
+- default:
+- blockSize = randomIntBetween(LZ4BlockOutputStream.MIN_BLOCK_SIZE, LZ4BlockOutputStream.MAX_BLOCK_SIZE);
+- break;
+- }
+- final LZ4Compressor compressor = randomBoolean()
+- ? LZ4Factory.fastestInstance().fastCompressor()
+- : LZ4Factory.fastestInstance().highCompressor();
+- final Checksum checksum;
+- switch (randomInt(2)) {
+- case 0:
+- checksum = new Adler32();
+- break;
+- case 1:
+- checksum = new CRC32();
+- break;
+- default:
+- checksum = XXHashFactory.fastestInstance().newStreamingHash32(randomInt()).asChecksum();
+- break;
+- }
+- final boolean syncFlush = randomBoolean();
+- final LZ4BlockOutputStream os = new LZ4BlockOutputStream(wrap(compressed), blockSize, compressor, checksum, syncFlush);
+- final int half = data.length / 2;
+- switch (randomInt(2)) {
+- case 0:
+- os.write(data, 0, half);
+- for (int i = half; i < data.length; ++i) {
+- os.write(data[i]);
+- }
+- break;
+- case 1:
+- for (int i = 0; i < half; ++i) {
+- os.write(data[i]);
+- }
+- os.write(data, half, data.length - half);
+- break;
+- case 2:
+- os.write(data, 0, data.length);
+- break;
+- }
+- os.close();
+-
+- final LZ4FastDecompressor decompressor = LZ4Factory.fastestInstance().fastDecompressor();
+- InputStream is = new LZ4BlockInputStream(open(compressed.toByteArray()), decompressor, checksum);
+- assertFalse(is.markSupported());
+- try {
+- is.mark(1);
+- is.reset();
+- assertFalse(true);
+- } catch (IOException e) {
+- // OK
+- }
+- byte[] restored = new byte[data.length + 1000];
+- int read = 0;
+- while (true) {
+- if (randomFloat() < 0.01f) {
+- final int r = is.read(restored, read, restored.length - read);
+- if (r == -1) {
+- break;
+- } else {
+- read += r;
+- }
+- } else {
+- final int b = is.read();
+- if (b == -1) {
+- break;
+- } else {
+- restored[read++] = (byte) b;
+- }
+- }
+- }
+- is.close();
+- assertEquals(data.length, read);
+- assertArrayEquals(data, Arrays.copyOf(restored, read));
+-
+- // test skip
+- final int offset = data.length <= 1 ? 0 : randomInt(data.length - 1);
+- final int length = randomInt(data.length - offset);
+- is = new LZ4BlockInputStream(open(compressed.toByteArray()), decompressor, checksum);
+- restored = new byte[length + 1000];
+- read = 0;
+- while (read < offset) {
+- final long skipped = is.skip(offset - read);
+- assertTrue(skipped >= 0);
+- read += skipped;
+- }
+- read = 0;
+- while (read < length) {
+- final int r = is.read(restored, read, length - read);
+- assertTrue(r >= 0);
+- read += r;
+- }
+- is.close();
+- assertArrayEquals(Arrays.copyOfRange(data, offset, offset + length), Arrays.copyOfRange(restored, 0, length));
+- }
+-
+- @Test
+- @Repeat(iterations=20)
+- public void testRoundtripRandom() throws IOException {
+- final int size = randomFloat() < 0.1f ? randomInt(5) : randomInt(1 << 20);
+- final byte[] data = randomArray(size, randomBoolean() ? randomIntBetween(1, 5) : randomIntBetween(6, 100));
+- testRoundTrip(data);
+- }
+-
+- @Test
+- public void testRoundtripEmpty() throws IOException {
+- testRoundTrip(new byte[0]);
+- }
+-
+- @Test
+- public void testDoubleClose() throws IOException {
+- final byte[] testBytes = "Testing!".getBytes(Charset.forName("UTF-8"));
+-
+- ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+- LZ4BlockOutputStream out = new LZ4BlockOutputStream(bytes);
+-
+- out.write(testBytes);
+-
+- out.close();
+- out.close();
+-
+- LZ4BlockInputStream in = new LZ4BlockInputStream(new ByteArrayInputStream(bytes.toByteArray()));
+- byte[] actual = new byte[testBytes.length];
+- in.read(actual);
+-
+- assertArrayEquals(testBytes, actual);
+-
+- in.close();
+- in.close();
+- }
+-
+- private static int readFully(InputStream in, byte[] b) throws IOException {
+- int total;
+- int result;
+- for (total = 0; total < b.length; total += result) {
+- result = in.read(b, total, b.length - total);
+- if(result == -1) {
+- break;
+- }
+- }
+- return total;
+- }
+-
+- @Test
+- public void testConcatenationOfSerializedStreams() throws IOException {
+- final byte[] testBytes1 = randomArray(64, 256);
+- final byte[] testBytes2 = randomArray(64, 256);
+- byte[] expected = new byte[128];
+- System.arraycopy(testBytes1, 0, expected, 0, 64);
+- System.arraycopy(testBytes2, 0, expected, 64, 64);
+-
+- ByteArrayOutputStream bytes1os = new ByteArrayOutputStream();
+- LZ4BlockOutputStream out1 = new LZ4BlockOutputStream(bytes1os);
+- out1.write(testBytes1);
+- out1.close();
+-
+- ByteArrayOutputStream bytes2os = new ByteArrayOutputStream();
+- LZ4BlockOutputStream out2 = new LZ4BlockOutputStream(bytes2os);
+- out2.write(testBytes2);
+- out2.close();
+-
+- byte[] bytes1 = bytes1os.toByteArray();
+- byte[] bytes2 = bytes2os.toByteArray();
+- byte[] concatenatedBytes = new byte[bytes1.length + bytes2.length];
+- System.arraycopy(bytes1, 0, concatenatedBytes, 0, bytes1.length);
+- System.arraycopy(bytes2, 0, concatenatedBytes, bytes1.length, bytes2.length);
+-
+- // In a default behaviour, we can read the first block of the concatenated bytes only
+- LZ4BlockInputStream in1 = new LZ4BlockInputStream(new ByteArrayInputStream(concatenatedBytes));
+- byte[] actual1 = new byte[128];
+- assertEquals(64, readFully(in1, actual1));
+- assertEquals(-1, in1.read());
+- in1.close();
+-
+- // Check if we can read concatenated byte stream
+- LZ4BlockInputStream in2 = new LZ4BlockInputStream(new ByteArrayInputStream(concatenatedBytes), false);
+- byte[] actual2 = new byte[128];
+- assertEquals(128, readFully(in2, actual2));
+- assertEquals(-1, in2.read());
+- in2.close();
+-
+- assertArrayEquals(expected, actual2);
+- }
+-}
+diff --git a/src/test/net/jpountz/lz4/LZ4Test.java b/src/test/net/jpountz/lz4/LZ4Test.java
+deleted file mode 100644
+index 161899c..0000000
+--- a/src/test/net/jpountz/lz4/LZ4Test.java
++++ /dev/null
+@@ -1,562 +0,0 @@
+-package net.jpountz.lz4;
+-
+-/*
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-import static net.jpountz.lz4.Instances.COMPRESSORS;
+-import static net.jpountz.lz4.Instances.FAST_DECOMPRESSORS;
+-import static net.jpountz.lz4.Instances.SAFE_DECOMPRESSORS;
+-
+-import java.io.ByteArrayOutputStream;
+-import java.io.IOException;
+-import java.nio.ByteBuffer;
+-import java.nio.ReadOnlyBufferException;
+-import java.util.Arrays;
+-import java.io.File;
+-import java.io.FilenameFilter;
+-
+-import org.junit.Test;
+-import static org.junit.Assert.*;
+-
+-import com.carrotsearch.randomizedtesting.annotations.Repeat;
+-
+-public class LZ4Test extends AbstractLZ4Test {
+-
+- @Test
+- public void testLockFileOfTemporaryNativeLibrary() {
+- // Load the native library
+- LZ4JNI.LZ4_compressBound(100);
+- String tempFolder = new File(System.getProperty("java.io.tmpdir")).getAbsolutePath();
+- File tempDir = new File(new File(System.getProperty("java.io.tmpdir")).getAbsolutePath());
+- if (!System.getProperty("os.name").contains("Windows")) {
+- // A temporary library must be accompanied by a lock file.
+- // On Windows, JVM does not remove a temporary library on exit.
+- // This means on Windows, there might be a temporary library
+- // that is not accompanied by a lock file when there was
+- // a Java process using lz4-java that was running concurrently
+- // to this test process.
+- File[] tempLibFiles = tempDir.listFiles(new FilenameFilter() {
+- public boolean accept(File dir, String name) {
+- return name.startsWith("liblz4-java-") && !name.endsWith(".lck");
+- }
+- });
+- if (tempLibFiles != null) {
+- for (File tempLibFile : tempLibFiles) {
+- File lckFile = new File(tempLibFile.getAbsolutePath() + ".lck");
+- assertTrue(tempLibFile.getAbsolutePath(), lckFile.exists());
+- }
+- }
+- }
+- // A lock file must be accompanied by a temporary library.
+- File[] tempLockFiles = tempDir.listFiles(new FilenameFilter() {
+- public boolean accept(File dir, String name) {
+- return name.startsWith("liblz4-java-") && name.endsWith(".lck");
+- }
+- });
+- if (tempLockFiles != null) {
+- for (File tempLockFile : tempLockFiles) {
+- String tempLockFilePath = tempLockFile.getAbsolutePath();
+- File libFile = new File(tempLockFilePath.substring(0, tempLockFilePath.length() - 4));
+- assertTrue(tempLockFilePath, libFile.exists());
+- }
+- }
+- }
+-
+- @Test
+- @Repeat(iterations=50)
+- public void testMaxCompressedLength() {
+- final int len = randomBoolean() ? randomInt(16) : randomInt(1 << 30);
+- for (LZ4Compressor compressor : COMPRESSORS) {
+- assertEquals(LZ4JNI.LZ4_compressBound(len), compressor.maxCompressedLength(len));
+- }
+- }
+-
+- private static byte[] getCompressedWorstCase(byte[] decompressed) {
+- ByteArrayOutputStream baos = new ByteArrayOutputStream();
+- int len = decompressed.length;
+- if (len >= LZ4Constants.RUN_MASK) {
+- baos.write(LZ4Constants.RUN_MASK << LZ4Constants.ML_BITS);
+- len -= LZ4Constants.RUN_MASK;
+- }
+- while (len >= 255) {
+- baos.write(255);
+- len -= 255;
+- }
+- baos.write(len);
+- try {
+- baos.write(decompressed);
+- } catch (IOException e) {
+- throw new AssertionError();
+- }
+- return baos.toByteArray();
+- }
+-
+- @Test
+- public void testEmpty() {
+- testRoundTrip(new byte[0]);
+- }
+-
+- public void testUncompressWorstCase(LZ4FastDecompressor decompressor) {
+- final int len = randomInt(100 * 1024);
+- final int max = randomIntBetween(1, 255);
+- byte[] decompressed = randomArray(len, max);
+- byte[] compressed = getCompressedWorstCase(decompressed);
+- byte[] restored = new byte[decompressed.length];
+- int cpLen = decompressor.decompress(compressed, 0, restored, 0, decompressed.length);
+- assertEquals(compressed.length, cpLen);
+- assertArrayEquals(decompressed, restored);
+- }
+-
+- @Test
+- public void testUncompressWorstCase() {
+- for (LZ4FastDecompressor decompressor : FAST_DECOMPRESSORS) {
+- testUncompressWorstCase(decompressor);
+- }
+- }
+-
+- public void testUncompressWorstCase(LZ4SafeDecompressor decompressor) {
+- final int len = randomInt(100 * 1024);
+- final int max = randomIntBetween(1, 256);
+- byte[] decompressed = randomArray(len, max);
+- byte[] compressed = getCompressedWorstCase(decompressed);
+- byte[] restored = new byte[decompressed.length];
+- int uncpLen = decompressor.decompress(compressed, 0, compressed.length, restored, 0);
+- assertEquals(decompressed.length, uncpLen);
+- assertArrayEquals(decompressed, restored);
+- }
+-
+- @Test
+- public void testUncompressSafeWorstCase() {
+- for (LZ4SafeDecompressor decompressor : SAFE_DECOMPRESSORS) {
+- testUncompressWorstCase(decompressor);
+- }
+- }
+-
+- public void testRoundTrip(byte[] data, int off, int len,
+- LZ4Compressor compressor,
+- LZ4FastDecompressor decompressor,
+- LZ4SafeDecompressor decompressor2) {
+- for (Tester<?> tester : Arrays.asList(Tester.BYTE_ARRAY, Tester.BYTE_BUFFER, Tester.BYTE_ARRAY_WITH_LENGTH, Tester.BYTE_BUFFER_WITH_LENGTH)) {
+- testRoundTrip(tester, data, off, len, compressor, decompressor, decompressor2);
+- }
+- }
+-
+- public <T> void testRoundTrip(
+- Tester<T> tester,
+- byte[] data, int off, int len,
+- LZ4Compressor compressor,
+- LZ4FastDecompressor decompressor,
+- LZ4SafeDecompressor decompressor2) {
+- final int maxCompressedLength = tester.maxCompressedLength(len);
+- // "maxCompressedLength + 1" for the over-estimated compressed length test below
+- final T compressed = tester.allocate(maxCompressedLength + 1);
+- final int compressedLen = tester.compress(compressor,
+- tester.copyOf(data), off, len,
+- compressed, 0, maxCompressedLength);
+-
+- // test decompression
+- final T restored = tester.allocate(len);
+- assertEquals(compressedLen, tester.decompress(decompressor, compressed, 0, restored, 0, len));
+- assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
+-
+- // make sure it fails if the compression dest is not large enough
+- tester.fill(restored, randomByte());
+- final T compressed2 = tester.allocate(compressedLen-1);
+- try {
+- final int compressedLen2 = tester.compress(compressor,
+- tester.copyOf(data), off, len,
+- compressed2, 0, compressedLen - 1);
+- // Compression can succeed even with the smaller dest
+- // because the compressor is allowed to return different compression results
+- // even when it is invoked with the same input data.
+- // In this case, just make sure the compressed data can be successfully decompressed.
+- assertEquals(compressedLen2, tester.decompress(decompressor, compressed2, 0, restored, 0, len));
+- assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
+- } catch (LZ4Exception e) {
+- // OK
+- }
+-
+- if (tester != Tester.BYTE_ARRAY_WITH_LENGTH && tester != Tester.BYTE_BUFFER_WITH_LENGTH) {
+- if (len > 0) {
+- // decompression dest is too small
+- try {
+- tester.decompress(decompressor, compressed, 0, restored, 0, len - 1);
+- fail();
+- } catch (LZ4Exception e) {
+- // OK
+- }
+- }
+-
+- // decompression dest is too large
+- final T restored2 = tester.allocate(len+1);
+- try {
+- final int cpLen = tester.decompress(decompressor, compressed, 0, restored2, 0, len + 1);
+- fail("compressedLen=" + cpLen);
+- } catch (LZ4Exception e) {
+- // OK
+- }
+-
+- // try decompression when only the size of the compressed buffer is known
+- if (len > 0) {
+- tester.fill(restored, randomByte());
+- assertEquals(len, tester.decompress(decompressor2, compressed, 0, compressedLen, restored, 0, len));
+- assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
+- tester.fill(restored, randomByte());
+- } else {
+- assertEquals(0, tester.decompress(decompressor2, compressed, 0, compressedLen, tester.allocate(1), 0, 1));
+- }
+-
+- // over-estimated compressed length
+- try {
+- final int decompressedLen = tester.decompress(decompressor2, compressed, 0, compressedLen + 1, tester.allocate(len + 100), 0, len + 100);
+- fail("decompressedLen=" + decompressedLen);
+- } catch (LZ4Exception e) {
+- // OK
+- }
+-
+- // under-estimated compressed length
+- try {
+- final int decompressedLen = tester.decompress(decompressor2, compressed, 0, compressedLen - 1, tester.allocate(len + 100), 0, len + 100);
+- if (!(decompressor2 instanceof LZ4JNISafeDecompressor)) {
+- fail("decompressedLen=" + decompressedLen);
+- }
+- } catch (LZ4Exception e) {
+- // OK
+- }
+- }
+- }
+-
+- public void testRoundTrip(byte[] data, int off, int len, LZ4Factory compressorFactory, LZ4Factory decompressorFactory) {
+- for (LZ4Compressor compressor : Arrays.asList(
+- compressorFactory.fastCompressor(), compressorFactory.highCompressor())) {
+- testRoundTrip(data, off, len, compressor, decompressorFactory.fastDecompressor(), decompressorFactory.safeDecompressor());
+- }
+- }
+-
+- public void testRoundTrip(byte[] data, int off, int len) {
+- for (LZ4Factory compressorFactory : Arrays.asList(
+- LZ4Factory.nativeInstance(),
+- LZ4Factory.unsafeInstance(),
+- LZ4Factory.safeInstance())) {
+- for (LZ4Factory decompressorFactory : Arrays.asList(
+- LZ4Factory.nativeInstance(),
+- LZ4Factory.unsafeInstance(),
+- LZ4Factory.safeInstance())) {
+- testRoundTrip(data, off, len, compressorFactory, decompressorFactory);
+- }
+- }
+- }
+-
+- public void testRoundTrip(byte[] data) {
+- testRoundTrip(data, 0, data.length);
+- }
+-
+- public void testRoundTrip(String resource) throws IOException {
+- final byte[] data = readResource(resource);
+- testRoundTrip(data);
+- }
+-
+- @Test
+- public void testRoundtripGeo() throws IOException {
+- testRoundTrip("/calgary/geo");
+- }
+-
+- @Test
+- public void testRoundtripBook1() throws IOException {
+- testRoundTrip("/calgary/book1");
+- }
+-
+- @Test
+- public void testRoundtripPic() throws IOException {
+- testRoundTrip("/calgary/pic");
+- }
+-
+- @Test
+- public void testNullMatchDec() {
+- // 1 literal, 4 matchs with matchDec=0, 8 literals
+- final byte[] invalid = new byte[] { 16, 42, 0, 0, (byte) 128, 42, 42, 42, 42, 42, 42, 42, 42 };
+- // decompression should neither throw an exception nor loop indefinitely
+- for (LZ4FastDecompressor decompressor : FAST_DECOMPRESSORS) {
+- decompressor.decompress(invalid, 0, new byte[13], 0, 13);
+- }
+- for (LZ4SafeDecompressor decompressor : SAFE_DECOMPRESSORS) {
+- decompressor.decompress(invalid, 0, invalid.length, new byte[20], 0);
+- }
+- }
+-
+- @Test
+- public void testEndsWithMatch() {
+- // 6 literals, 4 matchs
+- final byte[] invalid = new byte[] { 96, 42, 43, 44, 45, 46, 47, 5, 0 };
+- final int decompressedLength = 10;
+-
+- for (LZ4FastDecompressor decompressor : FAST_DECOMPRESSORS) {
+- try {
+- // it is invalid to end with a match, should be at least 5 literals
+- decompressor.decompress(invalid, 0, new byte[decompressedLength], 0, decompressedLength);
+- assertTrue(decompressor.toString(), false);
+- } catch (LZ4Exception e) {
+- // OK
+- }
+- }
+-
+- for (LZ4SafeDecompressor decompressor : SAFE_DECOMPRESSORS) {
+- try {
+- // it is invalid to end with a match, should be at least 5 literals
+- decompressor.decompress(invalid, 0, invalid.length, new byte[20], 0);
+- assertTrue(false);
+- } catch (LZ4Exception e) {
+- // OK
+- }
+- }
+- }
+-
+- @Test
+- public void testEndsWithLessThan5Literals() {
+- // 6 literals, 4 matchs
+- final byte[] invalidBase = new byte[] { 96, 42, 43, 44, 45, 46, 47, 5, 0 };
+-
+- for (int i = 1; i < 5; ++i) {
+- final byte[] invalid = Arrays.copyOf(invalidBase, invalidBase.length + 1 + i);
+- invalid[invalidBase.length] = (byte) (i << 4); // i literals at the end
+-
+- for (LZ4FastDecompressor decompressor : FAST_DECOMPRESSORS) {
+- try {
+- // it is invalid to end with a match, should be at least 5 literals
+- decompressor.decompress(invalid, 0, new byte[20], 0, 20);
+- assertTrue(decompressor.toString(), false);
+- } catch (LZ4Exception e) {
+- // OK
+- }
+- }
+-
+- for (LZ4SafeDecompressor decompressor : SAFE_DECOMPRESSORS) {
+- try {
+- // it is invalid to end with a match, should be at least 5 literals
+- decompressor.decompress(invalid, 0, invalid.length, new byte[20], 0);
+- assertTrue(false);
+- } catch (LZ4Exception e) {
+- // OK
+- }
+- }
+- }
+- }
+-
+- @Test
+- public void testWriteToReadOnlyBuffer() {
+- for (LZ4Compressor compressor : COMPRESSORS) {
+- ByteBuffer in = Tester.BYTE_BUFFER.copyOf(new byte[] {2, 3});
+- ByteBuffer out = Tester.BYTE_BUFFER.allocate(100).asReadOnlyBuffer();
+- try {
+- compressor.compress(in, out);
+- fail();
+- } catch (ReadOnlyBufferException e) {
+- // ok
+- }
+- }
+- for (LZ4SafeDecompressor decompressor : SAFE_DECOMPRESSORS) {
+- ByteBuffer in = Tester.BYTE_BUFFER.copyOf(COMPRESSORS[0].compress(new byte[] {2, 3}));
+- ByteBuffer out = Tester.BYTE_BUFFER.allocate(100).asReadOnlyBuffer();
+- try {
+- decompressor.decompress(in, out);
+- fail();
+- } catch (ReadOnlyBufferException e) {
+- // ok
+- }
+- }
+- for (LZ4FastDecompressor decompressor : FAST_DECOMPRESSORS) {
+- ByteBuffer in = Tester.BYTE_BUFFER.copyOf(COMPRESSORS[0].compress(new byte[] {2, 3}));
+- ByteBuffer out = Tester.BYTE_BUFFER.allocate(100).asReadOnlyBuffer();
+- out.limit(2);
+- try {
+- decompressor.decompress(in, out);
+- fail();
+- } catch (ReadOnlyBufferException e) {
+- // ok
+- }
+- }
+- }
+-
+- @Test
+- @Repeat(iterations=5)
+- public void testAllEqual() {
+- final int len = randomBoolean() ? randomInt(20) : randomInt(100000);
+- final byte[] buf = new byte[len];
+- Arrays.fill(buf, randomByte());
+- testRoundTrip(buf);
+- }
+-
+- @Test
+- public void testMaxDistance() {
+- final int len = randomIntBetween(1 << 17, 1 << 18);
+- final int off = randomInt(len - (1 << 16) - (1 << 15));
+- final byte[] buf = new byte[len];
+- for (int i = 0; i < (1 << 15); ++i) {
+- buf[off + i] = randomByte();
+- }
+- System.arraycopy(buf, off, buf, off + 65535, 1 << 15);
+- testRoundTrip(buf);
+- }
+-
+- @Test
+- @Repeat(iterations=10)
+- public void testRandomData() {
+- final int n = randomIntBetween(1, 15);
+- final int off = randomInt(1000);
+- final int len = randomBoolean() ? randomInt(1 << 16) : randomInt(1 << 20);
+- final byte[] data = randomArray(off + len + randomInt(100), n);
+- testRoundTrip(data, off, len);
+- }
+-
+- @Test
+- // https://github.com/jpountz/lz4-java/issues/12
+- public void testRoundtripIssue12() {
+- byte[] data = new byte[]{
+- 14, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 72, 14, 72, 14, 85, 3, 72, 14, 72, 14, 72, 14, 72, 14, 72, 14, 72, 14, 85, 3, 72,
+- 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 85, 3, 72, 14, 50, 64, 0, 46, -1, 0, 0, 0, 29, 3, 85,
+- 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3,
+- 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113,
+- 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113,
+- 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 50, 64, 0, 47, -105, 0, 0, 0, 30, 3, -97, 6, 0, 68, -113,
+- 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85,
+- 8, -113, 0, 68, -97, 3, 0, 2, -97, 6, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97,
+- 6, 0, 68, -113, 0, 120, 64, 0, 48, 4, 0, 0, 0, 31, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72,
+- 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72,
+- 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72,
+- 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72,
+- 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72,
+- 41, 72, 32, 72, 18, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+- 0, 39, 24, 32, 34, 124, 0, 120, 64, 0, 48, 80, 0, 0, 0, 31, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72,
+- 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72,
+- 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72,
+- 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72,
+- 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72,
+- 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72,
+- 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72,
+- 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72,
+- 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72,
+- 22, 72, 31, 72, 43, 72, 19, 72, 34, 72, 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72,
+- 38, 72, 26, 72, 28, 72, 42, 72, 24, 72, 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 72, 34, 72,
+- 29, 72, 37, 72, 35, 72, 45, 72, 23, 72, 46, 72, 20, 72, 40, 72, 33, 72, 25, 72, 39, 72, 38, 72, 26, 72, 28, 72, 42, 72, 24, 72,
+- 27, 72, 36, 72, 41, 72, 32, 72, 18, 72, 30, 72, 22, 72, 31, 72, 43, 72, 19, 50, 64, 0, 49, 20, 0, 0, 0, 32, 3, -97, 6, 0,
+- 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97,
+- 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2,
+- 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2,
+- 3, -97, 6, 0, 50, 64, 0, 50, 53, 0, 0, 0, 34, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97,
+- 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3,
+- -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97,
+- 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3,
+- 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0,
+- 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3,
+- -97, 6, 0, 50, 64, 0, 51, 85, 0, 0, 0, 36, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97,
+- 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, -97, 5, 0, 2, 3, 85, 8, -113, 0, 68,
+- -97, 3, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0,
+- 68, -113, 0, 2, 3, -97, 6, 0, 50, -64, 0, 51, -45, 0, 0, 0, 37, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6,
+- 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, -97, 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -113, 0, 2, 3, -97,
+- 6, 0, 68, -113, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 2, 3, 85, 8, -113, 0, 68, -97, 3, 0, 120, 64, 0, 52, -88, 0, 0,
+- 0, 39, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72,
+- 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85,
+- 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85,
+- 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85,
+- 5, 72, 13, 85, 5, 72, 13, 72, 13, 72, 13, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, 72,
+- 13, 85, 5, 72, 13, 72, 13, 85, 5, 72, 13, -19, -24, -101, -35
+- };
+- testRoundTrip(data, 9, data.length - 9);
+- }
+-
+- private static void assertCompressedArrayEquals(String message, byte[] expected, byte[] actual) {
+- int off = 0;
+- int decompressedOff = 0;
+- while (true) {
+- if (off == expected.length) {
+- break;
+- }
+- final Sequence sequence1 = readSequence(expected, off);
+- final Sequence sequence2 = readSequence(actual, off);
+- assertEquals(message + ", off=" + off + ", decompressedOff=" + decompressedOff, sequence1, sequence2);
+- off += sequence1.length;
+- decompressedOff += sequence1.literalLen + sequence1.matchLen;
+- }
+- }
+-
+- private static Sequence readSequence(byte[] buf, int off) {
+- final int start = off;
+- final int token = buf[off++] & 0xFF;
+- int literalLen = token >>> 4;
+- if (literalLen >= 0x0F) {
+- int len;
+- while ((len = buf[off++] & 0xFF) == 0xFF) {
+- literalLen += 0xFF;
+- }
+- literalLen += len;
+- }
+- off += literalLen;
+- if (off == buf.length) {
+- return new Sequence(literalLen, -1, -1, off - start);
+- }
+- int matchDec = (buf[off++] & 0xFF) | ((buf[off++] & 0xFF) << 8);
+- int matchLen = token & 0x0F;
+- if (matchLen >= 0x0F) {
+- int len;
+- while ((len = buf[off++] & 0xFF) == 0xFF) {
+- matchLen += 0xFF;
+- }
+- matchLen += len;
+- }
+- matchLen += 4;
+- return new Sequence(literalLen, matchDec, matchLen, off - start);
+- }
+-
+- private static class Sequence {
+- final int literalLen, matchDec, matchLen, length;
+-
+- public Sequence(int literalLen, int matchDec, int matchLen, int length) {
+- this.literalLen = literalLen;
+- this.matchDec = matchDec;
+- this.matchLen = matchLen;
+- this.length = length;
+- }
+-
+- @Override
+- public String toString() {
+- return "Sequence [literalLen=" + literalLen + ", matchDec=" + matchDec
+- + ", matchLen=" + matchLen + "]";
+- }
+-
+- @Override
+- public int hashCode() {
+- return 42;
+- }
+-
+- @Override
+- public boolean equals(Object obj) {
+- if (this == obj)
+- return true;
+- if (obj == null)
+- return false;
+- if (getClass() != obj.getClass())
+- return false;
+- Sequence other = (Sequence) obj;
+- if (literalLen != other.literalLen)
+- return false;
+- if (matchDec != other.matchDec)
+- return false;
+- if (matchLen != other.matchLen)
+- return false;
+- return true;
+- }
+-
+- }
+-
+-}
+diff --git a/src/test/net/jpountz/xxhash/XXHash32Test.java b/src/test/net/jpountz/xxhash/XXHash32Test.java
+deleted file mode 100644
+index 98c9436..0000000
+--- a/src/test/net/jpountz/xxhash/XXHash32Test.java
++++ /dev/null
+@@ -1,189 +0,0 @@
+-package net.jpountz.xxhash;
+-
+-/*
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-import java.nio.ByteBuffer;
+-
+-import net.jpountz.lz4.AbstractLZ4Test;
+-import net.jpountz.util.SafeUtils;
+-
+-import org.junit.Test;
+-import static org.junit.Assert.*;
+-
+-import com.carrotsearch.randomizedtesting.annotations.Repeat;
+-
+-public class XXHash32Test extends AbstractLZ4Test {
+-
+- private static abstract class StreamingXXHash32Adapter extends XXHash32 {
+-
+- protected abstract StreamingXXHash32 streamingHash(int seed);
+-
+- @Override
+- public int hash(byte[] buf, int off, int len, int seed) {
+- SafeUtils.checkRange(buf, off, len);
+- int originalOff = off;
+- int remainingPasses = randomInt(5);
+- StreamingXXHash32 h = streamingHash(seed);
+- final int end = off + len;
+- while (off < end) {
+- final int l = randomIntBetween(off, end) - off;
+- h.update(buf, off, l);
+- off += l;
+- if (remainingPasses > 0 && randomInt(5) == 0) {
+- h.reset();
+- --remainingPasses;
+- off = originalOff;
+- }
+- if (randomBoolean()) {
+- h.getValue();
+- }
+- }
+- return h.getValue();
+- }
+-
+- @Override
+- public int hash(ByteBuffer buf, int off, int len, int seed) {
+- byte[] bytes = new byte[len];
+- int originalPosition = buf.position();
+- try {
+- buf.position(off);
+- buf.get(bytes, 0, len);
+- return hash(bytes, 0, len, seed);
+- } finally {
+- buf.position(originalPosition);
+- }
+- }
+-
+- public String toString() {
+- return streamingHash(0).toString();
+- }
+-
+- }
+-
+- private static XXHash32[] INSTANCES = new XXHash32[] {
+- XXHashFactory.nativeInstance().hash32(),
+- XXHashFactory.unsafeInstance().hash32(),
+- XXHashFactory.safeInstance().hash32(),
+- new StreamingXXHash32Adapter() {
+- protected StreamingXXHash32 streamingHash(int seed) {
+- return XXHashFactory.nativeInstance().newStreamingHash32(seed);
+- }
+- },
+- new StreamingXXHash32Adapter() {
+- protected StreamingXXHash32 streamingHash(int seed) {
+- return XXHashFactory.unsafeInstance().newStreamingHash32(seed);
+- }
+- },
+- new StreamingXXHash32Adapter() {
+- protected StreamingXXHash32 streamingHash(int seed) {
+- return XXHashFactory.safeInstance().newStreamingHash32(seed);
+- }
+- }
+- };
+-
+- @Test
+- public void testEmpty() {
+- final int seed = randomInt();
+- for (XXHash32 xxHash : INSTANCES) {
+- xxHash.hash(new byte[0], 0, 0, seed);
+- xxHash.hash(copyOf(new byte[0], 0, 0), 0, 0, seed);
+- }
+- }
+-
+- @Test
+- @Repeat(iterations = 20)
+- public void testAIOOBE() {
+- final int seed = randomInt();
+- final int max = randomBoolean() ? 32 : 1000;
+- final int bufLen = randomIntBetween(1, max);
+- final byte[] buf = randomArray(bufLen, 256);
+- final int off = randomInt(buf.length - 1);
+- final int len = randomInt(buf.length - off);
+- for (XXHash32 xxHash : INSTANCES) {
+- xxHash.hash(buf, off, len, seed);
+- xxHash.hash(copyOf(buf, off, len), off, len, seed);
+- }
+- }
+-
+- @Test
+- @Repeat(iterations=40)
+- public void testInstances() {
+- final int maxLenLog = randomInt(20);
+- final int bufLen = randomInt(1 << maxLenLog);
+- byte[] buf = randomArray(bufLen, 256);
+- final int seed = randomInt();
+- final int off = randomIntBetween(0, Math.max(0, bufLen - 1));
+- final int len = randomIntBetween(0, bufLen - off);
+-
+- final int ref = XXHashFactory.nativeInstance().hash32().hash(buf, off, len, seed);
+- for (XXHash32 hash : INSTANCES) {
+- final int h = hash.hash(buf, off, len, seed);
+- assertEquals(hash.toString(), ref, h);
+- final ByteBuffer copy = copyOf(buf, off, len);
+- final int h2 = hash.hash(copy, off, len, seed);
+- assertEquals(off, copy.position());
+- assertEquals(len, copy.remaining());
+- assertEquals(hash.toString(), ref, h2);
+- }
+- }
+-
+- @Test
+- public void test4GB() {
+- byte[] bytes = new byte[randomIntBetween(1 << 22, 1 << 26)];
+- for (int i = 0; i < bytes.length; ++i) {
+- bytes[i] = randomByte();
+- }
+- final int off = randomInt(5);
+- final int len = randomIntBetween(bytes.length - off - 1024, bytes.length - off);
+- long totalLen = 0;
+- final int seed = randomInt();
+- StreamingXXHash32 hash1 = XXHashFactory.nativeInstance().newStreamingHash32(seed);
+- StreamingXXHash32 hash2 = XXHashFactory.unsafeInstance().newStreamingHash32(seed);
+- StreamingXXHash32 hash3 = XXHashFactory.safeInstance().newStreamingHash32(seed);
+- while (totalLen < (1L << 33)) {
+- hash1.update(bytes, off, len);
+- hash2.update(bytes, off, len);
+- hash3.update(bytes, off, len);
+- assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
+- assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
+- totalLen += len;
+- }
+- }
+-
+- @Test
+- public void testClose() {
+- StreamingXXHash32 hash = XXHashFactory.nativeInstance().newStreamingHash32(randomInt());
+- hash.close();
+- hash.close();
+- try {
+- hash.getValue();
+- assertTrue(hash.toString(), false);
+- } catch (AssertionError e) {
+- // OK
+- }
+- try {
+- hash.update(null, 0, 0);
+- assertTrue(hash.toString(), false);
+- } catch (AssertionError e) {
+- // OK
+- }
+- try {
+- hash.reset();
+- assertTrue(hash.toString(), false);
+- } catch (AssertionError e) {
+- // OK
+- }
+- }
+-}
+diff --git a/src/test/net/jpountz/xxhash/XXHash64Test.java b/src/test/net/jpountz/xxhash/XXHash64Test.java
+deleted file mode 100644
+index dadbeda..0000000
+--- a/src/test/net/jpountz/xxhash/XXHash64Test.java
++++ /dev/null
+@@ -1,194 +0,0 @@
+-package net.jpountz.xxhash;
+-
+-/*
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-import java.nio.ByteBuffer;
+-
+-import net.jpountz.lz4.AbstractLZ4Test;
+-import net.jpountz.util.SafeUtils;
+-
+-import org.junit.Test;
+-import static org.junit.Assert.*;
+-
+-import com.carrotsearch.randomizedtesting.annotations.Repeat;
+-
+-public class XXHash64Test extends AbstractLZ4Test {
+-
+- private static abstract class StreamingXXHash64Adapter extends XXHash64 {
+-
+- protected abstract StreamingXXHash64 streamingHash(long seed);
+-
+- @Override
+- public long hash(byte[] buf, int off, int len, long seed) {
+- SafeUtils.checkRange(buf, off, len);
+- int originalOff = off;
+- int remainingPasses = randomInt(5);
+- StreamingXXHash64 h = streamingHash(seed);
+- final int end = off + len;
+- while (off < end) {
+- final int l = randomIntBetween(off, end) - off;
+- h.update(buf, off, l);
+- off += l;
+- if (remainingPasses > 0 && randomInt(5) == 0) {
+- h.reset();
+- --remainingPasses;
+- off = originalOff;
+- }
+- if (randomBoolean()) {
+- h.getValue();
+- }
+- }
+- return h.getValue();
+- }
+-
+- @Override
+- public long hash(ByteBuffer buf, int off, int len, long seed) {
+- byte[] bytes = new byte[len];
+- int originalPosition = buf.position();
+- try {
+- buf.position(off);
+- buf.get(bytes, 0, len);
+- return hash(bytes, 0, len, seed);
+- } finally {
+- buf.position(originalPosition);
+- }
+- }
+-
+- public String toString() {
+- return streamingHash(0).toString();
+- }
+-
+- }
+-
+- private static XXHash64[] INSTANCES = new XXHash64[] {
+- XXHashFactory.nativeInstance().hash64(),
+- XXHashFactory.unsafeInstance().hash64(),
+- XXHashFactory.safeInstance().hash64(),
+- new StreamingXXHash64Adapter() {
+- protected StreamingXXHash64 streamingHash(long seed) {
+- return XXHashFactory.nativeInstance().newStreamingHash64(seed);
+- }
+- },
+- new StreamingXXHash64Adapter() {
+- protected StreamingXXHash64 streamingHash(long seed) {
+- return XXHashFactory.unsafeInstance().newStreamingHash64(seed);
+- }
+- },
+- new StreamingXXHash64Adapter() {
+- protected StreamingXXHash64 streamingHash(long seed) {
+- return XXHashFactory.safeInstance().newStreamingHash64(seed);
+- }
+- }
+- };
+-
+- @Test
+- public void testEmpty() {
+- final long seed = randomLong();
+- for (XXHash64 xxHash : INSTANCES) {
+- xxHash.hash(new byte[0], 0, 0, seed);
+- xxHash.hash(copyOf(new byte[0], 0, 0), 0, 0, seed);
+- }
+- }
+-
+- @Test
+- @Repeat(iterations = 20)
+- public void testAIOOBE() {
+- final long seed = randomLong();
+- final int max = randomBoolean() ? 64 : 1000;
+- final int bufLen = randomIntBetween(1, max);
+- final byte[] buf = new byte[bufLen];
+- for (int i = 0; i < buf.length; ++i) {
+- buf[i] = randomByte();
+- }
+- final int off = randomInt(buf.length - 1);
+- final int len = randomInt(buf.length - off);
+- for (XXHash64 xxHash : INSTANCES) {
+- xxHash.hash(buf, off, len, seed);
+- }
+- }
+-
+- @Test
+- @Repeat(iterations=40)
+- public void testInstances() {
+- final int maxLenLog = randomInt(20);
+- final int bufLen = randomInt(1 << maxLenLog);
+- byte[] buf = new byte[bufLen];
+- for (int i = 0; i < bufLen; ++i) {
+- buf[i] = randomByte();
+- }
+- final long seed = randomLong();
+- final int off = randomIntBetween(0, Math.max(0, bufLen - 1));
+- final int len = randomIntBetween(0, bufLen - off);
+-
+- final long ref = XXHashFactory.nativeInstance().hash64().hash(buf, off, len, seed);
+- for (XXHash64 hash : INSTANCES) {
+- final long h = hash.hash(buf, off, len, seed);
+- assertEquals(hash.toString(), ref, h);
+- final ByteBuffer copy = copyOf(buf, off, len);
+- final long h2 = hash.hash(copy, off, len, seed);
+- assertEquals(off, copy.position());
+- assertEquals(len, copy.remaining());
+- assertEquals(hash.toString(), ref, h2);
+- }
+- }
+-
+- @Test
+- public void test4GB() {
+- byte[] bytes = new byte[randomIntBetween(1 << 22, 1 << 26)];
+- for (int i = 0; i < bytes.length; ++i) {
+- bytes[i] = randomByte();
+- }
+- final int off = randomInt(5);
+- final int len = randomIntBetween(bytes.length - off - 1024, bytes.length - off);
+- long totalLen = 0;
+- final long seed = randomLong();
+- StreamingXXHash64 hash1 = XXHashFactory.nativeInstance().newStreamingHash64(seed);
+- StreamingXXHash64 hash2 = XXHashFactory.unsafeInstance().newStreamingHash64(seed);
+- StreamingXXHash64 hash3 = XXHashFactory.safeInstance().newStreamingHash64(seed);
+- while (totalLen < (1L << 33)) {
+- hash1.update(bytes, off, len);
+- hash2.update(bytes, off, len);
+- hash3.update(bytes, off, len);
+- assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
+- assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
+- totalLen += len;
+- }
+- }
+-
+- @Test
+- public void testClose() {
+- StreamingXXHash64 hash = XXHashFactory.nativeInstance().newStreamingHash64(randomInt());
+- hash.close();
+- hash.close();
+- try {
+- hash.getValue();
+- assertTrue(hash.toString(), false);
+- } catch (AssertionError e) {
+- // OK
+- }
+- try {
+- hash.update(null, 0, 0);
+- assertTrue(hash.toString(), false);
+- } catch (AssertionError e) {
+- // OK
+- }
+- try {
+- hash.reset();
+- assertTrue(hash.toString(), false);
+- } catch (AssertionError e) {
+- // OK
+- }
+- }
+-}
diff --git a/lz4-java.spec b/lz4-java.spec
index 0a94e93..c7f85be 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -3,28 +3,29 @@
Name: lz4-java
Version: 1.7.1
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: LZ4 compression for Java
License: ASL 2.0
+# GPLv2+ and BSD for lz4 and xxhash libs that are shared in liblz4-java.so
URL: https://github.com/lz4/lz4-java
Source0: https://github.com/lz4/lz4-java/archive/%{version}.tar.gz
-# lz4-java tests require randomizedtesting, which is not currently
-# shipped or maintained in Fedora.
-Patch0: 0-remove-tests.patch
# lz4-java v1.3.0 introduced usage of sun.misc.Unsafe, which would later become
# depricated in jdk 9 and kept as an unexposed API in later jdk releases.
# lz4-java optionally uses Unsafe to achieve faster compression and decompression,
# however it's implementation is not critical to functionality, and can be removed.
-Patch1: 1-remove-unsafe.patch
+Patch0: 0-remove-unsafe.patch
# After updating mvel to version 2.4.10, MVEL generated classes have formatting issues where
# code after comments are not being formatted with new lines. As a result, including comments
# in the templates results in classes with invalid code following the first comment.
# This patch simply removes comments from the templates so the classes can be generated as expected.
# Related bug: https://github.com/mvel/mvel/issues/152
-Patch2: 2-remove-comments-from-templates.patch
+Patch1: 1-remove-comments-from-templates.patch
# Adds a simple makefile to be run in-place of the cpptasks in the build.xml
-Patch3: 3-remove-cpptasks.patch
+Patch2: 2-remove-cpptasks.patch
+# some lz4-java tests require randomizedtesting, which is not currently
+# shipped or maintained in Fedora; remove those and use system ant-junit to run applicable tests
+Patch3: 3-remove-randomizedtesting-tests.patch
# Build tools
BuildRequires: apache-parent
@@ -35,6 +36,7 @@ BuildRequires: gcc
BuildRequires: ivy-local
BuildRequires: java-devel
BuildRequires: javapackages-local
+BuildRequires: lz4
BuildRequires: lz4-devel
BuildRequires: mvel
BuildRequires: objectweb-asm
@@ -90,11 +92,10 @@ find -name '*.so' -print -delete
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
%endif
-ant -Divy.mode=local -Divy.revision=1.7.1 -Divy.pom.version=1.7.1 jar docs makepom
+ant -Divy.mode=local -Divy.revision=1.7.1 -Divy.pom.version=1.7.1 jar test docs makepom
bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} dist/lz4-java.jar
%install
-%mvn_file net.jpountz.lz4:lz4 lz4
%mvn_artifact dist/lz4-java-%{version}.pom dist/lz4-java-%{version}.jar
%mvn_install -J build/docs
@@ -105,6 +106,11 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
%license LICENSE.txt
%changelog
+* Tue Dec 01 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-9
+- run unit tests on classes that do not require randomizedtesting
+- add liblz4-java.so generation step to Makefile
+- remove mvn_file macro for lz4
+
* Thu Nov 19 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-8
- remove dependency on cpptasks
commit d057d32f5de7aef5c8bfd5b748abe3e176a4041d
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Wed Nov 18 14:12:23 2020 -0500
remove dependency on cpptasks
diff --git a/3-remove-cpptasks.patch b/3-remove-cpptasks.patch
new file mode 100644
index 0000000..c03318b
--- /dev/null
+++ b/3-remove-cpptasks.patch
@@ -0,0 +1,89 @@
+diff --git a/Makefile b/Makefile
+new file mode 100644
+index 0000000..d762404
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,26 @@
++CC = gcc
++
++BUILD_DIR = build
++OBJECTS_DIR = $(BUILD_DIR)/objects
++JNI_HEADERS_DIR = $(BUILD_DIR)/jni-headers
++JNI_SOURCES_DIR = src/jni
++INCLUDE = -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/linux
++
++LIBS = -llz4 -lxxhash
++JNI_PREFIX = net_jpountz_
++
++default: all move_objects
++
++all:
++ $(CC) -I $(JNI_HEADERS_DIR) \
++ $(INCLUDE) \
++ $(LIBS) \
++ -c $(JNI_SOURCES_DIR)/$(JNI_PREFIX)lz4_LZ4JNI.c
++
++ $(CC) -I $(JNI_HEADERS_DIR) \
++ $(INCLUDE) \
++ $(LIBS) \
++ -c $(JNI_SOURCES_DIR)/$(JNI_PREFIX)xxhash_XXHashJNI.c
++
++move_objects:
++ mv *.o $(OBJECTS_DIR)
+\ No newline at end of file
+diff --git a/build.xml b/build.xml
+index 7a63933..dc1a112 100644
+--- a/build.xml
++++ b/build.xml
+@@ -15,7 +15,6 @@
+ -->
+
+ <project name="lz4" default="dist" basedir="."
+- xmlns:cpptasks="antlib:net.sf.antcontrib.cpptasks"
+ xmlns:ivy="antlib:org.apache.ivy.ant"
+ xmlns:junit4="antlib:com.carrotsearch.junit4"
+ xmlns:mvn="antlib:org.apache.maven.artifact.ant">
+@@ -80,13 +79,6 @@
+ <get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.jar.version}/${iv..." dest="${user.home}/.ant/lib/${ivy.jar.name}"/>
+ </target>
+
+- <target name="install-cpptasks" unless="cpptasks.available">
+- <ivy:cachepath organisation="ant-contrib" module="cpptasks" revision="1.0b5"
+- inline="true" conf="default" transitive="true" pathid="cpptasks.classpath"/>
+- <taskdef uri="antlib:net.sf.antcontrib.cpptasks" resource="net/sf/antcontrib/cpptasks/antlib.xml" classpathref="cpptasks.classpath"/>
+- <property name="cpptasks.available" value="true"/>
+- </target>
+-
+ <target name="install-maven-ant-tasks" unless="maven-ant-tasks.available">
+ <ivy:cachepath organisation="org.apache.maven" module="maven-ant-tasks" revision="2.1.3"
+ inline="true" conf="default" transitive="true" pathid="maven-ant-tasks.classpath"/>
+@@ -197,27 +189,10 @@
+ </javah>
+ </target>
+
+- <target name="compile-jni" depends="install-cpptasks,generate-headers" unless="${skip.jni}">
++ <target name="compile-jni" depends="generate-headers" unless="${skip.jni}">
+ <mkdir dir="${build}/objects" />
+ <mkdir dir="${build}/jni/net/jpountz/util/${platform}/${os.arch}" />
+- <cpptasks:cc
+- debug="false"
+- optimize="extreme"
+- objdir="${build}/objects"
+- outfile="${build}/jni/net/jpountz/util/${platform}/${os.arch}/lz4-java"
+- outtype="shared">
+- <includepath path="${src}/lz4/lib" />
+- <includepath path="${java.home}/../include" />
+- <includepath path="${java.home}/../include/${platform}/" />
+- <!-- In Java 9, java.home points not to jre/ but to the top directory -->
+- <includepath path="${java.home}/include" />
+- <includepath path="${java.home}/include/${platform}/" />
+- <includepath path="${build}/jni-headers" />
+- <fileset dir="${src}/lz4/lib" includes="lz4.c, lz4hc.c, xxhash.c" />
+- <fileset dir="${src}/jni" includes="*.c" />
+- <linker />
+- <compilerarg value="-mmacosx-version-min=10.9" if="isMacOS"/>
+- </cpptasks:cc>
++ <exec executable="make" failonerror="true"/>
+ </target>
+
+ <target name="compile" depends="compile-java, compile-jni" />
diff --git a/3-use-system-libs.patch b/3-use-system-libs.patch
deleted file mode 100644
index 1ade925..0000000
--- a/3-use-system-libs.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/build.xml b/build.xml
-index 7a63933..7c04e0c 100644
---- a/build.xml
-+++ b/build.xml
-@@ -206,14 +206,13 @@
- objdir="${build}/objects"
- outfile="${build}/jni/net/jpountz/util/${platform}/${os.arch}/lz4-java"
- outtype="shared">
-- <includepath path="${src}/lz4/lib" />
- <includepath path="${java.home}/../include" />
- <includepath path="${java.home}/../include/${platform}/" />
- <!-- In Java 9, java.home points not to jre/ but to the top directory -->
- <includepath path="${java.home}/include" />
- <includepath path="${java.home}/include/${platform}/" />
- <includepath path="${build}/jni-headers" />
-- <fileset dir="${src}/lz4/lib" includes="lz4.c, lz4hc.c, xxhash.c" />
-+ <libset dir="/usr/lib64" libs="lz4, xxhash" />
- <fileset dir="${src}/jni" includes="*.c" />
- <linker />
- <compilerarg value="-mmacosx-version-min=10.9" if="isMacOS"/>
diff --git a/lz4-java.spec b/lz4-java.spec
index 51cc04b..0a94e93 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -3,9 +3,9 @@
Name: lz4-java
Version: 1.7.1
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: LZ4 compression for Java
-License: ASL 2.0 and (BSD and GPLv2+)
+License: ASL 2.0
URL: https://github.com/lz4/lz4-java
Source0: https://github.com/lz4/lz4-java/archive/%{version}.tar.gz
@@ -23,14 +23,14 @@ Patch1: 1-remove-unsafe.patch
# This patch simply removes comments from the templates so the classes can be generated as expected.
# Related bug: https://github.com/mvel/mvel/issues/152
Patch2: 2-remove-comments-from-templates.patch
-Patch3: 3-use-system-libs.patch
+# Adds a simple makefile to be run in-place of the cpptasks in the build.xml
+Patch3: 3-remove-cpptasks.patch
# Build tools
BuildRequires: apache-parent
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: aqute-bnd
-BuildRequires: cpptasks
BuildRequires: gcc
BuildRequires: ivy-local
BuildRequires: java-devel
@@ -84,6 +84,12 @@ find -name '*.dylib' -print -delete
find -name '*.so' -print -delete
%build
+%if 0%{?fedora} >= 33
+ export JAVA_HOME=/usr/lib/jvm/java-11/
+%else
+ export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
+%endif
+
ant -Divy.mode=local -Divy.revision=1.7.1 -Divy.pom.version=1.7.1 jar docs makepom
bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} dist/lz4-java.jar
@@ -99,6 +105,9 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
%license LICENSE.txt
%changelog
+* Thu Nov 19 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-8
+- remove dependency on cpptasks
+
* Mon Nov 16 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-7
- cleanup whitespace in the local patch to remove comments from templates
- use system lz4 and xxhash instead of bundling the dependencies
commit 7b65df5ec6a1a59bc1340634a6804d2e9dbc7e88
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Mon Nov 16 15:21:36 2020 -0500
use system lz4 and xxhash libs instead of bundling
diff --git a/1-remove-unsafe.patch b/1-remove-unsafe.patch
index 9d7b2e7..90adaf3 100644
--- a/1-remove-unsafe.patch
+++ b/1-remove-unsafe.patch
@@ -728,68 +728,6 @@ index 9a9b4d1..9ccdf76 100644
}
/**
-diff --git a/src/lz4/contrib/debian/control b/src/lz4/contrib/debian/control
-index ac3b460..63b493c 100644
---- a/src/lz4/contrib/debian/control
-+++ b/src/lz4/contrib/debian/control
-@@ -13,11 +13,11 @@ Vcs-Browser: https://github.com/lz4/lz4
-
- Package: liblz4
- Architecture: any
--Depends: ${shlibs:Depends}, ${misc:Depends}
-+Depends: ${shlibs:Depends}
- Description: Extremely Fast Compression algorithm http://www.lz4.org
-
- Package: liblz4-dev
- Architecture: any
--Depends: ${shlibs:Depends}, ${misc:Depends}
-+Depends: ${shlibs:Depends}
- Description: Extremely Fast Compression algorithm http://www.lz4.org
- Development files.
-diff --git a/src/lz4/doc/lz4_manual.html b/src/lz4/doc/lz4_manual.html
-index a477584..8127877 100644
---- a/src/lz4/doc/lz4_manual.html
-+++ b/src/lz4/doc/lz4_manual.html
-@@ -316,10 +316,6 @@ int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
- future. They are therefore only safe to depend on when the caller is
- statically linked against the library.
-
-- To protect against unsafe usage, not only are the declarations guarded,
-- the definitions are hidden by default
-- when building LZ4 as a shared/dynamic library.
--
- In order to access these declarations,
- define LZ4_STATIC_LINKING_ONLY in your application
- before including LZ4's headers.
-diff --git a/src/lz4/ossfuzz/Makefile b/src/lz4/ossfuzz/Makefile
-index 6875eb6..640d1c7 100644
---- a/src/lz4/ossfuzz/Makefile
-+++ b/src/lz4/ossfuzz/Makefile
-@@ -33,8 +33,7 @@ DEBUGFLAGS = -g -DLZ4_DEBUG=$(DEBUGLEVEL)
-
- LZ4_CFLAGS = $(CFLAGS) $(DEBUGFLAGS) $(MOREFLAGS)
- LZ4_CXXFLAGS = $(CXXFLAGS) $(DEBUGFLAGS) $(MOREFLAGS)
--LZ4_CPPFLAGS = $(CPPFLAGS) -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ \
-- -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
-+LZ4_CPPFLAGS = $(CPPFLAGS) -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
-
- FUZZERS := \
- compress_fuzzer \
-diff --git a/src/lz4/ossfuzz/fuzz.h b/src/lz4/ossfuzz/fuzz.h
-index eefac63..b0e9797 100644
---- a/src/lz4/ossfuzz/fuzz.h
-+++ b/src/lz4/ossfuzz/fuzz.h
-@@ -19,10 +19,6 @@
- * It can be undefined, or 0 through 2. If it is undefined, it selects
- * the method to use based on the compiler. If testing with UBSAN set
- * MEM_FORCE_MEMORY_ACCESS=0 to use the standard compliant method.
-- * @param FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
-- * This is the canonical flag to enable deterministic builds for fuzzing.
-- * Changes to zstd for fuzzing are gated behind this define.
-- * It is recommended to define this when building zstd for fuzzing.
- */
-
- #ifndef FUZZ_H
diff --git a/src/test/net/jpountz/lz4/Instances.java b/src/test/net/jpountz/lz4/Instances.java
index b9caae5..44f7809 100644
--- a/src/test/net/jpountz/lz4/Instances.java
diff --git a/2-remove-comments-from-templates.patch b/2-remove-comments-from-templates.patch
index 30ec01c..83fb640 100644
--- a/2-remove-comments-from-templates.patch
+++ b/2-remove-comments-from-templates.patch
@@ -1,94 +1,82 @@
diff --git a/src/build/source_templates/compress.template b/src/build/source_templates/compress.template
-index 0dc3c79..ed47f44 100644
+index 32008e9..09a5df4 100644
--- a/src/build/source_templates/compress.template
+++ b/src/build/source_templates/compress.template
-@@ -16,7 +16,7 @@
+@@ -31,7 +31,6 @@
main:
while (true) {
- // find a match
-+
int forwardOff = sOff;
int ref;
-@@ -36,15 +36,15 @@
+@@ -51,15 +50,12 @@
${type}Utils.writeShort(hashTable, h, sOff - srcOff);
} while (!LZ4${utils}.readIntEquals(src, ref, sOff));
- // catch up
-+
final int excess = LZ4${utils}.commonBytesBackward(src, ref, sOff, srcOff, anchor);
sOff -= excess;
ref -= excess;
- // sequence == refsequence
-+
final int runLen = sOff - anchor;
- // encode literal length
-+
int tokenOff = dOff++;
if (dOff + runLen + (2 + 1 + LAST_LITERALS) + (runLen >>> 8) > destEnd) {
-@@ -58,16 +58,16 @@
+@@ -73,16 +69,13 @@
${utils}.writeByte(dest, tokenOff, runLen << ML_BITS);
}
- // copy literals
-+
LZ4${utils}.wildArraycopy(src, anchor, dest, dOff, runLen);
dOff += runLen;
while (true) {
- // encode offset
-+
${utils}.writeShortLE(dest, dOff, (short) (sOff - ref));
dOff += 2;
- // count nb matches
-+
sOff += MIN_MATCH;
ref += MIN_MATCH;
final int matchLen = LZ4${utils}.commonBytes(src, ref, sOff, srcLimit);
-@@ -76,7 +76,7 @@
+@@ -91,7 +84,6 @@
}
sOff += matchLen;
- // encode match len
-+
if (matchLen >= ML_MASK) {
${utils}.writeByte(dest, tokenOff, ${utils}.readByte(dest, tokenOff) | ML_MASK);
dOff = LZ4${utils}.writeLen(matchLen - ML_MASK, dest, dOff);
-@@ -84,16 +84,16 @@
+@@ -99,16 +91,13 @@
${utils}.writeByte(dest, tokenOff, ${utils}.readByte(dest, tokenOff) | matchLen);
}
- // test end of chunk
-+
if (sOff > mflimit) {
anchor = sOff;
break main;
}
- // fill table
-+
${type}Utils.writeShort(hashTable, hash64k(${utils}.readInt(src, sOff - 2)), sOff - 2 - srcOff);
- // test next position
-+
final int h = hash64k(${utils}.readInt(src, sOff));
ref = srcOff + ${type}Utils.readShort(hashTable, h);
${type}Utils.writeShort(hashTable, h, sOff - srcOff);
-@@ -106,7 +106,7 @@
+@@ -121,7 +110,6 @@
${utils}.writeByte(dest, tokenOff, 0);
}
- // prepare next loop
-+
anchor = sOff++;
}
}
-@@ -145,7 +145,6 @@
+@@ -160,7 +148,6 @@
main:
while (true) {
@@ -96,7 +84,7 @@ index 0dc3c79..ed47f44 100644
int forwardOff = sOff;
int ref;
-@@ -172,10 +171,8 @@
+@@ -187,10 +174,8 @@
sOff -= excess;
ref -= excess;
@@ -107,83 +95,73 @@ index 0dc3c79..ed47f44 100644
int tokenOff = dOff++;
if (dOff + runLen + (2 + 1 + LAST_LITERALS) + (runLen >>> 8) > destEnd) {
-@@ -189,16 +186,16 @@
+@@ -204,16 +189,13 @@
${utils}.writeByte(dest, tokenOff, runLen << ML_BITS);
}
- // copy literals
-+
LZ4${utils}.wildArraycopy(src, anchor, dest, dOff, runLen);
dOff += runLen;
while (true) {
- // encode offset
-+
${utils}.writeShortLE(dest, dOff, back);
dOff += 2;
- // count nb matches
-+
sOff += MIN_MATCH;
final int matchLen = LZ4${utils}.commonBytes(src, ref + MIN_MATCH, sOff, srcLimit);
if (dOff + (1 + LAST_LITERALS) + (matchLen >>> 8) > destEnd) {
-@@ -206,7 +203,7 @@
+@@ -221,7 +203,6 @@
}
sOff += matchLen;
- // encode match len
-+
if (matchLen >= ML_MASK) {
${utils}.writeByte(dest, tokenOff, ${utils}.readByte(dest, tokenOff) | ML_MASK);
dOff = LZ4${utils}.writeLen(matchLen - ML_MASK, dest, dOff);
-@@ -214,16 +211,16 @@
+@@ -229,16 +210,13 @@
${utils}.writeByte(dest, tokenOff, ${utils}.readByte(dest, tokenOff) | matchLen);
}
- // test end of chunk
-+
if (sOff > mflimit) {
anchor = sOff;
break main;
}
- // fill table
-+
${type}Utils.writeInt(hashTable, hash(${utils}.readInt(src, sOff - 2)), sOff - 2);
- // test next position
-+
final int h = hash(${utils}.readInt(src, sOff));
ref = ${type}Utils.readInt(hashTable, h);
${type}Utils.writeInt(hashTable, h, sOff);
-@@ -237,7 +234,7 @@
+@@ -252,7 +230,6 @@
${utils}.writeByte(dest, tokenOff, 0);
}
- // prepare next loop
-+
anchor = sOff++;
}
diff --git a/src/build/source_templates/compress_hc.template b/src/build/source_templates/compress_hc.template
-index b09b705..b250205 100644
+index 7179db3..7976ad1 100644
--- a/src/build/source_templates/compress_hc.template
+++ b/src/build/source_templates/compress_hc.template
-@@ -32,7 +32,7 @@
+@@ -47,7 +47,6 @@
continue;
}
- // saved, in case we would skip too much
-+
copyTo(match1, match0);
search2:
-@@ -40,20 +40,20 @@
+@@ -55,20 +54,19 @@
assert match1.start >= anchor;
if (match1.end() >= mfLimit
|| !ht.insertAndFindWiderMatch(src, match1.end() - 2, match1.start + 1, matchLimit, match1.len, match2)) {
- // no better match
-+
dOff = LZ4${utils}.encodeSequence(src, anchor, match1.start, match1.ref, match1.len, dest, dOff, destEnd);
anchor = sOff = match1.end();
continue main;
@@ -191,32 +169,29 @@ index b09b705..b250205 100644
if (match0.start < match1.start) {
- if (match2.start < match1.start + match0.len) { // empirical
-+ if (match2.start < match1.start + match0.len) {
++ if (match2.start < match1.start + match0.len) {
copyTo(match0, match1);
}
}
assert match2.start > match1.start;
- if (match2.start - match1.start < 3) { // First Match too small : removed
-+ if (match2.start - match1.start < 3) {
++ if (match2.start - match1.start < 3) {
copyTo(match2, match1);
continue search2;
}
-@@ -76,21 +76,21 @@
+@@ -91,21 +89,18 @@
if (match2.start + match2.len >= mfLimit
|| !ht.insertAndFindWiderMatch(src, match2.end() - 3, match2.start, matchLimit, match2.len, match3)) {
- // no better match -> 2 sequences to encode
-+
if (match2.start < match1.end()) {
match1.len = match2.start - match1.start;
}
- // encode seq 1
-+
dOff = LZ4${utils}.encodeSequence(src, anchor, match1.start, match1.ref, match1.len, dest, dOff, destEnd);
anchor = sOff = match1.end();
- // encode seq 2
-+
dOff = LZ4${utils}.encodeSequence(src, anchor, match2.start, match2.ref, match2.len, dest, dOff, destEnd);
anchor = sOff = match2.end();
continue main;
@@ -224,25 +199,24 @@ index b09b705..b250205 100644
- if (match3.start < match1.end() + 3) { // Not enough space for match 2 : remove it
- if (match3.start >= match1.end()) { // // can write Seq1 immediately ==> Seq2 is removed, so Seq3 becomes Seq1
-+ if (match3.start < match1.end() + 3) {
-+ if (match3.start >= match1.end()) {
++ if (match3.start < match1.end() + 3) {
++ if (match3.start >= match1.end()) {
if (match2.start < match1.end()) {
final int correction = match1.end() - match2.start;
match2.fix(correction);
-@@ -112,7 +112,7 @@
+@@ -127,7 +122,6 @@
continue search3;
}
- // OK, now we have 3 ascending matches; let's write at least the first one
-+
if (match2.start < match1.end()) {
if (match2.start - match1.start < ML_MASK) {
if (match1.len > OPTIMAL_ML) {
diff --git a/src/build/source_templates/decompress.template b/src/build/source_templates/decompress.template
-index 09c0ca8..fce5ace 100644
+index f1c2890..1e2aa23 100644
--- a/src/build/source_templates/decompress.template
+++ b/src/build/source_templates/decompress.template
-@@ -40,7 +40,6 @@
+@@ -55,7 +55,6 @@
final int token = ${utils}.readByte(src, sOff) & 0xFF;
++sOff;
@@ -250,7 +224,7 @@ index 09c0ca8..fce5ace 100644
int literalLen = token >>> ML_BITS;
if (literalLen == RUN_MASK) {
byte len = (byte) 0xFF;
-@@ -66,7 +65,7 @@
+@@ -81,7 +80,7 @@
LZ4${utils}.safeArraycopy(src, sOff, dest, dOff, literalLen);
sOff += literalLen;
dOff = literalCopyEnd;
@@ -259,7 +233,7 @@ index 09c0ca8..fce5ace 100644
}
}
-@@ -74,7 +73,6 @@
+@@ -89,7 +88,6 @@
sOff += literalLen;
dOff = literalCopyEnd;
@@ -268,10 +242,10 @@ index 09c0ca8..fce5ace 100644
sOff += 2;
int matchOff = dOff - matchDec;
diff --git a/src/build/source_templates/hashtable.template b/src/build/source_templates/hashtable.template
-index ef4e0ac..f6377d0 100644
+index 174f8e8..91935f5 100644
--- a/src/build/source_templates/hashtable.template
+++ b/src/build/source_templates/hashtable.template
-@@ -77,8 +77,8 @@
+@@ -92,8 +92,8 @@
int ref = hashPointer(buf, off);
@@ -282,7 +256,7 @@ index ef4e0ac..f6377d0 100644
delta = off - ref;
repl = match.len = MIN_MATCH + LZ4${utils}.commonBytes(buf, ref + MIN_MATCH, off + MIN_MATCH, matchLimit);
match.ref = ref;
-@@ -104,7 +104,7 @@
+@@ -119,7 +119,7 @@
int ptr = off;
final int end = off + repl - (MIN_MATCH - 1);
while (ptr < end - delta) {
@@ -291,3 +265,47 @@ index ef4e0ac..f6377d0 100644
++ptr;
}
do {
+diff --git a/src/build/source_templates/xxhash32_streaming.template b/src/build/source_templates/xxhash32_streaming.template
+index 6166758..9fa55e8 100644
+--- a/src/build/source_templates/xxhash32_streaming.template
++++ b/src/build/source_templates/xxhash32_streaming.template
+@@ -66,7 +66,7 @@ final class StreamingXXHash32Java${type} extends AbstractStreamingXXHash32Java {
+
+ totalLen += len;
+
+- if (memSize + len < 16) { // fill in tmp buffer
++ if (memSize + len < 16) {
+ System.arraycopy(buf, off, memory, memSize, len);
+ memSize += len;
+ return;
+@@ -74,7 +74,7 @@ final class StreamingXXHash32Java${type} extends AbstractStreamingXXHash32Java {
+
+ final int end = off + len;
+
+- if (memSize > 0) { // data left from previous update
++ if (memSize > 0) {
+ System.arraycopy(buf, off, memory, memSize, 16 - memSize);
+
+ v1 += readIntLE(memory, 0) * PRIME2;
+diff --git a/src/build/source_templates/xxhash64_streaming.template b/src/build/source_templates/xxhash64_streaming.template
+index 2789ae0..e781746 100644
+--- a/src/build/source_templates/xxhash64_streaming.template
++++ b/src/build/source_templates/xxhash64_streaming.template
+@@ -90,7 +90,7 @@ final class StreamingXXHash64Java${type} extends AbstractStreamingXXHash64Java {
+
+ totalLen += len;
+
+- if (memSize + len < 32) { // fill in tmp buffer
++ if (memSize + len < 32) {
+ System.arraycopy(buf, off, memory, memSize, len);
+ memSize += len;
+ return;
+@@ -98,7 +98,7 @@ final class StreamingXXHash64Java${type} extends AbstractStreamingXXHash64Java {
+
+ final int end = off + len;
+
+- if (memSize > 0) { // data left from previous update
++ if (memSize > 0) {
+ System.arraycopy(buf, off, memory, memSize, 32 - memSize);
+
+ v1 += readLongLE(memory, 0) * PRIME64_2;
diff --git a/3-use-system-libs.patch b/3-use-system-libs.patch
new file mode 100644
index 0000000..1ade925
--- /dev/null
+++ b/3-use-system-libs.patch
@@ -0,0 +1,20 @@
+diff --git a/build.xml b/build.xml
+index 7a63933..7c04e0c 100644
+--- a/build.xml
++++ b/build.xml
+@@ -206,14 +206,13 @@
+ objdir="${build}/objects"
+ outfile="${build}/jni/net/jpountz/util/${platform}/${os.arch}/lz4-java"
+ outtype="shared">
+- <includepath path="${src}/lz4/lib" />
+ <includepath path="${java.home}/../include" />
+ <includepath path="${java.home}/../include/${platform}/" />
+ <!-- In Java 9, java.home points not to jre/ but to the top directory -->
+ <includepath path="${java.home}/include" />
+ <includepath path="${java.home}/include/${platform}/" />
+ <includepath path="${build}/jni-headers" />
+- <fileset dir="${src}/lz4/lib" includes="lz4.c, lz4hc.c, xxhash.c" />
++ <libset dir="/usr/lib64" libs="lz4, xxhash" />
+ <fileset dir="${src}/jni" includes="*.c" />
+ <linker />
+ <compilerarg value="-mmacosx-version-min=10.9" if="isMacOS"/>
diff --git a/lz4-java.spec b/lz4-java.spec
index df49bfb..51cc04b 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -1,20 +1,16 @@
# empty debuginfo
%global debug_package %nil
-%global lz4_version 1.9.2
Name: lz4-java
Version: 1.7.1
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: LZ4 compression for Java
-# GPL:
-# src/lz4/
-# BSD:
-# src/lz4/libs
License: ASL 2.0 and (BSD and GPLv2+)
URL: https://github.com/lz4/lz4-java
Source0: https://github.com/lz4/lz4-java/archive/%{version}.tar.gz
-Source1: https://github.com/lz4/lz4/archive/v%{lz4_version}.tar.gz
+# lz4-java tests require randomizedtesting, which is not currently
+# shipped or maintained in Fedora.
Patch0: 0-remove-tests.patch
# lz4-java v1.3.0 introduced usage of sun.misc.Unsafe, which would later become
# depricated in jdk 9 and kept as an unexposed API in later jdk releases.
@@ -27,8 +23,10 @@ Patch1: 1-remove-unsafe.patch
# This patch simply removes comments from the templates so the classes can be generated as expected.
# Related bug: https://github.com/mvel/mvel/issues/152
Patch2: 2-remove-comments-from-templates.patch
+Patch3: 3-use-system-libs.patch
# Build tools
+BuildRequires: apache-parent
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: aqute-bnd
@@ -37,13 +35,11 @@ BuildRequires: gcc
BuildRequires: ivy-local
BuildRequires: java-devel
BuildRequires: javapackages-local
+BuildRequires: lz4-devel
BuildRequires: mvel
BuildRequires: objectweb-asm
BuildRequires: xerces-j2
-BuildRequires: apache-parent
-# FPC ticket Bundled Library Exception
-# https://fedorahosted.org/fpc/ticket/603
-Provides: bundled(libxxhash) = r37
+BuildRequires: xxhash-devel
BuildArch: noarch
@@ -77,21 +73,16 @@ This package contains javadoc for %{name}.
%prep
%setup -q -n %{name}-%{version}
-%setup -q -T -D -a 1
-
-mv lz4-1.9.2/* src/lz4/
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
# Cleanup
find -name '*.dylib' -print -delete
find -name '*.so' -print -delete
-cp -p src/lz4/LICENSE lz4_LICENSE
-cp -p src/lz4/lib/LICENSE lz4_lib_LICENSE
-
%build
ant -Divy.mode=local -Divy.revision=1.7.1 -Divy.pom.version=1.7.1 jar docs makepom
bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} dist/lz4-java.jar
@@ -103,12 +94,15 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
%files -f .mfiles
%doc CHANGES.md README.md
-%license LICENSE.txt lz4_LICENSE lz4_lib_LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%changelog
+* Mon Nov 16 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-7
+- cleanup whitespace in the local patch to remove comments from templates
+- use system lz4 and xxhash instead of bundling the dependencies
+
* Tue Oct 06 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-6
- include patch to strip comments from mvel templates
diff --git a/sources b/sources
index a2c0121..971053e 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
SHA512 (1.7.1.tar.gz) = 13fd89a9564f1f504348ce30a51ca22d5581a6661658d55c96f3f0c1e43126de04d2df87683251a8ec5bf53726f529b60bb1ec666863b7e33810df8ed73bb586
-SHA512 (v1.9.2.tar.gz) = ae714c61ec8e33ed91359b63f2896cfa102d66b730dce112b74696ec5850e59d88bd5527173e01e354a70fbe8f036557a47c767ee0766bc5f9c257978116c3c1
commit 5dd438e91ef4f1b87dedd92753934b62a719cc53
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Tue Oct 6 17:31:43 2020 -0400
include patch to remove comments from mvel templates
diff --git a/2-remove-comments-from-templates.patch b/2-remove-comments-from-templates.patch
new file mode 100644
index 0000000..30ec01c
--- /dev/null
+++ b/2-remove-comments-from-templates.patch
@@ -0,0 +1,293 @@
+diff --git a/src/build/source_templates/compress.template b/src/build/source_templates/compress.template
+index 0dc3c79..ed47f44 100644
+--- a/src/build/source_templates/compress.template
++++ b/src/build/source_templates/compress.template
+@@ -16,7 +16,7 @@
+ main:
+ while (true) {
+
+- // find a match
++
+ int forwardOff = sOff;
+
+ int ref;
+@@ -36,15 +36,15 @@
+ ${type}Utils.writeShort(hashTable, h, sOff - srcOff);
+ } while (!LZ4${utils}.readIntEquals(src, ref, sOff));
+
+- // catch up
++
+ final int excess = LZ4${utils}.commonBytesBackward(src, ref, sOff, srcOff, anchor);
+ sOff -= excess;
+ ref -= excess;
+
+- // sequence == refsequence
++
+ final int runLen = sOff - anchor;
+
+- // encode literal length
++
+ int tokenOff = dOff++;
+
+ if (dOff + runLen + (2 + 1 + LAST_LITERALS) + (runLen >>> 8) > destEnd) {
+@@ -58,16 +58,16 @@
+ ${utils}.writeByte(dest, tokenOff, runLen << ML_BITS);
+ }
+
+- // copy literals
++
+ LZ4${utils}.wildArraycopy(src, anchor, dest, dOff, runLen);
+ dOff += runLen;
+
+ while (true) {
+- // encode offset
++
+ ${utils}.writeShortLE(dest, dOff, (short) (sOff - ref));
+ dOff += 2;
+
+- // count nb matches
++
+ sOff += MIN_MATCH;
+ ref += MIN_MATCH;
+ final int matchLen = LZ4${utils}.commonBytes(src, ref, sOff, srcLimit);
+@@ -76,7 +76,7 @@
+ }
+ sOff += matchLen;
+
+- // encode match len
++
+ if (matchLen >= ML_MASK) {
+ ${utils}.writeByte(dest, tokenOff, ${utils}.readByte(dest, tokenOff) | ML_MASK);
+ dOff = LZ4${utils}.writeLen(matchLen - ML_MASK, dest, dOff);
+@@ -84,16 +84,16 @@
+ ${utils}.writeByte(dest, tokenOff, ${utils}.readByte(dest, tokenOff) | matchLen);
+ }
+
+- // test end of chunk
++
+ if (sOff > mflimit) {
+ anchor = sOff;
+ break main;
+ }
+
+- // fill table
++
+ ${type}Utils.writeShort(hashTable, hash64k(${utils}.readInt(src, sOff - 2)), sOff - 2 - srcOff);
+
+- // test next position
++
+ final int h = hash64k(${utils}.readInt(src, sOff));
+ ref = srcOff + ${type}Utils.readShort(hashTable, h);
+ ${type}Utils.writeShort(hashTable, h, sOff - srcOff);
+@@ -106,7 +106,7 @@
+ ${utils}.writeByte(dest, tokenOff, 0);
+ }
+
+- // prepare next loop
++
+ anchor = sOff++;
+ }
+ }
+@@ -145,7 +145,6 @@
+ main:
+ while (true) {
+
+- // find a match
+ int forwardOff = sOff;
+
+ int ref;
+@@ -172,10 +171,8 @@
+ sOff -= excess;
+ ref -= excess;
+
+- // sequence == refsequence
+ final int runLen = sOff - anchor;
+
+- // encode literal length
+ int tokenOff = dOff++;
+
+ if (dOff + runLen + (2 + 1 + LAST_LITERALS) + (runLen >>> 8) > destEnd) {
+@@ -189,16 +186,16 @@
+ ${utils}.writeByte(dest, tokenOff, runLen << ML_BITS);
+ }
+
+- // copy literals
++
+ LZ4${utils}.wildArraycopy(src, anchor, dest, dOff, runLen);
+ dOff += runLen;
+
+ while (true) {
+- // encode offset
++
+ ${utils}.writeShortLE(dest, dOff, back);
+ dOff += 2;
+
+- // count nb matches
++
+ sOff += MIN_MATCH;
+ final int matchLen = LZ4${utils}.commonBytes(src, ref + MIN_MATCH, sOff, srcLimit);
+ if (dOff + (1 + LAST_LITERALS) + (matchLen >>> 8) > destEnd) {
+@@ -206,7 +203,7 @@
+ }
+ sOff += matchLen;
+
+- // encode match len
++
+ if (matchLen >= ML_MASK) {
+ ${utils}.writeByte(dest, tokenOff, ${utils}.readByte(dest, tokenOff) | ML_MASK);
+ dOff = LZ4${utils}.writeLen(matchLen - ML_MASK, dest, dOff);
+@@ -214,16 +211,16 @@
+ ${utils}.writeByte(dest, tokenOff, ${utils}.readByte(dest, tokenOff) | matchLen);
+ }
+
+- // test end of chunk
++
+ if (sOff > mflimit) {
+ anchor = sOff;
+ break main;
+ }
+
+- // fill table
++
+ ${type}Utils.writeInt(hashTable, hash(${utils}.readInt(src, sOff - 2)), sOff - 2);
+
+- // test next position
++
+ final int h = hash(${utils}.readInt(src, sOff));
+ ref = ${type}Utils.readInt(hashTable, h);
+ ${type}Utils.writeInt(hashTable, h, sOff);
+@@ -237,7 +234,7 @@
+ ${utils}.writeByte(dest, tokenOff, 0);
+ }
+
+- // prepare next loop
++
+ anchor = sOff++;
+ }
+
+diff --git a/src/build/source_templates/compress_hc.template b/src/build/source_templates/compress_hc.template
+index b09b705..b250205 100644
+--- a/src/build/source_templates/compress_hc.template
++++ b/src/build/source_templates/compress_hc.template
+@@ -32,7 +32,7 @@
+ continue;
+ }
+
+- // saved, in case we would skip too much
++
+ copyTo(match1, match0);
+
+ search2:
+@@ -40,20 +40,20 @@
+ assert match1.start >= anchor;
+ if (match1.end() >= mfLimit
+ || !ht.insertAndFindWiderMatch(src, match1.end() - 2, match1.start + 1, matchLimit, match1.len, match2)) {
+- // no better match
++
+ dOff = LZ4${utils}.encodeSequence(src, anchor, match1.start, match1.ref, match1.len, dest, dOff, destEnd);
+ anchor = sOff = match1.end();
+ continue main;
+ }
+
+ if (match0.start < match1.start) {
+- if (match2.start < match1.start + match0.len) { // empirical
++ if (match2.start < match1.start + match0.len) {
+ copyTo(match0, match1);
+ }
+ }
+ assert match2.start > match1.start;
+
+- if (match2.start - match1.start < 3) { // First Match too small : removed
++ if (match2.start - match1.start < 3) {
+ copyTo(match2, match1);
+ continue search2;
+ }
+@@ -76,21 +76,21 @@
+
+ if (match2.start + match2.len >= mfLimit
+ || !ht.insertAndFindWiderMatch(src, match2.end() - 3, match2.start, matchLimit, match2.len, match3)) {
+- // no better match -> 2 sequences to encode
++
+ if (match2.start < match1.end()) {
+ match1.len = match2.start - match1.start;
+ }
+- // encode seq 1
++
+ dOff = LZ4${utils}.encodeSequence(src, anchor, match1.start, match1.ref, match1.len, dest, dOff, destEnd);
+ anchor = sOff = match1.end();
+- // encode seq 2
++
+ dOff = LZ4${utils}.encodeSequence(src, anchor, match2.start, match2.ref, match2.len, dest, dOff, destEnd);
+ anchor = sOff = match2.end();
+ continue main;
+ }
+
+- if (match3.start < match1.end() + 3) { // Not enough space for match 2 : remove it
+- if (match3.start >= match1.end()) { // // can write Seq1 immediately ==> Seq2 is removed, so Seq3 becomes Seq1
++ if (match3.start < match1.end() + 3) {
++ if (match3.start >= match1.end()) {
+ if (match2.start < match1.end()) {
+ final int correction = match1.end() - match2.start;
+ match2.fix(correction);
+@@ -112,7 +112,7 @@
+ continue search3;
+ }
+
+- // OK, now we have 3 ascending matches; let's write at least the first one
++
+ if (match2.start < match1.end()) {
+ if (match2.start - match1.start < ML_MASK) {
+ if (match1.len > OPTIMAL_ML) {
+diff --git a/src/build/source_templates/decompress.template b/src/build/source_templates/decompress.template
+index 09c0ca8..fce5ace 100644
+--- a/src/build/source_templates/decompress.template
++++ b/src/build/source_templates/decompress.template
+@@ -40,7 +40,6 @@
+ final int token = ${utils}.readByte(src, sOff) & 0xFF;
+ ++sOff;
+
+- // literals
+ int literalLen = token >>> ML_BITS;
+ if (literalLen == RUN_MASK) {
+ byte len = (byte) 0xFF;
+@@ -66,7 +65,7 @@
+ LZ4${utils}.safeArraycopy(src, sOff, dest, dOff, literalLen);
+ sOff += literalLen;
+ dOff = literalCopyEnd;
+- break; // EOF
++ break;
+ }
+ }
+
+@@ -74,7 +73,6 @@
+ sOff += literalLen;
+ dOff = literalCopyEnd;
+
+- // matchs
+ final int matchDec = ${utils}.readShortLE(src, sOff);
+ sOff += 2;
+ int matchOff = dOff - matchDec;
+diff --git a/src/build/source_templates/hashtable.template b/src/build/source_templates/hashtable.template
+index ef4e0ac..f6377d0 100644
+--- a/src/build/source_templates/hashtable.template
++++ b/src/build/source_templates/hashtable.template
+@@ -77,8 +77,8 @@
+
+ int ref = hashPointer(buf, off);
+
+- if (ref >= off - 4 && ref <= off && ref >= base) { // potential repetition
+- if (LZ4${utils}.readIntEquals(buf, ref, off)) { // confirmed
++ if (ref >= off - 4 && ref <= off && ref >= base) {
++ if (LZ4${utils}.readIntEquals(buf, ref, off)) {
+ delta = off - ref;
+ repl = match.len = MIN_MATCH + LZ4${utils}.commonBytes(buf, ref + MIN_MATCH, off + MIN_MATCH, matchLimit);
+ match.ref = ref;
+@@ -104,7 +104,7 @@
+ int ptr = off;
+ final int end = off + repl - (MIN_MATCH - 1);
+ while (ptr < end - delta) {
+- chainTable[ptr & MASK] = (short) delta; // pre load
++ chainTable[ptr & MASK] = (short) delta;
+ ++ptr;
+ }
+ do {
diff --git a/lz4-java.spec b/lz4-java.spec
index be5f837..df49bfb 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -4,7 +4,7 @@
Name: lz4-java
Version: 1.7.1
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: LZ4 compression for Java
# GPL:
# src/lz4/
@@ -20,7 +20,13 @@ Patch0: 0-remove-tests.patch
# depricated in jdk 9 and kept as an unexposed API in later jdk releases.
# lz4-java optionally uses Unsafe to achieve faster compression and decompression,
# however it's implementation is not critical to functionality, and can be removed.
-Patch1: 1-remove-unsafe.patch
+Patch1: 1-remove-unsafe.patch
+# After updating mvel to version 2.4.10, MVEL generated classes have formatting issues where
+# code after comments are not being formatted with new lines. As a result, including comments
+# in the templates results in classes with invalid code following the first comment.
+# This patch simply removes comments from the templates so the classes can be generated as expected.
+# Related bug: https://github.com/mvel/mvel/issues/152
+Patch2: 2-remove-comments-from-templates.patch
# Build tools
BuildRequires: ant
@@ -77,7 +83,7 @@ mv lz4-1.9.2/* src/lz4/
%patch0 -p1
%patch1 -p1
-
+%patch2 -p1
# Cleanup
find -name '*.dylib' -print -delete
@@ -103,6 +109,9 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
%license LICENSE.txt
%changelog
+* Tue Oct 06 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-6
+- include patch to strip comments from mvel templates
+
* Tue Sep 15 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-5
- add "BuildArch: noarch" to fix rpmlint error: no-binary
commit 27dc0f7171d85d6fb6affd9a3c67d4ba7db5ad39
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Tue Sep 15 13:19:50 2020 -0400
fix rpmlint error no-binary
diff --git a/lz4-java.spec b/lz4-java.spec
index 76c2562..be5f837 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -4,7 +4,7 @@
Name: lz4-java
Version: 1.7.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: LZ4 compression for Java
# GPL:
# src/lz4/
@@ -39,6 +39,8 @@ BuildRequires: apache-parent
# https://fedorahosted.org/fpc/ticket/603
Provides: bundled(libxxhash) = r37
+BuildArch: noarch
+
%description
LZ4 compression for Java, based on Yann Collet's work.
This library provides access to two compression methods
@@ -69,7 +71,7 @@ This package contains javadoc for %{name}.
%prep
%setup -q -n %{name}-%{version}
-%setup -T -D -a 1
+%setup -q -T -D -a 1
mv lz4-1.9.2/* src/lz4/
@@ -101,6 +103,9 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
%license LICENSE.txt
%changelog
+* Tue Sep 15 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-5
+- add "BuildArch: noarch" to fix rpmlint error: no-binary
+
* Wed Sep 09 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-4
- fixed sources to have both lz4-java and lz4
commit 6e88dc63de6df8e81213ddf10fe571c8af4d243f
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Wed Sep 9 16:39:29 2020 -0400
fixed sources to have both lz4-java and lz4
diff --git a/lz4-java.spec b/lz4-java.spec
index e9a1541..76c2562 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -4,7 +4,7 @@
Name: lz4-java
Version: 1.7.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: LZ4 compression for Java
# GPL:
# src/lz4/
@@ -101,6 +101,9 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
%license LICENSE.txt
%changelog
+* Wed Sep 09 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-4
+- fixed sources to have both lz4-java and lz4
+
* Wed Aug 05 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-3
- used commit from Jie Kang's fork of lz4-java to update to upstream 1.7.1
- this prevents tests from running; eliminates the need for randomizedtesting for f33 onward
diff --git a/sources b/sources
index 971053e..a2c0121 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
SHA512 (1.7.1.tar.gz) = 13fd89a9564f1f504348ce30a51ca22d5581a6661658d55c96f3f0c1e43126de04d2df87683251a8ec5bf53726f529b60bb1ec666863b7e33810df8ed73bb586
+SHA512 (v1.9.2.tar.gz) = ae714c61ec8e33ed91359b63f2896cfa102d66b730dce112b74696ec5850e59d88bd5527173e01e354a70fbe8f036557a47c767ee0766bc5f9c257978116c3c1
commit 55e0c41000d08f59674c268fe2621703b342184f
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Thu Aug 27 11:17:54 2020 -0400
remove usage of sun.misc.Unsafe
diff --git a/remove-tests.patch b/0-remove-tests.patch
similarity index 100%
rename from remove-tests.patch
rename to 0-remove-tests.patch
diff --git a/1-remove-unsafe.patch b/1-remove-unsafe.patch
new file mode 100644
index 0000000..9d7b2e7
--- /dev/null
+++ b/1-remove-unsafe.patch
@@ -0,0 +1,949 @@
+diff --git a/.classpath b/.classpath
+index 5ee3f97..058b340 100644
+--- a/.classpath
++++ b/.classpath
+@@ -2,7 +2,6 @@
+ <classpath>
+ <classpathentry kind="src" path="src/java"/>
+ <classpathentry kind="src" path="build/java"/>
+- <classpathentry kind="src" path="src/java-unsafe"/>
+ <classpathentry kind="src" path="src/test-resources"/>
+ <classpathentry kind="src" path="build/jni"/>
+ <classpathentry kind="src" path="src/test"/>
+diff --git a/CHANGES.md b/CHANGES.md
+index c7eed89..b71dc35 100644
+--- a/CHANGES.md
++++ b/CHANGES.md
+@@ -140,12 +140,6 @@
+ - [#99](https://github.com/lz4/lz4-java/pull/99)
+ LZ4FrameInputStream allows EndMark to be incompressible. (Charles Allen)
+
+- - [#95](https://github.com/lz4/lz4-java/pull/95)
+- Added unsafe instance support for aarch64. (Yuqi Gu)
+-
+- - [#93](https://github.com/lz4/lz4-java/pull/93)
+- Added unsafe instance support for ppc64le. (Madhusudanan Kandasamy)
+-
+ - [#90](https://github.com/lz4/lz4-java/issues/90)
+ LZ4 Java now supports 64-bit JNI build on Solaris. (cndcourt)
+
+@@ -207,11 +201,6 @@
+ - [#39](https://github.com/jpountz/lz4-java/pull/39)
+ The JAR is now a valid OSGI bundle. (Simon Chemouil)
+
+- - [#33](https://github.com/jpountz/lz4-java/pull/33)
+- The implementation based on Java's sun.misc.Unsafe relies on unaligned
+- memory access and is now only used on platforms that support it.
+- (Dmitry Shohov)
+-
+
+ ## 1.2.0
+
+diff --git a/README.md b/README.md
+index 9a34ea6..b966d9a 100644
+--- a/README.md
++++ b/README.md
+@@ -24,12 +24,10 @@ decompressor instance.
+
+ ## Implementations
+
+-For LZ4 compressors, LZ4 HC compressors and decompressors, 3 implementations are
++For LZ4 compressors, LZ4 HC compressors and decompressors, 2 implementations are
+ available:
+ - JNI bindings to the original C implementation by Yann Collet,
+ - a pure Java port of the compression and decompression algorithms,
+- - a Java port that uses the sun.misc.Unsafe API in order to achieve compression
+- and decompression speeds close to the C implementation.
+
+ Have a look at LZ4Factory for more information.
+
+@@ -94,8 +92,7 @@ score of 10) hash function.
+
+ ## Implementations
+
+-Similarly to LZ4, 3 implementations are available: JNI bindings, pure Java port
+-and pure Java port that uses sun.misc.Unsafe.
++Unsimilarly to LZ4, 2 implementations are available: JNI bindings, pure Java port
+
+ Have a look at XXHashFactory for more information.
+
+@@ -131,7 +128,7 @@ int hash = hash32.getValue();
+
+ You can download released artifacts from [Maven Central](https://search.maven.org/search?q=g:org.lz4%20a:lz4-java).
+
+-You can download pure-Java lz4-java from [Maven Central](https://search.maven.org/search?q=g:org.lz4%20a:lz4-pure-java). These artifacts include the Safe and Unsafe Java versions but not JNI bindings. (Experimental)
++You can download pure-Java lz4-java from [Maven Central](https://search.maven.org/search?q=g:org.lz4%20a:lz4-pure-java). These artifacts include the Safe Java versions but not JNI bindings. (Experimental)
+
+ # Documentation
+
+@@ -172,10 +169,8 @@ Then run `ant`. It will:
+ located under `src/build`,
+ - compile the lz4 and xxhash libraries and their JNI (Java Native Interface)
+ bindings,
+- - compile Java sources in `src/java` (normal sources), `src/java-unsafe`
+- (sources that make use of `sun.misc.Unsafe`) and `build/java`
+- (auto-generated sources) to `build/classes`, `build/unsafe-classes` and
+- `build/generated-classes`,
++ - compile Java sources in `src/java` (normal sources) and `build/java`
++ (auto-generated sources) to `build/classes` and `build/generated-classes`,
+ - generate a JAR file called lz4-${version}.jar under the `dist` directory.
+
+ The JAR file that is generated contains Java class files, the native library
+diff --git a/build.xml b/build.xml
+index 2a08ad8..1d4cff5 100644
+--- a/build.xml
++++ b/build.xml
+@@ -148,16 +148,6 @@
+ debug="true"
+ destdir="${build}/classes"
+ nativeHeaderDir="${build}/jni-headers"/>
+- <mkdir dir="${build}/unsafe-classes" />
+- <javac
+- includeAntRuntime="false"
+- srcdir="${src}/java-unsafe"
+- source="${javac.source}"
+- target="${javac.target}"
+- encoding="UTF-8"
+- debug="true"
+- classpath="${build}/classes"
+- destdir="${build}/unsafe-classes"/>
+ <mkdir dir="${build}/generated-classes" />
+ <javac
+ includeAntRuntime="false"
+@@ -169,7 +159,6 @@
+ destdir="${build}/generated-classes">
+ <classpath>
+ <pathelement location="${build}/classes/" />
+- <pathelement location="${build}/unsafe-classes" />
+ </classpath>
+ </javac>
+ </target>
+@@ -234,7 +223,6 @@
+
+ <path id="compile.tests.classpath">
+ <pathelement path="${build}/classes" />
+- <pathelement path="${build}/unsafe-classes" />
+ <pathelement path="${build}/generated-classes" />
+ <fileset dir="lib" includes="*.jar" />
+ </path>
+@@ -249,7 +237,6 @@
+ <pathelement path="${src}/resources" />
+ <pathelement path="${src}/test-resources" />
+ <pathelement path="${build}/classes" />
+- <pathelement path="${build}/unsafe-classes" />
+ <pathelement path="${build}/generated-classes" />
+ <pathelement path="${build}/test-classes" />
+ <fileset dir="${lib}" includes="*.jar" />
+@@ -317,7 +304,6 @@
+ <jar
+ destfile="${dist}/${ivy.module}-${ivy.revision}-sources.jar">
+ <fileset dir="${src}/java" />
+- <fileset dir="${src}/java-unsafe" />
+ </jar>
+ </target>
+
+@@ -351,7 +337,6 @@
+ destfile="${dist}/${ivy.module}.jar">
+ <fileset dir="${src}/resources" erroronmissingdir="false" />
+ <fileset dir="${build}/classes" />
+- <fileset dir="${build}/unsafe-classes" />
+ <fileset dir="${build}/generated-classes" />
+ <fileset dir="${build}/jni" erroronmissingdir="false" />
+ <manifest>
+@@ -365,7 +350,6 @@
+ <jar
+ destfile="${dist}/${ivy.module}.jar">
+ <fileset dir="${build}/classes" />
+- <fileset dir="${build}/unsafe-classes" />
+ <fileset dir="${build}/generated-classes" />
+ <manifest>
+ <attribute name="Automatic-Module-Name" value="org.lz4.pure.java"/>
+@@ -411,15 +395,12 @@
+
+ <target name="forbidden-apis" description="check API usage" depends="install-forbidden-apis,compile">
+ <forbidden-apis internalRuntimeForbidden="true" classpathref="forbidden-apis.classpath">
+- <bundledSignatures name="jdk-unsafe-${javac.target}"/>
+ <bundledSignatures name="jdk-deprecated-${javac.target}"/>
+ <fileset dir="${build}/classes" includes="**/*.class" />
+ </forbidden-apis>
+ <forbidden-apis classpathref="forbidden-apis.classpath">
+- <bundledSignatures name="jdk-unsafe-${javac.target}"/>
+ <bundledSignatures name="jdk-deprecated-${javac.target}"/>
+ <fileset dir="${build}/classes" includes="**/*.class" />
+- <fileset dir="${build}/unsafe-classes" includes="**/*.class" />
+ </forbidden-apis>
+ </target>
+
+diff --git a/src/build/gen_sources.mvel b/src/build/gen_sources.mvel
+index 0f32671..43ebb78 100644
+--- a/src/build/gen_sources.mvel
++++ b/src/build/gen_sources.mvel
+@@ -24,7 +24,7 @@ def dest_file(path) {
+
+ def generate_decompressors() {
+ compiledTemplate = get_template("decompressor.template");
+- for (type : ["Safe", "Unsafe"]) {
++ for (type : ["Safe"]) {
+ for (size : ["Fast", "Safe"]) {
+ dest = dest_file("lz4/LZ4Java" + type + size + "Decompressor.java");
+ args = new HashMap();
+@@ -37,7 +37,7 @@ def generate_decompressors() {
+
+ def generate_compressors() {
+ compiledTemplate = get_template("compressor.template");
+- for (type : ["Safe", "Unsafe"]) {
++ for (type : ["Safe"]) {
+ dest = dest_file("lz4/LZ4Java" + type + "Compressor.java");
+ args = new HashMap();
+ args.put("type", type);
+@@ -47,7 +47,7 @@ def generate_compressors() {
+
+ def generate_hc_compressors() {
+ compiledTemplate = get_template("compressor_hc.template");
+- for (type : ["Safe", "Unsafe"]) {
++ for (type : ["Safe"]) {
+ dest = dest_file("lz4/LZ4HCJava" + type + "Compressor.java");
+ args = new HashMap();
+ args.put("type", type);
+@@ -58,7 +58,7 @@ def generate_hc_compressors() {
+ def generate_xxhash() {
+ for (bitness : ["32", "64"]) {
+ compiledTemplate = get_template("xxhash" + bitness + ".template");
+- for (type : ["Safe", "Unsafe"]) {
++ for (type : ["Safe"]) {
+ dest = dest_file("xxhash/XXHash" + bitness + "Java" + type + ".java");
+ args = new HashMap();
+ args.put("type", type);
+@@ -70,7 +70,7 @@ def generate_xxhash() {
+ def generate_streaming_xxhash() {
+ for (bitness : ["32", "64"]) {
+ compiledTemplate = get_template("xxhash" + bitness + "_streaming.template");
+- for (type : ["Safe", "Unsafe"]) {
++ for (type : ["Safe"]) {
+ dest = dest_file("xxhash/StreamingXXHash" + bitness + "Java" + type + ".java");
+ args = new HashMap();
+ args.put("type", type);
+diff --git a/src/java-unsafe/net/jpountz/lz4/LZ4UnsafeUtils.java b/src/java-unsafe/net/jpountz/lz4/LZ4UnsafeUtils.java
+deleted file mode 100644
+index a5ad783..0000000
+--- a/src/java-unsafe/net/jpountz/lz4/LZ4UnsafeUtils.java
++++ /dev/null
+@@ -1,206 +0,0 @@
+-package net.jpountz.lz4;
+-
+-/*
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-import static net.jpountz.lz4.LZ4Constants.COPY_LENGTH;
+-import static net.jpountz.lz4.LZ4Constants.LAST_LITERALS;
+-import static net.jpountz.lz4.LZ4Constants.ML_BITS;
+-import static net.jpountz.lz4.LZ4Constants.ML_MASK;
+-import static net.jpountz.lz4.LZ4Constants.RUN_MASK;
+-import static net.jpountz.util.UnsafeUtils.readByte;
+-import static net.jpountz.util.UnsafeUtils.readInt;
+-import static net.jpountz.util.UnsafeUtils.readLong;
+-import static net.jpountz.util.UnsafeUtils.readShort;
+-import static net.jpountz.util.UnsafeUtils.writeByte;
+-import static net.jpountz.util.UnsafeUtils.writeInt;
+-import static net.jpountz.util.UnsafeUtils.writeLong;
+-import static net.jpountz.util.UnsafeUtils.writeShort;
+-import static net.jpountz.util.Utils.NATIVE_BYTE_ORDER;
+-
+-import java.nio.ByteOrder;
+-
+-enum LZ4UnsafeUtils {
+- ;
+-
+- static void safeArraycopy(byte[] src, int srcOff, byte[] dest, int destOff, int len) {
+- final int fastLen = len & 0xFFFFFFF8;
+- wildArraycopy(src, srcOff, dest, destOff, fastLen);
+- for (int i = 0, slowLen = len & 0x7; i < slowLen; i += 1) {
+- writeByte(dest, destOff + fastLen + i, readByte(src, srcOff + fastLen + i));
+- }
+- }
+-
+- static void wildArraycopy(byte[] src, int srcOff, byte[] dest, int destOff, int len) {
+- for (int i = 0; i < len; i += 8) {
+- writeLong(dest, destOff + i, readLong(src, srcOff + i));
+- }
+- }
+-
+- static void wildIncrementalCopy(byte[] dest, int matchOff, int dOff, int matchCopyEnd) {
+- if (dOff - matchOff < 4) {
+- for (int i = 0; i < 4; ++i) {
+- writeByte(dest, dOff+i, readByte(dest, matchOff+i));
+- }
+- dOff += 4;
+- matchOff += 4;
+- int dec = 0;
+- assert dOff >= matchOff && dOff - matchOff < 8;
+- switch (dOff - matchOff) {
+- case 1:
+- matchOff -= 3;
+- break;
+- case 2:
+- matchOff -= 2;
+- break;
+- case 3:
+- matchOff -= 3;
+- dec = -1;
+- break;
+- case 5:
+- dec = 1;
+- break;
+- case 6:
+- dec = 2;
+- break;
+- case 7:
+- dec = 3;
+- break;
+- default:
+- break;
+- }
+- writeInt(dest, dOff, readInt(dest, matchOff));
+- dOff += 4;
+- matchOff -= dec;
+- } else if (dOff - matchOff < COPY_LENGTH) {
+- writeLong(dest, dOff, readLong(dest, matchOff));
+- dOff += dOff - matchOff;
+- }
+- while (dOff < matchCopyEnd) {
+- writeLong(dest, dOff, readLong(dest, matchOff));
+- dOff += 8;
+- matchOff += 8;
+- }
+- }
+-
+- static void safeIncrementalCopy(byte[] dest, int matchOff, int dOff, int matchLen) {
+- for (int i = 0; i < matchLen; ++i) {
+- dest[dOff + i] = dest[matchOff + i];
+- writeByte(dest, dOff + i, readByte(dest, matchOff + i));
+- }
+- }
+-
+- static int readShortLittleEndian(byte[] src, int srcOff) {
+- short s = readShort(src, srcOff);
+- if (NATIVE_BYTE_ORDER == ByteOrder.BIG_ENDIAN) {
+- s = Short.reverseBytes(s);
+- }
+- return s & 0xFFFF;
+- }
+-
+- static void writeShortLittleEndian(byte[] dest, int destOff, int value) {
+- short s = (short) value;
+- if (NATIVE_BYTE_ORDER == ByteOrder.BIG_ENDIAN) {
+- s = Short.reverseBytes(s);
+- }
+- writeShort(dest, destOff, s);
+- }
+-
+- static boolean readIntEquals(byte[] src, int ref, int sOff) {
+- return readInt(src, ref) == readInt(src, sOff);
+- }
+-
+- static int commonBytes(byte[] src, int ref, int sOff, int srcLimit) {
+- int matchLen = 0;
+- while (sOff <= srcLimit - 8) {
+- if (readLong(src, sOff) == readLong(src, ref)) {
+- matchLen += 8;
+- ref += 8;
+- sOff += 8;
+- } else {
+- final int zeroBits;
+- if (NATIVE_BYTE_ORDER == ByteOrder.BIG_ENDIAN) {
+- zeroBits = Long.numberOfLeadingZeros(readLong(src, sOff) ^ readLong(src, ref));
+- } else {
+- zeroBits = Long.numberOfTrailingZeros(readLong(src, sOff) ^ readLong(src, ref));
+- }
+- return matchLen + (zeroBits >>> 3);
+- }
+- }
+- while (sOff < srcLimit && readByte(src, ref++) == readByte(src, sOff++)) {
+- ++matchLen;
+- }
+- return matchLen;
+- }
+-
+- static int writeLen(int len, byte[] dest, int dOff) {
+- while (len >= 0xFF) {
+- writeByte(dest, dOff++, 0xFF);
+- len -= 0xFF;
+- }
+- writeByte(dest, dOff++, len);
+- return dOff;
+- }
+-
+- static int encodeSequence(byte[] src, int anchor, int matchOff, int matchRef, int matchLen, byte[] dest, int dOff, int destEnd) {
+- final int runLen = matchOff - anchor;
+- final int tokenOff = dOff++;
+- int token;
+-
+- if (runLen >= RUN_MASK) {
+- token = (byte) (RUN_MASK << ML_BITS);
+- dOff = writeLen(runLen - RUN_MASK, dest, dOff);
+- } else {
+- token = runLen << ML_BITS;
+- }
+-
+- // copy literals
+- wildArraycopy(src, anchor, dest, dOff, runLen);
+- dOff += runLen;
+-
+- // encode offset
+- final int matchDec = matchOff - matchRef;
+- dest[dOff++] = (byte) matchDec;
+- dest[dOff++] = (byte) (matchDec >>> 8);
+-
+- // encode match len
+- matchLen -= 4;
+- if (dOff + (1 + LAST_LITERALS) + (matchLen >>> 8) > destEnd) {
+- throw new LZ4Exception("maxDestLen is too small");
+- }
+- if (matchLen >= ML_MASK) {
+- token |= ML_MASK;
+- dOff = writeLen(matchLen - RUN_MASK, dest, dOff);
+- } else {
+- token |= matchLen;
+- }
+-
+- dest[tokenOff] = (byte) token;
+-
+- return dOff;
+- }
+-
+- static int commonBytesBackward(byte[] b, int o1, int o2, int l1, int l2) {
+- int count = 0;
+- while (o1 > l1 && o2 > l2 && readByte(b, --o1) == readByte(b, --o2)) {
+- ++count;
+- }
+- return count;
+- }
+-
+- static int lastLiterals(byte[] src, int sOff, int srcLen, byte[] dest, int dOff, int destEnd) {
+- return LZ4SafeUtils.lastLiterals(src, sOff, srcLen, dest, dOff, destEnd);
+- }
+-
+-}
+diff --git a/src/java-unsafe/net/jpountz/util/UnsafeUtils.java b/src/java-unsafe/net/jpountz/util/UnsafeUtils.java
+deleted file mode 100644
+index 30231ef..0000000
+--- a/src/java-unsafe/net/jpountz/util/UnsafeUtils.java
++++ /dev/null
+@@ -1,147 +0,0 @@
+-package net.jpountz.util;
+-
+-/*
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-import static net.jpountz.util.Utils.NATIVE_BYTE_ORDER;
+-
+-import java.lang.reflect.Field;
+-import java.nio.ByteOrder;
+-
+-import sun.misc.Unsafe;
+-
+-public enum UnsafeUtils {
+- ;
+-
+- private static final Unsafe UNSAFE;
+- private static final long BYTE_ARRAY_OFFSET;
+- private static final int BYTE_ARRAY_SCALE;
+- private static final long INT_ARRAY_OFFSET;
+- private static final int INT_ARRAY_SCALE;
+- private static final long SHORT_ARRAY_OFFSET;
+- private static final int SHORT_ARRAY_SCALE;
+-
+- static {
+- try {
+- Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
+- theUnsafe.setAccessible(true);
+- UNSAFE = (Unsafe) theUnsafe.get(null);
+- BYTE_ARRAY_OFFSET = UNSAFE.arrayBaseOffset(byte[].class);
+- BYTE_ARRAY_SCALE = UNSAFE.arrayIndexScale(byte[].class);
+- INT_ARRAY_OFFSET = UNSAFE.arrayBaseOffset(int[].class);
+- INT_ARRAY_SCALE = UNSAFE.arrayIndexScale(int[].class);
+- SHORT_ARRAY_OFFSET = UNSAFE.arrayBaseOffset(short[].class);
+- SHORT_ARRAY_SCALE = UNSAFE.arrayIndexScale(short[].class);
+- } catch (IllegalAccessException e) {
+- throw new ExceptionInInitializerError("Cannot access Unsafe");
+- } catch (NoSuchFieldException e) {
+- throw new ExceptionInInitializerError("Cannot access Unsafe");
+- } catch (SecurityException e) {
+- throw new ExceptionInInitializerError("Cannot access Unsafe");
+- }
+- }
+-
+- public static void checkRange(byte[] buf, int off) {
+- SafeUtils.checkRange(buf, off);
+- }
+-
+- public static void checkRange(byte[] buf, int off, int len) {
+- SafeUtils.checkRange(buf, off, len);
+- }
+-
+- public static void checkLength(int len) {
+- SafeUtils.checkLength(len);
+- }
+-
+- public static byte readByte(byte[] src, int srcOff) {
+- return UNSAFE.getByte(src, BYTE_ARRAY_OFFSET + BYTE_ARRAY_SCALE * srcOff);
+- }
+-
+- public static void writeByte(byte[] src, int srcOff, byte value) {
+- UNSAFE.putByte(src, BYTE_ARRAY_OFFSET + BYTE_ARRAY_SCALE * srcOff, (byte) value);
+- }
+-
+- public static void writeByte(byte[] src, int srcOff, int value) {
+- writeByte(src, srcOff, (byte) value);
+- }
+-
+- public static long readLong(byte[] src, int srcOff) {
+- return UNSAFE.getLong(src, BYTE_ARRAY_OFFSET + srcOff);
+- }
+-
+- public static long readLongLE(byte[] src, int srcOff) {
+- long i = readLong(src, srcOff);
+- if (NATIVE_BYTE_ORDER == ByteOrder.BIG_ENDIAN) {
+- i = Long.reverseBytes(i);
+- }
+- return i;
+- }
+-
+- public static void writeLong(byte[] dest, int destOff, long value) {
+- UNSAFE.putLong(dest, BYTE_ARRAY_OFFSET + destOff, value);
+- }
+-
+- public static int readInt(byte[] src, int srcOff) {
+- return UNSAFE.getInt(src, BYTE_ARRAY_OFFSET + srcOff);
+- }
+-
+- public static int readIntLE(byte[] src, int srcOff) {
+- int i = readInt(src, srcOff);
+- if (NATIVE_BYTE_ORDER == ByteOrder.BIG_ENDIAN) {
+- i = Integer.reverseBytes(i);
+- }
+- return i;
+- }
+-
+- public static void writeInt(byte[] dest, int destOff, int value) {
+- UNSAFE.putInt(dest, BYTE_ARRAY_OFFSET + destOff, value);
+- }
+-
+- public static short readShort(byte[] src, int srcOff) {
+- return UNSAFE.getShort(src, BYTE_ARRAY_OFFSET + srcOff);
+- }
+-
+- public static int readShortLE(byte[] src, int srcOff) {
+- short s = readShort(src, srcOff);
+- if (NATIVE_BYTE_ORDER == ByteOrder.BIG_ENDIAN) {
+- s = Short.reverseBytes(s);
+- }
+- return s & 0xFFFF;
+- }
+-
+- public static void writeShort(byte[] dest, int destOff, short value) {
+- UNSAFE.putShort(dest, BYTE_ARRAY_OFFSET + destOff, value);
+- }
+-
+- public static void writeShortLE(byte[] buf, int off, int v) {
+- writeByte(buf, off, (byte) v);
+- writeByte(buf, off + 1, (byte) (v >>> 8));
+- }
+-
+- public static int readInt(int[] src, int srcOff) {
+- return UNSAFE.getInt(src, INT_ARRAY_OFFSET + INT_ARRAY_SCALE * srcOff);
+- }
+-
+- public static void writeInt(int[] dest, int destOff, int value) {
+- UNSAFE.putInt(dest, INT_ARRAY_OFFSET + INT_ARRAY_SCALE * destOff, value);
+- }
+-
+- public static int readShort(short[] src, int srcOff) {
+- return UNSAFE.getShort(src, SHORT_ARRAY_OFFSET + SHORT_ARRAY_SCALE * srcOff) & 0xFFFF;
+- }
+-
+- public static void writeShort(short[] dest, int destOff, int value) {
+- UNSAFE.putShort(dest, SHORT_ARRAY_OFFSET + SHORT_ARRAY_SCALE * destOff, (short) value);
+- }
+-}
+diff --git a/src/java/net/jpountz/lz4/LZ4Factory.java b/src/java/net/jpountz/lz4/LZ4Factory.java
+index e04867b..69f81fa 100644
+--- a/src/java/net/jpountz/lz4/LZ4Factory.java
++++ b/src/java/net/jpountz/lz4/LZ4Factory.java
+@@ -32,8 +32,6 @@ import static net.jpountz.lz4.LZ4Constants.MAX_COMPRESSION_LEVEL;
+ * <a href="https://github.com/lz4/lz4">the original LZ4 C implementation</a>.
+ * <li>a {@link #safeInstance() safe Java} instance which is a pure Java port
+ * of the original C library,</li>
+- * <li>an {@link #unsafeInstance() unsafe Java} instance which is a Java port
+- * using the unofficial {@link sun.misc.Unsafe} API.
+ * </ul>
+ * <p>
+ * Only the {@link #safeInstance() safe instance} is guaranteed to work on your
+@@ -55,7 +53,6 @@ public final class LZ4Factory {
+ }
+
+ private static LZ4Factory NATIVE_INSTANCE,
+- JAVA_UNSAFE_INSTANCE,
+ JAVA_SAFE_INSTANCE;
+
+ /**
+@@ -107,42 +104,15 @@ public final class LZ4Factory {
+ return JAVA_SAFE_INSTANCE;
+ }
+
+- /**
+- * Returns a {@link LZ4Factory} instance that returns compressors and
+- * decompressors that may use {@link sun.misc.Unsafe} to speed up compression
+- * and decompression.
+- *
+- * @return a {@link LZ4Factory} instance that returns compressors and
+- * decompressors that may use {@link sun.misc.Unsafe} to speed up compression
+- * and decompression.
+- */
+- public static synchronized LZ4Factory unsafeInstance() {
+- if (JAVA_UNSAFE_INSTANCE == null) {
+- JAVA_UNSAFE_INSTANCE = instance("JavaUnsafe");
+- }
+- return JAVA_UNSAFE_INSTANCE;
+- }
+-
+ /**
+ * Returns the fastest available {@link LZ4Factory} instance which does not
+- * rely on JNI bindings. It first tries to load the
+- * {@link #unsafeInstance() unsafe instance}, and then the
+- * {@link #safeInstance() safe Java instance} if the JVM doesn't have a
+- * working {@link sun.misc.Unsafe}.
++ * rely on JNI bindings. It loads {@link #safeInstance() safe Java instance}
+ *
+ * @return the fastest available {@link LZ4Factory} instance which does not
+ * rely on JNI bindings.
+ */
+ public static LZ4Factory fastestJavaInstance() {
+- if (Utils.isUnalignedAccessAllowed()) {
+- try {
+- return unsafeInstance();
+- } catch (Throwable t) {
+- return safeInstance();
+- }
+- } else {
+ return safeInstance();
+- }
+ }
+
+ /**
+@@ -249,9 +219,9 @@ public final class LZ4Factory {
+ * <li>A compression level lower than 1 would be treated as 9.</li>
+ * </ol>
+ * Note that compression levels from different implementations
+- * (native, unsafe Java, and safe Java) cannot be compared with one another.
++ * (native, and safe Java) cannot be compared with one another.
+ * Specifically, the native implementation of a high compression level
+- * is not necessarily faster than the safe/unsafe Java implementation
++ * is not necessarily faster than the safe Java implementation
+ * of the same compression level.
+ *
+ * @param compressionLevel the compression level between [1, 17]; the higher the level, the higher the compression ratio
+diff --git a/src/java/net/jpountz/xxhash/XXHashFactory.java b/src/java/net/jpountz/xxhash/XXHashFactory.java
+index 9a9b4d1..9ccdf76 100644
+--- a/src/java/net/jpountz/xxhash/XXHashFactory.java
++++ b/src/java/net/jpountz/xxhash/XXHashFactory.java
+@@ -28,8 +28,6 @@ import net.jpountz.util.Utils;
+ * <a href="http://code.google.com/p/xxhash/">the original LZ4 C implementation</a>.
+ * <li>a {@link #safeInstance() safe Java} instance which is a pure Java port
+ * of the original C library,</li>
+- * <li>an {@link #unsafeInstance() unsafe Java} instance which is a Java port
+- * using the unofficial {@link sun.misc.Unsafe} API.
+ * </ul>
+ * <p>
+ * Only the {@link #safeInstance() safe instance} is guaranteed to work on your
+@@ -51,7 +49,6 @@ public final class XXHashFactory {
+ }
+
+ private static XXHashFactory NATIVE_INSTANCE,
+- JAVA_UNSAFE_INSTANCE,
+ JAVA_SAFE_INSTANCE;
+
+ /**
+@@ -96,40 +93,15 @@ public final class XXHashFactory {
+ return JAVA_SAFE_INSTANCE;
+ }
+
+- /**
+- * Returns a {@link XXHashFactory} that returns {@link XXHash32} instances that
+- * may use {@link sun.misc.Unsafe} to speed up hashing.
+- *
+- * @return a {@link XXHashFactory} that returns {@link XXHash32} instances that
+- * may use {@link sun.misc.Unsafe} to speed up hashing.
+- */
+- public static synchronized XXHashFactory unsafeInstance() {
+- if (JAVA_UNSAFE_INSTANCE == null) {
+- JAVA_UNSAFE_INSTANCE = instance("JavaUnsafe");
+- }
+- return JAVA_UNSAFE_INSTANCE;
+- }
+-
+ /**
+ * Returns the fastest available {@link XXHashFactory} instance which does not
+- * rely on JNI bindings. It first tries to load the
+- * {@link #unsafeInstance() unsafe instance}, and then the
+- * {@link #safeInstance() safe Java instance} if the JVM doesn't have a
+- * working {@link sun.misc.Unsafe}.
++ * rely on JNI bindings. It loads {@link #safeInstance() safe instance}
+ *
+ * @return the fastest available {@link XXHashFactory} instance which does not
+ * rely on JNI bindings.
+ */
+ public static XXHashFactory fastestJavaInstance() {
+- if (Utils.isUnalignedAccessAllowed()) {
+- try {
+- return unsafeInstance();
+- } catch (Throwable t) {
+- return safeInstance();
+- }
+- } else {
+ return safeInstance();
+- }
+ }
+
+ /**
+diff --git a/src/lz4/contrib/debian/control b/src/lz4/contrib/debian/control
+index ac3b460..63b493c 100644
+--- a/src/lz4/contrib/debian/control
++++ b/src/lz4/contrib/debian/control
+@@ -13,11 +13,11 @@ Vcs-Browser: https://github.com/lz4/lz4
+
+ Package: liblz4
+ Architecture: any
+-Depends: ${shlibs:Depends}, ${misc:Depends}
++Depends: ${shlibs:Depends}
+ Description: Extremely Fast Compression algorithm http://www.lz4.org
+
+ Package: liblz4-dev
+ Architecture: any
+-Depends: ${shlibs:Depends}, ${misc:Depends}
++Depends: ${shlibs:Depends}
+ Description: Extremely Fast Compression algorithm http://www.lz4.org
+ Development files.
+diff --git a/src/lz4/doc/lz4_manual.html b/src/lz4/doc/lz4_manual.html
+index a477584..8127877 100644
+--- a/src/lz4/doc/lz4_manual.html
++++ b/src/lz4/doc/lz4_manual.html
+@@ -316,10 +316,6 @@ int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
+ future. They are therefore only safe to depend on when the caller is
+ statically linked against the library.
+
+- To protect against unsafe usage, not only are the declarations guarded,
+- the definitions are hidden by default
+- when building LZ4 as a shared/dynamic library.
+-
+ In order to access these declarations,
+ define LZ4_STATIC_LINKING_ONLY in your application
+ before including LZ4's headers.
+diff --git a/src/lz4/ossfuzz/Makefile b/src/lz4/ossfuzz/Makefile
+index 6875eb6..640d1c7 100644
+--- a/src/lz4/ossfuzz/Makefile
++++ b/src/lz4/ossfuzz/Makefile
+@@ -33,8 +33,7 @@ DEBUGFLAGS = -g -DLZ4_DEBUG=$(DEBUGLEVEL)
+
+ LZ4_CFLAGS = $(CFLAGS) $(DEBUGFLAGS) $(MOREFLAGS)
+ LZ4_CXXFLAGS = $(CXXFLAGS) $(DEBUGFLAGS) $(MOREFLAGS)
+-LZ4_CPPFLAGS = $(CPPFLAGS) -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ \
+- -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
++LZ4_CPPFLAGS = $(CPPFLAGS) -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
+
+ FUZZERS := \
+ compress_fuzzer \
+diff --git a/src/lz4/ossfuzz/fuzz.h b/src/lz4/ossfuzz/fuzz.h
+index eefac63..b0e9797 100644
+--- a/src/lz4/ossfuzz/fuzz.h
++++ b/src/lz4/ossfuzz/fuzz.h
+@@ -19,10 +19,6 @@
+ * It can be undefined, or 0 through 2. If it is undefined, it selects
+ * the method to use based on the compiler. If testing with UBSAN set
+ * MEM_FORCE_MEMORY_ACCESS=0 to use the standard compliant method.
+- * @param FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+- * This is the canonical flag to enable deterministic builds for fuzzing.
+- * Changes to zstd for fuzzing are gated behind this define.
+- * It is recommended to define this when building zstd for fuzzing.
+ */
+
+ #ifndef FUZZ_H
+diff --git a/src/test/net/jpountz/lz4/Instances.java b/src/test/net/jpountz/lz4/Instances.java
+index b9caae5..44f7809 100644
+--- a/src/test/net/jpountz/lz4/Instances.java
++++ b/src/test/net/jpountz/lz4/Instances.java
+@@ -21,21 +21,17 @@ enum Instances {
+ static LZ4Compressor[] COMPRESSORS = new LZ4Compressor[] {
+ LZ4Factory.nativeInstance().fastCompressor(),
+ LZ4Factory.nativeInstance().highCompressor(),
+- LZ4Factory.unsafeInstance().fastCompressor(),
+- LZ4Factory.unsafeInstance().highCompressor(),
+ LZ4Factory.safeInstance().fastCompressor(),
+ LZ4Factory.safeInstance().highCompressor()
+ };
+
+ static LZ4FastDecompressor[] FAST_DECOMPRESSORS = new LZ4FastDecompressor[] {
+ LZ4Factory.nativeInstance().fastDecompressor(),
+- LZ4Factory.unsafeInstance().fastDecompressor(),
+ LZ4Factory.safeInstance().fastDecompressor()
+ };
+
+ static LZ4SafeDecompressor[] SAFE_DECOMPRESSORS = new LZ4SafeDecompressor[] {
+ LZ4Factory.nativeInstance().safeDecompressor(),
+- LZ4Factory.unsafeInstance().safeDecompressor(),
+ LZ4Factory.safeInstance().safeDecompressor()
+ };
+
+diff --git a/src/test/net/jpountz/lz4/LZ4FactoryTest.java b/src/test/net/jpountz/lz4/LZ4FactoryTest.java
+index c4ef05e..b8b33d7 100644
+--- a/src/test/net/jpountz/lz4/LZ4FactoryTest.java
++++ b/src/test/net/jpountz/lz4/LZ4FactoryTest.java
+@@ -21,17 +21,13 @@ public class LZ4FactoryTest extends TestCase {
+ public void test() {
+ assertEquals(LZ4JNICompressor.INSTANCE, LZ4Factory.nativeInstance().fastCompressor());
+ assertEquals(LZ4HCJNICompressor.INSTANCE, LZ4Factory.nativeInstance().highCompressor());
+- assertEquals(LZ4JavaUnsafeCompressor.INSTANCE, LZ4Factory.unsafeInstance().fastCompressor());
+- assertEquals(LZ4HCJavaUnsafeCompressor.INSTANCE, LZ4Factory.unsafeInstance().highCompressor());
+ assertEquals(LZ4JavaSafeCompressor.INSTANCE, LZ4Factory.safeInstance().fastCompressor());
+ assertEquals(LZ4HCJavaSafeCompressor.INSTANCE, LZ4Factory.safeInstance().highCompressor());
+
+ assertEquals(LZ4JNIFastDecompressor.INSTANCE, LZ4Factory.nativeInstance().fastDecompressor());
+- assertEquals(LZ4JavaUnsafeFastDecompressor.INSTANCE, LZ4Factory.unsafeInstance().fastDecompressor());
+ assertEquals(LZ4JavaSafeFastDecompressor.INSTANCE, LZ4Factory.safeInstance().fastDecompressor());
+
+ assertEquals(LZ4JNISafeDecompressor.INSTANCE, LZ4Factory.nativeInstance().safeDecompressor());
+- assertEquals(LZ4JavaUnsafeSafeDecompressor.INSTANCE, LZ4Factory.unsafeInstance().safeDecompressor());
+ assertEquals(LZ4JavaSafeSafeDecompressor.INSTANCE, LZ4Factory.safeInstance().safeDecompressor());
+ }
+
+diff --git a/src/test/net/jpountz/lz4/LZ4Test.java b/src/test/net/jpountz/lz4/LZ4Test.java
+index 161899c..6a3a597 100644
+--- a/src/test/net/jpountz/lz4/LZ4Test.java
++++ b/src/test/net/jpountz/lz4/LZ4Test.java
+@@ -247,11 +247,9 @@ public class LZ4Test extends AbstractLZ4Test {
+ public void testRoundTrip(byte[] data, int off, int len) {
+ for (LZ4Factory compressorFactory : Arrays.asList(
+ LZ4Factory.nativeInstance(),
+- LZ4Factory.unsafeInstance(),
+ LZ4Factory.safeInstance())) {
+ for (LZ4Factory decompressorFactory : Arrays.asList(
+ LZ4Factory.nativeInstance(),
+- LZ4Factory.unsafeInstance(),
+ LZ4Factory.safeInstance())) {
+ testRoundTrip(data, off, len, compressorFactory, decompressorFactory);
+ }
+diff --git a/src/test/net/jpountz/xxhash/XXHash32Test.java b/src/test/net/jpountz/xxhash/XXHash32Test.java
+index 98c9436..30f985d 100644
+--- a/src/test/net/jpountz/xxhash/XXHash32Test.java
++++ b/src/test/net/jpountz/xxhash/XXHash32Test.java
+@@ -74,18 +74,12 @@ public class XXHash32Test extends AbstractLZ4Test {
+
+ private static XXHash32[] INSTANCES = new XXHash32[] {
+ XXHashFactory.nativeInstance().hash32(),
+- XXHashFactory.unsafeInstance().hash32(),
+ XXHashFactory.safeInstance().hash32(),
+ new StreamingXXHash32Adapter() {
+ protected StreamingXXHash32 streamingHash(int seed) {
+ return XXHashFactory.nativeInstance().newStreamingHash32(seed);
+ }
+ },
+- new StreamingXXHash32Adapter() {
+- protected StreamingXXHash32 streamingHash(int seed) {
+- return XXHashFactory.unsafeInstance().newStreamingHash32(seed);
+- }
+- },
+ new StreamingXXHash32Adapter() {
+ protected StreamingXXHash32 streamingHash(int seed) {
+ return XXHashFactory.safeInstance().newStreamingHash32(seed);
+@@ -150,13 +144,10 @@ public class XXHash32Test extends AbstractLZ4Test {
+ long totalLen = 0;
+ final int seed = randomInt();
+ StreamingXXHash32 hash1 = XXHashFactory.nativeInstance().newStreamingHash32(seed);
+- StreamingXXHash32 hash2 = XXHashFactory.unsafeInstance().newStreamingHash32(seed);
+ StreamingXXHash32 hash3 = XXHashFactory.safeInstance().newStreamingHash32(seed);
+ while (totalLen < (1L << 33)) {
+ hash1.update(bytes, off, len);
+- hash2.update(bytes, off, len);
+ hash3.update(bytes, off, len);
+- assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
+ assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
+ totalLen += len;
+ }
+diff --git a/src/test/net/jpountz/xxhash/XXHash64Test.java b/src/test/net/jpountz/xxhash/XXHash64Test.java
+index dadbeda..b767c99 100644
+--- a/src/test/net/jpountz/xxhash/XXHash64Test.java
++++ b/src/test/net/jpountz/xxhash/XXHash64Test.java
+@@ -74,18 +74,12 @@ public class XXHash64Test extends AbstractLZ4Test {
+
+ private static XXHash64[] INSTANCES = new XXHash64[] {
+ XXHashFactory.nativeInstance().hash64(),
+- XXHashFactory.unsafeInstance().hash64(),
+ XXHashFactory.safeInstance().hash64(),
+ new StreamingXXHash64Adapter() {
+ protected StreamingXXHash64 streamingHash(long seed) {
+ return XXHashFactory.nativeInstance().newStreamingHash64(seed);
+ }
+ },
+- new StreamingXXHash64Adapter() {
+- protected StreamingXXHash64 streamingHash(long seed) {
+- return XXHashFactory.unsafeInstance().newStreamingHash64(seed);
+- }
+- },
+ new StreamingXXHash64Adapter() {
+ protected StreamingXXHash64 streamingHash(long seed) {
+ return XXHashFactory.safeInstance().newStreamingHash64(seed);
+@@ -155,13 +149,10 @@ public class XXHash64Test extends AbstractLZ4Test {
+ long totalLen = 0;
+ final long seed = randomLong();
+ StreamingXXHash64 hash1 = XXHashFactory.nativeInstance().newStreamingHash64(seed);
+- StreamingXXHash64 hash2 = XXHashFactory.unsafeInstance().newStreamingHash64(seed);
+ StreamingXXHash64 hash3 = XXHashFactory.safeInstance().newStreamingHash64(seed);
+ while (totalLen < (1L << 33)) {
+ hash1.update(bytes, off, len);
+- hash2.update(bytes, off, len);
+ hash3.update(bytes, off, len);
+- assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
+ assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
+ totalLen += len;
+ }
+diff --git a/src/test/net/jpountz/xxhash/XXHashFactoryTest.java b/src/test/net/jpountz/xxhash/XXHashFactoryTest.java
+index c410220..2aae562 100644
+--- a/src/test/net/jpountz/xxhash/XXHashFactoryTest.java
++++ b/src/test/net/jpountz/xxhash/XXHashFactoryTest.java
+@@ -21,14 +21,10 @@ public class XXHashFactoryTest extends TestCase {
+ public void test() {
+ assertEquals(XXHash32JNI.INSTANCE, XXHashFactory.nativeInstance().hash32());
+ assertTrue(XXHashFactory.nativeInstance().newStreamingHash32(0) instanceof StreamingXXHash32JNI);
+- assertEquals(XXHash32JavaUnsafe.INSTANCE, XXHashFactory.unsafeInstance().hash32());
+- assertTrue(XXHashFactory.unsafeInstance().newStreamingHash32(0) instanceof StreamingXXHash32JavaUnsafe);
+ assertEquals(XXHash32JavaSafe.INSTANCE, XXHashFactory.safeInstance().hash32());
+ assertTrue(XXHashFactory.safeInstance().newStreamingHash32(0) instanceof StreamingXXHash32JavaSafe);
+ assertEquals(XXHash64JNI.INSTANCE, XXHashFactory.nativeInstance().hash64());
+ assertTrue(XXHashFactory.nativeInstance().newStreamingHash64(0) instanceof StreamingXXHash64JNI);
+- assertEquals(XXHash64JavaUnsafe.INSTANCE, XXHashFactory.unsafeInstance().hash64());
+- assertTrue(XXHashFactory.unsafeInstance().newStreamingHash64(0) instanceof StreamingXXHash64JavaUnsafe);
+ assertEquals(XXHash64JavaSafe.INSTANCE, XXHashFactory.safeInstance().hash64());
+ assertTrue(XXHashFactory.safeInstance().newStreamingHash64(0) instanceof StreamingXXHash64JavaSafe);
+ }
diff --git a/lz4-java.spec b/lz4-java.spec
index 58c42c9..e9a1541 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -15,7 +15,12 @@ URL: https://github.com/lz4/lz4-java
Source0: https://github.com/lz4/lz4-java/archive/%{version}.tar.gz
Source1: https://github.com/lz4/lz4/archive/v%{lz4_version}.tar.gz
-Patch0: remove-tests.patch
+Patch0: 0-remove-tests.patch
+# lz4-java v1.3.0 introduced usage of sun.misc.Unsafe, which would later become
+# depricated in jdk 9 and kept as an unexposed API in later jdk releases.
+# lz4-java optionally uses Unsafe to achieve faster compression and decompression,
+# however it's implementation is not critical to functionality, and can be removed.
+Patch1: 1-remove-unsafe.patch
# Build tools
BuildRequires: ant
@@ -28,7 +33,6 @@ BuildRequires: java-devel
BuildRequires: javapackages-local
BuildRequires: mvel
BuildRequires: objectweb-asm
-# BuildRequires: bea-stax-api
BuildRequires: xerces-j2
BuildRequires: apache-parent
# FPC ticket Bundled Library Exception
@@ -67,9 +71,11 @@ This package contains javadoc for %{name}.
%setup -q -n %{name}-%{version}
%setup -T -D -a 1
+mv lz4-1.9.2/* src/lz4/
+
%patch0 -p1
+%patch1 -p1
-mv lz4-1.9.2/* src/lz4/
# Cleanup
find -name '*.dylib' -print -delete
@@ -98,6 +104,8 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
* Wed Aug 05 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-3
- used commit from Jie Kang's fork of lz4-java to update to upstream 1.7.1
- this prevents tests from running; eliminates the need for randomizedtesting for f33 onward
+- remove dependency on bea-stax
+- remove all usage of sun.misc.Unsafe
* Tue Aug 04 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-2
- Included the lz4 submodule inside the lz4-java source tarball
commit 5ddabdc9562bbd33bbbab4b94686f8c190724e97
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Wed Aug 26 16:53:05 2020 -0400
try removing bea-stax-api dep
diff --git a/lz4-java.spec b/lz4-java.spec
index a55ee03..58c42c9 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -28,7 +28,7 @@ BuildRequires: java-devel
BuildRequires: javapackages-local
BuildRequires: mvel
BuildRequires: objectweb-asm
-BuildRequires: bea-stax-api
+# BuildRequires: bea-stax-api
BuildRequires: xerces-j2
BuildRequires: apache-parent
# FPC ticket Bundled Library Exception
commit 0e7a009652555261c0836cfbf3b3e52ff89379e0
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Wed Aug 5 16:38:46 2020 -0400
update to commit from fork/jkang/rpm/lz4-java
diff --git a/.gitignore b/.gitignore
index 5f52bbc..c85324f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/1.3.0.tar.gz
/1.7.1.tar.gz
+/v1.9.2.tar.gz
diff --git a/0-build.patch b/0-build.patch
deleted file mode 100644
index 5624f08..0000000
--- a/0-build.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-diff --git a/build.xml b/build.xml
-index 7a63933..e48d5dd 100644
---- a/build.xml
-+++ b/build.xml
-@@ -17,8 +17,7 @@
- <project name="lz4" default="dist" basedir="."
- xmlns:cpptasks="antlib:net.sf.antcontrib.cpptasks"
- xmlns:ivy="antlib:org.apache.ivy.ant"
-- xmlns:junit4="antlib:com.carrotsearch.junit4"
-- xmlns:mvn="antlib:org.apache.maven.artifact.ant">
-+ xmlns:junit4="antlib:com.carrotsearch.junit4">
-
- <property name="src" location="src"/>
- <property name="build" location="build"/>
-@@ -76,8 +75,6 @@
- </target>
-
- <target name="-ivy-install" unless="ivy.available">
-- <mkdir dir="${user.home}/.ant/lib" />
-- <get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.jar.version}/${iv..." dest="${user.home}/.ant/lib/${ivy.jar.name}"/>
- </target>
-
- <target name="install-cpptasks" unless="cpptasks.available">
-@@ -88,10 +85,6 @@
- </target>
-
- <target name="install-maven-ant-tasks" unless="maven-ant-tasks.available">
-- <ivy:cachepath organisation="org.apache.maven" module="maven-ant-tasks" revision="2.1.3"
-- inline="true" conf="default" transitive="true" pathid="maven-ant-tasks.classpath"/>
-- <taskdef uri="antlib:org.apache.maven.artifact.ant" resource="org/apache/maven/artifact/ant/antlib.xml" classpathref="maven-ant-tasks.classpath"/>
-- <property name="maven-ant-tasks.available" value="true"/>
- </target>
-
- <target name="install-forbidden-apis" unless="forbidden-apis.available">
-@@ -102,11 +95,6 @@
- </target>
-
- <target name="install-bnd" unless="bnd.available">
-- <!-- using bnd 1.50.0 because more recent versions have broken JAR wrapping -->
-- <ivy:cachepath organisation="biz.aQute" module="bnd" revision="1.50.0"
-- inline="true" conf="default" transitive="true" pathid="bnd.classpath"/>
-- <taskdef resource="aQute/bnd/ant/taskdef.properties" classpathref="bnd.classpath"/>
-- <property name="bnd.available" value="true"/>
- </target>
-
- <target name="init">
-@@ -124,9 +112,15 @@
- <property name="junit4.available" value="true" />
- </target>
-
-+ <path id="mvel.classpath">
-+ <fileset dir="/usr/share/java">
-+ <include name="mvel.jar"/>
-+ <include name="objectweb-asm/asm.jar"/>
-+ <include name="objectweb-asm/asm-util.jar"/>
-+ </fileset>
-+ </path>
-+
- <target name="generate-sources" depends="init">
-- <ivy:cachepath organisation="org.mvel" module="mvel2" revision="2.3.2.Final"
-- inline="true" conf="default" transitive="true" pathid="mvel.classpath"/>
- <mkdir dir="${build}/java" />
- <java
- fork="true"
-@@ -329,7 +323,9 @@
- overview="${src}/java/overview.html"
- packagenames="net.jpountz.lz4,net.jpountz.xxhash"
- windowtitle="lz4 / xxhash - Java API ${ivy.revision}"
-- destDir="${build}/docs">
-+ destDir="${build}/docs"
-+ encoding="UTF-8"
-+ additionalparam="-Xdoclint:none">
- <link href="http://download.oracle.com/javase/6/docs/api/" />
- <sourcepath>
- <pathelement location="${src}/java"/>
-@@ -375,8 +371,12 @@
- </jar>
- </target>
-
-- <target name="bundle" description="makes the JAR a valid OSGi bundle" depends="install-bnd, jar">
-- <taskdef resource="aQute/bnd/ant/taskdef.properties" classpathref="bnd.classpath"/>
-+ <target name="bundle" description="makes the JAR a valid OSGi bundle" depends="jar">
-+ <taskdef resource="aQute/bnd/ant/taskdef.properties" >
-+ <classpath>
-+ <fileset dir="/usr/share/java/aqute-bnd"/>
-+ </classpath>
-+ </taskdef>
- <property name="packages.version" value="${ivy.revision}"/>
- <!-- We need to remove potential -SNAPSHOT qualifiers as package versions... -->
- <script language="javascript">
-@@ -411,7 +411,7 @@
- <antcall target="dist" />
- </target>
-
-- <target name="forbidden-apis" description="check API usage" depends="install-forbidden-apis,compile">
-+ <target name="forbidden-apis" description="check API usage" depends="compile">
- <forbidden-apis internalRuntimeForbidden="true" classpathref="forbidden-apis.classpath">
- <bundledSignatures name="jdk-unsafe-${javac.target}"/>
- <bundledSignatures name="jdk-deprecated-${javac.target}"/>
-@@ -429,41 +429,22 @@
- <attribute name="repositoryid" />
- <attribute name="repositoryurl" />
- <sequential>
-- <mvn:mvn>
-- <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.4:sign-and-deploy-file" />
-- <arg value="-Durl=@{repositoryurl}" />
-- <arg value="-DrepositoryId=@{repositoryid}" />
-- <arg value="-DpomFile=${dist}/${ivy.module}-${ivy.revision}.pom" />
-- <arg value="-Dfile=${dist}/${ivy.module}-${ivy.revision}.jar" />
-- <arg value="-Dfiles=${dist}/${ivy.module}-${ivy.revision}-sources.jar,${dist}/${ivy.module}-${ivy.revision}-javadoc.jar" />
-- <arg value="-Dclassifiers=sources,javadoc" />
-- <arg value="-Dtypes=jar,jar" />
-- <arg value="-Pgpg" />
-- </mvn:mvn>
- </sequential>
- </macrodef>
-
- <target name="deploy" description="deploy snapshot to snapshot repo" depends="install-maven-ant-tasks">
-- <property name="skip.jni" value="true" />
-- <antcall target="-deploy" />
- </target>
-
- <target name="-deploy" depends="clean,dist">
-- <deploy repositoryid="sonatype-nexus-snapshots" repositoryurl="https://oss.sonatype.org/content/repositories/snapshots" />
- </target>
-
- <!-- before this, update project version from SNAPSHOT to RELEASE -->
- <target name="stage" description="deploy to release repo" depends="install-maven-ant-tasks,test-skip-jni,forbidden-apis">
-- <property name="skip.jni" value="true" />
-- <antcall target="-stage" />
- </target>
-
- <target name="stage-skip-test" description="deploy to release repo, skipping tests" depends="install-maven-ant-tasks,forbidden-apis">
-- <property name="skip.jni" value="true" />
-- <antcall target="-stage" />
- </target>
-
- <target name="-stage" depends="clean,dist">
-- <deploy repositoryid="sonatype-nexus-staging" repositoryurl="https://oss.sonatype.org/service/local/staging/deploy/maven2" />
- </target>
- </project>
diff --git a/1-junit_Assert.patch b/1-junit_Assert.patch
deleted file mode 100644
index 6b0075f..0000000
--- a/1-junit_Assert.patch
+++ /dev/null
@@ -1,316 +0,0 @@
-diff -Nru lz4-java-1.3.0/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java
---- lz4-java-1.3.0/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java 2014-11-26 20:04:10.000000000 +0100
-+++ lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java 2016-05-03 17:08:40.285741530 +0200
-@@ -207,11 +207,11 @@
-
- final LZ4FastDecompressor decompressor = LZ4Factory.fastestInstance().fastDecompressor();
- InputStream is = new LZ4BlockInputStream(open(compressed.toByteArray()), decompressor, checksum);
-- assertFalse(is.markSupported());
-+ org.junit.Assert.assertFalse(is.markSupported());
- try {
- is.mark(1);
- is.reset();
-- assertFalse(true);
-+ org.junit.Assert.assertFalse(true);
- } catch (IOException e) {
- // OK
- }
-@@ -235,8 +235,8 @@
- }
- }
- is.close();
-- assertEquals(data.length, read);
-- assertArrayEquals(data, Arrays.copyOf(restored, read));
-+ org.junit.Assert.assertEquals(data.length, read);
-+ org.junit.Assert.assertArrayEquals(data, Arrays.copyOf(restored, read));
-
- // test skip
- final int offset = data.length <= 1 ? 0 : randomInt(data.length - 1);
-@@ -246,17 +246,17 @@
- read = 0;
- while (read < offset) {
- final long skipped = is.skip(offset - read);
-- assertTrue(skipped >= 0);
-+ org.junit.Assert.assertTrue(skipped >= 0);
- read += skipped;
- }
- read = 0;
- while (read < length) {
- final int r = is.read(restored, read, length - read);
-- assertTrue(r >= 0);
-+ org.junit.Assert.assertTrue(r >= 0);
- read += r;
- }
- is.close();
-- assertArrayEquals(Arrays.copyOfRange(data, offset, offset + length), Arrays.copyOfRange(restored, 0, length));
-+ org.junit.Assert.assertArrayEquals(Arrays.copyOfRange(data, offset, offset + length), Arrays.copyOfRange(restored, 0, length));
- }
-
- @Test
-@@ -288,7 +288,7 @@
- byte[] actual = new byte[testBytes.length];
- in.read(actual);
-
-- assertArrayEquals(testBytes, actual);
-+ org.junit.Assert.assertArrayEquals(testBytes, actual);
-
- in.close();
- in.close();
-diff -Nru lz4-java-1.3.0/src/test/net/jpountz/xxhash/XXHash32Test.java lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/xxhash/XXHash32Test.java
---- lz4-java-1.3.0/src/test/net/jpountz/xxhash/XXHash32Test.java 2014-11-26 20:04:10.000000000 +0100
-+++ lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/xxhash/XXHash32Test.java 2016-05-03 17:08:40.278738569 +0200
-@@ -129,12 +129,12 @@
- final int ref = XXHashFactory.nativeInstance().hash32().hash(buf, off, len, seed);
- for (XXHash32 hash : INSTANCES) {
- final int h = hash.hash(buf, off, len, seed);
-- assertEquals(hash.toString(), ref, h);
-+ org.junit.Assert.assertEquals(hash.toString(), ref, h);
- final ByteBuffer copy = copyOf(buf, off, len);
- final int h2 = hash.hash(copy, off, len, seed);
-- assertEquals(off, copy.position());
-- assertEquals(len, copy.remaining());
-- assertEquals(hash.toString(), ref, h2);
-+ org.junit.Assert.assertEquals(off, copy.position());
-+ org.junit.Assert.assertEquals(len, copy.remaining());
-+ org.junit.Assert.assertEquals(hash.toString(), ref, h2);
- }
- }
-
-@@ -155,8 +155,8 @@
- hash1.update(bytes, off, len);
- hash2.update(bytes, off, len);
- hash3.update(bytes, off, len);
-- assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
-- assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
-+ org.junit.Assert.assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
-+ org.junit.Assert.assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
- totalLen += len;
- }
- }
-diff -Nru lz4-java-1.3.0/src/test/net/jpountz/xxhash/XXHash64Test.java lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/xxhash/XXHash64Test.java
---- lz4-java-1.3.0/src/test/net/jpountz/xxhash/XXHash64Test.java 2014-11-26 20:04:10.000000000 +0100
-+++ lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/xxhash/XXHash64Test.java 2016-05-03 17:08:40.278738569 +0200
-@@ -134,12 +134,12 @@
- final long ref = XXHashFactory.nativeInstance().hash64().hash(buf, off, len, seed);
- for (XXHash64 hash : INSTANCES) {
- final long h = hash.hash(buf, off, len, seed);
-- assertEquals(hash.toString(), ref, h);
-+ org.junit.Assert.assertEquals(hash.toString(), ref, h);
- final ByteBuffer copy = copyOf(buf, off, len);
- final long h2 = hash.hash(copy, off, len, seed);
-- assertEquals(off, copy.position());
-- assertEquals(len, copy.remaining());
-- assertEquals(hash.toString(), ref, h2);
-+ org.junit.Assert.assertEquals(off, copy.position());
-+ org.junit.Assert.assertEquals(len, copy.remaining());
-+ org.junit.Assert.assertEquals(hash.toString(), ref, h2);
- }
- }
-
-@@ -160,8 +160,8 @@
- hash1.update(bytes, off, len);
- hash2.update(bytes, off, len);
- hash3.update(bytes, off, len);
-- assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
-- assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
-+ org.junit.Assert.assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
-+ org.junit.Assert.assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
- totalLen += len;
- }
- }
-diff --git a/src/test/net/jpountz/lz4/LZ4Test.java b/src/test/net/jpountz/lz4/LZ4Test.java
-index 739fdaf..6d27121 100644
---- a/src/test/net/jpountz/lz4/LZ4Test.java
-+++ b/src/test/net/jpountz/lz4/LZ4Test.java
-@@ -56,7 +56,7 @@ public class LZ4Test extends AbstractLZ4Test {
- if (tempLibFiles != null) {
- for (File tempLibFile : tempLibFiles) {
- File lckFile = new File(tempLibFile.getAbsolutePath() + ".lck");
-- assertTrue(tempLibFile.getAbsolutePath(), lckFile.exists());
-+ org.junit.Assert.assertTrue(tempLibFile.getAbsolutePath(), lckFile.exists());
- }
- }
- }
-@@ -70,7 +70,7 @@ public class LZ4Test extends AbstractLZ4Test {
- for (File tempLockFile : tempLockFiles) {
- String tempLockFilePath = tempLockFile.getAbsolutePath();
- File libFile = new File(tempLockFilePath.substring(0, tempLockFilePath.length() - 4));
-- assertTrue(tempLockFilePath, libFile.exists());
-+ org.junit.Assert.assertTrue(tempLockFilePath, libFile.exists());
- }
- }
- }
-@@ -80,7 +80,7 @@ public class LZ4Test extends AbstractLZ4Test {
- public void testMaxCompressedLength() {
- final int len = randomBoolean() ? randomInt(16) : randomInt(1 << 30);
- for (LZ4Compressor compressor : COMPRESSORS) {
-- assertEquals(LZ4JNI.LZ4_compressBound(len), compressor.maxCompressedLength(len));
-+ org.junit.Assert.assertEquals(LZ4JNI.LZ4_compressBound(len), compressor.maxCompressedLength(len));
- }
- }
-
-@@ -116,8 +116,8 @@ public class LZ4Test extends AbstractLZ4Test {
- byte[] compressed = getCompressedWorstCase(decompressed);
- byte[] restored = new byte[decompressed.length];
- int cpLen = decompressor.decompress(compressed, 0, restored, 0, decompressed.length);
-- assertEquals(compressed.length, cpLen);
-- assertArrayEquals(decompressed, restored);
-+ org.junit.Assert.assertEquals(compressed.length, cpLen);
-+ org.junit.Assert.assertArrayEquals(decompressed, restored);
- }
-
- @Test
-@@ -134,8 +134,8 @@ public class LZ4Test extends AbstractLZ4Test {
- byte[] compressed = getCompressedWorstCase(decompressed);
- byte[] restored = new byte[decompressed.length];
- int uncpLen = decompressor.decompress(compressed, 0, compressed.length, restored, 0);
-- assertEquals(decompressed.length, uncpLen);
-- assertArrayEquals(decompressed, restored);
-+ org.junit.Assert.assertEquals(decompressed.length, uncpLen);
-+ org.junit.Assert.assertArrayEquals(decompressed, restored);
- }
-
- @Test
-@@ -169,8 +169,8 @@ public class LZ4Test extends AbstractLZ4Test {
-
- // test decompression
- final T restored = tester.allocate(len);
-- assertEquals(compressedLen, tester.decompress(decompressor, compressed, 0, restored, 0, len));
-- assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
-+ org.junit.Assert.assertEquals(compressedLen, tester.decompress(decompressor, compressed, 0, restored, 0, len));
-+ org.junit.Assert.assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
-
- // make sure it fails if the compression dest is not large enough
- tester.fill(restored, randomByte());
-@@ -183,8 +183,8 @@ public class LZ4Test extends AbstractLZ4Test {
- // because the compressor is allowed to return different compression results
- // even when it is invoked with the same input data.
- // In this case, just make sure the compressed data can be successfully decompressed.
-- assertEquals(compressedLen2, tester.decompress(decompressor, compressed2, 0, restored, 0, len));
-- assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
-+ org.junit.Assert.assertEquals(compressedLen2, tester.decompress(decompressor, compressed2, 0, restored, 0, len));
-+ org.junit.Assert.assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
- } catch (LZ4Exception e) {
- // OK
- }
-@@ -194,7 +194,7 @@ public class LZ4Test extends AbstractLZ4Test {
- // decompression dest is too small
- try {
- tester.decompress(decompressor, compressed, 0, restored, 0, len - 1);
-- fail();
-+ org.junit.Assert.fail();
- } catch (LZ4Exception e) {
- // OK
- }
-@@ -204,7 +204,7 @@ public class LZ4Test extends AbstractLZ4Test {
- final T restored2 = tester.allocate(len+1);
- try {
- final int cpLen = tester.decompress(decompressor, compressed, 0, restored2, 0, len + 1);
-- fail("compressedLen=" + cpLen);
-+ org.junit.Assert.fail("compressedLen=" + cpLen);
- } catch (LZ4Exception e) {
- // OK
- }
-@@ -212,17 +212,17 @@ public class LZ4Test extends AbstractLZ4Test {
- // try decompression when only the size of the compressed buffer is known
- if (len > 0) {
- tester.fill(restored, randomByte());
-- assertEquals(len, tester.decompress(decompressor2, compressed, 0, compressedLen, restored, 0, len));
-- assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
-+ org.junit.Assert.assertEquals(len, tester.decompress(decompressor2, compressed, 0, compressedLen, restored, 0, len));
-+ org.junit.Assert.assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
- tester.fill(restored, randomByte());
- } else {
-- assertEquals(0, tester.decompress(decompressor2, compressed, 0, compressedLen, tester.allocate(1), 0, 1));
-+ org.junit.Assert.assertEquals(0, tester.decompress(decompressor2, compressed, 0, compressedLen, tester.allocate(1), 0, 1));
- }
-
- // over-estimated compressed length
- try {
- final int decompressedLen = tester.decompress(decompressor2, compressed, 0, compressedLen + 1, tester.allocate(len + 100), 0, len + 100);
-- fail("decompressedLen=" + decompressedLen);
-+ org.junit.Assert.fail("decompressedLen=" + decompressedLen);
- } catch (LZ4Exception e) {
- // OK
- }
-@@ -231,7 +231,7 @@ public class LZ4Test extends AbstractLZ4Test {
- try {
- final int decompressedLen = tester.decompress(decompressor2, compressed, 0, compressedLen - 1, tester.allocate(len + 100), 0, len + 100);
- if (!(decompressor2 instanceof LZ4JNISafeDecompressor)) {
-- fail("decompressedLen=" + decompressedLen);
-+ org.junit.Assert.fail("decompressedLen=" + decompressedLen);
- }
- } catch (LZ4Exception e) {
- // OK
-@@ -307,7 +307,7 @@ public class LZ4Test extends AbstractLZ4Test {
- try {
- // it is invalid to end with a match, should be at least 5 literals
- decompressor.decompress(invalid, 0, new byte[decompressedLength], 0, decompressedLength);
-- assertTrue(decompressor.toString(), false);
-+ org.junit.Assert.assertTrue(decompressor.toString(), false);
- } catch (LZ4Exception e) {
- // OK
- }
-@@ -317,7 +317,7 @@ public class LZ4Test extends AbstractLZ4Test {
- try {
- // it is invalid to end with a match, should be at least 5 literals
- decompressor.decompress(invalid, 0, invalid.length, new byte[20], 0);
-- assertTrue(false);
-+ org.junit.Assert.assertTrue(false);
- } catch (LZ4Exception e) {
- // OK
- }
-@@ -337,7 +337,7 @@ public class LZ4Test extends AbstractLZ4Test {
- try {
- // it is invalid to end with a match, should be at least 5 literals
- decompressor.decompress(invalid, 0, new byte[20], 0, 20);
-- assertTrue(decompressor.toString(), false);
-+ org.junit.Assert.assertTrue(decompressor.toString(), false);
- } catch (LZ4Exception e) {
- // OK
- }
-@@ -347,7 +347,7 @@ public class LZ4Test extends AbstractLZ4Test {
- try {
- // it is invalid to end with a match, should be at least 5 literals
- decompressor.decompress(invalid, 0, invalid.length, new byte[20], 0);
-- assertTrue(false);
-+ org.junit.Assert.assertTrue(false);
- } catch (LZ4Exception e) {
- // OK
- }
-@@ -362,7 +362,7 @@ public class LZ4Test extends AbstractLZ4Test {
- ByteBuffer out = Tester.BYTE_BUFFER.allocate(100).asReadOnlyBuffer();
- try {
- compressor.compress(in, out);
-- fail();
-+ org.junit.Assert.fail();
- } catch (ReadOnlyBufferException e) {
- // ok
- }
-@@ -372,7 +372,7 @@ public class LZ4Test extends AbstractLZ4Test {
- ByteBuffer out = Tester.BYTE_BUFFER.allocate(100).asReadOnlyBuffer();
- try {
- decompressor.decompress(in, out);
-- fail();
-+ org.junit.Assert.fail();
- } catch (ReadOnlyBufferException e) {
- // ok
- }
-@@ -383,7 +383,7 @@ public class LZ4Test extends AbstractLZ4Test {
- out.limit(2);
- try {
- decompressor.decompress(in, out);
-- fail();
-+ org.junit.Assert.fail();
- } catch (ReadOnlyBufferException e) {
- // ok
- }
-@@ -486,7 +486,7 @@ public class LZ4Test extends AbstractLZ4Test {
- }
- final Sequence sequence1 = readSequence(expected, off);
- final Sequence sequence2 = readSequence(actual, off);
-- assertEquals(message + ", off=" + off + ", decompressedOff=" + decompressedOff, sequence1, sequence2);
-+ org.junit.Assert.assertEquals(message + ", off=" + off + ", decompressedOff=" + decompressedOff, sequence1, sequence2);
- off += sequence1.length;
- decompressedOff += sequence1.literalLen + sequence1.matchLen;
- }
diff --git a/lz4-java.spec b/lz4-java.spec
index 0c25295..a55ee03 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -1,34 +1,21 @@
# empty debuginfo
%global debug_package %nil
-
-%global build_opts -Doffline=true -Divy.mode=local -Divysettings.xml=/etc/ivy/ivysettings.xml -Divy.revision=%{version}
+%global lz4_version 1.9.2
Name: lz4-java
Version: 1.7.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: LZ4 compression for Java
-# GPL: src/xxhash/bench.c
-# src/lz4/programs
-# BSD: src/xxhash/xxhash.c src/xxhash/xxhash.h
-# src/lz4
-License: ASL 2.0
-URL: https://github.com/jpountz/lz4-java
-Source0: https://github.com/jpountz/lz4-java/archive/%{version}.tar.gz
-
-# From version 1.5 onwards, lz4-java uses lz4 as a submodule
-# lz4-java/src/lz4 -> lz4/lz4
-# lz4-java in particular uses lz4 version 1.9.2
-# Version1: v1.9.2
-# License: BSD 2-Clause license (for files in lib) and GPLv2
-# URL: https://github.com/lz4/lz4
-# Source1: https://github.com/lz4/lz4/archive/v.1.9.2.tar.gz
-
-# Disable maven-ant-tasks and old aqute-bnd (1.50.x) support
-# Add support for system mvel2
-# Fix doclint/encoding in javadoc task
-Patch0: 0-build.patch
-# Use randomizedtesting <= 2.1.3
-Patch1: 1-junit_Assert.patch
+# GPL:
+# src/lz4/
+# BSD:
+# src/lz4/libs
+License: ASL 2.0 and (BSD and GPLv2+)
+URL: https://github.com/lz4/lz4-java
+Source0: https://github.com/lz4/lz4-java/archive/%{version}.tar.gz
+Source1: https://github.com/lz4/lz4/archive/v%{lz4_version}.tar.gz
+
+Patch0: remove-tests.patch
# Build tools
BuildRequires: ant
@@ -39,18 +26,11 @@ BuildRequires: gcc
BuildRequires: ivy-local
BuildRequires: java-devel
BuildRequires: javapackages-local
-BuildRequires: lz4
BuildRequires: mvel
BuildRequires: objectweb-asm
-BuildRequires: randomizedtesting-junit4-ant
-# Other missing build deps
BuildRequires: bea-stax-api
BuildRequires: xerces-j2
BuildRequires: apache-parent
-# https://github.com/jpountz/lz4-java/issues/74
-# lz4 >= r128 is incompatible with lz4-java apparently
-# due to differences in the framing implementation
-Provides: bundled(lz4) = r122
# FPC ticket Bundled Library Exception
# https://fedorahosted.org/fpc/ticket/603
Provides: bundled(libxxhash) = r37
@@ -84,28 +64,22 @@ BuildArch: noarch
This package contains javadoc for %{name}.
%prep
-
%setup -q -n %{name}-%{version}
-# Cleanup
-find -name '*.dylib' -print -delete
-find -name '*.so' -print -delete
-
-# Build lz4
-make -C ./src/lz4/
-# make install -C ./src/lz4/
+%setup -T -D -a 1
%patch0 -p1
-%patch1 -p1
-# Fix OSGi manifest entries
-echo "Export-Package: net.jpountz.*,!linux.*" >> lz4.bnd
-sed -i '/packages.version/d' lz4.bnd
+mv lz4-1.9.2/* src/lz4/
-%build
+# Cleanup
+find -name '*.dylib' -print -delete
+find -name '*.so' -print -delete
-ant %build_opts -Divy.pom.version=%{version} jar docs makepom
+cp -p src/lz4/LICENSE lz4_LICENSE
+cp -p src/lz4/lib/LICENSE lz4_lib_LICENSE
-# bundle task use old bnd wrap configuration, is not usable
+%build
+ant -Divy.mode=local -Divy.revision=1.7.1 -Divy.pom.version=1.7.1 jar docs makepom
bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} dist/lz4-java.jar
%install
@@ -113,22 +87,18 @@ bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} di
%mvn_artifact dist/lz4-java-%{version}.pom dist/lz4-java-%{version}.jar
%mvn_install -J build/docs
-%ifnarch %{arm} aarch64 ppc64
-# FIXME - tests fail on aarch64 for unknown reason.
-# On armhfp tests are skipped due to poor JVM performance ("Execution
-# time total: 3 hours 37 minutes 14 seconds" ... waste of time)
-%check
-ant %build_opts test
-%endif
-
%files -f .mfiles
%doc CHANGES.md README.md
-%license LICENSE.txt ./src/lz4/LICENSE
+%license LICENSE.txt lz4_LICENSE lz4_lib_LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%changelog
+* Wed Aug 05 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-3
+- used commit from Jie Kang's fork of lz4-java to update to upstream 1.7.1
+- this prevents tests from running; eliminates the need for randomizedtesting for f33 onward
+
* Tue Aug 04 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-2
- Included the lz4 submodule inside the lz4-java source tarball
diff --git a/remove-tests.patch b/remove-tests.patch
new file mode 100644
index 0000000..a12b749
--- /dev/null
+++ b/remove-tests.patch
@@ -0,0 +1,26 @@
+diff --git a/ivy-pure-java.xml b/ivy-pure-java.xml
+index 6e99e19..58f4c53 100644
+--- a/ivy-pure-java.xml
++++ b/ivy-pure-java.xml
+@@ -19,8 +19,4 @@
+ <conf name="default" />
+ <conf name="test" extends="default" />
+ </configurations>
+-
+- <dependencies>
+- <dependency org="com.carrotsearch.randomizedtesting" name="junit4-ant" rev="2.7.3" transitive="true" conf="test->*,!sources,!javadoc" />
+- </dependencies>
+ </ivy-module>
+diff --git a/ivy.xml b/ivy.xml
+index 6643da7..4e3798c 100644
+--- a/ivy.xml
++++ b/ivy.xml
+@@ -19,8 +19,4 @@
+ <conf name="default" />
+ <conf name="test" extends="default" />
+ </configurations>
+-
+- <dependencies>
+- <dependency org="com.carrotsearch.randomizedtesting" name="junit4-ant" rev="2.7.3" transitive="true" conf="test->*,!sources,!javadoc" />
+- </dependencies>
+ </ivy-module>
diff --git a/sources b/sources
index 5a74eba..971053e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (1.7.1.tar.gz) = c11dab1fbd4a4585fe1f825a61a25f83f2fd5d47e8458c12cd024d6b9b87f8484dbfd60c21b2739e091c177c888b051f31bc8dd46b58041b2d340d3680e2e683
+SHA512 (1.7.1.tar.gz) = 13fd89a9564f1f504348ce30a51ca22d5581a6661658d55c96f3f0c1e43126de04d2df87683251a8ec5bf53726f529b60bb1ec666863b7e33810df8ed73bb586
commit e1e679ba29b6908c358f1e2890e8815c4e1036bb
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Tue Aug 4 12:43:33 2020 -0400
Included the lz4 submodule inside the lz4-java source tarball
diff --git a/lz4-java.spec b/lz4-java.spec
index c0587ed..0c25295 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -5,16 +5,24 @@
Name: lz4-java
Version: 1.7.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: LZ4 compression for Java
# GPL: src/xxhash/bench.c
# src/lz4/programs
# BSD: src/xxhash/xxhash.c src/xxhash/xxhash.h
# src/lz4
-License: ASL 2.0 and (BSD and GPLv2+)
+License: ASL 2.0
URL: https://github.com/jpountz/lz4-java
Source0: https://github.com/jpountz/lz4-java/archive/%{version}.tar.gz
+# From version 1.5 onwards, lz4-java uses lz4 as a submodule
+# lz4-java/src/lz4 -> lz4/lz4
+# lz4-java in particular uses lz4 version 1.9.2
+# Version1: v1.9.2
+# License: BSD 2-Clause license (for files in lib) and GPLv2
+# URL: https://github.com/lz4/lz4
+# Source1: https://github.com/lz4/lz4/archive/v.1.9.2.tar.gz
+
# Disable maven-ant-tasks and old aqute-bnd (1.50.x) support
# Add support for system mvel2
# Fix doclint/encoding in javadoc task
@@ -31,6 +39,7 @@ BuildRequires: gcc
BuildRequires: ivy-local
BuildRequires: java-devel
BuildRequires: javapackages-local
+BuildRequires: lz4
BuildRequires: mvel
BuildRequires: objectweb-asm
BuildRequires: randomizedtesting-junit4-ant
@@ -75,11 +84,16 @@ BuildArch: noarch
This package contains javadoc for %{name}.
%prep
+
%setup -q -n %{name}-%{version}
# Cleanup
find -name '*.dylib' -print -delete
find -name '*.so' -print -delete
+# Build lz4
+make -C ./src/lz4/
+# make install -C ./src/lz4/
+
%patch0 -p1
%patch1 -p1
@@ -91,12 +105,12 @@ sed -i '/packages.version/d' lz4.bnd
ant %build_opts -Divy.pom.version=%{version} jar docs makepom
-# bunlde task use old bnd wrap configuration, is not usable
-bnd wrap -p lz4.bnd -o dist/lz4-%{version}.jar --version %{version} dist/lz4.jar
+# bundle task use old bnd wrap configuration, is not usable
+bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} dist/lz4-java.jar
%install
%mvn_file net.jpountz.lz4:lz4 lz4
-%mvn_artifact dist/lz4-%{version}.pom dist/lz4-%{version}.jar
+%mvn_artifact dist/lz4-java-%{version}.pom dist/lz4-java-%{version}.jar
%mvn_install -J build/docs
%ifnarch %{arm} aarch64 ppc64
@@ -109,12 +123,15 @@ ant %build_opts test
%files -f .mfiles
%doc CHANGES.md README.md
-%license LICENSE.txt LICENSE.xxhash lz4_LICENSE
+%license LICENSE.txt ./src/lz4/LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%changelog
+* Tue Aug 04 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-2
+- Included the lz4 submodule inside the lz4-java source tarball
+
* Thu Jul 30 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-1
- Update to version 1.7.1
diff --git a/sources b/sources
index 971053e..5a74eba 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (1.7.1.tar.gz) = 13fd89a9564f1f504348ce30a51ca22d5581a6661658d55c96f3f0c1e43126de04d2df87683251a8ec5bf53726f529b60bb1ec666863b7e33810df8ed73bb586
+SHA512 (1.7.1.tar.gz) = c11dab1fbd4a4585fe1f825a61a25f83f2fd5d47e8458c12cd024d6b9b87f8484dbfd60c21b2739e091c177c888b051f31bc8dd46b58041b2d340d3680e2e683
commit 1f4f7c08846f011477313f9d5f5b841f6a662fe4
Author: Alex Macdonald <almacdon(a)redhat.com>
Date: Thu Jul 30 11:24:46 2020 -0400
update to version 1.7.1
diff --git a/.gitignore b/.gitignore
index 4700149..5f52bbc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/1.3.0.tar.gz
+/1.7.1.tar.gz
diff --git a/0-build.patch b/0-build.patch
new file mode 100644
index 0000000..5624f08
--- /dev/null
+++ b/0-build.patch
@@ -0,0 +1,141 @@
+diff --git a/build.xml b/build.xml
+index 7a63933..e48d5dd 100644
+--- a/build.xml
++++ b/build.xml
+@@ -17,8 +17,7 @@
+ <project name="lz4" default="dist" basedir="."
+ xmlns:cpptasks="antlib:net.sf.antcontrib.cpptasks"
+ xmlns:ivy="antlib:org.apache.ivy.ant"
+- xmlns:junit4="antlib:com.carrotsearch.junit4"
+- xmlns:mvn="antlib:org.apache.maven.artifact.ant">
++ xmlns:junit4="antlib:com.carrotsearch.junit4">
+
+ <property name="src" location="src"/>
+ <property name="build" location="build"/>
+@@ -76,8 +75,6 @@
+ </target>
+
+ <target name="-ivy-install" unless="ivy.available">
+- <mkdir dir="${user.home}/.ant/lib" />
+- <get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.jar.version}/${iv..." dest="${user.home}/.ant/lib/${ivy.jar.name}"/>
+ </target>
+
+ <target name="install-cpptasks" unless="cpptasks.available">
+@@ -88,10 +85,6 @@
+ </target>
+
+ <target name="install-maven-ant-tasks" unless="maven-ant-tasks.available">
+- <ivy:cachepath organisation="org.apache.maven" module="maven-ant-tasks" revision="2.1.3"
+- inline="true" conf="default" transitive="true" pathid="maven-ant-tasks.classpath"/>
+- <taskdef uri="antlib:org.apache.maven.artifact.ant" resource="org/apache/maven/artifact/ant/antlib.xml" classpathref="maven-ant-tasks.classpath"/>
+- <property name="maven-ant-tasks.available" value="true"/>
+ </target>
+
+ <target name="install-forbidden-apis" unless="forbidden-apis.available">
+@@ -102,11 +95,6 @@
+ </target>
+
+ <target name="install-bnd" unless="bnd.available">
+- <!-- using bnd 1.50.0 because more recent versions have broken JAR wrapping -->
+- <ivy:cachepath organisation="biz.aQute" module="bnd" revision="1.50.0"
+- inline="true" conf="default" transitive="true" pathid="bnd.classpath"/>
+- <taskdef resource="aQute/bnd/ant/taskdef.properties" classpathref="bnd.classpath"/>
+- <property name="bnd.available" value="true"/>
+ </target>
+
+ <target name="init">
+@@ -124,9 +112,15 @@
+ <property name="junit4.available" value="true" />
+ </target>
+
++ <path id="mvel.classpath">
++ <fileset dir="/usr/share/java">
++ <include name="mvel.jar"/>
++ <include name="objectweb-asm/asm.jar"/>
++ <include name="objectweb-asm/asm-util.jar"/>
++ </fileset>
++ </path>
++
+ <target name="generate-sources" depends="init">
+- <ivy:cachepath organisation="org.mvel" module="mvel2" revision="2.3.2.Final"
+- inline="true" conf="default" transitive="true" pathid="mvel.classpath"/>
+ <mkdir dir="${build}/java" />
+ <java
+ fork="true"
+@@ -329,7 +323,9 @@
+ overview="${src}/java/overview.html"
+ packagenames="net.jpountz.lz4,net.jpountz.xxhash"
+ windowtitle="lz4 / xxhash - Java API ${ivy.revision}"
+- destDir="${build}/docs">
++ destDir="${build}/docs"
++ encoding="UTF-8"
++ additionalparam="-Xdoclint:none">
+ <link href="http://download.oracle.com/javase/6/docs/api/" />
+ <sourcepath>
+ <pathelement location="${src}/java"/>
+@@ -375,8 +371,12 @@
+ </jar>
+ </target>
+
+- <target name="bundle" description="makes the JAR a valid OSGi bundle" depends="install-bnd, jar">
+- <taskdef resource="aQute/bnd/ant/taskdef.properties" classpathref="bnd.classpath"/>
++ <target name="bundle" description="makes the JAR a valid OSGi bundle" depends="jar">
++ <taskdef resource="aQute/bnd/ant/taskdef.properties" >
++ <classpath>
++ <fileset dir="/usr/share/java/aqute-bnd"/>
++ </classpath>
++ </taskdef>
+ <property name="packages.version" value="${ivy.revision}"/>
+ <!-- We need to remove potential -SNAPSHOT qualifiers as package versions... -->
+ <script language="javascript">
+@@ -411,7 +411,7 @@
+ <antcall target="dist" />
+ </target>
+
+- <target name="forbidden-apis" description="check API usage" depends="install-forbidden-apis,compile">
++ <target name="forbidden-apis" description="check API usage" depends="compile">
+ <forbidden-apis internalRuntimeForbidden="true" classpathref="forbidden-apis.classpath">
+ <bundledSignatures name="jdk-unsafe-${javac.target}"/>
+ <bundledSignatures name="jdk-deprecated-${javac.target}"/>
+@@ -429,41 +429,22 @@
+ <attribute name="repositoryid" />
+ <attribute name="repositoryurl" />
+ <sequential>
+- <mvn:mvn>
+- <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.4:sign-and-deploy-file" />
+- <arg value="-Durl=@{repositoryurl}" />
+- <arg value="-DrepositoryId=@{repositoryid}" />
+- <arg value="-DpomFile=${dist}/${ivy.module}-${ivy.revision}.pom" />
+- <arg value="-Dfile=${dist}/${ivy.module}-${ivy.revision}.jar" />
+- <arg value="-Dfiles=${dist}/${ivy.module}-${ivy.revision}-sources.jar,${dist}/${ivy.module}-${ivy.revision}-javadoc.jar" />
+- <arg value="-Dclassifiers=sources,javadoc" />
+- <arg value="-Dtypes=jar,jar" />
+- <arg value="-Pgpg" />
+- </mvn:mvn>
+ </sequential>
+ </macrodef>
+
+ <target name="deploy" description="deploy snapshot to snapshot repo" depends="install-maven-ant-tasks">
+- <property name="skip.jni" value="true" />
+- <antcall target="-deploy" />
+ </target>
+
+ <target name="-deploy" depends="clean,dist">
+- <deploy repositoryid="sonatype-nexus-snapshots" repositoryurl="https://oss.sonatype.org/content/repositories/snapshots" />
+ </target>
+
+ <!-- before this, update project version from SNAPSHOT to RELEASE -->
+ <target name="stage" description="deploy to release repo" depends="install-maven-ant-tasks,test-skip-jni,forbidden-apis">
+- <property name="skip.jni" value="true" />
+- <antcall target="-stage" />
+ </target>
+
+ <target name="stage-skip-test" description="deploy to release repo, skipping tests" depends="install-maven-ant-tasks,forbidden-apis">
+- <property name="skip.jni" value="true" />
+- <antcall target="-stage" />
+ </target>
+
+ <target name="-stage" depends="clean,dist">
+- <deploy repositoryid="sonatype-nexus-staging" repositoryurl="https://oss.sonatype.org/service/local/staging/deploy/maven2" />
+ </target>
+ </project>
diff --git a/1-junit_Assert.patch b/1-junit_Assert.patch
new file mode 100644
index 0000000..6b0075f
--- /dev/null
+++ b/1-junit_Assert.patch
@@ -0,0 +1,316 @@
+diff -Nru lz4-java-1.3.0/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java
+--- lz4-java-1.3.0/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java 2014-11-26 20:04:10.000000000 +0100
++++ lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java 2016-05-03 17:08:40.285741530 +0200
+@@ -207,11 +207,11 @@
+
+ final LZ4FastDecompressor decompressor = LZ4Factory.fastestInstance().fastDecompressor();
+ InputStream is = new LZ4BlockInputStream(open(compressed.toByteArray()), decompressor, checksum);
+- assertFalse(is.markSupported());
++ org.junit.Assert.assertFalse(is.markSupported());
+ try {
+ is.mark(1);
+ is.reset();
+- assertFalse(true);
++ org.junit.Assert.assertFalse(true);
+ } catch (IOException e) {
+ // OK
+ }
+@@ -235,8 +235,8 @@
+ }
+ }
+ is.close();
+- assertEquals(data.length, read);
+- assertArrayEquals(data, Arrays.copyOf(restored, read));
++ org.junit.Assert.assertEquals(data.length, read);
++ org.junit.Assert.assertArrayEquals(data, Arrays.copyOf(restored, read));
+
+ // test skip
+ final int offset = data.length <= 1 ? 0 : randomInt(data.length - 1);
+@@ -246,17 +246,17 @@
+ read = 0;
+ while (read < offset) {
+ final long skipped = is.skip(offset - read);
+- assertTrue(skipped >= 0);
++ org.junit.Assert.assertTrue(skipped >= 0);
+ read += skipped;
+ }
+ read = 0;
+ while (read < length) {
+ final int r = is.read(restored, read, length - read);
+- assertTrue(r >= 0);
++ org.junit.Assert.assertTrue(r >= 0);
+ read += r;
+ }
+ is.close();
+- assertArrayEquals(Arrays.copyOfRange(data, offset, offset + length), Arrays.copyOfRange(restored, 0, length));
++ org.junit.Assert.assertArrayEquals(Arrays.copyOfRange(data, offset, offset + length), Arrays.copyOfRange(restored, 0, length));
+ }
+
+ @Test
+@@ -288,7 +288,7 @@
+ byte[] actual = new byte[testBytes.length];
+ in.read(actual);
+
+- assertArrayEquals(testBytes, actual);
++ org.junit.Assert.assertArrayEquals(testBytes, actual);
+
+ in.close();
+ in.close();
+diff -Nru lz4-java-1.3.0/src/test/net/jpountz/xxhash/XXHash32Test.java lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/xxhash/XXHash32Test.java
+--- lz4-java-1.3.0/src/test/net/jpountz/xxhash/XXHash32Test.java 2014-11-26 20:04:10.000000000 +0100
++++ lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/xxhash/XXHash32Test.java 2016-05-03 17:08:40.278738569 +0200
+@@ -129,12 +129,12 @@
+ final int ref = XXHashFactory.nativeInstance().hash32().hash(buf, off, len, seed);
+ for (XXHash32 hash : INSTANCES) {
+ final int h = hash.hash(buf, off, len, seed);
+- assertEquals(hash.toString(), ref, h);
++ org.junit.Assert.assertEquals(hash.toString(), ref, h);
+ final ByteBuffer copy = copyOf(buf, off, len);
+ final int h2 = hash.hash(copy, off, len, seed);
+- assertEquals(off, copy.position());
+- assertEquals(len, copy.remaining());
+- assertEquals(hash.toString(), ref, h2);
++ org.junit.Assert.assertEquals(off, copy.position());
++ org.junit.Assert.assertEquals(len, copy.remaining());
++ org.junit.Assert.assertEquals(hash.toString(), ref, h2);
+ }
+ }
+
+@@ -155,8 +155,8 @@
+ hash1.update(bytes, off, len);
+ hash2.update(bytes, off, len);
+ hash3.update(bytes, off, len);
+- assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
+- assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
++ org.junit.Assert.assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
++ org.junit.Assert.assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
+ totalLen += len;
+ }
+ }
+diff -Nru lz4-java-1.3.0/src/test/net/jpountz/xxhash/XXHash64Test.java lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/xxhash/XXHash64Test.java
+--- lz4-java-1.3.0/src/test/net/jpountz/xxhash/XXHash64Test.java 2014-11-26 20:04:10.000000000 +0100
++++ lz4-java-1.3.0.junit.Assert/src/test/net/jpountz/xxhash/XXHash64Test.java 2016-05-03 17:08:40.278738569 +0200
+@@ -134,12 +134,12 @@
+ final long ref = XXHashFactory.nativeInstance().hash64().hash(buf, off, len, seed);
+ for (XXHash64 hash : INSTANCES) {
+ final long h = hash.hash(buf, off, len, seed);
+- assertEquals(hash.toString(), ref, h);
++ org.junit.Assert.assertEquals(hash.toString(), ref, h);
+ final ByteBuffer copy = copyOf(buf, off, len);
+ final long h2 = hash.hash(copy, off, len, seed);
+- assertEquals(off, copy.position());
+- assertEquals(len, copy.remaining());
+- assertEquals(hash.toString(), ref, h2);
++ org.junit.Assert.assertEquals(off, copy.position());
++ org.junit.Assert.assertEquals(len, copy.remaining());
++ org.junit.Assert.assertEquals(hash.toString(), ref, h2);
+ }
+ }
+
+@@ -160,8 +160,8 @@
+ hash1.update(bytes, off, len);
+ hash2.update(bytes, off, len);
+ hash3.update(bytes, off, len);
+- assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
+- assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
++ org.junit.Assert.assertEquals(hash2.toString() + " " + totalLen, hash1.getValue(), hash2.getValue());
++ org.junit.Assert.assertEquals(hash3.toString() + " " + totalLen, hash1.getValue(), hash3.getValue());
+ totalLen += len;
+ }
+ }
+diff --git a/src/test/net/jpountz/lz4/LZ4Test.java b/src/test/net/jpountz/lz4/LZ4Test.java
+index 739fdaf..6d27121 100644
+--- a/src/test/net/jpountz/lz4/LZ4Test.java
++++ b/src/test/net/jpountz/lz4/LZ4Test.java
+@@ -56,7 +56,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ if (tempLibFiles != null) {
+ for (File tempLibFile : tempLibFiles) {
+ File lckFile = new File(tempLibFile.getAbsolutePath() + ".lck");
+- assertTrue(tempLibFile.getAbsolutePath(), lckFile.exists());
++ org.junit.Assert.assertTrue(tempLibFile.getAbsolutePath(), lckFile.exists());
+ }
+ }
+ }
+@@ -70,7 +70,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ for (File tempLockFile : tempLockFiles) {
+ String tempLockFilePath = tempLockFile.getAbsolutePath();
+ File libFile = new File(tempLockFilePath.substring(0, tempLockFilePath.length() - 4));
+- assertTrue(tempLockFilePath, libFile.exists());
++ org.junit.Assert.assertTrue(tempLockFilePath, libFile.exists());
+ }
+ }
+ }
+@@ -80,7 +80,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ public void testMaxCompressedLength() {
+ final int len = randomBoolean() ? randomInt(16) : randomInt(1 << 30);
+ for (LZ4Compressor compressor : COMPRESSORS) {
+- assertEquals(LZ4JNI.LZ4_compressBound(len), compressor.maxCompressedLength(len));
++ org.junit.Assert.assertEquals(LZ4JNI.LZ4_compressBound(len), compressor.maxCompressedLength(len));
+ }
+ }
+
+@@ -116,8 +116,8 @@ public class LZ4Test extends AbstractLZ4Test {
+ byte[] compressed = getCompressedWorstCase(decompressed);
+ byte[] restored = new byte[decompressed.length];
+ int cpLen = decompressor.decompress(compressed, 0, restored, 0, decompressed.length);
+- assertEquals(compressed.length, cpLen);
+- assertArrayEquals(decompressed, restored);
++ org.junit.Assert.assertEquals(compressed.length, cpLen);
++ org.junit.Assert.assertArrayEquals(decompressed, restored);
+ }
+
+ @Test
+@@ -134,8 +134,8 @@ public class LZ4Test extends AbstractLZ4Test {
+ byte[] compressed = getCompressedWorstCase(decompressed);
+ byte[] restored = new byte[decompressed.length];
+ int uncpLen = decompressor.decompress(compressed, 0, compressed.length, restored, 0);
+- assertEquals(decompressed.length, uncpLen);
+- assertArrayEquals(decompressed, restored);
++ org.junit.Assert.assertEquals(decompressed.length, uncpLen);
++ org.junit.Assert.assertArrayEquals(decompressed, restored);
+ }
+
+ @Test
+@@ -169,8 +169,8 @@ public class LZ4Test extends AbstractLZ4Test {
+
+ // test decompression
+ final T restored = tester.allocate(len);
+- assertEquals(compressedLen, tester.decompress(decompressor, compressed, 0, restored, 0, len));
+- assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
++ org.junit.Assert.assertEquals(compressedLen, tester.decompress(decompressor, compressed, 0, restored, 0, len));
++ org.junit.Assert.assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
+
+ // make sure it fails if the compression dest is not large enough
+ tester.fill(restored, randomByte());
+@@ -183,8 +183,8 @@ public class LZ4Test extends AbstractLZ4Test {
+ // because the compressor is allowed to return different compression results
+ // even when it is invoked with the same input data.
+ // In this case, just make sure the compressed data can be successfully decompressed.
+- assertEquals(compressedLen2, tester.decompress(decompressor, compressed2, 0, restored, 0, len));
+- assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
++ org.junit.Assert.assertEquals(compressedLen2, tester.decompress(decompressor, compressed2, 0, restored, 0, len));
++ org.junit.Assert.assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
+ } catch (LZ4Exception e) {
+ // OK
+ }
+@@ -194,7 +194,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ // decompression dest is too small
+ try {
+ tester.decompress(decompressor, compressed, 0, restored, 0, len - 1);
+- fail();
++ org.junit.Assert.fail();
+ } catch (LZ4Exception e) {
+ // OK
+ }
+@@ -204,7 +204,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ final T restored2 = tester.allocate(len+1);
+ try {
+ final int cpLen = tester.decompress(decompressor, compressed, 0, restored2, 0, len + 1);
+- fail("compressedLen=" + cpLen);
++ org.junit.Assert.fail("compressedLen=" + cpLen);
+ } catch (LZ4Exception e) {
+ // OK
+ }
+@@ -212,17 +212,17 @@ public class LZ4Test extends AbstractLZ4Test {
+ // try decompression when only the size of the compressed buffer is known
+ if (len > 0) {
+ tester.fill(restored, randomByte());
+- assertEquals(len, tester.decompress(decompressor2, compressed, 0, compressedLen, restored, 0, len));
+- assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
++ org.junit.Assert.assertEquals(len, tester.decompress(decompressor2, compressed, 0, compressedLen, restored, 0, len));
++ org.junit.Assert.assertArrayEquals(Arrays.copyOfRange(data, off, off + len), tester.copyOf(restored, 0, len));
+ tester.fill(restored, randomByte());
+ } else {
+- assertEquals(0, tester.decompress(decompressor2, compressed, 0, compressedLen, tester.allocate(1), 0, 1));
++ org.junit.Assert.assertEquals(0, tester.decompress(decompressor2, compressed, 0, compressedLen, tester.allocate(1), 0, 1));
+ }
+
+ // over-estimated compressed length
+ try {
+ final int decompressedLen = tester.decompress(decompressor2, compressed, 0, compressedLen + 1, tester.allocate(len + 100), 0, len + 100);
+- fail("decompressedLen=" + decompressedLen);
++ org.junit.Assert.fail("decompressedLen=" + decompressedLen);
+ } catch (LZ4Exception e) {
+ // OK
+ }
+@@ -231,7 +231,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ try {
+ final int decompressedLen = tester.decompress(decompressor2, compressed, 0, compressedLen - 1, tester.allocate(len + 100), 0, len + 100);
+ if (!(decompressor2 instanceof LZ4JNISafeDecompressor)) {
+- fail("decompressedLen=" + decompressedLen);
++ org.junit.Assert.fail("decompressedLen=" + decompressedLen);
+ }
+ } catch (LZ4Exception e) {
+ // OK
+@@ -307,7 +307,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ try {
+ // it is invalid to end with a match, should be at least 5 literals
+ decompressor.decompress(invalid, 0, new byte[decompressedLength], 0, decompressedLength);
+- assertTrue(decompressor.toString(), false);
++ org.junit.Assert.assertTrue(decompressor.toString(), false);
+ } catch (LZ4Exception e) {
+ // OK
+ }
+@@ -317,7 +317,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ try {
+ // it is invalid to end with a match, should be at least 5 literals
+ decompressor.decompress(invalid, 0, invalid.length, new byte[20], 0);
+- assertTrue(false);
++ org.junit.Assert.assertTrue(false);
+ } catch (LZ4Exception e) {
+ // OK
+ }
+@@ -337,7 +337,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ try {
+ // it is invalid to end with a match, should be at least 5 literals
+ decompressor.decompress(invalid, 0, new byte[20], 0, 20);
+- assertTrue(decompressor.toString(), false);
++ org.junit.Assert.assertTrue(decompressor.toString(), false);
+ } catch (LZ4Exception e) {
+ // OK
+ }
+@@ -347,7 +347,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ try {
+ // it is invalid to end with a match, should be at least 5 literals
+ decompressor.decompress(invalid, 0, invalid.length, new byte[20], 0);
+- assertTrue(false);
++ org.junit.Assert.assertTrue(false);
+ } catch (LZ4Exception e) {
+ // OK
+ }
+@@ -362,7 +362,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ ByteBuffer out = Tester.BYTE_BUFFER.allocate(100).asReadOnlyBuffer();
+ try {
+ compressor.compress(in, out);
+- fail();
++ org.junit.Assert.fail();
+ } catch (ReadOnlyBufferException e) {
+ // ok
+ }
+@@ -372,7 +372,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ ByteBuffer out = Tester.BYTE_BUFFER.allocate(100).asReadOnlyBuffer();
+ try {
+ decompressor.decompress(in, out);
+- fail();
++ org.junit.Assert.fail();
+ } catch (ReadOnlyBufferException e) {
+ // ok
+ }
+@@ -383,7 +383,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ out.limit(2);
+ try {
+ decompressor.decompress(in, out);
+- fail();
++ org.junit.Assert.fail();
+ } catch (ReadOnlyBufferException e) {
+ // ok
+ }
+@@ -486,7 +486,7 @@ public class LZ4Test extends AbstractLZ4Test {
+ }
+ final Sequence sequence1 = readSequence(expected, off);
+ final Sequence sequence2 = readSequence(actual, off);
+- assertEquals(message + ", off=" + off + ", decompressedOff=" + decompressedOff, sequence1, sequence2);
++ org.junit.Assert.assertEquals(message + ", off=" + off + ", decompressedOff=" + decompressedOff, sequence1, sequence2);
+ off += sequence1.length;
+ decompressedOff += sequence1.literalLen + sequence1.matchLen;
+ }
diff --git a/lz4-java.spec b/lz4-java.spec
index e989247..c0587ed 100644
--- a/lz4-java.spec
+++ b/lz4-java.spec
@@ -4,8 +4,8 @@
%global build_opts -Doffline=true -Divy.mode=local -Divysettings.xml=/etc/ivy/ivysettings.xml -Divy.revision=%{version}
Name: lz4-java
-Version: 1.3.0
-Release: 13%{?dist}
+Version: 1.7.1
+Release: 1%{?dist}
Summary: LZ4 compression for Java
# GPL: src/xxhash/bench.c
# src/lz4/programs
@@ -18,9 +18,9 @@ Source0: https://github.com/jpountz/lz4-java/archive/%{version}.tar.gz
# Disable maven-ant-tasks and old aqute-bnd (1.50.x) support
# Add support for system mvel2
# Fix doclint/encoding in javadoc task
-Patch0: lz4-java-1.3.0-build.patch
+Patch0: 0-build.patch
# Use randomizedtesting <= 2.1.3
-Patch1: lz4-java-1.3.0-junit_Assert.patch
+Patch1: 1-junit_Assert.patch
# Build tools
BuildRequires: ant
@@ -83,9 +83,6 @@ find -name '*.so' -print -delete
%patch0 -p1
%patch1 -p1
-cp -p src/xxhash/LICENSE LICENSE.xxhash
-cp -p src/lz4/LICENSE lz4_LICENSE
-
# Fix OSGi manifest entries
echo "Export-Package: net.jpountz.*,!linux.*" >> lz4.bnd
sed -i '/packages.version/d' lz4.bnd
@@ -118,6 +115,9 @@ ant %build_opts test
%license LICENSE.txt
%changelog
+* Thu Jul 30 2020 Alex Macdonald <almacdon(a)redhat.com> 1.7.1-1
+- Update to version 1.7.1
+
* Wed Jan 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.3.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
diff --git a/sources b/sources
index 678213a..971053e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b9a4eb57fd0667df96135854c9e6f139 1.3.0.tar.gz
+SHA512 (1.7.1.tar.gz) = 13fd89a9564f1f504348ce30a51ca22d5581a6661658d55c96f3f0c1e43126de04d2df87683251a8ec5bf53726f529b60bb1ec666863b7e33810df8ed73bb586
2 years, 10 months
Architecture specific change in rpms/dotnet5.0.git
by githook-noreply@fedoraproject.org
The package rpms/dotnet5.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/dotnet5.0.git/commit/?id=b9e285d2...
https://src.fedoraproject.org/cgit/rpms/dotnet5.0.git/commit/?id=96fb4c4f...
https://src.fedoraproject.org/cgit/rpms/dotnet5.0.git/commit/?id=12044336...
https://src.fedoraproject.org/cgit/rpms/dotnet5.0.git/commit/?id=ccec65f6...
https://src.fedoraproject.org/cgit/rpms/dotnet5.0.git/commit/?id=b18622e4....
Change:
+%ifnarch x86_64
-%ifnarch x86_64
+%ifarch aarch64
+%ifnarch x86_64
+ExclusiveArch: x86_64
Thanks.
Full change:
============
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 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, 10 months
Architecture specific change in rpms/ceph.git
by githook-noreply@fedoraproject.org
The package rpms/ceph.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/ceph.git/commit/?id=bf4b7aed660ff....
Change:
-%ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
Thanks.
Full change:
============
commit 59dc7d25951ff4b608f639898b9d7149cb3123aa
Merge: bf4b7ae 5012434
Author: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Date: Fri Jan 29 11:38:23 2021 -0500
ceph 16.1.0 RC (ceph-16.1.0-43-g6b74fb5c)
Signed-off-by: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
commit bf4b7aed660ff81847698256dfde2dff4cb112be
Author: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Date: Fri Jan 29 11:35:03 2021 -0500
ceph 16.1.0 RC (ceph-16.1.0-43-g6b74fb5c)
Signed-off-by: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
diff --git a/0001-src-common-crc32c_intel_fast.patch b/0001-src-common-crc32c_intel_fast.patch
index 80066b7..b0e718c 100644
--- a/0001-src-common-crc32c_intel_fast.patch
+++ b/0001-src-common-crc32c_intel_fast.patch
@@ -1,176 +1,3 @@
---- ceph-15.2.4/src/yasm-wrapper.orig 2020-06-30 11:40:51.000000000 -0400
-+++ ceph-15.2.4/src/yasm-wrapper 2020-07-20 12:21:34.574980869 -0400
-@@ -1,10 +1,11 @@
--#!/bin/sh -e
-+#!/bin/sh
-
- # libtool and yasm do not get along.
- # filter out any crap that libtool feeds us that yasm does not understand.
- #echo $0: got $*
- new=""
- touch=""
-+object=""
- while [ -n "$*" ]; do
- case "$1" in
- -f )
-@@ -29,6 +30,12 @@
- touch="$1"
- shift
- ;;
-+ -o )
-+ shift
-+ object="$1"
-+ new="$new -o $1"
-+ shift
-+ ;;
- * )
- new="$new $1"
- shift
-@@ -36,8 +43,15 @@
- esac
- done
-
--#echo $0: yasm $new
--yasm $new
-+#echo ${0}: yasm ${new}
-+yasm ${new}
-+
-+echo ${new} | grep -- "crc32c_intel_fast*asm\.s"
-+if [ $? -ne 0 ]; then
-+ touch /tmp/${object}
-+ ld -r -z ibt -z shstk -z noexecstack -o ${object}.tmp ${object}
-+ mv ${object}.tmp ${object}
-+fi
-
- [ -n "$touch" ] && touch $touch
-
---- ceph-15.2.2/src/common/crc32c_intel_fast_asm.s.orig 2020-05-26 08:34:32.226201974 -0400
-+++ ceph-15.2.2/src/common/crc32c_intel_fast_asm.s 2020-05-26 17:19:20.327201974 -0400
-@@ -1,5 +1,5 @@
- ;
--; Copyright 2012-2013 Intel Corporation All Rights Reserved.
-+; Copyright 2012-2015 Intel Corporation All Rights Reserved.
- ; All rights reserved.
- ;
- ; http://opensource.org/licenses/BSD-3-Clause
-@@ -59,16 +59,34 @@
- xor rbx, rbx ;; rbx = crc1 = 0;
- xor r10, r10 ;; r10 = crc2 = 0;
-
-+ cmp len, %%bSize*3*2
-+ jbe %%non_prefetch
-+
- %assign i 0
- %rep %%bSize/8 - 1
-- crc32 rax, [bufptmp+i + 0*%%bSize] ;; update crc0
-- crc32 rbx, [bufptmp+i + 1*%%bSize] ;; update crc1
-- crc32 r10, [bufptmp+i + 2*%%bSize] ;; update crc2
-+ %if i < %%bSize*3/4
-+ prefetchnta [bufptmp+ %%bSize*3 + i*4]
-+ %endif
-+ crc32 rax, qword [bufptmp+i + 0*%%bSize] ;; update crc0
-+ crc32 rbx, qword [bufptmp+i + 1*%%bSize] ;; update crc1
-+ crc32 r10, qword [bufptmp+i + 2*%%bSize] ;; update crc2
- %assign i (i+8)
- %endrep
-- crc32 rax, [bufptmp+i + 0*%%bSize] ;; update crc0
-- crc32 rbx, [bufptmp+i + 1*%%bSize] ;; update crc1
--; SKIP ;crc32 r10, [bufptmp+i + 2*%%bSize] ;; update crc2
-+ jmp %%next %+ %1
-+
-+%%non_prefetch:
-+ %assign i 0
-+ %rep %%bSize/8 - 1
-+ crc32 rax, qword [bufptmp+i + 0*%%bSize] ;; update crc0
-+ crc32 rbx, qword [bufptmp+i + 1*%%bSize] ;; update crc1
-+ crc32 r10, qword [bufptmp+i + 2*%%bSize] ;; update crc2
-+ %assign i (i+8)
-+ %endrep
-+
-+%%next %+ %1:
-+ crc32 rax, qword [bufptmp+i + 0*%%bSize] ;; update crc0
-+ crc32 rbx, qword [bufptmp+i + 1*%%bSize] ;; update crc1
-+; SKIP ;crc32 r10, qword [bufptmp+i + 2*%%bSize] ;; update crc2
-
- ; merge in crc0
- movzx bufp_dw, al
-@@ -180,12 +198,15 @@
- %define crc_init_dw r8d
- %endif
-
--
-+ endbranch
- push rdi
- push rbx
-
- mov rax, crc_init ;; rax = crc_init;
-
-+ cmp len, 8
-+ jb less_than_8
-+
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; 1) ALIGN: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-@@ -195,9 +216,6 @@
- ;; amount of the address
- je proc_block ;; Skip if aligned
-
-- cmp len, 8
-- jb less_than_8
--
- ;;;; Calculate CRC of unaligned bytes of the buffer (if any) ;;;;
- mov rbx, [bufptmp] ;; load a quadword from the buffer
- add bufptmp, bufp ;; align buffer pointer for
-@@ -233,7 +251,7 @@
- jnc bit7 ;; jump to bit-6 if bit-7 == 0
- %assign i 0
- %rep 16
-- crc32 rax, [bufptmp+i] ;; compute crc32 of 8-byte data
-+ crc32 rax, qword [bufptmp+i] ;; compute crc32 of 8-byte data
- %assign i (i+8)
- %endrep
- je do_return ;; return if remaining data is zero
-@@ -244,7 +262,7 @@
- jnc bit6 ;; jump to bit-6 if bit-7 == 0
- %assign i 0
- %rep 8
-- crc32 rax, [bufptmp+i] ;; compute crc32 of 8-byte data
-+ crc32 rax, qword [bufptmp+i] ;; compute crc32 of 8-byte data
- %assign i (i+8)
- %endrep
- je do_return ;; return if remaining data is zero
-@@ -254,7 +272,7 @@
- jnc bit5 ;; jump to bit-5 if bit-6 == 0
- %assign i 0
- %rep 4
-- crc32 rax, [bufptmp+i] ;; compute crc32 of 8-byte data
-+ crc32 rax, qword [bufptmp+i] ;; compute crc32 of 8-byte data
- %assign i (i+8)
- %endrep
- je do_return ;; return if remaining data is zero
-@@ -264,7 +282,7 @@
- jnc bit4 ;; jump to bit-4 if bit-5 == 0
- %assign i 0
- %rep 2
-- crc32 rax, [bufptmp+i] ;; compute crc32 of 8-byte data
-+ crc32 rax, qword [bufptmp+i] ;; compute crc32 of 8-byte data
- %assign i (i+8)
- %endrep
- je do_return ;; return if remaining data is zero
-@@ -272,11 +290,11 @@
- bit4:
- shl len_b, 1 ;; shift-out MSB (bit-4)
- jnc bit3 ;; jump to bit-3 if bit-4 == 0
-- crc32 rax, [bufptmp] ;; compute crc32 of 8-byte data
-+ crc32 rax, qword [bufptmp] ;; compute crc32 of 8-byte data
- je do_return ;; return if remaining data is zero
- add bufptmp, 8 ;; buf +=8; (next 8 bytes)
- bit3:
-- mov rbx, [bufptmp] ;; load a 8-bytes from the buffer:
-+ mov rbx, qword [bufptmp] ;; load a 8-bytes from the buffer:
- shl len_b, 1 ;; shift-out MSB (bit-3)
- jnc bit2 ;; jump to bit-2 if bit-3 == 0
- crc32 eax, ebx ;; compute crc32 of 4-byte data
--- ceph-15.2.2/src/common/crc32c_intel_fast_zero_asm.s.orig 2020-05-26 08:34:32.226201974 -0400
+++ ceph-15.2.2/src/common/crc32c_intel_fast_zero_asm.s 2020-05-26 17:19:32.497201974 -0400
@@ -1,5 +1,5 @@
diff --git a/0004-src-CMakeLists.txt.patch b/0004-src-CMakeLists.txt.patch
new file mode 100644
index 0000000..f3f2e36
--- /dev/null
+++ b/0004-src-CMakeLists.txt.patch
@@ -0,0 +1,12 @@
+--- ceph-16.0.0/src/CMakeLists.txt.orig 2021-01-25 13:45:15.316053258 -0500
++++ ceph-16.0.0/src/CMakeLists.txt 2021-01-25 13:43:34.418305591 -0500
+@@ -29,7 +29,8 @@
+ -D_THREAD_SAFE
+ -D__STDC_FORMAT_MACROS
+ -D_FILE_OFFSET_BITS=64
+- -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
++ -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION
++ -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+ if(LINUX)
+ add_definitions("-D_GNU_SOURCE")
+ endif()
diff --git a/0005-src-librbd-migration.patch b/0005-src-librbd-migration.patch
new file mode 100644
index 0000000..3a637e9
--- /dev/null
+++ b/0005-src-librbd-migration.patch
@@ -0,0 +1,78 @@
+--- ceph-16.1.0/src/librbd/AsioEngine.h.orig 2021-01-27 09:52:12.314415539 -0500
++++ ceph-16.1.0/src/librbd/AsioEngine.h 2021-01-27 09:55:35.289955105 -0500
+@@ -39,7 +39,8 @@
+ inline operator boost::asio::io_context&() {
+ return m_io_context;
+ }
+- inline boost::asio::io_context::executor_type get_executor() {
++ using executor_type = boost::asio::io_context::executor_type;
++ inline executor_type get_executor() {
+ return m_io_context.get_executor();
+ }
+
+--- ceph-16.1.0/src/librbd/migration/FileStream.cc.orig 2021-01-27 09:58:21.984505879 -0500
++++ ceph-16.1.0/src/librbd/migration/FileStream.cc 2021-01-27 09:58:48.945241982 -0500
+@@ -121,7 +121,8 @@
+ template <typename I>
+ FileStream<I>::FileStream(I* image_ctx, const json_spirit::mObject& json_object)
+ : m_cct(image_ctx->cct), m_asio_engine(image_ctx->asio_engine),
+- m_json_object(json_object), m_strand(*m_asio_engine) {
++ m_json_object(json_object),
++ m_strand(boost::asio::make_strand(*m_asio_engine)) {
+ }
+
+ template <typename I>
+--- ceph-16.1.0/src/librbd/migration/FileStream.h.orig 2021-01-27 09:59:03.542640537 -0500
++++ ceph-16.1.0/src/librbd/migration/FileStream.h 2021-01-27 09:59:42.054692043 -0500
+@@ -6,7 +6,8 @@
+
+ #include "include/int_types.h"
+ #include "librbd/migration/StreamInterface.h"
+-#include <boost/asio/io_context_strand.hpp>
++#include <boost/asio/io_context.hpp>
++#include <boost/asio/strand.hpp>
+ #include <boost/asio/posix/basic_stream_descriptor.hpp>
+ #include <json_spirit/json_spirit.h>
+ #include <memory>
+@@ -48,7 +49,7 @@
+ std::shared_ptr<AsioEngine> m_asio_engine;
+ json_spirit::mObject m_json_object;
+
+- boost::asio::io_context::strand m_strand;
++ boost::asio::strand<boost::asio::io_context::executor_type> m_strand;
+ #ifdef BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+ std::optional<boost::asio::posix::stream_descriptor> m_stream_descriptor;
+
+--- ceph-16.1.0/src/librbd/migration/HttpClient.cc.orig 2021-01-27 10:00:04.167295789 -0500
++++ ceph-16.1.0/src/librbd/migration/HttpClient.cc 2021-01-27 10:00:34.303118596 -0500
+@@ -764,7 +764,8 @@
+ template <typename I>
+ HttpClient<I>::HttpClient(I* image_ctx, const std::string& url)
+ : m_cct(image_ctx->cct), m_image_ctx(image_ctx),
+- m_asio_engine(image_ctx->asio_engine), m_url(url), m_strand(*m_asio_engine),
++ m_asio_engine(image_ctx->asio_engine), m_url(url),
++ m_strand(boost::asio::make_strand(*m_asio_engine)),
+ m_ssl_context(boost::asio::ssl::context::sslv23_client) {
+ m_ssl_context.set_default_verify_paths();
+ }
+--- ceph-16.1.0/src/librbd/migration/HttpClient.h.orig 2021-01-27 10:00:49.626536973 -0500
++++ ceph-16.1.0/src/librbd/migration/HttpClient.h 2021-01-27 10:01:38.728877629 -0500
+@@ -9,7 +9,8 @@
+ #include "librbd/io/Types.h"
+ #include "librbd/migration/HttpProcessorInterface.h"
+ #include "librbd/migration/Types.h"
+-#include <boost/asio/io_context_strand.hpp>
++#include <boost/asio/io_context.hpp>
++#include <boost/asio/strand.hpp>
+ #include <boost/asio/ip/tcp.hpp>
+ #include <boost/asio/ssl/context.hpp>
+ #include <boost/beast/version.hpp>
+@@ -171,7 +172,7 @@
+
+ HttpProcessorInterface* m_http_processor = nullptr;
+
+- boost::asio::io_context::strand m_strand;
++ boost::asio::strand<boost::asio::io_context::executor_type> m_strand;
+
+ boost::asio::ssl::context m_ssl_context;
+ std::unique_ptr<HttpSessionInterface> m_http_session;
diff --git a/ceph.spec b/ceph.spec
index e4cc03a..3950419 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -23,6 +23,7 @@
%global _hardened_build 1
%bcond_with make_check
+%bcond_with zbd
%bcond_with cmake_verbose_logging
%bcond_without ceph_test_package
%ifarch s390 s390x
@@ -62,6 +63,9 @@
%endif
%endif
%bcond_with seastar
+%bcond_with jaeger
+%bcond_with rbd_rwl_cache
+%bcond_with rbd_ssd_cache
%if 0%{?fedora} || 0%{?suse_version} >= 1500
# distros that ship cmd2 and/or colorama
%bcond_without cephfs_shell
@@ -82,16 +86,24 @@
%endif
%endif
+%if 0%{?suse_version}
+%if !0%{?is_opensuse}
+# SLE does not support luarocks
+%bcond_with lua_packages
+%else
+%global luarocks_package_name lua53-luarocks
+%bcond_without lua_packages
+%endif
+%else
+%global luarocks_package_name luarocks
+%bcond_without lua_packages
+%endif
+
%{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d}
%{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create}
%{!?python3_pkgversion: %global python3_pkgversion 3}
%{!?python3_version_nodots: %global python3_version_nodots 3}
%{!?python3_version: %global python3_version 3}
-%if 0%{?rhel} == 7
-%define __python %{__python3}
-%endif
-# unify libexec for all targets
-%global _libexecdir %{_exec_prefix}/lib
# disable dwz which compresses the debuginfo
%global _find_debuginfo_dwz_opts %{nil}
@@ -100,8 +112,8 @@
# main package definition
#################################################################################
Name: ceph
-Version: 15.2.5
-Release: 1%{?dist}
+Version: 16.1.0
+Release: 0.1.snapshot%{?dist}
%if 0%{?fedora} || 0%{?rhel}
Epoch: 2
%endif
@@ -117,10 +129,14 @@ License: (LGPLv2.1 or LGPLv3) and CC-BY-SA-3.0 and GPLv2 and Boost-1.0 and BSD a
Group: System/Filesystems
%endif
URL: http://ceph.com/
-Source0: %{?_remote_tarball_prefix}ceph-%{version}.tar.gz
+#Source0: %%{?_remote_tarball_prefix}ceph-%%{version}.tar.gz
+# https://2.chacra.ceph.com/r/ceph/pacific/6b74fb5c...
+Source0: ceph-16.1.0-43-g6b74fb5c.tar.bz2
Patch0001: 0001-src-common-crc32c_intel_fast.patch
Patch0002: 0002-src-common-CMakeLists.txt.patch
Patch0003: 0003-src-common-bitstr.h.patch
+Patch0004: 0004-src-CMakeLists.txt.patch
+Patch0005: 0005-src-librbd-migration.patch
Source1: cmake-modules-BuildBoost.cmake.noautopatch
# ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787
ExcludeArch: i686 armv7hl
@@ -145,18 +161,14 @@ BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
%endif
BuildRequires: gperf
-%if 0%{?rhel} == 7
-BuildRequires: cmake3 > 3.5
-%else
BuildRequires: cmake > 3.5
-%endif
BuildRequires: cryptsetup
-BuildRequires: fuse-devel
+BuildRequires: fuse3-devel
BuildRequires: fmt-devel
%if 0%{?rhel} == 7
# devtoolset offers newer make and valgrind-devel, but the old ones are good
# enough.
-BuildRequires: devtoolset-8-gcc-c++ >= 8.3.1-3.1
+BuildRequires: devtoolset-9-gcc-c++ >= 9.2.1-2.3
%else
BuildRequires: gcc-c++
%endif
@@ -172,8 +184,10 @@ BuildRequires: gperftools-devel >= 2.4
BuildRequires: leveldb-devel > 1.2
BuildRequires: libaio-devel
BuildRequires: libblkid-devel >= 2.17
+BuildRequires: cryptsetup-devel
BuildRequires: libcurl-devel
BuildRequires: libcap-ng-devel
+BuildRequires: fmt-devel >= 5.2.1
BuildRequires: pkgconfig(libudev)
BuildRequires: libnl3-devel
BuildRequires: liboath-devel
@@ -198,46 +212,43 @@ BuildRequires: which
BuildRequires: xfsprogs
BuildRequires: xfsprogs-devel
BuildRequires: xmlstarlet
-BuildRequires: yasm
+BuildRequires: lua-devel
+BuildRequires: nasm
%if 0%{with amqp_endpoint}
BuildRequires: librabbitmq-devel
%endif
%if 0%{with kafka_endpoint}
BuildRequires: librdkafka-devel
%endif
+%if 0%{with lua_packages}
+BuildRequires: %{luarocks_package_name}
+%endif
%if 0%{with make_check}
BuildRequires: jq
BuildRequires: libuuid-devel
-%if 0%{?rhel} == 7
-BuildRequires: python%{python3_version_nodots}-bcrypt
-BuildRequires: python%{python3_version_nodots}-nose
-BuildRequires: python%{python3_version_nodots}-requests
-BuildRequires: python%{python3_version_nodots}-dateutil
-%else
BuildRequires: python%{python3_pkgversion}-bcrypt
BuildRequires: python%{python3_pkgversion}-nose
BuildRequires: python%{python3_pkgversion}-pecan
BuildRequires: python%{python3_pkgversion}-requests
BuildRequires: python%{python3_pkgversion}-dateutil
+BuildRequires: python%{python3_pkgversion}-coverage
+BuildRequires: python%{python3_pkgversion}-pyOpenSSL
+BuildRequires: socat
%endif
-%if 0%{?rhel} == 7
-BuildRequires: python%{python3_version_nodots}-six
-BuildRequires: python%{python3_version_nodots}-virtualenv
-%else
-BuildRequires: python%{python3_pkgversion}-six
-BuildRequires: python%{python3_pkgversion}-virtualenv
+%if 0%{with zbd}
+BuildRequires: libzbd-devel
%endif
-%if 0%{?rhel} == 7
-BuildRequires: python%{python3_version_nodots}-coverage
-%else
-BuildRequires: python%{python3_pkgversion}-coverage
+%if 0%{with jaeger}
+BuildRequires: bison
+BuildRequires: flex
+%if 0%{?fedora} || 0%{?rhel}
+BuildRequires: json-devel
%endif
-%if 0%{?rhel} == 7
-BuildRequires: python%{python3_version_nodots}-pyOpenSSL
-%else
-BuildRequires: python%{python3_pkgversion}-pyOpenSSL
+%if 0%{?suse_version}
+BuildRequires: nlohmann_json-devel
%endif
-BuildRequires: socat
+BuildRequires: libevent-devel
+BuildRequires: yaml-cpp-devel
%endif
%if 0%{with seastar}
BuildRequires: c-ares-devel
@@ -249,6 +260,17 @@ BuildRequires: protobuf-devel
BuildRequires: ragel
BuildRequires: systemtap-sdt-devel
BuildRequires: yaml-cpp-devel
+%if 0%{?fedora}
+BuildRequires: libubsan
+BuildRequires: libasan
+BuildRequires: libatomic
+%endif
+%if 0%{?rhel}
+BuildRequires: gcc-toolset-9-annobin
+BuildRequires: gcc-toolset-9-libubsan-devel
+BuildRequires: gcc-toolset-9-libasan-devel
+BuildRequires: gcc-toolset-9-libatomic-devel
+%endif
%endif
#################################################################################
# distro-conditional dependencies
@@ -293,11 +315,7 @@ BuildRequires: CUnit-devel
BuildRequires: redhat-lsb-core
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
-%if 0%{?rhel} == 7
-BuildRequires: python%{python3_version_nodots}-Cython
-%else
BuildRequires: python%{python3_pkgversion}-Cython
-%endif
BuildRequires: python%{python3_pkgversion}-prettytable
BuildRequires: python%{python3_pkgversion}-sphinx
BuildRequires: lz4-devel >= 1.7
@@ -313,22 +331,13 @@ BuildRequires: xmlsec1-nss
%endif
BuildRequires: xmlsec1-openssl
BuildRequires: xmlsec1-openssl-devel
-%if 0%{?rhel} == 7
-BuildRequires: python%{python3_version_nodots}-jwt
-BuildRequires: python%{python3_version_nodots}-scipy
-%else
BuildRequires: python%{python3_pkgversion}-cherrypy
BuildRequires: python%{python3_pkgversion}-jwt
BuildRequires: python%{python3_pkgversion}-routes
BuildRequires: python%{python3_pkgversion}-scipy
BuildRequires: python%{python3_pkgversion}-werkzeug
-%endif
-%if 0%{?rhel} == 7
-BuildRequires: python%{python3_version_nodots}-pyOpenSSL
-%else
BuildRequires: python%{python3_pkgversion}-pyOpenSSL
%endif
-%endif
%if 0%{?suse_version}
BuildRequires: libxmlsec1-1
BuildRequires: libxmlsec1-nss1
@@ -426,10 +435,8 @@ Base is the package that includes all the files shared amongst ceph servers
%package -n cephadm
Summary: Utility to bootstrap Ceph clusters
+BuildArch: noarch
Requires: lvm2
-%if 0%{?suse_version}
-Requires: apparmor-abstractions
-%endif
Requires: python%{python3_pkgversion}
%if 0%{?weak_deps}
Recommends: podman
@@ -452,6 +459,9 @@ Requires: python%{python3_pkgversion}-cephfs = %{_epoch_prefix}%{version}-%{rele
Requires: python%{python3_pkgversion}-rgw = %{_epoch_prefix}%{version}-%{release}
Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
Requires: python%{python3_pkgversion}-ceph-common = %{_epoch_prefix}%{version}-%{release}
+%if 0%{with jaeger}
+Requires: libjaeger = %{_epoch_prefix}%{version}-%{release}
+%endif
%if 0%{?fedora} || 0%{?rhel}
Requires: python%{python3_pkgversion}-prettytable
%endif
@@ -487,6 +497,17 @@ Group: System/Filesystems
%endif
Provides: ceph-test:/usr/bin/ceph-monstore-tool
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
+%if 0%{?weak_deps}
+Recommends: nvme-cli
+%if 0%{?suse_version}
+Requires: smartmontools
+%else
+Recommends: smartmontools
+%endif
+%endif
+%if 0%{with jaeger}
+Requires: libjaeger = %{_epoch_prefix}%{version}-%{release}
+%endif
%description mon
ceph-mon is the cluster monitor daemon for the Ceph distributed file
system. One or more instances of ceph-mon form a Paxos part-time
@@ -500,11 +521,6 @@ Group: System/Filesystems
%endif
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
Requires: ceph-mgr-modules-core = %{_epoch_prefix}%{version}-%{release}
-%if 0%{?rhel} == 7
-Requires: python%{python3_version_nodots}-six
-%else
-Requires: python%{python3_pkgversion}-six
-%endif
%if 0%{?weak_deps}
Recommends: ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release}
Recommends: ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release}
@@ -558,47 +574,25 @@ Group: System/Filesystems
%endif
Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
Requires: python%{python3_pkgversion}-numpy
-Requires: python%{python3_pkgversion}-scipy
-%if 0%{?rhel} == 7
-Requires: numpy
-Requires: scipy
+%if 0%{?fedora} || 0%{?suse_version}
+Requires: python%{python3_pkgversion}-scikit-learn
%endif
+Requires: python3-scipy
%description mgr-diskprediction-local
ceph-mgr-diskprediction-local is a ceph-mgr module that tries to predict
disk failures using local algorithms and machine-learning databases.
-%package mgr-diskprediction-cloud
-Summary: Ceph Manager module for cloud-based disk failure prediction
-BuildArch: noarch
-%if 0%{?suse_version}
-Group: System/Filesystems
-%endif
-Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
-Requires: python%{python3_pkgversion}-grpcio
-Requires: python%{python3_pkgversion}-protobuf
-%description mgr-diskprediction-cloud
-ceph-mgr-diskprediction-cloud is a ceph-mgr module that tries to predict
-disk failures using services in the Google cloud.
-
%package mgr-modules-core
Summary: Ceph Manager modules which are always enabled
BuildArch: noarch
%if 0%{?suse_version}
Group: System/Filesystems
%endif
-%if 0%{?rhel} == 7
-Requires: python%{python3_version_nodots}-bcrypt
-Requires: python%{python3_version_nodots}-pyOpenSSL
-Requires: python%{python3_version_nodots}-requests
-Requires: python%{python3_version_nodots}-PyYAML
-Requires: python%{python3_version_nodots}-dateutil
-%else
Requires: python%{python3_pkgversion}-bcrypt
Requires: python%{python3_pkgversion}-pecan
Requires: python%{python3_pkgversion}-pyOpenSSL
Requires: python%{python3_pkgversion}-requests
Requires: python%{python3_pkgversion}-dateutil
-%endif
%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: python%{python3_pkgversion}-cherrypy
Requires: python%{python3_pkgversion}-pyyaml
@@ -672,6 +666,17 @@ Requires: python%{python3_pkgversion}
%description fuse
FUSE based client for Ceph distributed network file system
+%package -n cephfs-mirror
+Summary: Ceph daemon for mirroring CephFS snapshots
+%if 0%{?suse_version}
+Group: System/Filesystems
+%endif
+Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
+Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
+Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
+%description -n cephfs-mirror
+Daemon for mirroring CephFS snapshots between Ceph clusters.
+
%package -n rbd-fuse
Summary: Ceph fuse-based client
%if 0%{?suse_version}
@@ -733,6 +738,14 @@ storage system. This package provides a REST gateway to the
object store that aims to implement a superset of Amazon's S3
service as well as the OpenStack Object Storage ("Swift") API.
+%package -n cephfs-top
+Summary: top(1) like utility for Ceph Filesystem
+BuildArch: noarch
+Requires: python%{python3_pkgversion}-rados
+%description -n cephfs-top
+This package provides a top(1) like utility to display Ceph Filesystem metrics
+in realtime.
+
%if %{with ocf}
%package resource-agents
Summary: OCF-compliant resource agents for Ceph daemons
@@ -758,6 +771,14 @@ Requires: lvm2
Requires: sudo
Requires: libstoragemgmt
Requires: python%{python3_pkgversion}-ceph-common = %{_epoch_prefix}%{version}-%{release}
+%if 0%{?weak_deps}
+Recommends: nvme-cli
+%if 0%{?suse_version}
+Requires: smartmontools
+%else
+Recommends: smartmontools
+%endif
+%endif
%description osd
ceph-osd is the object storage daemon for the Ceph distributed file
system. It is responsible for storing objects on a local file system
@@ -848,7 +869,7 @@ Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{relea
Provides: python-rgw = %{_epoch_prefix}%{version}-%{release}
Obsoletes: python-rgw < %{_epoch_prefix}%{version}-%{release}
%description -n python%{python3_pkgversion}-rgw
-This package contains Python 3 libraries for interacting with Cephs RADOS
+This package contains Python 3 libraries for interacting with Ceph RADOS
gateway.
%package -n python%{python3_pkgversion}-rados
@@ -862,7 +883,7 @@ Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Provides: python-rados = %{_epoch_prefix}%{version}-%{release}
Obsoletes: python-rados < %{_epoch_prefix}%{version}-%{release}
%description -n python%{python3_pkgversion}-rados
-This package contains Python 3 libraries for interacting with Cephs RADOS
+This package contains Python 3 libraries for interacting with Ceph RADOS
object store.
%if 0%{with libradosstriper}
@@ -937,7 +958,7 @@ Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{relea
Provides: python-rbd = %{_epoch_prefix}%{version}-%{release}
Obsoletes: python-rbd < %{_epoch_prefix}%{version}-%{release}
%description -n python%{python3_pkgversion}-rbd
-This package contains Python 3 libraries for interacting with Cephs RADOS
+This package contains Python 3 libraries for interacting with Ceph RADOS
block device.
%package -n libcephfs2
@@ -968,7 +989,21 @@ Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release}
Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release}
%description -n libcephfs-devel
This package contains libraries and headers needed to develop programs
-that use Cephs distributed file system.
+that use Ceph distributed file system.
+
+%if 0%{with jaeger}
+%package -n libjaeger
+Summary: Ceph distributed file system tracing library
+%if 0%{?suse_version}
+Group: System/Libraries
+%endif
+Provides: libjaegertracing.so.0()(64bit)
+Provides: libopentracing.so.1()(64bit)
+Provides: libthrift.so.0.13.0()(64bit)
+%description -n libjaeger
+This package contains libraries needed to provide distributed
+tracing for Ceph.
+%endif
%package -n python%{python3_pkgversion}-cephfs
Summary: Python 3 libraries for Ceph distributed file system
@@ -982,7 +1017,7 @@ Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}
Provides: python-cephfs = %{_epoch_prefix}%{version}-%{release}
Obsoletes: python-cephfs < %{_epoch_prefix}%{version}-%{release}
%description -n python%{python3_pkgversion}-cephfs
-This package contains Python 3 libraries for interacting with Cephs distributed
+This package contains Python 3 libraries for interacting with Ceph distributed
file system.
%package -n python%{python3_pkgversion}-ceph-argparse
@@ -1129,13 +1164,13 @@ Summary: Prometheus alerts for a Ceph deplyoment
BuildArch: noarch
Group: System/Monitoring
%description prometheus-alerts
-This package provides Ceph’s default alerts for Prometheus.
+This package provides Ceph default alerts for Prometheus.
#################################################################################
# common
#################################################################################
%prep
-%autosetup -p1
+%autosetup -p1 -n ceph-16.1.0-43-g6b74fb5c
%ifarch x86_64
patch -p1 < %{SOURCE1}
%endif
@@ -1145,8 +1180,8 @@ patch -p1 < %{SOURCE1}
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200
%define _lto_cflags %{nil}
-%if 0%{?rhel} == 7
-. /opt/rh/devtoolset-8/enable
+%if 0%{with seastar} &&0%{?rhel}
+. /opt/rh/devtoolset-9/enable
%endif
%if 0%{with cephfs_java}
@@ -1166,6 +1201,11 @@ export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS"
+%if 0%{with seastar}
+# seastar uses longjmp() to implement coroutine. and this annoys longjmp_chk()
+export CXXFLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g')
+%endif
+
# Parallel build settings ...
CEPH_MFLAGS_JOBS="%{?_smp_mflags}"
CEPH_SMP_NCPUS=$(echo "$CEPH_MFLAGS_JOBS" | sed 's/-j//')
@@ -1192,9 +1232,6 @@ env | sort
mkdir build
cd build
-%if 0%{?rhel} == 7
-%global cmake cmake3
-%endif
%{cmake} .. \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_CONFIG=rpmbuild \
@@ -1206,6 +1243,7 @@ cd build
-DCMAKE_INSTALL_MANDIR=%{_mandir} \
-DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
+ -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=%{_unitdir} \
-DWITH_MANPAGE=ON \
-DWITH_PYTHON3=%{python3_version} \
-DWITH_MGR_DASHBOARD_FRONTEND=OFF \
@@ -1231,11 +1269,6 @@ cd build
%endif
-DWITH_REENTRANT_STRSIGNAL=ON \
-DWITH_SYSTEM_BOOST=ON \
-%ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
- -DWITH_BOOST_CONTEXT=ON \
-%else
- -DWITH_BOOST_CONTEXT=OFF \
-%endif
%if 0%{with cephfs_shell}
-DWITH_CEPHFS_SHELL=ON \
%endif
@@ -1254,8 +1287,20 @@ cd build
%else
-DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \
%endif
+%if 0%{without lua_packages}
+ -DWITH_RADOSGW_LUA_PACKAGES=OFF
+%endif
+%if 0%{with zbd}
+ -DWITH_ZBD=ON \
+%endif
%if 0%{with cmake_verbose_logging}
-DCMAKE_VERBOSE_MAKEFILE=ON \
+%endif
+%if 0%{with rbd_rwl_cache}
+ -DWITH_RBD_RWL=ON \
+%endif
+%if 0%{with rbd_ssd_cache}
+ -DWITH_RBD_SSD_CACHE=ON \
%endif
-DBOOST_J=$CEPH_SMP_NCPUS \
%if 0%{with ceph_test_package}
@@ -1287,6 +1332,10 @@ pushd build
# we have dropped sysvinit bits
rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
popd
+%if 0%{with seastar}
+# package crimson-osd with the name of ceph-osd
+install -m 0755 %{buildroot}%{_bindir}/crimson-osd %{buildroot}%{_bindir}/ceph-osd
+%endif
install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
%if 0%{?fedora} || 0%{?rhel}
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
@@ -1295,12 +1344,13 @@ install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/sysconfig.%{name}
%endif
install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf
-install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
+install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_presetdir}/50-ceph.preset
mkdir -p %{buildroot}%{_sbindir}
install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
+install -m 0755 -D src/tools/rbd_nbd/rbd-nbd_quiesce %{buildroot}%{_libexecdir}/rbd-nbd/rbd-nbd_quiesce
install -m 0755 src/cephadm/cephadm %{buildroot}%{_sbindir}/cephadm
mkdir -p %{buildroot}%{_sharedstatedir}/cephadm
@@ -1320,8 +1370,7 @@ ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph
install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules
# sudoers.d
-install -m 0600 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
-install -m 0600 -D sudoers.d/cephadm %{buildroot}%{_sysconfdir}/sudoers.d/cephadm
+install -m 0440 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
%if 0%{?rhel} >= 8
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*
@@ -1373,7 +1422,7 @@ install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildro
%{_bindir}/osdmaptool
%{_bindir}/ceph-kvstore-tool
%{_bindir}/ceph-run
-%{_libexecdir}/systemd/system-preset/50-ceph.preset
+%{_presetdir}/50-ceph.preset
%{_sbindir}/ceph-create-keys
%dir %{_libexecdir}/ceph
%{_libexecdir}/ceph/ceph_common.sh
@@ -1445,21 +1494,6 @@ fi
%postun base
/sbin/ldconfig
-%if 0%{?suse_version}
-DISABLE_RESTART_ON_UPDATE="yes"
-%service_del_postun ceph.target
-%endif
-%if 0%{?fedora} || 0%{?rhel}
-%systemd_postun ceph.target
-%endif
-if [ $1 -ge 1 ] ; then
- # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
- # "yes". In any case: if units are not running, do not touch them.
- SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
- if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
- source $SYSCONF_CEPH
- fi
-fi
%pre -n cephadm
getent group cephadm >/dev/null || groupadd -r cephadm
@@ -1475,7 +1509,6 @@ exit 0
%files -n cephadm
%{_sbindir}/cephadm
%{_mandir}/man8/cephadm.8*
-%{_sysconfdir}/sudoers.d/cephadm
%attr(0700,cephadm,cephadm) %dir %{_sharedstatedir}/cephadm
%attr(0700,cephadm,cephadm) %dir %{_sharedstatedir}/cephadm/.ssh
%attr(0600,cephadm,cephadm) %{_sharedstatedir}/cephadm/.ssh/authorized_keys
@@ -1606,13 +1639,7 @@ fi
%endif
%postun mds
-%if 0%{?suse_version}
-DISABLE_RESTART_ON_UPDATE="yes"
-%service_del_postun ceph-mds(a)\*.service ceph-mds.target
-%endif
-%if 0%{?fedora} || 0%{?rhel}
%systemd_postun ceph-mds(a)\*.service ceph-mds.target
-%endif
if [ $1 -ge 1 ] ; then
# Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
# "yes". In any case: if units are not running, do not touch them.
@@ -1630,9 +1657,6 @@ fi
%dir %{_datadir}/ceph/mgr
%{_datadir}/ceph/mgr/mgr_module.*
%{_datadir}/ceph/mgr/mgr_util.*
-%if 0%{?rhel} == 7
-%{_datadir}/ceph/mgr/__pycache__
-%endif
%{_unitdir}/ceph-mgr@.service
%{_unitdir}/ceph-mgr.target
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr
@@ -1659,13 +1683,7 @@ fi
%endif
%postun mgr
-%if 0%{?suse_version}
-DISABLE_RESTART_ON_UPDATE="yes"
-%service_del_postun ceph-mgr(a)\*.service ceph-mgr.target
-%endif
-%if 0%{?fedora} || 0%{?rhel}
%systemd_postun ceph-mgr(a)\*.service ceph-mgr.target
-%endif
if [ $1 -ge 1 ] ; then
# Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
# "yes". In any case: if units are not running, do not touch them.
@@ -1704,19 +1722,6 @@ if [ $1 -eq 1 ] ; then
/usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
fi
-%files mgr-diskprediction-cloud
-%{_datadir}/ceph/mgr/diskprediction_cloud
-
-%post mgr-diskprediction-cloud
-if [ $1 -eq 1 ] ; then
- /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
-fi
-
-%postun mgr-diskprediction-cloud
-if [ $1 -eq 1 ] ; then
- /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
-fi
-
%files mgr-modules-core
%dir %{_datadir}/ceph/mgr
%{_datadir}/ceph/mgr/alerts
@@ -1727,6 +1732,7 @@ fi
%{_datadir}/ceph/mgr/insights
%{_datadir}/ceph/mgr/iostat
%{_datadir}/ceph/mgr/localpool
+%{_datadir}/ceph/mgr/mds_autoscaler
%{_datadir}/ceph/mgr/orchestrator
%{_datadir}/ceph/mgr/osd_perf_query
%{_datadir}/ceph/mgr/osd_support
@@ -1736,6 +1742,8 @@ fi
%{_datadir}/ceph/mgr/rbd_support
%{_datadir}/ceph/mgr/restful
%{_datadir}/ceph/mgr/selftest
+%{_datadir}/ceph/mgr/snap_schedule
+%{_datadir}/ceph/mgr/stats
%{_datadir}/ceph/mgr/status
%{_datadir}/ceph/mgr/telegraf
%{_datadir}/ceph/mgr/telemetry
@@ -1812,13 +1820,7 @@ fi
%endif
%postun mon
-%if 0%{?suse_version}
-DISABLE_RESTART_ON_UPDATE="yes"
-%service_del_postun ceph-mon(a)\*.service ceph-mon.target
-%endif
-%if 0%{?fedora} || 0%{?rhel}
%systemd_postun ceph-mon(a)\*.service ceph-mon.target
-%endif
if [ $1 -ge 1 ] ; then
# Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
# "yes". In any case: if units are not running, do not touch them.
@@ -1835,9 +1837,51 @@ fi
%{_bindir}/ceph-fuse
%{_mandir}/man8/ceph-fuse.8*
%{_sbindir}/mount.fuse.ceph
+%{_mandir}/man8/mount.fuse.ceph.8*
%{_unitdir}/ceph-fuse@.service
%{_unitdir}/ceph-fuse.target
+%files -n cephfs-mirror
+%{_bindir}/cephfs-mirror
+%{_mandir}/man8/cephfs-mirror.8*
+%{_unitdir}/cephfs-mirror@.service
+%{_unitdir}/cephfs-mirror.target
+
+%post -n cephfs-mirror
+%if 0%{?suse_version}
+if [ $1 -eq 1 ] ; then
+ /usr/bin/systemctl preset cephfs-mirror(a)\*.service cephfs-mirror.target >/dev/null 2>&1 || :
+fi
+%endif
+%if 0%{?fedora} || 0%{?rhel}
+%systemd_post cephfs-mirror(a)\*.service cephfs-mirror.target
+%endif
+if [ $1 -eq 1 ] ; then
+/usr/bin/systemctl start cephfs-mirror.target >/dev/null 2>&1 || :
+fi
+
+%preun -n cephfs-mirror
+%if 0%{?suse_version}
+%service_del_preun cephfs-mirror(a)\*.service cephfs-mirror.target
+%endif
+%if 0%{?fedora} || 0%{?rhel}
+%systemd_preun cephfs-mirror(a)\*.service cephfs-mirror.target
+%endif
+
+%postun -n cephfs-mirror
+%systemd_postun cephfs-mirror(a)\*.service cephfs-mirror.target
+if [ $1 -ge 1 ] ; then
+ # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
+ # "yes". In any case: if units are not running, do not touch them.
+ SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
+ if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
+ source $SYSCONF_CEPH
+ fi
+ if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
+ /usr/bin/systemctl try-restart cephfs-mirror(a)\*.service > /dev/null 2>&1 || :
+ fi
+fi
+
%files -n rbd-fuse
%{_bindir}/rbd-fuse
%{_mandir}/man8/rbd-fuse.8*
@@ -1870,13 +1914,7 @@ fi
%endif
%postun -n rbd-mirror
-%if 0%{?suse_version}
-DISABLE_RESTART_ON_UPDATE="yes"
-%service_del_postun ceph-rbd-mirror(a)\*.service ceph-rbd-mirror.target
-%endif
-%if 0%{?fedora} || 0%{?rhel}
%systemd_postun ceph-rbd-mirror(a)\*.service ceph-rbd-mirror.target
-%endif
if [ $1 -ge 1 ] ; then
# Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
# "yes". In any case: if units are not running, do not touch them.
@@ -1918,13 +1956,7 @@ fi
%postun immutable-object-cache
test -n "$FIRST_ARG" || FIRST_ARG=$1
-%if 0%{?suse_version}
-DISABLE_RESTART_ON_UPDATE="yes"
-%service_del_postun ceph-immutable-object-cache(a)\*.service ceph-immutable-object-cache.target
-%endif
-%if 0%{?fedora} || 0%{?rhel}
%systemd_postun ceph-immutable-object-cache(a)\*.service ceph-immutable-object-cache.target
-%endif
if [ $FIRST_ARG -ge 1 ] ; then
# Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
# "yes". In any case: if units are not running, do not touch them.
@@ -1940,6 +1972,8 @@ fi
%files -n rbd-nbd
%{_bindir}/rbd-nbd
%{_mandir}/man8/rbd-nbd.8*
+%dir %{_libexecdir}/rbd-nbd
+%{_libexecdir}/rbd-nbd/rbd-nbd_quiesce
%files radosgw
%{_bindir}/ceph-diff-sorted
@@ -1978,13 +2012,7 @@ fi
%postun radosgw
/sbin/ldconfig
-%if 0%{?suse_version}
-DISABLE_RESTART_ON_UPDATE="yes"
-%service_del_postun ceph-radosgw(a)\*.service ceph-radosgw.target
-%endif
-%if 0%{?fedora} || 0%{?rhel}
%systemd_postun ceph-radosgw(a)\*.service ceph-radosgw.target
-%endif
if [ $1 -ge 1 ] ; then
# Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
# "yes". In any case: if units are not running, do not touch them.
@@ -2000,6 +2028,7 @@ fi
%files osd
%{_bindir}/ceph-clsinfo
%{_bindir}/ceph-bluestore-tool
+%{_bindir}/ceph-erasure-code-tool
%{_bindir}/ceph-objectstore-tool
%{_bindir}/ceph-osdomap-tool
%{_bindir}/ceph-osd
@@ -2045,13 +2074,7 @@ fi
%endif
%postun osd
-%if 0%{?suse_version}
-DISABLE_RESTART_ON_UPDATE="yes"
-%service_del_postun ceph-osd(a)\*.service ceph-volume(a)\*.service ceph-osd.target
-%endif
-%if 0%{?fedora} || 0%{?rhel}
%systemd_postun ceph-osd(a)\*.service ceph-volume(a)\*.service ceph-osd.target
-%endif
if [ $1 -ge 1 ] ; then
# Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
# "yes". In any case: if units are not running, do not touch them.
@@ -2138,6 +2161,8 @@ fi
%if %{with lttng}
%{_libdir}/librbd_tp.so.*
%endif
+%dir %{_libdir}/ceph/librbd
+%{_libdir}/ceph/librbd/libceph_*.so*
%post -n librbd1 -p /sbin/ldconfig
@@ -2155,7 +2180,6 @@ fi
%files -n librgw2
%{_libdir}/librgw.so.*
-%{_libdir}/librgw_admin_user.so.*
%if %{with lttng}
%{_libdir}/librgw_op_tp.so.*
%{_libdir}/librgw_rados_tp.so.*
@@ -2168,10 +2192,8 @@ fi
%files -n librgw-devel
%dir %{_includedir}/rados
%{_includedir}/rados/librgw.h
-%{_includedir}/rados/librgw_admin_user.h
%{_includedir}/rados/rgw_file.h
%{_libdir}/librgw.so
-%{_libdir}/librgw_admin_user.so
%if %{with lttng}
%{_libdir}/librgw_op_tp.so
%{_libdir}/librgw_rados_tp.so
@@ -2197,8 +2219,19 @@ fi
%dir %{_includedir}/cephfs
%{_includedir}/cephfs/libcephfs.h
%{_includedir}/cephfs/ceph_ll_client.h
+%dir %{_includedir}/cephfs/metrics
+%{_includedir}/cephfs/metrics/Types.h
%{_libdir}/libcephfs.so
+%if %{with jaeger}
+%files -n libjaeger
+%{_libdir}/libopentracing.so.*
+%{_libdir}/libthrift.so.*
+%{_libdir}/libjaegertracing.so.*
+%post -n libjaeger -p /sbin/ldconfig
+%postun -n libjaeger -p /sbin/ldconfig
+%endif
+
%files -n python%{python3_pkgversion}-cephfs
%{python3_sitearch}/cephfs.cpython*.so
%{python3_sitearch}/cephfs-*.egg-info
@@ -2221,13 +2254,17 @@ fi
%{_bindir}/cephfs-shell
%endif
+%files -n cephfs-top
+%{python3_sitelib}/cephfs_top-*.egg-info
+%{_bindir}/cephfs-top
+%{_mandir}/man8/cephfs-top.8*
+
%if 0%{with ceph_test_package}
%files -n ceph-test
%{_bindir}/ceph-client-debug
%{_bindir}/ceph_bench_log
%{_bindir}/ceph_kvstorebench
%{_bindir}/ceph_multi_stress_watch
-%{_bindir}/ceph_erasure_code
%{_bindir}/ceph_erasure_code_benchmark
%{_bindir}/ceph_omapbench
%{_bindir}/ceph_objectstore_bench
@@ -2245,6 +2282,9 @@ fi
%{_bindir}/ceph-coverage
%{_bindir}/ceph-debugpack
%{_bindir}/ceph-dedup-tool
+%if 0%{with seastar}
+%{_bindir}/crimson-store-nbd
+%endif
%{_mandir}/man8/ceph-debugpack.8*
%dir %{_libdir}/ceph
%{_libdir}/ceph/ceph-monstore-update-crush.sh
@@ -2375,6 +2415,9 @@ exit 0
%config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml
%changelog
+* Fri Jan 29 2021 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 2:16.1.0-0.1.snapshot
+- ceph 16.1.0 RC (ceph-16.1.0-43-g6b74fb5c)
+
* Wed Sep 16 2020 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 2:15.2.5-1
- ceph 15.2.5 GA
diff --git a/sources b/sources
index 9fa2b9d..a26d268 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (ceph-15.2.5.tar.gz) = 55de068886c48293e92ef95cf8343ae44825fd2bf9c3fa7d47cda92907a47bae79e0af730cd34d0155b0777901d0fd6f9d1f30537c66c54c95098df7368fca2e
+SHA512 (ceph-16.1.0-43-g6b74fb5c.tar.bz2) = 5822292d23be3daa640250e7c044c26a0350b71d8260b28264320572d6b905b2e69592883f70dab49d56709cace1fbae92bfd3e7591d1023ef2fa0fe587d474a
2 years, 10 months
Architecture specific change in rpms/rust-slice-deque.git
by githook-noreply@fedoraproject.org
The package rpms/rust-slice-deque.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-slice-deque.git/commit/?id=d....
Change:
+%ifarch aarch64
Thanks.
Full change:
============
commit d61bf1aca1d70fdb68cd85866a24a1b23665f2e6
Author: Robert-André Mauchin <zebob.m(a)gmail.com>
Date: Fri Jan 29 16:18:10 2021 +0100
Temporarily fix FTBFS
Signed-off-by: Robert-André Mauchin <zebob.m(a)gmail.com>
diff --git a/rust-slice-deque.spec b/rust-slice-deque.spec
index 89e8da6..6981147 100644
--- a/rust-slice-deque.spec
+++ b/rust-slice-deque.spec
@@ -1,5 +1,8 @@
# Generated by rust2rpm 11
+# https://github.com/gnzlbg/slice_deque/issues/89
+%ifnarch %{arm64}
%bcond_without check
+%endif
%global debug_package %{nil}
%global crate slice-deque
@@ -94,8 +97,14 @@ which use "use_std" feature of "%{crate}" crate.
%if %{with check}
%check
+%ifarch aarch64
+# skip doctests when rustdoc fails to compile tests on aarch64
+# https://bugzilla.redhat.com/show_bug.cgi?id=1902663
+%cargo_test -- --lib
+%else
%cargo_test
%endif
+%endif
%changelog
* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.3.0-5
2 years, 10 months