Skip to content

[R] create_package_with_all_dependencies leaves files unexecutable #40227

Closed

Description

@hutch3232

Describe the bug, including details regarding any error messages, version, and platform.

I used create_package_with_all_dependencies on a Windows machine and then copied the tarball to a Linux machine. When I went to install the tarball, I received this error:

ERROR: 'configure' exists but is not executable -- see the 'R Installation and Administration Manual' [r]

Reviewing the code, we see the files are simply tar'd back after downloading the dependencies into the untarred package:

tar_successful <- utils::tar(dest_file, compression = "gz") == 0

I found that if I replace the above line with a pkgbuild::build call, the missing executable bits are automatically fixed:

pkgbuild::build(path = "arrow", dest_path = dest_file)
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\hutch3232\AppData\Local\Temp\RtmpodDbIB\file37344a4258a8\arrow/DESCRIPTION' (986ms)
─  preparing 'arrow': (32.5s)
✔  checking DESCRIPTION meta-information ... 
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts (1.3s)
─  checking for empty or unneeded directories (579ms)
─  building 'arrow_14.0.2.1.tar.gz' (494ms)
   Warning: file 'arrow/cleanup' did not have execute permissions: corrected
   Warning: file 'arrow/configure' did not have execute permissions: corrected

After making this change, the install on the Windows and Linux machines worked great. Perhaps there could be a step that sets these as executable manually, or replace tar with build, which includes other checks to ensure a valid package build.

BTW thanks for making this script, it's incredibly useful!

Component(s)

R

Activity

  1. jonkeane commented on Feb 26, 2024

    @jonkeane
    Member

    Would you be interested in submitting a pull request with this change?

  2. hutch3232 commented on Feb 26, 2024

    @hutch3232
    ContributorAuthor

    I'd be happy to!

  3. added a commit that references this issue on Mar 6, 2024
  4. added this to the 16.0.0 milestone on Mar 6, 2024
  5. thisisnic commented on Mar 6, 2024

    @thisisnic
    Member

    Issue resolved by pull request 40232
    #40232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions