From b09311a4d2430b7b9732295d997f14441af33a94 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:37:46 +0000 Subject: import ldapjdk-4.19-5.el7 --- diff --git a/SOURCES/ldapjdk-Added-getter-methods-for-JDAPFilter-classes.patch b/SOURCES/ldapjdk-Added-getter-methods-for-JDAPFilter-classes.patch new file mode 100644 index 0000000..4c7232b --- /dev/null +++ b/SOURCES/ldapjdk-Added-getter-methods-for-JDAPFilter-classes.patch @@ -0,0 +1,447 @@ +From 3258e4276bd13f3c9cd45ddf416e77b9732f079a Mon Sep 17 00:00:00 2001 +From: "Endi S. Dewata" +Date: Mon, 2 Oct 2017 17:44:02 +0200 +Subject: [PATCH] Added getter methods for JDAPFilter classes. + +Some JDAPFilter classes have been modified to provide getter +methods to access the elements of parsed LDAP filters. + +Eclipse project files have been added to simplify development +using Eclipse. + +The LDAPUrl has been modified to fix complie error in Eclipse. + +Some unused import statements have been removed as well. + +https://bugzilla.mozilla.org/show_bug.cgi?id=1376300 +--- + .classpath | 11 +++++ + .project | 17 ++++++++ + java-sdk/ietfldap/org/ietf/ldap/LDAPUrl.java | 2 +- + java-sdk/ldapjdk/netscape/ldap/client/JDAPAVA.java | 2 - + .../netscape/ldap/client/JDAPBERTagDecoder.java | 1 - + .../ldapjdk/netscape/ldap/client/JDAPFilter.java | 1 - + .../netscape/ldap/client/JDAPFilterAVA.java | 2 - + .../netscape/ldap/client/JDAPFilterAnd.java | 2 - + .../ldap/client/JDAPFilterApproxMatch.java | 2 - + .../ldap/client/JDAPFilterEqualityMatch.java | 2 - + .../netscape/ldap/client/JDAPFilterExtensible.java | 2 - + .../ldap/client/JDAPFilterGreaterOrEqual.java | 2 - + .../ldap/client/JDAPFilterLessOrEqual.java | 2 - + .../netscape/ldap/client/JDAPFilterNot.java | 12 ++++-- + .../ldapjdk/netscape/ldap/client/JDAPFilterOr.java | 4 +- + .../netscape/ldap/client/JDAPFilterPresent.java | 10 ++++- + .../netscape/ldap/client/JDAPFilterSet.java | 10 ++++- + .../netscape/ldap/client/JDAPFilterSubString.java | 50 +++++++++++++++++++--- + 18 files changed, 100 insertions(+), 34 deletions(-) + create mode 100644 .classpath + create mode 100644 .project + +diff --git a/.classpath b/.classpath +new file mode 100644 +index 0000000..426c9dd +--- /dev/null ++++ b/.classpath +@@ -0,0 +1,11 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/.project b/.project +new file mode 100644 +index 0000000..b6607c7 +--- /dev/null ++++ b/.project +@@ -0,0 +1,17 @@ ++ ++ ++ ldap-sdks ++ ++ ++ ++ ++ ++ org.eclipse.jdt.core.javabuilder ++ ++ ++ ++ ++ ++ org.eclipse.jdt.core.javanature ++ ++ +diff --git a/java-sdk/ietfldap/org/ietf/ldap/LDAPUrl.java b/java-sdk/ietfldap/org/ietf/ldap/LDAPUrl.java +index 5fcd70e..fd808de 100644 +--- a/java-sdk/ietfldap/org/ietf/ldap/LDAPUrl.java ++++ b/java-sdk/ietfldap/org/ietf/ldap/LDAPUrl.java +@@ -383,7 +383,7 @@ public class LDAPUrl implements java.io.Serializable { + + try { + // then try Sun JSSESocketFactory +- _factory = new JSSESocketFactory(null); ++ _factory = new JSSESocketFactory((String[])null); + } + catch (Throwable e) { + } +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPAVA.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPAVA.java +index 6d16bd4..2cc4d76 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPAVA.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPAVA.java +@@ -37,8 +37,6 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; +-import java.io.*; + import netscape.ldap.ber.stream.*; + + /** +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPBERTagDecoder.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPBERTagDecoder.java +index 94b69ca..5b87223 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPBERTagDecoder.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPBERTagDecoder.java +@@ -37,7 +37,6 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; + import java.io.*; + +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilter.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilter.java +index 366d49d..0e16fff 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilter.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilter.java +@@ -39,7 +39,6 @@ package netscape.ldap.client; + + import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the filter. +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterAVA.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterAVA.java +index bf80dbe..d31785d 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterAVA.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterAVA.java +@@ -37,9 +37,7 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the attribute value assertion filter. +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterAnd.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterAnd.java +index 0a47917..f780cfb 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterAnd.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterAnd.java +@@ -37,9 +37,7 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the filter And. +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterApproxMatch.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterApproxMatch.java +index 747f5ed..91ca4a0 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterApproxMatch.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterApproxMatch.java +@@ -37,9 +37,7 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the approximate match filter. +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterEqualityMatch.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterEqualityMatch.java +index c6e0bfe..6d891eb 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterEqualityMatch.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterEqualityMatch.java +@@ -37,9 +37,7 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the equality match filter. +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterExtensible.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterExtensible.java +index 2e83117..04c9710 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterExtensible.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterExtensible.java +@@ -37,9 +37,7 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the extended match filter. +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterGreaterOrEqual.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterGreaterOrEqual.java +index cbf066f..8aa7878 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterGreaterOrEqual.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterGreaterOrEqual.java +@@ -37,9 +37,7 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the greater or equal filter. +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterLessOrEqual.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterLessOrEqual.java +index 8368ad3..7b1b434 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterLessOrEqual.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterLessOrEqual.java +@@ -37,9 +37,7 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the less or equal filter. +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterNot.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterNot.java +index 4aabd66..e25ea14 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterNot.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterNot.java +@@ -37,9 +37,7 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the filter not. +@@ -66,6 +64,14 @@ public class JDAPFilterNot extends JDAPFilter { + } + + /** ++ * Gets original filter. ++ * @return original filter ++ */ ++ public JDAPFilter getFilter() { ++ return m_filter; ++ } ++ ++ /** + * Gets ber representation of the filter. + * @return ber representation + */ +@@ -76,7 +82,7 @@ public class JDAPFilterNot extends JDAPFilter { + } + + /** +- * Gets string reprensetation of the filter. ++ * Gets string representation of the filter. + * @return string representation + */ + public String toString() { +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterOr.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterOr.java +index 430760f..d624f01 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterOr.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterOr.java +@@ -37,9 +37,7 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the filter And. +@@ -59,7 +57,7 @@ public class JDAPFilterOr extends JDAPFilterSet { + } + + /** +- * Gets string reprensetation of the filter. ++ * Gets string representation of the filter. + * @return string representation + */ + public String toString() { +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterPresent.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterPresent.java +index db408a2..796e14e 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterPresent.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterPresent.java +@@ -37,9 +37,7 @@ + * ***** END LICENSE BLOCK ***** */ + package netscape.ldap.client; + +-import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the filter present. +@@ -66,6 +64,14 @@ public class JDAPFilterPresent extends JDAPFilter { + } + + /** ++ * Gets attribute type. ++ * @return attribute type ++ */ ++ public String getType() { ++ return m_type; ++ } ++ ++ /** + * Gets ber representation of the filter. + * @return ber representation + */ +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterSet.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterSet.java +index 72a0098..5f5a71e 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterSet.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterSet.java +@@ -51,7 +51,7 @@ public abstract class JDAPFilterSet extends JDAPFilter { + * Internal variables + */ + private int m_tag; +- private Vector m_set = new Vector(); ++ private Vector m_set = new Vector<>(); + + /** + * Constructs the filter set. +@@ -63,6 +63,14 @@ public abstract class JDAPFilterSet extends JDAPFilter { + } + + /** ++ * Gets the filter set. ++ * @return filter set ++ */ ++ public Collection getFilters() { ++ return m_set; ++ } ++ ++ /** + * Adds filter into the filter set. + * @param filter adding filter + */ +diff --git a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterSubString.java b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterSubString.java +index 129a8ec..b660082 100644 +--- a/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterSubString.java ++++ b/java-sdk/ldapjdk/netscape/ldap/client/JDAPFilterSubString.java +@@ -39,11 +39,10 @@ package netscape.ldap.client; + + import java.util.*; + import netscape.ldap.ber.stream.*; +-import java.io.*; + + /** + * This class implements the filter substring. +- * See RFC 1777. ++ * See RFC 1777 and 2254. + *
+  * [4] SEQUENCE {
+  *   type AttributeType,
+@@ -52,7 +51,12 @@ import java.io.*;
+  *     any [1] LDAPString,
+  *     final [2] LDAPString
+  *   }
+- *     }
++ * }
++ *
++ * substring  = attr "=" [initial] any [final]
++ * initial    = value
++ * any        = "*" *(value "*")
++ * final      = value
+  * 
+ * + * @version 1.0 +@@ -62,9 +66,9 @@ public class JDAPFilterSubString extends JDAPFilter { + * Internal variables + */ + private String m_type = null; +- private Vector m_initial = new Vector(); +- private Vector m_any = new Vector(); +- private Vector m_final = new Vector(); ++ private Vector m_initial = new Vector<>(); ++ private Vector m_any = new Vector<>(); ++ private Vector m_final = new Vector<>(); + + /** + * Constructs the filter. +@@ -76,6 +80,23 @@ public class JDAPFilterSubString extends JDAPFilter { + } + + /** ++ * Get attribute type. ++ * @return attribute type ++ */ ++ public String getType() { ++ return m_type; ++ } ++ ++ /** ++ * Get initial substring. ++ * @return initial substring. ++ */ ++ public String getInitialSubstring() { ++ // RFC 2254: there is only one optional initial substring ++ return m_initial.isEmpty() ? null : m_initial.get(0); ++ } ++ ++ /** + * Adds initial substring. + * @param s initial substring + */ +@@ -84,6 +105,14 @@ public class JDAPFilterSubString extends JDAPFilter { + } + + /** ++ * Get any substrings. ++ * @return any substrings. ++ */ ++ public Collection getAnySubstrings() { ++ return m_any; ++ } ++ ++ /** + * Adds any substring. + * @param s any substring + */ +@@ -92,6 +121,15 @@ public class JDAPFilterSubString extends JDAPFilter { + } + + /** ++ * Get final substring. ++ * @return final substring. ++ */ ++ public String getFinalSubstring() { ++ // RFC 2254: there is only one optional final substring ++ return m_final.isEmpty() ? null : m_final.get(0); ++ } ++ ++ /** + * Adds final substring. + * @param s final substring + */ +-- +2.13.6 + diff --git a/SOURCES/ldapjdk-Added-gitignore-file.patch b/SOURCES/ldapjdk-Added-gitignore-file.patch new file mode 100644 index 0000000..3eefdff --- /dev/null +++ b/SOURCES/ldapjdk-Added-gitignore-file.patch @@ -0,0 +1,45 @@ +From 8066b70367ea28a2e053a23172b230a938152bd8 Mon Sep 17 00:00:00 2001 +From: Matthew Harmsen +Date: Thu, 12 Oct 2017 10:35:46 -0600 +Subject: [PATCH] Added .gitignore file + +ldapjdk Pagure Issue #1 - Add .gitignore file based upon contents + of .hgignore file + +Change-Id: I6ceb4653a0b51eecf9314109fed9f4326bb07821 +--- + .gitignore | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + create mode 100644 .gitignore + +diff --git a/.gitignore b/.gitignore +new file mode 100644 +index 0000000..e4ad492 +--- /dev/null ++++ b/.gitignore +@@ -0,0 +1,22 @@ ++# .gitignore - List of filenames git should ignore ++ ++# Filenames that should be ignored wherever they appear ++.pyc ++TAGS ++Makefile ++now ++ ++ ++# User files that may appear at the root ++**/config/.cache ++**/config/.log ++**/config/.status ++**/config/autoconf.mk ++**/config/nsinstall ++.fast-update ++ ++sdkver.h ++dirver.h ++ ++# Ignore Eclipse build directory ++bin +-- +2.13.6 + diff --git a/SPECS/ldapjdk.spec b/SPECS/ldapjdk.spec index bfcf5fe..e9e8651 100644 --- a/SPECS/ldapjdk.spec +++ b/SPECS/ldapjdk.spec @@ -4,7 +4,7 @@ Name: ldapjdk Version: 4.19 -Release: 1%{?dist} +Release: 5%{?dist} Epoch: 0 Summary: The Mozilla LDAP Java SDK License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -16,11 +16,21 @@ Source: http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/%{name}-%{v # changed: gId, aId and version Source1: http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/%{name}-%{version}.pom +####################### +## ldapjdk-4.19-4 +####################### +Patch0: ldapjdk-Added-getter-methods-for-JDAPFilter-classes.patch +Patch1: ldapjdk-Added-gitignore-file.patch + Requires: jpackage-utils >= 0:1.5 Requires: jss BuildRequires: ant BuildRequires: java-devel +%if 0%{?rhel} BuildRequires: jpackage-utils >= 0:1.5 +%else +BuildRequires: javapackages-local +%endif BuildRequires: jss Provides: jndi-ldap = 1.3.0 @@ -42,13 +52,20 @@ Javadoc for %{name} %setup -q # Remove all bundled jars, we must build against build-system jars rm -f ./java-sdk/ldapjdk/lib/{jss32_stub,jsse,jnet,jaas,jndi}.jar +%patch0 -p1 +%patch1 -p1 %build # cleanup CVS dirs rm -fr $(find . -name CVS -type d) # Link to build-system BRs pwd +%if 0%{?rhel} ( cd java-sdk/ldapjdk/lib && build-jar-repository -s -p . jss4 jsse jaas jndi ) +%else +( cd java-sdk/ldapjdk/lib && build-jar-repository -s -p . jss4 ) +ln -s /usr/lib/jvm-exports/java/{jsse,jaas,jndi}.jar java-sdk/ldapjdk/lib +%endif cd java-sdk if [ ! -e "$JAVA_HOME" ] ; then export JAVA_HOME="%{_jvmdir}/java" ; fi sh -x ant dist @@ -91,6 +108,20 @@ cp -r java-sdk/dist/doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} %{_javadocdir}/%{name}/* %changelog +* Thu Oct 12 2017 Matthew Harmsen 0:4.19-5 +- Fix build for CentOS 7 (mharmsen) +- Resolves rhbz#1465103 - Missing getter methods in JDAPFilter classes + (edewata) + +* Wed Oct 11 2017 Matthew Harmsen 0:4.19-4 +- Mozilla Bug #1376300 - Missing getter methods in JDAPFilter classes + +* Wed Sep 6 2017 Mikolaj Izdebski - 0:4.19-3 +- Don't rely on build-jar-repository for locating JVM extension JARs + +* Wed Jul 26 2017 Fedora Release Engineering - 0:4.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Wed Mar 8 2017 Matthew Harmsen 0:4.19-1 - Resolves: rhbz #1394372 - Rebase ldapjdk to 4.19 in RHEL-7.4