Skip to content

Instantly share code, notes, and snippets.

@K900
Created June 4, 2025 14:33
Show Gist options
  • Save K900/7c2724ba6141c75238d8a3baf6e39553 to your computer and use it in GitHub Desktop.
Save K900/7c2724ba6141c75238d8a3baf6e39553 to your computer and use it in GitHub Desktop.
diff -ru 82/steam-launcher/bin_steamdeps.py 83/steam-launcher/bin_steamdeps.py
--- 82/steam-launcher/bin_steamdeps.py 2024-10-03 20:47:21.000000000 +0300
+++ 83/steam-launcher/bin_steamdeps.py 2025-04-24 12:56:50.000000000 +0300
@@ -3,12 +3,11 @@
This script handles installing system dependencies for games using the
Steam runtime. It is intended to be customized by other distributions
to "do the right thing"
-
- Usage: steamdeps dependencies.txt
"""
import argparse
import glob
+import io
import logging
import os
import re
@@ -42,10 +41,11 @@
SUPPORTED_STEAM_DEPENDENCY_VERSION = ['1']
# Environment variables that need to be passed through when we re-exec
-# under pkexec
+# under pkexec or sudo
PASS_THROUGH_ENV_VARS = (
'SL_TEST_NVIDIA_VERSION',
'STEAM_LAUNCHER_VERBOSE',
+ 'WSL_DISTRO_NAME',
'XDG_CURRENT_DESKTOP',
)
@@ -574,6 +574,15 @@
argv.append('--setenv={}={}'.format(var, os.environ[var]))
+def as_root_adverb():
+ if 'WSL_DISTRO_NAME' in os.environ:
+ # polkitd/pkexec isn't set up correctly in WSL, so assume that we
+ # have sudo available
+ return ['sudo']
+ else:
+ return ['pkexec']
+
+
###
def update_packages(packages, install_confirmation=True):
"""
@@ -591,10 +600,10 @@
logger.debug('Will install packages: %s', ' '.join(packages))
if not is_root():
- # We don't have root privileges, call again this script with pkexec
+ # We don't have root privileges, call again this script with
+ # sudo or pkexec as appropriate
logger.debug('Re-running steamdeps as root...')
- argv = [
- 'pkexec',
+ argv = as_root_adverb() + [
os.path.abspath(__file__),
'--interactive',
# We already showed the confirmation once, no need to repeat it
@@ -602,6 +611,7 @@
'--install',
' '.join(packages)
]
+
pass_through_environ(argv)
cp = run_subprocess(argv, universal_newlines=True)
return cp.returncode
@@ -617,40 +627,6 @@
return cp.returncode
-###
-def check_config(path, config):
- if "STEAM_RUNTIME" not in config:
- sys.stderr.write(
- "Missing STEAM_RUNTIME definition in %s\n" % path)
- return False
-
- if config["STEAM_RUNTIME"] not in SUPPORTED_STEAM_RUNTIME:
- sys.stderr.write(
- "Unsupported Steam runtime: %s\n" % config["STEAM_RUNTIME"])
- return False
-
- if "STEAM_DEPENDENCY_VERSION" not in config:
- sys.stderr.write(
- "Missing STEAM_DEPENDENCY_VERSION definition in %s\n" % path)
- return False
-
- if config["STEAM_DEPENDENCY_VERSION"]\
- not in SUPPORTED_STEAM_DEPENDENCY_VERSION:
- sys.stderr.write("Unsupported dependency version: %s\n" % config[
- "STEAM_DEPENDENCY_VERSION"])
- return False
-
- # Make sure we can use dpkg on this system.
- try:
- subprocess.call(['dpkg', '--version'], stdout=subprocess.PIPE)
- except FileNotFoundError:
- sys.stderr.write("Couldn't find dpkg, please update steamdeps for "
- "your distribution.\n")
- return False
-
- return True
-
-
def update_installed_packages(packages):
# Get the installed package versions
# Make sure COLUMNS isn't set, or dpkg will truncate its output
@@ -725,11 +701,14 @@
)
parser.add_argument(
'dependencies',
- metavar='$HOME/.steam/root/steamdeps.txt',
+ metavar='IGNORED',
nargs='?',
- help='Path to steamdeps.txt',
+ help='Ignored for backwards compatibility',
+ )
+ parser.set_defaults(
+ dependencies='',
+ install_confirmation=True,
)
- parser.set_defaults(install_confirmation=True)
args = parser.parse_args()
if args.setenv:
@@ -741,19 +720,6 @@
var, val = pair.split('=', 1)
os.environ[var] = val
- if args.install and args.dependencies:
- parser.print_usage(sys.stderr)
- sys.stderr.write(
- "The steamdeps.txt path and --install cannot both be used\n"
- )
- return 2
- elif not args.install and not args.dependencies:
- parser.print_usage(sys.stderr)
- sys.stderr.write(
- "One between the steamdeps.txt path and --install is required\n"
- )
- return 2
-
if 'STEAM_LAUNCHER_VERBOSE' in os.environ:
logging.getLogger().setLevel(logging.DEBUG)
@@ -763,6 +729,9 @@
os_release.dump()
return 0
+ if args.dependencies:
+ logger.warning('Dependency file %r ignored', args.dependencies)
+
if args.install:
if args.dry_run:
logger.debug('Not actually installing %r', args.install)
@@ -809,11 +778,11 @@
'--update-apt',
]
pass_through_environ(argv)
- argv.append(os.path.abspath(args.dependencies))
+
cp = run_subprocess(argv, universal_newlines=True)
return cp.returncode
elif not is_root():
- # We don't have root privileges, call again this script with pkexec
+ # We don't have root privileges, call again this script with pkexec/sudo
print('The packages cache seems to be out of date')
input('\nPress return to update the list of available packages: ')
@@ -821,14 +790,13 @@
'Re-running steamdeps as root to be able to update apt '
'cache...',
)
- argv = [
- 'pkexec',
+ argv = as_root_adverb() + [
os.path.abspath(__file__),
'--interactive',
'--update-apt',
]
pass_through_environ(argv)
- argv.append(os.path.abspath(args.dependencies))
+
cp = run_subprocess(argv, universal_newlines=True)
return cp.returncode
@@ -838,53 +806,9 @@
update_apt()
- # Make sure we can open the file
- try:
- fp = open(args.dependencies)
- except Exception as e:
- sys.stderr.write("Couldn't open file: %s\n" % e)
- return 2
-
- # Look for configuration variables
- config_pattern = re.compile(r"(\w+)\s*=\s*(\w+)")
- for line in fp:
- line = line.strip()
- if line == "" or line[0] == '#':
- continue
-
- match = re.match(config_pattern, line)
- if match is not None:
- config[match.group(1)] = match.group(2)
-
- # Check to make sure we have a valid config
- if not check_config(args.dependencies, config):
- return 3
-
- # Seek back to the beginning of the file
- fp.seek(0)
-
# Load the package dependency information
packages = {}
dependencies = []
- for line in fp:
- line = line.strip()
- if line == "" or line[0] == '#':
- continue
-
- match = re.match(config_pattern, line)
- if match is not None:
- continue
-
- row = []
- for section in line.split("|"):
- package = create_package(section)
- if package is None:
- continue
-
- packages[package.name] = package
- row.append(package)
-
- dependencies.append(row)
ensure_installed_packages = set() # type: typing.Set[str]
archs = [get_arch()]
@@ -909,9 +833,8 @@
ensure_installed_packages.add(package.name)
- # Try to install these packages, even if they are not
- # listed in the steamdeps.txt file. If they are not available we
- # just inform the user about it and continue.
+ # Try to always install these packages. If they are not
+ # available we just inform the user about it and continue.
for additional_pkg in (
'steam-launcher',
'steam-libs-amd64:amd64',
diff -ru 82/steam-launcher/bin_steam.sh 83/steam-launcher/bin_steam.sh
--- 82/steam-launcher/bin_steam.sh 2024-10-03 20:50:56.000000000 +0300
+++ 83/steam-launcher/bin_steam.sh 2025-04-24 13:04:15.000000000 +0300
@@ -22,7 +22,7 @@
echo "bin_steam.sh[$$]: $*" >&2 || :
}
-export STEAMSCRIPT_VERSION=1.0.0.82
+export STEAMSCRIPT_VERSION=1.0.0.83
# Set up domain for script localization
export TEXTDOMAIN=steam
@@ -300,6 +300,13 @@
cp "$LAUNCHSTEAMBOOTSTRAPFILE" "$LAUNCHSTEAMDIR/bootstrap.tar.xz"
fi
+STEAMDEPS="${STEAMSCRIPT%/*}/steamdeps"
+if [ -x "$STEAMDEPS" ]; then
+ if ! "$STEAMDEPS"; then
+ log "Unable to install Steam dependencies by running $STEAMDEPS, trying to continue anyway..."
+ fi
+fi
+
# go to the install directory and run the client
cd "$LAUNCHSTEAMDIR"
Binary files 82/steam-launcher/bootstraplinux_ubuntu12_32.tar.xz and 83/steam-launcher/bootstraplinux_ubuntu12_32.tar.xz differ
diff -ru 82/steam-launcher/buildutils/add-client-files.py 83/steam-launcher/buildutils/add-client-files.py
--- 82/steam-launcher/buildutils/add-client-files.py 2024-10-03 20:47:21.000000000 +0300
+++ 83/steam-launcher/buildutils/add-client-files.py 2025-04-24 12:56:50.000000000 +0300
@@ -54,6 +54,7 @@
'steam-runtime-check-requirements', # run by steam.sh
'steam-runtime-identify-library-abi', # run by setup.sh
'steam-runtime-launch-client', # run by s-r-check-requirements
+ 'steam-runtime-supervisor', # run by steam.sh
'srt-logger', # (symlink) run by steam.sh
)
BOOTSTRAP_RUNTIME_AMD64_SONAMES = (
@@ -328,6 +329,7 @@
rel: str,
dest: str,
executable: bool = False,
+ missing_ok: bool = False,
) -> None:
for d in dirs:
if not d:
@@ -339,7 +341,8 @@
self.install(src, dest, executable=executable)
return
- raise RuntimeError(f'{rel} not found in {dirs}')
+ if not missing_ok:
+ raise RuntimeError(f'{rel} not found in {dirs}')
def _normalize_tar_entry(
self,
@@ -468,6 +471,7 @@
'steamdeps.txt',
os.path.join(tmpdir, 'bootstrap', ''),
executable=False,
+ missing_ok=True,
)
self.install_search(
(self.client_overlay, client_dir),
diff -ru 82/steam-launcher/client-versions.json 83/steam-launcher/client-versions.json
--- 82/steam-launcher/client-versions.json 2024-10-03 20:50:56.000000000 +0300
+++ 83/steam-launcher/client-versions.json 2025-04-24 13:04:14.000000000 +0300
@@ -1,4 +1,4 @@
{
- "client_version": "1726604483",
- "runtime_version": "0.20240806.97925"
+ "client_version": "1745269938",
+ "runtime_version": "1.0.20250307.120442"
}
diff -ru 82/steam-launcher/com.valvesoftware.Steam.metainfo.xml 83/steam-launcher/com.valvesoftware.Steam.metainfo.xml
--- 82/steam-launcher/com.valvesoftware.Steam.metainfo.xml 2024-10-03 20:47:21.000000000 +0300
+++ 83/steam-launcher/com.valvesoftware.Steam.metainfo.xml 2025-04-24 12:56:50.000000000 +0300
@@ -15,10 +15,12 @@
<category>Game</category>
<category>PackageManager</category>
</categories>
- <url type="homepage">https://store.steampowered.com</url>
+ <url type="homepage">https://store.steampowered.com/</url>
<url type="bugtracker">https://github.com/ValveSoftware/steam-for-linux/issues</url>
<project_license>LicenseRef-proprietary</project_license>
- <developer_name>Valve Corporation</developer_name>
+ <developer id="com.valvesoftware">
+ <name>Valve Corporation</name>
+ </developer>
<screenshots>
<screenshot>
<image type="source" width="1200" height="1026">https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/27766192/27b935179076c418c2f62f9440aba9c06161e4c0.jpg</image>
@@ -32,6 +34,7 @@
</screenshots>
<launchable type="desktop-id">steam.desktop</launchable>
<releases>
+ <release version="1.0.0.83" date="2025-04-24"/>
<release version="1.0.0.82" date="2024-10-03"/>
<release version="1.0.0.81" date="2024-08-15"/>
<release version="1.0.0.80" date="2024-04-22"/>
diff -ru 82/steam-launcher/debian/changelog 83/steam-launcher/debian/changelog
--- 82/steam-launcher/debian/changelog 2024-10-03 20:47:21.000000000 +0300
+++ 83/steam-launcher/debian/changelog 2025-04-24 12:56:50.000000000 +0300
@@ -1,3 +1,58 @@
+steam (1:1.0.0.83) beta; urgency=medium
+
+ * Build using updated Steam client:
+ - Client timestamp 1743554648 (2025-04-02)
+ - Steam Runtime (scout) version 1.0.20250307.120442
+ - Add steam-runtime-supervisor to the bootstrap mini-runtime.
+ It is now required by steam.sh (steamrt/tasks#714)
+ - Don't require steamdeps.txt to be present (steamrt/tasks#713)
+ * steam.desktop:
+ - Update URL used to implement the Community action (steamrt/tasks#715)
+ - Update URL used to implement the News action (steamrt/tasks#715)
+ - Consistently use an absolute path for the steam executable.
+ Previously we had an inconsistent mixture of an absolute path
+ (for the main menu entry) and the basename (for Desktop Actions).
+ We are installing Steam to a fixed location, so for predictable
+ behaviour we should make our .desktop file refer to that same
+ fixed location, and not some other executable named steam that
+ might happen to be in the $PATH.
+ Some users are known to have a script named steam earlier in
+ the $PATH; for example they might have a /usr/local/bin/steam
+ that passes extra options, sets environment variables, or runs
+ Steam wrapped by some sort of "adverb" command). After this
+ change, they would still be able to arrange for that script
+ to be invoked by desktop environments' menus by putting
+ a corresponding .desktop file earlier in $XDG_DATA_DIRS,
+ for example /usr/local/share/applications/steam.desktop or
+ ~/.local/share/applications/steam.desktop, which will take
+ precedence over ours.
+ Alternatively, in packaging systems that have `dpkg-divert` or
+ a similar mechanism, that mechanism can be used to divert the
+ wrapped executable.
+ (steamrt/tasks#700)
+ * bin_steam.sh:
+ - Take over responsibility for running steamdeps during
+ launch, no longer done by steam.sh (steamrt/tasks#713)
+ - Remove support for parsing steamdeps.txt (steamrt/tasks#713)
+ * bin_steamdeps.py:
+ - Use sudo instead of pkexec if running under WSL.
+ polkitd/pkexec doesn't appear to be set up to work correctly in WSL.
+ (steamrt/tasks#624)
+ * Appstream metainfo:
+ - Normalize homepage URL
+ - Replace <developer_name> with <developer> as per Appstream 1.0
+ * Packaging:
+ - Depend on lsof (steamrt/tasks#647)
+ - Depend on a D-Bus session bus (steamrt/tasks#713)
+ - Add Recommends on xdg-desktop-portal and a backend.
+ This is used for the file chooser, among others.
+ (steamrt/tasks#713)
+ * Tests/CI:
+ - Only install software-properties-common where required
+ (LTS and EOL versions of Debian)
+
+ -- Simon McVittie <[email protected]> Thu, 24 Apr 2025 10:55:57 +0100
+
steam (1:1.0.0.82) beta; urgency=medium
* Build using updated Steam client:
diff -ru 82/steam-launcher/debian/control 83/steam-launcher/debian/control
--- 82/steam-launcher/debian/control 2024-10-03 20:47:21.000000000 +0300
+++ 83/steam-launcher/debian/control 2025-04-24 12:56:50.000000000 +0300
@@ -30,9 +30,11 @@
ca-certificates,
coreutils (>= 8.23-1~) | realpath,
curl,
+ default-dbus-session-bus | dbus-session-bus | dbus-x11,
file,
libc6 (>= 2.15),
libnss3 (>= 2:3.26),
+ lsof,
pkexec | policykit-1,
python3 (>= 3.4),
python3-apt,
@@ -42,6 +44,8 @@
Recommends: steam-libs-amd64,
steam-libs-i386,
sudo,
+ xdg-desktop-portal,
+ xdg-desktop-portal-gtk | xdg-desktop-portal-backend,
xdg-utils | steamos-base-files,
Description: Launcher for the Steam software distribution service
Steam is a software distribution service with an online store, automated
@@ -59,7 +63,8 @@
Package: steam-libs-amd64
Architecture: amd64
Multi-Arch: foreign
-Depends: libc6 (>= 2.15),
+Depends: default-dbus-session-bus | dbus-session-bus | dbus-x11,
+ libc6 (>= 2.15),
libcrypt1 | libc6 (<< 2.29-4),
libegl1 | libegl1-mesa,
libgbm1 | libgbm1-lts-xenial,
@@ -83,6 +88,8 @@
libxss1,
mesa-vulkan-drivers,
va-driver-all | va-driver,
+ xdg-desktop-portal,
+ xdg-desktop-portal-gtk | xdg-desktop-portal-backend,
Suggests: nvidia-driver-libs,
nvidia-vulkan-icd,
Description: Steam libraries metapackage
@@ -92,7 +99,8 @@
Package: steam-libs-i386
Architecture: i386
Multi-Arch: foreign
-Depends: libc6 (>= 2.15),
+Depends: default-dbus-session-bus | dbus-session-bus | dbus-x11,
+ libc6 (>= 2.15),
libcrypt1 | libc6 (<< 2.29-4),
libegl1 | libegl1-mesa,
libgbm1 | libgbm1-lts-xenial,
@@ -117,6 +125,8 @@
libxss1,
mesa-vulkan-drivers,
va-driver-all | va-driver,
+ xdg-desktop-portal,
+ xdg-desktop-portal-gtk | xdg-desktop-portal-backend,
Suggests: nvidia-driver-libs,
nvidia-vulkan-icd,
Description: Steam libraries metapackage
diff -ru 82/steam-launcher/steam 83/steam-launcher/steam
--- 82/steam-launcher/steam 2024-10-03 20:50:56.000000000 +0300
+++ 83/steam-launcher/steam 2025-04-24 13:04:15.000000000 +0300
@@ -22,7 +22,7 @@
echo "bin_steam.sh[$$]: $*" >&2 || :
}
-export STEAMSCRIPT_VERSION=1.0.0.82
+export STEAMSCRIPT_VERSION=1.0.0.83
# Set up domain for script localization
export TEXTDOMAIN=steam
@@ -300,6 +300,13 @@
cp "$LAUNCHSTEAMBOOTSTRAPFILE" "$LAUNCHSTEAMDIR/bootstrap.tar.xz"
fi
+STEAMDEPS="${STEAMSCRIPT%/*}/steamdeps"
+if [ -x "$STEAMDEPS" ]; then
+ if ! "$STEAMDEPS"; then
+ log "Unable to install Steam dependencies by running $STEAMDEPS, trying to continue anyway..."
+ fi
+fi
+
# go to the install directory and run the client
cd "$LAUNCHSTEAMDIR"
diff -ru 82/steam-launcher/steamdeps 83/steam-launcher/steamdeps
--- 82/steam-launcher/steamdeps 2024-10-03 20:47:21.000000000 +0300
+++ 83/steam-launcher/steamdeps 2025-04-24 12:56:50.000000000 +0300
@@ -3,12 +3,11 @@
This script handles installing system dependencies for games using the
Steam runtime. It is intended to be customized by other distributions
to "do the right thing"
-
- Usage: steamdeps dependencies.txt
"""
import argparse
import glob
+import io
import logging
import os
import re
@@ -42,10 +41,11 @@
SUPPORTED_STEAM_DEPENDENCY_VERSION = ['1']
# Environment variables that need to be passed through when we re-exec
-# under pkexec
+# under pkexec or sudo
PASS_THROUGH_ENV_VARS = (
'SL_TEST_NVIDIA_VERSION',
'STEAM_LAUNCHER_VERBOSE',
+ 'WSL_DISTRO_NAME',
'XDG_CURRENT_DESKTOP',
)
@@ -574,6 +574,15 @@
argv.append('--setenv={}={}'.format(var, os.environ[var]))
+def as_root_adverb():
+ if 'WSL_DISTRO_NAME' in os.environ:
+ # polkitd/pkexec isn't set up correctly in WSL, so assume that we
+ # have sudo available
+ return ['sudo']
+ else:
+ return ['pkexec']
+
+
###
def update_packages(packages, install_confirmation=True):
"""
@@ -591,10 +600,10 @@
logger.debug('Will install packages: %s', ' '.join(packages))
if not is_root():
- # We don't have root privileges, call again this script with pkexec
+ # We don't have root privileges, call again this script with
+ # sudo or pkexec as appropriate
logger.debug('Re-running steamdeps as root...')
- argv = [
- 'pkexec',
+ argv = as_root_adverb() + [
os.path.abspath(__file__),
'--interactive',
# We already showed the confirmation once, no need to repeat it
@@ -602,6 +611,7 @@
'--install',
' '.join(packages)
]
+
pass_through_environ(argv)
cp = run_subprocess(argv, universal_newlines=True)
return cp.returncode
@@ -617,40 +627,6 @@
return cp.returncode
-###
-def check_config(path, config):
- if "STEAM_RUNTIME" not in config:
- sys.stderr.write(
- "Missing STEAM_RUNTIME definition in %s\n" % path)
- return False
-
- if config["STEAM_RUNTIME"] not in SUPPORTED_STEAM_RUNTIME:
- sys.stderr.write(
- "Unsupported Steam runtime: %s\n" % config["STEAM_RUNTIME"])
- return False
-
- if "STEAM_DEPENDENCY_VERSION" not in config:
- sys.stderr.write(
- "Missing STEAM_DEPENDENCY_VERSION definition in %s\n" % path)
- return False
-
- if config["STEAM_DEPENDENCY_VERSION"]\
- not in SUPPORTED_STEAM_DEPENDENCY_VERSION:
- sys.stderr.write("Unsupported dependency version: %s\n" % config[
- "STEAM_DEPENDENCY_VERSION"])
- return False
-
- # Make sure we can use dpkg on this system.
- try:
- subprocess.call(['dpkg', '--version'], stdout=subprocess.PIPE)
- except FileNotFoundError:
- sys.stderr.write("Couldn't find dpkg, please update steamdeps for "
- "your distribution.\n")
- return False
-
- return True
-
-
def update_installed_packages(packages):
# Get the installed package versions
# Make sure COLUMNS isn't set, or dpkg will truncate its output
@@ -725,11 +701,14 @@
)
parser.add_argument(
'dependencies',
- metavar='$HOME/.steam/root/steamdeps.txt',
+ metavar='IGNORED',
nargs='?',
- help='Path to steamdeps.txt',
+ help='Ignored for backwards compatibility',
+ )
+ parser.set_defaults(
+ dependencies='',
+ install_confirmation=True,
)
- parser.set_defaults(install_confirmation=True)
args = parser.parse_args()
if args.setenv:
@@ -741,19 +720,6 @@
var, val = pair.split('=', 1)
os.environ[var] = val
- if args.install and args.dependencies:
- parser.print_usage(sys.stderr)
- sys.stderr.write(
- "The steamdeps.txt path and --install cannot both be used\n"
- )
- return 2
- elif not args.install and not args.dependencies:
- parser.print_usage(sys.stderr)
- sys.stderr.write(
- "One between the steamdeps.txt path and --install is required\n"
- )
- return 2
-
if 'STEAM_LAUNCHER_VERBOSE' in os.environ:
logging.getLogger().setLevel(logging.DEBUG)
@@ -763,6 +729,9 @@
os_release.dump()
return 0
+ if args.dependencies:
+ logger.warning('Dependency file %r ignored', args.dependencies)
+
if args.install:
if args.dry_run:
logger.debug('Not actually installing %r', args.install)
@@ -809,11 +778,11 @@
'--update-apt',
]
pass_through_environ(argv)
- argv.append(os.path.abspath(args.dependencies))
+
cp = run_subprocess(argv, universal_newlines=True)
return cp.returncode
elif not is_root():
- # We don't have root privileges, call again this script with pkexec
+ # We don't have root privileges, call again this script with pkexec/sudo
print('The packages cache seems to be out of date')
input('\nPress return to update the list of available packages: ')
@@ -821,14 +790,13 @@
'Re-running steamdeps as root to be able to update apt '
'cache...',
)
- argv = [
- 'pkexec',
+ argv = as_root_adverb() + [
os.path.abspath(__file__),
'--interactive',
'--update-apt',
]
pass_through_environ(argv)
- argv.append(os.path.abspath(args.dependencies))
+
cp = run_subprocess(argv, universal_newlines=True)
return cp.returncode
@@ -838,53 +806,9 @@
update_apt()
- # Make sure we can open the file
- try:
- fp = open(args.dependencies)
- except Exception as e:
- sys.stderr.write("Couldn't open file: %s\n" % e)
- return 2
-
- # Look for configuration variables
- config_pattern = re.compile(r"(\w+)\s*=\s*(\w+)")
- for line in fp:
- line = line.strip()
- if line == "" or line[0] == '#':
- continue
-
- match = re.match(config_pattern, line)
- if match is not None:
- config[match.group(1)] = match.group(2)
-
- # Check to make sure we have a valid config
- if not check_config(args.dependencies, config):
- return 3
-
- # Seek back to the beginning of the file
- fp.seek(0)
-
# Load the package dependency information
packages = {}
dependencies = []
- for line in fp:
- line = line.strip()
- if line == "" or line[0] == '#':
- continue
-
- match = re.match(config_pattern, line)
- if match is not None:
- continue
-
- row = []
- for section in line.split("|"):
- package = create_package(section)
- if package is None:
- continue
-
- packages[package.name] = package
- row.append(package)
-
- dependencies.append(row)
ensure_installed_packages = set() # type: typing.Set[str]
archs = [get_arch()]
@@ -909,9 +833,8 @@
ensure_installed_packages.add(package.name)
- # Try to install these packages, even if they are not
- # listed in the steamdeps.txt file. If they are not available we
- # just inform the user about it and continue.
+ # Try to always install these packages. If they are not
+ # available we just inform the user about it and continue.
for additional_pkg in (
'steam-launcher',
'steam-libs-amd64:amd64',
diff -ru 82/steam-launcher/steam.desktop 83/steam-launcher/steam.desktop
--- 82/steam-launcher/steam.desktop 2024-10-03 20:47:21.000000000 +0300
+++ 83/steam-launcher/steam.desktop 2025-04-24 12:56:50.000000000 +0300
@@ -65,7 +65,7 @@
Name[tr]=Mağaza
Name[uk]=Крамниця
Name[vi]=Cửa hàng
-Exec=steam steam://store
+Exec=/usr/bin/steam steam://store
[Desktop Action Community]
Name=Community
@@ -95,7 +95,7 @@
Name[tr]=Topluluk
Name[uk]=Спільнота
Name[vi]=Cộng đồng
-Exec=steam steam://url/SteamIDControlPage
+Exec=/usr/bin/steam steam://url/CommunityHome/
[Desktop Action Library]
Name=Library
@@ -125,7 +125,7 @@
Name[tr]=Kütüphane
Name[uk]=Бібліотека
Name[vi]=Thư viện
-Exec=steam steam://open/games
+Exec=/usr/bin/steam steam://open/games
[Desktop Action Servers]
Name=Servers
@@ -155,7 +155,7 @@
Name[tr]=Sunucular
Name[uk]=Сервери
Name[vi]=Máy chủ
-Exec=steam steam://open/servers
+Exec=/usr/bin/steam steam://open/servers
[Desktop Action Screenshots]
Name=Screenshots
@@ -185,7 +185,7 @@
Name[tr]=Ekran Görüntüleri
Name[uk]=Скріншоти
Name[vi]=Ảnh chụp
-Exec=steam steam://open/screenshots
+Exec=/usr/bin/steam steam://open/screenshots
[Desktop Action News]
Name=News
@@ -215,7 +215,7 @@
Name[tr]=Haberler
Name[uk]=Новини
Name[vi]=Tin tức
-Exec=steam steam://open/news
+Exec=/usr/bin/steam steam://openurl/https://store.steampowered.com/news
[Desktop Action Settings]
Name=Settings
@@ -245,11 +245,11 @@
Name[tr]=Ayarlar
Name[uk]=Налаштування
Name[vi]=Thiết lập
-Exec=steam steam://open/settings
+Exec=/usr/bin/steam steam://open/settings
[Desktop Action BigPicture]
Name=Big Picture
-Exec=steam steam://open/bigpicture
+Exec=/usr/bin/steam steam://open/bigpicture
[Desktop Action Friends]
Name=Friends
@@ -279,4 +279,4 @@
Name[tr]=Arkadaşlar
Name[uk]=Друзі
Name[vi]=Bạn bè
-Exec=steam steam://open/friends
+Exec=/usr/bin/steam steam://open/friends
diff -ru 82/steam-launcher/tests/bin_steamdeps.py 83/steam-launcher/tests/bin_steamdeps.py
--- 82/steam-launcher/tests/bin_steamdeps.py 2024-10-03 20:47:21.000000000 +0300
+++ 83/steam-launcher/tests/bin_steamdeps.py 2025-04-24 12:56:50.000000000 +0300
@@ -1,4 +1,5 @@
-# Copyright 2021 Collabora Ltd.
+#!/usr/bin/env python3
+# Copyright 2021-2025 Collabora Ltd.
# SPDX-License-Identifier: MIT
import os
@@ -16,7 +17,7 @@
class SteamdepsTestCase(unittest.TestCase):
- def test_dependencies(self):
+ def test_dependencies(self, steamdeps_content=None):
self.maxDiff = None
# Whitespace separated list
@@ -47,17 +48,22 @@
steamdeps = os.path.join(G_TEST_SRCDIR, "steamdeps")
- with NamedTemporaryFile(mode='w') as tmp_steamdeps:
- # This could be expanded by shipping different steamdeps.txt
- # files to test the parsing of dependencies too
- tmp_steamdeps.write("STEAM_RUNTIME=1\nSTEAM_DEPENDENCY_VERSION=1")
- tmp_steamdeps.flush()
-
+ if steamdeps_content is None:
cp = run_subprocess(
- [steamdeps, "--dry-run", tmp_steamdeps.name],
+ [steamdeps, "--dry-run"],
capture_output=True,
universal_newlines=True,
)
+ else:
+ with NamedTemporaryFile(mode='w') as tmp_steamdeps:
+ tmp_steamdeps.write(steamdeps_content)
+ tmp_steamdeps.flush()
+
+ cp = run_subprocess(
+ [steamdeps, "--dry-run", tmp_steamdeps.name],
+ capture_output=True,
+ universal_newlines=True,
+ )
stdout_list = cp.stdout.splitlines()
stderr_list = cp.stderr.splitlines()
@@ -109,6 +115,20 @@
if output_message:
self.assertIn(output_message, cp.stdout)
+ def test_deprecated_file(self):
+ # Its contents are ignored: we don't *actually* install hello
+ # any more
+ self.test_dependencies(
+ '''
+ STEAM_RUNTIME=1
+ STEAM_DEPENDENCY_VERSION=1
+
+ base-files
+ hello | goodbye
+ nonexistent-package
+ ''',
+ )
+
if __name__ == '__main__':
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment