Commit Graph

319 Commits

Author SHA1 Message Date
Gerald Combs 348d356594 Packaging: Update the macOS notarization failure error message.
Apple provides a status page for various developer services at
https://developer.apple.com/system-status/, including the status of the
Developer ID Notary Service. Show the URL notarization fails so that
troubleshooting is easier.
2021-09-01 10:24:58 -07:00
Gerald Combs 28c4c947c0 GitLab CI: Enable macOS Arm notarization.
Enable code signing & notarization in the macOS Arm Package job. Add
"needs: []". Verify the .dmg after notarizing it.
2021-08-25 20:40:29 +00:00
Gerald Combs d2979e1976 GitLab CI: Initial macOS Arm build.
Add a "macOS Arm Package" job to .gitlab-ci.yml. Fixup a check in
osx-dmg.sh.
2021-08-24 21:22:41 +00:00
Gerald Combs ffc5522a35 Packaging: "Acorn RISC Machine" was a long time ago.
Use "Arm 64" instead of "ARM 64" for our .dmg names.
2021-05-31 07:41:32 +00:00
Gerald Combs a714805628 macOS: Name our .dmgs according to our architecture.
In osx-dmg.sh, add "ARM 64" or "Intel 64" to our .dmg name depending on
the architecture of Wireshark.app/Contents/MacOS/Wireshark.
2021-05-30 17:32:32 +00:00
Guy Harris 5d39e36198 doc: Clean up lists of file types.
Add missing entries, regularize the descriptions, etc..

Note that pcap and pcapng are the native formats.

Fix various issues.

Update the editcap -F output to match urrent reality.

While we're at it, sort the libwiretap modules, putting observer.c in
the right place.
2021-03-13 10:02:02 +00:00
Guy Harris e0afa7f2a4 Observer is now a product of Viavi.
JDSU bought Network Instruments, and then split into Viavi and Lumentum,
with Viavi getting Observer.
2021-03-11 20:02:14 +00:00
Stig Bjørlykke 85bf15fd76 Happy New Year 2021 2021-01-01 11:36:23 +00:00
Gerald Combs b3352bd639 macOS: Force dark mode support.
We initially disabled dark mode support in Info.plist when we didn't
support it very well, and later passively enabled it depending on our
SDK version. Go ahead and force it on since we officially support dark
mode. Closes #17098.
2020-12-22 19:37:22 +00:00
Gerald Combs bf45e8c3f1 macOS: Add a workaround for libsnappy.
Work around an issue with libsnappy similar to what we do with libssh.
2020-12-16 21:31:29 +00:00
Gerald Combs 59483604de macOS: Switch ChmodBPF to zsh.
Switch the ChmodBPF script to /bin/zsh since it

- Has known behavior, unlike /bin/sh, which execs whatever
  /private/var/select/sh points to.

- Supports 'read -n 0' and other nice features.

- Is unlikely to be deprecated, since it was made the default shell in
  Catalina[1].

- Exists in older macOS releases, unlike dash[2].

Closes #16826.

[1]https://support.apple.com/en-us/HT208050
[2]https://scriptingosx.com/2020/06/about-bash-zsh-sh-and-dash-in-macos-catalina-and-beyond/
2020-09-18 16:34:24 +00:00
Michael Schmitt 34ff98c860 Assign access_bpf to GID less than 500
When installing ChmodBPF on macOS, assign the access_bpf group to the first
free GID greater than 100, rather to the default which starts at 500. Using
a GID less than 500 hides it in the System Preferences Users & Groups pane.

Bug: 6402
Change-Id: I62ed63bc64cb2721880467ffd0dc290ea57c8461
Reviewed-on: https://code.wireshark.org/review/37676
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-07-15 16:52:47 +00:00
Gerald Combs 290ddeeed4 macOS: Make the dmg_package target fail noisily.
Change-Id: I479c9f13b9695d78d47b698a14cda0989724c639
Reviewed-on: https://code.wireshark.org/review/36270
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-03-03 17:22:30 +00:00
Gerald Combs 574aa22870 macOS: Fix a sanity check.
Change-Id: I1ae61bcc70f5994661b88d6a3c1a93e038b6b6cf
Reviewed-on: https://code.wireshark.org/review/36199
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-26 21:52:21 +00:00
Gerald Combs 47bd34873b macOS: Add a sanity check.
Check the file permissions in our application bundle.

