Bug 1094864 - Review Request: php-pecl-xmldiff - Pecl package for XML diff and merge
Summary: Review Request: php-pecl-xmldiff - Pecl package for XML diff and merge
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Remi Collet
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-06 16:09 UTC by Pavel Alexeev
Modified: 2014-11-04 08:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-04 08:01:09 UTC
Type: ---
Embargoed:
fedora: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)
review.txt (7.48 KB, text/plain)
2014-05-14 15:19 UTC, Remi Collet
no flags Details

Description Pavel Alexeev 2014-05-06 16:09:09 UTC
Spec URL: https://raw.githubusercontent.com/Hubbitus/Fedora-packaging/91d764fa902cedfa1f8bddb32f844409290035d1/SPECS/php-pecl-xmldiff.spec
SRPM URL: http://hubbitus.info/rpm/Fedora20/php-pecl-xmldiff/php-pecl-xmldiff-0.9.2-1.fc20.src.rpm
Description: The extension is able to produce diffs of two XML documents and then to apply the difference to the source document. The diff is a XML document containing copy/insert/delete instruction nodes in human readable format. DOMDocument objects, local files and strings in memory can be processed.

Fedora Account System Username: hubbitus

Comment 1 Sam Wilson 2014-05-08 02:42:56 UTC
Hi Pavel,

An informal review as I learn packaging guidelines. Notes are inline.

Cheers,

Sam

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[-]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "BSD (2 clause)". Detailed output of licensecheck in
     /home/swilson/fedora/1094864-php-pecl-xmldiff/licensecheck.txt
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 2 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the license(s)
     in its own file, then that file, containing the text of the license(s)
     for the package is included in %doc.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: %config files are marked noreplace or the reason is justified.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: No %config files under /usr.
[x]: Package do not use a name that already exist
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate file
     from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.

# Scratch build output http://koji.fedoraproject.org/koji/taskinfo?taskID=6824362

[x]: %check is present and all tests pass.
[-]: Packages should try to preserve timestamps of original installed files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: Dist tag is present (not strictly required in GL).
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Uses parallel make %{?_smp_mflags} macro.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[x]: Spec file according to URL is the same as in SRPM.

PHP:
[x]: Run phpci static analyze on all php files.
     Note: phpci static analyze results in /home/swilson/fedora/1094864-php-
     pecl-xmldiff/phpci.log


Rpmlint
-------
Checking: php-pecl-xmldiff-0.9.2-1.fc19.x86_64.rpm
          php-pecl-xmldiff-0.9.2-1.fc19.src.rpm
php-pecl-xmldiff.src: E: specfile-error sh: php-config: command not found
php-pecl-xmldiff.src: E: specfile-error error: Macro %php_extdir has empty body
2 packages and 0 specfiles checked; 2 errors, 0 warnings.

# Expected as my workstation has no php-devel to expand macro


Rpmlint (installed packages)
----------------------------
# rpmlint php-pecl-xmldiff
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
# echo 'rpmlint-done:'

Requires
--------
php-pecl-xmldiff (rpmlib, GLIBC filtered):
    /bin/sh
    /usr/bin/pecl
    config(php-pecl-xmldiff)
    libc.so.6()(64bit)
    libdiffmark.so.1()(64bit)
    libdl.so.2()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libm.so.6()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libxml2.so.2()(64bit)
    libxml2.so.2(LIBXML2_2.4.30)(64bit)
    libz.so.1()(64bit)
    php(api)
    php(zend-abi)
    php-xml
    rtld(GNU_HASH)

Provides
--------
php-pecl-xmldiff:
    config(php-pecl-xmldiff)
    php-pecl-xmldiff
    php-pecl-xmldiff(x86-64)
    php-xmldiff
    php-xmldiff(x86-64)

Source checksums
----------------
http://pecl.php.net/get/xmldiff-0.9.2.tgz :
  CHECKSUM(SHA256) this package     : 60d7d7fde2ebb695ae2cb26803153ad07a6146e0d70c102b3403131c86177550
  CHECKSUM(SHA256) upstream package : 60d7d7fde2ebb695ae2cb26803153ad07a6146e0d70c102b3403131c86177550

Comment 2 Pavel Alexeev 2014-05-08 08:56:25 UTC
So, no issues have been found so far?

