Bug 196837 - (pear-PHPUnit3) Review Request: php-pear-PHPUnit - Regression testing framework for unit tests
Review Request: php-pear-PHPUnit - Regression testing framework for unit tests
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Remi Collet
Fedora Package Reviews List
:
Depends On: php-pear-Log php-pecl-xdebug 196802 pear-Image-GraphViz 212887 channel-phpunit
Blocks: FE-ACCEPT
  Show dependency treegraph
 
Reported: 2006-06-27 00:54 EDT by Christopher Stone
Modified: 2008-02-13 18:05 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-12 15:44:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
fedora: fedora‑review+
kevin: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Christopher Stone 2006-06-27 00:54:38 EDT
Spec URL: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit2.spec
SRPM URL: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit2-3.0.0-alpha11.1.src.rpm

Description:
PHPUnit is a family of PEAR packages (PHPUnit2 for PHP 5, PHPUnit for PHP 4)
that supports the development of object-oriented PHP applications using the
concepts and methods of Agile Software Development, Extreme Programming,
Test-Driven Development and Design-by-Contract Development by providing an
elegant and robust framework for the creation, execution and analysis of
Unit Tests.
Comment 3 Christopher Stone 2006-10-29 18:45:41 EST
Im renaming this bug to PHPUnit3, however I think it will ultimately just be
called PHPUnit and Obsolete PHPUnit2.
Comment 4 Christopher Stone 2006-10-29 19:06:05 EST
Updated to beta2, renamed package "PHPUnit", obsolete other PHPUnit packages

SPEC: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit.spec
SRPM:
http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit-3.0.0-0.1.beta2.src.rpm

%changelog
* Sun Oct 29 2006 Christopher Stone <chris.stone@gmail.com> 3.0.0-0.1.beta2
- Initial Release
Comment 5 Christopher Stone 2006-10-29 19:35:41 EST
NOTE: I can't get this to build under mock.  We need to somehow install the
channel by hand without using the net.  The install instructions say to run:

pear channel-discover pear.phpunit.de

But it seems just copying over files into .channel/ is not enough?
Comment 6 Remi Collet 2006-10-30 11:21:58 EST
My first reflexion :

