From 07132460c8c4fc6a034d9075dc9e8e4d5830fcad Mon Sep 17 00:00:00 2001 From: Super User Date: Thu, 9 Jan 2025 14:48:42 +0000 Subject: [PATCH 1/6] Makefile-split split kvm makefile Signed-off-by: Yariv Rachmani --- Makefile | 33 +++++++++------------------------ subsystems/kvm/Makefile | 26 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 24 deletions(-) create mode 100644 subsystems/kvm/Makefile diff --git a/Makefile b/Makefile index 8a77000d..32b66f52 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,6 @@ LIBDIR ?= $(PREFIX)/lib SYSCONFDIR?=/etc QMDIR=/usr/lib/qm SPECFILE=rpm/qm.spec -SPECFILE_SUBPACKAGE_KVM=rpm/kvm/qm-kvm.spec SPECFILE_SUBPACKAGE_SOUND=rpm/sound/sound.spec SPECFILE_SUBPACKAGE_VIDEO=rpm/video/video.spec SPECFILE_SUBPACKAGE_RADIO=rpm/radio/radio.spec @@ -19,8 +18,10 @@ SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER=rpm/windowmanager/windowmanager.spec SPECFILE_SUBPACKAGE_TTYUSB0=rpm/ttyUSB0/ttyUSB0.spec SPECFILE_SUBPACKAGE_IMG_TEMPDIR=rpm/img_tempdir/img_tempdir.spec SPECFILE_SUBPACKAGE_ROS2_ROLLING=rpm/ros2/rolling/ros2_rolling.spec -RPM_TOPDIR ?= $(PWD)/rpmbuild -VERSION ?= $(shell cat VERSION) +SUBSYS := subsystems/kvm +export RPM_TOPDIR ?= $(PWD)/rpmbuild +export VERSION?= $(shell cat VERSION) +export ROOTDIR ?= $(PWD) # Default help target .PHONY: help @@ -74,17 +75,6 @@ dist: ## - Creates the QM distribution package --transform s/qm/qm-${VERSION}/ \ -f /tmp/v${VERSION}.tar.gz ../qm mv /tmp/v${VERSION}.tar.gz ./rpm - tar cvz \ - --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ - --dereference \ - --transform s/qm/qm-kvm-${VERSION}/ \ - -f /tmp/qm-kvm-${VERSION}.tar.gz \ - ../qm/README.md \ - ../qm/SECURITY.md \ - ../qm/LICENSE \ - ../qm/ \ - ../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_kvm.conf - mv /tmp/qm-kvm-${VERSION}.tar.gz ./rpm .PHONY: rpm rpm: clean dist ## - Creates a local RPM package, useful for development @@ -95,16 +85,11 @@ rpm: clean dist ## - Creates a local RPM package, useful for develop --define="_topdir ${RPM_TOPDIR}" \ --define="version ${VERSION}" \ ${SPECFILE} - -.PHONY: kvm_subpackage -kvm_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_KVM} + for dir in $(SUBSYS); do \ + if [ -f $$dir/Makefile ]; then \ + $(MAKE) -C $$dir -f Makefile rpm; \ + fi; \ + done .PHONY: text2speech_subpackage text2speech_subpackage: clean dist ## - Creates a local RPM package, useful for development diff --git a/subsystems/kvm/Makefile b/subsystems/kvm/Makefile new file mode 100644 index 00000000..5faa2191 --- /dev/null +++ b/subsystems/kvm/Makefile @@ -0,0 +1,26 @@ +SPECFILE_SUBPACKAGE_KVM=rpm/kvm/qm-kvm.spec + +.PHONY: dist +dist: ## - Creates the QM kvm package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-kvm-${VERSION}/ \ + -f /tmp/qm-kvm-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../qm/etc/containers/systemd/qm.container.d/qm_dropin_mount_bind_kvm.conf + cd $(ROOTDIR) && mv /tmp/qm-kvm-${VERSION}.tar.gz ./rpm + +.PHONY: rpm +rpm: dist ## - Creates a local RPM package, useful for development + cd $(ROOTDIR) && mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + cd $(ROOTDIR) && tools/version-update -v ${VERSION} + cd $(ROOTDIR) && cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + cd $(ROOTDIR) && rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_KVM} + From d6b4c7aceee7f90d3d7cf37718e9f1f8d937895b Mon Sep 17 00:00:00 2001 From: Yariv Rachmani Date: Thu, 9 Jan 2025 19:22:52 +0200 Subject: [PATCH 2/6] Split windowmanager makefile renamed qm-windowmanager -> windowmanager move windowmanager to subsystems add windowmanager Makefile Signed-off-by: Yariv Rachmani --- Makefile | 13 +-------- rpm/windowmanager/windowmanager.spec | 4 +-- subsystems/kvm/Makefile | 6 ++--- subsystems/windowmanager/Makefile | 27 +++++++++++++++++++ .../containers/systemd/gnome_mutter.container | 0 .../systemd/session-activate.container | 0 .../systemd/wayland-extra-devices.conf | 0 .../systemd/weston_terminal.container | 0 .../windowmanager}/etc/pam.d/wayland | 0 .../qm_dropin_mount_bind_window_manager.conf | 0 .../etc/systemd/system/qm-dbus.socket | 0 .../systemd/system/wayland-session.service | 0 .../lib/tmpfiles.d/wayland-xdg-directory.conf | 0 .../qm/manage-pam-selinux-systemd-user-config | 0 .../usr/share/qm/mutter/ContainerFile | 0 .../share/qm/session-activate/ContainerFile | 0 .../qm_windowmanager_activate_session | 0 .../usr/share/qm/weston/ContainerFile | 0 18 files changed, 33 insertions(+), 17 deletions(-) create mode 100644 subsystems/windowmanager/Makefile rename {qm-windowmanager => subsystems/windowmanager}/etc/containers/systemd/gnome_mutter.container (100%) rename {qm-windowmanager => subsystems/windowmanager}/etc/containers/systemd/session-activate.container (100%) rename {qm-windowmanager => subsystems/windowmanager}/etc/containers/systemd/wayland-extra-devices.conf (100%) rename {qm-windowmanager => subsystems/windowmanager}/etc/containers/systemd/weston_terminal.container (100%) rename {qm-windowmanager => subsystems/windowmanager}/etc/pam.d/wayland (100%) rename {qm-windowmanager => subsystems/windowmanager}/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf (100%) rename {qm-windowmanager => subsystems/windowmanager}/etc/systemd/system/qm-dbus.socket (100%) rename {qm-windowmanager => subsystems/windowmanager}/etc/systemd/system/wayland-session.service (100%) rename {qm-windowmanager => subsystems/windowmanager}/usr/lib/tmpfiles.d/wayland-xdg-directory.conf (100%) rename {qm-windowmanager => subsystems/windowmanager}/usr/share/qm/manage-pam-selinux-systemd-user-config (100%) rename {qm-windowmanager => subsystems/windowmanager}/usr/share/qm/mutter/ContainerFile (100%) rename {qm-windowmanager => subsystems/windowmanager}/usr/share/qm/session-activate/ContainerFile (100%) rename {qm-windowmanager => subsystems/windowmanager}/usr/share/qm/session-activate/qm_windowmanager_activate_session (100%) rename {qm-windowmanager => subsystems/windowmanager}/usr/share/qm/weston/ContainerFile (100%) diff --git a/Makefile b/Makefile index 32b66f52..80a8f932 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,10 @@ SPECFILE_SUBPACKAGE_DVB=rpm/dvb/dvb.spec SPECFILE_SUBPACKAGE_TTY7=rpm/tty7/tty7.spec SPECFILE_SUBPACKAGE_TEXT2SPEECH=rpm/text2speech/text2speech.spec SPECFILE_SUBPACKAGE_INPUT=rpm/input/input.spec -SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER=rpm/windowmanager/windowmanager.spec SPECFILE_SUBPACKAGE_TTYUSB0=rpm/ttyUSB0/ttyUSB0.spec SPECFILE_SUBPACKAGE_IMG_TEMPDIR=rpm/img_tempdir/img_tempdir.spec SPECFILE_SUBPACKAGE_ROS2_ROLLING=rpm/ros2/rolling/ros2_rolling.spec -SUBSYS := subsystems/kvm +SUBSYS := subsystems/kvm subsystems/windowmanager export RPM_TOPDIR ?= $(PWD)/rpmbuild export VERSION?= $(shell cat VERSION) export ROOTDIR ?= $(PWD) @@ -191,16 +190,6 @@ img_tempdir_subpackage: clean dist ## - Creates a local RPM package, u --define="version ${VERSION}" \ ${SPECFILE_SUBPACKAGE_IMG_TEMPDIR} -.PHONY: windowmanager_subpackage -windowmanager_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER} - install-policy: all ## - Install selinux policies only semodule -i ${TARGETS}.pp.bz2 sepolicy manpage --path . --domain ${TARGETS}_t diff --git a/rpm/windowmanager/windowmanager.spec b/rpm/windowmanager/windowmanager.spec index cf33a0bb..e5822432 100644 --- a/rpm/windowmanager/windowmanager.spec +++ b/rpm/windowmanager/windowmanager.spec @@ -18,9 +18,9 @@ This sub-package installs an experimental window manager for the QM environment. %install install -d %{buildroot}/%{_sysconfdir}/pam.d/ install -d %{buildroot}%{_sysconfdir}/containers/containers.conf.d -install -m 644 ./qm-windowmanager/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf \ +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 ./qm-windowmanager/etc/pam.d/wayland %{buildroot}/%{_sysconfdir}/pam.d/ +install -m 644 ./subsystems/windowmanager/etc/pam.d/wayland %{buildroot}/%{_sysconfdir}/pam.d/ %files %license LICENSE diff --git a/subsystems/kvm/Makefile b/subsystems/kvm/Makefile index 5faa2191..7a6161f4 100644 --- a/subsystems/kvm/Makefile +++ b/subsystems/kvm/Makefile @@ -15,12 +15,12 @@ dist: ## - Creates the QM kvm package cd $(ROOTDIR) && mv /tmp/qm-kvm-${VERSION}.tar.gz ./rpm .PHONY: rpm -rpm: dist ## - Creates a local RPM package, useful for development +rpm: dist ## - Creates a local RPM windowmanager package, useful for development cd $(ROOTDIR) && mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} cd $(ROOTDIR) && tools/version-update -v ${VERSION} cd $(ROOTDIR) && cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES cd $(ROOTDIR) && rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ + --define="_topdir ${RPM_TOPDIR}" \ --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_KVM} + ${SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER} diff --git a/subsystems/windowmanager/Makefile b/subsystems/windowmanager/Makefile new file mode 100644 index 00000000..6e00c3ba --- /dev/null +++ b/subsystems/windowmanager/Makefile @@ -0,0 +1,27 @@ +SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER=rpm/windowmanager/windowmanager.spec + +.PHONY: dist +dist: ## - Creates the QM windowmanager package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/windowmanager-${VERSION}/ \ + -f /tmp/qm-windowmanager-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../subsystems/windowmanager/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf + + cd $(ROOTDIR) && mv /tmp/qm-windowmanager-${VERSION}.tar.gz ./rpm + +.PHONY: rpm +rpm: dist ## - Creates a local windowmanager package, useful for development + mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + tools/version-update -v ${VERSION} + cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER} + diff --git a/qm-windowmanager/etc/containers/systemd/gnome_mutter.container b/subsystems/windowmanager/etc/containers/systemd/gnome_mutter.container similarity index 100% rename from qm-windowmanager/etc/containers/systemd/gnome_mutter.container rename to subsystems/windowmanager/etc/containers/systemd/gnome_mutter.container diff --git a/qm-windowmanager/etc/containers/systemd/session-activate.container b/subsystems/windowmanager/etc/containers/systemd/session-activate.container similarity index 100% rename from qm-windowmanager/etc/containers/systemd/session-activate.container rename to subsystems/windowmanager/etc/containers/systemd/session-activate.container diff --git a/qm-windowmanager/etc/containers/systemd/wayland-extra-devices.conf b/subsystems/windowmanager/etc/containers/systemd/wayland-extra-devices.conf similarity index 100% rename from qm-windowmanager/etc/containers/systemd/wayland-extra-devices.conf rename to subsystems/windowmanager/etc/containers/systemd/wayland-extra-devices.conf diff --git a/qm-windowmanager/etc/containers/systemd/weston_terminal.container b/subsystems/windowmanager/etc/containers/systemd/weston_terminal.container similarity index 100% rename from qm-windowmanager/etc/containers/systemd/weston_terminal.container rename to subsystems/windowmanager/etc/containers/systemd/weston_terminal.container diff --git a/qm-windowmanager/etc/pam.d/wayland b/subsystems/windowmanager/etc/pam.d/wayland similarity index 100% rename from qm-windowmanager/etc/pam.d/wayland rename to subsystems/windowmanager/etc/pam.d/wayland diff --git a/qm-windowmanager/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf b/subsystems/windowmanager/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf similarity index 100% rename from qm-windowmanager/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf rename to subsystems/windowmanager/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_window_manager.conf diff --git a/qm-windowmanager/etc/systemd/system/qm-dbus.socket b/subsystems/windowmanager/etc/systemd/system/qm-dbus.socket similarity index 100% rename from qm-windowmanager/etc/systemd/system/qm-dbus.socket rename to subsystems/windowmanager/etc/systemd/system/qm-dbus.socket diff --git a/qm-windowmanager/etc/systemd/system/wayland-session.service b/subsystems/windowmanager/etc/systemd/system/wayland-session.service similarity index 100% rename from qm-windowmanager/etc/systemd/system/wayland-session.service rename to subsystems/windowmanager/etc/systemd/system/wayland-session.service diff --git a/qm-windowmanager/usr/lib/tmpfiles.d/wayland-xdg-directory.conf b/subsystems/windowmanager/usr/lib/tmpfiles.d/wayland-xdg-directory.conf similarity index 100% rename from qm-windowmanager/usr/lib/tmpfiles.d/wayland-xdg-directory.conf rename to subsystems/windowmanager/usr/lib/tmpfiles.d/wayland-xdg-directory.conf diff --git a/qm-windowmanager/usr/share/qm/manage-pam-selinux-systemd-user-config b/subsystems/windowmanager/usr/share/qm/manage-pam-selinux-systemd-user-config similarity index 100% rename from qm-windowmanager/usr/share/qm/manage-pam-selinux-systemd-user-config rename to subsystems/windowmanager/usr/share/qm/manage-pam-selinux-systemd-user-config diff --git a/qm-windowmanager/usr/share/qm/mutter/ContainerFile b/subsystems/windowmanager/usr/share/qm/mutter/ContainerFile similarity index 100% rename from qm-windowmanager/usr/share/qm/mutter/ContainerFile rename to subsystems/windowmanager/usr/share/qm/mutter/ContainerFile diff --git a/qm-windowmanager/usr/share/qm/session-activate/ContainerFile b/subsystems/windowmanager/usr/share/qm/session-activate/ContainerFile similarity index 100% rename from qm-windowmanager/usr/share/qm/session-activate/ContainerFile rename to subsystems/windowmanager/usr/share/qm/session-activate/ContainerFile diff --git a/qm-windowmanager/usr/share/qm/session-activate/qm_windowmanager_activate_session b/subsystems/windowmanager/usr/share/qm/session-activate/qm_windowmanager_activate_session similarity index 100% rename from qm-windowmanager/usr/share/qm/session-activate/qm_windowmanager_activate_session rename to subsystems/windowmanager/usr/share/qm/session-activate/qm_windowmanager_activate_session diff --git a/qm-windowmanager/usr/share/qm/weston/ContainerFile b/subsystems/windowmanager/usr/share/qm/weston/ContainerFile similarity index 100% rename from qm-windowmanager/usr/share/qm/weston/ContainerFile rename to subsystems/windowmanager/usr/share/qm/weston/ContainerFile From 8cfb3b65499a2d7cd22c8de1f77186986d86aa74 Mon Sep 17 00:00:00 2001 From: Yariv Rachmani Date: Sun, 12 Jan 2025 10:04:21 +0200 Subject: [PATCH 3/6] split sound make Moving tests container, makefile to specific subsys directory Signed-off-by: Yariv Rachmani --- Makefile | 13 +-------- rpm/sound/sound.spec | 2 +- subsystems/sound/Makefile | 27 +++++++++++++++++++ .../etc/containers/systemd}/audio.container | 0 .../usr/share/qm}/ContainerFile | 0 5 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 subsystems/sound/Makefile rename subsystems/{audio => sound/etc/containers/systemd}/audio.container (100%) rename subsystems/{audio => sound/usr/share/qm}/ContainerFile (100%) diff --git a/Makefile b/Makefile index 80a8f932..da9bd2d7 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,6 @@ LIBDIR ?= $(PREFIX)/lib SYSCONFDIR?=/etc QMDIR=/usr/lib/qm SPECFILE=rpm/qm.spec -SPECFILE_SUBPACKAGE_SOUND=rpm/sound/sound.spec SPECFILE_SUBPACKAGE_VIDEO=rpm/video/video.spec SPECFILE_SUBPACKAGE_RADIO=rpm/radio/radio.spec SPECFILE_SUBPACKAGE_DVB=rpm/dvb/dvb.spec @@ -17,7 +16,7 @@ SPECFILE_SUBPACKAGE_INPUT=rpm/input/input.spec SPECFILE_SUBPACKAGE_TTYUSB0=rpm/ttyUSB0/ttyUSB0.spec SPECFILE_SUBPACKAGE_IMG_TEMPDIR=rpm/img_tempdir/img_tempdir.spec SPECFILE_SUBPACKAGE_ROS2_ROLLING=rpm/ros2/rolling/ros2_rolling.spec -SUBSYS := subsystems/kvm subsystems/windowmanager +SUBSYS := subsystems/kvm subsystems/windowmanager subsystems/sound export RPM_TOPDIR ?= $(PWD)/rpmbuild export VERSION?= $(shell cat VERSION) export ROOTDIR ?= $(PWD) @@ -110,16 +109,6 @@ ros2_rolling_subpackage: clean dist ## - Creates a local RPM package, u --define="version ${VERSION}" \ ${SPECFILE_SUBPACKAGE_ROS2_ROLLING} -.PHONY: sound_subpackage -sound_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_SOUND} - .PHONY: video_subpackage video_subpackage: clean dist ## - Creates a local RPM package, useful for development mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} diff --git a/rpm/sound/sound.spec b/rpm/sound/sound.spec index be87855f..e7f24a02 100644 --- a/rpm/sound/sound.spec +++ b/rpm/sound/sound.spec @@ -31,9 +31,9 @@ install -d %{buildroot}%{_sysconfdir}/containers/containers.conf.d install -d %{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d install -d %{buildroot}%{rootfs_qm}%{_sysconfdir}/containers/systemd -install -m 644 subsystems/audio/audio.container %{buildroot}%{rootfs_qm}%{_sysconfdir}/containers/systemd/audio.container 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 %files %license LICENSE diff --git a/subsystems/sound/Makefile b/subsystems/sound/Makefile new file mode 100644 index 00000000..3650b857 --- /dev/null +++ b/subsystems/sound/Makefile @@ -0,0 +1,27 @@ +SPECFILE_SUBPACKAGE_SOUND=rpm/sound/sound.spec + +.PHONY: dist +dist: ## - Creates the QM kvm package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-sound-${VERSION}/ \ + -f /tmp/qm-sound-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../qm/etc/qm/containers/containers.conf.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 + +.PHONY: rpm +rpm: dist ## - Creates a local RPM package, useful for development + mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + tools/version-update -v ${VERSION} + cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_SOUND} + diff --git a/subsystems/audio/audio.container b/subsystems/sound/etc/containers/systemd/audio.container similarity index 100% rename from subsystems/audio/audio.container rename to subsystems/sound/etc/containers/systemd/audio.container diff --git a/subsystems/audio/ContainerFile b/subsystems/sound/usr/share/qm/ContainerFile similarity index 100% rename from subsystems/audio/ContainerFile rename to subsystems/sound/usr/share/qm/ContainerFile From ab4567c918b4de759d67eef09b16273a36b3aa02 Mon Sep 17 00:00:00 2001 From: Yariv Rachmani Date: Sun, 12 Jan 2025 12:16:37 +0200 Subject: [PATCH 4/6] video make split Moving tests container, makefile to specific subsys directory Signed-off-by: Yariv Rachmani --- Makefile | 13 +-------- rpm/video/video.spec | 2 +- subsystems/video/Makefile | 27 +++++++++++++++++++ .../containers/systemd/rear-camera.container | 0 .../usr/share/qm}/ContainerFile.rear-camera | 0 5 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 subsystems/video/Makefile rename {etc => subsystems/video/etc}/containers/systemd/rear-camera.container (100%) rename {etc/containers/systemd => subsystems/video/usr/share/qm}/ContainerFile.rear-camera (100%) diff --git a/Makefile b/Makefile index da9bd2d7..3612378e 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,6 @@ LIBDIR ?= $(PREFIX)/lib SYSCONFDIR?=/etc QMDIR=/usr/lib/qm SPECFILE=rpm/qm.spec -SPECFILE_SUBPACKAGE_VIDEO=rpm/video/video.spec SPECFILE_SUBPACKAGE_RADIO=rpm/radio/radio.spec SPECFILE_SUBPACKAGE_DVB=rpm/dvb/dvb.spec SPECFILE_SUBPACKAGE_TTY7=rpm/tty7/tty7.spec @@ -16,7 +15,7 @@ SPECFILE_SUBPACKAGE_INPUT=rpm/input/input.spec SPECFILE_SUBPACKAGE_TTYUSB0=rpm/ttyUSB0/ttyUSB0.spec SPECFILE_SUBPACKAGE_IMG_TEMPDIR=rpm/img_tempdir/img_tempdir.spec SPECFILE_SUBPACKAGE_ROS2_ROLLING=rpm/ros2/rolling/ros2_rolling.spec -SUBSYS := subsystems/kvm subsystems/windowmanager subsystems/sound +SUBSYS := subsystems/kvm subsystems/windowmanager subsystems/sound subsystems/video export RPM_TOPDIR ?= $(PWD)/rpmbuild export VERSION?= $(shell cat VERSION) export ROOTDIR ?= $(PWD) @@ -109,16 +108,6 @@ ros2_rolling_subpackage: clean dist ## - Creates a local RPM package, u --define="version ${VERSION}" \ ${SPECFILE_SUBPACKAGE_ROS2_ROLLING} -.PHONY: video_subpackage -video_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_VIDEO} - .PHONY: radio_subpackage radio_subpackage: clean dist ## - Creates a local RPM package, useful for development mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} diff --git a/rpm/video/video.spec b/rpm/video/video.spec index 4a785d7e..de25e573 100644 --- a/rpm/video/video.spec +++ b/rpm/video/video.spec @@ -23,7 +23,7 @@ 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 -install -m 644 etc/containers/systemd/rear-camera.container \ +install -m 644 subsystems/video/etc/containers/systemd/rear-camera.container \ %{buildroot}%{_sysconfdir}/containers/systemd/rear-camera.container %files diff --git a/subsystems/video/Makefile b/subsystems/video/Makefile new file mode 100644 index 00000000..8a04d16f --- /dev/null +++ b/subsystems/video/Makefile @@ -0,0 +1,27 @@ +SPECFILE_SUBPACKAGE_VIDEO=rpm/video/video.spec + +.PHONY: dist +dist: ## - Creates the QM video package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-video-${VERSION}/ \ + -f /tmp/qm-video-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../qm/etc/qm/containers/containers.conf.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 + +.PHONY: rpm +rpm: dist ## - Creates a local RPM package, useful for development + mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + tools/version-update -v ${VERSION} + cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_VIDEO} + diff --git a/etc/containers/systemd/rear-camera.container b/subsystems/video/etc/containers/systemd/rear-camera.container similarity index 100% rename from etc/containers/systemd/rear-camera.container rename to subsystems/video/etc/containers/systemd/rear-camera.container diff --git a/etc/containers/systemd/ContainerFile.rear-camera b/subsystems/video/usr/share/qm/ContainerFile.rear-camera similarity index 100% rename from etc/containers/systemd/ContainerFile.rear-camera rename to subsystems/video/usr/share/qm/ContainerFile.rear-camera From 6bab941c5647d8ff052c8306e179ba15ddab9acc Mon Sep 17 00:00:00 2001 From: Yariv Rachmani Date: Sun, 12 Jan 2025 16:11:10 +0200 Subject: [PATCH 5/6] make split - dvb - radio - tty7 - input - ttyUSB0 - text2speech - img_tempdir Signed-off-by: Yariv Rachmani --- Makefile | 81 +------------------------------- rpm/text2speech/text2speech.spec | 2 +- subsystems/dvb/Makefile | 26 ++++++++++ subsystems/img_tempdir/Makefile | 26 ++++++++++ subsystems/input/Makefile | 25 ++++++++++ subsystems/radio/Makefile | 27 +++++++++++ subsystems/text2speech/Makefile | 24 ++++++++++ subsystems/tty7/Makefile | 26 ++++++++++ subsystems/ttyUSB0/Makefile | 26 ++++++++++ 9 files changed, 183 insertions(+), 80 deletions(-) create mode 100644 subsystems/dvb/Makefile create mode 100644 subsystems/img_tempdir/Makefile create mode 100644 subsystems/input/Makefile create mode 100644 subsystems/radio/Makefile create mode 100644 subsystems/text2speech/Makefile create mode 100644 subsystems/tty7/Makefile create mode 100644 subsystems/ttyUSB0/Makefile diff --git a/Makefile b/Makefile index 3612378e..60f8397c 100644 --- a/Makefile +++ b/Makefile @@ -7,17 +7,10 @@ LIBDIR ?= $(PREFIX)/lib SYSCONFDIR?=/etc QMDIR=/usr/lib/qm SPECFILE=rpm/qm.spec -SPECFILE_SUBPACKAGE_RADIO=rpm/radio/radio.spec -SPECFILE_SUBPACKAGE_DVB=rpm/dvb/dvb.spec -SPECFILE_SUBPACKAGE_TTY7=rpm/tty7/tty7.spec -SPECFILE_SUBPACKAGE_TEXT2SPEECH=rpm/text2speech/text2speech.spec -SPECFILE_SUBPACKAGE_INPUT=rpm/input/input.spec -SPECFILE_SUBPACKAGE_TTYUSB0=rpm/ttyUSB0/ttyUSB0.spec -SPECFILE_SUBPACKAGE_IMG_TEMPDIR=rpm/img_tempdir/img_tempdir.spec SPECFILE_SUBPACKAGE_ROS2_ROLLING=rpm/ros2/rolling/ros2_rolling.spec -SUBSYS := subsystems/kvm subsystems/windowmanager subsystems/sound subsystems/video +SUBSYS := subsystems/kvm subsystems/windowmanager subsystems/sound subsystems/video subsystems/radio subsystems/dvb subsystems/tty7 subsystems/input subsystems/ttyUSB0 subsystems/text2speech export RPM_TOPDIR ?= $(PWD)/rpmbuild -export VERSION?= $(shell cat VERSION) +export VERSION ?= $(shell cat VERSION) export ROOTDIR ?= $(PWD) # Default help target @@ -88,16 +81,6 @@ rpm: clean dist ## - Creates a local RPM package, useful for develop fi; \ done -.PHONY: text2speech_subpackage -text2speech_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_TEXT2SPEECH} - .PHONY: ros2_rolling_subpackage ros2_rolling_subpackage: clean dist ## - Creates a local RPM package, useful for development mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} @@ -108,66 +91,6 @@ ros2_rolling_subpackage: clean dist ## - Creates a local RPM package, u --define="version ${VERSION}" \ ${SPECFILE_SUBPACKAGE_ROS2_ROLLING} -.PHONY: radio_subpackage -radio_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_RADIO} - -.PHONY: dvb_subpackage -dvb_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_DVB} - -.PHONY: tty7_subpackage -tty7_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_TTY7} - -.PHONY: input_subpackage -input_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_INPUT} - -.PHONY: ttyUSB0_subpackage -ttyUSB0_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_TTYUSB0} - -.PHONY: img_tempdir_subpackage -img_tempdir_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_IMG_TEMPDIR} - install-policy: all ## - Install selinux policies only semodule -i ${TARGETS}.pp.bz2 sepolicy manpage --path . --domain ${TARGETS}_t diff --git a/rpm/text2speech/text2speech.spec b/rpm/text2speech/text2speech.spec index 59cafa6a..113ce89a 100644 --- a/rpm/text2speech/text2speech.spec +++ b/rpm/text2speech/text2speech.spec @@ -4,7 +4,7 @@ %global rootfs_qm %{_prefix}/lib/qm/rootfs/ Name: qm-text2speech -Version: 0.6.8 +Version: 0 Release: 1%{?dist} Summary: Drop-in configuration for QM containers to mount bind License: GPL-2.0-only diff --git a/subsystems/dvb/Makefile b/subsystems/dvb/Makefile new file mode 100644 index 00000000..6de0df21 --- /dev/null +++ b/subsystems/dvb/Makefile @@ -0,0 +1,26 @@ +SPECFILE_SUBPACKAGE_DVB=rpm/dvb/dvb.spec + +.PHONY: dist +dist: ## - Creates the QM dvb package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-dvb-${VERSION}/ \ + -f /tmp/qm-dvb-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_dvb.conf + cd $(ROOTDIR) && mv /tmp/qm-dvb-${VERSION}.tar.gz ./rpm + +.PHONY: rpm +rpm: dist ## - Creates a local RPM package, useful for development + mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + tools/version-update -v ${VERSION} + cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_DVB} + diff --git a/subsystems/img_tempdir/Makefile b/subsystems/img_tempdir/Makefile new file mode 100644 index 00000000..bff1a218 --- /dev/null +++ b/subsystems/img_tempdir/Makefile @@ -0,0 +1,26 @@ +SPECFILE_SUBPACKAGE_IMG_TEMPDIR=rpm/img_tempdir/img_tempdir.spec + +.PHONY: dist +dist: ## - Creates the QM img_tempdir package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-img_tempdir-${VERSION}/ \ + -f /tmp/qm-img_tempdir-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../qm/etc/qm/containers/containers.conf.d/qm_dropin_img_tempdir.conf + cd $(ROOTDIR) && mv /tmp/qm-img_tempdir-${VERSION}.tar.gz ./rpm + +.PHONY: rpm +rpm: dist ## - Creates a local RPM package, useful for development + mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + tools/version-update -v ${VERSION} + cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_IMG_TEMPDIR} + diff --git a/subsystems/input/Makefile b/subsystems/input/Makefile new file mode 100644 index 00000000..e38b86e8 --- /dev/null +++ b/subsystems/input/Makefile @@ -0,0 +1,25 @@ +SPECFILE_SUBPACKAGE_INPUT=rpm/input/input.spec + +.PHONY: dist +dist: ## - Creates the QM input package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-input-${VERSION}/ \ + -f /tmp/qm-input-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_input.conf + cd $(ROOTDIR) && mv /tmp/qm-input-${VERSION}.tar.gz ./rpm + +.PHONY: rpm +rpm: dist ## - Creates a local RPM package, useful for development + mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + tools/version-update -v ${VERSION} + cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_INPUT} diff --git a/subsystems/radio/Makefile b/subsystems/radio/Makefile new file mode 100644 index 00000000..6cf3378d --- /dev/null +++ b/subsystems/radio/Makefile @@ -0,0 +1,27 @@ +SPECFILE_SUBPACKAGE_RADIO=rpm/radio/radio.spec + +.PHONY: dist +dist: ## - Creates the QM radio package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-radio-${VERSION}/ \ + -f /tmp/qm-radio-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_radio.conf + cd $(ROOTDIR) && mv /tmp/qm-radio-${VERSION}.tar.gz ./rpm + + +.PHONY: rpm + rpm: dist ## - Creates a local RPM package, useful for development + mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + tools/version-update -v ${VERSION} + cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_RADIO} + diff --git a/subsystems/text2speech/Makefile b/subsystems/text2speech/Makefile new file mode 100644 index 00000000..d31fde1c --- /dev/null +++ b/subsystems/text2speech/Makefile @@ -0,0 +1,24 @@ +SPECFILE_SUBPACKAGE_TEXT2SPEECH=rpm/text2speech/text2speech.spec + +.PHONY: dist +dist: ## - Creates the QM input package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-text2speech-${VERSION}/ \ + -f /tmp/qm-text2speech-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ + cd $(ROOTDIR) && mv /tmp/qm-text2speech-${VERSION}.tar.gz ./rpm + +.PHONY: rpm +rpm: dist ## - Creates a local RPM package, useful for development + cd $(ROOTDIR) && mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + cd $(ROOTDIR) && tools/version-update -v ${VERSION} + cd $(ROOTDIR) && cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + cd $(ROOTDIR) && rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_TEXT2SPEECH} diff --git a/subsystems/tty7/Makefile b/subsystems/tty7/Makefile new file mode 100644 index 00000000..49606fed --- /dev/null +++ b/subsystems/tty7/Makefile @@ -0,0 +1,26 @@ +SPECFILE_SUBPACKAGE_TTY7=rpm/tty7/tty7.spec + +.PHONY: dist +dist: ## - Creates the QM tty7 package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-tty7-${VERSION}/ \ + -f /tmp/qm-tty7-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_tty7.conf + cd $(ROOTDIR) && mv /tmp/qm-tty7-${VERSION}.tar.gz ./rpm + +.PHONY: rpm +rpm: dist ## - Creates a local RPM package, useful for development + cd $(ROOTDIR) && mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + cd $(ROOTDIR) && tools/version-update -v ${VERSION} + cd $(ROOTDIR) && cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + cd $(ROOTDIR) && rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_TTY7} + diff --git a/subsystems/ttyUSB0/Makefile b/subsystems/ttyUSB0/Makefile new file mode 100644 index 00000000..0be0e92b --- /dev/null +++ b/subsystems/ttyUSB0/Makefile @@ -0,0 +1,26 @@ +SPECFILE_SUBPACKAGE_TTYUSB0=rpm/ttyUSB0/ttyUSB0.spec + +.PHONY: dist +dist: ## - Creates the QM ttyUSB0 package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-ttyUSB0-${VERSION}/ \ + -f /tmp/qm-ttyUSB0-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../qm/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_ttyUSB0.conf + cd $(ROOTDIR) && mv /tmp/qm-ttyUSB0-${VERSION}.tar.gz ./rpm + +.PHONY: rpm +rpm: dist ## - Creates a local RPM package, useful for development + cd $(ROOTDIR) && mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + cd $(ROOTDIR) && tools/version-update -v ${VERSION} + cd $(ROOTDIR) && cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + cd $(ROOTDIR) && rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_TTYUSB0} + From ff43278404c156fad90543f981e590b0c0e5963e Mon Sep 17 00:00:00 2001 From: Yariv Rachmani Date: Sun, 12 Jan 2025 21:50:12 +0200 Subject: [PATCH 6/6] ros2 split makefile Signed-off-by: Yariv Rachmani --- Makefile | 13 +-------- rpm/ros2/rolling/ros2_rolling.spec | 5 ++-- subsystems/ros2/Makefile | 27 +++++++++++++++++++ .../systemd}/ros2-rolling.container | 0 .../ros2/{ => usr/share/qm}/ContainerFile | 0 5 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 subsystems/ros2/Makefile rename subsystems/ros2/{ => etc/containers/systemd}/ros2-rolling.container (100%) rename subsystems/ros2/{ => usr/share/qm}/ContainerFile (100%) diff --git a/Makefile b/Makefile index 60f8397c..22008229 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,7 @@ LIBDIR ?= $(PREFIX)/lib SYSCONFDIR?=/etc QMDIR=/usr/lib/qm SPECFILE=rpm/qm.spec -SPECFILE_SUBPACKAGE_ROS2_ROLLING=rpm/ros2/rolling/ros2_rolling.spec -SUBSYS := subsystems/kvm subsystems/windowmanager subsystems/sound subsystems/video subsystems/radio subsystems/dvb subsystems/tty7 subsystems/input subsystems/ttyUSB0 subsystems/text2speech +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 export RPM_TOPDIR ?= $(PWD)/rpmbuild export VERSION ?= $(shell cat VERSION) export ROOTDIR ?= $(PWD) @@ -81,16 +80,6 @@ rpm: clean dist ## - Creates a local RPM package, useful for develop fi; \ done -.PHONY: ros2_rolling_subpackage -ros2_rolling_subpackage: clean dist ## - Creates a local RPM package, useful for development - mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} - tools/version-update -v ${VERSION} - cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES - rpmbuild -ba \ - --define="_topdir ${RPM_TOPDIR}" \ - --define="version ${VERSION}" \ - ${SPECFILE_SUBPACKAGE_ROS2_ROLLING} - install-policy: all ## - Install selinux policies only semodule -i ${TARGETS}.pp.bz2 sepolicy manpage --path . --domain ${TARGETS}_t diff --git a/rpm/ros2/rolling/ros2_rolling.spec b/rpm/ros2/rolling/ros2_rolling.spec index 2007b0f3..88137945 100644 --- a/rpm/ros2/rolling/ros2_rolling.spec +++ b/rpm/ros2/rolling/ros2_rolling.spec @@ -5,7 +5,7 @@ %global ros2_container %{rootfs_qm}/%{_sysconfdir}/containers/systemd/ Name: qm-ros2-rolling -Version: 0 +Version: 0.6.9 Release: 1%{?dist} Summary: Subpackage container for quadlet container to ROS2 Rolling environment License: GPL-2.0-only @@ -36,7 +36,8 @@ containers managed by Podman and systemd within the QM environment. mkdir -p %{buildroot}%{ros2_container} # Install the ROS2 Rolling container file -install -m 644 subsystems/ros2/ros2-rolling.container %{buildroot}%{ros2_container} + +install -m 644 subsystems/ros2/etc/containers/systemd/ros2-rolling.container %{buildroot}%{ros2_container} %files %license LICENSE diff --git a/subsystems/ros2/Makefile b/subsystems/ros2/Makefile new file mode 100644 index 00000000..aec27832 --- /dev/null +++ b/subsystems/ros2/Makefile @@ -0,0 +1,27 @@ +SPECFILE_SUBPACKAGE_ROS2_ROLLING=rpm/ros2/rolling/ros2_rolling.spec + +.PHONY: dist +dist: ## - Creates the QM ros2 package + cd $(ROOTDIR) && tar cvz \ + --exclude-from=build-aux/exclude_from_tar_gz_subpackage_kvm.txt \ + --dereference \ + --transform s/qm/qm-ros2-${VERSION}/ \ + -f /tmp/qm-ros2-${VERSION}.tar.gz \ + ../qm/README.md \ + ../qm/SECURITY.md \ + ../qm/LICENSE \ + ../qm/ \ + ../qm/subsystems/ros2/etc/containers/systemd/ros2-rolling.container + cd $(ROOTDIR) && mv /tmp/qm-ros2-${VERSION}.tar.gz ./rpm + + +.PHONY: rpm +rpm: dist ## - Creates a local RPM package, useful for development + cd $(ROOTDIR) && mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES} + cd $(ROOTDIR) && tools/version-update -v ${VERSION} + cd $(ROOTDIR) && cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES + cd $(ROOTDIR) && rpmbuild -ba \ + --define="_topdir ${RPM_TOPDIR}" \ + --define="version ${VERSION}" \ + ${SPECFILE_SUBPACKAGE_ROS2_ROLLING} + diff --git a/subsystems/ros2/ros2-rolling.container b/subsystems/ros2/etc/containers/systemd/ros2-rolling.container similarity index 100% rename from subsystems/ros2/ros2-rolling.container rename to subsystems/ros2/etc/containers/systemd/ros2-rolling.container diff --git a/subsystems/ros2/ContainerFile b/subsystems/ros2/usr/share/qm/ContainerFile similarity index 100% rename from subsystems/ros2/ContainerFile rename to subsystems/ros2/usr/share/qm/ContainerFile