diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 720bef3..0000000 --- a/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -/jenkins-1.549.tar.gz -/LICENSE-2.0.txt -/jenkins-1.557.tar.gz -/jenkins-conf.zip -/jenkins-1.569.tar.gz -/jenkins-1.575.tar.gz -/jenkins-1.578.tar.gz -/jenkins-1.581.tar.gz -/jenkins-1.589.tar.gz -/jenkins-1.590.tar.gz -/jenkins-1.598.tar.gz -/jenkins-1.606.tar.gz -/jenkins-1.611.tar.gz -/jenkins-1.614.tar.gz -/jenkins-1.616.tar.gz -/jenkins-1.625.tar.gz -/jenkins-1.625.1.tar.gz -/jenkins-1.625.2.tar.gz -/jenkins-1.625.3.tar.gz -/jenkins-1.642.2.tar.gz -/jenkins-1.642.3.tar.gz -/jenkins-1.651.1.tar.gz -/plugin-1.642.4.pom -/jenkins-1.651.2.tar.gz -/jenkins-1.651.3.tar.gz diff --git a/0001-SECURITY-360-introduce-a-system-switch-to-kill-CLI.patch b/0001-SECURITY-360-introduce-a-system-switch-to-kill-CLI.patch deleted file mode 100644 index ff567b6..0000000 --- a/0001-SECURITY-360-introduce-a-system-switch-to-kill-CLI.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 45fba62fb26263b2bb05b20b688a6fbed154ade0 Mon Sep 17 00:00:00 2001 -From: Kohsuke Kawaguchi -Date: Fri, 11 Nov 2016 12:54:32 -0800 -Subject: [PATCH] [SECURITY-360] introduce a system switch to kill CLI - -This basically is a convenient version of -https://github.com/jenkinsci-cert/SECURITY-218. - -During the course of discussing how to fix SECURITY-360, it was agreed -by the CERT team that we provide this switch. ---- - core/src/main/java/hudson/cli/CLIAction.java | 3 +- - core/src/main/java/hudson/cli/CliProtocol.java | 2 +- - core/src/main/java/hudson/cli/CliProtocol2.java | 2 +- - core/src/main/java/jenkins/CLI.java | 17 +++++++ - test/src/test/java/jenkins/CLITest.java | 65 +++++++++++++++++++++++++ - 5 files changed, 85 insertions(+), 4 deletions(-) - create mode 100644 core/src/main/java/jenkins/CLI.java - create mode 100644 test/src/test/java/jenkins/CLITest.java - -diff --git a/core/src/main/java/hudson/cli/CLIAction.java b/core/src/main/java/hudson/cli/CLIAction.java -index 70a458a..9ea7dd7 100644 ---- a/core/src/main/java/hudson/cli/CLIAction.java -+++ b/core/src/main/java/hudson/cli/CLIAction.java -@@ -62,12 +62,11 @@ public class CLIAction implements UnprotectedRootAction, StaplerProxy { - } - - public String getDisplayName() { -- - return "Jenkins CLI"; - } - - public String getUrlName() { -- return "cli"; -+ return jenkins.CLI.DISABLED ? null : "cli"; - } - - public void doCommand(StaplerRequest req, StaplerResponse rsp) throws ServletException, IOException { -diff --git a/core/src/main/java/hudson/cli/CliProtocol.java b/core/src/main/java/hudson/cli/CliProtocol.java -index 99cdd17..7506f2f 100644 ---- a/core/src/main/java/hudson/cli/CliProtocol.java -+++ b/core/src/main/java/hudson/cli/CliProtocol.java -@@ -32,7 +32,7 @@ public class CliProtocol extends AgentProtocol { - - @Override - public String getName() { -- return "CLI-connect"; -+ return jenkins.CLI.DISABLED ? null : "CLI-connect"; - } - - @Override -diff --git a/core/src/main/java/hudson/cli/CliProtocol2.java b/core/src/main/java/hudson/cli/CliProtocol2.java -index 1be9fff..8b5f2d9 100644 ---- a/core/src/main/java/hudson/cli/CliProtocol2.java -+++ b/core/src/main/java/hudson/cli/CliProtocol2.java -@@ -24,7 +24,7 @@ import java.security.Signature; - public class CliProtocol2 extends CliProtocol { - @Override - public String getName() { -- return "CLI2-connect"; -+ return jenkins.CLI.DISABLED ? null : "CLI2-connect"; - } - - @Override -diff --git a/core/src/main/java/jenkins/CLI.java b/core/src/main/java/jenkins/CLI.java -new file mode 100644 -index 0000000..970e59d ---- /dev/null -+++ b/core/src/main/java/jenkins/CLI.java -@@ -0,0 +1,17 @@ -+package jenkins; -+ -+import org.kohsuke.accmod.Restricted; -+import org.kohsuke.accmod.restrictions.NoExternalUse; -+ -+/** -+ * Kill switch to disable the entire Jenkins CLI system. -+ * -+ * Marked as no external use because the CLI subsystem is nearing EOL. -+ * -+ * @author Kohsuke Kawaguchi -+ */ -+@Restricted(NoExternalUse.class) -+public class CLI { -+ // non-final to allow setting from $JENKINS_HOME/init.groovy.d -+ public static boolean DISABLED = Boolean.getBoolean(CLI.class.getName()+".disabled"); -+} -diff --git a/test/src/test/java/jenkins/CLITest.java b/test/src/test/java/jenkins/CLITest.java -new file mode 100644 -index 0000000..054d4df ---- /dev/null -+++ b/test/src/test/java/jenkins/CLITest.java -@@ -0,0 +1,65 @@ -+package jenkins; -+ -+import hudson.cli.FullDuplexHttpStream; -+import hudson.model.Computer; -+import hudson.model.Failure; -+import hudson.remoting.Channel; -+import org.junit.Rule; -+import org.junit.Test; -+import org.jvnet.hudson.test.JenkinsRule; -+ -+import java.io.FileNotFoundException; -+import java.net.URL; -+ -+import static org.junit.Assert.*; -+ -+/** -+ * @author Kohsuke Kawaguchi -+ */ -+public class CLITest { -+ @Rule -+ public JenkinsRule j = new JenkinsRule(); -+ -+ /** -+ * Checks if the kill switch works correctly -+ */ -+ @Test -+ public void killSwitch() throws Exception { -+ // this should succeed, as a control case -+ makeHttpCall(); -+ makeJnlpCall(); -+ -+ CLI.DISABLED = true; -+ try { -+ try { -+ makeHttpCall(); -+ fail("Should have been rejected"); -+ } catch (FileNotFoundException e) { -+ // attempt to make a call should fail -+ } -+ try { -+ makeJnlpCall(); -+ fail("Should have been rejected"); -+ } catch (Exception e) { -+ // attempt to make a call should fail -+ e.printStackTrace(); -+ -+ // the current expected failure mode is EOFException, though we don't really care how it fails -+ } -+ } finally { -+ CLI.DISABLED = false; -+ } -+ } -+ -+ private void makeHttpCall() throws Exception { -+ FullDuplexHttpStream con = new FullDuplexHttpStream(new URL(j.getURL(), "cli")); -+ Channel ch = new Channel("test connection", Computer.threadPoolForRemoting, con.getInputStream(), con.getOutputStream()); -+ ch.close(); -+ } -+ -+ private void makeJnlpCall() throws Exception { -+ int r = hudson.cli.CLI._main(new String[]{"-s",j.getURL().toString(), "version"}); -+ if (r!=0) -+ throw new Failure("CLI failed"); -+ } -+} --- -2.7.4 - diff --git a/CDDL-LICENSE b/CDDL-LICENSE deleted file mode 100644 index 55e7149..0000000 --- a/CDDL-LICENSE +++ /dev/null @@ -1,132 +0,0 @@ -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - -1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than Source Code. - - 1.5. "Initial Developer" means the individual or entity that first makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. - - 1.9 "Modifications" means the Source Code and Executable form of any of the following: - - A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; - - B. Any new file that contains any part of the Original Software or previous Modification; or - - C. Any new file that is contributed or otherwise made available under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form of computer software code that is originally released under this License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - -2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. - (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients� rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient�s rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. - -4. Versions of the License. - - 4.1. New Versions. - - Oracle Corp. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. - -5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as "Participant") alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. - - 6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY�S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - -The Covered Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" (as that term is defined at 48 C.F.R. �252.227-7014(a)(1)) and "commercial computer software documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. - -9. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction�s conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys� fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. - -NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) - -The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..5204a84 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Orphaned for 6+ weeks diff --git a/dependencies.txt b/dependencies.txt deleted file mode 100644 index 33d8d35..0000000 --- a/dependencies.txt +++ /dev/null @@ -1,2 +0,0 @@ -net.java.dev.jna:jna:jar:4.1.0:compile -org.kohsuke:akuma:jar:1.9:compile diff --git a/do-not-check-for-core-updates.patch b/do-not-check-for-core-updates.patch deleted file mode 100644 index a4893b8..0000000 --- a/do-not-check-for-core-updates.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/core/src/main/java/hudson/model/UpdateSite.java b/core/src/main/java/hudson/model/UpdateSite.java -index 7d4ddd2..c304484 100644 ---- a/core/src/main/java/hudson/model/UpdateSite.java -+++ b/core/src/main/java/hudson/model/UpdateSite.java -@@ -465,7 +465,7 @@ public class UpdateSite { - * Is there a new version of the core? - */ - public boolean hasCoreUpdates() { -- return core != null && core.isNewerThan(Jenkins.VERSION); -+ return false; - } - - /** diff --git a/dont-override-close.patch b/dont-override-close.patch deleted file mode 100644 index a17e43a..0000000 --- a/dont-override-close.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/core/src/main/java/hudson/PluginFirstClassLoader.java b/core/src/main/java/hudson/PluginFirstClassLoader.java -index 41ca562..4f69125 100644 ---- a/core/src/main/java/hudson/PluginFirstClassLoader.java -+++ b/core/src/main/java/hudson/PluginFirstClassLoader.java -@@ -65,12 +65,6 @@ public class PluginFirstClassLoader - { - return urls; - } -- -- public void close() -- throws IOException -- { -- cleanup(); -- } - - @Override - protected Enumeration findResources( String arg0, boolean arg1 ) diff --git a/drop-jna-posix-compatibility.patch b/drop-jna-posix-compatibility.patch deleted file mode 100644 index a5c9d99..0000000 --- a/drop-jna-posix-compatibility.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 29056df74b476196a98db9b0492a3d19fe48ce5b Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Fri, 18 Oct 2013 10:05:23 +0200 -Subject: [PATCH] Drop jna-posix compatibility - ---- - core/src/main/java/hudson/os/PosixAPI.java | 78 ++---------------------- - core/src/main/java/hudson/os/PosixException.java | 8 +-- - 2 files changed, 10 insertions(+), 76 deletions(-) - -diff --git a/core/src/main/java/hudson/os/PosixAPI.java b/core/src/main/java/hudson/os/PosixAPI.java -index 2e69069..e3aa344 100644 ---- a/core/src/main/java/hudson/os/PosixAPI.java -+++ b/core/src/main/java/hudson/os/PosixAPI.java -@@ -1,9 +1,5 @@ - package hudson.os; - --import java.io.File; --import java.io.InputStream; --import java.io.PrintStream; --import java.util.Map; - import java.util.logging.Logger; - import jnr.constants.platform.Errno; - import jnr.posix.POSIX; -@@ -29,17 +25,13 @@ public class PosixAPI { - if (posix == null) { - posix = POSIXFactory.getPOSIX(new DefaultPOSIXHandler() { - @Override public void error(Errno error, String extraData) { -- throw new PosixException("native error " + error.description() + " " + extraData, convert(error)); -+ throw new PosixException("native error " -+ + error.description() + " " + extraData, error); - } - @Override public void error(Errno error, String methodName, String extraData) { -- throw new PosixException("native error calling " + methodName + ": " + error.description() + " " + extraData, convert(error)); -- } -- private org.jruby.ext.posix.POSIX.ERRORS convert(Errno error) { -- try { -- return org.jruby.ext.posix.POSIX.ERRORS.valueOf(error.name()); -- } catch (IllegalArgumentException x) { -- return org.jruby.ext.posix.POSIX.ERRORS.EIO; // PosixException.message has real error anyway -- } -+ throw new PosixException("native error calling " -+ + methodName + ": " + error.description() + " " -+ + extraData, error); - } - }, true); - } -@@ -59,65 +51,7 @@ public class PosixAPI { - */ - @Deprecated - public static boolean supportsNative() { -- return !(jnaPosix instanceof org.jruby.ext.posix.JavaPOSIX); -- } -- -- private static org.jruby.ext.posix.POSIX jnaPosix; -- /** @deprecated Use {@link #jnr} instead. */ -- @Deprecated -- public static synchronized org.jruby.ext.posix.POSIX get() { -- if (jnaPosix == null) { -- jnaPosix = org.jruby.ext.posix.POSIXFactory.getPOSIX(new org.jruby.ext.posix.POSIXHandler() { -- public void error(org.jruby.ext.posix.POSIX.ERRORS errors, String s) { -- throw new PosixException(s,errors); -- } -- -- public void unimplementedError(String s) { -- throw new UnsupportedOperationException(s); -- } -- -- public void warn(WARNING_ID warning_id, String s, Object... objects) { -- LOGGER.fine(s); -- } -- -- public boolean isVerbose() { -- return true; -- } -- -- public File getCurrentWorkingDirectory() { -- return new File(".").getAbsoluteFile(); -- } -- -- public String[] getEnv() { -- Map envs = System.getenv(); -- String[] envp = new String[envs.size()]; -- -- int i = 0; -- for (Map.Entry e : envs.entrySet()) { -- envp[i++] = e.getKey()+'+'+e.getValue(); -- } -- return envp; -- } -- -- public InputStream getInputStream() { -- return System.in; -- } -- -- public PrintStream getOutputStream() { -- return System.out; -- } -- -- public int getPID() { -- // TODO -- return 0; -- } -- -- public PrintStream getErrorStream() { -- return System.err; -- } -- }, true); -- } -- return jnaPosix; -+ return posix.isNative(); - } - - private static final Logger LOGGER = Logger.getLogger(PosixAPI.class.getName()); -diff --git a/core/src/main/java/hudson/os/PosixException.java b/core/src/main/java/hudson/os/PosixException.java -index 03cdd50..116d420 100644 ---- a/core/src/main/java/hudson/os/PosixException.java -+++ b/core/src/main/java/hudson/os/PosixException.java -@@ -1,6 +1,6 @@ - package hudson.os; - --import org.jruby.ext.posix.POSIX.ERRORS; -+import jnr.constants.platform.Errno; - - /** - * Indicates an error during POSIX API call. -@@ -8,16 +8,16 @@ import org.jruby.ext.posix.POSIX.ERRORS; - * @author Kohsuke Kawaguchi - */ - public class PosixException extends RuntimeException { -- private final ERRORS errors; -+ private final Errno errors; - -- public PosixException(String message, ERRORS errors) { -+ public PosixException(String message, Errno errors) { - super(message); - this.errors = errors; - } - - /** @deprecated Leaks reference to deprecated jna-posix API. */ - @Deprecated -- public ERRORS getErrorCode() { -+ public Errno getErrorCode() { - return errors; - } - --- -1.8.3.1 - diff --git a/groovy-scripts-to-spring-security.patch b/groovy-scripts-to-spring-security.patch deleted file mode 100644 index c8b4694..0000000 --- a/groovy-scripts-to-spring-security.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 4a8d4c48b84748449dbba84dd3b7eb644985321c Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Tue, 28 Jan 2014 10:18:13 +0100 -Subject: [PATCH 5/7] Port groovy scripts to spring-security - ---- - .../groovy/hudson/model/AbstractProjectTest.groovy | 4 ++-- - .../AbstractPasswordBasedSecurityRealm.groovy | 6 +++--- - .../webapp/WEB-INF/security/SecurityFilters.groovy | 20 ++++++++++---------- - 3 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/test/src/test/groovy/hudson/model/AbstractProjectTest.groovy b/test/src/test/groovy/hudson/model/AbstractProjectTest.groovy -index a36a740..510d542 100644 ---- a/test/src/test/groovy/hudson/model/AbstractProjectTest.groovy -+++ b/test/src/test/groovy/hudson/model/AbstractProjectTest.groovy -@@ -46,8 +46,8 @@ import hudson.triggers.TriggerDescriptor; - import hudson.util.StreamTaskListener; - import hudson.util.OneShotEvent - import jenkins.model.Jenkins; --import org.acegisecurity.context.SecurityContext; --import org.acegisecurity.context.SecurityContextHolder; -+import org.springframework.security.core.context.SecurityContext; -+import org.springframework.security.core.context.SecurityContextHolder; - import org.jvnet.hudson.test.HudsonTestCase - import org.jvnet.hudson.test.Bug; - import org.jvnet.hudson.test.MemoryAssert -diff --git a/war/src/main/webapp/WEB-INF/security/AbstractPasswordBasedSecurityRealm.groovy b/war/src/main/webapp/WEB-INF/security/AbstractPasswordBasedSecurityRealm.groovy -index 453687d..eabeb37 100644 ---- a/war/src/main/webapp/WEB-INF/security/AbstractPasswordBasedSecurityRealm.groovy -+++ b/war/src/main/webapp/WEB-INF/security/AbstractPasswordBasedSecurityRealm.groovy -@@ -24,9 +24,9 @@ - /* - Configure Hudson's own user database as the authentication realm. - */ --import org.acegisecurity.providers.ProviderManager --import org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider --import org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider -+import org.springframework.security.authentication.ProviderManager -+import org.springframework.security.authentication.AnonymousAuthenticationProvider -+import org.springframework.security.authentication.RememberMeAuthenticationProvider - import jenkins.model.Jenkins - - authenticationManager(ProviderManager) { -diff --git a/war/src/main/webapp/WEB-INF/security/SecurityFilters.groovy b/war/src/main/webapp/WEB-INF/security/SecurityFilters.groovy -index 55f5dcd..15cffe1 100644 ---- a/war/src/main/webapp/WEB-INF/security/SecurityFilters.groovy -+++ b/war/src/main/webapp/WEB-INF/security/SecurityFilters.groovy -@@ -32,11 +32,11 @@ import hudson.security.BasicAuthenticationFilter - import hudson.security.ChainedServletFilter - import hudson.security.UnwrapSecurityExceptionFilter - import hudson.security.HudsonAuthenticationEntryPoint --import org.acegisecurity.providers.anonymous.AnonymousProcessingFilter -+import org.springframework.security.web.authentication.AnonymousAuthenticationFilter - import jenkins.security.ExceptionTranslationFilter --import org.acegisecurity.ui.basicauth.BasicProcessingFilter --import org.acegisecurity.ui.basicauth.BasicProcessingFilterEntryPoint --import org.acegisecurity.ui.rememberme.RememberMeProcessingFilter -+import org.springframework.security.web.authentication.www.BasicAuthenticationFilter -+import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint -+import org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter - import hudson.security.HttpSessionContextIntegrationFilter2 - import hudson.security.SecurityRealm - import hudson.security.NoopFilter -@@ -45,7 +45,7 @@ import jenkins.security.ApiTokenFilter - // providers that apply to both patterns - def commonProviders() { - return [ -- bean(AnonymousProcessingFilter) { -+ bean(AnonymousAuthenticationFilter) { - key = "anonymous" // must match with the AnonymousProvider - userAttribute = "anonymous," - }, -@@ -74,13 +74,13 @@ filter(ChainedServletFilter) { - // allow clients to submit basic authentication credential - // but allow that to be skipped since it can interfere with reverse proxy setup - Boolean.getBoolean("jenkins.security.ignoreBasicAuth") ? bean(NoopFilter) : -- bean(BasicProcessingFilter) { -+ bean(BasicAuthenticationFilter) { - authenticationManager = securityComponents.manager - // if basic authentication fails (which only happens incorrect basic auth credential is sent), - // respond with 401 with basic auth request, instead of redirecting the user to the login page, - // since users of basic auth tends to be a program and won't see the redirection to the form - // page as a failure -- authenticationEntryPoint = bean(BasicProcessingFilterEntryPoint) { -+ authenticationEntryPoint = bean(BasicAuthenticationEntryPoint) { - realmName = "Jenkins" - } - }, -@@ -89,9 +89,9 @@ filter(ChainedServletFilter) { - rememberMeServices = securityComponents.rememberMe - authenticationFailureUrl = "/loginError" - defaultTargetUrl = "/" -- filterProcessesUrl = "/j_acegi_security_check" -+ filterProcessesUrl = "/j_spring_security_check" - }, -- bean(RememberMeProcessingFilter) { -+ bean(RememberMeAuthenticationFilter) { - rememberMeServices = securityComponents.rememberMe - authenticationManager = securityComponents.manager - }, -@@ -107,4 +107,4 @@ legacy(ChainedServletFilter) { - // when using container-authentication we can't hit /login directly. - // we first have to hit protected /loginEntry, then let the container - // trap that into /login. --} -\ No newline at end of file -+} --- -1.8.5.3 - diff --git a/hpi-unpack-temp-hack.patch b/hpi-unpack-temp-hack.patch deleted file mode 100644 index 49c44c8..0000000 --- a/hpi-unpack-temp-hack.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff --git a/core/src/main/java/hudson/ClassicPluginStrategy.java b/core/src/main/java/hudson/ClassicPluginStrategy.java -index 040e4cf..6c636fb 100644 ---- a/core/src/main/java/hudson/ClassicPluginStrategy.java -+++ b/core/src/main/java/hudson/ClassicPluginStrategy.java -@@ -50,11 +50,14 @@ import org.apache.tools.zip.ZipEntry; - import org.apache.tools.zip.ZipExtraField; - import org.apache.tools.zip.ZipOutputStream; - -+import java.io.BufferedReader; - import java.io.Closeable; - import java.io.File; - import java.io.FileInputStream; - import java.io.FilenameFilter; - import java.io.IOException; -+import java.io.InputStream; -+import java.io.InputStreamReader; - import java.lang.reflect.Field; - import java.lang.reflect.InvocationTargetException; - import java.net.URI; -@@ -591,16 +594,44 @@ public class ClassicPluginStrategy implements PluginStrategy { - } - } - -+ private static class StreamGobbler extends Thread { -+ InputStream is; -+ -+ public StreamGobbler(InputStream is) { -+ this.is = is; -+ } -+ -+ public void run() { -+ try { -+ InputStreamReader isr = new InputStreamReader(is); -+ BufferedReader br = new BufferedReader(isr); -+ String line = null; -+ while ((line = br.readLine()) != null) { -+ // do nothing -+ } -+ } catch (IOException ioe) { -+ ioe.printStackTrace(); -+ } -+ } -+ } -+ - private static void unzipExceptClasses(File archive, File destDir, Project prj) { -- Expand e = new Expand(); -- e.setProject(prj); -- e.setTaskType("unzip"); -- e.setSrc(archive); -- e.setDest(destDir); -- PatternSet p = new PatternSet(); -- p.setExcludes("WEB-INF/classes/"); -- e.addPatternset(p); -- e.execute(); -+ // TODO: quick hack, this needs to be solved properly -+ try { -+ Runtime rt = Runtime.getRuntime(); -+ Process proc = rt.exec("/usr/bin/unzip -o -d " + destDir.getAbsolutePath() + " " + archive.getAbsolutePath() -+ + " -x 'WEB-INF/classes/*'"); -+ StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream()); -+ StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream()); -+ errorGobbler.start(); -+ outputGobbler.start(); -+ int rc = proc.waitFor(); -+ if (rc != 0) { -+ throw new Exception("unzip exited with return code: " + rc); -+ } -+ } catch (Exception e) { -+ LOGGER.log(Level.SEVERE, "Failed to unzip plugin " + archive, e); -+ } - } - - /** diff --git a/jenkins-sysconfig b/jenkins-sysconfig deleted file mode 100644 index 40e2f47..0000000 --- a/jenkins-sysconfig +++ /dev/null @@ -1,119 +0,0 @@ -## Path: Development/Jenkins -## Description: Configuration for the Jenkins continuous build server -## Type: string -## Default: "@@HOME@@" -## ServiceRestart: jenkins -# -# Directory where Jenkins store its configuration and working -# files (checkouts, build reports, artifacts, ...). -# -JENKINS_HOME="/var/lib/jenkins" - -## Type: string -## Default: "/bin/bash" -## ServiceRestart: jenkins -# -# Shell used to initialize the Jenkins server's environment. -# Setting this option to the path of a shell executable allows -# initialization of the Jenkins server environment using -# standard shell startup scripts. -# Disabling this option causes the Jenkins server to be run -# with a minimal environment. -# -JENKINS_INIT_SHELL="/bin/bash" - -## Type: string -## Default: "" -## ServiceRestart: jenkins -# -# Java runtime to run Jenkins -# When left empty, the current system default JRE, as defined -# by update-alternatives(8), is used. -# -JENKINS_JAVA_HOME="" - -## Type: string -## Default: "jenkins" -## ServiceRestart: jenkins -# -# Unix user account that runs the Jenkins daemon -# Be careful when you change this, as you need to update -# permissions of $JENKINS_HOME and /var/log/jenkins. -# -JENKINS_USER="jenkins" - -## Type: integer(-20:20) -## Default: 0 -## ServiceRestart: jenkins -# -# The nice level at which the Jenkins server (and its build jobs) run. -# -JENKINS_NICE="0" - -## Type: string -## Default: "-Djava.awt.headless=true" -## ServiceRestart: jenkins -# -# Options to pass to java when running Jenkins. -# -JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true" - -## Type: integer(0:65535) -## Default: 8080 -## ServiceRestart: jenkins -# -# Port Jenkins is listening on. -# Set to -1 to disable -# -JENKINS_PORT="8080" - -## Type: integer(0:65535) -## Default: 8009 -## ServiceRestart: jenkins -# -# Ajp13 Port Jenkins is listening on. -# Set to -1 to disable -# -JENKINS_AJP_PORT="8009" - -## Type: integer(1:9) -## Default: 5 -## ServiceRestart: jenkins -# -# Debug level for logs -- the higher the value, the more verbose. -# 5 is INFO. -# -JENKINS_DEBUG_LEVEL="5" - -## Type: yesno -## Default: no -## ServiceRestart: jenkins -# -# Whether to enable access logging or not. -# -JENKINS_ENABLE_ACCESS_LOG="no" - -## Type: integer -## Default: 100 -## ServiceRestart: jenkins -# -# Maximum number of HTTP worker threads. -# -JENKINS_HANDLER_MAX="100" - -## Type: integer -## Default: 20 -## ServiceRestart: jenkins -# -# Maximum number of idle HTTP worker threads. -# -JENKINS_HANDLER_IDLE="20" - -## Type: string -## Default: "" -## ServiceRestart: jenkins -# -# Pass arbitrary arguments to Jenkins. -# Full option list: java -jar jenkins.war --help -# -JENKINS_ARGS="" diff --git a/jenkins.init b/jenkins.init deleted file mode 100644 index 1e4e129..0000000 --- a/jenkins.init +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/sh -# -# SUSE system statup script for Jenkins -# Copyright (C) 2007 Pascal Bleser -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or (at -# your option) any later version. -# -# This library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, -# USA. -# -### BEGIN INIT INFO -# Provides: jenkins -# Required-Start: $local_fs $remote_fs $network $time $named -# Should-Start: $time sendmail -# Required-Stop: $local_fs $remote_fs $network $time $named -# Should-Stop: $time sendmail -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: Jenkins continuous build server -# Description: Start the Jenkins continuous build server -### END INIT INFO - -# Check for existence of needed config file and read it -JENKINS_CONFIG=/etc/sysconfig/jenkins -test -e "$JENKINS_CONFIG" || { echo "$JENKINS_CONFIG not existing"; - if [ "$1" = "stop" ]; then exit 0; - else exit 6; fi; } -test -r "$JENKINS_CONFIG" || { echo "$JENKINS_CONFIG not readable. Perhaps you forgot 'sudo'?"; - if [ "$1" = "stop" ]; then exit 0; - else exit 6; fi; } - -JENKINS_PID_FILE="/var/run/jenkins.pid" - -# Source function library. -. /etc/init.d/functions - -# Read config -[ -f "$JENKINS_CONFIG" ] && . "$JENKINS_CONFIG" - -# Set up environment accordingly to the configuration settings -[ -n "$JENKINS_HOME" ] || { echo "JENKINS_HOME not configured in $JENKINS_CONFIG"; - if [ "$1" = "stop" ]; then exit 0; - else exit 6; fi; } -[ -d "$JENKINS_HOME" ] || { echo "JENKINS_HOME directory does not exist: $JENKINS_HOME"; - if [ "$1" = "stop" ]; then exit 0; - else exit 1; fi; } - -# clean up after my nasty symlink workaround -if [ -d "${JENKINS_HOME}/plugins" ]; then - for f in "${JENKINS_HOME}"/plugins/*.jpi; do - if [ -L "$f" ] && [ ! -e "$f" ]; then - rm -f "$f" - fi - done -fi - -# Search usable Java. We do this because various reports indicated -# that /usr/bin/java may not always point to Java 1.5 -# see http://www.nabble.com/guinea-pigs-wanted-----Hudson-RPM-for-RedHat-Linux-td25673707.html -for candidate in /etc/alternatives/java /usr/lib/jvm/java-1.6.0/bin/java /usr/lib/jvm/jre-1.6.0/bin/java /usr/lib/jvm/java-1.5.0/bin/java /usr/lib/jvm/jre-1.5.0/bin/java /usr/bin/java -do - [ -x "$JENKINS_JAVA_CMD" ] && break - JENKINS_JAVA_CMD="$candidate" -done - -JENKINS_WEBROOT="/usr/share/jenkins/webroot/" - -CLASSPATH="${JENKINS_WEBROOT}/:${JENKINS_WEBROOT}/winstone.jar:`build-classpath jetty8/jetty-util-8.1.14.v20131031 jetty8/jetty-security-8.1.14.v20131031 jetty8/jetty-server-8.1.14.v20131031 jetty8/jetty-webapp-8.1.14.v20131031 jetty8/jetty-servlet-8.1.14.v20131031 jetty8/jetty-http-8.1.14.v20131031 jetty8/jetty-io-8.1.14.v20131031 jetty8/jetty-continuation-8.1.14.v20131031 jetty8/jetty-xml-8.1.14.v20131031 glassfish-servlet-api`" - -JAVA_CMD="$JENKINS_JAVA_CMD $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -cp $CLASSPATH Main" -PARAMS="--logfile=/var/log/jenkins/jenkins.log --extractedFilesFolder=$JENKINS_WEBROOT --webroot=$JENKINS_WEBROOT --daemon" -[ -n "$JENKINS_PORT" ] && PARAMS="$PARAMS --httpPort=$JENKINS_PORT" -[ -n "$JENKINS_LISTEN_ADDRESS" ] && PARAMS="$PARAMS --httpListenAddress=$JENKINS_LISTEN_ADDRESS" -[ -n "$JENKINS_HTTPS_PORT" ] && PARAMS="$PARAMS --httpsPort=$JENKINS_HTTPS_PORT" -[ -n "$JENKINS_HTTPS_KEYSTORE" ] && PARAMS="$PARAMS --httpsKeyStore=$JENKINS_HTTPS_KEYSTORE" -[ -n "$JENKINS_HTTPS_KEYSTORE_PASSWORD" ] && PARAMS="$PARAMS --httpsKeyStorePassword='$JENKINS_HTTPS_KEYSTORE_PASSWORD'" -[ -n "$JENKINS_HTTPS_LISTEN_ADDRESS" ] && PARAMS="$PARAMS --httpsListenAddress=$JENKINS_HTTPS_LISTEN_ADDRESS" -[ -n "$JENKINS_AJP_PORT" ] && PARAMS="$PARAMS --ajp13Port=$JENKINS_AJP_PORT" -[ -n "$JENKINS_AJP_LISTEN_ADDRESS" ] && PARAMS="$PARAMS --ajp13ListenAddress=$JENKINS_AJP_LISTEN_ADDRESS" -[ -n "$JENKINS_DEBUG_LEVEL" ] && PARAMS="$PARAMS --debug=$JENKINS_DEBUG_LEVEL" -[ -n "$JENKINS_HANDLER_STARTUP" ] && PARAMS="$PARAMS --handlerCountStartup=$JENKINS_HANDLER_STARTUP" -[ -n "$JENKINS_HANDLER_MAX" ] && PARAMS="$PARAMS --handlerCountMax=$JENKINS_HANDLER_MAX" -[ -n "$JENKINS_HANDLER_IDLE" ] && PARAMS="$PARAMS --handlerCountMaxIdle=$JENKINS_HANDLER_IDLE" -[ -n "$JENKINS_ARGS" ] && PARAMS="$PARAMS $JENKINS_ARGS" - -if [ "$JENKINS_ENABLE_ACCESS_LOG" = "yes" ]; then - PARAMS="$PARAMS --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=/var/log/jenkins/access_log" -fi - -RETVAL=0 - -case "$1" in - start) - echo -n "Starting Jenkins " - daemon --user "$JENKINS_USER" --pidfile "$JENKINS_PID_FILE" $JAVA_CMD $PARAMS > /dev/null - RETVAL=$? - if [ $RETVAL = 0 ]; then - success - echo > "$JENKINS_PID_FILE" # just in case we fail to find it - MY_SESSION_ID=`/bin/ps h -o sess -p $$` - # get PID - /bin/ps hww -u "$JENKINS_USER" -o sess,ppid,pid,cmd | \ - while read sess ppid pid cmd; do - [ "$ppid" = 1 ] || continue - # this test doesn't work because Jenkins sets a new Session ID - # [ "$sess" = "$MY_SESSION_ID" ] || continue - echo "$cmd" | grep $JENKINS_WEBROOT > /dev/null - [ $? = 0 ] || continue - # found a PID - echo $pid > "$JENKINS_PID_FILE" - done - else - failure - fi - echo - ;; - stop) - echo -n "Shutting down Jenkins " - killproc jenkins - RETVAL=$? - echo - ;; - try-restart|condrestart) - if test "$1" = "condrestart"; then - echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" - fi - $0 status - if test $? = 0; then - $0 restart - else - : # Not running is not a failure. - fi - ;; - restart) - $0 stop - $0 start - ;; - force-reload) - echo -n "Reload service Jenkins " - $0 try-restart - ;; - reload) - $0 restart - ;; - status) - status jenkins - RETVAL=$? - ;; - probe) - ## Optional: Probe for the necessity of a reload, print out the - ## argument to this init script which is required for a reload. - ## Note: probe is not (yet) part of LSB (as of 1.9) - - test "$JENKINS_CONFIG" -nt "$JENKINS_PID_FILE" && echo reload - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" - exit 1 - ;; -esac -exit $RETVAL diff --git a/jenkins.service b/jenkins.service deleted file mode 100644 index 0c20b33..0000000 --- a/jenkins.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Jenkins continuous build server -After=syslog.target network.target - -[Service] -EnvironmentFile=-/etc/sysconfig/jenkins -ExecStart=/usr/libexec/jenkins/jenkins start -ExecStop=/usr/libexec/jenkins/jenkins stop -Type=forking -PIDFile=/var/run/jenkins.pid - -[Install] -WantedBy=multi-user.target diff --git a/jenkins.spec b/jenkins.spec deleted file mode 100644 index 176b30b..0000000 --- a/jenkins.spec +++ /dev/null @@ -1,1031 +0,0 @@ -%global bootstrap 0 - -%global homedir %{_datadir}/%{name} -%global webroot %{homedir}/webroot -%global corepluginsdir %{webroot}/WEB-INF/plugins -%global workdir %{_sharedstatedir}/%{name} - -Name: jenkins -Version: 1.651.3 -Release: 11%{?dist} -Summary: An extendable open source continuous integration server - -# The project's primary license is MIT -# ASL 2.0: -# few files in core/src/main/java/hudson/ -# CDDL: -# core/src/main/java/hudson/util/EditDistance.java -# LGPLv2+: -# few files in core/src/main/java/hudson/util/jna/ -License: MIT and ASL 2.0 and LGPLv2+ and CDDL -URL: http://jenkins-ci.org -Source0: https://github.com/jenkinsci/jenkins/archive/%{name}-%{version}.tar.gz -Source1: http://www.apache.org/licenses/LICENSE-2.0.txt -# taken from https://netbeans.org/cddl-gplv2.html -Source2: CDDL-LICENSE -Source4: jenkins-sysconfig -Source6: jenkins.service -Source7: jenkins.init -Source8: dependencies.txt -# latest plugins POM (LTS) before Jenkins 2.0 -Source9: http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/plugin/1.642.4/plugin-1.642.4.pom - -# we don't need support for Solaris in SU -Patch3: remove-solaris-support-in-su.patch -# jna-posix library is not in Fedora, we use jnr-posix -Patch4: drop-jna-posix-compatibility.patch -# build against newer guava -Patch7: use-guava-13.0.patch -Patch9: remove-windows-support-from-processtree.patch -Patch11: remove-windows-installer-support.patch -Patch14: do-not-check-for-core-updates.patch -Patch15: hpi-unpack-temp-hack.patch -# the method is superfluous and causes FTBFS with ant 1.10.0 -Patch16: dont-override-close.patch - -Patch100: 0001-SECURITY-360-introduce-a-system-switch-to-kill-CLI.patch - -BuildArch: noarch - -BuildRequires: maven-local -BuildRequires: mvn(antlr:antlr) -BuildRequires: mvn(args4j:args4j) -BuildRequires: mvn(com.github.jnr:jnr-posix) -BuildRequires: mvn(com.google.code.findbugs:annotations) -BuildRequires: mvn(com.google.guava:guava) -BuildRequires: mvn(com.google.inject:guice::no_aop:) -BuildRequires: mvn(com.infradna.tool:bridge-method-annotation) -BuildRequires: mvn(com.infradna.tool:bridge-method-injector) -BuildRequires: mvn(com.jcraft:jzlib) -BuildRequires: mvn(commons-beanutils:commons-beanutils) -BuildRequires: mvn(commons-codec:commons-codec) -BuildRequires: mvn(commons-collections:commons-collections) -BuildRequires: mvn(org.apache.commons:commons-compress) -BuildRequires: mvn(commons-digester:commons-digester) -BuildRequires: mvn(commons-httpclient:commons-httpclient) -BuildRequires: mvn(commons-io:commons-io) -BuildRequires: mvn(commons-jelly:commons-jelly-tags-define) -BuildRequires: mvn(commons-jelly:commons-jelly-tags-fmt) -BuildRequires: mvn(commons-jelly:commons-jelly-tags-xml) -BuildRequires: mvn(commons-lang:commons-lang) -BuildRequires: mvn(commons-logging:commons-logging) -BuildRequires: mvn(com.sun.xml.txw2:txw2) -BuildRequires: mvn(javax.mail:mail) -BuildRequires: mvn(javax.servlet:jstl) -BuildRequires: mvn(javax.servlet:servlet-api) -BuildRequires: mvn(jaxen:jaxen) -BuildRequires: mvn(jline:jline:1) -BuildRequires: mvn(junit:junit) -BuildRequires: mvn(net.java.dev.jna:jna) -BuildRequires: mvn(net.java.sezpoz:sezpoz) -BuildRequires: mvn(org.apache.ant:ant) -BuildRequires: mvn(org.apache.maven.plugins:maven-release-plugin) -BuildRequires: mvn(org.codehaus.groovy:groovy18:1.8) -BuildRequires: mvn(org.codehaus.mojo:antlr-maven-plugin) -BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) -BuildRequires: mvn(org.fusesource.jansi:jansi) -BuildRequires: mvn(org.jenkins-ci:annotation-indexer) -BuildRequires: mvn(org.jenkins-ci:bytecode-compatibility-transformer) -BuildRequires: mvn(org.jenkins-ci:commons-jexl) -BuildRequires: mvn(org.jenkins-ci:crypto-util) -BuildRequires: mvn(org.jenkins-ci:jmdns) -BuildRequires: mvn(org.jenkins-ci:memory-monitor) -BuildRequires: mvn(org.jenkins-ci:task-reactor) -BuildRequires: mvn(org.jenkins-ci.tools:maven-hpi-plugin) -BuildRequires: mvn(org.jenkins-ci:version-number) -BuildRequires: mvn(org.jfree:jfreechart) -BuildRequires: mvn(org.jvnet.hudson:xstream) -BuildRequires: mvn(org.jvnet.localizer:localizer) -BuildRequires: mvn(org.jvnet.localizer:maven-localizer-plugin) -BuildRequires: mvn(org.jvnet.robust-http-client:robust-http-client) -BuildRequires: mvn(org.kohsuke:access-modifier-annotation) -BuildRequires: mvn(org.kohsuke:access-modifier-checker) -BuildRequires: mvn(org.kohsuke:akuma) -BuildRequires: mvn(org.kohsuke:libpam4j) -BuildRequires: mvn(org.kohsuke.metainf-services:metainf-services) -BuildRequires: mvn(org.kohsuke.stapler:json-lib) -BuildRequires: mvn(org.kohsuke.stapler:maven-stapler-plugin) -BuildRequires: mvn(org.kohsuke.stapler:stapler-adjunct-timeline) -BuildRequires: mvn(org.kohsuke.stapler:stapler-groovy) -BuildRequires: mvn(org.kohsuke:trilead-putty-extension) -BuildRequires: mvn(org.mindrot:jbcrypt) -BuildRequires: mvn(org.mockito:mockito-core) -BuildRequires: mvn(org.powermock:powermock-api-mockito) -BuildRequires: mvn(org.powermock:powermock-module-junit4) -BuildRequires: mvn(org.springframework.ldap:spring-ldap-core) -BuildRequires: mvn(org.springframework.ldap:spring-ldap-core-tiger) -BuildRequires: mvn(org.springframework.ldap:spring-ldap-ldif-batch) -BuildRequires: mvn(org.springframework.ldap:spring-ldap-ldif-core) -BuildRequires: mvn(org.springframework.ldap:spring-ldap-odm) -BuildRequires: mvn(org.springframework.security:spring-security-acl) -BuildRequires: mvn(org.springframework.security:spring-security-config) -BuildRequires: mvn(org.springframework.security:spring-security-core) -BuildRequires: mvn(org.springframework.security:spring-security-ldap) -BuildRequires: mvn(org.springframework.security:spring-security-web) -BuildRequires: mvn(org.springframework:spring-aop) -BuildRequires: mvn(org.springframework:spring-core) -BuildRequires: mvn(org.springframework:spring-oxm) -BuildRequires: mvn(org.springframework:spring-webmvc) -BuildRequires: mvn(org.tmatesoft.svnkit:trilead-ssh2) -BuildRequires: mvn(org.jenkins-ci.main:remoting) >= 2.62.3-1 -BuildRequires: mvn(xpp3:xpp3) -BuildRequires: mvn(org.apache.maven.plugins:maven-war-plugin) -BuildRequires: mvn(org.apache.sshd:sshd-core) -BuildRequires: mvn(org.bouncycastle:bcprov-jdk16) -BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on) -BuildRequires: mvn(org.acegisecurity:acegi-security) -BuildRequires: mvn(org.kohsuke.stapler:stapler-adjunct-codemirror) -BuildRequires: mvn(org.jenkins-ci.plugins.icon-shim:icon-set) -BuildRequires: mvn(org.jenkins-ci:winstone) -BuildRequires: mvn(net.jcip:jcip-annotations) -BuildRequires: mvn(org.slf4j:slf4j-jdk14) -BuildRequires: mvn(org.slf4j:log4j-over-slf4j) -BuildRequires: mvn(org.slf4j:jcl-over-slf4j) -BuildRequires: jcifs -BuildRequires: atinject -BuildRequires: glassfish-annotation-api -BuildRequires: systemd-units -BuildRequires: stax2-api -BuildRequires: jtidy -BuildRequires: apache-mina-mina-core -%if !%{bootstrap} -#BuildRequires: mvn(org.jenkins-ci.lib:lib-jenkins-maven-embedder) -BuildRequires: mvn(org.jenkins-ci.main:cli) -BuildRequires: mvn(org.jenkins-ci:executable-war) -BuildRequires: mvn(org.jenkins-ci.main:jenkins-core) -#BuildRequires: mvn(org.jenkins-ci.main.maven:maven31-agent) -#BuildRequires: mvn(org.jenkins-ci.main.maven:maven31-interceptor) -#BuildRequires: mvn(org.jenkins-ci.main:pom:pom:) -BuildRequires: mvn(org.jenkins-ci.modules:instance-identity) -#BuildRequires: mvn(org.jenkins-ci.modules:slave-installer) -BuildRequires: mvn(org.jenkins-ci.modules:ssh-cli-auth) -BuildRequires: mvn(org.jenkins-ci.modules:sshd) -#BuildRequires: mvn(org.jenkins-ci.plugins:credentials) -#BuildRequires: mvn(org.jenkins-ci.plugins:javadoc) -#BuildRequires: mvn(org.jenkins-ci.plugins:mailer) -#BuildRequires: mvn(org.jenkins-ci.plugins:ssh-credentials) -#BuildRequires: mvn(org.jenkins-ci.plugins:token-macro) -BuildRequires: js-yui2 -BuildRequires: springframework-instrument -BuildRequires: woodstox-core -%endif - -Requires: jenkins-webapp -Requires(pre): shadow-utils -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units - - -%description -Jenkins is an award-winning, cross-platform, continuous integration and -continuous delivery application that increases your productivity. Use -Jenkins to build and test your software projects continuously making it -easier for developers to integrate changes to the project, and making it -easier for users to obtain a fresh build. It also allows you to -continuously deliver your software by providing powerful ways to define -your build pipelines and integrating with a large number of testing and -deployment technologies. - -%package core -Summary: Jenkins core - -%description core -This package contains Jenkins core artifact. - -%package plugins-pom -Summary: Jenkins Plugins POM - -%description plugins-pom -This package contains Jenkins Plugins POM. - -%package cli -Summary: Jenkins CLI -# Explicit requires for javapackages-tools since jenkins-cli script -# uses /usr/share/java-utils/java-functions -Requires: javapackages-tools - -%description cli -This package contains Jenkins CLI. - -%if !%{bootstrap} -%package webapp -Summary: Jenkins Web Application -# we install exploded WAR with symlinks to system JARs, thus we need all these deps -Requires: %{name} = %{version}-%{release} -Requires: %{name}-core = %{version}-%{release} -Requires: %{name}-cli = %{version}-%{release} -Requires: unzip -Requires: mvn(org.kohsuke:access-modifier-annotation) -Requires: acegisecurity -Requires: akuma -Requires: mvn(org.jenkins-ci:annotation-indexer) -Requires: ant -Requires: antlr-tool -Requires: aopalliance -Requires: apache-commons-beanutils -Requires: apache-commons-codec -Requires: apache-commons-collections -Requires: apache-commons-compress -Requires: apache-commons-digester -Requires: apache-commons-discovery -Requires: apache-commons-fileupload -Requires: apache-commons-io -Requires: apache-commons-lang -Requires: apache-commons-logging -Requires: apache-mina-mina-core -Requires: apache-sshd -Requires: args4j -Requires: atinject -Requires: bea-stax-api -Requires: bouncycastle -Requires: bouncycastle-pkix -Requires: mvn(com.infradna.tool:bridge-method-annotation) -Requires: mvn(com.sun.xml.txw2:txw2) -Requires: bytecode-compatibility-transformer -Requires: constant-pool-scanner -Requires: dom4j -Requires: ezmorph -Requires: glassfish-annotation-api -Requires: google-guice -Requires: groovy18-lib -Requires: guava -Requires: hamcrest-core -Requires: jakarta-commons-httpclient -Requires: jakarta-oro -Requires: jansi -Requires: javamail -Requires: jaxen -Requires: jBCrypt -Requires: jcifs -Requires: jcip-annotations -Requires: jcommon -Requires: jenkins-commons-jelly -Requires: jenkins-crypto-util -Requires: jenkins-executable-war-webroot -Requires: jenkins-extras-memory-monitor -Requires: jenkins-icon-shim -Requires: jenkins-instance-identity -Requires: jenkins-jexl -Requires: jenkins-json-lib -Requires: jenkins-remoting >= 2.62.3-1 -Requires: jenkins-remoting-webapp >= 2.62.3-1 -Requires: jenkins-ssh-cli-auth -Requires: jenkins-sshd -Requires: jenkins-task-reactor -Requires: jenkins-version-number -Requires: jenkins-winstone -Requires: jenkins-xstream -Requires: jffi -Requires: jffi-native -Requires: jfreechart -Requires: jline1 -Requires: jmdns -Requires: jna -Requires: jnr-constants -Requires: jnr-ffi -Requires: jnr-posix -Requires: jnr-x86asm -Requires: jsr-305 -Requires: js-yui2-jenkins -Requires: jtidy -Requires: junit -Requires: jzlib -Requires: libpam4j -Requires: localizer -Requires: log4j12 -Requires: objectweb-asm -Requires: objectweb-asm3 -Requires: relaxngDatatype -Requires: robust-http-client -Requires: sezpoz -Requires: slf4j -Requires: slf4j-jdk14 -Requires: springframework -Requires: springframework-aop -Requires: springframework-beans -Requires: springframework-context -Requires: springframework-context-support -Requires: springframework-expression -Requires: springframework-instrument -Requires: springframework-jdbc -Requires: springframework-oxm -Requires: springframework-tx -Requires: springframework-web -Requires: springframework-webmvc -Requires: stapler -Requires: stapler-adjunct-codemirror -Requires: stapler-adjunct-timeline -Requires: stapler-groovy -Requires: stapler-jelly -Requires: stax2-api -Requires: tiger-types -Requires: tomcat-taglibs-standard -Requires: trilead-putty-extension -Requires: trilead-ssh2 -Requires: txw2 -Requires: woodstox-core -Requires: xpp3 -# core plugins -Requires: jenkins-ant-plugin -Requires: jenkins-antisamy-markup-formatter-plugin -Requires: jenkins-credentials-plugin -#Requires: jenkins-cvs-plugin -Requires: jenkins-external-monitor-job-plugin -Requires: jenkins-javadoc-plugin -Requires: jenkins-junit-plugin -Requires: jenkins-ldap-plugin -Requires: jenkins-mailer-plugin -Requires: jenkins-matrix-auth-plugin -Requires: jenkins-matrix-project-plugin -#Requires: jenkins-maven-plugin -Requires: jenkins-pam-auth-plugin -Requires: jenkins-script-security-plugin -Requires: jenkins-ssh-credentials-plugin -Requires: jenkins-ssh-slaves-plugin -#Requires: jenkins-subversion-plugin -#Requires: jenkins-translation-plugin -#Requires: jenkins-windows-slaves - -%description webapp -This package contains Jenkins web application. -%endif # bootstrap - -%package javadoc -Summary: Javadoc for %{name} - -%description javadoc -This package contains API documentation for %{name}. - - -%prep -%setup -q -n %{name}-%{name}-%{version} - -%patch3 -p1 -%patch4 -p1 -%patch7 -p1 -%patch9 -p1 -%patch11 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 - -%patch100 -p1 - -# plugins POM -mkdir plugins -cp %{SOURCE9} plugins/pom.xml -%pom_xpath_inject 'pom:modules' 'plugins' - -# remote .NET detection code - it's not needed in Fedora -rm core/src/main/java/hudson/util/jna/DotNet.java - -cp %{SOURCE1} LICENSE-ASL-2.0.txt -cp %{SOURCE2} LICENSE-CDDL.txt - -# Remove bundled JARs and classes -find . -name "*.jar" -delete -find . -name "*.class" -delete - -# remove support for Solaris for now (missing deps and unclear licensing) -rm core/src/main/java/hudson/os/solaris/package-info.java -rm core/src/main/java/hudson/os/solaris/ZFSProvisioner.java -rm core/src/main/java/hudson/os/solaris/ZFSInstaller.java - -# remove windows support (for now) -rm core/src/main/java/hudson/util/jna/Advapi32.java -rm core/src/main/java/hudson/util/jna/RegistryKey.java -rm core/src/main/java/hudson/util/jna/SHELLEXECUTEINFO.java -rm core/src/main/java/hudson/util/jna/Shell32.java -rm core/src/main/java/hudson/util/jna/WINBASE.java - -# TODO: prepare shaded asm5 and use it here -sed -i 's|org.kohsuke.asm5|org.objectweb.asm|g' core/src/main/java/hudson/util/SubClassGenerator.java - -# Don't add classpath entry to the manifest -%pom_xpath_remove pom:manifest/pom:addClasspath core - -# packaging layout -%mvn_package :jenkins-core core -%mvn_package :plugin plugins-pom -%mvn_package :cli cli -%mvn_package :pom core - -%if %{bootstrap} -%pom_disable_module war -%else -%mvn_package :jenkins-war __noinstall -%endif - -%pom_change_dep org.jenkins-ci:winstone :::compile war - -# CLI uber JAR -# useful, but bundling exception will be needed -%pom_remove_plugin :maven-assembly-plugin cli - -# Requires cannot be generated on jenkins-war (when building in bootstrap mode) -%pom_remove_dep org.jenkins-ci.main:jenkins-war plugins - -# parent pom has not been packaged yet (unknown license) -%pom_remove_parent -%pom_remove_parent plugins - -# a lot of missing deps for tests -%pom_disable_module test - -#%%pom_add_dep net.jcip:jcip-annotations core - -# remove unneeded/unavailable stuff -%pom_xpath_remove "pom:extensions[pom:extension[pom:artifactId[text()='wagon-gitsite']]]" -%pom_xpath_remove "pom:extensions[pom:extension[pom:artifactId[text()='wagon-gitsite']]]" plugins -%pom_xpath_remove "pom:dependencies[pom:dependency[pom:artifactId[text()='maven-jellydoc-plugin']]]" -%pom_remove_plugin :animal-sniffer-maven-plugin -%pom_remove_plugin :gmaven-plugin -%pom_remove_plugin :maven-enforcer-plugin -%pom_remove_plugin :maven-enforcer-plugin plugins -%pom_remove_plugin :maven-remote-resources-plugin -%pom_remove_plugin org.codehaus.gmaven:gmaven-plugin plugins -%pom_remove_plugin org.codehaus.gmaven:gmaven-plugin core -%pom_remove_plugin org.jvnet.hudson.tools:maven-encoding-plugin core -%pom_remove_plugin com.cloudbees:maven-license-plugin -%pom_remove_plugin com.cloudbees:maven-license-plugin plugins -%pom_remove_plugin :maven-jenkins-dev-plugin -%pom_remove_plugin :maven-dependency-plugin core - -# missing deps -%pom_remove_dep org.jenkins-ci.main:jenkins-test-harness plugins -%pom_remove_dep :animal-sniffer-annotations -%pom_remove_dep :animal-sniffer-annotations plugins -%pom_remove_dep org.jvnet.hudson:jtidy core -%pom_remove_dep org.jenkins-ci:core-annotation-processors core -%pom_remove_dep org.jruby.ext.posix:jna-posix core -%pom_remove_dep org.kohsuke.stapler:stapler-jrebel core -%pom_remove_dep org.kohsuke:windows-package-checker core -%pom_remove_dep org.kohsuke.stapler:stapler-adjunct-zeroclipboard core -%pom_remove_dep org.jvnet.hudson:activation core -%pom_remove_dep org.jvnet.winp:winp core -%pom_remove_dep org.jvnet.libzfs:libzfs core -%pom_remove_dep com.sun.solaris:embedded_su4j core -%pom_remove_dep org.kohsuke.jinterop:j-interop core -%pom_remove_dep org.jenkins-ci.modules:windows-slave-installer war -%pom_remove_dep org.jenkins-ci.modules:launchd-slave-installer war -%pom_remove_dep org.jenkins-ci.modules:upstart-slave-installer war -%pom_remove_dep org.jenkins-ci.modules:systemd-slave-installer war -%pom_remove_dep org.jenkins-ci.modules:slave-installer war - -#%%if %{bootstrap} -#%%endif -%pom_remove_plugin :maven-dependency-plugin war -#%%pom_xpath_remove "pom:plugin[pom:artifactId[text()='maven-dependency-plugin']]/pom:executions" war -%pom_remove_dep :cli war -%pom_add_dep org.bouncycastle:bcprov-jdk15on war -%pom_add_dep org.bouncycastle:bcpkix-jdk15on war -%pom_add_dep org.apache.sshd:sshd-core war - -# fix gId:aId -# groovy -%pom_remove_dep org.codehaus.groovy:groovy-all core -%pom_add_dep org.codehaus.groovy:groovy18:1.8 core -# jfreechart -%pom_remove_dep jfree:jfreechart core -%pom_add_dep org.jfree:jfreechart core -# jelly-tags -%pom_remove_dep org.jvnet.hudson:commons-jelly-tags-define core -%pom_add_dep commons-jelly:commons-jelly-tags-define core - -# jline 1.x is a compat package -%pom_remove_dep jline:jline core -%pom_add_dep jline:jline:1 core - -%build -%mvn_build -f -- -DadditionalJOption=--allow-script-in-comments - -%install -%mvn_install - -# wrapper script for CLI -%jpackage_script hudson.cli.CLI "" "" trilead-ssh2:commons-codec:jenkins-remoting/remoting:localizer/localizer:jenkins/cli %{name}-cli true - -%if !%{bootstrap} -install -d -m 755 %{buildroot}/%{homedir} -install -d -m 755 %{buildroot}/%{webroot} -install -d -m 755 %{buildroot}/%{homedir}/plugins -install -d -m 755 %{buildroot}/%{corepluginsdir} -install -d -m 755 %{buildroot}/%{workdir} -install -d -m 755 %{buildroot}/%{_localstatedir}/log/%{name} -install -d -m 755 %{buildroot}/%{_sysconfdir}/%{name} -install -d -m 755 %{buildroot}/%{_unitdir} -install -d -m 755 %{buildroot}/%{_libexecdir}/%{name} - -install -m 644 %{SOURCE6} %{buildroot}/%{_unitdir}/%{name}.service -install -m 644 %{SOURCE7} %{buildroot}/%{_libexecdir}/%{name}/%{name} - -# webapp -# we don't have packaging guidelines for web applications yet. -# just install exploded WAR to %{webroot} -unzip -d %{buildroot}/%{webroot}/ war/target/jenkins.war -cp war/src/main/webapp/WEB-INF/web.xml %{buildroot}/%{webroot}/WEB-INF/ -pushd %{buildroot}/%{webroot}/WEB-INF/lib - rm * - ln -sf `build-classpath access-modifier-annotation/access-modifier-annotation` access-modifier-annotation.jar - ln -sf `build-classpath acegisecurity/acegi-security` acegi-security.jar - #ln -sf `build-classpath ` activation-1.1.1-hudson-1.jar - ln -sf `build-classpath akuma/akuma` akuma-1.9.jar - ln -sf `build-classpath annotation-indexer/annotation-indexer` annotation-indexer.jar - ln -sf `build-classpath ant/ant` ant.jar - ln -sf `build-classpath ant/ant-launcher` ant-launcher.jar - ln -sf `build-classpath antlr` antlr.jar - ln -sf `build-classpath aopalliance` aopalliance.jar - ln -sf `build-classpath args4j/args4j` args4j.jar - # asm - ln -sf `build-classpath objectweb-asm/asm` asm.jar - ln -sf `build-classpath objectweb-asm/asm-analysis` asm-analysis.jar - ln -sf `build-classpath objectweb-asm/asm-commons` asm-commons.jar - ln -sf `build-classpath objectweb-asm/asm-tree` asm-tree.jar - ln -sf `build-classpath objectweb-asm/asm-util` asm-util.jar - # end asm - ln -sf `build-classpath bcpkix` bcpkix.jar - ln -sf `build-classpath bcprov` bcprov.jar - ln -sf `build-classpath bridge-method-injector/bridge-method-annotation` bridge-method-annotation.jar - ln -sf `build-classpath bytecode-compatibility-transformer/bytecode-compatibility-transformer` bytecode-compatibility-transformer.jar - ln -sf `build-classpath jenkins/cli` cli-%{version}.jar - ln -sf `build-classpath commons-beanutils` commons-beanutils.jar - ln -sf `build-classpath commons-codec` commons-codec.jar - ln -sf `build-classpath commons-collections` commons-collections.jar - ln -sf `build-classpath commons-compress` commons-compress.jar - ln -sf `build-classpath commons-digester` commons-digester.jar - ln -sf `build-classpath commons-discovery` commons-discovery.jar - ln -sf `build-classpath commons-fileupload` commons-fileupload.jar - ln -sf `build-classpath commons-httpclient3` commons-httpclient3.jar - ln -sf `build-classpath commons-io` commons-io.jar - ln -sf `build-classpath jenkins-commons-jelly/commons-jelly` commons-jelly.jar - ln -sf `build-classpath jenkins-commons-jelly/commons-jelly-tags-define` commons-jelly-tags-define.jar - ln -sf `build-classpath jenkins-commons-jelly/commons-jelly-tags-fmt` commons-jelly-tags-fmt.jar - ln -sf `build-classpath jenkins-commons-jelly/commons-jelly-tags-xml` commons-jelly-tags-xml.jar - ln -sf `build-classpath jenkins-jexl/commons-jexl` commons-jexl.jar - ln -sf `build-classpath commons-lang` commons-lang.jar - ln -sf `build-classpath commons-logging` commons-logging.jar - ln -sf `build-classpath constant-pool-scanner/constant-pool-scanner` constant-pool-scanner.jar - ln -sf `build-classpath jenkins-crypto-util/crypto-util` crypto-util.jar - ln -sf `build-classpath dom4j` dom4j.jar - #ln -sf `embedded_su4j` embedded_su4j.jar - ln -sf `build-classpath ezmorph` ezmorph.jar - ln -sf `build-classpath groovy18-1.8` groovy18-1.8.jar - ln -sf `build-classpath guava` guava.jar - ln -sf `build-classpath guice/google-guice-no_aop` guice.jar - ln -sf `build-classpath hamcrest/core` hamcrest-core.jar - ln -sf `build-classpath jenkins-icon-shim/icon-set` icon-set.jar - ln -sf `build-classpath jenkins-instance-identity/instance-identity` instance-identity.jar - ln -sf `build-classpath jansi/jansi` jansi.jar - ln -sf `build-classpath glassfish-annotation-api` javax.annotation-api.jar - ln -sf `build-classpath atinject` javax.inject.jar - ln -sf `build-classpath jaxen` jaxen.jar - ln -sf `build-classpath jBCrypt/jBCrypt` jbcrypt.jar - ln -sf `build-classpath jcifs` jcifs.jar - ln -sf `build-classpath jcommon/jcommon` jcommon.jar - ln -sf `build-classpath jenkins/jenkins-core` jenkins-core-%{version}.jar - ln -sf `build-classpath jffi/jffi` jffi.jar - ln -sf `build-classpath jffi/jffi-native` jffi-native.jar - ln -sf `build-classpath jfreechart/jfreechart` jfreechart.jar - #ln -sf `j-interop-2.0.6-kohsuke-1.jar` .jar - #ln -sf `j-interopdeps-2.0.6-kohsuke-1.jar` .jar - ln -sf `build-classpath jline1/jline-1.0` jline.jar - ln -sf `build-classpath jmdns/jmdns` jmdns.jar - ln -sf `build-classpath jna` jna-4.1.0.jar - #ln -sf `jna-posix-1.0.3-jenkins-1.jar` .jar - ln -sf `build-classpath jnr-constants` jnr-constants.jar - ln -sf `build-classpath jnr-ffi/jnr-ffi` jnr-ffi.jar - ln -sf `build-classpath jnr-posix` jnr-posix.jar - ln -sf `build-classpath jnr-x86asm` jnr-x86asm.jar - ln -sf `build-classpath jenkins-json-lib` json-lib.jar - ln -sf `build-classpath jsr-305` jsr305.jar - ln -sf `build-classpath tomcat-taglibs-standard/taglibs-standard-spec` jstl.jar - ln -sf `build-classpath jtidy` jtidy.jar - ln -sf `build-classpath junit` junit.jar - ln -sf `build-classpath jzlib` jzlib.jar - #ln -sf `launchd-slave-installer-1.2.jar` .jar - ln -sf `build-classpath libpam4j/libpam4j` libpam4j.jar - #ln -sf `libzfs-0.5.jar` .jar - ln -sf `build-classpath localizer/localizer` localizer.jar - ln -sf `build-classpath slf4j/log4j-over-slf4j` log4j-over-slf4j.jar - ln -sf `build-classpath javamail/mail` mail.jar - ln -sf `build-classpath jenkins-extras-memory-monitor/memory-monitor` memory-monitor.jar - ln -sf `build-classpath apache-mina/mina-core` mina-core.jar - ln -sf `build-classpath oro` oro.jar - ln -sf `build-classpath relaxngDatatype` relaxngDatatype.jar - ln -sf `build-classpath jenkins-remoting/remoting` remoting.jar - ln -sf `build-classpath robust-http-client/robust-http-client` robust-http-client.jar - ln -sf `build-classpath sezpoz/sezpoz` sezpoz.jar - #ln -sf `slave-installer-1.5.jar` .jar - ln -sf `build-classpath slf4j/slf4j-api` slf4j-api.jar - ln -sf `build-classpath slf4j/slf4j-jdk14` slf4j-jdk14.jar - # spring - ln -sf `build-classpath springframework/spring-aop` spring-aop.jar - ln -sf `build-classpath springframework/spring-beans` spring-beans.jar - ln -sf `build-classpath springframework/spring-context` spring-context.jar - ln -sf `build-classpath springframework/spring-context-support` spring-context-support.jar - ln -sf `build-classpath springframework/spring-core` spring-core.jar - ln -sf `build-classpath springframework/spring-expression` spring-expression.jar - ln -sf `build-classpath springframework/spring-instrument` spring-instrument.jar - ln -sf `build-classpath springframework/spring-jdbc` spring-jdbc.jar - ln -sf `build-classpath springframework/spring-oxm` spring-oxm.jar - ln -sf `build-classpath springframework/spring-tx` spring-tx.jar - ln -sf `build-classpath springframework/spring-web` spring-web.jar - ln -sf `build-classpath springframework/spring-webmvc` spring-webmvc.jar - # end spring - ln -sf `build-classpath jenkins-ssh-cli-auth/ssh-cli-auth` ssh-cli-auth.jar - ln -sf `build-classpath jenkins-sshd/sshd` sshd.jar - ln -sf `build-classpath apache-sshd/sshd-core` sshd-core.jar - ln -sf `build-classpath stapler/stapler` stapler.jar - ln -sf `build-classpath stapler-adjunct-codemirror/stapler-adjunct-codemirror` stapler-adjunct-codemirror.jar - ln -sf `build-classpath stapler-adjunct-timeline/stapler-adjunct-timeline` stapler-adjunct-timeline.jar - #ln -sf `stapler-adjunct-zeroclipboard-1.3.5-1.jar` .jar - ln -sf `build-classpath stapler/stapler-groovy` stapler-groovy.jar - ln -sf `build-classpath stapler/stapler-jelly` stapler-jelly.jar - #ln -sf `stapler-jrebel-1.234.jar` .jar - ln -sf `build-classpath bea-stax-api` bea-stax-api.jar - ln -sf `build-classpath stax2-api` stax2-api.jar - #ln -sf `systemd-slave-installer-1.1.jar` .jar - ln -sf `build-classpath jenkins-task-reactor/task-reactor` task-reactor.jar - ln -sf `build-classpath tiger-types` tiger-types.jar - ln -sf `build-classpath trilead-putty-extension/trilead-putty-extension` trilead-putty-extension.jar - ln -sf `build-classpath trilead-ssh2/trilead-ssh2` trilead-ssh2.jar - ln -sf `build-classpath txw2/txw2` txw2.jar - #ln -sf `upstart-slave-installer-1.1.jar` .jar - ln -sf `build-classpath jenkins-version-number/version-number` version-number.jar - #ln -sf `windows-package-checker-1.0.jar` .jar - #ln -sf `windows-slave-installer-1.4.jar` .jar - #ln -sf `winp-1.22.jar` .jar - ln -sf `build-classpath woodstox-core-asl` woodstox-core-asl.jar - ln -sf `build-classpath xpp3` xpp3.jar - ln -sf `build-classpath jenkins-xstream/xstream` xstream.jar - - # extra - ln -sf `build-classpath jenkins-winstone/winstone` ../../winstone.jar - ln -sf `build-classpath objectweb-asm3/asm-tree-distroshaded` asm-tree-distroshaded-any.jar - ln -sf `build-classpath objectweb-asm3/asm-util-distroshaded` asm-util-distroshaded-any.jar - ln -sf `build-classpath objectweb-asm3/asm-distroshaded` asm-distroshaded-any.jar - ln -sf `build-classpath objectweb-asm3/asm-commons-distroshaded` asm-commons-distroshaded-any.jar - ln -sf `build-classpath objectweb-asm3/asm-analysis-distroshaded` asm-analysis-distroshaded-any.jar -popd - -cp %{SOURCE8} %{buildroot}/%{webroot}/WEB-INF/classes/dependencies.txt -# remove bundled YUI library -rm -Rf %{buildroot}/%{webroot}/scripts/yui - -cp -p %{buildroot}/%{_javadir}/%{name}/cli.jar %{buildroot}/%{webroot}/WEB-INF/jenkins-cli.jar - -install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig -cp -p %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/%{name} -%endif # bootstrap - -%pre -# Add jenkins user and group -getent group %{name} >/dev/null || groupadd -r %{name} -getent passwd %{name} >/dev/null || \ - useradd -r -g %{name} -d %{workdir} -s /sbin/nologin \ - -c "Jenkins Continuous Build server" %{name} -exit 0 - -%post -%systemd_post %{name}.service - -%preun -%systemd_preun %{name}.service - -%postun -%systemd_postun_with_restart %{name}.service - -%files core -f .mfiles-core -%dir %{_javadir}/%{name} -%doc LICENSE.txt LICENSE-ASL-2.0.txt LICENSE-CDDL.txt - -%files -%defattr(0664, jenkins, jenkins, 0755) -%{_sysconfdir}/jenkins -%{_unitdir}/%{name}.service -%dir %{homedir} -%dir %{homedir}/plugins -%attr(0770, jenkins, jenkins) %{_libexecdir}/%{name} -%attr(0770, jenkins, jenkins) %{_localstatedir}/log/%{name} -%attr(0770, jenkins, jenkins) %dir %{workdir} - -%files plugins-pom -f .mfiles-plugins-pom - -%files cli -f .mfiles-cli -%{_bindir}/%{name}-cli -%doc LICENSE.txt - -%if !%{bootstrap} -%files webapp -%{webroot} -%{corepluginsdir} -%config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%doc LICENSE.txt -%endif # bootstrap - -%files javadoc -f .mfiles-javadoc -%doc LICENSE.txt - -%changelog -* Thu Jul 25 2019 Fedora Release Engineering - 1.651.3-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 1.651.3-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Aug 31 2018 Severin Gehwolf - 1.651.3-9 -- Add explicit requirement on javapackages-tools for jenkins-cli - script. See RHBZ#1600426. - -* Fri Jul 13 2018 Fedora Release Engineering - 1.651.3-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 07 2018 Fedora Release Engineering - 1.651.3-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.651.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Mar 04 2017 msrb - 1.651.3-5 -- Fix symlinks (Resolves: rhbz#1401161) -- Fix FTBFS (Resolves: rhbz#1423757) - -* Fri Feb 10 2017 Fedora Release Engineering - 1.651.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Jan 03 2017 Jon Ciesla - 1.651.3-3 -- Comment out mina and jtidy symlinks to allow service start. - -* Thu Nov 17 2016 Michal Srb - 1.651.3-2 -- Fix remote code execution vulnerability in remoting module -- Resolves: CVE-2016-9299 - -* Tue Jun 14 2016 Michal Srb - 1.651.3-1 -- Update to 1.651.1 - -* Fri May 13 2016 Michal Srb - 1.651.2-1 -- Update to 1.651.2 -- Resolves: CVE-2016-3721 -- Resolves: CVE-2016-3722 -- Resolves: CVE-2016-3723 -- Resolves: CVE-2016-3724 -- Resolves: CVE-2016-3725 -- Resolves: CVE-2016-3726 -- Resolves: CVE-2016-3727 - -* Tue Apr 26 2016 Michal Srb - 1.651.1-1 -- Update to 1.651.1 - -* Tue Apr 26 2016 Michal Srb - 1.642.3-2 -- Fix dangling symlink (Resolves: rhbz#1330472) - -* Fri Mar 18 2016 Michal Srb - 1.642.3-1 -- Update to 1.642.3 - -* Wed Mar 02 2016 Michal Srb - 1.642.2-2 -- Fix NoClassDefFoundError: org/codehaus/stax2/XMLInputFactory2 -- Resolves: rhbz#1311132 - -* Fri Feb 26 2016 Michal Srb - 1.642.2-1 -- Update to 1.642.2 - -* Thu Feb 04 2016 Fedora Release Engineering - 1.625.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Dec 21 2015 Michal Srb - 1.625.3-1 -- Update to 1.625.3 -- Resolves: CVE-2015-7536 -- Resolves: CVE-2015-7537 -- Resolves: CVE-2015-7538 -- Resolves: CVE-2015-7539 - -* Thu Nov 26 2015 Mikolaj Izdebski - 1.625.2-4 -- Remove workaround for rhbz#1276729 - -* Thu Nov 26 2015 Michal Srb - 1.625.2-3 -- Fix R - -* Thu Nov 12 2015 Michal Srb - 1.625.2-2 -- Add missing R: apache-commons-compress - -* Wed Nov 11 2015 Michal Srb - 1.625.2-1 -- Update to 1.625.2 -- Resolves: CVE-2015-5317 -- Resolves: CVE-2015-5318 -- Resolves: CVE-2015-5319 -- Resolves: CVE-2015-5320 -- Resolves: CVE-2015-5324 -- Resolves: CVE-2015-5321 -- Resolves: CVE-2015-5322 -- Resolves: CVE-2015-5323 -- Resolves: CVE-2015-5325 -- Resolves: CVE-2015-5326 -- Resolves: Remote code execution vulnerability due to unsafe deserialization in Jenkins remoting - -* Fri Oct 30 2015 Michal Srb - 1.625.1-1 -- Update to 1.625.1 - -* Fri Oct 02 2015 Michal Srb - 1.625-2 -- Fix plugins unpacking issue (rhbz#1267631) - -* Thu Oct 01 2015 Michal Srb - 1.625-1 -- Update to next LTS release 1.625 - -* Tue Sep 22 2015 Michal Srb - 1.616-8 -- Update description - -* Fri Jul 03 2015 Michal Srb - 1.616-7 -- Fix R - -* Mon Jun 29 2015 Michal Srb - 1.616-6 -- Fix BR/R -- Fix plugin-unpacking workaround - -* Mon Jun 29 2015 Michal Srb - 1.616-5 -- Start migration to mvn()-like Requires - -* Wed Jun 17 2015 Fedora Release Engineering - 1.616-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Mon Jun 15 2015 Michal Srb - 1.616-3 -- Fix BR on findbugs - -* Mon Jun 15 2015 Michal Srb - 1.616-2 -- Fix R - -* Thu Jun 04 2015 Michal Srb - 1.616-1 -- Update to upstream release 1.616 - -* Thu May 21 2015 Michal Srb - 1.614-1 -- Update to upstream release 1.614 - -* Fri May 08 2015 Michal Srb - 1.611-3 -- Spec clean up, add R: jenkins-script-security-plugin - -* Thu May 07 2015 Michal Srb - 1.611-2 -- Clean up dangling symlinks in JENKINS_HOME - -* Wed Apr 29 2015 Michal Srb - 1.611-1 -- Update to upstream release 1.611 - -* Mon Apr 13 2015 Michal Srb - 1.606-2 -- Migrate to plugins containing symlinks - -* Thu Mar 26 2015 Michal Srb - 1.606-1 -- Update to upstream release 1.606 -- Resolves: CVE-2015-1806 -- Resolves: CVE-2015-1807 -- Resolves: CVE-2015-1813 -- Resolves: CVE-2015-1812 -- Resolves: CVE-2015-1810 -- Resolves: CVE-2015-1808 -- Resolves: CVE-2015-1809 -- Resolves: CVE-2015-1814 -- Resolves: CVE-2015-1811 - -* Fri Mar 13 2015 Michal Srb - 1.598-9 -- Add BR: springframework-instrument - -* Thu Mar 12 2015 Michal Srb - 1.598-8 -- Fix jstl dep - -* Thu Mar 12 2015 Michal Srb - 1.598-7 -- Fix init script - -* Thu Mar 12 2015 Michal Srb - 1.598-6 -- Switch to unpacked executable-war - -* Wed Mar 11 2015 Michal Srb - 1.598-5 -- Sanitize R - -* Tue Mar 10 2015 Michal Srb - 1.598-4 -- Add missing R: springframework-instrument - -* Fri Mar 06 2015 Michal Srb - 1.598-3 -- Migrate to tomcat-taglibs-standard - -* Thu Feb 26 2015 Michal Srb - 1.598-2 -- Add missing BR: mvn(org.slf4j:slf4j-jdk14) - -* Tue Feb 03 2015 Michal Srb - 1.598-1 -- Update to upstream version 1.598 - -* Mon Feb 02 2015 Michal Srb - 1.590-2 -- Require jna >= 4.1.0-7 - -* Wed Nov 19 2014 Michal Srb - 1.590-1 -- Update to upstream version 1.590 -- Add R: jenkins-matrix-project-plugin - -* Wed Nov 12 2014 Michal Srb - 1.589-1 -- Update to upstream version 1.589 - -* Wed Oct 01 2014 Michal Srb - 1.581-3 -- Fix JENKINS_HOME ownership (Resolves: rhbz#1147846) -- Do not inform about upstream core updates (Resolves: rhbz#1147897) -- Move webroot to %%{webroot} -- Own directory for core plugins -- Make jenkins-cli.jar available for download (Resolves: rhbz#1147831) -- Make slave.jar available for download (Resolves: rhbz#1147978) -- Exclude unneeded slf4j binding (Resolves: rhbz#1147875) -- Fix "Incorrect plugin version to downgrade" bug (Resolves: rhbz#1147908) -- Fix "RPM plugin uninstallation is not persistent" (Resolves: rhbz#1147902) - -* Sun Sep 28 2014 Michal Srb - 1.581-2 -- Add R: jenkins-junit-plugin - -* Mon Sep 22 2014 Michal Srb - 1.581-1 -- Update to upstream version 1.581 -- Migrate to jenkins-winstone -- Initial support for plugins from RPMs -- Bugfixes - -* Wed Sep 03 2014 Michal Srb - 1.578-1 -- Update to upstream version 1.578 - -* Fri Aug 15 2014 Michal Srb - 1.575-2 -- Add R for webapp: jenkins-core and jenkins-cli - -* Fri Aug 15 2014 Michal Srb - 1.575-1 -- Update to upstream version 1.575 - -* Mon Jul 14 2014 Michal Srb - 1.572-1 -- Update to upstream version 1.572 - -* Fri Jul 11 2014 Michal Srb - 1.569-2 -- Exclude unneeded JARs - -* Thu Jun 26 2014 Michal Srb - 1.569-1 -- Update to upstream version 1.569 - -* Mon Jun 23 2014 Michal Srb - 1.557-14 -- Fix FTBFS - -* Sun Jun 08 2014 Fedora Release Engineering - 1.557-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Wed Apr 09 2014 Michal Srb - 1.557-12 -- Do not inherit default configuration from tomcat -- Tweak permissions - -* Mon Apr 07 2014 Michal Srb - 1.557-11 -- Run as a separate service - -* Mon Apr 07 2014 Michal Srb - 1.557-10 -- Remove forgotten BSD license references - -* Fri Apr 04 2014 Michal Srb - 1.557-9 -- Update license tag to reflect changes in 1.557 - -* Fri Apr 04 2014 Michal Srb - 1.557-8 -- Drop unneeded trilead-ssh2 patch - -* Fri Apr 04 2014 Michal Srb - 1.557-7 -- Spec file cleanup - -* Fri Apr 04 2014 Michal Srb - 1.557-6 -- Remove superfluous JARs from cli jpackage script - -* Fri Apr 04 2014 Michal Srb - 1.557-5 -- Use jline1 - -* Thu Apr 03 2014 Michal Srb - 1.557-4 -- Symlink remoting and cli JAR - -* Wed Apr 02 2014 Michal Srb - 1.557-3 -- Build with stapler-adjunct-codemirror - -* Tue Apr 01 2014 Michal Srb - 1.557-2 -- Allow symlinking - -* Tue Apr 01 2014 Michal Srb - 1.557-1 -- Update to upstream version 1.557 - -* Mon Mar 31 2014 Michal Srb - 1.549-8 -- First acegisecurity experiment - -* Mon Mar 31 2014 Michal Srb - 1.549-7 -- Symlink tomcat's work dir - -* Thu Mar 27 2014 Michal Srb - 1.549-6 -- Unbundle yui -- Install proper sysconfig - -* Thu Mar 27 2014 Michal Srb - 1.549-5 -- BR jenkins-core when building webapp - -* Thu Mar 27 2014 Michal Srb - 1.549-4 -- Add missing BR - -* Tue Mar 25 2014 Michal Srb - 1.549-3 -- Build webapp - -* Tue Mar 11 2014 Michal Srb - 1.549-2 -- Fix license tag -- Install missing licenses -- Remove bundled jars and classes - -* Wed Jan 29 2014 Michal Srb - 1.549-1 -- Initial packaging - diff --git a/remove-solaris-support-in-su.patch b/remove-solaris-support-in-su.patch deleted file mode 100644 index b14f0b6..0000000 --- a/remove-solaris-support-in-su.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 407e85690bf9965cb544ae2b49f27e923449a718 Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Fri, 27 Jun 2014 10:56:40 +0200 -Subject: [PATCH] remove solaris support from SU - ---- - core/src/main/java/hudson/os/SU.java | 16 ---------------- - 1 file changed, 16 deletions(-) - -diff --git a/core/src/main/java/hudson/os/SU.java b/core/src/main/java/hudson/os/SU.java -index 6a2b8ab..3a3fe9e 100644 ---- a/core/src/main/java/hudson/os/SU.java -+++ b/core/src/main/java/hudson/os/SU.java -@@ -23,7 +23,6 @@ - */ - package hudson.os; - --import com.sun.solaris.EmbeddedSu; - import hudson.FilePath; - import hudson.Launcher.LocalLauncher; - import hudson.Util; -@@ -96,21 +95,6 @@ public abstract class SU { - } - }.start(listener,rootPassword); - -- if(os.equals("SunOS")) -- return new UnixSu() { -- protected String sudoExe() { -- return "/usr/bin/pfexec"; -- } -- -- protected Process sudoWithPass(ArgumentListBuilder args) throws IOException { -- listener.getLogger().println("Running with embedded_su"); -- ProcessBuilder pb = new ProcessBuilder(args.prepend(sudoExe()).toCommandArray()); -- return EmbeddedSu.startWithSu(rootUsername, rootPassword, pb); -- } -- // in solaris, pfexec never asks for a password, so username==null means -- // we won't be using password. this helps disambiguate empty password -- }.start(listener,rootUsername==null?null:rootPassword); -- - // TODO: Mac? - - // unsupported platform, take a chance --- -1.9.3 - diff --git a/remove-windows-installer-support.patch b/remove-windows-installer-support.patch deleted file mode 100644 index 9b54a1b..0000000 --- a/remove-windows-installer-support.patch +++ /dev/null @@ -1,334 +0,0 @@ -From 58d965788ac40a9370509ccd9da7f3e316e0da23 Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Tue, 14 Jan 2014 07:53:40 +0100 -Subject: [PATCH 4/4] Remove Windows Installer support - ---- - .../hudson/lifecycle/WindowsInstallerLink.java | 315 --------------------- - 1 file changed, 315 deletions(-) - delete mode 100644 core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java - -diff --git a/core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java b/core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java -deleted file mode 100644 -index 4401b43..0000000 ---- a/core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java -+++ /dev/null -@@ -1,315 +0,0 @@ --/* -- * The MIT License -- * -- * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, CloudBees, Inc. -- * -- * Permission is hereby granted, free of charge, to any person obtaining a copy -- * of this software and associated documentation files (the "Software"), to deal -- * in the Software without restriction, including without limitation the rights -- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- * copies of the Software, and to permit persons to whom the Software is -- * furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included in -- * all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- * THE SOFTWARE. -- */ --package hudson.lifecycle; -- --import com.sun.jna.Native; --import hudson.Functions; --import hudson.Launcher.LocalLauncher; --import hudson.model.ManagementLink; --import hudson.model.TaskListener; --import hudson.util.jna.Kernel32Utils; --import hudson.util.jna.SHELLEXECUTEINFO; --import hudson.util.jna.Shell32; --import jenkins.model.Jenkins; --import hudson.AbortException; --import hudson.Extension; --import hudson.util.StreamTaskListener; --import hudson.util.jna.DotNet; --import org.apache.commons.io.IOUtils; --import org.kohsuke.stapler.QueryParameter; --import org.kohsuke.stapler.StaplerRequest; --import org.kohsuke.stapler.StaplerResponse; --import org.apache.commons.io.FileUtils; --import org.apache.commons.io.output.ByteArrayOutputStream; --import org.apache.tools.ant.taskdefs.Move; --import org.apache.tools.ant.Project; --import org.apache.tools.ant.DefaultLogger; --import org.apache.tools.ant.types.FileSet; -- --import javax.servlet.ServletException; --import java.io.File; --import java.io.FileInputStream; --import java.io.IOException; --import java.util.logging.Logger; --import java.util.logging.Level; --import java.net.URL; -- --import static hudson.util.jna.SHELLEXECUTEINFO.*; -- --/** -- * {@link ManagementLink} that allows the installation as a Windows service. -- * -- * @author Kohsuke Kawaguchi -- */ --public class WindowsInstallerLink extends ManagementLink { -- -- /** -- * Location of the jenkins.war. -- * In general case, we can't determine this value, yet having this is a requirement for the installer. -- */ -- private final File hudsonWar; -- -- /** -- * If the installation is completed, this value holds the installation directory. -- */ -- private volatile File installationDir; -- -- private WindowsInstallerLink(File jenkinsWar) { -- this.hudsonWar = jenkinsWar; -- } -- -- public String getIconFileName() { -- return "installer.gif"; -- } -- -- public String getUrlName() { -- return "install"; -- } -- -- public String getDisplayName() { -- return Messages.WindowsInstallerLink_DisplayName(); -- } -- -- public String getDescription() { -- return Messages.WindowsInstallerLink_Description(); -- } -- -- /** -- * Is the installation successful? -- */ -- public boolean isInstalled() { -- return installationDir!=null; -- } -- -- /** -- * Performs installation. -- */ -- public void doDoInstall(StaplerRequest req, StaplerResponse rsp, @QueryParameter("dir") String _dir) throws IOException, ServletException { -- if(installationDir!=null) { -- // installation already complete -- sendError("Installation is already complete",req,rsp); -- return; -- } -- if(!DotNet.isInstalled(2,0)) { -- sendError(".NET Framework 2.0 or later is required for this feature",req,rsp); -- return; -- } -- -- Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); -- -- File dir = new File(_dir).getAbsoluteFile(); -- dir.mkdirs(); -- if(!dir.exists()) { -- sendError("Failed to create installation directory: "+dir,req,rsp); -- return; -- } -- -- try { -- // copy files over there -- copy(req, rsp, dir, getClass().getResource("/windows-service/jenkins.exe"), "jenkins.exe"); -- copy(req, rsp, dir, getClass().getResource("/windows-service/jenkins.exe.config"), "jenkins.exe.config"); -- copy(req, rsp, dir, getClass().getResource("/windows-service/jenkins.xml"), "jenkins.xml"); -- if(!hudsonWar.getCanonicalFile().equals(new File(dir,"jenkins.war").getCanonicalFile())) -- copy(req, rsp, dir, hudsonWar.toURI().toURL(), "jenkins.war"); -- -- // install as a service -- ByteArrayOutputStream baos = new ByteArrayOutputStream(); -- StreamTaskListener task = new StreamTaskListener(baos); -- task.getLogger().println("Installing a service"); -- int r = runElevated(new File(dir, "jenkins.exe"), "install", task, dir); -- if(r!=0) { -- sendError(baos.toString(),req,rsp); -- return; -- } -- -- // installation was successful -- installationDir = dir; -- rsp.sendRedirect("."); -- } catch (AbortException e) { -- // this exception is used as a signal to terminate processing. the error should have been already reported -- } catch (InterruptedException e) { -- throw new ServletException(e); -- } -- } -- -- /** -- * Copies a single resource into the target folder, by the given name, and handle errors gracefully. -- */ -- private void copy(StaplerRequest req, StaplerResponse rsp, File dir, URL src, String name) throws ServletException, IOException { -- try { -- FileUtils.copyURLToFile(src,new File(dir, name)); -- } catch (IOException e) { -- LOGGER.log(Level.SEVERE, "Failed to copy "+name,e); -- sendError("Failed to copy "+name+": "+e.getMessage(),req,rsp); -- throw new AbortException(); -- } -- } -- -- public void doRestart(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { -- if(installationDir==null) { -- // if the user reloads the page after Hudson has restarted, -- // it comes back here. In such a case, don't let this restart Hudson. -- // so just send them back to the top page -- rsp.sendRedirect(req.getContextPath()+"/"); -- return; -- } -- Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); -- -- rsp.forward(this,"_restart",req); -- final File oldRoot = Jenkins.getInstance().getRootDir(); -- -- // initiate an orderly shutdown after we finished serving this request -- new Thread("terminator") { -- public void run() { -- try { -- Thread.sleep(1000); -- -- // let the service start after we close our sockets, to avoid conflicts -- Runtime.getRuntime().addShutdownHook(new Thread("service starter") { -- public void run() { -- try { -- if(!oldRoot.equals(installationDir)) { -- LOGGER.info("Moving data"); -- Move mv = new Move(); -- Project p = new Project(); -- p.addBuildListener(createLogger()); -- mv.setProject(p); -- FileSet fs = new FileSet(); -- fs.setDir(oldRoot); -- fs.setExcludes("war/**"); // we can't really move the exploded war. -- mv.addFileset(fs); -- mv.setTodir(installationDir); -- mv.setFailOnError(false); // plugins can also fail to move -- mv.execute(); -- } -- LOGGER.info("Starting a Windows service"); -- StreamTaskListener task = StreamTaskListener.fromStdout(); -- int r = runElevated( -- new File(installationDir, "jenkins.exe"), "start", task, installationDir); -- task.getLogger().println(r==0?"Successfully started":"start service failed. Exit code="+r); -- } catch (IOException e) { -- e.printStackTrace(); -- } catch (InterruptedException e) { -- e.printStackTrace(); -- } -- } -- -- private DefaultLogger createLogger() { -- DefaultLogger logger = new DefaultLogger(); -- logger.setOutputPrintStream(System.out); -- logger.setErrorPrintStream(System.err); -- return logger; -- } -- }); -- -- System.exit(0); -- } catch (InterruptedException e) { -- e.printStackTrace(); -- } -- } -- }.start(); -- } -- -- /** -- * Displays the error in a page. -- */ -- protected final void sendError(Exception e, StaplerRequest req, StaplerResponse rsp) throws ServletException, IOException { -- sendError(e.getMessage(),req,rsp); -- } -- -- protected final void sendError(String message, StaplerRequest req, StaplerResponse rsp) throws ServletException, IOException { -- req.setAttribute("message",message); -- req.setAttribute("pre",true); -- rsp.forward(Jenkins.getInstance(),"error",req); -- } -- -- /** -- * Decide if {@link WindowsInstallerLink} should show up in UI, and if so, register it. -- */ -- @Extension -- public static WindowsInstallerLink registerIfApplicable() { -- if(!Functions.isWindows()) -- return null; // this is a Windows only feature -- -- if(Lifecycle.get() instanceof WindowsServiceLifecycle) -- return null; // already installed as Windows service -- -- // this system property is set by the launcher when we run "java -jar jenkins.war" -- // and this is how we know where is jenkins.war. -- String war = System.getProperty("executable-war"); -- if(war!=null && new File(war).exists()) { -- WindowsInstallerLink link = new WindowsInstallerLink(new File(war)); -- -- // in certain situations where we know the user is just trying Jenkins (like when Jenkins is launched -- // from JNLP), also put this link on the navigation bar to increase -- // visibility -- if(System.getProperty(WindowsInstallerLink.class.getName()+".prominent")!=null) -- Jenkins.getInstance().getActions().add(link); -- -- return link; -- } -- -- return null; -- } -- -- /** -- * Invokes jenkins.exe with a SCM management command. -- * -- *

