chocolatey-archive / chocolatey

[DEPRECATED - https://github.com/chocolatey/choco] Chocolatey NuGet - Like apt-get, but for windows.
https://chocolatey.org
Apache License 2.0
2.81k stars 344 forks source link

chocolatey whatprovides [filename] #168

Open rismoney opened 11 years ago

rismoney commented 11 years ago

anyone interested in seeing this feature?

I could probably do this for packages that were deployed via msi and zips. If .exe package devs includes a filelist.txt that can be used as well... if ran against file it cannot validate, it lets user know, and offers a suggestion based on file "details" in windows...

ferventcoder commented 11 years ago

I'm not sure I like the name of it yet. It really doesn't tell me what it is doing.

rismoney commented 11 years ago

brown fudge, by any other name, would it be sweet? lol

its what yum calls it... I think apt-get uses apt-file search... hows about chocolatey filesearch ? lookup, filelookup, seek, frisk, pry, dig, or taste, reach.

I thought whatprovides was explicit...It tells you what package provides the file. not as problematic as the cunst.

mwrock commented 11 years ago

so just to be clear, If I installed console2 and I enter Chocolatey whatprovides console.exe and assuming the package owner prvided this file name, the command would return the the console2 package name?

Sorry if this is obvious (I'll admit I'm not a package management expert), but whats the use case?

rismoney commented 11 years ago

hmmm. its not so useful yet I guess to determine console.exe is installed by console2. What about a .dll it dropped in system32.

the goal is to be able to track down the "source" of any file on the system and make every file traceable back to a package. at work we are going to mandate that every single piece of software we deploy is sourced from our chocolatey feed.

Right now it is just filename matching. Imagine this future script /tool in my hopper: Create list of all files on a system and subtract out all known OS files AND package files (the latter always been difficult). Then track the rest of the files deltas day over day and allow exception list.

A true rogue file report. Plan to do this on servers at 2am nightly

ferventcoder commented 11 years ago

How does it work with bindir?

ferventcoder commented 11 years ago

So I install a tool package - that tool uses bin dir so it installs to something like c:/tools/packagename where it auto adds a that directory to the path. How do I trace that back to the package itself as it wouldn't be as easy to find?

rismoney commented 11 years ago

The package creator needs to provide filelist.txt if using non msi or zip currently...

Crude yes, also worthy to note that whatprovides does not mean does provide...

The latter would require procmon style inspection or other scanning.

I just thought it might be useful to the community.


From: Rob Reynolds Sent: Mon, 24/09/2012 05:10 PM To: chocolatey/chocolatey chocolatey@noreply.github.com CC: Siegel, Richard RSiegel@ise.com Subject: Re: [chocolatey] chocolatey whatprovides filename

So I install a tool package - that tool uses bin dir so it installs to something like c:/tools/packagename where it auto adds a that directory to the path. How do I trace that back to the package itself as it wouldn't be as easy to find?

— Reply to this email directly or view it on GitHubhttps://github.com/chocolatey/chocolatey/issues/168#issuecomment-8834886.