Skip to content

Commit

Permalink
[GR-30277] Re-enable API checksum of recommended packages cache (2).
Browse files Browse the repository at this point in the history
PullRequest: fastr/2626
  • Loading branch information
Pavel Marek committed Jun 17, 2021
2 parents 8fb572c + 4afadcb commit 260c1da
Show file tree
Hide file tree
Showing 11 changed files with 17,024 additions and 15,326 deletions.
26 changes: 13 additions & 13 deletions com.oracle.truffle.r.native.recommended/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@ ifdef FASTR_RECOMMENDED_BINARY
$(info Using FastR recommended packages binary: $(FASTR_RECOMMENDED_BINARY))

install.recommended: $(GNUR_RECOMMENDED_TARS)
# 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 \
# echo "******************************"; \
# echo "ERROR:"; \
# echo "The checksum of FastR header files does not match the checksum that the recommended packages were build against."; \
# 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."; \
# echo "******************************"; \
# echo "Actual checksum of FastR headers:"; \
# echo "$(mx -p $(FASTR_R_HOME) r-pkgcache --print-api-checksum --vm fastr)"; \
# echo "Expected checksum by the recommended pkgs:"; \
# cat $(FASTR_RECOMMENDED_BINARY)/api-checksum.txt; \
# echo "******************************"; \
# exit 1; \
# fi
@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 \
echo "******************************"; \
echo "ERROR:"; \
echo "The checksum of FastR header files does not match the checksum that the recommended packages were build against."; \
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."; \
echo "******************************"; \
echo "Actual checksum of FastR headers:"; \
mx -p $(FASTR_R_HOME) r-pkgcache --print-api-checksum --vm fastr; \
echo "Expected checksum by the recommended pkgs:"; \
cat $(FASTR_RECOMMENDED_BINARY)/api-checksum.txt; \
echo "******************************"; \
exit 1; \
fi
cp -R $(FASTR_RECOMMENDED_BINARY)/pkgs/* $(FASTR_R_HOME)/library
touch install.recommended

Expand Down
26 changes: 16 additions & 10 deletions com.oracle.truffle.r.native/gnur/patch/Makeconf.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ CURL_CPPFLAGS = @CURL_CPPFLAGS@
CURL_LIBS = @CURL_LIBS@
## in case we want to link with this for UBSAN checks
CXX = @CXX@
## DEFS is generated by autoconf as -DHAVE_CONFIG_H: R_DEFS is user's
DEFS = @DEFS@ @R_DEFS@
DISTDIR_TAR_EXCLUDE = --exclude=.svn --exclude=Makefile --exclude="*.o" --exclude="*$(SHLIB_EXT)" --exclude="*~"
DYLIB_EXT = @DYLIB_EXT@
DYLIB_LD = @DYLIB_LD@
DYLIB_LDFLAGS = @DYLIB_LDFLAGS@@BUILD_LTO_TRUE@ $(DYLIBS_LTO)
DYLIB_LDFLAGS = @DYLIB_LDFLAGS@@BUILD_LTO_TRUE@ $(DYLIB_LTO)
## used for libR as a shared library
DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS)
DYLIBS_LTO = $(CFLAGS) $(CPICFLAGS)
DYLIB_LTO = $(CFLAGS) $(CPICFLAGS) @LTO_LD@
ECHO = echo
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
FFLAGS = @FFLAGS@ @LTO@
FFLAGS = @FFLAGS@ @LTO_FC@
FLIBS = @FLIBS@
## needed for some earlier Solaris compilers
FLIBS_IN_SO = @FLIBS_IN_SO@
Expand Down Expand Up @@ -62,7 +64,7 @@ LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAIN_CFLAGS = @MAIN_CFLAGS@
MAIN_FFLAGS = @MAIN_FFLAGS@
MAIN_LD = @MAIN_LD@@BUILD_LTO_TRUE@ $(CFLAGS)
MAIN_LD = @MAIN_LD@@BUILD_LTO_TRUE@ $(CFLAGS) $(CPICFLAGS) @LTO_LD@
MAIN_LDFLAGS = @MAIN_LDFLAGS@ @WANT_R_SHLIB_FALSE@ @USE_EXPORTFILES_TRUE@ -Wl,-bE:$(top_builddir)/etc/R.exp
MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LIBR0) $(LDFLAGS)
## need this for bootstrapping
Expand All @@ -76,14 +78,14 @@ R_GZIPCMD = @R_GZIPCMD@
@USE_EXPORTFILES_TRUE@ R_HOME = $(top_builddir)
R_OPENMP_CFLAGS = @R_OPENMP_CFLAGS@
## if ever used, need to check that this is compatible with C OpenMP
## and add it to ALL_FFLAGS{,_LO}
R_OPENMP_FFLAGS = @R_OPENMP_FFLAGS@
R_OSTYPE = @R_OSTYPE@
R_PKGS = $(R_PKGS_BASE) @USE_RECOMMENDED_PACKAGES_TRUE@ $(R_PKGS_RECOMMENDED)
R_PLATFORM = @R_PLATFORM@
R_XTRA_CFLAGS = @R_XTRA_CFLAGS@
R_XTRA_CPPFLAGS = @R_XTRA_CPPFLAGS@ -I. -I$(top_builddir)/src/include -I$(top_srcdir)/src/include
R_XTRA_FFLAGS = @R_XTRA_FFLAGS@
R_XTRA_LIBS = @R_XTRA_LIBS@
RANLIB = @RANLIB@
READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
Expand All @@ -95,8 +97,8 @@ SHLIB_LD = @SHLIB_LD@
SHLIB_LDFLAGS = @SHLIB_LDFLAGS@@BUILD_LTO_TRUE@ $(SHLIB_LTO)
SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LIBR0) $(LDFLAGS)
SHLIB_LTO = $(CFLAGS) $(CPICFLAGS)
STRIP_LIBS = @striplib@
STRIP_STATIC_LIBS = @stripstaticlib@
STRIP_SHARED_LIB = @STRIP_SHARED_LIB@
STRIP_STATIC_LIB = @STRIP_STATIC_LIB@
TAR = @TAR@
USE_NLS = @USE_NLS@
X_CFLAGS = @X_CFLAGS@
Expand All @@ -105,12 +107,16 @@ X_PRE_LIBS = @X_PRE_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
YACC = @YACC@

## MAIN_[CF]FLAGS are used on some systems when profiling R.
ALL_CFLAGS = $(R_XTRA_CFLAGS) $(R_OPENMP_CFLAGS) $(MAIN_CFLAGS) $(CFLAGS)
ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS)
## R_OPENMP_FFLAGS should not really be here: see above
ALL_FFLAGS = $(R_XTRA_FFLAGS) $(R_OPENMP_FFLAGS) $(MAIN_FFLAGS) $(FFLAGS)
ALL_FFLAGS = $(R_XTRA_FFLAGS) $(MAIN_FFLAGS) $(FFLAGS)

## For use in src/{appl,main} when R is a shared library, src/modules/lapack
## and src/extra/blas when internal BLAS is built as a shared library
## SHLIB_CFLAGS and SHLIB_FFLAGS are apparently currently unused
ALL_CFLAGS_LO = $(R_XTRA_CFLAGS) $(R_OPENMP_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
ALL_FFLAGS_LO = $(R_XTRA_FFLAGS) $(R_OPENMP_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)
ALL_FFLAGS_LO = $(R_XTRA_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)

.SUFFIXES:
.SUFFIXES: .c .f .m .d .o
Expand Down
85 changes: 76 additions & 9 deletions com.oracle.truffle.r.native/gnur/patch/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ vignettes: stamp-recommended

## This needs packages built, hence 'R' dependence on 'javaconf'
## javareconf gets remade often.
stamp-java : etc/javaconf $(srcdir)/src/scripts/javareconf.in
## If configure is re-run, etc/Makeconf gets reset to initial Java state
stamp-java : etc/Makeconf etc/javaconf $(srcdir)/src/scripts/javareconf.in
@WANT_JAVA_TRUE@ @$(ECHO) "configuring Java ..."
@WANT_JAVA_TRUE@ @-bin/R CMD javareconf
@touch stamp-java
Expand Down Expand Up @@ -142,7 +143,7 @@ uninstall:
@for f in $(INSTFILES) $(NON_SVN_INSTFILES); do \
rm -f "$(DESTDIR)$(rhome)/$${f}"; \
done
@rm -rf "$(DESTDIR)$(Rexecbindir)" "$(DESTDIR)$(rhome)/lib"
@rm -Rf "$(DESTDIR)$(Rexecbindir)" "$(DESTDIR)$(rhome)/lib"
@rmdir "$(DESTDIR)$(rhome)" 2>/dev/null \
|| $(ECHO) " dir $(DESTDIR)$(rhome) not removed"
@rm -f "$(DESTDIR)${libdir}/libR$(R_DYLIB_EXT)"
Expand All @@ -158,15 +159,15 @@ distclean: clean
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
@rm -f po/Makefile
-@rm -rf bin include lib library modules gnome
-@rm -Rf bin include lib library modules gnome
@if test -f non-tarball ; then \
rm -f $(NON_SVN_INSTFILES) non-tarball doc/FAQ doc/RESOURCES doc/html/resources.html doc/html/NEWS.html; \
fi
@if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(NON_SVN_INSTFILES); \
rm -rf $(SUBDIRS) $(SUBDIRS_WITH_NO_BUILD); \
rm -Rf $(SUBDIRS) $(SUBDIRS_WITH_NO_BUILD); \
fi
-@rm -rf libconftest.dSYM
-@rm -Rf libconftest.dSYM
-@rm -f Makeconf Makefile Makefile.bak Makefrag.* \
config.cache config.log config.status libtool stamp-java \
$(ACLOCAL_M4) acinclude.m4 $(distdir).tar.gz
Expand All @@ -175,9 +176,10 @@ maintainer-clean: distclean
@$(ECHO) "deletes files that may need special rules to rebuild"
@(for d in $(SUBDIRS); do rsd="$${d} $${rsd}"; done; \
for d in $${rsd}; do (cd $${d} && $(MAKE) $@); done)
-@(cd $(srcdir) && rm -rf autom4te.cache)
-@(cd $(srcdir) && rm -Rf autom4te.cache)

dist: dist-unix
## GNU gzip 1.8 warns that env var GZIP is obsolescent for gzip, so use as arg
dist-unix: distdir
-chmod -R a+r $(distdir)
-chmod -R go-w $(distdir)
Expand All @@ -186,11 +188,11 @@ dist-unix: distdir
if test $(distdir) != $${dirname} ; then \
mv $(distdir) $${dirname}; \
fi ; \
GZIP=$(GZIP) $(TAR) czf $${distname}.tar.gz $${dirname}; \
rm -rf $${dirname}
$(TAR) cf $${distname}.tar $${dirname} && $(R_GZIPCMD) $(GZIP) $${distname}.tar; \
rm -Rf $${dirname}
dist-win:
distdir: $(DISTFILES) vignettes
@rm -rf $(distdir)
@rm -Rf $(distdir)
@mkdir $(distdir)
@-chmod 755 $(distdir)
@for f in $(DISTFILES); do \
Expand Down Expand Up @@ -220,6 +222,71 @@ distdir: $(DISTFILES) vignettes
done
@(cd $(distdir); tools/link-recommended)

distcheck: distcheck-unix
distcheck-unix: dist
distname=`$(srcdir)/tools/GETDISTNAME`; \
dirname=`$(ECHO) $${distname} | sed -e s/_.*//`; \
rm -Rf $${dirname}; \
$(R_GZIPCMD) -d -c $${distname}.tar.gz | $(TAR) -x -f -; \
chmod u+w $${dirname}; \
if test -f config.site; then \
cp config.site $${dirname}; \
fi; \
mkdir $${dirname}/_build $${dirname}/_inst; \
test -d $${dirname}/_build || exit 0; \
dc_install_base=`cd $${dirname}/_inst && pwd` \
&& save__cwd=`pwd` \
&& cd $${dirname}/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) \
&& $(MAKE) check-all \
&& $(MAKE) install \
&& $(MAKE) uninstall \
&& $(MAKE) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& $(MAKE) dist \
&& rm -f $${distname}.tar.gz \
&& $(MAKE) distcleancheck \
&& cd "$$save__cwd" \
|| exit 1; \
rm -Rf $${dirname}; \
$(ECHO) "$${distname}.tar.gz ready for distribution"

distcheck-win:
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
cd '$(distuninstallcheck_dir)' || { \
$(ECHO) 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `find . -type f -print | wc -l` -eq 0 || \
{ $(ECHO) "ERROR: files left after uninstall:" ; \
`find . -type f -print`; \
exit 1; } >&2
distcleancheck: distclean
@test `find . -type f -print | wc -l` -eq 0 || \
{ $(ECHO) "ERROR: files left in build directory after distclean:" ; \
`find . -type f -print`; \
exit 1; } >&2

## For developers: from an svn checkout expect .svn to be only in the srcdir
checkdistcomplete:
@distname=`$(srcdir)/tools/GETDISTNAME`; \
dirname=`$(ECHO) $${distname} | sed -e s/_.*//`; \
if test -d $${dirname}; then \
echo "Please remove directory $${dirname} first"; \
exit 1; \
fi; \
rm -Rf $${dirname}; \
echo "Checking $${distname}.tar.gz"; \
$(R_GZIPCMD) -d -c $${distname}.tar.gz | $(TAR) -x -f -; \
diff -r $${dirname} $(srcdir) | grep "^Only in $(srcdir)" | grep -v "^Only in.*[.]svn"; \
rm -Rf $${dirname}

info pdf:
-@(cd doc && $(MAKE) $@)
install-info install-pdf:
Expand Down
4 changes: 2 additions & 2 deletions com.oracle.truffle.r.native/gnur/patch/SVN-REVISION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Revision: 72570
Last Changed Date: 2017-04-21
Revision: 79318
Last Changed Date: 2020-10-10
2 changes: 1 addition & 1 deletion com.oracle.truffle.r.native/gnur/patch/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.0
4.0.3
2 changes: 1 addition & 1 deletion com.oracle.truffle.r.native/gnur/patch/VERSION-NICK
Original file line number Diff line number Diff line change
@@ -1 +1 @@
You Stupid Darkness
Bunny-Wunnies Freak Out
Loading

0 comments on commit 260c1da

Please sign in to comment.