56 Commits

Author SHA1 Message Date
Ehren Bendler
f5fbdcf014 Take advanted of imminent EOL of Ubuntu 20 to update GH runner config. Also make a pass over the development section of the README to reflect current reality. Update inih to r60. Update meson settings to eliminate deprecated functions. Set minimum Meson version to 1.3.1 to match Ubuntu 24 and OpenSUSE Leap 15.6. 2025-04-30 19:11:59 +01:00
Gilles Schintgen
c54d6d4243 fix project version in meson.build (1.8.1->1.8.2) 2024-09-03 12:53:21 +01:00
Ahsan Fayaz
5180d89e66 Update version to 1.8.1 2023-12-12 16:02:49 +00:00
Ahsan Fayaz
c3b9d4ce8b Update changelog and version for 1.8 2023-12-06 17:06:52 +00:00
Kira Bruneau
55b799e3df Add option to specific PAM limits.d directory 2022-08-05 11:35:24 +01:00
Kira Bruneau
337f1b8a8e Scope polkit actions to require the privileged group 2022-08-05 11:35:24 +01:00
Kira Bruneau
1e24067430 Add option to specify privileged gamemode group 2022-08-05 11:35:24 +01:00
Kira Bruneau
e34e9c5a43 Add options to disable installing systemd specific files 2022-08-05 11:35:24 +01:00
Kira Bruneau
aee9703872 Add option to set systemd sysuser dir 2022-08-05 11:35:24 +01:00
Ahsan Fayaz
c3d638d7ce Update version to 1.7 2022-07-21 15:03:58 +01:00
Emil Velikov
898feb9c52 data: add and install sysusers.d gamemode.conf
Add a trivial gamemode.conf file, which creates the gamemode group.

