UpstreamingFaq

From IcedTea

Jump to: navigation, search

Now that the gates are open for patches to be pushed upstream, we want to make sure as many patches as possible make it to the upstream repositories rather than having to be maintained in IcedTea. Maintaining patches locally makes it necessary to check that it still applies against each new upstream build drop (which occur weekly with OpenJDK7) and also means that they don't have the benefit of review by the larger OpenJDK community (including Sun employees who have worked on this code for many years).

In this FAQ, we outline the process of getting a patch from upstream into the appropriate OpenJDK7 tree. This is usually the first place to push a patch. Joe Darcy can then be contacted to approve pushing the same patch to the OpenJDK6 repository.

  1. First things first is to make sure you can legally push the patch upstream to OpenJDK. This requires the author to have signed the SCA. Any patches by Red Hat employees are automatically eligible as Red Hat has a company-wide SCA.
  2. The next task is to make sure that the patch builds against the JDK7 repository you plan to commit to. The developer guide provides the necessary mapping between the affected code and the mailing list and repositories to use when committing. Note that at present this is outdated, as JSN is now part of the Tools and Libraries (tl) project. See BuildingOpenJDK for instructions on how to perform a build of OpenJDK.
  3. Assuming your build is successful, you can proceed to create a 'webrev' to post to the list. You can obtain a copy here. From the tl directory (or equivalent top-level directory for the tree you checked out), run webrev -fN. The f option tells webrev that this is a forest, not just one Mercurial repository. The N tells webrev not to bother looking for outgoing commits (because you didn't hg commit the patch), but to use diffs.
  4. Once created, the webrev can be uploaded to any web server. For those with OpenJDK commit access, it should be possible to use scp to push the directory to ${OPENJDK_USERNAME}@cr.openjdk.java.net, but any publicly accessible location will do. You can then post this link to the appropriate mailing list and request approval for the patch. If you do have OpenJDK commit rights, ask for approval to push it. Otherwise, ask for someone to do it for you!* Note that commits have to follow an exact format which includes a Sun bug ID. The easiest way to get these is usually for a Sun developer to create one for you. Some of our older patches already have them. Unfortunately, we can't yet use IDs from the OpenJDK bug database.

Good luck! The process is slow and can be frustrating at times, but in the end we can all help create a better JDK.

  • Sun employees will usually be quite happy to commit a patch for you. Most IcedTea developers at Red Hat also have commit access.
Personal tools