Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83614 - dev-db/phpmyadmin-2.6.1_p2 update errors
Summary: dev-db/phpmyadmin-2.6.1_p2 update errors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
: 84082 88443 90371 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-28 15:55 UTC by Carsten Lohrke (RETIRED)
Modified: 2005-07-06 11:38 UTC (History)
2 users (show)

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


Attachments
output of patch (2.6.1_p2-no-wildcard-privs-for-you.patch-29195.out,3.67 KB, text/plain)
2005-03-02 07:57 UTC, Toralf Förster
Details
patched ebuild (phpmyadmin-2.6.2_rc1.ebuild.patch,556 bytes, patch)
2005-04-08 18:25 UTC, Jakub Moc (RETIRED)
Details | Diff
patched postinstall-en.txt (postinstall-en.txt.patch,448 bytes, patch)
2005-04-08 18:26 UTC, Jakub Moc (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Lohrke (RETIRED) gentoo-dev 2005-02-28 15:55:58 UTC
>>> /usr/share/webapps/phpmyadmin/2.6.1_p2/hostroot/
>>> /usr/share/webapps/phpmyadmin/2.6.1_p2/hostroot/error/
>>> /usr/share/webapps/phpmyadmin/2.6.1_p2/hostroot/icons/
>>> /usr/share/webapps/phpmyadmin/2.6.1_p2/hostroot/cgi-bin/
>>> /usr/share/webapps/phpmyadmin/2.6.1_p2/run-by-cgi-bin
>>> /usr/share/webapps/phpmyadmin/2.6.1_p2/postinst-en.txt

 * vhosts USE flag not set - auto-installing using webapp-config
 * This is an upgrade
 * phpmyadmin-2.6.0_p2 is already installed - upgrading
 * Running /usr/sbin/webapp-config -U -h localhost -u root -d /phpmyadmin phpmyadmin 2.6.1_p2
cp: cannot create regular file `/var/www/localhost/htdocs/phpmyadmin/css/phpmyadmin.css.php': No such file or directory

Fatal error: Fatal error - exiting
Fatal error(s) - aborting
 * Removing old version phpmyadmin-2.6.0_p2

--- Couldn't find phpmyadmin-2.6.0_p2 to unmerge.

>>> unmerge: No packages selected for removal.

>>> Regenerating /etc/ld.so.cache...
 * Caching service dependencies...
>>> dev-db/phpmyadmin-2.6.1_p2 merged.

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.


 * GNU info directory index is up-to-date.
Comment 1 Toralf Förster gentoo-dev 2005-03-02 07:56:07 UTC
And I got:
>>> emerge (1 of 1) dev-db/phpmyadmin-2.6.1_p2-r1 to /
>>> md5 src_uri ;-) phpMyAdmin-2.6.1-pl2.tar.bz2
 * You already have something installed in /var/www/localhost/htdocs/phpmyadmin
 * Are you trying to install over the top of something I cannot upgrade?
 *
 * I can upgrade the contents of /var/www/localhost/htdocs/phpmyadmin
 *
>>> Unpacking source...
>>> Unpacking phpMyAdmin-2.6.1-pl2.tar.bz2 to /var/tmp/portage/phpmyadmin-2.6.1_p2-r1/work
 * Applying config.inc.php-2.5.6.patch ...                                                                                                         [ ok ]
 * Applying 2.6.1_p2-no-wildcard-privs-for-you.patch ...

 * Failed Patch: 2.6.1_p2-no-wildcard-privs-for-you.patch!
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/phpmyadmin-2.6.1_p2-r1/temp/2.6.1_p2-no-wildcard-privs-for-you.patch-29195.out


!!! ERROR: dev-db/phpmyadmin-2.6.1_p2-r1 failed.
!!! Function epatch, Line 397, Exitcode 0
!!! Failed Patch: 2.6.1_p2-no-wildcard-privs-for-you.patch!
!!! If you need support, post the topmost build error, NOT this status message.

Comment 2 Toralf Förster gentoo-dev 2005-03-02 07:57:13 UTC
Created attachment 52464 [details]
output of patch
Comment 3 Tiago Silva 2005-03-02 08:59:34 UTC
When installing phpmyadmin, the same occurred error of the "Toralf F
Comment 4 Tiago Silva 2005-03-02 08:59:34 UTC
When installing phpmyadmin, the same occurred error of the "Toralf Förster" 
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-db/phpmyadmin-2.6.1_p2-r1 to /
>>> md5 src_uri ;-) phpMyAdmin-2.6.1-pl2.tar.bz2
>>> Unpacking source...
>>> Unpacking phpMyAdmin-2.6.1-pl2.tar.bz2 to /var/tmp/portage/phpmyadmin-2.6.1_p2-r1/work
 * Applying config.inc.php-2.5.6.patch ...                                                                            [ ok ]
 * Applying 2.6.1_p2-no-wildcard-privs-for-you.patch ...

 * Failed Patch: 2.6.1_p2-no-wildcard-privs-for-you.patch!
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/phpmyadmin-2.6.1_p2-r1/temp/2.6.1_p2-no-wildcard-privs-for-you.patch-10954.out


!!! ERROR: dev-db/phpmyadmin-2.6.1_p2-r1 failed.
!!! Function epatch, Line 397, Exitcode 0
!!! Failed Patch: 2.6.1_p2-no-wildcard-privs-for-you.patch!
!!! If you need support, post the topmost build error, NOT this status message.
Comment 5 Tiago Silva 2005-03-02 09:00:34 UTC
When installing phpmyadmin, the same occurred error of the "Toralf F
Comment 6 Tiago Silva 2005-03-02 09:00:34 UTC
When installing phpmyadmin, the same occurred error of the "Toralf Förster" 
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-db/phpmyadmin-2.6.1_p2-r1 to /
>>> md5 src_uri ;-) phpMyAdmin-2.6.1-pl2.tar.bz2
>>> Unpacking source...
>>> Unpacking phpMyAdmin-2.6.1-pl2.tar.bz2 to /var/tmp/portage/phpmyadmin-2.6.1_p2-r1/work
 * Applying config.inc.php-2.5.6.patch ...                                                                            [ ok ]
 * Applying 2.6.1_p2-no-wildcard-privs-for-you.patch ...

 * Failed Patch: 2.6.1_p2-no-wildcard-privs-for-you.patch!
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/phpmyadmin-2.6.1_p2-r1/temp/2.6.1_p2-no-wildcard-privs-for-you.patch-10954.out


!!! ERROR: dev-db/phpmyadmin-2.6.1_p2-r1 failed.
!!! Function epatch, Line 397, Exitcode 0
!!! Failed Patch: 2.6.1_p2-no-wildcard-privs-for-you.patch!
!!! If you need support, post the topmost build error, NOT this status message.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2005-03-02 09:40:49 UTC
Please see Bug 83792 for a working patch. ;-)
Comment 8 Aaron Walker (RETIRED) gentoo-dev 2005-03-02 10:02:39 UTC
See my explanation in http://bugs.gentoo.org/show_bug.cgi?id=83792#c9

/me curses patches with $Id or $Header etc ;)

His patch works for him but wouldnt obviously once it was committed.
Comment 9 Aaron Walker (RETIRED) gentoo-dev 2005-03-02 10:04:33 UTC
Sorry Carlo, I'll saw all the patch output from the other posts and didn't see your error.
Comment 10 Carsten Lohrke (RETIRED) gentoo-dev 2005-03-02 13:34:52 UTC
Same with -r1. Doing emerge -C ... by hand to get rid of the old versions works.
Comment 11 Carsten Lohrke (RETIRED) gentoo-dev 2005-04-08 16:05:46 UTC
once again:

>>> /var/db/webapps/phpmyadmin/2.6.2_rc1/.keep

 * vhosts USE flag not set - auto-installing using webapp-config
 * This is an upgrade
 * phpmyadmin-2.6.0_p2 is already installed - upgrading
 * Running /usr/sbin/webapp-config -U -h localhost -u root -d /phpmyadmin phpmyadmin 2.6.2_rc1
cp: cannot create regular file `/var/www/localhost/htdocs/phpmyadmin/css/phpmyadmin.css.php': No such file or directory

Fatal error: Fatal error - exiting
Fatal error(s) - aborting
 * Removing old version phpmyadmin-2.6.0_p2

--- Couldn't find phpmyadmin-2.6.0_p2 to unmerge.

>>> unmerge: No packages selected for removal.

>>> Regenerating /etc/ld.so.cache...
 * Caching service dependencies...
>>> dev-db/phpmyadmin-2.6.2_rc1 merged.

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.


I should have had earlier a look at it, but since it was impossible to get a single web application to build for months during the webapp eclass conversion I'm using tarballs now and use the ebuild only to provide a bit testing feedback.

The problem seem to be, that 

/var/www/localhost/htdocs/phpmyadmin/css/phpmyadmin.css.php -> /usr/share/webapps/phpmyadmin/2.5.7_p1/htdocs/css/phpmyadmin.css.php

and the target obviously doesn't exist for ages.

Symlink handling is in general a bit tricky (see e.g. Bug 48309) and running into a dead one without cp -f is part of the problem here.

O.k. deleted the dead sylink by hand, read to run in the next (minor) issue:

Calculating dependencies ...done!
>>> emerge (1 of 1) dev-db/phpmyadmin-2.6.2_rc1 to /
mv: cannot stat `/var/tmp/portage/phpmyadmin-2.6.2_rc1/temp/environment': No such file or directory
>>> md5 src_uri ;-) phpMyAdmin-2.6.2-rc1.tar.bz2
 * You already have something installed in /var/www/localhost/htdocs/phpmyadmin
 * Are you trying to install over the top of something I cannot upgrade?
 *
 * I can upgrade the contents of /var/www/localhost/htdocs/phpmyadmin
 *
>>> Checking phpMyAdmin-2.6.2-rc1.tar.bz2's mtime...
>>> WORKDIR is up-to-date, keeping...
>>> It appears that phpmyadmin is already compiled; skipping.
>>> (clean to force compilation)
>>> Test phase [not enabled]: dev-db/phpmyadmin-2.6.2_rc1

>>> Install phpmyadmin-2.6.2_rc1 into /var/tmp/portage/phpmyadmin-2.6.2_rc1/image/ category dev-db
 * ebuild fault: file '/var/tmp/portage/phpmyadmin-2.6.2_rc1/temp/mysql-setup.sql' not found
 * Please report this as a bug at http://bugs.gentoo.org/

I mean it keepdir /should/ work, but rm -rf ...

 * This is an upgrade
 * phpmyadmin-2.6.0_p2 is already installed - upgrading
 * Running /usr/sbin/webapp-config -U -h localhost -u root -d /phpmyadmin phpmyadmin 2.6.2_rc1
cp: cannot create regular file `/var/www/localhost/htdocs/phpmyadmin/lang/check_lang.sh': No such file or directory

Fatal error: Fatal error - exiting
Fatal error(s) - aborting
 * Removing old version phpmyadmin-2.6.0_p2

--- Couldn't find phpmyadmin-2.6.0_p2 to unmerge.

>>> unmerge: No packages selected for removal.


Do I have to tell you that /var/www/localhost/htdocs/phpmyadmin/lang/ is full of bad symlinks to .../2.5.7_p1/...?

O.k., deleted them, cleared $workdir, next round:


 * vhosts USE flag not set - auto-installing using webapp-config
 * This is an upgrade
 * phpmyadmin-2.6.0_p2 is already installed - upgrading
 * Running /usr/sbin/webapp-config -U -h localhost -u root -d /phpmyadmin phpmyadmin 2.6.2_rc1
 * I don't know what 'Fatal' is
 * This means that I can't understand the CONTENTS file
 *
 *     /var/www/localhost/htdocs/phpmyadmin/.webapp-phpmyadmin-2.6.0_p2
 *

Fatal error: urgh
Fatal error(s) - aborting
 * Removing old version phpmyadmin-2.6.0_p2

--- Couldn't find phpmyadmin-2.6.0_p2 to unmerge.

>>> unmerge: No packages selected for removal.


O.k., I guess cleaning the whole phpmyadmin stuff and installing new will work. But doesn't illustrate this, why there were so much users pissed about the webapp eclass conversion?
Comment 12 Carsten Lohrke (RETIRED) gentoo-dev 2005-04-08 16:19:02 UTC
I see the very same problem with phppgadmin btw. 

/var/www/localhost/htdocs/{phpmyadmin,phppgadmin}/ are full of dead symlinks and

`emerge -C phppgadmin` results in

--- !found FAQ
--- !found TODO
--- !found lang/Makefile
--- !found lang/recoded/chinese-sim.php
--- !found lang/recoded/afrikaans.php
--- !found lang/recoded/polish.php

...

--- !empty dir conf
--- !empty dir classes/HTML_TreeMenu/images
--- !empty dir classes/HTML_TreeMenu
--- !empty dir classes/database
--- !empty dir classes
--- !empty dir /var/www/localhost/htdocs/phppgadmin
 * Remove whatever is listed above by hand
<<<        obj /var/db/webapps/phppgadmin/3.5.1/.keep
<<<        obj /usr/share/webapps/phppgadmin/3.5.1/postinst-en.txt
<<<        obj /usr/share/webapps/phppgadmin/3.5.1/installed_by_webapp_eclass
<<<        obj /usr/share/webapps/phppgadmin/3.5.1/htdocs/views.php
Comment 13 Carsten Lohrke (RETIRED) gentoo-dev 2005-04-08 17:09:05 UTC
O.k. cleaning everything, emerging phpmyadmin-2.6.1_p2-r1 and updating to phpmyadmin-2.6.2_rc1 afterwards did work. But why the hell do I have to do the following?

 * One or more files have been config protected
 * To complete your install, you need to run this command:
 *
 *   CONFIG_PROTECT="/var/www/localhost/htdocs/phpmyadmin" etc-update

This may make sense for a vhost installation, but it's not a vhost installation. I don't want to be protected in a way that just means more work for me.


And why am I told the following when having installed phpmyadmin-2.6.2_rc1?

>To complete installation, you must
>
>1. Update MySQL's grant tables and the pmadb database:
>     mysql -u root -p < >/usr/share/webapps/phpmyadmin/2.6.1_p2-r1/sqlscripts/mysql/2.6.1_p2-r1_create.sql
>2. Reload MySQL:
>     /etc/init.d/mysql restart
>If you are upgrading from an earlier version and are using phpMyAdmin's
>features for master/foreign tables be sure to read
>  http://localhost/phpmyadmin/Documentation.html#col_com
>You will need to perform the ALTER TABLE step yourself.
>
>Finally, point your browser to http://localhost/phpmyadmin/.
>
> * Removing old version phpmyadmin-2.6.1_p2-r1
>
> dev-db/phpmyadmin
>    selected: 2.6.1_p2-r1
>   protected: none
>     omitted: 2.6.2_rc1
...

Did that, when I installed 2.6.1_p2-r1 and the file doesn't exist anymore. I suppose you don't meant  the previous version here.
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2005-04-08 18:25:39 UTC
Created attachment 55729 [details, diff]
patched ebuild

Fixes incorrect sed for postinstall-en.txt
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2005-04-08 18:26:52 UTC
Created attachment 55731 [details, diff]
patched postinstall-en.txt

Changed postinstall-en.txt to work with the patched ebuild
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2005-04-08 18:35:44 UTC
1. Above I attached the patches for incorrect postinstall instructions. Otherwise, I had no problem with this upgrade except for the wrong version number in postinstall instructions. 

2. Please, consider dropping the instructions concerning MySQL restart stuff, it is totally useless. There is no need to do it. Even the database import is not needed most of the time, maybe just if some major PMA DB changes occur (I have never seen any...)

3. However, the CONFIG_PROTECT stuff is actually useful for me, even if I am not using vhosts either. I have customized config.inc.php which would otherwise be overwritten.  

4. And yes, webapp-config sucks. :/ 
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2005-04-13 08:50:58 UTC
*** Bug 84082 has been marked as a duplicate of this bug. ***
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2005-04-13 10:46:29 UTC
*** Bug 88443 has been marked as a duplicate of this bug. ***
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2005-04-17 09:05:00 UTC
OK, investigated this a little more since phpmyadmin-2.6.2 final is out. The above patches install correct postinst-en.txt when upgrading but webapp-config still spits out its message with old versions. When installing from scratch the patches actually make no difference, webapp-config works then as it should. 

I also tried to fix the SQL script permissions wrt Bug 88831 but found it virtually impossible to achieve with that "smart" webapp-config stuff. 

I really give up, this simply sucks. :-(
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2005-04-25 07:37:14 UTC
*** Bug 90371 has been marked as a duplicate of this bug. ***
Comment 21 Jakub Moc (RETIRED) gentoo-dev 2005-05-11 04:47:11 UTC
New webapp-config is stable now - any luck with that one, carlo?
Comment 22 Elfyn McBratney (beu) (RETIRED) gentoo-dev 2005-05-11 10:02:27 UTC
Not likely, the changes Aaron and myself made recently aren't going to fix this.  After a brief chat with Carsten on irc, I've started looking into the problems surrounding these USE=-vhosts issues, but I'm not guaranteeing anything for at least a couple of weeks, I have too many things on my plate atm. ;)
Comment 23 Carsten Lohrke (RETIRED) gentoo-dev 2005-05-11 10:12:01 UTC
Jakub: Hm? After purging the pre-webapp ebuild stuff by hand, it seems to work. But I don't really use webapp-config related ebuilds. This was meant as feedback to improve the ebuilds. If it's not needed/wanted, this bug can be closed. That said, the last time I updated phpmyadmin, the mysql update line still included the ebuild revision of the preceding ebuild.
Comment 24 Renat Lumpau (RETIRED) gentoo-dev 2005-07-06 11:38:22 UTC
1. Symlinks vs. hardlinks - please test with the latest webapp-config and
phpmyadmin and report if the problem persists.

2. It appears that webapp-config does show incorrect instructions. I filed
#98142,  and changed the postinstall instructions accordingly.

3. localhost was hardcoded in the instructions, fixed in CVS.

Closing - if the symlink / hardlink problem is not fixed, please file a new bug
and assign it to stuart@gentoo.org, cc'ed to web-apps@g.o