|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-06-13 02:11 UTC] jmcastagnetto@php.net
Description: ------------ As a test, I tried to generat a spec file for building an rpm. I used one of my released packages (Math_TrigOp) for this test. When I tried using 'pear makerpm', I got an error: $ pear makerpm ../SOURCES/Math_TrigOp-1.0.tgz no package.xml found in ../SOURCES/Math_TrigOp-1.0.tgz To confirm the existence of a package.xml in the tarball: $ tar ztvf ../SOURCES/Math_TrigOp-1.0.tgz -rw-r--r-- 500/100 1489 2003-06-12 23:35:37 package.xml -rw-r--r-- 500/100 5555 2003-01-04 03:55:40 Math_TrigOp-1.0/TrigOp.php Problem might be in Archive_Tar, as PEAR_Command_Package seems OK on a cursory look of the code. For reference: $ pear list-all | grep Archive Archive_Tar 1.1 1.1 $ pear list-all | grep PEAR | grep -v Info PEAR 1.1 1.1 PEAR_Frontend_Gtk 0.3 0.3 PEAR_Frontend_Web 0.3 0.3 Which are the latest releases of the packages used by the pear package manager for this command. Reproduce code: --------------- If you do not have a checkout of pear locally, then do first: $ cvs co pear/Math_TrigOp Then: $ cd pear/Math_TrigOp $ mkdir SPECS SOURCES $ pear package $ mv Math_TrigOp-1.0.tgz SOURCES $ cd SPECS $ pear makerpm ../SOURCES/Math_TrigOp-1.0.tgz Expected result: ---------------- Obtain a valid spec file, of course ;-) Actual result: -------------- An error message an no spec file. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 08:00:01 2025 UTC |
The patch did not work. The one below does: --- Package.php-orig 2003-06-14 18:27:24.000000000 -0700 +++ Package.php 2003-06-14 18:26:37.000000000 -0700 @@ -585,7 +585,7 @@ $pkgdir = "$info[package]-$info[version]"; $info['rpm_xml_dir'] = '/var/lib/pear'; $this->config->set('verbose', $tmp); - if (!$tar->extractList("$pkgdir/package.xml", $instroot, $pkgdir)) { + if (!$tar->extractList("package.xml", $instroot)) { return $this->raiseError("failed to extract $params[0]"); } if (!file_exists("$instroot/package.xml")) { Also, the spec file might need some more work. The files end up being installed on a place highly dependent on the config of the person generating the RPM, For example. I have PHP installed in '/home/server/php', but most people have it in '/usr/local'. The postinstall part does not seem to be working. No matter what the local config is (tried on a machine where PHP is installed in /usr/local), and the RPM still tried to install it in '/home/server/php'. That is not the correct behaviour. Re-openning as this command still generates something the is (albeit indirectly) broken. I think that the '@doc_dir@' and '@files@' vars in the 'template.spec' might need to be reworked to generate a good non-pacakager-system dependent RPM.AFAIS it uses: /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin, but it's supposed that you installed the pear cmd from a RPM too, so the pear cmd will get installed under %{_bindir}. For the registry problem you mention, see the %post macro: pear install --nodeps -r /var/lib/pear/Math_TrigOp.xml This macro it's executed after rpm -i, and does register the package in the pear registry (-r means register only). Let me know further issues with the command, for the moment I'll close this bug.