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

Unable to resolve argument foo:devel: broken groups or modules #65

Open
oneslideicywater opened this issue Oct 24, 2022 · 0 comments
Open

Comments

@oneslideicywater
Copy link

oneslideicywater commented Oct 24, 2022

I have a question about install docker-ce in offline case:

there are two vms, one is online, another is not. I try to download the rpm of docker-ce in the online one and install it on the offline vm.

but met the following error:

[root@localhost repo]#  dnf module install foo:devel
Last metadata expiration check: 0:01:53 ago on Sun 23 Oct 2022 11:30:35 PM EDT.
Unable to resolve argument foo:devel
No match for package docker-ce
Unable to resolve argument foo:devel
No match for package docker-ce-cli
Error: Problems in request:
broken groups or modules: foo:devel, foo:devel

Step to reproduce

on the online one:

  1. add docker-ce repo
sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
  1. download rpm
yum makecache
yum install --downloadonly --installroot=/var/rpm/repo-installroot \
	--releasever=8 --downloaddir=/var/rpm/repo docker-ce docker-ce-cli containerd.io docker-compose-plugin
  1. create repo
createrepo --database /var/rpm/repo

add module feature to rpm downloaded, following the instruction Creating a module repository from a set of RPM packages in README.md :

[root@localhost repo]# cd /var/rpm/repo
[root@localhost repo]# dir2module foo:devel:123:f32:x86_64 -m "My example module" --force --dir .
ERROR: RPM does not have `modularitylabel` header set: ./libxkbcommon-0.9.1-1.el8.x86_64.rpm
ERROR: RPM does not have `modularitylabel` header set: ./xkeyboard-config-2.28-1.el8.noarch.rpm
ERROR: RPM does not have `modularitylabel` header set: ./acl-2.2.53-1.el8.1.x86_64.rpm
// a lot of same kind of error, omit for brevity
Created foo:devel:123:f32:x86_64.modulemd.yaml
Created foo:devel:123:f32:x86_64.modulemd-defaults.yaml


[root@localhost repo]# createrepo_mod .
Directory walk started
Directory walk done - 197 packages
Temporary output repo path: ./.repodata/
Preparing sqlite DBs
Pool started (with 5 workers)
Pool finished

[root@localhost repo]# ls repodata/ |grep modules
ce7589fb16229ae9f5c31f2ba47ce60748c4d098e94dd13efd964b3c6f5748c6-modules.yaml.gz

copy the yum repo to /etc/yum.repos.d/ dir:

[root@localhost repo]# cat /etc/yum.repos.d/docker-offline.repo
[docker-offline]
name=My local foo module
baseurl=file:///var/rpm/repo
gpgcheck=0
enabled=1

and check module info:

[root@localhost repo]# dnf module info foo:devel
My local foo module                                                                                          52 MB/s | 277 kB     00:00
Name             : foo
Stream           : devel [d][a]
Version          : 123
Context          : f32
Architecture     :
Profiles         : common [d]
Default profiles : common
Repo             : docker-offline
Summary          : My example module
Description      : This module has been generated using dir2module tool
Requires         :
Artifacts        : acl-0:2.2.53-1.el8.1.x86_64
                 : audit-libs-0:3.0.7-2.el8.2.x86_64
                 : basesystem-0:11-5.el8.noarch
                 : bash-0:4.4.20-4.el8_6.x86_64
                 // a lot of list, no error at the end
[root@localhost repo]# ls |grep modulemd
foo:devel:123:f32:x86_64.modulemd-defaults.yaml
foo:devel:123:f32:x86_64.modulemd.yaml
[root@localhost repo]# pwd
/var/rpm/repo
  1. install the docker on the offline vm (I disconnect the internet at this point of time)

the error I can't figure out:

[root@localhost repo]#  dnf module install foo:devel
Last metadata expiration check: 0:01:22 ago on Sun 23 Oct 2022 11:30:35 PM EDT.
Unable to resolve argument foo:devel
No match for package docker-ce
Unable to resolve argument foo:devel
No match for package docker-ce-cli
Error: Problems in request:
broken groups or modules: foo:devel, foo:devel
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

No branches or pull requests

1 participant