If the user has an earlier Jenkins installation,
we should probably change the jenkins user shell
during the upgrade.
If the user has already changed jenkins user shell
to something else, we do not touch it.
Xcode 4.3 no longer ships with PackageMaker.
PackageMaker is available in "Auxiliary Tools.dmg", which
means there is no standard location for it as the developer
is free to unpack it anywhere he wants.
I do not see any other way to find PackageMaker except ask
Spotlight.
User has to choose a custom installation.
There are two choices:
- Start at boot as "daemon" (enabled by default)
- Start at boot as "jenkins" (disabled by default)
If user disables the first and enable the latter, the installer
will create a new user "jenkins" and new group "jenkins"
(if they do not exist), chown JENKINS_HOME to jenkins:jenkins
and set up launchd job to run Jenkins as "jenkins"
Also fixed some permission errors that PackageMaker complains about
when building the package.
Also PackageMaker xml file reformatted to be more readable
1) Installer checks Java is installed before proceeding.
It also tells how to get Java installed.
2) Installer opens http://localhost:8080 when installation is finished.
Sometimes users unload Jenkins using the launchctl -w option.
This permanently disables the Jenkins launchd job.
When the user re-installs Jenkins, he gets confused when
Jenkins doesn't load and run automatically and there is no
good error message from launchctl when it ignores the
Jenkins job because it is permanently disabled.
("nothing found to load")
Always forcing Jenkins to run after installation seems to be
the way of minimum confusion. The user is installing Jenkins
because he wants to run Jenkins, right?
Although there aren't any Jenkins packages deployed that use a launch daemon, soon there will be.
Let's make the preinstall capable of handling that already now.
Files under /Applications are usually owned by root and wheel, unless admin user has dragged it there. Jenkins is not an install-by-dragging kind of app.