Hello community, here is the log from the commit of package steamtricks for openSUSE:Factory checked in at 2017-05-20 10:13:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/steamtricks (Old) and /work/SRC/openSUSE:Factory/.steamtricks.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "steamtricks" Sat May 20 10:13:54 2017 rev:3 rq:496454 version:0.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/steamtricks/steamtricks.changes 2017-02-16 17:06:02.595423122 +0100 +++ /work/SRC/openSUSE:Factory/.steamtricks.new/steamtricks.changes 2017-05-20 10:14:12.531258046 +0200 @@ -1,0 +2,16 @@ +Thu May 18 22:09:27 UTC 2017 - ji...@boombatower.com + +- Update to version 0.3.0: + * Suspend event processing while apps are running. + * Check if new packages are available before prompting the user. + * Escape single quotes in strip_quotes() to resolve parsing issues. + * Look for an installable data package for each app. + * Add strip_name() to clean app_name before trying as package name. + * Rework command line parsing to pave the way for commands. + * Add apply command to force apply fixes to an app. + * Correct dependency cache read so that both variables are loaded. + * Disable openssl replacement when nvidia binary driver detected. + * Allow for multi-part .so version numbers and .bin files in dep list regex. + * Update README to include more information. + +------------------------------------------------------------------- Old: ---- steamtricks-0.2.1.tar.xz New: ---- steamtricks-0.3.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ steamtricks.spec ++++++ --- /var/tmp/diff_new_pack.bEQkWW/_old 2017-05-20 10:14:13.915062527 +0200 +++ /var/tmp/diff_new_pack.bEQkWW/_new 2017-05-20 10:14:13.915062527 +0200 @@ -17,12 +17,12 @@ Name: steamtricks -Version: 0.2.1 +Version: 0.3.0 Release: 0 -Summary: Provides workarounds for problems with Steam on Linux +Summary: Workarounds for problems with Steam on Linux License: GPL-2.0 Group: Amusements/Games/Other -Url: https://github.com/steamtricks/steamtricks +Url: https://steamtricks.github.io/steamtricks/ Source: %{name}-%{version}.tar.xz BuildArch: noarch BuildRequires: systemd-rpm-macros @@ -42,9 +42,9 @@ %description steamtricks provides workarounds for problems with Steam on Linux. -Valve has made it clear that support for the wider base of Linux distributions -is not a priority. This has led to a number of suboptimal experiences for users -not on an officially supported distribution. The goal of this project is to +Steam primarily targets Ubuntu and not the wider base of Linux distributions. +This has led to a number of suboptimal experiences for users not on an +officially supported distribution. The goal of this project is to provide workarounds and solutions to those problems in an easy to use package. Currently, workarounds exist in some distribution packages and in various forums and the like. This project aims to be the upstream source for packaging Steam ++++++ _service ++++++ --- /var/tmp/diff_new_pack.bEQkWW/_old 2017-05-20 10:14:13.951057441 +0200 +++ /var/tmp/diff_new_pack.bEQkWW/_new 2017-05-20 10:14:13.951057441 +0200 @@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="disabled"> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">refs/tags/0.2.1</param> + <param name="revision">refs/tags/0.3.0</param> <param name="url">https://github.com/steamtricks/steamtricks.git</param> <param name="scm">git</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.bEQkWW/_old 2017-05-20 10:14:13.979053486 +0200 +++ /var/tmp/diff_new_pack.bEQkWW/_new 2017-05-20 10:14:13.979053486 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/steamtricks/steamtricks.git</param> - <param name="changesrevision">41bd88ae70f8b0f9798f08fbf399c10ab8589f9a</param> + <param name="changesrevision">6915f807250362dd73ea0f50fd2bd1487f7c3046</param> </service> </servicedata> ++++++ steamtricks-0.2.1.tar.xz -> steamtricks-0.3.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/steamtricks-0.2.1/README.md new/steamtricks-0.3.0/README.md --- old/steamtricks-0.2.1/README.md 2017-02-14 23:58:50.000000000 +0100 +++ new/steamtricks-0.3.0/README.md 2017-05-18 23:56:08.000000000 +0200 @@ -2,9 +2,9 @@ steamtricks provides workarounds for problems with Steam on Linux. -Valve has made it clear that support for the wider base of Linux distributions -is not a priority. This has led to a number of suboptimal experiences for users -not on an officially supported distribution. The goal of this project is to +Steam primarily targets Ubuntu and not the wider base of Linux distributions. +This has led to a number of suboptimal experiences for users not on an +officially supported distribution. The goal of this project is to provide workarounds and solutions to those problems in an easy to use package. Currently, workarounds exist in some distribution packages and in various forums and the like. This project aims to be the upstream source for packaging Steam @@ -17,3 +17,18 @@ - steam-runtime compatability issues fixes - steam app dependency resolution and compatability fixes - automated tests for all Linux games on Steam + +## contribute + +See the [steamtricks wiki](https://github.com/steamtricks/steamtricks/wiki) for +details on how to: + +- report issues +- develop steamtricks +- create app specific fixes +- package steamtricks + +## tour + +Visit [steamtricks.github.io](https://steamtricks.github.io/steamtricks/) for a +tour of the end-user experience. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/steamtricks-0.2.1/src/steamtricks new/steamtricks-0.3.0/src/steamtricks --- old/steamtricks-0.2.1/src/steamtricks 2017-02-14 23:58:50.000000000 +0100 +++ new/steamtricks-0.3.0/src/steamtricks 2017-05-18 23:56:08.000000000 +0200 @@ -46,6 +46,20 @@ local clean="$1" clean="${clean%\"}" clean="${clean#\"}" + # escape single quotes + clean="${clean//\'/\'\"\'\"\'}" + echo "$clean" +} + +strip_name() +{ + local clean="$1" + clean="${clean// /_}" + clean="${clean//\$/}" + clean="${clean//_&_/}" + clean="${clean//&/}" + clean="${clean//:/}" + clean="${clean//;/}" echo "$clean" } @@ -295,14 +309,15 @@ local cache="$CONFIG_CACHE_DIR/$app_id" local cache_files cache_needs if [ -f "$cache" ] ; then - read cache_files cache_needs <<< $(cat "$cache") + read -d "\n" cache_files cache_needs <<< $(cat "$cache") echo "cache loaded" echo "-> files: $cache_files" echo "-> needs: $cache_needs" fi - # limit dep check to .so files or files with no . at all (presumed executable) - find . -type f -regextype posix-extended -regex ".*/((.+(\.so(\.[0-9]+)?))|([^.]+))$" > $prefix-files + # limit dep check to .so/.bin or files with no . at all (presumed executable) + find . -type f -regextype posix-extended -regex \ + ".*/((.+(\.so(\.[0-9]+)*|\.bin(\..*)?))|([^.]+))$" > $prefix-files local sha1_files=$(sha1 $prefix-files) if [ "$sha1_files" == "$cache_files" ] ; then echo "file list identical" @@ -313,25 +328,31 @@ echo "evaluating binaries..." local provides=$(/usr/lib/rpm/find-provides < $prefix-files | sort | tee $prefix-provides | wc -l) local requires=$(/usr/lib/rpm/find-requires < $prefix-files | sort | tee $prefix-requires | wc -l) + # look for data package for the app in question + echo "steamtricks-data-$app_id" >> $prefix-requires + echo "steamtricks-data-$app_id-$(strip_name "$app_name")" >> $prefix-requires local needs=$(comm -23 $prefix-requires $prefix-provides | tee $prefix-needs | wc -l) local sha1_needs=$(sha1 $prefix-needs) echo "-> provides: $provides, requires: $requires, needs: $needs" - # check if previous deps differ from current and prompt to install if changed. - # It would be preferable to be able to check if any dependencies are available - # and not installed, but `zypper search --provides` does not differentiate - # between 32bit and 64bit packages so it would be non-trivial. Alternatively - # updating `zypper in --dry-run` to work without sudo would allow a check - # before prompting. In the meantime the best that can be done is cache. - local return + # check if previous deps differ from current + local return=0 if [ "$sha1_needs" != "$cache_needs" ] ; then - xdg-terminal '/usr/bin/env bash -c " \ - echo \"steamtricks is attempting to install dependencies for '"$app_name"'.\"; \ - sudo zypper in -C $(cat '$prefix-needs') || sleep 5"' - return=1 + # check if new packages to install before prompting the user + output=$(zypper --root / --no-refresh --non-interactive --ignore-unknown \ + in --dry-run --capability $(cat $prefix-needs) 2>&1) + # the least language specific way to determine if new packages to install + if [ $? -eq 0 ] && echo "$output" | tail -n 1 | grep "(y): y" > /dev/null ; then + echo "-> new packages to install, prompt user" + xdg-terminal '/usr/bin/env bash -c " \ + echo \"steamtricks is attempting to install dependencies for '"$app_name"'.\"; \ + sudo zypper in -C $(cat '$prefix-needs') || sleep 5"' + return=1 + else + echo "-> change in needs, but no new matching packages" + fi else echo "-> nothing new" - return=0 fi # at minimum sha1_files changed @@ -375,6 +396,25 @@ fi } +steam_app_running_wait() +{ + # Allow for multiple apps to be launched simultaneously which will result in + # duplicate wait calls once all apps are closed and logs are processed. All + # apps launched from steam are parented by a SteamChildMonit process. Once + # there are no more processes there are no Steam apps running. + if [ "$(pgrep -cx SteamChildMonit)" != "0" ] ; then + echo "suspending event processing while apps are running" + else + return + fi + + until [ "$(pgrep -cx SteamChildMonit)" == "0" ] ; do + # avoid resource usage while app is running + sleep 10 + done + echo "resuming event processing" +} + steam_content_log_watch() { echo -n "waiting for steam to start..." @@ -421,6 +461,12 @@ steamtricks_fix_fetch ${parts[3]} ;; *"state changed : Fully Installed,Update Running,") steamtricks_fix_apply ${parts[3]} ;; + *"state changed : Fully Installed,App Running,") + steam_app_running_wait ;; + + # commands + "steamtricks_fix_apply"*) + steamtricks_fix_apply ${parts[1]} ;; esac done @@ -459,6 +505,17 @@ done } +steam_openssl_replace_check() +{ + # check if nvidia is active using glxinfo and fallback to lsmod + if (which glxinfo && glxinfo | grep "server glx vendor string: NVIDIA") > /dev/null || \ + [ $(lsmod | grep "nvidia" | wc -l) -ne 0 ] ; then + echo "detected nvidia binary driver, disabling openssl replacement" + return 1 + fi + return 0 +} + steamtricks_data_dir() { # check for config override, but allow git to win @@ -516,30 +573,41 @@ -h, --help Display this message and exit Commands: -clean Clean steam-runtime and steamapps directories +apply [APP_ID] Force apply fixes to an app +clean Clean steam-runtime and steamapps directories (default) _EOF_ } -steamtricks_handle_option() +steamtricks_command_apply() { + local app_id="$1" + rm -f "$CONFIG_CACHE_DIR/$app_id" + echo "steamtricks_fix_apply $app_id" >> "$STEAM_DIR/logs/content_log.txt" +} + +until [ $# -eq 0 ] ; do case "$1" in --version) echo "$STEAMTRICKS_VERSION"; exit 0; ;; --watch) STEAMTRICKS_WATCH=1 ;; -h|--help) steamtricks_usage ; exit 0 ;; + apply) + if [ $# -lt 2 ] ; then + echo "an app ID is required" + else + steamtricks_command_apply "$2" + fi + exit ;; + clean) ;; -*) echo "unknown option $1" ; exit 1 ;; - *) return 1 ;; + *) echo "unknown command $1" ; exit 1 ;; esac - return 0 -} - -while steamtricks_handle_option $1 ; do shift done # initial boot steamtricks_config remove_incompatible_files_runtime -if test "$STEAM_OPENSSL_REPLACE" == 1 ; then +if test "$STEAM_OPENSSL_REPLACE" == 1 && steam_openssl_replace_check ; then steam_openssl_replace fi