10.5 buildLabel not working where 10.4 is #320

Closed
opened 2026-01-19 18:33:38 +00:00 by michael · 1 comment
Owner

Originally created by @07-C9 on GitHub.

First off, wonderful tool - I cannot praise enough. Has saved us a countless amount of time maintaining packages.

Testing out 10.5. I've been dipping my feet more into buildLabel as I'd like to start contributing more and there is some Software we'd like to make available in Self Service / Auto Patch that doesn't currently exist as a label.

I was in the process of making a label for Airtame (pkg) and got this error:

Desktop/Installomator-10.5/utils/buildLabel.sh "https://downloads-website.airtame.com/get.php?platform=mac&pkg=true" 
Changing directory to /Users/me/2023-11-08-16-08-38
Working dir: /Users/me/2023-11-08-16-08-38
Downloading https://downloads-website.airtame.com/get.php?platform=mac&pkg=true
get.php?platform=mac&pkg=true
Redirecting to (maybe this can help us with version):
HTTP/2 400 
date: Thu, 09 Nov 2023 00:08:38 GMT
content-type: text/html
content-length: 154
server: openresty

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  108M  100  108M    0     0  17.3M      0  0:00:06  0:00:06 --:--:-- 19.8M
Desktop/Installomator-10.5/utils/buildLabel.sh: line 267: ${${archiveTempName##*/}%%\?*}: bad substitution
Desktop/Installomator-10.5/utils/buildLabel.sh: line 268: ${${archivePath##*/}%%\?*}: bad substitution
Could not determine archiveName from “?? and “??

The exact same URL works with 10.4's buildLabel:

Desktop/Installomator-10.4/utils/buildLabel.sh "https://downloads-website.airtame.com/get.php?platform=mac&pkg=true"
Changing directory to /Users/me/Desktop/Installomator-10.5/utils/2023-11-08-16-06-52
Working dir: /Users/me/Desktop/Installomator-10.5/utils/2023-11-08-16-06-52
Downloading https://downloads-website.airtame.com/get.php?platform=mac&pkg=true
get.php?platform=mac&pkg=true
Redirecting to (maybe this can help us with version):
HTTP/2 400 
date: Thu, 09 Nov 2023 00:06:53 GMT
content-type: text/html
content-length: 154
server: openresty

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  108M  100  108M    0     0  17.7M      0  0:00:06  0:00:06 --:--:-- 20.3M
archiveTempName: get.php
archivePath: https://airtame-app.b-cdn.net/app/latest/mac/Airtame-4.7.0.pkg
Calculated archiveName: Airtame-4.7.0.pkg
name: Airtame-4.7.0
archiveExt: pkg
PKG found: Airtame-4.7.0.pkg
Package investigation.
Team ID found for PKG: 4TPSP88HN2
For PKGs it's advised to find packageID for version checking, so extracting those
<pkg-ref id="com.airtame.airtame-application" version="4.7.0" onConclusion="none" installKBytes="252264">#com.airtame.airtame-application.pkg</pkg-ref>
com.airtame.airtame-application
Above is the possible packageIDs that can be used, and the correct one is probably one of those with a version number. More investigation might be needed to figure out correct packageID if several are displayed.
identifier: Airtame470

**********

Labels should be named in small caps, numbers 0-9, “-”, and “_”. No other characters allowed.

appNewVersion is often difficult to find. Can sometimes be found in the filename, sometimes as part of the download redirects, but also on a web page. See redirect and archivePath above if link contains information about this. That is a good place to start

Airtame470)
    name="Airtame-4.7.0"
    type="pkg"
    packageID="com.airtame.airtame-application"
    downloadURL="https://downloads-website.airtame.com/get.php?platform=mac&pkg=true"
    appNewVersion=""
    expectedTeamID="4TPSP88HN2"
    ;;

Version 10.4 (Starting at Line 259)

# Now we have downloaded the archive, and we need to analyze this
# The download has returned both {filename_effective} and {url_effective}

archiveTempName=$( echo "${downloadOut}" | head -1 )
echo "archiveTempName: $archiveTempName"
archivePath=$( echo "${downloadOut}" | tail -1 )
echo "archivePath: $archivePath"

Version 10.5 (Starting at Line 259)

# Now we have downloaded the archive, and we need to analyze this
# The download have returned both {filename_effective} and {url_effective}

archiveTempName=$(basename -- "$downloadURL")
tempName="${archiveTempName%%\?*}"  # Remove query parameters
archiveName="${tempName##*/}"      # Ensure we have only the file name
archivePath=$(dirname -- "$downloadURL")/$archiveName

I think the new method introduced in version 10.5 for parsing the filename from the URL is not working due to incorrect bash syntax for nested parameter expansion?

Originally created by @07-C9 on GitHub. First off, wonderful tool - I cannot praise enough. Has saved us a countless amount of time maintaining packages. Testing out 10.5. I've been dipping my feet more into buildLabel as I'd like to start contributing more and there is some Software we'd like to make available in Self Service / Auto Patch that doesn't currently exist as a label. I was in the process of making a label for Airtame (pkg) and got this error: ``` Desktop/Installomator-10.5/utils/buildLabel.sh "https://downloads-website.airtame.com/get.php?platform=mac&pkg=true" Changing directory to /Users/me/2023-11-08-16-08-38 Working dir: /Users/me/2023-11-08-16-08-38 Downloading https://downloads-website.airtame.com/get.php?platform=mac&pkg=true get.php?platform=mac&pkg=true Redirecting to (maybe this can help us with version): HTTP/2 400 date: Thu, 09 Nov 2023 00:08:38 GMT content-type: text/html content-length: 154 server: openresty % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 108M 100 108M 0 0 17.3M 0 0:00:06 0:00:06 --:--:-- 19.8M Desktop/Installomator-10.5/utils/buildLabel.sh: line 267: ${${archiveTempName##*/}%%\?*}: bad substitution Desktop/Installomator-10.5/utils/buildLabel.sh: line 268: ${${archivePath##*/}%%\?*}: bad substitution Could not determine archiveName from “?? and “?? ``` The exact same URL works with 10.4's buildLabel: ``` Desktop/Installomator-10.4/utils/buildLabel.sh "https://downloads-website.airtame.com/get.php?platform=mac&pkg=true" Changing directory to /Users/me/Desktop/Installomator-10.5/utils/2023-11-08-16-06-52 Working dir: /Users/me/Desktop/Installomator-10.5/utils/2023-11-08-16-06-52 Downloading https://downloads-website.airtame.com/get.php?platform=mac&pkg=true get.php?platform=mac&pkg=true Redirecting to (maybe this can help us with version): HTTP/2 400 date: Thu, 09 Nov 2023 00:06:53 GMT content-type: text/html content-length: 154 server: openresty % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 108M 100 108M 0 0 17.7M 0 0:00:06 0:00:06 --:--:-- 20.3M archiveTempName: get.php archivePath: https://airtame-app.b-cdn.net/app/latest/mac/Airtame-4.7.0.pkg Calculated archiveName: Airtame-4.7.0.pkg name: Airtame-4.7.0 archiveExt: pkg PKG found: Airtame-4.7.0.pkg Package investigation. Team ID found for PKG: 4TPSP88HN2 For PKGs it's advised to find packageID for version checking, so extracting those <pkg-ref id="com.airtame.airtame-application" version="4.7.0" onConclusion="none" installKBytes="252264">#com.airtame.airtame-application.pkg</pkg-ref> com.airtame.airtame-application Above is the possible packageIDs that can be used, and the correct one is probably one of those with a version number. More investigation might be needed to figure out correct packageID if several are displayed. identifier: Airtame470 ********** Labels should be named in small caps, numbers 0-9, “-”, and “_”. No other characters allowed. appNewVersion is often difficult to find. Can sometimes be found in the filename, sometimes as part of the download redirects, but also on a web page. See redirect and archivePath above if link contains information about this. That is a good place to start Airtame470) name="Airtame-4.7.0" type="pkg" packageID="com.airtame.airtame-application" downloadURL="https://downloads-website.airtame.com/get.php?platform=mac&pkg=true" appNewVersion="" expectedTeamID="4TPSP88HN2" ;; ``` Version 10.4 (Starting at Line 259) ``` # Now we have downloaded the archive, and we need to analyze this # The download has returned both {filename_effective} and {url_effective} archiveTempName=$( echo "${downloadOut}" | head -1 ) echo "archiveTempName: $archiveTempName" archivePath=$( echo "${downloadOut}" | tail -1 ) echo "archivePath: $archivePath" ``` Version 10.5 (Starting at Line 259) ``` # Now we have downloaded the archive, and we need to analyze this # The download have returned both {filename_effective} and {url_effective} archiveTempName=$(basename -- "$downloadURL") tempName="${archiveTempName%%\?*}" # Remove query parameters archiveName="${tempName##*/}" # Ensure we have only the file name archivePath=$(dirname -- "$downloadURL")/$archiveName ``` I think the new method introduced in version 10.5 for parsing the filename from the URL is not working due to incorrect bash syntax for nested parameter expansion?
michael added the waiting for responsebug labels 2026-01-19 18:33:38 +00:00
Author
Owner

@acodega commented on GitHub:

Are you seeing this issue in 10.6?

@acodega commented on GitHub: Are you seeing this issue in 10.6?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Installomator/Installomator#320