Skip to content

Instantly share code, notes, and snippets.

@omajid
Last active July 13, 2020 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omajid/a23774b8081d6edaa99896724edb27e9 to your computer and use it in GitHub Desktop.
Save omajid/a23774b8081d6edaa99896724edb27e9 to your computer and use it in GitHub Desktop.
File diff between Fedora 32 and Rawhide
diff --git a/.gitignore b/.gitignore
index e29845e..5da2a2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,5 @@
/dotnet-v3.1.103.2-SDK.tar.gz
/dotnet-v3.1.104-SDK.tar.gz
/dotnet-v3.1.105-SDK.tar.gz
+/dotnet-v3.1.105-SDK-arm64.tar.gz
+/dotnet-v3.1.105-SDK-x64.tar.gz
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-dotnet-tarball b/build-dotnet-tarball
index 9301deb..9388fbf 100755
--- a/build-dotnet-tarball
+++ b/build-dotnet-tarball
@@ -117,6 +117,7 @@ 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 -rf .dotnet
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 57f1ba9..c1a054c 100644
--- a/dotnet3.1.spec
+++ b/dotnet3.1.spec
@@ -39,6 +39,10 @@
%global use_bundled_libunwind 1
%endif
+%ifarch aarch64
+%global use_bundled_libunwind 1
+%endif
+
%ifarch x86_64
%global runtime_arch x64
%endif
@@ -58,7 +62,7 @@
Name: dotnet3.1
Version: %{sdk_rpm_version}
-Release: 1%{?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/
@@ -89,7 +93,11 @@ Patch300: core-setup-hardening-flags.patch
# Disable telemetry by default; make it opt-in
Patch500: cli-telemetry-optout.patch
+%if 0%{?fedora} > 32 || 0%{?rhel} > 8
+ExclusiveArch: aarch64 x86_64
+%else
ExclusiveArch: x86_64
+%endif
BuildRequires: clang
BuildRequires: cmake
@@ -365,11 +373,16 @@ pushd src/cli.*
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/coreclr.common.props || \
+ sed -i 's|\$(BuildArguments) </BuildArguments>|$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments>|' repos/coreclr.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/coreclr.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
@@ -512,6 +525,18 @@ echo "Testing build results for debug symbols..."
%changelog
+* Sat Jun 27 2020 Omair Majid <omajid@redhat.com> - 3.1.105-4
+- Disable bootstrap
+
+* Fri Jun 26 2020 Omair Majid <omajid@redhat.com> - 3.1.105-3
+- Re-bootstrap aarch64
+
+* Fri Jun 19 2020 Omair Majid <omajid@redhat.com> - 3.1.105-3
+- Disable bootstrap
+
+* Thu Jun 18 2020 Omair Majid <omajid@redhat.com> - 3.1.105-1
+- Bootstrap aarch64
+
* Tue Jun 16 2020 Chris Rummel <crummel@microsoft.com> - 3.1.105-1
- Update to .NET Core Runtime 3.1.5 and SDK 3.1.105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment