Re: packaging with composer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 16/07/2014 05:12, Igor Gnatenko a écrit :
> On Tue, 2014-07-15 at 18:20 +0200, Remi Collet wrote:
>> Le 14/07/2014 22:17, Igor Gnatenko a écrit :
>>> Hi,
>>> 
>>> I want to update some packages. Sometimes ago it's used pear,
>>> now composer.
>>> 
>>> Because packager of swiftmailer is non-responsive I've tried
>>> update myself, but can't find documentation. Can you fix this
>>> bugs or let me know howto?
>>> 
>>> [0]https://bugzilla.redhat.com/show_bug.cgi?id=1119446 
>>> [1]https://bugzilla.redhat.com/show_bug.cgi?id=1119451
>>> 
>> 
>> As discussed on IRC (and here for memory)
>> 
>> We don't use composer in Fedora.
>> 
>> So composer libraries are installed like any other libraries,
>> new Guildelines is just about dependencies (simpler to use
>> packagist registered name than package name which is sometime not
>> obvious).
>> 
>> Composer.json provides lot of useful information.
>> 
>> So move from PEAR to Composer, is mostly a move of source from
>> pear to git(hub) and scripts from /usr/share/pear to
>> /usrs/share/php
>> 
>> Example: see various spec file of packages already switched
>> (doctrine, symfony, phpunit, ...)
>> 
>> Notice: - check dependent packages - check autoloader stuff
>> (often provided in pear, but not in git(hub), as composer
>> provides an autoloader. Need to be provided for compatibility if
>> some dependent packages uses it.
> How I can check this? I'm not familiar with php.

Looking at the pear package files, there is no autoloader.
And this package is not required by any other package.

> I've pushed update. Can you short annotate what checks are needed? 
> http://pkgs.fedoraproject.org/cgit/php-deepend-Mockery.git/commit/?id=c6865097de16bec1fb133209383cdd2741666e19
>
> 
http://koji.fedoraproject.org/koji/buildinfo?buildID=544694

Quick notes:

This shouldn't be used anymore:
	Requires:   php-common >= 5.3.2

Should be
- From composer.json
	Requires:   php(language) >= 5.3.2
	Requires:   pcre          >= 7.0

And from phpcompatinfo report
	Requires:   php-pcre
	Requires:   php-spl
	Requires:   php-reflection

As the pear package registers itself in pear database, you have to
unregister it on update, something like

  %post
  if [ -x %{_bindir}/pear ]; then
    %{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
       pear.survivethedeepend.com/Mockery >/dev/null || :
  fi

Notice: this will be run only if pear is installed (so on update), not
if this package is installed without pear, and to avoid adding a
unwanted dependency on pear.

As this package is the only one from the deepend channel, you can also
obsolete the channel package, and so drop it from the distro.

Of course running test during build is a must, so packaging the
missing dependencies is needed.

Notice: I hate such library which claims to be PSR-0 compliant but
which obviously is not (no vendor namespace). So this result with a
file (Mockery.php) directly in /usr/share/php. But I don't think you
can do anything to fix this... :(

Remi


>> 
>> Remi.
>> 
>> 
>>> 
>>> 
>>> _______________________________________________ php-devel
>>> mailing list php-devel@xxxxxxxxxxxxxxxxxxxxxxx 
>>> https://admin.fedoraproject.org/mailman/listinfo/php-devel
>>> 
>> 
>> _______________________________________________ php-devel mailing
>> list php-devel@xxxxxxxxxxxxxxxxxxxxxxx 
>> https://admin.fedoraproject.org/mailman/listinfo/php-devel
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEUEARECAAYFAlPGDksACgkQYUppBSnxahhslACfb7BkRkrX4kpfToLFwXTaSPB1
VZQAl0eQJDgWcmgKxF9Av4jdYbtP9v4=
=nZNB
-----END PGP SIGNATURE-----
_______________________________________________
php-devel mailing list
php-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/php-devel





[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora KDE]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux