Skip to content
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

Linux (debian) multiarch support issues due to unpinned single-arch azure apt sources #1961

Closed
3 of 7 tasks
ryankurte opened this issue Nov 2, 2020 · 4 comments
Closed
3 of 7 tasks
Assignees
Labels
Area: Scripting and command line awaiting-deployment Code complete; awaiting deployment and/or deployment in progress investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu

Comments

@ryankurte
Copy link

ryankurte commented Nov 2, 2020

Description
Nominally debian supports multiarch packages for cross-platform builds (via dpkg --add-architecture), however, the github actions linux environment adds a set of default repos (see below) that do not provide all common architectures thus breaking multiarch support.

This could be resolved by pinning the default non-multiarch apt repositories to [arch=amd64], mitigating the need for users to manually perform this patching to adding additional architectures.

Area for Triage:
Packages

Question, Bug, or Feature?:
Bug

Virtual environments affected

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11.0
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior
Running sudo dpkg --add-architecture armhf && sudo apt update should succeed and add support for installing :armhf packages.

Actual behavior
Following the addition of an architecture apt update fails due to missing architectures (from here:

Run sudo dpkg --add-architecture armhf
  sudo dpkg --add-architecture armhf
  sudo apt update -y
  sudo apt install -y libusb-1.0:armhf libusb-dev:armhf
  shell: /bin/bash -e {0}
  env:
    CARGO_TERM_COLOR: always
    GITHUB_REPOSITORY_SLUG: ryankurte-ringlight
    GITHUB_REPOSITORY_OWNER: ryankurte
    GITHUB_REPOSITORY_OWNER_SLUG: ryankurte
    GITHUB_REPOSITORY_NAME: ringlight
    GITHUB_REPOSITORY_NAME_SLUG: ringlight
    GITHUB_REF_SLUG: refs-heads-master
    GITHUB_REF_NAME: master
    GITHUB_REF_NAME_SLUG: master
    GITHUB_SHA_SHORT: c629b88d

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
...
Err:58 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages
  404  Not Found [IP: 91.189.88.152 80]
Ign:61 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages
Ign:64 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages
Get:69 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages [81.4 kB]
Ign:66 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages
Get:70 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf Packages [23.4 kB]
Fetched 8516 kB in 4s (2299 kB/s)
Reading package lists...
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-armhf/Packages  404  Not Found [IP: 52.252.75.106 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-armhf/Packages  404  Not Found [IP: 52.252.75.106 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-armhf/Packages  404  Not Found [IP: 52.252.75.106 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Error: Process completed with exit code 100.

Repro steps

A build step that adds an architecture then attempts to update the repository listing.

    - name: Install libusb (apt armv7)
      if: ${{ matrix.os == 'ubuntu-latest' && matrix.target == 'armv7-unknown-linux-gnueabihf' }}
      run: |
        sudo dpkg --add-architecture armhf
        sudo apt update -y
        sudo apt install -y libusb-1.0:armhf libusb-dev:armhf
@andy-mishechkin andy-mishechkin added OS: Ubuntu investigate Collect additional information, like space on disk, other tool incompatibilities etc. and removed needs triage labels Nov 3, 2020
@dsame dsame self-assigned this Nov 6, 2020
@maxim-lobanov maxim-lobanov added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Nov 18, 2020
@dsame
Copy link
Contributor

dsame commented Nov 24, 2020

@ryankurte now the apt use default source.lists only for amd and i386 architectures, so you do not need to modify the existing sources to add another architectures.

Fill free to reopen this issue or to create a new one if you think your problem is not solved

@dsame dsame closed this as completed Nov 24, 2020
@ryankurte
Copy link
Author

thanks for looking at this! i can see the changes in master though they don't seem to have arrived in my builds, which report Environment: ubuntu-18.04 and Version: 20201115.1, do i need to do anything to prompt an update of the environment version?

@LeonidLapshin
Copy link
Contributor

Hi, @ryankurte !
These changes will be applied with the next image rollout on the next week, I'll reopen this issue until next Ubuntu image release and report about it in this ticket :)
Thank you!

@ryankurte
Copy link
Author

so this is fixed and landed! but, still requires some work as you then have to go and add standard / working sources.

i've wrapped this fix, as well as the rest of the required bits up into a composite action (now that's a thing) here so hopefully this helps others doing multiarch things with actions ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Scripting and command line awaiting-deployment Code complete; awaiting deployment and/or deployment in progress investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu
Projects
None yet
Development

No branches or pull requests

5 participants