commit 09a27e5742c3c92f6456a30ee7161ac0555252d2 Author: Matthew Cardarelli Date: Fri Jun 13 13:53:58 2025 -0400 Initial commit diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..29e7d05 --- /dev/null +++ b/Containerfile @@ -0,0 +1,22 @@ +FROM docker.io/library/debian:stretch-20220622 + +COPY ./sources.list /etc/apt/sources.list + +RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg unzip + +RUN mkdir /opt/biftool +WORKDIR /opt/biftool + +ADD --chmod=644 https://raw.githubusercontent.com/rokudev/samples/refs/heads/master/utilities/bif%20tool/biftool_linux.zip biftool_linux.zip +RUN unzip biftool_linux.zip && rm -r ./biftool_linux.zip +RUN chmod 755 biftool* + +RUN useradd --create-home --shell /bin/bash bifcreator + +USER bifcreator +WORKDIR /home/bifcreator +ENV PATH="/opt/biftool:${PATH}" + +COPY --chown=bifcreator --chmod=755 ./run_biftool . +ENTRYPOINT ["./run_biftool"] +CMD ["--help"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..008f21c --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# Purpose + +Roku's BIF file creation tool for linux is out of date (last updated six years). It includes a dependency on `libavformat.so.57`, which is obsolete on all modern GNU/Linux distributions. + +This container allows execution of the BIF creation tool using a container powered by the archived Debian version "Stretch", which includes the correct version of the dependency. + +# Usage + +After cloning the repository, build the image: + +```sh +podman build -t [local-image-name] . +``` + +Add your input and output folders to env variables: + +```sh +INPUT_DIR=[path] +OUTPUT_DIR=[path] +``` + +You will need to grant all users read access to your input dir, and write + execute access to your output dir: + +```sh +chmod o+r $INPUT_DIR +chmod o+wx $OUTPUT_DIR +``` + +Now, you can run the script. The input dir should be bind mounted read-only, and output dir bind mounted read-write: + +```sh +podman run --rm \ +--mount="type=bind,src=$INPUT_DIR,dst=/media,ro" \ +--mount="type=bind,src=$OUTPUT_DIR,dst=/output" \ +localhost/[local-image-name] -- /media +``` diff --git a/run_biftool b/run_biftool new file mode 100644 index 0000000..64ffc47 --- /dev/null +++ b/run_biftool @@ -0,0 +1,3 @@ +#!/bin/bash + +biftool $1 && mv ./*.bif /output diff --git a/sources.list b/sources.list new file mode 100644 index 0000000..3c7ff20 --- /dev/null +++ b/sources.list @@ -0,0 +1,2 @@ +deb http://archive.debian.org/debian stretch main contrib non-free +deb http://archive.debian.org/debian-security stretch/updates main contrib non-free