12 Commits

Author SHA1 Message Date
1428c86d83 Update Arch depends 2026-02-06 19:03:00 -05:00
f2aeef29f0 1.35.12 release 2026-02-06 18:55:09 -05:00
ef6fb474b6 Translate pm requires for suse/mandriva 2026-02-06 18:54:13 -05:00
73eaeb24b4 Translate new power manager requires 2026-02-06 18:19:48 -05:00
32e35bfe3a 1.35.11 release 2026-02-03 22:22:56 -05:00
d69d33d51d Use new repo key in apt container 2026-02-03 22:08:47 -05:00
d7d5af3a0b Deploy updated repo signing key 2026-02-03 20:57:13 -05:00
f07dfa9ece 1.35.10 release 2026-02-02 12:23:10 -05:00
3eb19ea96b Fix codename precedence on Mint 2026-02-02 12:12:47 -05:00
9b9af30306 Use codenames on Debian 2026-02-02 12:03:10 -05:00
170902ea0b Add remove_legacy_repo() 2026-01-22 18:07:12 -05:00
260fcaa1c0 Always use deb822 sources format 2026-01-22 17:12:03 -05:00
3 changed files with 66 additions and 50 deletions

View File

@@ -31,7 +31,7 @@ $ installJRMC --help
--compat --compat
Build/install MC without minimum dependency version requirements. Build/install MC without minimum dependency version requirements.
--mcversion VERSION --mcversion VERSION
Specify the MC version, ex. "33", "35.0.37", or "35.0.37-1" (default: latest). Specify the MC version, ex. "33", "35.0.43", or "35.0.43-1" (default: latest).
--arch ARCH --arch ARCH
Specify the target MC architecture, ex. "amd64", "arm64", etc (default: host architecture). Specify the target MC architecture, ex. "amd64", "arm64", etc (default: host architecture).
--mcrepo REPO --mcrepo REPO
@@ -126,8 +126,8 @@ Install the latest version of MC33 from the best available repository with debug
Install a more widely-compatible version of the latest MC version. Install a more widely-compatible version of the latest MC version.
[code]installJRMC --install repo --service jriver-mediacenter --service-type user[/code] [code]installJRMC --install repo --service jriver-mediacenter --service-type user[/code]
Install MC from the repository and start/enable jriver-mediacenter.service as a user service. Install MC from the repository and start/enable jriver-mediacenter.service as a user service.
[code]installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 35.0.37[/code] [code]installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 35.0.43[/code]
Build and install an MC 35.0.37 comptability RPM locally and activate it using the [tt]/path/to/license.mjr[/tt]. Build and install an MC 35.0.43 comptability RPM locally and activate it using the [tt]/path/to/license.mjr[/tt].
[code]installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code] [code]installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code]
Build an RPM locally for the current distro, move it to the webroot, and run createrepo as www-user. Build an RPM locally for the current distro, move it to the webroot, and run createrepo as www-user.
[code]installJRMC --service jriver-createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code] [code]installJRMC --service jriver-createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user[/code]

View File

@@ -28,7 +28,7 @@ $ installJRMC --help
--compat --compat
Build/install MC without minimum dependency version requirements. Build/install MC without minimum dependency version requirements.
--mcversion VERSION --mcversion VERSION
Build or install a specific MC version, ex. "35.0.37" or "33" (default: latest). Build or install a specific MC version, ex. "35.0.43" or "33" (default: latest).
--mcrepo REPO --mcrepo REPO
Specify the MC repository, ex. "bullseye", "bookworm", "noble", etc (default: latest official). Specify the MC repository, ex. "bullseye", "bookworm", "noble", etc (default: latest official).
--arch ARCH --arch ARCH
@@ -130,9 +130,9 @@ Multiple services (but not `--service-types`) can be installed at one time using
Install MC from the repository and start/enable `jriver-mediacenter.service` as a user service. Install MC from the repository and start/enable `jriver-mediacenter.service` as a user service.
* `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 35.0.37` * `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 35.0.43`
Build and install an MC 35.0.37 compatibility RPM locally and activate it using the `/path/to/license.mjr`. Build and install an MC 35.0.43 compatibility RPM locally and activate it using the `/path/to/license.mjr`.
* `installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user` * `installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user`

