unixorn / luggage

Project to automate OS X package creation without using the packagemaker GUI

Home Page:https://github.com/unixorn/luggage/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resulting pkg installs payload to wrong folder(s)

rockpapergoat opened this issue · comments

commented

i have a simple makefile that installs an app bundle and packs a postflight script. what i'm seeing when run on my build machine is stuff like this:

Sep 5 20:57:46 derwin installer[2238]: Applications/TSP_Managed_Mac.app relocated to tmp/the_luggage/TSP_Managed_Mac.app-1.0.7/root/Applications/TSP_Managed_Mac.app
Sep 5 20:57:46 derwin installer[2238]: PackageKit: Shoving /var/folders/zz/zzzivhrRnAmviuee+++++++++++/Cleanup At Startup/PKInstallSandbox-tmp/Root (2 items) to /

any idea why the installer would dump the app back to the tmp root location? i also had a previous build dump the app in /Applications/Utilities/Waterroof.app, even though that's not specified anywhere.

the relevant lines from the makefile look like this: http://pastie.textmate.org/private/aucexsivlobbf5p8ms6ywa

the payload is a tar.bz2 archive.

thanks for all your work.

What do the contents of the tar.bz2 look like?

commented

they look pretty normal. i copied the app to the build directory, changed ownership to root:admin and tarred it up. looks like this:

http://pastie.textmate.org/private/7jvqg9ndjzgajyoonbdcda

looks like there's no path prepended there. it's just an archive of the app bundle.

maybe it's some weirdness with apple's installer. regardless, it's strange behavior.

That does look really weird. The unbz2 make rule just explodes the tarball into /Applications in the package root. It should definitely not be relocating the app.

The filesystem is hfs+, right? Are you trying to build on an NFS or AFP mounted filesystem?

commented

nope. all local, hfs+. maybe my system is hosed. i'll try building elsewhere and report back. thanks for your help!

commented

pretty weird. i tested on another laptop, tarred up cyberduck, edited the makefile with the basics, and built a package.

the app isn't installed under /Applications but under /tmp/the_luggage. the directory looks like this:
http://pastie.textmate.org/private/hgwcssrqddp3z2wysdygaq

and this is using a fresh pull straight from github.

i haven't seen this behavior before and don't know what would cause it. any ideas?

commented

okay, so after purging /tmp/the_luggage and removing any app from the build directory, a pkg file will actually install.i don't know if this is typical or in the docs, but i don't remember having to do this before.

You shouldn't have to do that. When I get in to work on Monday I'll install from github onto a fresh machine and make sure nothing got inadvertently broken in any recent updates.

commented

thanks. i don't have an older version hanging around to check. after running 'make clean' for a given pkg project, installation does work, though.

I am having the same issue. Fresh build, cleaning out /tmp/the_luggage does not help. Apps still get installed in /tmp/the_luggage...

Could you post a gist with your Makefile? I haven't been able to replicate this.

I ran in to a very similar problem with an OSX package I'm working on. Suddenly it stopped installing. However, if I changed the install location slightly it would work. I finally tracked down the junk in /var/log/install.log which brought me here. And after reading the above I figured out a fix for my problem.

I deleted the directory /tmp/pkmk.NA60G/ I'm sure that is just the name on my machine with my particular package but it was a tmp directory mentioned in /var/log/install.log. Something in this folder was messing up the installer even though it said the install was successful. I don't know how it happened but it took me a long time to figure out why my package suddenly stopped installing any files.

Anyway, thought I'd share in case it might help someone else out.

I wonder what was in that temp dir.

Also, was that on 10.6 or 10.7?

10.6 I'm not sure what was in the directory. Once I wiped it out everything worked fine again.

commented

FYI Gang.... I encountered this same "app was relocated" issue. I figured out that the installer -- even though I specified that the app was to be installed in /Applications -- if the app was already on the target volume somewhere (anywhere), the installer would always "re-install" it to that same location... so on a clean mac, the installer works fine.