Re: [opensuse-packaging] is use of /srv/www in packages good practice?
On Tuesday 17 June 2008 16:27:35 Ludwig Nussel wrote:
While moving my files to a new workstation I stumbled across /srv/www. The directory contains a mix of self written stuff and distro packages. So I needed to take care to only copy my own files. I'd assume that someone who actually uses /srv/www in production and cared about the content would have a similar problem when creating backups. The apache packages allows other packages to simply drop a config file into /etc/apache2/conf.d and install e.g. a custom directory alias this way. So files that need to be accessible via http://somehost/foo do not actually need to be stored at /srv/www/htdocs/foo but can reside in e.g. /usr/share/foo. So I wonder what's best practice for packages. Dump stuff into /srv/www or use aliases in the web server config? FHS is quite unspecific wrt use of /srv [1].
I have also thought about this when creating my trac packages. I have decided not to put the trac files below /srv/www/htdocs and instead to provide a conf file. But I am in doubt if this is the right thing. For my ldap-account- manager packages on Packman (which should be moved into the BS), I have decided to install below /srv/www/htdocs without being sure to do the right thing, too. I had a look on other packages. The medaiwiki packages for example are installed below /srv/www/htdocs. One thing I discovered that might infer with an out of /srv/www/htdocs installation is apparmor. It seems that it expects that all web pages are installed below /srv/www/htdocs. For packages installed elsewhere it's rules must be modified. Cheers herbert --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Herbert Graeber wrote:
One thing I discovered that might infer with an out of /srv/www/htdocs installation is apparmor. It seems that it expects that all web pages are installed below /srv/www/htdocs. For packages installed elsewhere it's rules must be modified.
Good point. Although shouldn't different apps also have different profiles? There is no need for e.g. phpMyAdmin scripts to be able to access mediawiki files and vice versa. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hello, on Freitag, 20. Juni 2008, Ludwig Nussel wrote:
Herbert Graeber wrote:
One thing I discovered that might infer with an out of /srv/www/htdocs installation is apparmor. It seems that it expects that all web pages are installed below /srv/www/htdocs. For packages installed elsewhere it's rules must be modified.
Good point. Although shouldn't different apps also have different profiles? There is no need for e.g. phpMyAdmin scripts to be able to access mediawiki files and vice versa.
Yes, in a perfect world, separate apparmor profiles would be a good thing. In this case, it would be hats in the httpd2 profile. Unfortunately, it's quite interesting[tm] to add a hat to an existing profile - my current solution is basically ( grep -v '^}$' profile ; cat hat ; echo '}' ) > profile.new which is for sure not suitable for inclusion in a rpm package ;-) IIRC the newest apparmor (in 11.0) supports an alternative hat syntax /usr/sbin/httpd2-prefork//hatname { (I didn't test this yet). _If_ it is possible to define a hat this way in a separate file (outside the main profile), packaging would be much easier... Regards, Christian Boltz -- [checkinstall] is a tool that allows you to keep your brain in suspend mode. [Robert Schiele in opensuse] --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
Christian Boltz
-
Herbert Graeber
-
Ludwig Nussel