diff --git a/scripts/packages/packager/local-entrypoint.sh b/scripts/packages/packager/local-entrypoint.sh index 792cf342d8..d4e628f8c5 100644 --- a/scripts/packages/packager/local-entrypoint.sh +++ b/scripts/packages/packager/local-entrypoint.sh @@ -4,6 +4,11 @@ set -e set -x set -euxo pipefail +case "$(uname -m)" in + amd64|x86_64) ABIARCH=amd64 ;; + arm64|aarch64) ABIARCH=aarch64 ;; +esac + cd /nginx-agent/ mkdir -p /staging/usr/local/bin @@ -24,17 +29,19 @@ chmod +x /staging/usr/local/etc/rc.d/nginx-agent git config --global --add safe.directory /nginx-agent VERSION="$(git describe --match 'v[0-9]*' --abbrev=0 | tr -d 'v')-SNAPSHOT-$(git rev-parse --short HEAD)" envsubst < scripts/packages/manifest > /staging/+MANIFEST -pkg -o ABI="FreeBSD:13:amd64" create --format txz \ +mkdir -p ./build + +pkg -o ABI="FreeBSD:13:${ABIARCH}" create --format txz \ -m /staging \ -r /staging \ -p /staging/plist \ - -o ./build/; \ + -o ./build -# Creating symbolic link from txz to pkg. In older versions of pkg the extension would represent the format of the file -# but since version 1.17.0 pkg will now always create a file with the extesion pkg no matter what the format is. +# Creating symbolic link from txz to pkg. In older versions of pkg the extension would represent the format of the file +# but since version 1.17.0 pkg will now always create a file with the extesion pkg no matter what the format is. # See 1.17.0 release notes for more info: https://cgit.freebsd.org/ports/commit/?id=e497a16a286972bfcab908209b11ee6a13d99dc9 -cd build/ -ln -s nginx-agent-"$(git describe --match 'v[0-9]*' --abbrev=0 | tr -d 'v')"-SNAPSHOT-"$(git rev-parse --short HEAD)".pkg nginx-agent-"$(git describe --match 'v[0-9]*' --abbrev=0 | tr -d 'v')"-SNAPSHOT-"$(git rev-parse --short HEAD)".txz -cd .. +cd build +ln -s nginx-agent-"$(git describe --match 'v[0-9]*' --abbrev=0 | tr -d 'v')"-SNAPSHOT-"$(git rev-parse --short HEAD)".pkg nginx-agent-"$(git describe --match 'v[0-9]*' --abbrev=0 | tr -d 'v')"-SNAPSHOT-"$(git rev-parse --short HEAD)".txz +cd ../ rm -rf /staging diff --git a/scripts/packages/packager/signed-entrypoint.sh b/scripts/packages/packager/signed-entrypoint.sh index f4529b6fbe..cb899ccb3d 100644 --- a/scripts/packages/packager/signed-entrypoint.sh +++ b/scripts/packages/packager/signed-entrypoint.sh @@ -39,8 +39,8 @@ for freebsd_abi in $FREEBSD_DISTROS; do \ -o ./build/packages/txz/"$freebsd_abi"; \ # create freebsd pkg repo layout pkg repo ./build/packages/txz/"$freebsd_abi" .key.rsa; \ - # Creating symbolic link from txz to pkg. In older versions of pkg the extension would represent the format of the file - # but since version 1.17.0 pkg will now always create a file with the extesion pkg no matter what the format is. + # Creating symbolic link from txz to pkg. In older versions of pkg the extension would represent the format of the file + # but since version 1.17.0 pkg will now always create a file with the extesion pkg no matter what the format is. # See 1.17.0 release notes for more info: https://cgit.freebsd.org/ports/commit/?id=e497a16a286972bfcab908209b11ee6a13d99dc9 cd build/packages/txz/"$freebsd_abi"; \ ln -s nginx-agent-"$(git describe --match 'v[0-9]*' --abbrev=0 | tr -d 'v')".pkg nginx-agent-"$(git describe --match 'v[0-9]*' --abbrev=0 | tr -d 'v')".txz; \