Bug 1368790 - Review Request: perl-App-PFT - Hacker friendly static blog generator, command line utilities
Summary: Review Request: perl-App-PFT - Hacker friendly static blog generator, command...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Parag AN(पराग)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-21 12:18 UTC by Giovanni
Modified: 2017-01-10 13:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-10 13:21:02 UTC
panemade: fedora-review+


Attachments (Terms of Use)

Description Giovanni 2016-08-21 12:18:29 UTC
Spec URL: http://copr-dist-git.fedorainfracloud.org/cgit/dacav/pft/perl-App-PFT.git/plain/perl-App-PFT.spec

SRPM URL: https://copr-be.cloud.fedoraproject.org/results/dacav/pft/fedora-rawhide-x86_64/00441358-perl-App-PFT/perl-App-PFT-1.0.5-2.fc26.src.rpm

Description:

PFT stands for *Plain F. Text*, where the meaning of *F.* is up to
personal interpretation. Like *Fancy* or *Fantastic*.

It is yet another static website generator. This means your content is
compiled once and the result can be served by a simple HTTP server,
without need of server-side dynamic content generation.

This package provides the command line utilities. It depends on another package: perl-PFT, which is also submitted (see https://bugzilla.redhat.com/show_bug.cgi?id=1367569 )

Fedora Account System Username: dacav at openmailbox org

Comment 1 Giovanni 2016-08-21 12:37:39 UTC
Koji Build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=15324923

Comment 2 Igor Gnatenko 2016-08-21 16:43:57 UTC
shouldn't name be without perl- prefix?

Comment 3 Parag AN(पराग) 2016-08-22 05:04:46 UTC
Suggestions:
 As per current packaging guidelines given on https://fedoraproject.org/wiki/Packaging:Guidelines

1) use %global instead of %define, See https://fedoraproject.org/wiki/Packaging:Guidelines#.25global_preferred_over_.25define

2) From README.md and COPYING and few files containing headers, shows this perl module is in GPLv3+ license so use 
License:    GPLv3+

3) If you just look on your system for this file /etc/rpmdevtools/spectemplate-perl.spec , you will find the most updated spec file template for perl packaging.
According to that you should include following as your package is noarch type

BuildRequires:  perl
BuildRequires:  perl-generators

4) Your %build should be (as this is noarch package)
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

5) In %install, following is now optional and should be removed
rm -rf %{buildroot}

as per https://fedoraproject.org/wiki/Packaging:Guidelines#Tags_and_Sections

6) I see rpmlint on binary rpm shows permissions issue, its good to use same lines from spec template for %install as

