0

Pre-Yosemite could exclude certain files from codesign earlier by specifying resource rules but starting with Yosemite release (OS X 10.10) --resource-rules are oboleted. Is there still a way to exclude certain files so that signature verification ignores them? I don't want gatekeeper to be throwing warnings:

$spctl -a -t execute my.app

The requirement here is that after codesigning app can be language customized by administrators and this customization gets updated in the resource language folders (.lproj).

JamesWebbTelescopeAlien
  • 3,547
  • 2
  • 30
  • 51
  • TN2206 seems to suggest that it can't be done. Consider putting the extra localization data outside the app, perhaps in `/Library/Application Support/nameofmyapp` or `~/Library/Application Support/nameofmyapp`. – JWWalker Oct 02 '14 at 23:24
  • Thats what I am implementing right now, but it means changes in the code itself. BTW, this doc explicitly mentions it -> **Code signatures made in Mavericks and later always seal all files in a bundle;** – JamesWebbTelescopeAlien Oct 03 '14 at 00:40
  • Elsewhere in the same doc it says "It records substantially all files by default. There are no default "holes"." I'm curious about "substantially all" versus "all". – JWWalker Oct 03 '14 at 00:58

1 Answers1

0

I created symlinks of InfoPlist.strings file during build time and then during installation created actual files on the system as desired.

Build time

my.app/Content/Resources/
my.app/Content/Resources/es.lproj/InfoPlist.strings <-- soft link to /Library/Application\ Support/com.myapp/es.lproj/InfoPlist.strings 
my.app/Content/Resources/ru.lproj/InfoPlist.strings

Installation time:

 app.zip (contains myapp.pkg + config file) <--- postscript file creates /Library/Application\ Support/com.myapp/*.lproj/InfoPlist.strings based on config file

Although symlinks are recorded in v2 signatures, but above procedure doesn't break codesign signature validation.

This changes application's name in main menu, but finder still reads from Info.plist file.

JamesWebbTelescopeAlien
  • 3,547
  • 2
  • 30
  • 51