diff --git a/.github/workflows/dfsg-ize.yml b/.github/workflows/dfsg-ize.yml new file mode 100644 index 0000000..36a3163 --- /dev/null +++ b/.github/workflows/dfsg-ize.yml @@ -0,0 +1,89 @@ +name: "DFSG-ize" +on: + push: + pull_request: + +permissions: {} + +jobs: + dfsg-checks: + strategy: + matrix: + strip: [strip, nostrip] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: "Install prerequisites" + env: + DEBIAN_FRONTEND: "noninteractive" + run: | + sudo apt-get update --quiet + sudo apt-get install --no-install-recommends --yes \ + build-essential \ + pkg-config + + - name: "Strip binaries" + if: ${{ matrix.strip == 'strip' }} + run: | + for lib in $(find . -type f -name lib\*.so.\*); do + strip "${lib}"; + done + + - name: "Install files" + run: | + sudo mkdir -p /lib/firmware/intel + + cat README.md | \ + awk 'BEGIN { \ + FS="/"; \ + } \ + /^```/ { \ + getline; \ + if ($1 == "# Runtime files") { \ + while ($1 != "```") { \ + print $0; \ + getline; \ + } \ + } \ + }' | \ + sed 's,ipu6-camera-bins/,./,' | \ + sudo sh -x + + - name: "Test linking with ld-linux.so" + run: | + ld_linux=$(which /lib/*/ld-linux*) + for lib in $(find . -type f -name lib\*.so.\*); do + echo "Verifying ${lib}" + rm -f ret; LD_DEBUG=all "${ld_linux}" --verify "${lib}" || echo $? >ret + if [ -e ret ]; then + echo "Return value: $(