Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages.config should include all options (including ignorechecksums) #886

Closed
cori opened this issue Aug 1, 2016 · 13 comments · Fixed by #2187, #2504 or #2830
Closed

Packages.config should include all options (including ignorechecksums) #886

cori opened this issue Aug 1, 2016 · 13 comments · Fixed by #2187, #2504 or #2830
Assignees
Labels
5 - Released Customer Documentation Improvement IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen
Milestone

Comments

@cori
Copy link
Contributor

cori commented Aug 1, 2016

What You Are Seeing?

cinst on command-line using a .config file disregards ignorechecksum for specific packages.

What is Expected?

an entry in a .config file that includes `ignorechecksums="true" or another of the aliases from https://github.com/chocolatey/choco/wiki/CommandsInstall#options-and-switches should honor the ignorechecksums directive and allow, for that specific package,an installer that fails the checksums verification to be installed.

How Did You Get This To Happen? (Steps to Reproduce)

ran cinst rt.config -y using the attached rt.config.txt file.
rt.config.txt

Output Log

chocolatey.log: https://gist.github.com/cori/01ff60e1638b75f38a25cbe41e7a0a16
choco.summary.log: https://gist.github.com/cori/b51791c5e22e19180d1e31e0eee717f1

@cori
Copy link
Contributor Author

cori commented Aug 1, 2016

On a side note, running cinst rt.config -y --ignore-checksums with a .config file with checksum-failing packages does enable them to be installed, but in a scripted install environment that's unsatisfactory - I need to be able to control when to ignore checksums on a package-by-package basis so that I'm only ignoring them in cases that I've investigated, not for all the packages I'm installing arbitrarily,which would be pretty insecure.

@cori
Copy link
Contributor Author

cori commented Aug 1, 2016

I guess I wouldn't have thought of this as an enhancement, but maybe the problem is that https://github.com/chocolatey/choco/wiki/CommandsInstall#packagesconfig doesn't call out which options work in a .config file and which ones don't - without some clarity there it seems like a sensible assumption that all of the options listed in the following section should be expected to work as advertised.

Obviously, though, you need to manage your workload as you see fit. Thanks for the swift attention.

@ferventcoder
Copy link
Member

@cori As I mentioned over in the disqus notes, I think this should include all options that can be passed.

@ferventcoder
Copy link
Member

I guess I wouldn't have thought of this as an enhancement

@cori I could go either way. Unexpected behavior could make it a bug, but as we did not add that functionality yet I think of it as an enhancement. Forgotten functionality could make it a bug. Like I said, I could go either way. 👍

@cori
Copy link
Contributor Author

cori commented Aug 1, 2016

don't see a note on the disqus thread, but probably more important to get it here!

@ferventcoder
Copy link
Member

yes, more important to get it here. Perhaps it wasn't on disqus. Where did we talk about this already?

@cori
Copy link
Contributor Author

cori commented Aug 1, 2016

Found it - you replied to a stackoverflow comment: http://stackoverflow.com/questions/34106680/how-to-use-custom-parameters-in-chocolatey-config-file/34111537?noredirect=1#comment64776855_34111537

@ferventcoder ferventcoder changed the title cinst with a .config file disregards ignorechecksums for specific packages Packages.config should include all options (including ignorechecksums) Aug 2, 2016
@ferventcoder
Copy link
Member

Would be nice to include options that come in from business editions as well here.

@ferventcoder ferventcoder modified the milestones: 0.10.5, 0.10.x Jan 10, 2017
@ferventcoder ferventcoder modified the milestones: 0.10.5, 0.10.6, 0.10.7 Mar 30, 2017
@ferventcoder ferventcoder modified the milestones: 0.10.7, 0.10.8 Jun 6, 2017
@TheCakeIsNaOH
Copy link
Member

@gep13 added an issue here: chocolatey/chocolatey-licensed-issues#317

gep13 added a commit to TheCakeIsNaOH/choco that referenced this issue Aug 11, 2022
A mistake was made in previous commit, where property name was changed
to use a more consistent version, however, the wrong property name was
changed, and this wasn't tested before pushing up the commit.
@gep13 gep13 added 4 - Done and removed 3 - Review labels Aug 13, 2022
@choco-bot choco-bot added Documentation ADD AUTO TESTS Things that typically go to Test-Kitchen - once completed, IN REGRESSION TEST SUITE label added labels Aug 24, 2022
corbob added a commit to corbob/choco that referenced this issue Sep 24, 2022
When using a packages.config file, output the evaluated package
configuration to the debug stream so that it is available for
troubleshooting (and our Pester tests).

Also update the checksum type logic to store in the right property.
corbob added a commit to corbob/choco that referenced this issue Sep 24, 2022
Add Pester tests to test the options passed via a packages.config file.
corbob added a commit to corbob/choco that referenced this issue Sep 26, 2022
Update the packages.config to be easier to read in the Pester tests.
Update the configurations to use specific strings instead of all of them
being the same "string". This will allow us to identify that they are
actually what they're supposed to be.
corbob added a commit to corbob/choco that referenced this issue Sep 26, 2022
When using a packages.config file, output the evaluated package
configuration to the debug stream so that it is available for
troubleshooting (and our Pester tests).

Also update the checksum type logic to store in the right property.
corbob added a commit to corbob/choco that referenced this issue Sep 26, 2022
Add Pester tests to test the options passed via a packages.config file.
corbob added a commit to corbob/choco that referenced this issue Sep 26, 2022
Update the packages.config to be easier to read in the Pester tests.
Update the configurations to use specific strings instead of all of them
being the same "string". This will allow us to identify that they are
actually what they're supposed to be.
@corbob corbob added IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen and removed ADD AUTO TESTS Things that typically go to Test-Kitchen - once completed, IN REGRESSION TEST SUITE label added labels Sep 27, 2022
corbob added a commit to corbob/choco that referenced this issue Sep 29, 2022
Update the debug logging when a packages.config file is being used to
output the start and end of the configuration on independent lines. This
allows us to update the test to get these start and end points and not
play guessing games with how long we think the output should be.
Updating this test allows Chocolatey Licensed Extension to be included
and the tests still pass.
corbob added a commit to corbob/choco that referenced this issue Sep 29, 2022
Update the debug logging when a packages.config file is being used to
output the start and end of the configuration on independent lines. This
allows us to update the test to get these start and end points and not
play guessing games with how long we think the output should be.
Updating this test allows Chocolatey Licensed Extension to be included
and the tests still pass.
gep13 pushed a commit to corbob/choco that referenced this issue Oct 6, 2022
Update the debug logging when a packages.config file is being used to
output the start and end of the configuration on independent lines. This
allows us to update the test to get these start and end points and not
play guessing games with how long we think the output should be.
Updating this test allows Chocolatey Licensed Extension to be included
and the tests still pass.
gep13 pushed a commit to corbob/choco that referenced this issue Oct 6, 2022
Update the debug logging when a packages.config file is being used to
output the start and end of the configuration on independent lines. This
allows us to update the test to get these start and end points and not
play guessing games with how long we think the output should be.
Updating this test allows Chocolatey Licensed Extension to be included
and the tests still pass.
gep13 added a commit that referenced this issue Oct 6, 2022
(#886, 2693) Update packages.config install logging and add back resolve or load method for Assembly Resolution
@TheCakeIsNaOH
Copy link
Member

@AdmiringWorm this still needs documentation. See chocolatey/docs#403

AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 19, 2022
* release/1.2.0: (374 commits)
  (maint) Add incoming arguments available in Licensed Extension
  (chocolatey#798) Add missing pin option in tab completion
  (chocolatey#2860) Add e2e tests for new PS cmdlet
  (maint) Fix Chocolatey path in docs generation
  (chocolatey#2860) Add new PS helper to get maintainer specific paths
  (chocolatey#2816) Update to latest Chocolatey NuGet.Core
  (chocolatey#2693) Re-add old resolve or load method
  (chocolatey#886) Update packages.config install logging
  (chocolatey#1185) Always pass in hook scripts event if empty
  Update tests/chocolatey-tests/commands/choco-outdated.Tests.ps1
  (chocolatey#2801) Pin Chocolatey packages for outdated tests
  (chocolatey#886) Use specific strings for configurations
  (chocolatey#886) Add Pester tests for packages.config
  (chocolatey#886) Debug log Package configuration
  (chocolatey#1185) Be explicit with expected exit codes
  (maint) Pester test directory structure shuffle
  (chocolatey#1185) Add tests for hook scripts
  (maint) Minor formatting change
  (chocolatey#798) Add tests for pinning package on install
  (chocolatey#2787) Restore Chocolatey snapshot before sxs
  ...
@AdmiringWorm
Copy link
Member

🎉 This issue has been resolved in version 1.2.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

AdmiringWorm added a commit that referenced this issue Oct 20, 2022
* master:
  (maint) Add incoming arguments available in Licensed Extension
  (#798) Add missing pin option in tab completion
  (#2860) Add e2e tests for new PS cmdlet
  (maint) Fix Chocolatey path in docs generation
  (#2860) Add new PS helper to get maintainer specific paths
  (#2816) Update to latest Chocolatey NuGet.Core
  (#2693) Re-add old resolve or load method
  (#886) Update packages.config install logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment