Skip to content

Comments

Reworking Wireshark label to pull from platform specific Sparkle feed#1370

Merged
BigMacAdmin merged 2 commits intoInstallomator:mainfrom
fraserhess:wireshark-newversion-fix
Mar 12, 2024
Merged

Reworking Wireshark label to pull from platform specific Sparkle feed#1370
BigMacAdmin merged 2 commits intoInstallomator:mainfrom
fraserhess:wireshark-newversion-fix

Conversation

@fraserhess
Copy link
Contributor

@fraserhess fraserhess commented Dec 9, 2023

Output:

2023-12-14 14:51:51 : REQ   : wireshark : ################## Start Installomator v. 10.6beta, date 2023-12-14
2023-12-14 14:51:51 : INFO  : wireshark : ################## Version: 10.6beta
2023-12-14 14:51:51 : INFO  : wireshark : ################## Date: 2023-12-14
2023-12-14 14:51:51 : INFO  : wireshark : ################## wireshark
2023-12-14 14:51:51 : DEBUG : wireshark : DEBUG mode 1 enabled.
2023-12-14 14:51:51 : INFO  : wireshark : SwiftDialog is not installed, clear cmd file var
2023-12-14 14:51:52 : DEBUG : wireshark : name=Wireshark
2023-12-14 14:51:52 : DEBUG : wireshark : appName=
2023-12-14 14:51:52 : DEBUG : wireshark : type=dmg
2023-12-14 14:51:52 : DEBUG : wireshark : archiveName=
2023-12-14 14:51:52 : DEBUG : wireshark : downloadURL=https://1.na.dl.wireshark.org/osx/Wireshark%204.2.0%20Arm%2064.dmg
2023-12-14 14:51:52 : DEBUG : wireshark : curlOptions=
2023-12-14 14:51:52 : DEBUG : wireshark : appNewVersion=4.2.0
2023-12-14 14:51:52 : DEBUG : wireshark : appCustomVersion function: Not defined
2023-12-14 14:51:52 : DEBUG : wireshark : versionKey=CFBundleShortVersionString
2023-12-14 14:51:52 : DEBUG : wireshark : packageID=
2023-12-14 14:51:52 : DEBUG : wireshark : pkgName=
2023-12-14 14:51:52 : DEBUG : wireshark : choiceChangesXML=
2023-12-14 14:51:52 : DEBUG : wireshark : expectedTeamID=7Z6EMTD2C6
2023-12-14 14:51:52 : DEBUG : wireshark : blockingProcesses=
2023-12-14 14:51:52 : DEBUG : wireshark : installerTool=
2023-12-14 14:51:52 : DEBUG : wireshark : CLIInstaller=
2023-12-14 14:51:52 : DEBUG : wireshark : CLIArguments=
2023-12-14 14:51:52 : DEBUG : wireshark : updateTool=
2023-12-14 14:51:52 : DEBUG : wireshark : updateToolArguments=
2023-12-14 14:51:52 : DEBUG : wireshark : updateToolRunAsCurrentUser=
2023-12-14 14:51:52 : INFO  : wireshark : BLOCKING_PROCESS_ACTION=tell_user
2023-12-14 14:51:52 : INFO  : wireshark : NOTIFY=success
2023-12-14 14:51:52 : INFO  : wireshark : LOGGING=DEBUG
2023-12-14 14:51:52 : INFO  : wireshark : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2023-12-14 14:51:52 : INFO  : wireshark : Label type: dmg
2023-12-14 14:51:52 : INFO  : wireshark : archiveName: Wireshark.dmg
2023-12-14 14:51:52 : INFO  : wireshark : no blocking processes defined, using Wireshark as default
2023-12-14 14:51:52 : DEBUG : wireshark : Changing directory to /Users/hessf/Documents/GitHub/Installomator/build
2023-12-14 14:51:52 : INFO  : wireshark : App(s) found: /Applications/Wireshark.app
2023-12-14 14:51:52 : INFO  : wireshark : found app at /Applications/Wireshark.app, version 4.2.0, on versionKey CFBundleShortVersionString
2023-12-14 14:51:52 : INFO  : wireshark : appversion: 4.2.0
2023-12-14 14:51:52 : INFO  : wireshark : Latest version of Wireshark is 4.2.0
2023-12-14 14:51:52 : WARN  : wireshark : DEBUG mode 1 enabled, not exiting, but there is no new version of app.
2023-12-14 14:51:52 : INFO  : wireshark : Wireshark.dmg exists and DEBUG mode 1 enabled, skipping download
2023-12-14 14:51:52 : DEBUG : wireshark : DEBUG mode 1, not checking for blocking processes
2023-12-14 14:51:52 : REQ   : wireshark : Installing Wireshark
2023-12-14 14:51:52 : INFO  : wireshark : Mounting /Users/hessf/Documents/GitHub/Installomator/build/Wireshark.dmg
2023-12-14 14:51:53 : DEBUG : wireshark : Debugging enabled, dmgmount output was:
expected   CRC32 $3B0F2069
/dev/disk4          	GUID_partition_scheme
/dev/disk4s1        	Apple_HFS                      	/Volumes/Wireshark 4.2.0

2023-12-14 14:51:53 : INFO  : wireshark : Mounted: /Volumes/Wireshark 4.2.0
2023-12-14 14:51:53 : INFO  : wireshark : Verifying: /Volumes/Wireshark 4.2.0/Wireshark.app
2023-12-14 14:51:53 : DEBUG : wireshark : App size: 220M	/Volumes/Wireshark 4.2.0/Wireshark.app
2023-12-14 14:51:55 : 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-14 14:51:55 : INFO  : wireshark : Team ID matching: 7Z6EMTD2C6 (expected: 7Z6EMTD2C6 )
2023-12-14 14:51:55 : INFO  : wireshark : Downloaded version of Wireshark is 4.2.0 on versionKey CFBundleShortVersionString, same as installed.
2023-12-14 14:51:55 : DEBUG : wireshark : Unmounting /Volumes/Wireshark 4.2.0
2023-12-14 14:51:55 : DEBUG : wireshark : Debugging enabled, Unmounting output was:
"disk4" ejected.
2023-12-14 14:51:55 : DEBUG : wireshark : DEBUG mode 1, not reopening anything
2023-12-14 14:51:55 : REG   : wireshark : No new version to install
2023-12-14 14:51:55 : REQ   : wireshark : ################## End Installomator, exit code 0

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
    ;;

Copy link
Contributor Author

@fraserhess fraserhess Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. xpath does not require the -e as it is wrapped by an xpath() function in Installomator.
  2. I have updated the label to always use the platform-specific Sparkle feed data and download the dmg matching the version

@bra1ncramp
Copy link

Also see: #1195
and #1242

@fraserhess fraserhess changed the title Fix parsing the Wireshark version from Sparkle Reworking Wireshark label to pull from platform specific Sparkle feed Dec 14, 2023
@bra1ncramp
Copy link

This works on my end now.

@BigMacAdmin
Copy link
Collaborator

Thank you!

@BigMacAdmin BigMacAdmin self-assigned this Mar 12, 2024
@BigMacAdmin BigMacAdmin added the application adds or improves an application label label Mar 12, 2024
@BigMacAdmin BigMacAdmin merged commit c13a5e2 into Installomator:main Mar 12, 2024
@scriptingosx scriptingosx added this to the v10.6 milestone Aug 30, 2024
@acodega acodega mentioned this pull request Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application adds or improves an application label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants