CentOS_8_Stream: unresolvable: nothing provides cargo
Hi all, I would like to build https://github.com/systemd/zram-generator with OBS, and already able to handle packaging for both (see https://software.opensuse.org//download.html?project=home%3Aalvistack&package=zram-generator): - openSUSE Leap 15.3 / Tumbleweed - Fedora 33 / 34 - Debian 10 / 11 - Ubuntu 20.04 / 20.10 / 21.04 Since it is a Rust-based project, when packaging on CentOS 8 Stream I need to `BuildRequires: cargo` which is located in AppStream (see https://centos.pkgs.org/8-stream/centos-appstream-x86_64/cargo-1.52.1-1.modu...). I had add "CentOS:CentOS-8/appstream" as additional repository path under "CentOS_8_Stream" at https://build.opensuse.org/repositories/home:alvistack. Ideally cargo should be found but now display an error message as below (see https://build.opensuse.org/package/binaries/home:alvistack/zram-generator/Ce...): The build can not begin, because required packages are either missing or not explicitly defined. Repository has been published unresolvable: nothing provides cargo May I have some hints about how to install cargo for CentOS 8 Stream, therefore passing the packaging process? Regards, Edison Wong
On Fri, Jul 16, 2021 at 12:39 AM Wong Hoi Sing Edison <hswong3i@gmail.com> wrote:
Hi all,
I would like to build https://github.com/systemd/zram-generator with OBS, and already able to handle packaging for both (see https://software.opensuse.org//download.html?project=home%3Aalvistack&package=zram-generator): - openSUSE Leap 15.3 / Tumbleweed - Fedora 33 / 34 - Debian 10 / 11 - Ubuntu 20.04 / 20.10 / 21.04
Since it is a Rust-based project, when packaging on CentOS 8 Stream I need to `BuildRequires: cargo` which is located in AppStream (see https://centos.pkgs.org/8-stream/centos-appstream-x86_64/cargo-1.52.1-1.modu...).
I had add "CentOS:CentOS-8/appstream" as additional repository path under "CentOS_8_Stream" at https://build.opensuse.org/repositories/home:alvistack. Ideally cargo should be found but now display an error message as below (see https://build.opensuse.org/package/binaries/home:alvistack/zram-generator/Ce...):
The build can not begin, because required packages are either missing or not explicitly defined. Repository has been published unresolvable: nothing provides cargo
May I have some hints about how to install cargo for CentOS 8 Stream, therefore passing the packaging process?
First, you're not even using CentOS Stream 8 there, you're still using classic CentOS 8. Adjust your project meta to be like so: <repository name="CentOS_8"> <path project="CentOS:CentOS-8:Stream" repository="standard"/> <path project="Fedora:EPEL:8" repository="standard"/> <arch>x86_64</arch> </repository> Add the following to your project config: %if "%_repository" == "CentOS_8" ExpandFlags: module:rust-toolset-rhel8 %endif That will give you access to the Rust toolset, including rustc and cargo. -- 真実はいつも一つ!/ Always, there's only one truth!
Ok I get it: # dnf install cargo Enabling module streams: llvm-toolset rhel8 rust-toolset rhel8 Therefore my project configuration need to enable these modules with: %if 0%{?centos_version} == 800 ExpandFlags: module:llvm-toolset-rhel8 ExpandFlags: module:rust-toolset-rhel8 %endif Afterward the build now triggered with no error message ;-) Regards, Edison Wong
participants (2)
-
Neal Gompa
-
Wong Hoi Sing Edison