Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] gamemode: update to 1.8.1.
@ 2024-02-27 16:29 Calandracas606
  2024-02-27 16:39 ` [PR REVIEW] " Calandracas606
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Calandracas606 @ 2024-02-27 16:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]

There is a new pull request by Calandracas606 against master on the void-packages repository

https://github.com/Calandracas606/void-packages gamemode-1.8.1
https://github.com/void-linux/void-packages/pull/48972

gamemode: update to 1.8.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - aarch64-musl (cross)
  - armv7l (cross)
  - armv6l-musl (cross)


A patch file from https://github.com/void-linux/void-packages/pull/48972.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gamemode-1.8.1-48972.patch --]
[-- Type: text/x-diff, Size: 6579 bytes --]

From e062e1d5a668cd7743b54370b208b46dbf3564ea Mon Sep 17 00:00:00 2001
From: Daniel Martinez <danielmartinez@cock.li>
Date: Tue, 27 Feb 2024 11:27:30 -0500
Subject: [PATCH] gamemode: update to 1.8.1.

---
 srcpkgs/gamemode/patches/001-fix-musl.patch  | 10 ------
 srcpkgs/gamemode/patches/glibc-2.36.patch    | 23 --------------
 srcpkgs/gamemode/patches/musl-basename.patch | 28 +++++++++++++++++
 srcpkgs/gamemode/patches/musl-shed.patch     | 32 ++++++++++++++++++++
 srcpkgs/gamemode/template                    | 15 +++++----
 5 files changed, 67 insertions(+), 41 deletions(-)
 delete mode 100644 srcpkgs/gamemode/patches/001-fix-musl.patch
 delete mode 100644 srcpkgs/gamemode/patches/glibc-2.36.patch
 create mode 100644 srcpkgs/gamemode/patches/musl-basename.patch
 create mode 100644 srcpkgs/gamemode/patches/musl-shed.patch

diff --git a/srcpkgs/gamemode/patches/001-fix-musl.patch b/srcpkgs/gamemode/patches/001-fix-musl.patch
deleted file mode 100644
index c54c0bad41fe9..0000000000000
--- a/srcpkgs/gamemode/patches/001-fix-musl.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/daemon/gamemode-context.c
-+++ b/daemon/gamemode-context.c
-@@ -50,6 +50,7 @@ POSSIBILITY OF SUCH DAMAGE.
- #include <sys/time.h>
- #include <systemd/sd-daemon.h> /* TODO: Move usage to gamemode-dbus.c */
- #include <unistd.h>
-+#include <signal.h>
- 
- /**
-  * The GameModeClient encapsulates the remote connection, providing a list
diff --git a/srcpkgs/gamemode/patches/glibc-2.36.patch b/srcpkgs/gamemode/patches/glibc-2.36.patch
deleted file mode 100644
index d04b315cf648f..0000000000000
--- a/srcpkgs/gamemode/patches/glibc-2.36.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 19832cf103ac4af70711ead9cc00fd23e073bb78 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Nyikos=20Zolt=C3=A1n?= <nyikoszoltan0@gmail.com>
-Date: Wed, 10 Aug 2022 19:56:59 +0200
-Subject: [PATCH] Fix building when pidfd_open is available
-
-On glibc2.36 pidfd_open was made available, but it needs an include
----
- common/common-pidfds.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/common/common-pidfds.c b/common/common-pidfds.c
-index 00929f70..61442e34 100644
---- a/common/common-pidfds.c
-+++ b/common/common-pidfds.c
-@@ -58,6 +58,8 @@ static int pidfd_open(pid_t pid, unsigned int flags)
- {
- 	return (int)syscall(__NR_pidfd_open, pid, flags);
- }
-+#else
-+#include <sys/pidfd.h>
- #endif
- 
- /* pidfd functions */
diff --git a/srcpkgs/gamemode/patches/musl-basename.patch b/srcpkgs/gamemode/patches/musl-basename.patch
new file mode 100644
index 0000000000000..91e00ac1e9ae5
--- /dev/null
+++ b/srcpkgs/gamemode/patches/musl-basename.patch
@@ -0,0 +1,28 @@
+commit 7b2e2589c00c02ada1eb2e7289679da83954cec3
+Author: Daniel Martinez <danielmartinez@cock.li>
+Date:   Tue Feb 27 10:57:15 2024 -0500
+
+    use posix basename to fix build on musl
+    
+    glibc provides a nonstandard basename implementation,
+    this can be overriden and posix basename can be used
+    by includeing libgen.h, however musl only has posix
+    basename, and must always include libgen.h
+    
+    In this particular case, it doesn't appear that using
+    the posix version of basename will cause any issues,
+    as it is simply being used to match a hardcoded config
+    file name.
+
+diff --git a/daemon/gamemode-config.c b/daemon/gamemode-config.c
+index 92f5406..a63459c 100644
+--- a/daemon/gamemode-config.c
++++ b/daemon/gamemode-config.c
+@@ -41,6 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
+ #include <ini.h>
+ 
+ #include <dirent.h>
++#include <libgen.h>
+ #include <math.h>
+ #include <pthread.h>
+ #include <pwd.h>
diff --git a/srcpkgs/gamemode/patches/musl-shed.patch b/srcpkgs/gamemode/patches/musl-shed.patch
new file mode 100644
index 0000000000000..02b7095805767
--- /dev/null
+++ b/srcpkgs/gamemode/patches/musl-shed.patch
@@ -0,0 +1,32 @@
+From 4a82094c9822a989722acf30fff9679a9ad1a311 Mon Sep 17 00:00:00 2001
+From: Kostadin Shishmanov <kocelfc@tutanota.com>
+Date: Sat, 30 Dec 2023 22:47:38 +0200
+Subject: [PATCH] Fix build with musl
+
+Fixes the following build failure:
+In file included from ../common/common-cpu.c:32:
+../common/common-cpu.h:44:9: error: unknown type name 'cpu_set_t'
+   44 |         cpu_set_t *online;
+      |         ^~~~~~~~~
+../common/common-cpu.h:45:9: error: unknown type name 'cpu_set_t'
+   45 |         cpu_set_t *to_keep;
+      |         ^~~~~~~~~
+
+Signed-off-by: Kostadin Shishmanov <kocelfc@tutanota.com>
+---
+ common/common-cpu.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/common/common-cpu.h b/common/common-cpu.h
+index 3c8df27c..ccc8ed44 100644
+--- a/common/common-cpu.h
++++ b/common/common-cpu.h
+@@ -31,6 +31,8 @@ POSSIBILITY OF SUCH DAMAGE.
+ 
+ #pragma once
+ 
++#define _GNU_SOURCE
++
+ #include <sched.h>
+ #include <stdlib.h>
+ 
diff --git a/srcpkgs/gamemode/template b/srcpkgs/gamemode/template
index dd699a75dbd0d..c9cb41bf35452 100644
--- a/srcpkgs/gamemode/template
+++ b/srcpkgs/gamemode/template
@@ -1,19 +1,19 @@
 # Template file for 'gamemode'
 pkgname=gamemode
-version=1.7
+version=1.8.1
 revision=1
 build_style=meson
-configure_args="-Dwith-sd-bus-provider=elogind -Dwith-pam-group=gamemode"
+configure_args="-Dwith-sd-bus-provider=elogind -Dwith-privileged-group=gamemode"
 hostmakedepends="pkg-config"
 makedepends="inih-devel dbus-devel elogind-devel"
-depends="lib${pkgname}>=${version}_${revision}"
 short_desc="Optimise Linux system performance on demand"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://github.com/FeralInteractive/gamemode"
-changelog="https://raw.githubusercontent.com/FeralInteractive/gamemode/master/CHANGELOG.md"
+changelog="https://raw.githubusercontent.com/FeralInteractive/gamemode/${version}/CHANGELOG.md"
 distfiles="https://github.com/FeralInteractive/gamemode/archive/${version}.tar.gz"
-checksum=8a1718c657cb1d3c8269edfd397faf3cb41fccd885198ef0225bf8f82217c42f
+checksum=c52af84f41f5a867f66a817472e9d784d137702233f01d2cd3d96488458b2f0d
+shlib_requires="libgamemode.so.0 libgamemodeauto.so.0"
 system_groups=gamemode
 
 post_install() {
@@ -25,8 +25,7 @@ post_install() {
 libgamemode_package() {
 	short_desc+=" - shared libraries"
 	pkg_install() {
-		# For compatibility reasons, all shlibs should go in libgamemode
-		vmove "usr/lib/*.so*"
+		vmove "usr/lib/*.so.*"
 	}
 }
 
@@ -34,8 +33,8 @@ libgamemode-devel_package() {
 	short_desc+=" - development files"
 	depends="lib${sourcepkg}>=${version}_${revision}"
 	pkg_install() {
+		vmove "usr/lib/*.so"
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
 		vmove usr/include
 	}
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR REVIEW] gamemode: update to 1.8.1.
  2024-02-27 16:29 [PR PATCH] gamemode: update to 1.8.1 Calandracas606
  2024-02-27 16:39 ` [PR REVIEW] " Calandracas606
