[jetty/f19] Add description for jetty-util
by Michal Srb
commit 2c3ab1b69fd227178769b074db54d01e948b1fd1
Author: Michal Srb <msrb(a)redhat.com>
Date: Wed May 29 09:35:43 2013 +0200
Add description for jetty-util
jetty.spec | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/jetty.spec b/jetty.spec
index acb9287..73c13b9 100644
--- a/jetty.spec
+++ b/jetty.spec
@@ -55,7 +55,7 @@
Name: jetty
Version: 9.0.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Java Webserver and Servlet Container
Group: Applications/Internet
@@ -341,8 +341,8 @@ Summary: util module for Jetty
# Utf8Appendable.java is additionally under MIT license
License: (ASL 2.0 or EPL) and MIT
-
%description util
+%{extdesc} %{summary}.
%package util-ajax
Summary: util-ajax module for Jetty
@@ -796,6 +796,9 @@ getent passwd %username &>/dev/null || useradd -r -u %jtuid -g %username \
%doc NOTICE.txt LICENSE*
%changelog
+* Wed May 29 2013 Michal Srb <msrb(a)redhat.com> - 9.0.3-3
+- Add description for jetty-util
+
* Thu May 23 2013 Michal Srb <msrb(a)redhat.com> - 9.0.3-2
- Obsolete old jetty-websocket subpackage (Resolves: #966352)
10 years, 11 months
[sat4j/f19] Update to latest upstream.
by Krzysztof Daniel
Summary of changes:
761b0a6... Update to latest upstream. (*)
(*) This commit already existed in another branch; no separate mail sent
10 years, 11 months
[sat4j] Update to latest upstream.
by Krzysztof Daniel
commit 761b0a6a2a4c44410c15d644a3e1c5623563fc32
Author: Krzysztof Daniel <kdaniel(a)redhat.com>
Date: Wed May 29 08:32:05 2013 +0200
Update to latest upstream.
.gitignore | 4 ++++
sat4j-fetch.sh | 4 ++--
sat4j.spec | 5 ++++-
sources | 2 +-
4 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a5031a6..0694e7e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,7 @@ sat4j-2.3.0.tar.xz
/sat4j-2.3.3
/sat4j-2.3.4.tar.xz
/sat4j-2.3.4
+/sat4j-2.3.5.tar.xz
+/sat4j-2.3.5
+/.project
+/sat4j-2.3.5-1.fc20.src.rpm
diff --git a/sat4j-fetch.sh b/sat4j-fetch.sh
index 7429f40..9c134d6 100755
--- a/sat4j-fetch.sh
+++ b/sat4j-fetch.sh
@@ -1,7 +1,7 @@
#!/bin/sh
name=sat4j
-tag=org.ow2.sat4j.pom-2.3.4
-version=2.3.4
+tag=org.ow2.sat4j.pom-2.3.5
+version=2.3.5
tar_name=$name-$version
rm -fr $tar_name && mkdir $tar_name
diff --git a/sat4j.spec b/sat4j.spec
index ef1c359..c209433 100644
--- a/sat4j.spec
+++ b/sat4j.spec
@@ -7,7 +7,7 @@
%global build_date 20130405
Name: %{?scl_prefix}sat4j
-Version: 2.3.4
+Version: 2.3.5
Release: 1%{?dist}
Summary: A library of SAT solvers written in Java
@@ -67,6 +67,9 @@ rm -rf $RPM_BUILD_ROOT
%{_javadir}/org.sat4j*
%changelog
+* Wed May 29 2013 Krzysztof Daniel <kdaniel(a)redhat.com> 2.3.5-1
+- Update to latest upstream.
+
* Fri May 10 2013 Krzysztof Daniel <kdaniel(a)redhat.com> 2.3.4-1
- Update to latest upstream.
diff --git a/sources b/sources
index 50707b4..99442a6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-631f6f957e8da4afda44df8b693b5994 sat4j-2.3.4.tar.xz
+6708c1339b3fcacbe1b48720d1362808 sat4j-2.3.5.tar.xz
10 years, 11 months
[jenkins-remoting/f19] Add missing %dir
by Michal Srb
commit 6440b33e62162cdc82ccf7b801a2d658a77bfe3b
Author: Michal Srb <msrb(a)redhat.com>
Date: Wed May 29 08:08:07 2013 +0200
Add missing %dir
jenkins-remoting.spec | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/jenkins-remoting.spec b/jenkins-remoting.spec
index 0b12fa6..a6331ff 100644
--- a/jenkins-remoting.spec
+++ b/jenkins-remoting.spec
@@ -76,7 +76,7 @@ cp %{SOURCE2} .
%mvn_install
%files -f .mfiles
-%{_javadir}/%{name}
+%dir %{_javadir}/%{name}
%doc LICENSE-MIT LICENSE-ASL
%files javadoc -f .mfiles-javadoc
%doc LICENSE-MIT LICENSE-ASL
10 years, 11 months
[jenkins-remoting] Initial import
by Michal Srb
Summary of changes:
4af33bb... Initial import (*)
(*) This commit already existed in another branch; no separate mail sent
10 years, 11 months
[jenkins-remoting/f19] Initial import
by Michal Srb
commit 4af33bb69fbb49930469faa86cda42ae830d0402
Author: Michal Srb <msrb(a)redhat.com>
Date: Wed May 29 08:03:52 2013 +0200
Initial import
.gitignore | 2 +
0001-Proper-dependency-on-commons-io.patch | 128 ++++++++
0001-Remove-findbugs-annotation.patch | 32 ++
0001-Use-base64-implementation-from-JDK.patch | 406 +++++++++++++++++++++++++
LICENSE-MIT | 21 ++
jenkins-remoting.spec | 87 ++++++
sources | 2 +
7 files changed, 678 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..a81a598 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/remoting-2.23.tar.gz
+/LICENSE-2.0.txt
diff --git a/0001-Proper-dependency-on-commons-io.patch b/0001-Proper-dependency-on-commons-io.patch
new file mode 100644
index 0000000..8949aea
--- /dev/null
+++ b/0001-Proper-dependency-on-commons-io.patch
@@ -0,0 +1,128 @@
+From 5aeca0abd69c6b5977fc2066f2c11ffc1f982df9 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb(a)redhat.com>
+Date: Wed, 15 May 2013 10:57:23 +0200
+Subject: [PATCH] Proper dependency on commons-io
+
+Remove bundled class from commons-io
+---
+ src/main/java/hudson/remoting/Launcher.java | 1 +
+ src/main/java/hudson/remoting/TeeOutputStream.java | 95 ----------------------
+ 2 files changed, 1 insertion(+), 95 deletions(-)
+ delete mode 100644 src/main/java/hudson/remoting/TeeOutputStream.java
+
+diff --git a/src/main/java/hudson/remoting/Launcher.java b/src/main/java/hudson/remoting/Launcher.java
+index e7bfed2..e7181c6 100644
+--- a/src/main/java/hudson/remoting/Launcher.java
++++ b/src/main/java/hudson/remoting/Launcher.java
+@@ -27,6 +27,7 @@ import hudson.remoting.Channel.Mode;
+ import org.w3c.dom.Document;
+ import org.w3c.dom.NodeList;
+ import org.xml.sax.SAXException;
++import org.apache.commons.io.output.TeeOutputStream;
+ import org.kohsuke.args4j.Option;
+ import org.kohsuke.args4j.CmdLineParser;
+ import org.kohsuke.args4j.CmdLineException;
+diff --git a/src/main/java/hudson/remoting/TeeOutputStream.java b/src/main/java/hudson/remoting/TeeOutputStream.java
+deleted file mode 100644
+index 56051fc..0000000
+--- a/src/main/java/hudson/remoting/TeeOutputStream.java
++++ /dev/null
+@@ -1,95 +0,0 @@
+-/*
+- * Licensed to the Apache Software Foundation (ASF) under one or more
+- * contributor license agreements. See the NOTICE file distributed with
+- * this work for additional information regarding copyright ownership.
+- * The ASF licenses this file to You under the Apache License, Version 2.0
+- * (the "License"); you may not use this file except in compliance with
+- * the License. You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-package hudson.remoting;
+-
+-import java.io.FilterOutputStream;
+-import java.io.IOException;
+-import java.io.OutputStream;
+-
+-/**
+- * Classic splitter of OutputStream. Named after the unix 'tee'
+- * command. It allows a stream to be branched off so there
+- * are now two streams.
+- *
+- * @version $Id: TeeOutputStream.java 610010 2008-01-08 14:50:59Z niallp $
+- */
+-class TeeOutputStream extends FilterOutputStream {
+-
+- /** the second OutputStream to write to */
+- protected OutputStream branch;
+-
+- /**
+- * Constructs a TeeOutputStream.
+- * @param out the main OutputStream
+- * @param branch the second OutputStream
+- */
+- public TeeOutputStream( OutputStream out, OutputStream branch ) {
+- super(out);
+- this.branch = branch;
+- }
+-
+- /**
+- * Write the bytes to both streams.
+- * @param b the bytes to write
+- * @throws IOException if an I/O error occurs
+- */
+- public synchronized void write(byte[] b) throws IOException {
+- super.write(b);
+- this.branch.write(b);
+- }
+-
+- /**
+- * Write the specified bytes to both streams.
+- * @param b the bytes to write
+- * @param off The start offset
+- * @param len The number of bytes to write
+- * @throws IOException if an I/O error occurs
+- */
+- public synchronized void write(byte[] b, int off, int len) throws IOException {
+- super.write(b, off, len);
+- this.branch.write(b, off, len);
+- }
+-
+- /**
+- * Write a byte to both streams.
+- * @param b the byte to write
+- * @throws IOException if an I/O error occurs
+- */
+- public synchronized void write(int b) throws IOException {
+- super.write(b);
+- this.branch.write(b);
+- }
+-
+- /**
+- * Flushes both streams.
+- * @throws IOException if an I/O error occurs
+- */
+- public void flush() throws IOException {
+- super.flush();
+- this.branch.flush();
+- }
+-
+- /**
+- * Closes both streams.
+- * @throws IOException if an I/O error occurs
+- */
+- public void close() throws IOException {
+- super.close();
+- this.branch.close();
+- }
+-
+-}
+--
+1.8.1.4
+
diff --git a/0001-Remove-findbugs-annotation.patch b/0001-Remove-findbugs-annotation.patch
new file mode 100644
index 0000000..827ad91
--- /dev/null
+++ b/0001-Remove-findbugs-annotation.patch
@@ -0,0 +1,32 @@
+From 27d3350b8dfe03618703199ffb615e454ecd630a Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb(a)redhat.com>
+Date: Fri, 19 Apr 2013 14:08:54 +0200
+Subject: [PATCH] Remove findbugs annotation
+
+---
+ src/main/java/hudson/remoting/Channel.java | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/main/java/hudson/remoting/Channel.java b/src/main/java/hudson/remoting/Channel.java
+index 1445108..d51785b 100644
+--- a/src/main/java/hudson/remoting/Channel.java
++++ b/src/main/java/hudson/remoting/Channel.java
+@@ -23,7 +23,6 @@
+ */
+ package hudson.remoting;
+
+-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+ import hudson.remoting.CommandTransport.CommandReceiver;
+ import hudson.remoting.ExportTable.ExportList;
+ import hudson.remoting.PipeWindow.Key;
+@@ -715,7 +714,6 @@ public class Channel implements VirtualChannel, IChannel, Closeable {
+ * The error that caused the connection to be aborted. Never null.
+ */
+ @java.lang.SuppressWarnings("ToArrayCallWithZeroLengthArrayArgument")
+- @SuppressWarnings("ITA_INEFFICIENT_TO_ARRAY") // intentionally; race condition on listeners otherwise
+ protected void terminate(IOException e) {
+ try {
+ synchronized (this) {
+--
+1.8.1.4
+
diff --git a/0001-Use-base64-implementation-from-JDK.patch b/0001-Use-base64-implementation-from-JDK.patch
new file mode 100644
index 0000000..6903b1a
--- /dev/null
+++ b/0001-Use-base64-implementation-from-JDK.patch
@@ -0,0 +1,406 @@
+From d7e4014c479d504018141d47771b8f618c14e47a Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb(a)redhat.com>
+Date: Wed, 15 May 2013 10:33:43 +0200
+Subject: [PATCH] Use base64 implementation from JDK
+
+---
+ src/main/java/hudson/remoting/Base64.java | 303 ---------------------
+ src/main/java/hudson/remoting/Engine.java | 3 +-
+ src/main/java/hudson/remoting/Launcher.java | 3 +-
+ .../java/hudson/remoting/BinarySafeStreamTest.java | 7 +-
+ 4 files changed, 8 insertions(+), 308 deletions(-)
+ delete mode 100644 src/main/java/hudson/remoting/Base64.java
+
+diff --git a/src/main/java/hudson/remoting/Base64.java b/src/main/java/hudson/remoting/Base64.java
+deleted file mode 100644
+index c73c9c1..0000000
+--- a/src/main/java/hudson/remoting/Base64.java
++++ /dev/null
+@@ -1,303 +0,0 @@
+-/*
+- * Copyright 1999-2002,2004 The Apache Software Foundation.
+- *
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- * http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-package hudson.remoting;
+-
+-/**
+- * This class provides encode/decode for RFC 2045 Base64 as
+- * defined by RFC 2045, N. Freed and N. Borenstein.
+- * RFC 2045: Multipurpose Internet Mail Extensions (MIME)
+- * Part One: Format of Internet Message Bodies. Reference
+- * 1996 Available at: http://www.ietf.org/rfc/rfc2045.txt
+- * This class is used by XML Schema binary format validation
+- *
+- * This implementation does not encode/decode streaming
+- * data. You need the data that you will encode/decode
+- * already on a byte arrray.
+- *
+- * @xerces.internal
+- *
+- * @author Jeffrey Rodriguez
+- * @author Sandy Gao
+- * @version $Id: Base64.java,v 1.4 2007/07/19 04:38:32 ofung Exp $
+- */
+-public final class Base64 {
+-
+- static private final int BASELENGTH = 128;
+- static private final int LOOKUPLENGTH = 64;
+- static private final int TWENTYFOURBITGROUP = 24;
+- static private final int EIGHTBIT = 8;
+- static private final int SIXTEENBIT = 16;
+- static private final int SIXBIT = 6;
+- static private final int FOURBYTE = 4;
+- static private final int SIGN = -128;
+- static private final char PAD = '=';
+- static private final boolean fDebug = false;
+- static final private byte [] base64Alphabet = new byte[BASELENGTH];
+- static final private char [] lookUpBase64Alphabet = new char[LOOKUPLENGTH];
+-
+- static {
+-
+- for (int i = 0; i < BASELENGTH; ++i) {
+- base64Alphabet[i] = -1;
+- }
+- for (int i = 'Z'; i >= 'A'; i--) {
+- base64Alphabet[i] = (byte) (i-'A');
+- }
+- for (int i = 'z'; i>= 'a'; i--) {
+- base64Alphabet[i] = (byte) ( i-'a' + 26);
+- }
+-
+- for (int i = '9'; i >= '0'; i--) {
+- base64Alphabet[i] = (byte) (i-'0' + 52);
+- }
+-
+- base64Alphabet['+'] = 62;
+- base64Alphabet['/'] = 63;
+-
+- for (int i = 0; i<=25; i++)
+- lookUpBase64Alphabet[i] = (char)('A'+i);
+-
+- for (int i = 26, j = 0; i<=51; i++, j++)
+- lookUpBase64Alphabet[i] = (char)('a'+ j);
+-
+- for (int i = 52, j = 0; i<=61; i++, j++)
+- lookUpBase64Alphabet[i] = (char)('0' + j);
+- lookUpBase64Alphabet[62] = (char)'+';
+- lookUpBase64Alphabet[63] = (char)'/';
+-
+- }
+-
+- protected static boolean isWhiteSpace(char octect) {
+- return (octect == 0x20 || octect == 0xd || octect == 0xa || octect == 0x9);
+- }
+-
+- protected static boolean isPad(char octect) {
+- return (octect == PAD);
+- }
+-
+- protected static boolean isData(char octect) {
+- return (octect < BASELENGTH && base64Alphabet[octect] != -1);
+- }
+-
+- protected static boolean isBase64(char octect) {
+- return (isWhiteSpace(octect) || isPad(octect) || isData(octect));
+- }
+-
+- /**
+- * Encodes hex octects into Base64
+- *
+- * @param binaryData Array containing binaryData
+- * @return Encoded Base64 array
+- */
+- public static String encode(byte[] binaryData) {
+-
+- if (binaryData == null)
+- return null;
+-
+- int lengthDataBits = binaryData.length*EIGHTBIT;
+- if (lengthDataBits == 0) {
+- return "";
+- }
+-
+- int fewerThan24bits = lengthDataBits%TWENTYFOURBITGROUP;
+- int numberTriplets = lengthDataBits/TWENTYFOURBITGROUP;
+- int numberQuartet = fewerThan24bits != 0 ? numberTriplets+1 : numberTriplets;
+- char encodedData[] = null;
+-
+- encodedData = new char[numberQuartet*4];
+-
+- byte k=0, l=0, b1=0,b2=0,b3=0;
+-
+- int encodedIndex = 0;
+- int dataIndex = 0;
+- if (fDebug) {
+- System.out.println("number of triplets = " + numberTriplets );
+- }
+-
+- for (int i=0; i<numberTriplets; i++) {
+- b1 = binaryData[dataIndex++];
+- b2 = binaryData[dataIndex++];
+- b3 = binaryData[dataIndex++];
+-
+- if (fDebug) {
+- System.out.println( "b1= " + b1 +", b2= " + b2 + ", b3= " + b3 );
+- }
+-
+- l = (byte)(b2 & 0x0f);
+- k = (byte)(b1 & 0x03);
+-
+- byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
+-
+- byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);
+- byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);
+-
+- if (fDebug) {
+- System.out.println( "val2 = " + val2 );
+- System.out.println( "k4 = " + (k<<4));
+- System.out.println( "vak = " + (val2 | (k<<4)));
+- }
+-
+- encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];
+- encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];
+- encodedData[encodedIndex++] = lookUpBase64Alphabet[ (l <<2 ) | val3 ];
+- encodedData[encodedIndex++] = lookUpBase64Alphabet[ b3 & 0x3f ];
+- }
+-
+- // form integral number of 6-bit groups
+- if (fewerThan24bits == EIGHTBIT) {
+- b1 = binaryData[dataIndex];
+- k = (byte) ( b1 &0x03 );
+- if (fDebug) {
+- System.out.println("b1=" + b1);
+- System.out.println("b1<<2 = " + (b1>>2) );
+- }
+- byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
+- encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];
+- encodedData[encodedIndex++] = lookUpBase64Alphabet[ k<<4 ];
+- encodedData[encodedIndex++] = PAD;
+- encodedData[encodedIndex++] = PAD;
+- } else if (fewerThan24bits == SIXTEENBIT) {
+- b1 = binaryData[dataIndex];
+- b2 = binaryData[dataIndex +1 ];
+- l = ( byte ) ( b2 &0x0f );
+- k = ( byte ) ( b1 &0x03 );
+-
+- byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
+- byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);
+-
+- encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];
+- encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];
+- encodedData[encodedIndex++] = lookUpBase64Alphabet[ l<<2 ];
+- encodedData[encodedIndex++] = PAD;
+- }
+-
+- return new String(encodedData);
+- }
+-
+- /**
+- * Decodes Base64 data into octects
+- *
+- * @param encoded string containing Base64 data
+- * @return Array containind decoded data.
+- */
+- public static byte[] decode(String encoded) {
+-
+- if (encoded == null)
+- return null;
+-
+- char[] base64Data = encoded.toCharArray();
+- // remove white spaces
+- int len = removeWhiteSpace(base64Data);
+-
+- if (len%FOURBYTE != 0) {
+- return null;//should be divisible by four
+- }
+-
+- int numberQuadruple = (len/FOURBYTE );
+-
+- if (numberQuadruple == 0)
+- return new byte[0];
+-
+- byte decodedData[] = null;
+- byte b1=0,b2=0,b3=0,b4=0;
+- char d1=0,d2=0,d3=0,d4=0;
+-
+- int i = 0;
+- int encodedIndex = 0;
+- int dataIndex = 0;
+- decodedData = new byte[ (numberQuadruple)*3];
+-
+- for (; i<numberQuadruple-1; i++) {
+-
+- if (!isData( (d1 = base64Data[dataIndex++]) )||
+- !isData( (d2 = base64Data[dataIndex++]) )||
+- !isData( (d3 = base64Data[dataIndex++]) )||
+- !isData( (d4 = base64Data[dataIndex++]) ))
+- return null;//if found "no data" just return null
+-
+- b1 = base64Alphabet[d1];
+- b2 = base64Alphabet[d2];
+- b3 = base64Alphabet[d3];
+- b4 = base64Alphabet[d4];
+-
+- decodedData[encodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ;
+- decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );
+- decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );
+- }
+-
+- if (!isData( (d1 = base64Data[dataIndex++]) ) ||
+- !isData( (d2 = base64Data[dataIndex++]) )) {
+- return null;//if found "no data" just return null
+- }
+-
+- b1 = base64Alphabet[d1];
+- b2 = base64Alphabet[d2];
+-
+- d3 = base64Data[dataIndex++];
+- d4 = base64Data[dataIndex++];
+- if (!isData( (d3 ) ) ||
+- !isData( (d4 ) )) {//Check if they are PAD characters
+- if (isPad( d3 ) && isPad( d4)) { //Two PAD e.g. 3c[Pad][Pad]
+- if ((b2 & 0xf) != 0)//last 4 bits should be zero
+- return null;
+- byte[] tmp = new byte[ i*3 + 1 ];
+- System.arraycopy( decodedData, 0, tmp, 0, i*3 );
+- tmp[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ;
+- return tmp;
+- } else if (!isPad( d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad]
+- b3 = base64Alphabet[ d3 ];
+- if ((b3 & 0x3 ) != 0)//last 2 bits should be zero
+- return null;
+- byte[] tmp = new byte[ i*3 + 2 ];
+- System.arraycopy( decodedData, 0, tmp, 0, i*3 );
+- tmp[encodedIndex++] = (byte)( b1 <<2 | b2>>4 );
+- tmp[encodedIndex] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );
+- return tmp;
+- } else {
+- return null;//an error like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data
+- }
+- } else { //No PAD e.g 3cQl
+- b3 = base64Alphabet[ d3 ];
+- b4 = base64Alphabet[ d4 ];
+- decodedData[encodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ;
+- decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );
+- decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );
+-
+- }
+-
+- return decodedData;
+- }
+-
+- /**
+- * remove WhiteSpace from MIME containing encoded Base64 data.
+- *
+- * @param data the byte array of base64 data (with WS)
+- * @return the new length
+- */
+- protected static int removeWhiteSpace(char[] data) {
+- if (data == null)
+- return 0;
+-
+- // count characters that's not whitespace
+- int newSize = 0;
+- int len = data.length;
+- for (int i = 0; i < len; i++) {
+- if (!isWhiteSpace(data[i]))
+- data[newSize++] = data[i];
+- }
+- return newSize;
+- }
+-}
+diff --git a/src/main/java/hudson/remoting/Engine.java b/src/main/java/hudson/remoting/Engine.java
+index 85453e0..e883285 100644
+--- a/src/main/java/hudson/remoting/Engine.java
++++ b/src/main/java/hudson/remoting/Engine.java
+@@ -39,6 +39,7 @@ import java.util.concurrent.ThreadFactory;
+ import java.util.List;
+ import java.util.Collections;
+ import java.util.logging.Logger;
++import javax.xml.bind.DatatypeConverter;
+
+ /**
+ * Slave agent engine that proactively connects to Hudson master.
+@@ -149,7 +150,7 @@ public class Engine extends Thread {
+ HttpURLConnection con = (HttpURLConnection)salURL.openConnection();
+ if (con instanceof HttpURLConnection && credentials != null) {
+ // XXX /tcpSlaveAgentListener is unprotected so why do we need to pass any credentials?
+- String encoding = Base64.encode(credentials.getBytes());
++ String encoding = DatatypeConverter.printBase64Binary(credentials.getBytes());
+ con.setRequestProperty("Authorization", "Basic " + encoding);
+ }
+ try {
+diff --git a/src/main/java/hudson/remoting/Launcher.java b/src/main/java/hudson/remoting/Launcher.java
+index 9718c1c..e7bfed2 100644
+--- a/src/main/java/hudson/remoting/Launcher.java
++++ b/src/main/java/hudson/remoting/Launcher.java
+@@ -78,6 +78,7 @@ import java.security.SecureRandom;
+ import java.util.Properties;
+ import javax.crypto.Cipher;
+ import javax.crypto.spec.SecretKeySpec;
++import javax.xml.bind.DatatypeConverter;
+
+ /**
+ * Entry point for running a {@link Channel}. This is the main method of the slave JVM.
+@@ -239,7 +240,7 @@ public class Launcher {
+ if (con instanceof HttpURLConnection && slaveJnlpCredentials != null) {
+ HttpURLConnection http = (HttpURLConnection) con;
+ String userPassword = slaveJnlpCredentials;
+- String encoding = Base64.encode(userPassword.getBytes());
++ String encoding = DatatypeConverter.printBase64Binary(userPassword.getBytes());
+ http.setRequestProperty("Authorization", "Basic " + encoding);
+ }
+ con.connect();
+diff --git a/src/test/java/hudson/remoting/BinarySafeStreamTest.java b/src/test/java/hudson/remoting/BinarySafeStreamTest.java
+index 41bc13e..64b9e67 100644
+--- a/src/test/java/hudson/remoting/BinarySafeStreamTest.java
++++ b/src/test/java/hudson/remoting/BinarySafeStreamTest.java
+@@ -32,6 +32,7 @@ import java.io.InputStream;
+ import java.io.OutputStream;
+ import java.util.Arrays;
+ import java.util.Random;
++import javax.xml.bind.DatatypeConverter;
+
+ /**
+ * @author Kohsuke Kawaguchi
+@@ -55,7 +56,7 @@ public class BinarySafeStreamTest extends TestCase {
+
+ public void testSingleWrite() throws IOException {
+ byte[] ds = getDataSet(65536);
+- String master = Base64.encode(ds);
++ String master = DatatypeConverter.printBase64Binary(ds);
+
+ ByteArrayOutputStream buf = new ByteArrayOutputStream();
+ OutputStream o = BinarySafeStream.wrap(buf);
+@@ -66,7 +67,7 @@ public class BinarySafeStreamTest extends TestCase {
+
+ public void testChunkedWrites() throws IOException {
+ byte[] ds = getDataSet(65536);
+- String master = Base64.encode(ds);
++ String master = DatatypeConverter.printBase64Binary(ds);
+
+ Random r = new Random(0);
+ for( int i=0; i<16; i++) {
+@@ -123,7 +124,7 @@ public class BinarySafeStreamTest extends TestCase {
+ int ptr=0;
+
+ for( int i=0; i<s.length(); i+=4 ) {
+- byte[] buf = Base64.decode(s.substring(i,i+4));
++ byte[] buf = DatatypeConverter.parseBase64Binary(s.substring(i,i+4));
+ for (int j = 0; j < buf.length; j++) {
+ if(buf[j]!=dataSet[ptr])
+ fail("encoding error at offset "+ptr);
+--
+1.8.1.4
+
diff --git a/LICENSE-MIT b/LICENSE-MIT
new file mode 100644
index 0000000..242132d
--- /dev/null
+++ b/LICENSE-MIT
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) <year> <copyright holders>
+
+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.
diff --git a/jenkins-remoting.spec b/jenkins-remoting.spec
new file mode 100644
index 0000000..0b12fa6
--- /dev/null
+++ b/jenkins-remoting.spec
@@ -0,0 +1,87 @@
+%global shortname remoting
+
+Name: jenkins-remoting
+Version: 2.23
+Release: 1%{?dist}
+Summary: Jenkins remoting module
+
+# License is specified in pom file
+# The project is under MIT license, but 2 contributed classes
+# (FastPipedOutputStream, FastPipedInputStream) are under ASL 2.0
+License: MIT and ASL 2.0
+URL: https://github.com/jenkinsci/remoting
+Source0: https://github.com/jenkinsci/remoting/archive/remoting-%{version}.tar.gz
+# License text copied from http://www.opensource.org/licenses/mit-license.php
+Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
+Source2: LICENSE-MIT
+Patch0: 0001-Remove-findbugs-annotation.patch
+# TODO possibly upstreamable, need testing
+Patch1: 0001-Use-base64-implementation-from-JDK.patch
+Patch2: 0001-Proper-dependency-on-commons-io.patch
+
+BuildArch: noarch
+
+BuildRequires: maven-local
+BuildRequires: mvn(args4j:args4j)
+BuildRequires: mvn(commons-io:commons-io)
+
+
+%description
+This package is primarily used by Jenkins for slave node management,
+but it could be potentially reused outside of this project.
+
+%package javadoc
+Summary: Javadoc for %{name}
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+%prep
+%setup -q -n %{shortname}-%{shortname}-%{version}
+
+cp %{SOURCE1} LICENSE-ASL
+cp %{SOURCE2} .
+
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+# Nothing really interesting in parent
+%pom_remove_parent
+
+# args4j dependency should have scope 'compile', not 'provided'
+%pom_xpath_replace "pom:dependency[pom:artifactId[text()='args4j']]/pom:scope" \
+ "<scope>compile</scope>"
+
+# We don't have or don't need following plugins
+%pom_remove_plugin :maven-jarsigner-plugin
+%pom_remove_plugin :build-helper-maven-plugin
+%pom_remove_plugin :animal-sniffer-maven-plugin
+%pom_remove_plugin :maven-dependency-plugin
+
+# Not really used in source files
+%pom_remove_dep :animal-sniffer-annotation
+# patched out from source files, we don't need it
+%pom_remove_dep :findbugs-annotations
+
+# Replace bundled class from commons-io with proper dependency
+%pom_xpath_replace "pom:dependency[pom:artifactId[text()='commons-io']]/pom:scope" \
+ "<scope>compile</scope>"
+
+%build
+# Disabled tests because of missing org.jvnet.hudson:test-annotations
+%mvn_build -f
+
+%install
+%mvn_install
+
+%files -f .mfiles
+%{_javadir}/%{name}
+%doc LICENSE-MIT LICENSE-ASL
+%files javadoc -f .mfiles-javadoc
+%doc LICENSE-MIT LICENSE-ASL
+
+%changelog
+* Fri Apr 19 2013 Michal Srb <msrb(a)redhat.com> - 2.23-1
+- Initial package
+
diff --git a/sources b/sources
index e69de29..38a5128 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+3864ed76dca662ee000f3152ad78c1c4 remoting-2.23.tar.gz
+3b83ef96387f14655fc854ddc3c6bd57 LICENSE-2.0.txt
10 years, 11 months