Skip to content
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

Undo workarounds added to dockerfile while updating to 7.0 SDK #37406

Closed
pranavkm opened this issue Oct 8, 2021 · 11 comments · Fixed by #41194 or dotnet/dotnet-buildtools-prereqs-docker#610
Assignees
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Done This issue has been fixed

Comments

@pranavkm
Copy link
Contributor

pranavkm commented Oct 8, 2021

As part of updating the SDK in #37192, we had to add stop-gap workarounds to eng/docker/rhel.Dockerfile and src/Installers/Rpm/Directory.Build.targets to allow the build to succeed on a CentOS 7 image. We want to eventually switch to an official image that supports building RPM packages without these hacks. This is a tracking issue to remove these workarounds.

Things to change as part of this undo:

a) Use an updated base image
b) Remove hacks to uninstall / install ruby
c) Changes made to src/Installers/Rpm/Directory.Build.targets as part of the PR

@dougbu
Copy link
Member

dougbu commented Oct 8, 2021

@janvorli @mthalman @NikolaMilosavljevic please let us know when a working CentOS or RHEL 7 rpmpkg image is available.

@mkArtakMSFT mkArtakMSFT added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Oct 8, 2021
@wtgodbe
Copy link
Member

wtgodbe commented Apr 11, 2022

@janvorli @mthalman @NikolaMilosavljevic do we have images we can use for this?

@mthalman
Copy link
Member

Not that I know of. The https://github.com/dotnet/dotnet-buildtools-prereqs-docker repo is a self-service repo where product teams can make PRs to define/update Dockerfiles that meet the needs of their repos. That's the process that should be followed for this.

@dougbu
Copy link
Member

dougbu commented Apr 14, 2022

@mthalman should we update the centos-7-rpmpkg-* tag going forward or create something new (perhaps using RHEL)❔

@mthalman
Copy link
Member

@mthalman should we update the centos-7-rpmpkg-* tag going forward or create something new (perhaps using RHEL)❔

I have no knowledge on how product teams are using the container images produced by that repo so I can't really offer any guidance here. I do know that it doesn't support building RHEL because of the licensing requirements.

@NikolaMilosavljevic
Copy link
Member

@janvorli @mthalman @NikolaMilosavljevic do we have images we can use for this?

Can you use the same image that is used by dotnet/runtime to build RPMs today? Do you need to create a new one?

https://github.com/dotnet/runtime/blob/73665cc31f47264b70b4c9755ee2be1712b4f532/eng/pipelines/installer/jobs/base-job.yml#L29

@wtgodbe
Copy link
Member

wtgodbe commented Apr 14, 2022

Let's find out: #41194

@dougbu
Copy link
Member

dougbu commented Apr 14, 2022

We used to use another version of the same image -- mcr.microsoft.com/dotnet-buildtools/prereqs:rhel-7-rpmpkg-e1b4a89-20175311035359 and it stopped working. dotnet/runtime may use rpm directly while we use the fpm wrapper.

@NikolaMilosavljevic
Copy link
Member

We used to use another version of the same image -- mcr.microsoft.com/dotnet-buildtools/prereqs:rhel-7-rpmpkg-e1b4a89-20175311035359 and it stopped working. dotnet/runtime may use rpm directly while we use the fpm wrapper.

Runtime build uses FPM tool, as well: https://github.com/dotnet/arcade/blob/5ef2983363df5e0d85181b2948e2a5b0c16aa41a/src/Microsoft.DotNet.Build.Tasks.Installers/build/installer.singlerid.targets#L314

@dougbu
Copy link
Member

dougbu commented Apr 15, 2022

According to comments in #37192, our original issue w/ mcr.microsoft.com/dotnet-buildtools/prereqs:rhel-7-rpmpkg-e1b4a89-20175311035359 was related to SSL issues. @wtgodbe used the slightly older mcr.microsoft.com/dotnet-buildtools/prereqs:rhel-7-rpmpkg-c982313-20174116044113 in #41194 and instead hit a missing sudo file. Updating the prereqs image to get a CentOS 7 w/ a working fpm seems like the most straightforward way ahead.

@dougbu
Copy link
Member

dougbu commented Apr 15, 2022

… unless of course it works to simply delete our RUN chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo in the Dockerfile updated in #41194 @wtgodbe

@wtgodbe wtgodbe added the Done This issue has been fixed label May 17, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Done This issue has been fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants