Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable: (35 commits)
  (GH-1478) Upgrade 7z to 18.1
  (GH-1490) Remove quotes/apostrophes surrounding parameter
  (maint) virtualize get_package_information
  (maint) virtualize all calls in NuGetService
  (GH-100) Log without colorization
  (GH-100) add no color feature/option
  (GH-100) add no color log4net config files
  (maint) formatting
  (#1489) Log PowerShell contents w/out formatting
  (maint) Some options could be achieved w/FOSS
  (maint) Add instructions for strong naming NuGet
  (maint) update licensing code
  (GH-1488) License validation logging
  (specs) add pack scenario nuspec
  (maint) Whitespace changes
  (GH-1500) Disable re-validation of Chocolatey License File
  (doc) update etiquette statement
  (build) allow builds with any .NET 4.x
  (doc) update licensed changelog
  (maint) update licensing
  ...

# Conflicts:
#	README.md
  • Loading branch information
ferventcoder committed Feb 20, 2018
2 parents cfc009e + 6880ec8 commit cdf0938
Show file tree
Hide file tree
Showing 37 changed files with 782 additions and 176 deletions.
112 changes: 112 additions & 0 deletions CHANGELOG_LICENSED.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,118 @@ This covers changes for the "chocolatey.extension" package, where the licensed e

**NOTE**: If you have a licensed edition of Chocolatey, refer to this in tandem with [Chocolatey Open source CHANGELOG](https://github.com/chocolatey/choco/blob/master/CHANGELOG.md).

## 1.12.10 (December 18, 2017)

### FEATURES

* Run background service interactively - sometimes you install applications that are unattended but cannot be silent.

If you want self-service to interactively manage installations, run `choco feature enable --name=useBackgroundServiceInteractively`. This requires that you use the `ChocolateyLocalAdmin` account with the Chocolatey-managed password as passwords are not stored and the service would need to produce that at runtime. There are some security considerations and why this is not turned on by default. Please see [interactive self-service consideration](https://chocolatey.org/docs/features-agent-service#interactive-self-service-consideration).

### BUG FIXES

* Windows Service Management Functions:
* Fix - Adding user to Administrators no longer fails with "Network path was not found" when there are domain users and local users in the administrators group.
* Package Builder (Choco New):
* Fix - Create packages from non-admin (instead of access denied error).
* Fix - Don't attempt to generate an icon unless a file for that icon exists.

### IMPROVEMENTS

* Package Builder (Choco New):
* Right click create package w/out GUI should pause on error. This allows a user to see any errors instead of closing quickly.
* Do not generate template files if not using the default template.


## 1.12.9 (November 10, 2017)

### BUG FIXES

* Fix: Changes in 1.12.7 restrict some install/upgrade licensed functionality from loading.
* Windows Service Management Functions:
* Fix - Domain Users should be found by domain context.
* Fix - Throw Error if unable to ensure user or administrators membership.
* Fix - Domain Users should not attempt to generate password.
* Package Synchronizer (Choco Sync):
* Fix - syncing new items use "sync" as user name when capturing information for Package Audit.
* Package Builder (Choco New):
* Fix - additional directories from programs and features not cleared each time.

### IMPROVEMENTS

* Package Builder (Choco New):
* Show Install Arguments in Nuspec with MSI Properties.
* Extract icon from Programs and Features.
* Extract icon from exe files.


## 1.12.8 (October 25, 2017)

### BUG FIXES

* Fix - "The registered delegate for type IEnumerable threw an exception. Unable to find suitable location for change.exe."


## 1.12.7 (October 25, 2017)

### BUG FIXES

* Fix - "ERROR: The term 'Invoke-ChocolateyProcessCmdlet' is not recognized as the name of a cmdlet, function, script file, or operable program" on upgrade all.


## 1.12.6 (October 24, 2017)

### BUG FIXES

* Fix - `change.exe` could not be found when running Chocolatey GUI over RDP (Terminal Services).
* Self-Service / Background Mode:
* Fix - Set USER_CONTEXT environment variable to contain the user context information.

### IMPROVEMENTS

* `Install-ChocolateyInstallPackage` - pass in answer file (`-AnswerFile`) to provide to stdin.


## 1.12.5 (September 28, 2017)

### BUG FIXES

* Windows Service Management Functions:
* Fix - Do not save created user prior to setting complex password.


## 1.12.4 (September 27, 2017)

### BUG FIXES

* Self-Service / Background Mode:
* Fix - Ensure that it configures and works appropriately with Chocolatey API (and the Chocolatey GUI).

### IMPROVEMENTS

* Self-Service / Background Mode:
* Allow commands to be configurable. Covered in more detail at https://chocolatey.org/docs/features-agent-service#setup.


## 1.12.3 (September 8, 2017)

### BUG FIXES

* [Security] Fix - Hide admin only repositories from non-administrators with all Chocolatey commands.
* Windows Service Management Functions:
* Fix - Empty username causes errors. Will now set to what the configuration of Chocolatey is determining.
* Package Internalizer (Choco Download):
* Fix - Pass multiple package names to download/internalize (`choco download pkg1 pkg2 pkgN`).
* Self-Service / Background Mode:
* Fix - Don't display background services messages when background mode is not configured.
* Package Reducer:
* Fix - Package reducer fails the install when there is no package information.

### IMPROVEMENTS

* choco sync is now out of preview.


## 1.12.2 (August 31, 2017)

### FEATURES
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ Chocolatey FOSS install showing tab completion and `refreshenv` (a way to update
![install w/pro](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/chocopro_install_stopped.gif "Chocolatey Pro availability now! A great option for individuals looking for that community PLUS option.")

## Etiquette Regarding Communication
When requesting support, try to remember that we are all volunteers that have lives outside of open source and none of us are paid to ensure things work for you, so please be considerate of others' time when you are asking for things. Many of us have families that also need time as well and only have so much time to give on a daily basis. In the future, we hope that some of us are paid to do this full time and can provide better support when folks are running into issues, but until then a little consideration and patience can go a long way. After all, you are using a pretty good tool without cost. It may not be perfect (yet), and we know that.
If you are an open source user requesting support, please remember that most folks in the Chocolatey community are volunteers that have lives outside of open source and are not paid to ensure things work for you, so please be considerate of others' time when you are asking for things. Many of us have families that also need time as well and only have so much time to give on a daily basis. A little consideration and patience can go a long way. After all, you are using a pretty good tool without cost. It may not be perfect (yet), and we know that.

If you are using a [commercial edition of Chocolatey](https://chocolatey.org/compare#compare), you have different terms! Please see [support](https://chocolatey.org/support).

## Information
* [Chocolatey Website and Community Package Repository](https://chocolatey.org)
Expand Down
6 changes: 6 additions & 0 deletions docs/generated/CommandsOutdated.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch
Ignore Pinned - Ignore pinned packages. Defaults to false. Available in
0.10.6+.
--ignore-unfound
Ignore Unfound Packages - Ignore packages that are not found on the
sources used (or the defaults). Overrides the default feature
'ignoreUnfoundPackagesOnUpgradeOutdated' set to 'False'. Available in -
0.10.9+.
~~~

[[Command Reference|CommandsReference]]
Expand Down
10 changes: 8 additions & 2 deletions docs/generated/CommandsUpgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,14 @@ Includes [[default options/switches|CommandsReference#default-options-and-switch
Skip Powershell - Do not run chocolateyInstall.ps1. Defaults to false.
--failonunfound, --fail-on-unfound
Fail On Unfound Packages - If a package is not found in feeds specified,
fail instead of warn.
Fail On Unfound Packages - If a package is not found in sources
specified, fail instead of warn.
--ignore-unfound
Ignore Unfound Packages - Ignore packages that are not found on the
sources used (or the defaults). Overrides the default feature
'ignoreUnfoundPackagesOnUpgradeOutdated' set to 'False'. Available in -
0.10.9+.
--failonnotinstalled, --fail-on-not-installed
Fail On Non-installed Packages - If a package is not already installed,
Expand Down
6 changes: 1 addition & 5 deletions lib/NAnt/NAnt.exe.config
Original file line number Diff line number Diff line change
Expand Up @@ -3260,12 +3260,8 @@
<NetFx40_LegacySecurityPolicy enabled="true"/>
</runtime>
<startup>
<!-- .NET Framework 4.5.2 -->
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
<!-- .NET Framework 4.5 -->
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<!-- .NET Framework 4.0 -->
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v4.0" />
<!-- .NET Framework 2.0 -->
<supportedRuntime version="v2.0.50727" />
</startup>
Expand Down
5 changes: 4 additions & 1 deletion lib/NuGet-Chocolatey/strongname.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ pause
mkdir %DIR%\output

%DIR%..\ILMerge\ILMerge.exe NuGet.Core.dll /keyfile:%DIR%..\..\chocolatey.snk /out:%DIR%\output\NuGet.Core.dll /targetplatform:v4,"%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /log:%DIR%ILMerge.DELETE.log /allowDup
REM %DIR%..\ILMerge\ILMerge.exe NuGet.Core.dll /keyfile:%DIR%..\..\chocolatey.snk /out:%DIR%NuGet.Core.dll /targetplatform:v4,"%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /log:%DIR%ILMerge.DELETE.log /ndebug /allowDup
REM %DIR%..\ILMerge\ILMerge.exe NuGet.Core.dll /keyfile:%DIR%..\..\chocolatey.snk /out:%DIR%NuGet.Core.dll /targetplatform:v4,"%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /log:%DIR%ILMerge.DELETE.log /ndebug /allowDup

echo Copy the files from the output directory up to this directory and delete everything but this file, NuGet.Core.dll and NuGet.Core.pdb.
pause
Binary file modified lib/Rhino.Licensing/Rhino.Licensing.dll
Binary file not shown.
8 changes: 7 additions & 1 deletion src/chocolatey.console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ private static void Main(string[] args)
license,
warning => { warnings.Add(warning); }
);


if (config.Features.LogWithoutColor)
{
ApplicationParameters.Log4NetConfigurationResource = @"chocolatey.infrastructure.logging.log4net.nocolor.config.xml";
Log4NetAppenderConfiguration.configure(loggingLocation, excludeLoggerNames: ChocolateyLoggers.Trace.to_string());
}

if (!string.IsNullOrWhiteSpace(config.AdditionalLogFileLocation))
{
Log4NetAppenderConfiguration.configure_additional_log_file(config.AdditionalLogFileLocation);
Expand Down
4 changes: 2 additions & 2 deletions src/chocolatey.resources/helpers/chocolateyInstaller.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ Export-ModuleMember -Function * -Alias * -Cmdlet *
$extensionsPath = Join-Path "$helpersPath" '..\extensions'
if (Test-Path($extensionsPath)) {
Write-Debug 'Loading community extensions'
#Resolve-Path $extensionsPath\**\*\*.psm1 | % { Write-Debug "Importing `'$_`'"; Import-Module $_.ProviderPath }
Get-ChildItem $extensionsPath -recurse -filter "*.psm1" | Select -ExpandProperty FullName | % { Write-Debug "Importing `'$_`'"; Import-Module $_; }
Get-ChildItem $extensionsPath -recurse -filter "*.dll" | Select -ExpandProperty FullName | % {
$path = $_;
if ($path.Contains("extensions\chocolatey\lib-synced")) { continue }
Expand All @@ -72,6 +70,8 @@ if (Test-Path($extensionsPath)) {
}
}
}
#Resolve-Path $extensionsPath\**\*\*.psm1 | % { Write-Debug "Importing `'$_`'"; Import-Module $_.ProviderPath }
Get-ChildItem $extensionsPath -recurse -filter "*.psm1" | Select -ExpandProperty FullName | % { Write-Debug "Importing `'$_`'"; Import-Module $_; }
}

# todo: explore removing this for a future version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ compatibility with `chocolatey-core.extension`, use `:`.
For example `-Parameters "/ITEM1:value /ITEM2:value with spaces"
NOTE: In 0.10.9+, to maintain compatibility with the prior art of the
chocolatey-core.extension method, quotes and apostrophes surrounding
parameter values will be removed. When the param is used, those items
can be added back if desired, but it's most important to ensure that
existing packages are compatible on upgrade.
.PARAMETER IgnoredArguments
Allows splatting with arguments that do not apply and future expansion.
Do not use directly.
Expand Down Expand Up @@ -125,44 +131,40 @@ param(
Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters

$useDefaultParameters = $false
$loggingAllowed = $true
$paramStrings = @($parameters)

if (!$parameters -or $parameters -eq '') {
$useDefaultParameters = $true
# if we are using default parameters, we are going to loop over two items
Write-Debug 'Parsing $env:ChocolateyPackageParameters and $env:ChocolateyPackageParametersSensitive for parameters'
$paramStrings = @("$env:ChocolateyPackageParameters","$env:ChocolateyPackageParametersSensitive")
if ($env:ChocolateyPackageParametersSensitive) {
Write-Debug "Sensitive parameters detected, no logging of parameters."
$loggingAllowed = $false
}
}

$paramHash = @{}

foreach ($paramString in $paramStrings) {
if (!$paramString -or $paramString -eq '') { continue }

# split on "/"
$paramArray = $paramString.Split('/', [System.StringSplitOptions]::RemoveEmptyEntries)
if ($paramArray -eq $null -or $paramArray -eq @()) { continue }

foreach ($paramItem in $paramArray.GetEnumerator()) {
if (!$paramItem -or $paramItem -eq '') { continue }
Select-String '(?:^|\s+)\/(?<ItemKey>[^\:\=\s)]+)(?:(?:\:|=){1}(?:\''|\"){0,1}(?<ItemValue>.*?)(?:\''|\"){0,1}(?:(?=\s+\/)|$))?' -Input $paramString -AllMatches | % { $_.Matches } | % {
if (!$_) { continue } #Posh v2 issue?
$paramItemName = ($_.Groups["ItemKey"].Value).Trim()
$paramItemValue = ($_.Groups["ItemValue"].Value).Trim()
if (!$paramItemValue -or $paramItemValue -eq '') { $paramItemValue = $true }

# split on : and =, but only allow a total split of two
$paramItemPair = $paramItem.Split(':', 2, [System.StringSplitOptions]::RemoveEmptyEntries)
if ($paramItemPair -eq $null -or $paramItemPair -eq @()) { continue }
if ($paramItemPair.Length -eq 1 -and $paramItemPair[0].Contains('=')) {
$paramItemPair = $paramItem.Split('=', 2, [System.StringSplitOptions]::RemoveEmptyEntries)
}

$paramItemName = $paramItemPair[0].Trim()
$paramItemValue = $true
if ($paramItemPair.Length -ne 1) {
$paramItemValue = $paramItemPair[1].Trim()
}

Write-Debug "Adding package param '$paramItemName'='$paramItemValue'"
if ($loggingAllowed) { Write-Debug "Adding package param '$paramItemName'='$paramItemValue'" }
$paramHash[$paramItemName] = $paramItemValue
}
}

$paramHash
}

# override Get-PackageParameters in chocolatey-core.extension package
Copy-Item Function:Get-PackageParameters Function:Get-PackageParametersBuiltIn -Force
#Rename-Item Function:Get-PackageParameters Get-PackageParametersBuiltIn
Set-Alias -Name Get-PackageParameters -Value Get-PackageParametersBuiltIn -Scope Global
Binary file modified src/chocolatey.resources/tools/7z.dll
Binary file not shown.
Binary file modified src/chocolatey.resources/tools/7z.exe
Binary file not shown.
18 changes: 18 additions & 0 deletions src/chocolatey.tests.integration/scenarios/PackScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,24 @@ public void property_settings_should_be_logged_as_debug_messages()
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes></releaseNotes>
</metadata>
</package>";

private const string NuspecContentWithChocolateyData = @"<?xml version=""1.0"" encoding=""utf-8""?>
<package xmlns=""http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"">
<metadata>
<id>test-package</id>
<title>Test Package</title>
<version>0.1.0</version>
<authors>package author</authors>
<owners>package owner</owners>
<summary>A brief summary</summary>
<description>A big description</description>
<tags>test admin</tags>
<copyright></copyright>
<licenseUrl>http://apache.org/2</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes></releaseNotes>
</metadata>
</package>";

private const string NuspecContentWithVariables = @"<?xml version=""1.0"" encoding=""utf-8""?>
Expand Down
77 changes: 0 additions & 77 deletions src/chocolatey.tests/GetChocolateySpecs.cs

This file was deleted.

Loading

0 comments on commit cdf0938

Please sign in to comment.