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

Files set not world readable remain that way in final bundle, causing ITMS-90255 on submission (unlike Xcode) #7395

Closed
chamons opened this issue Nov 8, 2019 · 3 comments
Labels
bug If an issue is a bug or a pull request a bug fix macOS Issues affecting macOS
Milestone

Comments

@chamons
Copy link
Contributor

chamons commented Nov 8, 2019

Steps to Reproduce

  1. New XM Project
  2. Add a file as a bundle resource (or see attached project)
  3. Set the file to not world readable
  4. Build installer

BundleImagePermTest.zip

Expected Behavior

Xcode sets a world +r bit when copying to the resource folder.

Actual Behavior

We do not (it remains as is)

Environment

Current d16-3 stable

@chamons chamons added bug If an issue is a bug or a pull request a bug fix macOS Issues affecting macOS labels Nov 8, 2019
@chamons chamons added this to the Future milestone Nov 8, 2019
@chamons
Copy link
Contributor Author

chamons commented Nov 8, 2019

Originally found in #7314

@spouliot
Copy link
Contributor

Task "SmartCopy"
    Creating directory '/Users/poupou/Downloads/BundleImagePermTest/bin/Debug/BundleImagePermTest.app/Contents/Resources'
    Copying file from '/Users/poupou/Downloads/BundleImagePermTest/obj/Debug/actool/bundle/AppIcon.icns' to '/Users/poupou/Downloads/BundleImagePermTest/bin/Debug/BundleImagePermTest.app/Contents/Resources/AppIcon.icns'
    Copying file from '/Users/poupou/Downloads/BundleImagePermTest/obj/Debug/actool/bundle/Assets.car' to '/Users/poupou/Downloads/BundleImagePermTest/bin/Debug/BundleImagePermTest.app/Contents/Resources/Assets.car'
    Creating directory '/Users/poupou/Downloads/BundleImagePermTest/bin/Debug/BundleImagePermTest.app/Contents/Resources/Main.storyboardc'
    Copying file from '/Users/poupou/Downloads/BundleImagePermTest/obj/Debug/ibtool/Main.storyboardc/MainMenu.nib' to '/Users/poupou/Downloads/BundleImagePermTest/bin/Debug/BundleImagePermTest.app/Contents/Resources/Main.storyboardc/MainMenu.nib'
    Copying file from '/Users/poupou/Downloads/BundleImagePermTest/obj/Debug/ibtool/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib' to '/Users/poupou/Downloads/BundleImagePermTest/bin/Debug/BundleImagePermTest.app/Contents/Resources/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib'
    Copying file from '/Users/poupou/Downloads/BundleImagePermTest/obj/Debug/ibtool/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib' to '/Users/poupou/Downloads/BundleImagePermTest/bin/Debug/BundleImagePermTest.app/Contents/Resources/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib'
    Copying file from '/Users/poupou/Downloads/BundleImagePermTest/obj/Debug/ibtool/Main.storyboardc/Info.plist' to '/Users/poupou/Downloads/BundleImagePermTest/bin/Debug/BundleImagePermTest.app/Contents/Resources/Main.storyboardc/Info.plist'
    Copying file from '/Users/poupou/Downloads/BundleImagePermTest/484px-Xamarin-logo.svg.png' to '/Users/poupou/Downloads/BundleImagePermTest/bin/Debug/BundleImagePermTest.app/Contents/Resources/484px-Xamarin-logo.svg.png'
  Done executing task "SmartCopy".

Looks like smart copy is not smart enough :)

@spouliot
Copy link
Contributor

from msbuild/Xamarin.MacDev.Tasks.Core/Tasks/SmartCopyTaskBase.cs

Log.LogMessage (MessageImportance.Normal, "Copying file from '{0}' to '{1}'", source, target);
File.Copy (source, target, true);

basically we want/need more than what the FX normally does for us

spouliot added a commit to spouliot/xamarin-macios that referenced this issue Nov 28, 2019
Only execute the extra logic when not running on Windows

ref: xamarin#7395
@ghost ghost locked as resolved and limited conversation to collaborators May 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug If an issue is a bug or a pull request a bug fix macOS Issues affecting macOS
Projects
None yet
Development

No branches or pull requests

2 participants