Skip to content

Commit

Permalink
Updating submodule packages to drop-ins quadlet files
Browse files Browse the repository at this point in the history
resolves #674
During latest changes all subpackages use drop-in qudlet files
Under QM etc/containers/systemd/qm.container.d/ dir
Qm nested container quadlets moved to subsystems/ dir
Update to quadlet files

Signed-off-by: Yariv Rachmani <[email protected]>
  • Loading branch information
Yarboa committed Jan 15, 2025
1 parent ff43278 commit 0238dbd
Show file tree
Hide file tree
Showing 25 changed files with 88 additions and 77 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ LIBDIR ?= $(PREFIX)/lib
SYSCONFDIR?=/etc
QMDIR=/usr/lib/qm
SPECFILE=rpm/qm.spec
SUBSYS := subsystems/kvm subsystems/windowmanager subsystems/sound subsystems/video subsystems/radio subsystems/dvb subsystems/tty7 subsystems/input subsystems/ttyUSB0 subsystems/text2speech subsystems/img_tempdir subsystems/ros2
# SUBSYS := subsystems/kvm subsystems/windowmanager subsystems/sound subsystems/video subsystems/radio subsystems/dvb subsystems/tty7 subsystems/input subsystems/ttyUSB0 subsystems/text2speech subsystems/img_tempdir subsystems/ros2
SUBSYS :=
export RPM_TOPDIR ?= $(PWD)/rpmbuild
export VERSION ?= $(shell cat VERSION)
export ROOTDIR ?= $(PWD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,5 @@
# input device is connected to (useful for distinguishing between
# identical devices connected to different ports).
#
[containers]
devices = [
"/dev/input:/dev/input"
]
[Container]
AddDevice=-/dev/input
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,5 @@
# +-------------------------------------------------------------+
#
# qm_dropin_mount_bind_snd.conf
[containers]

# Devices to map for the container (sound device)
devices = [
"/dev/snd:/dev/snd"
]
[Container]
AddDevice=-/dev/snd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@
# handling the graphical display, input, and windowing environment.
# When you start a graphical session (such as GNOME, KDE, etc.),
# it usually runs on this virtual console.
[containers]
devices = [
"/dev/tty7:/dev/tty7"
]
[Container]
AddDevice=-/dev/tty7
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,5 @@
# +------------------------------------------------------------+
#
#
[containers]
devices = [
"/dev/ttyUSB0:/dev/ttyUSB0"
]
[Container]
AddDevice=-/dev/ttyUSB0
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,5 @@
# └─────────────────────────────┘
#
#
[containers]
devices = [
"/dev/video0:/dev/video0"
]
[Container]
AddDevice=-/dev/video0
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Drop-in configuration for Podman to mount bind tty from host to container
#
[Container]
Mount=type=bind,source=/dev/tty0,target=/dev/tty0
Mount=type=bind,source=/dev/tty1,target=/dev/tty1
Mount=type=bind,source=/dev/tty2,target=/dev/tty2
Mount=type=bind,source=/dev/tty3,target=/dev/tty3
Mount=type=bind,source=/dev/tty4,target=/dev/tty4
Mount=type=bind,source=/dev/tty5,target=/dev/tty5
Mount=type=bind,source=/dev/tty6,target=/dev/tty6
Mount=type=bind,source=/dev/tty7,target=/dev/tty7
Mount=type=bind,source=/dev/tty0,target=/dev/tty0
11 changes: 7 additions & 4 deletions rpm/dvb/dvb.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ This subpackage installs a drop-in configuration for QM containers to mount bind
%autosetup -Sgit -n qm-%{version}

%install
install -d %{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d
install -m 644 etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_dvb.conf \
%{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d/
# Create the directory for drop-in configurations
install -d %{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d

# Install the dvb drop-in configuration file
install -m 644 %{_builddir}/qm-%{version}/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_dvb.conf \
%{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_dvb.conf

%files
%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_dvb.conf
%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_dvb.conf

%changelog
* Fri Jul 21 2023 RH Container Bot <[email protected]>
Expand Down
11 changes: 7 additions & 4 deletions rpm/input/input.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ This sub-package installs drop-in configurations for QM containers to mount bind
%autosetup -Sgit -n qm-%{version}

%install
install -d %{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d
install -m 644 etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_input.conf \
%{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d/
# Create the directory for drop-in configurations
install -d %{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d

# Install the KVM drop-in configuration file
install -m 644 %{_builddir}/qm-%{version}/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_input.conf \
%{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_input.conf

%files
%license LICENSE
%doc README.md
%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_input.conf
%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_input.conf

%changelog
* Fri Jul 21 2023 RH Container Bot <[email protected]>
Expand Down
10 changes: 6 additions & 4 deletions rpm/radio/radio.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ This subpackage installs a drop-in configuration for QM containers to mount bind
%autosetup -Sgit -n qm-%{version}

%install
install -d %{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d
install -m 644 etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_radio.conf \
%{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d/
# Create the directory for drop-in configurations
install -d %{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d
# Install the KVM drop-in configuration file
install -m 644 %{_builddir}/qm-%{version}/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_radio.conf \
%{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_radio.conf

%files
%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_radio.conf
%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_radio.conf

%changelog
* Fri Jul 21 2023 RH Container Bot <[email protected]>
Expand Down
12 changes: 6 additions & 6 deletions rpm/sound/sound.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ the container and nested containers.

%install
# Install drop-in configuration for /dev/snd
install -d %{buildroot}%{_sysconfdir}/containers/containers.conf.d
install -d %{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d
# Create the directory for drop-in configurations
install -d %{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d
install -d %{buildroot}%{rootfs_qm}%{_sysconfdir}/containers/systemd

install -m 644 etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_snd.conf %{buildroot}%{_sysconfdir}/containers/containers.conf.d/qm_dropin_mount_bind_snd.conf
install -m 644 etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_snd.conf %{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_snd.conf
install -m 644 subsystems/sound/etc/containers/systemd/audio.container %{buildroot}%{rootfs_qm}%{_sysconfdir}/containers/systemd/audio.container
# Install the sound drop-in configuration file
install -m 644 %{_builddir}/qm-%{version}/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_snd.conf \
%{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_snd.conf

%files
%license LICENSE
%doc CODE-OF-CONDUCT.md README.md SECURITY.md
%{_sysconfdir}/containers/containers.conf.d/qm_dropin_mount_bind_snd.conf
%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_snd.conf
%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_snd.conf
%{rootfs_qm}%{_sysconfdir}/containers/systemd/audio.container

%changelog
Expand Down
17 changes: 6 additions & 11 deletions rpm/tty7/tty7.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,15 @@ This configuration is useful when graphical applications require access to the h
# No build required for configuration files

%install
# Create the required directory structure
install -d %{buildroot}%{_sysconfdir}/containers/containers.conf.d
install -d %{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d
# Create the directory for drop-in configurations
install -d %{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d

# Install the configuration files
install -m 644 etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_tty7.conf \
%{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_tty7.conf
install -m 644 etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_tty7.conf \
%{buildroot}%{_sysconfdir}/containers/containers.conf.d/qm_dropin_mount_bind_tty7.conf
# Install the KVM drop-in configuration file
install -m 644 %{_builddir}/qm-%{version}/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_tty7.conf \
%{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_tty7.conf

%files
%{_sysconfdir}/containers/containers.conf.d/qm_dropin_mount_bind_tty7.conf
%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_tty7.conf

%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_tty7.conf
%changelog
* Fri Jul 21 2023 RH Container Bot <[email protected]>
- Added drop-in configuration to mount bind /dev/tty7.
10 changes: 6 additions & 4 deletions rpm/ttyUSB0/ttyUSB0.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ This sub-package installs drop-in configurations for QM containers to mount bind
%autosetup -Sgit -n qm-%{version}

%install
install -d %{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d
install -m 644 etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_ttyUSB0.conf \
%{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d/
# Create the directory for drop-in configurations
install -d %{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d

# Install the KVM drop-in configuration file
install -m 644 %{_builddir}/qm-%{version}/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_ttyUSB0.conf %{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_ttyUSB0.conf

%files
%license LICENSE
%doc README.md
%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_ttyUSB0.conf
%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_ttyUSB0.conf

%changelog
* Fri Jul 21 2023 RH Container Bot <[email protected]>
Expand Down
16 changes: 9 additions & 7 deletions rpm/video/video.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,19 @@ This subpackage installs a drop-in configuration for QM containers to mount bind
# No build required for configuration files

%install
install -d %{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d
install -d %{buildroot}%{_sysconfdir}/containers/systemd/
install -m 644 etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_video.conf \
%{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_video.conf
# Create the directory for drop-in configurations
install -d %{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d
install -d %{buildroot}%{rootfs_qm}%{_sysconfdir}/containers/systemd

install -m 644 etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_video.conf \
%{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_video.conf
install -m 644 subsystems/video/etc/containers/systemd/rear-camera.container \
%{buildroot}%{_sysconfdir}/containers/systemd/rear-camera.container

%files
%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_video.conf
%{_sysconfdir}/containers/systemd/rear-camera.container

%files
%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_video.conf
%{rootfs_qm}%{_sysconfdir}/containers/systemd/rear-camera.container
%changelog
* Fri Jul 21 2023 RH Container Bot <[email protected]>
- Added video mount bind drop-in configuration.
Expand Down
14 changes: 9 additions & 5 deletions rpm/windowmanager/windowmanager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ This sub-package installs an experimental window manager for the QM environment.
%autosetup -Sgit -n qm-%{version}

%install
# Create the directory for drop-in configurations
install -d %{buildroot}/%{_sysconfdir}/pam.d/
install -d %{buildroot}%{_sysconfdir}/containers/containers.conf.d
install -m 644 ./subsystems/windowmanager/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf \
%{buildroot}/%{_sysconfdir}/containers/containers.conf.d/
install -m 644 ./subsystems/windowmanager/etc/pam.d/wayland %{buildroot}/%{_sysconfdir}/pam.d/
install -d %{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d

# Install the Window manager drop-in configuration file
install -m 644 %{_builddir}/qm-%{version}/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_window_manager.conf \
%{buildroot}%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_window_manager.conf
install -m 644 ./qm-windowmanager/etc/pam.d/wayland %{buildroot}/%{_sysconfdir}/pam.d/

%files
%license LICENSE
%doc README.md
%{_sysconfdir}/pam.d/wayland
%{_sysconfdir}/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf
%{_sysconfdir}/containers/systemd/qm.container.d/qm_dropin_mount_bind_window_manager.conf


%changelog
* Fri Jul 21 2023 RH Container Bot <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion subsystems/dvb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dist: ## - Creates the QM dvb package
../qm/SECURITY.md \
../qm/LICENSE \
../qm/ \
../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_dvb.conf
../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_dvb.conf
cd $(ROOTDIR) && mv /tmp/qm-dvb-${VERSION}.tar.gz ./rpm

.PHONY: rpm
Expand Down
2 changes: 1 addition & 1 deletion subsystems/input/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dist: ## - Creates the QM input package
../qm/SECURITY.md \
../qm/LICENSE \
../qm/ \
../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_input.conf
../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_input.conf
cd $(ROOTDIR) && mv /tmp/qm-input-${VERSION}.tar.gz ./rpm

.PHONY: rpm
Expand Down
2 changes: 1 addition & 1 deletion subsystems/radio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dist: ## - Creates the QM radio package
../qm/SECURITY.md \
../qm/LICENSE \
../qm/ \
../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_radio.conf
../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_radio.conf
cd $(ROOTDIR) && mv /tmp/qm-radio-${VERSION}.tar.gz ./rpm


Expand Down
2 changes: 1 addition & 1 deletion subsystems/sound/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dist: ## - Creates the QM kvm package
../qm/SECURITY.md \
../qm/LICENSE \
../qm/ \
../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_snd.conf \
../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_snd.conf \
../qm/subsystems/sound/etc/containers/systemd/audio.container
cd $(ROOTDIR) && mv /tmp/qm-sound-${VERSION}.tar.gz ./rpm

Expand Down
2 changes: 1 addition & 1 deletion subsystems/tty7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dist: ## - Creates the QM tty7 package
../qm/SECURITY.md \
../qm/LICENSE \
../qm/ \
../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_tty7.conf
../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_tty7.conf
cd $(ROOTDIR) && mv /tmp/qm-tty7-${VERSION}.tar.gz ./rpm

.PHONY: rpm
Expand Down
2 changes: 1 addition & 1 deletion subsystems/ttyUSB0/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dist: ## - Creates the QM ttyUSB0 package
../qm/SECURITY.md \
../qm/LICENSE \
../qm/ \
../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_ttyUSB0.conf
../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_ttyUSB0.conf
cd $(ROOTDIR) && mv /tmp/qm-ttyUSB0-${VERSION}.tar.gz ./rpm

.PHONY: rpm
Expand Down
2 changes: 1 addition & 1 deletion subsystems/video/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dist: ## - Creates the QM video package
../qm/SECURITY.md \
../qm/LICENSE \
../qm/ \
../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_video.conf \
../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_video.conf \
../qm/subsystems/video/etc/containers/systemd/rear-camera.container
cd $(ROOTDIR) && mv /tmp/qm-video-${VERSION}.tar.gz ./rpm

Expand Down
3 changes: 1 addition & 2 deletions subsystems/windowmanager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ dist: ## - Creates the QM windowmanager package
../qm/SECURITY.md \
../qm/LICENSE \
../qm/ \
../subsystems/windowmanager/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf

../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_window_manager.conf
cd $(ROOTDIR) && mv /tmp/qm-windowmanager-${VERSION}.tar.gz ./rpm

.PHONY: rpm
Expand Down

0 comments on commit 0238dbd

Please sign in to comment.