Skip to content

Commit 5d67083

Browse files
authored
Merge pull request #3638 from chocolatey/hotfix/2.4.3
(release) 2.4.3
2 parents c6e2f21 + 2abb0b1 commit 5d67083

File tree

405 files changed

+936
-833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

405 files changed

+936
-833
lines changed

.git-blame-ignore-revs

+2
Original file line numberDiff line numberDiff line change
@@ -478,3 +478,5 @@ e9515c247972ecf22ece68e080ae96ef0e8ebd6c
478478
#(maint) formatting
479479
f6393c625416250e87294bb4f20b94495a1ed923
480480

481+
#(maint) Update file license headers
482+
b8f37f3f0da4ec1b1d4675e0526fdfd7c6c4f645

.github/workflows/build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
# Build using mono on Ubuntu
1313
ubuntu-build:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-22.04
1515
steps:
1616
- uses: actions/checkout@v3
1717
with:
@@ -26,7 +26,7 @@ jobs:
2626
chmod +x build.sh
2727
$GITHUB_WORKSPACE//build.sh --verbosity=diagnostic --target=CI --testExecutionType=unit
2828
- name: Upload Ubuntu build results
29-
uses: actions/upload-artifact@v3
29+
uses: actions/upload-artifact@v4
3030
# Always upload build results
3131
if: ${{ always() }}
3232
with:
@@ -52,7 +52,7 @@ jobs:
5252
shell: powershell
5353
run: ./build.ps1 --verbosity=diagnostic --target=CI --testExecutionType=unit --shouldRunOpenCover=false --shouldBuildMsi=true
5454
- name: Upload Windows build results
55-
uses: actions/upload-artifact@v3
55+
uses: actions/upload-artifact@v4
5656
# Always upload build results
5757
if: ${{ always() }}
5858
with:
@@ -92,7 +92,7 @@ jobs:
9292
chmod +x build.sh
9393
$GITHUB_WORKSPACE//build.sh --verbosity=diagnostic --target=CI --testExecutionType=unit
9494
- name: Upload MacOS build results
95-
uses: actions/upload-artifact@v3
95+
uses: actions/upload-artifact@v4
9696
# Always upload build results
9797
if: ${{ always() }}
9898
with:

.github/workflows/stale.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
stale:
1313
runs-on: ubuntu-latest
1414
steps:
15+
# Action GitHub repository: https://github.com/actions/stale
1516
- uses: actions/stale@v9
1617
id: stale
1718
with:
@@ -20,13 +21,14 @@ jobs:
2021
exempt-all-assignees: false
2122
exempt-draft-pr: true
2223
stale-issue-label: "Pending Closure"
23-
stale-pr-label: 'Pending Closure'
24-
only-labels: '0 - Waiting on User'
24+
stale-pr-label: "Pending Closure"
25+
only-labels: "0 - Waiting on User"
2526
close-issue-label: "No Response / Stale"
27+
close-issue-reason: "not_planned"
2628
close-pr-label: "No Response / Stale"
27-
exempt-issue-labels: 'Security / CVE,2 - Working,3 - Review'
28-
exempt-pr-labels: 'Security / CVE,2 - Working,3 - Review'
29-
labels-to-remove-when-unstale: '0 - Waiting on User,Pending closure'
29+
exempt-issue-labels: "Security,2 - Working,3 - Review"
30+
exempt-pr-labels: "Security,2 - Working,3 - Review"
31+
labels-to-remove-when-unstale: "0 - Waiting on User,Pending closure"
3032
remove-stale-when-updated: true
3133
stale-issue-message: |
3234
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
@@ -37,13 +39,18 @@ jobs:
3739
As this issue seems to have been inactive for quite some time now, it has been automatically closed.
3840
If you feel this is a valid issue, please feel free to re-open the issue if / when a pull request
3941
has been added.
40-
Thank you for your contribution.
4142
43+
Thank you for your contribution.
44+
stale-pr-message: |
45+
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
46+
This pull request will be closed in 14 days if it continues to be inactive.
4247
close-pr-message: |
4348
Dear contributor,
4449
4550
As this PR seems to have been inactive for 30 days after changes / additional information
4651
was requested, it has been automatically closed.
52+
4753
If you feel the changes are still valid, please re-open the PR once all changes or additional information
4854
that was requested has been added.
55+
4956
Thank you for your contribution.

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
chmod +x build.sh
2727
$GITHUB_WORKSPACE//build.sh --verbosity=diagnostic --target=test --testExecutionType=all
2828
- name: Upload Ubuntu build results
29-
uses: actions/upload-artifact@v3
29+
uses: actions/upload-artifact@v4
3030
# Always upload build results
3131
if: ${{ always() }}
3232
with:
@@ -50,7 +50,7 @@ jobs:
5050
- name: Test with NUnit on .Net Framework
5151
run: .\build.bat --verbosity=diagnostic --target=test --testExecutionType=all --shouldRunOpenCover=false
5252
- name: Upload Windows build results
53-
uses: actions/upload-artifact@v3
53+
uses: actions/upload-artifact@v4
5454
# Always upload build results
5555
if: ${{ always() }}
5656
with:
@@ -78,7 +78,7 @@ jobs:
7878
chmod +x build.sh
7979
$GITHUB_WORKSPACE//build.sh --verbosity=diagnostic --target=test --testExecutionType=all
8080
- name: Upload MacOS build results
81-
uses: actions/upload-artifact@v3
81+
uses: actions/upload-artifact@v4
8282
# Always upload build results
8383
if: ${{ always() }}
8484
with:

.teamcity/settings.kts

+3-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ object Chocolatey : BuildType({
7272

7373
triggers {
7474
vcs {
75-
branchFilter = ""
75+
branchFilter = """
76+
-:support/*
77+
""".trimIndent()
7678
}
7779
}
7880

docs/legal/CREDITS.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
- [Contributors](#contributors)
77
- [Third Party Licenses - Development](#third-party-licenses---development)
88
- [Third Party Licenses - Runtime](#third-party-licenses---runtime)
9-
- [7-Zip @ 24.08](#7-zip--2408)
9+
- [7-Zip @ 24.09](#7-zip--2409)
1010
- [AlphaFS @ 2.1.3](#alphafs--213)
1111
- [Checksum @ 0.3.1](#checksum--031)
1212
- [log4net @ 2.0.12](#log4net--2012)
1313
- [Microsoft.Bcl.HashCode @ 1.1.1](#microsoftbclhashcode--111)
1414
- [Microsoft.Web.Xdt @ 3.1.0](#microsoftwebxdt--310)
1515
- [Newtonsoft.Json @ 13.0.1](#newtonsoftjson--1301)
16-
- [Chocolatey.NuGet.Client @ 3.4.2](#chocolateynugetclient--342)
16+
- [Chocolatey.NuGet.Client @ 3.4.3](#chocolateynugetclient--343)
1717
- [Rhino.Licensing @ 1.4.1 (modified)](#rhinolicensing--141-modified)
1818
- [Shim Generator (shimgen) @ 2.0.0](#shim-generator-shimgen--200)
1919
- [SimpleInjector @ 2.8.3](#simpleinjector--283)
@@ -73,7 +73,7 @@ We would like to credit other super sweet tools/frameworks that aid in the devel
7373
Chocolatey CLI (choco) uses a number of 3rd-party components.
7474
Their details are below.
7575

76-
### 7-Zip @ 24.08
76+
### 7-Zip @ 24.09
7777

7878
Chocolatey uses [7-Zip](http://www.7-zip.org/) for uncompressing archives.
7979
[License terms](http://www.7-zip.org/license.txt):
@@ -799,7 +799,7 @@ The above copyright notice and this permission notice shall be included in all c
799799
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
800800
```
801801

802-
### Chocolatey.NuGet.Client @ 3.4.2
802+
### Chocolatey.NuGet.Client @ 3.4.3
803803

804804
Chocolatey uses [NuGet.Client](https://github.com/NuGet/NuGet.Client) [(modified)](https://github.com/chocolatey/NuGet.Client) to work with packaging.
805805
[License terms](https://github.com/NuGet/NuGet.Client/blob/72f9f2b2eab28c9d91a22065c55aa7702abf7e01/LICENSE.txt):

recipe.cake

+2-171
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#load nuget:?package=Chocolatey.Cake.Recipe&version=0.28.4
1+
#load nuget:?package=Chocolatey.Cake.Recipe&version=0.29.0
22
#tool nuget:?package=WiX&version=3.11.2
33

44
///////////////////////////////////////////////////////////////////////////////
@@ -58,32 +58,6 @@ Func<List<ILMergeConfig>> getILMergeConfigs = () =>
5858
PrimaryAssemblyName = BuildParameters.Paths.Directories.PublishedLibraries + "/chocolatey/chocolatey.dll",
5959
AssemblyPaths = assembliesToILMerge });
6060

61-
if (DirectoryExists(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/"))
62-
{
63-
var no7zAssembliesToILMerge = GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/*.{exe|dll}")
64-
- GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/choco.exe")
65-
- GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/System.Management.Automation.dll")
66-
- GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/chocolatey.tests*.dll")
67-
- GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/{Moq|nunit|Should|testcentric}*.dll")
68-
- GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/Chocolatey.PowerShell.dll");
69-
70-
Information("The following assemblies have been selected to be ILMerged for choco.exe No7zip Version...");
71-
foreach (var assemblyToILMerge in no7zAssembliesToILMerge)
72-
{
73-
Information(assemblyToILMerge.FullPath);
74-
}
75-
76-
mergeConfigs.Add(new ILMergeConfig() {
77-
KeyFile = BuildParameters.StrongNameKeyPath,
78-
LogFile = BuildParameters.Paths.Directories.Build + "/ilmerge-chocono7zipexe.log",
79-
TargetPlatform = targetPlatform,
80-
Target = "exe",
81-
Internalize = BuildParameters.RootDirectoryPath + "/src/chocolatey.console/ilmerge.internalize.ignore.txt",
82-
Output = BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip_merged/choco.exe",
83-
PrimaryAssemblyName = BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/choco.exe",
84-
AssemblyPaths = no7zAssembliesToILMerge });
85-
}
86-
8761
return mergeConfigs;
8862
};
8963

@@ -93,11 +67,6 @@ Func<FilePathCollection> getScriptsToVerify = () =>
9367
GetFiles(BuildParameters.Paths.Directories.NuGetNuspecDirectory + "/**/*.{ps1|psm1|psd1}") +
9468
GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/**/*.{ps1|psm1|psd1}");
9569

96-
if (DirectoryExists(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip"))
97-
{
98-
scriptsToVerify += GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/**/*.{ps1|psm1|psd1}");
99-
}
100-
10170
Information("The following PowerShell scripts have been selected to be verified...");
10271
foreach (var scriptToVerify in scriptsToVerify)
10372
{
@@ -129,14 +98,6 @@ Func<FilePathCollection> getFilesToSign = () =>
12998
+ GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/redirects/*.exe")
13099
+ GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "/tools/chocolateyInstall/helpers/Chocolatey.PowerShell.dll");
131100

132-
if (DirectoryExists(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip"))
133-
{
134-
filesToSign += GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/tools/chocolateyInstall/choco.exe")
135-
+ GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/tools/chocolateyInstall/tools/{checksum|shimgen}.exe")
136-
+ GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/tools/chocolateyInstall/redirects/*.exe")
137-
+ GetFiles(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/tools/chocolateyInstall/helpers/Chocolatey.PowerShell.dll");
138-
}
139-
140101
Information("The following assemblies have been selected to be signed...");
141102
foreach (var fileToSign in filesToSign)
142103
{
@@ -215,136 +176,6 @@ Task("Prepare-Chocolatey-Packages")
215176
}
216177
});
217178

218-
Task("Build-ChocolateyNo7zip")
219-
.WithCriteria(() => BuildParameters.Configuration == "ReleaseOfficial", "Skipping No7zip because this isn't an official release")
220-
.IsDependentOn("Build")
221-
.IsDependentOn("Test")
222-
.IsDependeeOf("Run-ILMerge")
223-
.Does<BuildData>(data => RequireTool(ToolSettings.MSBuildExtensionPackTool, () =>
224-
{
225-
Information("Building {0} with No7zip", BuildParameters.SolutionFilePath);
226-
227-
CleanDirectory(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/");
228-
229-
var no7zLogPath = BuildParameters.Paths.Files.BuildLogFilePath.ToString().Replace("\\.(\\S+)$", "-no7zip.${1}");
230-
231-
if (BuildParameters.BuildAgentOperatingSystem == PlatformFamily.Windows)
232-
{
233-
var msbuildSettings = new MSBuildSettings()
234-
{
235-
ToolPath = ToolSettings.MSBuildToolPath
236-
}
237-
.SetPlatformTarget(ToolSettings.BuildPlatformTarget)
238-
.UseToolVersion(ToolSettings.BuildMSBuildToolVersion)
239-
.WithProperty("OutputPath", MakeAbsolute(new DirectoryPath(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/")).FullPath)
240-
.WithProperty("TreatWarningsAsErrors", BuildParameters.TreatWarningsAsErrors.ToString())
241-
.WithTarget("Build")
242-
.SetMaxCpuCount(ToolSettings.MaxCpuCount)
243-
.SetConfiguration("ReleaseOfficialNo7zip")
244-
.WithLogger(
245-
Context.Tools.Resolve("MSBuild.ExtensionPack.Loggers.dll").FullPath,
246-
"XmlFileLogger",
247-
string.Format(
248-
"logfile=\"{0}\";invalidCharReplacement=_;verbosity=Detailed;encoding=UTF-8",
249-
no7zLogPath
250-
)
251-
);
252-
253-
MSBuild(BuildParameters.SolutionFilePath, msbuildSettings);
254-
}
255-
256-
if (FileExists(no7zLogPath))
257-
{
258-
BuildParameters.BuildProvider.UploadArtifact(no7zLogPath);
259-
}
260-
}));
261-
262-
Task("Prepare-ChocolateyNo7zip-Package")
263-
.WithCriteria(() => BuildParameters.Configuration == "ReleaseOfficial", "Skipping No7zip because this isn't an official release")
264-
.WithCriteria(() => BuildParameters.BuildAgentOperatingSystem == PlatformFamily.Windows, "Skipping because not running on Windows")
265-
.WithCriteria(() => BuildParameters.ShouldRunChocolatey, "Skipping because execution of Chocolatey has been disabled")
266-
.IsDependentOn("Build-ChocolateyNo7zip")
267-
.IsDependeeOf("Sign-Assemblies")
268-
.IsDependeeOf("Verify-PowerShellScripts")
269-
.IsDependeeOf("Create-ChocolateyNo7zip-Package")
270-
.Does(() =>
271-
{
272-
var nuspecDirectory = BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip";
273-
// Copy the Nuget/Chocolatey directory from Root Folder to temp/nuspec/chocolatey-no7zip
274-
EnsureDirectoryExists(nuspecDirectory);
275-
CopyFiles(GetFiles("./nuspec/chocolatey/**/*"), nuspecDirectory, true);
276-
277-
// Copy legal documents
278-
CopyFile(BuildParameters.RootDirectoryPath + "/docs/legal/CREDITS.md", nuspecDirectory + "/tools/chocolateyInstall/CREDITS.txt");
279-
CopyFile(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/LICENSE.txt", nuspecDirectory + "/tools/chocolateyInstall/LICENSE.txt");
280-
281-
// Copy choco.exe.manifest
282-
CopyFile(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/choco.exe.manifest", nuspecDirectory + "/tools/chocolateyInstall/choco.exe.manifest");
283-
284-
// Copy external file resources
285-
EnsureDirectoryExists(nuspecDirectory + "/tools/chocolateyInstall/helpers");
286-
CopyFiles(GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/helpers/**/*"), nuspecDirectory + "/tools/chocolateyInstall/helpers", true);
287-
EnsureDirectoryExists(nuspecDirectory + "/tools/chocolateyInstall/redirects");
288-
CopyFiles(GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/redirects/**/*"), nuspecDirectory + "/tools/chocolateyInstall/redirects", true);
289-
EnsureDirectoryExists(nuspecDirectory + "/tools/chocolateyInstall/tools");
290-
CopyFiles(GetFiles(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip/tools/**/*"), nuspecDirectory + "/tools/chocolateyInstall/tools", true);
291-
292-
// Copy merged choco.exe
293-
CopyFile(BuildParameters.Paths.Directories.PublishedApplications + "/choco-no7zip_merged/choco.exe", nuspecDirectory + "/tools/chocolateyInstall/choco.exe");
294-
295-
// Copy Chocolatey.PowerShell.dll and help.xml file
296-
CopyFile(BuildParameters.Paths.Directories.PublishedLibraries + "/Chocolatey.PowerShell/Chocolatey.PowerShell.dll", nuspecDirectory + "/tools/chocolateyInstall/helpers/Chocolatey.PowerShell.dll");
297-
CopyFile(BuildParameters.Paths.Directories.PublishedLibraries + "/Chocolatey.PowerShell/Chocolatey.PowerShell.dll-help.xml", nuspecDirectory + "/tools/chocolateyInstall/helpers/Chocolatey.PowerShell.dll-help.xml");
298-
299-
// Tidy up logs and config folder which are not required
300-
var logsDirectory = nuspecDirectory + "/tools/chocolateyInstall/logs";
301-
var configDirectory = nuspecDirectory + "/tools/chocolateyInstall/config";
302-
303-
if (DirectoryExists(logsDirectory))
304-
{
305-
DeleteDirectory(logsDirectory, new DeleteDirectorySettings {
306-
Recursive = true,
307-
Force = true
308-
});
309-
}
310-
311-
if (DirectoryExists(configDirectory))
312-
{
313-
DeleteDirectory(configDirectory, new DeleteDirectorySettings {
314-
Recursive = true,
315-
Force = true
316-
});
317-
}
318-
});
319-
320-
Task("Create-ChocolateyNo7zip-Package")
321-
.WithCriteria(() => BuildParameters.Configuration == "ReleaseOfficial", "Skipping No7zip because this isn't an official release")
322-
.WithCriteria(() => BuildParameters.ShouldRunChocolatey, "Skipping because execution of Chocolatey has been disabled")
323-
.WithCriteria(() => BuildParameters.BuildAgentOperatingSystem == PlatformFamily.Windows, "Skipping because not running on Windows")
324-
.IsDependentOn("Prepare-ChocolateyNo7zip-Package")
325-
.IsDependeeOf("Package")
326-
.Does(() =>
327-
{
328-
var nuspecDirectory = BuildParameters.Paths.Directories.ChocolateyNuspecDirectory + "-no7zip/";
329-
var nuspecFile = nuspecDirectory + "chocolatey.nuspec";
330-
331-
ChocolateyPack(nuspecFile, new ChocolateyPackSettings {
332-
AllowUnofficial = true,
333-
Version = BuildParameters.Version.PackageVersion,
334-
OutputDirectory = nuspecDirectory,
335-
WorkingDirectory = BuildParameters.Paths.Directories.PublishedApplications
336-
});
337-
338-
MoveFile(
339-
nuspecDirectory + "chocolatey." + BuildParameters.Version.PackageVersion + ".nupkg",
340-
BuildParameters.Paths.Directories.ChocolateyPackages + "/chocolatey-no7zip." + BuildParameters.Version.PackageVersion + ".nupkg"
341-
);
342-
343-
// Due to the fact that we have chosen to ignore the no7zip package via the chocolateyNupkgGlobbingPattern, it will
344-
// no longer be automatically uploaded via Chocolatey.Cake.Recipe, so we need to handle that work here.
345-
BuildParameters.BuildProvider.UploadArtifact(BuildParameters.Paths.Directories.ChocolateyPackages + "/chocolatey-no7zip." + BuildParameters.Version.PackageVersion + ".nupkg");
346-
});
347-
348179
Task("Prepare-NuGet-Packages")
349180
.WithCriteria(() => BuildParameters.ShouldRunNuGet, "Skipping because execution of NuGet has been disabled")
350181
.IsDependeeOf("Create-NuGet-Packages")
@@ -441,7 +272,7 @@ BuildParameters.SetParameters(context: Context,
441272
shouldRunNuGet: IsRunningOnWindows(),
442273
shouldAuthenticodeSignPowerShellScripts: IsRunningOnWindows(),
443274
shouldPublishAwsLambdas: false,
444-
chocolateyNupkgGlobbingPattern: "/**/chocolatey[!-no7zip]*.nupkg");
275+
chocolateyNupkgGlobbingPattern: "/**/chocolatey*.nupkg");
445276

446277
ToolSettings.SetToolSettings(context: Context);
447278

0 commit comments

Comments
 (0)