Charm needed: Joomla

Bug #795477 reported by Ahmed Kamal
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Juju Charms Collection
Fix Released
Wishlist
Helio Mota

Bug Description

Formula needed Joomla

Ahmed Kamal (kim0)
Changed in principia:
importance: Undecided → Wishlist
summary: - Formula needed Joomla
+ Formula needed: Joomla
Revision history for this message
Adnane Belmadiaf (daker) wrote : Re: Formula needed: Joomla

i'll work on it.

Changed in principia:
assignee: nobody → Adnane Belmadiaf (daker)
status: New → In Progress
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

That's awesome news, thanks Adnane.

Please drop by the IRC channel or mailing list if you need any kind of support/feature/whatever. We'll be happy to help.

tags: added: new-formula
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Adnane!

I took a look at the formula, and here is some feedback:

1) The formula has no license. The code was clearly copied from one of the other python based formulas (wordpress maybe?) but the copyright file (just added recently) was not. Please make sure to ad your copyrights and licenses to the files and/or copyright file. This is suggested in https://ensemble.ubuntu.com/Principia#Contributing Formulas

2) hostname_url is unused in the later code

3) principia proof reports that your formula doesn't provide anything. It should at least provide 'website' with an interface of 'http' so that you can relate to it with a load balancer.

We're still debating whether to import formulas that use non-Ubuntu software, like Joomla, so with the fixes above, I still am hesitant to bring it in until that question is resolved. HOWEVER, nice job!

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Adnane, just an FYI, the policy around inclusion has been updated to allow software that isn't in Ubuntu.

You will need to modify the formula to verify the downloaded tarball though.

Check out the policy here:

https://ensemble.ubuntu.com/Principia

Thanks again for the contribution!

Jorge Castro (jorge)
tags: added: developers
Revision history for this message
Adnane Belmadiaf (daker) wrote :

Hi Clint, how can i verify the downloaded tarball ? it's downloaded from the official repos.

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [Bug 795477] Re: Formula needed: Joomla

Excerpts from Adnane Belmadiaf's message of Sat Jul 02 20:47:33 UTC 2011:
> Hi Clint, how can i verify the downloaded tarball ? it's downloaded from
> the official repos.
>

I took a quick look around joomla.org and joomlacode.org. Its not
obvious at all how you can. That means joomla as a project is putting
their users in quite a bit of danger by not encouraging them to verify
the integrity of the downloaded tarballs.

I would suggest opening a but with joomla asking for them to publish
cryptographic signatures for all future tarballs.

Until then, I think this formula will have to embed a tarball to keep users
safe, and you will have to inspect and sign and take responsibility for its
integrity as the maintainer of the formula.

Revision history for this message
Ahmed Kamal (kim0) wrote : Re: Formula needed: Joomla

Would the formula embedding a hash of the joomla download would be enough/ok ?

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [Bug 795477] Re: Formula needed: Joomla

Excerpts from Ahmed Kamal's message of Thu Jul 07 16:59:03 UTC 2011:
> Would the formula embedding a hash of the joomla download would be
> enough/ok ?

I'd like to make formulas self contained. I've reversed my original
position that formulas should never embed binaries. If a formulas is
usable without an Internet connection, that makes it more useful in both
the offline developer case and the disconnected private cloud case.

What would be important would be a mechanism for upgrading to the next
version, but thats just "important", not a blocker for putting it into
the formula collection.

Jorge Castro (jorge)
tags: added: bitesize
summary: - Formula needed: Joomla
+ Charm needed: Joomla
tags: added: new-charm
removed: new-formula
Revision history for this message
Jorge Castro (jorge) wrote :

Hi Adnane, are you still working on this?

Jorge Castro (jorge)
tags: removed: new-charm
Revision history for this message
Mike Hamanaka (hamanaka) wrote :

I just assigned myself to this, I will try to bring some leadership to this, as it appears it has been stale for about 6 months.

Changed in charms:
assignee: Adnane Belmadiaf (daker) → Mike Hamanaka (hamanaka)
Revision history for this message
Helio Mota (helio-mota) wrote :

I just created a initial charm for installing Joomla on precise. It is available here: lp:~helio-mota/charms/precise/joomla/trunk

Changed in charms:
assignee: Mike Hamanaka (hamanaka) → hlm (helio-mota)
Revision history for this message
Juan L. Negron (negronjl) wrote :

Reviewing this now.

-Juan

Revision history for this message
Juan L. Negron (negronjl) wrote :

Hello:

Reviewing: lp:~helio-mota/charms/precise/joomla/trunk

Thanks for the charm ... here is some feedback:

- The admin password should really be in config.yaml with either an automatically generated password (pwgen?), a default that can be changed by the user with a warning if left the same or no default password at all thus forcing the user to put a password in the field.
- private_name variable in the inc/common file should probably be using unit-get private-address as opposed to hostname -f.

The charm seems to be working fine but, the above issues ( in my opinion ) prevent me from approving it for inclusion in the charm store.

I would be happy to review the charm again once the above issues have been addressed.

All in all they are minor issues that can be addressed rather quickly ... almost there :)

Thanks,

Juan

Changed in charms:
status: In Progress → Incomplete
Revision history for this message
Helio Mota (helio-mota) wrote :

Juan,

Thanks for the feedback.

I have implemented the recommended changes.

Latest revision is available in launchpad.

Thank you,
Helio

Revision history for this message
Jorge Castro (jorge) wrote :

Hi Helio, looks like this didn't get back in the review queue since it was still marked incomplete, I've changed that to fix committed to get you back into the queue!

