Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 52320

Summary: dev-php/mod_php-4.3.6-r2 fails with hardenedphp USE flag due to missing distfile
Product: Gentoo Linux Reporter: Dan Sketcher <dan-gentoo>
Component: Current packagesAssignee: Stuart Herbert (RETIRED) <stuart>
Status: VERIFIED TEST-REQUEST    
Severity: normal CC: php-bugs, sandino
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dan Sketcher 2004-05-29 00:14:29 UTC
dev-php/mod_php-4.3.6-r2 fails to build with hardenedphp set. Output:

flexo distfiles # emerge mod_php php    
Calculating dependencies ...done!
>>> emerge (1 of 2) dev-php/mod_php-4.3.6-r2 to /
>>> md5 src_uri ;-) php-4.3.6.tar.bz2
>>> md5 src_uri ;-) php-4.3.2-fopen-url-secure.patch
>>> md5 src_uri ;-) php-4.3.6-includepath.diff
>>> md5 src_uri ;-) php-4.3.6-pcrealloc.patch
>>> Unpacking source...
 * Due to some previous bloopers with PHP and slotting, you may have
 * multiple instances of mod_php installed. Please look at the autoclean
 * output at the end of the emerge and unmerge all but relevant
 * instances.
 * Apache2 only detected
>>> Unpacking php-4.3.6.tar.bz2 to /var/tmp/portage/mod_php-4.3.6-r2/work
 * Applying php-4.3.6-pcrealloc.patch...                                                                                      [ ok ]

 * Cannot find $EPATCH_SOURCE!  Value for $EPATCH_SOURCE is:
 * 
 *   /usr/portage/distfiles/hardened-php-4.3.6-0.1.1.patch.gz


!!! ERROR: dev-php/mod_php-4.3.6-r2 failed.
!!! Function epatch, Line 182, Exitcode 0
!!! Cannot find $EPATCH_SOURCE!

-------------
I tried doing "emerge --fetchonly mod_php" but that did not download the file, so I looked on the mirror.aarnet.edu.au and ftp.planetmirror.com mirrors and the file was not there.

-------------
flexo distfiles # emerge info
Portage 2.0.50-r7 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.4.25-gentoo-r2)
=================================================================
System uname: 2.4.25-gentoo-r2 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.10
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /opt/resin/conf /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://mirror.aarnet.edu.au/pub/gentoo ftp://ftp.planetmirror.com/pub/gentoo http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/bmg-main"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="apache2 apm arts avi berkdb crypt cups encode foomatic foomaticdb gdbm gif gpm gtk2 hardenedphp imlib innodb ipv6 java jpeg kde libg++ libwww mad mikmod mod_php motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl php png python quicktime readline samba sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib"

----------
without the "hardenedphp" USE flag it seems fine.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Vijay Avarachen 2004-06-03 23:15:53 UTC
I just noticed that for 4.3.6-r2 even though hardened-php USE flag is enabled, the digest file does not mention the md5sum for the patch.  However 4.3.6-r1 includes the md5sum in the digest file.  I am not sure if this little detail helps but just thought I'd share it.
Comment 2 Stuart Herbert (RETIRED) gentoo-dev 2004-06-06 11:15:02 UTC
This one has me a bit stumped to be honest, because I don't get the same problem on my machine.

I've just rebuilt all the digests in CVS, and version bumped the hardened-php patch.  It should appear on your local rsync mirror in about an hour.  Please give it another go, and see if you get the same error or not.

Many thanks,
Stu
Comment 3 Dan Sketcher 2004-06-06 16:46:42 UTC
Ok, so I left it a few hours and resynced..

-----
flexo files # pwd 
/usr/portage/dev-php/mod_php/files

