app2luggage.rb and 10.9 Mavericks

160 views
Skip to first unread message

mi...@mikesolin.com

unread,
Dec 19, 2013, 3:21:02 PM12/19/13
to the-l...@googlegroups.com
Hey everyone!  I'm new to The Luggage, but have managed to learn quite a bit with the help of the wiki, Graham Gilbert, and Gary Larizza's tutorials.

One thing I'm having difficulty with: app2luggage isn't fully working for me, but I'm having trouble figuring out why.  I'm trying to package up Pages, in my Applications folder.  Using a modified version of Gary's example, I try this command:

sudo app2luggage.rb -a /Applications/Pages.app -i /Users/mike/Documents/Packages/Pages_5.0.1/ -l /usr/local/share/luggage/luggage.make -r edu,sju -p Pages_5.0.1

However, I get this error:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- ftools (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /usr/local/bin/app2luggage.rb:30:in `<main>'

After some searching, I came across this possible explanation:

http://stackoverflow.com/questions/11552524/ruby-cannot-load-such-file-ftools-load-error

The suggestion is to use fileutils instead of ftools.  Okay.  So now, I have my own modified app2luggage.rb, where I've changed line 30 to say require 'fileutils'.  Here's my same command, but pointing to my app2luggage2.rb (and the accompanying error):

sudo app2luggage2.rb -a /Applications/Pages.app -i /Users/mike/Documents/Packages/Pages_5.0.1/ -l /usr/local/share/luggage/luggage.make -r edu,sju -p Pages_5.0.1
Error: argument --reverse-domain must specify a reversed domain.

I changed to this command instead, changing some of the options to the alternatives (--luggage-path instead of -l, for example):

sudo app2luggage2.rb --application /Applications/Pages.app --directory-name /Users/mike/Documents/Packages/Pages_5.0.1/ --luggage-path /usr/local/share/luggage/luggage.make --reverse-domain edu.sju --package-id Pages_5.0.1 --make-pkg

I don't know if it makes a difference, but I also specified at the end that I wanted a pkg, but not a dmg.

This fails because it ends up trying to use /usr/local/bin/packagemaker, which doesn't exist on 10.9.  To fix this, I duplicated and modified my luggage.make file (named luggage2.make) to insert this at line 58:

USE_PKGBUILD=1

My current command is this:

sudo app2luggage2.rb --application /Applications/Pages.app --directory-name /Users/mike/Documents/Packages/Pages_5.0.1/ --luggage-path /usr/local/share/luggage/luggage2.make --reverse-domain edu.sju --package-id Pages_5.0.1 --make-pkg

The whole thing runs through successfully - and still makes a pkg and dmg for some reason.  That's okay, I only really need the pkg.

However - installing Pages from that pkg (either the standalone pkg or the one wrapped in the dmg) is problematic.  The installation finishes successfully, but Pages.app won't launch - it says that it's damaged.  The permissions for Pages.app are wonky, too:

drwx------   3 root  admin    102 Dec 19 15:12 Pages.app

Fixing the permissions doesn't allow the application to launch properly, though.

Any ideas?  Does anyone else have this working on 10.9?  How many things did I do wrong in this post?

Mike

Nathan Felton

unread,
Dec 19, 2013, 8:13:14 PM12/19/13
to the-l...@googlegroups.com
Hi Mike,

While I do not have a solution to make app2luggage work for you as I do not use app2luggage, I can offer you a solution that only requires the luggage.make file and a Makefile.

The luggage.make file has a native stanza for copying an app from the Applications directory and building it into a luggage package; "pack-from-applications-%". Here is an example Makefile you could use with this:

include luggage.make

PACKAGE_VERSION=5.0.1
PACKAGE_MAJOR_VERSION=5
PACKAGE_MINOR_VERSION=0

TITLE=Pages
REVERSE_DOMAIN=com.apple
PAYLOAD=pack-from-applications-Pages.app

I would like to point out however that there are (in my opinion) better ways to obtain and deploy the Pages application however. I suggest taking a look at this blog post on how to obtain the Apple PKG for the new apps directly from the App Store and then how to deploy them. http://n8felton.wordpress.com/2013/12/17/apples-creativity-and-productivity-apps/

HTH




--
You received this message because you are subscribed to the Google Groups "The Luggage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to the-luggage...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Nathan Felton

mi...@mikesolin.com

unread,
Dec 20, 2013, 10:59:02 AM12/20/13
to the-l...@googlegroups.com
Thanks, Nate!  'pack-from-applications' and 'pack-applications' are perfect.  Any objections if I edit the wiki to recommend those instead of (or, in addition to) app2luggage?

Only problem: I used pack-applications to copy Pages from the working directory, and the installation resulted in the same damaged application as before.  Installation was reported as successful, but the application had bad permissions and refused to launch.

I think grabbing Apple's installer is an interesting idea.  As Apple doesn't support that, though, I'd like to get a standard workflow relying on Apple's recommended practice of packaging up downloaded apps.

Thanks again, I really appreciate the help!

Mike

Mike Solin

unread,
Feb 6, 2014, 6:17:17 PM2/6/14
to the-l...@googlegroups.com
As a follow-up, it turns out the broken application was on my end.  I redownloaded the iLife and iWork suites on a different computer and pack-from-applications worked exactly as intended.  Thank you!
Reply all
Reply to author
Forward
0 new messages