[atomic] PHP 5.2.13

Atomic repository announcements, new release notifications and other news regarding the atomic yum repository.
dayo
Forum Regular
Forum Regular
Posts: 158
Joined: Sun Jul 12, 2009 1:33 pm

Re: [atomic] PHP 5.2.13

Unread post by dayo »

To my highly untrained eye, a requirement for libevent, allowing the conf file to be added and the following flags:

Code: Select all

--with-libevent[=PATH]       Path to the libevent, for fpm SAPI [/usr/local]
--with-fpm-bin[=PATH]        Set the path for the php-fpm binary [/usr/local/bin/php-fpm]
--with-fpm-port[=PORT]       Set the tcp port number to listen for cgi requests [9000]
--with[out]-fpm-conf[=PATH]  Set the path for the php-fpm configuration file [/etc/php-fpm.conf]
--with[out]-fpm-init[=PATH]  Set the path for the php-fpm init file [/etc/init.d/php-fpm]
--with-fpm-log[=PATH]        Set the path for the php-fpm log file [/var/log/php-fpm.log]
--with-fpm-pid[=PATH]        Set the path for the php-fpm pid file [/var/run/php-fpm.pid]
--with-fpm-user[=USER]       Set the user for the php-fpm to run as [nobody]
--with-fpm-group[=GRP]       Set the group for php-fpm to run as. For a system user,
I suppose there must be good reason why you didn't add these. Perhaps if you could point me to where I could get my hands on copies of the following patches listed in the spec file, I could try to build it myself and see what gives (I have the fpm diff file already):

Code: Select all

# Build fixes
Patch1: php-5.2.9-gnusrc.patch
Patch2: php-5.2.8-install.patch
Patch3: php-5.2.4-norpath.patch
Patch4: php-5.2.8-phpize64.patch
Patch5: php-5.2.0-includedir.patch
Patch6: php-5.2.4-embed.patch
Patch7: php-5.2.8-recode.patch


# Fixes for extension modules
Patch20: php-4.3.11-shutdown.patch
Patch21: php-5.2.3-macropen.patch

# Functional changes
Patch40: php-5.0.4-dlopen.patch
Patch41: php-5.2.4-easter.patch
Patch42: php-5.2.5-systzdata.patch

# Fixes for tests
Patch60: php-5.2.7-tests-dashn.patch
Patch61: php-5.0.4-tests-wddx.patch


# ART
Patch1000: php-5.2.9-bug46889.patch
#Patch1001: php-5.2.8-mail-header.patch
#Patch1001: php-mail-logging.patch
Patch1001: php-5.3.1-mail-logging2.patch
Patch1002: php-5.2.9-bug48027.patch
Patch1003: php-fpm-0.6~5.2.patch
Being on a roll, this set would be nice too to try to do Nginx 0.7.65:

Code: Select all

# removes -Werror in upstream build scripts.  -Werror conflicts with
# -D_FORTIFY_SOURCE=2 causing warnings to turn into errors.
Patch0:     nginx-auto-cc-gcc.patch

# configuration patch to match all the Fedora paths for logs, pid files
# etc.
Patch1:     nginx-conf.patch
It will be going into uncharted territory for me but what the heck. I can always recover from backup.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: [atomic] PHP 5.2.13

Unread post by scott »

libevent is enabled right here:
--enable-libevent \
dayo
Forum Regular
Forum Regular
Posts: 158
Joined: Sun Jul 12, 2009 1:33 pm

Re: [atomic] PHP 5.2.13

Unread post by dayo »

Yeah, I saw that. In an earlier post, I wrote that I could see the '--with libevent' flag but couldn't see it in any of the 'Build Requires' … Obviously doesn't need any special action to make sure a certain version of libevent is installed from what you wrote. Thanks.

Anyway, what do you say about the patches? Possible?

Thanks again.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: [atomic] PHP 5.2.13

Unread post by scott »

Yeah so the the buildrequires tag is something that is invoked by the build system to say "this is a required to compile this package". Its normally only required if the component isnt installed by default (libevent is). Think of a .spec file like a big shell script. The configure section also has a check for the component, but since configure (we just call this autoconf btw) is abstracted away from build automation it wouldnt be able to install a component, and just exit 1 when it couldnt detect it.

The spec file will generate both the binary rpms, and the src.rpms which will contain all the source code including the patches and .spec file itself. You'll see that in the same directory. The other thing to track is %patchX section, which indicates how and if a patch is applied to the package. Its not uncommon to see them commented out due to a conflict for things that are frequently updated.
dayo
Forum Regular
Forum Regular
Posts: 158
Joined: Sun Jul 12, 2009 1:33 pm

Re: [atomic] PHP 5.2.13

Unread post by dayo »

Hi Scott

Thanks for the tips. I think I am now on the right track. Just got one issue. How do I overcome this: "configure: error: recode extension can not be configured together with: imap mysql"?

I can see it is being generated the function in php-5.2.8-recode.patch. I have googled this and found that the conflict is a well known issue (http://theserverpages.com/php/manual/en/ref.recode.php) which is presumably why that patch is there. Is disabling one or the other of the two an option and if so, how?

Alternatively and better, is there a way to bypass this? There is something on that page about using mbstring as an alternative. If so, how can I get rid of the recode stuff and put this instead. I tried commenting out every reference to recode in the spec file but this got me nowhere thanks to a different stopper.

I also noticed that the php-5.2.8-recode.patch file from here: http://osdir.com/ml/fedora-extras-commi ... 01651.html by Joe Orton who seemed to have been the maintainer of earlier versions has a few additional things beyond what we have. I guess these are not important although I wouldn't know.

I know once I get past this, I'll have it up and running.

Thanks again.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: [atomic] PHP 5.2.13

Unread post by scott »

A ha, good detective work there. Disabling and updating (when you find the update like this) are the same level of effort. The way it works is:

Patch0: php-5.2.8-recode.patch

this refers to the actual file stored in the src.rpm (cpio archive)

and this would activate it:

%patch1 -p1

Its the same as running "patch -p1 < php-5.2.8-recode.patch"

So to update it, you just grab the new php-5.2.8-recode.patch, throw it in the src.rpm and rebuild. Or to disable it:

#%patch1 -p1

So what would you rather try first, disabling the patch outright, or update it with the newer version?
dayo
Forum Regular
Forum Regular
Posts: 158
Joined: Sun Jul 12, 2009 1:33 pm

Re: [atomic] PHP 5.2.13

Unread post by dayo »

Actually Scott, on looking at the files further, the actual recode patch is the same. The other bits are for the php.conf and spec files.

I ran at first with the files as bundled in the srpm and while it happily ran through to the end, there was no fpm conf or bin file (just as with using Release 2 from the atomic-testing repo).

So I took a look at the fpm patch file (php-fpm-0.6~5.2.patch) and noticed that it was totally different from the diff file for php 5.2.13 posted on the fpm website (http://php-fpm.org/downloads/php-5.2.13 ... 13.diff.gz).
Trying to get that to run through without the recode conflict error message even after commenting out the patch in the spec file is where I have stalled.

I managed to get it through once but the bin and conf files had the wrong paths so I decided to go again but after numerous attempts, I have to admit I have failed.

Busy licking my wounds and trying to figure out whether it is worth the hassle given my limited knowledge and how the recode issue has totally stumped me.
dayo
Forum Regular
Forum Regular
Posts: 158
Joined: Sun Jul 12, 2009 1:33 pm

Re: [atomic] PHP 5.2.13

Unread post by dayo »

I DID IT!!! :D :D :D

Now I just need to wipe it all off and restart from scratch as it appears I committed a cardinal sin by building as root as several online sources including the centos wiki says one should not do this.

Now need to figure out how I should be going about building as an ordinary user.

Or more reassuringly, perhaps Scott would be interested in a Release 3 so I can just use yum upgrade?

**********************
Decided not to wipe it off given the grief I faced trying to install it and the fact that everything else in my bin folder seems to be owned by root anyway.

Will try to get my srpm to Scott for review.
dayo
Forum Regular
Forum Regular
Posts: 158
Joined: Sun Jul 12, 2009 1:33 pm

Re: [atomic] PHP 5.2.13

Unread post by dayo »

scott wrote:So what needs to be changed?
The FPM Patch as set out HERE
dayo
Forum Regular
Forum Regular
Posts: 158
Joined: Sun Jul 12, 2009 1:33 pm

Re: [atomic] PHP 5.2.13

Unread post by dayo »

^^ Cough ^^
Post Reply