Update to work-in-progress RC2 release
This isn't even the final RC2 release.
This commit is contained in:
parent
ab9ddbb0e7
commit
0fffd382bf
@ -28,10 +28,6 @@ function clean_dotnet_cache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function check_bootstrap_environment {
|
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
|
if rpm -qa | grep dotnet ; then
|
||||||
echo "error: dotnet is installed. Not a good idea for bootstrapping."
|
echo "error: dotnet is installed. Not a good idea for bootstrapping."
|
||||||
exit 1
|
exit 1
|
||||||
@ -125,18 +121,16 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
|
|||||||
git checkout "${tag}"
|
git checkout "${tag}"
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
clean_dotnet_cache
|
clean_dotnet_cache
|
||||||
# FIXME remove contineuonprebuilterror
|
|
||||||
# ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true -p:UseSystemLibunwind=false
|
|
||||||
# ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
|
|
||||||
mkdir -p "../${unmodified_tarball_name}"
|
mkdir -p "../${unmodified_tarball_name}"
|
||||||
./build.sh /p:ArcadeBuildTarball=true /p:TarballDir="$(readlink -f ../"${unmodified_tarball_name}")"
|
./build.sh /p:ArcadeBuildTarball=true /p:TarballDir="$(readlink -f ../"${unmodified_tarball_name}")"
|
||||||
|
popd
|
||||||
|
|
||||||
if [[ ${build_bootstrap} == true ]]; then
|
if [[ ${build_bootstrap} == true ]]; then
|
||||||
# FIXME
|
pushd "${unmodified_tarball_name}"
|
||||||
# cp -a artifacts/"${arch}"/Release/Private.SourceBuilt.Artifacts.*.tar.gz "${unmodified_tarball_name}"/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
|
./prep.sh
|
||||||
echo
|
popd
|
||||||
fi
|
fi
|
||||||
popd
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}"
|
tar czf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}"
|
||||||
@ -150,20 +144,29 @@ mv "${unmodified_tarball_name}" "${tarball_name}"
|
|||||||
|
|
||||||
pushd "${tarball_name}"
|
pushd "${tarball_name}"
|
||||||
|
|
||||||
if [[ ${build_bootstrap} != true ]]; then
|
if [[ ${build_bootstrap} == true ]]; then
|
||||||
|
mkdir -p fixup-previously-source-built-artifacts
|
||||||
|
pushd fixup-previously-source-built-artifacts
|
||||||
|
tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz
|
||||||
|
find -iname '*fedora*nupkg' -delete
|
||||||
|
# We must keep the original file names in the archive, even prepending a ./ leads to issues
|
||||||
|
tar -I 'gzip -9' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
|
||||||
|
popd
|
||||||
|
rm -rf fixup-previously-source-built-artifacts
|
||||||
|
|
||||||
|
else
|
||||||
find . -type f -iname '*.tar.gz' -delete
|
find . -type f -iname '*.tar.gz' -delete
|
||||||
rm -rf .dotnet
|
rm -rf .dotnet
|
||||||
else
|
|
||||||
./prep.sh
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove files with funny licenses, crypto implementations and other
|
# Remove files with funny licenses, crypto implementations and other
|
||||||
# not-very-useful artifacts to reduce tarball size
|
# not-very-useful artifacts to reduce tarball size
|
||||||
rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
|
# FIXME
|
||||||
find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
|
#rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*
|
||||||
rm -r src/nuget-client.*/test/EndToEnd
|
#find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r
|
||||||
rm -r src/source-build.*/src/humanizer/samples/
|
#rm -r src/nuget-client.*/test/EndToEnd
|
||||||
|
#rm -r src/source-build.*/src/humanizer/samples/
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
tar czf "${tarball_name}.tar.gz" "${tarball_name}"
|
tar -I 'gzip -9' -cf "${tarball_name}.tar.gz" "${tarball_name}"
|
||||||
|
27
command-line-api-use-work-tree-with-git-apply.patch
Normal file
27
command-line-api-use-work-tree-with-git-apply.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 7a752928ed3588246c4b296feb6cf4946f1b29b7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Omair Majid <omajid@redhat.com>
|
||||||
|
Date: Thu, 9 Sep 2021 12:11:39 -0400
|
||||||
|
Subject: [PATCH] [ArPow] Use --work-tree with git apply
|
||||||
|
|
||||||
|
This makes things work better in a source-tarball build, where there may
|
||||||
|
be a .git directory but it's for a different repo than command-line-api.
|
||||||
|
---
|
||||||
|
eng/SourceBuild.props | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
|
||||||
|
index 6cc85018..5e223747 100644
|
||||||
|
--- a/eng/SourceBuild.props
|
||||||
|
+++ b/eng/SourceBuild.props
|
||||||
|
@@ -15,7 +15,7 @@
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Exec
|
||||||
|
- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
|
||||||
|
+ Command="git --work-tree="$(RepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
|
||||||
|
WorkingDirectory="$(RepoRoot)"
|
||||||
|
Condition="'@(SourceBuildPatchFile)' != ''" />
|
||||||
|
</Target>
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -20,11 +20,11 @@
|
|||||||
# until that's done, disable LTO. This has to happen before setting the flags below.
|
# until that's done, disable LTO. This has to happen before setting the flags below.
|
||||||
%define _lto_cflags %{nil}
|
%define _lto_cflags %{nil}
|
||||||
|
|
||||||
%global host_version 6.0.0-preview.7.21356.2
|
%global host_version 6.0.0-rc.2.21470.23
|
||||||
%global runtime_version 6.0.0-preview.7.21356.2
|
%global runtime_version 6.0.0-rc.2.21470.23
|
||||||
%global aspnetcore_runtime_version 6.0.0-preview.6.21355.2/
|
%global aspnetcore_runtime_version 6.0.0-rc.2.21470.37
|
||||||
%global sdk_version 6.0.100
|
%global sdk_version 6.0.100-rc.2.21474.1
|
||||||
%global templates_version 6.0.0-rc.2.21420.26
|
%global templates_version 6.0.0-rc.2.21470.37
|
||||||
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
|
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
|
||||||
|
|
||||||
%global host_rpm_version 6.0.0
|
%global host_rpm_version 6.0.0
|
||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
# upstream can update releases without revving the SDK version so these don't always match
|
# upstream can update releases without revving the SDK version so these don't always match
|
||||||
#%%global upstream_tag v%%{sdk_version}-SDK
|
#%%global upstream_tag v%%{sdk_version}-SDK
|
||||||
%global upstream_tag f3ea71b28f18719441d1e6995f134e22559131d6
|
%global upstream_tag 28be3e9a006d90d8c6e87d4353b77882829df718
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} < 8
|
%if 0%{?fedora} || 0%{?rhel} < 8
|
||||||
%global use_bundled_libunwind 0
|
%global use_bundled_libunwind 0
|
||||||
@ -57,27 +57,38 @@
|
|||||||
|
|
||||||
Name: dotnet6.0
|
Name: dotnet6.0
|
||||||
Version: %{sdk_rpm_version}
|
Version: %{sdk_rpm_version}
|
||||||
Release: 0.2.preview6%{?dist}
|
Release: 0.3.%{upstream_tag}%{?dist}
|
||||||
Summary: .NET Runtime and SDK
|
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
|
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/
|
URL: https://github.com/dotnet/
|
||||||
|
|
||||||
# The source is generated on a Fedora box via:
|
# The source is generated on a Fedora box via:
|
||||||
# ./build-dotnet-tarball --bootstrap $commit-id
|
# ./build-dotnet-tarball --bootstrap %%{upstream_tag}
|
||||||
Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.gz
|
Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.gz
|
||||||
|
|
||||||
Source10: check-debug-symbols.py
|
Source10: check-debug-symbols.py
|
||||||
Source11: dotnet.sh.in
|
Source11: dotnet.sh.in
|
||||||
|
|
||||||
|
# https://github.com/NuGet/NuGet.Client/pull/4254
|
||||||
|
Patch200: nuget-client-use-work-tree-with-git-apply.patch
|
||||||
|
# https://github.com/dotnet/command-line-api/pull/1401
|
||||||
|
Patch300: command-line-api-use-work-tree-with-git-apply.patch
|
||||||
|
# https://github.com/microsoft/vstest/pull/3046
|
||||||
|
Patch400: vstest-use-work-tree-with-git-apply.patch
|
||||||
|
|
||||||
|
Patch500: fsharp-use-work-tree-with-git-apply.patch
|
||||||
|
|
||||||
|
Patch600: xliff-tasks-use-work-tree-with-git-apply.patch
|
||||||
|
|
||||||
# Disable telemetry by default; make it opt-in
|
# Disable telemetry by default; make it opt-in
|
||||||
Patch500: sdk-telemetry-optout.patch
|
Patch1500: sdk-telemetry-optout.patch
|
||||||
|
|
||||||
%if 0%{?fedora} > 32 || 0%{?rhel} > 8
|
|
||||||
ExclusiveArch: aarch64 x86_64
|
#%%if 0%%{?fedora} > 32 || 0%%{?rhel} > 8
|
||||||
%else
|
#ExclusiveArch: aarch64 x86_64
|
||||||
|
#%%else
|
||||||
ExclusiveArch: x86_64
|
ExclusiveArch: x86_64
|
||||||
%endif
|
#%%endif
|
||||||
|
|
||||||
|
|
||||||
BuildRequires: clang
|
BuildRequires: clang
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
@ -338,10 +349,33 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehos
|
|||||||
# Disable warnings
|
# Disable warnings
|
||||||
# sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
|
# sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
|
||||||
|
|
||||||
pushd src/sdk.*
|
pushd src/runtime.*
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd src/nuget-client.*
|
||||||
|
%patch200 -p1
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd src/command-line-api.*
|
||||||
|
%patch300 -p1
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd src/vstest.*
|
||||||
|
%patch400 -p1
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd src/fsharp.*
|
||||||
%patch500 -p1
|
%patch500 -p1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
pushd src/xliff-tasks.*
|
||||||
|
%patch600 -p1
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd src/sdk.*
|
||||||
|
%patch1500 -p1
|
||||||
|
popd
|
||||||
|
|
||||||
%if %{without bootstrap}
|
%if %{without bootstrap}
|
||||||
%ifnarch x86_64
|
%ifnarch x86_64
|
||||||
mkdir -p artifacts/obj/%{runtime_arch}/Release
|
mkdir -p artifacts/obj/%{runtime_arch}/Release
|
||||||
@ -349,16 +383,6 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{use_bundled_libunwind}
|
|
||||||
sed -i -E \
|
|
||||||
's/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=(TRUE|true|FALSE|false)/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE/' \
|
|
||||||
src/runtime.*/eng/SourceBuild.props
|
|
||||||
%else
|
|
||||||
sed -i -E \
|
|
||||||
's/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=(TRUE|true|FALSE|false)/DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE/' \
|
|
||||||
src/runtime.*/eng/SourceBuild.props
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cat /etc/os-release
|
cat /etc/os-release
|
||||||
@ -400,17 +424,13 @@ unset CFLAGS
|
|||||||
unset CXXFLAGS
|
unset CXXFLAGS
|
||||||
unset LDFLAGS
|
unset LDFLAGS
|
||||||
|
|
||||||
#%%if %%{without bootstrap}
|
|
||||||
# --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
|
|
||||||
# --with-packages %%{_libdir}/dotnet/source-built-artifacts/*.tar.gz \
|
|
||||||
# --with-sdk %%{_libdir}/dotnet \
|
|
||||||
#%%endif
|
|
||||||
|
|
||||||
VERBOSE=1 ./build.sh \
|
VERBOSE=1 ./build.sh \
|
||||||
%if %{without bootstrap}
|
%if %{without bootstrap}
|
||||||
--with-sdk previously-built-dotnet \
|
--with-sdk previously-built-dotnet \
|
||||||
%endif
|
%endif
|
||||||
-- \
|
-- \
|
||||||
|
|
||||||
|
echo \
|
||||||
/v:n \
|
/v:n \
|
||||||
/p:SkipPortableRuntimeBuild=true \
|
/p:SkipPortableRuntimeBuild=true \
|
||||||
/p:LogVerbosity=n \
|
/p:LogVerbosity=n \
|
||||||
@ -432,9 +452,13 @@ tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}
|
|||||||
# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
|
# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/
|
||||||
|
|
||||||
# Fix executable permissions on files
|
# Fix executable permissions on files
|
||||||
|
find %{buildroot}%{_libdir}/dotnet/ -type f -name 'apphost' -exec chmod +x {} \;
|
||||||
|
find %{buildroot}%{_libdir}/dotnet/ -type f -name 'singlefilehost' -exec chmod +x {} \;
|
||||||
|
find %{buildroot}%{_libdir}/dotnet/ -type f -name 'lib*so' -exec chmod +x {} \;
|
||||||
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
|
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
|
||||||
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
|
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
|
||||||
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.h' -exec chmod 0644 {} \;
|
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.h' -exec chmod 0644 {} \;
|
||||||
|
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.json' -exec chmod -x {} \;
|
||||||
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
|
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
|
||||||
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -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 '*.pubxml' -exec chmod -x {} \;
|
||||||
@ -459,9 +483,11 @@ ln -s ../../%{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/
|
|||||||
install -dm 0755 %{buildroot}%{_mandir}/man1/
|
install -dm 0755 %{buildroot}%{_mandir}/man1/
|
||||||
find -iname 'dotnet*.1' -type f -exec cp {} %{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 -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
|
||||||
|
echo "%{_libdir}/dotnet" >> install_location
|
||||||
install install_location %{buildroot}%{_sysconfdir}/dotnet/
|
install install_location %{buildroot}%{_sysconfdir}/dotnet/
|
||||||
|
echo "%{_libdir}/dotnet" >> install_location_%{runtime_arch}
|
||||||
|
install install_location_%{runtime_arch} %{buildroot}%{_sysconfdir}/dotnet/
|
||||||
|
|
||||||
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
|
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
|
||||||
install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
|
install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
|
||||||
@ -520,7 +546,9 @@ install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.
|
|||||||
%dir %{_libdir}/dotnet/sdk
|
%dir %{_libdir}/dotnet/sdk
|
||||||
%{_libdir}/dotnet/sdk/%{sdk_version}
|
%{_libdir}/dotnet/sdk/%{sdk_version}
|
||||||
%dir %{_libdir}/dotnet/sdk-manifests
|
%dir %{_libdir}/dotnet/sdk-manifests
|
||||||
%{_libdir}/dotnet/sdk-manifests/%{sdk_version}
|
# FIXME hardcoded version?
|
||||||
|
%{_libdir}/dotnet/sdk-manifests/6.0.100
|
||||||
|
%{_libdir}/dotnet/metadata
|
||||||
%dir %{_libdir}/dotnet/packs
|
%dir %{_libdir}/dotnet/packs
|
||||||
|
|
||||||
%files -n dotnet-sdk-6.0-source-built-artifacts
|
%files -n dotnet-sdk-6.0-source-built-artifacts
|
||||||
@ -529,6 +557,9 @@ install -m 0644 artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Sep 26 2021 Omair Majid <omajid@redhat.com> - 6.0.0-0.3.28be3e9a006d90d8c6e87d4353b77882829df718
|
||||||
|
- Update to work-in-progress RC2 release
|
||||||
|
|
||||||
* Wed Aug 25 2021 Omair Majid <omajid@redhat.com> - 6.0.0-0.2.preview6
|
* Wed Aug 25 2021 Omair Majid <omajid@redhat.com> - 6.0.0-0.2.preview6
|
||||||
- Updated to build the latest source-build preview
|
- Updated to build the latest source-build preview
|
||||||
|
|
||||||
|
11
fsharp-use-work-tree-with-git-apply.patch
Normal file
11
fsharp-use-work-tree-with-git-apply.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/eng/SourceBuild.props
|
||||||
|
+++ b/eng/SourceBuild.props
|
||||||
|
@@ -15,7 +15,7 @@
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Exec
|
||||||
|
- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
|
||||||
|
+ Command="git --work-tree="$(RepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
|
||||||
|
WorkingDirectory="$(RepoRoot)"
|
||||||
|
Condition="'@(SourceBuildPatchFile)' != ''" />
|
||||||
|
</Target>
|
28
nuget-client-use-work-tree-with-git-apply.patch
Normal file
28
nuget-client-use-work-tree-with-git-apply.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 691babb1c8316e2f829fbcf9f2aa14f4b7711960 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Omair Majid <omajid@redhat.com>
|
||||||
|
Date: Thu, 9 Sep 2021 10:03:36 -0400
|
||||||
|
Subject: [PATCH] [ArPow] Use --work-tree with git apply
|
||||||
|
|
||||||
|
This makes things work bettern in a source-tarball build (where there
|
||||||
|
may not be a .git directory), or there might be a .git directory but
|
||||||
|
it's for a different repo than the one we are building.
|
||||||
|
---
|
||||||
|
eng/source-build/source-build.proj | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/eng/source-build/source-build.proj b/eng/source-build/source-build.proj
|
||||||
|
index 6f90f9793..72058ac88 100644
|
||||||
|
--- a/eng/source-build/source-build.proj
|
||||||
|
+++ b/eng/source-build/source-build.proj
|
||||||
|
@@ -55,7 +55,7 @@
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Exec
|
||||||
|
- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
|
||||||
|
+ Command="git --work-tree="$(ProjectRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
|
||||||
|
WorkingDirectory="$(ProjectRoot)"
|
||||||
|
Condition="'@(SourceBuildPatchFile)' != ''" />
|
||||||
|
</Target>
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
33
vstest-use-work-tree-with-git-apply.patch
Normal file
33
vstest-use-work-tree-with-git-apply.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From b2c4b2427d8c1a2410c4210789caccf1ec87e64a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Omair Majid <omajid@redhat.com>
|
||||||
|
Date: Thu, 9 Sep 2021 13:21:51 -0400
|
||||||
|
Subject: [PATCH] [ArPow] Use --work-tree with git apply
|
||||||
|
|
||||||
|
This makes things work better in a source-tarball build, where there may
|
||||||
|
be a .git directory somewhere in our parent directories but it's for a
|
||||||
|
different repo than vstest. In a situation like that a plain `git apply`
|
||||||
|
will (silently!) ignore patches because they wont apply to the unrelated
|
||||||
|
repository. That will (eventually) make the source-build fail.
|
||||||
|
`--work-tree` makes git directly use the directory that we care about.
|
||||||
|
|
||||||
|
See https://github.com/dotnet/source-build/issues/2445 for more details.
|
||||||
|
---
|
||||||
|
eng/SourceBuild.props | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
|
||||||
|
index b365645c..68f82592 100644
|
||||||
|
--- a/eng/SourceBuild.props
|
||||||
|
+++ b/eng/SourceBuild.props
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Exec
|
||||||
|
- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
|
||||||
|
+ Command="git --work-tree="$(InnerSourceBuildRepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
|
||||||
|
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
|
||||||
|
Condition="'@(SourceBuildPatchFile)' != ''" />
|
||||||
|
</Target>
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
11
xliff-tasks-use-work-tree-with-git-apply.patch
Normal file
11
xliff-tasks-use-work-tree-with-git-apply.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/eng/SourceBuild.props
|
||||||
|
+++ b/eng/SourceBuild.props
|
||||||
|
@@ -15,7 +15,7 @@
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Exec
|
||||||
|
- Command="git apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
|
||||||
|
+ Command="git --work-tree="$(RepoRoot)" apply --ignore-whitespace --whitespace=nowarn "%(SourceBuildPatchFile.FullPath)""
|
||||||
|
WorkingDirectory="$(RepoRoot)"
|
||||||
|
Condition="'@(SourceBuildPatchFile)' != ''" />
|
||||||
|
</Target>
|
Loading…
Reference in New Issue
Block a user