View File

@@ -21,8 +21,8 @@
# shellcheck disable=SC2329 # shellcheck disable=SC2329
shopt -s extglob shopt -s extglob
declare -g SCRIPT_VERSION="1.35.9" declare -g SCRIPT_VERSION="1.35.13-dev"
declare -g MC_VERSION_HARDCODE="35.0.37" # do find all replace declare -g MC_VERSION_HARDCODE="35.0.43" # do find all replace
declare -g MC_REPO_HARDCODE="bookworm" # should match the MC_VERSION_HARDCODE declare -g MC_REPO_HARDCODE="bookworm" # should match the MC_VERSION_HARDCODE
declare -g BOARD_ID="92.0" # MC35 board ID for fallback latest version detection declare -g BOARD_ID="92.0" # MC35 board ID for fallback latest version detection
declare -gi SELF_UPDATE_SWITCH=1 # 0 to disable installJRMC self-update declare -gi SELF_UPDATE_SWITCH=1 # 0 to disable installJRMC self-update
@@ -244,7 +244,7 @@ init() {
declare -g OUTPUT_DIR="$SCRIPT_DIR/output" declare -g OUTPUT_DIR="$SCRIPT_DIR/output"
declare -g CREATEREPO_WEBROOT="/var/www/jriver" declare -g CREATEREPO_WEBROOT="/var/www/jriver"
declare -g CREATEREPO_USER="$USER" # can be root declare -g CREATEREPO_USER="$USER" # can be root
declare -g ID VERSION_ID UBUNTU_CODENAME ARCH MC_ARCH NAME declare -g ID VERSION_ID UBUNTU_CODENAME VERSION_CODENAME ARCH MC_ARCH NAME
declare -g MC_MVERSION MC_RELEASE MC_PKG MC_RPM MC_ROOT declare -g MC_MVERSION MC_RELEASE MC_PKG MC_RPM MC_ROOT
declare -ga PKG_INSTALL PKG_REMOVE PKG_UPDATE PKG_QUERY declare -ga PKG_INSTALL PKG_REMOVE PKG_UPDATE PKG_QUERY
declare -ga SERVICES CONTAINERS declare -ga SERVICES CONTAINERS
@@ -387,7 +387,7 @@ init() {
# Set default targets # Set default targets
BUILD_TARGET="${BUILD_TARGET:-$ID}" BUILD_TARGET="${BUILD_TARGET:-$ID}"
CREATEREPO_TARGET="${CREATEREPO_TARGET:-$ID}" CREATEREPO_TARGET="${CREATEREPO_TARGET:-$ID}"
MC_REPO="${MC_REPO_USER:-${UBUNTU_CODENAME:-$MC_REPO_HARDCODE}}" # user>host>hardcoded MC_REPO="${MC_REPO_USER:-${UBUNTU_CODENAME:-${VERSION_CODENAME:-$MC_REPO_HARDCODE}}}" # user>host>hardcoded
echo "MC source -> target: $MC_REPO $MC_ARCH -> $BUILD_TARGET $ARCH" echo "MC source -> target: $MC_REPO $MC_ARCH -> $BUILD_TARGET $ARCH"
set_mc_version set_mc_version
@@ -601,7 +601,7 @@ install_external_repos() {
} }
# @description Installs host-specific temporary legacy repo for missing dependencies # @description Installs host-specific temporary legacy repo for missing dependencies
install_legacy_repo() { add_legacy_repo() {
debug "${FUNCNAME[0]}()" debug "${FUNCNAME[0]}()"
local repo_name repo_uri repo_suite repo_key temp_repo_file local repo_name repo_uri repo_suite repo_key temp_repo_file
@@ -641,6 +641,12 @@ install_legacy_repo() {
fi fi
} }
# @description Removes temporary legacy repository if present
remove_legacy_repo() {
debug "${FUNCNAME[0]}()"
[[ -n $LEGACY_REPO_FILE ]] && execute sudo rm -f "$LEGACY_REPO_FILE"
}
# @description Acquires the source DEB package from JRiver # @description Acquires the source DEB package from JRiver
acquire_deb() { acquire_deb() {
debug "${FUNCNAME[0]}()" debug "${FUNCNAME[0]}()"
@@ -773,6 +779,8 @@ translate_packages() {
requires_arr=("${requires_arr[@]/libwebkit2gtk-4.0*/webkit2gtk4.0}") requires_arr=("${requires_arr[@]/libwebkit2gtk-4.0*/webkit2gtk4.0}")
requires_arr=("${requires_arr[@]/libwebkit2gtk-4.1*/webkit2gtk4.1}") requires_arr=("${requires_arr[@]/libwebkit2gtk-4.1*/webkit2gtk4.1}")
requires_arr=("${requires_arr[@]/libsdbus-c++1/sdbus-cpp}") requires_arr=("${requires_arr[@]/libsdbus-c++1/sdbus-cpp}")
requires_arr=("${requires_arr[@]/libdbus-1-3/dbus-libs}")
requires_arr=("${requires_arr[@]/libxss1/libXScrnSaver}")
recommends_arr=("${recommends_arr[@]/fdkaac/fdk-aac-free}") recommends_arr=("${recommends_arr[@]/fdkaac/fdk-aac-free}")
recommends_arr+=("mesa-va-drivers-freeworld|mesa-va-drivers") recommends_arr+=("mesa-va-drivers-freeworld|mesa-va-drivers")
recommends_arr+=("mesa-vulkan-drivers-freeworld|mesa-vulkan-drivers") recommends_arr+=("mesa-vulkan-drivers-freeworld|mesa-vulkan-drivers")
@@ -798,6 +806,7 @@ translate_packages() {
requires_arr=("${requires_arr[@]/libharfbuzz0b/libharfbuzz0}") requires_arr=("${requires_arr[@]/libharfbuzz0b/libharfbuzz0}")
requires_arr=("${requires_arr[@]/libwebkit2gtk-4.0*/libwebkit2gtk-4_0-37}") requires_arr=("${requires_arr[@]/libwebkit2gtk-4.0*/libwebkit2gtk-4_0-37}")
requires_arr=("${requires_arr[@]/libwebkit2gtk-4.1*/libwebkit2gtk-4_1-0}") requires_arr=("${requires_arr[@]/libwebkit2gtk-4.1*/libwebkit2gtk-4_1-0}")
requires_arr=("${requires_arr[@]/libxss1/libXss1}")
for i in "${!requires_arr[@]}"; do for i in "${!requires_arr[@]}"; do
[[ ${requires_arr[$i]} == "mesa-vulkan-drivers" ]] && unset -v 'requires_arr[i]' [[ ${requires_arr[$i]} == "mesa-vulkan-drivers" ]] && unset -v 'requires_arr[i]'
[[ ${requires_arr[$i]} == "libsdbus-c++1" ]] && unset -v 'requires_arr[i]' [[ ${requires_arr[$i]} == "libsdbus-c++1" ]] && unset -v 'requires_arr[i]'
@@ -839,6 +848,8 @@ translate_packages() {
requires_arr=("${requires_arr[@]/mesa-vulkan-drivers/lib64dri-drivers}") requires_arr=("${requires_arr[@]/mesa-vulkan-drivers/lib64dri-drivers}")
requires_arr=("${requires_arr[@]/vulkan-icd/vulkan-loader}") requires_arr=("${requires_arr[@]/vulkan-icd/vulkan-loader}")
requires_arr=("${requires_arr[@]/libwebkit2gtk-4.1-0/lib64webkit2gtk4.1}") requires_arr=("${requires_arr[@]/libwebkit2gtk-4.1-0/lib64webkit2gtk4.1}")
requires_arr=("${requires_arr[@]/libdbus-1-3/libdbus-1_3}")
requires_arr=("${requires_arr[@]/libxss1/libxscrnsaver1}")
recommends_arr=("${recommends_arr[@]/musepack-tools/mppenc}") recommends_arr=("${recommends_arr[@]/musepack-tools/mppenc}")
for i in "${!recommends_arr[@]}"; do for i in "${!recommends_arr[@]}"; do
[[ ${recommends_arr[$i]} == "fdkaac" ]] && unset -v 'recommends_arr[i]' [[ ${recommends_arr[$i]} == "fdkaac" ]] && unset -v 'recommends_arr[i]'
@@ -846,8 +857,8 @@ translate_packages() {
;; ;;
arch) arch)
# Set these manually for Arch since they are quite different # Set these manually for Arch since they are quite different
requires_arr=('alsa-lib' 'ca-certificates' 'gtk3' 'gcc-libs' 'libx11' 'libxext' requires_arr=('alsa-lib' 'ca-certificates' 'dbus' 'gtk3' 'gcc-libs' 'libx11' 'libxext'
'libxcb' 'libxau' 'libxdmcp' 'util-linux' 'mesa-libgl' 'webkit2gtk') 'libxcb' 'libxau' 'libxdmcp' 'libxss' 'util-linux' 'mesa-libgl' 'webkit2gtk')
recommends_arr=('mesa-libgl' 'nvidia-libgl' 'nvidia-utils' 'vulkan-intel' recommends_arr=('mesa-libgl' 'nvidia-libgl' 'nvidia-utils' 'vulkan-intel'
'vulkan-radeon' 'vorbis-tools' 'musepack-tools') 'vulkan-radeon' 'vorbis-tools' 'musepack-tools')
;; ;;
@@ -1018,8 +1029,8 @@ install_mc_deb() {
fi fi
# Add older repository for libwebkit2gtk-4.0-37, etc, on newer Debian/Ubuntu # Add older repository for libwebkit2gtk-4.0-37, etc, on newer Debian/Ubuntu
install_legacy_repo add_legacy_repo
execute "${PKG_UPDATE[@]}" || { err "Package update failed!"; return 1; } execute "${PKG_UPDATE[@]}" || { err "Package update failed!"; remove_legacy_repo; return 1; }
# Copy the DEB to a temporary file so _apt can read it # Copy the DEB to a temporary file so _apt can read it
debug "Creating temporary deb file owned by _apt" debug "Creating temporary deb file owned by _apt"
@@ -1036,6 +1047,7 @@ install_mc_deb() {
--reinstall \ --reinstall \
"$temp_deb"; then "$temp_deb"; then
err "Local MC DEB installation failed" err "Local MC DEB installation failed"
remove_legacy_repo
execute sudo rm -f "$temp_deb" execute sudo rm -f "$temp_deb"
if ask_ok "Remove source DEB and retry?"; then if ask_ok "Remove source DEB and retry?"; then
execute sudo rm -f "$MC_DEB" execute sudo rm -f "$MC_DEB"
@@ -1043,6 +1055,7 @@ install_mc_deb() {
fi fi
return 1 return 1
fi fi
remove_legacy_repo
execute sudo rm -f "$temp_deb" execute sudo rm -f "$temp_deb"
return 0 return 0
} }
@@ -1151,7 +1164,7 @@ link_ssl_certs() {
for f in "${source_certs[@]}"; do for f in "${source_certs[@]}"; do
if [[ -f $f ]]; then if [[ -f $f ]]; then
if execute sudo ln -fs "$f" "$mc_cert_link"; then if execute sudo ln -fs "$f" "$mc_cert_link"; then
debug "Symlinked $mc_cert_link to $f" echo "Symlinked $mc_cert_link to $f"
return 0 return 0
fi fi
fi fi
@@ -1199,6 +1212,7 @@ restore_license() {
fi fi
fi fi
done done
return 1
fi fi
} }
@@ -1587,16 +1601,6 @@ uninstall() {
done done
done done
# Remove the repository files
for file in "/etc/yum.repos.d/jriver.repo" /etc/apt/sources.list.d/{jriver,mediacenter}*.{list,sources}; do
if [[ -e $file ]]; then
echo "Removing repository file: $file"
execute sudo rm -f "$file"
fi
done
[[ $ID == "suse" ]] && execute sudo zypper --non-interactive removerepo jriver
echo "Removing firewall rules" echo "Removing firewall rules"
for service in jriver-mediacenter jriver-xvnc jriver-x11vnc; do for service in jriver-mediacenter jriver-xvnc jriver-x11vnc; do
if command -v firewall-cmd &>/dev/null; then if command -v firewall-cmd &>/dev/null; then
@@ -1619,6 +1623,16 @@ uninstall() {
err "Could not remove Media Center package" err "Could not remove Media Center package"
fi fi
# Remove the repository files
for file in "/etc/yum.repos.d/jriver.repo" /etc/apt/sources.list.d/{jriver,mediacenter}*.{list,sources}; do
if [[ -e $file ]]; then
echo "Removing repository file: $file"
execute sudo rm -f "$file"
fi
done
[[ $ID == "suse" ]] && execute sudo zypper --non-interactive removerepo jriver
local keyfile="/usr/share/keyrings/jriver-com-archive-keyring.gpg" local keyfile="/usr/share/keyrings/jriver-com-archive-keyring.gpg"
if [[ -f $keyfile ]]; then if [[ -f $keyfile ]]; then
echo "Removing the JRiver Media Center GPG key" echo "Removing the JRiver Media Center GPG key"
@@ -1784,7 +1798,8 @@ main() {
EOF EOF
;; ;;
debian|ubuntu) debian|ubuntu)
local keyfile="/usr/share/keyrings/jriver-com-archive-keyring.gpg" local keyurl="https://dist.jriver.com/mediacenter@jriver.com.gpg.complete"
local keyfile="/usr/share/keyrings/jriver-com-archive-keyring-complete.gpg"
local channel="latest" local channel="latest"
[[ -n $BETAPASS ]] && channel="beta" [[ -n $BETAPASS ]] && channel="beta"
@@ -1794,9 +1809,11 @@ main() {
repo_file="/etc/apt/sources.list.d/jriver.sources" repo_file="/etc/apt/sources.list.d/jriver.sources"
fi fi
echo "Installing JRiver Media Center GPG key"
download "$keyurl" "-" |
gpg --dearmor | sudo tee "$keyfile" &>/dev/null
echo "Installing repository file: $repo_file" echo "Installing repository file: $repo_file"
if [[ ($ID == "ubuntu" && $UBUNTU_CODENAME =~ ^[j-z]) ||
($ID == "debian" && ${VERSION_ID%%.*} -ge 12) ]]; then
sudo tee "$repo_file" &>/dev/null <<-EOF sudo tee "$repo_file" &>/dev/null <<-EOF
Types: deb Types: deb
URIs: https://dist.jriver.com/$channel/mediacenter/ URIs: https://dist.jriver.com/$channel/mediacenter/
@@ -1805,16 +1822,8 @@ main() {
Components: main Components: main
Architectures: amd64 armhf arm64 Architectures: amd64 armhf arm64
EOF EOF
else
sudo tee "$repo_file" &>/dev/null <<-EOF
deb [signed-by=$keyfile arch=amd64,armhf,arm64] https://dist.jriver.com/$channel/mediacenter/ $MC_REPO main
EOF
fi
echo "Installing JRiver Media Center GPG key" add_legacy_repo
download "https://dist.jriver.com/mediacenter@jriver.com.gpg.key" "-" |
gpg --dearmor | sudo tee "$keyfile" &>/dev/null
install_legacy_repo
;; ;;
*) *)
err "An MC repository for $ID is not yet available" err "An MC repository for $ID is not yet available"
@@ -1826,7 +1835,7 @@ main() {
echo "Updating package lists" echo "Updating package lists"
if ! execute "${PKG_UPDATE[@]}"; then if ! execute "${PKG_UPDATE[@]}"; then
err "Package update failed!" err "Package update failed!"
[[ -n $LEGACY_REPO_FILE ]] && sudo rm -f "$LEGACY_REPO_FILE" remove_legacy_repo
if [[ $MC_REPO != "$MC_REPO_HARDCODE" ]]; then if [[ $MC_REPO != "$MC_REPO_HARDCODE" ]]; then
echo "Rerunning installJRMC with --mcrepo=$MC_REPO_HARDCODE" echo "Rerunning installJRMC with --mcrepo=$MC_REPO_HARDCODE"
rerun "$@" "--mcrepo=$MC_REPO_HARDCODE" rerun "$@" "--mcrepo=$MC_REPO_HARDCODE"
@@ -1837,12 +1846,12 @@ main() {
echo "Installing $MC_PKG package" echo "Installing $MC_PKG package"
if ! install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_PKG"; then if ! install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_PKG"; then
err "MC package install failed!" err "MC package install failed!"
[[ -n $LEGACY_REPO_FILE ]] && sudo rm -f "$LEGACY_REPO_FILE" remove_legacy_repo
return 1 return 1
fi fi
# Clean up legacy repo after successful install # Clean up legacy repo after successful install
[[ -n $LEGACY_REPO_FILE ]] && sudo rm -f "$LEGACY_REPO_FILE" remove_legacy_repo
link_ssl_certs link_ssl_certs
restore_license restore_license
@@ -1890,6 +1899,13 @@ main() {
unknown) install_mc_generic ;; unknown) install_mc_generic ;;
esac esac
# shellcheck disable=SC2181
if [[ $? -eq 0 ]]; then
echo "Successfully installed JRiver Media Center"
else
err "MC package install failed!"
fi
link_ssl_certs link_ssl_certs
restore_license restore_license
open_firewall "jriver-mediacenter" "52100-52200/tcp" "1900/udp" open_firewall "jriver-mediacenter" "52100-52200/tcp" "1900/udp"
@@ -1992,7 +2008,7 @@ create_mc_apt_container() {
CNT=$(buildah from --quiet alpine:edge) && CNT=$(buildah from --quiet alpine:edge) &&
buildah run --env MC_REPO="$repo" --env MC_ARCH="$MC_ARCH" --env CHANNEL="$channel" "$CNT" -- sh -c ' buildah run --env MC_REPO="$repo" --env MC_ARCH="$MC_ARCH" --env CHANNEL="$channel" "$CNT" -- sh -c '
apk add --quiet --no-progress --no-cache apt curl gnupg apk add --quiet --no-progress --no-cache apt curl gnupg
curl -fsSL https://dist.jriver.com/mediacenter@jriver.com.gpg.key | gpg --quiet --dearmor -o /usr/share/keyrings/jriver-com-archive-keyring.gpg curl -fsSL https://dist.jriver.com/mediacenter@jriver.com.gpg.complete | gpg --quiet --dearmor -o /usr/share/keyrings/jriver-com-archive-keyring.gpg
cat <<-EOF > /etc/apt/sources.list.d/jriver.sources cat <<-EOF > /etc/apt/sources.list.d/jriver.sources
Types: deb Types: deb
URIs: https://dist.jriver.com/$CHANNEL/mediacenter/ URIs: https://dist.jriver.com/$CHANNEL/mediacenter/