Reworking Wireshark label to pull from platform specific Sparkle feed#1370
Merged
BigMacAdmin merged 2 commits intoInstallomator:mainfrom Mar 12, 2024
Merged
Conversation
Output: 2023-12-09 06:58:11 : REQ : wireshark : ################## Start Installomator v. 10.6beta, date 2023-12-09 2023-12-09 06:58:11 : INFO : wireshark : ################## Version: 10.6beta 2023-12-09 06:58:11 : INFO : wireshark : ################## Date: 2023-12-09 2023-12-09 06:58:11 : INFO : wireshark : ################## wireshark 2023-12-09 06:58:11 : DEBUG : wireshark : DEBUG mode 1 enabled. 2023-12-09 06:58:11 : INFO : wireshark : SwiftDialog is not installed, clear cmd file var 2023-12-09 06:58:12 : DEBUG : wireshark : name=Wireshark 2023-12-09 06:58:12 : DEBUG : wireshark : appName= 2023-12-09 06:58:12 : DEBUG : wireshark : type=dmg 2023-12-09 06:58:12 : DEBUG : wireshark : archiveName= 2023-12-09 06:58:12 : DEBUG : wireshark : downloadURL=https://1.na.dl.wireshark.org/osx/Wireshark%20Latest%20Arm%2064.dmg 2023-12-09 06:58:12 : DEBUG : wireshark : curlOptions= 2023-12-09 06:58:12 : DEBUG : wireshark : appNewVersion=4.2.0 2023-12-09 06:58:12 : DEBUG : wireshark : appCustomVersion function: Not defined 2023-12-09 06:58:12 : DEBUG : wireshark : versionKey=CFBundleShortVersionString 2023-12-09 06:58:12 : DEBUG : wireshark : packageID= 2023-12-09 06:58:12 : DEBUG : wireshark : pkgName= 2023-12-09 06:58:12 : DEBUG : wireshark : choiceChangesXML= 2023-12-09 06:58:12 : DEBUG : wireshark : expectedTeamID=7Z6EMTD2C6 2023-12-09 06:58:12 : DEBUG : wireshark : blockingProcesses= 2023-12-09 06:58:12 : DEBUG : wireshark : installerTool= 2023-12-09 06:58:12 : DEBUG : wireshark : CLIInstaller= 2023-12-09 06:58:12 : DEBUG : wireshark : CLIArguments= 2023-12-09 06:58:12 : DEBUG : wireshark : updateTool= 2023-12-09 06:58:12 : DEBUG : wireshark : updateToolArguments= 2023-12-09 06:58:12 : DEBUG : wireshark : updateToolRunAsCurrentUser= 2023-12-09 06:58:12 : INFO : wireshark : BLOCKING_PROCESS_ACTION=tell_user 2023-12-09 06:58:12 : INFO : wireshark : NOTIFY=success 2023-12-09 06:58:12 : INFO : wireshark : LOGGING=DEBUG 2023-12-09 06:58:12 : INFO : wireshark : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2023-12-09 06:58:12 : INFO : wireshark : Label type: dmg 2023-12-09 06:58:12 : INFO : wireshark : archiveName: Wireshark.dmg 2023-12-09 06:58:12 : INFO : wireshark : no blocking processes defined, using Wireshark as default 2023-12-09 06:58:12 : DEBUG : wireshark : Changing directory to /Users/hessf/Documents/GitHub/Installomator/build 2023-12-09 06:58:12 : INFO : wireshark : App(s) found: /Applications/Wireshark.app 2023-12-09 06:58:12 : INFO : wireshark : found app at /Applications/Wireshark.app, version 4.2.0, on versionKey CFBundleShortVersionString 2023-12-09 06:58:12 : INFO : wireshark : appversion: 4.2.0 2023-12-09 06:58:12 : INFO : wireshark : Latest version of Wireshark is 4.2.0 2023-12-09 06:58:12 : WARN : wireshark : DEBUG mode 1 enabled, not exiting, but there is no new version of app. 2023-12-09 06:58:12 : REQ : wireshark : Downloading https://1.na.dl.wireshark.org/osx/Wireshark%20Latest%20Arm%2064.dmg to Wireshark.dmg 2023-12-09 06:58:12 : DEBUG : wireshark : No Dialog connection, just download 2023-12-09 06:58:18 : DEBUG : wireshark : File list: -rw-r--r--@ 1 hessf staff 63M Dec 9 06:58 Wireshark.dmg 2023-12-09 06:58:18 : DEBUG : wireshark : File type: Wireshark.dmg: zlib compressed data 2023-12-09 06:58:18 : DEBUG : wireshark : curl output was: * Trying 159.89.89.188:443... * Connected to 1.na.dl.wireshark.org (159.89.89.188) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): } [326 bytes data] * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): { [122 bytes data] * (304) (IN), TLS handshake, Unknown (8): { [6 bytes data] * (304) (IN), TLS handshake, Certificate (11): { [3302 bytes data] * (304) (IN), TLS handshake, CERT verify (15): { [264 bytes data] * (304) (IN), TLS handshake, Finished (20): { [52 bytes data] * (304) (OUT), TLS handshake, Finished (20): } [52 bytes data] * SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384 * ALPN: server did not agree on a protocol. Uses default. * Server certificate: * subject: CN=*.na.dl.wireshark.org * start date: Nov 9 13:58:12 2023 GMT * expire date: Dec 8 13:58:12 2024 GMT * subjectAltName: host "1.na.dl.wireshark.org" matched cert's "*.na.dl.wireshark.org" * issuer: C=US; ST=CO; L=Denver; O=Pinnacol Assurance; OU=deff624896835b1e68d49e88950204c0; CN=ca.pinnacol.goskope.com; [email protected] * SSL certificate verify ok. * using HTTP/1.x > GET /osx/Wireshark%20Latest%20Arm%2064.dmg HTTP/1.1 > Host: 1.na.dl.wireshark.org > User-Agent: curl/8.4.0 > Accept: */* > < HTTP/1.1 200 OK < Server: nginx < Date: Sat, 09 Dec 2023 13:58:12 GMT < Content-Type: application/x-apple-diskimage < Connection: keep-alive < X-Frame-Options: SAMEORIGIN < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload < Last-Modified: Wed, 15 Nov 2023 19:46:26 GMT < ETag: "3e98330-60a36289d26ff" < X-Content-Type-Options: nosniff < Accept-CH: Sec-CH-UA-Arch, Sec-CH-UA-Platform, Sec-CH-UA-WoW64 < Cache-Control: public, max-age=14400, s-maxage=60 < X-Cache-Status: HIT < Accept-Ranges: bytes < Content-Length: 65635120 < { [15848 bytes data] * Connection #0 to host 1.na.dl.wireshark.org left intact 2023-12-09 06:58:18 : DEBUG : wireshark : DEBUG mode 1, not checking for blocking processes 2023-12-09 06:58:18 : REQ : wireshark : Installing Wireshark 2023-12-09 06:58:18 : INFO : wireshark : Mounting /Users/hessf/Documents/GitHub/Installomator/build/Wireshark.dmg 2023-12-09 06:58:22 : DEBUG : wireshark : Debugging enabled, dmgmount output was: Checksumming Protective Master Boot Record (MBR : 0)… Protective Master Boot Record (MBR :: verified CRC32 $C25D5240 Checksumming GPT Header (Primary GPT Header : 1)… GPT Header (Primary GPT Header : 1): verified CRC32 $8E6E1D51 Checksumming GPT Partition Data (Primary GPT Table : 2)… GPT Partition Data (Primary GPT Tabl: verified CRC32 $10EF9CC3 Checksumming (Apple_Free : 3)… (Apple_Free : 3): verified CRC32 $00000000 Checksumming disk image (Apple_HFS : 4)… disk image (Apple_HFS : 4): verified CRC32 $53992CAE Checksumming (Apple_Free : 5)… (Apple_Free : 5): verified CRC32 $00000000 Checksumming GPT Partition Data (Backup GPT Table : 6)… GPT Partition Data (Backup GPT Table: verified CRC32 $10EF9CC3 Checksumming GPT Header (Backup GPT Header : 7)… GPT Header (Backup GPT Header : 7): verified CRC32 $4874A2C6 verified CRC32 $3B0F2069 /dev/disk7 GUID_partition_scheme /dev/disk7s1 Apple_HFS /Volumes/Wireshark 4.2.0 2023-12-09 06:58:22 : INFO : wireshark : Mounted: /Volumes/Wireshark 4.2.0 2023-12-09 06:58:22 : INFO : wireshark : Verifying: /Volumes/Wireshark 4.2.0/Wireshark.app 2023-12-09 06:58:22 : DEBUG : wireshark : App size: 220M /Volumes/Wireshark 4.2.0/Wireshark.app 2023-12-09 06:58:23 : DEBUG : wireshark : Debugging enabled, App Verification output was: /Volumes/Wireshark 4.2.0/Wireshark.app: accepted source=Notarized Developer ID origin=Developer ID Application: Wireshark Foundation (7Z6EMTD2C6) 2023-12-09 06:58:23 : INFO : wireshark : Team ID matching: 7Z6EMTD2C6 (expected: 7Z6EMTD2C6 ) 2023-12-09 06:58:23 : INFO : wireshark : Downloaded version of Wireshark is 4.2.0 on versionKey CFBundleShortVersionString, same as installed. 2023-12-09 06:58:23 : DEBUG : wireshark : Unmounting /Volumes/Wireshark 4.2.0 2023-12-09 06:58:24 : DEBUG : wireshark : Debugging enabled, Unmounting output was: "disk7" ejected. 2023-12-09 06:58:24 : DEBUG : wireshark : DEBUG mode 1, not reopening anything 2023-12-09 06:58:24 : REG : wireshark : No new version to install 2023-12-09 06:58:24 : REQ : wireshark : ################## End Installomator, exit code 0
bra1ncramp
reviewed
Dec 13, 2023
There was a problem hiding this comment.
xpath needs the query option:
/usr/bin/xpath5.30 [options] -e query [-e query...] [filename...]
If no filenames are given, supply XML on STDIN. You must provide at
least one query. Each supplementary query is done in order, the
previous query giving the context of the next one.
Additionally, downloadURL should be changed from Latest to $appNewVersion:
wireshark)
name="Wireshark"
type="dmg"
appNewVersion=$(curl -fs "https://www.wireshark.org/update/0/Wireshark/4.0.0/macOS/x86-64/en-US/stable.xml" | xpath -e '//rss/channel/item/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2)
urlToParse=$(curl -fs "https://www.wireshark.org/update/0/Wireshark/4.0.0/macOS/x86-64/en-US/stable.xml" | xmllint --xpath '/rss/channel/item/enclosure/@url' - | head -1 | cut -d ':' -f 2 | cut -d '%' -f 1)
if [[ $(arch) == i386 ]]; then
downloadURL="https:$urlToParse%20$appNewVersion%20Intel%2064.dmg"
elif [[ $(arch) == arm64 ]]; then
downloadURL="https:$urlToParse%20$appNewVersion%20Arm%2064.dmg"
fi
expectedTeamID="7Z6EMTD2C6"
;;
Contributor
Author
There was a problem hiding this comment.
- xpath does not require the
-eas it is wrapped by an xpath() function in Installomator. - I have updated the label to always use the platform-specific Sparkle feed data and download the dmg matching the version
|
This works on my end now. |
Collaborator
|
Thank you! |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Output: