Bug 851734

Summary: Review Request: perl-Regexp-Grammars - Add grammatical parsing features to perl regular expressions
Product: [Fedora] Fedora Reporter: Bill Pemberton <wfp5p>
Component: Package ReviewAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mario.blaettermann, mhroncok, notting, package-review, ppisar
Target Milestone: ---Keywords: Reopened
Target Release: ---Flags: ppisar: fedora-review+
gwync: fedora-cvs+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-10 16:52:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 876411    

Description Bill Pemberton 2012-08-24 21:52:00 UTC
Spec URL: http://wfp.fedorapeople.org/perl-Regexp-Grammars.spec
SRPM URL: http://wfp.fedorapeople.org/perl-Regexp-Grammars-1.021-1.fc17.src.rpm 

Description:  
This module adds a small number of new regular expressions constructs that
can be used to implement complete recursive-descent parsing.

These constructs use the grammar patterns that were added to perl's
regular expressions in perl 5.10.

Fedora Account System Username: wfp

Comment 1 Mario Blättermann 2012-08-27 16:21:49 UTC
A BuildRoot tag is no longer needed unless you want to provide your package for EPEL 5. If you intend this, you have to add a %clean section and the initial cleaning of %{buildroot} in %install. But as far as I can see, for EPEL 5 we have perl-5.8.8 only.

Just for interest, do you've used cpanspec for writing the initial spec?

Comment 2 Bill Pemberton 2012-08-27 16:32:17 UTC
There's no way this will work on EPEL 5, as it requires regular expression syntax that was introduced in perl 5.10.

I didn't use cpanspec directly, but used another specfile as a template.  The template is from a package does build for RHEL 5 (and probably started life from cpanspec).  I forgot to remove BuildRoot.

Updated to remove BuildRoot:

Spec URL: http://wfp.fedorapeople.org/perl-Regexp-Grammars.spec
SRPM URL: http://wfp.fedorapeople.org/perl-Regexp-Grammars-1.021-2.fc17.src.rpm

