forked from pool/apache-commons-validator
410 lines
16 KiB
Diff
410 lines
16 KiB
Diff
Index: apache-commons-validator.changes
|
||
===================================================================
|
||
--- apache-commons-validator.changes (revision 6)
|
||
+++ apache-commons-validator.changes (revision 21)
|
||
@@ -1,4 +1,10 @@
|
||
-------------------------------------------------------------------
|
||
+Fri Dec 21 13:56:05 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||
+
|
||
+- Update to 1.5.0
|
||
+- Install the maven pom file
|
||
+
|
||
+-------------------------------------------------------------------
|
||
Tue May 15 13:22:32 UTC 2018 - fstrba@suse.com
|
||
|
||
- Build with source and target 8 to prepare for a possible removal
|
||
Index: apache-commons-validator.spec
|
||
===================================================================
|
||
--- apache-commons-validator.spec (revision 6)
|
||
+++ apache-commons-validator.spec (revision 21)
|
||
@@ -12,36 +12,37 @@
|
||
# license that conforms to the Open Source Definition (Version 1.9)
|
||
# published by the Open Source Initiative.
|
||
|
||
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||
#
|
||
|
||
|
||
%define short_name commons-validator
|
||
Name: apache-%{short_name}
|
||
-Version: 1.3.1
|
||
+Version: 1.5.0
|
||
Release: 0
|
||
Summary: Apache Commons Validator
|
||
License: Apache-2.0
|
||
Group: Development/Libraries/Java
|
||
-Url: http://commons.apache.org/commons/
|
||
-Source0: %{short_name}-%{version}-src.tar.gz
|
||
-Patch0: commons-validator-1.3.1-crosslink.patch
|
||
-# https://issues.apache.org/jira/browse/VALIDATOR-303
|
||
-Patch1: commons-validator-1.3.1-srcencoding.patch
|
||
-Patch2: commons-validator-1.3.1-locale.patch
|
||
+URL: http://commons.apache.org/commons/
|
||
+Source0: http://archive.apache.org/dist/commons/validator/source/%{short_name}-%{version}-src.tar.gz
|
||
+Patch0: commons-validator-1.5.0-srcencoding.patch
|
||
+Patch1: commons-validator-1.5.0-digester.patch
|
||
+Patch2: commons-validator-1.5.0-locale.patch
|
||
BuildRequires: ant
|
||
-BuildRequires: apache-commons-beanutils
|
||
-BuildRequires: apache-commons-collections
|
||
-BuildRequires: apache-commons-logging
|
||
+BuildRequires: ant-junit
|
||
+BuildRequires: commons-beanutils
|
||
+BuildRequires: commons-collections
|
||
+BuildRequires: commons-digester
|
||
+BuildRequires: commons-logging
|
||
BuildRequires: fdupes
|
||
-BuildRequires: jakarta-commons-digester
|
||
BuildRequires: java-devel >= 1.8
|
||
+BuildRequires: javapackages-local
|
||
BuildRequires: junit
|
||
BuildRequires: oro
|
||
-Requires: apache-commons-beanutils >= 1.5
|
||
-Requires: apache-commons-collections
|
||
-Requires: apache-commons-logging >= 1.0.2
|
||
-Requires: jakarta-commons-digester >= 1.3
|
||
+Requires: commons-beanutils >= 1.5
|
||
+Requires: commons-collections
|
||
+Requires: commons-digester >= 1.3
|
||
+Requires: commons-logging >= 1.0.2
|
||
Requires: oro >= 2.0.6
|
||
Provides: %{short_name} = %{version}-%{release}
|
||
Obsoletes: %{short_name} < %{version}-%{release}
|
||
@@ -64,7 +65,7 @@
|
||
|
||
%package javadoc
|
||
Summary: Javadoc for jakarta-commons-validator
|
||
-Group: Development/Libraries/Java
|
||
+Group: Documentation/HTML
|
||
Requires(pre): coreutils
|
||
|
||
%description javadoc
|
||
@@ -89,10 +90,6 @@
|
||
sed -i 's/\r//' RELEASE-NOTES.txt
|
||
sed -i 's/\r//' NOTICE.txt
|
||
|
||
-# use textui instead of awtui (not available in junit4+)
|
||
-sed -i 's:junit.awtui.TestRunner.main:junit.textui.TestRunner.main:g' \
|
||
- src/test/org/apache/commons/validator/*java
|
||
-
|
||
%build
|
||
export CLASSPATH=$(build-classpath \
|
||
commons-collections \
|
||
@@ -100,7 +97,7 @@
|
||
commons-digester \
|
||
commons-beanutils \
|
||
junit \
|
||
- jakarta-oro )
|
||
+ oro )
|
||
ant \
|
||
-Dcompile.source=8 -Dcompile.target=8 \
|
||
-Dskip.download=true -Dbuild.sysclasspath=first \
|
||
@@ -113,7 +110,7 @@
|
||
commons-digester \
|
||
commons-beanutils \
|
||
junit \
|
||
- jakarta-oro )
|
||
+ oro )
|
||
ant \
|
||
-Dcompile.source=8 -Dcompile.target=8 \
|
||
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
|
||
@@ -121,24 +118,26 @@
|
||
test
|
||
|
||
%install
|
||
-
|
||
# jars
|
||
install -d -m 0755 %{buildroot}%{_javadir}
|
||
-install -pm 644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||
+install -pm 644 dist/%{short_name}-%{version}-SNAPSHOT.jar %{buildroot}%{_javadir}/%{name}.jar
|
||
ln -s %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
|
||
-
|
||
+# pom
|
||
+install -d -m 0755 %{buildroot}%{_mavenpomdir}
|
||
+install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
||
+%add_maven_depmap %{name}.pom %{name}.jar -a org.apache.commons:%{short_name}
|
||
# javadoc
|
||
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
|
||
cp -pr dist/docs/api*/* %{buildroot}%{_javadocdir}/%{name}/
|
||
%fdupes -s %{buildroot}%{_javadocdir}/%{name}/
|
||
|
||
-%files
|
||
-%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
|
||
-%{_javadir}/%{name}.jar
|
||
+%files -f .mfiles
|
||
+%license LICENSE.txt
|
||
+%doc NOTICE.txt RELEASE-NOTES.txt
|
||
%{_javadir}/%{short_name}.jar
|
||
|
||
%files javadoc
|
||
-%doc LICENSE.txt
|
||
+%license LICENSE.txt
|
||
%doc %{_javadocdir}/%{name}
|
||
|
||
%changelog
|
||
Index: commons-validator-1.5.0-digester.patch
|
||
===================================================================
|
||
--- commons-validator-1.5.0-digester.patch (added)
|
||
+++ commons-validator-1.5.0-digester.patch (revision 21)
|
||
@@ -0,0 +1,23 @@
|
||
+--- commons-validator-1.5.0-src/src/main/java/org/apache/commons/validator/ValidatorResources.java 2015-11-19 00:52:35.000000000 +0100
|
||
++++ commons-validator-1.5.0-src/src/main/java/org/apache/commons/validator/ValidatorResources.java 2018-12-21 11:08:21.128060468 +0100
|
||
+@@ -19,6 +19,7 @@
|
||
+ import java.io.IOException;
|
||
+ import java.io.InputStream;
|
||
+ import java.io.Serializable;
|
||
++import java.net.URISyntaxException;
|
||
+ import java.net.URL;
|
||
+ import java.util.Collections;
|
||
+ import java.util.Iterator;
|
||
+@@ -235,7 +236,11 @@
|
||
+ Digester digester = initDigester();
|
||
+ for (int i = 0; i < urls.length; i++) {
|
||
+ digester.push(this);
|
||
+- digester.parse(urls[i]);
|
||
++ try {
|
||
++ digester.parse(urls[i].toURI().toString());
|
||
++ } catch (URISyntaxException e) {
|
||
++ throw new IOException(e);
|
||
++ }
|
||
+ }
|
||
+
|
||
+ this.process();
|
||
Index: commons-validator-1.5.0-locale.patch
|
||
===================================================================
|
||
--- commons-validator-1.5.0-locale.patch (added)
|
||
+++ commons-validator-1.5.0-locale.patch (revision 21)
|
||
@@ -0,0 +1,70 @@
|
||
+--- commons-validator-1.5.0-src/build.xml 2015-11-19 00:52:34.000000000 +0100
|
||
++++ commons-validator-1.5.0-src/build.xml 2018-12-21 14:54:10.838397098 +0100
|
||
+@@ -109,6 +109,23 @@
|
||
+ <!-- Download lib dir -->
|
||
+ <property name="download.lib.dir" value="lib"/>
|
||
+
|
||
++<!-- ========== Test Java Version ========================================= -->
|
||
++
|
||
++ <condition property="isJava9">
|
||
++ <not>
|
||
++ <or>
|
||
++ <equals arg1="${ant.java.version}" arg2="1.1"/>
|
||
++ <equals arg1="${ant.java.version}" arg2="1.2"/>
|
||
++ <equals arg1="${ant.java.version}" arg2="1.3"/>
|
||
++ <equals arg1="${ant.java.version}" arg2="1.4"/>
|
||
++ <equals arg1="${ant.java.version}" arg2="1.5"/>
|
||
++ <equals arg1="${ant.java.version}" arg2="1.6"/>
|
||
++ <equals arg1="${ant.java.version}" arg2="1.7"/>
|
||
++ <equals arg1="${ant.java.version}" arg2="1.8"/>
|
||
++ </or>
|
||
++ </not>
|
||
++ </condition>
|
||
++
|
||
+ <!-- ========== Compiler Defaults ========================================= -->
|
||
+
|
||
+
|
||
+@@ -323,7 +340,7 @@
|
||
+ </target>
|
||
+
|
||
+
|
||
+- <target name="test" depends="compile.tests,test.main,test.checkdigit,test.routines"
|
||
++ <target name="test" depends="compile.tests,test.main,test.checkdigit,test.routines,test.routines.java9"
|
||
+ description="Run all unit test cases">
|
||
+ </target>
|
||
+
|
||
+@@ -364,7 +381,25 @@
|
||
+ </target>
|
||
+
|
||
+ <target name="test.routines" depends="compile.tests"
|
||
+- description="Run routines unit test cases">
|
||
++ description="Run routines unit test cases" unless="isJava9">
|
||
++ <echo message="Running routines tests ..."/>
|
||
++
|
||
++ <junit fork="yes" forkmode="once" printsummary="yes"
|
||
++ haltonfailure="${test.failonerror}"
|
||
++ failureproperty="main.test.failed" showoutput="true">
|
||
++ <classpath refid="test.classpath"/>
|
||
++ <formatter type="plain"/>
|
||
++ <batchtest todir="${test.results.dir}">
|
||
++ <fileset dir="${test.home}/java">
|
||
++ <include name="org/apache/commons/validator/routines/*Test.java" />
|
||
++ <exclude name="**/Abstract*Test.java" />
|
||
++ </fileset>
|
||
++ </batchtest>
|
||
++ </junit>
|
||
++ </target>
|
||
++
|
||
++ <target name="test.routines.java9" depends="compile.tests"
|
||
++ description="Run routines unit test cases with Java 9+" if="isJava9">
|
||
+ <echo message="Running routines tests ..."/>
|
||
+
|
||
+ <junit fork="yes" forkmode="once" printsummary="yes"
|
||
+@@ -372,6 +407,7 @@
|
||
+ failureproperty="main.test.failed" showoutput="true">
|
||
+ <classpath refid="test.classpath"/>
|
||
+ <formatter type="plain"/>
|
||
++ <sysproperty key="java.locale.providers" value="COMPAT,SPI"/>
|
||
+ <batchtest todir="${test.results.dir}">
|
||
+ <fileset dir="${test.home}/java">
|
||
+ <include name="org/apache/commons/validator/routines/*Test.java" />
|
||
Index: commons-validator-1.5.0-src.tar.gz
|
||
===================================================================
|
||
Binary file commons-validator-1.5.0-src.tar.gz (revision 21) added
|
||
Index: commons-validator-1.5.0-srcencoding.patch
|
||
===================================================================
|
||
--- commons-validator-1.5.0-srcencoding.patch (added)
|
||
+++ commons-validator-1.5.0-srcencoding.patch (revision 21)
|
||
@@ -0,0 +1,51 @@
|
||
+--- commons-validator-1.5.0-src/build.xml 2015-11-19 00:52:34.000000000 +0100
|
||
++++ commons-validator-1.5.0-src/build.xml 2018-12-21 10:48:58.650031637 +0100
|
||
+@@ -209,6 +209,7 @@
|
||
+ description="Compile shareable components">
|
||
+ <javac srcdir="${source.home}"
|
||
+ destdir="${build.home}/classes"
|
||
++ encoding="utf-8"
|
||
+ source="${compile.source}"
|
||
+ target="${compile.target}"
|
||
+ debug="${compile.debug}"
|
||
+@@ -247,8 +248,10 @@
|
||
+
|
||
+ <target name="javadoc" depends="compile"
|
||
+ description="Create component Javadoc documentation">
|
||
+- <!--javadoc sourcepath="${source.home}"
|
||
++ <javadoc sourcepath="${source.home}"
|
||
+ destdir="${dist.home}/docs/apidocs"
|
||
++ encoding="utf-8"
|
||
++ source="${compile.source}"
|
||
+ packagenames="org.apache.commons.*"
|
||
+ author="true"
|
||
+ private="true"
|
||
+@@ -256,7 +259,7 @@
|
||
+ doctitle="<h1>${component.title} (Version ${component.version})</h1>"
|
||
+ windowtitle="${component.title} (Version ${component.version})"
|
||
+ bottom="Copyright (c) 2001-2004 Apache Software Foundation"
|
||
+- classpathref="compile.classpath" / -->
|
||
++ classpathref="compile.classpath"/>
|
||
+ </target>
|
||
+
|
||
+
|
||
+@@ -312,6 +315,9 @@
|
||
+ description="Compile unit test cases">
|
||
+ <javac srcdir="${test.home}/java"
|
||
+ destdir="${build.home}/tests"
|
||
++ encoding="utf-8"
|
||
++ source="${compile.source}"
|
||
++ target="${compile.target}"
|
||
+ debug="${compile.debug}"
|
||
+ deprecation="${compile.deprecation}"
|
||
+ optimize="${compile.optimize}">
|
||
+@@ -394,6 +400,9 @@
|
||
+ description="Compile example application">
|
||
+ <javac srcdir="${example.home}"
|
||
+ destdir="${build.home}/example"
|
||
++ encoding="utf-8"
|
||
++ source="${compile.source}"
|
||
++ target="${compile.target}"
|
||
+ debug="${compile.debug}"
|
||
+ deprecation="${compile.deprecation}"
|
||
+ optimize="${compile.optimize}">
|
||
Index: commons-validator-1.3.1-crosslink.patch
|
||
===================================================================
|
||
--- commons-validator-1.3.1-crosslink.patch (revision 6)
|
||
+++ commons-validator-1.3.1-crosslink.patch (deleted)
|
||
@@ -1,11 +0,0 @@
|
||
-diff -up commons-validator-1.3.1-src/build.xml~ commons-validator-1.3.1-src/build.xml
|
||
---- commons-validator-1.3.1-src/build.xml~ 2006-11-29 00:31:49.000000000 +0200
|
||
-+++ commons-validator-1.3.1-src/build.xml 2012-01-14 13:00:24.844856452 +0200
|
||
-@@ -301,6 +301,7 @@
|
||
- doctitle="<h1>${component.title} (Version ${component.version})</h1>"
|
||
- windowtitle="${component.title} (Version ${component.version})"
|
||
- bottom="Copyright (c) 2001-2004 Apache Software Foundation"
|
||
-+ link="/usr/share/javadoc/java/"
|
||
- classpathref="compile.classpath" />
|
||
- </target>
|
||
-
|
||
Index: commons-validator-1.3.1-locale.patch
|
||
===================================================================
|
||
--- commons-validator-1.3.1-locale.patch (revision 6)
|
||
+++ commons-validator-1.3.1-locale.patch (deleted)
|
||
@@ -1,60 +0,0 @@
|
||
---- commons-validator-1.3.1-src/build.xml 2006-11-28 23:31:49.000000000 +0100
|
||
-+++ commons-validator-1.3.1-src/build.xml 2017-10-09 11:28:48.651572868 +0200
|
||
-@@ -108,6 +108,23 @@
|
||
- <!-- Download lib dir -->
|
||
- <property name="download.lib.dir" value="lib"/>
|
||
-
|
||
-+<!-- ========== Test Java Version ========================================= -->
|
||
-+
|
||
-+ <condition property="isJava9">
|
||
-+ <not>
|
||
-+ <or>
|
||
-+ <equals arg1="${ant.java.version}" arg2="1.1"/>
|
||
-+ <equals arg1="${ant.java.version}" arg2="1.2"/>
|
||
-+ <equals arg1="${ant.java.version}" arg2="1.3"/>
|
||
-+ <equals arg1="${ant.java.version}" arg2="1.4"/>
|
||
-+ <equals arg1="${ant.java.version}" arg2="1.5"/>
|
||
-+ <equals arg1="${ant.java.version}" arg2="1.6"/>
|
||
-+ <equals arg1="${ant.java.version}" arg2="1.7"/>
|
||
-+ <equals arg1="${ant.java.version}" arg2="1.8"/>
|
||
-+ </or>
|
||
-+ </not>
|
||
-+ </condition>
|
||
-+
|
||
- <!-- ========== Compiler Defaults ========================================= -->
|
||
-
|
||
-
|
||
-@@ -421,7 +438,7 @@
|
||
- </target>
|
||
-
|
||
-
|
||
-- <target name="test" depends="compile.tests,test.main,test.routines"
|
||
-+ <target name="test" depends="compile.tests,test.main,test.routines,test.routines.java9"
|
||
- description="Run all unit test cases">
|
||
- </target>
|
||
-
|
||
-@@ -436,11 +453,22 @@
|
||
- </target>
|
||
-
|
||
- <target name="test.routines" depends="compile.tests"
|
||
-- description="Run routines unit test cases">
|
||
-- <echo message="Running routines tests ..."/>
|
||
-+ description="Run routines unit test cases" unless="isJava9">
|
||
-+ <echo message="Running routines tests ..."/>
|
||
-+ <java classname="${test.runner}" fork="yes"
|
||
-+ failonerror="${test.failonerror}">
|
||
-+ <arg value="org.apache.commons.validator.routines.RoutinesTestSuite"/>
|
||
-+ <classpath refid="test.classpath"/>
|
||
-+ </java>
|
||
-+ </target>
|
||
-+
|
||
-+ <target name="test.routines.java9" depends="compile.tests"
|
||
-+ description="Run routines unit test cases with Java 9+" if="isJava9">
|
||
-+ <echo message="Running routines tests with Java 9+ ..."/>
|
||
- <java classname="${test.runner}" fork="yes"
|
||
- failonerror="${test.failonerror}">
|
||
- <arg value="org.apache.commons.validator.routines.RoutinesTestSuite"/>
|
||
-+ <sysproperty key="java.locale.providers" value="COMPAT,SPI"/>
|
||
- <classpath refid="test.classpath"/>
|
||
- </java>
|
||
- </target>
|
||
Index: commons-validator-1.3.1-src.tar.gz
|
||
===================================================================
|
||
Binary file commons-validator-1.3.1-src.tar.gz (revision 6) deleted
|
||
Index: commons-validator-1.3.1-srcencoding.patch
|
||
===================================================================
|
||
--- commons-validator-1.3.1-srcencoding.patch (revision 6)
|
||
+++ commons-validator-1.3.1-srcencoding.patch (deleted)
|
||
@@ -1,12 +0,0 @@
|
||
-diff -up commons-validator-1.3.1-src/src/test/org/apache/commons/validator/EmailTest.java~ commons-validator-1.3.1-src/src/test/org/apache/commons/validator/EmailTest.java
|
||
---- commons-validator-1.3.1-src/src/test/org/apache/commons/validator/EmailTest.java~ 2006-11-29 00:31:49.000000000 +0200
|
||
-+++ commons-validator-1.3.1-src/src/test/org/apache/commons/validator/EmailTest.java 2012-01-14 12:40:40.709092267 +0200
|
||
-@@ -385,7 +385,7 @@ public class EmailTest extends TestCommo
|
||
- new TestPair("abigail@", false),
|
||
- new TestPair("@example.com", false),
|
||
- new TestPair("phrase: abigail@example.com abigail@example.com ;", false),
|
||
-- new TestPair("invalid<69>char@example.com", false)
|
||
-+ new TestPair("invalid\u00a3char@example.com", false)
|
||
- };
|
||
-
|
||
- /**
|
||
|