Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New package: gamemode-1.6 #22291

Closed
wants to merge 2 commits into from
Closed

Conversation

toluschr
Copy link
Contributor

I'm reopening this, since I'm still interesting in having this package in the VoidLinux repos and the last three times a PR was opened for this, it didn't get merged. #19281

@toluschr
Copy link
Contributor Author

forgot to add patch

@RoundDuckKira-deprecated
Copy link
Contributor

RoundDuckKira-deprecated commented Sep 12, 2020

@toluschr as it seems here, it seems that gamemode itself didn't get imported into the Void repos. That said, gamemode 1.6 promotes the fact it has more systemd-free-friendly functionality in the form of elogind support, maybe I can help with editing the gamemode template to now feature 1.6 and get this package into Void?

@toluschr
Copy link
Contributor Author

Maybe I could get confirmation that the VoidLinux-Team is interested in including this in their repos. Otherwise updating it would be pointless.

Copy link
Member

@ericonr ericonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this uses polkit, I assume adding a system service doesn't make sense, right? Do you think you could at least vdoc the README, so people can have an offline reference about the need to run the daemon?

#include <sys/time.h>
#include <systemd/sd-daemon.h> /* TODO: Move usage to gamemode-dbus.c */
#include <unistd.h>
+#include <signal.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this patch been upstreamed?

Copy link
Contributor Author

@toluschr toluschr Sep 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, apparently not

revision=1
build_style=meson
configure_args="-Ddistro_install=true -Ddefault_library=both"
hostmakedepends="ninja"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't need to be listed, is implied by meson build style.

configure_args="-Dwith-examples=false -Dwith-systemd=false -Dwith-dbus-service-dir=/usr/share/dbus-1/services --prefix=/usr --buildtype debugoptimized"
hostmakedepends="git cmake meson ninja pkg-config"
makedepends="inih-devel dbus-devel elogind-devel"
depends="lib${pkgname}>=${version}_${revision} polkit"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lib${pkgname} should be detected automatically, since it's listed in common/shlibs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the gamemoderun binaries are not linked against libgamemode.

	<key>shlib-requires</key>
	<array>
		<string>libc.so.6</string>
		<string>libelogind.so.0</string>
		<string>libinih.so.0</string>
		<string>libdl.so.2</string>
		<string>libpthread.so.0</string>
	</array>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's still required, then. If someone has a game that uses it, it should ship its own library, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the README had a thing with preloading the library, so I guess it makes sense.

Copy link
Contributor Author

@toluschr toluschr Sep 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is still needed, as the binary included in the main package just sets LD_PRELOAD

$ gamemoderun sh -c 'echo ${LD_PRELOAD}' 
libgamemodeauto.so.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't read the new message

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No prob ;)

version=1.5.1
revision=1
build_style=meson
configure_args="-Dwith-examples=false -Dwith-systemd=false -Dwith-dbus-service-dir=/usr/share/dbus-1/services --prefix=/usr --buildtype debugoptimized"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please break long strings at around 80 chars.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the args were unnecessary anyways, since they are already set by the meson build helper by default.

revision=1
build_style=meson
configure_args="-Dwith-examples=false -Dwith-systemd=false -Dwith-dbus-service-dir=/usr/share/dbus-1/services --prefix=/usr --buildtype debugoptimized"
hostmakedepends="git cmake meson ninja pkg-config"
Copy link
Member

@ericonr ericonr Sep 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meson and ninja don't need to be here. What is git used for? You probably want to add versioned tarballs in distfiles.

