Gentoo Archives: gentoo-commits

From: "Ralph Sennhauser (sera)" <sera@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/icedtea/files: icedtea-6_pax_kernel_support.patch
Date: Mon, 06 Feb 2012 06:49:12
Message-Id: 20120206064900.D23002004C@flycatcher.gentoo.org
1 sera 12/02/06 06:49:00
2
3 Added: icedtea-6_pax_kernel_support.patch
4 Log:
5 Version bump, move from java-overlay.
6 Always uses CACAO as best alternative JVM if HotSpot isn't available.
7 USE=-X, don't install X11GraphicsEnvironment. #399367
8 Add revdep mask for reduced installs. (-X, -alsa, -cups) #400691, #401621
9
10 (Portage version: 2.1.10.44/cvs/Linux x86_64)
11
12 Revision Changes Path
13 1.1 dev-java/icedtea/files/icedtea-6_pax_kernel_support.patch
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/files/icedtea-6_pax_kernel_support.patch?rev=1.1&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/files/icedtea-6_pax_kernel_support.patch?rev=1.1&content-type=text/plain
17
18 Index: icedtea-6_pax_kernel_support.patch
19 ===================================================================
20 Author: Ralph Sennhaser <sera@g.o>
21
22 The idea is to apply the pax markings before using a freshly built jdk. Be it
23 for running tests or building additonal vms or after bootstrap to build the
24 final jdk.
25
26 There are currently two types of pax markings with the userspace utilities
27 chpax and paxctl. Both types of pax marking are base on modifing the ELFs. A
28 third type based on xattrs is in development.
29
30 diff --git a/Makefile.am b/Makefile.am
31 index 82ef261..e17fa5f 100644
32 --- a/Makefile.am
33 +++ b/Makefile.am
34 @@ -421,7 +421,7 @@ else
35 ICEDTEA_PATCHES += patches/nss-not-enabled-config.patch
36 endif
37
38 -if HAS_PAX
39 +if WITH_PAX
40 ICEDTEA_PATCHES += patches/no-test_gamma.patch
41 endif
42
43 @@ -450,7 +450,7 @@ ICEDTEA_ECJ_PATCHES += patches/ecj/cp40188-opengl.patch
44 endif
45 endif
46
47 -if !HAS_PAX
48 +if !WITH_PAX
49 ICEDTEA_ECJ_PATCHES += patches/ecj/no-test_gamma.patch
50 endif
51
52 @@ -1359,6 +1359,7 @@ stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \
53 $(ICEDTEA_ENV) \
54 -C openjdk \
55 $(ICEDTEA_BUILD_TARGET)
56 + $(abs_top_builddir)/pax-mark-vm $(BUILD_OUTPUT_DIR)/j2sdk-image
57 mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR)
58 mkdir -p $(BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR)
59 mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/ext
60 @@ -1586,6 +1587,7 @@ stamps/icedtea-ecj.stamp: stamps/bootstrap-directory-symlink-ecj.stamp \
61 $(ICEDTEA_ENV_ECJ) \
62 -C openjdk-ecj/ \
63 $(ICEDTEA_BUILD_TARGET)
64 + $(abs_top_builddir)/pax-mark-vm $(ECJ_BUILD_OUTPUT_DIR)/j2sdk-image
65 @echo "ecj-poured IcedTea is served:" \
66 $(ECJ_BUILD_OUTPUT_DIR)
67 mkdir -p stamps
68 diff --git a/acinclude.m4 b/acinclude.m4
69 index 503131c..e80b209 100644
70 --- a/acinclude.m4
71 +++ b/acinclude.m4
72 @@ -1677,3 +1677,49 @@ AM_CONDITIONAL([CP39408_JAVAH], test x"${it_cv_cp39408_javah}" = "xyes")
73 AM_CONDITIONAL([CP40188_JAVAH], test x"${it_cv_cp40188_javah}" = "xyes")
74 AC_PROVIDE([$0])dnl
75 ])
76 +
77 +AC_DEFUN_ONCE([IT_WITH_PAX],
78 +[
79 + AC_MSG_CHECKING([for pax utility to use])
80 + AC_ARG_WITH([pax],
81 + [AS_HELP_STRING(--with-pax=COMMAND,the command used for pax marking)],
82 + [
83 + PAX_COMMAND=${withval}
84 + if test "x${PAX_COMMAND}" = "xno"; then
85 + PAX_COMMAND="not specified"
86 + fi
87 + ],
88 + [
89 + PAX_COMMAND="not specified"
90 + ])
91 + case "x${PAX_COMMAND}" in
92 + xchpax)
93 + case "${host_cpu}" in
94 + i?86)
95 + PAX_COMMAND_ARGS="-msp"
96 + ;;
97 + *)
98 + PAX_COMMAND_ARGS="-m"
99 + ;;
100 + esac
101 + ;;
102 + xpaxctl)
103 + case "${host_cpu}" in
104 + i?86)
105 + PAX_COMMAND_ARGS="-msp"
106 + ;;
107 + *)
108 + PAX_COMMAND_ARGS="-m"
109 + ;;
110 + esac
111 + ;;
112 + *)
113 + PAX_COMMAND="not specified"
114 + PAX_COMMAND_ARGS="not specified"
115 + ;;
116 + esac
117 + AM_CONDITIONAL(WITH_PAX, test "x${PAX_COMMAND}" != "xnot specified")
118 + AC_MSG_RESULT(${PAX_COMMAND})
119 + AC_SUBST(PAX_COMMAND)
120 + AC_SUBST(PAX_COMMAND_ARGS)
121 +])
122 diff --git a/configure.ac b/configure.ac
123 index 580840e..f37ef68 100644
124 --- a/configure.ac
125 +++ b/configure.ac
126 @@ -51,7 +51,6 @@ IT_CHECK_GCC_VERSION
127 IT_CHECK_NUMBER_OF_PARALLEL_JOBS
128 IT_CP_SUPPORTS_REFLINK
129 IT_CAN_HARDLINK_TO_SOURCE_TREE
130 -IT_CHECK_FOR_PAX
131 IT_LOCATE_NSS
132
133 # Use xvfb-run if found to run gui tests (check-jdk).
134 @@ -189,6 +188,9 @@ IT_WITH_TZDATA_DIR
135 IT_GETDTDTYPE_CHECK
136 IT_JAVAH
137
138 +IT_WITH_PAX
139 +AC_CONFIG_FILES([pax-mark-vm], [chmod +x pax-mark-vm])
140 +
141 dnl pkgconfig cannot be used to find these headers and libraries.
142 AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
143 ,[AC_MSG_ERROR("CUPS headers were not found -
144 diff --git a/pax-mark-vm.in b/pax-mark-vm.in
145 new file mode 100644
146 index 0000000..bdff735
147 --- /dev/null
148 +++ b/pax-mark-vm.in
149 @@ -0,0 +1,13 @@
150 +#!/bin/sh
151 +
152 +# Taken from Gentoo's pax-utils.eclass
153 +list_paxables() {
154 + file "$@" 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//'
155 +}
156 +
157 +if test "@PAX_COMMAND@" != "not specified"; then
158 + for paxable in `list_paxables "${1}"/bin/* "${1}"/jre/bin/*`; do
159 + echo "PaX mark @PAX_COMMAND_ARGS@ ${paxable}"
160 + @PAX_COMMAND@ @PAX_COMMAND_ARGS@ "${paxable}"
161 + done
162 +fi