Bug#956122: steamcmd: installs directly into ~/.steam, which is not as intended by upstream
Simon McVittie
smcv at collabora.com
Tue Apr 7 16:47:34 BST 2020
Package: steamcmd
Version: 0~20180105-3
Severity: important
Forwarding this downstream from
https://github.com/ValveSoftware/steam-for-linux/issues/6976 since it
seems to be a Debian-specific packaging bug.
Steps to reproduce
==================
* Create a new user with an empty home directory
* Run steamcmd as that user
Expected result
===============
* There is some directory, the *Steam installation directory*, which has
a location that is not ~/.steam
- This is referred to as $STEAMROOT in the steamcmd.sh script
- This is the Linux equivalent of C:\Program Files\Steam
- Historically, Valve used ~/Steam by default
- Recent-ish official Steam client packages from Valve use
~/.local/share/Steam by default
- The steam package in Debian uses ~/.steam/debian-installation
by default, which is a bit odd but OK (this was a compromise to
get #916303 fixed without creating anything that could be considered
to be extra clutter)
- Technically it can be almost anywhere, as long as it isn't ~/.steam
* ~/.steam/root is a symlink to the Steam installation directory
* ~/.steam/steam is also a symlink to the Steam installation directory
* The Steam installation directory contains a steamapps or SteamApps
subdirectory (I'm not sure which one is canonical)
Actual result
=============
* The Debian-specific /usr/games/steamcmd script (debian/scripts/steamcmd)
tries to use ~/.steam as the Steam installation directory, similar to
#916303 in the steam package
* steamcmd can't make ~/.steam/steam a symlink as intended, because a
directory ~/.steam/steam gets created first
* steamcmd gets mixed up between ~/.steam/steam/steamapps,
~/.steam/SteamApps and ~/Steam/steamapps, and sometimes tries to write to
one location and read from another, leading to various things not working
Workaround (1)
==============
Before running steamcmd as a particular user, run steam as that same user.
Workaround (2)
==============
mkdir -p ~/.local/share/Steam
mkdir ~/.steam
ln -s ~/.local/share/Steam ~/.steam/root
ln -s ~/.local/share/Steam ~/.steam/steam
(Or you can use "${XDG_DATA_HOME:-"$HOME/.local/share"}/Steam" or
~/.steam/debian-installation or ~/Steam instead of
~/.local/share/Steam, if preferred.)
Possible solution
=================
In
https://sources.debian.org/src/steamcmd/0%7E20180105-3/debian/scripts/steamcmd/
replace this:
if [ ! -e ~/.steam ]
then
mkdir -p ~/.steam/appcache/
mkdir -p ~/.steam/config/
mkdir -p ~/.steam/logs/
mkdir -p ~/.steam/SteamApps/common/
ln -s ~/.steam ~/.steam/root
ln -s ~/.steam ~/.steam/steam
fi
with something like this:
if [ ! -e ~/.steam ]
then
STEAMROOT="${XDG_DATA_HOME:-"$HOME/.local/share"}"
mkdir -p "$STEAMROOT/appcache/"
mkdir -p "$STEAMROOT/config/"
mkdir -p "$STEAMROOT/logs/"
mkdir -p "$STEAMROOT/steamapps/common/"
ln -s "$STEAMROOT" ~/.steam/root
ln -s "$STEAMROOT" ~/.steam/steam
fi
Then copy steamcmd.sh into "$STEAMROOT/", and the linux32/steamcmd
executable into "$STEAMROOT/linux32/", instead of copying them into
~/.steam.
smcv
More information about the Pkg-games-devel
mailing list