Chocolatey validation tests fail.
https://chocolatey.org/packages/icinga2/2.11.0
https://gist.github.com/choco-bot/8cf8f77c12d25c7d9b45aef651fc0b5f
Generic MSI installation error, missing dependencies.
Also, the version for the installation location is wrong in CMake.
In terms of the missing dependencies: This is maybe related to a missing .NET 4.6 Framework. Since 2.11 the MSI installer checks if .NET 4.6 or higher is available. Windows Server 2012 R2 (which is used for the validation as far as I can tell) has .NET 4.5.1 on board by default. I don't know Chocolatey well enough but I saw the _Dependencies_ entry, currently this is empty, maybe it is sufficent to add .NET 4.6 here.


@mcktr I have been testing this offline for some days now, I just fail to manually test this with choco install icinga2 -s . with a local nupkg received from the CI builds. Pretty frustrating, so I've manually uploaded the fixed version to https://chocolatey.org/packages/icinga2/2.11.0.21
Still no change, I only read about their testing environment just now. I don't have time to look into this any further atm.
https://github.com/chocolatey-community/chocolatey-test-environment
Unfortunately this is caused by a missing .NET 4.6 (or higher). I was able to reproduce the validation error using the Chocolatey-test-environment.
The actual error only unveils when additional install arguments are passed to the choco.exe to fetch the MSI installer logs.
choco.exe install -fdvy icinga2 --version 2.11.0 --allow-downgrade --install-arguments="'/l*v c:\\icinga2_msi_install.log'"
The version 2.11.0.21 added a dependency on .NET 4.7 which should make the validation test to run successfully. Digging a bit deeper I found out that the .NET package itself is exempt from validation tests since their dependency requires a reboot. During the validation tests no reboots are made.
I manually installed .NET 4.7 inside my local test environment VM and re-run the validation for the Icinga 2 package, the validation was now successful.
Honestly I don't see the problem on our side. We can not do anything if the requirements we set are not fulfilled inside the validation environment. As stated in on the site we may need to contact the moderators to bypass the tests.
If the verifier is incompatible with the package, please log in and leave a review comment if the package needs to bypass testing (e.g. package installs specific drivers)
Do you have a chocolatey account? Then I'll add you to the maintainer list and you can cope with this, if you want.
Short update: I am still on it. The dependency issue is resolved, now we were asked to add checksums for the files that are downloaded when installing via chocolatey.
Adding the checksums via CMake is not as easy as I thought. The culprit is that the checksums for MSI packages can only be calculated after they bundled with CPack. Currently the Chocolatey package is created before the MSI is bundled, this is no longer possible as checksums are now required.
In the Windows build step we rely on the default added CPack target PACKAGE which is called last. We need a solution where the CPack step (= bundle the MSI) happens before the Chocolatey package creation. I already tested some ideas locally but I was not fully satisfied with them yet. After some research the best solution seems to be creating a custom target which first calls the CPack bundle step and then the creation of the Chocolatey package. The custom target would replace the PACKAGE target.
But whatever solution we find here this applies first on the next release. The package for 2.11 must be built by hand unfortunately. I will do this tomorrow.
Okidoki, thanks for your hard work 馃憤 I'll take a note for the CI system.
Fixing this turns out be challenging...
My plan to include this in the CMake build script wont work at all, this must happen in the CI system. When we run CMake we build either for the x86 architecture or the x64 architecture. For the Chocolatey package we need both MSI packages to calculate the checksums for both, as we must provide one for each architecture.
We need a step in the CI system between building both architectures and uploading the packages.

The branch bugfix/chocolatey holds the changes for the dependency as well as an updated ChoocInstall script where we can provide the checksums.
An updated Chocolatey package for 2.11 is uploaded and currently waiting for approval from an reviewer. I will update here when the status gets changed.
Can you share the shell commands required for these steps? Then I'll try to look into this asap.
I wrote a simple build script to create the Chocolatey package, it is included in the branch bugfix/chocolatey. I also made some minor changes to the choco/CMakeList.txt file to avoid creating the package during building with CMake.
Ok, thanks, I'll try to look into it this week.
I will leave 2.11.1 out of this, we then again need a manual upload for it. I don't have time atm to look deeper into the build system.
No worries, I can build and upload the 2.11.1 package manually. Since I now know how, this should not take long. :-)
Perfect, thanks a lot for doing this! 鉂わ笍
Both versions (2.11.0 & 2.11.1) are now available.
Our package is now exempt from the verification tests, which also applies to newly uploaded versions.
Ah cool, thanks :-)
Re-assigning CI tasks, postponing after RC.
The validation vor v2.11.3 failed.
I've prepared corrective actions locally and build a new Chocolatey package with the changes from the bugfix/chocolatey branch. Unfortunately I can't upload the package due to an server error:

I'll retry it tomorrow.
@mcktr here we go again... we really need to merge your changes and change some of our CI workflows.
Thank you! :)
The server error still exists but I was able to push the package by using the CLI choco push way.
v2.11.3 is now published:
@mcktr could you please open a PR for your bugfix/chocolatey branch, if you think it's ready? We could then go on and add Chocolatey to our CI pipelines.
Should be fixes with #7944 and #8049. We'll see if everything goes to plan when we release 2.11.4 and 2.12.