-
Notifications
You must be signed in to change notification settings - Fork 565
[One .NET] define UnixFilePermissions.xml #6010
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
[One .NET] define UnixFilePermissions.xml #6010
Conversation
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/data/UnixFilePermissions.xml
Outdated
Show resolved
Hide resolved
0b9b1ce to
801778b
Compare
|
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
left a comment
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.
Shame Nuget doesn't use a good ZipLibrary which would preserve the permissions, then we wouldn't have to go through all this stuff :(.
|
We should remove Additionally, is it possible to sort the file contents? :-) |
...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
|
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 |
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 |
…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
* 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
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