https://bugzilla.redhat.com/show_bug.cgi?id=1793156



--- Comment #5 from Robert-André Mauchin <zebo...@gmail.com> ---
Patch proposal for rr_page_*

=======================================================================================
From b3d3d39cac9f9aef3f1f8f6718d8c32b781cbe91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebo...@gmail.com>
Date: Tue, 21 Jan 2020 23:45:47 +0100
Subject: [PATCH] Move rr_page_* to /usr/share/rr to respect FHS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Only executable binaries should go in /usr/bin

Signed-off-by: Robert-André Mauchin <zebo...@gmail.com>
---
 CMakeLists.txt      | 32 ++++++++++++++++----------------
 src/AddressSpace.cc |  2 +-
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b0dc243b..09ebe712 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -372,28 +372,28 @@ endforeach(generated_file)

 add_custom_target(Generated DEPENDS ${GENERATED_FILES})

-add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_64"
+add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_64"
                    COMMAND
"${CMAKE_CURRENT_SOURCE_DIR}/src/generate_rr_page.py"
-                   "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_64"
+                   "${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_64"
                    DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/generate_rr_page.py")
-add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_32"
+add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_32"
                    COMMAND
"${CMAKE_CURRENT_SOURCE_DIR}/src/generate_rr_page.py"
-                   "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_32"
+                   "${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_32"
                    DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/generate_rr_page.py")
-add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_64_replay"
+add_custom_command(OUTPUT
"${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_64_replay"
                    COMMAND
"${CMAKE_CURRENT_SOURCE_DIR}/src/generate_rr_page.py"
-                   "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_64_replay"
+                   "${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_64_replay"
                    DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/generate_rr_page.py")
-add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_32_replay"
+add_custom_command(OUTPUT
"${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_32_replay"
                    COMMAND
"${CMAKE_CURRENT_SOURCE_DIR}/src/generate_rr_page.py"
-                   "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_32_replay"
+                   "${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_32_replay"
                    DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/generate_rr_page.py")

 add_custom_target(Pages DEPENDS
-                  "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_32"
-                  "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_64"
-                  "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_32_replay"
-                  "${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_64_replay")
+                  "${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_32"
+                  "${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_64"
+                  "${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_32_replay"
+                  "${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_64_replay")

 add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/rr_trace.capnp.c++"
                           "${CMAKE_CURRENT_BINARY_DIR}/rr_trace.capnp.h"
@@ -600,10 +600,10 @@
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/rr-collect-symbols.py"

 install(PROGRAMS scripts/signal-rr-recording.sh
                  scripts/rr-collect-symbols.py
-                 ${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_64
-                 ${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_64_replay
-                 ${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_32
-                 ${CMAKE_CURRENT_BINARY_DIR}/bin/rr_page_32_replay
+                 ${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_64
+                 ${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_64_replay
+                 ${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_32
+                 ${CMAKE_CURRENT_BINARY_DIR}/share/rr/rr_page_32_replay
   DESTINATION ${CMAKE_INSTALL_BINDIR})
 install(PROGRAMS scripts/rr_completion
   DESTINATION ${CMAKE_INSTALL_DATADIR}/bash-completion/completions RENAME rr)
diff --git a/src/AddressSpace.cc b/src/AddressSpace.cc
index 2c40578b..a89e8a89 100644
--- a/src/AddressSpace.cc
+++ b/src/AddressSpace.cc
@@ -258,7 +258,7 @@ remote_code_ptr
AddressSpace::find_syscall_instruction(Task* t) {
 }

 static string find_rr_page_file(Task* t) {
-  string path = resource_path() + "bin/rr_page_";
+  string path = resource_path() + "share/rr/rr_page_";
   switch (t->arch()) {
     case x86:
       path += "32";
-- 
2.24.1
=======================================================================================

Could you test if it works before I send it upstream?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@lists.fedoraproject.org
To unsubscribe send an email to package-review-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org

Reply via email to