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

Windows: install dotnet and latest wix #354

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Conversation

lsm5
Copy link
Member

@lsm5 lsm5 commented May 3, 2024

wix3 is EOL and choco doesn't support installing wix > 3.14.

So, this commit installs the dotnet runtime and uses dotnet to install
the latest wix in the windows image.

Resolves: RUN-2055

@lsm5 lsm5 added no_skopeo_cidev Don't build the skopeo_cidev image no_prior-fedora Don't build any prior-fedora images no_fedora Don't build any fedora images no_fedora-aws Don't build any fedora-aws images no_fedora-aws-arm64 Don't build any fedora-aws-arm64 images no_build-push Don't build the build-push image no_fedora_podman Don't build the fedora_podman image no_prior-fedora_podman Don't build the prior-fedora_podman image no_fedora-netavark Don't build the fedora-netavark image no_fedora-netavark-aws-arm64 Don't build the fedora-netavark-aws image no_fedora-podman-py Don't build the fedora-podman-py image no_image-builder Don't build the image-builder image no_fedora-podman-aws-arm64 Don't build the fedora-podman-aws image no_debian Don't build the debian image no_rawhide Don't build the rawhide image labels May 3, 2024
@lsm5 lsm5 force-pushed the dotnet branch 6 times, most recently from 3561082 to ff3089d Compare May 7, 2024 17:55
Copy link

github-actions bot commented May 7, 2024

Cirrus CI build successful. Found built image names and IDs:

Stage Image Name IMAGE_SUFFIX
cache win-server-wsl c20240507t175445z-f40f39d13

@lsm5 lsm5 removed no_skopeo_cidev Don't build the skopeo_cidev image no_prior-fedora Don't build any prior-fedora images no_fedora Don't build any fedora images no_fedora-aws Don't build any fedora-aws images no_fedora-aws-arm64 Don't build any fedora-aws-arm64 images no_build-push Don't build the build-push image no_fedora_podman Don't build the fedora_podman image labels May 7, 2024
@lsm5
Copy link
Member Author

lsm5 commented Jun 27, 2024

@cevich @edsantiago containers/podman#22408 has passed CI but still pending review. Remind me, should I wait for that PR to merge first before merging this image update PR?

@lsm5 lsm5 changed the title [DO NOT MERGE] Windows: install dotnet and latest wix Windows: install dotnet and latest wix Jun 27, 2024
@edsantiago
Copy link
Member

I have a medium-high preference for merging an auto-imgs PR before a tool-that-uses-it PR, but as long as both get done shortly within each other I think it's OK

@lsm5
Copy link
Member Author

lsm5 commented Jun 27, 2024

ok, I'll set up a hold on the podman PR and remove it only after we have 1. LGTM there and 2. auto-img pr is merged.

@edsantiago
Copy link
Member

debian prior-fedora fedora fedora-aws rawhide
kernel 6.8.12-1 6.9.5-100 6.9.6-200 6.9.5-200 6.8.5-301
6.9.4-100 ⇑ 6.9.5-200 ⇑ 6.9.4-200 ⇑
grub2-common 2.12-2 2.06-121 2.06-123 2.06-123 2.06-123
2.06-120 ⇑
aardvark-dns 1.4.0-6 1.11.0-1 1.11.0-1 1.11.0-1 1.11.0-1
1.4.0-5.1 ⇑
docker-ce 5:27.0.1-1debian.12bookworm ? ? ? ?
5:26.1.4-1debian.12bookworm ⇑
golang 2:1.22~3 1.21.11-1 1.22.4-1 1.22.4-1 1.22.4-4
1.22.4-3 ⇑
passt 2024-06-24 2024-06-07 2024-06-24 2024-06-07 2024-06-24
2024-06-07 ⇑ 2024-05-10 ⇑ 2024-06-07 ⇑ 2024-06-07 ⇑
systemd 256.1-2 254.13-1 255.7-1 255.7-1 256.1-3
256.1-1 ⇑

