Bug 1982619 - Review Request: php-fgrosse-phpasn1 - A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures
Summary: Review Request: php-fgrosse-phpasn1 - A PHP Framework that allows you to enco...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Otto Liljalaakso
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1982648 1982652
TreeView+ depends on / blocked
 
Reported: 2021-07-15 10:08 UTC by Christopher Engelhard
Modified: 2022-07-10 07:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-10 07:50:57 UTC
Type: ---
Embargoed:
otto.liljalaakso: fedora-review+


Attachments (Terms of Use)

Description Christopher Engelhard 2021-07-15 10:08:25 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/lcts/nextcloud/fedora-rawhide-x86_64/02329602-php-fgrosse-phpasn1/php-fgrosse-phpasn1.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/lcts/nextcloud/fedora-rawhide-x86_64/02329602-php-fgrosse-phpasn1/php-fgrosse-phpasn1-2.3.0-1.fc35.src.rpm

Description: A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules. This encoding is very frequently used in X.509 PKI environments or the communication between heterogeneous computer systems.

Since this package is set up to use rpmautospec, rpmlint/fedora-review will complain about missing dist tags & macros in changelog. These are spurious errors/warnings.

This package is available from the lcts/nextcloud Copr, so you can also test it using 'fedora-review --copr-build 2329602'


Fedora Account System Username: lcts

Comment 1 Otto Liljalaakso 2021-07-24 20:33:44 UTC
Reviewed.

1.
> Summary:        Thin assertion library for input validation in business models

In composer.json it is:
"A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules."
"

2.
> Autoloader: %{_datadir}/php/%{ns_dir}/autoload.php

You may want to use the less specfile tag looking formatting here.

3.
> : Create a PSR-0 tree
> mkdir -p   %{buildroot}%{_datadir}/php/%{ns_dir}
> cp -pr lib/* %{buildroot}%{_datadir}/php/%{ns_dir}

In another review it was suggested
that %{ns_dir} should have two components: vendor and project [1].
Should the same logic apply here?
That would create a path fgrosse/FG, with FG being the project name.
That sounds strange, but perhaps that is just because
upstream chose a strange namespace name for this project?

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1982616#c2

4.
> %if 0%{?with_tests}
> : Run tests
> : No tests implemented
> %endif

Upstream has them. I suppose makesrc.sh needs to be introduced.

Comment 2 Remi Collet 2021-07-27 07:01:23 UTC
Looks like FG is really the "vendor" part, and this library is in fact 3 libraries... (ASN1, Utility and X509)... uggly

So ns_dir FG is probably fine... conflicts will have to be fixed later, if happen (ex if another FG library also have a Utility sub project...)

Comment 3 Otto Liljalaakso 2021-07-27 16:23:42 UTC
(In reply to Remi Collet from comment #2)
> Looks like FG is really the "vendor" part, and this library is in fact 3
> libraries... (ASN1, Utility and X509)... uggly
> 
> So ns_dir FG is probably fine... conflicts will have to be fixed later, if
> happen (ex if another FG library also have a Utility sub project...)

Thank you Remi. I am fine with using this interpretation.

Comment 4 Christopher Engelhard 2021-08-03 13:45:22 UTC
Spec URL: https://copr-be.cloud.fedoraproject.org/results/lcts/nextcloud/fedora-rawhide-x86_64/02358089-php-fgrosse-phpasn1/php-fgrosse-phpasn1.spec
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/lcts/nextcloud/fedora-rawhide-x86_64/02358089-php-fgrosse-phpasn1/php-fgrosse-phpasn1-2.3.0-1.fc35.src.rpm

Sorry for the delay, $DAYJOB intervened.

(In reply to Otto Urpelainen from comment #1)
> 1.
> > Summary:        Thin assertion library for input validation in business models
> 
> In composer.json it is:
> "A PHP Framework that allows you to encode and decode arbitrary ASN.1
> structures using the ITU-T X.690 Encoding Rules."
> "

Fixed.

> 2.
> > Autoloader: %{_datadir}/php/%{ns_dir}/autoload.php
> 
> You may want to use the less specfile tag looking formatting here.

Changed it to the same format as in php-league-uri-interfaces
 
> 3.
> > : Create a PSR-0 tree
> > mkdir -p   %{buildroot}%{_datadir}/php/%{ns_dir}
> > cp -pr lib/* %{buildroot}%{_datadir}/php/%{ns_dir}
> 
> In another review it was suggested
> that %{ns_dir} should have two components: vendor and project [1].
> Should the same logic apply here?
> That would create a path fgrosse/FG, with FG being the project name.
> That sounds strange, but perhaps that is just because
> upstream chose a strange namespace name for this project?
> 
> [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1982616#c2

As Remi pointed out, this library is a bit of a mess. It's also the only library the vendor has, so I think it's unlikely there will be any conflict anytime soon. I left it at php/FG/.. for now, but I'll see if upstream is interested in bringing a bit more order into this. 
 
> 4.
> > %if 0%{?with_tests}
> > : Run tests
> > : No tests implemented
> > %endif
> 
> Upstream has them. I suppose makesrc.sh needs to be introduced.

Did that. I added a small patch to make the tests work with PHPUnit 8 since 7 is EOL. They can also be made compatible with PHPUnit 9, but that patch is quite extensive. If you're OK with that I'd prefer to take that upstream since PHPUnit 8 is still fully supported.

Comment 6 Otto Liljalaakso 2021-08-07 07:59:10 UTC
Thank you for packaging this, everything looks good, so review passed.

It is good if you can discuss the naming scheme with upstream.
For now, the current naming scheme is ok as discussed above.

Fedora actually has phpunit available from major version 6 onwards,
so even staying with 7 would have been acceptable,
it is not a huge deal to use an end-of-life test runner.
Of course it is much better that you patched the tests
so a newer version can be used.

If you get in touch with upstream about phpunit 9 support,
you could take care of this warning that is currently emitted:

>  Warning - The configuration file did not pass validation!
>  The following problems have been detected:
>
>  Line 12:
>  - Element 'phpunit', attribute 'syntaxCheck': The attribute 'syntaxCheck' is not allowed.
>
>  Test results may not be as expected.

Apparently, the warning is harmless in itself,
but that attribute could and should just be removed [1].

[1]: https://stackoverflow.com/a/44331140

I will take one more of your php requests when I find the time,
assuming there are still some left.

Comment 7 Christopher Engelhard 2021-08-11 05:21:52 UTC
(In reply to Otto Urpelainen from comment #6)
> If you get in touch with upstream about phpunit 9 support,
> you could take care of this warning that is currently emitted:

Will do.
 
> I will take one more of your php requests when I find the time,
> assuming there are still some left.

that would be great, thank you.

Comment 8 Tomas Hrcka 2021-08-11 11:05:17 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/php-fgrosse-phpasn1

Comment 9 Package Review 2022-07-10 07:50:57 UTC
Package is now in repositories, closing review.


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