| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.config.dsconfig; |
| | | |
| | |
| | | import org.forgerock.opendj.ldap.Connection; |
| | | import org.forgerock.opendj.ldap.LdapException; |
| | | import org.forgerock.opendj.ldap.responses.SearchResultEntry; |
| | | import org.forgerock.util.Utils; |
| | | |
| | | /** |
| | | * Represents a particular version of OpenDJ useful for making comparisons between versions. FIXME TODO Move this file |
| | |
| | | private final int major; |
| | | private final int minor; |
| | | private final int point; |
| | | private final long rev; |
| | | private final String rev; |
| | | |
| | | /** |
| | | * Creates a new build version using the provided version information. |
| | |
| | | * @param point |
| | | * Point release version number. |
| | | * @param rev |
| | | * VCS revision number. |
| | | * VCS revision. |
| | | */ |
| | | public BuildVersion(final int major, final int minor, final int point, final long rev) { |
| | | public BuildVersion(final int major, final int minor, final int point, final String rev) { |
| | | this.major = major; |
| | | this.minor = minor; |
| | | this.point = point; |
| | |
| | | final int major = Integer.parseInt(fields[0]); |
| | | final int minor = Integer.parseInt(fields[1]); |
| | | final int point = Integer.parseInt(fields[2]); |
| | | final long rev = Long.parseLong(fields[3]); |
| | | final String rev = fields[3]; |
| | | return new BuildVersion(major, minor, point, rev); |
| | | } |
| | | |
| | |
| | | return true; |
| | | } else if (obj instanceof BuildVersion) { |
| | | final BuildVersion other = (BuildVersion) obj; |
| | | return major == other.major && minor == other.minor && point == other.point && rev == other.rev; |
| | | return major == other.major && minor == other.minor && point == other.point && rev.equals(other.rev); |
| | | } else { |
| | | return false; |
| | | } |
| | |
| | | if (point == version.point) { |
| | | if (rev == version.rev) { |
| | | return 0; |
| | | } else if (rev < version.rev) { |
| | | } else if (rev.compareTo(version.rev) < 0) { |
| | | return -1; |
| | | } |
| | | } else if (point < version.point) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the VCS revision number. |
| | | * Returns the VCS revision. |
| | | * |
| | | * @return The VCS revision number. |
| | | * @return The VCS revision. |
| | | */ |
| | | public long getRevisionNumber() { |
| | | public String getRevision() { |
| | | return rev; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | public int hashCode() { |
| | | return Arrays.hashCode(new int[] { major, minor, point, (int) (rev >>> 32), (int) (rev & 0xFFFFL) }); |
| | | return Arrays.hashCode(new int[] { major, minor, point, rev.hashCode() }); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return The string representation of the version. |
| | | */ |
| | | public String toString() { |
| | | final StringBuilder builder = new StringBuilder(); |
| | | builder.append(major); |
| | | builder.append('.'); |
| | | builder.append(minor); |
| | | builder.append('.'); |
| | | builder.append(point); |
| | | builder.append('.'); |
| | | builder.append(rev); |
| | | return builder.toString(); |
| | | return Utils.joinAsString(".", major, minor, point, rev); |
| | | } |
| | | } |
| | |
| | | MAJOR_VERSION, |
| | | MINOR_VERSION, |
| | | POINT_VERSION, |
| | | REVISION_NUMBER); |
| | | REVISION); |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | |
| | | MAJOR_VERSION, |
| | | MINOR_VERSION, |
| | | POINT_VERSION, |
| | | REVISION_NUMBER); |
| | | REVISION); |
| | | |
| | | return bi; |
| | | } |
| | |
| | | |
| | | // Allow negative revision number for cases where there is no |
| | | // VCS available. |
| | | Pattern p = Pattern.compile("((\\d+)\\.(\\d+)\\.(\\d+)\\.(-?\\d+))"); |
| | | Pattern p = Pattern.compile("((\\d+)\\.(\\d+)\\.(\\d+)\\.(-?.+))"); |
| | | Matcher m = p.matcher(bn); |
| | | if (!m.matches()) { |
| | | throw new IllegalArgumentException("'" + bn + "' is not a build string"); |
| | |
| | | bi.values.put(MAJOR_VERSION, m.group(2)); |
| | | bi.values.put(MINOR_VERSION, m.group(3)); |
| | | bi.values.put(POINT_VERSION, m.group(4)); |
| | | bi.values.put(REVISION_NUMBER, m.group(5)); |
| | | bi.values.put(REVISION, m.group(5)); |
| | | } catch (Exception e) { |
| | | throw new IllegalArgumentException("Error parsing build number " + bn); |
| | | } |
| | |
| | | String.valueOf(DynamicConstants.POINT_VERSION)); |
| | | bi.values.put(VERSION_QUALIFIER, |
| | | String.valueOf(DynamicConstants.VERSION_QUALIFIER)); |
| | | bi.values.put(REVISION_NUMBER, |
| | | String.valueOf(DynamicConstants.REVISION_NUMBER)); |
| | | bi.values.put(REVISION, DynamicConstants.REVISION); |
| | | bi.values.put(URL_REPOSITORY, |
| | | String.valueOf(DynamicConstants.URL_REPOSITORY)); |
| | | bi.values.put(FIX_IDS, DynamicConstants.FIX_IDS); |
| | |
| | | MAJOR_VERSION, |
| | | MINOR_VERSION, |
| | | POINT_VERSION, |
| | | REVISION_NUMBER); |
| | | REVISION); |
| | | |
| | | return bi; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * Gets the SVN revision number. |
| | | * Gets the VCS revision. |
| | | * |
| | | * @return Integer representing the SVN revision number |
| | | * @return String representing the VCS revision |
| | | */ |
| | | public Integer getRevisionNumber() { |
| | | return Integer.valueOf(values.get(REVISION_NUMBER)); |
| | | public String getRevision() { |
| | | return values.get(REVISION); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | |
| | | if (getMajorVersion().equals(bi.getMajorVersion())) { |
| | | if (getMinorVersion().equals(bi.getMinorVersion())) { |
| | | if (getPointVersion().equals(bi.getPointVersion())) { |
| | | if (getRevisionNumber().equals(bi.getRevisionNumber())) { |
| | | if (getRevision().equals(bi.getRevision())) { |
| | | return 0; |
| | | } else if (getRevisionNumber() < bi.getRevisionNumber()) { |
| | | } else if (getRevision().compareTo(bi.getRevision()) < 0) { |
| | | return -1; |
| | | } |
| | | } else if (getPointVersion() < bi.getPointVersion()) { |
| | |
| | | hc = 31 * hc + getMajorVersion().hashCode(); |
| | | hc = 31 * hc + getMinorVersion().hashCode(); |
| | | hc = 31 * hc + getPointVersion().hashCode(); |
| | | hc = 31 * hc + getRevisionNumber().hashCode(); |
| | | hc = 31 * hc + getRevision().hashCode(); |
| | | return hc; |
| | | } |
| | | |
| | |
| | | */ |
| | | public File getBaseSchemaFile() throws ApplicationException |
| | | { |
| | | return new File(getConfigurationUpgradeDirectory(), |
| | | "schema.ldif." + getInstanceSvnRev()); |
| | | return new File(getConfigurationUpgradeDirectory(), "schema.ldif." + getInstanceVCSRevision()); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | public File getBaseConfigurationFile() throws ApplicationException |
| | | { |
| | | return new File(getConfigurationUpgradeDirectory(), |
| | | BASE_CONFIG_FILE_PREFIX + getInstanceSvnRev()); |
| | | return new File(getConfigurationUpgradeDirectory(), BASE_CONFIG_FILE_PREFIX + getInstanceVCSRevision()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Gets the SVN revision number of the build. |
| | | * Gets the VCS revision of the build. |
| | | * |
| | | * @return Integer representing the svn number |
| | | * @return String representing the VCS revision |
| | | * @throws ApplicationException |
| | | * if for some reason the number could not be determined |
| | | */ |
| | | public Integer getSvnRev() throws ApplicationException |
| | | public String getVCSRevision() throws ApplicationException |
| | | { |
| | | BuildInformation bi = getBuildInformation(); |
| | | return bi.getRevisionNumber(); |
| | | return getBuildInformation().getRevision(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Gets the SVN revision number of the instance. |
| | | * Gets the VCS revision of the instance. |
| | | * |
| | | * @return Integer representing the svn number |
| | | * @throws ApplicationException |
| | | * if for some reason the number could not be determined |
| | | */ |
| | | public Integer getInstanceSvnRev() throws ApplicationException |
| | | public String getInstanceVCSRevision() throws ApplicationException |
| | | { |
| | | BuildInformation bi = getInstanceBuildInformation(); |
| | | return bi.getRevisionNumber(); |
| | | return getInstanceBuildInformation().getRevision(); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | concatFile = new File(upgradeDirectory, |
| | | SCHEMA_BASE_FILE_NAME_WITHOUT_REVISION + |
| | | DynamicConstants.REVISION_NUMBER); |
| | | concatFile = new File(upgradeDirectory, SCHEMA_BASE_FILE_NAME_WITHOUT_REVISION + DynamicConstants.REVISION); |
| | | if (concatFile.exists()) |
| | | { |
| | | concatFilePath = concatFile.getAbsolutePath(); |
| | |
| | | updateDiskMonitor(tempDir, "backend import tmp directory"); |
| | | updateDiskMonitor(backendDirectory, "backend import DB directory"); |
| | | |
| | | logger.info(NOTE_IMPORT_STARTING, DirectoryServer.getVersionString(), BUILD_ID, REVISION_NUMBER); |
| | | logger.info(NOTE_IMPORT_STARTING, DirectoryServer.getVersionString(), BUILD_ID, REVISION); |
| | | logger.info(NOTE_IMPORT_THREAD_COUNT, threadCount); |
| | | initializeSuffixes(); |
| | | setupIndexesForImport(); |
| | |
| | | throw new InitializationException(ERR_IMPORT_LDIF_READER_IO_ERROR.get(), ioe); |
| | | } |
| | | |
| | | logger.info(NOTE_IMPORT_STARTING, DirectoryServer.getVersionString(), BUILD_ID, REVISION_NUMBER); |
| | | logger.info(NOTE_IMPORT_STARTING, DirectoryServer.getVersionString(), BUILD_ID, REVISION); |
| | | logger.info(NOTE_IMPORT_THREAD_COUNT, threadCount); |
| | | |
| | | final Storage storage = rootContainer.getStorage(); |
| | |
| | | throw new InitializationException(ERR_IMPORT_LDIF_READER_IO_ERROR.get(), ioe); |
| | | } |
| | | |
| | | logger.info(NOTE_IMPORT_STARTING, DirectoryServer.getVersionString(), BUILD_ID, REVISION_NUMBER); |
| | | logger.info(NOTE_IMPORT_STARTING, DirectoryServer.getVersionString(), BUILD_ID, REVISION); |
| | | logger.info(NOTE_IMPORT_THREAD_COUNT, threadCount); |
| | | |
| | | final Storage backendStorage = rootContainer.getStorage(); |
| | |
| | | throw new InitializationException(message); |
| | | } |
| | | |
| | | logger.info(NOTE_DIRECTORY_SERVER_STARTING, getVersionString(), BUILD_ID, REVISION_NUMBER); |
| | | logger.info(NOTE_DIRECTORY_SERVER_STARTING, getVersionString(), BUILD_ID, REVISION); |
| | | |
| | | // Acquire an exclusive lock for the Directory Server process. |
| | | if (! serverLocked) |
| | |
| | | System.out.println(SetupUtils.BUILD_NUMBER+separator+ |
| | | new DecimalFormat("000").format(BUILD_NUMBER)); |
| | | } |
| | | System.out.println(SetupUtils.REVISION_NUMBER+separator+REVISION_NUMBER); |
| | | System.out.println(SetupUtils.REVISION+separator+REVISION); |
| | | System.out.println(SetupUtils.URL_REPOSITORY+separator+URL_REPOSITORY); |
| | | System.out.println(SetupUtils.FIX_IDS+separator+FIX_IDS); |
| | | System.out.println(SetupUtils.DEBUG_BUILD+separator+DEBUG_BUILD); |
| | |
| | | attrs.add(createAttribute(ATTR_FIX_IDS, fixIDs)); |
| | | } |
| | | |
| | | attrs.add(createAttribute(ATTR_REVISION_NUMBER, |
| | | String.valueOf(DynamicConstants.REVISION_NUMBER))); |
| | | attrs.add(createAttribute(ATTR_REVISION_NUMBER, String.valueOf(DynamicConstants.REVISION))); |
| | | attrs.add(createAttribute(ATTR_BUILD_ID, DynamicConstants.BUILD_ID)); |
| | | attrs.add(createAttribute(ATTR_COMPACT_VERSION, |
| | | DynamicConstants.COMPACT_VERSION_STRING)); |
| | |
| | | static |
| | | { |
| | | // @formatter:off |
| | | register("2.5.0.6869", |
| | | register("2.5.0", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_6869_SUMMARY.get(), |
| | | "(objectClass=ds-cfg-collation-matching-rule)", |
| | | "add: ds-cfg-collation", |
| | |
| | | "ds-cfg-collation: de:1.3.6.1.4.1.142.2.27.9.4.28.1", |
| | | "ds-cfg-collation: de-DE:1.3.6.1.4.1.142.2.27.9.4.28.1")); |
| | | |
| | | register("2.5.0.7192", |
| | | register("2.5.0", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_7192_SUMMARY.get(), |
| | | "(objectClass=ds-cfg-password-policy)", |
| | | "add: objectClass", |
| | |
| | | "add: ds-cfg-java-class", |
| | | "ds-cfg-java-class: org.opends.server.core.PasswordPolicyFactory")); |
| | | |
| | | register("2.5.0.7364", |
| | | register("2.5.0", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_7364_SUMMARY.get(), |
| | | "(ds-cfg-java-class=org.opends.server.loggers.TextAuditLogPublisher)", |
| | | "add: objectClass", |
| | |
| | | "delete: objectClass", |
| | | "objectClass: ds-cfg-file-based-access-log-publisher")); |
| | | |
| | | register("2.5.0.7466", |
| | | register("2.5.0", |
| | | renameSnmpSecurityConfig(INFO_UPGRADE_TASK_7466_SUMMARY.get())); |
| | | |
| | | register("2.5.0.7748", |
| | | register("2.5.0", |
| | | newAttributeTypes(INFO_UPGRADE_TASK_7748_1_SUMMARY.get(), |
| | | "00-core.ldif", "1.3.6.1.4.1.36733.2.1.1.59"), //etag |
| | | addConfigEntry(INFO_UPGRADE_TASK_7748_2_SUMMARY.get(), |
| | |
| | | "ds-cfg-checksum-algorithm: adler-32", |
| | | "ds-cfg-excluded-attribute: ds-sync-hist")); |
| | | |
| | | register("2.5.0.7834", |
| | | register("2.5.0", |
| | | addConfigEntry(INFO_UPGRADE_TASK_7834_SUMMARY.get(), |
| | | "dn: cn=Password Expiration Time,cn=Virtual Attributes,cn=config", |
| | | "changetype: add", |
| | |
| | | "ds-cfg-attribute-type: ds-pwp-password-expiration-time", |
| | | "ds-cfg-conflict-behavior: virtual-overrides-real")); |
| | | |
| | | register("2.5.0.7979", |
| | | register("2.5.0", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_7979_SUMMARY.get(), |
| | | "(ds-cfg-java-class=org.opends.server.schema.CertificateSyntax)", |
| | | "add: objectClass", |
| | |
| | | "add: ds-cfg-strict-format", |
| | | "ds-cfg-strict-format: false")); |
| | | |
| | | register("2.5.0.8124", |
| | | register("2.5.0", |
| | | 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.8133", |
| | | register("2.5.0", |
| | | 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.8214", |
| | | register("2.5.0", |
| | | requireConfirmation(INFO_UPGRADE_TASK_8214_DESCRIPTION.get(), |
| | | 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.8387", |
| | | register("2.5.0", |
| | | 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.8389", |
| | | register("2.5.0", |
| | | 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.8487", |
| | | register("2.5.0", |
| | | 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.8613", |
| | | register("2.5.0", |
| | | 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.8832", addConfigEntry(INFO_UPGRADE_TASK_8832_SUMMARY.get(), |
| | | register("2.5.0", 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.8985", |
| | | register("2.5.0", |
| | | 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.9013", |
| | | register("2.5.0", |
| | | regressionInVersion("2.5.0.7640", |
| | | rebuildSingleIndex(INFO_UPGRADE_TASK_9013_DESCRIPTION.get(), |
| | | "ds-sync-hist"))); |
| | | |
| | | /** See OPENDJ-1284 */ |
| | | register("2.7.0.10133", // userCertificate OID / cACertificate OID |
| | | register("2.7.0", // userCertificate OID / cACertificate OID |
| | | newAttributeTypes(INFO_UPGRADE_TASK_10133_1_SUMMARY.get(), |
| | | "00-core.ldif", "2.5.4.36", "2.5.4.37"), |
| | | addConfigEntry(INFO_UPGRADE_TASK_10133_2_SUMMARY.get(), |
| | |
| | | |
| | | |
| | | /** See OPENDJ-1295 */ |
| | | register("2.7.0.10215", |
| | | register("2.7.0", |
| | | copySchemaFile("03-pwpolicyextension.ldif")); |
| | | |
| | | register("2.8.0.10214", |
| | | register("2.8.0", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_10214_SUMMARY.get(), |
| | | "(ds-cfg-java-class=org.opends.server.loggers.debug.TextDebugLogPublisher)", |
| | | "delete:ds-cfg-java-class", |
| | |
| | | "add:ds-cfg-java-class", |
| | | "ds-cfg-java-class: org.opends.server.loggers.TextDebugLogPublisher")); |
| | | |
| | | register("2.8.0.10232", |
| | | register("2.8.0", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_10232_SUMMARY.get(), |
| | | "(objectclass=ds-cfg-file-based-debug-log-publisher)", |
| | | "delete:ds-cfg-default-debug-level")); |
| | | |
| | | register("2.8.0.10329", |
| | | register("2.8.0", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_10329_SUMMARY.get(), |
| | | "&(objectclass=ds-cfg-file-based-error-log-publisher)(cn=File-Based Error Logger)", |
| | | "delete:ds-cfg-default-severity", |
| | |
| | | "ds-cfg-default-severity: warning" |
| | | )); |
| | | |
| | | register("2.8.0.10339", |
| | | register("2.8.0", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_10339_SUMMARY.get(), |
| | | "&(objectclass=ds-cfg-file-based-error-log-publisher)(cn=Replication Repair Logger)", |
| | | "delete:ds-cfg-override-severity", |
| | |
| | | "ds-cfg-override-severity: SYNC=INFO,ERROR,WARNING,NOTICE")); |
| | | |
| | | /** See OPENDJ-1490 and OPENDJ-1454 */ |
| | | register("2.7.0.10703", |
| | | register("2.7.0", |
| | | deleteConfigEntry(INFO_UPGRADE_TASK_10733_1_SUMMARY.get(), |
| | | "dn: ds-cfg-backend-id=replicationChanges,cn=Backends,cn=config"), |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_10733_2_SUMMARY.get(), |
| | |
| | | + "deny (all) userdn=\"ldap:///anyone\";)")); |
| | | |
| | | /** See OPENDJ-1351 */ |
| | | register("2.7.0.10820", |
| | | register("2.7.0", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_10820_SUMMARY.get(), |
| | | "(objectClass=ds-cfg-root-dn)", |
| | | "add: ds-cfg-default-root-privilege-name", |
| | | "ds-cfg-default-root-privilege-name: changelog-read")); |
| | | |
| | | /** See OPENDJ-1580 */ |
| | | register("2.7.0.10908", |
| | | register("2.7.0", |
| | | addConfigEntry(INFO_UPGRADE_TASK_10908_SUMMARY.get(), |
| | | "dn: cn=PKCS5S2,cn=Password Storage Schemes,cn=config", |
| | | "changetype: add", |
| | |
| | | "ds-cfg-enabled: true")); |
| | | |
| | | /** See OPENDJ-1545 */ |
| | | register("2.8.0.11237", |
| | | register("2.8.0", |
| | | deleteConfigEntry(INFO_UPGRADE_TASK_11237_1_SUMMARY.get(), |
| | | "dn: cn=Network Groups,cn=config"), |
| | | deleteConfigEntry(INFO_UPGRADE_TASK_11237_2_SUMMARY.get(), |
| | | "dn: cn=Workflows,cn=config"), |
| | | deleteConfigEntry(INFO_UPGRADE_TASK_11237_3_SUMMARY.get(), |
| | | "dn: cn=Workflow Elements,cn=config")); |
| | | register("2.8.0.11239", |
| | | register("2.8.0", |
| | | deleteConfigEntry(INFO_UPGRADE_TASK_11239_SUMMARY.get(), |
| | | "dn: cn=Network Group,cn=Plugins,cn=config")); |
| | | register("2.8.0.11339", |
| | | register("2.8.0", |
| | | deleteConfigEntry(INFO_UPGRADE_TASK_11339_SUMMARY.get(), |
| | | "dn: cn=Extensions,cn=config")); |
| | | |
| | | /** See OPENDJ-1637 */ |
| | | register("2.8.0.11260", |
| | | register("2.8.0", |
| | | rebuildAllIndexes(INFO_UPGRADE_TASK_11260_SUMMARY.get())); |
| | | |
| | | /** See OPENDJ-1701 */ |
| | | register("2.8.0.11476", |
| | | register("2.8.0", |
| | | deleteConfigEntry(INFO_UPGRADE_TASK_11476_SUMMARY.get(), |
| | | "dn: cn=File System,cn=Entry Caches,cn=config")); |
| | | |
| | | /** See OPENDJ-1869 */ |
| | | register("2.8.0.12226", |
| | | register("2.8.0", |
| | | modifyConfigEntry(INFO_UPGRADE_TASK_12226_SUMMARY.get(), |
| | | "(objectclass=ds-cfg-root-config)", |
| | | "delete: ds-cfg-entry-cache-preload")); |
| | | |
| | | /** See OPENDJ-2054 */ |
| | | register("2.8.0.12451", |
| | | register("2.8.0", |
| | | deleteFile(new File(binDirectory, "dsframework")), |
| | | deleteFile(new File(batDirectory, "dsframework.bat"))); |
| | | |
| | | /** See OPENDJ-1322 and OPENDJ-1067 */ |
| | | register("2.7.0.9206", |
| | | register("2.7.0", |
| | | rerunJavaPropertiesTool(INFO_UPGRADE_TASK_9206_SUMMARY.get())); |
| | | |
| | | /* |
| | |
| | | |
| | | try |
| | | { |
| | | String toRevision = String.valueOf(context.getToVersion().getRevisionNumber()); |
| | | String toRevision = String.valueOf(context.getToVersion().getRevision()); |
| | | updateConfigUpgradeSchemaFile(configSchemaDirectory, toRevision); |
| | | |
| | | context.notifyProgress(pnc.setProgress(100)); |
| | |
| | | private final int major; |
| | | private final int minor; |
| | | private final int point; |
| | | private final long rev; |
| | | private final String rev; |
| | | private static final BuildVersion BINARY_VERSION = new BuildVersion( |
| | | DynamicConstants.MAJOR_VERSION, DynamicConstants.MINOR_VERSION, |
| | | DynamicConstants.POINT_VERSION, DynamicConstants.REVISION_NUMBER); |
| | | DynamicConstants.POINT_VERSION, DynamicConstants.REVISION); |
| | | |
| | | /** |
| | | * Returns the build version as specified by the dynamic constants. |
| | |
| | | * form: |
| | | * |
| | | * <pre> |
| | | * major.minor.point.rev |
| | | * major.minor.point[.rev] |
| | | * </pre> |
| | | * |
| | | * @param s |
| | |
| | | public static BuildVersion valueOf(final String s) throws IllegalArgumentException |
| | | { |
| | | final String[] fields = s.split("\\."); |
| | | if (fields.length != 4) |
| | | final int nbFields = fields.length; |
| | | if (!(nbFields == 3 || nbFields == 4)) |
| | | { |
| | | throw new IllegalArgumentException("Invalid version string " + s); |
| | | } |
| | | final int major = Integer.parseInt(fields[0]); |
| | | final int minor = Integer.parseInt(fields[1]); |
| | | final int point = Integer.parseInt(fields[2]); |
| | | final long rev = Long.parseLong(fields[3]); |
| | | return new BuildVersion(major, minor, point, rev); |
| | | |
| | | if (nbFields == 4) |
| | | { |
| | | return new BuildVersion(major, minor, point, fields[3]); |
| | | } |
| | | else |
| | | { |
| | | return new BuildVersion(major, minor, point); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Creates a new build version using the provided version information. |
| | | * |
| | | * @param major |
| | | * Major release version number. |
| | | * @param minor |
| | | * Minor release version number. |
| | | * @param point |
| | | * Point release version number. |
| | | */ |
| | | public BuildVersion(final int major, final int minor, final int point) |
| | | { |
| | | this(major, minor, point, ""); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param point |
| | | * Point release version number. |
| | | * @param rev |
| | | * VCS revision number. |
| | | * VCS revision. |
| | | */ |
| | | public BuildVersion(final int major, final int minor, final int point, final long rev) |
| | | public BuildVersion(final int major, final int minor, final int point, final String rev) |
| | | { |
| | | this.major = major; |
| | | this.minor = minor; |
| | |
| | | { |
| | | return 0; |
| | | } |
| | | else if (rev < version.rev) |
| | | else if (rev.compareTo(version.rev) < 0) |
| | | { |
| | | return -1; |
| | | } |
| | |
| | | else if (obj instanceof BuildVersion) |
| | | { |
| | | final BuildVersion other = (BuildVersion) obj; |
| | | return major == other.major && minor == other.minor && point == other.point && rev == other.rev; |
| | | return major == other.major && minor == other.minor && point == other.point && rev.equals(other.rev); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the VCS revision number. |
| | | * Returns the VCS revision. |
| | | * |
| | | * @return The VCS revision number. |
| | | * @return The VCS revision. |
| | | */ |
| | | public long getRevisionNumber() |
| | | public String getRevision() |
| | | { |
| | | return rev; |
| | | } |
| | |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | | return Arrays.hashCode(new int[] { major, minor, point, (int) (rev >>> 32), (int) (rev & 0xFFFFL) }); |
| | | return Arrays.hashCode(new int[] { major, minor, point, rev.hashCode() }); |
| | | } |
| | | |
| | | @Override |
| | |
| | | public static final String MINOR_VERSION = "Minor Version"; |
| | | /** Point version of the product. */ |
| | | public static final String POINT_VERSION = "Point Version"; |
| | | /** Revision number in SVN. */ |
| | | public static final String REVISION_NUMBER = "Revision Number"; |
| | | /** The SVN url repository. */ |
| | | /** Revision in VCS. */ |
| | | public static final String REVISION = "Revision Number"; |
| | | /** The VCS url repository. */ |
| | | public static final String URL_REPOSITORY = "URL Repository"; |
| | | /** The version qualifier. */ |
| | | public static final String VERSION_QUALIFIER = "Version Qualifier"; |
| | |
| | | |
| | | static |
| | | { |
| | | register(Cause.DS_SYNC_HIST_NORMALIZATION_CHANGE_1, new BuildVersion(2, 4, |
| | | 5, 7635)); |
| | | register (Cause.REVERT_NOT_SUPPORTED_1, new BuildVersion(2,0,0,5278)); |
| | | register(Cause.STRINGPREP_NORMALIZATION_CHANGE_1, |
| | | new BuildVersion(1,2,0,5134)); |
| | | register(Cause.DN_NORMALIZATION_CHANGE_1, new BuildVersion(1, 0, 0, 3873)); |
| | | register(Cause.BACKEND_CONFIGURATION_CHANGE_1, |
| | | new BuildVersion(1, 0, 0, 3708)); |
| | | register(Cause.REPLICATION_SECURITY_CHANGE_1, |
| | | new BuildVersion(1, 0, 0, 3294)); |
| | | register(Cause.PROPERTY_CHANGE_1, new BuildVersion(1, 0, 0, 3053)); |
| | | register(Cause.DB_FORMAT_CHANGE_2, new BuildVersion(0, 9, 0, 2049)); |
| | | register(Cause.DB_FORMAT_CHANGE_1, new BuildVersion(0, 1, 0, 1582)); |
| | | register(Cause.BERKLEY_UPGRADE_1, new BuildVersion(0, 1, 0, 890)); |
| | | register(Cause.DS_SYNC_HIST_NORMALIZATION_CHANGE_1, new BuildVersion(2, 4, 5)); |
| | | register(Cause.REVERT_NOT_SUPPORTED_1, new BuildVersion(2, 0, 0)); |
| | | register(Cause.STRINGPREP_NORMALIZATION_CHANGE_1, new BuildVersion(1, 2, 0)); |
| | | register(Cause.DN_NORMALIZATION_CHANGE_1, new BuildVersion(1, 0, 0)); |
| | | register(Cause.BACKEND_CONFIGURATION_CHANGE_1, new BuildVersion(1, 0, 0)); |
| | | register(Cause.REPLICATION_SECURITY_CHANGE_1, new BuildVersion(1, 0, 0)); |
| | | register(Cause.PROPERTY_CHANGE_1, new BuildVersion(1, 0, 0)); |
| | | register(Cause.DB_FORMAT_CHANGE_2, new BuildVersion(0, 9, 0)); |
| | | register(Cause.DB_FORMAT_CHANGE_1, new BuildVersion(0, 1, 0)); |
| | | register(Cause.BERKLEY_UPGRADE_1, new BuildVersion(0, 1, 0)); |
| | | } |
| | | |
| | | private static void register(Cause cause, |
| | |
| | | for (VersionCompatibilityIssue evt : VERSION_COMPATIBILITY_ISSUES) { |
| | | if (!excludeIds.contains(evt.getCause().getId())) { |
| | | BuildVersion currentVersion = new BuildVersion( |
| | | current.getMajorVersion(), current.getMinorVersion(), |
| | | current.getPointVersion(), current.getRevisionNumber()); |
| | | current.getMajorVersion(), current.getMinorVersion(), current.getPointVersion()); |
| | | // If the currentVersion is newer than the issue described, then there |
| | | // is no problem. This can occur for instance when we discovered a |
| | | // flag day too late (and we added the flag day description to the |
| | |
| | | */ |
| | | public static boolean DEBUG_BUILD = ${isDebugBuild}; |
| | | |
| | | /** |
| | | * The Subversion revision number on which this build is based. |
| | | */ |
| | | public static long REVISION_NUMBER = ${buildRevision}; |
| | | /** The revision on which this build is based. */ |
| | | public static String REVISION = "${buildRevision}"; |
| | | |
| | | /** |
| | | * The Subversion url repository location on which this build is based. |
| | | */ |
| | | public static String URL_REPOSITORY = "${scm.url}"; |
| | | public static String URL_REPOSITORY = |
| | | "${scm.url}"; |
| | | |
| | | /** |
| | | * The documentation home. |
| | |
| | | } |
| | | catch (Exception ex) {} |
| | | try{ |
| | | REVISION_NUMBER = (Long)c.getField("REVISION_NUMBER").get(obj); |
| | | REVISION = (String)c.getField("REVISION_NUMBER").get(obj); |
| | | } |
| | | catch (Exception ex) {} |
| | | try{ |
| | |
| | | processing completed in %d seconds, phase two processing completed in %d seconds |
| | | NOTE_IMPORT_PROGRESS_REPORT_532=Processed %d entries, skipped %d \ |
| | | and rejected %d (recent rate %.1f/sec) |
| | | NOTE_IMPORT_STARTING_533=%s starting import (build %s, R%d) |
| | | NOTE_IMPORT_STARTING_533=%s starting import (build %s, R%s) |
| | | NOTE_IMPORT_THREAD_COUNT_534=Import Thread Count: %d threads |
| | | NOTE_INDEX_ADD_REQUIRES_REBUILD_535=Due to changes in the \ |
| | | configuration, index %s is currently operating in a degraded state and must \ |
| | |
| | | bootstrap the attribute syntax defined in class %s: %s |
| | | INFO_DIRECTORY_BOOTSTRAPPING_132=The Directory Server is beginning the \ |
| | | configuration bootstrapping process |
| | | NOTE_DIRECTORY_SERVER_STARTING_134=%s (build %s, R%d) starting up |
| | | NOTE_DIRECTORY_SERVER_STARTING_134=%s (build %s, R%s) starting up |
| | | NOTE_DIRECTORY_SERVER_STARTED_135=The Directory Server has started \ |
| | | successfully |
| | | ERR_CANNOT_CREATE_MBEAN_SERVER_138=An error occurred while attempting \ |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 Forgerock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | |
| | | */ |
| | | @Test(enabled = false) |
| | | public void testGetSvnRev() throws ApplicationException { |
| | | assertNotNull(installation.getSvnRev()); |
| | | assertNotNull(installation.getVCSRevision()); |
| | | } |
| | | |
| | | /** |
| | |
| | | <parent> |
| | | <groupId>org.forgerock</groupId> |
| | | <artifactId>forgerock-parent</artifactId> |
| | | <version>2.0.0</version> |
| | | <version>2.0.3</version> |
| | | </parent> |
| | | <groupId>org.forgerock.opendj</groupId> |
| | | <artifactId>opendj-project</artifactId> |
| | |
| | | </mailingList> |
| | | </mailingLists> |
| | | <scm> |
| | | <url>https://svn.forgerock.org/opendj/trunk/opendj/</url> |
| | | <connection>scm:svn:https://svn.forgerock.org/opendj/trunk/opendj/</connection> |
| | | <developerConnection>scm:svn:https://svn.forgerock.org/opendj/trunk/opendj/</developerConnection> |
| | | <url>https://stash.forgerock.org/projects/OPENDJ/repos/opendj/browse</url> |
| | | <connection>scm:git:ssh://git@stash.forgerock.org:7999/opendj/opendj.git</connection> |
| | | <developerConnection>scm:git:ssh://git@stash.forgerock.org:7999/opendj/opendj.git</developerConnection> |
| | | </scm> |
| | | <ciManagement> |
| | | <system>jenkins</system> |