Blame SPECS/jackson-databind.spec

1c0020
%global pkg_name jackson-databind
1c0020
%{?scl:%scl_package %{pkg_name}}
1c0020
%{?java_common_find_provides_and_requires}
1c0020
Name:          %{?scl_prefix}jackson-databind
1c0020
Version:       2.5.0
194f44
Release:       2.4%{?dist}
1c0020
Summary:       General data-binding package for Jackson (2.x)
1c0020
License:       ASL 2.0 and LGPLv2+
1c0020
URL:           http://wiki.fasterxml.com/JacksonHome
1c0020
Source0:       https://github.com/FasterXML/jackson-databind/archive/%{pkg_name}-%{version}.tar.gz
194f44
Patch0: CVE-2017-7525.patch
1c0020
BuildRequires: %{?scl_prefix}mvn(com.fasterxml.jackson.core:jackson-annotations) >= 2.4.1
1c0020
BuildRequires: %{?scl_prefix}mvn(com.fasterxml.jackson.core:jackson-core) >= 2.4.1
1c0020
# test deps
1c0020
BuildRequires: %{?scl_prefix_java_common}mvn(cglib:cglib)
1c0020
BuildRequires: %{?scl_prefix_java_common}mvn(junit:junit)
1c0020
BuildRequires: %{?scl_prefix_maven}mvn(org.codehaus.groovy:groovy)
1c0020
1c0020
BuildRequires: %{?scl_prefix_java_common}maven-local
1c0020
# bundle-plugin Requires
1c0020
#BuildRequires: mvn(org.sonatype.aether:aether)
1c0020
1c0020
BuildArch:     noarch
1c0020
1c0020
%description
1c0020
General data-binding functionality for Jackson:
1c0020
works on core streaming API.
1c0020
1c0020
%package javadoc
1c0020
Summary:       Javadoc for %{pkg_name}
1c0020
1c0020
%description javadoc
1c0020
This package contains javadoc for %{pkg_name}.
1c0020
1c0020
%prep
1c0020
1c0020
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
1c0020
%setup -q -n %{pkg_name}-%{pkg_name}-%{version}
194f44
%patch0 -p1
1c0020
1c0020
cp -p src/main/resources/META-INF/LICENSE .
1c0020
cp -p src/main/resources/META-INF/NOTICE .
1c0020
sed -i 's/\r//' LICENSE NOTICE
1c0020
1c0020
# unavailable test deps
1c0020
%pom_remove_dep org.hibernate:hibernate-cglib-repack
1c0020
rm src/test/java/com/fasterxml/jackson/databind/interop/TestHibernate.java
1c0020
%pom_remove_dep javax.measure:jsr-275
1c0020
rm src/test/java/com/fasterxml/jackson/databind/deser/TestNoClassDefFoundDeserializer.java
1c0020
1c0020
# Off test that require connection with the web
1c0020
rm src/test/java/com/fasterxml/jackson/databind/ser/TestJdkTypes.java \
1c0020
 src/test/java/com/fasterxml/jackson/databind/deser/TestJdkTypes.java \
1c0020
 src/test/java/com/fasterxml/jackson/databind/TestJDKSerialization.java
1c0020
1c0020
%mvn_file : %{pkg_name}
1c0020
1c0020
%pom_remove_parent
1c0020
1c0020
%pom_xpath_inject "pom:build/pom:plugins" '
1c0020
        <plugin>
1c0020
          <groupId>org.apache.felix</groupId>
1c0020
          <artifactId>maven-bundle-plugin</artifactId>
1c0020
          <extensions>true</extensions>
1c0020
          <version>1.0.0</version>
1c0020
          <configuration>
1c0020
            <instructions>
1c0020
              <_nouses>true</_nouses>
1c0020
              <_removeheaders>Include-Resource,JAVA_1_3_HOME,JAVA_1_4_HOME,JAVA_1_5_HOME,JAVA_1_6_HOME,JAVA_1_7_HOME</_removeheaders>
1c0020
              <_versionpolicy>${osgi.versionpolicy}</_versionpolicy>
1c0020
              <Bundle-Name>${project.name}</Bundle-Name>
1c0020
              <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
1c0020
              <Bundle-Description>${project.description}</Bundle-Description>
1c0020
              <Export-Package>${osgi.export}</Export-Package>
1c0020
              <Private-Package>${osgi.private}</Private-Package>
1c0020
              <Import-Package>${osgi.import}</Import-Package>
1c0020
              <DynamicImport-Package>${osgi.dynamicImport}</DynamicImport-Package>
1c0020
              <Bundle-DocURL>${project.url}</Bundle-DocURL>
1c0020
              <Bundle-RequiredExecutionEnvironment>${osgi.requiredExecutionEnvironment}</Bundle-RequiredExecutionEnvironment>
1c0020
1c0020
              <Implementation-Build-Date>${maven.build.timestamp}</Implementation-Build-Date>
1c0020
              <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK>
1c0020
              <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK>
1c0020
1c0020
              <Implementation-Title>${project.name}</Implementation-Title>
1c0020
              <Implementation-Version>${project.version}</Implementation-Version>
1c0020
              <Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
1c0020
              <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
1c0020
1c0020
              <Specification-Title>${project.name}</Specification-Title>
1c0020
              <Specification-Version>${project.version}</Specification-Version>
1c0020
              <Specification-Vendor>${project.organization.name}</Specification-Vendor>
1c0020
            </instructions>
1c0020
          </configuration>
1c0020
        </plugin>'
1c0020
1c0020
sed -i "s/\${version\.plugin\.surefire}/2\.17/
1c0020
        s/\${version\.plugin\.javadoc}/2\.8\.1/" pom.xml
1c0020
1c0020
%pom_xpath_inject "pom:properties" '
1c0020
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1c0020
  <osgi.versionpolicy>${range;[===,=+);${@}}</osgi.versionpolicy>'
1c0020
1c0020
# Avoid using the replacer-plugin
1c0020
%pom_remove_plugin com.google.code.maven-replacer-plugin:replacer
1c0020
1c0020
file=`find -name PackageVersion.java.in`
1c0020
gid=`grep "<groupId>" pom.xml | head -1 | sed 's/.*>\(.*\)<.*/\1/'`
1c0020
aid=`grep "<artifactId>" pom.xml | head -1 | sed 's/.*>\(.*\)<.*/\1/'`
1c0020
v=`grep "<version>" pom.xml | head -1 | sed 's/.*>\(.*\)<.*/\1/'`
1c0020
pkg=`echo ${file} | cut -d/ -f5- | rev | cut -d/ -f2- | rev | tr '/' '\.'`
1c0020
1c0020
sed -i "s/@projectversion@/${v}/
1c0020
        s/@projectgroupid@/${gid}/
1c0020
        s/@package@/${pkg}/
1c0020
        s/@projectartifactid@/${aid}/" ${file}
1c0020
1c0020
cp ${file} ${file%.in}
1c0020
1c0020
%{?scl:EOF}
1c0020
1c0020
%build
1c0020
1c0020
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
1c0020
1c0020
%mvn_build -- -Dmaven.test.skip=true
1c0020
1c0020
%{?scl:EOF}
1c0020
1c0020
%install
1c0020
1c0020
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
1c0020
%mvn_install
1c0020
1c0020
%{?scl:EOF}
1c0020
1c0020
%files -f .mfiles
1c0020
%doc README.md release-notes/* LICENSE NOTICE
1c0020
1c0020
%files javadoc -f .mfiles-javadoc
1c0020
%doc LICENSE NOTICE
1c0020
1c0020
%changelog
194f44
* Fri Jul 21 2017 Mat Booth <mat.booth@redhat.com> - 2.5.0-2.4
194f44
- Backport a patch to fix CVE-2017-7525
194f44
1c0020
* Thu Jul 30 2015 Roland Grunberg <rgrunber@redhat.com> - 2.5.0-2.3
1c0020
- Add missing osgi.versionpolicy property.
1c0020
1c0020
* Tue Jul 28 2015 Alexander Kurtakov <akurtako@redhat.com> 2.5.0-2.2
1c0020
- Drop Provides/Obsoletes outside of dts namespace.
1c0020
1c0020
* Thu Jul 02 2015 Roland Grunberg <rgrunber@redhat.com> - 2.5.0-2.1
1c0020
- SCL-ize.
1c0020
1c0020
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
1c0020
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
1c0020
1c0020
* Sat Jan 31 2015 gil cattaneo <puntogil@libero.it> 2.5.0-1
1c0020
- update to 2.5.0
1c0020
1c0020
* Sat Sep 20 2014 gil cattaneo <puntogil@libero.it> 2.4.2-1
1c0020
- update to 2.4.2
1c0020
1c0020
* Wed Jul 23 2014 gil cattaneo <puntogil@libero.it> 2.4.1.3-1
1c0020
- update to 2.4.1.3
1c0020
1c0020
* Thu Jul 03 2014 gil cattaneo <puntogil@libero.it> 2.4.1.1-1
1c0020
- update to 2.4.1.1
1c0020
1c0020
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-5
1c0020
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
1c0020
1c0020
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 2.2.2-4
1c0020
- Use Requires: java-headless rebuild (#1067528)
1c0020
1c0020
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-3
1c0020
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
1c0020
1c0020
* Mon Jul 22 2013 gil cattaneo <puntogil@libero.it> 2.2.2-2
1c0020
- review fixes
1c0020
1c0020
* Tue Jul 16 2013 gil cattaneo <puntogil@libero.it> 2.2.2-1
1c0020
- 2.2.2
1c0020
- renamed jackson-databind
1c0020
1c0020
* Tue May 07 2013 gil cattaneo <puntogil@libero.it> 2.2.1-1
1c0020
- 2.2.1
1c0020
1c0020
* Wed Oct 24 2012 gil cattaneo <puntogil@libero.it> 2.1.0-1
1c0020
- update to 2.1.0
1c0020
- renamed jackson2-databind
1c0020
1c0020
* Thu Sep 13 2012 gil cattaneo <puntogil@libero.it> 2.0.6-1
1c0020
- initial rpm