Comment 3 Petr Pisar 2012-09-12 15:23:35 UTC
Source tar ball is original (verified from <http://search.cpan.org/CPAN/authors/id/D/DC/DCONWAY/Regexp-Grammars-1.021.tar.gz>, SHA-256: d2f9bdbc7da37e787077f7abfdd4217db8b5e0a838a3f4ff8dfe423840b2417a). Ok.
URL and Source0 are usable Ok.
Summary verified from lib/Regexp/Grammars.pm. Ok.
Description is Ok.
License verified from lib/Regexp/Grammars.pm. Ok.
No XS code exists, noarch BuildArch is Ok.

TODO: Remove useless `perl(ExtUtils::MakeMaker)' build-require. Your spec file utilizes Module::Build build system.

FIX: Build-require `perl(Scalar::Util)' for running tests (lib/Regexp/Grammars.pm:10).
FIX: Build-require `perl(Data::Dumper)' for running tests (lib/Regexp/Grammars.pm:11).

TODO: Build-require `perl(Moose)' for optional tests (t/moose.t:5).
TODO: Build-require `perl(Moose::Util::TypeConstraints)' for optional tests (t/moose.t:13).

FIX: Build-require `perl(List::Util)' for running tests (t/error_translate.t:5).


FIX: %filter_from_requires /perl(List::Util)/ is not valid sed expression:

Finding  Requires: /bin/sh -c "  while read FILE; do /usr/lib/rpm/rpmdeps -R ${FILE}; done | /bin/sort -u  | /usr/bin/sed -e '/perl(List::Util)/'"
/usr/bin/sed: -e expression #1, char 18: missing command

I recommend to remove the macro and %filter_setup macro. There is no reason to remove non-existing run-time List::Util.


All tests pass. Ok.

$ rpmlint perl-Regexp-Grammars.spec ../SRPMS/perl-Regexp-Grammars-1.021-2.fc19.src.rpm ../RPMS/noarch/perl-Regexp-Grammars-1.021-2.fc19.noarch.rpm 
2 packages and 1 specfiles checked; 0 errors, 0 warnings.
rpmlint is Ok.

$ rpm -q -lv -p ../RPMS/noarch/perl-Regexp-Grammars-1.021-2.fc19.noarch.rpm 
drwxr-xr-x    2 root    root                        0 Sep 12 16:54 /usr/share/doc/perl-Regexp-Grammars-1.021
-rw-r--r--    1 root    root                     6299 Aug 20 05:55 /usr/share/doc/perl-Regexp-Grammars-1.021/Changes
-rw-r--r--    1 root    root                      633 Aug 20 05:55 /usr/share/doc/perl-Regexp-Grammars-1.021/README
drwxr-xr-x    2 root    root                        0 Sep 12 16:54 /usr/share/doc/perl-Regexp-Grammars-1.021/demo
-rw-r--r--    1 root    root                      394 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_IP4.pl
-rw-r--r--    1 root    root                     3947 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_LaTeXish.pl
-rw-r--r--    1 root    root                     1871 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_LaTeXish_dump.pl
-rw-r--r--    1 root    root                     1234 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_Lucene_query.pl
-rw-r--r--    1 root    root                      705 Aug 30  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_calc.pl
-rw-r--r--    1 root    root                     1633 Apr 20  2010 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_calc_class.pl
-rw-r--r--    1 root    root                     1207 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_calc_inline.pl
-rw-r--r--    1 root    root                      644 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_calc_list.pl
-rw-r--r--    1 root    root                     1272 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_calc_list_autoactions.pl
-rw-r--r--    1 root    root                     1278 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_calc_list_inline.pl
-rw-r--r--    1 root    root                      457 May  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_debug.pl
-rw-r--r--    1 root    root                     1673 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_error.pl
-rw-r--r--    1 root    root                     1755 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_error_non_backtracking.pl
-rw-r--r--    1 root    root                     1086 Aug 24  2009 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_flattening.pl
-rw-r--r--    1 root    root                      457 Mar  2  2010 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_hash.pl
-rw-r--r--    1 root    root                   519591 Nov 26  2009 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_hash_lexicon.pl
-rw-r--r--    1 root    root                     1662 Oct 26  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_hash_lookup_generated.pl
-rw-r--r--    1 root    root                     1783 Oct 26  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_hash_lookup_hardcoded.pl
-rw-r--r--    1 root    root                     1538 Oct 26  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_hash_lookup_hashrule.pl
-rw-r--r--    1 root    root                      868 Mar  2  2010 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_hash_symtab.pl
-rw-r--r--    1 root    root                     1348 Apr  5  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_hashlines.pl
-rw-r--r--    1 root    root                      531 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_list.pl
-rw-r--r--    1 root    root                     2326 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_metagrammar.pl
-rw-r--r--    1 root    root                      528 Aug  9 00:41 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_pos.pl
-rw-r--r--    1 root    root                      371 Oct 26  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_raw_debug.pl
-rw-r--r--    1 root    root                      284 Aug  2  2009 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_require.pl
-rw-r--r--    1 root    root                     2814 Nov  2  2011 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_rfc5322.pl
-rw-r--r--    1 root    root                     4011 Aug  2  2009 /usr/share/doc/perl-Regexp-Grammars-1.021/demo/demo_whoson.pl
-rw-r--r--    1 root    root                    45261 Sep 12 16:54 /usr/share/man/man3/Regexp::Grammars.3pm.gz
drwxr-xr-x    2 root    root                        0 Sep 12 16:54 /usr/share/perl5/vendor_perl/Regexp
-rw-r--r--    1 root    root                   224950 Sep 12 16:54 /usr/share/perl5/vendor_perl/Regexp/Grammars.pm
File permissions and layout are Ok.

$ rpm -q --requires -p ../RPMS/noarch/perl-Regexp-Grammars-1.021-2.fc19.noarch.rpm | sort | uniq -c
      1 perl(:MODULE_COMPAT_5.16.1)
      1 perl(Scalar::Util)
      1 rpmlib(CompressedFileNames) <= 3.0.4-1
      1 rpmlib(FileDigests) <= 4.6.0-1
      1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
      1 rpmlib(PayloadIsXz) <= 5.2-1
FIX: Run-require `perl(Data::Dumper)' (lib/Regexp/Grammars.pm:11).

$ rpm -q --provides -p ../RPMS/noarch/perl-Regexp-Grammars-1.021-2.fc19.noarch.rpm | sort | uniq -c
      1 perl(Calculator_Actions)
      1 perl(Regexp)
      1 perl(Regexp::Grammars) = 1.021
      1 perl-Regexp-Grammars = 1.021-2.fc19
      1 perl(Regexp::Grammars::Precursor)
FIX: Do not provide `perl(Calculator_Actions)' from demo in documentation.
Fix: Do not provide private `perl(Regexp)' (this would clash with `Regexp' CPAN module).

Package builds in F19 (http://koji.fedoraproject.org/koji/taskinfo?taskID=4477993). Ok.


Please correct all `FIX' items, consider correcting `TODO' issues and provide new spec file.

Resolution: Package NOT approved.

Comment 4 Bill Pemberton 2012-09-12 16:40:36 UTC
Updated to address suggestions from the review:

Spec URL: http://wfp.fedorapeople.org/perl-Regexp-Grammars.spec
SRPM URL: http://wfp.fedorapeople.org/perl-Regexp-Grammars-1.021-3.fc19.src.rpm

Comment 5 Petr Pisar 2012-09-13 09:29:25 UTC
Spec file changes:
--- perl-Regexp-Grammars.spec.old       2012-09-12 17:19:48.779482617 +0200
+++ perl-Regexp-Grammars.spec   2012-09-12 18:37:38.000000000 +0200
@@ -1,22 +1,29 @@
 Name:          perl-Regexp-Grammars
 Version:       1.021
-Release:       2%{?dist}
+Release:       3%{?dist}
 Summary:       Add grammatical parsing features to perl regular expressions
 License:       GPL+ or Artistic
 Group:         Development/Libraries
 URL:           http://search.cpan.org/dist/Regexp-Grammars/
 Source0:       http://www.cpan.org/authors/id/D/DC/DCONWAY/Regexp-Grammars-%{version}.tar.gz
 BuildArch:     noarch
-BuildRequires: perl(ExtUtils::MakeMaker)
 BuildRequires: perl(Module::Build)
 BuildRequires: perl(Test::More)
 BuildRequires: perl(Test::Pod)
+BuildRequires: perl(Scalar::Util)
+BuildRequires: perl(Data::Dumper)
+BuildRequires: perl(List::Util)
+BuildRequires: perl(Moose)
+BuildRequires: perl(Moose::Util::TypeConstraints)
+Requires:      perl(Data::Dumper)
 Requires:      perl(Scalar::Util)
 Requires:      perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 
-%filter_from_requires /perl(List::Util)/
+%filter_from_provides /perl(Regexp)/d
+%filter_provides_in %{_docdir}
 %filter_setup
 
+
 %description
 This module adds a small number of new regular expressions constructs that
 can be used to implement complete recursive-descent parsing.
@@ -44,6 +51,12 @@
 %{_mandir}/man3/Regexp::Grammars.3pm*
 
 %changelog
+* Wed Sep 12 2012 Bill Pemberton <wfp5p> - 1.021-3
+- update Requires and BuildRequires
+- remove filter_from_requires
+- filter out requirements of the demo scripts
+- filter out perl(Regexp) from provides
+
 * Mon Aug 27 2012 Bill Pemberton <wfp5p> - 1.021-2
 - Remove BuildRoot
 

> TODO: Remove useless `perl(ExtUtils::MakeMaker)' build-require. Your spec file
> utilizes Module::Build build system.
-BuildRequires: perl(ExtUtils::MakeMaker)
Ok.

> FIX: Build-require `perl(Scalar::Util)' for running tests
> (lib/Regexp/Grammars.pm:10).
+BuildRequires: perl(Scalar::Util)
Ok.

> FIX: Build-require `perl(Data::Dumper)' for running tests
> (lib/Regexp/Grammars.pm:11).
+BuildRequires: perl(Data::Dumper)
Ok.

> TODO: Build-require `perl(Moose)' for optional tests (t/moose.t:5).
> TODO: Build-require `perl(Moose::Util::TypeConstraints)' for optional tests
> (t/moose.t:13).
+BuildRequires: perl(Moose)
+BuildRequires: perl(Moose::Util::TypeConstraints)
Ok.

> FIX: Build-require `perl(List::Util)' for running tests (t/error_translate.t:5).
+BuildRequires: perl(List::Util)
Ok.

> FIX: %filter_from_requires /perl(List::Util)/ is not valid sed expression:
-%filter_from_requires /perl(List::Util)/
Ok.

All tests pass. Ok.

$ rpmlint perl-Regexp-Grammars.spec ../SRPMS/perl-Regexp-Grammars-1.021-3.fc19.src.rpm ../RPMS/noarch/perl-Regexp-Grammars-1.021-3.fc19.noarch.rpm 
2 packages and 1 specfiles checked; 0 errors, 0 warnings.
rpmlint is Ok.

$ rpm -q --requires -p ../RPMS/noarch/perl-Regexp-Grammars-1.021-3.fc19.noarch.rpm | sort | uniq -c
      1 perl >= 1:5.010
      1 perl >= 1:5.10
      2 perl(Data::Dumper)
      1 perl(List::Util)
      1 perl(:MODULE_COMPAT_5.16.1)
      1 perl(mro)
      1 perl(overload)
      1 perl(Regexp::Grammars)
      2 perl(Scalar::Util)
      1 perl(strict)
      1 perl(warnings)
      1 rpmlib(CompressedFileNames) <= 3.0.4-1
      1 rpmlib(FileDigests) <= 4.6.0-1
      1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
      1 rpmlib(PayloadIsXz) <= 5.2-1
> FIX: Run-require `perl(Data::Dumper)' (lib/Regexp/Grammars.pm:11).
Ok.

TODO: Do not explicitly run-require `perl(Data::Dumper)' and `perl(Scalar::Util)'. They are automatically discovered after the filter expression being made valid.

> FIX: Do not provide `perl(Calculator_Actions)' from demo in documentation.
> Fix: Do not provide private `perl(Regexp)' (this would clash with `Regexp'
> CPAN module).
$ rpm -q --provides -p ../RPMS/noarch/perl-Regexp-Grammars-1.021-3.fc19.noarch.rpm | sort | uniq -c
      1 perl(Regexp::Grammars) = 1.021
      1 perl-Regexp-Grammars = 1.021-3.fc19
      1 perl(Regexp::Grammars::Precursor)
Ok.

$ resolvedeps rawhide ../RPMS/noarch/perl-Regexp-Grammars-1.021-3.fc19.noarch.rpm 
Binary dependencies resolvable. Ok.

Package builds in F19 (http://koji.fedoraproject.org/koji/taskinfo?taskID=4480141). Ok.

Package is in line with Fedora and Perl packaging guidelines.


Please consider fixing the `TODO' items before building this package.

Resolution: Package APPROVED.

Comment 6 Bill Pemberton 2012-09-13 13:00:20 UTC
New Package SCM Request
=======================
Package Name: perl-Regexp-Grammars
Short Description: Add grammatical parsing features to perl regular expressions
Owners: wfp
Branches: f17 f18 el6
InitialCC: perl-sig

Comment 7 Gwyn Ciesla 2012-09-13 13:15:03 UTC
Git done (by process-git-requests).

Comment 8 Fedora Update System 2012-09-13 14:02:59 UTC
perl-Regexp-Grammars-1.021-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/perl-Regexp-Grammars-1.021-4.fc18

Comment 9 Fedora Update System 2012-09-13 14:17:07 UTC
perl-Regexp-Grammars-1.021-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/perl-Regexp-Grammars-1.021-4.fc17

Comment 10 Fedora Update System 2012-09-13 14:24:58 UTC
perl-Regexp-Grammars-1.021-4.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/perl-Regexp-Grammars-1.021-4.el6

Comment 11 Fedora Update System 2012-09-13 16:44:53 UTC
perl-Regexp-Grammars-1.021-4.fc18 has been pushed to the Fedora 18 testing repository.

Comment 12 Fedora Update System 2012-09-17 23:19:34 UTC
perl-Regexp-Grammars-1.021-4.fc18 has been pushed to the Fedora 18 stable repository.

Comment 13 Fedora Update System 2012-09-26 09:12:05 UTC
perl-Regexp-Grammars-1.021-4.fc17 has been pushed to the Fedora 17 stable repository.

Comment 14 Petr Šabata 2013-01-02 09:51:00 UTC
*** Bug 890819 has been marked as a duplicate of this bug. ***

Comment 15 Fedora Update System 2015-10-21 17:52:43 UTC
perl-Regexp-Grammars-1.042-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8a53b56b43

Comment 16 Fedora Update System 2015-10-26 21:21:08 UTC
perl-Regexp-Grammars-1.042-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update perl-Regexp-Grammars'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8a53b56b43

Comment 17 Fedora Update System 2015-11-10 16:52:12 UTC
perl-Regexp-Grammars-1.042-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.