FS#18800 - [mysql] command failed to execute correctly when install

Attached to Project: Arch Linux
Opened by Andrew (drandre) - Tuesday, 23 March 2010, 10:12 GMT
Last edited by Andrea Scarpino (BaSh) - Tuesday, 23 March 2010, 17:38 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andrea Scarpino (BaSh)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
See description on forum thread http://bbs.archlinux.org/viewtopic.php?pid=730051#p730051
Seems to be a problem with the post install script:

chown -R mysql:mysql var/lib/mysql &> /dev/null

seems to be missing a leading slash in the path.

Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:

sudo pacman -S mysql
...
error: command failed to execute correctly
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Tuesday, 23 March 2010, 17:38 GMT
Reason for closing:  Fixed
Additional comments about closing:  on trunk
Comment by Pierre Schmitz (Pierre) - Tuesday, 23 March 2010, 10:20 GMT
The missing slash is correct, but we cannot assume that /var/lib/mysql exists. E.g. my datadir is set to /srv/mysql.
Comment by Ionut Biru (wonder) - Tuesday, 23 March 2010, 10:37 GMT Comment by Pierre Schmitz (Pierre) - Tuesday, 23 March 2010, 11:02 GMT
I would suggest to remove that line from the install script completely and instead set the correct rights during packaging.
Comment by Andrea Scarpino (BaSh) - Tuesday, 23 March 2010, 12:11 GMT
@Pierre
/var/lib/mysql is created with: "usr/bin/mysql_install_db --datadir=/var/lib/mysql --user=mysql" in post_install.
From what I know, makepkg overrides groups and users rights and set root rights to everyfile. Tell me if I am wrong.

@Andrew
Please, try to remove and re-install mysql.
Comment by Pierre Schmitz (Pierre) - Tuesday, 23 March 2010, 12:14 GMT
Yes, you are wrong. :-) You can set owners during packaging. You might need to use the uid and gid though as the system doesn't know about a mysql user at that point.
Comment by Andrea Scarpino (BaSh) - Tuesday, 23 March 2010, 16:58 GMT
ok, thank you to let me know :) Do we have some policy here? Should be rights set during packaging or into .install files?
Comment by Pierre Schmitz (Pierre) - Tuesday, 23 March 2010, 17:19 GMT
They should be set during packaging. (within package() to be precise)

Loading...