[One .NET] define UnixFilePermissions.xml#6010
Merged
jonpryor merged 1 commit intodotnet:mainfrom Jun 10, 2021
Merged
Conversation
pjcollins
reviewed
Jun 8, 2021
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/data/UnixFilePermissions.xml
Outdated
Show resolved
Hide resolved
0b9b1ce to
801778b
Compare
Member
Author
|
Final file is: <FileList>
<File Path="tools/Darwin/illinkanalyzer" Permission="755" />
<File Path="tools/Darwin/jit-times" Permission="755" />
<File Path="tools/Darwin/aprofutil" Permission="755" />
<File Path="tools/Darwin/mono-symbolicate" Permission="755" />
<File Path="tools/Darwin/ndk/aarch64-linux-android-as" Permission="755" />
<File Path="tools/Darwin/ndk/aarch64-linux-android-ld" Permission="755" />
<File Path="tools/Darwin/ndk/aarch64-linux-android-strip" Permission="755" />
<File Path="tools/Darwin/ndk/arm-linux-androideabi-as" Permission="755" />
<File Path="tools/Darwin/ndk/arm-linux-androideabi-ld" Permission="755" />
<File Path="tools/Darwin/ndk/arm-linux-androideabi-strip" Permission="755" />
<File Path="tools/Darwin/ndk/i686-linux-android-as" Permission="755" />
<File Path="tools/Darwin/ndk/i686-linux-android-ld" Permission="755" />
<File Path="tools/Darwin/ndk/i686-linux-android-strip" Permission="755" />
<File Path="tools/Darwin/ndk/x86_64-linux-android-as" Permission="755" />
<File Path="tools/Darwin/ndk/x86_64-linux-android-ld" Permission="755" />
<File Path="tools/Darwin/ndk/x86_64-linux-android-strip" Permission="755" />
<File Path="tools/Darwin/mono" Permission="755" />
<File Path="tools/Darwin/aapt2" Permission="755" />
</FileList> |
dellis1972
approved these changes
Jun 9, 2021
Contributor
dellis1972
left a comment
There was a problem hiding this comment.
Shame Nuget doesn't use a good ZipLibrary which would preserve the permissions, then we wouldn't have to go through all this stuff :(.
Contributor
|
We should remove Additionally, is it possible to sort the file contents? :-) |
jonpryor
reviewed
Jun 9, 2021
...oid.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/GenerateUnixFilePermissions.cs
Outdated
Show resolved
Hide resolved
Context: dotnet/sdk#16894 There is currently a workaround in place, so that executables inside a .NET workload have the right permissions: https://github.com/dotnet/sdk/pull/17299/files A new `data/UnixFilePermissions.xml` file will be required to define permissions such as: <FileList> <File Path="tools/Darwin/aapt2" Permission="755" /> </FileList> I generated this file based on existing item groups in `create-installers.targets`. I am putting this in place before the changes to `dotnet workload install` actually land. We also found these files should be *removed* from our .NET workload packs: * `aprofutil` * `mono` * `mono-symbolicate`
6890897 to
6fda0ef
Compare
Member
Author
|
Latest file is: <FileList>
<File Path="tools/Darwin/aapt2" Permission="755" />
<File Path="tools/Darwin/illinkanalyzer" Permission="755" />
<File Path="tools/Darwin/jit-times" Permission="755" />
<File Path="tools/Darwin/ndk/aarch64-linux-android-as" Permission="755" />
<File Path="tools/Darwin/ndk/aarch64-linux-android-ld" Permission="755" />
<File Path="tools/Darwin/ndk/aarch64-linux-android-strip" Permission="755" />
<File Path="tools/Darwin/ndk/arm-linux-androideabi-as" Permission="755" />
<File Path="tools/Darwin/ndk/arm-linux-androideabi-ld" Permission="755" />
<File Path="tools/Darwin/ndk/arm-linux-androideabi-strip" Permission="755" />
<File Path="tools/Darwin/ndk/i686-linux-android-as" Permission="755" />
<File Path="tools/Darwin/ndk/i686-linux-android-ld" Permission="755" />
<File Path="tools/Darwin/ndk/i686-linux-android-strip" Permission="755" />
<File Path="tools/Darwin/ndk/x86_64-linux-android-as" Permission="755" />
<File Path="tools/Darwin/ndk/x86_64-linux-android-ld" Permission="755" />
<File Path="tools/Darwin/ndk/x86_64-linux-android-strip" Permission="755" />
</FileList>aprofutil, mono, mono-symbolicate are removed. The Windows package, no longer has |
Contributor
Context: https://github.com/dotnet/sdk/issues/16894
Context: https://github.com/dotnet/sdk/pull/17299
On non-Windows platforms, the `dotnet workload install` command needs
to ensure that certain files are executable after extracting them
from the workload package, via `chmod 755 FILE`. This is currently
done for all files in the `tools` folder for [select workloads][0].
dotnet/sdk/#16894 proposes using a new `data/UnixFilePermissions.xml`
file to explicitly specify which files within the workload should
have which Unix file permissions applied:
<FileList>
<File Path="tools/Darwin/aapt2" Permission="755" />
</FileList>
Update `Microsoft.Android.Sdk.proj` to create a
`data/UnixFilePermissions.xml` file, when building .NET 6+ installers
on Linux and macOS platforms. `UnixFilePermissions.xml` is generated
with the new `<GenerateUnixFilePermissions/>` task, building upon the
`@(AndroidSdkBuildTools)` & related item groups in
`create-installers.targets`.
This is being done *before* `dotnet workload install` is updated to
use `data/UnixFilePermissions.xml`.
We also found that the following files should be *removed* from our
.NET workload packs:
* `aprofutil`
* `mono`
* `mono-symbolicate`
`aprofutil` is needed for AOT use, and AOT is not currently supported
under .NET 6.
`mono` was only needed for `jnimarshalmethod-gen.exe`, which doesn't
work on .NET 6, and `mono-symbolicate` *should* come from Mono-related
workload packages, not Android-related packages, and also doesn't work.
[0]: https://github.com/dotnet/sdk/blob/17c734cde97c6dde9d4bf298e7a2a7a342263ce6/src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs#L186-L191 |
directhex
pushed a commit
to directhex/runtime
that referenced
this pull request
Jun 21, 2021
directhex
pushed a commit
to directhex/emsdk
that referenced
this pull request
Jun 21, 2021
…ot executable by the end user: ``` -rwxr--r-- 1 root wheel 106K May 31 07:30 /usr/local/share/dotnet/packs/Microsoft.NET.Runtime.Emscripten.2.0.12.Sdk.osx-x64/6.0.0-preview.5.21281.1/tools/bin/llc ``` Ref: dotnet/runtime#54501 Ref: dotnet/runtime#53545 Ref: dotnet/sdk#16894 Ref: dotnet/macios#11869 Ref: dotnet/android#6010
directhex
added a commit
to dotnet/runtime
that referenced
this pull request
Jun 21, 2021
* Add UnixFilePermissions.xml for Mono AOT compilers Ref: #53545 Ref: dotnet/sdk#16894 Ref: dotnet/macios#11869 Ref: dotnet/android#6010 * Only set permissions on !windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context: dotnet/sdk#16894
There is currently a workaround in place, so that executables inside a
.NET workload have the right permissions:
https://github.com/dotnet/sdk/pull/17299/files
A new
data/UnixFilePermissions.xmlfile will be required to definepermissions such as:
I am putting this in place before the changes to
dotnet workload installactually land.We also found these files should be removed from our .NET workload
packs:
aprofutilmonomono-symbolicate