diff --git a/README.md b/README.md index a3681f2..d46fa1f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -# dotnet6.0 +# dotnet7.0 -This is the .NET 6.0 package for Fedora. +This is the work-in-progress .NET 7.0 package for Fedora. When it's ready, it +will be merged into Fedora proper. This package is maintained by the Fedora DotNet SIG (Special Interest Group). You can find out more about the DotNet SIG at: @@ -10,7 +11,7 @@ Group). You can find out more about the DotNet SIG at: - https://lists.fedoraproject.org/archives/list/dotnet-sig@lists.fedoraproject.org/ Please report any issues [using -bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet6.0). +bugzilla](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dotnet7.0). # Specification @@ -31,8 +32,8 @@ follow. 2. Checkout the forked repository. - - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet6.0.git` - - `cd dotnet6.0` + - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet7.0.git` + - `cd dotnet7.0` 3. Make your changes. Don't forget to add a changelog. @@ -75,8 +76,8 @@ follow. 2. Checkout the forked repository. - - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet6.0.git` - - `cd dotnet6.0` + - `git clone ssh://$USER@pkgs.fedoraproject.org/forks/$USER/rpms/dotnet7.0.git` + - `cd dotnet7.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-dotnet-tarball b/build-dotnet-tarball index 95b94a9..8cf8ecd 100755 --- a/build-dotnet-tarball +++ b/build-dotnet-tarball @@ -4,11 +4,9 @@ # build-dotnet-tarball [--bootstrap] # # Creates a source archive from a tag (or commit) at github.com/dotnet/installer - -# installer is a little strange, we need to clone it, check out the -# tag, build it and then create a tarball from the archive directory -# it creates. Also, it is likely that the source archive is only -# buildable on the OS it was initially created in. +# +# Clone dotnet/installer, check out the tag (if any), and build the +# source-tarball. set -euo pipefail IFS=$'\n\t' @@ -62,8 +60,10 @@ archmap=( ["aarch64"]="arm64" ["amd64"]="x64" ["armv8l"]="arm" - ["i686"]="x86" ["i386"]="x86" + ["i686"]="x86" + ["ppc64le"]="ppc64le" + ["s390x"]="s390x" ["x86_64"]="x64" ) @@ -123,18 +123,24 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then git submodule update --init --recursive clean_dotnet_cache mkdir -p "../${unmodified_tarball_name}" - ./build.sh /p:ArcadeBuildTarball=true /p:TarballDir="$(readlink -f ../"${unmodified_tarball_name}")" + ./build.sh /p:ArcadeBuildTarball=true popd popd - tar cf "${unmodified_tarball_name}.tar.gz" -C "${temp_dir}" "${unmodified_tarball_name}" + cp -a \ + "${temp_dir}"/installer/artifacts/packages/Debug/Shipping/dotnet-sdk-source-7*.tar.gz \ + "${unmodified_tarball_name}.tar.gz" rm -rf "${temp_dir}" fi rm -rf "${tarball_name}" -tar xf "${unmodified_tarball_name}.tar.gz" + +mkdir -p "${unmodified_tarball_name}" +pushd "${unmodified_tarball_name}" +tar xf ../"${unmodified_tarball_name}.tar.gz" +popd mv "${unmodified_tarball_name}" "${tarball_name}" pushd "${tarball_name}" @@ -145,23 +151,6 @@ if [[ ${build_bootstrap} == true ]]; then exit 1 fi - pushd packages/archive/ - curl -O $(cat archiveArtifacts.txt) - popd - - mkdir foo - pushd foo - - tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz - sed -i -E 's|6.0.0-rtm.21521.16.0.0-rtm.21521.46.0.0-rtm.21521.16.0.0-rtm.21521.4= 8 @@ -235,10 +200,10 @@ Requires: dotnet-hostfxr-6.0%{?_isa} >= %{host_rpm_version}-%{release} # libicu is dlopen()ed Requires: libicu%{?_isa} -# See src/runtime.*/src/libraries/Native/AnyOS/brotli-version.txt +# See src/runtime/src/libraries/Native/AnyOS/brotli-version.txt Provides: bundled(libbrotli) = 1.0.9 %if %{use_bundled_libunwind} -# See src/runtime.*/src/coreclr/pal/src/libunwind/libunwind-version.txt +# See src/runtime/src/coreclr/pal/src/libunwind/libunwind-version.txt Provides: bundled(libunwind) = 1.5.rc1.28.g9165d2a1 %endif @@ -259,7 +224,7 @@ applications and micro-services. Version: %{aspnetcore_runtime_rpm_version} Summary: ASP.NET Core 6.0 runtime -Requires: dotnet-runtime-6.0%{?_isa} >= %{runtime_rpm_version}-%{release} +Requires: dotnet-runtime-6.0%{?_isa} = %{runtime_rpm_version}-%{release} %description -n aspnetcore-runtime-6.0 The ASP.NET Core runtime contains everything needed to run .NET @@ -390,64 +355,20 @@ find -iname '*.nupkg' -type f -delete find -iname '*.zip' -type f -delete rm -rf .dotnet/ rm -rf packages/source-built - -mkdir -p packages/archive -ln -s %{_libdir}/dotnet/source-built-artifacts/Private.SourceBuilt.Artifacts.*.tar.gz packages/archive/ -ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive/ %endif # Fix bad hardcoded path in build -sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime.*/src/native/corehost/hostmisc/pal.unix.cpp - -pushd src/runtime.* -%patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -popd - -pushd src/fsharp.* -%patch500 -p1 -popd - -pushd src/arcade.* -%patch700 -p1 -popd - -pushd src/roslyn.* -%patch800 -p3 -%patch801 -p1 -popd - -pushd src/roslyn-analyzers.* -%patch900 -p1 -popd - -pushd src/msbuild.* - -# These are mono-specific fixes. Mono is only used on s390x. Restrict -# patch to s390x to avoid potential risk in other architectures. -%ifarch s390x -%patch1000 -p1 -%patch1001 -p1 -%endif - -popd - -pushd src/sdk.* -%patch1500 -p1 -%patch1501 -p1 -popd - -pushd src/installer.* -%patch1600 -p1 -popd - +sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime/src/native/corehost/hostmisc/pal.unix.cpp %if ! %{use_bundled_libunwind} -sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' src/runtime.*/eng/SourceBuild.props +sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' src/runtime/eng/SourceBuild.props %endif +pushd src/runtime +%patch1 -p1 +popd + + %build cat /etc/os-release @@ -498,10 +419,15 @@ export EXTRA_LDFLAGS="$LDFLAGS" # suggested compile-time change doesn't work, unfortunately. export COMPlus_LTTng=0 + +# FIXME: Remove --online flag + VERBOSE=1 ./build.sh \ %if %{without bootstrap} --with-sdk previously-built-dotnet \ + --with-packages %{_libdir}/dotnet/source-built-artifacts/Private.SourceBuilt.Artifacts.*.tar.gz %endif + --online \ -- \ echo \ @@ -550,7 +476,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/sdk.*/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 @@ -559,8 +485,10 @@ install src/sdk.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bas 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/ \; +for section in 1 7; do + install -dm 0755 %{buildroot}%{_mandir}/man${section}/ + find -iname 'dotnet*'.${section} -type f -exec cp {} %{buildroot}%{_mandir}/man${section}/ \; +done install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet echo "%{_libdir}/dotnet" >> install_location @@ -605,6 +533,7 @@ export COMPlus_LTTng=0 %license %{_libdir}/dotnet/LICENSE.txt %license %{_libdir}/dotnet/ThirdPartyNotices.txt %doc %{_mandir}/man1/dotnet*.1.gz +%doc %{_mandir}/man7/dotnet*.7.gz %config(noreplace) %{_sysconfdir}/profile.d/dotnet.sh %config(noreplace) %{_sysconfdir}/dotnet %dir %{_datadir}/bash-completion diff --git a/runtime-fix-cmakeargs-handling.patch b/runtime-fix-cmakeargs-handling.patch new file mode 100644 index 0000000..f0c7e13 --- /dev/null +++ b/runtime-fix-cmakeargs-handling.patch @@ -0,0 +1,13 @@ +diff --git a/eng/build.sh b/eng/build.sh +index 9c9beb471f1..7c766a227ef 100755 +--- a/eng/build.sh ++++ b/eng/build.sh +@@ -392,7 +392,7 @@ while [[ $# > 0 ]]; do + echo "No cmake args supplied." 1>&2 + exit 1 + fi +- cmakeargs="${cmakeargs} ${opt} $2" ++ cmakeargs="${cmakeargs} $2" + shift 2 + ;; + diff --git a/sources b/sources deleted file mode 100644 index b5e5889..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (dotnet-v6.0.105.tar.gz) = a2b23b60d3b7792b909d685d78aff5f4ad44da4e43c0af353e08529da59edbc1683a843815035081beb4ffb24667c925514a0a999c829e457b7ffbeb37a40cbc