Details

    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      The ant installer target, which is a child of the dist target does not compile due to the following issues addressed by the patch:

      1) prepare_rubygems in rakelib/installer.rake is called after doing a chdir into installer/macosx, but it tries to use paths relative to the top source directory. This causes lots of copy calls to fail

      2) The xml.erb files in install/macos/JRuby-installer.pmdoc/ reference undefined constants MACDIST and GEMDIST which should be MAC_DIST and GEM_DIST_DIR

      3) Furthermore these values are supposed to be relative, so a ../../ is needed to travel back to the toplevel source directory

      I have applied this patch against a clean git clone and verified that ant dist runs completely with no errors on Mac OSX. As a bonus I've confirmed the resulting installer works as well, installing JRuby into /Library/Frameworks/JRuby.framework/Versions/Current/bin/

        Activity

        Hide
        Travis Tilley added a comment -

        I made a similar patch and submitted a pull request just last night without checking JIRA first to see if it was already reported. Note to self: don't do that again.

        Show
        Travis Tilley added a comment - I made a similar patch and submitted a pull request just last night without checking JIRA first to see if it was already reported. Note to self: don't do that again.
        Hide
        Travis Tilley added a comment -
        Show
        Travis Tilley added a comment - More information here: https://github.com/jruby/jruby/pull/58
        Hide
        Travis Tilley added a comment -

        as an aside, i'd like to have a more idiomatic installer, remove templating for the pmdoc (similar results can be achieved while still allowing for editing in the official package tool), and add java detection and auto-installation in lion.

        Show
        Travis Tilley added a comment - as an aside, i'd like to have a more idiomatic installer, remove templating for the pmdoc (similar results can be achieved while still allowing for editing in the official package tool), and add java detection and auto-installation in lion.
        Hide
        Chris White added a comment -

        I'd have to see how the package build system works to see how the integration might work. As it is right now it's the way it is because the necessary variables are in the ruby script. At this point I'd like to consolidate the variables and try to see if the current relative path traversal that has to be done in the erb can be prevented.

        Detection of Java support would most likely entail checking JAVA_HOME. If not it would take them to the appropriate page based on the operating system (as Lion doesn't have a JDK bundled in). The JDK could also be auto-installed as mentioned, but it seems like the installer would have to be update every time a new version came out. Seems a little cumbersome maintenance wise versus "here go download this". Bundling JDKs is also an option, but that would increase the size and have the potential to give users insecure and out of date Java installs.

        Show
        Chris White added a comment - I'd have to see how the package build system works to see how the integration might work. As it is right now it's the way it is because the necessary variables are in the ruby script. At this point I'd like to consolidate the variables and try to see if the current relative path traversal that has to be done in the erb can be prevented. Detection of Java support would most likely entail checking JAVA_HOME. If not it would take them to the appropriate page based on the operating system (as Lion doesn't have a JDK bundled in). The JDK could also be auto-installed as mentioned, but it seems like the installer would have to be update every time a new version came out. Seems a little cumbersome maintenance wise versus "here go download this". Bundling JDKs is also an option, but that would increase the size and have the potential to give users insecure and out of date Java installs.
        Hide
        Travis Tilley added a comment -

        Much of what the templating is for can be done by using command line arguments or a separately templated property list file. Or something else. "The Luggage" uses a makefile based system for building packages and might be worth looking into. MacRuby's "nightly" pmdoc isn't templated and might also be a good place to look for common idioms.

        As for java detection, it's tricky. Apple decided to be clever here and distribute a java binary that, when run, will pop up a GUI declaring that java isn't installed and can be done so by clicking this happy shiny button. So simply checking to see if expected files exist might not be sufficient, and I'm hoping there's a more useful solution than a preflight script that calls `java -version` just to trigger this behavior.

        Show
        Travis Tilley added a comment - Much of what the templating is for can be done by using command line arguments or a separately templated property list file. Or something else. "The Luggage" uses a makefile based system for building packages and might be worth looking into. MacRuby's "nightly" pmdoc isn't templated and might also be a good place to look for common idioms. As for java detection, it's tricky. Apple decided to be clever here and distribute a java binary that, when run, will pop up a GUI declaring that java isn't installed and can be done so by clicking this happy shiny button. So simply checking to see if expected files exist might not be sufficient, and I'm hoping there's a more useful solution than a preflight script that calls `java -version` just to trigger this behavior.
        Hide
        Travis Tilley added a comment -

        Since Chris's patch has been merged I've closed my previous pull request and broke out the speed-specific change into its' own commit here: https://github.com/ttilley/jruby/commit/d66320bbad0f9fd0dc77edae8fe93bbcef1bddaa

        A similarly colorful description to the one in my commit message exists in the packaging system "the luggage" as a comment in their main makefile: https://github.com/unixorn/luggage/blob/master/luggage.make#L65

        Show
        Travis Tilley added a comment - Since Chris's patch has been merged I've closed my previous pull request and broke out the speed-specific change into its' own commit here: https://github.com/ttilley/jruby/commit/d66320bbad0f9fd0dc77edae8fe93bbcef1bddaa A similarly colorful description to the one in my commit message exists in the packaging system "the luggage" as a comment in their main makefile: https://github.com/unixorn/luggage/blob/master/luggage.make#L65
        Hide
        Travis Tilley added a comment -

        [java] time /usr/bin/xcrun packagemaker --no-recommend -v --doc JRuby-installer.pmdoc --out build/pkg/JRuby-1.7.0.dev.pkg --version 1.7.0.dev
        [java]
        [java] real 0m53.262s
        [java] user 0m16.713s

        Show
        Travis Tilley added a comment - [java] time /usr/bin/xcrun packagemaker --no-recommend -v --doc JRuby-installer.pmdoc --out build/pkg/JRuby-1.7.0.dev.pkg --version 1.7.0.dev [java] [java] real 0m53.262s [java] user 0m16.713s
        Hide
        Uwe Kubosch added a comment -

        Nice! Can we get this into the JRuby 1.6.4 release? I'll try to get Enebo to look at it.

        Show
        Uwe Kubosch added a comment - Nice! Can we get this into the JRuby 1.6.4 release? I'll try to get Enebo to look at it.
        Hide
        Thomas E Enebo added a comment -

        I applied the original patch by Chris White and I just cherry-picked Travis Tilley's perf fix. Looks like we have a work and quick MacOS installer now! Thanks for the help guys.

        Show
        Thomas E Enebo added a comment - I applied the original patch by Chris White and I just cherry-picked Travis Tilley's perf fix. Looks like we have a work and quick MacOS installer now! Thanks for the help guys.

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Chris White
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: