Bug 1421346 - Review Request: extracturl - perl script for url extraction
Summary: Review Request: extracturl - perl script for url extraction
Keywords:
Status: POST
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: FE-NEEDSPONSOR
TreeView+ depends on / blocked
 
Reported: 2017-02-11 09:40 UTC by klaatu
Modified: 2018-09-22 01:50 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
zebob.m: fedora-review+


Attachments (Terms of Use)

Description klaatu 2017-02-11 09:40:21 UTC
Spec URL: extracturl.spec
SRPM URL: https://klaatu.fedorapeople.org/extracturl/extracturl-1.6.1-1.fc25.src.rpm
Description: A Perl script that extracts URLs from correctly-encoded MIME email messages or plain text. This can be used either as a pre-parser for urlview, or to replace urlview entirely, notably in the mutt email client.
Fedora Account System Username: klaatu

Apparently there was a package for this, but it appeoars to have been abandoned:
https://bugzilla.redhat.com/show_bug.cgi?id=1323471

Successful Koji build --scratch: 
https://koji.fedoraproject.org/koji/taskinfo?taskID=17765361

Not my first RPM, but my first Fedora package. Need sponsor.

Comment 2 Michael Schwendt 2017-03-14 21:41:17 UTC
If added "BuildRequires: perl-generators", you would get automatic dependencies for Perl modules. Take a look at your built binary package:

  rpm -qpR extracturl-1.6.1-1.fc25.noarch.rpm


> cp -pr extract_urlview.sample %{buildroot}%{_docdir}/%{name}

> /usr/share/doc/extracturl/extract_urlview.sample

Much too complicated and would be missing the directory if no other %doc files were present. Why don't you simply include that file like the other %doc files?

  %files
  %doc NEWS README AUTHORS extract_urlview.sample


> /usr/share/man/man1/extract_url.1.gz

More convenient in the long term would be

  /usr/share/man/man1/extract_url.1*

because it would not require a change of the spec file, if building in an environment where rpmbuild's compression of manuals is disabled or changed to a different compression program.

Comment 3 klaatu 2017-04-14 07:37:08 UTC
With this as the BuildRequires line:

BuildRequires: perl-generators

the build fails.

https://koji.fedoraproject.org/koji/taskinfo?taskID=18983146

So I changed it back to a manual list for BuildRequires. All other changes you suggested, I have made, and that build works:

https://koji.fedoraproject.org/koji/taskinfo?taskID=18983461

Comment 4 klaatu 2017-04-14 07:42:02 UTC
Clarification: locally, 'BuildRequires: perl-generators' builds.

It fails when building via Koji, and I don't know how to fix that.

Comment 5 Filip Szymański 2017-05-16 08:58:20 UTC
My old spec file: https://fszymanski.fedorapeople.org/extracturl/extracturl.spec

Comment 6 klaatu 2018-01-07 23:30:26 UTC
I've modified my spec file to include some of the suggestions here.

Spec file and latest RPM builds on f27: https://klaatu.fedorapeople.org/extracturl/

Koji is giving me this error:

$ koji build  --scratch rawhide SRPMS/extracturl-1.6.1-3.fc27.src.rpm 
AuthError: unable to obtain a session

