@@ -154,8 +154,9 @@ function Get-EnvironmentInformation
154154 $environment += @ {' IsRedHat7' = $environment.IsRedHat -and $LinuxInfo.VERSION_ID -match ' 7' }
155155 $environment += @ {' IsOpenSUSE13' = $environment.IsOpenSUSE -and $LinuxInfo.VERSION_ID -match ' 13' }
156156 $environment += @ {' IsOpenSUSE42.1' = $environment.IsOpenSUSE -and $LinuxInfo.VERSION_ID -match ' 42.1' }
157+ $environment += @ {' IsRocky8' = $LinuxInfo.ID -match ' rocky' -and $LinuxInfo.VERSION_ID -match ' 8' }
157158 $environment += @ {' IsDebianFamily' = $environment.IsDebian -or $environment.IsUbuntu }
158- $environment += @ {' IsRedHatFamily' = $environment.IsCentOS -or $environment.IsFedora -or $environment.IsRedHat }
159+ $environment += @ {' IsRedHatFamily' = $environment.IsCentOS -or $environment.IsFedora -or $environment.IsRedHat -or $environment .IsRocky8 }
159160 $environment += @ {' IsSUSEFamily' = $environment.IsSLES -or $environment.IsOpenSUSE }
160161 $environment += @ {' IsAlpine' = $LinuxInfo.ID -match ' alpine' }
161162 $environment += @ {' IsMariner' = $LinuxInfo.ID -match ' mariner' -or $LinuxInfo.ID -match ' azurelinux' }
@@ -530,7 +531,8 @@ function Start-BuildNativeUnixBinaries {
530531 Start-NativeExecution { ctest -- verbose }
531532 }
532533 else {
533- Start-NativeExecution { cmake - DCMAKE_BUILD_TYPE= Debug . }
534+ Start-NativeExecution { cmake - DCMAKE_POLICY_VERSION_MINIMUM= ' 3.5' - DCMAKE_BUILD_TYPE= Debug . }
535+ Get-ChildItem . - Recurse | Out-String - Stream | Write-Verbose - Verbose
534536 Start-NativeExecution { make - j }
535537 Start-NativeExecution { ctest -- verbose }
536538 }
@@ -1946,7 +1948,7 @@ function Install-Dotnet {
19461948function Get-RedHatPackageManager {
19471949 if ($environment.IsCentOS -or (Get-Command - Name yum - CommandType Application - ErrorAction SilentlyContinue)) {
19481950 " yum install -y -q"
1949- } elseif ($environment.IsFedora -or (Get-Command - Name dnf - CommandType Application - ErrorAction SilentlyContinue)) {
1951+ } elseif ($environment.IsFedora -or $environment .IsRocky8 -or (Get-Command - Name dnf - CommandType Application - ErrorAction SilentlyContinue)) {
19501952 " dnf install -y -q"
19511953 } elseif ($environment.IsMariner -or (Get-Command - Name tdnf - CommandType Application - ErrorAction SilentlyContinue)) {
19521954 " tdnf install -y"
@@ -1985,6 +1987,12 @@ function Start-PSBootstrap {
19851987 try {
19861988 # Update googletest submodule for linux native cmake
19871989 Push-Location $PSScriptRoot
1990+
1991+ if (-not (Test-Path " $PSScriptRoot /.git" )) {
1992+ Write-Log " Git repository not initialized. Initializing..."
1993+ Start-NativeExecution { git init }
1994+ }
1995+
19881996 $Submodule = " $PSScriptRoot /src/libpsl-native/test/googletest"
19891997 Remove-Item - Path $Submodule - Recurse - Force - ErrorAction SilentlyContinue
19901998 git submodule -- quiet update -- init -- $submodule
@@ -2033,13 +2041,13 @@ function Start-PSBootstrap {
20332041 }
20342042 } elseif ($Environment.IsRedHatFamily -or $Environment.IsMariner ) {
20352043 # Build tools
2036- $Deps += " which" , " curl" , " wget"
2044+ $Deps += " which" , " curl" , " wget" , " gcc " , " gcc-c++ " , " cmake " , " make " , " git "
20372045
20382046 # .NET Core required runtime libraries
20392047 $Deps += " libicu" , " openssl-libs"
20402048
20412049 # Packaging tools
2042- if ($Package ) { $Deps += " ruby-devel " , " rpm-build" , " groff " , ' libffi-devel ' , " gcc-c++" }
2050+ if ($Package ) { $Deps += " rpm-build" , " gcc-c++" }
20432051
20442052 $PackageManager = Get-RedHatPackageManager
20452053
@@ -2113,22 +2121,6 @@ function Start-PSBootstrap {
21132121 Start-NativeExecution { apk update }
21142122 Start-NativeExecution { apk add $Deps }
21152123 }
2116-
2117- # Install [fpm](https://github.com/jordansissel/fpm) and [ronn](https://github.com/rtomayko/ronn)
2118- if ($Package ) {
2119- try {
2120- # We cannot guess if the user wants to run gem install as root on linux and windows,
2121- # but macOs usually requires sudo
2122- $gemsudo = ' '
2123- if ($Environment.IsMacOS ) {
2124- $gemsudo = $sudo
2125- }
2126- Start-NativeExecution ([ScriptBlock ]::Create(" $gemsudo gem install fpm -v 1.9.3" ))
2127- Start-NativeExecution ([ScriptBlock ]::Create(" $gemsudo gem install ronn -v 0.7.3" ))
2128- } catch {
2129- Write-Warning " Installation of fpm and ronn gems failed! Must resolve manually."
2130- }
2131- }
21322124 }
21332125
21342126 # Try to locate dotnet-SDK before installing it
0 commit comments