Ask Your Question

package install does not create file in /root dir

asked 2015-06-02 21:16:49 -0500

johntest gravatar image

updated 2015-06-03 09:25:19 -0500

When I install mysql-wsrep-5.6 through yum (as root), it creates a password file in /root dir However, when I install it as puppet Package resource it does not create this file, is this a permission issue? How can I resolve it?

The package does get installed but it doesn't put the password file in /root

Update: Same behavior if I run "yum -y mysql-wsrep-5.6" with an exec resource.

edit retag flag offensive close merge delete


Am I guessing right that some sort of postinst-script in package 'mysql-wsrep-5.6' will place the the file there? In theory there should be no difference between calling rpm -i $package manuelly and using package {$name: ensure => installed}. Did you look at /var/log/messages & yum.log?

far4d gravatar imagefar4d ( 2015-06-03 03:08:33 -0500 )edit

This is all there is in /var/log/message and /var/log/yum.log Jun 03 10:03:24 Installed: mysql-wsrep-server-5.6-5.6.23-25.10.el6.x86_64 Jun 03 10:03:28 Installed: mysql-wsrep-client-5.6-5.6.23-25.10.el6.x86_64 Jun 03 10:03:28 Installed: mysql-wsrep-5.6-5.6.23-25.10.el6.x86_64

johntest gravatar imagejohntest ( 2015-06-03 09:26:45 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2015-06-03 12:33:09 -0500

cbarbour gravatar image

updated 2015-06-03 12:33:52 -0500

My suspicion is that the mysql-wsrep package contains an installation script that reads the environment and installs the password file to the current users home directory. The package provider invokes YUM with a highly sanitized environment; $HOME isn't set when invoking the provider.

You can confirm by querying the package using the --scripts argument.

Unfortunately, I don't have a simple answer for your problem. Consider:

  • re-packaging
  • creating the file using a Puppet template
  • Invoking YUM using an exec resource rather than a package resource (you can control the environment with Exec.)
edit flag offensive delete link more

answered 2015-06-03 12:32:37 -0500

johntest gravatar image

Puppet placed the file in / instead of /root I am not sure why it's doing that, but it serves my purpose as long as the file is there.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-06-02 21:16:49 -0500

Seen: 267 times

Last updated: Jun 03 '15