Comments (6)
I don't think going by size is a safe way of doing it.
I think there probably needs to be several tests applied:
- Where is the intended destination? With El Capitan, we're not allowed to install to /Applications/Utilities, so really, anything that doesn't go into /Applications would be suspect.
- Is there more than one
.app
in the path to the item in question? In the example above, I would think that ChronoSync Scheduler.app is clearly not the "main app" since it's, due to the multiple apps in its path, nested within another app (and further, nested inside the app that IS at a desirable location, and probably the one we've already flagged from the first test). - I would hope that the main apps have a sparkle feed only. Helper apps shouldn't be prompting people for updates. Can you imagine if you got separate update notifications from the ChronoSync Scheduler right after you had updated ChronoSync? So I would think you get more points for having a sparkle feed; and if there's even more than one in a PackageInfo/Payload, assume something funky is going on.
from recipe-robot.
I've been staring at this block of code for a while trying to determine how to make it better.
https://github.com/homebysix/recipe-robot/blob/master/scripts/recipe-robot#L1389-L1447
In short, it should:
- Take a look at the contents of the Payload file:
gunzip -c Payload | pax
- If it finds an app, make a note of it for future inclusion in
blocking_applications
(#39). - If the app is a standalone app (not nested within another like ChronoSync Scheduler.app above):
- Extract the app by itself:
gunzip -c Payload | pax -r -s \",./,/path/to/extract_dest/,\"
- Run
inspect_app()
on the app. This will grab Sparkle feed, developer name, etc.
- Extract the app by itself:
- If it finds an app, make a note of it for future inclusion in
I'm OK with assuming the app will be installed to /Applications, although we do have the information we need to detect whether that's actually true (PackageInfo install-location
plus the app's path within Payload).
Anybody want to take a crack at this? I've been looking at it for too long.
from recipe-robot.
I want to. I may not have a computer for the next week... But I'd like to.
from recipe-robot.
Three examples we can use for further education of the robot with regard to package files:
- http://www.macspeech.com/appcast/4.0/de/dictatede_DSA.xml
- https://dl.google.com/drive-file-stream/GoogleDriveFileStream.dmg
- https://www.meistertask.com/files/MeisterTask_osx.pkg
from recipe-robot.
I had some coffee and revisited this issue. I think I've got a good solution that should work most of the time.
ditto -x
for unpacking payloads instead ofpax
. Why didn't I learn about that sooner!?- If a payload expands to a single app, easy. We inspect that app.
- If a payload expands to multiple apps, we use the biggest one.
- If a payload has no apps, that's firmly outside the scope of Recipe Robot.
- If a payload contains a .pkg bundle with a payload inside, grab the bundle identifier from the PackageInfo file and try to expand the payload.
There's still some loose wires around the generation of recipes after a lot of package-unpacking has taken place. For example, if we discover a signed app, we should switch CodeSignatureVerifier to use that. But the path may be variable depending on whether it's a pkg inside of a zip or dmg.
Latest changes on the better-pkg-handling branch.
from recipe-robot.
The changes discussed above (and others) have been incorporated into Recipe Robot 1.1.0+. Two of the three example URLs above are processed successfully by Recipe Robot now, and the other fails for an unrelated reason (404 error).
from recipe-robot.
Related Issues (20)
- 2.0.0rc1: Script output in app is not realtime, out of order HOT 3
- Fails on checking for recipes HOT 6
- FR: Include PlistReader with Apps as part of .pkg recipes
- 2.0rc2: Sparkle URLs collect sparkle:version key value in output instead of sparkle:shortVersionString HOT 1
- Building off #173, out Team ID for Code Signature output
- Sparkle Feed Causes Python Explosion HOT 2
- Sparkle Feed Causes dev Branch Recipe Creation Failure
- Recipe Robot 2.0: Incorrect "Minimum System version" Requirement? HOT 1
- Sparkle Feed Explosion for non-Sparkle feed HOT 5
- Mac with Recipe Robot but no autopkg produces pinwheels with no output HOT 1
- Mac with configured default RecipeCreateLocation that doesn't exist causes failure HOT 2
- Support for JamfUploader recipes HOT 2
- Recipe Robot incorrectly suggests AppPkgCreator for a pkg inside a dmg
- Support for DMG inside a ZIP HOT 1
- PKG rather than DMG as an option for Munki recipe's HOT 1
- Switch option to specify description when you get "[WARNING] No GitHub description provided." while running Recipe Robot HOT 5
- [ERROR] Sorry, I can't determine which version key to use for this app. HOT 8
- Don't skip pkg recipe if download recipe downloads a pkg HOT 1
- Parsing BBEdit Sparkle feed causes error HOT 3
- Switch from nose to pytest based tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recipe-robot.