Hi,
I'm packaging a PHP library [1] that is hosted on GitHub and has a .gitattributes file that uses export-ignore to not make the test suite directory part of the archive. As I want to run the unit tests in %check during package build, this is a bit of a problem. I see two approaches:
1. ask upstream to remove test suite directory from .gitattributes (probably won't work); 2. git clone the source and make my own archive after throwing away .gitattributes
Maybe there is a better way I don't know about yet :-)
Thanks, François
On samedi 30 septembre 2017 18:09:23 CEST François Kooman wrote:
Hi,
I'm packaging a PHP library [1] that is hosted on GitHub and has a .gitattributes file that uses export-ignore to not make the test suite directory part of the archive. As I want to run the unit tests in %check during package build, this is a bit of a problem. I see two approaches:
- ask upstream to remove test suite directory from .gitattributes
(probably won't work); 2. git clone the source and make my own archive after throwing away .gitattributes
Maybe there is a better way I don't know about yet :-)
Thanks, François
[1] https://github.com/paragonie/sodium_compat _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
Solution 2.
There's a bash script used by Nodejs packager to fetch tests that are rarely provided in the app archive. You could probably adapt directly it to your usecase. Don't forget to add the script as a Source in your SPEC.
I'm attaching it to this message.
Solution #2
Remi and I package many PHP libraries this way. For example:
# php-aws-sdk3
Spec: https://src.fedoraproject.org/rpms/php-aws-sdk3/blob/master/f/php-aws-sdk3.s...
Get source script: https://src.fedoraproject.org/rpms/php-aws-sdk3/blob/master/f/php-aws-sdk3-g...
# php-zendframework-zend-stdlib
Spec: https://src.fedoraproject.org/rpms/php-zendframework-zend-stdlib/blob/master...
Get source script: https://src.fedoraproject.org/rpms/php-zendframework-zend-stdlib/blob/master...
On Sat, Sep 30, 2017 at 12:32 PM, Robert-André Mauchin zebob.m@gmail.com wrote:
On samedi 30 septembre 2017 18:09:23 CEST François Kooman wrote:
Hi,
I'm packaging a PHP library [1] that is hosted on GitHub and has a .gitattributes file that uses export-ignore to not make the test suite directory part of the archive. As I want to run the unit tests in %check during package build, this is a bit of a problem. I see two approaches:
- ask upstream to remove test suite directory from .gitattributes
(probably won't work); 2. git clone the source and make my own archive after throwing away .gitattributes
Maybe there is a better way I don't know about yet :-)
Thanks, François
[1] https://github.com/paragonie/sodium_compat _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
Solution 2.
There's a bash script used by Nodejs packager to fetch tests that are rarely provided in the app archive. You could probably adapt directly it to your usecase. Don't forget to add the script as a Source in your SPEC.
I'm attaching it to this message. _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
On 09/30/2017 07:56 PM, Shawn Iwinski wrote:
Solution #2
Remi and I package many PHP libraries this way. For example:
# php-aws-sdk3 # php-zendframework-zend-stdlib
Thanks!
I'll use those as a template!
Cheers, François
On 30.9.2017 18:09, François Kooman wrote:
Hi,
I'm packaging a PHP library [1] that is hosted on GitHub and has a .gitattributes file that uses export-ignore to not make the test suite directory part of the archive.
I wonder: what is the upstream motivation to do this?
As I want to run the unit tests in %check during package build, this is a bit of a problem. I see two approaches:
- ask upstream to remove test suite directory from .gitattributes
(probably won't work); 2. git clone the source and make my own archive after throwing away .gitattributes
Maybe there is a better way I don't know about yet :-)
Thanks, François
[1] https://github.com/paragonie/sodium_compat _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
On 10/01/2017 09:47 PM, Miro Hrončok wrote:
I wonder: what is the upstream motivation to do this?
What I read somewhere, and it kinda makes sense in the world ruled by dependency managers, is that the reason for doing this is to strip out anything that is not needed @ runtime, to reduce size and "clutter" in the vendor directory of depending applications or libraries.
It is assumed that the test suite will only be used by developers who will then use a proper git clone to get the code and software packagers don't exist :)
Cheers, François
Le 01/10/2017 à 20:47, Miro Hrončok a écrit :
On 30.9.2017 18:09, François Kooman wrote:
Hi,
I'm packaging a PHP library [1] that is hosted on GitHub and has a .gitattributes file that uses export-ignore to not make the test suite directory part of the archive.
I wonder: what is the upstream motivation to do this?
This is a very common practice in "composer" world :(
Despite "composer is not a installer" (only a dependency resolver), lot of people use it to install their app, and don't want the dependency test suite in their installation tree.
Usual answer from upstream is that composer is able to pull the full tree using the --prefer-source (vs --prefer-dist) option.
Yes this is a nightmare for us, and I don't count the number of upstream bugs I open about this. BTW I've stopped fighting.
Long discussion about this, reported to composer, as I really think the .gitattributes is a way to solve a composer issue:
https://github.com/composer/composer/issues/4438
Remi.
On 2.10.2017 06:58, Remi Collet wrote:
Le 01/10/2017 à 20:47, Miro Hrončok a écrit :
On 30.9.2017 18:09, François Kooman wrote:
Hi,
I'm packaging a PHP library [1] that is hosted on GitHub and has a .gitattributes file that uses export-ignore to not make the test suite directory part of the archive.
I wonder: what is the upstream motivation to do this?
This is a very common practice in "composer" world :(
Despite "composer is not a installer" (only a dependency resolver), lot of people use it to install their app, and don't want the dependency test suite in their installation tree.
Usual answer from upstream is that composer is able to pull the full tree using the --prefer-source (vs --prefer-dist) option.
Yes this is a nightmare for us, and I don't count the number of upstream bugs I open about this. BTW I've stopped fighting.
Long discussion about this, reported to composer, as I really think the .gitattributes is a way to solve a composer issue:
https://github.com/composer/composer/issues/4438
Oh god, reading that makes me sad.
Remi. _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
Dne 30.9.2017 v 18:09 François Kooman napsal(a):
Hi,
I'm packaging a PHP library [1] that is hosted on GitHub and has a .gitattributes file that uses export-ignore to not make the test suite directory part of the archive. As I want to run the unit tests in %check during package build, this is a bit of a problem. I see two approaches:
- ask upstream to remove test suite directory from .gitattributes
(probably won't work); 2. git clone the source and make my own archive after throwing away .gitattributes
3. Clone the repository and create the archive containing just the test suite. I really want to be able to download the official pristine upstream archive and I don't want to use any script for that.
Vít
Maybe there is a better way I don't know about yet :-)
Thanks, François
[1] https://github.com/paragonie/sodium_compat _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
packaging@lists.fedoraproject.org