X Tutup
The Wayback Machine - https://web.archive.org/web/20240630101711/https://github.com/PowerShell/PowerShell/issues/23968
Skip to content
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

Linux release does not have +x set on various files in the tar.gz (7.4.3) #23968

Open
5 tasks done
MrFly72 opened this issue Jun 19, 2024 · 8 comments
Open
5 tasks done
Labels
Needs-Triage The issue is new and needs to be triaged by a work group.

Comments

@MrFly72
Copy link

MrFly72 commented Jun 19, 2024

Prerequisites

Steps to reproduce

Download https://github.com/PowerShell/PowerShell/releases/download/v$PSVersion/powershell-7.4.3-linux-arm64.tar.gz
tar -xvf ./powershell-$PSVersion-linux-arm64.tar.gz -C /opt/microsoft/powershell/7

Expected behavior

at least pwsh should have +x, which it does not have (previous release did set it correct)

Actual behavior

+ x is not set, I have to manually chmod and there are tons of .dll that had the +x before which dont have it now anymore

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.3
PSEdition                      Core
GitCommitId                    7.4.3
OS                             Debian GNU/Linux 11 (bullseye)
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

@MrFly72 MrFly72 added the Needs-Triage The issue is new and needs to be triaged by a work group. label Jun 19, 2024
@MrFly72 MrFly72 changed the title LInux release does not have +x set on variour files in the tar.gz (7.4.3) Linux release does not have +x set on variour files in the tar.gz (7.4.3) Jun 19, 2024
@MrFly72 MrFly72 changed the title Linux release does not have +x set on variour files in the tar.gz (7.4.3) Linux release does not have +x set on various files in the tar.gz (7.4.3) Jun 19, 2024
@237dmitry
Copy link

$pshome/pwsh is not an executable in 7.5.0-preview.3 too. This requires manual setting of the execution bit.

I do not understand what is for dll-files have to be executable, they are always 664:

$ (dir $pshome/*.dll).count
227

$ (dir $pshome/*.dll | ? { [convert]::ToString([int] $_.UnixFileMode, 8) -eq 664 }).count
227

$ (dir $pshome/*.dll | ? { (stat -c %a $_) -eq 664 }).count
227

@MrFly72
Copy link
Author

MrFly72 commented Jun 19, 2024

As a comparison, this is 7.4.2:

PS 16:23h 33.39 ms | /opt/microsoft/powershell/7> (dir $pshome/*.dll).count
228
PS 16:23h 216.98 ms | /opt/microsoft/powershell/7> (dir $pshome/*.dll | ? { [convert]::ToString([int] $_.UnixFileMode, 8) -eq 664 }).count
0
PS 16:24h 163.13 ms | /opt/microsoft/powershell/7> (dir $pshome/*.dll | ? { (stat -c %a $_) -eq 664 }).count
0

Version 7.4.3:

PS 16:28h 9.33 ms | /opt/microsoft/powershell/7> (dir $pshome/*.dll).count
228
PS 16:28h 208.1 ms | /opt/microsoft/powershell/7> (dir $pshome/*.dll | ? { [convert]::ToString([int] $_.UnixFileMode, 8) -eq 664 }).count
226
PS 16:28h 162.19 ms | /opt/microsoft/powershell/7> (dir $pshome/*.dll | ? { (stat -c %a $_) -eq 664 }).count
226

@MrFly72
Copy link
Author

MrFly72 commented Jun 19, 2024

And here is the result of 7.4.2 with different filter:

PS 16:36h 718.7 ms | /opt/microsoft/powershell/7> (dir $pshome/*.dll).count
228
PS 16:36h 105.65 ms | /opt/microsoft/powershell/7> (dir $pshome/*.dll | ? { [convert]::ToString([int] $_.UnixFileMode, 8) -eq 744 }).count
174
PS 16:36h 128.7 ms | /opt/microsoft/powershell/7> (dir $pshome/*.dll | ? { (stat -c %a $_) -eq 744 }).count
174

@237dmitry
Copy link

237dmitry commented Jun 19, 2024

How does this affect pwsh as a whole? I didn’t notice any complaints about the use of types and their methods; Add-Type and using statements apparently do not depend on this. The only thing that does not changes from release to release is the need to set capabilities for pinging using Test-Connection

sudo setcap cap_net_raw=eip $PSHome/pwsh

This is true for powershell-*-linux-x64.tar.gz and Arch-based Linux.

@MrFly72
Copy link
Author

MrFly72 commented Jun 19, 2024

Oh I did not see anything not working so far. I just documented the differences between 7.4.2 and 7.4.3
The major problem was so far only the pwsh having no +x
The rest was just that I figured when using ls -l, that there are a lot more "green" entries in 7.4.2 in despite of 7.4.3 ;-)
Not that it was correct that the .dll had been marked +x before......

@shoddyguard
Copy link

Ran into this too on a freshly built Arch system.
However in my case it prevents pwsh from running at all:

> pwsh
bash: /usr/bin/pwsh: Permission denied

If I either make all the files executable or rollback to 7.4.2 I am able to start PowerShell without issue.

@Xiong-Tian
Copy link

Not a good look, mates. It's been over a week now and the official Linux (and macOS apparently) releases are still broken.
Are we absolutely certain this isn't another xz situation?

@MrFly72
Copy link
Author

MrFly72 commented Jun 30, 2024

Ran into this too on a freshly built Arch system.

However in my case it prevents pwsh from running at all:

> pwsh

bash: /usr/bin/pwsh: Permission denied

If I either make all the files executable or rollback to 7.4.2 I am able to start PowerShell without issue.

You only have to chmod +x on the pwsh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Triage The issue is new and needs to be triaged by a work group.
Projects
None yet
Development

No branches or pull requests

4 participants
X Tutup