Skip to content

Commit 260c1da

Browse files
author
Pavel Marek
committed
[GR-30277] Re-enable API checksum of recommended packages cache (2).
PullRequest: fastr/2626
2 parents 8fb572c + 4afadcb commit 260c1da

File tree

11 files changed

+17024
-15326
lines changed

11 files changed

+17024
-15326
lines changed

com.oracle.truffle.r.native.recommended/Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,19 @@ ifdef FASTR_RECOMMENDED_BINARY
8585
$(info Using FastR recommended packages binary: $(FASTR_RECOMMENDED_BINARY))
8686

8787
install.recommended: $(GNUR_RECOMMENDED_TARS)
88-
# if ! (mx -p $(FASTR_R_HOME) r-pkgcache --print-api-checksum --vm fastr | tail -n 1 | diff -q $(FASTR_RECOMMENDED_BINARY)/api-checksum.txt -); then \
89-
# echo "******************************"; \
90-
# echo "ERROR:"; \
91-
# echo "The checksum of FastR header files does not match the checksum that the recommended packages were build against."; \
92-
# echo "You can run appropriate CI jobs in FastR repo to generate a new version of recommended packages binary and then upload it to the appropriate place."; \
93-
# echo "******************************"; \
94-
# echo "Actual checksum of FastR headers:"; \
95-
# echo "$(mx -p $(FASTR_R_HOME) r-pkgcache --print-api-checksum --vm fastr)"; \
96-
# echo "Expected checksum by the recommended pkgs:"; \
97-
# cat $(FASTR_RECOMMENDED_BINARY)/api-checksum.txt; \
98-
# echo "******************************"; \
99-
# exit 1; \
100-
# fi
88+
@if ! (mx -p $(FASTR_R_HOME) r-pkgcache --print-api-checksum --vm fastr | tail -n 1 | diff -q $(FASTR_RECOMMENDED_BINARY)/api-checksum.txt -); then \
89+
echo "******************************"; \
90+
echo "ERROR:"; \
91+
echo "The checksum of FastR header files does not match the checksum that the recommended packages were build against."; \
92+
echo "You can run appropriate CI jobs in FastR repo to generate a new version of recommended packages binary and then upload it to the appropriate place."; \
93+
echo "******************************"; \
94+
echo "Actual checksum of FastR headers:"; \
95+
mx -p $(FASTR_R_HOME) r-pkgcache --print-api-checksum --vm fastr; \
96+
echo "Expected checksum by the recommended pkgs:"; \
97+
cat $(FASTR_RECOMMENDED_BINARY)/api-checksum.txt; \
98+
echo "******************************"; \
99+
exit 1; \
100+
fi
101101
cp -R $(FASTR_RECOMMENDED_BINARY)/pkgs/* $(FASTR_R_HOME)/library
102102
touch install.recommended
103103

com.oracle.truffle.r.native/gnur/patch/Makeconf.in

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,20 @@ CURL_CPPFLAGS = @CURL_CPPFLAGS@
2121
CURL_LIBS = @CURL_LIBS@
2222
## in case we want to link with this for UBSAN checks
2323
CXX = @CXX@
24+
## DEFS is generated by autoconf as -DHAVE_CONFIG_H: R_DEFS is user's
2425
DEFS = @DEFS@ @R_DEFS@
2526
DISTDIR_TAR_EXCLUDE = --exclude=.svn --exclude=Makefile --exclude="*.o" --exclude="*$(SHLIB_EXT)" --exclude="*~"
2627
DYLIB_EXT = @DYLIB_EXT@
2728
DYLIB_LD = @DYLIB_LD@
28-
DYLIB_LDFLAGS = @DYLIB_LDFLAGS@@BUILD_LTO_TRUE@ $(DYLIBS_LTO)
29+
DYLIB_LDFLAGS = @DYLIB_LDFLAGS@@BUILD_LTO_TRUE@ $(DYLIB_LTO)
30+
## used for libR as a shared library
2931
DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS)
30-
DYLIBS_LTO = $(CFLAGS) $(CPICFLAGS)
32+
DYLIB_LTO = $(CFLAGS) $(CPICFLAGS) @LTO_LD@
3133
ECHO = echo
3234
ECHO_C = @ECHO_C@
3335
ECHO_N = @ECHO_N@
3436
ECHO_T = @ECHO_T@
35-
FFLAGS = @FFLAGS@ @LTO@
37+
FFLAGS = @FFLAGS@ @LTO_FC@
3638
FLIBS = @FLIBS@
3739
## needed for some earlier Solaris compilers
3840
FLIBS_IN_SO = @FLIBS_IN_SO@
@@ -62,7 +64,7 @@ LIBTOOL = @LIBTOOL@
6264
LN_S = @LN_S@
6365
MAIN_CFLAGS = @MAIN_CFLAGS@
6466
MAIN_FFLAGS = @MAIN_FFLAGS@
65-
MAIN_LD = @MAIN_LD@@BUILD_LTO_TRUE@ $(CFLAGS)
67+
MAIN_LD = @MAIN_LD@@BUILD_LTO_TRUE@ $(CFLAGS) $(CPICFLAGS) @LTO_LD@
6668
MAIN_LDFLAGS = @MAIN_LDFLAGS@ @WANT_R_SHLIB_FALSE@ @USE_EXPORTFILES_TRUE@ -Wl,-bE:$(top_builddir)/etc/R.exp
6769
MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LIBR0) $(LDFLAGS)
6870
## need this for bootstrapping
@@ -76,14 +78,14 @@ R_GZIPCMD = @R_GZIPCMD@
7678
@USE_EXPORTFILES_TRUE@ R_HOME = $(top_builddir)
7779
R_OPENMP_CFLAGS = @R_OPENMP_CFLAGS@
7880
## if ever used, need to check that this is compatible with C OpenMP
81+
## and add it to ALL_FFLAGS{,_LO}
7982
R_OPENMP_FFLAGS = @R_OPENMP_FFLAGS@
8083
R_OSTYPE = @R_OSTYPE@
8184
R_PKGS = $(R_PKGS_BASE) @USE_RECOMMENDED_PACKAGES_TRUE@ $(R_PKGS_RECOMMENDED)
8285
R_PLATFORM = @R_PLATFORM@
8386
R_XTRA_CFLAGS = @R_XTRA_CFLAGS@
8487
R_XTRA_CPPFLAGS = @R_XTRA_CPPFLAGS@ -I. -I$(top_builddir)/src/include -I$(top_srcdir)/src/include
8588
R_XTRA_FFLAGS = @R_XTRA_FFLAGS@
86-
R_XTRA_LIBS = @R_XTRA_LIBS@
8789
RANLIB = @RANLIB@
8890
READLINE_LIBS = @READLINE_LIBS@
8991
SED = @SED@
@@ -95,8 +97,8 @@ SHLIB_LD = @SHLIB_LD@
9597
SHLIB_LDFLAGS = @SHLIB_LDFLAGS@@BUILD_LTO_TRUE@ $(SHLIB_LTO)
9698
SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LIBR0) $(LDFLAGS)
9799
SHLIB_LTO = $(CFLAGS) $(CPICFLAGS)
98-
STRIP_LIBS = @striplib@
99-
STRIP_STATIC_LIBS = @stripstaticlib@
100+
STRIP_SHARED_LIB = @STRIP_SHARED_LIB@
101+
STRIP_STATIC_LIB = @STRIP_STATIC_LIB@
100102
TAR = @TAR@
101103
USE_NLS = @USE_NLS@
102104
X_CFLAGS = @X_CFLAGS@
@@ -105,12 +107,16 @@ X_PRE_LIBS = @X_PRE_LIBS@
105107
X_EXTRA_LIBS = @X_EXTRA_LIBS@
106108
YACC = @YACC@
107109

110+
## MAIN_[CF]FLAGS are used on some systems when profiling R.
108111
ALL_CFLAGS = $(R_XTRA_CFLAGS) $(R_OPENMP_CFLAGS) $(MAIN_CFLAGS) $(CFLAGS)
109112
ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS)
110-
## R_OPENMP_FFLAGS should not really be here: see above
111-
ALL_FFLAGS = $(R_XTRA_FFLAGS) $(R_OPENMP_FFLAGS) $(MAIN_FFLAGS) $(FFLAGS)
113+
ALL_FFLAGS = $(R_XTRA_FFLAGS) $(MAIN_FFLAGS) $(FFLAGS)
114+
115+
## For use in src/{appl,main} when R is a shared library, src/modules/lapack
116+
## and src/extra/blas when internal BLAS is built as a shared library
117+
## SHLIB_CFLAGS and SHLIB_FFLAGS are apparently currently unused
112118
ALL_CFLAGS_LO = $(R_XTRA_CFLAGS) $(R_OPENMP_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
113-
ALL_FFLAGS_LO = $(R_XTRA_FFLAGS) $(R_OPENMP_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)
119+
ALL_FFLAGS_LO = $(R_XTRA_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)
114120

115121
.SUFFIXES:
116122
.SUFFIXES: .c .f .m .d .o

com.oracle.truffle.r.native/gnur/patch/Makefile.in

Lines changed: 76 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ vignettes: stamp-recommended
8282

8383
## This needs packages built, hence 'R' dependence on 'javaconf'
8484
## javareconf gets remade often.
85-
stamp-java : etc/javaconf $(srcdir)/src/scripts/javareconf.in
85+
## If configure is re-run, etc/Makeconf gets reset to initial Java state
86+
stamp-java : etc/Makeconf etc/javaconf $(srcdir)/src/scripts/javareconf.in
8687
@WANT_JAVA_TRUE@ @$(ECHO) "configuring Java ..."
8788
@WANT_JAVA_TRUE@ @-bin/R CMD javareconf
8889
@touch stamp-java
@@ -142,7 +143,7 @@ uninstall:
142143
@for f in $(INSTFILES) $(NON_SVN_INSTFILES); do \
143144
rm -f "$(DESTDIR)$(rhome)/$${f}"; \
144145
done
145-
@rm -rf "$(DESTDIR)$(Rexecbindir)" "$(DESTDIR)$(rhome)/lib"
146+
@rm -Rf "$(DESTDIR)$(Rexecbindir)" "$(DESTDIR)$(rhome)/lib"
146147
@rmdir "$(DESTDIR)$(rhome)" 2>/dev/null \
147148
|| $(ECHO) " dir $(DESTDIR)$(rhome) not removed"
148149
@rm -f "$(DESTDIR)${libdir}/libR$(R_DYLIB_EXT)"
@@ -158,15 +159,15 @@ distclean: clean
158159
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
159160
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
160161
@rm -f po/Makefile
161-
-@rm -rf bin include lib library modules gnome
162+
-@rm -Rf bin include lib library modules gnome
162163
@if test -f non-tarball ; then \
163164
rm -f $(NON_SVN_INSTFILES) non-tarball doc/FAQ doc/RESOURCES doc/html/resources.html doc/html/NEWS.html; \
164165
fi
165166
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
166167
rm -f $(NON_SVN_INSTFILES); \
167-
rm -rf $(SUBDIRS) $(SUBDIRS_WITH_NO_BUILD); \
168+
rm -Rf $(SUBDIRS) $(SUBDIRS_WITH_NO_BUILD); \
168169
fi
169-
-@rm -rf libconftest.dSYM
170+
-@rm -Rf libconftest.dSYM
170171
-@rm -f Makeconf Makefile Makefile.bak Makefrag.* \
171172
config.cache config.log config.status libtool stamp-java \
172173
$(ACLOCAL_M4) acinclude.m4 $(distdir).tar.gz
@@ -175,9 +176,10 @@ maintainer-clean: distclean
175176
@$(ECHO) "deletes files that may need special rules to rebuild"
176177
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
177178
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
178-
-@(cd $(srcdir) && rm -rf autom4te.cache)
179+
-@(cd $(srcdir) && rm -Rf autom4te.cache)
179180

180181
dist: dist-unix
182+
## GNU gzip 1.8 warns that env var GZIP is obsolescent for gzip, so use as arg
181183
dist-unix: distdir
182184
-chmod -R a+r $(distdir)
183185
-chmod -R go-w $(distdir)
@@ -186,11 +188,11 @@ dist-unix: distdir
186188
if test $(distdir) != $${dirname} ; then \
187189
mv $(distdir) $${dirname}; \
188190
fi ; \
189-
GZIP=$(GZIP) $(TAR) czf $${distname}.tar.gz $${dirname}; \
190-
rm -rf $${dirname}
191+
$(TAR) cf $${distname}.tar $${dirname} && $(R_GZIPCMD) $(GZIP) $${distname}.tar; \
192+
rm -Rf $${dirname}
191193
dist-win:
192194
distdir: $(DISTFILES) vignettes
193-
@rm -rf $(distdir)
195+
@rm -Rf $(distdir)
194196
@mkdir $(distdir)
195197
@-chmod 755 $(distdir)
196198
@for f in $(DISTFILES); do \
@@ -220,6 +222,71 @@ distdir: $(DISTFILES) vignettes
220222
done
221223
@(cd $(distdir); tools/link-recommended)
222224

225+
distcheck: distcheck-unix
226+
distcheck-unix: dist
227+
distname=`$(srcdir)/tools/GETDISTNAME`; \
228+
dirname=`$(ECHO) $${distname} | sed -e s/_.*//`; \
229+
rm -Rf $${dirname}; \
230+
$(R_GZIPCMD) -d -c $${distname}.tar.gz | $(TAR) -x -f -; \
231+
chmod u+w $${dirname}; \
232+
if test -f config.site; then \
233+
cp config.site $${dirname}; \
234+
fi; \
235+
mkdir $${dirname}/_build $${dirname}/_inst; \
236+
test -d $${dirname}/_build || exit 0; \
237+
dc_install_base=`cd $${dirname}/_inst && pwd` \
238+
&& save__cwd=`pwd` \
239+
&& cd $${dirname}/_build \
240+
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
241+
&& $(MAKE) \
242+
&& $(MAKE) check-all \
243+
&& $(MAKE) install \
244+
&& $(MAKE) uninstall \
245+
&& $(MAKE) distuninstallcheck_dir="$$dc_install_base" \
246+
distuninstallcheck \
247+
&& $(MAKE) dist \
248+
&& rm -f $${distname}.tar.gz \
249+
&& $(MAKE) distcleancheck \
250+
&& cd "$$save__cwd" \
251+
|| exit 1; \
252+
rm -Rf $${dirname}; \
253+
$(ECHO) "$${distname}.tar.gz ready for distribution"
254+
255+
distcheck-win:
256+
distuninstallcheck:
257+
@test -n '$(distuninstallcheck_dir)' || { \
258+
echo 'ERROR: trying to run $@ with an empty' \
259+
'$$(distuninstallcheck_dir)' >&2; \
260+
exit 1; \
261+
}; \
262+
cd '$(distuninstallcheck_dir)' || { \
263+
$(ECHO) 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
264+
exit 1; \
265+
}; \
266+
test `find . -type f -print | wc -l` -eq 0 || \
267+
{ $(ECHO) "ERROR: files left after uninstall:" ; \
268+
`find . -type f -print`; \
269+
exit 1; } >&2
270+
distcleancheck: distclean
271+
@test `find . -type f -print | wc -l` -eq 0 || \
272+
{ $(ECHO) "ERROR: files left in build directory after distclean:" ; \
273+
`find . -type f -print`; \
274+
exit 1; } >&2
275+
276+
## For developers: from an svn checkout expect .svn to be only in the srcdir
277+
checkdistcomplete:
278+
@distname=`$(srcdir)/tools/GETDISTNAME`; \
279+
dirname=`$(ECHO) $${distname} | sed -e s/_.*//`; \
280+
if test -d $${dirname}; then \
281+
echo "Please remove directory $${dirname} first"; \
282+
exit 1; \
283+
fi; \
284+
rm -Rf $${dirname}; \
285+
echo "Checking $${distname}.tar.gz"; \
286+
$(R_GZIPCMD) -d -c $${distname}.tar.gz | $(TAR) -x -f -; \
287+
diff -r $${dirname} $(srcdir) | grep "^Only in $(srcdir)" | grep -v "^Only in.*[.]svn"; \
288+
rm -Rf $${dirname}
289+
223290
info pdf:
224291
-@(cd doc && $(MAKE) $@)
225292
install-info install-pdf:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Revision: 72570
2-
Last Changed Date: 2017-04-21
1+
Revision: 79318
2+
Last Changed Date: 2020-10-10
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.0
1+
4.0.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
You Stupid Darkness
1+
Bunny-Wunnies Freak Out

0 commit comments

Comments
 (0)