diff --git a/Dockerfile b/Dockerfile index e89615c..34a135c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM vitalets/tizen-webos-sdk -COPY entrypoint.sh . +COPY entrypoint.sh profile.xml ./ # jq for quickly parsing the TV name from the API endpoint RUN apt update && apt install jq -y && rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/apt/* diff --git a/README.md b/README.md index 862f33d..d5d59d5 100644 --- a/README.md +++ b/README.md @@ -39,20 +39,26 @@ Follow the [Samsung uninstall instructions](https://www.samsung.com/in/support/t #### Installation - Run the command below, replacing first argument with the IP of your Samsung TV - If you just want to install the default build, do not put anything after the IP address. - - (Optional) You can provide preferred [jellyfin-tizen-builds](https://github.com/jeppevinkel/jellyfin-tizen-builds) option (Jellyfin / Jellyfin-TrueHD / Jellyfin-master / Jellyfin-master-TrueHD / Jellyfin-secondary) as second argument. By default, Jellyfin option is used. - - (Optional) You can provide preferred [jellyfin-tizen-builds releases](https://github.com/jeppevinkel/jellyfin-tizen-builds/releases) release tag URL as third argument. By default, latest version is used. This is useful if you want to install older Jellyfin Tizen Client version. - + - (Optional) You can provide preferred [jellyfin-tizen-builds](https://github.com/jeppevinkel/jellyfin-tizen-builds) option (Jellyfin / Jellyfin-TrueHD / Jellyfin-master / Jellyfin-master-TrueHD / Jellyfin-secondary) as second argument. By default, Jellyfin option is used. + - (Optional) You can provide preferred [jellyfin-tizen-builds releases](https://github.com/jeppevinkel/jellyfin-tizen-builds/releases) release tag URL as third argument. By default, latest version is used. This is useful if you want to install older Jellyfin Tizen Client version. + - (Optional) You can provide a custom Samsung certificate by mounting the `.p12` files at `/certificates/` and providing the certificate password as fourth argument. + - If you do not want to use either of these options and just install the default build, do not put anything after the IP address. ```bash -docker run --rm ghcr.io/georift/install-jellyfin-tizen [build option] [tag url] +docker run --rm ghcr.io/georift/install-jellyfin-tizen [build option] [tag url] [certificate password] ``` -Example: +Examples: ```bash docker run --rm ghcr.io/georift/install-jellyfin-tizen 192.168.0.10 Jellyfin-TrueHD "https://github.com/jeppevinkel/jellyfin-tizen-builds/releases/tag/2024-05-13-0139" ``` +```bash +docker run --rm -v "$(pwd)/author.p12":/certificates/author.p12 -v "$(pwd)/distributor.p12":/certificates/distributor.p12 ghcr.io/georift/install-jellyfin-tizen 192.168.0.10 Jellyfin "" 'CertPassw0rd!' # Third argument empty to use latest tag +``` + +### Validating Success #### Common Errors - `library initialization failed - unable to allocate file descriptor table - out of memory` @@ -77,7 +83,7 @@ Tizen application is successfully installed. Total time: 00:00:12.205 ``` -At this point you can find jellyfin on your TV by navigating to Apps -> Downloaded (scroll down), where you'll find Jellyfin. +At this point you can find jellyfin on your TV by navigating to Apps -> Downloaded (scroll down), there you'll find Jellyfin. ## Supported Platforms @@ -95,6 +101,12 @@ If it outputs: **x86_64** you're good. If not, reinstall docker, with the needed Then use the ```--platform linux/amd64"``` argument on the original command. This should look something like this: ```docker run --rm --platform linux/amd64 ghcr.io/georift/install-jellyfin-tizen ``` +- `install failed[118, -12], reason: Check certificate error : :Invalid certificate chain with certificate in signature.` + + Recent TV models require the installation packages to be signed with a custom certificate for your specific TV. + + See [official documentation](https://developer.samsung.com/smarttv/develop/getting-started/setting-up-sdk/creating-certificates.html) on creating your certificate and use the custom certificate arguments. + ## Credits This project is possible thanks to these projects: diff --git a/entrypoint.sh b/entrypoint.sh index 9138998..e1e8e44 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -22,6 +22,17 @@ else TAG=$(echo $TAG_URL | sed 's#.*/##'); fi +if [ -z "$4" ]; then + echo "Certificate information not provided, using default dev certificate." +else + if [ -f /certificates/author.p12 ] && [ -f /certificates/distributor.p12 ]; then + CERTIFICATE_PASSWORD=$4 + else + echo "Certificate information provided but certificate files not found." + exit 1 + fi +fi + DOWNLOAD_URL=$(echo https://github.com/jeppevinkel/jellyfin-tizen-builds/releases/download/${TAG}/${JELLYFIN_BUILD_OPTION}.wgt); echo "" @@ -48,9 +59,15 @@ if [ -z "$TV_NAME" ]; then fi echo "Found TV name: $TV_NAME" -echo "Attempting to install jellyfin-tizen-builds $JELLYFIN_BUILD_OPTION.wgt from release: $TAG" -echo "$DOWNLOAD_URL" +echo "Downloading jellyfin-tizen-builds $JELLYFIN_BUILD_OPTION.wgt from release: $TAG" +wget -q --show-progress "$DOWNLOAD_URL"; echo "" -wget -q --show-progress "$DOWNLOAD_URL" +if ! [ -z "$CERTIFICATE_PASSWORD" ]; then + echo "Attempting to sign package using provided certificate" + sed -i "s/_CERTIFICATEPASSWORD_/$CERTIFICATE_PASSWORD/" profile.xml + sed -i '/<\/profile>/ r profile.xml' /home/developer/tizen-studio-data/profile/profiles.xml + tizen package -t wgt -s custom -- $JELLYFIN_BUILD_OPTION.wgt +fi +echo "Attempting to install jellyfin-tizen-builds $JELLYFIN_BUILD_OPTION.wgt from release: $TAG" tizen install -n $JELLYFIN_BUILD_OPTION.wgt -t "$TV_NAME" diff --git a/profile.xml b/profile.xml new file mode 100644 index 0000000..4511992 --- /dev/null +++ b/profile.xml @@ -0,0 +1,5 @@ + + + + +