Bug 1809097
Summary: | Review Request: php-marcusschwarz-lesserphp - a LESS compiler written in PHP | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Artur Frenszek-Iwicki <fedora> |
Component: | Package Review | Assignee: | Zbigniew Jędrzejewski-Szmek <zbyszek> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | fedora, package-review, zbyszek |
Target Milestone: | --- | Flags: | zbyszek:
fedora-review+
|
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-04-01 00:16:59 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Artur Frenszek-Iwicki
2020-03-02 12:31:02 UTC
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 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 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 :( >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! 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 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 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] ... 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. 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 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. > - Make executables include required files directly, instead of using the autoloader
better to use the autoloader, but because of above issue, it is empty.
>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. (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) 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. OK, so let me know when it's ready for review again. 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 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 + 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. (fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/php-marcusschwarz-lesserphp FEDORA-2020-589fa35724 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-589fa35724 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. 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. 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. |