Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I recently set up a PPA on Launchpad for distributing my web application. Since it's a server-app, I need to put my data into /var/www/html which apparently is not wanted by Lintian ("dir-or-file-in-var-www").

So far, I accomplish the task via a postinst script, which copies the files after installation, but there has to be a more elegant way, isn't there?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

There is not a more elegant solution. A postinstall-script is allowed under certain conditions, and your package seems to satisfy these conditions. From https://lintian.debian.org/tags/dir-or-file-in-var-www.html:

As an exception, packages are permitted to create the /var/www directory due to its past history as the default document root, but should at most copy over a default file in postinst for a new install. In this case, please add a Lintian override.

Please consult the rest of https://lintian.debian.org/tags/dir-or-file-in-var-www.html as well.

share|improve this answer
    
Thank you. For anyone else wondering: In my .install-file I move the data to /usr/share, with the postinst-script I determine the DocumentRoot via "docRoot=$(grep -i 'DocumentRoot' /etc/apache2/sites-available/000-default.conf)" and then I move the data from /usr/share to docRoot –  paranerd Jul 24 at 15:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.