https://bugzilla.redhat.com/show_bug.cgi?id=1809097
Bug ID: 1809097 Summary: Review Request: php-marcusschwarz-lesserphp - a LESS compiler written in PHP Product: Fedora Version: rawhide Hardware: All OS: Linux Status: NEW Component: Package Review Severity: medium Priority: medium Assignee: nobody@fedoraproject.org Reporter: fedora@svgames.pl QA Contact: extras-qa@fedoraproject.org CC: package-review@lists.fedoraproject.org Target Milestone: --- Classification: Fedora
spec: https://svgames.pl/fedora/php-marcusschwarz-lesserphp-0.5.4-1.spec srpm: https://svgames.pl/fedora/php-marcusschwarz-lesserphp-0.5.4-1.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=42104670
Description: lesserphp is a LESS compiler written in PHP. It is designed to be compatible with less.js, and suitable as a drop-in replacement for PHP projects.
FAS username: suve
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
Artur Iwicki fedora@svgames.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Doc Type|--- |If docs needed, set a value
--- Comment #1 from Artur Iwicki fedora@svgames.pl --- This package is required for dokuwiki (https://src.fedoraproject.org/rpms/dokuwiki), since one of its dependent packages (https://src.fedoraproject.org/rpms/php-lessphp) was retired recently. This new package is a backwards-compatible fork of the retired one.
For more info, check also: https://bugzilla.redhat.com/show_bug.cgi?id=1807717
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #2 from Artur Iwicki fedora@svgames.pl --- Fixed some minor issues.
spec: https://svgames.pl/fedora/php-marcusschwarz-lesserphp-0.5.4-2.spec srpm: https://svgames.pl/fedora/php-marcusschwarz-lesserphp-0.5.4-2.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=42340070
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |zbyszek@in.waw.pl Assignee|nobody@fedoraproject.org |zbyszek@in.waw.pl Flags| |fedora-review?
--- Comment #3 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- Obsoletes is wrong: php-lessphp-0.5.0-11.fc32 is the latest, so you need something like Obsoletes: php-lessphp < 0.5.0+0
Including the version in the spec file name seems wrong.
+ package name is OK (please rename the spec file) + latest version + license is acceptable (MIT (or GPLv3)) + license is specified correctly + build and installs OK + fedora-review and rpmlint seem happy + Provides/Requires/BuildRequires look OK
rpmlint says: E: description-line-too-long C It is designed to be compatible with less.js (https://lesscss.org/), and suitable → please wrap.
php-marcusschwarz-lesserphp.src:65: W: mixed-use-of-spaces-and-tabs (spaces: line 1, tab: line 65)
$ /usr/bin/plessc PHP Fatal error: Uncaught Error: Class 'lessc' not found in /usr/bin/plessc:47 Stack trace: #0 {main} thrown in /usr/bin/plessc on line 47 → that doesn't seem right :(
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #4 from Artur Iwicki fedora@svgames.pl ---
Obsoletes is wrong: php-lessphp-0.5.0-11.fc32 is the latest, so you need something like Obsoletes: php-lessphp < 0.5.0+0
I'm sorry, I don't quite understand. I want the package to be marked as obsoleting "php-lessphp" v0.5.0 and older. Is not not the proper way to do it?
$ /usr/bin/plessc PHP Fatal error: Uncaught Error: Class 'lessc' not found in /usr/bin/plessc:47
Oopsie daisy. Gonna take a look immediately. Thanks for catching this!
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #5 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- For rpm, 0.5.0-11.fc32 is newer than 0.5.0. This can be checked with $ rpmdev-vercmp 0.5.0 0.5.0-11.fc32 0.5.0 < 0.5.0-11.fc32
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #6 from Artur Iwicki fedora@svgames.pl --- Should be ok now.
spec: https://svgames.pl/fedora/php-marcusschwarz-lesserphp-0.5.4-3.spec srpm: https://svgames.pl/fedora/php-marcusschwarz-lesserphp-0.5.4-3.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=42361726
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #7 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- Hmmm...
<mock-chroot> sh-5.0# lessify Usage: /usr/bin/lessify input-file <mock-chroot> sh-5.0# lessify /dev/null PHP Warning: Declaration of lessify::parse($str = NULL) should be compatible with lessc::parse($str = NULL, $initialVariables = NULL) in /usr/share/php/marcusschwarz-lesserphp/lessify.inc.php on line 366 PHP Fatal error: Uncaught Error: Call to undefined method lessify::prepareParser() in /usr/share/php/marcusschwarz-lesserphp/lessify.inc.php:367 Stack trace: #0 /usr/bin/lessify(18): lessify->parse() #1 {main} thrown in /usr/share/php/marcusschwarz-lesserphp/lessify.inc.php on line 367
<mock-chroot> sh-5.0# /usr/bin/plessc PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /usr/share/php/marcusschwarz-lesserphp/lessc.inc.php on line 761 PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /usr/share/php/marcusschwarz-lesserphp/lessc.inc.php on line 2762 PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /usr/share/php/marcusschwarz-lesserphp/lessc.inc.php on line 2816 Usage: /usr/bin/plessc [options] input-file [output-file] ...
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #8 from Artur Iwicki fedora@svgames.pl --- Looks like lessify is broken upstream. I'll try to write a patch or will just drop it from the package - I care mostly about the library, not the executables.
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #9 from Artur Iwicki fedora@svgames.pl --- Ok, so apprently lessify has been broken upstream... since 2011. I'm writing a patch to fix this, but it will take some time, so meanwhile, I removed it from the package (since, as mentioned before, I care mostly about the plessc part of the package, required for dokuwiki).
Added a patch that fixes the uses of deprecated syntax inside lessc.inc.php. Hopefully now everything will be ok.
spec: https://svgames.pl/fedora/php-marcusschwarz-lesserphp-0.5.4-4.spec srpm: https://svgames.pl/fedora/php-marcusschwarz-lesserphp-0.5.4-4.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=42431968
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
Remi Collet fedora@famillecollet.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fedora@famillecollet.com
--- Comment #10 from Remi Collet fedora@famillecollet.com --- When running the build:
PHP Warning: file_get_contents(fedora): failed to open stream: No such file or directory in /usr/share/php/TheSeer/Autoload/Application.php on line 65
indeed, you use "phpab --template fedora ..."
So you must have
BuildRequires: php-fedora-autoloader-devel
To ensure the fedora template is there.
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #11 from Remi Collet fedora@famillecollet.com ---
- Make executables include required files directly, instead of using the autoloader
better to use the autoloader, but because of above issue, it is empty.
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #12 from Artur Iwicki fedora@svgames.pl ---
So you must have BuildRequires: php-fedora-autoloader-devel To ensure the fedora template is there.
Oh, thanks, I just used "dnf provides /usr/bin/phpab", which said theeser-autoload, and I went with that.
- Make executables include required files directly, instead of using the autoloader
better to use the autoloader, but because of above issue, it is empty.
Including the autoloader file does not register ("activate") the Fedora Autoloader, so to use the autoloader file, I'd need to modify the executables further. Since all the classes required by the executable are located in one file, I think it's simpler to just include that file.
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #13 from Remi Collet fedora@famillecollet.com --- (In reply to Artur Iwicki from comment #12)
Including the autoloader file does not register ("activate") the Fedora Autoloader,
What do you mean ?
Including the autoloader is usually enough, classes will be loaded as soon as needed (and only when needed)
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #14 from Artur Iwicki fedora@svgames.pl --- Ok, I took a better look at the code and yeah, the first thing Autoload::addClassMap() does is register the autoloader, if it wasn't registered already. Weird, I remember having issues with the autoloader not being active when doing a require on the autoload file. Either way, I'll experiment with this and switch back requiring the autoloader file, if it works ok.
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #15 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- OK, so let me know when it's ready for review again.
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #16 from Artur Iwicki fedora@svgames.pl --- Fixed the BuildRequires: issue. As for the "require" call, I decided to stick with including the file directly instead of using the autoloader, since that's what upstream does and all the required classes are in one file either way.
spec: https://svgames.pl/fedora/php-marcusschwarz-lesserphp-0.5.4-5.spec srpm: https://svgames.pl/fedora/php-marcusschwarz-lesserphp-0.5.4-5.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=42445598
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #17 from Artur Iwicki fedora@svgames.pl --- Thanks to Remi once again for pointing out the autoloader issue - I admit that I submitted the koji builds, saw them pass and didn't even check the build.log. The latest build generates the autoloader file correctly.
I have submitted a patch upstream that makes phpab throw an exception and fail if the template does not exist: https://github.com/theseer/Autoload/pull/93
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
Artur Iwicki fedora@svgames.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(zbyszek@in.waw.pl | |)
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |POST Flags|fedora-review? |fedora-review+ |needinfo?(zbyszek@in.waw.pl | |) |
--- Comment #18 from Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl --- + package name is OK + latest version + license is acceptable for Fedora (MIT or GPLv3) + license is specified correctly (Though I think it would be possible to simplify this to just MIT. MIT is upwards compatible with GPLv3, so anyone who wants to distribute the code as GPLv3 can already do so starting with the MIT license.) + builds and installs OK + fedora-review and rpmlint find no issues (except for false positive spelling recommendations) + /usr/bin/plessc runs OK for simple inputs + R/BR/P look OK
Package is APPROVED.
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #19 from Igor Gnatenko i.gnatenko.brain@gmail.com --- (fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/php-marcusschwarz-lesserphp
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|POST |MODIFIED
--- Comment #20 from Fedora Update System updates@fedoraproject.org --- FEDORA-2020-589fa35724 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-589fa35724
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #21 from Fedora Update System updates@fedoraproject.org --- FEDORA-2020-589fa35724 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2020-589fa35724 *` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-589fa35724
See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ON_QA |CLOSED Resolution|--- |ERRATA Last Closed| |2020-04-01 00:16:59
--- Comment #22 from Fedora Update System updates@fedoraproject.org --- FEDORA-2020-589fa35724 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1809097
--- Comment #23 from Fedora Update System updates@fedoraproject.org --- FEDORA-2020-589fa35724 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
package-review@lists.fedoraproject.org