I've renewed my certs with `fedora-cert -n` but when I attempt to verify, I get Python errors. I assume I'll file a bug against fedora-cert about that, separately (unless it's an easy fix).

$ fedora-cert -v
Traceback (most recent call last):
  File "/usr/bin/fedora-cert", line 85, in <module>
    main(opts)
  File "/usr/bin/fedora-cert", line 52, in main
    if fedora_cert.certificate_expired():
  File "/usr/lib/python2.7/site-packages/fedora_cert/__init__.py", line 83, in certificate_expired
    if my_cert.has_expired():
AttributeError: 'NoneType' object has no attribute 'has_expired'

Comment 7 klaatu 2018-05-02 18:42:36 UTC
Solved the koji error with

$ kinit $USER@FEDORAPROJECT.ORG
$ klist -A

Comment 8 Robert-André Mauchin 🐧 2018-05-12 16:41:30 UTC
 - Use the  %make_install macro to preserve timestamps:

make install DESTDIR=%{buildroot} → %make_install

 - Bump the package to the latest version and I'll review it

Comment 9 Mike Oliver 2018-09-20 16:15:43 UTC
I've bumped the package version for klaatu and made the suggested changes.

SPEC: https://mklvr.fedorapeople.org/extracturl/extracturl.spec
SRPM: https://mklvr.fedorapeople.org/extracturl/extracturl-1.6.2-1.fc28.src.rpm
KOJI: https://koji.fedoraproject.org/koji/taskinfo?taskID=29780055

Comment 10 Mike Oliver 2018-09-20 17:15:18 UTC
Also, I can take over this package is klaatu is no longer interested in it.

Comment 11 Robert-André Mauchin 🐧 2018-09-21 15:22:46 UTC
 - You should use macros in %files:

%{_bindir}/extract_url
%{_mandir}/man1/extract_url.1*

 - Use a more meaningful archive name with:

Source0:        https://github.com/m3m0ryh0l3/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz

 - Fix the dependencies:

BuildRequires:  perl-generators
BuildRequires:  perl-interpreter
BuildRequires:  perl(Env)
BuildRequires:  perl(Getopt::Std)
BuildRequires:  perl(HTML::Parser)
BuildRequires:  perl(MIME::Parser)
BuildRequires:  perl(Pod::Checker)
BuildRequires:  perl(Pod::Usage)
BuildRequires:  perl(POSIX)
BuildRequires:  perl(strict)
BuildRequires:  perl(warnings)
BuildRequires:  perl-podlators
Requires:       perl(Curses::UI)
Requires:       perl(Getopt::Long)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Recommends:     perl(MIME::QuotedPrint)
Recommends:     perl(URI::Find)


 - Split the description to stay below 80 characters per line:

extracturl.noarch: E: description-line-too-long C A Perl script that extracts URLs from correctly-encoded MIME email messages or plain text.

 - Capitalize the summary:

extracturl.noarch: W: summary-not-capitalized C url extractor commonly used for mutt



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

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



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

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.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "BSD (2 clause)", "Unknown or generated". 4 files have unknown
     license. Detailed output of licensecheck in
     /home/bob/packaging/review/extracturl/review-
     extracturl/licensecheck.txt
[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]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 4 files.
[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 requires other packages for directories it uses.
[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]: Packages must not store files under /srv, /opt or /usr/local

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

Generic:
[-]: Uses parallel make %{?_smp_mflags} macro.
[-]: 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.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: extracturl-1.6.2-1.fc30.noarch.rpm
          extracturl-1.6.2-1.fc30.src.rpm
extracturl.noarch: W: spelling-error Summary(en_US) url -> URL, curl, purl
extracturl.noarch: W: summary-not-capitalized C url extractor commonly used for mutt
extracturl.noarch: E: description-line-too-long C A Perl script that extracts URLs from correctly-encoded MIME email messages or plain text.
extracturl.src: W: spelling-error Summary(en_US) url -> URL, curl, purl
extracturl.src: W: summary-not-capitalized C url extractor commonly used for mutt
extracturl.src: E: description-line-too-long C A Perl script that extracts URLs from correctly-encoded MIME email messages or plain text.
2 packages and 0 specfiles checked; 2 errors, 4 warnings.

Comment 12 Mike Oliver 2018-09-21 16:34:17 UTC
Spec URL: https://mklvr.fedorapeople.org/extracturl/extracturl.spec
SRPM URL: https://mklvr.fedorapeople.org/extracturl/extracturl-1.6.2-1.fc28.src.rpm

Requested changes have been made. Thanks for the feedback.

Comment 13 Robert-André Mauchin 🐧 2018-09-21 21:18:37 UTC
Looks good, package approved.

Not sure that the repo request will go through as you're not the reporter… if it doesn't work, make a new Review Request and mark this oni as duplicate.

Comment 14 notklaatu 2018-09-21 23:48:14 UTC
I would still like to maintain this package, although I don't know what the next step in that process is.

Comment 15 Mike Oliver 2018-09-22 01:50:28 UTC
If you're not already in the packager group you'll need to seek sponsorship:
https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group


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