Comment 3 Sam Wilson 2014-05-08 09:14:28 UTC
(In reply to Pavel Alexeev (aka Pahan-Hubbitus) from comment #2)
> So, no issues have been found so far?

None as far as I can tell. I cannot yet formally review your package though so we wait.

Cheers,

Sam

Comment 4 Remi Collet 2014-05-11 14:48:52 UTC
Quick notes:

- unused macro php_apiver

- unneeded default value php_extdir (if really you want to provides default value for it, you also need to provide default one for php_inidir)

- please run upstream provided test suite

- please install doc in %pecl_docdir (so "pecl list-files xmldiff" will be ok, I know this is only explicitly written in Guildelines for pear package...)

- prefix ini file with numeric value in rawhide

%if 0%{?fedora} < 21
# After dom
%global ini_name  %{pecl_name}.ini
%else
# After 20-dom
%global ini_name  40-%{pecl_name}.ini
%endif

- filtering private is no more needed in f20+ (and rhel7)

- why don't you provide the -devel sub package ? (with the installed header, and perhaps the upstream test suite... useful as documentation)

- requires

Requires php-dom%{_isa} and php-libxml%{?_isa} instead of php-xml (from source code):
    xmldiff.cpp:    ZEND_MOD_REQUIRED("dom")
    xmldiff.cpp:    ZEND_MOD_REQUIRED("libxml")

Comment 5 Remi Collet 2014-05-11 14:51:47 UTC
Be consistent, if you protect %{pecl_uninstall} you should also protect %{pecl_install} (or simply don't protect both, as now defined everywhere, except RHEL-5)

Comment 6 Pavel Alexeev 2014-05-12 14:37:06 UTC
>- filtering private is no more needed in f20+ (and rhel7)
Obviously i've missing something. Where it stated? Meantime if it is not targeted to El5 i'm prefer leave it for Fedora 19.

>- why don't you provide the -devel sub package ? (with the installed header, and perhaps the upstream test suite... useful as documentation)
I don't know anything which may use it, do you? Is it have worth at all?

Other issues addressed.

Changes: https://github.com/Hubbitus/Fedora-packaging/commit/15c7414d9415d4755c37f0ee8e9ff9897b20159f
Spec: https://raw.githubusercontent.com/Hubbitus/Fedora-packaging/15c7414d9415d4755c37f0ee8e9ff9897b20159f/SPECS/php-pecl-xmldiff.spec
Srpm: http://hubbitus.info/rpm/Fedora20/php-pecl-xmldiff/php-pecl-xmldiff-0.9.2-2.fc20.src.rpm

One additional question which I had been intended ask in ML. That pecl extension require dom.so also to be turned on. For tests I do that explicitly and provide requires. But what if that installed, but then disabled by user on target system? Then installation of php-pecl-xmldiff lead to malfunction extension. I could add "extension=dom.so" before this extension itself. Is it documented anywhere?

Comment 7 Remi Collet 2014-05-13 15:03:00 UTC
(In reply to Pavel Alexeev (aka Pahan-Hubbitus) from comment #6)
> >- filtering private is no more needed in f20+ (and rhel7)
> Obviously i've missing something. Where it stated? Meantime if it is not
> targeted to El5 i'm prefer leave it for Fedora 19.

You can conditionalize it (which make easier to detect when could be dropped)
%if 0%{?fedora} < 20 && 0%{?rhel} < 7

> 
> >- why don't you provide the -devel sub package ? (with the installed header, and perhaps the upstream test suite... useful as documentation)
> I don't know anything which may use it, do you? Is it have worth at all?

I don't know anything which use it yet.  
I'm used to follow upstream desing.
But will be easy to fix if needed later...
Your choice.

> mv {CREDITS,LICENSE} ./%{pecl_docdir}/
> %doc %peclName-%{version}/%{pecl_docdir}/{CREDITS,LICENSE}

This result as
/usr/share/doc/php-pecl-xmldiff
/usr/share/doc/php-pecl-xmldiff/CREDITS
/usr/share/doc/php-pecl-xmldiff/LICENSE

While expected is (check: "pecl list xmldiff")
/usr/share/doc/pecl/xmldiff
/usr/share/doc/pecl/xmldiff/CREDITS
/usr/share/doc/pecl/xmldiff/LICENSE

Comment 8 Pavel Alexeev 2014-05-13 18:36:02 UTC
(In reply to Remi Collet from comment #7)
> (In reply to Pavel Alexeev (aka Pahan-Hubbitus) from comment #6)
> You can conditionalize it (which make easier to detect when could be dropped)
> %if 0%{?fedora} < 20 && 0%{?rhel} < 7
That was already stated in comment, but let it be if you insist.

> > mv {CREDITS,LICENSE} ./%{pecl_docdir}/
> > %doc %peclName-%{version}/%{pecl_docdir}/{CREDITS,LICENSE}
> 
> This result as
> /usr/share/doc/php-pecl-xmldiff
> /usr/share/doc/php-pecl-xmldiff/CREDITS
> /usr/share/doc/php-pecl-xmldiff/LICENSE
> 
> While expected is (check: "pecl list xmldiff")
> /usr/share/doc/pecl/xmldiff
> /usr/share/doc/pecl/xmldiff/CREDITS
> /usr/share/doc/pecl/xmldiff/LICENSE
Interesting it is because it is marked as %doc:

+ cd /home/pasha/SOFT/rpmbuild/BUILD
+ cd php-pecl-xmldiff-0.9.2
+ DOCDIR=/home/pasha/SOFT/rpmbuild/BUILDROOT/php-pecl-xmldiff-0.9.2-2.fc20.x86_64/usr/share/doc/php-pecl-xmldiff
+ export DOCDIR
+ /usr/bin/mkdir -p /home/pasha/SOFT/rpmbuild/BUILDROOT/php-pecl-xmldiff-0.9.2-2.fc20.x86_64/usr/share/doc/php-pecl-xmldiff
+ cp -pr xmldiff-0.9.2//usr/share/doc/pecl/xmldiff/CREDITS xmldiff-0.9.2//usr/share/doc/pecl/xmldiff/LICENSE /home/pasha/SOFT/rpmbuild/BUILDROOT/php-pecl-xmldiff-0.9.2-2.fc20.x86_64/usr/share/doc/php-pecl-xmldiff

Do you suggest not mark it as %doc and include as just files?
Then I think we violate documentation rules: https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Documentation . One more way is try redefine DOCDIR environment variable in spec, but it also looks not so correct for me.

Comment 9 Remi Collet 2014-05-14 05:27:47 UTC
For %doc.

If files are in the source tree, they are copied in %_docdir and mark as doc
If files are in the install tree, they stay in their location and mark as doc.

So, see lot of existing pear/pecl packages (in rawhide, all mine are fixed to use this, and so conform to the PHP Guidelines).

Ex:
%install
...
install -Dpm 644 LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE

%file
%doc %{pecl_docdir}/%{pecl_name}

$ rpm -q --docfiles php-pecl-xmldiff
/usr/share/doc/pecl/xmldiff/LICENSE

Comment 11 Remi Collet 2014-05-14 15:19:44 UTC
Created attachment 895520 [details]
review.txt

Generated by fedora-review 0.5.1 (bb9bf27) last change: 2013-12-13
Command line :/usr/bin/fedora-review -b 1094864
Buildroot used: fedora-20-x86_64

Comment 12 Remi Collet 2014-05-14 15:21:21 UTC
MUST

[!]: Package must own all directories that it creates.
   Must own /usr/share/doc/pecl/xmldiff

-%doc %{pecl_docdir}/%peclName/CREDITS
-%doc %{pecl_docdir}/%peclName/LICENSE
+%doc %{pecl_docdir}/%peclName


Notice:

[!]: Development files must be in a -devel package
  Not provided on packager choice.
  Could be add later.

Comment 14 Remi Collet 2014-05-14 17:06:00 UTC
[x]: Package must own all directories that it creates.

=== APPROVED ===

Comment 15 Pavel Alexeev 2014-05-15 07:14:05 UTC
Thank you very much for the review.

New Package SCM Request
=======================
Package Name: php-pecl-xmldiff
Short Description: Pecl package for XML diff and merge
Owners: hubbitus
Branches: f19 f20 f21 epel7
InitialCC:

Comment 16 Gwyn Ciesla 2014-05-16 15:52:39 UTC
Git done (by process-git-requests).

Comment 17 Fedora Update System 2014-05-16 20:11:28 UTC
php-pecl-xmldiff-0.9.2-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/php-pecl-xmldiff-0.9.2-4.fc19

Comment 18 Fedora Update System 2014-05-16 20:20:01 UTC
php-pecl-xmldiff-0.9.2-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/php-pecl-xmldiff-0.9.2-4.fc20

Comment 19 Fedora Update System 2014-05-28 02:54:20 UTC
php-pecl-xmldiff-0.9.2-4.fc19 has been pushed to the Fedora 19 stable repository.

Comment 20 Fedora Update System 2014-05-28 02:58:26 UTC
php-pecl-xmldiff-0.9.2-4.fc20 has been pushed to the Fedora 20 stable repository.

Comment 21 Remi Collet 2014-11-04 08:01:09 UTC
Should be closed for a while.


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