Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.venv
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: local
hooks:
- id: compatible-machine-check
name: Ensure COMPATIBLE_MACHINE in .bb files
entry: hooks/pre-commit.d/10-compatible-machine.sh
language: system
pass_filenames: false
stages: [pre-commit]
files: \.bb$
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ If you maintain `bblayers.conf` manually, append:
BBLAYERS += "${TOPDIR}/../meta-ridgerun"
```

Git Hooks
---------
This layer uses the `pre-commit` framework. Current checks:
- `10-compatible-machine.sh`: verifies each staged `.bb` file defines `COMPATIBLE_MACHINE`.

Install `pre-commit` and enable hooks from the `meta-ridgerun` repository root:
```
pip install pre-commit
pre-commit install --hook-type pre-commit --install-hooks
```

To add new validations, add a new executable script under `hooks/pre-commit.d/` and register it in `.pre-commit-config.yaml`.

Customer repositories
---------------------
Proprietary plugins in this layer fetch from private RidgeRun GitLab paths under `git@gitlab.ridgerun.com/ridgerun/orders/${RR_CUSTOMER_GITLAB_ORDER_DIR}`. Set the directory you were given in one of these ways (prefer `conf/local.conf`):
Expand Down
56 changes: 56 additions & 0 deletions hooks/pre-commit.d/10-compatible-machine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
Comment thread
Omendez31 marked this conversation as resolved.

## meta-ridgerun pre-commit hook: COMPATIBLE_MACHINE check
## Copyright 2026 RidgeRun, LLC (http://www.ridgerun.com)
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
##
## 1. Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
##
## 2. Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in the
## documentation and/or other materials provided with the distribution.
##
## 3. Neither the name of the copyright holder nor the names of its
## contributors may be used to endorse or promote products derived from
## this software without specific prior written permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

set -euo pipefail

bb_files="$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.bb$' || true)"

[ -z "${bb_files}" ] && exit 0

missing=()
while IFS= read -r file; do
[ -z "${file}" ] && continue
if ! git show ":${file}" | grep -Eq '^[[:space:]]*COMPATIBLE_MACHINE([[:alnum:]_:-]*)?[[:space:]]*([?+]?=)'; then
missing+=("${file}")
fi
done <<< "${bb_files}"

if [ ${#missing[@]} -gt 0 ]; then
echo "ERROR: COMPATIBLE_MACHINE is missing in the following staged .bb files:"
for file in "${missing[@]}"; do
echo " - ${file}"
done
echo "Add COMPATIBLE_MACHINE before committing."
exit 1
fi

exit 0
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gst-emboverlay.bb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SECTION = "multimedia"
LICENSE = "Proprietary"

LIC_FILES_CHKSUM = "file://COPYING;md5=1887e8dfc90a84423fd31d1d45ee6718"
COMPATIBLE_MACHINE = ".*"

DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base cairo"

Expand Down
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gst-interpipes.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ HOMEPAGE = "https://developer.ridgerun.com/wiki/index.php?title=GstInterpipe"
SECTION = "multimedia"
LICENSE = "LGPL2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=3191ae9476980e87e3494d2d8ebe4584"
COMPATIBLE_MACHINE = ".*"

# Base dependencies
DEPENDS = " \
Expand Down
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gst-isp.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ HOMEPAGE = "https://www.ridgerun.com/gstisp"
SECTION = "multimedia"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=46819161aba98ab8c502e93a15713e58"
COMPATIBLE_MACHINE = "(imx-nxp-bsp)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qualcomm platforms are also supported: https://www.ridgerun.com/gstisp


DEPENDS = " \
gstreamer1.0 \
Expand Down
3 changes: 2 additions & 1 deletion recipes-multimedia/gstreamer/gst-motion-detect.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ HOMEPAGE = "https://developer.ridgerun.com/wiki/index.php?title=Camera_Based_Mot
SECTION = "multimedia"
LICENSE = "Proprietary"

LIC_FILES_CHKSUM = "file://COPYING;md5=46819161aba98ab8c502e93a15713e58"
LIC_FILES_CHKSUM = "file://COPYING;md5=152bda62bf553a99a8aff727654bb4c7"
COMPATIBLE_MACHINE = ".*"

DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base glib-2.0 glibc"

Expand Down
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gst-opencl.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ HOMEPAGE = "https://www.ridgerun.com/post/gstreamer-opencl-accelerated-isp"
SECTION = "multimedia"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=46819161aba98ab8c502e93a15713e58"
COMPATIBLE_MACHINE = "(imx-nxp-bsp)"

DEPENDS = " \
gstreamer1.0 \
Expand Down
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gst-perf.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ HOMEPAGE = "https://github.com/RidgeRun/gst-perf-autotools"
SECTION = "multimedia"
LICENSE = "LGPLv2"
LIC_FILES_CHKSUM="file://LICENSE;md5=5f30f0716dfdd0d91eb439ebec522ec2"
COMPATIBLE_MACHINE = ".*"

DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"

Expand Down
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gst-prerecord.bb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SECTION = "multimedia"
LICENSE = "Proprietary"

LIC_FILES_CHKSUM = "file://COPYING;md5=1887e8dfc90a84423fd31d1d45ee6718"
COMPATIBLE_MACHINE = ".*"

DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base libffi"

Expand Down
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gst-qt-overlay.bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ DESCRIPTION = "GStreamer element used to overlay QML files over video streams"
SECTION = "multimedia"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=2282fc857e14ce7b17c1c9d810504ac5"
COMPATIBLE_MACHINE = ".*"

DEPENDS = " \
gstreamer1.0 \
Expand Down
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gst-rtsp-sink.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ HOMEPAGE = "https://developer.ridgerun.com/wiki/index.php?title=GstRtspSink"
SECTION = "multimedia"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=1887e8dfc90a84423fd31d1d45ee6718"
COMPATIBLE_MACHINE = ".*"

DEPENDS = " \
gstreamer1.0 \
Expand Down
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gst-sei.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ HOMEPAGE = "https://www.ridgerun.com/gstseimetadata"
SECTION = "multimedia"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=2207b8e5f4ab4b3a0c794e43f2002ea3"
COMPATIBLE_MACHINE = ".*"


DEPENDS = " \
Expand Down
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gst-shark.bb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SECTION = "multimedia"
LICENSE = "GPL-2.0-or-later"

LIC_FILES_CHKSUM = "file://COPYING;md5=e1caa368743492879002ad032445fa97"
COMPATIBLE_MACHINE = ".*"

DEPENDS = " \
gstreamer1.0 \
Expand Down
1 change: 1 addition & 0 deletions recipes-multimedia/gstreamer/gstd.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ HOMEPAGE = "https://developer.ridgerun.com/wiki/index.php?title=Gstd-1.0"
SECTION = "multimedia"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=c71b653a0f608a58cdc5693ae57126bc"
COMPATIBLE_MACHINE = ".*"

DEPENDS = " \
gstreamer1.0 \
Expand Down