On 3 March 2014 23:17, Attila Bukor <r1pp3rj...@w4it.eu> wrote: > On 03/03/2014 10:35 PM, Nowaker wrote: >>> >>> I've submitted this package: https://aur.archlinux.org/packages/gush/ >> >> >> I'd love to test it out and diff the two files, but I am not able to >> build this package with yaourt. You are probably missing some >> makedepends that prevent me from building. >> >> ==> Starting build()... >> PHP Fatal error: Class 'Phar' not found in >> /usr/share/webapps/bin/composer.phar on line 13 >> ==> ERROR: A failure occurred in build(). >> > Hey, > > Thanks for trying to help. You need to include phar.so in your php.ini for > this. I don't think it's possible to mark this as a dependency - at least I > have no idea how. > > Now that you mentioned diffing, I realized that I forgot to write that I > tried it and diff said binary files /path1/gush.phar and /path/gush.phar > differ. As I wanted to include this in my reply, I double checked it and > to my surprise now it indicated they don't! > > So I started to investigate... Tried running both. The installed version > didn't run, the non-installed one did. Tried diffing again, they differed. I > figured the first run must alter it some way - no idea why - so I run chmod > 777 on it - and it worked! > > Well, as I couldn't just leave it that way, I decided to try something > else and run ./gush.phar --version at the end of build(). It worked, so now > it's finally fixed. That shouldn't be too annoying, fixes the issue and is > only a minor black magic. I think I'll blog about this weird issue and > fix... > > Now it's online and it works! In case you wonder what's happening, just > remove lines 28 and 29 and the issue will come back. > > Thanks for your help again! > > Cheers, > Attila >
Hi, Don't use "patch -p0 ../../blah.patch", use 'patch -p0 "$srcdir/blah.patch", or "patch -p0 ../blah.patch". The point I'm trying to make, is that you should never try to break out of "$srcdir". If this package relies on a non-standard php.ini, bundle in a basic php.ini with the changes necessary, and use php's -c flag to use it instead of the system php.ini (dunno if this is possible with composer or php-box -- never used them). You should also enclose all instances of $srcdir and $pkgdir in double-quotes, in case they have a space in their path. Cheers, WorMzy