autopkg / jleggat-recipes

Recipes for http://autopkg.github.io/autopkg/
13 stars 32 forks source link

Wireshark recipe error "Error processing path '/private... Wireshark*.pkg' with glob." Failed local trust verification. #81

Open fseesink opened 4 years ago

fseesink commented 4 years ago

Have used this recipe for awhile and it's worked fine to date. But with the latest release of Wireshark 3.0.6, any time I run AutoPkgr and try to run this recipe, I get the following:

Screen Shot 2019-10-24 at 5 21 47 PM

I updated my repos, removed the override, then rebuilt an override for this recipe (which did change in that I still had the one that didn't list the min. OS version), but I still get the error.

groob commented 4 years ago

Wireshark is not a .pkg anymore, it's now a drag and drop .app, so the recipe needs to be updated.

LcTrKiD commented 4 years ago

I've just submited a pull request fixing the issue here: https://github.com/autopkg/jleggat-recipes/pull/82

LcTrKiD commented 4 years ago

The PR was accepted, You can close the issue.

fseesink commented 4 years ago

Except it doesn't work. After deleting and rebuilding my override, I do see that it downloads the .dmg, so that at least is working.

But it won't install. Not sure where this is falling down now, but it's still not working properly as it used to. When trying to run Managed Software Center and having it check for updates, it doesn't see any updates for any of the systems I've had Wireshark installed on (and they all have Wireshark 3.0.5).

And when I look in MSC, it shows Wireshark as not being installed. It does indicate in MSC that it has Wireshark 3.0.6, so I click [Install] to install it. It seems to download and then do an install, but checking /Applications you see it hasn't done a thing. I tried doing a remove/uninstall via MSC, and same thing. It goes for a bit, but in the end Wireshark 3.0.5 is still sitting there.

LcTrKiD commented 4 years ago

My mistake... I submitted a new PR with a fix for this. I need to test my fixes better, I'm not a wireshark user and what munki was doing was processing the "Install ChmodBPF.pkg" and "Uninstall ChmodBPF.pkg" (same with "Add Wireshark to system path" and "Remove Wireshark from the system path") so no errors and nothing broken. Only that users stayed in 3.0.5.

eshirk commented 4 years ago

Your PR fixes a lot of stuff, but the "Install ChmodBPF.pkg" and "Uninstall ChmodBPF.pkg" do remain uninstalled. Not an issue for admin users who can respond to the in-app prompts for installation, but an issue for standard users.

fseesink commented 4 years ago

Actually, I'm still unable to get it to work. I can see how the recipe, when run by AutoPkg, downloads Wireshark.dmg to its cache and copies/renames that to my Munki repo. And as I'm using AutokPkgr to fire off the recipe, and MunkiAdmin to manage my manifests/etc., it all appears there. But it's not installing/updating.

I tried manually removing Wireshark from the /Applications folder and then installing it with Manager Software Center (MSC). But nothing is installed.

I tried using MSC to uninstall, then reinstall Wireshark, but no luck. It doesn't install anything.

MSC appears to be downloading and installing it, but in the end, no Wireshark. This is unfortunate, as it's worked for some time now. But I get that the Wireshark .dmg changed in its structure/layout, and that's what has triggered this. I just don't think the current recipe is getting it done.

fseesink commented 4 years ago

Still seeing issues with the Wireshark recipe with the latest Wireshark 3.0.7. I gave up earlier and eventually installed 3.0.6 by hand. But when 3.0.7 came out, AutoPkgr did pick it up and download it. But when I tried updating, I ended up getting Wireshark in my /Applications folder but the app icon is missing. Worse, it doesn't run.

I get the following dialog box on launch:

image

If I click [Show Details...] I get the following:

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/rlmi.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/rlmi.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/watcherinfo.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/watcherinfo.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/mscml.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/mscml.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/reginfo.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/reginfo.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/presence.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/presence.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/itunes.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/itunes.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/smil.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/smil.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/pocsettings.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/pocsettings.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/dc.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/dc.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/xcap-caps.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/xcap-caps.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/xcap-error.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/xcap-error.dtd', error: Permission denied

Dtd Preparser in file /Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/rss.dtd: Could not open file: '/Applications/Wireshark.app/Contents/Resources/share/wireshark/dtds/rss.dtd', error: Permission denied

Lua: Error during loading:
cannot open /Applications/Wireshark.app/Contents/Resources/share/wireshark/console.lua: Permission denied
stack traceback:
    [C]: in function 'dofile'
    ...ireshark.app/Contents/Resources/share/wireshark/init.lua:697: in main chunk

Error loading table 'SMI Modules': Permission denied

Could not open your capture filter file
"/Applications/Wireshark.app/Contents/Resources/share/wireshark/cfilters": Permission denied.

Could not open your display filter file
"/Applications/Wireshark.app/Contents/Resources/share/wireshark/dfilters": Permission denied.

Could not open global filter file
"/Applications/Wireshark.app/Contents/Resources/share/wireshark/colorfilters": Permission denied.

If I try to remove Wireshark using MSC, that also doesn't work. It shows the spinning wheel, but the app remains. So then I removed it manually.

If I then install Wireshark using MSC cleanly (as if it had never been on the computer before), the app again shows up without an icon, but now it doesn't fire up at all. Instead, you get this:

image

Mind you, if I gut all this, download the .dmg from the Wireshark site and install it, everything works just fine.

So when I dig into this, one thing I notice, as that last message just felt like a permissions issue, is that /Applications/Wireshark/Contents/Info.plist has its permissions set to 600 (i.e., only the owner of the file can read/write). But as the file is owned by root:admin, even I don't have access. This vs. what I see in every other app where that file is set to 644, giving everyone the ability to read the file. I suspect this is part of the issue at the very least. But there may be other permissions set wrong.

Anyway, as it stands now, this recipe doesn't really work unfortunately.

eshirk commented 4 years ago

@fseesink Are you using the munki recipe with the postinstall script? It adjusts permissions (/bin/chmod -R go+rX /Applications/Wireshark.app), and has worked for me for both 3.0.6 and 3.0.7.