Skip to content

Support dnf-based installs and PATH checks for Azure Linux and RHEL-family hosts#219

Draft
bcho with Copilot wants to merge 37 commits into
mainfrom
copilot/update-install-uninstall-scripts
Draft

Support dnf-based installs and PATH checks for Azure Linux and RHEL-family hosts#219
bcho with Copilot wants to merge 37 commits into
mainfrom
copilot/update-install-uninstall-scripts

Conversation

Copilot AI commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

install.sh and uninstall.sh assumed Debian/Ubuntu package tooling, blocking Azure Linux and other dnf-based hosts from installing and removing Azure CLI cleanly.

  • Distro and package-manager detection

    • Detects apt-get vs dnf.
    • Recognizes Ubuntu, Azure Linux/azlinux, Rocky, AlmaLinux, and RHEL support paths.
    • Parses /etc/os-release without sourcing it.
  • Install path

    • Installs Azure CLI through the existing Debian installer on apt hosts.
    • Configures the official Azure CLI dnf package source at /etc/yum.repos.d/azure-cli.repo, then installs azure-cli with dnf.
    • Warns when /usr/local/bin is missing from the active PATH.
    • Leaves host prerequisites such as systemd-container to be provisioned outside the installer.
  • Uninstall path

    • Removes Azure CLI via apt or dnf, preserving best-effort cleanup behavior.
# dnf hosts now use native package operations for Azure CLI
dnf install -y azure-cli
dnf remove -y azure-cli

Copilot AI changed the title [WIP] Update install.sh / uninstall.sh to support azlinux / dnf based distros Support dnf-based installs for Azure Linux and RHEL-family hosts Jul 5, 2026
Copilot AI requested a review from bcho July 5, 2026 19:38
Copilot finished work on behalf of bcho July 5, 2026 19:38
Comment thread scripts/install.sh Outdated
Copilot finished work on behalf of bcho July 5, 2026 23:21
Copilot AI requested a review from bcho July 5, 2026 23:21
@bcho bcho temporarily deployed to e2e-testing July 6, 2026 23:55 — with GitHub Actions Inactive

@bcho bcho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copilot finished work on behalf of bcho July 7, 2026 01:42
Copilot AI requested a review from bcho July 7, 2026 01:42

@bcho bcho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot it still fails on alma linux

INFO: Installing Azure CLI...
INFO: Downloading and installing Azure CLI...
Last metadata expiration check: 0:16:54 ago on Tue 07 Jul 2026 01:36:57 AM UTC.
No match for argument: azure-cli
Error: Unable to find a match: azure-cli
ERROR: Failed to install azure-cli with dnf

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot it still fails on alma linux

Addressed in f54a89a by configuring the Azure CLI dnf package source directly via /etc/yum.repos.d/azure-cli.repo before running dnf install -y azure-cli.

Copilot finished work on behalf of bcho July 7, 2026 02:09
Copilot AI requested a review from bcho July 7, 2026 02:09

@bcho bcho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot can we also ensure /usr/local/bin is in $PATH?

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot can we also ensure /usr/local/bin is in $PATH?

Addressed in 5a2eaa1 by configuring /usr/local/bin in the installer PATH and persisting it via /etc/profile.d, with uninstall cleanup for the added profile snippet.

Copilot AI changed the title Support dnf-based installs for Azure Linux and RHEL-family hosts Support dnf-based installs and PATH setup for Azure Linux and RHEL-family hosts Jul 7, 2026
Copilot AI requested a review from bcho July 7, 2026 03:06
Copilot finished work on behalf of bcho July 7, 2026 03:06

@bcho bcho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot revert the path profile change, print a warning if /usr/local/bin is not in PATH variable instead.

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@copilot revert the path profile change, print a warning if /usr/local/bin is not in PATH variable instead.

Addressed in 1083206 by removing the PATH profile persistence/cleanup and warning when /usr/local/bin is missing from PATH.

Copilot AI changed the title Support dnf-based installs and PATH setup for Azure Linux and RHEL-family hosts Support dnf-based installs and PATH checks for Azure Linux and RHEL-family hosts Jul 7, 2026
Copilot finished work on behalf of bcho July 7, 2026 06:10
Copilot AI requested a review from bcho July 7, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update install.sh / uninstall.sh to support azlinux / dnf based distros

2 participants