diff --git a/.gitignore b/.gitignore
index d93bb57..711ae6b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-SOURCES/ldapjdk-4.18.tar.gz
+SOURCES/ldapjdk-4.19.tar.gz
diff --git a/.ldapjdk.metadata b/.ldapjdk.metadata
index 750d9e9..2b5c07c 100644
--- a/.ldapjdk.metadata
+++ b/.ldapjdk.metadata
@@ -1 +1 @@
-5f04b6349a2e006989a75b3efa45a876546c735d SOURCES/ldapjdk-4.18.tar.gz
+1cac698781bfc792198735d988da2b1a6372fc0a SOURCES/ldapjdk-4.19.tar.gz
diff --git a/SOURCES/ldapjdk-4.18.pom b/SOURCES/ldapjdk-4.18.pom
deleted file mode 100644
index a6b20f5..0000000
--- a/SOURCES/ldapjdk-4.18.pom
+++ /dev/null
@@ -1,6 +0,0 @@
-host
argument:
-+ * hostname:portnumber). For IPv6 enclose the address in square brackets.
-+ * For example, you can specify the following values for the
-+ * host
argument:
- *
- * myhost - * myhost hishost:389 herhost:5000 whathost - * myhost:686 myhost:389 hishost:5000 whathost:1024 -+ * [::1]:389 [2620:52:0:102f:5054:1ff:fe2c:e12d]:636 - *- * If multiple servers are specified in the
host
list, the connection
- * setup policy specified with the ConnSetupDelay
property controls
-@@ -934,13 +936,32 @@
- int i = 0;
- while( st.hasMoreTokens() ) {
- String s = st.nextToken();
-- int colon = s.indexOf( ':' );
-- if ( colon > 0 ) {
-- hostList[i] = s.substring( 0, colon );
-- portList[i] = Integer.parseInt( s.substring( colon+1 ) );
-+ int colon;
-+
-+ if ( s.startsWith( "[" ) ) {
-+ // We have an ipv6 address
-+ int end = s.indexOf( ']' );
-+ if ( end == -1 ) {
-+ throw new LDAPException ( "invalid URL for IPv6 address",
-+ LDAPException.PARAM_ERROR );
-+ }
-+ String remainder = s.substring( end+1 );
-+ hostList[i] = s.substring( 0, end+1 );
-+ colon = remainder.indexOf( ':' );
-+ if ( colon >= 0 ){
-+ portList[i] = Integer.parseInt( remainder.substring( colon+1 ) );
-+ } else {
-+ portList[i] = defaultPort;
-+ }
- } else {
-- hostList[i] = s;
-- portList[i] = defaultPort;
-+ colon = s.indexOf( ':' );
-+ if ( colon > 0 ) {
-+ hostList[i] = s.substring( 0, colon );
-+ portList[i] = Integer.parseInt( s.substring( colon+1 ) );
-+ } else {
-+ hostList[i] = s;
-+ portList[i] = defaultPort;
-+ }
- }
- i++;
- }
-diff -r 0f7c3698a961 java-sdk/ldapjdk/netscape/ldap/LDAPUrl.java
---- a/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPUrl.java Fri Feb 27 03:58:00 2015 -0500
-+++ b/mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPUrl.java Mon Aug 08 12:01:38 2016 -0400
-@@ -135,9 +135,11 @@
- * (ldaps) is also supported.
- */
- private void parseUrl(String url) throws MalformedURLException {
-- StringTokenizer urlParser = new StringTokenizer (url, ":/?", true);
-+ StringTokenizer urlParser = new StringTokenizer (url, ":/?[]", true);
-+ StringTokenizer markParser = new StringTokenizer (url, ":/?[]", true);
- String currentToken;
- String str = null;
-+ boolean usingIPv6 = false;
-
- try {
- currentToken = urlParser.nextToken();
-@@ -160,8 +162,10 @@
- if (!currentToken.equals("/")) {
- throw new MalformedURLException ();
- }
--
- currentToken = urlParser.nextToken();
-+ if (currentToken.equals("[")) {
-+ usingIPv6 = true;
-+ }
- }
- catch (NoSuchElementException e) {
- throw new MalformedURLException ();
-@@ -176,36 +180,48 @@
- throw new MalformedURLException ("No hostname");
- } else if (currentToken.equals ("?")) {
- throw new MalformedURLException ("No host[:port]");
-+ } else if (usingIPv6){
-+ StringBuilder sb = new StringBuilder();
-+ while (urlParser.hasMoreElements()) {
-+ currentToken = urlParser.nextToken();
-+ if (currentToken.equals("]")) {
-+ break;
-+ }
-+ sb.append(currentToken);
-+ }
-+ m_hostName = sb.toString();
- } else {
- m_hostName = currentToken;
-+ }
-+
-+ // Set the port
-+ if (urlParser.countTokens() == 0) {
-+ m_portNumber = m_secure ? DEFAULT_SECURE_PORT : LDAPv2.DEFAULT_PORT;
-+ return;
-+ }
-+ currentToken = urlParser.nextToken (); // either ":" or "/"
-+
-+ if (currentToken.equals (":")) {
-+ try {
-+ m_portNumber = Integer.parseInt (urlParser.nextToken());
-+ } catch (NumberFormatException nf) {
-+ throw new MalformedURLException ("Port not a number");
-+ } catch (NoSuchElementException ex) {
-+ throw new MalformedURLException ("No port number");
-+ }
-+
- if (urlParser.countTokens() == 0) {
-- m_portNumber = m_secure ? DEFAULT_SECURE_PORT : LDAPv2.DEFAULT_PORT;
- return;
- }
-- currentToken = urlParser.nextToken (); // either ":" or "/"
--
-- if (currentToken.equals (":")) {
-- try {
-- m_portNumber = Integer.parseInt (urlParser.nextToken());
-- } catch (NumberFormatException nf) {
-- throw new MalformedURLException ("Port not a number");
-- } catch (NoSuchElementException ex) {
-- throw new MalformedURLException ("No port number");
-- }
--
-- if (urlParser.countTokens() == 0) {
-- return;
-- }
-- else if (! urlParser.nextToken().equals("/")) {
-- throw new MalformedURLException ();
-- }
--
-- } else if (currentToken.equals ("/")) {
-- m_portNumber = m_secure ? DEFAULT_SECURE_PORT : LDAPv2.DEFAULT_PORT;
-- } else {
-- // expecting ":" or "/"
-+ else if (! urlParser.nextToken().equals("/")) {
- throw new MalformedURLException ();
- }
-+
-+ } else if (currentToken.equals ("/")) {
-+ m_portNumber = m_secure ? DEFAULT_SECURE_PORT : LDAPv2.DEFAULT_PORT;
-+ } else {
-+ // expecting ":" or "/"
-+ throw new MalformedURLException ();
- }
diff --git a/SOURCES/matching-rule-parsing-640750.patch b/SOURCES/matching-rule-parsing-640750.patch
deleted file mode 100644
index dfa50ac..0000000
--- a/SOURCES/matching-rule-parsing-640750.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -r 45450e5b01df java-sdk/ldapjdk/netscape/ldap/LDAPSchemaElement.java
---- ./mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSchemaElement.java Fri Feb 18 09:02:26 2011 -0700
-+++ ./mozilla/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSchemaElement.java Thu Mar 10 13:51:04 2011 -0800
-@@ -544,6 +544,10 @@
- for( int i = 0; i < names.length; i++ ) {
- String[] vals = getQualifier( names[i] );
- if ( (vals != null) && (vals.length > 0) ) {
-+ // need a space between elements
-+ if (i > 0) {
-+ s += ' ';
-+ }
- s += names[i] + ' ' + vals[0];
- }
- }
diff --git a/SPECS/ldapjdk.spec b/SPECS/ldapjdk.spec
index c4eb8db..bfcf5fe 100644
--- a/SPECS/ldapjdk.spec
+++ b/SPECS/ldapjdk.spec
@@ -3,28 +3,23 @@
%global beansname ldapbeans
Name: ldapjdk
-Version: 4.18
-Release: 16%{?dist}
+Version: 4.19
+Release: 1%{?dist}
Epoch: 0
Summary: The Mozilla LDAP Java SDK
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Development/Java
-URL: http://www.mozilla.org/directory/javasdk.html
-# mkdir ldapjdk-4.18 ;
-# cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot Export -r LDAPJavaSDK_418 DirectorySDKSourceJava
-# tar -zcf ldapjdk-4.18,tar.gz ldapjdk-4.18
-Source: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz
+URL: http://www-archive.mozilla.org/directory/javasdk.html
+# hg archive -p ldapjdk-4.19 -r default -t tgz -I buildjsdk.txt -I java-sdk ldapjdk-4.19.tar.gz
+Source: http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/%{name}-%{version}.tar.gz
# originally taken from http://mirrors.ibiblio.org/pub/mirrors/maven2/ldapsdk/ldapsdk/4.1/ldapsdk-4.1.pom
# changed: gId, aId and version
-Source1: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.pom
-Patch0: %{name}-jarnamefix.patch
-Patch1: matching-rule-parsing-640750.patch
-Patch2: %{name}-support-IPv6.patch
-Patch3: %{name}-ldap-url-sans-host-port.patch
+Source1: http://pki.fedoraproject.org/pki/sources/%{name}/%{version}/%{name}-%{version}.pom
Requires: jpackage-utils >= 0:1.5
Requires: jss
BuildRequires: ant
+BuildRequires: java-devel
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: jss
@@ -46,20 +41,15 @@ Javadoc for %{name}
%prep
%setup -q
# Remove all bundled jars, we must build against build-system jars
-rm -f ./mozilla/directory/java-sdk/ldapjdk/lib/{jss32_stub,jsse,jnet,jaas,jndi}.jar
-
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
+rm -f ./java-sdk/ldapjdk/lib/{jss32_stub,jsse,jnet,jaas,jndi}.jar
%build
# cleanup CVS dirs
rm -fr $(find . -name CVS -type d)
# Link to build-system BRs
pwd
-( cd mozilla/directory/java-sdk/ldapjdk/lib && build-jar-repository -s -p . jss4 jsse jaas jndi )
-cd mozilla/directory/java-sdk
+( cd java-sdk/ldapjdk/lib && build-jar-repository -s -p . jss4 jsse jaas jndi )
+cd java-sdk
if [ ! -e "$JAVA_HOME" ] ; then export JAVA_HOME="%{_jvmdir}/java" ; fi
sh -x ant dist
@@ -67,10 +57,10 @@ sh -x ant dist
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
-install -m 644 mozilla/directory/java-sdk/dist/packages/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
-install -m 644 mozilla/directory/java-sdk/dist/packages/%{spname}.jar $RPM_BUILD_ROOT%{_javadir}/%{spname}.jar
-install -m 644 mozilla/directory/java-sdk/dist/packages/%{filtname}.jar $RPM_BUILD_ROOT%{_javadir}/%{filtname}.jar
-install -m 644 mozilla/directory/java-sdk/dist/packages/%{beansname}.jar $RPM_BUILD_ROOT%{_javadir}/%{beansname}.jar
+install -m 644 java-sdk/dist/packages/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+install -m 644 java-sdk/dist/packages/%{spname}.jar $RPM_BUILD_ROOT%{_javadir}/%{spname}.jar
+install -m 644 java-sdk/dist/packages/%{filtname}.jar $RPM_BUILD_ROOT%{_javadir}/%{filtname}.jar
+install -m 644 java-sdk/dist/packages/%{beansname}.jar $RPM_BUILD_ROOT%{_javadir}/%{beansname}.jar
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}-1.3.0
@@ -83,9 +73,9 @@ install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "ldapsdk:ldapsdk"
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-cp -r mozilla/directory/java-sdk/dist/doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -r java-sdk/dist/doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-%files
+%files -f .mfiles
%defattr(-,root,root,-)
%{_javadir}/%{name}*.jar
%{_javadir}/%{spname}*.jar
@@ -101,6 +91,9 @@ cp -r mozilla/directory/java-sdk/dist/doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name
%{_javadocdir}/%{name}/*
%changelog
+* Wed Mar 8 2017 Matthew Harmsen