Skip to content

Not possible to build a source-tarball generated on RHEL 8 on CentOS 8 #1428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
omajid opened this issue Dec 27, 2019 · 6 comments
Closed

Not possible to build a source-tarball generated on RHEL 8 on CentOS 8 #1428

omajid opened this issue Dec 27, 2019 · 6 comments

Comments

@omajid
Copy link
Member

omajid commented Dec 27, 2019

This is for .NET Core 3.0

CentOS generally takes the source archives from a RHEL release and re-builds it.

Unfortunately, this doesn't seem to work for .NET Core 3.0.0 and CentOS 8.

           Feeds used:
               /builddir/build/BUILD/dotnet-v3.0.0/bin/obj/x64/Release/blob-feed/packages/
               /builddir/build/BUILD/dotnet-v3.0.0/packages/reference/packages/
               /builddir/build/BUILD/dotnet-v3.0.0/packages/prebuilt/
               /builddir/build/BUILD/dotnet-v3.0.0/packages/source-built/
         SetupTestingHost:
           chmod +x /builddir/build/BUILD/dotnet-v3.0.0/src/corefx.4ac4c0367003fe3973a3648eb0715ddb0e3bbcea/artifacts/bin/testhost/netcoreapp-Linux-Release-x64/
           chmod: cannot access '/builddir/build/BUILD/dotnet-v3.0.0/src/corefx.4ac4c0367003fe3973a3648eb0715ddb0e3bbcea/artifacts/bin/testhost/netcoreapp-Linux-Release-x64/': No such file or directory
       8>/builddir/build/BUILD/dotnet-v3.0.0/src/corefx.4ac4c0367003fe3973a3648eb0715ddb0e3bbcea/external/runtime/runtime.depproj(63,5): error MSB3073: The command "chmod +x /builddir/build/BUILD/dotnet-v3.0.0/src/corefx.4ac4c0367003fe3973a3648eb0715ddb0e3bbcea/artifacts/bin/testhost/netcoreapp-Linux-Release-x64/" exited with code 1.
  ##vso[task.logissue type=error;sourcepath=/builddir/build/BUILD/dotnet-v3.0.0/src/corefx.4ac4c0367003fe3973a3648eb0715ddb0e3bbcea/external/runtime/runtime.depproj;linenumber=63;columnnumber=5;code=MSB3073;]The command "chmod +x /builddir/build/BUILD/dotnet-v3.0.0/src/corefx.4ac4c0367003fe3973a3648eb0715ddb0e3bbcea/artifacts/bin/testhost/netcoreapp-Linux-Release-x64/" exited with code 1.
       8>Done Building Project "/builddir/build/BUILD/dotnet-v3.0.0/src/corefx.4ac4c0367003fe3973a3648eb0715ddb0e3bbcea/external/runtime/runtime.depproj" (Build target(s)) -- FAILED.
       5>Done Building Project "/builddir/build/BUILD/dotnet-v3.0.0/src/corefx.4ac4c0367003fe3973a3648eb0715ddb0e3bbcea/external/dir.proj" (default targets) -- FAILED.
       4>Done Building Project "/builddir/build/BUILD/dotnet-v3.0.0/src/corefx.4ac4c0367003fe3973a3648eb0715ddb0e3bbcea/build.proj" (Restore target(s)) -- FAILED.
       1>Done Building Project "/builddir/build/BUILD/dotnet-v3.0.0/Tools/source-built/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj" (default targets) -- FAILED.

The full build log is available here.

@omajid
Copy link
Member Author

omajid commented Dec 27, 2019

The build works if I change the /etc/os-release to say rhel.8. Surprisingly, changing it to say fedora.27, for example, doesn't work.

I looked for files that contain rhel.8 RID but not centos.8 RID:

$ grep -L centos.8 $(grep -l -r rhel.8)
packages/restored/microsoft.netcore.platforms/3.0.0-preview9.19421.4/runtime.json

I have patched up all the other runtime.json and similar files, but I can't see a simple way to patch this without modifying the nupkg directly.

@omajid
Copy link
Member Author

omajid commented Dec 30, 2019

Manually modifying 3.0.0-preview9.19421.4/runtime.json did the trick.

I can't see a simple way to automate this, though. The file lives inside Microsoft.NETCore.Platforms.3.0.0-preview9.19421.4.nupkg which lives inside Private.SourceBuilt.Artifacts.0.1.0-dev.19467.1.tar.gz

It would be even better if this would work out of the box.

@tmds tmds mentioned this issue Jan 9, 2020
4 tasks
@tmds
Copy link
Member

tmds commented Jan 9, 2020

@omajid maybe you can make this work by setting DOTNET_RUNTIME_ID=rhel.8-x64?
As a side-effect, the resulting dotnet may claim it's the rhel.8 rid, but that's not too bad.

@tmds
Copy link
Member

tmds commented Jan 9, 2020

and if setting DOTNET_RUNTIME_ID works for CentOS 8, Fedora builds may work with the fedora-x64 rid.

@omajid
Copy link
Member Author

omajid commented Feb 5, 2020

I tried it with 3.0.2 and the RHEL 8 tarball builds on CentOS 8 without any further issues. I am going to wait to hear confirmation from the CentOS folks before closing this issue.

@omajid
Copy link
Member Author

omajid commented Feb 6, 2020

Got official confirmation from CentOS 8 folks .NET Core 3.0 and .NET Core 3.1.

@omajid omajid closed this as completed Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants