Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subpackage dvb #693

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ 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
SPECFILE_SUBPACKAGE_DVB=rpm/dvb/dvb.spec
SPECFILE_SUBPACKAGE_TTY7=rpm/tty7/tty7.spec
SPECFILE_SUBPACKAGE_INPUT=rpm/input/input.spec
SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER=rpm/windowmanager/windowmanager.spec
Expand Down Expand Up @@ -144,6 +145,16 @@ radio_subpackage: clean dist ## - Creates a local RPM package, usefu
--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}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Drop-in configuration for Podman to mount bind /dev/dvbX Digital TV
#
# In a typical vehicle system, dvb is connected to car's onboard computer via a CAN bus
# (Controller Area Network), which transmits signals from the dvbs to the car’s system for real-time
# processing.
#
# However, it's possible to create a simulation environment using traditional hardware and open-source
# software, eliminating the need for actual car dvb or CAN bus integration. By using open-source
# tools like Podman containers and dvb processing libraries, virtual
# dvbs can be simulated.
#
# "/dev/dvb0:/dev/dvb0", # Stereo Radio
#
# Camera System Layout (Top-Down View)
#
# ┌─────────────────────────────┐
# │ /dev/dvb0 │
# └────────────┬────────────────┘
# │
# ┌─────────────────────┴────────────────────────────────┐
# │ Vehicle Body (Top View) │
# │ │
# └──────────────────────────────────────────────────────┘
#
# Drop-in configuration for Podman to mount bind /dev/dvb from host to container
#
[Container]
AddDevice=-/dev/dvb0
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# │ │
# └──────────────────────────────────────────────────────┘
#
# Drop-in configuration for Podman to mount bind /dev/kvm from host to container
# Drop-in configuration for Podman to mount bind /dev/radio0 from host to container
#
[Container]
AddDevice=-/dev/radio0
29 changes: 29 additions & 0 deletions rpm/dvb/dvb.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Name: qm-mount-bind-dvb
Version: 0.6.8
Release: 1%{?dist}
Summary: Drop-in configuration for QM containers to mount bind /dev/dvb
License: GPL-2.0-only
URL: https://github.com/containers/qm
Source0: %{url}/archive/v%{version}.tar.gz

BuildArch: noarch
Requires: qm = %{version}-%{release}

%description
This subpackage installs a drop-in configuration for QM containers to mount bind `/dev/dvb`.

%prep
%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/

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

%changelog
* Fri Jul 21 2023 RH Container Bot <[email protected]>
- Added dvb mount bind drop-in configuration.

2 changes: 2 additions & 0 deletions tools/version-update
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/ros2/
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/sound/sound.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/video/video.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/radio/radio.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/dvb/dvb.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/tty7/tty7.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/input/input.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/ttyUSB0/ttyUSB0.spec"
Expand All @@ -73,6 +74,7 @@ sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/ros2/rolling/ros2_r
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/sound/sound.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/video/video.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/radio/radio.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/dvb/dvb.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/tty7/tty7.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/input/input.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/img_tempdir/img_tempdir.spec"
Expand Down
Loading