juju removes all dot files from charm directory when deploying local charm

Bug #1725313 reported by Tom Haddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

We want to include some metadata in charms, and had originally thought to do so via dot files in the charm directory. However, it seems like juju removes all dot files on deployment of local charms. Is this intended behaviour?

Revision history for this message
Tom Haddon (mthaddon) wrote :

This is on OpenStack using juju 2.2.3, fwiw

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1725313] Re: juju removes all dot files from charm directory when deploying local charm

This is nothing to do with the provider, all charms always strip hidden
files:
https://github.com/juju/charm/blob/v6-unstable/charmdir.go#L226

I'm pretty sure the original intent was to make sure version control
directories (.git,.bzr,.svn, etc) are omitted. (When building the charm.)

Further, I think we remove all directories that aren't "hooks" on
extraction:
https://github.com/juju/charm/blob/v6-unstable/charmarchive.go#L311

John
=:->

On Fri, Oct 20, 2017 at 7:39 PM, Tom Haddon <email address hidden>
wrote:

> This is on OpenStack using juju 2.2.3, fwiw
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1725313
>
> Title:
> juju removes all dot files from charm directory when deploying local
> charm
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1725313/+subscriptions
>

Revision history for this message
Tom Haddon (mthaddon) wrote :

Ok, thanks.

Isn't https://github.com/juju/charm/blob/v6-unstable/charmarchive.go#L311 just about making sure all files in the hooks directory are executable? I don't think it's about removing any non-hook directories, as there are plenty of charms that have directories like "file", "templates" or "actions", etc..

Revision history for this message
John A Meinel (jameinel) wrote :

Ah, you're probably right. I just saw it filtering out dirs that aren't
hooks, but it was to avoid the Chmod, indeed.

On Mon, Oct 23, 2017 at 1:45 PM, Tom Haddon <email address hidden>
wrote:

> Ok, thanks.
>
> Isn't
> https://github.com/juju/charm/blob/v6-unstable/charmarchive.go#L311 just
> about making sure all files in the hooks directory are executable? I
> don't think it's about removing any non-hook directories, as there are
> plenty of charms that have directories like "file", "templates" or
> "actions", etc..
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1725313
>
> Title:
> juju removes all dot files from charm directory when deploying local
> charm
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1725313/+subscriptions
>

John A Meinel (jameinel)
Changed in juju:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Wishlist → Low
tags: added: expirebugs-bot
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.