Ping-Bug: 16407
Change-Id: I41c9dc903f764ea74b6f34a21ecb99d44bd1658f
Reviewed-on: https://code.wireshark.org/review/36193
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-26 21:03:08 +00:00
Gerald Combs 9266a27264 macOS: Remove a version check from osx-app.sh.
In osx-app.sh, $VERSION used to hold the minor version of the OS. We no
longer set it and it's probably safe to assume that we're building on
Lion or later, so remove it.

Change-Id: I8e85cd7c2fe2162019c7c436b7865be95d4a33e2
Reviewed-on: https://code.wireshark.org/review/36039
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-06 17:52:32 +00:00
Gerald Combs dd4b562df2 macOS: Add a disk volume icon.
Add a badge icon (custom removable disk icon) for our disk image volume.

Change-Id: If2a88efb76061bbf72ddc9844435429d20da6183
Reviewed-on: https://code.wireshark.org/review/35867
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 07:50:46 +00:00
Gerald Combs 9a5eb26b28 macOS: Force-sign Sparkle's AutoUpdate.app.
Sparkle's AutoUpdate.app has its own signature, which fails Apple's
notarization requirements.

Change-Id: I5fc5490a3e7ef63dd84fe59369ddd8cf42ddeff6
Reviewed-on: https://code.wireshark.org/review/35813
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-14 21:26:08 +00:00
Stig Bjørlykke 5ba082d51d Happy New Year 2020
Change-Id: Ic569e499d40def9397203510a121ff17a495ba9a
Reviewed-on: https://code.wireshark.org/review/35616
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-01-01 08:57:21 +00:00
Gerald Combs fd6cf89f21 macOS: More ChmodBPF signing updates.
Run osx-extras.sh before building the ChmodBPF installer package.

Change-Id: Iec3f88da86e48b5aac385369c7e68f23babc4c34
Reviewed-on: https://code.wireshark.org/review/35491
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-18 17:35:49 +00:00
Gerald Combs 8dd407d97c macOS: Sign the ChmodBPF script.
Add macosx/osx-extras.sh, which can be used to sign the ChmodBPF script.

Bug: 15782
Change-Id: I9929dd6db067f8bc1097faac28ab9467f5a89a82
Reviewed-on: https://code.wireshark.org/review/35481
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-18 05:32:44 +00:00
Gerald Combs 17bb0b7eb1 macOS: Switch ChmodBPF back from bash to sh.
The default shell in macOS 10.15 is zsh[1]. Bash appears to be included
for now, but it might be a good idea to start migrating away from it
just in case it's removed at some point in the future.

[1]https://support.apple.com/en-ca/HT208050

Change-Id: Ibe4338105d8fa1a590f84543489255ade71920d6
Reviewed-on: https://code.wireshark.org/review/35216
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-26 22:43:56 +00:00
Gerald Combs 56ed5d49f4 macOS: Use the correct path when building our app bundle.
Use the correct path to the Wireshark executable when finding
dependencies and adding debugging symbols.

Change-Id: Iefafa9d453ce60e77853f2d125769826b4d702c0
Reviewed-on: https://code.wireshark.org/review/35202
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-25 02:10:02 +00:00
Gerald Combs 7cc5f4c45f CMake: Work correctly without Sparkle.
Set or clear SPARKLE_LIBRARIES and SPARKLE_INCLUDE_DIRS in
FindSparkle.cmake, similar to what we do in other modules. Use them
instead of SPARKLE_LIBRARY and SPARKLE_INCLUDE_DIR.

Change-Id: I023c711edd6a44421aadf85413da3207d9b08e64
Reviewed-on: https://code.wireshark.org/review/35097
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 22:34:06 +00:00
Gerald Combs 1cc5b68ac9 macOS: Application bundle fixes.
Copy Sparkle.framework correctly. Force signing so that we replace
Sparkle's signature with ours.

In osx-app.sh, don't sign a file or framework if it's already signed.

Fix the osx-dmg.sh usage message while we're here.

Change-Id: I697073d234958e1d8386650935a132237ad88f64
Reviewed-on: https://code.wireshark.org/review/35095
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 20:14:36 +00:00
Gerald Combs 02057200fd macOS: Add support for automatic updates using Sparkle.
Add support for automatic updates using the Sparkle framework. Add
FindSparkle.cmake and associated CMake plumbing. Add a public key and
other info to Info.plist.in. Add ui/macosx/sparkle_bridge.{h,m}, which
wraps the Sparkle API. Make code that's specific to WinSparkle
Windows-only.

Add Sparkle installation steps to the macos-setup scripts. Sparkle
prints a warning if your bundle is unsigned (which is the case during
development) so disable installing it by default.

Updating here takes a long time. We might be able to fix that by
shipping our DSYMs separately.

