summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
author B. Watson2024-01-27 10:00:01 +0100
committer Willy Sudiarto Raharjo2024-02-10 10:17:24 +0100
commitbb5787a11338a6e045a59ebb22c90c1ca7b93167 (patch)
tree0192c566d8e1693f2bdcf1baf1949cefb7ba5bc0 /desktop
parent3a5b9bad73d52082b9d73f04138979df1afe26f7 (diff)
downloadslackbuilds-bb5787a11338a6e045a59ebb22c90c1ca7b93167.tar.gz
desktop/xpra: Updated for version 5.0.4, add HTML5 server support.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/xpra/README3
-rw-r--r--desktop/xpra/doinst.sh49
-rw-r--r--desktop/xpra/mkdoc.sh2
-rw-r--r--desktop/xpra/setup_cuda_bin.diff13
-rw-r--r--desktop/xpra/xpra.SlackBuild31
-rw-r--r--desktop/xpra/xpra.info12
6 files changed, 85 insertions, 25 deletions
diff --git a/desktop/xpra/README b/desktop/xpra/README
index b8af2867a8..206043088e 100644
--- a/desktop/xpra/README
+++ b/desktop/xpra/README
@@ -7,3 +7,6 @@ and reconnect from the same or another machine(s), without losing
any state. This effectively gives you remote access to individual
graphical applications. It can also be used to access existing
desktop sessions and start remote desktop sessions.
+
+Note: If 'xpra attach' freezes up with "UI thread is now blocked" on
+its stdout, try running it again with --opengl=no.
diff --git a/desktop/xpra/doinst.sh b/desktop/xpra/doinst.sh
index 9424ce43ff..329bb2856c 100644
--- a/desktop/xpra/doinst.sh
+++ b/desktop/xpra/doinst.sh
@@ -1,3 +1,52 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+# this list was made with:
+# find /tmp/S?o/package-xpra/etc/xpra/ -type f | cut -d/ -f5-
+
+for i in \
+ etc/xpra/html5-client/default-settings.txt.new \
+ etc/xpra/content-parent/10_default.conf.new \
+ etc/xpra/xpra.conf.new \
+ etc/xpra/http-headers/10_content_security_policy.txt.new \
+ etc/xpra/http-headers/00_nocache.txt.new \
+ etc/xpra/conf.d/42_client_keyboard.conf.new \
+ etc/xpra/conf.d/15_file_transfers.conf.new \
+ etc/xpra/conf.d/50_server_network.conf.new \
+ etc/xpra/conf.d/55_server_x11.conf.new \
+ etc/xpra/conf.d/10_network.conf.new \
+ etc/xpra/conf.d/30_picture.conf.new \
+ etc/xpra/conf.d/12_ssl.conf.new \
+ etc/xpra/conf.d/20_audio.conf.new \
+ etc/xpra/conf.d/40_client.conf.new \
+ etc/xpra/conf.d/16_printing.conf.new \
+ etc/xpra/conf.d/05_features.conf.new \
+ etc/xpra/conf.d/65_proxy.conf.new \
+ etc/xpra/conf.d/35_webcam.conf.new \
+ etc/xpra/conf.d/60_server.conf.new \
+ etc/xpra/content-categories/10_default.conf.new \
+ etc/xpra/content-type/50_class.conf.new \
+ etc/xpra/content-type/30_title.conf.new \
+ etc/xpra/content-type/10_role.conf.new \
+ etc/xpra/content-type/70_commands.conf.new \
+ etc/xpra/xorg.conf.new \
+ etc/xpra/xorg-uinput.conf.new
+do
+ config $i
+done
+
+# this symlink has to get created *after* the .new file has been config()'ed.
+# I'm not sure what it exists for, but upstream's official RPM includes it.
+( cd usr/share/xpra/www/ ; rm -rf default-settings.txt )
+( cd usr/share/xpra/www/ ; ln -sf ../../../../etc/xpra/html5-client/default-settings.txt default-settings.txt )
+
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
diff --git a/desktop/xpra/mkdoc.sh b/desktop/xpra/mkdoc.sh
index f08e745fd5..71428ede79 100644
--- a/desktop/xpra/mkdoc.sh
+++ b/desktop/xpra/mkdoc.sh
@@ -12,7 +12,7 @@ source ./xpra.info
OUTDIR=xpra-$VERSION-prebuilt-docs
TARBALL=$OUTDIR.tar.xz
-RPMFILE=xpra-common-4.4.3-10.el8.noarch.rpm
+RPMFILE=xpra-common-5.0.4-10.r0.el8.x86_64.rpm
URL=https://www.xpra.org/dists/CentOS/8/x86_64/$RPMFILE
# only download the file if we don't already have it.
diff --git a/desktop/xpra/setup_cuda_bin.diff b/desktop/xpra/setup_cuda_bin.diff
deleted file mode 100644
index c0286e62dc..0000000000
--- a/desktop/xpra/setup_cuda_bin.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Naur xpra-4.4.3/setup.py xpra-4.4.3.patched/setup.py
---- xpra-4.4.3/setup.py 2022-11-27 09:21:57.000000000 -0500
-+++ xpra-4.4.3.patched/setup.py 2023-01-12 13:02:42.255843773 -0500
-@@ -2045,8 +2045,8 @@
-
- nvidia_ENABLED = nvenc_ENABLED or nvfbc_ENABLED or nvjpeg_encoder_ENABLED or nvjpeg_decoder_ENABLED
- toggle_packages(nvidia_ENABLED, "xpra.codecs.nvidia")
-+CUDA_BIN = f"{share_xpra}/cuda"
- if nvidia_ENABLED:
-- CUDA_BIN = f"{share_xpra}/cuda"
- #find nvcc:
- from xpra.util import sorted_nicely # pylint: disable=import-outside-toplevel
- path_options = os.environ.get("PATH", "").split(os.path.pathsep)
diff --git a/desktop/xpra/xpra.SlackBuild b/desktop/xpra/xpra.SlackBuild
index 98d1017726..4c0239070a 100644
--- a/desktop/xpra/xpra.SlackBuild
+++ b/desktop/xpra/xpra.SlackBuild
@@ -6,6 +6,9 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20240126 bkw: update for v5.0.4.
+# - add xpra-html5-10.1, by request from Andrew Randrianasulu.
+# - make the config files .new!
# 20230112 bkw: update for v4.4.3.
# 20221217 bkw: BUILD=2.
# - fix paths in config file (do not include $PKG).
@@ -13,7 +16,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=xpra
-VERSION=${VERSION:-4.4.3}
+VERSION=${VERSION:-5.0.4}
+HTML5VER=${HTML5VER:-10.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -46,13 +50,11 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
+tar xvf $CWD/xpra-html5-$HTML5VER.tar.gz
tar xvf $CWD/$PRGNAM-$VERSION-prebuilt-docs.tar.xz
chown -R root:root .
-find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
- \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-
-# setup.py is slightly broken...
-patch -p1 < $CWD/setup_cuda_bin.diff
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
sed -i 's,"share/man","man",' setup.py
@@ -107,9 +109,26 @@ mkdir -p $PKGDOC/html
# prebuilt docs. See mkdoc.sh for details.
cp -a $PRGNAM-$VERSION-prebuilt-docs/* $PKGDOC/html
+# 20240127 bkw: include the html5 server-side stuff.
+# Nonstandard setup.py, uses positional arguments, undocumented.
+# Adapted from packaging/rpm/xpra-html5.spec in the xpra-html5 src, and
+# from looking at the finished rpm package. See also the doinst.sh!
+cd xpra-html5-$HTML5VER
+ python3 setup.py install $PKG /usr/share/xpra/www/ /etc/xpra/html5-client copy
+ mkdir $PKGDOC/xpra-html5-$HTML5VER
+ # The RPM doesn't include these, but they look useful:
+ cp -a LICENSE *.md docs $PKGDOC/xpra-html5-$HTML5VER
+cd -
+
cp -a COPYING README.md $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+# 20240127 bkw: lots of config files. Maybe not all of them are really meant
+# to be user-edited, but it's easier to treat them all the same way here.
+find $PKG/etc/xpra -type f | while read f; do
+ mv $f $f.new
+done
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
diff --git a/desktop/xpra/xpra.info b/desktop/xpra/xpra.info
index 22a42352c7..31a7c87a94 100644
--- a/desktop/xpra/xpra.info
+++ b/desktop/xpra/xpra.info
@@ -1,10 +1,12 @@
PRGNAM="xpra"
-VERSION="4.4.3"
+VERSION="5.0.4"
HOMEPAGE="https://www.xpra.org/"
-DOWNLOAD="https://github.com/Xpra-org/xpra/archive/v4.4.3/xpra-4.4.3.tar.gz \
- https://slackware.uk/~urchlay/src/xpra-4.4.3-prebuilt-docs.tar.xz"
-MD5SUM="ea3902b22ff8e8e644bfed1234111ce0 \
- bba809186bfc781c8a8e676c0fed79bb"
+DOWNLOAD="https://github.com/Xpra-org/xpra/archive/v5.0.4/xpra-5.0.4.tar.gz \
+ https://github.com/Xpra-org/xpra-html5/archive/v10.1/xpra-html5-10.1.tar.gz \
+ https://slackware.uk/~urchlay/src/xpra-5.0.4-prebuilt-docs.tar.xz"
+MD5SUM="4d8a7abd2efbb6d597f5bf4e295e4bae \
+ a3b534f7529fa801fd7f947a7125a9bd \
+ 9cd81de5ce4f74e6a50e265a5454d77f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""