1 |
markusle 08/08/27 23:01:42 |
2 |
|
3 |
Added: R-javareconf.patch R-2.7.1-test-fix.patch |
4 |
Log: |
5 |
Added patch from Debian to fix insecure tempfile handling in javareconf (fixes bug #235822). NOTE: R-2.2.1-r1.ebuild is not vulnerable since it does not include the javereconf script. Also removed old ebuilds and removed two tests from the test suite since they fail with portage. |
6 |
(Portage version: 2.2_rc8/cvs/Linux 2.6.26-SENTINEL-2 i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-lang/R/files/R-javareconf.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/R/files/R-javareconf.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/R/files/R-javareconf.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: R-javareconf.patch |
15 |
=================================================================== |
16 |
# this patch fixes the insecure tempfile usage reported in bug #235822 |
17 |
# it was extracted from Debian's r-base_2.7.2-1.diff patch |
18 |
|
19 |
diff -Naur R-2.7.2/src/scripts/javareconf R-2.7.2.new/src/scripts/javareconf |
20 |
--- R-2.7.2/src/scripts/javareconf 2008-03-25 08:26:44.000000000 -0400 |
21 |
+++ R-2.7.2.new/src/scripts/javareconf 2008-08-27 16:49:04.000000000 -0400 |
22 |
@@ -125,16 +125,19 @@ |
23 |
javac_works='not present' |
24 |
if test -n "$JAVAC"; then |
25 |
javac_works='not functional' |
26 |
- rm -rf /tmp/A.java /tmp/A.class |
27 |
- echo "public class A { }" > /tmp/A.java |
28 |
- if test -e /tmp/A.java; then |
29 |
- if "${JAVAC}" /tmp/A.java >/dev/null; then |
30 |
- if test -e /tmp/A.class; then |
31 |
+ # edd 25 Aug 2008 use mktemp -t -d |
32 |
+ #rm -rf /tmp/A.java /tmp/A.class |
33 |
+ jctmpdir=`mktemp -t -d` |
34 |
+ echo "public class A { }" > ${jctmpdir}/A.java |
35 |
+ if test -e ${jctmpdir}/A.java; then |
36 |
+ if "${JAVAC}" ${jctmpdir}/A.java >/dev/null; then |
37 |
+ if test -e ${jctmpdir}/A.class; then |
38 |
javac_works=yes |
39 |
fi |
40 |
fi |
41 |
fi |
42 |
- rm -rf /tmp/A.java /tmp/A.class |
43 |
+ # rm -rf /tmp/A.java /tmp/A.class |
44 |
+ rm -rf ${jctmpdir} |
45 |
fi |
46 |
if test "${javac_works}" = yes; then |
47 |
echo "Java compiler : ${JAVAC}" |
48 |
|
49 |
|
50 |
|
51 |
1.1 dev-lang/R/files/R-2.7.1-test-fix.patch |
52 |
|
53 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/R/files/R-2.7.1-test-fix.patch?rev=1.1&view=markup |
54 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/R/files/R-2.7.1-test-fix.patch?rev=1.1&content-type=text/plain |
55 |
|
56 |
Index: R-2.7.1-test-fix.patch |
57 |
=================================================================== |
58 |
# this patch removed two non-essential tests that fail under portage |
59 |
# - test-internet fails due to ACCESS_VIOLATION |
60 |
# - reg-plot-latin1.R fails probably due to locale mismatch |
61 |
|
62 |
diff -Naur R-2.7.1/tests/Makefile.in R-2.7.1.new/tests/Makefile.in |
63 |
--- R-2.7.1/tests/Makefile.in 2008-06-23 05:39:03.000000000 -0400 |
64 |
+++ R-2.7.1.new/tests/Makefile.in 2008-08-27 18:17:33.000000000 -0400 |
65 |
@@ -40,7 +40,6 @@ |
66 |
|
67 |
test-src-demo = demos.R demos2.R |
68 |
test-src-errmsgs = errormsgs.R |
69 |
-test-src-internet = internet.R |
70 |
test-src-isas = isas-tests.R |
71 |
test-src-primitive = primitives.R |
72 |
test-src-random = p-r-random-tests.R |
73 |
@@ -51,21 +50,19 @@ |
74 |
reg-plot.R reg-S4.R |
75 |
test-src-reg-auto = |
76 |
test-src-reg = $(test-src-reg-1) $(test-src-reg-auto) |
77 |
-test-src-reg3 = reg-tests-3.R reg-plot-latin1.R |
78 |
+test-src-reg3 = reg-tests-3.R |
79 |
|
80 |
DISTFILES = Makefile.in Makefile.win README \ |
81 |
$(test-src-strict-1) $(test-src-strict-1:.R=.Rout.save) \ |
82 |
$(test-src-sloppy-1) $(test-src-sloppy-1:.R=.Rout.save) \ |
83 |
$(test-src-auto:.R=.Rin) isas-tests.Rout.save \ |
84 |
$(test-src-demo) demos.Rout.save \ |
85 |
- $(test-src-internet) internet.Rout.save \ |
86 |
$(test-src-primitive) \ |
87 |
$(test-src-random) p-r-random-tests.Rout.save \ |
88 |
$(test-src-reg) $(test-src-reg3) \ |
89 |
reg-S4.Rout.save \ |
90 |
reg-IO.Rout.save reg-IO2.Rout.save reg-plot.Rout.save \ |
91 |
reg-plot.ps.save reg-tests-2.Rout.save reg-tests-3.Rout.save \ |
92 |
- reg-plot-latin1.ps.save \ |
93 |
reg-win.R encodings.R utf8-regex.R \ |
94 |
errormsgs.R errormsgs.Rout.save \ |
95 |
gct-foot.R \ |
96 |
@@ -89,7 +86,6 @@ |
97 |
|
98 |
test-out-demo = $(test-src-demo:.R=.Rout) |
99 |
test-out-errmsgs = $(test-src-errmsgs:.R=.Rout) |
100 |
-test-out-internet = $(test-src-internet:.R=.Rout) |
101 |
test-out-isas = $(test-src-isas:.R=.Rout) |
102 |
test-out-primitive = $(test-src-primitive:.R=.Rout) |
103 |
test-out-random = $(test-src-random:.R=.Rout) |
104 |
@@ -100,14 +96,13 @@ |
105 |
|
106 |
## This macro is used only for dependencies |
107 |
test-out = $(test-src:.R=.Rout) $(test-out-demo) $(test-out-gct) \ |
108 |
- $(test-out-internet) \ |
109 |
$(test-out-random) $(test-out-reg) $(test-out-reg3) \ |
110 |
$(test-out-segfault) $(test-out-isas) |
111 |
|
112 |
.SUFFIXES: |
113 |
.SUFFIXES: .R .Rin .Rout .Rout-gct .Rout-valgct |
114 |
|
115 |
-all-basic-tests = Examples Specific Reg Internet |
116 |
+all-basic-tests = Examples Specific Reg |
117 |
all-devel-tests = Docs IsAs Random Demo Rd Primitive Regexp Segfault \ |
118 |
Standalone Packages |
119 |
|
120 |
@@ -173,24 +168,6 @@ |
121 |
-@diff reg-plot.ps $(srcdir)/reg-plot.ps.save |
122 |
@$(ECHO) "$(ECHO_T) OK" |
123 |
|
124 |
-reg-plot-latin1.Rout: reg-plot-latin1.R |
125 |
- @rm -f $@ $@.fail |
126 |
- @$(ECHO) $(ECHO_N) "running code in '$<' ...$(ECHO_C)" |
127 |
- @$(R2) < $< > $@ 2>&1 || (mv $@ $@.fail && exit 1) |
128 |
- @$(ECHO) "$(ECHO_T) OK" |
129 |
- @if test -f $(srcdir)/$@.save ; then \ |
130 |
- mv $@ $@.fail; \ |
131 |
- $(ECHO) $(ECHO_N) \ |
132 |
- "comparing '$@' to '$(srcdir)/$@.save' ...$(ECHO_C)"; \ |
133 |
- $(RDIFF) $@.fail $(srcdir)/$@.save $(RVAL_IF_DIFF) || exit 1; \ |
134 |
- mv $@.fail $@; \ |
135 |
- $(ECHO) "$(ECHO_T) OK"; \ |
136 |
- fi |
137 |
- @$(ECHO) $(ECHO_N) \ |
138 |
- "comparing 'reg-plot-latin1.ps' to '$(srcdir)/reg-plot-latin1.ps.save' ...$(ECHO_C)" |
139 |
- -@diff reg-plot-latin1.ps $(srcdir)/reg-plot-latin1.ps.save |
140 |
- @$(ECHO) "$(ECHO_T) OK" |
141 |
- |
142 |
.R.Rout-gct: |
143 |
@$(ECHO) "running gctorture() + '$<'" |
144 |
@($(ECHO) '.ptime <- proc.time(); gctorture()' ; \ |
145 |
@@ -265,15 +242,6 @@ |
146 |
@$(ECHO) "running tests of error messages" |
147 |
@$(MAKE) $(test-out-errmsgs) RVAL_IF_DIFF=0 |
148 |
|
149 |
-## <NOTE> |
150 |
-## These depend on an internet connection, and the sites being up. |
151 |
-## So allow this to fail: it may be slow doing so. |
152 |
-test-Internet: |
153 |
- @$(ECHO) "running tests of Internet and socket functions" |
154 |
- @$(ECHO) " expect some differences" |
155 |
- -@$(MAKE) $(test-out-internet) RVAL_IF_DIFF=0 |
156 |
-## </NOTE> |
157 |
- |
158 |
test-IsAs: |
159 |
@$(ECHO) "running tests of consistency of as/is.*" |
160 |
@$(MAKE) $(test-out-isas) RVAL_IF_DIFF=1 |
161 |
@@ -434,7 +402,7 @@ |
162 |
(cd $${d} && $(MAKE) $@); \ |
163 |
done |
164 |
-@rm -f stamp-R Makedeps Rplot* Rprof.out data dumpdata.R \ |
165 |
- reg-plot-latin1.ps reg-plot.ps reg-tests-?.ps \ |
166 |
+ reg-plot.ps reg-tests-?.ps \ |
167 |
R-exts.* R-intro.R R-intro.Rout \ |
168 |
FALSE.R FALSE.tex mirrors.html |
169 |
-@rm -f testit.txt testit.html testit.tex testit-Ex.R |