[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ruby-databojects-mysql (was: [RFH] Fix FTBFSes to kick off the ruby3.0 transition)



Am Mittwoch, dem 27.10.2021 um 11:02 -0300 schrieb Lucas Kanashiro:

[..]
> * ruby-databojects-mysql
[..]

My finding so far is that the debian/start_mysqld_and_auto_install.sh scripts
requires elevated permissions, but fakeroot is not enough:

> + mysql_install_db --no-defaults --datadir=/tmp/tmp.BZtu29C6kk --force --skip-name-resolve --user=root
> chown: cannot access '/usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool': Permission denied
> Couldn't set an owner to '/usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool'.
> It must be root, the PAM authentication plugin doesn't work otherwise..

If I run the whole thing as root, it works (also if I run `sudo gbp
buildpackage`). But I don't see a way to achieve this by default.

I was reading the documentation about Rules-Requires-Root and DEB_GAIN_ROOT_CMD
in our policy and also looked at the libpcap2 package. But all my attempts
failed.

As long as DEB_GAIN_ROOT_CMD is "fakeroot" (default; e.g. set when using Rules-
Requires-Root: binary-targets or dpkg/target-subcommand) the above error
appears. If try to set DEB_GAIN_ROOT_CMD to 'sudo -nE --' (as suggested in the
policy) I either get "not found" or "requires a password" error (and I don't
want to change my sudo policy). I also tried to set the setuid bit for
debian/start_mysqld_and_auto_install.sh and I still get the above error.

I don't have any other ideas. Maybe we can use mysql-sandbox? Maybe we have to
avoid running mysql_install_db or use a fake .my.cnf? I don't know. 

PS: The autopkgtests need elevated permissions as well it seems (and also a
running mysql server judging from the error message).

HTH and regards, Daniel
-- 
Regards,
Daniel Leidert <dleidert@debian.org> | https://www.wgdd.de/
GPG-Key RSA4096 / BEED4DED5544A4C03E283DC74BCD0567C296D05D
GPG-Key ED25519 / BD3C132D8B3805D1808123AB7ACE00941E338C78

https://www.fiverr.com/dleidert
https://www.patreon.com/join/dleidert

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: