[pkg-php-pear] deb packages looking for sponsorship

David Prévot david at tilapin.org
Sat Jun 11 12:09:46 BST 2022


Le 11/06/2022 à 11:25, Fab Stz a écrit :
> Le samedi 11 juin 2022 09:39:45 CEST, vous avez écrit :
>>> Let's start with php-league-csv. It should be ready for a new review now:
>>> * https://salsa.debian.org/php-team/pear/php-league-csv
>> You should not install the testsuite (src/*Test.php files).
> Is there a way to prevent their installation without listing in d/install one
> by one only the files to install? I haven't found any such thing except making
> d/install an executable.
> If I exclude the test files from the package, will the autopkgtest still work?
> I simply copied/adapted your templates from the wiki. So I'm a bit confused.

Welcome in real world where every upstream do it there own way… One way 
to handle such case could be to copy the src directory into another 
directory (e.g., “cp -a src real_src”), from there move the testfiles 
into yet another directory (e.g., “mkdir tests && mv real_src/*Test.php 
tests/”) and only then, create the {src_real,vendor}/autoload.php files.

For autopkgtest, using simply “phpab src/*Test.php” should do the trick 
to create vendor/autoload.php.

>> d/control
>> You don’t need pkg-php-tools in Build-Depends (dh-sequence-phpcomposer
>> is provided by pkg-php-tools since 1.40 IIRC).
> So if one wants to build on stable it would still be needed, right?

No, pkg-php-tools 1.40 is in stable. If dh-sequence-phpcomposer is not 
available, it will FTBFS anyway.

>> php-xdebug seems also useless.
> It is needed by tests (in dh_auto_test), otherwise they would fail.
> ```
> 1) League\Csv\AbstractCsvTest::testOutputHeaders
> League\Csv\AbstractCsvTest::testOutputHeaders needs the xdebug extension to
> run
> ```

Right (it doesn’t fail, it is skipped), I should have paid better 
attention at the output ;).

>> d/copyright
>> Copyright years do not match what is documented upstream in the package.
> There is no year in the source files except the one in the License file. What
> should I do? Use the one of the license file? Remove the years?

I’d use the years from the LICENSE file, unless better information 
exists elsewhere.

>> d/tests/control
>> The purpose of autopkgtest is to test the *installed* package, so you
>> must not make a League directory and League/Csv symlink: it will force
>> to use the source (that’s only useful at build time since the package is
>> not yet built).
>> The testsuite requires Internet, so needs-internet should be added to
>> Restrictions.
>> Furthermore, buildd do not have Internet access during the build, so the
>> testsuite must be amended (e.g., filtering away the test or data set
>> requiring Internet) to run there (at build time, via dh_auto_test):
> So, for autopkgtest, it will use the internet? But if I patch/remove the test,
> then internet is not needed anymore, so no need to add "needs-internet" ?

Well, it would be nicer to run the whole testsuite, but your patch won’t 
allow it.

> So for buildd which doesn't have the internet we have to remove the test?
> For now I created a patch that removes the download of these files.

Maybe moving the part that needs Internet to a new test, properly 
setting a new (e.g., internet) group could be excluded (e.g. “phpunit 
--exclude-group internet”) at build time, while being executed at runtime.

>> P.-S.: I usually run wrap-and-sort(1) to get an unified output, what
>> tool (or options) do you use (it doesn’t seem to sort the same way)?
> What kind of tool do you speak of? It is likely I don't use any. I made the
> things manually.

wrap-and-sort(1) is provided by devscripts, you may wish to run it 
instead of dealing with this manually (helps to have unified files).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-php-pear/attachments/20220611/8dc8e504/attachment.sig>

More information about the pkg-php-pear mailing list