@cevich
Copy link
Member

cevich commented Jun 27, 2024

SGTM

Copy link
Member

@l0rd l0rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some non-blocking comments.

# Install dotnet as that's the best way to install WiX 4+
# Choco does not support installing anything over WiX 3.14
Invoke-WebRequest -Uri https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1
.\dotnet-install.ps1 -InstallDir 'C:\Program Files\dotnet'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have installed it using winget because it automatically adds dotnet to the %PATH%. Using the script works too, though, and there may be other reasons to choose it that I am not aware of.

What I have found is:

The intended use of the scripts is for Continuous Integration (CI) scenarios, where:
- The SDK needs to be installed without user interaction and without admin rights.
- The SDK installation doesn't need to persist across multiple CI runs.

The typical sequence of events:
. CI is triggered.
. CI installs the SDK using one of these scripts.
. CI finishes its work and clears temporary data including the SDK installation.

To set up a development environment or to run apps, use the installers rather than these scripts.

In the build_windows.md we are suggesting to install dotnet using winget.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a separate commit here to use winget. If this works out, even better. Thanks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by non-expert comment: Remember this is preparing a VM image to run CI w/o having to install anything during runtime. So the "typical sequence" isn't completely correct in this context. This makes me think that having %PATH% all ready to go at CI runtime might be a good idea - it will simplify the CI scripts to which more developers are exposed.

(please take this comment with a grain of salt)

.\dotnet-install.ps1 -InstallDir 'C:\Program Files\dotnet'

# Configure NuGet sources for dotnet to fetch wix (and other packages) from
& 'C:\Program Files\dotnet\dotnet.exe' nuget add source https://api.nuget.org/v3/index.json -n nuget.org
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locally, I didn't had to do that. dotnet tool install --global wix worked right after dotnet installation. No extra configuration of sources was required. That may be related to the use of winget instead of the pwsh script though.


# Install WixToolset.Heat as we need the `heat` executable
& 'C:\Program Files\dotnet\dotnet.exe' new console
& 'C:\Program Files\dotnet\dotnet.exe' add package WixToolset.Heat
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the two commands above were not required in my case. I could build the msi package without running them.

lsm5 added a commit to lsm5/podman that referenced this pull request Jul 1, 2024
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at containers/automation_images#354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
- small fixes to windows installer theme
Ref: https://github.com/lsm5/podman/pull/3/commits

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
lsm5 added a commit to lsm5/podman that referenced this pull request Jul 1, 2024
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at containers/automation_images#354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
Ref: #3

- small fixes to windows installer theme
Ref: #4

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
@lsm5 lsm5 force-pushed the dotnet branch 3 times, most recently from bf0bbcb to 3ad8b77 Compare July 1, 2024 18:49
Copy link

github-actions bot commented Jul 1, 2024

Cirrus CI build successful. Found built image names and IDs:

Stage Image Name IMAGE_SUFFIX
base debian do-not-use
base fedora do-not-use
base fedora-aws do-not-use
base fedora-aws-arm64 do-not-use
base image-builder do-not-use
base prior-fedora do-not-use
cache build-push c20240701t184835z-f40f39d13
cache debian c20240701t184835z-f40f39d13
cache fedora c20240701t184835z-f40f39d13
cache fedora-aws c20240701t184835z-f40f39d13
cache fedora-netavark c20240701t184835z-f40f39d13
cache fedora-netavark-aws-arm64 c20240701t184835z-f40f39d13
cache fedora-podman-aws-arm64 c20240701t184835z-f40f39d13
cache fedora-podman-py c20240701t184835z-f40f39d13
cache prior-fedora c20240701t184835z-f40f39d13
cache rawhide c20240701t184835z-f40f39d13
cache win-server-wsl c20240701t184835z-f40f39d13