v2: git add gamemode.conf (d'oh)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2022-02-03 16:50:29 +00:00
Kira Bruneau
5e366bd55d Fix loading shipped config when using a prefix other than /usr
Also remove recommendation to modify `/usr/share/gamemode/gamemode.ini`.
`/usr/share` is intended to contain read-only data files.

See https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html.
2022-02-03 16:02:18 +00:00
Ahsan Fayaz
5fd0065df6 Update version to 1.6.1 2021-02-18 18:39:53 +00:00
Stephan Lachnit
f6c68cd6de change location for the shipped default config
Before it was installed to /etc, but according the daemon/gamemode-config.c line 381 the shipped config should be in /usr/share/gamemode

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-07-09 08:14:09 +01:00
Stephan Lachnit
d27f8caecc improve path names for man pages and metainfo
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-26 12:53:21 +01:00
Stephan Lachnit
ce6485ef97 combine no-daemon, elogind and systemd option
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-19 16:27:51 +01:00
Stephan Lachnit
953792b4a5 Add option to use elogind
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-19 16:27:51 +01:00
Stephan Lachnit
43911a8919 install example config
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-12 19:25:57 +01:00
Ahsan Fayaz
40702d3fed Update version back to 1.6 post-release 2020-03-03 16:35:37 +00:00
Ahsan Fayaz
616dca659a Update version to 1.5.1 2020-03-03 16:18:48 +00:00
Stephan Lachnit
d3e309b23b use upstream inih r48
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-03-03 14:38:35 +00:00
Stephan Lachnit
f0943ff431 prefer system installation of inih
Closes #195.

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-02-26 18:24:50 +00:00
Ahsan Fayaz
065454bb4e Update version to 1.6 post-release 2020-01-22 14:51:00 +00:00
Ahsan Fayaz
d58c59c183 Update version to 1.5 2020-01-22 14:19:26 +00:00
Christian Kellner
b84d673aae meson: reorder lib and common subdir
So that lib can depend on the new library from common.
2019-10-18 13:19:30 +02:00
Christian Kellner
5398dd1d19 common: add pidfd related methods
Add functions to open pidfds, i.e. file descriptors representing
processes, for process ids and vice versa. Both functions work
an array of fds/pids, stop on error and return the number of
successfully handled items.
2019-10-18 13:19:30 +02:00
Alex Smith
24687f960b Update version to 1.5-dev post-release 2019-07-21 10:39:11 +01:00
Alex Smith
acb57735fc Update version to 1.4 2019-07-21 10:24:18 +01:00
Christian Kellner
6f39ecbc9b meson: display util building status
We show the status for examples & daemon, also show it for 'util'.
2019-07-16 18:58:11 +01:00
Minze Zwerver
15ff22c745 added option to disable building the utils
When you need both 32 and 64 bit version of the library only
one version of the utils is required.
2019-06-02 12:35:33 +02:00
Marc Di Luzio
1b78d0dcf7 Restructure files and libraries
Rename a bunch of files to make the consistent
	Create two new subdirectories for common code, and utilities
2019-06-01 10:54:22 +01:00
Christian Kellner
e87a8f19f3 lib: use libdbus for client's dbus messaging
Switch the dbus implementation for the client from systemd to
libdbus. The main reason is that, in flatpaks systemd is not easily
available. No phenomenological change for users of the library,
hopefully.
2019-05-27 13:44:44 +02:00
Alex Smith
959c48978b Update version to 1.4-dev post-release 2019-03-29 15:39:08 +00:00
Alex Smith
e5ccb4b68d Update version to 1.3.1 2019-03-29 15:30:11 +00:00
Christian Kellner
34d86d30b1 Use additional compiler warnings, if supported
Check a list of well-known compiler warnings and use the one that
are supported by the current compiler.
2019-03-28 11:40:40 +00:00
Alex Smith
95c365076f Update to version 1.4-dev post-release 2019-03-15 16:11:57 +00:00
Alex Smith
ea7d1c13a3 Update to version 1.3 2019-03-15 13:39:00 +00:00
Alex Smith
058efe8cce Use Meson's warning_level option
Set this to 3, and then remove extra warning flags that are already included
by enabling this (#107).
2019-03-10 10:20:29 +00:00
Térence Clastres
5f91922506 Add with-pam-group meson option
This adds 10-gamemode.conf as a limits.d configuration file and with-pam-group meson option to allow renicing as an unpriviledged user being part of the specified group.

Signed-off-by: Térence Clastres <t.clastres@gmail.com>
Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-12-07 21:50:58 +01:00
Alex Smith
2ae86fabd6 Update to version 1.3-dev post-1.2 release 2018-07-21 09:48:40 +01:00
Alex Smith
c3938599a8 Update to version 1.2 2018-07-21 09:33:32 +01:00
Christian Kellner
cd54ad42c3 data: make service dbus-activatable
Always install the dbus service file and specify the systemd
unit file in it. This makes the service dbus-activatable and
thus we don't need to explicitly enable it (also we have one
less daemon running, if it is not needed).
2018-06-28 19:23:02 +03:00
Marc Di Luzio
d9072607d9 Label master as 1.2-dev 2018-05-11 14:53:30 +01:00
Marc Di Luzio
fb2f3c628a Update to 1.1 ready for release 2018-04-25 15:50:05 +01:00
Marc Di Luzio
4f14c807ba 1.0: Finalised for release
Updating the README.md to bring it ready for wider release:
* Removed some points that were more implementation details
* Added Contributions section
* Simplified the usage section
* Expanded initial explanation
* Fixed steam launch command to allow the overlay to still work

Others:
* Mark as 1.0
* Update the license file for 2018
2018-04-04 10:06:23 +01:00
Marc Di Luzio
759cbc3c40 Add config file parsing
Checks for a gamemode.ini in /usr/share/gamemode/ (or in the cwd for debugging)

	Currently allows for blacklisting and whitelisting clients based on rudimentary needle-haystack executable name checks

	See the example/gamemode.ini file for expected syntax

	Using the BSD licensed inih library (with additional meson.build file)
2018-03-23 16:59:15 +00:00
Marc Di Luzio
142246366f Add -h and -v and augment the usage text with option descriptions 2018-03-23 16:59:15 +00:00
Marc Di Luzio
72e24b5292 Update meson.build for 0.3 development 2018-03-23 16:59:13 +00:00
Ikey Doherty
7f26122c62 Allow controlling whether systemd is used or not
Currently this will switch the build system between using a plain D-BUS
service file, or a user controllable systemd unit that can be actively
stopped/started.

In most cases it is more desirable to use the systemd unit approach,
as plain D-BUS services cannot be controlled and are more difficult
to introspect via the log.

For fallback cases we'll have the plain D-BUS unit, and in future we
can use this to allow untying from systemd specifics.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2018-03-05 17:32:43 +00:00
Ikey Doherty
e90bd98d64 Enforce strict compiler warnings
This exposed a bunch of issues that needed dealing with to ensure the
code is clean and sane. Notably the dlopen/dlsym routine has been altered
to closer match the LSI approach of safe symbol binding, by not attempting
to directly cast the result of a dlsym operation. Instead, if we succeed
in getting the dlsym() pointer, we memcpy this to the target and ensure
we have the correct constraints.

Note that in sanitizing the log helpers, I opted to remove the varargs
ability from FATAL_ERRNO given this is used exactly like perror() and
there are no examples currently using varargs with this in the tree.
This allowed me to keep the log helpers as macros and not have to implement
wrapper functions.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2018-03-05 17:32:26 +00:00