Changed in charms:
status: Incomplete → Fix Committed
Revision history for this message
Brandon Holtsclaw (imbrandon) wrote :

Reviewing this now.

Revision history for this message
Juan L. Negron (negronjl) wrote :

Reviewing this now.

-Juan

Revision history for this message
Juan L. Negron (negronjl) wrote :

Hi Helio:

I noticed that there is a relation-hook with nothing in it ( website-relation-joined ). You should probably add something like "relation-set hostname=`unit-get public-address` port=<insert_port_here>"

Having empty relation hooks should probably be avoided.

I also noticed that the start hook is empty as well. A possible solution ( since you are using apache for this charm ) could be:
- service apache2 status || service apache2 start

While you're at it, it would be cleaner to change the stop hook as well to something similar to the above: ie: service apache2 status && service apache2 stop

My two cents.

-Juan

Changed in charms:
status: Fix Committed → Incomplete
Revision history for this message
Helio Mota (helio-mota) wrote :

Hi Juan,

Thanks for the feedback. I have made the updates, but I have a question:

Which one is the best address to populate the website-relation-joined hostname? I used the private-address based on some other charms, but I see in the sample in your comment favors using the public-address... which one is the preferred one for this type of relation?

The start/stop hooks have been added as recommended. The fixes are already pushed to bzr.

-Helio

Changed in charms:
status: Incomplete → Fix Committed
Revision history for this message
Juan L. Negron (negronjl) wrote : Re: [Bug 795477] Re: Charm needed: Joomla

Hi Helio:

The public address is preferred.

Thanks,

Juan
On Feb 12, 2013 6:16 AM, "Helio Mota" <email address hidden> wrote:

> Hi Juan,
>
> Thanks for the feedback. I have made the updates, but I have a question:
>
> Which one is the best address to populate the website-relation-joined
> hostname? I used the private-address based on some other charms, but I
> see in the sample in your comment favors using the public-address...
> which one is the preferred one for this type of relation?
>
> The start/stop hooks have been added as recommended. The fixes are
> already pushed to bzr.
>
> -Helio
>
> ** Changed in: charms
> Status: Incomplete => Fix Committed
>
> --
> You received this bug notification because you are a member of charmers,
> which is subscribed to the bug report.
> https://bugs.launchpad.net/bugs/795477
>
> Title:
> Charm needed: Joomla
>
> Status in Juju Charms:
> Fix Committed
>
> Bug description:
> Formula needed Joomla
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/charms/+bug/795477/+subscriptions
>

Revision history for this message
Helio Mota (helio-mota) wrote :

Juan,

Thanks, I updated the code to use the public address instead of the private one.

-Helio

Revision history for this message
Juan L. Negron (negronjl) wrote :

Reviewing this now.

-Juan

Revision history for this message
Juan L. Negron (negronjl) wrote :

Hi Helio:

Thanks for the fixes ( and the charm ). I ask that you update the README.md file to reflect the fact that you need to set the admin_password in the configuration before the relation with mysql is established.

That seems to be the only outstanding issue for the moment.

Thanks,

Juan

Changed in charms:
status: Fix Committed → Incomplete
Revision history for this message
Helio Mota (helio-mota) wrote :

Juan,

Thanks for the valuable feedback.

I have improved the READM.md instructions. Hopefully it is more clear now.

The latest revision has been pushed to bzr.

Thanks again,
Helio

Changed in charms:
status: Incomplete → Fix Committed
Revision history for this message
Helio Mota (helio-mota) wrote :

Question: How can I add the current branch to the "Related branches" section? Is this something that I'd be able to do?

Revision history for this message
Jorge Castro (jorge) wrote :

I don't think you can remove someone else's branch unless you have more rights, either way I've removed it, feel free to attach yours now, "Link a related branch" on the right side of the page.

Revision history for this message
Robert Ayres (robert-ayres) wrote :

Tested fine on EC2 and LXC.

Only problem that needs to be fixed is /var/www/configuration.php is given world readable/writeable permissions, which is somewhat of a security flaw :)

Changed in charms:
status: Fix Committed → Incomplete
Revision history for this message
Helio Mota (helio-mota) wrote :

Robert,

Thanks for the feedback. I implemented a function to set permissions and give 640 permissions to /var/www/configuration.php.

While I was at it, I also added a few lines of code to ensure permissions of the entire /var/www tree conform to this reference: http://docs.joomla.org/Security_Checklist/Hosting_and_Server_Setup#File_permissions

I did not have a chance to run full regression test, I appreciate feedback in case this latest commit breaks anything that was working before.

-Helio

Changed in charms:
status: Incomplete → Fix Committed
Revision history for this message
Robert Ayres (robert-ayres) wrote :

Thanks for fixing.

There is an install-error now upon deploying where it tries to set permissions on configuration.php which doesn't exist.

Changed in charms:
status: Fix Committed → Incomplete
Revision history for this message
Helio Mota (helio-mota) wrote :

Robert,

Thanks for the feedback. I correctly placed the permission change for the configuration.php file after it is created at the db-relation-changed hook.

I had the time to run regression tests this time. The install and db-relation-changed hooks ran cleanly and the website could be exposed and acessed as expected.

-Helio

Changed in charms:
status: Incomplete → Fix Committed
Revision history for this message
Robert Ayres (robert-ayres) wrote :

Charm looks good, promulgated to the store!

Thanks for your submission.

Changed in charms:
status: Fix Committed → Fix Released
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.