Skip to content

Conversation

@bebound
Copy link
Contributor

@bebound bebound commented Oct 13, 2022

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:

  1. Artifact folder adds -amd64 or -arm64 suffix.
  2. Deb packages suffixes change from all.deb to amd64.deb/arm64.deb.
  3. Deb packages size decreases by 20MB and becomes 60MB because of Architecture: any in scripts/release/debian/prepare.sh.

This checklist is used to make sure that common guidelines for a pull request are followed.

@ghost ghost requested review from jiasli, kairu-ms, wangzelin007 and yonzhan October 13, 2022 07:43
@ghost ghost added the Auto-Assign Auto assign by bot label Oct 13, 2022
@ghost ghost assigned jiasli Oct 13, 2022
@ghost ghost added this to the Oct 2022 (2022-11-01) milestone Oct 13, 2022
@ghost ghost added the Packaging label Oct 13, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Oct 13, 2022

Really long-awaited feature to support ARM64, good job!

@wangzelin007
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@bebound bebound marked this pull request as ready for review October 19, 2022 06:15
@bebound bebound requested a review from calvinhzy as a code owner October 19, 2022 06:15
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/
Copy link
Contributor Author

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.

Package: azure-cli
Architecture: all
Architecture: any
Depends: \${shlibs:Depends}, \${misc:Depends}
Copy link
Contributor Author

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

Copy link
Contributor Author

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

@yonzhan yonzhan removed this from the Oct 2022 (2022-11-01) milestone Oct 26, 2022
exit 0
fi
# https://docs.docker.com/engine/security/rootless/
/bin/bash -c "$(curl -fsSL https://get.docker.com)"
Copy link
Member

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.

Copy link
Contributor Author

@bebound bebound Feb 13, 2023

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

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" \
Copy link
Member

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.

${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')
Copy link
Member

@jiasli jiasli Feb 13, 2023

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes indeed!

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/
Copy link
Member

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?

Copy link
Contributor Author

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.

@bebound bebound merged commit e0883f1 into Azure:dev Feb 14, 2023
bebound added a commit to bebound/azure-cli that referenced this pull request Feb 14, 2023
@TravisEz13
Copy link
Member

Any timeline for this to be released?

@bebound
Copy link
Contributor Author

bebound commented Feb 28, 2023

@TravisEz13 On March 07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support arm64 Linux builds

5 participants