OPENDJ-2583 Upgrade from 2.5.0 express to 3.0.0 does not work
This problem is a side effect of the git migration.
After the git migration, all revision numbers were removed from the upgrade tasks (commit 412ad6b800c1fbd15661110e21d836b888231cce).
However, in the case of upgrade from 2.5.0 Xpress1 to 3.0, the tasks labelled with 2.5.0,
and which had a SVN revision number less than the 2.5.0 Xpress1 SVN revision number (r8087),
are now not selected because 2.5.0 < 2.5.0.8087 .
The fix is to stop using the revision number during the comparison
and introduce a fake 2.5.1 version for all changes post 2.5.0 Xpress1 but before 2.6.0.
I am wondering if we should get rid of never released version numbers (2.5.1, 2.7.0) and replace them with actual released version numbers.
BuildVersion.java:
Now ignore the revision number, so
Upgrade.java:
Changed all post 2.5.0 Xpress1 changes to version 2.5.1.
| | |
| | | "add: ds-cfg-strict-format", |
| | | "ds-cfg-strict-format: false")); |
| | | |
| | | register("2.5.0", |
| | | register("2.5.1", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_8124_SUMMARY.get(), |
| | | "(ds-cfg-java-class=org.opends.server.schema.JPEGSyntax)", |
| | | "add: objectClass", |
| | |
| | | "add: ds-cfg-strict-format", |
| | | "ds-cfg-strict-format: false")); |
| | | |
| | | register("2.5.0", |
| | | register("2.5.1", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_8133_SUMMARY.get(), |
| | | "(ds-cfg-java-class=org.opends.server.schema.CountryStringSyntax)", |
| | | "add: objectClass", |
| | |
| | | "add: ds-cfg-strict-format", |
| | | "ds-cfg-strict-format: false")); |
| | | |
| | | register("2.5.0", |
| | | register("2.5.1", |
| | | requireConfirmation(INFO_UPGRADE_TASK_8214_DESCRIPTION.get(), YES, |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_8214_SUMMARY.get(), |
| | | "(ds-cfg-java-class=org.opends.server.extensions.IsMemberOfVirtualAttributeProvider)", |
| | |
| | | "delete: ds-cfg-filter", |
| | | "ds-cfg-filter: (objectClass=person)"))); |
| | | |
| | | register("2.5.0", |
| | | register("2.5.1", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_8387_SUMMARY.get(), |
| | | "(objectClass=ds-cfg-dictionary-password-validator)", |
| | | "add: ds-cfg-check-substrings", |
| | | "ds-cfg-check-substrings: false")); |
| | | |
| | | register("2.5.0", |
| | | register("2.5.1", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_8389_SUMMARY.get(), |
| | | "(objectClass=ds-cfg-attribute-value-password-validator)", |
| | | "add: ds-cfg-check-substrings", |
| | | "ds-cfg-check-substrings: false")); |
| | | |
| | | register("2.5.0", |
| | | register("2.5.1", |
| | | addConfigEntry(INFO_UPGRADE_TASK_8487_SUMMARY.get(), |
| | | "dn: cn=PBKDF2,cn=Password Storage Schemes,cn=config", |
| | | "changetype: add", |
| | |
| | | + "PBKDF2PasswordStorageScheme", |
| | | "ds-cfg-enabled: true")); |
| | | |
| | | register("2.5.0", |
| | | register("2.5.1", |
| | | addConfigFile("http-config.json"), |
| | | addConfigEntry(INFO_UPGRADE_TASK_8613_SUMMARY.get(), |
| | | "dn: cn=HTTP Connection Handler,cn=Connection Handlers,cn=config", |
| | |
| | | "ds-cfg-use-ssl: false", |
| | | "ds-cfg-enabled: false")); |
| | | |
| | | register("2.5.0", addConfigEntry(INFO_UPGRADE_TASK_8832_SUMMARY.get(), |
| | | register("2.5.1", |
| | | addConfigEntry(INFO_UPGRADE_TASK_8832_SUMMARY.get(), |
| | | "dn: cn=File-Based HTTP Access Logger,cn=Loggers,cn=config", |
| | | "changetype: add", |
| | | "objectClass: ds-cfg-file-based-http-access-log-publisher", |
| | |
| | | "ds-cfg-log-file-permissions: 640", |
| | | "ds-cfg-enabled: false")); |
| | | |
| | | register("2.5.0", |
| | | register("2.5.1", |
| | | newAttributeTypes(INFO_UPGRADE_TASK_8985_1_SUMMARY.get(), |
| | | "00-core.ldif", "1.2.840.113549.1.9.1"), // emailAddress |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_8985_2_SUMMARY.get(), |
| | |
| | | "ds-cfg-subject-attribute-mapping: emailAddress:mail")); |
| | | |
| | | /** See OPENDJ-992 */ |
| | | register("2.5.0", |
| | | regressionInVersion("2.5.0.7640", |
| | | register("2.5.1", |
| | | regressionInVersion("2.5.0", |
| | | rebuildSingleIndex(INFO_UPGRADE_TASK_9013_DESCRIPTION.get(), |
| | | "ds-sync-hist"))); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2013-2015 ForgeRock AS. |
| | | * Portions copyright 2013-2016 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | { |
| | | if (point == version.point) |
| | | { |
| | | if (rev == version.rev) |
| | | { |
| | | return 0; |
| | | } |
| | | else if (rev.compareTo(version.rev) < 0) |
| | | { |
| | | return -1; |
| | | } |
| | | return 0; |
| | | } |
| | | else if (point < version.point) |
| | | { |
| | |
| | | else if (obj instanceof BuildVersion) |
| | | { |
| | | final BuildVersion other = (BuildVersion) obj; |
| | | return major == other.major && minor == other.minor && point == other.point && rev.equals(other.rev); |
| | | return major == other.major && minor == other.minor && point == other.point; |
| | | } |
| | | else |
| | | { |
| | |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | | return Arrays.hashCode(new int[] { major, minor, point, rev.hashCode() }); |
| | | return Arrays.hashCode(new int[] { major, minor, point }); |
| | | } |
| | | |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return Utils.joinAsString(".", major, minor, point, rev); |
| | | if (!rev.isEmpty()) |
| | | { |
| | | return Utils.joinAsString(".", major, minor, point, rev); |
| | | } |
| | | return Utils.joinAsString(".", major, minor, point); |
| | | } |
| | | } |