-- * If it fails in a way that indicates the presence of UAC, retry in an UAC compatible manner. -- */ -- static int runElevated(File jenkinsExe, String command, TaskListener out, File pwd) throws IOException, InterruptedException { -- try { -- return new LocalLauncher(out).launch().cmds(jenkinsExe, command).stdout(out).pwd(pwd).join(); -- } catch (IOException e) { -- if (e.getMessage().contains("CreateProcess") && e.getMessage().contains("=740")) { -- // fall through -- } else { -- throw e; -- } -- } -- -- // error code 740 is ERROR_ELEVATION_REQUIRED, indicating that -- // we run in UAC-enabled Windows and we need to run this in an elevated privilege -- SHELLEXECUTEINFO sei = new SHELLEXECUTEINFO(); -- sei.fMask = SEE_MASK_NOCLOSEPROCESS; -- sei.lpVerb = "runas"; -- sei.lpFile = jenkinsExe.getAbsolutePath(); -- sei.lpParameters = "/redirect redirect.log "+command; -- sei.lpDirectory = pwd.getAbsolutePath(); -- sei.nShow = SW_HIDE; -- if (!Shell32.INSTANCE.ShellExecuteEx(sei)) -- throw new IOException("Failed to shellExecute: "+ Native.getLastError()); -- -- try { -- return Kernel32Utils.waitForExitProcess(sei.hProcess); -- } finally { -- FileInputStream fin = new FileInputStream(new File(pwd,"redirect.log")); -- IOUtils.copy(fin, out.getLogger()); -- fin.close(); -- } -- } -- -- private static final Logger LOGGER = Logger.getLogger(WindowsInstallerLink.class.getName()); --} --- -1.8.3.1 - diff --git a/remove-windows-support-from-processtree.patch b/remove-windows-support-from-processtree.patch deleted file mode 100644 index 71ea779..0000000 --- a/remove-windows-support-from-processtree.patch +++ /dev/null @@ -1,123 +0,0 @@ -diff --git a/core/src/main/java/hudson/util/ProcessTree.java b/core/src/main/java/hudson/util/ProcessTree.java -index dd5a3d7..2ed12ab 100644 ---- a/core/src/main/java/hudson/util/ProcessTree.java -+++ b/core/src/main/java/hudson/util/ProcessTree.java -@@ -37,8 +37,6 @@ import hudson.util.ProcessTree.OSProcess; - import hudson.util.ProcessTreeRemoting.IOSProcess; - import hudson.util.ProcessTreeRemoting.IProcessTree; - import jenkins.security.SlaveToMasterCallable; --import org.jvnet.winp.WinProcess; --import org.jvnet.winp.WinpException; - - import java.io.*; - import java.lang.reflect.Field; -@@ -341,9 +339,6 @@ public abstract class ProcessTree implements Iterable, IProcessTree, - return DEFAULT; - - try { -- if(File.pathSeparatorChar==';') -- return new Windows(); -- - String os = Util.fixNull(System.getProperty("os.name")); - if(os.equals("Linux")) - return new Linux(); -@@ -402,99 +397,6 @@ public abstract class ProcessTree implements Iterable, IProcessTree, - } - }; - -- -- private static final class Windows extends Local { -- Windows() { -- for (final WinProcess p : WinProcess.all()) { -- int pid = p.getPid(); -- if(pid == 0 || pid == 4) continue; // skip the System Idle and System processes -- super.processes.put(pid,new OSProcess(pid) { -- private EnvVars env; -- private List args; -- -- public OSProcess getParent() { -- // windows process doesn't have parent/child relationship -- return null; -- } -- -- public void killRecursively() throws InterruptedException { -- if (getVeto() != null) -- return; -- -- LOGGER.finer("Killing recursively "+getPid()); -- p.killRecursively(); -- killByKiller(); -- } -- -- public void kill() throws InterruptedException { -- if (getVeto() != null) -- return; -- -- LOGGER.finer("Killing "+getPid()); -- p.kill(); -- killByKiller(); -- } -- -- @Override -- public synchronized List getArguments() { -- if(args==null) args = Arrays.asList(QuotedStringTokenizer.tokenize(p.getCommandLine())); -- return args; -- } -- -- @Override -- public synchronized EnvVars getEnvironmentVariables() { -- if(env !=null) -- return env; -- env = new EnvVars(); -- -- try -- { -- env.putAll(p.getEnvironmentVariables()); -- } catch (WinpException e) -- { -- LOGGER.log(FINE, "Failed to get environment variable ", e); -- } -- return env; -- } -- }); -- -- } -- } -- -- @Override -- public OSProcess get(Process proc) { -- return get(new WinProcess(proc).getPid()); -- } -- -- public void killAll(Map modelEnvVars) throws InterruptedException { -- for( OSProcess p : this) { -- if(p.getPid()<10) -- continue; // ignore system processes like "idle process" -- -- LOGGER.finest("Considering to kill "+p.getPid()); -- -- boolean matched; -- try { -- matched = p.hasMatchingEnvVars(modelEnvVars); -- } catch (WinpException e) { -- // likely a missing privilege -- LOGGER.log(FINEST," Failed to check environment variable match",e); -- continue; -- } -- -- if(matched) -- p.killRecursively(); -- else -- LOGGER.finest("Environment variable didn't match"); -- -- } -- } -- -- static { -- WinProcess.enableDebugPrivilege(); -- } -- } -- - static abstract class Unix extends Local { - @Override - public OSProcess get(Process proc) { diff --git a/sources b/sources deleted file mode 100644 index 55ec8d3..0000000 --- a/sources +++ /dev/null @@ -1,3 +0,0 @@ -3b83ef96387f14655fc854ddc3c6bd57 LICENSE-2.0.txt -745d7625e5d3e1e29e22ebce902f8740 plugin-1.642.4.pom -9a896def5d9dbb53accc7cd410d9471f jenkins-1.651.3.tar.gz diff --git a/use-guava-13.0.patch b/use-guava-13.0.patch deleted file mode 100644 index a9aae88..0000000 --- a/use-guava-13.0.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1f433991e5649327a343ca8bcc745b2b4f203ca9 Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Fri, 10 Jan 2014 09:59:38 +0100 -Subject: [PATCH] Port to guava 13.0+ - ---- - core/src/main/java/hudson/util/RunList.java | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/core/src/main/java/hudson/util/RunList.java b/core/src/main/java/hudson/util/RunList.java -index c86b0b0..d911af9 100644 ---- a/core/src/main/java/hudson/util/RunList.java -+++ b/core/src/main/java/hudson/util/RunList.java -@@ -138,7 +138,7 @@ public class RunList extends AbstractList { - public List subList(int fromIndex, int toIndex) { - List r = new ArrayList(); - Iterator itr = iterator(); -- Iterators.skip(itr,fromIndex); -+ Iterators.advance(itr,fromIndex); - for (int i=toIndex-fromIndex; i>0; i--) { - r.add(itr.next()); - } --- -1.8.3.1 -