Skip to content

(Fix #20662) Set the DMD binary as executable#10889

Merged
dlang-bot merged 1 commit intostablefrom
unknown repository
Mar 10, 2020
Merged

(Fix #20662) Set the DMD binary as executable#10889
dlang-bot merged 1 commit intostablefrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Mar 10, 2020

The dmd binary must have permission to be executable otherwise it would be
impossible to launch it without manually setting permissions.

This patch sets the 644 permission by default for all the other files installed
through installRelativeFiles while the 755 permissions will be set for the dmd binary.

This fixes a regression caused by the PR #10670

@dlang-bot
Copy link
Copy Markdown
Contributor

dlang-bot commented Mar 10, 2020

Thanks for your pull request and interest in making D better, @ErnyTech! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
20662 regression dmd: cannot execute: Permission denied

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#10889"

The dmd binary must have permission to be executable otherwise it would be
impossible to launch it without manually setting permissions.

This patch sets the 644 permission by default for all the other files installed
through installRelativeFiles while the 755 permissions will be set for the dmd binary.

This fixes the issue #20662
@ghost
Copy link
Copy Markdown
Author

ghost commented Mar 10, 2020

The alternative would be to copy the files while preserving the attributes, specifically pass this "Yes.preserveAttributes" to std.copy

@ghost ghost changed the title Set the DMD binary as executable (Fix #20662) Set the DMD binary as executable Mar 10, 2020
@dlang-bot dlang-bot merged commit e9d316a into dlang:stable Mar 10, 2020
ghost pushed a commit to dlang-snaps/dmd.snap that referenced this pull request Mar 14, 2020
https://dlang.org/changelog/2.091.0.html
https://github.com/dlang/dmd/releases/tag/v2.091.0

This version includes an upstream patch (dlang/dmd#10889) not present in DMD 2.091.0 but 
which will be included in DMD 2.091.1
This patch is necessary to resolve a regression present in DMD 2.091.0 which 
would make the snap package unusable, for information: https://issues.dlang.org/show_bug.cgi?id=20662
ghost pushed a commit to dlang-snaps/dmd.snap that referenced this pull request Mar 14, 2020
https://dlang.org/changelog/2.091.0.html
https://github.com/dlang/dmd/releases/tag/v2.091.0

This version includes an upstream patch (dlang/dmd#10889) not present
in DMD 2.091.0 but which will be included in DMD 2.091.1
This patch is necessary to resolve a regression present in DMD 2.091.0
which would make the snap package unusable, for information: https://issues.dlang.org/show_bug.cgi?id=20662
ghost pushed a commit to dlang-snaps/dmd.snap that referenced this pull request Apr 9, 2020
https://dlang.org/changelog/2.091.0.html
https://github.com/dlang/dmd/releases/tag/v2.091.0

This version includes an upstream patch (dlang/dmd#10889) not present
in DMD 2.091.0 but which will be included in DMD 2.091.1
This patch is necessary to resolve a regression present in DMD 2.091.0
which would make the snap package unusable, for information: https://issues.dlang.org/show_bug.cgi?id=20662
@Geod24
Copy link
Copy Markdown
Member

Geod24 commented Nov 9, 2020

Screen Shot 2020-11-09 at 10 17 39

Oops.
@ErnyTech : When making a PR, be sure that the commit message properly references the issue.
In this case, "Fix the issue" doesn't work ("the" is not recognized) so it won't appear in the changelog and auto-close the PR.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants