Skip to content

Commit

Permalink
Windows: install dotnet and latest wix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lsm5 committed Jul 1, 2024
1 parent cfc18f0 commit 3ad8b77
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 42 deletions.
2 changes: 1 addition & 1 deletion IMG_SFX
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20240620t153000z-f40f39d13
20240701t184835z-f40f39d13
33 changes: 0 additions & 33 deletions cache_images/debian_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,39 +119,6 @@ INSTALL_PACKAGES=(\
msg "Installing general build/testing dependencies"
bigto $SUDO apt-get -q -y install "${INSTALL_PACKAGES[@]}"

# 2024-05-01 Debian pasta package has a broken apparmor profile for our test
# ref: https://github.com/containers/podman/issues/22625
timebomb 20240630 "Workaround for pasta apparmor blocking use of /tmp"
$SUDO tee /etc/apparmor.d/usr.bin.pasta <<EOF
# SPDX-License-Identifier: GPL-2.0-or-later
#
# PASST - Plug A Simple Socket Transport
# for qemu/UNIX domain socket mode
#
# PASTA - Pack A Subtle Tap Abstraction
# for network namespace/tap device mode
#
# contrib/apparmor/usr.bin.pasta - AppArmor profile for pasta(1)
#
# Copyright (c) 2022 Red Hat GmbH
# Author: Stefano Brivio <sbrivio@redhat.com>
abi <abi/3.0>,
include <tunables/global>
profile pasta /usr/bin/pasta{,.avx2} flags=(attach_disconnected) {
include <abstractions/pasta>
# Alternatively: include <abstractions/user-tmp>
/tmp/** rw, # tap_sock_unix_init(), pcap(),
# write_pidfile(),
# logfile_init()
owner @{HOME}/** w, # pcap(), write_pidfile()
}
EOF

# The nc installed by default is missing many required options
$SUDO update-alternatives --set nc /usr/bin/ncat

Expand Down
18 changes: 10 additions & 8 deletions win_images/win_packaging.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ retryInstall git archiver psexec golang mingw StrawberryPerl; Check-Exit
# Update service is required for dotnet
Set-Service -Name wuauserv -StartupType "Manual"; Check-Exit

# dotnet is required for wixtoolset
# Allowing chocolaty to install dotnet breaks in an entirely
# non-debuggable way. Workaround this by installing it as
# a server-feature first.
Install-WindowsFeature -Name Net-Framework-Core; Check-Exit

# Install wixtoolset for installer build & test.
retryInstall wixtoolset; Check-Exit
# 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'

# 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

# Install wix
& 'C:\Program Files\dotnet\dotnet.exe' tool install --global wix

# Install Hyper-V
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart
Expand Down

0 comments on commit 3ad8b77

Please sign in to comment.