flexo files # cat digest-mod_php-4.3.6-r2
MD5 79cde484e31871176137eb78014657fa php-4.3.6.tar.bz2 3957796
MD5 912ff94309b762563d0542db5187315f php-4.3.2-fopen-url-secure.patch 416
MD5 fbb6b365f4c0263b1dfd498aef092a77 php-4.3.6-includepath.diff 285
MD5 0ed6c4e7dbba264521ab54d49f02912d php-4.3.6-pcrealloc.patch 1004
MD5 3075036987c0582ec3b2ab81db727643 hardened-php-4.3.6-0.1.2.patch.gz 10446

flexo files # emerge --fetchonly mod_php
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-php/mod_php-4.3.6-r2 to /
>>> Previously fetched file: php-4.3.6.tar.bz2 MD5 ;-)
>>> Previously fetched file: php-4.3.6-pcrealloc.patch MD5 ;-)
>>> Previously fetched file: php-4.3.6-includepath.diff MD5 ;-)
>>> Previously fetched file: php-4.3.2-fopen-url-secure.patch MD5 ;-)
>>> md5 src_uri ;-) php-4.3.6.tar.bz2
>>> md5 src_uri ;-) php-4.3.2-fopen-url-secure.patch
>>> md5 src_uri ;-) php-4.3.6-includepath.diff
>>> md5 src_uri ;-) php-4.3.6-pcrealloc.patch

-----
Still got the same error. In the above, portage still didn't download the hardened-php-4.3.6-0.1.2.patch.gz file. Am I missing something? Should i be downloading this patch manually? I looked on my local mirrors and the http://distro.ibiblio.org/pub/Linux/distributions/gentoo mirror and it's not there either.
Comment 4 Dan Sketcher 2004-06-06 16:51:57 UTC
And thanks for looking into this :)
Comment 5 Stuart Herbert (RETIRED) gentoo-dev 2004-06-07 01:16:23 UTC
Hi Dan,

