Bug 1793156 - Review Request: rr - Tool to record and replay execution of applications
Summary: Review Request: rr - Tool to record and replay execution of applications
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-20 20:07 UTC by Sagar Patel
Modified: 2020-02-03 14:44 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-02-03 14:44:32 UTC
Type: ---
Embargoed:
eclipseo: fedora-review+


Attachments (Terms of Use)
SRPM (1.29 MB, application/x-rpm)
2020-01-27 16:42 UTC, Sagar Patel
no flags Details
SPEC File (2.01 KB, text/x-matlab)
2020-01-27 16:43 UTC, Sagar Patel
no flags Details

Description Sagar Patel 2020-01-20 20:07:30 UTC
Spec URL: http://people.redhat.com/wcohen/rr/rr.spec
SRPM URL: http://people.redhat.com/wcohen/rr/rr-5.3.0.9000-1.src.rpm

Description: 

Hello! Will Cohen and I finished packaging rr and would appreciate a review.

rr is a lightweight tool for recording and replaying execution of applications (trees of processes and threads). For more information, please visit http://rr-project.org.

Fedora Account System Username: sapatel

Comment 1 Sagar Patel 2020-01-20 22:14:25 UTC
We made some changes to the SRPM and the SPEC file. Below are the updated URLs:

SPEC URL: http://people.redhat.com/wcohen/rr/rr.spec (same as before)
SRPM URL: http://people.redhat.com/wcohen/rr/rr-5.3.0.9000-2.fc30.src.rpm

Comment 2 Alejandro Alvarez 2020-01-21 09:44:03 UTC
Hello,

The checksums for upstream targz and the one in the srpm one do not match:

Source checksums
----------------
https://github.com/mozilla/rr/archive/26360c2617439ac2331f341f520d982621152220/rr-26360c2.tar.gz :
  CHECKSUM(SHA256) this package     : 88bc8f77a44a5677d99d2044cc7e1ca08b49854919ec4a08702d5afd86aa42ff
  CHECKSUM(SHA256) upstream package : 970a764d810af8f64c066456488022e7e3e77552c01c75f55f9d21067f8b51fd
diff -r also reports differences

/usr/lib64/rr/librrpreload.so is unversioned, although I guess that's fine.

Conditionals on rhel 7 makes me thing you want to build for epel7? Because it does not build there: https://koji.fedoraproject.org/koji/taskinfo?taskID=40807925

Is this really necessary?
%undefine __brp_mangle_shebangs

Also, some files are installed into /usr/bin that are not programs,  nor scripts (rr_page_*)
Not sure if that's a good idea. Can they go somewhere else, as /usr/lib or /usr/libexec?

Comment 3 William Cohen 2020-01-21 15:17:13 UTC
Thanks for the quick review.

The difference between the checksums(SHA256) was due to using a local "git archive ...". The download from github is used in http://people.redhat.com/wcohen/rr/rr-5.3.0.9000-3.fc30.src.rpm, so the checksums should agree now.

Yes, /usr/lib64/rr/librrpreload.so is unversioned.  It looks like many other packages with internally used shared libraries in /usr/lib64/ are unversioned also.

The package does build with dts9 on RHEL7.  Having the conditionals in there is intentional.  There are issues with EPEL build roots on koji that prevent it from building there.  A issue has been filed for that: https://pagure.io/fedora-infrastructure/issue/8528

Unfortunately, the "%undefine __brp_mangle_shebangs" is needed at the moment.  As you noticed there are some files in /usr/bin/ that are not programs or scripts. Without turning the mangling off the mangler gets confused by those files and the rpmbuild fails. I just filed https://github.com/mozilla/rr/issues/2431 with upstream rr to note that issue.  It would definitely be better to have the rr_page_* files not in /usr/bin.

Comment 4 Robert-André Mauchin 🐧 2020-01-21 22:22:15 UTC
 The file section is not good:

 - %defattr(-,root,root,-) is not needed

 - Be more specific here:

