containers / qm

QM is a containerized environment for running Functional Safety qm (Quality Management) software
https://github.com/containers/qm
GNU General Public License v2.0
22 stars 26 forks source link

broken `qm.spec` file #121

Closed sandrobonazzola closed 1 year ago

sandrobonazzola commented 1 year ago

trying to rebuild qm RPM locally on CentOS Stream 9 leads to:

# rpmbuild -ba rpm/qm.spec
RPM build errors:
    line 40: Possible unexpanded macro in: Release: %autorelease
    line 40: Possible unexpanded macro in: Release: %autorelease
    %changelog entries must start with *

checking the spec file with rpmlint:

# rpmlint rpm/qm.spec 
rpm/qm.spec:8: E: hardcoded-library-path in %{_prefix}/lib/qm
rpm/qm.spec:74: E: hardcoded-library-path in /usr/lib/qm/rootfs
rpm/qm.spec:135: W: macro-in-%changelog %autochangelog
rpm/qm.spec: E: specfile-error warning: line 40: Possible unexpanded macro in: Release: %autorelease
rpm/qm.spec: E: specfile-error warning: line 40: Possible unexpanded macro in: Release: %autorelease
rpm/qm.spec: E: specfile-error error: %changelog entries must start with *
0 packages and 1 specfiles checked; 5 errors, 1 warnings.

The spec file shouldn't contain errors.

sandrobonazzola commented 1 year ago

autorelease macro is provided by rpmautospec-rpm-macros added it to build requirements.

macro-in-%changelog %autochangelog seems to be a bug in rpmlint not knowing about https://fedoraproject.org/wiki/Changes/rpmautospec (well, to be honest I didn't know about it before today as well...)

The remaining 2:

rpm/qm.spec:8: E: hardcoded-library-path in %{_prefix}/lib/qm
rpm/qm.spec:74: E: hardcoded-library-path in /usr/lib/qm/rootfs

need to be addressed IMHO.

dougsland commented 1 year ago

Sure, let's make it fly.

dougsland commented 1 year ago

hey @sandrobonazzola, just to avoid dup work, are you going to fix these issues too?

sandrobonazzola commented 1 year ago

hey @sandrobonazzola, just to avoid dup work, are you going to fix these issues too?

no, I'm currently focusing on running qemu-kvm within qm container.

dougsland commented 1 year ago

hey @sandrobonazzola, just to avoid dup work, are you going to fix these issues too?

no, I'm currently focusing on running qemu-kvm within qm container.

Sure, let us know if you need any help.

rhatdan commented 1 year ago

One think you could look at is how we could run a VM in the QM area and have it access the Wayland on the machine. One issue I have is I am not sure how wayland will be configured in RHIVOS, will it be running as a non-root user? Will it be running in QM or in ASIL?

Here is the quadlet, I am using to run android on my host system.

$ cat ~/.config/containers/systemd/android.container
[Service]
Environment=WAYLAND_DISPLAY=wayland-0

[Container]
AddDevice=/dev/dri/renderD128
AddDevice=/dev/kvm
ContainerName=android
NoNewPrivileges=true
DropCapability=all
Environment=PULSE_SERVER=%t/pulse/native
Environment=WAYLAND_DISPLAY=${WAYLAND_DISPLAY}
Environment=XDG_RUNTIME_DIR=%t
Image=quay.io/slopezpa/qemu-aaos
PodmanArgs=--shm-size=5g
SecurityLabelDisable=true
Volume=%t:%t