choco icon indicating copy to clipboard operation
choco copied to clipboard

Packages.config should include all options (including ignorechecksums)

Open cori opened this issue 8 years ago • 9 comments

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 avatar Aug 01 '16 16:08 cori

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 avatar Aug 01 '16 16:08 cori

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.

cori avatar Aug 01 '16 16:08 cori

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

ferventcoder avatar Aug 01 '16 16:08 ferventcoder

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. 👍

ferventcoder avatar Aug 01 '16 16:08 ferventcoder

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

cori avatar Aug 01 '16 17:08 cori

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

ferventcoder avatar Aug 01 '16 18:08 ferventcoder

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

cori avatar Aug 01 '16 19:08 cori

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

ferventcoder avatar Jan 10 '17 20:01 ferventcoder

Is there a way to ignore the checksum in the config file?

I checked the documentation and the StackOverflow thread but didn't find an answer to this.

I did a few experiments using packageParameters:

  • packageParameters="IgnoreChecksum"
  • packageParameters="/IgnoreChecksum"
  • packageParameters="--ignorechecksum"

also tried with:

  • ignoreChecksum="true"

but none of them worked.

lackovic avatar Sep 29 '19 14:09 lackovic

@TheCakeIsNaOH would you be able to break this out into a new issue:

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

This doesn't belong as part of this issue, but we should likely do this at some point.

gep13 avatar Aug 11 '22 21:08 gep13

@gep13 added an issue here: https://github.com/chocolatey/chocolatey-licensed-issues/issues/317

TheCakeIsNaOH avatar Aug 11 '22 21:08 TheCakeIsNaOH

@AdmiringWorm this still needs documentation. See https://github.com/chocolatey/docs/issues/403

TheCakeIsNaOH avatar Oct 19 '22 13:10 TheCakeIsNaOH

:tada: This issue has been resolved in version 1.2.0 :tada:

The release is available on:

Your GitReleaseManager bot :package::rocket:

AdmiringWorm avatar Oct 20 '22 10:10 AdmiringWorm