- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.9k
ARROW-4995: [R] Support for winbuilder for CRAN checks #4011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5687fd7
              f730b2b
              dbef3ac
              ac15461
              e8d5783
              6bb7098
              c5e1f15
              46f0b6b
              63151e5
              591f765
              e506858
              72d87c9
              7a9e816
              1730e1b
              b180995
              2053c1f
              7023659
              5efa575
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -7,3 +7,5 @@ LICENSE.md | |
| lint.sh | ||
| Dockerfile | ||
| .*\.tar\.gz | ||
| ^windows | ||
| clang_format.sh | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -10,4 +10,4 @@ inst/doc | |
| .Rproj.user | ||
| .Rhistory | ||
| src/Makevars | ||
|  | ||
| windows/ | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|  | ||
| VERSION = 0.12.0.9000 | ||
|  | ||
| ifeq "$(ARROW_PATH)" "" | ||
| RWINLIB = ../windows/arrow-$(VERSION) | ||
| ARROW_INCLUDE = $(RWINLIB)/include | ||
| ARROW_LIBS = $(RWINLIB)/lib$(subst gcc,,$(COMPILED_BY))$(R_ARCH) | ||
| OTHER_LIBS = -L$(RWINLIB)/lib$(R_ARCH) | ||
| else | ||
| ARROW_INCLUDE = $(ARROW_PATH)/include | ||
| ARROW_LIBS = $(ARROW_PATH)/lib | ||
| endif | ||
|  | ||
| PKG_CPPFLAGS = -I$(ARROW_INCLUDE) -DARROW_STATIC -DPARQUET_STATIC | ||
| CXX_STD = CXX11 | ||
|  | ||
| PKG_LIBS = \ | ||
| -L$(ARROW_LIBS) \ | ||
| $(OTHER_LIBS) \ | ||
| -lparquet -larrow -lthrift -lboost_regex-mt-s -ldouble-conversion -lz -lws2_32 | ||
|  | ||
| #all: clean | ||
| all: $(SHLIB) | ||
|  | ||
| $(OBJECTS): winlibs | ||
|  | ||
| winlibs: | ||
| "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" $(VERSION) | ||
|  | ||
| clean: | ||
| rm -f $(SHLIB) $(OBJECTS) | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|  | ||
| # Download static arrow from rwinlib | ||
| VERSION <- commandArgs(TRUE) | ||
|         
                  javierluraschi marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| if(!file.exists(sprintf("../windows/arrow-%s/include/arrow/api.h", VERSION))){ | ||
| if(getRversion() < "3.3.0") setInternet2() | ||
| download.file(sprintf("https://github.com/rwinlib/arrow/archive/v%s.zip", VERSION), "lib.zip", quiet = TRUE) | ||
| dir.create("../windows", showWarnings = FALSE) | ||
| unzip("lib.zip", exdir = "../windows") | ||
| unlink("lib.zip") | ||
| } | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is definitely scary-looking and appears to introduce a dependency on binaries in a foreign repository, which is an attack vector. For example, a malicious actor could inject Arrow libraries into this repository with malicious code in them that sends them files from your  If we're going to have dependencies on libraries such as these, at minimum we should have a SHA256/SHA512 hash for what we expect their contents to be to prevent malicious code from getting shipped. Of course, a preferable solution is to build libraries locally based on the source code in the archive Can you open some follow up JIRA issues about this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this because of missing compression libraries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct. We can probably solve this by figuring out which are the missing dependencies and adding support to compile them in Mingw, but I much rather suggest we disable this functionality in the 0.13 in Windows.