lsm5 added a commit to lsm5/podman that referenced this pull request Jul 2, 2024
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at containers/automation_images#354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
Ref: #3

- small fixes to windows installer theme
Ref: #4

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
wix3 is EOL and choco doesn't support installing wix > 3.14.

So, this commit installs the `dotnet` runtime and uses dotnet to install
the latest wix in the windows image.

Also remove pasta package timebomb from debian packaging.

Resolves: RUN-2055

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
@lsm5
Copy link
Member Author

lsm5 commented Jul 2, 2024

I'm gonna merge this soon after this passes.

Copy link

github-actions bot commented Jul 2, 2024

Cirrus CI build successful. Found built image names and IDs:

Stage Image Name IMAGE_SUFFIX
base debian do-not-use
base fedora do-not-use
base fedora-aws do-not-use
base fedora-aws-arm64 do-not-use
base image-builder do-not-use
base prior-fedora do-not-use
cache build-push c20240702t180702z-f40f39d13
cache debian c20240702t180702z-f40f39d13
cache fedora c20240702t180702z-f40f39d13
cache fedora-aws c20240702t180702z-f40f39d13
cache fedora-netavark c20240702t180702z-f40f39d13
cache fedora-netavark-aws-arm64 c20240702t180702z-f40f39d13
cache fedora-podman-aws-arm64 c20240702t180702z-f40f39d13
cache fedora-podman-py c20240702t180702z-f40f39d13
cache prior-fedora c20240702t180702z-f40f39d13
cache rawhide c20240702t180702z-f40f39d13
cache win-server-wsl c20240702t180702z-f40f39d13

@lsm5 lsm5 merged commit faf62c8 into containers:main Jul 2, 2024
39 checks passed
lsm5 added a commit to lsm5/podman that referenced this pull request Jul 2, 2024
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at containers/automation_images#354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
Ref: #3

- small fixes to windows installer theme
Ref: #4

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
@lsm5 lsm5 deleted the dotnet branch July 2, 2024 19:53
@edsantiago
Copy link
Member

FWIW, this got a bunch of "Context canceled" failures. I got that earlier today and had to repush because something-something images had already been tagged. I think it's a Cirrus issue. All the jobs got retried here and passed.

Diff against Chris's PR from yesterday:

debian prior-fedora fedora fedora-aws rawhide
netavark 1.4.0-4.1 1.11.0-1 1.11.0-1 1.11.0-1 1.11.0-1
1.10.3-3 ⇑

@edsantiago
Copy link
Member

Looks like Win Installer is broken: containers/podman#22726

lsm5 added a commit to lsm5/podman that referenced this pull request Jul 3, 2024
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at containers/automation_images#354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
Ref: #3

- small fixes to windows installer theme
Ref: #4

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
lsm5 added a commit to lsm5/podman that referenced this pull request Jul 3, 2024
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at containers/automation_images#354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
Ref: #3

- small fixes to windows installer theme
Ref: #4

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
lsm5 added a commit to lsm5/podman that referenced this pull request Jul 5, 2024
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at containers/automation_images#354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
Ref: #3

- small fixes to windows installer theme
Ref: #4

- Better win-installer sidebar logo
Ref: #5

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
lsm5 added a commit to lsm5/podman that referenced this pull request Jul 5, 2024
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at containers/automation_images#354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

The GitHub Action to upload windows installer now builds the installer
using winmake.ps1.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
Ref: #3

- small fixes to windows installer theme
Ref: #4

- Better win-installer sidebar logo
Ref: #5

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
lsm5 added a commit to lsm5/podman that referenced this pull request Jul 5, 2024
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at containers/automation_images#354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

The GitHub Action to upload windows installer now builds the installer
using winmake.ps1.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
Ref: #3

- small fixes to windows installer theme
Ref: #4

- Better win-installer sidebar logo
Ref: #5

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
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

Successfully merging this pull request may close these issues.

4 participants