%global shortname remoting
%global webinfdir %{_datadir}/jenkins/webroot/WEB-INF
Name: jenkins-remoting
Version: 2.62.3
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
# TODO possibly upstreamable, need testing
Patch1: 0001-Use-base64-implementation-from-JDK.patch
Patch2: 0002-No-Sniffing.patch
BuildArch: noarch
BuildRequires: maven-local
BuildRequires: mvn(args4j:args4j)
BuildRequires: mvn(asm:asm-all)
BuildRequires: mvn(com.google.code.findbugs:jsr305)
BuildRequires: mvn(com.google.guava:guava)
BuildRequires: mvn(commons-io:commons-io)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.ant:ant)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-pmd-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-release-plugin)
BuildRequires: mvn(org.jacoco:jacoco-maven-plugin)
BuildRequires: mvn(org.jenkins-ci:constant-pool-scanner)
BuildRequires: mvn(com.google.code.findbugs:annotations)
# missing test deps:
#BuildRequires: mvn(org.codehaus.mojo:findbugs-maven-plugin)
#BuildRequires: mvn(org.jvnet.hudson:test-annotations)
%description
This package is primarily used by Jenkins for slave node management,
but it could be potentially reused outside of this project.
%package webapp
Summary: Remoting module for Jenkins webapp
Requires: jenkins-webapp
%description webapp
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} .
%patch1 -p1
%patch2 -p1
# Nothing really interesting in parent
%pom_remove_parent
# missing dep org.jenkins-ci:remoting-test-client
%pom_xpath_remove "pom:plugin[pom:artifactId[text()='maven-dependency-plugin']]/pom:executions/pom:execution[pom:id[text()='resgen']]"
# 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
# Not really used in source files
%pom_remove_dep :animal-sniffer-annotation
#%%pom_change_dep :findbugs-annotations com.google.code.findbugs:annotations
# Replace bundled class from commons-io with proper dependency
%pom_xpath_replace "pom:dependency[pom:artifactId[text()='commons-io']]/pom:scope" \
"compile"
%build
# Disabled tests because of missing org.jvnet.hudson:test-annotations
%mvn_build -f
%install
%mvn_install
install -d -m 755 %{buildroot}/%{webinfdir}
cp %{buildroot}/%{_javadir}/%{name}/%{shortname}.jar %{buildroot}/%{webinfdir}/remoting.jar
cp %{buildroot}/%{_javadir}/%{name}/%{shortname}.jar %{buildroot}/%{webinfdir}/slave.jar
%files -f .mfiles
%dir %{_javadir}/%{name}
%doc LICENSE-MIT LICENSE-ASL
%files webapp
%{webinfdir}/remoting.jar
%{webinfdir}/slave.jar
%doc LICENSE-MIT LICENSE-ASL
%files javadoc -f .mfiles-javadoc
%doc LICENSE-MIT LICENSE-ASL
%changelog
* Thu Nov 17 2016 Michal Srb - 2.62.3-1
- Update to 2.62.3
- Resolves: CVE-2016-9299
* Fri May 20 2016 Michal Srb - 2.59-1
- Update to 2.59
* Thu Apr 21 2016 Michal Srb - 2.57-1
- Update to 2.57
* Fri Mar 11 2016 Michal Srb - 2.56-1
- Update to 2.56
* Wed Mar 02 2016 Michal Srb - 2.55-1
- Update to 2.55
* Mon Feb 22 2016 Michal Srb - 2.54-1
- Update to 2.54
* Thu Feb 04 2016 Fedora Release Engineering - 2.53.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Dec 23 2015 Michal Srb - 2.53.2-1
- Update to upstream version 2.53.2
* Wed Nov 11 2015 Michal Srb - 2.53-1
- Update to upstream version 2.53
* Tue Sep 22 2015 Michal Srb - 2.52-2
- Rework Base64 patch to retain backward compatibility
* Wed Sep 16 2015 Michal Srb - 2.52-1
- Update to upstream version 2.52
* Wed Jun 17 2015 Fedora Release Engineering - 2.49-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Jun 09 2015 Michal Srb - 2.49-2
- Utilize pom_change_dep
* Mon Feb 02 2015 Michal Srb - 2.49-1
- Update to upstream version 2.49
* Wed Nov 12 2014 Michal Srb - 2.48-1
- Update to upstream version 2.48
* Mon Nov 03 2014 Michal Srb - 2.47-1
- Update to upstream version 2.47
* Mon Oct 13 2014 Michal Srb - 2.46-2
- Add webapp subpackage
* Fri Oct 10 2014 Michal Srb - 2.46-1
- Update to upstream version 2.46
* Mon Sep 08 2014 Michal Srb - 2.45-1
- Update to upstream version 2.45
* Mon Aug 11 2014 Michal Srb - 2.44-1
- Update to upstream version 2.44
* Mon Jun 16 2014 Michal Srb - 2.43-1
- Update to upstream version 2.43
* Sun Jun 08 2014 Fedora Release Engineering - 2.41-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 07 2014 Michal Srb - 2.41-1
- Update to upstream version 2.41
* Mon Apr 28 2014 Michal Srb - 2.40-1
- Update to upstream version 2.40
* Wed Apr 16 2014 Michal Srb - 2.39-1
- Update to upstream version 2.39
* Thu Apr 03 2014 Michal Srb - 2.37-3
- Remove unneeded patch
* Thu Apr 03 2014 Michal Srb - 2.37-2
- Remove unneeded pom_ macro
* Thu Apr 03 2014 Michal Srb - 2.37-1
- Update to upstream version 2.37
* Tue Apr 01 2014 Michal Srb - 2.35-2
- Update to upstream version 2.35
* Fri Dec 06 2013 Michal Srb - 2.34-1
- Update to upstream version 2.34
* Mon Nov 25 2013 Michal Srb - 2.33-1
- Update to upstream version 2.33
* Mon Sep 02 2013 Michal Srb - 2.32-1
- Update to upstream version 2.32
* Sat Aug 03 2013 Fedora Release Engineering - 2.23-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Apr 19 2013 Michal Srb - 2.23-1
- Initial package