Just for test, I was converting from CentOS Linux to CentOS Stream inside a Podman
container. But something has gone wrong.
Instructions to convert from the CentOS Linux 8 distribution to CentOS Stream 8
are published at https://www.centos.org/centos-stream/
1
2
3
4
5
6
7
|
root@centos-linux# dnf install centos-release-stream
root@centos-linux# dnf swap centos-{linux,stream}-repos
root@centos-linux# dnf distro-sync
root@centos-stream# cat /etc/centos-release
|
What happens inside a container (Podman in this case, but also in an LXC container on Proxmox), is
that DNF throws an error:
1
2
3
4
5
|
...
Failed:
filesystem-3.8-3.el8.x86_64 filesystem-3.8-4.el8.x86_64
Error: Transaction failed
|
Indeed.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
root@centos-stream# dnf update filesystem
...
Running transaction test
Transaction test succeeded.
Running transaction
Running scriptlet: filesystem-3.8-4.el8.x86_64 1/1
Preparing : 1/1
Upgrading : filesystem-3.8-4.el8.x86_64 1/2
Error unpacking rpm package filesystem-3.8-4.el8.x86_64
Verifying : filesystem-3.8-4.el8.x86_64 1/2
Verifying : filesystem-3.8-3.el8.x86_64 2/2
Failed:
filesystem-3.8-3.el8.x86_64 filesystem-3.8-4.el8.x86_64
Error: Transaction failed
|
I think that it is normal, since this pakcage tries to change permissions on some
directories that are read only inside a container.
To solve:
echo "%_netsharedpath /sys:/proc" >> /etc/rpm/macros.dist; dnf -y update
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1589968