Change-Id: I6cc6671db5657dadc514bda6bf6e1c8bbc9468a5
Reviewed-on: https://code.wireshark.org/review/35090
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 18:39:04 +00:00
Guy Harris a13d168916 Fix name of the "remove Wireshark from PATH" package.
Bug: 16200
Change-Id: I0e9ab373eb3f7f533fe1ae9bf0448b66b4cdf522
Reviewed-on: https://code.wireshark.org/review/35056
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-11-12 03:37:47 +00:00
Gerald Combs 5acf14d5c0 macOS: Remove an exit code check.
Change-Id: I2b9d576bf6d5c49dcfa716abb00f80ea067328db
Reviewed-on: https://code.wireshark.org/review/34953
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-04 13:48:07 +00:00
Gerald Combs 89890097bd macOS: Properly sign our extra packages.
Use productsign to sign product archives.

Change-Id: I40fd329e6f2b0abc49f1b4b0247eae380de8101b
Reviewed-on: https://code.wireshark.org/review/34951
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-04 13:33:53 +00:00
Gerald Combs 2dca23f836 macOS: Remove no-longer-relevant documentation.
Change-Id: I628395a761291a105fdc1ef79ce05db0b00a4ab3
Reviewed-on: https://code.wireshark.org/review/34630
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-26 23:22:19 +00:00
Gerald Combs af793b19d0 macOS: Sign our .dmg.
Add osx-dmg.sh back and make it a simple wrapper around dmgbuild and
codesign.

Change-Id: I0baa21fd971aa1b06e1a6700881cd7625dffff35
Reviewed-on: https://code.wireshark.org/review/34629
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-26 17:52:43 +00:00
Gerald Combs 75dc0933c6 macOS: Sign our extra packages.
Change-Id: If2e28e4708f1d71fa4e7b549a2ba021557711d4e
Reviewed-on: https://code.wireshark.org/review/34627
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-25 23:20:01 +00:00
Gerald Combs 60c9297069 macOS: Increase our .dmg compression level.
Change-Id: I273eb5174ef92146aa48eda8a2e37a13828d73f4
Reviewed-on: https://code.wireshark.org/review/34626
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-25 22:08:01 +00:00
Gerald Combs b789895c1b macOS: Use dmgbuild to build our .dmg.
Scripting the Finder in order to lay out our disk image assumes that we
have access to the Finder. This might not be the case on our builder,
and it arguably shoudn't be.

Switch from using a Bash script + AppleScript to build and lay out our
.dmg to using dmgbuild, which creates our .DS_Store directly using
Python's ds_store module.

Change-Id: I2e4a9dd89bc8297c9cbd9df7aa8d3a44447bde85
Reviewed-on: https://code.wireshark.org/review/34623
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-25 21:31:22 +00:00
Gerald Combs b1416fda0a macOS: Disable arrange_dmg.applescript.
arrange_dmg.applescript is failing on the macOS builder, so comment it
out for now.

Change-Id: Ibe7bf249623832954e9f67d241513b549dff990c
Reviewed-on: https://code.wireshark.org/review/34621
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-25 16:57:20 +00:00
Gerald Combs ac4f3c0f4d macOS: Make Wireshark.app drag-installable.
Create ChmodBPF installer and uninstaller packages using pkgbuild and
productbuild. Place them in Wireshark.app/Resources/Extras.

Add a path_helper installer and uninstaller which respectively add and
remove /etc/*paths.d/Wireshark.

Remove the PackageMaker and utility-launcher assets and build targets.

Show a message in the main welcome screen if we don't have capture
permissions. Add an link which launches the ChmodBPF installer.

Add a "macOS Extras" item to About → Folders.

Migrate "Read me first" from RTF to Asciidoctor, which lets us add links
and looks like our other documentation.

Rename dmg_set_style.scpt to arrange_dmg.applescript and make it plain
text. Always run it in osx-dmg.sh.

Bug: 6991
Bug: 12593
Bug: 11399
Ping-Bug: 16074
Change-Id: I7b6aa89aae2be522b4141b0d44e8142dec749e90
Reviewed-on: https://code.wireshark.org/review/31047
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-25 16:26:31 +00:00
Gerald Combs cfb2d7eb80 macOS: Don't clobber Wireshark.app during installation.
Removing Wireshark.app during preflight is the wrong way to ensure that
we uninstall old assets.

Bug: 16050
Change-Id: I39a0129e29830f8b6bc7ef228f3886db51d963ec
Reviewed-on: https://code.wireshark.org/review/34542
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-18 16:49:54 +00:00
Gerald Combs b28ae2dc74 macOS: Fix our token wait. Again.
altool isn't guaranteed to clean up after itself, e.g. if an earthquake
takes down the Developer ID Notary Service (thanks to Jim Young for
tracking this down). Instead of checking for the existence of tokens,
check their existence and age.

Change-Id: Iac216d524a4894115ecf33589af1bbdebcc9cbab
Reviewed-on: https://code.wireshark.org/review/33856
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-07-05 16:12:52 +00:00
Gerald Combs 8094ad896b macOS: Fix our token wait.
Change-Id: I3a678267b38a598f43322a1440dd87fa42acf901
Reviewed-on: https://code.wireshark.org/review/33750
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-26 23:30:17 +00:00
Gerald Combs d9e230d79a macOS: Add a notarization upload wait check.
altool appears to only support one notarization upload at a time. Add a
loop that waits for an empty upload token directory.

Convert the status check to a timeout loop.

Change-Id: I30fd15b6f098acfe5d9bdcd72237c56cc066dda4
Reviewed-on: https://code.wireshark.org/review/33749
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-26 23:15:04 +00:00
Gerald Combs e5230a5d10 macOS: Make sure we bundle our plugin dependencies.
Add our plugins to the bundle binary list.

Copy libraries using `install` in order to ensure that we can doctor
them up.

Bug: 15867
Change-Id: I864455f6ef7312938e89493015fd55874ab0a0c3
Reviewed-on: https://code.wireshark.org/review/33744
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-26 16:13:57 +00:00
Gerald Combs 867a13d9e6 Fix a couple of shellcheck issues.
Change-Id: Iaebbe5227ffcc581e794a3be1f8b9020fd600f68
Reviewed-on: https://code.wireshark.org/review/33739
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-25 15:13:51 +00:00
Gerald Combs 332eeb1f88 macOS: Notarization count fix.
Change-Id: If2be00ebf08655d967273ae3a84f4345ea10f06a
Reviewed-on: https://code.wireshark.org/review/33435
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-05-31 20:58:02 +00:00
Gerald Combs 23ec0666c5 macOS: Notarization updates.
Increase our timeout from 10 minutes to 20. Fixup our ID formatting.

Change-Id: I143c08880de4f285bd0bc6dbf6619d565ef97b3a
Reviewed-on: https://code.wireshark.org/review/33434
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-05-31 17:29:54 +00:00
Gerald Combs 64a56cf7a6 macOS: Add a workaround for libbrotli.
When gathering our dependencies, work around an issue with libbrotli's
install name similar to what we do with libssh.

Bug: 15730
Change-Id: I571746848e3343d81c286be66f6fe6510c698d6f
Reviewed-on: https://code.wireshark.org/review/32990
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-26 00:30:45 +00:00
Gerald Combs c9ca78fc2b macOS: Add a notarization script.
According to

https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution

notarization will be required in a future release of macOS. Add a script
for doing so. The process requires submitting our .dmg to Apple, waiting
for it to finish, and stapling a ticket to our .dmg.

Change-Id: I5b9c0c36cc2182fdd0baeada823aaacba7730a88
Reviewed-on: https://code.wireshark.org/review/32906
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-21 07:32:29 +00:00
Gerald Combs 6fc00612b4 macOS: Update a comment in osx-app.sh.in.
The answer to the question "do we need to add hardened runtime
entitlements or exceptions?" in osx-app.sh is "yes". Update a comment
accordingly.

Change-Id: Icc6f9ed31838aa6342f405a244e726586e9c0c4d
Reviewed-on: https://code.wireshark.org/review/32703
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-03 20:31:43 +00:00
Jason Cohen 00e2434a6f osx app bundle: add entitlement to allow loading 3rd party plugns
This adds the entitlement to everything we sign.  I cannot test a more
granular approach without access to an Apple issued codesigning cert/key
pair.

Bug: 15667
Change-Id: I9fe962a06b681d33853b0944765987e21d21be2d
Reviewed-on: https://code.wireshark.org/review/32700
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-03 20:24:12 +00:00
Gerald Combs 029f24e4cf macOS: Restore dark mode support.
Comment out the NSRequiresAquaSystemAppearance key in Info.plist under
the assumption that both we and Qt will have dark mode support in usable
shape by the next release.

Ping-Bug: 15511
Change-Id: Ic5960034ce302d81dcc624cbd0e2c017865f44e2
Reviewed-on: https://code.wireshark.org/review/32504
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-22 05:18:09 +00:00
Gerald Combs 1b10ac9bd4 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>
2019-02-22 19:36:20 +00:00