1
0

58 Commits

Autor SHA1 Nachricht Datum
7bad2bf96c 1.5.2 release 2025-04-22 16:16:47 -04:00
58674364c6 Refactor download_stdout and remove snap/appimage attempts 2025-04-17 12:04:47 -04:00
3d2f343e00 Fix arch in appinstall 2025-04-15 23:04:54 -04:00
00de925240 Selectively acquire appimage-builder 2025-04-15 23:02:43 -04:00
0dee6d3971 Use appimage-builder 2025-04-15 22:43:25 -04:00
6fa7df13dd Add stub functionality to AppImage 2025-04-15 21:57:13 -04:00
61eebeb41b Add AppDir icon 2025-04-15 21:16:44 -04:00
2f99036efb Use host arch 2025-04-15 21:12:04 -04:00
5a226d9d6d Disable default method for appimage 2025-04-15 21:07:39 -04:00
bb92bbb10e Abandon snaps for AppImage 2025-04-15 21:04:19 -04:00
c81d262d79 Switch pack to snap 2025-04-15 19:55:10 -04:00
6fd84a2192 Switch to GNOME extension 2025-04-15 19:50:11 -04:00
7447507362 I hate snaps 2025-04-15 19:45:37 -04:00
659be95c17 I hate snaps 2025-04-15 19:38:42 -04:00
196ba6dd75 Use git pull override 2025-04-15 19:36:12 -04:00
05a1289180 Use build-essential 2025-04-15 19:34:39 -04:00
d810f2c011 Run apt update before build 2025-04-15 19:33:12 -04:00
066ea36dec Remove pkgconf 2025-04-15 19:30:24 -04:00
b9f1e6a752 Use pkgconf 2025-04-15 19:29:21 -04:00
299428fc1f Switch to make plugin 2025-04-15 19:28:00 -04:00
8dbb03050b Add stage packages to desktop-helpers 2025-04-15 19:25:37 -04:00
5c6be534a1 Add git to desktop helper build 2025-04-15 19:22:37 -04:00
a0d2ef0ff7 Add desktop helper to snap 2025-04-15 19:20:44 -04:00
237e0b6f31 Start with strict confinement 2025-04-15 18:31:43 -04:00
ff8395d60e Output to proper snap dir 2025-04-15 18:28:01 -04:00
fc7d57c026 Make systemd noisier by default 2025-04-15 18:22:55 -04:00
199fd942fb Workaround snapcraft container quirks 2025-04-15 18:18:04 -04:00
5f682707f6 Actually check that the snap is built 2025-04-15 18:13:36 -04:00
3897ac7697 Override default snapcraft entrypoint 2025-04-15 18:04:06 -04:00
ba2fe7015e Retry absolute paths 2025-04-15 17:51:18 -04:00
ead614921a Use pack instead of snap directive 2025-04-15 17:46:58 -04:00
1c9f918ac8 No absolute paths in command 2025-04-15 17:31:09 -04:00
f9d6c40c00 Fix world's most annoying indent error 2025-04-15 17:24:25 -04:00
e9e69e7ccc Try relative paths 2025-04-15 17:20:03 -04:00
a1e4d4cf8c Fix paths to deb 2025-04-15 17:06:40 -04:00
b954f89580 use relative paths in container build 2025-04-15 17:03:46 -04:00
764fd6f634 Begin silent snapcraft bug bisection 2025-04-15 17:00:00 -04:00
dc4cd48245 Print snpacraft debug output 2025-04-15 16:53:25 -04:00
82f2dd1c81 Use snap rocks image 2025-04-15 16:50:06 -04:00
079548861a Use older libva 2025-04-15 16:44:12 -04:00
7f04e44c21 Remove release specifier for webkit 2025-04-15 16:37:53 -04:00
b65ad93698 Use newer snapcraft image 2025-04-15 15:18:24 -04:00
bb3f4c83c8 Add universe repo to snap 2025-04-15 15:14:28 -04:00
6350495d3c Begin refining snap yaml 2025-04-15 15:09:24 -04:00
08dfb31600 Fix yaml heredoc indents 2025-04-15 14:51:43 -04:00
5c4cb6cb80 Add selinux context to snap dir 2025-04-15 14:43:50 -04:00
0993fc7ee3 Fix snapcraft container volume path 2025-04-13 22:06:16 -04:00
5816564b66 Remove bad snapcraft option 2025-04-13 22:03:23 -04:00
7de110a0ed Remove bad snapcraft option 2025-04-13 22:02:40 -04:00
420d4b4685 Add snapcraft directive 2025-04-13 22:00:35 -04:00
edadb4f0f8 Pass podman to execute 2025-04-13 21:56:33 -04:00
8191f2d675 Remove bad snapcraft option 2025-04-13 21:55:26 -04:00
f6a879f105 Use snapcraft container 2025-04-13 21:47:25 -04:00
addb4021d0 Add symlinks for snapcraft --classic 2025-04-13 21:12:47 -04:00
3fd3d1d424 Add symlinks for snapcraft --classic 2025-04-13 21:10:41 -04:00
bef5b1ebf8 Always make SOURCES 2025-04-13 21:04:35 -04:00
b07c2dba60 Print download commands 2025-04-13 21:01:16 -04:00
7e032a392b Beyond experimental snap support 2025-04-13 20:45:40 -04:00