%install
make pure_install DESTDIR=%{buildroot}
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
%{_fixperms} $RPM_BUILD_ROOT/*

7) usage of mv should be avoided and instead that use "install

8) The %files section should look like
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc README.md
%{perl_vendorlib}/*
%{_mandir}/man1/*.1*
%{_bindir}/pft
%{_libexecdir}/%{name}/pft-clean
%{_libexecdir}/%{name}/pft-edit
%{_libexecdir}/%{name}/pft-grab
%{_libexecdir}/%{name}/pft-init
%{_libexecdir}/%{name}/pft-ls
%{_libexecdir}/%{name}/pft-make
%{_libexecdir}/%{name}/pft-pub
%{_libexecdir}/%{name}/pft-show

9) Another thing, the %prep can also be used here as
%prep
%autosetup -n %{module}-%{version} -p1

I wonder you being the upstream developer, why not applied yet patchbase0 in upstream code and released any new tarball?


Fix above issues and increase the release tag and add appropriate changelog information and provide updated SPEC and SRPM links again for further update of this package.

Comment 4 Parag AN(पराग) 2016-08-22 05:07:57 UTC
(In reply to Igor Gnatenko from comment #2)
> shouldn't name be without perl- prefix?

I don't think so, you can find many perl module packaged examples in Fedora which uses "perl-" prefix but installs files in %{_bindir}. Also, this package do contains perl library not just perl scripts.

Comment 5 Giovanni 2016-08-22 07:44:07 UTC
Thanks guys for your help!

I'll fix as suggested and upload as soon as possible.

(In reply to Parag from comment #3)
> I wonder you being the upstream developer, why not applied yet patchbase0 in upstream code and released any new tarball?

My Perl package is distributed via CPAN. The patch is specifically dealing with the Fedora (and maybe other distros?) requirement of placing binaries in /usr/libexec. On a CPAN installation made by the user it would be placed in $HOME/perl5/bin.

Comment 6 Giovanni 2016-08-22 18:19:34 UTC
Hello Parag,

I've been applying your suggestions, which by the way turned out to be useful also for Bug 1367569. I've got a couple of questions to ask about it, referring to comment #3:

6) I'm not getting any issue by rpmlint. Once removed the `rm -rf %{buildroot}` as by point 5, my %install looks like the following:

    %install
    make pure_install DESTDIR=%{buildroot}
    find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
    find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
    %{_fixperms} %{buildroot}/*
    install -d %{buildroot}%{_libexecdir}/%{name}

I was missing the %{_fixperms}, which is probably fixing the permissions, but I compared the two RPMs with and without it (using rpm -qli), and the permission looks the same.

I think I'm missing something. Could you please provide me with the error you are getting from rpmlint?

7) I can use the install as suggested, but this will of course leave the binaries in the %{buildroot}usr/bin/, and rpmbuild will complain about it. Do you think I should go for install + rm?

Comment 7 Parag AN(पराग) 2016-08-23 01:21:51 UTC
6) I checked by removing manually added %attr in %files for all /usr/libexec files. rpmlint gave me this

perl-App-PFT.noarch: E: non-standard-executable-perm /usr/libexec/perl-App-PFT/pft-show 555
perl-App-PFT.noarch: E: non-standard-executable-perm /usr/libexec/perl-App-PFT/pft-ls 555
perl-App-PFT.noarch: E: non-standard-executable-perm /usr/libexec/perl-App-PFT/pft-grab 555
perl-App-PFT.noarch: E: non-standard-executable-perm /usr/libexec/perl-App-PFT/pft-pub 555
perl-App-PFT.noarch: E: non-standard-executable-perm /usr/libexec/perl-App-PFT/pft-edit 555
perl-App-PFT.noarch: E: non-standard-executable-perm /usr/libexec/perl-App-PFT/pft-init 555
perl-App-PFT.noarch: E: non-standard-executable-perm /usr/bin/pft 555
perl-App-PFT.noarch: E: non-standard-executable-perm /usr/libexec/perl-App-PFT/pft-make 555
perl-App-PFT.noarch: E: non-standard-executable-perm /usr/libexec/perl-App-PFT/pft-clean 555
1 packages and 0 specfiles checked; 9 errors, 0 warnings.

but if you then use %{_fixperms} then above will get fixed.

7) I am sorry I actually worked twice composing my previous review, please ignore point 7, looks some copy/paste issue form my own review file. Generally mv should not be used but install command but in this package case mv is correct command.

Comment 8 Giovanni 2016-08-23 20:20:08 UTC
Indeed I was able to reproduce the error and to fix it with %{_fixperms} as by point 6. All the remaining part was 

Everything should be fixed right now.

SPEC: http://copr-dist-git.fedorainfracloud.org/cgit/dacav/pft/perl-App-PFT.git/plain/perl-App-PFT.spec

SRPM: https://copr-be.cloud.fedoraproject.org/results/dacav/pft/fedora-rawhide-x86_64/00443971-perl-App-PFT/perl-App-PFT-1.0.5-3.fc26.src.rpm

Comment 9 Giovanni 2016-08-23 20:26:14 UTC
Adding up Koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=15353691

Comment 12 Parag AN(पराग) 2016-09-09 12:06:40 UTC
Looks good overall but do these changes before importing this package in Fedora.

1) we need to add comment to every patch just above its added in specfile and give few words reason why this package need to be patched or if this patch is already upstream then add upstream tracker url in comment

2) The following explicit Requires: line is not needed as this package already generates actual Requires, so remove it
Requires: perl(PFT)

See this
$rpm -qp --requires perl-App-PFT-1.0.6-1.fc25.noarch.rpm |grep PFT
perl(App::PFT)
perl(App::PFT::Util)
perl(PFT::Conf)
perl(PFT::Date)
perl(PFT::Header)
perl(PFT::Text)
perl(PFT::Tree)
perl(PFT::Util)

APPROVED.

Comment 14 Parag AN(पराग) 2016-09-30 08:01:31 UTC
Thanks. Looks good.

Comment 15 Gwyn Ciesla 2016-09-30 12:55:27 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/perl-App-PFT

Comment 16 Parag AN(पराग) 2016-12-15 06:30:01 UTC
This looks completed now.

Comment 17 Fedora Update System 2016-12-31 12:14:09 UTC
perl-App-PFT-1.1.0-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1ad0fb0f1b

Comment 18 Fedora Update System 2017-01-01 00:24:49 UTC
perl-App-PFT-1.1.0-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1ad0fb0f1b

Comment 19 Fedora Update System 2017-01-10 13:21:02 UTC
perl-App-PFT-1.1.0-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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