[aur-general] Package works before the compression, not after
Hey guys, I've submitted this package: https://aur.archlinux.org/packages/gush/ to AUR, but I have a major problem with it - namely it doesn't work after it's installed. The package builds a PHAR (PHP archive, kinda like a binary) and installs it to /usr/share/webapps/bin/gush.phar which /usr/bin/gush is symlinked to. When I run gush.phar in the ${pkgdir}/usr/share/webapps/bin/gush.phar, it works fine, but if I run makepkg && pacman -U *.tar.xz && gush it throws this error: http://bpaste.net/show/184744/ - it seems the phar is corrupted after uncompressing the xz archive. I have no idea if it's because of my own incompetency, a bug in makepkg, a bug in bsdtar or a bug in pacman, but it seems that is should be one of the above. Could you help me narrow the issue down or fix it please? Regards, Attila Bukor
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(). -- Kind regards, Damian Nowak StratusHost www.AtlasHost.eu
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
On 3 March 2014 23:17, Attila Bukor <r1pp3rj4ck@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
On 03/03, WorMzy Tykashi wrote:
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).
And/or include a .install file that tells you what you need to do. -- Sincerely, Johannes Löthberg PGP Key ID: 3A9D0BB5
On 4 Mar 2014 07:19, "Johannes Löthberg" <johannes@kyriasis.com> wrote:
On 03/03, WorMzy Tykashi wrote:
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).
And/or include a .install file that tells you what you need to do.
-- Sincerely, Johannes Löthberg PGP Key ID: 3A9D0BB5
That is advisable for post-installation, but doesn't really help with the build problem. Cheers, WorMzy
On 03/04/2014 10:53 AM, WorMzy Tykashi wrote:
On 4 Mar 2014 07:19, "Johannes Löthberg" <johannes@kyriasis.com> wrote:
On 03/03, WorMzy Tykashi wrote:
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).
And/or include a .install file that tells you what you need to do.
-- Sincerely, Johannes Löthberg PGP Key ID: 3A9D0BB5
That is advisable for post-installation, but doesn't really help with the build problem.
Cheers,
WorMzy
Hey, I've changed the build as per your suggestions here: https://github.com/gushphp/gush-archlinux/commit/c41a9f9e10761d4fb9b2d061686... Also added the install warnings in the next commit: https://github.com/gushphp/gush-archlinux/commit/aa8acbcd4447a54f6fad81d3cab... Finally, sorry for the typo in your name :/ Thank you all very much! Cheers, Attila
On 5 March 2014 00:20, Attila Bukor <r1pp3rj4ck@w4it.eu> wrote:
On 03/04/2014 10:53 AM, WorMzy Tykashi wrote:
On 4 Mar 2014 07:19, "Johannes Löthberg" <johannes@kyriasis.com> wrote:
On 03/03, WorMzy Tykashi wrote:
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).
And/or include a .install file that tells you what you need to do.
-- Sincerely, Johannes Löthberg PGP Key ID: 3A9D0BB5
That is advisable for post-installation, but doesn't really help with the build problem.
Cheers,
WorMzy
Hey,
I've changed the build as per your suggestions here: https://github.com/gushphp/gush-archlinux/commit/c41a9f9e10761d4fb9b2d061686...
Also added the install warnings in the next commit: https://github.com/gushphp/gush-archlinux/commit/aa8acbcd4447a54f6fad81d3cab...
Finally, sorry for the typo in your name :/
Thank you all very much!
Cheers,
Attila
Hi, No worries, I've seen worse. :P I think you can afford to cut down that php.ini a lot more. I think that php will resort to the compiled-in defaults if it can't find a configuration value, so you should just need to include the phar module configuration. I'm not a php expert though, so maybe php complains if you remove anything else? Cheers, WorMzy
participants (4)
-
Attila Bukor
-
Johannes Löthberg
-
Nowaker
-
WorMzy Tykashi