diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-11-09 17:52:54 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-11-09 17:52:54 +0000 |
commit | 3a21ccdeba02ef1644497d8ea41eb9d16887ed7a (patch) | |
tree | 216d3b6a6e37301f27763181392f02fc17d88b11 /packaging/macosx/osx-dmg.sh.in | |
parent | 8081cf1d90397cbbb4404f9720595e1537ed5e14 (diff) |
Try to perform package signing as described at
http://stackoverflow.com/questions/11487596/making-os-x-installer-packages-like-a-pro-xcode4-developer-id-mountain-lion-re
We *might* have to switch away from packagemaker in order to be able to
sign packages properly.
svn path=/trunk/; revision=53199
Diffstat (limited to 'packaging/macosx/osx-dmg.sh.in')
-rwxr-xr-x | packaging/macosx/osx-dmg.sh.in | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/packaging/macosx/osx-dmg.sh.in b/packaging/macosx/osx-dmg.sh.in index c274a18192..9eef2b2999 100755 --- a/packaging/macosx/osx-dmg.sh.in +++ b/packaging/macosx/osx-dmg.sh.in @@ -156,10 +156,19 @@ packagemaker --doc "Wireshark_package.pmdoc" \ --verbose || exit 1 if [ -n "$CODE_SIGN_IDENTITY" ] ; then - echo -e "Signing the $pkg_file" - codesign --sign "$CODE_SIGN_IDENTITY" --verbose "$pkg_file" || exit 1 - codesign --verify --verbose "$pkg_file" || exit 1 + pkg_dir_unsigned="$pkg_title UNSIGNED" + pkg_file_unsigned="$pkg_title_unsigned.pkg" + pkg_file_flattened="$pkg_title FLATTENED.pkg" + + echo -e "Signing $pkg_file" + mv "$pkg_file" "$pkg_file_unsigned" || exit 1 + pkgutil --expand "$pkg_file_unsigned" "$pkg_dir_unsigned" || exit 1 + pkgutil --flatten "$pkg_file_unsigned" "$pkg_file_flattened" || exit 1 + + productsign --sign "$CODE_SIGN_IDENTITY" --force --verbose "$pkg_file_flattened" "$pkg_file" || exit 1 spctl --assess --type install "$pkg_file" || exit 1 + shasum "$pkg_file" + rm -rf "$pkg_dir_unsigned" "$pkg_file_unsigned" "$pkg_file_flattened" else echo "Code signing not performed (no identity)" fi @@ -174,14 +183,14 @@ mkdir "$tmp_dir" || exit 1 echo -e "Copying files to temp directory" # Wireshark itself # Copy Wireshark.app -cp -rf "$pkg_file" "$tmp_dir"/ || exit 1 +cp "$pkg_file" "$tmp_dir"/ || exit 1 # Link to Applications in order to drag and drop wireshark onto it #ln -sf /Applications "$tmp_dir"/ # Copy the utilites #cp -rf "$utilities" "$tmp_dir"/ #ln -sf /Library/StartupItems "$tmp_dir/$utilities"/ # Copy the readme -cp -rf "$readme_name" "$tmp_dir"/"Read me first.rtf" || exit 1 +cp "$readme_name" "$tmp_dir"/"Read me first.rtf" || exit 1 # If the appearance settings are not to be modified we just copy them if [ ${set_ds_store} = "false" ]; then |