Comment on lines 26 to 28
post_install() {
vlicense LICENSE.txt
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to have post_install before the subpackage functions.

@ericonr
Copy link
Member

ericonr commented Sep 13, 2020

Hmm, seems inih has been added to the repos already.

@toluschr toluschr force-pushed the new-gamemode branch 2 times, most recently from 20655dc to 7505d55 Compare September 13, 2020 17:50
@kostadinsh
Copy link

Does this include the 32-bit version of gamemode?

@toluschr
Copy link
Contributor Author

@kostadin04 You can build it using ./xbps-src -a i686

@kostadinsh
Copy link

@toluschr Oh okay, thank you so much!

@toluschr toluschr changed the title New package: gamemode-1.5.1 New package: gamemode-1.6 Sep 13, 2020
@RoundDuckKira-deprecated
Copy link
Contributor

well this is nice to see, guess I don't need to do it then myself heh. :p

@ericonr
Copy link
Member

ericonr commented Sep 29, 2020

Has this package been working well locally?

@toluschr
Copy link
Contributor Author

toluschr commented Sep 30, 2020

Has this package been working well locally?

It's working, but I can't really confirm that it actually benefits the performance.

@ericonr ericonr added the new-package This PR adds a new package label Dec 20, 2020
@RicArch97
Copy link
Contributor

Pulled the changes to test them locally, but ran into a dependency conflict;

$ ./xbps-src pkg gamemode 
=> xbps-src: updating repositories for host (x86_64)...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/debug/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> gamemode-1.6_1: removing autodeps, please wait...
=> gamemode-1.6_1: building [meson] for x86_64...
   [host] pkg-config-0.29.2_2: found (/host/binpkgs)
   [host] meson-0.55.3_1: not found
   [target] inih-devel-51_1: not found
   [target] dbus-devel-1.12.20_1: found (https://alpha.de.repo.voidlinux.org/current)
   [target] elogind-devel-243.4_3: not found
   [runtime] libgamemode-1.6_1: not found (subpkg, ignored)
   [runtime] libgamemode-1.6_1: not found (subpkg, ignored)
   [runtime] libgamemode-1.6_1: not found (subpkg, ignored)
=> meson-0.55.3_1: building [python3-module] (dependency of gamemode) for x86_64...
   [host] python3-devel-3.8.5_1: not found
   [host] python3-setuptools-50.3.0_1: not found
   [target] python3-3.8.5_1: not found
   [runtime] ninja-1.10.1_1: not found
   [runtime] python3-setuptools-50.3.0_1: not found
=> python3-3.8.5_1: building (dependency of meson) for x86_64...
   [host] pkgconf-1.7.3_1: found (/host/binpkgs)
   [target] libffi-devel-3.3_2: found (https://alpha.de.repo.voidlinux.org/current)
   [target] readline-devel-8.0.004_1: not found
   [target] gdbm-devel-1.18.1_1: not found
   [target] libressl-devel-3.1.4_1: not found
   [target] expat-devel-2.2.9_1: not found
   [target] sqlite-devel-3.33.0_1: not found
   [target] bzip2-devel-1.0.8_1: found (https://alpha.de.repo.voidlinux.org/current)
   [target] zlib-devel-1.2.11_3: not found
   [target] liblzma-devel-5.2.5_1: not found
   [runtime] ca-certificates-20200601_1: not found
   [runtime] python3-3.8.5_1: not found (self, ignored)
=> libreadline8-8.0.004_1: building [gnu-configure] (dependency of python3) for x86_64...
   [target] ncurses-devel-6.2_3: found (/host/binpkgs)
   [runtime] ncurses-devel-6.2_3: found (/host/binpkgs)
   [runtime] libreadline8-8.0.004_1: not found (self, ignored)
   [runtime] libhistory8-8.0.004_1: not found (subpkg, ignored)
=> libreadline8-8.0.004_1: installing target dependencies: ncurses-devel-6.2_3 ...
=> libreadline8-8.0.004_1: removing autodeps, please wait...
=> ERROR: libreadline8-8.0.004_1: failed to install 'ncurses-devel-6.2_3' dependency! (error 19)
ncurses-libs-6.2_3 in transaction breaks installed pkg `ncurses-6.2_4'
Transaction aborted due to unresolved dependencies.
=> ERROR: Please see above for the real error, exiting...

@paper42
Copy link
Member

paper42 commented Jan 6, 2022

python3-3.8.5_1

We are on python3-3.10.1_1, rebase on top of master.

Copy link
Contributor

@RicArch97 RicArch97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was able to build the package after rebasing on master (thanks @paper42, I totally forgot), with the following changes applied;

I was able to locate the libraries in /usr/lib/ after installing

@@ -2385,6 +2385,7 @@ libCEGUISILLYImageCodec.so cegui-0.8.7_1
libct.so.4 freetds-0.95.19_1
libsybdb.so.5 freetds-0.95.19_1
libqqwing.so.2 qqwing-1.3.4_1
libinih.so.0 inih-51_1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
libinih.so.0 inih-51_1

This has been added already

Comment on lines +1 to +2
--- daemon/gamemode-context.c
+++ daemon/gamemode-context.c
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--- daemon/gamemode-context.c
+++ daemon/gamemode-context.c
--- a/daemon/gamemode-context.c
+++ b/daemon/gamemode-context.c

license="BSD-3-Clause"
homepage="https://github.com/FeralInteractive/gamemode"
distfiles="https://github.com/FeralInteractive/gamemode/archive/${version}.tar.gz"
checksum=2d4e733c834f14d076a5062d1ecb5e32f5178014e0634c1a8e3abab21fa9a496
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
checksum=2d4e733c834f14d076a5062d1ecb5e32f5178014e0634c1a8e3abab21fa9a496
checksum=fda4abbae12639e0f326b2116d19302f83aad6139996c3823882e7f238e9852b

@kedodrill
Copy link
Contributor

Am I good to take this over and make a new PR? I have the changes that were mentioned applied to a branch and it works fine. Noticeable difference in performance in CSGO, but haven't tested with much else.

@paper42
Copy link
Member

paper42 commented Apr 7, 2022

Am I good to take this over and make a new PR? I have the changes that were mentioned applied to a branch and it works fine. Noticeable difference in performance in CSGO, but haven't tested with much else.

Go ahead

@RicArch97
Copy link
Contributor

I've been using my own template for version 1.6.1 (lastest) and built both 64 and 32 bit, it works great the only thing i noticed is that the /usr/bin/gamemoded process is still running after closing a game which was ran using the gamemoderun command, not sure if that's intended

@kedodrill
Copy link
Contributor

kedodrill commented Apr 7, 2022

@RicArch97 I have noticed the same thing, and I think it is intended, but not 100% sure. You can use gamemoded -s to see it's status. When I close a game I use it for, it says it's inactive.

@RicArch97
Copy link
Contributor

Ah yes, you're right. It probably "lazy loads" the daemon on first usage of gamemode rather than having it autostart with the system since you might not even use it.

@paper42
Copy link
Member

paper42 commented Apr 9, 2022

merged in #36564

@paper42 paper42 closed this Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-package This PR adds a new package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants