Bug 1974358 - Review Request: fdr - Flight Data Recorder
Summary: Review Request: fdr - Flight Data Recorder
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mikel Olasagasti Uranga
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1974355 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-21 13:12 UTC by Steve Dickson
Modified: 2021-08-18 09:06 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-08-18 09:06:03 UTC
Type: ---
Embargoed:
mikel: fedora-review+


Attachments (Terms of Use)

Description Steve Dickson 2021-06-21 13:12:44 UTC
Spec URL: https://github.com/oracle/fdr/blob/master/buildrpm/1.3/fdr.spec
SRPM URL: http://people.redhat.com/steved/fdr/fdr-1.3-0.fc33.src.rpm
Description: The flight data recorder, a daemon which enables ftrace probes
and harvests the data
Fedora Account System Username: steved

Comment 1 Steve Dickson 2021-06-21 18:40:26 UTC
Please Note, this is the correct link to the spec file.

Spec URL: https://github.com/oracle/fdr/raw/master/buildrpm/1.3/fdr.spec

Comment 2 Mikel Olasagasti Uranga 2021-06-21 19:47:47 UTC
Hi Steve,

I took this review, but if David wants to take it, please, feel free.

About the .spec, there are some changes that would be required. This is a fast diff:

$ diff -u fdr-orig.spec fdr.spec 
--- fdr-orig.spec	2021-06-21 21:44:36.065398518 +0200
+++ fdr.spec	2021-06-21 21:42:26.503454084 +0200
@@ -2,19 +2,27 @@
 Name:		fdr
 URL:		https://github.com/oracle/fdr.git
 Version:	1.3
-Release:	0%{?dist}
+Release:	1%{?dist}
 License:	UPL
 Source0:	http://people.redhat.com/steved/fdr/%{name}-%{version}.tar.xz
 
+BuildRequires:	gcc
+BuildRequires:	make
+BuildRequires:	sed
+BuildRequires:	systemd-rpm-macros
+Requires:	systemd
+
 %description
 The flight data recorder, a daemon which enables ftrace probes
 and harvests the data
 
 %prep
-%setup -q
+%autosetup
 
 %build
-%make_build all
+sed -i -e "s:^CFLAGS.*:CFLAGS = %{optflags}:" Makefile
+%make_build
 
 %install
 mkdir -p %{buildroot}/%{_sbindir}
@@ -26,11 +34,20 @@
 install -m 644 samples/nfs.logrotate %{buildroot}/%{_datadir}/fdr/samples
 
 mkdir -p %{buildroot}/%{_unitdir}
-install -m 644 fdr.service %{buildroot}/%{_unitdir}
+install -m 644 %{name}.service %{buildroot}/%{_unitdir}/%{name}.service
 
 mkdir -p %{buildroot}/%{_mandir}/man8
 install -m 644 fdrd.man %{buildroot}/%{_mandir}/man8
 
+%post
+%systemd_post %{name}.service
+
+%preun
+%systemd_preun %{name}.service
+
+%postun
+%systemd_postun_with_restart %{name}.service
+
 %files
 %{_sbindir}/fdrd
 %{_unitdir}/fdr.service
@@ -39,10 +56,6 @@
 %{_datadir}/fdr/samples/nfs.logrotate
 %{_mandir}/man8/*
 
-%preun
-systemctl stop fdr
-systemctl disable fdr
-
 %changelog
 * Thu Jun 17 2021 Steve Dickson <steved>  1.3-0
 - Initial commit

Comment 3 Mikel Olasagasti Uranga 2021-06-21 21:04:13 UTC
Also:

-install -m 644 README.md %{buildroot}/%{_datadir}/fdr/README
(...)
-%{_datadir}/fdr/README
(...)
+%doc README.md
+%license LICENSE

Comment 4 Steve Dickson 2021-06-23 16:35:21 UTC
fdr.spec has been updated:

https://github.com/oracle/fdr/blob/master/buildrpm/1.3/fdr.spec

fdr-1.3-1.fc33.src.rpm:

http://people.redhat.com/steved/fdr/fdr-1.3-1.fc33.src.rpm

Comment 5 Mikel Olasagasti Uranga 2021-06-25 09:57:58 UTC
Two small changes and should be complete.

- Change the man8 installed file name, otherwise man can't find it

  $ rpmlint fdr/results/fdr-1.3-1.fc35.x86_64.rpm | grep manual
  fdr.x86_64: W: no-manual-page-for-binary fdrd

  https://github.com/oracle/fdr/blob/master/buildrpm/1.3/fdr.spec#L39

  - install -m 644 fdrd.man %{buildroot}/%{_mandir}/man8
  + install -m 644 fdrd.man %{buildroot}/%{_mandir}/man8/fdrd.8

- Change Summary to be more descriptive:

  "The summary should be a short and concise description of the package."
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_summary_and_description


For the future, include link to the raw version of the spec file in GitHub as otherwise fedora-review doesn't get directly from the BZ.

Comment 6 Steve Dickson 2021-06-25 20:12:33 UTC
The spec file has been updated:

https://raw.githubusercontent.com/oracle/fdr/master/buildrpm/1.3/fdr.spec

The srpm has be updated:

http://people.redhat.com/steved/fdr/fdr-1.3-2.fc33.src.rpm

Thank you!

Comment 7 Mikel Olasagasti Uranga 2021-06-30 15:14:49 UTC
Giving fedora-review+ after last changes.

Comment 8 Steve Dickson 2021-06-30 17:29:38 UTC
(In reply to Mikel Olasagasti Uranga from comment #7)
> Giving fedora-review+ after last changes.

Thank you very much for time and effort!!!

Comment 9 Tomas Hrcka 2021-07-01 11:53:23 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/fdr

Comment 10 Mikel Olasagasti Uranga 2021-07-02 15:33:05 UTC
*** Bug 1974355 has been marked as a duplicate of this bug. ***


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