-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Packaging] Support ARM64 on Linux #24180
Conversation
Really long-awaited feature to support ARM64, good job! |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
scripts/release/rpm/ubi.dockerfile
Outdated
@@ -19,7 +19,8 @@ COPY . . | |||
RUN dos2unix ./scripts/release/rpm/azure-cli.spec && \ | |||
REPO_PATH=$(pwd) CLI_VERSION=$cli_version PYTHON_PACKAGE=$python_package PYTHON_CMD=python3.9 \ | |||
rpmbuild -v -bb --clean scripts/release/rpm/azure-cli.spec && \ | |||
cp /root/rpmbuild/RPMS/x86_64/azure-cli-${cli_version}-1.*.x86_64.rpm /azure-cli-dev.rpm | |||
cp /root/rpmbuild/RPMS/**/azure-cli-${cli_version}-1.*.rpm /azure-cli-dev.rpm && \ | |||
mkdir /out && cp /root/rpmbuild/RPMS/**/azure-cli-${cli_version}-1.*.rpm /out/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker cp
does not support wildcard, move target package to out
folder.
@@ -57,7 +57,7 @@ Standards-Version: 3.9.5 | |||
Homepage: https://github.com/azure/azure-cli | |||
|
|||
Package: azure-cli | |||
Architecture: all | |||
Architecture: any | |||
Depends: \${shlibs:Depends}, \${misc:Depends} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also change deb package name from all.deb
to amd64.deb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package size also decrease by 20MB.
Specifying only any indicates that the source package isn’t dependent on any particular architecture and should compile fine on any one. The produced binary package(s) will be specific to whatever the current build architecture is.
Specifying only all indicates that the source package will only build architecture-independent packages.
https://www.debian.org/doc/debian-policy/ch-controlfields.html
exit 0 | ||
fi | ||
# https://docs.docker.com/engine/security/rootless/ | ||
/bin/bash -c "$(curl -fsSL https://get.docker.com)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly feel we should persuade 1ES to provide an image with docker, instead of installing docker by ourselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hope this issue will be fixed one day. actions/runner-images#5631
@@ -81,7 +81,7 @@ setup() { | |||
exit 1 | |||
fi | |||
fi | |||
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ ${CLI_REPO} main" \ | |||
echo "deb [arch=$(dpkg --print-architecture)] https://packages.microsoft.com/repos/azure-cli/ ${CLI_REPO} main" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. This may solve #25393.
scripts/release/debian/prepare.sh
Outdated
@@ -110,7 +110,8 @@ ${TAB}echo "\043!/usr/bin/env bash\nbin_dir=\140cd \"\044(dirname \"\044BASH_SOU | |||
${TAB}chmod 0755 debian/azure-cli/usr/bin/az | |||
${TAB}mkdir -p debian/azure-cli/etc/bash_completion.d/ | |||
${TAB}cat ${completion_script} > debian/azure-cli/etc/bash_completion.d/azure-cli | |||
${TAB}dpkg-shlibdeps -v --warnings=7 -Tdebian/azure-cli.substvars -dDepends -edebian/azure-cli/opt/az/bin/python3 debian/azure-cli/opt/az/lib/python3.10/lib-dynload/_ssl.cpython-310-x86_64-linux-gnu.so | |||
${TAB}ssl_file=$(find debian/azure-cli/opt/az/lib/python3.10/ -type f -name '_ssl.cpython-310-*-linux-gnu.so') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we don't need to use find
, similar to #24180 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed!
@@ -15,13 +16,13 @@ COPY . . | |||
RUN dos2unix ./scripts/release/rpm/azure-cli.spec && \ | |||
REPO_PATH=$(pwd) CLI_VERSION=$cli_version PYTHON_PACKAGE=python3 PYTHON_CMD=python3 \ | |||
rpmbuild -v -bb --clean scripts/release/rpm/azure-cli.spec && \ | |||
cp /usr/src/mariner/RPMS/x86_64/azure-cli-${cli_version}-1.cm2.x86_64.rpm /azure-cli-dev.rpm | |||
cp /usr/src/mariner/RPMS/*/azure-cli-${cli_version}-1.*.rpm /azure-cli-dev.rpm && \ | |||
mkdir /out && cp /usr/src/mariner/RPMS/*/azure-cli-${cli_version}-1.*.rpm /out/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for copying to /out
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In scripts/release/rpm/pipeline.sh
, we'll copy the rpm file with docker cp $id:/out/. ${BUILD_STAGINGDIRECTORY}
later.
RPMs are in different folders on amd64 and arm64, but docker cp
does not support wildcard. I move target package to out
folder.
Any timeline for this to be released? |
@TravisEz13 On March 07 |
Description
The long-awaited feature is finally here. The ARM64 build will be released for current supported Linux distribution.
Close #7368
Related issue: #22875
Main changes:
-amd64
or-arm64
suffix.all.deb
toamd64.deb
/arm64.deb
.Architecture: any
inscripts/release/debian/prepare.sh
.This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.