Rajul Vora
2012-Nov-18 19:36 UTC
[Puppet Users] HOME is not set when running post-installation script on Ubuntu
Trying to install mcollective with RabbitMQ. The following package install produces the errors listed below in Bold. I know exec resource unsets HOME and USER now starting with 3.0 and the workaround for that is to set "environment => ''HOME=/root''" for the exec resource. It looks like it is the same situation when running post-installation script during package install. And there doesn''t seem to be any workaround for that since one can not pass environment parameter to package install. Any ideas how to solve this? package { ''rabbitmq-server'': ensure => installed } package { ''rabbitmq-stomp'': ensure => installed, require => Package[''rabbitmq-server''] } Error: Execution of ''/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install rabbitmq-stomp'' returned 100: Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: rabbitmq-erlang-client The following NEW packages will be installed: rabbitmq-erlang-client rabbitmq-stomp 0 upgraded, 2 newly installed, 0 to remove and 9 not upgraded. Need to get 21.1 kB of archives. After this operation, 125 kB of additional disk space will be used. Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe rabbitmq-erlang-client all 2.7.1-0ubuntu4 [10.4 kB] Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe rabbitmq-stomp all 2.7.1-0ubuntu4 [10.6 kB] Fetched 21.1 kB in 0s (130 kB/s) Selecting previously unselected package rabbitmq-erlang-client. (Reading database ... 36928 files and directories currently installed.) Unpacking rabbitmq-erlang-client (from .../rabbitmq-erlang-client_2.7.1-0ubuntu4_all.deb) ... Selecting previously unselected package rabbitmq-stomp. Unpacking rabbitmq-stomp (from .../rabbitmq-stomp_2.7.1-0ubuntu4_all.deb) ... *Setting up rabbitmq-erlang-client (2.7.1-0ubuntu4) ...* *erlexec: HOME must be set* *dpkg: error processing rabbitmq-erlang-client (--configure):* * subprocess installed post-installation script returned error exit status 1 * dpkg: dependency problems prevent configuration of rabbitmq-stomp: rabbitmq-stomp depends on rabbitmq-erlang-client (= 2.7.1-0ubuntu4); however: Package rabbitmq-erlang-client is not configured yet. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/b80u2ikXg0sJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2012-Nov-19 14:50 UTC
[Puppet Users] Re: HOME is not set when running post-installation script on Ubuntu
On Sunday, November 18, 2012 1:36:18 PM UTC-6, Rajul Vora wrote:> > > Trying to install mcollective with RabbitMQ. The following package install > produces the errors listed below in Bold. > > I know exec resource unsets HOME and USER now starting with 3.0 and the > workaround for that is to set "environment => ''HOME=/root''" for the exec > resource. > > It looks like it is the same situation when running post-installation > script during package install. And there doesn''t seem to be any workaround > for that since one can not pass environment parameter to package install. > > Any ideas how to solve this? > >Report the problem to the package provider; it is his. No package should be sensitive to the environment in which the package manager runs. If it is, that defeats a key objective of using packages in the first place: reliable, consistent installs. Indeed, that''s exactly what has happened to you. In the meantime, your best alternative is to build a local, bugfixed version of the package, and to load it from your own local repository in preference to the buggy one. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/_wQ3gCrOnGEJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.