I'm trying to debug an issue that came up in using InstaDMG, but may
not necessarily reside with the program. A little background - I'm
using a 10.6.2 machine to create an image with InstaDMG 1.6b2
(revision 261) using a 10.6 Volume License CD. I load the build train
up with the 10.6.2 combo installer and two packages: Puppet .25.4 and
Facter 1.5.7 ( https://sites.google.com/a/explanatorygap.net/puppet/
). The problem lies with the fact that Puppet needs to install files
to /usr/lib/ruby/site_ruby which is actually a symlinked folder. As
it turns out, installing the package on a non-boot volume blows away
this symlink and replaces it with a simple folder...which breaks the
program. Installing the same packages on a Boot Volume are not a
problem, as installer respects the symlinks. See the link for a
picture of the symlink-breaking action --> http://twitpic.com/17xyu7
I was able to install puppet using InstaDMG 1.5 on a 10.5.8 machine
and building a 10.5.8 image...so I'm assuming that the issue may
reside with installer in 10.6. Has anyone else run into issues with
packages respecting symlinks like this before?
-Gary
The problem lies with the fact that Puppet needs to install files to /usr/lib/ruby/site_ruby which is actually a symlinked folder. As it turns out, installing the package on a non-boot volume blows away this symlink and replaces it with a simple folder...which breaks the program. Installing the same packages on a Boot Volume are not a problem, as installer respects the symlinks. See the link for a picture of the symlink-breaking action --> http://twitpic.com/17xyu7
I was able to install puppet using InstaDMG 1.5 on a 10.5.8 machine and building a 10.5.8 image...so I'm assuming that the issue may reside with installer in 10.6. Has anyone else run into issues with packages respecting symlinks like this before?
If anyone sees an obvious smoking gun at:
http://github.com/reductivelabs/puppet/blob/0.25.4/conf/osx/createpackage.sh
I'd appreciate it, as I don't have any other Mac packaging gurus who
code review this :) The other supporting files are in that same
directory.
> --
> You received this message because you are subscribed to the Google Groups
> "InstaDMG-Dev" group.
> To post to this group, send email to instad...@googlegroups.com.
> To unsubscribe from this group, send email to
> instadmg-dev...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/instadmg-dev?hl=en.
>
>
>
>
I threw together a quick video here (open with Safari - it doesn't work with Chrome) --> http://www.screencast-o-matic.com/watch/c6elnL1DJ
I'm going to play more tomorrow with a mounted firewire drive that contains a base 10.6 system and see if I can reproduce this with the 'installer -pkg /path/to/the.pkg -target /Volumes/firewiredrive' command to see where the root of the problem lies.
-Gary
--
You received this message because you are subscribed to the Google Groups "InstaDMG-Dev" group.
To post to this group, send email to instad...@googlegroups.com.
To unsubscribe from this group, send email to instadmg-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/instadmg-dev?hl=en.
<softlinkTest.zip>
So I have a theory based upon more info from Gary, but I don't do
InstaDMG at Google at all anymore (other people are, just not me) and
don't have a test rig there.
Is it that symlink exists, but it's target doesn't at the time
InstaDMG is installing? and thus it can't follow it?
I've forgotten what the term is for that "install stuff at the first
reboot after this package which requires a restart installs" stuff
Apple started introducing with a whole bunch of their system packages,
but it sounds like this directory might be one of those.
I imagine if that is the case that I'll be able to do something like
actually put the target of the symlink in my packages so that it's
guaranteed to be there on install time.
This kind of sucks though, as it means we're going to need different
packages for 10.4 and 10.{5,6}, or I create some stupid /Library/Ruby
folder on 10.4 that nothing will actually use. I don't think I can
bring myself to do the latter.
Puppet is one of those things you really want a single package for all
your clients for :(
> --
> Karl Kuehn
> lar...@softhome.net
ls -lad /usr/lib/ruby
ls -lad /usr/lib/ruby/site_ruby
Remember that second symlink is really:
root# ls -lad System/Library/Frameworks/Ruby.framework/Versions/
Current/usr/lib/ruby/site_ruby
lrwxrwxr-x 1 root wheel 47 Dec 7 11:57 System/Library/Frameworks/
Ruby.framework/Versions/Current/usr/lib/ruby/site_ruby -
> ../../../../../../../../../../Library/Ruby/Site
-Greg
$ ls -lad /usr/lib/ruby
lrwxr-xr-x 1 root wheel 76 Sep 8 2009 /usr/lib/ruby ->
../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby
$ ls -lad /usr/lib/ruby/site_ruby
lrwxr-xr-x 1 root wheel 47 Sep 8 2009 /usr/lib/ruby/site_ruby ->
../../../../../../../../../../Library/Ruby/Site
For comparison, from an unmanaged, non-Puppet system running 10.5.8:
# ls -lad /usr/lib/ruby
lrwxr-xr-x 1 root wheel 76 Oct 1 2008 /usr/lib/ruby ->
../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby
# ls -lad /usr/lib/ruby/site_ruby
lrwxr-xr-x 1 root wheel 47 Oct 1 2008 /usr/lib/ruby/site_ruby ->
../../../../../../../../../../Library/Ruby/Site
Neither have had any Ruby packages installed.
--
Jeremy
Given we have a lot of people who know about packages on this list...
what do you think is the best option? Here's what I understand to be
the problem.
When you do a 10.6 install, the symlinks exist, but not the target
until the next boot.
I want to use the symlinks to install to so that the 10.4 and 10.{5,6}
packages don't need to differ, as for 10.4 this is a directory, not a
symlink.
The only options I can really think of are to have a preflight script
that creates the symlink targets *if* installing onto 10.{5,6}, but I
dislike having packages that create directories that don't show up in
the payload.
However, these are directories that the OS "owns" and will create. Is
this such a bad strategy in that case?
-Gary
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/site_ruby
(note: the 1.8 is usually done as "Current", but this symlink resolves to "1.8" in the same directory on 10.6)
This resolves to:
../../../../../../../../../../Library/Ruby/Site
If you count the back-references you will get 10, but there are only 9 levels in the absolute path. When you are booted the extra level gets swallowed as a non-fatal (and non warning) error (try: "cd /; cd.."). However, if the filesystem is mounted anywhere other than root (as it is in InstaDMG) this will cause a problem since you can ../ one more directory out, but then there is no /Library/Ruby/Site in that outer folder.
So this is all a bug on Apple's part in the symlinks, and it looks like it has been a problem since 10.5 (I just checked . I am going to report it right now. But the Puppet package is probably going to have to work around this for now by not trying to have the package follow the torturous list of softlinks, but install stuff straight to /Library/Ruby/Site.
I just submitted this as Radar number 7758836, but thinking it through I doubt that Apple will go back and fix 10.5 at this point, so I think that we are stuck working around it for installers.
And yes, this would be fixed if I could chroot the installer on 10.6. And it should work with the chroot'ed installer InstaDMG uses on 10.5.
--
Karl Kuehn
lar...@softhome.net
Well done Karl. I really should have thought of actually counting the
damn levels :)
This brings me back to having to produce different packages for 10.4
and 10.5+ though :(
What do you all think of the option of fixing the symlink in a
preinstall if on 10.5/6 ?
>
> I just submitted this as Radar number 7758836, but thinking it through I doubt that Apple will go back and fix 10.5 at this point, so I think that we are stuck working around it for installers.
>
> And yes, this would be fixed if I could chroot the installer on 10.6. And it should work with the chroot'ed installer InstaDMG uses on 10.5.
>
> --
> Karl Kuehn
> lar...@softhome.net
>