Skip to content

Toolchain build fails on Ubuntu 22.04 (included version of rpm too old to support %bcond) #14569

@Googulator

Description

@Googulator

Describe the bug
The build documentation contains instructions on how to build the Azure Linux toolchain and packages on an Ubuntu host, and specifically lists Ubuntu 22.04 as a validated host system, even including a workaround for how go is handled on this distribution.
However, building the toolchain on Ubuntu 22.04 currently fails with error: line 3: Unknown tag: %bcond main_python 1 in the SRPM pack stage.

This is due to the %bcond macro having been introduced in package spec files. This macro is new in rpm 4.17.1, but Ubuntu 22.04 ships only 4.17.0 in its repositories.

A possible workaround is installing rpm 4.19.1.1 from source, instead of using the one packaged by Ubuntu.

To Reproduce
Steps to reproduce the behavior:

  1. Install prerequisites as described in https://github.com/microsoft/azurelinux/blob/3.0/toolkit/docs/building/prerequisites-ubuntu.md
  2. Follow https://github.com/microsoft/azurelinux/blob/3.0/toolkit/docs/building/building.md for rebuilding the toolchain

Expected behavior
SRPM packing succeeds during toolchain build on a Ubuntu 22.04 host system prepared according to https://github.com/microsoft/azurelinux/blob/3.0/toolkit/docs/building/prerequisites-ubuntu.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions