[arch-general] [Q] Package all sources in openjdk8-src as Fedora does

Konstantin Gribov grossws at gmail.com
Tue Jul 21 11:22:13 UTC 2015


Sorry, it seems mailing list software strips attachments. The patch you
mentioned is that one I mean.
It varies between openjdk updates (it was different between u45 and u51,
mine is for u51).

I think, upstream wouldn't add these packages to src.zip since them
explicitly do package whitelisting.

--- java8-openjdk/PKGBUILD 2015-07-20 01:05:35.531198152 +0300
+++ java8-openjdk-my/PKGBUILD 2015-07-20 19:03:17.047168335 +0300
@@ -15,7 +15,7 @@
 _jdk_build=16
 pkgver=${_java_ver}.u${_jdk_update}
 _repo_ver=jdk${_java_ver}u${_jdk_update}-b${_jdk_build}
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 url='http://openjdk.java.net/'
 license=('custom')
@@ -31,7 +31,8 @@

 langtools-${_repo_ver}.tar.gz::${_url_src}/langtools/archive/${_repo_ver}.tar.gz

 nashorn-${_repo_ver}.tar.gz::${_url_src}/nashorn/archive/${_repo_ver}.tar.gz
         JDK-8074312-hotspot.patch
-
 JVM_fastdebug_build_compiled_with_GCC_5_asserts_with_widen_increases.patch)
+
 JVM_fastdebug_build_compiled_with_GCC_5_asserts_with_widen_increases.patch
+        all-sources.patch)

 sha256sums=('02eab2b937ed83c4505e93f58ad0b84a4e1a69e6d0baa4d041ec09ed98f18c2d'

 '00d783dda3a7d87eb55a72febe7666c4b3297616ef3f11bbd679a05f19a81825'
@@ -42,7 +43,8 @@

 '3171ec4dbd96747eeb876a8fd3caf1e1e52da3dc91b63308193c914a5501d6e4'

 'ffdd0446fce7b624f2cdc80297b99eecfdf30adfee39d3b8832a78c1dc202636'

 '95fbd155806cac22de9e6df6f4f92ae79530f86d63cea1deaf98e607953e0b50'
-
 '8df4d5d78753ebc5bc425fd1c8fe788106ac8b9d3155feb162a748a96c81cc05')
+
 '8df4d5d78753ebc5bc425fd1c8fe788106ac8b9d3155feb162a748a96c81cc05'
+
 '19ecefff54ebc25a96b0fa2f0e2ec7e35309e876574dadf16a524399498eda04')

 case "${CARCH}" in
   'x86_64') _JARCH=amd64 ; _DOC_ARCH=x86_64 ;;
@@ -63,9 +65,12 @@

   for subrepo in corba hotspot jdk jaxws jaxp langtools nashorn
   do
-    ln -s ../${subrepo}-${_repo_ver} ${subrepo}
+    ln -sf ../${subrepo}-${_repo_ver} ${subrepo}
   done

+  cd "${srcdir}/jdk-${_repo_ver}"
+  patch -p1 < "${srcdir}"/all-sources.patch
+
   cd "${srcdir}/hotspot-${_repo_ver}"
   # https://bugs.openjdk.java.net/browse/JDK-8074312
   patch -p1 < "${srcdir}"/JDK-8074312-hotspot.patch


--- jdk/make/CreateJars.gmk
+++ jdk/make/CreateJars.gmk
@@ -569,38 +569,12 @@
 ##########################################################################################

 SRC_ZIP_INCLUDES = \
-    com/sun/corba \
-    com/sun/image/codec/jpeg \
-    com/sun/imageio \
-    com/sun/java_cup \
-    com/sun/javadoc \
-    com/sun/java/swing \
-    com/sun/jmx \
-    com/sun/naming \
-    com/sun/org/apache \
-    com/sun/security/auth \
-    com/sun/security/jgss \
-    com/sun/source \
+    com \
     java \
-    javax/accessibility \
-    javax/annotation \
-    javax/imageio \
-    javax/lang \
-    javax/management \
-    javax/naming \
-    javax/print \
-    javax/rmi \
-    javax/script \
-    javax/security \
-    javax/sound \
-    javax/sql \
-    javax/swing \
-    javax/tools \
-    javax/xml \
-    org/ietf \
-    org/omg \
-    org/w3c/dom \
-    org/xml/sax \
+    javax \
+    jdk \
+    org \
+    sun \
     #

 SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
@@ -632,7 +606,6 @@
 $(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
     SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
     INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
-    EXCLUDES := javax/swing/beaninfo, \
     SUFFIXES := .java .c .h, \
     ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
     EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))


вт, 21 июля 2015 г. в 11:09, Guillaume ALAUX <guillaume at archlinux.org>:

> On Mon, Jul 20, 2015 at 7:08 PM, Konstantin Gribov <grossws at gmail.com>
> wrote:
> >
> > As I saw in fedora openjdk rpm, they bundle non-public java sources (like
> > packages in sun, jdk etc). It's quite useful for debugging when low-level
> > jdk parts involved, so I propose this patch (based on java8-openjdk
> > 8.u51-1).
> >
> > File all-sources.patch contains patch for
> > ${srcdir}/jdk-${_repo_ver}/make/CreateJars.gmk to include all sources
> > instead of whitelisted ones.
> > PKGBUILD.patch adds all-sources.patch to sources, its checksum and apply
> it
> > in prepare phase.
> >
> > --
> > Best regards,
> > Konstantin Gribov
>
> You did not link the patch but I guess the one you are talking of is [0].
>
> Could you argue why this should belong to Arch rather than upstream
> (OpenJDK or IcedTea)?
>
> [0]
> http://pkgs.fedoraproject.org/cgit/java-1.8.0-openjdk.git/tree/include-all-srcs.patch
>
-- 
Best regards,
Konstantin Gribov


More information about the arch-general mailing list