created an patch and install process for openjdk6

Kurt Miller kurt at intricatesoftware.com
Sat Jan 31 06:17:12 PST 2009


Hi Brian,

Terrific! You've accomplish a lot in a short period of time. I haven't
the opportunity to try this yet, but I read the method you followed and
have some comments below.

Brian Gardner wrote:
> How did I perform the Port
> 
> I started by duplicating jdk6 to bsd-port6.  Then I take the difference 
> between jdk7 and bsd-port and import them.  I had trouble using patch 
> -Nu jdk7 bsd-port because there were new files that contained long lines 
> that patch complained about.  I whipped up a quick perl script to 
> compare the directories and create the 
> jdk7_bsd_changes_20090126.newfiles and jdk7_bsd_changes_20090126.patches 
> directories.

Sounds good.

>  Any file the was brand new to bsd-port was copied into 
> jdk7_bsd_changes_20090126.newfiles to avoid the patch issue with long 
> lines.

This part is going to cause some issues. Coping the bsd src back from
openjdk7 to openjdk6 is bad. It will be mixing new openjdk with old.
I'll explain more about how to do this correctly below.

>  jdk7_bsd_changes_20090126.patches contains a separate patch for 
> each file the was changed between jdk7 and bsd-port.  Not all of these 
> patches applied cleanly so I then went through about 40 .rej files and 
> applied the patches by hand, keeping track of the changes.  When 
> compiling I released the build structure had changed between jdk6 and 
> jdk7 and bsd-port6/hotspot/make/bsd/ had to be moved to 
> bsd-port6/hotspot/build/bsd.  Makefiles also had to be patched to 
> complete the change.  custom-patches contains these patches.

Generally speaking the process you followed for patches to existing
files is good. i.e. take the diff of bsd-port and jdk7 forests, then
apply that back to jdk6, resolve conflicts and moved directories by
hand.

For new bsd files the process needs to follow a more indirect path
to ensure that the resulting bsd files are in sync with openjdk6.

First let me explain how those bsd files were created. Going back
to 1.4 and 1.5 jdks we used a mix of Linux and Solaris as the basis
for creating the bsd source. However with openjdk7 and the 1.6 port
we switched to only using Linux as basis for the bsd source. We did this
for a few reasons but I digress. The important point is that the new
files for the bsd port are based almost exclusively on the linux src.

The process to move 'new file' bsd support back to openjdk6 (or forward
to openjdk8) is as follows. Create a diff of the new bsd file against
the corresponding linux file from which it was created in bsd-port.
Then in openjdk6 copy the linux file to bsd directory/name as the
starting point and apply the diff, resolve conflicts by hand.

It is important to follow this process especially for hotspot since
subtable breakage can be introduced by just coping back a subset of
openjdk7 code into openjdk6.

Here is a list of the linux directories and files that that were
copied to start the basis of bsd files:

COPYDIRS=       hotspot/src/os/linux/launcher \
                hotspot/src/os/linux/vm \
                hotspot/src/os_cpu/linux_x86/vm \
                hotspot/make/linux \
                hotspot/make/linux/makefiles \
                jdk/src/linux/doc/man

COPYFILES=      corba/make/common/Defs-linux.gmk \
                corba/make/common/shared/Defs-linux.gmk \
                jdk/make/common/Defs-linux.gmk \
                jdk/make/common/shared/Defs-linux.gmk \
                jdk/make/java/nio/mapfile-linux \

jdk/make/netbeans/common/architectures/name-Linux.properties \
                jdk/make/sun/awt/mapfile-vers-linux \
                jdk/make/tools/sharing/classlist.linux \
                jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux \

jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.properties \

jdk/src/solaris/classes/sun/tools/attach/LinuxAttachProvider.java \
                jdk/src/solaris/hpi/include/largefile_linux.h

And the one Solaris file used as a starting point is:

jdk/src/solaris/hpi/native_threads/src/threads_solaris.c

Regards,
-Kurt



More information about the bsd-port-dev mailing list