aboutsummaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2019-02-22 11:09:37 -0800
committerGerald Combs <gerald@wireshark.org>2019-02-22 19:36:20 +0000
commit1b10ac9bd4a8a929aad76648b1b3e5223e25f55a (patch)
treedb704615ca15eb736571ef740985972e548a4c5f /packaging
parent93423712207ef12a0c23f4cd6475141fab2ec59d (diff)
macOS: Replace Wireshark.app when upgrading.
The packages that PackageMaker creates don't remove old files when upgrading. Add a preflight script that removes Wireshark.app if it exists. Fix a version check while we're here. Change-Id: I8be8cbf51b34fef8a2d4259478b7d3199d976de3 Reviewed-on: https://code.wireshark.org/review/32150 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/macosx/Scripts/wireshark-postinstall.sh19
-rwxr-xr-xpackaging/macosx/Scripts/wireshark-preflight.sh13
-rw-r--r--packaging/macosx/Wireshark_package.pmdoc/01wireshark.xml2
-rw-r--r--packaging/macosx/Wireshark_package.pmdoc/index.xml.in2
4 files changed, 15 insertions, 21 deletions
diff --git a/packaging/macosx/Scripts/wireshark-postinstall.sh b/packaging/macosx/Scripts/wireshark-postinstall.sh
index a29c8c3350..6b3578a580 100755
--- a/packaging/macosx/Scripts/wireshark-postinstall.sh
+++ b/packaging/macosx/Scripts/wireshark-postinstall.sh
@@ -1,24 +1,5 @@
#!/bin/sh
-#
-# After an upgrade, get rid of leftover plugins that were converted
-# to built-in dissectors, so that we won't have problems trying to load
-# them (wrong instruction set, collisions with the built-ins, etc.).
-#
-# XXX - apparently, there's no longer a "postinstall" vs. "postupgrade"
-# difference, but if you've never installed Wireshark before, this
-# will just silently and harmlessly fail to remove files that aren't
-# there in the first place.
-#
-PLUGINS="coseventcomm cosnaming docsis interlink parlay sercosiii tango"
-
-PLUGINS_PATH="$2/Wireshark.app/Contents/Resources/lib/wireshark/plugins"
-
-for plugin in $PLUGINS
-do
- rm -f "$PLUGINS_PATH"/$plugin.so "$PLUGINS_PATH"/$plugin.la
-done
-
# Setting PATH
# if /etc/paths.d/Wireshark already exists we overwrite it.
#
diff --git a/packaging/macosx/Scripts/wireshark-preflight.sh b/packaging/macosx/Scripts/wireshark-preflight.sh
new file mode 100755
index 0000000000..b1561e15b1
--- /dev/null
+++ b/packaging/macosx/Scripts/wireshark-preflight.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#
+# If we're upgrading, remove the old Wireshark.app before installing
+# the new one so that we don't try to load old, incompatible libraries,
+# plugins, codes, or other code.
+#
+
+OLD_APP="$2/Wireshark.app"
+
+if [ -d "$OLD_APP" ] ; then
+ rm -rf "$OLD_APP"
+fi
diff --git a/packaging/macosx/Wireshark_package.pmdoc/01wireshark.xml b/packaging/macosx/Wireshark_package.pmdoc/01wireshark.xml
index 1c7f2427b0..149eed4693 100644
--- a/packaging/macosx/Wireshark_package.pmdoc/01wireshark.xml
+++ b/packaging/macosx/Wireshark_package.pmdoc/01wireshark.xml
@@ -1 +1 @@
-<pkgref spec="1.12" uuid="0B0ABFF7-3A3D-4F37-B998-DC99734E0EFC"><config><identifier>org.wireshark.Wireshark.pkg</identifier><version>0.0.0.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true" includeRoot="true">Wireshark.app</installFrom><installTo>/Applications</installTo><flags><followSymbolicLinks/><allowRevert/><mod>allowRevert</mod></flags><packageStore type="internal"></packageStore><mod>scripts.scriptsDirectoryPath.isAbsoluteType</mod><mod>scripts.scriptsDirectoryPath.isRelativeType</mod><mod>installTo</mod><mod>scripts.postinstall.path</mod><mod>installFrom.isRelativeType</mod><mod>includeRoot</mod><mod>scripts.postinstall.isRelativeType</mod><mod>version</mod><mod>parent</mod><mod>scripts.scriptsDirectoryPath.path</mod><mod>identifier</mod><mod>relocatable</mod><mod>requireAuthorization</mod><mod>extraFiles</mod><mod>postInstall</mod></config><scripts><postinstall relative="true" mod="true">Scripts/wireshark-postinstall.sh</postinstall><scripts-dir relative="true" mod="true">Scripts</scripts-dir><scripts-element/></scripts><extra-files/></pkgref> \ No newline at end of file
+<pkgref spec="1.12" uuid="0B0ABFF7-3A3D-4F37-B998-DC99734E0EFC"><config><identifier>org.wireshark.Wireshark.pkg</identifier><version>0.0.0.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true" includeRoot="true">Wireshark.app</installFrom><installTo>/Applications</installTo><flags><followSymbolicLinks/><allowRevert/><mod>allowRevert</mod></flags><packageStore type="internal"></packageStore><mod>scripts.scriptsDirectoryPath.isAbsoluteType</mod><mod>scripts.scriptsDirectoryPath.isRelativeType</mod><mod>installTo</mod><mod>scripts.postinstall.path</mod><mod>installFrom.isRelativeType</mod><mod>includeRoot</mod><mod>scripts.postinstall.isRelativeType</mod><mod>version</mod><mod>parent</mod><mod>scripts.scriptsDirectoryPath.path</mod><mod>identifier</mod><mod>relocatable</mod><mod>requireAuthorization</mod><mod>extraFiles</mod><mod>postInstall</mod></config><scripts><preflight relative="true" mod="true">Scripts/wireshark-preflight.sh</preflight><postinstall relative="true" mod="true">Scripts/wireshark-postinstall.sh</postinstall><scripts-dir relative="true" mod="true">Scripts</scripts-dir><scripts-element/></scripts><extra-files/></pkgref>
diff --git a/packaging/macosx/Wireshark_package.pmdoc/index.xml.in b/packaging/macosx/Wireshark_package.pmdoc/index.xml.in
index b03781d7dd..b45f91d6e6 100644
--- a/packaging/macosx/Wireshark_package.pmdoc/index.xml.in
+++ b/packaging/macosx/Wireshark_package.pmdoc/index.xml.in
@@ -1 +1 @@
-<pkmkdoc spec="1.12"><properties><title>Wireshark</title><build>Wireshark.pkg</build><organization>org.wireshark</organization><userSees ui="both"/><min-target os="3"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>Wireshark and associated command line utilities.</description><contents><choice title="Wireshark" id="wireshark" tooltip="The Wireshark network protocol analyzer" description="The main Wireshark application" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.wireshark.Wireshark.pkg"/></choice><choice title="Set capture permissions at startup" id="chmodbpf" tooltip="Install the ChmodBPF launch daemon and add an access_bpf group" description="This installs a launch daemon (org.wireshark.ChmodBPF.plist) that changes the group permissions of each BPF device to allow access for the &quot;access_bpf&quot; group. It creates the &quot;access_bpf&quot; group if it doesn't exist and adds the current user to the group." starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.wireshark.ChmodBPF.pkg"/></choice><choice title="Command line utilities" id="cli" tooltip="Command line utilities associated with Wireshark" description="Various utilities associated with Wireshark including TShark, dumpcap, mergecap, capinfos, and editcap." starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.wireshark.cli.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource relative="true" type="license">COPYING.txt</resource></locale></resources><requirements><requirement id="tosv" operator="ge" value="'@OSX_MIN_VERSION@'"><message-title>Failure</message-title><message>This package requires macOS @OSX_MIN_VERSION@ or later. If you cannot upgrade you might try installing using MacPorts or Fink.</message></requirement></requirements><flags/><extra-files/><item type="file">01wireshark.xml</item><item type="file">02chmodbpf.xml</item><item type="file">03utility.xml</item><mod>description</mod><mod>properties.title</mod><mod>properties.anywhereDomain</mod><mod>properties.userDomain</mod><mod>properties.customizeOption</mod><mod>extraFiles</mod><mod>postinstallActions.actions</mod><mod>properties.systemDomain</mod></pkmkdoc>
+<pkmkdoc spec="1.12"><properties><title>Wireshark</title><build>Wireshark.pkg</build><organization>org.wireshark</organization><userSees ui="both"/><min-target os="3"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>Wireshark and associated command line utilities.</description><contents><choice title="Wireshark" id="wireshark" tooltip="The Wireshark network protocol analyzer" description="The main Wireshark application" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.wireshark.Wireshark.pkg"/></choice><choice title="Set capture permissions at startup" id="chmodbpf" tooltip="Install the ChmodBPF launch daemon and add an access_bpf group" description="This installs a launch daemon (org.wireshark.ChmodBPF.plist) that changes the group permissions of each BPF device to allow access for the &quot;access_bpf&quot; group. It creates the &quot;access_bpf&quot; group if it doesn't exist and adds the current user to the group." starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.wireshark.ChmodBPF.pkg"/></choice><choice title="Command line utilities" id="cli" tooltip="Command line utilities associated with Wireshark" description="Various utilities associated with Wireshark including TShark, dumpcap, mergecap, capinfos, and editcap." starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.wireshark.cli.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource relative="true" type="license">COPYING.txt</resource></locale></resources><requirements><requirement id="tosv" operator="ge" value="'@MIN_MACOS_VERSION@'"><message-title>Failure</message-title><message>This package requires macOS @MIN_MACOS_VERSION@ or later. If you cannot upgrade you might try installing using MacPorts or Fink.</message></requirement></requirements><flags/><extra-files/><item type="file">01wireshark.xml</item><item type="file">02chmodbpf.xml</item><item type="file">03utility.xml</item><mod>description</mod><mod>properties.title</mod><mod>properties.anywhereDomain</mod><mod>properties.userDomain</mod><mod>properties.customizeOption</mod><mod>extraFiles</mod><mod>postinstallActions.actions</mod><mod>properties.systemDomain</mod></pkmkdoc>