Results 1 to 2 of 2

Thread: Bug: Updated external PHP package

  1. #1
    Join Date
    Apr 2009
    Location
    Augsburg, Germany
    Posts
    19

    Post Bug: Updated external PHP package

    Distribution: Fedora 10
    PTS-Version 1.8.0 from Fedora updates repo

    Hi,

    still playing around with PTS 1.8 and encountering the next problem:

    phoronox-test-suite install-all always fails to download php-5.2.5.tar.bz2

    The reason is simple if you look at the code in pts/test-resources/build-php:

    All the mirrors specified in download.xml now have tar.bz2 files for the following PHP Versions:

    5.2.8
    5.2.9 (which is the actual one)

    This brings up the question on how such "remote updates" are handled inside PTS. Of course its actually not that big deal to change the few lines in the xml file and to see how it goes with PHP 5.2.9, but the still remaining risk is that remote updates will always lead to such situations.

    Any ideas how to get out of this trap?

    Patch is attached below

    Regards
    Rainer

    Code:
    diff -ur phoronix-test-suite/pts/test-resources/build-php/downloads.xml rainer-pts-patch/pts/test-resources/build-php/downloads.xml
    --- phoronix-test-suite/pts/test-resources/build-php/downloads.xml	2009-04-10 01:17:11.000000000 +0200
    +++ rainer-pts-patch/pts/test-resources/build-php/downloads.xml	2009-04-22 09:04:52.000000000 +0200
    @@ -6,10 +6,10 @@
     			<FileSize>4734599</FileSize>
     		</Package>
     		<Package>
    -			<URL>http://it.php.net/distributions/php-5.2.5.tar.bz2, http://no2.php.net/distributions/php-5.2.5.tar.bz2, http://us.php.net/distributions/php-5.2.5.tar.bz2, http://us2.php.net/distributions/php-5.2.5.tar.bz2, http://au.php.net/distributions/php-5.2.5.tar.bz2</URL>
    -			<MD5>1fe14ca892460b09f06729941a1bb605</MD5>
    -			<FileName>php-5.2.5.tar.bz2</FileName>
    -			<FileSize>7773024</FileSize>
    +			<URL>http://it.php.net/distributions/php-5.2.9.tar.bz2, http://no2.php.net/distributions/php-5.2.9.tar.bz2, http://us.php.net/distributions/php-5.2.9.tar.bz2, http://us2.php.net/distributions/php-5.2.9.tar.bz2, http://au.php.net/distributions/php-5.2.9.tar.bz2</URL>
    +			<MD5>280d6cda7f72a4fc6de42fda21ac2db7</MD5>
    +			<FileName>php-5.2.9.tar.bz2</FileName>
    +			<FileSize>10203122</FileSize>
     		</Package>
     	</Downloads>
     </PhoronixTestSuite>
    diff -ur phoronix-test-suite/pts/test-resources/build-php/install.sh rainer-pts-patch/pts/test-resources/build-php/install.sh
    --- phoronix-test-suite/pts/test-resources/build-php/install.sh	2009-04-10 01:17:11.000000000 +0200
    +++ rainer-pts-patch/pts/test-resources/build-php/install.sh	2009-04-22 09:00:48.000000000 +0200
    @@ -14,15 +14,15 @@
     
     echo "#!/bin/sh
     
    -if [ ! -f php-5.2.5.tar.bz2 ]
    +if [ ! -f php-5.2.9.tar.bz2 ]
       then
     	echo \"PHP5 Not Downloaded... Build Fails.\"
     	exit
     fi
     
    -rm -rf php-5.2.5/
    -tar -xjf php-5.2.5.tar.bz2
    -cd php-5.2.5/
    +rm -rf php-5.2.9/
    +tar -xjf php-5.2.9.tar.bz2
    +cd php-5.2.9/
     ./configure --with-libxml-dir=$THIS_DIR/libxml2 > /dev/null
     sleep 3
     \$TIMER_START
    diff -ur phoronix-test-suite/pts/test-resources/build-php/post.sh rainer-pts-patch/pts/test-resources/build-php/post.sh
    --- phoronix-test-suite/pts/test-resources/build-php/post.sh	2009-04-10 01:17:11.000000000 +0200
    +++ rainer-pts-patch/pts/test-resources/build-php/post.sh	2009-04-22 08:59:59.000000000 +0200
    @@ -1,4 +1,4 @@
     #!/bin/sh
     
     cd $1
    -rm -rf php-5.2.5/
    +rm -rf php-5.2.9/
    Last edited by Rainer König; 04-22-2009 at 03:19 AM. Reason: Attaching the patch

  2. #2

    Default

    Thanks for the patch. It will be pushed up soon as I get back to the office.

    Though also when doing such patches in the future, the major version number within build-php.xml is bumped whenever the test version is changed, since PHP 5.2.8 may build slightly faster or slower than 5.2.9. When doing a major bump (such as the test profile from 1.2.0 to 1.3.0), PTS realizes the change and will not make the results comparable (but only if the test profile went from say 1.2.0 to 1.2.1).

    Thanks again,

    Michael

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •