[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Webapps policy: final RFC



Le lundi 10 août 2009 09:59:24, Neil McGovern a écrit :
> Added this, thoughts?
>
>    site-wide include files should be split into a different package,
>    and made available in
>    <file>/usr/share/<var>NEWPACKAGE</var></file>. This is to avoid
>    having multiple copies of code in different packages.

When splitting files into share and var locations, static files go to share and 
editable/dynamic files to var. 

However, a lot of PHP code, for instance, rely on relative path for their 
inclusion, which is not compatible with this: as soon as a file from share 
calls for the inclusion of a file that is in var using a relative path, this 
will fail.

Hence, I recommend, when splitting files across share, var, and others 
potentially, to also create symlinks to the relative files. For instance:

Original structure:
static.html
dynamic-folder/

static.html then goes to /usr/share/application, and dynamic-folder to 
/var/lib/application:

/usr/share/application/static.html
/var/lib/application/dynamic-folder/

Hence, to make this work, I add:

/usr/share/application/static.html
/usr/share/application/dynamic-folder -> /var/lib/application/dynamic-folder/
/var/lib/application/dynamic-folder/
/var/lib/application/static.html -> /usr/share/application/static.html

I believe this should be written somewhere in a webapp policy. I've also been 
thinking that this could be a dh_whatever call...



Romain


Reply to: