ubuntu-appstore-developers team mailing list archive
-
ubuntu-appstore-developers team
-
Mailing list archive
-
Message #00294
Re: Adding "applications" to manifest file
On 07/18/2013 05:17 AM, Colin Watson wrote:
> On Wed, Jul 17, 2013 at 02:36:42PM -0700, Steve Beattie wrote:
>> On Wed, Jul 17, 2013 at 05:55:17PM +0100, Colin Watson wrote:
>>> On Wed, Jul 17, 2013 at 08:55:10AM -0500, Jamie Strandboge wrote:
>>>> On 07/17/2013 08:01 AM, Colin Watson wrote:
...
>>
>> The only situation I can see where this would be problematic is
>> if global level information was added to the manifest format that
>> hooks might need or be interested in, or information that multiple
>> hooks might want to know. For example, earlier you had proposed
>> alternate install locations than /opt/click.ubuntu.com/ for things
>> like vendor/carrier installed applications. The apparmor hook would
>> want exposure to this somehow, but having the author/sdk repeat this
>> information both at a global level and within the security json
>> for each application within the package would potentially lead to
>> inconsistencies.
>
> Right. For this reason, you mustn't hardcode /opt/click.ubuntu.com/ in
> the AppArmor hook, or otherwise try to construct package unpack
> directories yourself. Instead, fully dereference ("readlink -f") the
> symlink you're given (which will be to apparmor/myapp.json or whatever's
> specified), step up until you find a directory containing a .click
> subdirectory, and that's the package unpack directory.
>
> (I have a pending merge proposal from Ted to add "click pkg-dir"; I want
> to think about that in light of this and see if perhaps I can offer a
> general helper. But for the time being it's OK to do it by hand.)
>
> If files referenced in hooks need to know any of this information, then
> I think the right thing to do is to write them in a templated form and
> for the hook code to apply substitutions. I certainly agree that we
> should apply a Don't Repeat Yourself rule.
>
>> That in fact is why the apparmor hook would be parsing apart the
>> symlink name, as it encapsulates the global information from the
>> manifest that apparmor is interested in.
>
> Is this obviated by the algorithm I described above for unpack directory
> discovery, or do you still need to parse the symlink name for something
> else?
>
Steve, this gets back to us using @{CLICK_DIR} in the templates. aa-clicktool
can dereference the symlink/use "click pkg-dir" then set the CLICK_DIR template
variable, and we should be set.
--
Jamie Strandboge http://www.ubuntu.com/
Attachment:
signature.asc
Description: OpenPGP digital signature
References
-
Adding "applications" to manifest file
From: Ted Gould, 2013-07-12
-
Re: Adding "applications" to manifest file
From: Colin Watson, 2013-07-12
-
Re: Adding "applications" to manifest file
From: Ted Gould, 2013-07-12
-
Re: Adding "applications" to manifest file
From: Colin Watson, 2013-07-12
-
Re: Adding "applications" to manifest file
From: Steve Beattie, 2013-07-16
-
Re: Adding "applications" to manifest file
From: Colin Watson, 2013-07-17
-
Re: Adding "applications" to manifest file
From: Jamie Strandboge, 2013-07-17
-
Re: Adding "applications" to manifest file
From: Colin Watson, 2013-07-17
-
Re: Adding "applications" to manifest file
From: Steve Beattie, 2013-07-17
-
Re: Adding "applications" to manifest file
From: Colin Watson, 2013-07-18