Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54712 - mod_php-4.3.7 fails to compile with USE="hardenedphp"
Summary: mod_php-4.3.7 fails to compile with USE="hardenedphp"
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-21 23:03 UTC by Dennis Freise
Modified: 2004-06-26 14:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Freise 2004-06-21 23:03:14 UTC
See summary, it fails because the hardened-php-4.3.6-0.1.2.patch get's applied, but there's a version of that patch especially for 4.3.7.

* Applying hardened-php-4.3.6-0.1.2.patch.gz...

* Failed Patch: hardened-php-4.3.6-0.1.2.patch.gz!
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/mod_php-4.3.7/temp/hardened-php-4.3.6-0.1.2.patch.gz-10125.out


!!! ERROR: dev-php/mod_php-4.3.7 failed.
!!! Function epatch, Line 322, Exitcode 0
!!! Failed Patch: hardened-php-4.3.6-0.1.2.patch.gz!


Didn't include that error-report-file, because the error seems pretty obvious to me ;-)

I suggest changing the following in php-sapi.eclass :

change:
HARDENEDPHP_PATCH="hardened-php-4.3.6-0.1.2.patch.gz"                                               
to:
HARDENEDPHP_PATCH="hardened-php-${PV}-0.1.2.patch.gz"

I tried this on mod_php-4.3.7 and it works for me.
Comment 1 Chris White (RETIRED) gentoo-dev 2004-06-21 23:07:23 UTC
Re-Assigned to hardened team as this is a hardened patch.
Comment 2 Chris White (RETIRED) gentoo-dev 2004-06-21 23:13:49 UTC
Sorry for the confusion on that one.  Looks like even though this is a hardened patch, it's not a hardened issue.  I'm re-assigning it to the mod_php mantainer.
Comment 3 Stuart Herbert (RETIRED) gentoo-dev 2004-06-22 16:01:55 UTC
I've got a fix available, but 'repoman full' on dev-php/php is insisting that there's no unmasked ebuilds in there.  I'll have to pick this up again tomorrow night.

Best regards,
Stu
Comment 4 Stuart Herbert (RETIRED) gentoo-dev 2004-06-22 22:36:02 UTC
Hiya,

I've committed a fix for this to Portage.  As php-4.3.7 is currently masked, I haven't revision-bumped the ebuilds at all.

Please re-emerge php/php-cgi/mod_php 4.3.7 as appropriate, and let me know how you get on.

Best regards,
Stu
Comment 5 Dennis Freise 2004-06-23 00:48:30 UTC
Hmmm, with your patches portage downloads the hardened-php-patch 4.3.6-0.1.2, but applies 4.3.7-0.1.2, resulting in a failure to find the patch if it isn't already there.
If it is there (downloaded manually) mod_php and php compile fine, except that both ebuilds need an 'ebuild ... digest' before compiling, because no MD5 for the patch 4.3.6-0.1.2 is present.
Comment 6 Stuart Herbert (RETIRED) gentoo-dev 2004-06-23 14:32:22 UTC
/me looks very confused.

On my box, mod_php-4.3.6 downloads and applies the hardenedphp patch for PHP 4.36; and mod_php-4.3.7 downloads and applies the hardenedphp patch for PHP 4.3.7.

I've inspected the digest files by hand, and the right files have the right entries for the right patch.  You shouldn't need to use ebuild digest at all.

I can't explain the problem you've had.  Hrm.

Best regards,
Stu
Comment 7 Dennis Freise 2004-06-24 04:49:33 UTC
Okay, just to show you what I mean :-)

After sync:

earthdawn portage # emerge --oneshot mod_php
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-php/mod_php-4.3.7 to /
>>> md5 src_uri ;-) php-4.3.7.tar.bz2
>>> md5 src_uri ;-) php-4.3.2-fopen-url-secure.patch
>>> md5 src_uri ;-) php-4.3.6-includepath.diff

