Closed dougsland closed 4 months ago
@rhatdan @Yarboa PTAL
Build a rpm with the purpose patch for tests:
# ./runvm --nographics ./cs9-qemu-qm-minimal-regular.x86_64.qcow2
BdsDxe: loading Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x3,0x0)
BdsDxe: starting Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x3,0x0)
System BootOrder not found. Initializing defaults.
Creating boot entry "Boot0007" with label "CentOS Linux" for file "\EFI\centos\shimx64.efi"
Booting `Automotive Stream Distribution (5.14.0-438.391.el9iv.x86_64) 9'
[ 1.750824] Error: Driver 'pcspkr' is already registered, aborting...
[ 3.515865] overlayfs: idmapped layers are currently not supported
Automotive Stream Distribution 9
Kernel 5.14.0-438.391.el9iv.x86_64 on an x86_64
localhost login: root
Password:
[root@localhost ~]# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
622baf5c257a /sbin/init 6 seconds ago Up 6 seconds qm
[root@localhost ~]# ls -la /usr/lib/qm/rootfs/
total 72
dr-xr-xr-x. 18 root root 4096 Apr 28 13:58 .
drwxr-xr-x. 3 root root 4096 Apr 28 13:59 ..
dr-xr-xr-x. 2 root root 4096 Aug 9 2021 afs
lrwxrwxrwx. 1 root root 7 Aug 9 2021 bin -> usr/bin
dr-xr-xr-x. 2 root root 4096 Aug 9 2021 boot
drwxr-xr-x. 2 root root 4096 Apr 28 13:58 dev
drwxr-xr-x. 46 root root 4096 Apr 28 13:58 etc
drwxr-xr-x. 2 root root 4096 Aug 9 2021 home
lrwxrwxrwx. 1 root root 7 Aug 9 2021 lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Aug 9 2021 lib64 -> usr/lib64
drwxr-xr-x. 2 root root 4096 Aug 9 2021 media
drwxr-xr-x. 2 root root 4096 Aug 9 2021 mnt
drwxr-xr-x. 2 root root 4096 Aug 9 2021 opt
drwxr-xr-x. 2 root root 4096 Apr 28 13:58 proc
dr-xr-x---. 3 root root 4096 Apr 28 13:58 root
drwxr-xr-x. 12 root root 4096 Apr 28 13:58 run
lrwxrwxrwx. 1 root root 8 Aug 9 2021 sbin -> usr/sbin
drwxr-xr-x. 2 root root 4096 Aug 9 2021 srv
drwxr-xr-x. 2 root root 4096 Apr 28 13:58 sys
drwxrwxrwt. 2 root root 4096 Aug 9 2021 tmp
drwxr-xr-x. 12 root root 4096 Apr 28 13:58 usr
drwxr-xr-x. 18 root root 4096 Apr 28 13:58 var
[root@localhost ~]# dnf remove -y qm
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Removing:
qm noarch X.1-1 @System 83 k
Transaction Summary
================================================================================
Remove 1 Package
Freed space: 83 k
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: qm-X.1-1.noarch 1/1
Erasing : qm-X.1-1.noarch 1/1
Running scriptlet: qm-X.1-1.noarch 1/1
Verifying : qm-X.1-1.noarch 1/1
Removed:
qm-X.1-1.noarch
Complete!
[root@localhost ~]# ls -la /usr/lib/qm/rootfs/
ls: cannot access '/usr/lib/qm/rootfs/': No such file or directory
[root@localhost ~]#
Why not add qm and rootfs directories spec file?
Why not add qm and rootfs directories spec file?
Agreed. I did. I just added a patch to setup to remove it as it was setup which added it in first place. Also, users in the future might want to decide to use a different path so the rpm needs to be adaptable. I will send the PR in few minutes.
The
setup
set this dir and it's kept in the OS after package removed.also noticed this selinux complain after the package was removed looking the logs:
should we remove during dnf remove qm -y like rm -rf /usr/lib/qm?