commit:     53c136d1ed8746b8df679d1864f30a8f79cc4296
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  9 09:17:06 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar  9 09:21:16 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53c136d1

dev-debug/rr: install rr-zen_workaround systemd service

... also, add a TODO wrt BPF.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-debug/rr/files/rr-5.9.0-zen-workaround-service.patch | 14 ++++++++++++++
 dev-debug/rr/{rr-5.9.0.ebuild => rr-5.9.0-r1.ebuild}     |  7 ++++++-
 dev-debug/rr/rr-9999.ebuild                              |  7 ++++++-
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/dev-debug/rr/files/rr-5.9.0-zen-workaround-service.patch 
b/dev-debug/rr/files/rr-5.9.0-zen-workaround-service.patch
new file mode 100644
index 000000000000..b0b90a317092
--- /dev/null
+++ b/dev-debug/rr/files/rr-5.9.0-zen-workaround-service.patch
@@ -0,0 +1,14 @@
+We install zen_workaround.py as rr-zen_workaround.py.
+--- a/scripts/zen_workaround.service
++++ b/scripts/zen_workaround.service
+@@ -15,8 +15,8 @@
+ Description           = Startup script for rr zen workaround
+ 
+ [Service]
+-# Step to actually run `zen_workaround.py`.
+-ExecStart             =+/usr/share/zen_workaround/zen_workaround.py
++# Step to actually run `rr-zen_workaround.py`.
++ExecStart             =+rr-zen_workaround.py
+ 
+ # Only run this once, report it as "(active)" even after we've exited.
+ Type                  = oneshot

diff --git a/dev-debug/rr/rr-5.9.0.ebuild b/dev-debug/rr/rr-5.9.0-r1.ebuild
similarity index 84%
rename from dev-debug/rr/rr-5.9.0.ebuild
rename to dev-debug/rr/rr-5.9.0-r1.ebuild
index 5d5eed823cfa..d01afceff3b6 100644
--- a/dev-debug/rr/rr-5.9.0.ebuild
+++ b/dev-debug/rr/rr-5.9.0-r1.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 PYTHON_COMPAT=( python3_{10..13} )
 CMAKE_BUILD_TYPE=Release
 
-inherit cmake linux-info python-single-r1
+inherit cmake linux-info python-single-r1 systemd
 
 DESCRIPTION="Record and Replay Framework"
 HOMEPAGE="https://rr-project.org/";
@@ -53,6 +53,7 @@ RESTRICT="test" # toolchain and kernel version dependent
 
 PATCHES=(
        "${FILESDIR}"/${PN}-5.7.0-no-force-lto.patch
+       "${FILESDIR}"/${PN}-5.9.0-zen-workaround-service.patch
 )
 
 pkg_setup() {
@@ -80,6 +81,9 @@ src_test() {
 
 src_configure() {
        local mycmakeargs=(
+               # TODO: Could wire up bpf but USE=bpf feels wrong for that
+               # as only introduced in 5.9.0 
(e7d9e8fd023461feb01f5d2c7936fcf07df8ce05) which
+               # says it's not "suitable for wide use at this point".
                -DBUILD_TESTS=$(usex test)
                -Ddisable32bit=$(usex !multilib) # bug #636786
        )
@@ -97,4 +101,5 @@ src_install() {
 
        python_fix_shebang "${ED}"/usr/bin/rr-collect-symbols.py
        python_newscript scripts/zen_workaround.py rr-zen_workaround.py
+       systemd_newunit scripts/zen_workaround.service rr-zen_workaround.service
 }

diff --git a/dev-debug/rr/rr-9999.ebuild b/dev-debug/rr/rr-9999.ebuild
index 5d5eed823cfa..d01afceff3b6 100644
--- a/dev-debug/rr/rr-9999.ebuild
+++ b/dev-debug/rr/rr-9999.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 PYTHON_COMPAT=( python3_{10..13} )
 CMAKE_BUILD_TYPE=Release
 
-inherit cmake linux-info python-single-r1
+inherit cmake linux-info python-single-r1 systemd
 
 DESCRIPTION="Record and Replay Framework"
 HOMEPAGE="https://rr-project.org/";
@@ -53,6 +53,7 @@ RESTRICT="test" # toolchain and kernel version dependent
 
 PATCHES=(
        "${FILESDIR}"/${PN}-5.7.0-no-force-lto.patch
+       "${FILESDIR}"/${PN}-5.9.0-zen-workaround-service.patch
 )
 
 pkg_setup() {
@@ -80,6 +81,9 @@ src_test() {
 
 src_configure() {
        local mycmakeargs=(
+               # TODO: Could wire up bpf but USE=bpf feels wrong for that
+               # as only introduced in 5.9.0 
(e7d9e8fd023461feb01f5d2c7936fcf07df8ce05) which
+               # says it's not "suitable for wide use at this point".
                -DBUILD_TESTS=$(usex test)
                -Ddisable32bit=$(usex !multilib) # bug #636786
        )
@@ -97,4 +101,5 @@ src_install() {
 
        python_fix_shebang "${ED}"/usr/bin/rr-collect-symbols.py
        python_newscript scripts/zen_workaround.py rr-zen_workaround.py
+       systemd_newunit scripts/zen_workaround.service rr-zen_workaround.service
 }

Reply via email to