Datei anzeigen

@@ -18,7 +18,7 @@
# * Be careful with tabs in heredocs
shopt -s extglob
declare -g SCRIPT_VERSION="1.5.1"
declare -g SCRIPT_VERSION="1.5.2"
declare -g MC_REPO="bullseye" # should match the MC_VERSION
# declare -g MC_REPO="bookworm" # should match the MC_VERSION
declare -g MC_VERSION="33.0.72" # do find all replace
@@ -118,8 +118,8 @@ print_help() {
parse_input() {
debug "Running: ${FUNCNAME[0]} $*"
declare -gi BUILD_SWITCH REPO_INSTALL_SWITCH LOCAL_INSTALL_SWITCH \
CONTAINER_INSTALL_SWITCH CREATEREPO_SWITCH \
COMPAT_SWITCH UNINSTALL_SWITCH YES_SWITCH DEBUG=0
CONTAINER_INSTALL_SWITCH CREATEREPO_SWITCH SNAP_INSTALL_SWITCH \
APPIMAGE_INSTALL_SWITCH COMPAT_SWITCH UNINSTALL_SWITCH YES_SWITCH DEBUG=0
declare -g USER_MC_VERSION USER_MC_RELEASE USER_MC_REPO MJR_FILE \
BETAPASS SERVICE_TYPE VNCPASS USER_DISPLAY BUILD_TARGET CREATEREPO_TARGET
local long_opts short_opts input
@@ -141,13 +141,14 @@ parse_input() {
local|rpm|deb) BUILD_SWITCH=1; LOCAL_INSTALL_SWITCH=1 ;;
repo|remote) REPO_INSTALL_SWITCH=1 ;;
container) CONTAINER_INSTALL_SWITCH=1 ;;
snap) SNAP_INSTALL_SWITCH=1 ;;
appimage) APPIMAGE_INSTALL_SWITCH=1 ;;
*) err "Invalid --install option passed"; exit 1 ;;
esac
;;
--build|-b) BUILD_SWITCH=1; shift; BUILD_TARGET="$1" ;;
--outputdir) shift; OUTPUT_DIR="$1" ;;
--mcversion)
shift
--mcversion) shift;
if [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+-[0-9]+$ ]]; then
USER_MC_VERSION="${1%-*}"
USER_MC_RELEASE="${1#*-}"
@@ -205,7 +206,8 @@ parse_input() {
# Fallback to default install method in some scenarios
if ! ((UNINSTALL_SWITCH + BUILD_SWITCH + CREATEREPO_SWITCH +
LOCAL_INSTALL_SWITCH + CONTAINER_INSTALL_SWITCH)) &&
LOCAL_INSTALL_SWITCH + CONTAINER_INSTALL_SWITCH + SNAP_INSTALL_SWITCH +
APPIMAGE_INSTALL_SWITCH)) &&
[[ ${#SERVICES[@]} -eq 0 && ${#CONTAINERS[@]} -eq 0 ]]; then
debug "Automatically using --install=repo"
REPO_INSTALL_SWITCH=1
@@ -213,7 +215,7 @@ parse_input() {
# Print some warnings for unsupported argument combinations
if [[ -n $USER_MC_REPO ]] && ((LOCAL_INSTALL_SWITCH)); then
err "--install=local is not compatible with --mcrepo as only the default ($MC_REPO) DEB is available"
err "--install=local is incompatible with --mcrepo as only the default ($MC_REPO) DEB is available"
fi
if [[ -n $BETA_PASS ]] && ((REPO_INSTALL_SWITCH)); then
@@ -430,7 +432,7 @@ get_latest_mc_version() {
mc_version_source="containerized package manager"
execute buildah rm "$cnt"
# Fallback to webscrape
elif MC_VERSION=$(download_stdout "$BOARD_URL" | grep -o "[0-9][0-9]\.[0-9]\.[0-9]\+" | head -n 1) \
elif MC_VERSION=$(download "$BOARD_URL" "-" | grep -o "[0-9][0-9]\.[0-9]\.[0-9]\+" | head -n 1) \
&& [[ $MC_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then
mc_version_source="webscrape"
# Fallback to hardcoded value
@@ -645,6 +647,7 @@ install_mc_repo() {
for f in "${old_repo_files[@]}"; do
[[ -f $f ]] && execute sudo rm -f "$f"
done
read -r -d '' repo_text <<-EOF
Types: deb
URIs: http://dist.jriver.com/$channel/mediacenter/
@@ -661,8 +664,8 @@ install_mc_repo() {
fi
repo_text="deb [signed-by=$keyfile arch=amd64,i386,armhf,arm64] http://dist.jriver.com/$channel/mediacenter/ $MC_REPO main"
fi
echo "Installing JRiver Media Center RPM key"
download "http://dist.jriver.com/mediacenter@jriver.com.gpg.key" |
echo "Installing JRiver Media Center GPG key"
download "http://dist.jriver.com/mediacenter@jriver.com.gpg.key" "-" |
gpg --dearmor | sudo tee "$keyfile" &>/dev/null
;;
*)
@@ -697,7 +700,9 @@ acquire_deb() {
declare -g MC_SOURCE
local fname
# Usually JRiver exlcudes the release number from the filename
[[ -d $OUTPUT_DIR/SOURCES ]] || execute mkdir -p "$OUTPUT_DIR/SOURCES"
# Usually JRiver excludes the release number from the filename
# but in some cases (test builds) it may be included
if [[ $MC_RELEASE -gt 1 ]]; then
fname="MediaCenter-$MC_VERSION-$MC_RELEASE-$ARCH.deb"
@@ -924,7 +929,7 @@ build_rpm() {
fi
}
# @description Installs Media Center DEB package and optional compatability fixes
# @description Installs Media Center via DEB package w/ optional compatability fixes
install_mc_deb() {
debug "Running: ${FUNCNAME[0]}"
@@ -939,7 +944,7 @@ install_mc_deb() {
# Remove libwebkit2gtk and their fantastic package versioning strategy
sed -i 's/,\s*libwebkit2gtk[^,]*,\?|libwebkit2gtk[^,]*,\?//g' "control"
# TODO workaround for ZorinOS
# TODO workaround for legacy ZorinOS
[[ $ID == "ubuntu" && ${VERSION_ID%.*} -le 16 ]] \
&& grep -q zorin /etc/os-release \
&& sed -i 's/libva2/libva1/g' "control"
@@ -969,7 +974,7 @@ install_mc_deb() {
fi
}
# @description Installs Media Center RPM package
# @description Installs MC via RPM package
install_mc_rpm() {
debug "Running: ${FUNCNAME[0]}"
install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_RPM"
@@ -1003,7 +1008,7 @@ install_mc_generic() {
return 0
}
# @description Installs Media Center Arch PKGBUILD
# @description Installs MC via PKGBUILD
install_mc_arch() {
debug "Running: ${FUNCNAME[0]}"
@@ -1014,7 +1019,7 @@ install_mc_arch() {
pkgver=$MC_VERSION
pkgrel=1
pkgdesc="The Most Comprehensive Media Software"
arch=('x86_64')
arch=('$(uname -m)')
url="http://www.jriver.com/"
license=('custom')
depends=('alsa-lib' 'ca-certificates' 'gtk3' 'gcc-libs' 'libx11' 'libxext' 'libxcb' 'libxau' 'libxdmcp' 'util-linux' 'mesa-libgl' 'webkit2gtk')
@@ -1271,11 +1276,11 @@ set_service_vars() {
fi
# systemctl commands
RELOAD=(execute "${systemctl_prefix[@]}" daemon-reload)
ENABLE=(execute "${systemctl_prefix[@]}" enable --now)
DISABLE=(execute "${systemctl_prefix[@]}" disable --now)
IS_ENABLED=(execute "${systemctl_prefix[@]}" is-enabled -q)
IS_ACTIVE=(execute "${systemctl_prefix[@]}" is-active -q)
RELOAD=("${systemctl_prefix[@]}" daemon-reload)
ENABLE=("${systemctl_prefix[@]}" enable --now)
DISABLE=("${systemctl_prefix[@]}" disable --now)
IS_ENABLED=("${systemctl_prefix[@]}" is-enabled --quiet)
IS_ACTIVE=("${systemctl_prefix[@]}" is-active --quiet)
[[ -d $service_dir ]] || execute sudo mkdir -p "$service_dir"
@@ -1706,7 +1711,6 @@ main() {
fi
if ((BUILD_SWITCH)) && [[ $ID != "arch" ]]; then
[[ -d $OUTPUT_DIR/SOURCES ]] || execute mkdir -p "$OUTPUT_DIR/SOURCES"
acquire_deb || { err "Could not download Media Center DEB package"; return 1; }
if [[ $BUILD_TARGET =~ centos|fedora|suse || $CREATEREPO_TARGET =~ centos|fedora|suse ]]; then
@@ -1752,16 +1756,6 @@ main() {
done
unset service
fi
# for _container in "${CONTAINERS[@]}"; do
# if ! "_container_$_container"; then
# if [[ $? -eq 127 ]]; then
# err "Container $_container does not exist, check container name"
# else
# err "Failed to create container: $_container"
# fi
# fi
# done
}
# @section Helper functions
@@ -1790,32 +1784,17 @@ download() {
if [[ -n "$output" ]]; then
cmd+=(--output "$output")
else
cmd+=(-O)
cmd+=(--remote-name)
fi
elif command -v wget &>/dev/null || install_package --silent wget; then
cmd=(wget --quiet)
[[ -n "$output" ]] && cmd+=("--output-document=$output")
[[ -n "$output" ]] && cmd+=(--output-document="$output")
else
err "Unable to install wget or curl"
return 1
fi
"${cmd[@]}" "$url"
}
download_stdout() {
local url="$1"
local -a cmd
if command -v curl &>/dev/null; then
cmd=(curl --silent --fail --location -o - "$url")
elif command -v wget &>/dev/null; then
cmd=(wget --quiet -O - "$url")
else
err "Neither curl nor wget is available"
return 1
fi
"${cmd[@]}"
execute "${cmd[@]}" "$url"
}
# Roughly turn debugging on for pre-init