diff --git a/cli/pom.xml b/cli/pom.xml index 5bade4e4ce..64922f4dec 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -4,7 +4,7 @@ pom org.jvnet.hudson.main - 1.356-SNAPSHOT + 1.357-SNAPSHOT cli Hudson CLI diff --git a/core/pom.xml b/core/pom.xml index 2db8a925cd..1766a7e49b 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -28,7 +28,7 @@ THE SOFTWARE. org.jvnet.hudson.main pom - 1.356-SNAPSHOT + 1.357-SNAPSHOT ../pom.xml diff --git a/core/src/main/java/hudson/model/UpdateCenter.java b/core/src/main/java/hudson/model/UpdateCenter.java index e53547b69d..9588790cb0 100644 --- a/core/src/main/java/hudson/model/UpdateCenter.java +++ b/core/src/main/java/hudson/model/UpdateCenter.java @@ -307,6 +307,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable { * Loads the data from the disk into this object. */ public synchronized void load() throws IOException { + UpdateSite defaultSite = new UpdateSite("default", config.getUpdateCenterUrl() + "update-center.json"); XmlFile file = getConfigFile(); if(file.exists()) { try { @@ -314,11 +315,19 @@ public class UpdateCenter extends AbstractModelObject implements Saveable { } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to load "+file, e); } + for (UpdateSite site : sites) { + // replace the legacy site with the new site + if (site.isLegacyDefault()) { + sites.remove(site); + sites.add(defaultSite); + break; + } + } } else { - // If there aren't already any UpdateSources, add the default one. if (sites.isEmpty()) { + // If there aren't already any UpdateSources, add the default one. // to maintain compatibility with existing UpdateCenterConfiguration, create the default one as specified by UpdateCenterConfiguration - sites.add(new UpdateSite("default",config.getUpdateCenterUrl()+"update-center.json")); + sites.add(defaultSite); } } } @@ -567,7 +576,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable { * Absolute URL that ends with '/'. */ public String getUpdateCenterUrl() { - return "http://hudson-ci.org/"; + return "http://updates.hudson-labs.org/"; } /** diff --git a/core/src/main/java/hudson/model/UpdateSite.java b/core/src/main/java/hudson/model/UpdateSite.java index 863a5f2bb6..309c3f9dc9 100644 --- a/core/src/main/java/hudson/model/UpdateSite.java +++ b/core/src/main/java/hudson/model/UpdateSite.java @@ -335,6 +335,13 @@ public class UpdateSite { return url; } + /** + * Is this the legacy default update center site? + */ + public boolean isLegacyDefault() { + return id.equals("default") && url.startsWith("http://hudson-ci.org/"); + } + /** * In-memory representation of the update center data. */ diff --git a/core/src/main/java/hudson/slaves/CommandLauncher.java b/core/src/main/java/hudson/slaves/CommandLauncher.java index 2d4145f778..d985a4ab49 100644 --- a/core/src/main/java/hudson/slaves/CommandLauncher.java +++ b/core/src/main/java/hudson/slaves/CommandLauncher.java @@ -100,7 +100,7 @@ public class CommandLauncher extends ComputerLauncher { {// system defined variables String rootUrl = Hudson.getInstance().getRootUrl(); - if (rootUrl != null) { + if (rootUrl!=null) { pb.environment().put("HUDSON_URL", rootUrl); pb.environment().put("SLAVEJAR_URL", rootUrl+"/jnlpJars/slave.jar"); } diff --git a/core/src/main/java/hudson/tasks/Mailer.java b/core/src/main/java/hudson/tasks/Mailer.java index 9692c63ad4..ca337edd61 100644 --- a/core/src/main/java/hudson/tasks/Mailer.java +++ b/core/src/main/java/hudson/tasks/Mailer.java @@ -331,6 +331,7 @@ public class Mailer extends Notifier { } public String getSmtpAuthPassword() { + if (smtpAuthPassword==null) return null; return Secret.toString(smtpAuthPassword); } diff --git a/core/src/test/java/hudson/model/UpdateCenterTest.java b/core/src/test/java/hudson/model/UpdateCenterTest.java index cc6e3e90f5..1ee67d087a 100644 --- a/core/src/test/java/hudson/model/UpdateCenterTest.java +++ b/core/src/test/java/hudson/model/UpdateCenterTest.java @@ -39,19 +39,19 @@ public class UpdateCenterTest extends TestCase { public void testData() throws IOException { // check if we have the internet connectivity. See HUDSON-2095 try { - new URL("http://hudson-ci.org/").openStream(); + new URL("http://updates.hudson-labs.org/").openStream(); } catch (IOException e) { System.out.println("Skipping this test. No internet connectivity"); return; } - URL url = new URL("http://hudson-ci.org/update-center.json?version=build"); + URL url = new URL("http://updates.hudson-labs.org/update-center.json?version=build"); String jsonp = IOUtils.toString(url.openStream()); String json = jsonp.substring(jsonp.indexOf('(')+1,jsonp.lastIndexOf(')')); UpdateSite us = new UpdateSite("default", url.toExternalForm()); UpdateSite.Data data = us.new Data(JSONObject.fromObject(json)); - assertTrue(data.core.url.startsWith("http://hudson-ci.org/")); + assertTrue(data.core.url.startsWith("http://updates.hudson-labs.org/")); assertTrue(data.plugins.containsKey("rake")); System.out.println(data.core.url); } diff --git a/debian.sh b/debian/build.sh similarity index 91% rename from debian.sh rename to debian/build.sh index 0431f48a3e..bb776ca250 100755 --- a/debian.sh +++ b/debian/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash -ex # The MIT License # # Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Jamie Whitehouse @@ -21,7 +21,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -# build a debian package from a Maven build -cp war/target/hudson.war hudson.war +if [ -z "$1" ]; then + echo "Usage: build.sh path/to/hudson.war" + exit 1 +fi + +cp "$1" hudson.war exec debuild -us -uc -B diff --git a/debian/README b/debian/debian/README similarity index 100% rename from debian/README rename to debian/debian/README diff --git a/debian/changelog b/debian/debian/changelog similarity index 99% rename from debian/changelog rename to debian/debian/changelog index 708c64618b..3c928aae10 100644 --- a/debian/changelog +++ b/debian/debian/changelog @@ -1,3 +1,9 @@ +hudson (1.356) unstable; urgency=low + + * See http://hudson.dev.java.net/changelog.html for more details. + + -- Kohsuke Kawaguchi Mon, 03 May 2010 12:12:09 -0700 + hudson (1.355) unstable; urgency=low * See http://hudson.dev.java.net/changelog.html for more details. diff --git a/debian/compat b/debian/debian/compat similarity index 100% rename from debian/compat rename to debian/debian/compat diff --git a/debian/control b/debian/debian/control similarity index 100% rename from debian/control rename to debian/debian/control diff --git a/debian/copyright b/debian/debian/copyright similarity index 100% rename from debian/copyright rename to debian/debian/copyright diff --git a/debian/cron.d.ex b/debian/debian/cron.d.ex similarity index 100% rename from debian/cron.d.ex rename to debian/debian/cron.d.ex diff --git a/debian/dirs b/debian/debian/dirs similarity index 100% rename from debian/dirs rename to debian/debian/dirs diff --git a/debian/docs b/debian/debian/docs similarity index 100% rename from debian/docs rename to debian/debian/docs diff --git a/debian/emacsen-install.ex b/debian/debian/emacsen-install.ex similarity index 100% rename from debian/emacsen-install.ex rename to debian/debian/emacsen-install.ex diff --git a/debian/emacsen-remove.ex b/debian/debian/emacsen-remove.ex similarity index 100% rename from debian/emacsen-remove.ex rename to debian/debian/emacsen-remove.ex diff --git a/debian/emacsen-startup.ex b/debian/debian/emacsen-startup.ex similarity index 100% rename from debian/emacsen-startup.ex rename to debian/debian/emacsen-startup.ex diff --git a/debian/hudson.default b/debian/debian/hudson.default similarity index 100% rename from debian/hudson.default rename to debian/debian/hudson.default diff --git a/debian/hudson.doc-base.EX b/debian/debian/hudson.doc-base.EX similarity index 100% rename from debian/hudson.doc-base.EX rename to debian/debian/hudson.doc-base.EX diff --git a/debian/hudson.init b/debian/debian/hudson.init similarity index 100% rename from debian/hudson.init rename to debian/debian/hudson.init diff --git a/debian/debian/hudson.install b/debian/debian/hudson.install new file mode 100644 index 0000000000..44e7a7f25e --- /dev/null +++ b/debian/debian/hudson.install @@ -0,0 +1,2 @@ +hudson.war usr/share/hudson +debian/hudson.list etc/apt/sources.list.d diff --git a/debian/debian/hudson.list b/debian/debian/hudson.list new file mode 100644 index 0000000000..f222d22fd4 --- /dev/null +++ b/debian/debian/hudson.list @@ -0,0 +1 @@ +deb http://hudson-labs.org/debian binary/ diff --git a/debian/hudson.postinst b/debian/debian/hudson.postinst similarity index 100% rename from debian/hudson.postinst rename to debian/debian/hudson.postinst diff --git a/debian/hudson.postrm b/debian/debian/hudson.postrm similarity index 100% rename from debian/hudson.postrm rename to debian/debian/hudson.postrm diff --git a/debian/manpage.1.ex b/debian/debian/manpage.1.ex similarity index 100% rename from debian/manpage.1.ex rename to debian/debian/manpage.1.ex diff --git a/debian/manpage.sgml.ex b/debian/debian/manpage.sgml.ex similarity index 100% rename from debian/manpage.sgml.ex rename to debian/debian/manpage.sgml.ex diff --git a/debian/manpage.xml.ex b/debian/debian/manpage.xml.ex similarity index 100% rename from debian/manpage.xml.ex rename to debian/debian/manpage.xml.ex diff --git a/debian/menu.ex b/debian/debian/menu.ex similarity index 100% rename from debian/menu.ex rename to debian/debian/menu.ex diff --git a/debian/preinst.ex b/debian/debian/preinst.ex similarity index 100% rename from debian/preinst.ex rename to debian/debian/preinst.ex diff --git a/debian/prerm.ex b/debian/debian/prerm.ex similarity index 100% rename from debian/prerm.ex rename to debian/debian/prerm.ex diff --git a/debian/release.conf b/debian/debian/release.conf similarity index 100% rename from debian/release.conf rename to debian/debian/release.conf diff --git a/debian/rules b/debian/debian/rules similarity index 99% rename from debian/rules rename to debian/debian/rules index cf9ce594e8..f2dc739a67 100755 --- a/debian/rules +++ b/debian/debian/rules @@ -51,7 +51,6 @@ install: build #cp hudson.war $(CURDIR)/debian/hudson/usr/share/hudson/hudson.war - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. diff --git a/debian/watch.ex b/debian/debian/watch.ex similarity index 100% rename from debian/watch.ex rename to debian/debian/watch.ex diff --git a/debian/hudson.install b/debian/hudson.install deleted file mode 100644 index b54b97ff0c..0000000000 --- a/debian/hudson.install +++ /dev/null @@ -1 +0,0 @@ -hudson.war usr/share/hudson diff --git a/maven-agent/pom.xml b/maven-agent/pom.xml index e9b0972a55..d6fdcac7cc 100644 --- a/maven-agent/pom.xml +++ b/maven-agent/pom.xml @@ -27,7 +27,7 @@ THE SOFTWARE. org.jvnet.hudson.main pom - 1.356-SNAPSHOT + 1.357-SNAPSHOT ../pom.xml diff --git a/maven-interceptor/pom.xml b/maven-interceptor/pom.xml index 29a22a777c..ddd5af8868 100644 --- a/maven-interceptor/pom.xml +++ b/maven-interceptor/pom.xml @@ -27,7 +27,7 @@ THE SOFTWARE. org.jvnet.hudson.main pom - 1.356-SNAPSHOT + 1.357-SNAPSHOT ../pom.xml diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 560183a8b0..2bddfde3d2 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -27,7 +27,7 @@ THE SOFTWARE. org.jvnet.hudson.main pom - 1.356-SNAPSHOT + 1.357-SNAPSHOT maven-plugin diff --git a/opensuse/SOURCES/hudson.repo b/opensuse/SOURCES/hudson.repo new file mode 100644 index 0000000000..415b8622e1 --- /dev/null +++ b/opensuse/SOURCES/hudson.repo @@ -0,0 +1,7 @@ +[hudson] +name=hudson +enabled=1 +autorefresh=0 +baseurl=http://hudson-labs.org/opensuse/ +type=rpm-md +keeppackages=0 diff --git a/opensuse/SPECS/hudson.spec b/opensuse/SPECS/hudson.spec index c5d2fc55b5..d3539ff478 100644 --- a/opensuse/SPECS/hudson.spec +++ b/opensuse/SPECS/hudson.spec @@ -12,6 +12,7 @@ Source: hudson.war Source1: hudson.init.in Source2: hudson.sysconfig.in Source3: hudson.logrotate +Source4: hudson.repo URL: https://hudson.dev.java.net/ Group: Development/Tools/Building License: MIT/X License, GPL/CDDL, ASL2 @@ -78,6 +79,7 @@ rm -rf "%{buildroot}" %__install -D -m0644 "%{SOURCE3}" "%{buildroot}/etc/logrotate.d/%{name}" +%__install -D -m0644 "%{SOURCE4}" "%{buildroot}/etc/zypp/repos.d/hudson.repo" %pre /usr/sbin/groupadd -r hudson &>/dev/null || : # SUSE version had -o here, but in Fedora -o isn't allowed without -u @@ -113,6 +115,7 @@ exit 0 %config /etc/logrotate.d/%{name} %config /etc/init.d/%{name} %config /etc/sysconfig/%{name} +/etc/zypp/repos.d/hudson.repo /usr/sbin/rc%{name} %changelog diff --git a/pom.xml b/pom.xml index 3b649ba55d..0bab54d92b 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ THE SOFTWARE. org.jvnet.hudson.main pom - 1.356-SNAPSHOT + 1.357-SNAPSHOT pom Hudson main module @@ -132,7 +132,7 @@ THE SOFTWARE. 2.0-beta-9 - -P release,ips,sign + -P release,sign -DskipTests javadoc:javadoc animal-sniffer:check deploy javadoc:aggregate true diff --git a/remoting/pom.xml b/remoting/pom.xml index 510d5f9239..e604a288fe 100644 --- a/remoting/pom.xml +++ b/remoting/pom.xml @@ -27,7 +27,7 @@ THE SOFTWARE. org.jvnet.hudson.main pom - 1.356-SNAPSHOT + 1.357-SNAPSHOT ../pom.xml diff --git a/rpm/SOURCES/hudson.repo b/rpm/SOURCES/hudson.repo new file mode 100644 index 0000000000..ec7cc4009c --- /dev/null +++ b/rpm/SOURCES/hudson.repo @@ -0,0 +1,4 @@ +[hudson] +name=Hudson +baseurl=http://hudson-labs.org/redhat/ +gpgcheck=1 diff --git a/rpm/SPECS/hudson.spec b/rpm/SPECS/hudson.spec index bf93b41d85..0a17034297 100644 --- a/rpm/SPECS/hudson.spec +++ b/rpm/SPECS/hudson.spec @@ -12,6 +12,7 @@ Source: hudson.war Source1: hudson.init.in Source2: hudson.sysconfig.in Source3: hudson.logrotate +Source4: hudson.repo URL: https://hudson.dev.java.net/ Group: Development/Tools/Building License: MIT/X License, GPL/CDDL, ASL2 @@ -81,6 +82,7 @@ rm -rf "%{buildroot}" %__sed -i 's,@@HOME@@,%{workdir},g' "%{buildroot}/etc/sysconfig/%{name}" %__install -D -m0644 "%{SOURCE3}" "%{buildroot}/etc/logrotate.d/%{name}" +%__install -D -m0644 "%{SOURCE4}" "%{buildroot}/etc/yum.repos.d/hudson.repo" %pre /usr/sbin/groupadd -r hudson &>/dev/null || : @@ -117,6 +119,7 @@ exit 0 %config /etc/logrotate.d/%{name} %config /etc/init.d/%{name} %config /etc/sysconfig/%{name} +/etc/yum.repos.d/hudson.repo /usr/sbin/rc%{name} %changelog diff --git a/test/pom.xml b/test/pom.xml index 6292495a86..9018b5d93a 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -27,7 +27,7 @@ THE SOFTWARE. pom org.jvnet.hudson.main - 1.356-SNAPSHOT + 1.357-SNAPSHOT 4.0.0 org.jvnet.hudson.main diff --git a/ui-samples-plugin/pom.xml b/ui-samples-plugin/pom.xml index 2563a46b09..e9ce63c43f 100644 --- a/ui-samples-plugin/pom.xml +++ b/ui-samples-plugin/pom.xml @@ -27,7 +27,7 @@ THE SOFTWARE. org.jvnet.hudson.main pom - 1.356-SNAPSHOT + 1.357-SNAPSHOT ui-samples-plugin diff --git a/war/pom.xml b/war/pom.xml index 75eb1f1ec7..d39daebd15 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -27,7 +27,7 @@ THE SOFTWARE. org.jvnet.hudson.main pom - 1.356-SNAPSHOT + 1.357-SNAPSHOT ../pom.xml