@ 2024-02-27 16:39 ` Calandracas606
  2024-02-27 16:39 ` Calandracas606
  2 siblings, 0 replies; 4+ messages in thread
From: Calandracas606 @ 2024-02-27 16:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

New review comment by Calandracas606 on void-packages repository

https://github.com/void-linux/void-packages/pull/48972#discussion_r1504591186

Comment:
`dlopen` now uses the versioned so `dlopen("libgamemode.so.0", RTLD_NOW);`, with a fallback to `libgamemode.so`

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR REVIEW] gamemode: update to 1.8.1.
  2024-02-27 16:29 [PR PATCH] gamemode: update to 1.8.1 Calandracas606
  2024-02-27 16:39 ` [PR REVIEW] " Calandracas606
  2024-02-27 16:39 ` Calandracas606
@ 2024-02-27 16:39 ` Calandracas606
  2 siblings, 0 replies; 4+ messages in thread
From: Calandracas606 @ 2024-02-27 16:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

New review comment by Calandracas606 on void-packages repository

https://github.com/void-linux/void-packages/pull/48972#discussion_r1504584280

Comment:
https://github.com/FeralInteractive/gamemode/pull/464

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR REVIEW] gamemode: update to 1.8.1.
  2024-02-27 16:29 [PR PATCH] gamemode: update to 1.8.1 Calandracas606
@ 2024-02-27 16:39 ` Calandracas606
  2024-02-27 16:39 ` Calandracas606
  2024-02-27 16:39 ` Calandracas606
  2 siblings, 0 replies; 4+ messages in thread
From: Calandracas606 @ 2024-02-27 16:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

New review comment by Calandracas606 on void-packages repository

https://github.com/void-linux/void-packages/pull/48972#discussion_r1504591132

Comment:
`dlopen` used on these libs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-27 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 16:29 [PR PATCH] gamemode: update to 1.8.1 Calandracas606
2024-02-27 16:39 ` [PR REVIEW] " Calandracas606
2024-02-27 16:39 ` Calandracas606
2024-02-27 16:39 ` Calandracas606

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).