Open timja opened 11 years ago
I forgot to mention, my environment is Ubuntu 12.04, 64-bit edition.
Workaround: Set "Installation directory" to Jenkins' home directory (which we have write access to) and "Tool Home" remains pointed to /usr.
PS: What's the difference between "Installation directory" and "Tool Home"? There is no help tooltip for "Installation directory".
The bug is actually in CommandInstaller.performInstallation, which assumes that it can use the tool home as a temporary directory—which is normally a safe assumption, but not when sudo or the like is being used to create files. Should just use the system temp directory.
If you click Install automatically then Installation directory disappears so I am not sure why you have it set—Installation directory only makes sense if you are not having Jenkins perform the installation.
It is Tool Home which should be set to /usr (or just set Executable to /usr/bin/hg and leave Tool Home blank).
>If you click Install automatically then Installation directory disappears so I am not sure why you have it set
I am using Hudson 1.492 and this isn't the case. Selecting "install automatically" does not cause the "installation directory" field to become hidden. Should I file an additional bug report for this?
It worked when I tried in 1.424 (baseline for the plugin), so if it is not working in 1.492 then that sounds like a regression which ought to be filed.
Filed JENKINS-16022.
Given that JENKINS-16022 cannot be reproduced with recent Jenkins and Mercurial plugin, this issue should also be obsolete.
I do not think so; JENKINS-16022 was a side issue. This problem is distinct and I think the bug summary reflects it properly.
Right, I misread the issue description. My apologies.
Issue is in core at AbstractCommandInstaller.performInstallation() line 74
The Mercurial incorrectly assumes write-access to the Mercurial installation directory, triggering the following exception:
My configuration is as follows:
Installation directory = /usr
Executable = INSTALLATION/bin/hg
Installation Automatically using command: "sudo apt-get install mercurial"
Jenkin's user does not have general access to /usr, nor to "sudo". It only has executable permissions in /usr/bin and "sudoers" permission to "apt-get".
Expected behavior: write temporary files into the path specified by the "java.io.tmpdir" system property.
Originally reported by cowwoc, imported from: CommandInstaller assumes write access to installation directory