Portage should try and fetch it from the hardened-php web site - which is exactly what it does locally :(  My guess is that it isn't even trying to download the patch.

I've added the patch onto our mirrors, although I doubt that'll make a difference.

Can you take 'autoaddcvs' out of your FEATURES in /etc/make.conf?  Probably won't make a difference, but you never know.

I'll see if I can figure out how to reproduce this bug locally.

Best regards,
Stu
Comment 6 Dan Sketcher 2004-06-07 02:42:44 UTC
FEATURES="ccache sandbox" made no difference.

yeah, and --fetchonly doesn't download the patch, so i agree imho it isn't even trying. I'm resisting the urge to download it myself until there is no other option ;) 

What can I do to help? Its not a production system but i'm still hesitant to give you root (no offence, but i don't know you :) but is there some instructions you can give me or something i can do to help resolve this bug? UML (i've never done it before though, and would i need to image the system in question to do it?) ?
Comment 7 Stuart Herbert (RETIRED) gentoo-dev 2004-06-07 08:39:55 UTC
Hi Dan,

That's okay - I'd rather not log into other people's boxes anyhow.

Still not having any luck reproducing this bug locally.  Do you have anything php-related in your PORTDIR_OVERLAY?

Best regards,
Stu
Comment 8 Dan Sketcher 2004-06-07 14:07:46 UTC
My PORTACE_OVERLAY is the breakmygentoo.net 'bmg-main' overlay. No, I haven't installed anything from it :) Its contents are:

-----
app-admin:
ghomemover-console

app-editors:
ghex  peacock

app-office:
abiword

dev-cpp:
bakery-cvs          gconfmm  gnome-vfsmm  libglademm        libgnomemm    libxml++
bakery_gnomeui-cvs  glibmm   gtkmm        libgnomecanvasmm  libgnomeuimm  openthreads

dev-dotnet:
evolution-sharp

dev-perl:
Geography-Countries  IP-Country

dev-python:
gst-python

games-arcade:
stepmania-cvs

gnome-base:
gdm

gnome-extra:
gal         gnome-commander       gnome-pkgview       gnome-volume-manager      greenwich   rubrica
ghomemover  gnome-cpufreq-applet  gnome-system-tools  gnome-volume-manager-cvs  libgtkhtml

mail-client:
evolution

media-gfx:
gthumb

media-libs:
glitz  libj2k  libpixman  musikCore-cvs

media-plugins:
gst-plugins-cdparanoia  gst-plugins-lame

media-sound:
jamboree  muine  musikBox-cvs  rhythmbox  wxMusik

media-video:
totem

net-im:
gaim-vv

net-libs:
libsoup

net-mail:
evolution-data-server

net-p2p:
giftoxic-cvs  gnome-btdownload

net-www:
epiphany-extensions

sys-apps:
dbus-cvs  hal-cvs  portage

x11-libs:
cairo  gtk-sharp

x11-misc:
wampager

x11-wm:
kahakai-cvs  waimea
-----

Could the overlay existing cause problems? I know that I have to call the ebuild directly to use the 'bmg-main' ebuilds... should I blow it away?

And if not, is it time to drop the patch into distfiles? 

Thanks very much for your help,
Dan
Comment 9 Stuart Herbert (RETIRED) gentoo-dev 2004-06-08 13:23:22 UTC
Hi Dan,

The good news is that I've found a machine that has the same problem that you do.  As soon as I've made some progress, I'll update this bug for you.

Best regards,
Stu
Comment 10 Dan Sketcher 2004-06-08 14:40:09 UTC
That's good news - well, for this bug anyway :)

Thanks Stu, I look forward to hearing what you come back with.

Cheers,
Dan
Comment 11 Stuart Herbert (RETIRED) gentoo-dev 2004-06-11 16:05:05 UTC
I've committed what should (fingers crossed) fix this once and for all.  It should appear on your local rsync mirror in about an hour.  Please sync your portage tree, and give it a go.

Best regards,
Stu
Comment 12 Dan Sketcher 2004-06-11 17:54:49 UTC
>>> emerge (1 of 1) dev-php/mod_php-4.3.6-r2 to /
>>> Downloading ftp://mirror.aarnet.edu.au/pub/gentoo/distfiles/hardened-php-4.3.6-0.1.2.patch.gz
--10:50:50--  ftp://mirror.aarnet.edu.au/pub/gentoo/distfiles/hardened-php-4.3.6-0.1.2.patch.gz
           => `/usr/portage/distfiles/hardened-php-4.3.6-0.1.2.patch.gz'
Resolving mirror.aarnet.edu.au... 192.42.62.2
Connecting to mirror.aarnet.edu.au[192.42.62.2]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /pub/gentoo/distfiles ... done.
==> PASV ... done.    ==> RETR hardened-php-4.3.6-0.1.2.patch.gz ... done.
Length: 10,446 (unauthoritative)

100%[========================================================================================>] 10,446        --.--K/s             

10:50:52 (72.85 KB/s) - `/usr/portage/distfiles/hardened-php-4.3.6-0.1.2.patch.gz' saved [10446]

>>> md5 src_uri ;-) php-4.3.6.tar.bz2
>>> md5 src_uri ;-) php-4.3.2-fopen-url-secure.patch
>>> md5 src_uri ;-) php-4.3.6-includepath.diff
>>> md5 src_uri ;-) php-4.3.6-pcrealloc.patch
>>> md5 src_uri ;-) hardened-php-4.3.6-0.1.2.patch.gz
>>> Unpacking source...

---

Yes! Works!

Just out of curiosity, what was the problem?

Thanks for all your help and patience,
Dan
Comment 13 Stuart Herbert (RETIRED) gentoo-dev 2004-06-12 01:47:33 UTC
Portage does a lot of caching.  SRC_URI has to resolve to a constant value, otherwise Portage gets the cache wrong.  So the change I had to make was to turn this:

[ `use hardened` ] && SRC_URI="$SRC_URI $HARDENEDPHP-PATCH"

into this

SRC_URI="hardenedphp? ( $HARDENEDPHP-PATCH )"

Sorry it took so long to resolve.

Best regards,
Stu
Comment 14 Dan Sketcher 2004-06-12 15:58:59 UTC
Not at all, thanks for fixing it :)

Dan