Package: xpra Version: 0.17.6+dfsg-1 Severity: important Tags: patch Hello,
the version in Debian is very old and according to the upstream maintainer contains multiple security relevant bugs (therefore the important severity; sadly there's no specific list available). Please update the package to the latest version. Attached are patches to package the current version 2.0.2, works fine here but was only tested for a few days on my system. The diff also simplifies debian/rules a little, removes some patches which I think are no longer necessary (deviation from upstream should be minimal, but this decision might be debatable), enables all hardening options and enables x265 support (untested). If you don't have the time to package xpra on your own I'd be happy to help packaging the latest upstream versions. Regards Simon -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9
diff -u -r xpra-0.17.6+dfsg/debian/control xpra-2.0.2/debian/control
--- xpra-0.17.6+dfsg/debian/control 2016-11-10 17:24:08.000000000 +0100
+++ xpra-2.0.2/debian/control 2017-06-08 23:46:30.484992778 +0200
@@ -8,10 +8,12 @@
,libavcodec-dev (>= 7:3.1.3~)
,libavutil-dev (>= 7:3.1.3~)
,libswscale-dev (>= 7:3.1.3~)
+ ,libavformat-dev
,libvpx-dev (>= 1.6.0~)
,libwebp-dev
,libx11-dev
,libx264-dev
+ ,libx265-dev
,libxcomposite-dev
,libxdamage-dev
,libxkbfile-dev
diff -u -r xpra-0.17.6+dfsg/debian/patches/buildinfo.patch xpra-2.0.2/debian/patches/buildinfo.patch
--- xpra-0.17.6+dfsg/debian/patches/buildinfo.patch 2016-07-03 13:03:21.000000000 +0200
+++ xpra-2.0.2/debian/patches/buildinfo.patch 2017-06-08 23:37:13.286484254 +0200
@@ -8,39 +8,37 @@
* inject package version as "changes".
* reduce determinism (reproducible build).
---- a/add_build_info.py
-+++ b/add_build_info.py
-@@ -202,9 +202,9 @@
- return "Microsoft Windows"
- if sys.platform.find("bsd")>=0:
- return "BSD"
- if sys.platform.find("linux")>=0 and hasattr(platform, "linux_distribution"):
-- return "Linux %s" % (" ".join(platform.linux_distribution()))
-+ return "%s" % (" ".join(platform.linux_distribution()))
+Index: xpra-2.0.2/add_build_info.py
+===================================================================
+--- xpra-2.0.2.orig/add_build_info.py
++++ xpra-2.0.2/add_build_info.py
+@@ -211,7 +211,7 @@ def get_platform_name():
+ from xpra.os_util import get_linux_distribution
+ ld = get_linux_distribution()
+ if ld:
+- return "Linux %s" % (" ".join(ld))
++ return "%s" % (" ".join(ld))
+ except:
+ pass
return sys.platform
-
-
- BUILD_INFO_FILE = "./xpra/build_info.py"
-@@ -216,12 +216,13 @@
- import getpass
+@@ -227,11 +227,12 @@ def record_build_info(is_build=True):
set_prop(props, "BUILT_BY", getpass.getuser())
except:
set_prop(props, "BUILT_BY", os.environ.get("USER"))
- set_prop(props, "BUILT_ON", socket.gethostname())
- set_prop(props, "BUILD_DATE", datetime.date.today().isoformat())
- set_prop(props, "BUILD_TIME", datetime.datetime.now().strftime("%H:%M"))
-- set_prop(props, "BUILD_CPU", get_cpuinfo())
+ set_prop(props, "BUILT_BY", "Debian")
+ set_prop(props, "BUILT_ON", "Debian")
+ set_prop(props, "BUILD_DATE", subprocess.Popen("date -u --date=\"$(dpkg-parsechangelog -SDate)\" +%F", stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True).stdout.read()[:-1])
+ set_prop(props, "BUILD_TIME", subprocess.Popen("date -u --date=\"$(dpkg-parsechangelog -SDate)\" +%R", stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True).stdout.read()[:-1])
+ set_prop(props, "BUILD_MACHINE", get_machineinfo())
+- set_prop(props, "BUILD_CPU", get_cpuinfo())
+ set_prop(props, "BUILD_CPU", "Generic CPU")
set_prop(props, "BUILD_BIT", platform.architecture()[0])
set_prop(props, "BUILD_OS", get_platform_name())
try:
- from Cython import __version__ as cython_version
-@@ -268,9 +269,9 @@
- "REVISION" : "unknown",
+@@ -280,7 +281,7 @@ def get_svn_props():
"LOCAL_MODIFICATIONS" : "unknown"
}
#find revision:
@@ -49,9 +47,7 @@
(out, _) = proc.communicate()
if proc.returncode!=0:
print("'svnversion -n' failed with return code %s" % proc.returncode)
- return props
-@@ -295,9 +296,9 @@
- rev = int(rev_str)
+@@ -307,7 +308,7 @@ def get_svn_props():
props["REVISION"] = rev
#find number of local files modified:
changes = 0
@@ -60,9 +56,7 @@
(out, _) = proc.communicate()
if proc.poll()!=0:
print("could not get status of local files")
- return props
-@@ -327,9 +328,10 @@
- if ignore:
+@@ -339,7 +340,8 @@ def get_svn_props():
continue
changes += 1
print("WARNING: found modified file: %s" % filename)
@@ -72,4 +66,3 @@
return props
SRC_INFO_FILE = "./xpra/src_info.py"
- def record_src_info():
Only in xpra-2.0.2/debian/patches: fix-install-path.patch
Only in xpra-2.0.2/debian/patches: fix-systemd-service-path.patch
diff -u -r xpra-0.17.6+dfsg/debian/patches/series xpra-2.0.2/debian/patches/series
--- xpra-0.17.6+dfsg/debian/patches/series 2016-08-28 17:12:03.000000000 +0200
+++ xpra-2.0.2/debian/patches/series 2017-06-13 10:22:24.935740935 +0200
@@ -1,15 +1,18 @@
-build-no-strict-prototypes-gtkitemfactory.patch
+#build-no-strict-prototypes-gtkitemfactory.patch
## Misc.
buildinfo.patch
-disable_html5.patch
-fakexinerama.patch
-quality-levels.patch
+#disable_html5.patch
+#fakexinerama.patch
+#quality-levels.patch
## Config customisations:
-conf-default-codec-order.patch
-conf-default-speaker.patch
-conf-default-xsession.patch
+#conf-default-codec-order.patch
+#conf-default-speaker.patch
+#conf-default-xsession.patch
## Fixes
#libav-no0RGB.patch
+
+fix-install-path.patch
+fix-systemd-service-path.patch
diff -u -r xpra-0.17.6+dfsg/debian/rules xpra-2.0.2/debian/rules
--- xpra-0.17.6+dfsg/debian/rules 2016-07-03 13:03:21.000000000 +0200
+++ xpra-2.0.2/debian/rules 2017-06-13 10:22:10.039644309 +0200
@@ -1,29 +1,23 @@
#!/usr/bin/make -f
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+BUILDOPTS := --with-verbose --with-Xdummy --without-Xdummy_wrapper --without-html5
-export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
-export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
-BUILDOPTS= --with-verbose --with-Xdummy --without-Xdummy_wrapper
%:
dh $@ --with python2
override_dh_auto_build:
dh_auto_build -- $(BUILDOPTS)
- # Build Fakexinerama
- cd fakexinerama \
- && gcc -O2 -Wall $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) fakeXinerama.c -fPIC -o libfakeXinerama.so.1.0 -shared
-
-override_dh_installchangelogs:
- dh_installchangelogs NEWS
override_dh_auto_install:
- dh_auto_install --destdir=$(CURDIR)/debian/xpra -- $(BUILDOPTS)
- # Install Fakexinerama
- install -pm 0644 fakexinerama/libfakeXinerama.so* $(CURDIR)/debian/xpra/usr/lib/xpra/
+ dh_auto_install -- $(BUILDOPTS)
# Post-install clean-up
- $(RM) -v debian/xpra/usr/share/xpra/COPYING debian/xpra/usr/bin/xpra_Xdummy debian/xpra/usr/share/xpra/README
+ chmod -x debian/xpra/etc/default/xpra
+ rm -v debian/xpra/usr/share/xpra/COPYING debian/xpra/usr/share/xpra/README
+
+override_dh_installchangelogs:
+ dh_installchangelogs NEWS
override_dh_strip:
dh_strip --dbgsym-migration='xpra-dbg (<< 0.17.1~)'
Only in xpra-0.17.6+dfsg/debian: xpra.dirs
Index: xpra-2.0.2/setup.py
===================================================================
--- xpra-2.0.2.orig/setup.py
+++ xpra-2.0.2/setup.py
@@ -763,6 +763,12 @@ def get_base_conf_dir(install_dir, strip
#ie: "???/tmp/???/tags/v0.15.x/src/debian/tmp/" -> ""
while "tmp" in dirs:
dirs = dirs[dirs.index("tmp")+1:]
+ elif "debian" in dirs:
+ #same for recent debian versions:
+ #ie: "xpra-2.0.2/debian/xpra/usr" -> "usr"
+ i = dirs.index("debian")
+ if dirs[i+1] == "xpra":
+ dirs = dirs[i+2:]
elif "BUILDROOT" in dirs:
#strip rpm style build root:
#[$HOME, "rpmbuild", "BUILDROOT", "xpra-$VERSION"] -> []
Index: xpra-2.0.2/setup.py
===================================================================
--- xpra-2.0.2.orig/setup.py
+++ xpra-2.0.2/setup.py
@@ -1972,7 +1972,7 @@ else:
if service_ENABLED:
#Linux init service:
if os.path.exists("/bin/systemctl"):
- add_data_files("/usr/lib/systemd/system/", ["service/xpra.service"])
+ add_data_files("/lib/systemd/system/", ["service/xpra.service"])
else:
add_data_files("/etc/init.d/", ["service/xpra"])
if os.path.exists("/etc/sysconfig"):
signature.asc
Description: PGP signature

