Bug 823065

Summary: Review Request: php-symfony2-Translation - Symfony2 Translation Component
Product: [Fedora] Fedora Reporter: Shawn Iwinski <shawn>
Component: Package ReviewAssignee: Remi Collet <fedora>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: fedora, notting, package-review
Target Milestone: ---Flags: fedora: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-10 16:23:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 814994, 817303, 823042    
Bug Blocks:    
Attachments:
Description Flags
php-symfony2-Translation-review.txt none

Comment 1 Shawn Iwinski 2012-05-20 18:11:58 UTC
Updates per comments in bug 823043

- Removed BuildRoot
- Changed php require to php-common
- Added the following requires based on phpci results:
  php-libxml, php-pcre, php-simplexml
- Removed %defattr from %files section

SPEC URL:
http://people.redhat.com/siwinski/rpmbuild/SPECS/php-symfony2-Translation.spec

SRPM URL:
http://people.redhat.com/siwinski/rpmbuild/SRPMS/php-symfony2-Translation-2.0.14-2.fc16.src.rpm

Comment 3 Shawn Iwinski 2012-05-31 17:38:02 UTC
Updated to upstream version 2.0.15 & updates per bug #817303

- Removed "BuildRequires: php-pear >= 1:1.4.9-1.2"
- Updated %prep section
- Removed cleaning buildroot from %install section
- Removed documentation move from %install section (fixed upstream)
- Removed %clean section
- Updated %doc in %files section

SPEC URL: http://people.redhat.com/siwinski/rpmbuild/SPECS/php-symfony2-Translation.spec

SRPM URL: http://people.redhat.com/siwinski/rpmbuild/SRPMS/php-symfony2-Translation-2.0.15-1.fc16.src.rpm

Comment 4 Shawn Iwinski 2012-06-10 23:56:12 UTC
Issue: XSD files installed as doc, but referenced by code.

-- XSD files --
* Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd
* Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd

-- Code (from Translation/Loader/XliffFileLoader.php) --
    private function parseFile($file)
    {
     	$dom = new \DOMDocument();
        $current = libxml_use_internal_errors(true);
        if (!@$dom->load($file, defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0)) {
            throw new \RuntimeException(implode("\n", $this->getXmlErrors()));
        }

	$location = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd';
       	$parts = explode('/', $location);
        if (0 === stripos($location, 'phar://')) {
            $tmpfile = tempnam(sys_get_temp_dir(), 'sf2');
            if ($tmpfile) {
               	copy($location, $tmpfile);
               	$parts = explode('/', str_replace('\\', '/', $tmpfile));
            }
        }
     	$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
        $location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));

        $source = file_get_contents(__DIR__.'/schema/dic/xliff-core/xliff-core-1.2-strict.xsd');
	$source = str_replace('http://www.w3.org/2001/xml.xsd', $location, $source);

        if (!@$dom->schemaValidateSource($source)) {
            throw new \RuntimeException(implode("\n", $this->getXmlErrors()));
        }
        $dom->validateOnParse = true;
        $dom->normalizeDocument();
	libxml_use_internal_errors($current);

        return simplexml_import_dom($dom);
    }



See original finding of this issue at https://bugzilla.redhat.com/show_bug.cgi?id=823046#c8

Comment 5 Shawn Iwinski 2012-06-13 06:06:07 UTC
Added optional requires

- Added php-pear(%{pear_channel}/Config) require
- Removed ownership for directories already owned by required packages

Update per comment #4

- Fix package.xml for *.xsd files issue

SPEC URL: http://people.redhat.com/~siwinski/rpmbuild/SPECS/php-symfony2-Translation.spec

SRPM URL: http://people.redhat.com/~siwinski/rpmbuild/SRPMS/php-symfony2-Translation-2.0.15-3.fc17.src.rpm

Comment 6 Remi Collet 2012-06-24 08:30:42 UTC
Created attachment 593977 [details]
php-symfony2-Translation-review.txt

Generated by fedora-review 0.1.3

Comment 7 Remi Collet 2012-06-24 08:32:36 UTC
Please consider adding (optionnal dependency)
Requires:         php-pear(%{pear_channel}/Yaml)

No blocker.

== APPROVED ==

Comment 8 Shawn Iwinski 2012-06-25 03:26:48 UTC
(In reply to comment #7)
> Please consider adding (optionnal dependency)
> Requires:         php-pear(%{pear_channel}/Yaml)

Thanks Remi!

I totally missed that optional dependency in Symfony/Component/Translation/Loader/YamlFileLoader.php.  Note to self: "phpci print --recursive --report=class" would have helped out there ;)

I will notify upstream that they may wish to update their package.xml with that optional dependency since it only lists pear.symfony.com/Config.

I will add the dependency after the initial import of the approved package.

Comment 9 Shawn Iwinski 2012-06-25 03:27:49 UTC
New Package SCM Request
=======================
Package Name: php-symfony2-Translation
Short Description: Symfony2 Translation Component
Owners: siwinski
Branches: f16 f17 el6
InitialCC:

Comment 10 Gwyn Ciesla 2012-06-26 14:42:00 UTC
Git done (by process-git-requests).

Comment 11 Fedora Update System 2012-06-28 05:41:49 UTC
php-symfony2-Translation-2.0.15-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/php-symfony2-Translation-2.0.15-4.fc17

Comment 12 Fedora Update System 2012-06-28 05:42:04 UTC
php-symfony2-Translation-2.0.15-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/php-symfony2-Translation-2.0.15-4.fc16

Comment 13 Fedora Update System 2012-06-28 05:42:35 UTC
php-symfony2-Translation-2.0.15-4.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/php-symfony2-Translation-2.0.15-4.el6

Comment 14 Fedora Update System 2012-06-28 16:05:49 UTC
php-symfony2-Translation-2.0.15-4.el6 has been pushed to the Fedora EPEL 6 testing repository.

Comment 15 Fedora Update System 2012-07-10 16:23:33 UTC
php-symfony2-Translation-2.0.15-4.fc16 has been pushed to the Fedora 16 stable repository.

Comment 16 Fedora Update System 2012-07-10 16:24:57 UTC
php-symfony2-Translation-2.0.15-4.fc17 has been pushed to the Fedora 17 stable repository.

Comment 17 Fedora Update System 2012-07-14 18:32:06 UTC
php-symfony2-Translation-2.0.15-4.el6 has been pushed to the Fedora EPEL 6 stable repository.