!!! No message digest entry found for file "hardened-php-4.3.6-0.1.2.patch.gz."
!!! Most likely a temporary problem. Try 'emerge sync' again later.
!!! If you are certain of the authenticity of the file then you may type
!!! the following to generate a new digest:
!!!   ebuild /usr/portage/category/package/package-version.ebuild digest

-----------------

after ebuild ... digest:

earthdawn portage # emerge --oneshot mod_php
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-php/mod_php-4.3.7 to /
>>> md5 src_uri ;-) php-4.3.7.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 ;-) hardened-php-4.3.6-0.1.2.patch.gz
>>> 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.7.tar.bz2 to /var/tmp/portage/mod_php-4.3.7/work
hardenedphp
 * Applying hardened-php-4.3.7-0.1.2.patch.gz...                                               [ ok ]
 * Applying mod_php-4.3.5-apache1security.diff...                                              [ ok ]
>>> Source unpacked.

And, if it helps, my emerge info:

Portage 2.0.50-r8 (hardened-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.5-gentoo-r1)
=================================================================
System uname: 2.6.5-gentoo-r1 i686 AMD Duron(tm) 
Gentoo Base System version 1.4.16
distcc 2.14 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon -mcpu=athlon -mmmx -m3dnow -O2 -pipe -fomit-frame-pointer -ffast-math -fforce-addr -falign-functions=4"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon -mcpu=athlon -mmmx -m3dnow -O2 -pipe -fomit-frame-pointer -ffast-math -fforce-addr -falign-functions=4"
DISTDIR="/storage/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ ftp://gentoo.inode.at/source/ http://gentoo.inode.at"
MAKEOPTS="-j2"
PKGDIR="/storage/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://localhost/gentoo-portage"
USE="3dnow acl acpi activefilter apache2 apm atm berkdb cdr chroot crypt curl doc erandom evms2 exiscan-acl freetds gd gdbm gif gmp gpm hardened hardenedphp imagemagick imap innodb ipv6 java jpeg ldap libwww lmtp maildir mcal mmx mysql nagios-dns nagios-ntp nagios-ping nagios-ssh ncurses nls nptl odbc pam parse-clocks pcre pdflib perl pic pie png python readline samba sasl slang snmp socks5 sse ssl tcpd tetex threads tiff truetype usb vhosts wildlsearch x86 xml xml2 yaz zlib"

Please let me know if you need any more informations.
Comment 8 Stuart Herbert (RETIRED) gentoo-dev 2004-06-24 17:02:29 UTC
Okay, I've managed to find a machine that also has this bug.

It looks like the pre-generated Portage cache is wrong for some reason.  By rebuilding the digest, you're correcting the Portage cache.

Question is ... why does the pre-generated cache have the wrong value in it?  I'll see if I can get to the bottom of that.

Best regards,
Stu
Comment 9 Stuart Herbert (RETIRED) gentoo-dev 2004-06-25 15:55:54 UTC
Well, the correct metadata is now showing up on rsync mirrors.  Please resync, and see if you are still getting this problem.

Best regards,
Stu
Comment 10 Dennis Freise 2004-06-26 02:52:50 UTC
earthdawn squid # emerge --oneshot mod_php
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-php/mod_php-4.3.7 to /
>>> md5 src_uri ;-) php-4.3.7.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 ;-) hardened-php-4.3.7-0.1.2.patch.gz
>>> 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.7.tar.bz2 to /var/tmp/portage/mod_php-4.3.7/work
hardenedphp
 * Applying hardened-php-4.3.7-0.1.2.patch.gz...                                               [ ok ]
 * Applying mod_php-4.3.5-apache1security.diff...                                              [ ok ]
>>> Source unpacked.

Works like a charm now, thanks! :-)
Comment 11 Stuart Herbert (RETIRED) gentoo-dev 2004-06-26 14:31:03 UTC
Closing bug