From owner-freebsd-java@FreeBSD.ORG Sun Jun 19 20:54:50 2011 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DB7B106564A for ; Sun, 19 Jun 2011 20:54:50 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id DDD168FC18 for ; Sun, 19 Jun 2011 20:54:49 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 476841DD670 for ; Sun, 19 Jun 2011 22:54:49 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 3C63C17431; Sun, 19 Jun 2011 22:54:49 +0200 (CEST) Date: Sun, 19 Jun 2011 22:54:49 +0200 From: Jilles Tjoelker To: freebsd-java@freebsd.org Message-ID: <20110619205449.GC69133@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Subject: java timezone data files X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jun 2011 20:54:50 -0000 Various Java ports want a "tzupdater" from Sun/Oracle which can be annoying to download. I noticed that Ubuntu/Debian do not need this tzupdater and have a package with timezone data files for Java. It turns out that these files can be generated on FreeBSD as well. A page about the Debian package is at http://packages.debian.org/sid/tzdata-java The interesting part is the .debian.tar.gz tarball in the "Download Source Package" section, for example http://ftp.de.debian.org/debian/pool/main/t/tzdata/tzdata_2011g-1.debian.tar.gz This contains a patch debian/patches/java.diff with additional files that Java needs and a file debian/rules which says how to build it. The original source simply contains what we have in head src/contrib/tzdata, plus three files solar87, solar88 and solar89. I am using openjdk6 because Debian also uses it for this purpose. Unfortunately, the port does not install javazic.jar but it is in the work directory as build/bsd-i586/btjars/javazic.jar . After copying our tzdata to a temporary directory and applying Debian's java.diff to it, the following command creates the data files (in tzgen-java/): java -jar \ /usr/ports/java/openjdk6/work/build/bsd-i586/btjars/javazic.jar \ -V 2011g -d tzgen-java \ africa antarctica asia australasia europe northamerica southamerica \ etcetera factory backward systemv pacificnew \ gmt jdk11_backward This gives a few error messages but generates files. These files are quite similar to those in /usr/local/jdk1.6.0/jre/lib/zi and Europe/Amsterdam even matches exactly. Replacing the files, java from jdk1.6.0 still appears to work correctly, although I do not know how to test this more thoroughly. -- Jilles Tjoelker