Skip to content

Commit

Permalink
Merge pull request #2081 from AdmiringWorm/cygwin-fix
Browse files Browse the repository at this point in the history
(cygwin) Remove 32bit installation support
  • Loading branch information
JPRuskin authored Dec 16, 2022
2 parents 1780d9e + b5ab4ef commit d6fae04
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
5 changes: 5 additions & 0 deletions automatic/cygwin/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Package changelog for [cygwin](https://chocolatey.org/packages/cygwin)

## Upcoming

- **BREAKING CHANGE:** Removed support for 32bit installation
- **BREAKING CHANGE:** Remove dependencies used for compatibility

## Version: 3.0.7.20191022

- **BUGS:** Fixed permission bug when package was installed when `$Env:ChocolateyToolsLocation` wasn't created yet [#1291](https://github.com/chocolatey-community/chocolatey-coreteampackages/issues/1291)
Expand Down
4 changes: 0 additions & 4 deletions automatic/cygwin/cygwin.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ Example: `choco install cygwin --params "/InstallDir:C:\your\install\path /NoSta
</releaseNotes>
<mailingListUrl>https://cygwin.com/lists.html</mailingListUrl>
<projectSourceUrl>https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git</projectSourceUrl>
<dependencies>
<dependency id="chocolatey-core.extension" version="1.3.3" />
<dependency id="chocolatey" version="0.10.5" />
</dependencies>
</metadata>
<files>
<file src="legal\**" target="legal" />
Expand Down
4 changes: 2 additions & 2 deletions automatic/cygwin/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ location on <https://cygwin.com/>
and can be verified by doing the following:

1. Download the following:
32-Bit software: <https://cygwin.com/setup-x86.exe>
32-Bit software: NO LONGER SUPPORTED
64-Bit software: <https://cygwin.com/setup-x86_64.exe>
2. Get the checksum using one of the following methods:
- Using powershell function 'Get-FileHash'
- Use chocolatey utility 'checksum.exe'
3. The checksums should match the following:

checksum type: sha256
checksum32: EC92025B2EBF22DFDECA292CFC50C7A126ED9F1610D72D87B0859A6977FB8D55
checksum32: NO LONGER SUPPORTED
checksum64: CF57CA7AC4E1F57B5D152F310FB82FB0CE8E500BFF261E46B89FEBC673D04210

The file 'LICENSE.txt' has been obtained from <https://cygwin.com/COPYING>
8 changes: 6 additions & 2 deletions automatic/cygwin/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
$ErrorActionPreference = 'Stop'

if ((Get-OSArchitectureWidth 32) -or $env:ChocolateyForceX86) {
throw "32bit installation is no longer supported. Please install version 3.3.6 if this is needed."
}

$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
$pp = Get-PackageParameters
$toolsLocation = Get-ToolsLocation
Expand Down Expand Up @@ -41,7 +45,7 @@ $silentArgs = @(
$packageArgs = @{
packageName = $env:ChocolateyPackageName
fileType = 'exe'
file = "$toolsPath\setup-x86.exe"
file = ''
file64 = "$toolsPath\setup-x86_64.exe"
softwareName = 'Cygwin*'
silentArgs = $silentArgs
Expand All @@ -52,7 +56,7 @@ Install-ChocolateyInstallPackage @packageArgs
Install-BinFile -Name "Cygwin" -Path "$cygwin_root\Cygwin.bat"

Write-Host "Copying cygwin package manager (setup) to $cygwin_root"
$setup_path = if ((Get-OSArchitectureWidth 32) -or $env:ChocolateyForceX86) { $packageArgs.file } else { $packageArgs.file64 }
$setup_path = $packageArgs.file64
Move-Item $setup_path $cygwin_root\cygwinsetup.exe -Force

Get-ChildItem $toolsPath\*.exe | ForEach-Object { Remove-Item $_ -ea 0; if (Test-Path $_) { Set-Content "$_.ignore" "" }}
12 changes: 5 additions & 7 deletions automatic/cygwin/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ function global:au_SearchReplace {
}
".\legal\VERIFICATION.txt" = @{
"(?i)(^\s*location on\:?\s*)\<.*\>" = "`${1}<$releases>"
"(?i)(\s*32\-Bit Software.*)\<.*\>" = "`${1}<$($Latest.URL32)>"
"(?i)(\s*64\-Bit Software.*)\<.*\>" = "`${1}<$($Latest.URL64)>"
"(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType32)"
"(?i)(^\s*checksum(32)?\:).*" = "`${1} $($Latest.Checksum32)"
"(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType64)"
"(?i)(^\s*checksum64\:).*" = "`${1} $($Latest.Checksum64)"
}
".\tools\chocolateyInstall.ps1" = @{
"(?i)(^\s*file\s*=\s*`"[$]toolsPath\\).*" = "`${1}$($Latest.FileName32)`""
"(?i)(^\s*file64\s*=\s*`"[$]toolsPath\\).*" = "`${1}$($Latest.FileName64)`""
}
}
Expand All @@ -38,13 +35,14 @@ function global:au_GetLatest {
$url = $download_page.links | ? href -match $re | select -First 2 -expand href | % { $releases + $_ }
$rn = $download_page.links | ? href -match 'announce'

@{
URL32 = $url -notmatch 'x86_64' | select -First 1
URL64 = $url -match 'x86_64' | select -First 1
$result = @{
URL64 = $url | ? {$_ -match 'x86_64' } | select -First 1
ReleaseNotes = $rn.href
Version = $rn.innerText
PackageName = 'Cygwin'
}

$result
}

update -ChecksumFor none

0 comments on commit d6fae04

Please sign in to comment.