install hook fails with: "command not found"

Bug #1364680 reported by Matt Bruzek
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
liferay (Juju Charms Collection)
Fix Committed
Medium
Charles Butler

Bug Description

While testing the liferay charm I found that it does not install.

The install hook is trying to call ch_get_file and that command/function does not exist.

Here is the unit-liferay.log

2014-09-02 20:16:39 INFO install E: Unable to locate package charm-helper-sh
2014-09-02 20:16:39 INFO install /var/lib/juju/agents/unit-liferay-0/charm/hooks/install: line 13: /usr/share/charm-helper/sh/net.sh: No such file or directory
2014-09-02 23:54:31 INFO juju-log Fetching latest upstream Liferay release from http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-tomcat-6.1.1-ce-ga2-20120731132656558.zip/download with expected hash f88ad198dc9bc154528f67d64291ad4762333df5
2014-09-02 23:54:31 INFO install /var/lib/juju/agents/unit-liferay-0/charm/hooks/install: line 17: ch_get_file: command not found
2014-09-02 23:54:31 INFO worker.uniter.jujuc server.go:102 running hook tool "juju-log" ["Failed to retrieve http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-tomcat-6.1.1-ce-ga2-20120731132656558.zip/download"]
2014-09-02 23:54:31 DEBUG worker.uniter.jujuc server.go:103 hook context id "liferay/0:install:6499797840946805776"; dir "/var/lib/juju/agents/unit-liferay-0/charm"
2014-09-02 23:54:31 INFO juju-log Failed to retrieve http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.1.1%20GA2/liferay-portal-tomcat-6.1.1-ce-ga2-20120731132656558.zip/download
2014-09-02 23:54:31 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1

This is because the charm-helper-sh package does not exist in the main packages. We have preserved this older package in a PPA so the install hook can be changed to use ppa:charmers/charm-helpers. This however will only work in precise and not in trusty. Alternately we could re-write the install hook to wget the file and check the hash in the charm code so it is self contained. This is left up to the author fixing this problem.

Tags: audit

Related branches

Matt Bruzek (mbruzek)
description: updated
Matt Bruzek (mbruzek)
description: updated
Changed in liferay (Juju Charms Collection):
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Charles Butler (lazypower)
tags: added: audit
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.