We could make a php-channel-pear-phpunit-de (we have to find a "normalized"
name, it seems that channels are not pear/pecl specific) only  containing the
xml file for the channel (http://pear.phpunit.de/channel.xml) and

%post
if [ $1 -eq  1 ] ; then
   %{__pear} channel-add pear.phpunit.de.xml
else
   %{__pear} channel-update pear.phpunit.de.xml
fi

%postun
if [ $1 -eq 0 ] ; then
   %{__pear} channel-remove pear.phpunit.de
fi

All packages that use this channel should Requires and BuildRequires this new
RPM (remove all the package must be done before removing the channel).

To be tested.
Comment 7 Remi Collet 2006-10-30 11:39:34 EST
You probably should 
Provides:       php-pear(%{pear_name}) = %{version}
Provides:       php-pear(%{pear_name}2) = %{version}
Obsoletes:      php-pear-PHPUnit2

But i don't know if it should obsolete PHPUnit as it doesn't provides
PHPUnit.php (and other files from PHPUnit-1.3.2) used by some old package test
suite (php-pear-Console-Getargs for ex.).

More time needed for me to test this package.

Cordialy.
Comment 8 Christopher Stone 2006-10-30 22:12:05 EST
Remi, thanks for the comments.  I only assumed it overrides both 1&2 becuase
when I packaged 3 it had files for PHPUnit and PHPUnit2.  Also the web site says
you should uninstall those old versions before using the new one.  I don't know
what it does in reality though.

Could we install the channel in a %pre section in this package instead?  I think
that would be better than another package since I dont think there will be any
other RPMs using this channel.  But might be worth discussing for other channels
or if the phpunit channel will have other packages in it.

BTW, Remi, would you like to be co-maintainer with me on this package?
Comment 9 Remi Collet 2006-11-02 08:34:33 EST
> Could we install the channel in a %pre section in this package instead? 

I think this will not help you to build on mock.

You prabably have to propose a packaging rules for this "channel" package on
fedora-packaging@redhat.com.

> BTW, Remi, would you like to be co-maintainer with me on this package?

"co-maintainer" is a little bit confusing for me with the actual fedora system,
but i agree to work with you on this.
Comment 10 Jason Tibbitts 2006-11-28 22:57:19 EST
So what did you end up deciding to do here?  I don't see a problem with a
package that sets up the channel; it seems to be the most reasonable thing to do
here.
Comment 11 Christopher Stone 2006-11-28 23:34:24 EST
We have to figure out if phpunit3 actually replaces phpunit 1 and 2.  Remi said
that it doesn't provide phpunit.php so I have to investigate further.  In
addition 3.0.0 final was released about a week or so ago, so I need to update
the spec for the stable version.
Comment 12 Jason Tibbitts 2006-12-27 20:57:31 EST
Any movement here?  It would be nice to get this closed out once and for all. 
I'm hapy to review this even if it doesn't end up replacing the older versionf
of PHPUnit.
Comment 13 Christopher Stone 2006-12-27 23:35:12 EST
SPEC: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit.spec
SRPM: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit-3.0.0-1.src.rpm

New SRPM updating to 3.0.0 final.  Incorporates Remi's suggestion of adding a
channel package.

For some really strange reason, if you have php-pear-PHPUnit2 installed, and rpm
-Uvh this package, it will remove all the files that are in common between the
two packages.  I do not understand why, either I am doing something wrong or
there is a bug in rpm.
Comment 14 Christopher Stone 2006-12-28 11:56:39 EST
Okay, I think I know what is going on with the Provides/Obsoletes for PHPUnit2.
 When PHPUnit2 gets to its %postun section it calls pear uninstall which removes
the files.  So I don't think we can use Provides/Obsoletes in this case.  We
probably have to explicitly use a Conflicts tag in this case.  Comments/Suggestions?
Comment 15 Remi Collet 2006-12-30 12:12:29 EST
I confirm that it's a pear bug.
I file it : http://pear.php.net/bugs/bug.php?id=9712

So using Conflicts seems a good workaround.
Comment 16 Christopher Stone 2007-01-05 18:17:55 EST
SPEC: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit.spec
SRPM: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit-3.0.1-1.src.rpm

%changelog
* Fri Jan 05 2007 Christopher Stone <chris.stone@gmail.com> 3.0.1-1
- Upstream Sync
Comment 17 Christopher Stone 2007-01-08 16:27:32 EST
NOTE: This package is only meant to be built/used on devel/fc7+.
Comment 18 Christopher Stone 2007-01-14 19:01:46 EST
SPEC: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit.spec
SRPM: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit-3.0.2-1.src.rpm

%changelog
* Sun Jan 14 2007 Christopher Stone <chris.stone@gmail.com> 3.0.2-1
- Upstream sync
Comment 20 Christopher Stone 2007-01-29 20:50:46 EST
SPEC: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit.spec
SRPM: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit-3.0.3-1.src.rpm

%changelog
* Mon Jan 29 2007 Christopher Stone <chris.stone@gmail.com> 3.0.3-1
- Upstream sync
Comment 21 Christopher Stone 2007-02-21 17:21:25 EST
SPEC: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit.spec
SRPM: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit-3.0.4-1.src.rpm

%changelog
* Wed Feb 21 2007 Christohper Stone <chris.stone@gmail.com> 3.0.4-1
- Upstream sync
Comment 22 Christopher Stone 2007-02-26 13:26:16 EST
SPEC: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit.spec
SRPM: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit-3.0.5-1.src.rpm

%changelog
* Mon Feb 26 2007 Christopher Stone <chris.stone@gmail.com> 3.0.5-1
- Upstream sync
Comment 23 Remi Collet 2007-02-26 18:03:16 EST
Really sorry, i haven't notice that this (old) review is not assigned.
So i will make the review (ASAP).

First comment : pear bug #9712 is close (my patch is merge upstream) and pear
1.5.0 is now available in rawhide, so i think you should swicth back to :
Requires: php-pear >= 1:1.5.0
Obsoletes: php-pear-PHPUnix2

No need to a new spec file, i will work on this release for the review.
Comment 24 Remi Collet 2007-02-27 13:16:24 EST
REVIEW
* source files match upstream:
fca4887ed95996a4b18e0cb0b8ff8130  PHPUnit-3.0.5.tgz* package meets naming and
packaging guidelines.
* specfile is properly named, is cleanly written and uses macros consistently.
* dist tag is present.
* build root is correct.
* license field matches the actual license.
* license is open source-compatible (BSD).
* latest version is being packaged (3.0.5)
* BuildRequires are proper.
* %clean is present.
* package builds in mock (FC6).
* package installs properly
* rpmlint is silent.
* final provides are sane:
php-pear(pear.phpunit.de/PHPUnit) = 3.0.5
php-pear-PHPUnit = 3.0.5-1.fc7
=> final Requires are sane:
see comment
* %check is not present; 
=> don't owns the directories it creates
* don't own directories it shouldn't.
* no duplicates in %files.
* file permissions are appropriate.
* scriptlets are OK (pear install)
* code, not content.
* documentation is small, so no -docs subpackage is necessary.
* %docs are not necessary for the proper functioning of the package.

Samples works well.

So MUST
- remove Conflicts (add Obsoletes)
- Requires: php-pear(PEAR) >= 1.5.0
- own %{pear_testdir}/%{pear_name}

Should 
- Remove (build safely, even in mock without)
# Need to allow installation in channel://pear.phpunit.de/
mkdir -p $RPM_BUILD_ROOT%{pear_phpdir}
cp -r %{pear_phpdir}/.channels $RPM_BUILD_ROOT%{pear_phpdir}/.channels

- simplify under doc (remove PHPUnit subdir)
%doc %{pear_name}-%{version}/docdir/%{pear_name}/%{pear_name}/*

- only uninstall old PHPunit on upgrade
%post
if [ $1 -gt  1 ] ; then
  ...
fi
Comment 25 Christopher Stone 2007-03-07 19:46:11 EST
SPEC: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit.spec
SRPM: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit-3.0.5-2.src.rpm

%changelog
* Wed Mar 07 2007 Christopher Stone <chris.stone@gmail.com> 3.0.5-2
- Add Obsoletes/Provides for php-pear(PHPUnit2)
- Requires php-pear(PEAR) >= 1.5.0
- Own %%{pear_testdir}/%%{pear_name}
- Remove no longer needed manual channel install
- Simplify %%doc
- Only unregister old phpunit on upgrade
Comment 26 Remi Collet 2007-03-08 02:45:28 EST
Updating from php-pear-PHPUnit-1.3.2 + php-pear-PHPUnit2-2.3.6 to
php-pear-PHPUnit-3.0.5 work well (rpm -V php-pear-PHPUnit is silent)

$ rpm -qf /usr/share/pear/test/PHPUnit/
file /usr/share/pear/test/PHPUnit is not owned by any package

Please change
%{pear_testdir}/%{pear_name}/%{pear_name}
to
%{pear_testdir}/%{pear_name}

I don't think this is a valid provides
Provides:       php-pear(%{pear_name}2) < 3.0.0

Should be 
Provides:       php-pear(%{pear_name}2) = %{version}
Comment 27 Christopher Stone 2007-03-08 03:13:18 EST
SPEC: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit.spec
SRPM: http://tkmame.retrogames.com/fedora-extras/php-pear-PHPUnit-3.0.5-3.src.rpm

%changelog
* Thu Mar 08 2007 Christopher Stone <chris.stone@gmail.com> 3.0.5-3
- Fix testdir
- Fix Provides version
Comment 28 Remi Collet 2007-03-10 09:45:13 EST
* APPROVED *
Comment 29 Remi Collet 2007-03-10 09:48:13 EST
CVS Request :

Please change Christopher as the owner of this package (updating the old one i
own, for devel/F7).

Keep me in the Cc list (for FC5/FC6).

Regards
Comment 30 Christopher Stone 2007-03-10 17:42:30 EST
Update Package CVS Request
==========================
Owners: chris.stone@gmail.com
InitialCC: Fedora@FamilleCollet.com

NOTE: This is not a new package, only the ownership is changing in devel branch,
and previous owner (Remi) is being added to InitialCC list.
Comment 31 Christopher Stone 2007-03-12 15:44:07 EDT
- Updated spec and sources on devel branch
- Built for devel

Thanks for the review!! 

:D
Comment 32 Christopher Stone 2008-02-13 16:37:34 EST
Package Change Request
======================
Package Name: php-pear-PHPUnit
New Branches: EL-5
Comment 33 Kevin Fenzi 2008-02-13 18:05:18 EST
cvs done.

Note You need to log in before you can comment on or make changes to this bug.