%{_libdir}/*

 - use %{_bindir} and %{_datadir}:

/usr/bin/rr
/usr/bin/rr_exec_stub*
/usr/bin/rr_page*
/usr/bin/signal-rr-recording.sh
/usr/bin/rr-collect-symbols.py
/usr/share/bash-completion/completions/rr
/usr/share/rr/*.xml

 - Why are you using a GIT snapshot instead of the latest release?

Version:        5.3.0

[…]

Source: https://github.com/mozilla/rr/archive/%{version}/%{name}-%{version}.tar.gz

[…]

%setup -q -n rr-%{version}

 - Use python3_version_nodots:

BuildRequires: python%{python3_version_nodots}-pexpect

Comment 5 Robert-André Mauchin 🐧 2020-01-21 23:15:58 UTC
Patch proposal for rr_page_*

=======================================================================================
From b3d3d39cac9f9aef3f1f8f6718d8c32b781cbe91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m>
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 <zebob.m>
---
 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?

Comment 6 Robert-André Mauchin 🐧 2020-01-21 23:37:44 UTC
Sorry patch should be:

From 4126fee92ee59336c818d6754551f3e53db5cdcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m>
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 <zebob.m>
---
 CMakeLists.txt      | 33 +++++++++++++++++----------------
 src/AddressSpace.cc |  2 +-
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b0dc243b..aaf28203 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,11 +600,12 @@ 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
   DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(PROGRAMS ${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_DATADIR}/rr)
 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






However brp-mangle-shebang still fails with no error.

Comment 7 Robert-André Mauchin 🐧 2020-01-21 23:52:04 UTC
Ha found the issue, now it builds:


From 2a7eb2bca5deb0909b902848749746f45e2e72ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m>
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 <zebob.m>
---
 CMakeLists.txt      | 33 +++++++++++++++++----------------
 src/AddressSpace.cc |  2 +-
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b0dc243b..8957f24b 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,11 +600,12 @@ 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
   DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(FILES ${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_DATADIR}/rr)
 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


 - Also since you're packaging a git snapshot, you must include theinfo in the Release tag:

Version:        5.3.0
Release:        3.20200121git%{shortcommit}%{?dist}

[…]

* Tue Jan 14 2020 William Cohen <wcohen> - 5.3.0-3.20200121git26360c2

Comment 8 Sagar Patel 2020-01-22 00:45:31 UTC
Hello Robert,

We're using a Git snapshot because William added a few commits upstream to allow the build to use the default Fedora hardening compiler flags. 

I also made a patch for the GitHub issue and upon inspection, ours patches look pretty much the same. The only difference was that I also modified the SPEC file to be consistent.

=======================================================================================

diff --git a/rr.spec b/rr.spec
index b7b18749..1eed1dff 100644
--- a/rr.spec
+++ b/rr.spec
@@ -32,7 +32,7 @@ ln -s @CPACK_BINARY_DIR@/_CPack_Packages/@CPACK_SYSTEM_NAME@/RPM/RPMS/@CPACK_PAC
 @CPACK_PACKAGING_INSTALL_PREFIX@/lib64/*
 @CPACK_PACKAGING_INSTALL_PREFIX@/bin/rr
 @CPACK_PACKAGING_INSTALL_PREFIX@/bin/rr_exec_stub*
-@CPACK_PACKAGING_INSTALL_PREFIX@/bin/rr_page*
+@CPACK_PACKAGING_INSTALL_PREFIX@/share/rr/rr_page*
 @CPACK_PACKAGING_INSTALL_PREFIX@/bin/signal-rr-recording.sh
 @CPACK_PACKAGING_INSTALL_PREFIX@/share/rr/*.xml

=======================================================================================

Comment 9 Sagar Patel 2020-01-27 16:41:19 UTC
We've made changes to the SPEC file to include information about the Git snapshot.

We also tried using %{python3_version_nodots} in the BuildRequires field, however, it causes the builds to fail. 

I've added the updated SPEC file and SRPM as attachments.

Comment 10 Sagar Patel 2020-01-27 16:42:15 UTC
Created attachment 1655715 [details]
SRPM

Comment 11 Sagar Patel 2020-01-27 16:43:07 UTC
Created attachment 1655716 [details]
SPEC File

Comment 12 Sagar Patel 2020-01-27 17:06:15 UTC
Also, we got a patch upstream to move the rr_page_* files to /usr/share/rr.

Comment 13 Robert-André Mauchin 🐧 2020-01-30 01:54:13 UTC
  - There is some ASL 2.0 code:

Apache License (v2.0)
---------------------
rr-7908feaee2ddedcee6db7619a221b24193fb5e99/third-party/blake2/blake2-config.h
rr-7908feaee2ddedcee6db7619a221b24193fb5e99/third-party/blake2/blake2-impl.h
rr-7908feaee2ddedcee6db7619a221b24193fb5e99/third-party/blake2/blake2.h
rr-7908feaee2ddedcee6db7619a221b24193fb5e99/third-party/blake2/blake2b-load-sse2.h
rr-7908feaee2ddedcee6db7619a221b24193fb5e99/third-party/blake2/blake2b-load-sse41.h
rr-7908feaee2ddedcee6db7619a221b24193fb5e99/third-party/blake2/blake2b-round.h
rr-7908feaee2ddedcee6db7619a221b24193fb5e99/third-party/blake2/blake2b.c

 -  Add a comment explaining the license breakdown

 - Own these directories:

[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/lib64/rr, /usr/share/rr

 - Can't the third-party/ be unbundled?





Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "Expat License BSD 2-clause
     "Simplified" License", "BSD 2-clause "Simplified" License", "Apache
     License (v2.0)", "FSF All Permissive License", "Expat License". 1079
     files have unknown license. Detailed output of licensecheck in
     /home/bob/packaging/review/rr/review-rr/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/lib64/rr, /usr/share/rr
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Fully versioned dependency in subpackages if applicable.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Uses parallel make %{?_smp_mflags} macro.
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: rr-5.3.0-7.20200124git7908fea.fc32.x86_64.rpm
          rr-debuginfo-5.3.0-7.20200124git7908fea.fc32.x86_64.rpm
          rr-debugsource-5.3.0-7.20200124git7908fea.fc32.x86_64.rpm
          rr-5.3.0-7.20200124git7908fea.fc32.src.rpm
rr.x86_64: E: missing-call-to-setgroups-before-setuid /usr/bin/rr
rr.x86_64: E: statically-linked-binary /usr/bin/rr_exec_stub
rr.x86_64: W: no-documentation
rr.x86_64: W: no-manual-page-for-binary rr
rr.x86_64: W: no-manual-page-for-binary rr-collect-symbols.py
rr.x86_64: W: no-manual-page-for-binary rr_exec_stub
rr.x86_64: W: no-manual-page-for-binary signal-rr-recording.sh
4 packages and 0 specfiles checked; 2 errors, 5 warnings.

Comment 14 William Cohen 2020-01-30 16:52:31 UTC
Hi,

The files for third-party/blake2 can be licensed under any of three choices (CC0, ASL2.0 or openssl) according to:

https://github.com/BLAKE2/BLAKE2/tree/5cbb39c9ef8007f0b63723e3aea06cd0887e36ad

The CC0 is being used as that appears to be the one mentioned in the upstream rr packaging.
Comments have been added to the spec file to clarify which files are covered by which licenses.


rr.spec takes ownership of the /usr/lib64/rr and /usr/share/rr directories


The updated srpm and spec files are:

http://people.redhat.com/wcohen/rr/rr-5.3.0-8.20200124git7908fea.fc30.src.rpm
http://people.redhat.com/wcohen/rr/rr.spec

Comment 15 Robert-André Mauchin 🐧 2020-01-30 17:16:32 UTC
 - Can't the third-party/ be unbundled? We have libb2 and brotli in Fedora. Ask upstream if this is possible?

Comment 16 William Cohen 2020-01-30 19:07:46 UTC
Examining the rr's CMakeLists.txt and source code there doesn't appear to be a way to allow rr to use the system libb2 and brotli packages.

An upstream issue has been filed for rr to see if this can be changed:

https://github.com/mozilla/rr/issues/2435

-Will

Comment 17 Robert-André Mauchin 🐧 2020-01-30 19:38:06 UTC
All right, please continue to investigate the unbundling with upstream.

Package is approved.

Comment 18 Gwyn Ciesla 2020-01-30 22:30:46 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/rr

Comment 19 William Cohen 2020-02-03 14:44:32 UTC
Package now in Fedora Rawhide, https://koji.fedoraproject.org/koji/buildinfo?buildID=1455361


Note You need to log in before you can comment on or make changes to this bug.